@sentropic/h2a 0.98.7-rc.2 → 0.98.7-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -0
- package/dist/bin.js +3 -0
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +38 -38
- package/dist/cli.js.map +1 -1
- package/dist/focus-build.d.ts +10 -0
- package/dist/focus-build.d.ts.map +1 -0
- package/dist/focus-build.js +175 -0
- package/dist/focus-build.js.map +1 -0
- package/dist/hosts/native-convergence.d.ts +36 -0
- package/dist/hosts/native-convergence.d.ts.map +1 -1
- package/dist/hosts/native-convergence.js +60 -4
- package/dist/hosts/native-convergence.js.map +1 -1
- package/dist/hosts/native-files.d.ts +5 -0
- package/dist/hosts/native-files.d.ts.map +1 -1
- package/dist/hosts/native-files.js +4 -0
- package/dist/hosts/native-files.js.map +1 -1
- package/dist/hosts/native-inspection.js +1 -1
- package/dist/hosts/native-inspection.js.map +1 -1
- package/dist/hosts/native-questions.d.ts +2 -0
- package/dist/hosts/native-questions.d.ts.map +1 -0
- package/dist/hosts/native-questions.js +22 -0
- package/dist/hosts/native-questions.js.map +1 -0
- package/dist/hosts/native-toml.d.ts.map +1 -1
- package/dist/hosts/native-toml.js +2 -0
- package/dist/hosts/native-toml.js.map +1 -1
- package/dist/hosts/plugin.d.ts +27 -0
- package/dist/hosts/plugin.d.ts.map +1 -1
- package/dist/hosts/plugin.js +28 -2
- package/dist/hosts/plugin.js.map +1 -1
- package/dist/hosts/vibe-discovery.js +1 -1
- package/dist/hosts/vibe-discovery.js.map +1 -1
- package/dist/hosts/vibe-equipment.d.ts +1 -0
- package/dist/hosts/vibe-equipment.d.ts.map +1 -1
- package/dist/hosts/vibe-equipment.js +14 -1
- package/dist/hosts/vibe-equipment.js.map +1 -1
- package/dist/runtime/mcp/tools.d.ts.map +1 -1
- package/dist/runtime/mcp/tools.js +5 -4
- package/dist/runtime/mcp/tools.js.map +1 -1
- package/focus-kit/dossier.schema.json +193 -0
- package/focus-kit/dossier.template.json +39 -0
- package/focus-kit/ecosystem.json +853 -0
- package/focus-kit/renderer-manifest.json +24 -0
- package/focus-kit/renderer.html +278 -0
- package/focus-kit/validator.mjs +789 -0
- package/hooks/hooks.json +11 -1
- package/hooks/workspace-scope-grant.mjs +22 -0
- package/hooks/workspace-scope-guard.mjs +277 -0
- package/hooks/workspace-scope-shell.mjs +558 -0
- package/hooks/workspace-scope-state.mjs +71 -0
- package/package.json +11 -5
- package/skills/h2a/SKILL.md +19 -0
- package/skills/h2a-run/SKILL.md +19 -0
- package/skills/harness/SKILL.md +19 -0
- package/skills/harness/track-report/SKILL.md +14 -0
- package/skills/harness/using-harness/SKILL.md +19 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
<!doctype html><html lang="fr"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; font-src data:; connect-src 'none'; base-uri 'none'; form-action 'none'"><title><!--FOCUS_TITLE--></title><style>.st-badge.svelte-1b366fo{display:inline-flex;align-items:center;border-radius:var(--st-component-badge-radius, var(--st-radius-pill, 999px));font-size:var(--st-component-badge-fontSize, .75rem);font-weight:var(--st-component-badge-fontWeight, 650);letter-spacing:var(--st-component-badge-letterSpacing, normal);line-height:var(--st-component-badge-lineHeight, 1);min-height:var(--st-component-badge-minHeight, 0);padding:var(--st-component-badge-paddingBlock, .25rem) var(--st-component-badge-paddingInline, .5rem);text-transform:var(--st-component-badge-textTransform, none)}.st-badge--circle.svelte-1b366fo{border-radius:var(--st-component-badge-circle-radius, 50%);box-sizing:border-box;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--st-component-badge-circle-size, 1.25rem);min-height:var(--st-component-badge-circle-size, 1.25rem);padding:var(--st-component-badge-circle-padding, .125rem);text-align:center}.st-badge--sm.svelte-1b366fo{font-size:var(--st-component-badge-sm-fontSize, .6875rem)}.st-badge--neutral.svelte-1b366fo{background:var(--st-semantic-surface-subtle);color:var(--st-semantic-text-secondary)}.st-badge--success.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-success) 14%,white);color:var(--st-semantic-feedback-success)}.st-badge--warning.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-warning) 14%,white);color:var(--st-semantic-feedback-warning)}.st-badge--error.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-error) 14%,white);color:var(--st-semantic-feedback-error)}.st-badge--info.svelte-1b366fo{background:var( --st-component-badge-infoBackground, color-mix(in srgb, var(--st-semantic-feedback-info) 14%, white) );color:var(--st-component-badge-infoText, var(--st-semantic-feedback-info))}.st-button.svelte-1xn14gj{border-width:var(--st-component-button-anatomy-shape-borderWidth, 1px);border-style:var(--st-component-button-anatomy-shape-borderStyle, solid);border-color:transparent;border-radius:var(--st-component-button-anatomy-shape-radius, .375rem);cursor:var(--st-cursor-interactive, pointer);display:inline-flex;align-items:center;justify-content:center;gap:var(--st-component-button-anatomy-icon-gap, var(--st-spacing-2, .5rem));font-family:var(--st-component-button-anatomy-typography-family, inherit);font-weight:var(--st-component-button-anatomy-typography-weight, 600);line-height:var(--st-component-button-anatomy-typography-lineHeight, 1.2);letter-spacing:var(--st-component-button-anatomy-typography-letterSpacing, 0);text-transform:var(--st-component-button-anatomy-typography-textTransform, none);transition:background var(--st-motion-fast, .12s) var(--st-motion-easing, ease),border-color var(--st-motion-fast, .12s) var(--st-motion-easing, ease),color var(--st-motion-fast, .12s) var(--st-motion-easing, ease),box-shadow var(--st-motion-fast, .12s) var(--st-motion-easing, ease)}.st-button--sm.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-sm-controlHeight, 2rem);min-width:var(--st-component-button-anatomy-density-sm-minWidth, 2rem);padding:var(--st-component-button-anatomy-density-sm-paddingBlock, 0) var(--st-component-button-anatomy-density-sm-paddingInlineEnd, var(--st-component-button-anatomy-density-sm-paddingInline, .75rem)) var(--st-component-button-anatomy-density-sm-paddingBlock, 0) var(--st-component-button-anatomy-density-sm-paddingInline, .75rem);font-size:var(--st-component-button-anatomy-density-sm-fontSize, .875rem)}.st-button--md.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-md-controlHeight, 2.5rem);min-width:var(--st-component-button-anatomy-density-md-minWidth, 2.5rem);padding:var(--st-component-button-anatomy-density-md-paddingBlock, 0) var(--st-component-button-anatomy-density-md-paddingInlineEnd, var(--st-component-button-anatomy-density-md-paddingInline, 1rem)) var(--st-component-button-anatomy-density-md-paddingBlock, 0) var(--st-component-button-anatomy-density-md-paddingInline, 1rem);font-size:var(--st-component-button-anatomy-density-md-fontSize, var(--st-component-button-anatomy-typography-size, .9375rem))}.st-button--lg.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-lg-controlHeight, 3rem);min-width:var(--st-component-button-anatomy-density-lg-minWidth, 3rem);padding:var(--st-component-button-anatomy-density-lg-paddingBlock, 0) var(--st-component-button-anatomy-density-lg-paddingInlineEnd, var(--st-component-button-anatomy-density-lg-paddingInline, 1.25rem)) var(--st-component-button-anatomy-density-lg-paddingBlock, 0) var(--st-component-button-anatomy-density-lg-paddingInline, 1.25rem);font-size:var(--st-component-button-anatomy-density-lg-fontSize, 1rem)}.st-button--primary.svelte-1xn14gj{background:var(--st-component-button-primaryBackground, var(--st-semantic-action-primary));color:var(--st-component-button-primaryText, var(--st-semantic-action-primaryText))}.st-button--secondary.svelte-1xn14gj{background:var(--st-component-button-secondaryBackground, var(--st-semantic-action-secondary));color:var(--st-component-button-secondaryText, var(--st-semantic-action-secondaryText));border-color:var(--st-component-button-secondaryBorder, var(--st-semantic-border-subtle))}.st-button--primary.svelte-1xn14gj:not(:disabled):hover{background:var(--st-component-button-anatomy-states-hover-bg, var(--st-semantic-action-primary))}.st-button--secondary.svelte-1xn14gj:not(:disabled):hover{background:var(--st-component-button-secondaryHoverBackground, var(--st-semantic-action-secondaryHover, var(--st-semantic-action-secondary)))}.st-button--ghost.svelte-1xn14gj{background:transparent;color:var(--st-semantic-text-link)}.st-button--danger.svelte-1xn14gj{background:var(--st-semantic-action-danger);color:var(--st-semantic-text-inverse)}.st-button.svelte-1xn14gj:disabled{cursor:var(--st-cursor-disabled, not-allowed);opacity:var(--st-component-button-anatomy-states-disabled-opacity, .55)}.st-button.svelte-1xn14gj:focus-visible{outline:var(--st-component-button-anatomy-focus-outline, 2px solid var(--st-semantic-border-interactive));outline-offset:var(--st-component-button-anatomy-focus-offset, 2px);box-shadow:var(--st-component-button-anatomy-focus-boxShadow, none)}.st-card.svelte-ee68m1{background:var(--st-component-card-background, var(--st-semantic-surface-raised));border-width:var(--st-component-card-anatomy-shape-borderWidth, 1px);border-style:var(--st-component-card-anatomy-shape-borderStyle, solid);border-color:var(--st-component-card-border, var(--st-semantic-border-subtle));border-radius:var(--st-component-card-anatomy-shape-radius, .5rem);box-shadow:var(--st-component-card-shadow, 0 1px 2px rgb(15 23 42 / .08));color:var(--st-semantic-text-primary);font-size:var(--st-component-card-anatomy-typography-size, inherit);line-height:var(--st-component-card-anatomy-typography-lineHeight, normal);letter-spacing:var(--st-component-card-anatomy-typography-letterSpacing, normal);padding:var(--st-spacing-4, 1rem)}.st-card--interactive.svelte-ee68m1{cursor:var(--st-cursor-interactive, pointer);transition:background-color var(--st-motion-normal, .18s) var(--st-motion-easing, ease),box-shadow var(--st-motion-normal, .18s) var(--st-motion-easing, ease),transform var(--st-motion-normal, .18s) var(--st-motion-easing, ease)}.st-card--interactive.svelte-ee68m1:hover{background:var(--st-component-card-anatomy-states-hover-bg, var(--st-component-card-background, var(--st-semantic-surface-raised)));box-shadow:var(--st-shadow-medium, 0 8px 24px rgb(15 23 42 / .12));transform:var(--st-component-card-anatomy-states-hover-transform, translateY(-1px))}.st-container.svelte-129fa14{box-sizing:border-box;inline-size:100%;margin-inline:auto}.st-container--sm.svelte-129fa14{max-inline-size:var(--st-container-sm, 40rem)}.st-container--md.svelte-129fa14{max-inline-size:var(--st-container-md, 48rem)}.st-container--lg.svelte-129fa14{max-inline-size:var(--st-container-lg, 64rem)}.st-container--xl.svelte-129fa14{max-inline-size:var(--st-container-xl, 80rem)}.st-container--full.svelte-129fa14{max-inline-size:none}.st-container--padded.svelte-129fa14{padding-inline:var(--st-spacing-4, 1rem)}.transparent.svelte-qyfwwc{background:transparent}.a11y-hidden.svelte-i52n8g{display:none}.a11y-live-msg.svelte-i52n8g{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0px,0px,0px,0px);clip-path:inset(100%)}.svelte-flow__selection.svelte-vt0ypg{position:absolute;top:0;left:0}.svelte-flow__selection-wrapper.svelte-1n4hcy8{position:absolute;top:0;left:0;z-index:2000;pointer-events:all}.svelte-flow__selection-wrapper.svelte-1n4hcy8:focus,.svelte-flow__selection-wrapper.svelte-1n4hcy8:focus-visible{outline:none}.svelte-flow.svelte-1ca19db{width:100%;height:100%;overflow:hidden;position:relative;z-index:0}.svelte-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.svelte-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.svelte-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.svelte-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.svelte-flow__pane{z-index:1;touch-action:none}.svelte-flow__pane.draggable{cursor:grab}.svelte-flow__pane.dragging{cursor:grabbing}.svelte-flow__pane.selection{cursor:pointer}.svelte-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.svelte-flow__renderer{z-index:4}.svelte-flow__selection{z-index:6}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible{outline:none}.svelte-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.svelte-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.svelte-flow .svelte-flow__edges{position:absolute}.svelte-flow .svelte-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.svelte-flow__edge{pointer-events:visibleStroke}.svelte-flow__edge.selectable{cursor:pointer}.svelte-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.svelte-flow__edge.animated path.svelte-flow__edge-interaction{stroke-dasharray:none;animation:none}.svelte-flow__edge.inactive{pointer-events:none}.svelte-flow__edge.selected,.svelte-flow__edge:focus,.svelte-flow__edge:focus-visible{outline:none}.svelte-flow__edge.selected .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus-visible .svelte-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.svelte-flow__edge-textwrapper{pointer-events:all}.svelte-flow__edge .svelte-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__connection{pointer-events:none}.svelte-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.svelte-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.svelte-flow__nodes{pointer-events:none;transform-origin:0 0}.svelte-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}.svelte-flow__node.selectable{cursor:pointer}.svelte-flow__node.draggable{cursor:grab;pointer-events:all}.svelte-flow__node.draggable.dragging{cursor:grabbing}.svelte-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.svelte-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.svelte-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.svelte-flow__handle.connectingfrom{pointer-events:all}.svelte-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.svelte-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.svelte-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.svelte-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.svelte-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.svelte-flow__edgeupdater{cursor:move;pointer-events:all}.svelte-flow__pane.selection .svelte-flow__panel{pointer-events:none}.svelte-flow__panel{position:absolute;z-index:5;margin:15px}.svelte-flow__panel.top{top:0}.svelte-flow__panel.bottom{bottom:0}.svelte-flow__panel.top.center,.svelte-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.svelte-flow__panel.left{left:0}.svelte-flow__panel.right{right:0}.svelte-flow__panel.left.center,.svelte-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.svelte-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.svelte-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.svelte-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.svelte-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.svelte-flow__minimap-svg{display:block}.svelte-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.svelte-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.svelte-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.svelte-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.svelte-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.svelte-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.svelte-flow__controls.horizontal{flex-direction:row}.svelte-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.svelte-flow__edge.updating .svelte-flow__edge-path{stroke:#777}.svelte-flow__edge-text{font-size:10px}.svelte-flow__node.selectable:focus,.svelte-flow__node.selectable:focus-visible{outline:none}.svelte-flow__node-input,.svelte-flow__node-default,.svelte-flow__node-output,.svelte-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.svelte-flow__node-input.selectable:hover,.svelte-flow__node-default.selectable:hover,.svelte-flow__node-output.selectable:hover,.svelte-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.svelte-flow__node-input.selectable.selected,.svelte-flow__node-input.selectable:focus,.svelte-flow__node-input.selectable:focus-visible,.svelte-flow__node-default.selectable.selected,.svelte-flow__node-default.selectable:focus,.svelte-flow__node-default.selectable:focus-visible,.svelte-flow__node-output.selectable.selected,.svelte-flow__node-output.selectable:focus,.svelte-flow__node-output.selectable:focus-visible,.svelte-flow__node-group.selectable.selected,.svelte-flow__node-group.selectable:focus,.svelte-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.svelte-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.svelte-flow__nodesselection-rect,.svelte-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible,.svelte-flow__selection:focus,.svelte-flow__selection:focus-visible{outline:none}.svelte-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.svelte-flow__controls-button:disabled{pointer-events:none}.svelte-flow__controls-button:disabled svg{fill-opacity:.4}.svelte-flow__controls-button:last-child{border-bottom:none}.svelte-flow__controls.horizontal .svelte-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.svelte-flow__controls.horizontal .svelte-flow__controls-button:last-child{border-right:none}.svelte-flow__resize-control{position:absolute}.svelte-flow__resize-control.left,.svelte-flow__resize-control.right{cursor:ew-resize}.svelte-flow__resize-control.top,.svelte-flow__resize-control.bottom{cursor:ns-resize}.svelte-flow__resize-control.top.left,.svelte-flow__resize-control.bottom.right{cursor:nwse-resize}.svelte-flow__resize-control.bottom.left,.svelte-flow__resize-control.top.right{cursor:nesw-resize}.svelte-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.svelte-flow__resize-control.handle.left{left:0;top:50%}.svelte-flow__resize-control.handle.right{left:100%;top:50%}.svelte-flow__resize-control.handle.top{left:50%;top:0}.svelte-flow__resize-control.handle.bottom{left:50%;top:100%}.svelte-flow__resize-control.handle.top.left,.svelte-flow__resize-control.handle.bottom.left{left:0}.svelte-flow__resize-control.handle.top.right,.svelte-flow__resize-control.handle.bottom.right{left:100%}.svelte-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.svelte-flow__resize-control.line.left,.svelte-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.svelte-flow__resize-control.line.left{left:0;border-left-width:1px}.svelte-flow__resize-control.line.right{left:100%;border-right-width:1px}.svelte-flow__resize-control.line.top,.svelte-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.svelte-flow__resize-control.line.top{top:0;border-top-width:1px}.svelte-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.svelte-flow__edge-label{text-align:center;position:absolute;padding:2px;font-size:10px;color:var(--xy-edge-label-color, var(--xy-edge-label-color-default));background:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.svelte-flow__container{-webkit-user-select:none;-moz-user-select:none;user-select:none}*{box-sizing:border-box}body{margin:0;font:16px/1.5 system-ui,sans-serif}.focus-page{min-height:100vh;background:var(--st-semantic-surface-default);color:var(--st-semantic-text-primary);color-scheme:light}.focus-page[data-mode=dark]{color-scheme:dark}.title-band{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem 1rem;border-bottom:1px solid var(--st-semantic-border-subtle)}h1{margin:0;font-size:1rem;font-weight:600;overflow-wrap:anywhere}h2{font-size:1.125rem;margin:.5rem 0}h3{font-size:1rem}main{max-width:72rem;margin:auto;padding:1rem 0 2rem}p,blockquote{margin:.5rem 0}blockquote{border-left:1px solid var(--st-semantic-border-strong);padding-left:1rem}.reading-meta{margin-bottom:1rem}.dossier-section{margin:1.25rem 0;overflow-wrap:anywhere}.prose{white-space:pre-wrap}.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:.75rem}.option-card{appearance:none;padding:0;text-align:left;color:inherit;background:transparent;border:0;border-radius:.5rem;cursor:pointer;font:inherit}.option-card .st-card{height:100%;box-shadow:none;border-width:1px}.option-card.selected .st-card{border-color:var(--st-semantic-border-interactive);background:var(--st-semantic-surface-subtle)}.option-card:focus-visible,summary:focus-visible{outline:1px solid var(--st-semantic-border-interactive);outline-offset:3px}.option-card strong{display:block;margin-bottom:.5rem}.muted,.canvas-hint,footer{color:var(--st-semantic-text-secondary);font-size:.875rem}figure{margin:0}figcaption{font-weight:600}.canvas{height:480px;width:100%;border:1px solid var(--st-semantic-border-subtle);border-radius:.5rem;overflow:hidden}.ecosystem-node{width:240px;min-height:100px;box-shadow:none!important;border-width:1px!important}.ecosystem-node p{font-size:14px}.ecosystem-container{width:100%;height:100%;box-sizing:border-box;box-shadow:none!important;border-width:1px!important;background:var(--st-semantic-surface-default)!important}.svelte-flow__edge-path{stroke-width:1px!important}.svelte-flow__controls-button{min-width:40px;min-height:40px;border-width:0 0 1px}details{margin-top:.75rem}summary{cursor:pointer}dt{font-weight:600}dd{margin-left:1rem}footer{border-top:1px solid var(--st-semantic-border-subtle);padding-top:1rem}@media(max-width:600px){.canvas{height:430px}.title-band{align-items:flex-start}main{padding-top:.75rem}}
|
|
2
|
+
</style></head><body><!--FOCUS_PAYLOAD--><div id="app"></div><noscript>Activez JavaScript pour lire le dossier interactif.</noscript><script type="text/plain" data-focus-licenses>@sentropic/design-system-svelte@0.34.69
|
|
3
|
+
License: see package metadata
|
|
4
|
+
|
|
5
|
+
@sentropic/design-system-themes@0.11.0
|
|
6
|
+
License: see package metadata
|
|
7
|
+
|
|
8
|
+
@sentropic/design-system-tokens@0.11.0
|
|
9
|
+
License: see package metadata
|
|
10
|
+
|
|
11
|
+
@svelte-put/shortcut@4.2.0
|
|
12
|
+
MIT License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2023-2024 Quang Phan
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@xyflow/svelte@1.6.5
|
|
36
|
+
MIT License
|
|
37
|
+
|
|
38
|
+
Copyright (c) 2019-2025 webkid GmbH
|
|
39
|
+
|
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
42
|
+
in the Software without restriction, including without limitation the rights
|
|
43
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
45
|
+
furnished to do so, subject to the following conditions:
|
|
46
|
+
|
|
47
|
+
The above copyright notice and this permission notice shall be included in all
|
|
48
|
+
copies or substantial portions of the Software.
|
|
49
|
+
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
+
SOFTWARE.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@xyflow/system@0.0.81
|
|
60
|
+
MIT License
|
|
61
|
+
|
|
62
|
+
Copyright (c) 2019-2025 webkid GmbH
|
|
63
|
+
|
|
64
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
65
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
66
|
+
in the Software without restriction, including without limitation the rights
|
|
67
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
68
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
69
|
+
furnished to do so, subject to the following conditions:
|
|
70
|
+
|
|
71
|
+
The above copyright notice and this permission notice shall be included in all
|
|
72
|
+
copies or substantial portions of the Software.
|
|
73
|
+
|
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
75
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
76
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
77
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
78
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
79
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
80
|
+
SOFTWARE.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
clsx@2.1.1
|
|
84
|
+
MIT License
|
|
85
|
+
|
|
86
|
+
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
87
|
+
|
|
88
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
89
|
+
|
|
90
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
91
|
+
|
|
92
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
d3-color@3.1.0
|
|
96
|
+
Copyright 2010-2022 Mike Bostock
|
|
97
|
+
|
|
98
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
99
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
100
|
+
and this permission notice appear in all copies.
|
|
101
|
+
|
|
102
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
103
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
104
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
105
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
106
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
107
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
108
|
+
THIS SOFTWARE.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
d3-dispatch@3.0.1
|
|
112
|
+
Copyright 2010-2021 Mike Bostock
|
|
113
|
+
|
|
114
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
115
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
116
|
+
and this permission notice appear in all copies.
|
|
117
|
+
|
|
118
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
119
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
120
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
121
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
122
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
123
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
124
|
+
THIS SOFTWARE.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
d3-drag@3.0.0
|
|
128
|
+
Copyright 2010-2021 Mike Bostock
|
|
129
|
+
|
|
130
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
131
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
132
|
+
and this permission notice appear in all copies.
|
|
133
|
+
|
|
134
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
135
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
136
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
137
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
138
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
139
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
140
|
+
THIS SOFTWARE.
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
d3-ease@3.0.1
|
|
144
|
+
Copyright 2010-2021 Mike Bostock
|
|
145
|
+
Copyright 2001 Robert Penner
|
|
146
|
+
All rights reserved.
|
|
147
|
+
|
|
148
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
149
|
+
are permitted provided that the following conditions are met:
|
|
150
|
+
|
|
151
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
152
|
+
list of conditions and the following disclaimer.
|
|
153
|
+
|
|
154
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
155
|
+
this list of conditions and the following disclaimer in the documentation
|
|
156
|
+
and/or other materials provided with the distribution.
|
|
157
|
+
|
|
158
|
+
* Neither the name of the author nor the names of contributors may be used to
|
|
159
|
+
endorse or promote products derived from this software without specific prior
|
|
160
|
+
written permission.
|
|
161
|
+
|
|
162
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
163
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
164
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
165
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
166
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
167
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
168
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
169
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
170
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
171
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
d3-interpolate@3.0.1
|
|
175
|
+
Copyright 2010-2021 Mike Bostock
|
|
176
|
+
|
|
177
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
178
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
179
|
+
and this permission notice appear in all copies.
|
|
180
|
+
|
|
181
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
182
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
183
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
184
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
185
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
186
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
187
|
+
THIS SOFTWARE.
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
d3-selection@3.0.0
|
|
191
|
+
Copyright 2010-2021 Mike Bostock
|
|
192
|
+
|
|
193
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
194
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
195
|
+
and this permission notice appear in all copies.
|
|
196
|
+
|
|
197
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
198
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
199
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
200
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
201
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
202
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
203
|
+
THIS SOFTWARE.
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
d3-timer@3.0.1
|
|
207
|
+
Copyright 2010-2021 Mike Bostock
|
|
208
|
+
|
|
209
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
210
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
211
|
+
and this permission notice appear in all copies.
|
|
212
|
+
|
|
213
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
214
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
215
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
216
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
217
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
218
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
219
|
+
THIS SOFTWARE.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
d3-transition@3.0.1
|
|
223
|
+
Copyright 2010-2021 Mike Bostock
|
|
224
|
+
|
|
225
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
226
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
227
|
+
and this permission notice appear in all copies.
|
|
228
|
+
|
|
229
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
230
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
231
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
232
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
233
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
234
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
235
|
+
THIS SOFTWARE.
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
d3-zoom@3.0.0
|
|
239
|
+
Copyright 2010-2021 Mike Bostock
|
|
240
|
+
|
|
241
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
242
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
243
|
+
and this permission notice appear in all copies.
|
|
244
|
+
|
|
245
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
246
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
247
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
248
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
249
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
250
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
251
|
+
THIS SOFTWARE.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
esm-env@1.2.2
|
|
255
|
+
Copyright 2022 Benjamin McCann
|
|
256
|
+
|
|
257
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
258
|
+
|
|
259
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
260
|
+
|
|
261
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
svelte@5.56.4
|
|
265
|
+
Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors)
|
|
266
|
+
|
|
267
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
268
|
+
|
|
269
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
270
|
+
|
|
271
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
272
|
+
</script><script>(function(){"use strict";var Pr=Array.isArray,Pc=Array.prototype.indexOf,Nr=Array.prototype.includes,Ir=Array.from,Nc=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyDescriptors,us=Object.prototype,Ic=Array.prototype,zr=Object.getPrototypeOf,ds=Object.isExtensible;function Un(e){return typeof e=="function"}const Je=()=>{};function zc(e){return e()}function Do(e){for(var t=0;t<e.length;t++)e[t]()}function fs(){var e,t,n=new Promise((r,o)=>{e=r,t=o});return{promise:n,resolve:e,reject:t}}function Ie(e,t,n=!1){return e===void 0?n?t():t:e}function Qn(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}function Oc(e,t){var n={};for(var r in e)t.includes(r)||(n[r]=e[r]);for(var o of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,o)&&!t.includes(o)&&(n[o]=e[o]);return n}const Ae=2,xn=4,Jn=8,Ro=1<<24,st=16,at=32,zt=64,Ho=128,$e=512,Ee=1024,Me=2048,bt=4096,ze=8192,Ye=16384,kn=32768,Bo=1<<25,Ot=65536,Or=1<<17,hs=1<<18,an=1<<19,gs=1<<20,wt=1<<25,ln=65536,Dr=1<<21,Sn=1<<22,Qt=1<<23,_t=Symbol("$state"),vs=Symbol("legacy props"),Dc=Symbol(""),ps=Symbol("attributes"),Lo=Symbol("class"),qo=Symbol("style"),Vo=Symbol("text"),Rr=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wo=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Fo(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Rc(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Hc(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Bc(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Lc(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qc(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Vc(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Wc(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Fc(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Kc(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yc(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Zc(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Xc=1,Gc=2,ms=4,jc=8,Uc=16,Qc=1,Jc=2,$c=4,eu=8,tu=16,ys=1,nu=2,ke=Symbol("uninitialized"),bs="http://www.w3.org/1999/xhtml",ws="http://www.w3.org/2000/svg",ru="http://www.w3.org/1998/Math/MathML",ou="@attach";function iu(){console.warn("https://svelte.dev/e/derived_inert")}function su(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function au(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function _s(e){return e===this.v}function xs(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ks(e){return!xs(e,this.v)}let En=!1,Cy=!1;function lu(){En=!0}const cu=[];function Ss(e,t=!1,n=!1){return Hr(e,new Map,"",cu,null,n)}function Hr(e,t,n,r,o=null,i=!1){if(typeof e=="object"&&e!==null){var s=t.get(e);if(s!==void 0)return s;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Pr(e)){var a=Array(e.length);t.set(e,a),o!==null&&t.set(o,a);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(a[l]=Hr(c,t,n,r,null,i))}return a}if(zr(e)===us){a={},t.set(e,a),o!==null&&t.set(o,a);for(var u of Object.keys(e))a[u]=Hr(e[u],t,n,r,null,i);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!i)return Hr(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}let ve=null;function Tn(e){ve=e}function Ko(e){return Yo().get(e)}function Es(e,t){return Yo().set(e,t),t}function uu(e){return Yo().has(e)}function oe(e,t=!1,n){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,r:se,l:En&&!t?{s:null,u:null,$:[]}:null}}function ie(e){var t=ve,n=t.e;if(n!==null){t.e=null;for(var r of n)Xs(r)}return t.i=!0,ve=t.p,{}}function $n(){return!En||ve!==null&&ve.l===null}function Yo(e){return ve===null&&Fo(),ve.c??=new Map(du(ve)||void 0)}function du(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let Cn=[];function fu(){var e=Cn;Cn=[],Do(e)}function Dt(e){if(Cn.length===0){var t=Cn;queueMicrotask(()=>{t===Cn&&fu()})}Cn.push(e)}function Ts(e){var t=se;if(t===null)return ae.f|=Qt,e;if((t.f&kn)===0&&(t.f&xn)===0)throw e;Jt(e,t)}function Jt(e,t){if(!(t!==null&&(t.f&Ye)!==0)){for(;t!==null;){if((t.f&Ho)!==0){if((t.f&kn)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const hu=-7169;function xe(e,t){e.f=e.f&hu|t}function Zo(e){(e.f&$e)!==0||e.deps===null?xe(e,Ee):xe(e,bt)}function Cs(e){if(e!==null)for(const t of e)(t.f&Ae)===0||(t.f&ln)===0||(t.f^=ln,Cs(t.deps))}function As(e,t,n){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&n.add(e),Cs(e.deps),xe(e,Ee)}let Br=!1;function gu(e){var t=Br;try{return Br=!1,[e(),Br]}finally{Br=t}}function Ms(e){let t=0,n=$t(0),r;return()=>{ri()&&(d(n),oi(()=>(t===0&&(r=Ge(()=>e(()=>xt(n)))),t+=1,()=>{Dt(()=>{t-=1,t===0&&(r?.(),r=void 0,xt(n))})})))}}var vu=Ot|an;function pu(e,t,n,r){new mu(e,t,n,r)}class mu{parent;is_pending=!1;transform_error;#e;#n=null;#t;#a;#r;#i=null;#o=null;#l=null;#s=null;#g=0;#c=0;#u=!1;#f=new Set;#p=new Set;#d=null;#y=Ms(()=>(this.#d=$t(this.#g),()=>{this.#d=null}));constructor(t,n,r,o){this.#e=t,this.#t=n,this.#a=i=>{var s=se;s.b=this,s.f|=Ho,r(i)},this.parent=se.b,this.transform_error=o??this.parent?.transform_error??(i=>i),this.#r=un(()=>{this.#b()},vu)}#m(){try{this.#i=Oe(()=>this.#a(this.#e))}catch(t){this.error(t)}}#_(t){const n=this.#t.failed;n&&(this.#l=Oe(()=>{n(this.#e,()=>t,()=>()=>{})}))}#x(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#o=Oe(()=>t(this.#e)),Dt(()=>{var n=this.#s=document.createDocumentFragment(),r=ct();n.append(r),this.#i=this.#w(()=>Oe(()=>this.#a(r))),this.#c===0&&(this.#e.before(n),this.#s=null,dn(this.#o,()=>{this.#o=null}),this.#h(fe))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#g=0,this.#i=Oe(()=>{this.#a(this.#e)}),this.#c>0){var t=this.#s=document.createDocumentFragment();si(this.#i,t);const n=this.#t.pending;this.#o=Oe(()=>n(this.#e))}else this.#h(fe)}catch(n){this.error(n)}}#h(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#p)}defer_effect(t){As(t,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#w(t){var n=se,r=ae,o=ve;kt(this.#r),tt(this.#r),Tn(this.#r.ctx);try{return Rt.ensure(),t()}catch(i){return Ts(i),null}finally{kt(n),tt(r),Tn(o)}}#v(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#v(t,n);return}this.#c+=t,this.#c===0&&(this.#h(n),this.#o&&dn(this.#o,()=>{this.#o=null}),this.#s&&(this.#e.before(this.#s),this.#s=null))}update_pending_count(t,n){this.#v(t,n),this.#g+=t,!(!this.#d||this.#u)&&(this.#u=!0,Dt(()=>{this.#u=!1,this.#d&&Nn(this.#d,this.#g)}))}get_effect_pending(){return this.#y(),d(this.#d)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;fe?.is_fork?(this.#i&&fe.skip_effect(this.#i),this.#o&&fe.skip_effect(this.#o),this.#l&&fe.skip_effect(this.#l),fe.oncommit(()=>{this.#k(t)})):this.#k(t)}#k(t){this.#i&&(Te(this.#i),this.#i=null),this.#o&&(Te(this.#o),this.#o=null),this.#l&&(Te(this.#l),this.#l=null);var n=this.#t.onerror;let r=this.#t.failed;var o=!1,i=!1;const s=()=>{if(o){au();return}o=!0,i&&Zc(),this.#l!==null&&dn(this.#l,()=>{this.#l=null}),this.#w(()=>{this.#b()})},a=l=>{try{i=!0,n?.(l,s),i=!1}catch(c){Jt(c,this.#r&&this.#r.parent)}r&&(this.#l=this.#w(()=>{try{return Oe(()=>{var c=se;c.b=this,c.f|=Ho,r(this.#e,()=>l,()=>s)})}catch(c){return Jt(c,this.#r.parent),null}}))};Dt(()=>{var l;try{l=this.transform_error(t)}catch(c){Jt(c,this.#r&&this.#r.parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>Jt(c,this.#r&&this.#r.parent)):a(l)})}}function Ps(e,t,n,r){const o=$n()?An:Xo;var i=e.filter(g=>!g.settled),s=t.map(o);if(n.length===0&&i.length===0){r(s);return}var a=se,l=yu(),c=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(g=>g.promise)):null;function u(g){if((a.f&Ye)===0){l();try{r([...s,...g])}catch(v){Jt(v,a)}Lr()}}var h=Ns();if(n.length===0){c.then(()=>u([])).finally(h);return}function f(){Promise.all(n.map(g=>bu(g))).then(u).catch(g=>Jt(g,a)).finally(h)}c?c.then(()=>{l(),f(),Lr()}):f()}function yu(){var e=se,t=ae,n=ve,r=fe;return function(i=!0){kt(e),tt(t),Tn(n),i&&(e.f&Ye)===0&&(r?.activate(),r?.apply())}}function Lr(e=!0){kt(null),tt(null),Tn(null),e&&fe?.deactivate()}function Ns(){var e=se,t=e.b,n=fe,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function An(e){var t=Ae|Me;return se!==null&&(se.f|=an),{ctx:ve,deps:null,effects:null,equals:_s,f:t,fn:e,reactions:null,rv:0,v:ke,wv:0,parent:se,ac:null}}const er=Symbol("obsolete");function bu(e,t,n){let r=se;r===null&&Rc();var o=void 0,i=$t(ke),s=!ae,a=new Set;return Iu(()=>{var l=se,c=fs();o=c.promise;try{Promise.resolve(e()).then(c.resolve,g=>{g!==Rr&&c.reject(g)}).finally(Lr)}catch(g){c.reject(g),Lr()}var u=fe;if(s){if((l.f&kn)!==0)var h=Ns();if(r.b?.is_rendered())u.async_deriveds.get(l)?.reject(er);else for(const g of a.values())g.reject(er);a.add(c),u.async_deriveds.set(l,c)}const f=(g,v=void 0)=>{h?.(),a.delete(c),v!==er&&(u.activate(),v?(i.f|=Qt,Nn(i,v)):((i.f&Qt)!==0&&(i.f^=Qt),Nn(i,g)),u.deactivate())};c.promise.then(f,g=>f(null,g||"unknown"))}),Wr(()=>{for(const l of a)l.reject(er)}),new Promise(l=>{function c(u){function h(){u===o?l(i):c(o)}u.then(h,h)}c(o)})}function w(e){const t=An(e);return ra(t),t}function Xo(e){const t=An(e);return t.equals=ks,t}function wu(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Te(t[n])}}function Go(e){var t,n=se,r=e.parent;if(!Lt&&r!==null&&e.v!==ke&&(r.f&(Ye|ze))!==0)return iu(),e.v;kt(r);try{e.f&=~ln,wu(e),t=la(e)}finally{kt(n)}return t}function Is(e){var t=Go(e);if(!e.equals(t)&&(e.wv=sa(),(!fe?.is_fork||e.deps===null)&&(fe!==null?(fe.capture(e,t,!0),Uo?.capture(e,t,!0)):e.v=t,e.deps===null))){xe(e,Ee);return}Lt||(lt!==null?(ri()||fe?.is_fork)&<.set(e,t):Zo(e))}function _u(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Rr),t.fn!==null&&(t.teardown=Je),t.ac=null,or(t,0),ii(t))}function zs(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&In(t)}let jo=null,Mn=null,fe=null,Uo=null,lt=null,Qo=null,Jo=!1,Pn=null,qr=null;var Os=0,Ay=new Set;let xu=1;class Rt{id=xu++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;#a=new Set;#r=new Set;#i=0;#o=new Map;#l=null;#s=[];#g=[];#c=new Set;#u=new Set;#f=new Map;#p=new Set;is_fork=!1;#d=!1;constructor(){Mn===null?jo=Mn=this:(Mn.#t=this,this.#n=Mn),Mn=this}#y(){if(this.is_fork)return!0;for(const r of this.#o.keys()){for(var t=r,n=!1;t.parent!==null;){if(this.#f.has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=this.#f.get(t);if(r){this.#f.delete(t);for(var o of r.d)xe(o,Me),n(o);for(o of r.m)xe(o,bt),n(o)}this.#p.add(t)}#m(){this.#e=!0,Os++>1e3&&(this.#v(),ku());for(const l of this.#c)this.#u.delete(l),xe(l,Me),this.schedule(l);for(const l of this.#u)xe(l,bt),this.schedule(l);const t=this.#s;this.#s=[],this.apply();var n=Pn=[],r=[],o=qr=[];for(const l of t)try{this.#_(l,n,r)}catch(c){throw Bs(l),this.#y()||this.discard(),c}if(fe=null,o.length>0){var i=Rt.ensure();for(const l of o)i.schedule(l)}if(Pn=null,qr=null,this.#y()){this.#h(r),this.#h(n);for(const[l,c]of this.#f)Hs(l,c);o.length>0&&fe.#m();return}const s=this.#x();if(s){this.#h(r),this.#h(n),s.#b(this);return}this.#c.clear(),this.#u.clear();for(const l of this.#a)l(this);this.#a.clear(),Uo=this,Ds(r),Ds(n),Uo=null,this.#l?.resolve();var a=fe;if(this.#i===0&&(this.#s.length===0||a!==null)&&this.#v(),this.#s.length>0)if(a!==null){const l=a;l.#s.push(...this.#s.filter(c=>!l.#s.includes(c)))}else a=this;a!==null&&a.#m()}#_(t,n,r){t.f^=Ee;for(var o=t.first;o!==null;){var i=o.f,s=(i&(at|zt))!==0,a=s&&(i&Ee)!==0,l=a||(i&ze)!==0||this.#f.has(o);if(!l&&o.fn!==null){s?o.f^=Ee:(i&xn)!==0?n.push(o):rr(o)&&((i&st)!==0&&this.#u.add(o),In(o));var c=o.first;if(c!==null){o=c;continue}}for(;o!==null;){var u=o.next;if(u!==null){o=u;break}o=o.parent}}}#x(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=t.#n}return null}#b(t){for(const[r,o]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,o);for(const[r,o]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&o.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#u);const n=r=>{var o=r.reactions;if(o!==null)for(const a of o){var i=a.f;if((i&Ae)!==0)n(a);else{var s=a;i&(Sn|st)&&!this.async_deriveds.has(s)&&(this.#u.delete(s),xe(s,Me),this.schedule(s))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>t.discard()),t.#v(),fe=this,this.#m()}#h(t){for(var n=0;n<t.length;n+=1)As(t[n],this.#c,this.#u)}capture(t,n,r=!1){t.v!==ke&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Qt)===0&&(this.current.set(t,[n,r]),lt?.set(t,n)),this.is_fork||(t.v=n)}activate(){fe=this}deactivate(){fe=null,lt=null}flush(){try{Jo=!0,fe=this,this.#m()}finally{Os=0,Qo=null,Pn=null,qr=null,Jo=!1,fe=null,lt=null,cn.clear()}}discard(){for(const t of this.#r)t(this);this.#r.clear();for(const t of this.async_deriveds.values())t.reject(er);this.#v(),this.#l?.resolve()}register_created_effect(t){this.#g.push(t)}#w(){for(let h=jo;h!==null;h=h.#t){var t=h.id<this.id,n=[];for(const[f,[g,v]]of this.current){if(h.current.has(f)){var r=h.current.get(f)[0];if(t&&g!==r)h.current.set(f,[g,v]);else continue}n.push(f)}if(t)for(const[f,g]of this.async_deriveds){const v=h.async_deriveds.get(f);v&&g.promise.then(v.resolve).catch(v.reject)}var o=[...h.current.keys()].filter(f=>!h.current.get(f)[1]);if(!(!h.#e||o.length===0)){var i=o.filter(f=>!this.current.has(f));if(i.length===0)t&&h.discard();else if(n.length>0){if(t)for(const f of this.#p)h.unskip_effect(f,g=>{(g.f&(st|Sn))!==0?h.schedule(g):h.#h([g])});h.activate();var s=new Set,a=new Map;for(var l of n)Rs(l,i,s,a);a=new Map;var c=[...h.current].filter(([f,g])=>{const v=this.current.get(f);return v?v[0]!==g[0]||v[1]!==g[1]:!0}).map(([f])=>f);if(c.length>0)for(const f of this.#g)(f.f&(Ye|ze|Or))===0&&$o(f,c,a)&&((f.f&(Sn|st))!==0?(xe(f,Me),h.schedule(f)):h.#c.add(f));if(h.#s.length>0&&!h.#d){h.apply();for(var u of h.#s)h.#_(u,[],[]);h.#s=[]}h.deactivate()}}}}increment(t,n){if(this.#i+=1,t){let r=this.#o.get(n)??0;this.#o.set(n,r+1)}}decrement(t,n){if(this.#i-=1,t){let r=this.#o.get(n)??0;r===1?this.#o.delete(n):this.#o.set(n,r-1)}this.#d||(this.#d=!0,Dt(()=>{this.#d=!1,this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)this.#c.add(r);for(const r of n)this.#u.add(r);t.clear(),n.clear()}oncommit(t){this.#a.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#l??=fs()).promise}static ensure(){if(fe===null){const t=fe=new Rt;Jo||Dt(()=>{t.#e||t.flush()})}return fe}apply(){{lt=null;return}}schedule(t){if(Qo=t,t.b?.is_pending&&(t.f&(xn|Jn|Ro))!==0&&(t.f&kn)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Pn!==null&&n===se&&(ae===null||(ae.f&Ae)===0))return;if((r&(zt|at))!==0){if((r&Ee)===0)return;n.f^=Ee}}this.#s.push(n)}#v(){if(this.linked){var t=this.#n,n=this.#t;t===null?jo=n:t.#t=n,n===null?Mn=t:n.#n=t,this.linked=!1}}}function ku(){try{Vc()}catch(e){Jt(e,Qo)}}let Ht=null;function Ds(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Ye|ze))===0&&rr(r)&&(Ht=new Set,In(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$s(r),Ht?.size>0)){cn.clear();for(const o of Ht){if((o.f&(Ye|ze))!==0)continue;const i=[o];let s=o.parent;for(;s!==null;)Ht.has(s)&&(Ht.delete(s),i.push(s)),s=s.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(Ye|ze))===0&&In(l)}}Ht.clear()}}Ht=null}}function Rs(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const o of e.reactions){const i=o.f;(i&Ae)!==0?Rs(o,t,n,r):(i&(Sn|st))!==0&&(i&Me)===0&&$o(o,t,r)&&(xe(o,Me),ei(o))}}function $o(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const o of e.deps){if(Nr.call(t,o))return!0;if((o.f&Ae)!==0&&$o(o,t,n))return n.set(o,!0),!0}return n.set(e,!1),!1}function ei(e){fe.schedule(e)}function Hs(e,t){if(!((e.f&at)!==0&&(e.f&Ee)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),xe(e,Ee);for(var n=e.first;n!==null;)Hs(n,t),n=n.next}}function Bs(e){xe(e,Ee);for(var t=e.first;t!==null;)Bs(t),t=t.next}let Vr=new Set;const cn=new Map;let Ls=!1;function $t(e,t){var n={f:0,v:e,reactions:null,equals:_s,rv:0,wv:0};return n}function ue(e,t){const n=$t(e);return ra(n),n}function Su(e,t=!1,n=!0){const r=$t(e);return t||(r.equals=ks),En&&n&&ve!==null&&ve.l!==null&&(ve.l.s??=[]).push(r),r}function B(e,t,n=!1){ae!==null&&(!dt||(ae.f&Or)!==0)&&$n()&&(ae.f&(Ae|st|Sn|Or))!==0&&(St===null||!St.has(e))&&Yc();let r=n?Bt(t):t;return Nn(e,r,qr)}function Nn(e,t,n=null){if(!e.equals(t)){cn.set(e,Lt?t:e.v);var r=Rt.ensure();if(r.capture(e,t),(e.f&Ae)!==0){const o=e;(e.f&Me)!==0&&Go(o),lt===null&&Zo(o)}e.wv=sa(),qs(e,Me,n),$n()&&se!==null&&(se.f&Ee)!==0&&(se.f&(at|zt))===0&&(nt===null?Ou([e]):nt.push(e)),!r.is_fork&&Vr.size>0&&!Ls&&Eu()}return t}function Eu(){Ls=!1;for(const e of Vr){(e.f&Ee)!==0&&xe(e,bt);let t;try{t=rr(e)}catch{t=!0}t&&In(e)}Vr.clear()}function xt(e){B(e,e.v+1)}function qs(e,t,n){var r=e.reactions;if(r!==null)for(var o=$n(),i=r.length,s=0;s<i;s++){var a=r[s],l=a.f;if(!(!o&&a===se)){var c=(l&Me)===0;if(c&&xe(a,t),(l&Or)!==0)Vr.add(a);else if((l&Ae)!==0){var u=a;lt?.delete(u),(l&ln)===0&&(l&$e&&(se===null||(se.f&Dr)===0)&&(a.f|=ln),qs(u,bt,n))}else if(c){var h=a;(l&st)!==0&&Ht!==null&&Ht.add(h),n!==null?n.push(h):ei(h)}}}}function Bt(e){if(typeof e!="object"||e===null||_t in e)return e;const t=zr(e);if(t!==us&&t!==Ic)return e;var n=new Map,r=Pr(e),o=ue(0),i=qt,s=a=>{if(qt===i)return a();var l=ae,c=qt;tt(null),ia(i);var u=a();return tt(l),ia(c),u};return r&&n.set("length",ue(e.length)),new Proxy(e,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Fc();var u=n.get(l);return u===void 0?s(()=>{var h=ue(c.value);return n.set(l,h),h}):B(u,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){const u=s(()=>ue(ke));n.set(l,u),xt(o)}}else B(c,ke),xt(o);return!0},get(a,l,c){if(l===_t)return e;var u=n.get(l),h=l in a;if(u===void 0&&(!h||Ut(a,l)?.writable)&&(u=s(()=>{var g=Bt(h?a[l]:ke),v=ue(g);return v}),n.set(l,u)),u!==void 0){var f=d(u);return f===ke?void 0:f}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=n.get(l);u&&(c.value=d(u))}else if(c===void 0){var h=n.get(l),f=h?.v;if(h!==void 0&&f!==ke)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(a,l){if(l===_t)return!0;var c=n.get(l),u=c!==void 0&&c.v!==ke||Reflect.has(a,l);if(c!==void 0||se!==null&&(!u||Ut(a,l)?.writable)){c===void 0&&(c=s(()=>{var f=u?Bt(a[l]):ke,g=ue(f);return g}),n.set(l,c));var h=d(c);if(h===ke)return!1}return u},set(a,l,c,u){var h=n.get(l),f=l in a;if(r&&l==="length")for(var g=c;g<h.v;g+=1){var v=n.get(g+"");v!==void 0?B(v,ke):g in a&&(v=s(()=>ue(ke)),n.set(g+"",v))}if(h===void 0)(!f||Ut(a,l)?.writable)&&(h=s(()=>ue(void 0)),B(h,Bt(c)),n.set(l,h));else{f=h.v!==ke;var m=s(()=>Bt(c));B(h,m)}var b=Reflect.getOwnPropertyDescriptor(a,l);if(b?.set&&b.set.call(u,c),!f){if(r&&typeof l=="string"){var x=n.get("length"),P=Number(l);Number.isInteger(P)&&P>=x.v&&B(x,P+1)}xt(o)}return!0},ownKeys(a){d(o);var l=Reflect.ownKeys(a).filter(h=>{var f=n.get(h);return f===void 0||f.v!==ke});for(var[c,u]of n)u.v!==ke&&!(c in a)&&l.push(c);return l},setPrototypeOf(){Kc()}})}function Vs(e){try{if(e!==null&&typeof e=="object"&&_t in e)return e[_t]}catch{}return e}function Tu(e,t){return Object.is(Vs(e),Vs(t))}var Re,Ws,Fs,Ks;function Cu(){if(Re===void 0){Re=window,Ws=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Fs=Ut(t,"firstChild").get,Ks=Ut(t,"nextSibling").get,ds(e)&&(e[Lo]=void 0,e[ps]=null,e[qo]=void 0,e.__e=void 0),ds(n)&&(n[Vo]=void 0)}}function ct(e=""){return document.createTextNode(e)}function Ze(e){return Fs.call(e)}function tr(e){return Ks.call(e)}function Z(e,t){return Ze(e)}function de(e,t=!1){{var n=Ze(e);return n instanceof Comment&&n.data===""?tr(n):n}}function G(e,t=1,n=!1){let r=e;for(;t--;)r=tr(r);return r}function Au(e){e.textContent=""}function Ys(){return!1}function ti(e,t,n){return t==null||t===bs?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Mu(e,t){if(t){const n=document.body;e.autofocus=!0,Dt(()=>{document.activeElement===n&&e.focus()})}}function ni(e){var t=ae,n=se;tt(null),kt(null);try{return e()}finally{tt(t),kt(n)}}function Zs(e){se===null&&(ae===null&&qc(),Lc()),Lt&&Bc()}function Pu(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function et(e,t){var n=se;n!==null&&(n.f&ze)!==0&&(e|=ze);var r={ctx:ve,deps:null,nodes:null,f:e|Me|$e,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};fe?.register_created_effect(r);var o=r;if((e&xn)!==0)Pn!==null?Pn.push(r):Rt.ensure().schedule(r);else if(t!==null){try{In(r)}catch(s){throw Te(r),s}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&an)===0&&(o=o.first,(e&st)!==0&&(e&Ot)!==0&&o!==null&&(o.f|=Ot))}if(o!==null&&(o.parent=n,n!==null&&Pu(o,n),ae!==null&&(ae.f&Ae)!==0&&(e&zt)===0)){var i=ae;(i.effects??=[]).push(o)}return r}function ri(){return ae!==null&&!dt}function Wr(e){const t=et(Jn,null);return xe(t,Ee),t.teardown=e,t}function ut(e){Zs();var t=se.f,n=!ae&&(t&at)!==0&&ve!==null&&!ve.i;if(n){var r=ve;(r.e??=[]).push(e)}else return Xs(e)}function Xs(e){return et(xn|gs,e)}function Gs(e){return Zs(),et(Jn|gs,e)}function js(e){Rt.ensure();const t=et(zt|an,e);return()=>{Te(t)}}function Nu(e){Rt.ensure();const t=et(zt|an,e);return(n={})=>new Promise(r=>{n.outro?dn(t,()=>{Te(t),r(void 0)}):(Te(t),r(void 0))})}function nr(e){return et(xn,e)}function Iu(e){return et(Sn|an,e)}function oi(e,t=0){return et(Jn|t,e)}function $(e,t=[],n=[],r=[]){Ps(r,t,n,o=>{et(Jn,()=>{e(...o.map(d))})})}function un(e,t=0){var n=et(st|t,e);return n}function Us(e,t=0){var n=et(Ro|t,e);return n}function Oe(e){return et(at|an,e)}function Qs(e){var t=e.teardown;if(t!==null){const n=Lt,r=ae;na(!0),tt(null);try{t.call(null)}finally{na(n),tt(r)}}}function ii(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const o=n.ac;o!==null&&ni(()=>{o.abort(Rr)});var r=n.next;(n.f&zt)!==0?n.parent=null:Te(n,t),n=r}}function zu(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&at)===0&&Te(t),t=n}}function Te(e,t=!0){var n=!1;(t||(e.f&hs)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Js(e.nodes.start,e.nodes.end),n=!0),e.f|=Bo,ii(e,t&&!n),or(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Qs(e),e.f^=Bo,e.f|=Ye;var o=e.parent;o!==null&&o.first!==null&&$s(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Js(e,t){for(;e!==null;){var n=e===t?null:tr(e);e.remove(),e=n}}function $s(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function dn(e,t,n=!0){var r=[];ea(e,r,!0);var o=()=>{n&&Te(e),t&&t()},i=r.length;if(i>0){var s=()=>--i||o();for(var a of r)a.out(s)}else o()}function ea(e,t,n){if((e.f&ze)===0){e.f^=ze;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var o=e.first;o!==null;){var i=o.next;if((o.f&zt)===0){var s=(o.f&Ot)!==0||(o.f&at)!==0&&(e.f&st)!==0;ea(o,t,s?n:!1)}o=i}}}function Fr(e){ta(e,!0)}function ta(e,t){if((e.f&ze)!==0){e.f^=ze,(e.f&Ee)===0&&(xe(e,Me),Rt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,o=(n.f&Ot)!==0||(n.f&at)!==0;ta(n,o?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)(s.is_global||t)&&s.in()}}function si(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var o=n===r?null:tr(n);t.append(n),n=o}}let Kr=!1,Lt=!1;function na(e){Lt=e}let ae=null,dt=!1;function tt(e){ae=e}let se=null;function kt(e){se=e}let St=null;function ra(e){ae!==null&&(St??=new Set).add(e)}let He=null,Xe=0,nt=null;function Ou(e){nt=e}let oa=1,fn=0,qt=fn;function ia(e){qt=e}function sa(){return++oa}function rr(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Ae&&(e.f&=~ln),(t&bt)!==0){for(var n=e.deps,r=n.length,o=0;o<r;o++){var i=n[o];if(rr(i)&&Is(i),i.wv>e.wv)return!0}(t&$e)!==0&<===null&&xe(e,Ee)}return!1}function aa(e,t,n=!0){var r=e.reactions;if(r!==null&&!(St!==null&&St.has(e)))for(var o=0;o<r.length;o++){var i=r[o];(i.f&Ae)!==0?aa(i,t,!1):t===i&&(n?xe(i,Me):(i.f&Ee)!==0&&xe(i,bt),ei(i))}}function la(e){var t=He,n=Xe,r=nt,o=ae,i=St,s=ve,a=dt,l=qt,c=e.f;He=null,Xe=0,nt=null,ae=(c&(at|zt))===0?e:null,St=null,Tn(e.ctx),dt=!1,qt=++fn,e.ac!==null&&(ni(()=>{e.ac.abort(Rr)}),e.ac=null);try{e.f|=Dr;var u=e.fn,h=u();e.f|=kn;var f=e.deps,g=fe?.is_fork;if(He!==null){var v;if(g||or(e,Xe),f!==null&&Xe>0)for(f.length=Xe+He.length,v=0;v<He.length;v++)f[Xe+v]=He[v];else e.deps=f=He;if(ri()&&(e.f&$e)!==0)for(v=Xe;v<f.length;v++)(f[v].reactions??=[]).push(e)}else!g&&f!==null&&Xe<f.length&&(or(e,Xe),f.length=Xe);if($n()&&nt!==null&&!dt&&f!==null&&(e.f&(Ae|bt|Me))===0)for(v=0;v<nt.length;v++)aa(nt[v],e);if(o!==null&&o!==e){if(fn++,o.deps!==null)for(let m=0;m<n;m+=1)o.deps[m].rv=fn;if(t!==null)for(const m of t)m.rv=fn;nt!==null&&(r===null?r=nt:r.push(...nt))}return(e.f&Qt)!==0&&(e.f^=Qt),h}catch(m){return Ts(m)}finally{e.f^=Dr,He=t,Xe=n,nt=r,ae=o,St=i,Tn(s),dt=a,qt=l}}function Du(e,t){let n=t.reactions;if(n!==null){var r=Pc.call(n,e);if(r!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[r]=n[o],n.pop())}}if(n===null&&(t.f&Ae)!==0&&(He===null||!Nr.call(He,t))){var i=t;(i.f&$e)!==0&&(i.f^=$e,i.f&=~ln),i.v!==ke&&Zo(i),_u(i),or(i,0)}}function or(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Du(e,n[r])}function In(e){var t=e.f;if((t&Ye)===0){xe(e,Ee);var n=se,r=Kr;se=e,Kr=!0;try{(t&(st|Ro))!==0?zu(e):ii(e),Qs(e);var o=la(e);e.teardown=typeof o=="function"?o:null,e.wv=oa;var i}finally{Kr=r,se=n}}}function d(e){var t=e.f,n=(t&Ae)!==0;if(ae!==null&&!dt){var r=se!==null&&(se.f&Ye)!==0;if(!r&&(St===null||!St.has(e))){var o=ae.deps;if((ae.f&Dr)!==0)e.rv<fn&&(e.rv=fn,He===null&&o!==null&&o[Xe]===e?Xe++:He===null?He=[e]:He.push(e));else{ae.deps??=[],Nr.call(ae.deps,e)||ae.deps.push(e);var i=e.reactions;i===null?e.reactions=[ae]:Nr.call(i,ae)||i.push(ae)}}}if(Lt&&cn.has(e))return cn.get(e);if(n){var s=e;if(Lt){var a=s.v;return((s.f&Ee)===0&&s.reactions!==null||ua(s))&&(a=Go(s)),cn.set(s,a),a}var l=(s.f&$e)===0&&!dt&&ae!==null&&(Kr||(ae.f&$e)!==0),c=(s.f&kn)===0;rr(s)&&(l&&(s.f|=$e),Is(s)),l&&!c&&(zs(s),ca(s))}if(lt?.has(e))return lt.get(e);if((e.f&Qt)!==0)throw e.v;return e.v}function ca(e){if(e.f|=$e,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&Ae)!==0&&(t.f&$e)===0&&(zs(t),ca(t))}function ua(e){if(e.v===ke)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(cn.has(t)||(t.f&Ae)!==0&&ua(t))return!0;return!1}function Ge(e){var t=dt;try{return dt=!0,e()}finally{dt=t}}function da(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(_t in e)ai(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&_t in n&&ai(n)}}}function ai(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{ai(e[r],t)}catch{}const n=zr(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=cs(n);for(let o in r){const i=r[o].get;if(i)try{i.call(e)}catch{}}}}}function Ru(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Hu=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Bu(e){return Hu.includes(e)}const Lu={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function qu(e){return e=e.toLowerCase(),Lu[e]??e}const Vu=["touchstart","touchmove"];function Wu(e){return Vu.includes(e)}const ir=Symbol("events"),fa=new Set,li=new Set;function ci(e,t,n,r={}){function o(i){if(r.capture||di.call(t,i),!i.cancelBubble)return ni(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Dt(()=>{t.addEventListener(e,o,r)}):t.addEventListener(e,o,r),o}function ui(e,t,n,r={}){var o=ci(t,e,n,r);return()=>{e.removeEventListener(t,o,r)}}function sr(e,t,n,r,o){var i={capture:r,passive:o},s=ci(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Wr(()=>{t.removeEventListener(e,s,i)})}function Vt(e,t,n){(t[ir]??={})[e]=n}function Yr(e){for(var t=0;t<e.length;t++)fa.add(e[t]);for(var n of li)n(e)}let ha=null;function di(e){var t=this,n=t.ownerDocument,r=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ha=e;var s=0,a=ha===e&&e[ir];if(a){var l=o.indexOf(a);if(l!==-1&&(t===document||t===window)){e[ir]=t;return}var c=o.indexOf(t);if(c===-1)return;l<=c&&(s=l)}if(i=o[s]||e.target,i!==t){Nc(e,"currentTarget",{configurable:!0,get(){return i||n}});var u=ae,h=se;tt(null),kt(null);try{for(var f,g=[];i!==null&&i!==t;){try{var v=i[ir]?.[r];v!=null&&(!i.disabled||e.target===i)&&v.call(i,e)}catch(m){f?g.push(m):f=m}if(e.cancelBubble)break;s++,i=s<o.length?o[s]:null}if(f){for(let m of g)queueMicrotask(()=>{throw m});throw f}}finally{e[ir]=t,delete e.currentTarget,tt(u),kt(h)}}}const Fu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ku(e){return Fu?.createHTML(e)??e}function ga(e){var t=ti("template");return t.innerHTML=Ku(e.replaceAll("<!>","<!---->")),t.content}function Wt(e,t){var n=se;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var n=(t&ys)!==0,r=(t&nu)!==0,o,i=!e.startsWith("<!>");return()=>{o===void 0&&(o=ga(i?e:"<!>"+e),n||(o=Ze(o)));var s=r||Ws?document.importNode(o,!0):o.cloneNode(!0);if(n){var a=Ze(s),l=s.lastChild;Wt(a,l)}else Wt(s,s);return s}}function Yu(e,t,n="svg"){var r=!e.startsWith("<!>"),o=(t&ys)!==0,i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(!s){var a=ga(i),l=Ze(a);if(o)for(s=document.createDocumentFragment();Ze(l);)s.appendChild(Ze(l));else s=Ze(l)}var c=s.cloneNode(!0);if(o){var u=Ze(c),h=c.lastChild;Wt(u,h)}else Wt(c,c);return c}}function Pe(e,t){return Yu(e,t,"svg")}function ar(e=""){{var t=ct(e+"");return Wt(t,t),t}}function Be(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ct();return e.append(t,n),Wt(t,n),e}function q(e,t){e!==null&&e.before(t)}function ce(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[Vo]??=e.nodeValue)&&(e[Vo]=n,e.nodeValue=`${n}`)}function Zu(e,t){return Xu(e,t)}const Zr=new Map;function Xu(e,{target:t,anchor:n,props:r={},events:o,context:i,intro:s=!0,transformError:a}){Cu();var l=void 0,c=Nu(()=>{var u=n??t.appendChild(ct());pu(u,{pending:()=>{}},g=>{oe({});var v=ve;i&&(v.c=i),o&&(r.$$events=o),l=e(g,r)||{},ie()},a);var h=new Set,f=g=>{for(var v=0;v<g.length;v++){var m=g[v];if(!h.has(m)){h.add(m);var b=Wu(m);for(const C of[t,document]){var x=Zr.get(C);x===void 0&&(x=new Map,Zr.set(C,x));var P=x.get(m);P===void 0?(C.addEventListener(m,di,{passive:b}),x.set(m,1)):x.set(m,P+1)}}}};return f(Ir(fa)),li.add(f),()=>{for(var g of h)for(const b of[t,document]){var v=Zr.get(b),m=v.get(g);--m==0?(b.removeEventListener(g,di),v.delete(g),v.size===0&&Zr.delete(b)):v.set(g,m)}li.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return Gu.set(l,c),l}let Gu=new WeakMap;class Xr{anchor;#e=new Map;#n=new Map;#t=new Map;#a=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#i=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Fr(r),this.#a.delete(n);else{var o=this.#t.get(n);o&&(Fr(o.effect),this.#n.set(n,o.effect),this.#t.delete(n),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),r=o.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===t)break;const a=this.#t.get(s);a&&(Te(a.effect),this.#t.delete(s))}for(const[i,s]of this.#n){if(i===n||this.#a.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var c=document.createDocumentFragment();si(s,c),c.append(ct()),this.#t.set(i,{effect:s,fragment:c})}else Te(s);this.#a.delete(i),this.#n.delete(i)};this.#r||!r?(this.#a.add(i),dn(s,a,!1)):a()}}};#o=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,o]of this.#t)n.includes(r)||(Te(o.effect),this.#t.delete(r))};ensure(t,n){var r=fe,o=Ys();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(o){var i=document.createDocumentFragment(),s=ct();i.append(s),this.#t.set(t,{effect:Oe(()=>n(s)),fragment:i})}else this.#n.set(t,Oe(()=>n(this.anchor)));if(this.#e.set(r,t),o){for(const[a,l]of this.#n)a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of this.#t)a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#i),r.ondiscard(this.#o)}else this.#i(r)}}function pe(e,t,n=!1){var r=new Xr(e),o=n?Ot:0;function i(s,a){r.ensure(s,a)}un(()=>{var s=!1;t((a,l=0)=>{s=!0,i(l,a)}),s||i(-1,null)},o)}function lr(e,t){return t}function ju(e,t,n){for(var r=[],o=t.length,i,s=t.length,a=0;a<o;a++){let h=t[a];dn(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var f=e.outrogroups;fi(e,Ir(i.done)),f.delete(i),f.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var c=n,u=c.parentNode;Au(u),u.append(c),e.items.clear()}fi(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function fi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const a of s)r.add(e.items.get(a).e)}for(var o=0;o<t.length;o++){var i=t[o];if(r?.has(i)){i.f|=wt;const s=document.createDocumentFragment();si(i,s)}else Te(t[o],n)}}var va;function en(e,t,n,r,o,i=null){var s=e,a=new Map,l=(t&ms)!==0;if(l){var c=e;s=c.appendChild(ct())}var u=null,h=Xo(()=>{var C=n();return Pr(C)?C:C==null?[]:Ir(C)}),f,g=new Map,v=!0;function m(C){(P.effect.f&Ye)===0&&(P.pending.delete(C),P.fallback=u,Uu(P,f,s,t,r),u!==null&&(f.length===0?(u.f&wt)===0?Fr(u):(u.f^=wt,ur(u,null,s)):dn(u,()=>{u=null})))}function b(C){P.pending.delete(C)}var x=un(()=>{f=d(h);for(var C=f.length,p=new Set,_=fe,S=Ys(),N=0;N<C;N+=1){var D=f[N],V=r(D,N),W=v?null:a.get(V);W?(W.v&&Nn(W.v,D),W.i&&Nn(W.i,N),S&&_.unskip_effect(W.e)):(W=Qu(a,v?s:va??=ct(),D,V,N,o,t,n),v||(W.e.f|=wt),a.set(V,W)),p.add(V)}if(C===0&&i&&!u&&(v?u=Oe(()=>i(s)):(u=Oe(()=>i(va??=ct())),u.f|=wt)),C>p.size&&Hc(),!v)if(g.set(_,p),S){for(const[I,T]of a)p.has(I)||_.skip_effect(T.e);_.oncommit(m),_.ondiscard(b)}else m(_);d(h)}),P={effect:x,items:a,pending:g,outrogroups:null,fallback:u};v=!1}function cr(e){for(;e!==null&&(e.f&at)===0;)e=e.next;return e}function Uu(e,t,n,r,o){var i=(r&jc)!==0,s=t.length,a=e.items,l=cr(e.effect.first),c,u=null,h,f=[],g=[],v,m,b,x;if(i)for(x=0;x<s;x+=1)v=t[x],m=o(v,x),b=a.get(m).e,(b.f&wt)===0&&(b.nodes?.a?.measure(),(h??=new Set).add(b));for(x=0;x<s;x+=1){if(v=t[x],m=o(v,x),b=a.get(m).e,e.outrogroups!==null)for(const W of e.outrogroups)W.pending.delete(b),W.done.delete(b);if((b.f&ze)!==0&&(Fr(b),i&&(b.nodes?.a?.unfix(),(h??=new Set).delete(b))),(b.f&wt)!==0)if(b.f^=wt,b===l)ur(b,null,n);else{var P=u?u.next:l;b===e.effect.last&&(e.effect.last=b.prev),b.prev&&(b.prev.next=b.next),b.next&&(b.next.prev=b.prev),tn(e,u,b),tn(e,b,P),ur(b,P,n),u=b,f=[],g=[],l=cr(u.next);continue}if(b!==l){if(c!==void 0&&c.has(b)){if(f.length<g.length){var C=g[0],p;u=C.prev;var _=f[0],S=f[f.length-1];for(p=0;p<f.length;p+=1)ur(f[p],C,n);for(p=0;p<g.length;p+=1)c.delete(g[p]);tn(e,_.prev,S.next),tn(e,u,_),tn(e,S,C),l=C,u=S,x-=1,f=[],g=[]}else c.delete(b),ur(b,l,n),tn(e,b.prev,b.next),tn(e,b,u===null?e.effect.first:u.next),tn(e,u,b),u=b;continue}for(f=[],g=[];l!==null&&l!==b;)(c??=new Set).add(l),g.push(l),l=cr(l.next);if(l===null)continue}(b.f&wt)===0&&f.push(b),u=b,l=cr(b.next)}if(e.outrogroups!==null){for(const W of e.outrogroups)W.pending.size===0&&(fi(e,Ir(W.done)),e.outrogroups?.delete(W));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var N=[];if(c!==void 0)for(b of c)(b.f&ze)===0&&N.push(b);for(;l!==null;)(l.f&ze)===0&&l!==e.fallback&&N.push(l),l=cr(l.next);var D=N.length;if(D>0){var V=(r&ms)!==0&&s===0?n:null;if(i){for(x=0;x<D;x+=1)N[x].nodes?.a?.measure();for(x=0;x<D;x+=1)N[x].nodes?.a?.fix()}ju(e,N,V)}}i&&Dt(()=>{if(h!==void 0)for(b of h)b.nodes?.a?.apply()})}function Qu(e,t,n,r,o,i,s,a){var l=(s&Xc)!==0?(s&Uc)===0?Su(n,!1,!1):$t(n):null,c=(s&Gc)!==0?$t(o):null;return{v:l,i:c,e:Oe(()=>(i(t,l??n,c??o,a),()=>{e.delete(r)}))}}function ur(e,t,n){if(e.nodes)for(var r=e.nodes.start,o=e.nodes.end,i=t&&(t.f&wt)===0?t.nodes.start:n;r!==null;){var s=tr(r);if(i.before(r),r===o)return;r=s}}function tn(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ju(e,t,n=!1,r=!1,o=!1,i=!1){var s=e,a="";if(n)var l=e;$(()=>{var c=se;if(a!==(a=t()??"")){if(n){c.nodes=null,l.innerHTML=a,a!==""&&Wt(Ze(l),l.lastChild);return}if(c.nodes!==null&&(Js(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){var u=r?ws:o?ru:void 0,h=ti(r?"svg":o?"math":"template",u);h.innerHTML=a;var f=r||o?h:h.content;if(Wt(Ze(f),f.lastChild),r||o)for(;Ze(f);)s.before(Ze(f));else s.before(f)}}})}function Ne(e,t,...n){var r=new Xr(e);un(()=>{const o=t()??null;r.ensure(o,o&&(i=>o(i,...n)))},Ot)}function hi(e,t,n){var r=new Xr(e);un(()=>{var o=t()??null;r.ensure(o,o&&(i=>n(i,o)))},Ot)}function $u(e,t,n,r,o,i){var s=null,a=e,l=new Xr(a,!1);un(()=>{const c=t()||null;var u=c==="svg"?ws:void 0;if(c===null){l.ensure(null,null);return}return l.ensure(c,h=>{if(c){if(s=ti(c,u),Wt(s,s),r){var f=null,g=s.appendChild(ct());r(s,g),f?.remove()}se.nodes.end=s,h.before(s)}}),()=>{}},Ot),Wr(()=>{})}function ed(e,t){var n;n=document.head.appendChild(ct()),un(()=>{var r=Oe(()=>t(n));r.f|=hs})}function Le(e,t,n){nr(()=>{var r=Ge(()=>t(e,n?.())||{});if(n&&r?.update){var o=!1,i={};oi(()=>{var s=n();da(s),o&&xs(i,s)&&(i=s,r.update(s))}),o=!0}if(r?.destroy)return()=>r.destroy()})}function td(e,t){var n=void 0,r;Us(()=>{n!==(n=t())&&(r&&(Te(r),r=null),n&&(r=Oe(()=>{nr(()=>n(e))})))})}function pa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nd(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pa(e))&&(r&&(r+=" "),r+=t);return r}function hn(e){return typeof e=="object"?nd(e):e??""}const ma=[...`
|
|
273
|
+
\r\f \v\uFEFF`];function rd(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var o of Object.keys(n))if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,s=0;(s=r.indexOf(o,s))>=0;){var a=s+i;(s===0||ma.includes(r[s-1]))&&(a===r.length||ma.includes(r[a]))?r=(s===0?"":r.substring(0,s))+r.substring(a+1):s=a}}return r===""?null:r}function ya(e,t=!1){var n=t?" !important;":";",r="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(r+=" "+o+": "+i+n)}return r}function gi(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function od(e,t){if(t){var n="",r,o;if(Array.isArray(t)?(r=t[0],o=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,a=!1,l=[];r&&l.push(...Object.keys(r).map(gi)),o&&l.push(...Object.keys(o).map(gi));var c=0,u=-1;const m=e.length;for(var h=0;h<m;h++){var f=e[h];if(a?f==="/"&&e[h-1]==="*"&&(a=!1):i?i===f&&(i=!1):f==="/"&&e[h+1]==="*"?a=!0:f==='"'||f==="'"?i=f:f==="("?s++:f===")"&&s--,!a&&i===!1&&s===0){if(f===":"&&u===-1)u=h;else if(f===";"||h===m-1){if(u!==-1){var g=gi(e.substring(c,u).trim());if(!l.includes(g)){f!==";"&&h++;var v=e.substring(c,h).trim();n+=" "+v+";"}}c=h+1,u=-1}}}}return r&&(n+=ya(r)),o&&(n+=ya(o,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Ft(e,t,n,r,o,i){var s=e[Lo];if(s!==n||s===void 0){var a=rd(n,r,i);a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a),e[Lo]=n}else if(i&&o!==i)for(var l in i){var c=!!i[l];(o==null||c!==!!o[l])&&e.classList.toggle(l,c)}return i}function vi(e,t={},n,r){for(var o in n){var i=n[o];t[o]!==i&&(n[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,r))}}function ft(e,t,n,r){var o=e[qo];if(o!==t){var i=od(t,r);i==null?e.removeAttribute("style"):e.style.cssText=i,e[qo]=t}else r&&(Array.isArray(r)?(vi(e,n?.[0],r[0]),vi(e,n?.[1],r[1],"important")):vi(e,n,r));return r}function pi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Pr(t))return su();for(var r of e.options)r.selected=t.includes(ba(r));return}for(r of e.options){var o=ba(r);if(Tu(o,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function id(e){var t=new MutationObserver(()=>{pi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Wr(()=>{t.disconnect()})}function ba(e){return"__value"in e?e.__value:e.value}const nn=Symbol("class"),Kt=Symbol("style"),wa=Symbol("is custom element"),_a=Symbol("is html"),sd=Wo?"input":"INPUT",ad=Wo?"option":"OPTION",ld=Wo?"select":"SELECT";function cd(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ne(e,t,n,r){var o=xa(e);o[t]!==(o[t]=n)&&(t==="loading"&&(e[Dc]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Sa(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ud(e,t,n,r,o=!1,i=!1){var s=xa(e),a=s[wa],l=!s[_a],c=t||{},u=e.nodeName===ad;for(var h in t)h in n||(n[h]=null);n.class?n.class=hn(n.class):(r||n[nn])&&(n.class=null),n[Kt]&&(n.style??=null);var f=Sa(e);if(e.nodeName===sd&&"type"in n&&("value"in n||"__value"in n)){var g=n.type;(g!==c.type||g===void 0&&e.hasAttribute("type"))&&(c.type=g,ne(e,"type",g))}for(const p in n){let _=n[p];if(u&&p==="value"&&_==null){e.value=e.__value="",c[p]=_;continue}if(p==="class"){var v=e.namespaceURI==="http://www.w3.org/1999/xhtml";Ft(e,v,_,r,t?.[nn],n[nn]),c[p]=_,c[nn]=n[nn];continue}if(p==="style"){ft(e,_,t?.[Kt],n[Kt]),c[p]=_,c[Kt]=n[Kt];continue}var m=c[p];if(!(_===m&&!(_===void 0&&e.hasAttribute(p)))){c[p]=_;var b=p[0]+p[1];if(b!=="$$")if(b==="on"){const S={},N="$$"+p;let D=p.slice(2);var x=Bu(D);if(Ru(D)&&(D=D.slice(0,-7),S.capture=!0),!x&&m){if(_!=null)continue;e.removeEventListener(D,c[N],S),c[N]=null}if(x)Vt(D,e,_),Yr([D]);else if(_!=null){let V=function(W){c[p].call(this,W)};c[N]=ci(D,e,V,S)}}else if(p==="style")ne(e,p,_);else if(p==="autofocus")Mu(e,!!_);else if(!a&&(p==="__value"||p==="value"&&_!=null))e.value=e.__value=_;else if(p==="selected"&&u)cd(e,_);else{var P=p;l||(P=qu(P));var C=P==="defaultValue"||P==="defaultChecked";if(_==null&&!a&&!C)if(s[p]=null,P==="value"||P==="checked"){let S=e;const N=t===void 0;if(P==="value"){let D=S.defaultValue;S.removeAttribute(P),S.defaultValue=D,S.value=S.__value=N?D:null}else{let D=S.defaultChecked;S.removeAttribute(P),S.defaultChecked=D,S.checked=N?D:!1}}else e.removeAttribute(p);else C||f.includes(P)&&(a||typeof _!="string")?(e[P]=_,P in s&&(s[P]=ke)):typeof _!="function"&&ne(e,P,_)}}}return c}function rt(e,t,n=[],r=[],o=[],i,s=!1,a=!1){Ps(o,n,r,l=>{var c=void 0,u={},h=e.nodeName===ld,f=!1;if(Us(()=>{var v=t(...l.map(d)),m=ud(e,c,v,i,s,a);f&&h&&"value"in v&&pi(e,v.value);for(let x of Object.getOwnPropertySymbols(u))v[x]||Te(u[x]);for(let x of Object.getOwnPropertySymbols(v)){var b=v[x];x.description===ou&&(!c||b!==c[x])&&(u[x]&&Te(u[x]),u[x]=Oe(()=>td(e,()=>b))),m[x]=b}c=m}),h){var g=e;nr(()=>{pi(g,c.value,!0),id(g)})}f=!0})}function xa(e){return e[ps]??={[wa]:e.nodeName.includes("-"),[_a]:e.namespaceURI===bs}}var ka=new Map;function Sa(e){var t=e.getAttribute("is")||e.nodeName,n=ka.get(t);if(n)return n;ka.set(t,n=[]);for(var r,o=e,i=Element.prototype;i!==o;){r=cs(o);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);o=zr(o)}return n}class mi{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(t){this.#t=t}observe(t,n){var r=this.#e.get(t)||new Set;return r.add(n),this.#e.set(t,r),this.#a().observe(t,this.#t),()=>{var o=this.#e.get(t);o.delete(n),o.size===0&&(this.#e.delete(t),this.#n.unobserve(t))}}#a(){return this.#n??(this.#n=new ResizeObserver(t=>{for(var n of t){mi.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}}))}}var dd=new mi({box:"border-box"});function Ea(e,t,n){var r=dd.observe(e,()=>n(e[t]));nr(()=>(Ge(()=>n(e[t])),r))}function yi(e,t){return e===t||e?.[_t]===t}function dr(e={},t,n,r){var o=ve.r,i=se;return nr(()=>{var s,a;return oi(()=>{s=a,a=[],Ge(()=>{yi(n(...a),e)||(t(e,...a),s&&yi(n(...s),e)&&t(null,...s))})}),()=>{let l=i;for(;l!==o&&l.parent!==null&&l.parent.f&Bo;)l=l.parent;const c=()=>{a&&yi(n(...a),e)&&t(null,...a)},u=l.teardown;l.teardown=()=>{c(),u?.()}}}),e}function fd(e=!1){const t=ve,n=t.l.u;if(!n)return;let r=()=>da(t.s);if(e){let o=0,i={};const s=An(()=>{let a=!1;const l=t.s;for(const c in l)l[c]!==i[c]&&(i[c]=l[c],a=!0);return a&&o++,o});r=()=>d(s)}n.b.length&&Gs(()=>{Ta(t,r),Do(n.b)}),ut(()=>{const o=Ge(()=>n.m.map(zc));return()=>{for(const i of o)typeof i=="function"&&i()}}),n.a.length&&ut(()=>{Ta(t,r),Do(n.a)})}function Ta(e,t){if(e.l.s)for(const n of e.l.s)d(n);t()}const hd={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function ht(e,t,n){return new Proxy({props:e,exclude:t},hd)}const gd={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(Un(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let o=e.props[r];Un(o)&&(o=o());const i=Ut(o,t);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(Un(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const o=Ut(r,t);return o&&!o.configurable&&(o.configurable=!0),o}}},has(e,t){if(t===_t||t===vs)return!1;for(let n of e.props)if(Un(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(Un(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function zn(...e){return new Proxy({props:e},gd)}function F(e,t,n,r){var o=!En||(n&Jc)!==0,i=(n&eu)!==0,s=(n&tu)!==0,a=r,l=!0,c=void 0,u=()=>s&&o?(c??=An(r),d(c)):(l&&(l=!1,a=s?Ge(r):r),a);let h;if(i){var f=_t in e||vs in e;h=Ut(e,t)?.set??(f&&t in e?p=>e[t]=p:void 0)}var g,v=!1;i?[g,v]=gu(()=>e[t]):g=e[t],g===void 0&&r!==void 0&&(g=u(),h&&(o&&Wc(),h(g)));var m;if(o?m=()=>{var p=e[t];return p===void 0?u():(l=!0,p)}:m=()=>{var p=e[t];return p!==void 0&&(a=void 0),p===void 0?a:p},o&&(n&$c)===0)return m;if(h){var b=e.$$legacy;return(function(p,_){return arguments.length>0?((!o||!_||b||v)&&h(_?m():p),p):m()})}var x=!1,P=((n&Qc)!==0?An:Xo)(()=>(x=!1,m()));i&&d(P);var C=se;return(function(p,_){if(arguments.length>0){const S=_?d(P):o&&i?Bt(p):p;return B(P,S),x=!0,a!==void 0&&(a=S),p}return Lt&&x||(C.f&Ye)!==0?P.v:d(P)})}function vd(e){ve===null&&Fo(),En&&ve.l!==null?pd(ve).m.push(e):ut(()=>{const t=Ge(e);if(typeof t=="function")return t})}function Gr(e){ve===null&&Fo(),vd(()=>()=>Ge(e))}function pd(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const md="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(md);var yd=new Set(["$$slots","$$events","$$legacy","tone","shape","size","class","children"]),bd=Q("<span><!></span>");function bi(e,t){oe(t,!0);let n=F(t,"tone",3,"neutral"),r=F(t,"shape",3,"pill"),o=F(t,"size",3,"md"),i=ht(t,yd);const s=()=>["st-badge",`st-badge--${n()}`,`st-badge--${r()}`,`st-badge--${o()}`,t.class].filter(Boolean).join(" ");var a=bd();rt(a,c=>({...i,class:c}),[()=>s()],void 0,void 0,"svelte-1b366fo");var l=Z(a);Ne(l,()=>t.children??Je),q(e,a),ie()}var wd=new Set(["$$slots","$$events","$$legacy","variant","size","disabled","type","class","children"]),_d=Q("<button><!></button>");function xd(e,t){oe(t,!0);let n=F(t,"variant",3,"primary"),r=F(t,"size",3,"md"),o=F(t,"disabled",3,!1),i=F(t,"type",3,"button"),s=ht(t,wd);const a=()=>["st-button",`st-button--${n()}`,`st-button--${r()}`,t.class].filter(Boolean).join(" ");var l=_d();rt(l,u=>({...s,class:u,type:i(),disabled:o()}),[()=>a()],void 0,void 0,"svelte-1xn14gj");var c=Z(l);Ne(c,()=>t.children??Je),q(e,l),ie()}var kd=new Set(["$$slots","$$events","$$legacy","interactive","class","children"]),Sd=Q("<section><!></section>");function jr(e,t){oe(t,!0);let n=F(t,"interactive",3,!1),r=ht(t,kd);const o=()=>["st-card",n()&&"st-card--interactive",t.class].filter(Boolean).join(" ");var i=Sd();rt(i,a=>({...r,class:a}),[()=>o()],void 0,void 0,"svelte-ee68m1");var s=Z(i);Ne(s,()=>t.children??Je),q(e,i),ie()}var Ed=new Set(["$$slots","$$events","$$legacy","size","padding","as","class","children"]);function Td(e,t){oe(t,!0);let n=F(t,"size",3,"lg"),r=F(t,"padding",3,!0),o=F(t,"as",3,"div"),i=ht(t,Ed);const s=w(()=>["st-container",`st-container--${n()}`,r()&&"st-container--padded",t.class].filter(Boolean).join(" "));var a=Be(),l=de(a);$u(l,o,!1,(c,u)=>{rt(c,()=>({...i,class:d(s)}),void 0,void 0,void 0,"svelte-129fa14");var h=Be(),f=de(h);Ne(f,()=>t.children??Je),q(u,h)}),q(e,a),ie()}const he={color:{blue:{10:"oklch(97% 0.02 242)",60:"oklch(50% 0.134 242.749)",80:"oklch(32% 0.11 242)"},cyan:{10:"oklch(96% 0.04 195)",50:"oklch(70.4% 0.14 182.503)",70:"oklch(48% 0.12 190)"},slate:{0:"#ffffff",10:"#f8fafc",20:"#e2e8f0",60:"#475569",80:"#1e293b",90:"#0f172a"},feedback:{success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},font:{sans:"Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",display:"Inter, system-ui, sans-serif",mono:"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",6:"1.5rem",8:"2rem",12:"3rem",16:"4rem"},radius:{none:"0",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",pill:"999px"},shadow:{subtle:"0 1px 2px rgb(15 23 42 / 0.08)",medium:"0 8px 24px rgb(15 23 42 / 0.12)",floating:"0 18px 45px rgb(15 23 42 / 0.18)"},motion:{fast:"120ms",normal:"180ms",slow:"280ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)"},z:{header:50,toast:60,overlay:80,modal:100,chat:110},borderWidth:{none:"0",thin:"1px",thick:"2px"},borderStyle:{solid:"solid"},density:{sm:{controlHeight:"2rem",paddingBlock:"0",paddingInline:"0.75rem",gap:"0.375rem",minWidth:"2rem"},md:{controlHeight:"2.5rem",paddingBlock:"0",paddingInline:"1rem",gap:"0.5rem",minWidth:"2.5rem"},lg:{controlHeight:"3rem",paddingBlock:"0",paddingInline:"1.25rem",gap:"0.5rem",minWidth:"3rem"}},typography:{control:{family:"var(--st-font-sans)",size:"0.9375rem",weight:"600",lineHeight:"1.2",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},field:{family:"var(--st-font-sans)",size:"1rem",weight:"400",lineHeight:"1.5",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},label:{family:"var(--st-font-sans)",size:"0.875rem",weight:"600",lineHeight:"1.4",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},link:{family:"inherit",size:"inherit",weight:"inherit",lineHeight:"inherit",letterSpacing:"0",textTransform:"none",textDecoration:"underline",decorationThickness:"auto",decorationOffset:"0.18em"}},disabledOpacity:"0.55",transition:{property:"background-color, border-color, color, box-shadow, outline-color",duration:"120ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)"},cursor:{interactive:"pointer",disabled:"not-allowed",text:"text"},iconSize:{sm:"1rem",md:"1.125rem",lg:"1.25rem"},focus:{strategy:"outline",width:"2px",offset:"2px",color:"var(--st-semantic-border-interactive)",inset:"0"},field:{style:"outline",fillBg:"var(--st-semantic-surface-default)",underlineColor:"var(--st-semantic-border-strong)",underlineWidth:"1px"}},fr={surface:{default:he.color.slate[0],subtle:he.color.slate[10],raised:he.color.slate[0],inverse:he.color.slate[90],overlay:"rgb(15 23 42 / 0.48)"},text:{primary:he.color.slate[90],secondary:he.color.slate[60],muted:"#64748b",inverse:he.color.slate[0],link:he.color.blue[60]},border:{subtle:he.color.slate[20],strong:"#94a3b8",interactive:he.color.blue[60]},action:{primary:he.color.blue[60],primaryHover:he.color.blue[80],primaryText:he.color.slate[0],secondary:he.color.slate[10],secondaryHover:he.color.slate[20],secondaryText:he.color.slate[90],danger:he.color.feedback.error},feedback:{success:he.color.feedback.success,warning:he.color.feedback.warning,error:he.color.feedback.error,info:he.color.feedback.info},status:{pending:he.color.feedback.warning,processing:he.color.feedback.info,completed:he.color.feedback.success,failed:he.color.feedback.error},data:{category1:"#4E79A7",category2:"#F28E2B",category3:"#E15759",category4:"#76B7B2",category5:"#59A14F",category6:"#EDC948",category7:"#B07AA1",category8:"#FF9DA7"}},gt={borderWidth:{none:"0",thin:"1px",thick:"2px"},borderStyle:"solid",density:{sm:{controlHeight:"2rem",paddingBlock:"0",paddingInline:"0.75rem",gap:"0.375rem",minWidth:"2rem",fontSize:"0.875rem"},md:{controlHeight:"2.5rem",paddingBlock:"0",paddingInline:"1rem",gap:"0.5rem",minWidth:"2.5rem",fontSize:"0.9375rem"},lg:{controlHeight:"3rem",paddingBlock:"0",paddingInline:"1.25rem",gap:"0.5rem",minWidth:"3rem",fontSize:"1rem"}},typography:{control:{family:"var(--st-font-sans)",size:"0.9375rem",weight:"600",lineHeight:"1.2",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},field:{family:"var(--st-font-sans)",size:"1rem",weight:"400",lineHeight:"1.5",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},label:{family:"var(--st-font-sans)",size:"0.875rem",weight:"600",lineHeight:"1.4",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},link:{family:"inherit",size:"inherit",weight:"inherit",lineHeight:"inherit",letterSpacing:"0",textTransform:"none",textDecoration:"underline",decorationThickness:"auto",decorationOffset:"0.18em",decorationThicknessHover:"auto",decorationOffsetHover:"0.18em",textDecorationHover:"underline"}},disabledOpacity:"0.55",iconSize:{sm:"1rem",md:"1.125rem",lg:"1.25rem"},focus:{strategy:"outline",width:"2px",offset:"2px",color:"var(--st-semantic-border-interactive)",inset:"0"},field:{style:"outline",selectAppearance:"auto",selectChevron:"none",selectPaddingRight:"2rem"}};function On(e,t){const n=gt.density[t],r=e.density?.[t]??{};return{controlHeight:r.controlHeight??n.controlHeight,paddingBlock:r.paddingBlock??n.paddingBlock,paddingInline:r.paddingInline??n.paddingInline,gap:r.gap??n.gap,minWidth:r.minWidth??n.minWidth,fontSize:r.fontSize??n.fontSize}}function wi(e,t){const n=On(e,t),r=e.buttonDensity?.[t]??{},o=r.paddingInline??n.paddingInline;return{controlHeight:r.controlHeight??n.controlHeight,paddingBlock:r.paddingBlock??n.paddingBlock,paddingInline:o,gap:r.gap??n.gap,minWidth:r.minWidth??n.minWidth,fontSize:r.fontSize??n.fontSize,paddingInlineEnd:r.paddingInlineEnd??o}}function Cd(e,t,n,r,o){const i=e.tabs??{},s=i.indicatorSide??"bottom",a=i.indicatorMode??"border",l=s==="top",c=a==="shadow",u=l?n:`-${n}`;return{activeText:i.activeText||o,activeBackground:i.activeBackground||"transparent",inactiveBackground:i.inactiveBackground||"transparent",activeWeight:i.activeWeight??t.weight,paddingBlock:i.paddingBlock??"0.75rem",paddingInline:i.paddingInline??"0.25rem",fontSize:i.fontSize??"inherit",lineHeight:i.lineHeight??t.lineHeight,indicatorSide:s,activeBorderTopWidth:c?"0":l?n:"0",activeBorderBottomWidth:c||l?"0":n,activeShadow:c?`inset 0 ${u} 0 0 ${r}`:"none"}}function Ad(e,t){const n=t.buttonSecondary??{};return{background:n.background||e.action.secondary,border:n.border||e.border.subtle,hoverBackground:n.hoverBackground||e.action.secondaryHover||e.action.secondary}}function Md(e,t,n,r){const o=t.pagination??{},i=o.border||e.border.subtle,s=o.borderWidth??n;return{background:o.background||e.surface.default,border:i,borderWidth:s,text:o.text||e.text.primary,radius:o.radius??r,activeBackground:o.activeBackground||e.action.primary,activeText:o.activeText||e.action.primaryText,activeBorder:o.activeBorder||i,activeBorderWidth:o.activeBorderWidth??s,activeWeight:o.activeWeight??"inherit",disabledText:o.disabledText||e.text.muted,paddingBlock:o.paddingBlock??"0",paddingInline:o.paddingInline??"0.75rem",minSize:o.minSize??"2.25rem",fontSize:o.fontSize??"inherit",lineHeight:o.lineHeight??"normal",letterSpacing:o.letterSpacing??"normal"}}function Pd(e,t){const n=t.breadcrumb??{};return{text:n.text||e.text.secondary,linkText:n.linkText||e.text.link,currentText:n.currentText||e.text.primary,separator:n.separator||e.text.muted,fontSize:n.fontSize??"inherit",lineHeight:n.lineHeight??"normal",letterSpacing:n.letterSpacing??"normal",currentWeight:n.currentWeight??"600"}}function Nd(e,t,n,r){const o=t.alert??{},i=`${n} ${r} ${e.border.subtle}`;return{background:o.background||e.surface.raised,text:o.text||e.text.primary,borderTop:o.borderTop||i,borderRight:o.borderRight||i,borderBottom:o.borderBottom||i,accentWidth:o.accentWidth??"0.25rem",filetWidth:o.filetWidth??"0",paddingTop:o.paddingTop??"1rem",paddingRight:o.paddingRight??"1rem",paddingBottom:o.paddingBottom??"1rem",paddingLeft:o.paddingLeft??"1rem",fontSize:o.fontSize??"inherit",lineHeight:o.lineHeight??"normal",letterSpacing:o.letterSpacing??"normal",accentInfo:o.accentInfo||e.feedback.info,accentSuccess:o.accentSuccess||e.feedback.success,accentWarning:o.accentWarning||e.feedback.warning,accentError:o.accentError||e.feedback.error}}function Id(e,t){const n=t.accordion??{};return{text:n.text||e.text.primary,paddingBlock:n.paddingBlock??"0.875rem",paddingInline:n.paddingInline??"0.5rem",fontSize:n.fontSize??"inherit",fontWeight:n.fontWeight??"600",lineHeight:n.lineHeight??"normal"}}function zd(e,t){const n=t.tag??{};return{radius:n.radius??"999px",paddingBlock:n.paddingBlock??"0.25rem",paddingInline:n.paddingInline??"0.625rem",fontSize:n.fontSize??"0.75rem",fontWeight:n.fontWeight??"600",lineHeight:n.lineHeight??"1",letterSpacing:n.letterSpacing??"normal",textTransform:n.textTransform??"none",minHeight:n.minHeight??"0",neutralBackground:n.neutralBackground||e.surface.subtle,neutralText:n.neutralText||e.text.secondary}}function Od(e,t){const n=t.badge??{};return{radius:n.radius??"999px",paddingBlock:n.paddingBlock??"0.25rem",paddingInline:n.paddingInline??"0.5rem",fontSize:n.fontSize??"0.75rem",fontWeight:n.fontWeight??"650",lineHeight:n.lineHeight??"1",letterSpacing:n.letterSpacing??"normal",textTransform:n.textTransform??"none",minHeight:n.minHeight??"0",infoBackground:n.infoBackground||`color-mix(in srgb, ${e.feedback.info} 14%, white)`,infoText:n.infoText||e.feedback.info}}function Dd(e,t){const n=t.choice??{},r=n.labelLineHeight??"normal";return{labelFontSize:n.labelFontSize??"0.9375rem",labelLineHeight:r,radioLineHeight:n.radioLineHeight??r,labelLetterSpacing:n.labelLetterSpacing??"normal",labelColor:n.labelColor||e.text.primary}}function Rd(e){const t=e.search??{},n=t.paddingInline??"0";return{paddingBlock:t.paddingBlock??"0",paddingInline:n,paddingLeft:t.paddingLeft??n,paddingRight:t.paddingRight??n,fontSize:t.fontSize??"1rem",lineHeight:t.lineHeight??"normal",letterSpacing:t.letterSpacing??"normal"}}function Hd(e,t){const n=t.toggle??{};return{trackRadius:n.trackRadius??"999px",trackPadding:n.trackPadding??"0.125rem",trackWidth:n.trackWidth??"2.25rem",trackHeight:n.trackHeight??"1.25rem",thumbSize:n.thumbSize??"1rem",trackColor:n.trackColor||e.border.strong,trackCheckedColor:n.trackCheckedColor||e.action.primary,thumbColor:n.thumbColor||e.surface.default,fontSize:n.fontSize??"inherit",lineHeight:n.lineHeight??"normal",letterSpacing:n.letterSpacing??"normal",textColor:n.textColor||e.text.primary}}function Bd(e,t){const n=t.selectableRow??{},r=e.action.primary;return{selectedBackground:n.selectedBackground||`color-mix(in oklch, ${r} 12%, transparent)`,selectedAccent:n.selectedAccent||r,selectedText:n.selectedText||`color-mix(in oklch, ${r} 78%, black)`,selectedBackgroundDark:n.selectedBackgroundDark||`color-mix(in oklch, ${r} 22%, transparent)`,selectedAccentDark:n.selectedAccentDark||r,selectedTextDark:n.selectedTextDark||`color-mix(in oklch, ${r} 70%, white)`}}function Dn(e,t){const n=gt.typography[t],r=e.typography?.[t]??{};return{family:r.family??n.family,size:r.size??n.size,weight:r.weight??n.weight,lineHeight:r.lineHeight??n.lineHeight,letterSpacing:r.letterSpacing??n.letterSpacing,textTransform:r.textTransform??n.textTransform,textDecoration:r.textDecoration??n.textDecoration,decorationThickness:r.decorationThickness??n.decorationThickness,decorationOffset:r.decorationOffset??n.decorationOffset,decorationThicknessHover:r.decorationThicknessHover??n.decorationThicknessHover,decorationOffsetHover:r.decorationOffsetHover??n.decorationOffsetHover,textDecorationHover:r.textDecorationHover??n.textDecorationHover}}function Ld(e){const t=gt.focus,n=e.focus??{},r=n.strategy??t.strategy,o=n.width??t.width,i=n.offset??t.offset,s=n.color??t.color,a=n.inset??t.inset;let l="none",c="none";switch(r){case"outline":l=`${o} solid ${s}`;break;case"ring":c=`0 0 0 ${o} ${s}`;break;case"inset":c=`inset 0 0 0 ${o} ${s}`;break;case"double":l=`${o} solid ${s}`,c=`0 0 0 ${a} #ffffff`;break}return{strategy:r,width:o,offset:i,color:s,inset:a,outline:l,boxShadow:c}}function qd(e,t,n,r,o,i){const s=t.field??{},a=s.style??gt.field.style,l=n.thin??"1px",c=s.selectAppearance??gt.field.selectAppearance,u=s.selectChevron??gt.field.selectChevron,h=s.selectPaddingRight??gt.field.selectPaddingRight,f={selectAppearance:c,selectChevron:u,selectPaddingRight:h},g=s.radiusTop||o,v=s.radiusBottom||o,m=P=>{const C=i&&i!=="none"?i:"";return P==="none"?C||"none":C?`${C}, ${P}`:P};if(a==="filled-underline"){const P=s.fillBg||e.surface.subtle,C=s.underlineColor||e.border.strong,p=s.underlineWidth||l;if(s.underlineMode==="shadow"){const _=`inset 0 -${p} 0 0 ${C}`;return{style:a,fillBg:P,borderTop:"none",borderRight:"none",borderBottom:"none",borderLeft:"none",radiusTop:g,radiusBottom:v,underline:_,focusShadow:m(_),...f}}return{style:a,fillBg:P,borderTop:"none",borderRight:"none",borderBottom:`${p} ${r} ${C}`,borderLeft:"none",radiusTop:g,radiusBottom:v,underline:"none",focusShadow:m("none"),...f}}const b=s.fillBg||e.surface.default,x=`${l} ${r} ${e.border.subtle}`;return{style:"outline",fillBg:b,borderTop:x,borderRight:x,borderBottom:x,borderLeft:x,radiusTop:g,radiusBottom:v,underline:"none",focusShadow:m("none"),...f}}function _i(e,t){const n={...gt.borderWidth,...t.borderWidth??{}},r=t.borderStyle?.solid??gt.borderStyle,o=t.disabledOpacity??gt.disabledOpacity;({...t.cursor??{}});const i={...gt.iconSize,...t.iconSize??{}},s=Ld(t),a={shape:{radius:t.radius.md,borderWidth:n.thin,borderStyle:r},density:{sm:wi(t,"sm"),md:wi(t,"md"),lg:wi(t,"lg")},typography:Dn(t,"control"),focus:s,icon:{size:i.md,gap:On(t,"md").gap},states:{hover:{bg:e.action.primaryHover??e.action.primary,transform:"none"},active:{transform:"none"},disabled:{opacity:o}}},l={shape:{radius:t.radius.md,borderWidth:n.thin,borderStyle:r},density:{sm:On(t,"sm"),md:On(t,"md"),lg:On(t,"lg")},typography:Dn(t,"field"),focus:s,field:qd(e,t,n,r,t.radius.md,s.boxShadow),states:{hover:{border:e.border.strong},focus:{border:e.border.interactive},disabled:{bg:e.surface.subtle,text:e.text.muted}}},c=Dn(t,"link"),u={shape:{radius:t.radius.sm??t.radius.md,borderWidth:n.none,borderStyle:r},typography:c,focus:s,states:{hover:{text:e.action.primary,decoration:c.textDecorationHover??"underline"},disabled:{text:e.text.muted,decoration:"none",opacity:o}}},h=t.card?.borderWidth??n.thin,f=t.card?.background||e.surface.raised,g=t.card?.hoverBackground||f,m={...Dn(t,"field"),size:t.card?.fontSize??"inherit",lineHeight:t.card?.lineHeight??"normal",letterSpacing:t.card?.letterSpacing??"normal"},b={shape:{radius:t.radius.lg,borderWidth:h,borderStyle:r},typography:m,focus:s,states:{hover:{bg:g,transform:"translateY(-1px)"}}},x=Dn(t,"control"),P={shape:{radius:t.radius.none??"0",borderWidth:n.thin,borderStyle:r},density:{md:On(t,"md")},typography:x,focus:s,states:{hover:{text:e.text.primary},disabled:{opacity:o}}},C=Cd(t,x,n.thin,e.action.primary,e.text.primary),p=Ad(e,t),_=Md(e,t,n.thin,t.radius.md),S=Pd(e,t),N=Nd(e,t,n.thin,r),D=Id(e,t),V=zd(e,t),W=Od(e,t),I=Dd(e,t),T=Rd(t),A=Hd(e,t),y=Bd(e,t);return{button:{radius:t.radius.md,primaryBackground:e.action.primary,primaryText:e.action.primaryText,secondaryBackground:p.background,secondaryBorder:p.border,secondaryHoverBackground:p.hoverBackground,secondaryText:e.action.secondaryText,anatomy:a},link:{text:e.text.link,hoverText:e.action.primary,disabledText:e.text.muted,focusRing:e.border.interactive,anatomy:u},alert:{background:N.background,text:N.text,border:e.border.subtle,infoBorder:N.accentInfo,successBorder:N.accentSuccess,warningBorder:N.accentWarning,errorBorder:N.accentError,radius:t.radius.lg,borderTop:N.borderTop,borderRight:N.borderRight,borderBottom:N.borderBottom,accentWidth:N.accentWidth,filetWidth:N.filetWidth,paddingTop:N.paddingTop,paddingRight:N.paddingRight,paddingBottom:N.paddingBottom,paddingLeft:N.paddingLeft,fontSize:N.fontSize,lineHeight:N.lineHeight,letterSpacing:N.letterSpacing},accordion:{text:D.text,paddingBlock:D.paddingBlock,paddingInline:D.paddingInline,fontSize:D.fontSize,fontWeight:D.fontWeight,lineHeight:D.lineHeight},tag:{radius:V.radius,paddingBlock:V.paddingBlock,paddingInline:V.paddingInline,fontSize:V.fontSize,fontWeight:V.fontWeight,lineHeight:V.lineHeight,letterSpacing:V.letterSpacing,textTransform:V.textTransform,minHeight:V.minHeight,neutralBackground:V.neutralBackground,neutralText:V.neutralText},badge:{radius:W.radius,paddingBlock:W.paddingBlock,paddingInline:W.paddingInline,fontSize:W.fontSize,fontWeight:W.fontWeight,lineHeight:W.lineHeight,letterSpacing:W.letterSpacing,textTransform:W.textTransform,minHeight:W.minHeight,infoBackground:W.infoBackground,infoText:W.infoText},card:{background:f,border:e.border.subtle,radius:t.radius.lg,shadow:t.shadow.subtle,anatomy:b},menu:{background:e.surface.raised,border:e.border.subtle,text:e.text.primary,itemHoverBackground:e.surface.subtle,dangerText:e.feedback.error,dangerHoverBackground:"rgba(185, 28, 28, 0.08)",disabledText:e.text.muted,radius:t.radius.md,shadow:t.shadow.medium},popover:{background:e.surface.raised,border:e.border.subtle,text:e.text.primary,shadow:t.shadow.floating,radius:t.radius.lg,zIndex:t.z.overlay},dropdown:{background:e.surface.default,border:e.border.subtle,text:e.text.primary,optionHoverBackground:e.surface.subtle,selectedBackground:e.action.primary,selectedText:e.action.primaryText,radius:t.radius.md,shadow:t.shadow.medium},input:{background:e.surface.default,border:e.border.subtle,focusRing:e.border.interactive,radius:t.radius.md},field:{labelText:e.text.primary,helpText:e.text.secondary,errorText:e.feedback.error,gap:t.spacing[2],maxWidth:"28rem",labelTypography:Dn(t,"label")},control:{background:e.surface.default,text:e.text.primary,placeholderText:e.text.muted,border:e.border.subtle,hoverBorder:e.border.strong,hoverBackground:e.surface.subtle,focusRing:e.border.interactive,invalidBorder:e.feedback.error,disabledBackground:e.surface.subtle,disabledText:e.text.muted,radius:t.radius.md,smHeight:"2rem",mdHeight:"2.5rem",lgHeight:"3rem",anatomy:l},selection:{checkedBackground:e.action.primary,checkedText:e.action.primaryText,border:e.border.subtle,switchTrack:A.trackColor,switchTrackChecked:A.trackCheckedColor,switchThumb:A.thumbColor,choiceLabelFontSize:I.labelFontSize,choiceLabelLineHeight:I.labelLineHeight,choiceRadioLineHeight:I.radioLineHeight,choiceLabelLetterSpacing:I.labelLetterSpacing,choiceLabelColor:I.labelColor,toggleTrackRadius:A.trackRadius,toggleTrackPadding:A.trackPadding,toggleTrackWidth:A.trackWidth,toggleTrackHeight:A.trackHeight,toggleThumbSize:A.thumbSize,toggleFontSize:A.fontSize,toggleLineHeight:A.lineHeight,toggleLetterSpacing:A.letterSpacing,toggleTextColor:A.textColor},search:{paddingBlock:T.paddingBlock,paddingInline:T.paddingInline,paddingLeft:T.paddingLeft,paddingRight:T.paddingRight,fontSize:T.fontSize,lineHeight:T.lineHeight,letterSpacing:T.letterSpacing},overlay:{backdrop:e.surface.overlay,surface:e.surface.raised,border:e.border.subtle,shadow:t.shadow.floating,radius:t.radius.lg,zIndex:t.z.modal},drawer:{backdrop:e.surface.overlay,surface:e.surface.raised,border:e.border.subtle,shadow:t.shadow.floating,width:"24rem",zIndex:t.z.modal},emptyState:{background:e.surface.subtle,border:e.border.subtle,titleText:e.text.primary,messageText:e.text.secondary,radius:t.radius.lg},loadingState:{indicator:e.action.primary,track:e.surface.subtle,text:e.text.secondary,radius:t.radius.pill},tooltip:{background:e.surface.inverse,text:e.text.inverse,radius:t.radius.md,shadow:t.shadow.medium,zIndex:t.z.overlay},toast:{background:e.surface.raised,text:e.text.primary,border:e.border.subtle,shadow:t.shadow.floating,radius:t.radius.lg,infoBorder:e.feedback.info,successBorder:e.feedback.success,warningBorder:e.feedback.warning,errorBorder:e.feedback.error,zIndex:t.z.toast},dataTable:{headerBackground:e.surface.subtle,rowBackground:e.surface.default,rowHoverBackground:e.surface.subtle,border:e.border.subtle,text:e.text.primary,captionText:e.text.secondary,radius:t.radius.lg},tabs:{activeText:C.activeText,activeBackground:C.activeBackground,inactiveBackground:C.inactiveBackground,activeWeight:C.activeWeight,inactiveText:e.text.secondary,border:e.border.subtle,indicator:e.action.primary,panelBackground:e.surface.default,tabPaddingBlock:C.paddingBlock,tabPaddingInline:C.paddingInline,tabFontSize:C.fontSize,tabLineHeight:C.lineHeight,activeBorderTopWidth:C.activeBorderTopWidth,activeBorderBottomWidth:C.activeBorderBottomWidth,activeShadow:C.activeShadow,anatomy:P},pagination:{background:_.background,border:_.border,text:_.text,activeBackground:_.activeBackground,activeText:_.activeText,disabledText:_.disabledText,radius:_.radius,borderWidth:_.borderWidth,activeBorder:_.activeBorder,activeBorderWidth:_.activeBorderWidth,activeWeight:_.activeWeight,paddingBlock:_.paddingBlock,paddingInline:_.paddingInline,minSize:_.minSize,fontSize:_.fontSize,lineHeight:_.lineHeight,letterSpacing:_.letterSpacing},paginationNav:{background:_.background,border:_.border,radius:_.radius,text:_.text,hoverBackground:e.surface.subtle,activeBackground:_.activeBackground,activeText:_.activeText,disabledText:_.disabledText,ellipsisText:e.text.muted},breadcrumb:{text:S.text,currentText:S.currentText,separator:S.separator,linkText:S.linkText,fontSize:S.fontSize,lineHeight:S.lineHeight,letterSpacing:S.letterSpacing,currentWeight:S.currentWeight},sideNav:{background:e.surface.default,border:e.border.subtle,itemText:e.text.secondary,activeBackground:e.surface.subtle,activeText:e.text.primary,width:"16rem"},selectableRow:{selectedBackground:y.selectedBackground,selectedAccent:y.selectedAccent,selectedText:y.selectedText,selectedBackgroundDark:y.selectedBackgroundDark,selectedAccentDark:y.selectedAccentDark,selectedTextDark:y.selectedTextDark},chat:{userBubbleBackground:e.action.primary,userBubbleText:e.action.primaryText,assistantBubbleBackground:e.surface.subtle,assistantBubbleText:e.text.primary,composerSurface:e.surface.raised,toolCallSurface:e.surface.subtle},graph:{panelBackground:e.surface.inverse,panelText:e.text.inverse,edgeDefault:"rgb(226 232 240 / 0.56)",community1:e.data.category1,community2:e.data.category2,community3:e.data.category3,community4:e.data.category4}}}const Vd=_i(fr,he);function Ca(e,t=[]){const n={};for(const[r,o]of Object.entries(e)){if(o===void 0)continue;const i=[...t,r];typeof o=="object"&&o!==null?Object.assign(n,Ca(o,i)):n[i.join("-")]=o}return n}function Wd(e,t=":root",n="st"){const r=Object.entries(Ca(e)),o=[];for(const[i,s]of r)if(o.push(` --${n}-${i}: ${String(s)};`),i.startsWith("foundation-")){const a=i.slice(11);o.push(` --${n}-${a}: ${String(s)};`),a.startsWith("z-")&&o.push(` --${n}-zindex-${a.slice(2)}: ${String(s)};`)}return`${t} {
|
|
274
|
+
${o.join(`
|
|
275
|
+
`)}
|
|
276
|
+
}
|
|
277
|
+
`}function Fd(e){if(!e||typeof e!="object")throw new Error("Theme must be an object");const t=e;if(typeof t.id!="string"||t.id.trim().length===0)throw new Error("Theme id is required");if(typeof t.label!="string"||t.label.trim().length===0)throw new Error("Theme label is required");if(t.mode!=="light"&&t.mode!=="dark")throw new Error("Theme mode must be light or dark");if(!t.tokens||typeof t.tokens!="object")throw new Error("Theme tokens are required")}function Kd(e,t={}){Fd(e);const n=e,r=t.selector??`[data-st-theme="${n.id}"]`,o=t.namespace??"st";return Wd(n.tokens,r,o)}const Yd={id:"sent-tech",label:"Sent Tech",mode:"light",tokens:{foundation:he,semantic:fr,component:Vd}},Ur={...fr,action:{...fr.action,primary:"oklch(50% 0.134 242.749)",primaryText:fr.action.primaryText}},Aa=_i(Ur,he),Rn={id:"entropic",label:"Entropic",mode:"light",tokens:{foundation:he,semantic:Ur,component:{...Aa,chat:{...Aa.chat,composerSurface:Ur.surface.raised,toolCallSurface:Ur.surface.subtle}}}};var Zd=Q("<div><!></div>");function Xd(e,t){oe(t,!0);let n=F(t,"theme",3,Yd),r=F(t,"namespace",3,"st"),o=w(()=>Kd(n(),{selector:`[data-st-theme="${n().id}"]`,namespace:r()}));var i=Zd();ed("g0j4y7",a=>{var l=Be(),c=de(l);Ju(c,()=>`<style data-st-theme-provider="${n().id}">${d(o)}</style>`),q(a,l)});var s=Z(i);Ne(s,()=>t.children??Je),$(()=>ne(i,"data-st-theme",n().id)),q(e,i),ie()}class Gd extends Map{#e=new Map;#n=ue(0);#t=ue(0);#a=qt||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#t.v=super.size}}#r(t){return qt===this.#a?ue(t):$t(t)}has(t){var n=this.#e,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#r(0),n.set(t,r);else return d(this.#n),!1;return d(r),!0}forEach(t,n){this.#i(),super.forEach(t,n)}get(t){var n=this.#e,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#r(0),n.set(t,r);else{d(this.#n);return}return d(r),super.get(t)}set(t,n){var r=this.#e,o=r.get(t),i=super.get(t),s=super.set(t,n),a=this.#n;if(o===void 0)o=this.#r(0),r.set(t,o),B(this.#t,super.size),xt(a);else if(i!==n){xt(o);var l=a.reactions===null?null:new Set(a.reactions),c=l===null||!o.reactions?.every(u=>l.has(u));c&&xt(a)}return s}delete(t){var n=this.#e,r=n.get(t),o=super.delete(t);return r!==void 0&&(n.delete(t),B(r,-1)),o&&(B(this.#t,super.size),xt(this.#n)),o}clear(){if(super.size!==0){super.clear();var t=this.#e;B(this.#t,0);for(var n of t.values())B(n,-1);xt(this.#n),t.clear()}}#i(){d(this.#n);var t=this.#e;if(this.#t.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#r(0);t.set(n,r)}}for([,r]of this.#e)d(r)}keys(){return d(this.#n),super.keys()}values(){return this.#i(),super.values()}entries(){return this.#i(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#t),super.size}}class jd{#e;#n;constructor(t,n){this.#e=t,this.#n=Ms(n)}get current(){return this.#n(),this.#e()}}const Ud=/\(.+\)/,Qd=new Set(["all","print","screen","and","or","not","only"]);class Jd extends jd{constructor(t,n){let r=Ud.test(t)||t.split(/[\s,]+/).some(i=>Qd.has(i.trim()))?t:`(${t})`;const o=window.matchMedia(r);super(()=>o.matches,i=>ui(o,"change",i))}}const Ma={...Rn.tokens.semantic,surface:{default:"#0f172a",subtle:"#172033",raised:"#1e293b",inverse:"#f8fafc",overlay:"rgb(0 0 0 / 0.5)"},text:{primary:"#f1f5f9",secondary:"#cbd5e1",muted:"#94a3b8",inverse:"#0f172a",link:"#93c5fd"},border:{subtle:"#475569",strong:"#94a3b8",interactive:"#93c5fd"},action:{...Rn.tokens.semantic.action,primary:"#2563eb",primaryHover:"#1d4ed8",secondary:"#1e293b",secondaryHover:"#334155",secondaryText:"#f1f5f9"}},$d=Rn,ef={...Rn,id:"entropic-dark",label:"Entropic sombre",mode:"dark",tokens:{...Rn.tokens,semantic:Ma,component:_i(Ma,Rn.tokens.foundation)}};var tf={value:()=>{}};function Qr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Jr(n)}function Jr(e){this._=e}function nf(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Jr.prototype=Qr.prototype={constructor:Jr,on:function(e,t){var n=this._,r=nf(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=rf(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Pa(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Pa(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Jr(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function rf(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Pa(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=tf,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var xi="http://www.w3.org/1999/xhtml";const Na={svg:"http://www.w3.org/2000/svg",xhtml:xi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $r(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Na.hasOwnProperty(t)?{space:Na[t],local:e}:e}function of(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===xi&&t.documentElement.namespaceURI===xi?t.createElement(e):t.createElementNS(n,e)}}function sf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ia(e){var t=$r(e);return(t.local?sf:of)(t)}function af(){}function ki(e){return e==null?af:function(){return this.querySelector(e)}}function lf(e){typeof e!="function"&&(e=ki(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),l,c,u=0;u<s;++u)(l=i[u])&&(c=e.call(l,l.__data__,u,i))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new je(r,this._parents)}function cf(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function uf(){return[]}function za(e){return e==null?uf:function(){return this.querySelectorAll(e)}}function df(e){return function(){return cf(e.apply(this,arguments))}}function ff(e){typeof e=="function"?e=df(e):e=za(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(e.call(l,l.__data__,c,s)),o.push(l));return new je(r,o)}function Oa(e){return function(){return this.matches(e)}}function Da(e){return function(t){return t.matches(e)}}var hf=Array.prototype.find;function gf(e){return function(){return hf.call(this.children,e)}}function vf(){return this.firstElementChild}function pf(e){return this.select(e==null?vf:gf(typeof e=="function"?e:Da(e)))}var mf=Array.prototype.filter;function yf(){return Array.from(this.children)}function bf(e){return function(){return mf.call(this.children,e)}}function wf(e){return this.selectAll(e==null?yf:bf(typeof e=="function"?e:Da(e)))}function _f(e){typeof e!="function"&&(e=Oa(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&a.push(l);return new je(r,this._parents)}function Ra(e){return new Array(e.length)}function xf(){return new je(this._enter||this._groups.map(Ra),this._parents)}function eo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}eo.prototype={constructor:eo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kf(e){return function(){return e}}function Sf(e,t,n,r,o,i){for(var s=0,a,l=t.length,c=i.length;s<c;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new eo(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function Ef(e,t,n,r,o,i,s){var a,l,c=new Map,u=t.length,h=i.length,f=new Array(u),g;for(a=0;a<u;++a)(l=t[a])&&(f[a]=g=s.call(l,l.__data__,a,t)+"",c.has(g)?o[a]=l:c.set(g,l));for(a=0;a<h;++a)g=s.call(e,i[a],a,i)+"",(l=c.get(g))?(r[a]=l,l.__data__=i[a],c.delete(g)):n[a]=new eo(e,i[a]);for(a=0;a<u;++a)(l=t[a])&&c.get(f[a])===l&&(o[a]=l)}function Tf(e){return e.__data__}function Cf(e,t){if(!arguments.length)return Array.from(this,Tf);var n=t?Ef:Sf,r=this._parents,o=this._groups;typeof e!="function"&&(e=kf(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],h=o[c],f=h.length,g=Af(e.call(u,u&&u.__data__,c,r)),v=g.length,m=a[c]=new Array(v),b=s[c]=new Array(v),x=l[c]=new Array(f);n(u,h,m,b,x,g,t);for(var P=0,C=0,p,_;P<v;++P)if(p=m[P]){for(P>=C&&(C=P+1);!(_=b[C])&&++C<v;);p._next=_||null}}return s=new je(s,r),s._enter=a,s._exit=l,s}function Af(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Mf(){return new je(this._exit||this._groups.map(Ra),this._parents)}function Pf(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Nf(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c=n[l],u=r[l],h=c.length,f=a[l]=new Array(h),g,v=0;v<h;++v)(g=c[v]||u[v])&&(f[v]=g);for(;l<o;++l)a[l]=n[l];return new je(a,this._parents)}function If(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function zf(e){e||(e=Of);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,l=o[i]=new Array(a),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new je(o,this._parents).order()}function Of(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Df(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rf(){return Array.from(this)}function Hf(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function Bf(){let e=0;for(const t of this)++e;return e}function Lf(){return!this.node()}function qf(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function Vf(e){return function(){this.removeAttribute(e)}}function Wf(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ff(e,t){return function(){this.setAttribute(e,t)}}function Kf(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Yf(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Zf(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Xf(e,t){var n=$r(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Wf:Vf:typeof t=="function"?n.local?Zf:Yf:n.local?Kf:Ff)(n,t))}function Ha(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Gf(e){return function(){this.style.removeProperty(e)}}function jf(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Uf(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Qf(e,t,n){return arguments.length>1?this.each((t==null?Gf:typeof t=="function"?Uf:jf)(e,t,n??"")):Hn(this.node(),e)}function Hn(e,t){return e.style.getPropertyValue(t)||Ha(e).getComputedStyle(e,null).getPropertyValue(t)}function Jf(e){return function(){delete this[e]}}function $f(e,t){return function(){this[e]=t}}function eh(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function th(e,t){return arguments.length>1?this.each((t==null?Jf:typeof t=="function"?eh:$f)(e,t)):this.node()[e]}function Ba(e){return e.trim().split(/^|\s+/)}function Si(e){return e.classList||new La(e)}function La(e){this._node=e,this._names=Ba(e.getAttribute("class")||"")}La.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 qa(e,t){for(var n=Si(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Va(e,t){for(var n=Si(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function nh(e){return function(){qa(this,e)}}function rh(e){return function(){Va(this,e)}}function oh(e,t){return function(){(t.apply(this,arguments)?qa:Va)(this,e)}}function ih(e,t){var n=Ba(e+"");if(arguments.length<2){for(var r=Si(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?oh:t?nh:rh)(n,t))}function sh(){this.textContent=""}function ah(e){return function(){this.textContent=e}}function lh(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ch(e){return arguments.length?this.each(e==null?sh:(typeof e=="function"?lh:ah)(e)):this.node().textContent}function uh(){this.innerHTML=""}function dh(e){return function(){this.innerHTML=e}}function fh(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hh(e){return arguments.length?this.each(e==null?uh:(typeof e=="function"?fh:dh)(e)):this.node().innerHTML}function gh(){this.nextSibling&&this.parentNode.appendChild(this)}function vh(){return this.each(gh)}function ph(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mh(){return this.each(ph)}function yh(e){var t=typeof e=="function"?e:Ia(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function bh(){return null}function wh(e,t){var n=typeof e=="function"?e:Ia(e),r=t==null?bh:typeof t=="function"?t:ki(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function _h(){var e=this.parentNode;e&&e.removeChild(this)}function xh(){return this.each(_h)}function kh(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sh(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Eh(e){return this.select(e?Sh:kh)}function Th(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ch(e){return function(t){e.call(this,t,this.__data__)}}function Ah(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Mh(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function Ph(e,t,n){return function(){var r=this.__on,o,i=Ch(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Nh(e,t,n){var r=Ah(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(o=0,u=a[l];o<i;++o)if((s=r[o]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?Ph:Mh,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function Wa(e,t,n){var r=Ha(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Ih(e,t){return function(){return Wa(this,e,t)}}function zh(e,t){return function(){return Wa(this,e,t.apply(this,arguments))}}function Oh(e,t){return this.each((typeof t=="function"?zh:Ih)(e,t))}function*Dh(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var Fa=[null];function je(e,t){this._groups=e,this._parents=t}function hr(){return new je([[document.documentElement]],Fa)}function Rh(){return this}je.prototype=hr.prototype={constructor:je,select:lf,selectAll:ff,selectChild:pf,selectChildren:wf,filter:_f,data:Cf,enter:xf,exit:Mf,join:Pf,merge:Nf,selection:Rh,order:If,sort:zf,call:Df,nodes:Rf,node:Hf,size:Bf,empty:Lf,each:qf,attr:Xf,style:Qf,property:th,classed:ih,text:ch,html:hh,raise:vh,lower:mh,append:yh,insert:wh,remove:xh,clone:Eh,datum:Th,on:Nh,dispatch:Oh,[Symbol.iterator]:Dh};function vt(e){return typeof e=="string"?new je([[document.querySelector(e)]],[document.documentElement]):new je([[e]],Fa)}function Hh(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Et(e,t){if(e=Hh(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Bh={passive:!1},gr={capture:!0,passive:!1};function Ei(e){e.stopImmediatePropagation()}function Bn(e){e.preventDefault(),e.stopImmediatePropagation()}function Ka(e){var t=e.document.documentElement,n=vt(e).on("dragstart.drag",Bn,gr);"onselectstart"in t?n.on("selectstart.drag",Bn,gr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ya(e,t){var n=e.document.documentElement,r=vt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bn,gr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const to=e=>()=>e;function Ti(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:c,dispatch:u}){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:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}Ti.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Lh(e){return!e.ctrlKey&&!e.button}function qh(){return this.parentNode}function Vh(e,t){return t??{x:e.x,y:e.y}}function Wh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fh(){var e=Lh,t=qh,n=Vh,r=Wh,o={},i=Qr("start","drag","end"),s=0,a,l,c,u,h=0;function f(p){p.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",x,Bh).on("touchend.drag touchcancel.drag",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(p,_){if(!(u||!e.call(this,p,_))){var S=C(this,t.call(this,p,_),p,_,"mouse");S&&(vt(p.view).on("mousemove.drag",v,gr).on("mouseup.drag",m,gr),Ka(p.view),Ei(p),c=!1,a=p.clientX,l=p.clientY,S("start",p))}}function v(p){if(Bn(p),!c){var _=p.clientX-a,S=p.clientY-l;c=_*_+S*S>h}o.mouse("drag",p)}function m(p){vt(p.view).on("mousemove.drag mouseup.drag",null),Ya(p.view,c),Bn(p),o.mouse("end",p)}function b(p,_){if(e.call(this,p,_)){var S=p.changedTouches,N=t.call(this,p,_),D=S.length,V,W;for(V=0;V<D;++V)(W=C(this,N,p,_,S[V].identifier,S[V]))&&(Ei(p),W("start",p,S[V]))}}function x(p){var _=p.changedTouches,S=_.length,N,D;for(N=0;N<S;++N)(D=o[_[N].identifier])&&(Bn(p),D("drag",p,_[N]))}function P(p){var _=p.changedTouches,S=_.length,N,D;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),N=0;N<S;++N)(D=o[_[N].identifier])&&(Ei(p),D("end",p,_[N]))}function C(p,_,S,N,D,V){var W=i.copy(),I=Et(V||S,_),T,A,y;if((y=n.call(p,new Ti("beforestart",{sourceEvent:S,target:f,identifier:D,active:s,x:I[0],y:I[1],dx:0,dy:0,dispatch:W}),N))!=null)return T=y.x-I[0]||0,A=y.y-I[1]||0,function E(M,k,z){var O=I,R;switch(M){case"start":o[D]=E,R=s++;break;case"end":delete o[D],--s;case"drag":I=Et(z||k,_),R=s;break}W.call(M,p,new Ti(M,{sourceEvent:k,subject:y,target:f,identifier:D,active:R,x:I[0]+T,y:I[1]+A,dx:I[0]-O[0],dy:I[1]-O[1],dispatch:W}),N)}}return f.filter=function(p){return arguments.length?(e=typeof p=="function"?p:to(!!p),f):e},f.container=function(p){return arguments.length?(t=typeof p=="function"?p:to(p),f):t},f.subject=function(p){return arguments.length?(n=typeof p=="function"?p:to(p),f):n},f.touchable=function(p){return arguments.length?(r=typeof p=="function"?p:to(!!p),f):r},f.on=function(){var p=i.on.apply(i,arguments);return p===i?f:p},f.clickDistance=function(p){return arguments.length?(h=(p=+p)*p,f):Math.sqrt(h)},f}function Ci(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Za(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function vr(){}var pr=.7,no=1/pr,Ln="\\s*([+-]?\\d+)\\s*",mr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kh=/^#([0-9a-f]{3,8})$/,Yh=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),Zh=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),Xh=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${mr}\\)$`),Gh=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${mr}\\)$`),jh=new RegExp(`^hsl\\(${mr},${Tt},${Tt}\\)$`),Uh=new RegExp(`^hsla\\(${mr},${Tt},${Tt},${mr}\\)$`),Xa={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ci(vr,gn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ga,formatHex:Ga,formatHex8:Qh,formatHsl:Jh,formatRgb:ja,toString:ja});function Ga(){return this.rgb().formatHex()}function Qh(){return this.rgb().formatHex8()}function Jh(){return el(this).formatHsl()}function ja(){return this.rgb().formatRgb()}function gn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Kh.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ua(t):n===3?new qe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ro(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ro(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=Yh.exec(e))?new qe(t[1],t[2],t[3],1):(t=Zh.exec(e))?new qe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xh.exec(e))?ro(t[1],t[2],t[3],t[4]):(t=Gh.exec(e))?ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jh.exec(e))?$a(t[1],t[2]/100,t[3]/100,1):(t=Uh.exec(e))?$a(t[1],t[2]/100,t[3]/100,t[4]):Xa.hasOwnProperty(e)?Ua(Xa[e]):e==="transparent"?new qe(NaN,NaN,NaN,0):null}function Ua(e){return new qe(e>>16&255,e>>8&255,e&255,1)}function ro(e,t,n,r){return r<=0&&(e=t=n=NaN),new qe(e,t,n,r)}function $h(e){return e instanceof vr||(e=gn(e)),e?(e=e.rgb(),new qe(e.r,e.g,e.b,e.opacity)):new qe}function Ai(e,t,n,r){return arguments.length===1?$h(e):new qe(e,t,n,r??1)}function qe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ci(qe,Ai,Za(vr,{brighter(e){return e=e==null?no:Math.pow(no,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pr:Math.pow(pr,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(vn(this.r),vn(this.g),vn(this.b),oo(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:Qa,formatHex:Qa,formatHex8:eg,formatRgb:Ja,toString:Ja}));function Qa(){return`#${pn(this.r)}${pn(this.g)}${pn(this.b)}`}function eg(){return`#${pn(this.r)}${pn(this.g)}${pn(this.b)}${pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ja(){const e=oo(this.opacity);return`${e===1?"rgb(":"rgba("}${vn(this.r)}, ${vn(this.g)}, ${vn(this.b)}${e===1?")":`, ${e})`}`}function oo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pn(e){return e=vn(e),(e<16?"0":"")+e.toString(16)}function $a(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,n,r)}function el(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof vr||(e=gn(e)),!e)return new pt;if(e instanceof pt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new pt(s,a,l,e.opacity)}function tg(e,t,n,r){return arguments.length===1?el(e):new pt(e,t,n,r??1)}function pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ci(pt,tg,Za(vr,{brighter(e){return e=e==null?no:Math.pow(no,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pr:Math.pow(pr,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,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new qe(Mi(e>=240?e-240:e+120,o,r),Mi(e,o,r),Mi(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new pt(tl(this.h),io(this.s),io(this.l),oo(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=oo(this.opacity);return`${e===1?"hsl(":"hsla("}${tl(this.h)}, ${io(this.s)*100}%, ${io(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tl(e){return e=(e||0)%360,e<0?e+360:e}function io(e){return Math.max(0,Math.min(1,e||0))}function Mi(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 Pi=e=>()=>e;function ng(e,t){return function(n){return e+n*t}}function rg(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function og(e){return(e=+e)==1?nl:function(t,n){return n-t?rg(t,n,e):Pi(isNaN(t)?n:t)}}function nl(e,t){var n=t-e;return n?ng(e,n):Pi(isNaN(e)?t:e)}const so=(function e(t){var n=og(t);function r(o,i){var s=n((o=Ai(o)).r,(i=Ai(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),c=nl(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r})(1);function ig(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function sg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ag(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=yr(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function lg(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ct(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function cg(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=yr(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ni=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ii=new RegExp(Ni.source,"g");function ug(e){return function(){return e}}function dg(e){return function(t){return e(t)+""}}function rl(e,t){var n=Ni.lastIndex=Ii.lastIndex=0,r,o,i,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=Ni.exec(e))&&(o=Ii.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:Ct(r,o)})),n=Ii.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?dg(l[0].x):ug(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)a[(h=l[u]).i]=h.x(c);return a.join("")})}function yr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Pi(t):(n==="number"?Ct:n==="string"?(r=gn(t))?(t=r,so):rl:t instanceof gn?so:t instanceof Date?lg:sg(t)?ig:Array.isArray(t)?ag:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?cg:Ct)(e,t)}var ol=180/Math.PI,zi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function il(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*ol,skewX:Math.atan(l)*ol,scaleX:s,scaleY:a}}var ao;function fg(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zi:il(t.a,t.b,t.c,t.d,t.e,t.f)}function hg(e){return e==null||(ao||(ao=document.createElementNS("http://www.w3.org/2000/svg","g")),ao.setAttribute("transform",e),!(e=ao.transform.baseVal.consolidate()))?zi:(e=e.matrix,il(e.a,e.b,e.c,e.d,e.e,e.f))}function sl(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,u,h,f,g,v){if(c!==h||u!==f){var m=g.push("translate(",null,t,null,n);v.push({i:m-4,x:Ct(c,h)},{i:m-2,x:Ct(u,f)})}else(h||f)&&g.push("translate("+h+t+f+n)}function s(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(o(h)+"rotate(",null,r)-2,x:Ct(c,u)})):u&&h.push(o(h)+"rotate("+u+r)}function a(c,u,h,f){c!==u?f.push({i:h.push(o(h)+"skewX(",null,r)-2,x:Ct(c,u)}):u&&h.push(o(h)+"skewX("+u+r)}function l(c,u,h,f,g,v){if(c!==h||u!==f){var m=g.push(o(g)+"scale(",null,",",null,")");v.push({i:m-4,x:Ct(c,h)},{i:m-2,x:Ct(u,f)})}else(h!==1||f!==1)&&g.push(o(g)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),i(c.translateX,c.translateY,u.translateX,u.translateY,h,f),s(c.rotate,u.rotate,h,f),a(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(g){for(var v=-1,m=f.length,b;++v<m;)h[(b=f[v]).i]=b.x(g);return h.join("")}}}var gg=sl(fg,"px, ","px)","deg)"),vg=sl(hg,", ",")",")"),pg=1e-12;function al(e){return((e=Math.exp(e))+1/e)/2}function mg(e){return((e=Math.exp(e))-1/e)/2}function yg(e){return((e=Math.exp(2*e))-1)/(e+1)}const lo=(function e(t,n,r){function o(i,s){var a=i[0],l=i[1],c=i[2],u=s[0],h=s[1],f=s[2],g=u-a,v=h-l,m=g*g+v*v,b,x;if(m<pg)x=Math.log(f/c)/t,b=function(N){return[a+N*g,l+N*v,c*Math.exp(t*N*x)]};else{var P=Math.sqrt(m),C=(f*f-c*c+r*m)/(2*c*n*P),p=(f*f-c*c-r*m)/(2*f*n*P),_=Math.log(Math.sqrt(C*C+1)-C),S=Math.log(Math.sqrt(p*p+1)-p);x=(S-_)/t,b=function(N){var D=N*x,V=al(_),W=c/(n*P)*(V*yg(t*D+_)-mg(_));return[a+W*g,l+W*v,c*V/al(t*D+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,l=a*a;return e(s,a,l)},o})(Math.SQRT2,2,4);var qn=0,br=0,wr=0,ll=1e3,co,_r,uo=0,mn=0,fo=0,xr=typeof performance=="object"&&performance.now?performance:Date,cl=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Oi(){return mn||(cl(bg),mn=xr.now()+fo)}function bg(){mn=0}function ho(){this._call=this._time=this._next=null}ho.prototype=ul.prototype={constructor:ho,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Oi():+n)+(t==null?0:+t),!this._next&&_r!==this&&(_r?_r._next=this:co=this,_r=this),this._call=e,this._time=n,Di()},stop:function(){this._call&&(this._call=null,this._time=1/0,Di())}};function ul(e,t,n){var r=new ho;return r.restart(e,t,n),r}function wg(){Oi(),++qn;for(var e=co,t;e;)(t=mn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qn}function dl(){mn=(uo=xr.now())+fo,qn=br=0;try{wg()}finally{qn=0,xg(),mn=0}}function _g(){var e=xr.now(),t=e-uo;t>ll&&(fo-=t,uo=e)}function xg(){for(var e,t=co,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:co=n);_r=e,Di(r)}function Di(e){if(!qn){br&&(br=clearTimeout(br));var t=e-mn;t>24?(e<1/0&&(br=setTimeout(dl,e-xr.now()-fo)),wr&&(wr=clearInterval(wr))):(wr||(uo=xr.now(),wr=setInterval(_g,ll)),qn=1,cl(dl))}}function fl(e,t,n){var r=new ho;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var kg=Qr("start","end","cancel","interrupt"),Sg=[],hl=0,gl=1,Ri=2,go=3,vl=4,Hi=5,vo=6;function po(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Eg(e,n,{name:t,index:r,group:o,on:kg,tween:Sg,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:hl})}function Bi(e,t){var n=mt(e,t);if(n.state>hl)throw new Error("too late; already scheduled");return n}function At(e,t){var n=mt(e,t);if(n.state>go)throw new Error("too late; already running");return n}function mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Eg(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ul(i,0,n.time);function i(c){n.state=gl,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,h,f,g;if(n.state!==gl)return l();for(u in r)if(g=r[u],g.name===n.name){if(g.state===go)return fl(s);g.state===vl?(g.state=vo,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[u]):+u<t&&(g.state=vo,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[u])}if(fl(function(){n.state===go&&(n.state=vl,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Ri,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ri){for(n.state=go,o=new Array(f=n.tween.length),u=0,h=-1;u<f;++u)(g=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++h]=g);o.length=h+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Hi,1),h=-1,f=o.length;++h<f;)o[h].call(e,u);n.state===Hi&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=vo,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function mo(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>Ri&&r.state<Hi,r.state=vo,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Tg(e){return this.each(function(){mo(this,e)})}function Cg(e,t){var n,r;return function(){var o=At(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function Ag(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=At(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a;break}l===c&&o.push(a)}i.tween=o}}function Mg(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?Cg:Ag)(n,e,t))}function Li(e,t,n){var r=e._id;return e.each(function(){var o=At(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return mt(o,r).value[t]}}function pl(e,t){var n;return(typeof t=="number"?Ct:t instanceof gn?so:(n=gn(t))?(t=n,so):rl)(e,t)}function Pg(e){return function(){this.removeAttribute(e)}}function Ng(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ig(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function zg(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function Og(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function Dg(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function Rg(e,t){var n=$r(e),r=n==="transform"?vg:pl;return this.attrTween(e,typeof t=="function"?(n.local?Dg:Og)(n,r,Li(this,"attr."+e,t)):t==null?(n.local?Ng:Pg)(n):(n.local?zg:Ig)(n,r,t))}function Hg(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Bg(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Lg(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Bg(e,i)),n}return o._value=t,o}function qg(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Hg(e,i)),n}return o._value=t,o}function Vg(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=$r(e);return this.tween(n,(r.local?Lg:qg)(r,t))}function Wg(e,t){return function(){Bi(this,e).delay=+t.apply(this,arguments)}}function Fg(e,t){return t=+t,function(){Bi(this,e).delay=t}}function Kg(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wg:Fg)(t,e)):mt(this.node(),t).delay}function Yg(e,t){return function(){At(this,e).duration=+t.apply(this,arguments)}}function Zg(e,t){return t=+t,function(){At(this,e).duration=t}}function Xg(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Yg:Zg)(t,e)):mt(this.node(),t).duration}function Gg(e,t){if(typeof t!="function")throw new Error;return function(){At(this,e).ease=t}}function jg(e){var t=this._id;return arguments.length?this.each(Gg(t,e)):mt(this.node(),t).ease}function Ug(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;At(this,e).ease=n}}function Qg(e){if(typeof e!="function")throw new Error;return this.each(Ug(this._id,e))}function Jg(e){typeof e!="function"&&(e=Oa(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&a.push(l);return new Yt(r,this._parents,this._name,this._id)}function $g(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l=t[a],c=n[a],u=l.length,h=s[a]=new Array(u),f,g=0;g<u;++g)(f=l[g]||c[g])&&(h[g]=f);for(;a<r;++a)s[a]=t[a];return new Yt(s,this._parents,this._name,this._id)}function ev(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function tv(e,t,n){var r,o,i=ev(t)?Bi:At;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function nv(e,t){var n=this._id;return arguments.length<2?mt(this.node(),n).on.on(e):this.each(tv(n,e,t))}function rv(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ov(){return this.on("end.remove",rv(this._id))}function iv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ki(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],l=a.length,c=i[s]=new Array(l),u,h,f=0;f<l;++f)(u=a[f])&&(h=e.call(u,u.__data__,f,a))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,po(c[f],t,n,f,c,mt(u,n)));return new Yt(i,this._parents,t,n)}function sv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=za(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l=r[a],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),g,v=mt(u,n),m=0,b=f.length;m<b;++m)(g=f[m])&&po(g,t,n,m,f,v);i.push(f),s.push(u)}return new Yt(i,s,t,n)}var av=hr.prototype.constructor;function lv(){return new av(this._groups,this._parents)}function cv(e,t){var n,r,o;return function(){var i=Hn(this,e),s=(this.style.removeProperty(e),Hn(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function ml(e){return function(){this.style.removeProperty(e)}}function uv(e,t,n){var r,o=n+"",i;return function(){var s=Hn(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function dv(e,t,n){var r,o,i;return function(){var s=Hn(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Hn(this,e))),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}function fv(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var l=At(this,e),c=l.on,u=l.value[i]==null?a||(a=ml(t)):void 0;(c!==n||o!==u)&&(r=(n=c).copy()).on(s,o=u),l.on=r}}function hv(e,t,n){var r=(e+="")=="transform"?gg:pl;return t==null?this.styleTween(e,cv(e,r)).on("end.style."+e,ml(e)):typeof t=="function"?this.styleTween(e,dv(e,r,Li(this,"style."+e,t))).each(fv(this._id,e)):this.styleTween(e,uv(e,r,t),n).on("end.style."+e,null)}function gv(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vv(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&gv(e,s,n)),r}return i._value=t,i}function pv(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,vv(e,t,n??""))}function mv(e){return function(){this.textContent=e}}function yv(e){return function(){var t=e(this);this.textContent=t??""}}function bv(e){return this.tween("text",typeof e=="function"?yv(Li(this,"text",e)):mv(e==null?"":e+""))}function wv(e){return function(t){this.textContent=e.call(this,t)}}function _v(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&wv(o)),t}return r._value=e,r}function xv(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_v(e))}function kv(){for(var e=this._name,t=this._id,n=yl(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=mt(l,t);po(l,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Yt(r,this._parents,e,n)}function Sv(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--o===0&&i()}};n.each(function(){var c=At(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),o===0&&i()})}var Ev=0;function Yt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yl(){return++Ev}var Zt=hr.prototype;Yt.prototype={constructor:Yt,select:iv,selectAll:sv,selectChild:Zt.selectChild,selectChildren:Zt.selectChildren,filter:Jg,merge:$g,selection:lv,transition:kv,call:Zt.call,nodes:Zt.nodes,node:Zt.node,size:Zt.size,empty:Zt.empty,each:Zt.each,on:nv,attr:Rg,attrTween:Vg,style:hv,styleTween:pv,text:bv,textTween:xv,remove:ov,tween:Mg,delay:Kg,duration:Xg,ease:jg,easeVarying:Qg,end:Sv,[Symbol.iterator]:Zt[Symbol.iterator]};function Tv(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Cv={time:null,delay:0,duration:250,ease:Tv};function Av(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Mv(e){var t,n;e instanceof Yt?(t=e._id,e=e._name):(t=yl(),(n=Cv).time=Oi(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&po(l,e,t,c,s,n||Av(l,t));return new Yt(r,this._parents,e,t)}hr.prototype.interrupt=Tg,hr.prototype.transition=Mv;const yo=e=>()=>e;function Pv(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:r,enumerable:!0,configurable:!0},_:{value:o}})}function Xt(e,t,n){this.k=e,this.x=t,this.y=n}Xt.prototype={constructor:Xt,scale:function(e){return e===1?this:new Xt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xt(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 bo=new Xt(1,0,0);bl.prototype=Xt.prototype;function bl(e){for(;!e.__zoom;)if(!(e=e.parentNode))return bo;return e.__zoom}function qi(e){e.stopImmediatePropagation()}function kr(e){e.preventDefault(),e.stopImmediatePropagation()}function Nv(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Iv(){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 wl(){return this.__zoom||bo}function zv(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ov(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dv(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Rv(){var e=Nv,t=Iv,n=Dv,r=zv,o=Ov,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=lo,c=Qr("start","zoom","end"),u,h,f,g=500,v=150,m=0,b=10;function x(y){y.property("__zoom",wl).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",W).filter(o).on("touchstart.zoom",I).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(y,E,M,k){var z=y.selection?y.selection():y;z.property("__zoom",wl),y!==z?_(y,E,M,k):z.interrupt().each(function(){S(this,arguments).event(k).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},x.scaleBy=function(y,E,M,k){x.scaleTo(y,function(){var z=this.__zoom.k,O=typeof E=="function"?E.apply(this,arguments):E;return z*O},M,k)},x.scaleTo=function(y,E,M,k){x.transform(y,function(){var z=t.apply(this,arguments),O=this.__zoom,R=M==null?p(z):typeof M=="function"?M.apply(this,arguments):M,L=O.invert(R),H=typeof E=="function"?E.apply(this,arguments):E;return n(C(P(O,H),R,L),z,s)},M,k)},x.translateBy=function(y,E,M,k){x.transform(y,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),s)},null,k)},x.translateTo=function(y,E,M,k,z){x.transform(y,function(){var O=t.apply(this,arguments),R=this.__zoom,L=k==null?p(O):typeof k=="function"?k.apply(this,arguments):k;return n(bo.translate(L[0],L[1]).scale(R.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof M=="function"?-M.apply(this,arguments):-M),O,s)},k,z)};function P(y,E){return E=Math.max(i[0],Math.min(i[1],E)),E===y.k?y:new Xt(E,y.x,y.y)}function C(y,E,M){var k=E[0]-M[0]*y.k,z=E[1]-M[1]*y.k;return k===y.x&&z===y.y?y:new Xt(y.k,k,z)}function p(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function _(y,E,M,k){y.on("start.zoom",function(){S(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(k).end()}).tween("zoom",function(){var z=this,O=arguments,R=S(z,O).event(k),L=t.apply(z,O),H=M==null?p(L):typeof M=="function"?M.apply(z,O):M,Y=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),K=z.__zoom,U=typeof E=="function"?E.apply(z,O):E,j=l(K.invert(H).concat(Y/K.k),U.invert(H).concat(Y/U.k));return function(X){if(X===1)X=U;else{var J=j(X),me=Y/J[2];X=new Xt(me,H[0]-J[0]*me,H[1]-J[1]*me)}R.zoom(null,X)}})}function S(y,E,M){return!M&&y.__zooming||new N(y,E)}function N(y,E){this.that=y,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,E),this.taps=0}N.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,E){return this.mouse&&y!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var E=vt(this.that).datum();c.call(y,this.that,new Pv(y,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:c}),E)}};function D(y,...E){if(!e.apply(this,arguments))return;var M=S(this,E).event(y),k=this.__zoom,z=Math.max(i[0],Math.min(i[1],k.k*Math.pow(2,r.apply(this,arguments)))),O=Et(y);if(M.wheel)(M.mouse[0][0]!==O[0]||M.mouse[0][1]!==O[1])&&(M.mouse[1]=k.invert(M.mouse[0]=O)),clearTimeout(M.wheel);else{if(k.k===z)return;M.mouse=[O,k.invert(O)],mo(this),M.start()}kr(y),M.wheel=setTimeout(R,v),M.zoom("mouse",n(C(P(k,z),M.mouse[0],M.mouse[1]),M.extent,s));function R(){M.wheel=null,M.end()}}function V(y,...E){if(f||!e.apply(this,arguments))return;var M=y.currentTarget,k=S(this,E,!0).event(y),z=vt(y.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Y,!0),O=Et(y,M),R=y.clientX,L=y.clientY;Ka(y.view),qi(y),k.mouse=[O,this.__zoom.invert(O)],mo(this),k.start();function H(K){if(kr(K),!k.moved){var U=K.clientX-R,j=K.clientY-L;k.moved=U*U+j*j>m}k.event(K).zoom("mouse",n(C(k.that.__zoom,k.mouse[0]=Et(K,M),k.mouse[1]),k.extent,s))}function Y(K){z.on("mousemove.zoom mouseup.zoom",null),Ya(K.view,k.moved),kr(K),k.event(K).end()}}function W(y,...E){if(e.apply(this,arguments)){var M=this.__zoom,k=Et(y.changedTouches?y.changedTouches[0]:y,this),z=M.invert(k),O=M.k*(y.shiftKey?.5:2),R=n(C(P(M,O),k,z),t.apply(this,E),s);kr(y),a>0?vt(this).transition().duration(a).call(_,R,k,y):vt(this).call(x.transform,R,k,y)}}function I(y,...E){if(e.apply(this,arguments)){var M=y.touches,k=M.length,z=S(this,E,y.changedTouches.length===k).event(y),O,R,L,H;for(qi(y),R=0;R<k;++R)L=M[R],H=Et(L,this),H=[H,this.__zoom.invert(H),L.identifier],z.touch0?!z.touch1&&z.touch0[2]!==H[2]&&(z.touch1=H,z.taps=0):(z.touch0=H,O=!0,z.taps=1+!!u);u&&(u=clearTimeout(u)),O&&(z.taps<2&&(h=H[0],u=setTimeout(function(){u=null},g)),mo(this),z.start())}}function T(y,...E){if(this.__zooming){var M=S(this,E).event(y),k=y.changedTouches,z=k.length,O,R,L,H;for(kr(y),O=0;O<z;++O)R=k[O],L=Et(R,this),M.touch0&&M.touch0[2]===R.identifier?M.touch0[0]=L:M.touch1&&M.touch1[2]===R.identifier&&(M.touch1[0]=L);if(R=M.that.__zoom,M.touch1){var Y=M.touch0[0],K=M.touch0[1],U=M.touch1[0],j=M.touch1[1],X=(X=U[0]-Y[0])*X+(X=U[1]-Y[1])*X,J=(J=j[0]-K[0])*J+(J=j[1]-K[1])*J;R=P(R,Math.sqrt(X/J)),L=[(Y[0]+U[0])/2,(Y[1]+U[1])/2],H=[(K[0]+j[0])/2,(K[1]+j[1])/2]}else if(M.touch0)L=M.touch0[0],H=M.touch0[1];else return;M.zoom("touch",n(C(R,L,H),M.extent,s))}}function A(y,...E){if(this.__zooming){var M=S(this,E).event(y),k=y.changedTouches,z=k.length,O,R;for(qi(y),f&&clearTimeout(f),f=setTimeout(function(){f=null},g),O=0;O<z;++O)R=k[O],M.touch0&&M.touch0[2]===R.identifier?delete M.touch0:M.touch1&&M.touch1[2]===R.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(R=Et(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<b)){var L=vt(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return x.wheelDelta=function(y){return arguments.length?(r=typeof y=="function"?y:yo(+y),x):r},x.filter=function(y){return arguments.length?(e=typeof y=="function"?y:yo(!!y),x):e},x.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:yo(!!y),x):o},x.extent=function(y){return arguments.length?(t=typeof y=="function"?y:yo([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),x):t},x.scaleExtent=function(y){return arguments.length?(i[0]=+y[0],i[1]=+y[1],x):[i[0],i[1]]},x.translateExtent=function(y){return arguments.length?(s[0][0]=+y[0][0],s[1][0]=+y[1][0],s[0][1]=+y[0][1],s[1][1]=+y[1][1],x):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},x.constrain=function(y){return arguments.length?(n=y,x):n},x.duration=function(y){return arguments.length?(a=+y,x):a},x.interpolate=function(y){return arguments.length?(l=y,x):l},x.on=function(){var y=c.on.apply(c,arguments);return y===c?x:y},x.clickDistance=function(y){return arguments.length?(m=(y=+y)*y,x):Math.sqrt(m)},x.tapDistance=function(y){return arguments.length?(b=+y,x):b},x}const yn={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Vi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_l=["Enter"," ","Escape"],Hv={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Vn;(function(e){e.Strict="strict",e.Loose="loose"})(Vn||(Vn={}));var Wn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Wn||(Wn={}));var wo;(function(e){e.Partial="partial",e.Full="full"})(wo||(wo={}));const Wi={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var rn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(rn||(rn={}));var Sr;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Sr||(Sr={}));var ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ee||(ee={}));const xl={[ee.Left]:ee.Right,[ee.Right]:ee.Left,[ee.Top]:ee.Bottom,[ee.Bottom]:ee.Top},kl=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,Bv=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Fi=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Er=(e,t=[0,0])=>{const{width:n,height:r}=jt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Lv=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1;const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!t.nodeLookup&&!s?i:void 0;return t.nodeLookup&&(a=s?t.nodeLookup.get(i):Fi(i)?i:t.nodeLookup.get(i.id)),a?(n=!0,xo(o,So(a,t.nodeOrigin))):o},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?ko(r):{x:0,y:0,width:0,height:0}},_o=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=xo(n,So(o)),r=!0)}),r?ko(n):{x:0,y:0,width:0,height:0}},Ki=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const a=(t.x-n)/o,l=(t.y-r)/o,c=t.width/o,u=t.height/o,h=[];for(const f of e.values()){const{measured:g,selectable:v=!0,hidden:m=!1}=f;if(s&&!v||m)continue;const b=g.width??f.width??f.initialWidth??0,x=g.height??f.height??f.initialHeight??0,{x:P,y:C}=f.internals.positionAbsolute,p=Cl(a,l,c,u,P,C,b,x),_=b*x,S=i&&p>0;(!f.internals.handleBounds||S||p>=_||f.dragging)&&h.push(f)}return h},qv=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function Vv(e,t){const n=new Map,r=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{let i;if(t?.includeHiddenNodes){const{width:s,height:a}=jt(o);i=s>0&&a>0}else i=!!(o.measured.width&&o.measured.height&&!o.hidden);i&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function Wv({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;const a=Vv(e,s),l=_o(a),c=Xi(l,t,n,s?.minZoom??o,s?.maxZoom??i,s?.padding??.1);return await r.setViewport(c,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0}function Sl({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:l,y:c}=a?a.internals.positionAbsolute:{x:0,y:0},u=s.origin??r;let h=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!a)i?.("005",yn.error005());else{const{width:g,height:v}=jt(a);g&&v&&(h=[[l,c],[l+g,c+v]])}else a&&Zn(s.extent)&&(h=[[s.extent[0][0]+l,s.extent[0][1]+c],[s.extent[1][0]+l,s.extent[1][1]+c]]);const f=Zn(h)?bn(t,h,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",yn.error015()),{position:{x:f.x-l+(s.measured.width??0)*u[0],y:f.y-c+(s.measured.height??0)*u[1]},positionAbsolute:f}}async function Fv({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(f=>f.id)),s=[];for(const f of n){if(f.deletable===!1)continue;const g=i.has(f.id),v=!g&&f.parentId&&s.find(m=>m.id===f.parentId);(g||v)&&s.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),u=qv(s,l);for(const f of l)a.has(f.id)&&!u.find(v=>v.id===f.id)&&u.push(f);if(!o)return{edges:u,nodes:s};const h=await o({nodes:s,edges:u});return typeof h=="boolean"?h?{edges:u,nodes:s}:{edges:[],nodes:[]}:h}const Fn=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),bn=(e={x:0,y:0},t,n)=>({x:Fn(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Fn(e.y,t[0][1],t[1][1]-(n?.height??0))});function El(e,t,n){const{width:r,height:o}=jt(n),{x:i,y:s}=n.internals.positionAbsolute;return bn(e,[[i,s],[i+r,s+o]],t)}const Tl=(e,t,n)=>e<t?Fn(Math.abs(e-t),1,t)/t:e>n?-Fn(Math.abs(e-n),1,t)/t:0,Yi=(e,t,n=15,r=40)=>{const o=Tl(e.x,r,t.width-r)*n,i=Tl(e.y,r,t.height-r)*n;return[o,i]},xo=(e,t)=>({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)}),Zi=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ko=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Tr=(e,t=[0,0])=>{const{x:n,y:r}=Fi(e)?e.internals.positionAbsolute:Er(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},So=(e,t=[0,0])=>{const{x:n,y:r}=Fi(e)?e.internals.positionAbsolute:Er(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},Kv=(e,t)=>ko(xo(Zi(e),Zi(t))),Cl=(e,t,n,r,o,i,s,a)=>{const l=Math.max(0,Math.min(e+n,o+s)-Math.max(e,o)),c=Math.max(0,Math.min(t+r,i+a)-Math.max(t,i));return Math.ceil(l*c)},Eo=(e,t)=>Cl(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Al=e=>Gt(e.width)&&Gt(e.height)&&Gt(e.x)&&Gt(e.y),Gt=e=>!isNaN(e)&&isFinite(e),Ml=(e,t)=>(n,r)=>{},Cr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Ar=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const a={x:(e-n)/o,y:(t-r)/o};return i?Cr(a,s):a},Kn=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Yn(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Yv(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Yn(e,n),o=Yn(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Yn(e.top??e.y??0,n),o=Yn(e.bottom??e.y??0,n),i=Yn(e.left??e.x??0,t),s=Yn(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Zv(e,t,n,r,o,i){const{x:s,y:a}=Kn(e,[t,n,r]),{x:l,y:c}=Kn({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=o-l,h=i-c;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(u),bottom:Math.floor(h)}}const Xi=(e,t,n,r,o,i)=>{const s=Yv(i,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,c=Math.min(a,l),u=Fn(c,r,o),h=e.x+e.width/2,f=e.y+e.height/2,g=t/2-h*u,v=n/2-f*u,m=Zv(e,g,v,u,t,n),b={left:Math.min(m.left-s.left,0),top:Math.min(m.top-s.top,0),right:Math.min(m.right-s.right,0),bottom:Math.min(m.bottom-s.bottom,0)};return{x:g-b.left+b.right,y:v-b.top+b.bottom,zoom:u}},To=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Zn(e){return e!=null&&e!=="parent"}function jt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Xv(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Gv(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const a=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function jv(e){return{...Hv,...e||{}}}function Uv(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0}function Pl(e,t,n){if(!n)return;const r=[];e.forEach((o,i)=>{t?.has(i)||r.push(o)}),r.length&&n(r)}function Qv(e){return e===null?null:e?"valid":"invalid"}function Gi(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=yt(e),a=Ar({x:i-(o?.left??0),y:s-(o?.top??0)},r),{x:l,y:c}=n?Cr(a,t):a;return{xSnapped:l,ySnapped:c,...a}}const Nl=e=>({width:e.offsetWidth,height:e.offsetHeight}),Il=e=>e?.getRootNode?.()||window?.document,Jv=["INPUT","SELECT","TEXTAREA"];function zl(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Jv.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Ol=e=>"clientX"in e,yt=(e,t)=>{const n=Ol(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Dl=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Nl(s)}})};function $v({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=e*.125+o*.375+s*.375+n*.125,c=t*.125+i*.375+a*.375+r*.125,u=Math.abs(l-e),h=Math.abs(c-t);return[l,c,u,h]}function Co(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Rl({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case ee.Left:return[t-Co(t-r,i),n];case ee.Right:return[t+Co(r-t,i),n];case ee.Top:return[t,n-Co(n-o,i)];case ee.Bottom:return[t,n+Co(o-n,i)]}}function Hl({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:o,targetPosition:i=ee.Top,curvature:s=.25}){const[a,l]=Rl({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[c,u]=Rl({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[h,f,g,v]=$v({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${r},${o}`,h,f,g,v]}function Bl({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[i,a,o,s]}function ep({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,a=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+a}function tp({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=xo(So(e),So(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Eo(s,ko(i))>0}const np=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,rp=(e,t)=>t.some(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)),op=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",yn.error006()),t;const r=n.getEdgeId||np;let o;return kl(e)?o={...e}:o={...e,id:r(e)},rp(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Ll({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=Bl({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}const ql={[ee.Left]:{x:-1,y:0},[ee.Right]:{x:1,y:0},[ee.Top]:{x:0,y:-1},[ee.Bottom]:{x:0,y:1}},ip=({source:e,sourcePosition:t=ee.Bottom,target:n})=>t===ee.Left||t===ee.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Vl=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function sp({source:e,sourcePosition:t=ee.Bottom,target:n,targetPosition:r=ee.Top,center:o,offset:i,stepPosition:s}){const a=ql[t],l=ql[r],c={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+l.x*i,y:n.y+l.y*i},h=ip({source:c,sourcePosition:t,target:u}),f=h.x!==0?"x":"y",g=h[f];let v=[],m,b;const x={x:0,y:0},P={x:0,y:0},[,,C,p]=Bl({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(m=o.x??c.x+(u.x-c.x)*s,b=o.y??(c.y+u.y)/2):(m=o.x??(c.x+u.x)/2,b=o.y??c.y+(u.y-c.y)*s);const D=[{x:m,y:c.y},{x:m,y:u.y}],V=[{x:c.x,y:b},{x:u.x,y:b}];a[f]===g?v=f==="x"?D:V:v=f==="x"?V:D}else{const D=[{x:c.x,y:u.y}],V=[{x:u.x,y:c.y}];if(f==="x"?v=a.x===g?V:D:v=a.y===g?D:V,t===r){const y=Math.abs(e[f]-n[f]);if(y<=i){const E=Math.min(i-1,i-y);a[f]===g?x[f]=(c[f]>e[f]?-1:1)*E:P[f]=(u[f]>n[f]?-1:1)*E}}if(t!==r){const y=f==="x"?"y":"x",E=a[f]===l[y],M=c[y]>u[y],k=c[y]<u[y];(a[f]===1&&(!E&&M||E&&k)||a[f]!==1&&(!E&&k||E&&M))&&(v=f==="x"?D:V)}const W={x:c.x+x.x,y:c.y+x.y},I={x:u.x+P.x,y:u.y+P.y},T=Math.max(Math.abs(W.x-v[0].x),Math.abs(I.x-v[0].x)),A=Math.max(Math.abs(W.y-v[0].y),Math.abs(I.y-v[0].y));T>=A?(m=(W.x+I.x)/2,b=v[0].y):(m=v[0].x,b=(W.y+I.y)/2)}const _={x:c.x+x.x,y:c.y+x.y},S={x:u.x+P.x,y:u.y+P.y};return[[e,..._.x!==v[0].x||_.y!==v[0].y?[_]:[],...v,...S.x!==v[v.length-1].x||S.y!==v[v.length-1].y?[S]:[],n],m,b,C,p]}function ap(e,t,n,r){const o=Math.min(Vl(e,t)/2,Vl(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${i+o*c},${s}Q ${i},${s} ${i},${s+o*u}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${s+o*l}Q ${i},${s} ${i+o*a},${s}`}function ji({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:r,targetY:o,targetPosition:i=ee.Top,borderRadius:s=5,centerX:a,centerY:l,offset:c=20,stepPosition:u=.5}){const[h,f,g,v,m]=sp({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:c,stepPosition:u});let b=`M${h[0].x} ${h[0].y}`;for(let x=1;x<h.length-1;x++)b+=ap(h[x-1],h[x],h[x+1],s);return b+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[b,f,g,v,m]}function Wl(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function lp(e){const{sourceNode:t,targetNode:n}=e;if(!Wl(t)||!Wl(n))return null;const r=t.internals.handleBounds||Fl(t.handles),o=n.internals.handleBounds||Fl(n.handles),i=Kl(r?.source??[],e.sourceHandle),s=Kl(e.connectionMode===Vn.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",yn.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=i?.position||ee.Bottom,l=s?.position||ee.Top,c=wn(t,i,a),u=wn(n,s,l);return{sourceX:c.x,sourceY:c.y,targetX:u.x,targetY:u.y,sourcePosition:a,targetPosition:l}}function Fl(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function wn(e,t,n=ee.Left,r=!1){const o=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??jt(e);if(r)return{x:o+s/2,y:i+a/2};switch(t?.position??n){case ee.Top:return{x:o+s/2,y:i};case ee.Right:return{x:o+s,y:i+a/2};case ee.Bottom:return{x:o+s/2,y:i+a};case ee.Left:return{x:o,y:i+a/2}}}function Kl(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ui(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function cp(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||o].forEach(l=>{if(l&&typeof l=="object"){const c=Ui(l,t);i.has(c)||(s.push({id:c,color:l.color||n,...l}),i.add(c))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const Yl=1e3,up=10,Qi={nodeOrigin:[0,0],nodeExtent:Vi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},dp={...Qi,checkEquality:!0};function Ji(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function fp(e,t,n){const r=Ji(Qi,n);for(const o of e.values())if(o.parentId)es(o,e,t,r);else{const i=Er(o,r.nodeOrigin),s=Zn(o.extent)?o.extent:r.nodeExtent,a=bn(i,s,jt(o));o.internals.positionAbsolute=a}}function hp(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function $i(e){return e==="manual"}function gp(e,t,n,r={}){const o=Ji(dp,r),i={i:0},s=new Map(t),a=o?.elevateNodesOnSelect&&!$i(o.zIndexMode)?Yl:0;let l=e.length>0,c=!1;t.clear(),n.clear();for(const u of e){let h=s.get(u.id);if(o.checkEquality&&u===h?.internals.userNode)t.set(u.id,h);else{const f=Er(u,o.nodeOrigin),g=Zn(u.extent)?u.extent:o.nodeExtent,v=bn(f,g,jt(u));h={...o.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:v,handleBounds:hp(u,h),z:Zl(u,a,o.zIndexMode),userNode:u}},t.set(u.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(l=!1),u.parentId&&es(h,t,n,r,i),c||=u.selected??!1}return{nodesInitialized:l,hasSelectedNodes:c}}function vp(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function es(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:a,zIndexMode:l}=Ji(Qi,r),c=e.parentId,u=t.get(c);if(!u){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}vp(e,n),o&&!u.parentId&&u.internals.rootParentIndex===void 0&&l==="auto"&&(u.internals.rootParentIndex=++o.i,u.internals.z=u.internals.z+o.i*up),o&&u.internals.rootParentIndex!==void 0&&(o.i=u.internals.rootParentIndex);const h=i&&!$i(l)?Yl:0,{x:f,y:g,z:v}=pp(e,u,s,a,h,l),{positionAbsolute:m}=e.internals,b=f!==m.x||g!==m.y;(b||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:f,y:g}:m,z:v}})}function Zl(e,t,n){const r=Gt(e.zIndex)?e.zIndex:0;return $i(n)?r:r+(e.selected?t:0)}function pp(e,t,n,r,o,i){const{x:s,y:a}=t.internals.positionAbsolute,l=jt(e),c=Er(e,n),u=Zn(e.extent)?bn(c,e.extent,l):c;let h=bn({x:s+u.x,y:a+u.y},r,l);e.extent==="parent"&&(h=El(h,l,t));const f=Zl(e,o,i),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=f?g+1:f}}function mp(e,t,n,r=[0,0]){const o=[],i=new Map;for(const s of e){const a=t.get(s.parentId);if(!a)continue;const l=i.get(s.parentId)?.expandedRect??Tr(a),c=Kv(l,s.rect);i.set(s.parentId,{expandedRect:c,parent:a})}return i.size>0&&i.forEach(({expandedRect:s,parent:a},l)=>{const c=a.internals.positionAbsolute,u=jt(a),h=a.origin??r,f=s.x<c.x?Math.round(Math.abs(c.x-s.x)):0,g=s.y<c.y?Math.round(Math.abs(c.y-s.y)):0,v=Math.max(u.width,Math.round(s.width)),m=Math.max(u.height,Math.round(s.height)),b=(v-u.width)*h[0],x=(m-u.height)*h[1];(f>0||g>0||b||x)&&(o.push({id:l,type:"position",position:{x:a.position.x-f+b,y:a.position.y-g+x}}),n.get(l)?.forEach(P=>{e.some(C=>C.id===P.id)||o.push({id:P.id,type:"position",position:{x:P.position.x+f,y:P.position.y+g}})})),(u.width<s.width||u.height<s.height||f||g)&&o.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?h[0]*f-b:0),height:m+(g?h[1]*g-x:0)}})}),o}function yp(e,t,n,r,o,i,s){const a=r?.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(a),{m22:h}=new window.DOMMatrixReadOnly(u.transform),f=[];for(const g of e.values()){const v=t.get(g.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),l=!0;continue}const m=Nl(g.nodeElement),b=v.measured.width!==m.width||v.measured.height!==m.height;if(!!(m.width&&m.height&&(b||!v.internals.handleBounds||g.force))){const P=g.nodeElement.getBoundingClientRect(),C=Zn(v.extent)?v.extent:i;let{positionAbsolute:p}=v.internals;if(v.parentId&&v.extent==="parent"){const S=t.get(v.parentId);S&&(p=El(p,m,S))}else C&&(p=bn(p,C,m));const _={...v,measured:m,internals:{...v.internals,positionAbsolute:p,handleBounds:{source:Dl("source",g.nodeElement,P,h,v.id),target:Dl("target",g.nodeElement,P,h,v.id)}}};t.set(v.id,_),v.parentId&&es(_,t,n,{nodeOrigin:o,zIndexMode:s}),l=!0,b&&(c.push({id:v.id,type:"dimensions",dimensions:m}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Tr(_,o)}))}}if(f.length>0){const g=mp(f,t,n,o);c.push(...g)}return{changes:c,updatedInternals:l}}async function bp({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function Xl(e,t,n,r,o,i){let s=o;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${o}-${e}`;const l=r.get(s)||new Map;if(r.set(s,l.set(n,t)),i){s=`${o}-${e}-${i}`;const c=r.get(s)||new Map;r.set(s,c.set(n,t))}}function wp(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:a=null}=r,l={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:a},c=`${o}-${s}--${i}-${a}`,u=`${i}-${a}--${o}-${s}`;Xl("source",l,u,e,o,s),Xl("target",l,c,e,i,a),t.set(r.id,r)}}function Gl(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Gl(n,t):!1}function jl(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function _p(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Gl(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(i);a&&o.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return o}function ts({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){const o=[];for(const[s,a]of t){const l=n.get(s)?.internals.userNode;l&&o.push({...l,position:a.position,dragging:r})}if(!e)return[o[0],o];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:r}:o[0],o]}function xp({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Cr(i,t);return{x:s.x-i.x,y:s.y-i.y}}function kp({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,a=new Map,l=!1,c={x:0,y:0},u=null,h=!1,f=null,g=!1,v=!1,m=null;function b({noDragClassName:P,handleSelector:C,domNode:p,isSelectable:_,nodeId:S,nodeClickDistance:N=0}){f=vt(p);function D({x:T,y:A}){const{nodeLookup:y,nodeExtent:E,snapGrid:M,snapToGrid:k,nodeOrigin:z,onNodeDrag:O,onSelectionDrag:R,onError:L,updateNodePositions:H}=t();i={x:T,y:A};let Y=!1;const K=a.size>1,U=K&&E?Zi(_o(a)):null,j=K&&k?xp({dragItems:a,snapGrid:M,x:T,y:A}):null;for(const[X,J]of a){if(!y.has(X))continue;let me={x:T-J.distance.x,y:A-J.distance.y};k&&(me=j?{x:Math.round(me.x+j.x),y:Math.round(me.y+j.y)}:Cr(me,M));let le=null;if(K&&E&&!J.extent&&U){const{positionAbsolute:ge}=J.internals,Se=ge.x-U.x+E[0][0],We=ge.x+J.measured.width-U.x2+E[1][0],Qe=ge.y-U.y+E[0][1],Ce=ge.y+J.measured.height-U.y2+E[1][1];le=[[Se,Qe],[We,Ce]]}const{position:re,positionAbsolute:_e}=Sl({nodeId:X,nextPosition:me,nodeLookup:y,nodeExtent:le||E,nodeOrigin:z,onError:L});Y=Y||J.position.x!==re.x||J.position.y!==re.y,J.position=re,J.internals.positionAbsolute=_e}if(v=v||Y,!!Y&&(H(a,!0),m&&(r||O||!S&&R))){const[X,J]=ts({nodeId:S,dragItems:a,nodeLookup:y});r?.(m,a,X,J),O?.(m,X,J),S||R?.(m,J)}}async function V(){if(!u)return;const{transform:T,panBy:A,autoPanSpeed:y,autoPanOnNodeDrag:E}=t();if(!E){l=!1,cancelAnimationFrame(s);return}const[M,k]=Yi(c,u,y);(M!==0||k!==0)&&(i.x=(i.x??0)-M/T[2],i.y=(i.y??0)-k/T[2],await A({x:M,y:k})&&D(i)),s=requestAnimationFrame(V)}function W(T){const{nodeLookup:A,multiSelectionActive:y,nodesDraggable:E,transform:M,snapGrid:k,snapToGrid:z,selectNodesOnDrag:O,onNodeDragStart:R,onSelectionDragStart:L,unselectNodesAndEdges:H}=t();h=!0,(!O||!_)&&!y&&S&&(A.get(S)?.selected||H()),_&&O&&S&&e?.(S);const Y=Gi(T.sourceEvent,{transform:M,snapGrid:k,snapToGrid:z,containerBounds:u});if(i=Y,a=_p(A,E,Y,S),a.size>0&&(n||R||!S&&L)){const[K,U]=ts({nodeId:S,dragItems:a,nodeLookup:A});n?.(T.sourceEvent,a,K,U),R?.(T.sourceEvent,K,U),S||L?.(T.sourceEvent,U)}}const I=Fh().clickDistance(N).on("start",T=>{const{domNode:A,nodeDragThreshold:y,transform:E,snapGrid:M,snapToGrid:k}=t();u=A?.getBoundingClientRect()||null,g=!1,v=!1,m=T.sourceEvent,y===0&&W(T),i=Gi(T.sourceEvent,{transform:E,snapGrid:M,snapToGrid:k,containerBounds:u}),c=yt(T.sourceEvent,u)}).on("drag",T=>{const{autoPanOnNodeDrag:A,transform:y,snapGrid:E,snapToGrid:M,nodeDragThreshold:k,nodeLookup:z}=t(),O=Gi(T.sourceEvent,{transform:y,snapGrid:E,snapToGrid:M,containerBounds:u});if(m=T.sourceEvent,(T.sourceEvent.type==="touchmove"&&T.sourceEvent.touches.length>1||S&&!z.has(S))&&(g=!0),!g){if(!l&&A&&h&&(l=!0,V()),!h){const R=yt(T.sourceEvent,u),L=R.x-c.x,H=R.y-c.y;Math.sqrt(L*L+H*H)>k&&W(T)}(i.x!==O.xSnapped||i.y!==O.ySnapped)&&a&&h&&(c=yt(T.sourceEvent,u),D(O))}}).on("end",T=>{if(!h||g){g&&a.size>0&&t().updateNodePositions(a,!1);return}if(l=!1,h=!1,cancelAnimationFrame(s),a.size>0){const{nodeLookup:A,updateNodePositions:y,onNodeDragStop:E,onSelectionDragStop:M}=t();if(v&&(y(a,!1),v=!1),o||E||!S&&M){const[k,z]=ts({nodeId:S,dragItems:a,nodeLookup:A,dragging:!1});o?.(T.sourceEvent,a,k,z),E?.(T.sourceEvent,k,z),S||M?.(T.sourceEvent,z)}}}).filter(T=>{const A=T.target;return!T.button&&(!P||!jl(A,`.${P}`,p))&&(!C||jl(A,C,p))});f.call(I)}function x(){f?.on(".drag",null)}return{update:b,destroy:x}}function Sp(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Eo(o,Tr(i))>0&&r.push(i);return r}const Ep=250;function Tp(e,t,n,r){let o=[],i=1/0;const s=Sp(e,n,t+Ep);for(const a of s){const l=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const c of l){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:u,y:h}=wn(a,c,c.position,!0),f=Math.sqrt(Math.pow(u-e.x,2)+Math.pow(h-e.y,2));f>t||(f<i?(o=[{...c,x:u,y:h}],i=f):f===i&&o.push({...c,x:u,y:h}))}}if(!o.length)return null;if(o.length>1){const a=r.type==="source"?"target":"source";return o.find(l=>l.type===a)??o[0]}return o[0]}function Ul(e,t,n,r,o,i=!1){const s=r.get(e);if(!s)return null;const a=o==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],l=(n?a?.find(c=>c.id===n):a?.[0])??null;return l&&i?{...l,...wn(s,l,l.position,!0)}:l}function Ql(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Cp(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Jl=()=>!0;function Ap(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:a,nodeLookup:l,lib:c,autoPanOnConnect:u,flowId:h,panBy:f,cancelConnection:g,onConnectStart:v,onConnect:m,onConnectEnd:b,isValidConnection:x=Jl,onReconnectEnd:P,updateConnection:C,getTransform:p,getFromHandle:_,autoPanSpeed:S,dragThreshold:N=1,handleDomNode:D}){const V=Il(e.target);let W=0,I;const{x:T,y:A}=yt(e),y=Ql(i,D),E=a?.getBoundingClientRect();let M=!1;if(!E||!y)return;const k=Ul(o,y,r,l,t);if(!k)return;let z=yt(e,E),O=!1,R=null,L=!1,H=null;function Y(){if(!u||!E)return;const[re,_e]=Yi(z,E,S);f({x:re,y:_e}),W=requestAnimationFrame(Y)}const K={...k,nodeId:o,type:y,position:k.position},U=l.get(o);let X={inProgress:!0,isValid:null,from:wn(U,K,ee.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:U,to:z,toHandle:null,toPosition:xl[K.position],toNode:null,pointer:z};function J(){M=!0,C(X),v?.(e,{nodeId:o,handleId:r,handleType:y})}N===0&&J();function me(re){if(!M){const{x:Ce,y:te}=yt(re),ye=Ce-T,Fe=te-A;if(!(ye*ye+Fe*Fe>N*N))return;J()}if(!_()||!K){le(re);return}const _e=p();z=yt(re,E),I=Tp(Ar(z,_e,!1,[1,1]),n,l,K),O||(Y(),O=!0);const ge=$l(re,{handle:I,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:x,doc:V,lib:c,flowId:h,nodeLookup:l});H=ge.handleDomNode,R=ge.connection,L=Cp(!!I,ge.isValid);const Se=l.get(o),We=Se?wn(Se,K,ee.Left,!0):X.from,Qe={...X,from:We,isValid:L,to:ge.toHandle&&L?Kn({x:ge.toHandle.x,y:ge.toHandle.y},_e):z,toHandle:ge.toHandle,toPosition:L&&ge.toHandle?ge.toHandle.position:xl[K.position],toNode:ge.toHandle?l.get(ge.toHandle.nodeId):null,pointer:z};C(Qe),X=Qe}function le(re){if(!("touches"in re&&re.touches.length>0)){if(M){(I||H)&&R&&L&&m?.(R);const{inProgress:_e,...ge}=X,Se={...ge,toPosition:X.toHandle?X.toPosition:null};b?.(re,Se),i&&P?.(re,Se)}g(),cancelAnimationFrame(W),O=!1,L=!1,R=null,H=null,V.removeEventListener("mousemove",me),V.removeEventListener("mouseup",le),V.removeEventListener("touchmove",me),V.removeEventListener("touchend",le)}}V.addEventListener("mousemove",me),V.addEventListener("mouseup",le),V.addEventListener("touchmove",me),V.addEventListener("touchend",le)}function $l(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:a,flowId:l,isValidConnection:c=Jl,nodeLookup:u}){const h=i==="target",f=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:v}=yt(e),m=s.elementFromPoint(g,v),b=m?.classList.contains(`${a}-flow__handle`)?m:f,x={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const P=Ql(void 0,b),C=b.getAttribute("data-nodeid"),p=b.getAttribute("data-handleid"),_=b.classList.contains("connectable"),S=b.classList.contains("connectableend");if(!C||!P)return x;const N={source:h?C:r,sourceHandle:h?p:o,target:h?r:C,targetHandle:h?o:p};x.connection=N;const V=_&&S&&(n===Vn.Strict?h&&P==="source"||!h&&P==="target":C!==r||p!==o);x.isValid=V&&c(N),x.toHandle=Ul(C,P,p,u,n,!0)}return x}const ec={onPointerDown:Ap,isValid:$l},Ao=e=>({x:e.x,y:e.y,zoom:e.k}),ns=({x:e,y:t,zoom:n})=>bo.translate(e,t).scale(n),on=(e,t)=>e.target.closest(`.${t}`),tc=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Mp=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,rs=(e,t=0,n=Mp,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},nc=e=>{const t=e.ctrlKey&&To()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Pp({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}){return u=>{if(on(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(u.ctrlKey&&s){const b=Et(u),x=nc(u),P=h*Math.pow(2,x);r.scaleTo(n,P,b,u);return}const f=u.deltaMode===1?20:1;let g=o===Wn.Vertical?0:u.deltaX*f,v=o===Wn.Horizontal?0:u.deltaY*f;!To()&&u.shiftKey&&o!==Wn.Vertical&&(g=u.deltaY*f,v=0),r.translateBy(n,-(g/h)*i,-(v/h)*i,{internal:!0});const m=Ao(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?l?.(u,m):(e.isPanScrolling=!0,a?.(u,m)),e.panScrollTimeout=setTimeout(()=>{c?.(u,m),e.isPanScrolling=!1},150)}}function Np({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,a=on(r,e);if(r.ctrlKey&&i&&a&&r.preventDefault(),s||a)return null;r.preventDefault(),n.call(this,r,o)}}function Ip({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;const o=Ao(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,o)}}function zp({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{e.usedRightMouseButton=!!(n&&tc(t,e.mouseButton??0)),i.sourceEvent?.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!i.sourceEvent?.internal&&o?.(i.sourceEvent,Ao(i.transform))}}function Op({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&tc(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=Ao(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(s.sourceEvent,a)},n?150:0)}}}function Dp({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:h}){return f=>{const g=t||n,v=r&&f.ctrlKey,m=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(on(f,`${u}-flow__node`)||on(f,`${u}-flow__edge`)||on(f,`${u}-flow__selection`)||on(f,`${u}-flow__nodesselection`)))return!0;if(!o&&!g&&!i&&!s&&!r||a||h&&!m||on(f,l)&&m||on(f,c)&&(!m||i&&m&&!t)||!r&&f.ctrlKey&&m)return!1;if(!r&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!g&&!i&&!v&&m||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const b=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||m||e)&&b}}function Rp({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:l}){const c={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect();let h=[[0,0],[u.width,u.height]];(typeof ResizeObserver<"u"?new ResizeObserver(A=>{const y=A[0];y&&(h=[[0,0],[y.contentRect.width,y.contentRect.height]])}):null)?.observe(e);const g=Rv().extent(()=>h).scaleExtent([t,n]).translateExtent(r),v=vt(e).call(g);p({x:o.x,y:o.y,zoom:Fn(o.zoom,t,n)},[[0,0],[u.width,u.height]],r);const m=v.on("wheel.zoom"),b=v.on("dblclick.zoom");g.wheelDelta(nc);async function x(A,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?yr:lo).transform(rs(v,y?.duration,y?.ease,()=>E(!0)),A)}):!1}function P({noWheelClassName:A,noPanClassName:y,onPaneContextMenu:E,userSelectionActive:M,panOnScroll:k,panOnDrag:z,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:H,zoomOnScroll:Y,zoomOnDoubleClick:K,panActivationKeyPressed:U=!1,zoomActivationKeyPressed:j,lib:X,onTransformChange:J,connectionInProgress:me,paneClickDistance:le,selectionOnDrag:re}){M&&!c.isZoomingOrPanning&&C();const _e=k&&!j&&!M;g.clickDistance(re?1/0:!Gt(le)||le<0?0:le);const ge=_e?Pp({zoomPanValues:c,noWheelClassName:A,d3Selection:v,d3Zoom:g,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:H,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:a}):Np({noWheelClassName:A,preventScrolling:L,d3ZoomHandler:m});v.on("wheel.zoom",ge,{passive:!1});const Se=Ip({zoomPanValues:c,onDraggingChange:l,onPanZoomStart:s});g.on("start",Se);const We=zp({zoomPanValues:c,panOnDrag:z,onPaneContextMenu:!!E,onPanZoom:i,onTransformChange:J});g.on("zoom",We);const Qe=Op({zoomPanValues:c,panOnDrag:z,panOnScroll:k,onPaneContextMenu:E,onPanZoomEnd:a,onDraggingChange:l});g.on("end",Qe);const Ce=Dp({panActivationKeyPressed:U,zoomActivationKeyPressed:j,panOnDrag:z,zoomOnScroll:Y,panOnScroll:k,zoomOnDoubleClick:K,zoomOnPinch:H,userSelectionActive:M,noPanClassName:y,noWheelClassName:A,lib:X,connectionInProgress:me});g.filter(Ce),K?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function C(){g.on("zoom",null)}async function p(A,y,E){const M=ns(A),k=g?.constrain()(M,y,E);return k&&await x(k),k}async function _(A,y){const E=ns(A);return await x(E,y),E}function S(A){if(v){const y=ns(A),E=v.property("__zoom");(E.k!==A.zoom||E.x!==A.x||E.y!==A.y)&&g?.transform(v,y,null,{sync:!0})}}function N(){const A=v?bl(v.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}async function D(A,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?yr:lo).scaleTo(rs(v,y?.duration,y?.ease,()=>E(!0)),A)}):!1}async function V(A,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?yr:lo).scaleBy(rs(v,y?.duration,y?.ease,()=>E(!0)),A)}):!1}function W(A){g?.scaleExtent(A)}function I(A){g?.translateExtent(A)}function T(A){const y=!Gt(A)||A<0?0:A;g?.clickDistance(y)}return{update:P,destroy:C,setViewport:_,setViewportConstrained:p,getViewport:N,scaleTo:D,scaleBy:V,setScaleExtent:W,setTranslateExtent:I,syncViewport:S,setClickDistance:T}}var rc;(function(e){e.Line="line",e.Handle="handle"})(rc||(rc={}));const Hp=Ml();function Bp(e,t,n={}){return op(e,t,{...n,onError:n.onError??Hp})}function os(){const e={};return[t=>{if(t&&!uu(e))throw new Error(t);return Ko(e)},t=>Es(e,t)]}const[Lp,qp]=os(),[Vp,Wp]=os(),[Fp,Kp]=os();var Yp=new Set(["$$slots","$$events","$$legacy","id","type","position","style","class","isConnectable","isConnectableStart","isConnectableEnd","isValidConnection","onconnect","ondisconnect","children"]),Zp=Q("<div><!></div>");function Xn(e,t){oe(t,!0);let n=F(t,"id",3,null),r=F(t,"type",3,"source"),o=F(t,"position",19,()=>ee.Top),i=F(t,"isConnectableStart",3,!0),s=F(t,"isConnectableEnd",3,!0),a=ht(t,Yp);const l=Lp("Handle must be used within a Custom Node component"),c=Vp("Handle must be used within a Custom Node component");let u=w(()=>r()==="target"),h=w(()=>t.isConnectable!==void 0?t.isConnectable:c.value),f=_n(),g=w(()=>f.ariaLabelConfig),v=null;Gs(()=>{if(t.onconnect||t.ondisconnect){f.edges;let T=f.connectionLookup.get(`${l}-${r()}${n()?`-${n()}`:""}`);if(v&&!Uv(T,v)){const A=T??new Map;Pl(v,A,t.ondisconnect),Pl(A,v,t.onconnect)}v=new Map(T)}});let m=w(()=>{if(!f.connection.inProgress)return[!1,!1,!1,!1,null];const{fromHandle:T,toHandle:A,isValid:y}=f.connection,E=T&&T.nodeId===l&&T.type===r()&&T.id===n(),M=A&&A.nodeId===l&&A.type===r()&&A.id===n(),k=f.connectionMode===Vn.Strict?T?.type!==r():l!==T?.nodeId||n()!==T?.id;return[!0,E,M,k,M&&y]}),b=w(()=>Qn(d(m),5)),x=w(()=>d(b)[0]),P=w(()=>d(b)[1]),C=w(()=>d(b)[2]),p=w(()=>d(b)[3]),_=w(()=>d(b)[4]);function S(T){const A=f.onbeforeconnect?f.onbeforeconnect(T):T;A&&(f.addEdge(A),f.onconnect?.(T))}function N(T){const A=Ol(T);T.currentTarget&&(A&&T.button===0||!A)&&ec.onPointerDown(T,{handleId:n(),nodeId:l,isTarget:d(u),connectionRadius:f.connectionRadius,domNode:f.domNode,nodeLookup:f.nodeLookup,connectionMode:f.connectionMode,lib:"svelte",autoPanOnConnect:f.autoPanOnConnect,autoPanSpeed:f.autoPanSpeed,flowId:f.flowId,isValidConnection:t.isValidConnection||((...y)=>f.isValidConnection?.(...y)??!0),updateConnection:f.updateConnection,cancelConnection:f.cancelConnection,panBy:f.panBy,onConnect:S,onConnectStart:f.onconnectstart,onConnectEnd:(...y)=>f.onconnectend?.(...y),getTransform:()=>[f.viewport.x,f.viewport.y,f.viewport.zoom],getFromHandle:()=>f.connection.fromHandle,dragThreshold:f.connectionDragThreshold,handleDomNode:T.currentTarget})}function D(T){if(!l||!f.clickConnectStartHandle&&!i())return;if(!f.clickConnectStartHandle){f.onclickconnectstart?.(T,{nodeId:l,handleId:n(),handleType:r()}),f.clickConnectStartHandle={nodeId:l,type:r(),id:n()};return}const A=Il(T.target),y=t.isValidConnection??f.isValidConnection,{connectionMode:E,clickConnectStartHandle:M,flowId:k,nodeLookup:z}=f,{connection:O,isValid:R}=ec.isValid(T,{handle:{nodeId:l,id:n(),type:r()},connectionMode:E,fromNodeId:M.nodeId,fromHandleId:M.id??null,fromType:M.type,isValidConnection:y,flowId:k,doc:A,lib:"svelte",nodeLookup:z});R&&O&&S(O);const L=structuredClone(Ss(f.connection));delete L.inProgress,L.toPosition=L.toHandle?L.toHandle.position:null,f.onclickconnectend?.(T,L),f.clickConnectStartHandle=null}var V=Zp(),W=()=>{};rt(V,()=>({"data-handleid":n(),"data-nodeid":l,"data-handlepos":o(),"data-id":`${f.flowId??""}-${l??""}-${n()??"null"??""}-${r()??""}`,class:["svelte-flow__handle",`svelte-flow__handle-${o()}`,f.noDragClass,f.noPanClass,o(),t.class],onmousedown:N,ontouchstart:N,onclick:f.clickConnect?D:void 0,onkeypress:W,style:t.style,role:"button","aria-label":d(g)["handle.ariaLabel"],tabindex:"-1",...a,[nn]:{valid:d(_),connectingto:d(C),connectingfrom:d(P),source:!d(u),target:d(u),connectablestart:i(),connectableend:s(),connectable:d(h),connectionindicator:d(h)&&(!d(x)||d(p))&&(d(x)||f.clickConnectStartHandle?s():i())}}));var I=Z(V);Ne(I,()=>t.children??Je),q(e,V),ie()}var Xp=Q("<!> <!>",1);function oc(e,t){oe(t,!0);let n=F(t,"targetPosition",19,()=>ee.Top),r=F(t,"sourcePosition",19,()=>ee.Bottom);var o=Xp(),i=de(o);Xn(i,{type:"target",get position(){return n()}});var s=G(i),a=G(s);Xn(a,{type:"source",get position(){return r()}}),$(()=>ce(s,` ${t.data?.label??""} `)),q(e,o),ie()}var Gp=Q(" <!>",1);function jp(e,t){oe(t,!0);let n=F(t,"data",19,()=>({label:"Node"})),r=F(t,"sourcePosition",19,()=>ee.Bottom);var o=Gp(),i=de(o),s=G(i);Xn(s,{type:"source",get position(){return r()}}),$(()=>ce(i,`${n()?.label??""} `)),q(e,o),ie()}var Up=Q(" <!>",1);function Qp(e,t){oe(t,!0);let n=F(t,"data",19,()=>({label:"Node"})),r=F(t,"targetPosition",19,()=>ee.Top);var o=Up(),i=de(o),s=G(i);Xn(s,{type:"target",get position(){return r()}}),$(()=>ce(i,`${n()?.label??""} `)),q(e,o),ie()}function Jp(e,t){}function is(e,t,n){if(!n||!t)return;const r=n==="root"?t:t.querySelector(`.svelte-flow__${n}`);r&&r.appendChild(e)}function $p(e,t){const n=w(_n),r=w(()=>d(n).domNode);let o;return d(r)?is(e,d(r),t):o=js(()=>{ut(()=>{is(e,d(r),t),o?.()})}),{async update(i){is(e,d(r),i)},destroy(){e.parentNode&&e.parentNode.removeChild(e),o?.()}}}function em(){let e=ue(typeof window>"u");if(d(e)){const t=js(()=>{ut(()=>{B(e,!1),t?.()})})}return{get value(){return d(e)}}}const ic=e=>Bv(e),tm=e=>kl(e);function Mt(e){return e===void 0?void 0:`${e}px`}const Mo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var nm=new Set(["$$slots","$$events","$$legacy","x","y","width","height","selectEdgeOnClick","transparent","class","children"]),rm=Q("<div><!></div>");function om(e,t){oe(t,!0);let n=F(t,"x",3,0),r=F(t,"y",3,0),o=F(t,"selectEdgeOnClick",3,!1),i=F(t,"transparent",3,!1),s=ht(t,nm);const a=_n(),l=Fp("EdgeLabel must be used within a Custom Edge component");let c=w(()=>a.visible.edges.get(l)?.zIndex);var u=rm(),h=()=>{o()&&l&&a.handleEdgeSelection(l)};rt(u,g=>({class:["svelte-flow__edge-label",{transparent:i()},t.class],tabindex:"-1",onclick:h,...s,[Kt]:g}),[()=>({display:em().value?"none":void 0,cursor:o()?"pointer":void 0,transform:`translate(-50%, -50%) translate(${n()??""}px,${r()??""}px)`,"pointer-events":"all",width:Mt(t.width),height:Mt(t.height),"z-index":d(c)})],void 0,void 0,"svelte-qyfwwc");var f=Z(u);Ne(f,()=>t.children??Je),Le(u,(g,v)=>$p?.(g,v),()=>"edge-labels"),q(e,u),ie()}var im=new Set(["$$slots","$$events","$$legacy","id","path","label","labelX","labelY","labelStyle","markerStart","markerEnd","style","interactionWidth","class"]),sm=Pe("<path></path>"),am=Pe('<path fill="none"></path><!><!>',1);function Po(e,t){let n=F(t,"interactionWidth",3,20),r=ht(t,im);var o=am(),i=de(o),s=G(i);{var a=u=>{var h=sm();rt(h,()=>({d:t.path,"stroke-opacity":0,"stroke-width":n(),fill:"none",class:"svelte-flow__edge-interaction",...r})),q(u,h)};pe(s,u=>{n()>0&&u(a)})}var l=G(s);{var c=u=>{om(u,{get x(){return t.labelX},get y(){return t.labelY},get style(){return t.labelStyle},selectEdgeOnClick:!0,children:(h,f)=>{var g=ar();$(()=>ce(g,t.label)),q(h,g)},$$slots:{default:!0}})};pe(l,u=>{t.label&&u(c)})}$(()=>{ne(i,"id",t.id),ne(i,"d",t.path),Ft(i,0,hn(["svelte-flow__edge-path",t.class])),ne(i,"marker-start",t.markerStart),ne(i,"marker-end",t.markerEnd),ft(i,t.style)}),q(e,o)}function sc(e,t){oe(t,!0);let n=w(()=>Hl({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,curvature:t.pathOptions?.curvature})),r=w(()=>Qn(d(n),3)),o=w(()=>d(r)[0]),i=w(()=>d(r)[1]),s=w(()=>d(r)[2]);Po(e,{get id(){return t.id},get path(){return d(o)},get labelX(){return d(i)},get labelY(){return d(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ie()}function lm(e,t){oe(t,!0);let n=w(()=>ji({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition})),r=w(()=>Qn(d(n),3)),o=w(()=>d(r)[0]),i=w(()=>d(r)[1]),s=w(()=>d(r)[2]);Po(e,{get path(){return d(o)},get labelX(){return d(i)},get labelY(){return d(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ie()}function cm(e,t){oe(t,!0);let n=w(()=>Ll({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY})),r=w(()=>Qn(d(n),3)),o=w(()=>d(r)[0]),i=w(()=>d(r)[1]),s=w(()=>d(r)[2]);Po(e,{get path(){return d(o)},get labelX(){return d(i)},get labelY(){return d(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ie()}function um(e,t){oe(t,!0);let n=w(()=>ji({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,borderRadius:0})),r=w(()=>Qn(d(n),3)),o=w(()=>d(r)[0]),i=w(()=>d(r)[1]),s=w(()=>d(r)[2]);Po(e,{get path(){return d(o)},get labelX(){return d(i)},get labelY(){return d(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ie()}function dm(e,t,n,r){const o=new Map;return Ki(e,{x:0,y:0,width:n,height:r},t,!0).forEach(i=>{o.set(i.id,i)}),o}function ac(e){const{edges:t,defaultEdgeOptions:n,nodeLookup:r,previousEdges:o,connectionMode:i,onerror:s,onlyRenderVisible:a,elevateEdgesOnSelect:l,zIndexMode:c}=e,u=new Map;for(const h of t){const f=r.get(h.source),g=r.get(h.target);if(!f||!g)continue;if(a){const{visibleNodes:b,transform:x,width:P,height:C}=e;if(tp({sourceNode:f,targetNode:g,width:P,height:C,transform:x}))b.set(f.id,f),b.set(g.id,g);else continue}const v=o.get(h.id);if(v&&h===v.edge&&f==v.sourceNode&&g==v.targetNode){u.set(h.id,v);continue}const m=lp({id:h.id,sourceNode:f,targetNode:g,sourceHandle:h.sourceHandle||null,targetHandle:h.targetHandle||null,connectionMode:i,onError:s});m&&u.set(h.id,{...n,...h,...m,zIndex:ep({selected:h.selected,zIndex:h.zIndex??n.zIndex,sourceNode:f,targetNode:g,elevateOnSelect:l,zIndexMode:c}),sourceNode:f,targetNode:g,edge:h})}return u}const fm=Ml(),lc={input:jp,output:Qp,default:oc,group:Jp},cc={straight:cm,smoothstep:lm,default:sc,step:um};function hm(e,t,n,r,o,i){if(t&&!n&&r&&o){const s=_o(i,{filter:a=>!!((a.width||a.initialWidth)&&(a.height||a.initialHeight))});return Xi(s,r,o,.5,2,.1)}else return n??{x:0,y:0,zoom:1}}function gm(e){class t{#e=w(()=>e.props.id??"1");get flowId(){return d(this.#e)}set flowId(r){B(this.#e,r)}#n=ue(null);get domNode(){return d(this.#n)}set domNode(r){B(this.#n,r)}#t=ue(null);get panZoom(){return d(this.#t)}set panZoom(r){B(this.#t,r)}#a=ue(e.width??0);get width(){return d(this.#a)}set width(r){B(this.#a,r)}#r=ue(e.height??0);get height(){return d(this.#r)}set height(r){B(this.#r,r)}#i=ue(e.props.zIndexMode??"basic");get zIndexMode(){return d(this.#i)}set zIndexMode(r){B(this.#i,r)}#o=w(()=>{const{nodesInitialized:r}=gp(e.nodes,this.nodeLookup,this.parentLookup,{nodeExtent:this.nodeExtent,nodeOrigin:this.nodeOrigin,elevateNodesOnSelect:e.props.elevateNodesOnSelect??!0,checkEquality:!0,zIndexMode:this.zIndexMode});return this.fitViewQueued&&r&&(this.fitViewOptions?.duration?this.resolveFitView():queueMicrotask(()=>{this.resolveFitView()})),r});get nodesInitialized(){return d(this.#o)}set nodesInitialized(r){B(this.#o,r)}#l=w(()=>this.panZoom!==null);get viewportInitialized(){return d(this.#l)}set viewportInitialized(r){B(this.#l,r)}#s=w(()=>(wp(this.connectionLookup,this.edgeLookup,e.edges),e.edges));get _edges(){return d(this.#s)}set _edges(r){B(this.#s,r)}get nodes(){return this.nodesInitialized,e.nodes}set nodes(r){e.nodes=r}get edges(){return this._edges}set edges(r){e.edges=r}_prevSelectedNodes=[];_prevSelectedNodeIds=new Set;#g=w(()=>{const r=this._prevSelectedNodeIds.size,o=new Set,i=this.nodes.filter(s=>(s.selected&&(o.add(s.id),this._prevSelectedNodeIds.delete(s.id)),s.selected));return(r!==o.size||this._prevSelectedNodeIds.size>0)&&(this._prevSelectedNodes=i),this._prevSelectedNodeIds=o,this._prevSelectedNodes});get selectedNodes(){return d(this.#g)}set selectedNodes(r){B(this.#g,r)}_prevSelectedEdges=[];_prevSelectedEdgeIds=new Set;#c=w(()=>{const r=this._prevSelectedEdgeIds.size,o=new Set,i=this.edges.filter(s=>(s.selected&&(o.add(s.id),this._prevSelectedEdgeIds.delete(s.id)),s.selected));return(r!==o.size||this._prevSelectedEdgeIds.size>0)&&(this._prevSelectedEdges=i),this._prevSelectedEdgeIds=o,this._prevSelectedEdges});get selectedEdges(){return d(this.#c)}set selectedEdges(r){B(this.#c,r)}selectionChangeHandlers=new Map;nodeLookup=new Map;parentLookup=new Map;connectionLookup=new Map;edgeLookup=new Map;_prevVisibleEdges=new Map;#u=w(()=>{const{nodes:r,_edges:o,_prevVisibleEdges:i,nodeLookup:s,connectionMode:a,onerror:l,onlyRenderVisibleElements:c,defaultEdgeOptions:u,zIndexMode:h}=this;let f,g;const v={edges:o,defaultEdgeOptions:u,previousEdges:i,nodeLookup:s,connectionMode:a,elevateEdgesOnSelect:e.props.elevateEdgesOnSelect??!0,zIndexMode:h,onerror:l};if(c){const{viewport:m,width:b,height:x}=this,P=[m.x,m.y,m.zoom];f=dm(s,P,b,x),g=ac({...v,onlyRenderVisible:!0,visibleNodes:f,transform:P,width:b,height:x})}else f=this.nodeLookup,g=ac(v);return this._prevVisibleEdges=g,{nodes:f,edges:g}});get visible(){return d(this.#u)}set visible(r){B(this.#u,r)}#f=w(()=>e.props.nodesDraggable??!0);get nodesDraggable(){return d(this.#f)}set nodesDraggable(r){B(this.#f,r)}#p=w(()=>e.props.nodesConnectable??!0);get nodesConnectable(){return d(this.#p)}set nodesConnectable(r){B(this.#p,r)}#d=w(()=>e.props.elementsSelectable??!0);get elementsSelectable(){return d(this.#d)}set elementsSelectable(r){B(this.#d,r)}#y=w(()=>e.props.nodesFocusable??!0);get nodesFocusable(){return d(this.#y)}set nodesFocusable(r){B(this.#y,r)}#m=w(()=>e.props.edgesFocusable??!0);get edgesFocusable(){return d(this.#m)}set edgesFocusable(r){B(this.#m,r)}#_=w(()=>e.props.disableKeyboardA11y??!1);get disableKeyboardA11y(){return d(this.#_)}set disableKeyboardA11y(r){B(this.#_,r)}#x=w(()=>e.props.minZoom??.5);get minZoom(){return d(this.#x)}set minZoom(r){B(this.#x,r)}#b=w(()=>e.props.maxZoom??2);get maxZoom(){return d(this.#b)}set maxZoom(r){B(this.#b,r)}#h=w(()=>e.props.nodeOrigin??[0,0]);get nodeOrigin(){return d(this.#h)}set nodeOrigin(r){B(this.#h,r)}#w=w(()=>e.props.nodeExtent??Vi);get nodeExtent(){return d(this.#w)}set nodeExtent(r){B(this.#w,r)}#v=w(()=>e.props.translateExtent??Vi);get translateExtent(){return d(this.#v)}set translateExtent(r){B(this.#v,r)}#k=w(()=>e.props.defaultEdgeOptions??{});get defaultEdgeOptions(){return d(this.#k)}set defaultEdgeOptions(r){B(this.#k,r)}#S=w(()=>e.props.nodeDragThreshold??1);get nodeDragThreshold(){return d(this.#S)}set nodeDragThreshold(r){B(this.#S,r)}#E=w(()=>e.props.autoPanOnNodeDrag??!0);get autoPanOnNodeDrag(){return d(this.#E)}set autoPanOnNodeDrag(r){B(this.#E,r)}#T=w(()=>e.props.autoPanOnConnect??!0);get autoPanOnConnect(){return d(this.#T)}set autoPanOnConnect(r){B(this.#T,r)}#C=w(()=>e.props.autoPanOnNodeFocus??!0);get autoPanOnNodeFocus(){return d(this.#C)}set autoPanOnNodeFocus(r){B(this.#C,r)}#A=w(()=>e.props.autoPanSpeed??15);get autoPanSpeed(){return d(this.#A)}set autoPanSpeed(r){B(this.#A,r)}#M=w(()=>e.props.connectionDragThreshold??1);get connectionDragThreshold(){return d(this.#M)}set connectionDragThreshold(r){B(this.#M,r)}fitViewQueued=e.props.fitView??!1;fitViewOptions=e.props.fitViewOptions;fitViewResolver=null;#P=w(()=>e.props.snapGrid??null);get snapGrid(){return d(this.#P)}set snapGrid(r){B(this.#P,r)}#N=ue(!1);get dragging(){return d(this.#N)}set dragging(r){B(this.#N,r)}#I=ue(null);get selectionRect(){return d(this.#I)}set selectionRect(r){B(this.#I,r)}#z=ue(!1);get selectionKeyPressed(){return d(this.#z)}set selectionKeyPressed(r){B(this.#z,r)}#O=ue(!1);get multiselectionKeyPressed(){return d(this.#O)}set multiselectionKeyPressed(r){B(this.#O,r)}#D=ue(!1);get deleteKeyPressed(){return d(this.#D)}set deleteKeyPressed(r){B(this.#D,r)}#R=ue(!1);get panActivationKeyPressed(){return d(this.#R)}set panActivationKeyPressed(r){B(this.#R,r)}#H=ue(!1);get zoomActivationKeyPressed(){return d(this.#H)}set zoomActivationKeyPressed(r){B(this.#H,r)}#B=ue(null);get selectionRectMode(){return d(this.#B)}set selectionRectMode(r){B(this.#B,r)}#L=ue("");get ariaLiveMessage(){return d(this.#L)}set ariaLiveMessage(r){B(this.#L,r)}#q=w(()=>e.props.selectionMode??wo.Partial);get selectionMode(){return d(this.#q)}set selectionMode(r){B(this.#q,r)}#V=w(()=>({...lc,...e.props.nodeTypes}));get nodeTypes(){return d(this.#V)}set nodeTypes(r){B(this.#V,r)}#W=w(()=>({...cc,...e.props.edgeTypes}));get edgeTypes(){return d(this.#W)}set edgeTypes(r){B(this.#W,r)}#F=w(()=>e.props.noPanClass??"nopan");get noPanClass(){return d(this.#F)}set noPanClass(r){B(this.#F,r)}#K=w(()=>e.props.noDragClass??"nodrag");get noDragClass(){return d(this.#K)}set noDragClass(r){B(this.#K,r)}#Y=w(()=>e.props.noWheelClass??"nowheel");get noWheelClass(){return d(this.#Y)}set noWheelClass(r){B(this.#Y,r)}#Z=w(()=>jv(e.props.ariaLabelConfig));get ariaLabelConfig(){return d(this.#Z)}set ariaLabelConfig(r){B(this.#Z,r)}#X=ue(hm(this.nodesInitialized,e.props.fitView,e.props.initialViewport,this.width,this.height,this.nodeLookup));get _viewport(){return d(this.#X)}set _viewport(r){B(this.#X,r)}get viewport(){return e.viewport??this._viewport}set viewport(r){e.viewport&&(e.viewport=r),this._viewport=r}#G=ue(Wi);get _connection(){return d(this.#G)}set _connection(r){B(this.#G,r)}#j=w(()=>this._connection.inProgress?{...this._connection,to:Ar(this._connection.to,[this.viewport.x,this.viewport.y,this.viewport.zoom])}:this._connection);get connection(){return d(this.#j)}set connection(r){B(this.#j,r)}#U=w(()=>e.props.connectionMode??Vn.Strict);get connectionMode(){return d(this.#U)}set connectionMode(r){B(this.#U,r)}#Q=w(()=>e.props.connectionRadius??20);get connectionRadius(){return d(this.#Q)}set connectionRadius(r){B(this.#Q,r)}#J=w(()=>e.props.isValidConnection??(()=>!0));get isValidConnection(){return d(this.#J)}set isValidConnection(r){B(this.#J,r)}#$=w(()=>e.props.selectNodesOnDrag??!0);get selectNodesOnDrag(){return d(this.#$)}set selectNodesOnDrag(r){B(this.#$,r)}#ee=w(()=>e.props.defaultMarkerColor===void 0?"#b1b1b7":e.props.defaultMarkerColor);get defaultMarkerColor(){return d(this.#ee)}set defaultMarkerColor(r){B(this.#ee,r)}#te=w(()=>cp(e.edges,{defaultColor:this.defaultMarkerColor,id:this.flowId,defaultMarkerStart:this.defaultEdgeOptions.markerStart,defaultMarkerEnd:this.defaultEdgeOptions.markerEnd}));get markers(){return d(this.#te)}set markers(r){B(this.#te,r)}#ne=w(()=>e.props.onlyRenderVisibleElements??!1);get onlyRenderVisibleElements(){return d(this.#ne)}set onlyRenderVisibleElements(r){B(this.#ne,r)}#re=w(()=>e.props.onflowerror??fm);get onerror(){return d(this.#re)}set onerror(r){B(this.#re,r)}#oe=w(()=>e.props.ondelete);get ondelete(){return d(this.#oe)}set ondelete(r){B(this.#oe,r)}#ie=w(()=>e.props.onbeforedelete);get onbeforedelete(){return d(this.#ie)}set onbeforedelete(r){B(this.#ie,r)}#se=w(()=>e.props.onbeforeconnect);get onbeforeconnect(){return d(this.#se)}set onbeforeconnect(r){B(this.#se,r)}#ae=w(()=>e.props.onconnect);get onconnect(){return d(this.#ae)}set onconnect(r){B(this.#ae,r)}#le=w(()=>e.props.onconnectstart);get onconnectstart(){return d(this.#le)}set onconnectstart(r){B(this.#le,r)}#ce=w(()=>e.props.onconnectend);get onconnectend(){return d(this.#ce)}set onconnectend(r){B(this.#ce,r)}#ue=w(()=>e.props.onbeforereconnect);get onbeforereconnect(){return d(this.#ue)}set onbeforereconnect(r){B(this.#ue,r)}#de=w(()=>e.props.onreconnect);get onreconnect(){return d(this.#de)}set onreconnect(r){B(this.#de,r)}#fe=w(()=>e.props.onreconnectstart);get onreconnectstart(){return d(this.#fe)}set onreconnectstart(r){B(this.#fe,r)}#he=w(()=>e.props.onreconnectend);get onreconnectend(){return d(this.#he)}set onreconnectend(r){B(this.#he,r)}#ge=w(()=>e.props.clickConnect??!0);get clickConnect(){return d(this.#ge)}set clickConnect(r){B(this.#ge,r)}#ve=w(()=>e.props.onclickconnectstart);get onclickconnectstart(){return d(this.#ve)}set onclickconnectstart(r){B(this.#ve,r)}#pe=w(()=>e.props.onclickconnectend);get onclickconnectend(){return d(this.#pe)}set onclickconnectend(r){B(this.#pe,r)}#me=ue(null);get clickConnectStartHandle(){return d(this.#me)}set clickConnectStartHandle(r){B(this.#me,r)}#ye=w(()=>e.props.onselectiondrag);get onselectiondrag(){return d(this.#ye)}set onselectiondrag(r){B(this.#ye,r)}#be=w(()=>e.props.onselectiondragstart);get onselectiondragstart(){return d(this.#be)}set onselectiondragstart(r){B(this.#be,r)}#we=w(()=>e.props.onselectiondragstop);get onselectiondragstop(){return d(this.#we)}set onselectiondragstop(r){B(this.#we,r)}resolveFitView=async()=>{this.panZoom&&(await Wv({nodes:this.nodeLookup,width:this.width,height:this.height,panZoom:this.panZoom,minZoom:this.minZoom,maxZoom:this.maxZoom},this.fitViewOptions),this.fitViewResolver?.resolve(!0),this.fitViewQueued=!1,this.fitViewOptions=void 0,this.fitViewResolver=null)};_prefersDark=new Jd("(prefers-color-scheme: dark)",e.props.colorModeSSR==="dark");#_e=w(()=>e.props.colorMode==="system"?this._prefersDark.current?"dark":"light":e.props.colorMode??"light");get colorMode(){return d(this.#_e)}set colorMode(r){B(this.#_e,r)}constructor(){}resetStoreValues(){this.dragging=!1,this.selectionRect=null,this.selectionRectMode=null,this.selectionKeyPressed=!1,this.multiselectionKeyPressed=!1,this.deleteKeyPressed=!1,this.panActivationKeyPressed=!1,this.zoomActivationKeyPressed=!1,this._connection=Wi,this.clickConnectStartHandle=null,this.viewport=e.props.initialViewport??{x:0,y:0,zoom:1},this.ariaLiveMessage=""}}return new t}const vm=yn.error001("svelte");function _n(){const e=Ko(ss);if(!e)throw new Error(vm);return e.getStore()}const ss=Symbol();function pm(e){const t=gm(e);function n(I){t.nodeTypes={...lc,...I}}function r(I){t.edgeTypes={...cc,...I}}function o(I){t.edges=Bp(I,t.edges,{onError:t.onerror})}const i=(I,T=!1)=>{t.nodes=t.nodes.map(A=>{if(t.connection.inProgress&&t.connection.fromNode.id===A.id){const E=t.nodeLookup.get(A.id);E&&(t.connection={...t.connection,from:wn(E,t.connection.fromHandle,ee.Left,!0)})}const y=I.get(A.id);return y?{...A,position:y.position,dragging:T}:A})};function s(I){const{changes:T,updatedInternals:A}=yp(I,t.nodeLookup,t.parentLookup,t.domNode,t.nodeOrigin,t.nodeExtent,t.zIndexMode);if(!A)return;fp(t.nodeLookup,t.parentLookup,{nodeOrigin:t.nodeOrigin,nodeExtent:t.nodeExtent,zIndexMode:t.zIndexMode}),t.fitViewQueued&&t.resolveFitView();const y=new Map;for(const E of T){const M=t.nodeLookup.get(E.id)?.internals.userNode;if(!M)continue;const k={...M};switch(E.type){case"dimensions":{const z={...k.measured,...E.dimensions};E.setAttributes&&(k.width=E.dimensions?.width??k.width,k.height=E.dimensions?.height??k.height),k.measured=z;break}case"position":k.position=E.position??k.position;break}y.set(E.id,k)}t.nodes=t.nodes.map(E=>y.get(E.id)??E)}function a(I){const T=t.fitViewResolver??Promise.withResolvers();return t.fitViewQueued=!0,t.fitViewOptions=I,t.fitViewResolver=T,t.nodes=[...t.nodes],T.promise}async function l(I,T,A){const y=typeof A?.zoom<"u"?A.zoom:t.maxZoom,E=t.panZoom;return E?(await E.setViewport({x:t.width/2-I*y,y:t.height/2-T*y,zoom:y},{duration:A?.duration,ease:A?.ease,interpolate:A?.interpolate}),!0):!1}async function c(I,T){const A=t.panZoom;return A?A.scaleBy(I,T):!1}async function u(I){return c(1.2,I)}function h(I){return c(1/1.2,I)}function f(I){const T=t.panZoom;T&&(T.setScaleExtent([I,t.maxZoom]),t.minZoom=I)}function g(I){const T=t.panZoom;T&&(T.setScaleExtent([t.minZoom,I]),t.maxZoom=I)}function v(I){const T=t.panZoom;T&&(T.setTranslateExtent(I),t.translateExtent=I)}function m(I,T=null){let A=!1;const y=I.map(E=>(T?T.has(E.id):!0)&&E.selected?(A=!0,{...E,selected:!1}):E);return[A,y]}function b(I){const T=I?.nodes?new Set(I.nodes.map(z=>z.id)):null,[A,y]=m(t.nodes,T);A&&(t.nodes=y);const E=I?.edges?new Set(I.edges.map(z=>z.id)):null,[M,k]=m(t.edges,E);M&&(t.edges=k)}function x(I){const T=t.multiselectionKeyPressed;t.nodes=t.nodes.map(A=>{const y=I.includes(A.id),E=T&&A.selected||y;return!!A.selected!==E?{...A,selected:E}:A}),T||b({nodes:[]})}function P(I){const T=t.multiselectionKeyPressed;t.edges=t.edges.map(A=>{const y=I.includes(A.id),E=T&&A.selected||y;return!!A.selected!==E?{...A,selected:E}:A}),T||b({edges:[]})}function C(I,T,A){const y=t.nodeLookup.get(I);if(!y){t.onerror("012",yn.error012(I));return}t.selectionRect=null,t.selectionRectMode=null,y.selected?(T||y.selected&&t.multiselectionKeyPressed)&&(b({nodes:[y.internals.userNode],edges:[]}),requestAnimationFrame(()=>A?.blur())):x([I])}function p(I){const T=t.edgeLookup.get(I);if(!T){t.onerror("016",yn.error016(I));return}(T.selectable||t.elementsSelectable&&typeof T.selectable>"u")&&(t.selectionRect=null,t.selectionRectMode=null,T.selected?T.selected&&t.multiselectionKeyPressed&&b({nodes:[],edges:[T]}):P([I]))}function _(I,T){const{nodeExtent:A,snapGrid:y,nodeOrigin:E,nodeLookup:M,nodesDraggable:k,onerror:z}=t,O=new Map,R=y?.[0]??5,L=y?.[1]??5,H=I.x*R*T,Y=I.y*L*T;for(const K of M.values()){if(!(K.selected&&(K.draggable||k&&typeof K.draggable>"u")))continue;let j={x:K.internals.positionAbsolute.x+H,y:K.internals.positionAbsolute.y+Y};y&&(j=Cr(j,y));const{position:X,positionAbsolute:J}=Sl({nodeId:K.id,nextPosition:j,nodeLookup:M,nodeExtent:A,nodeOrigin:E,onError:z});K.position=X,K.internals.positionAbsolute=J,O.set(K.id,K)}i(O)}function S(I){return bp({delta:I,panZoom:t.panZoom,transform:[t.viewport.x,t.viewport.y,t.viewport.zoom],translateExtent:t.translateExtent,width:t.width,height:t.height})}const N=I=>{t._connection={...I}};function D(){t._connection=Wi}function V(){t.resetStoreValues(),b()}return Object.assign(t,{setNodeTypes:n,setEdgeTypes:r,addEdge:o,updateNodePositions:i,updateNodeInternals:s,zoomIn:u,zoomOut:h,fitView:a,setCenter:l,setMinZoom:f,setMaxZoom:g,setTranslateExtent:v,unselectNodesAndEdges:b,addSelectedNodes:x,addSelectedEdges:P,handleNodeSelection:C,handleEdgeSelection:p,moveSelectedNodes:_,panBy:S,updateConnection:N,cancelConnection:D,reset:V})}function mm(e,t){const{minZoom:n,maxZoom:r,initialViewport:o,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:a,translateExtent:l,setPanZoomInstance:c,onDraggingChange:u,onTransformChange:h}=t,f=Rp({domNode:e,minZoom:n,maxZoom:r,translateExtent:l,viewport:o,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:u}),g=f.getViewport();return(o.x!==g.x||o.y!==g.y||o.zoom!==g.zoom)&&h([g.x,g.y,g.zoom]),c(f),f.update(t),{update(v){f.update(v)}}}var ym=Q('<div class="svelte-flow__zoom svelte-flow__container"><!></div>');function bm(e,t){oe(t,!0);let n=F(t,"store",15),r=w(()=>n().panActivationKeyPressed||t.panOnDrag),o=w(()=>n().panActivationKeyPressed||t.panOnScroll);const{viewport:i}=n();let s=!1;ut(()=>{!s&&n().viewportInitialized&&(t.oninit?.(),s=!0)});var a=ym(),l=Z(a);Ne(l,()=>t.children),Le(a,(c,u)=>mm?.(c,u),()=>({viewport:n().viewport,minZoom:n().minZoom,maxZoom:n().maxZoom,initialViewport:i,onDraggingChange:c=>{n(n().dragging=c,!0)},setPanZoomInstance:c=>{n(n().panZoom=c,!0)},onPanZoomStart:t.onmovestart,onPanZoom:t.onmove,onPanZoomEnd:t.onmoveend,zoomOnScroll:t.zoomOnScroll,zoomOnDoubleClick:t.zoomOnDoubleClick,zoomOnPinch:t.zoomOnPinch,panOnScroll:d(o),panOnDrag:d(r),panOnScrollSpeed:t.panOnScrollSpeed,panOnScrollMode:t.panOnScrollMode,panActivationKeyPressed:n().panActivationKeyPressed,zoomActivationKeyPressed:n().zoomActivationKeyPressed,preventScrolling:typeof t.preventScrolling=="boolean"?t.preventScrolling:!0,noPanClassName:n().noPanClass,noWheelClassName:n().noWheelClass,userSelectionActive:!!n().selectionRect,translateExtent:n().translateExtent,lib:"svelte",paneClickDistance:t.paneClickDistance,selectionOnDrag:t.selectionOnDrag,onTransformChange:c=>{n(n().viewport={x:c[0],y:c[1],zoom:c[2]},!0)},connectionInProgress:n().connection.inProgress})),q(e,a),ie()}function uc(e,t){return n=>{n.target===t&&e?.(n)}}function dc(e){return t=>{const n=e.has(t.id);return!!t.selected!==n?{...t,selected:n}:t}}function fc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}var wm=Q("<div><!></div>");function _m(e,t){oe(t,!0);let n=F(t,"store",15),r=F(t,"panOnDrag",3,!0),o=F(t,"paneClickDistance",3,1),i=F(t,"autoPanOnSelection",3,!0),s,a=null,l=!1,c=new Set,u=new Set,h=w(()=>n().panActivationKeyPressed||r()),f=w(()=>n().selectionKeyPressed||!!n().selectionRect||t.selectionOnDrag&&d(h)!==!0),g=w(()=>n().elementsSelectable&&(d(f)||n().selectionRectMode==="user")),v=!1,m=0,b={x:0,y:0},x=!1;function P(k){if(k.pointerType==="touch"&&d(h)!==!1&&!n().selectionKeyPressed||(a=s?.getBoundingClientRect(),!a))return;const z=k.target===s,O=!z&&!!k.target.closest(".nokey"),R=t.selectionOnDrag&&z||n().selectionKeyPressed;if(O||!d(f)||!R||k.button!==0||!k.isPrimary)return;k.target?.setPointerCapture?.(k.pointerId),v=!1,x=!1;const{x:L,y:H}=yt(k,a),Y=Ar({x:L,y:H},[n().viewport.x,n().viewport.y,n().viewport.zoom]);n(n().selectionRect={width:0,height:0,startX:Y.x,startY:Y.y,x:L,y:H},!0),z||(k.stopPropagation(),k.preventDefault())}function C(k,z){if(n().selectionRect?.startX===void 0||n().selectionRect.startY===void 0)return;const O={x:n().selectionRect?.startX,y:n().selectionRect?.startY},R=Kn(O,[n().viewport.x,n().viewport.y,n().viewport.zoom]),L={startX:O.x,startY:O.y,x:k<R.x?k:R.x,y:z<R.y?z:R.y,width:Math.abs(k-R.x),height:Math.abs(z-R.y)},H=c,Y=u;c=new Set(Ki(n().nodeLookup,L,[n().viewport.x,n().viewport.y,n().viewport.zoom],n().selectionMode===wo.Partial,!0).map(U=>U.id));const K=n().defaultEdgeOptions.selectable??!0;u=new Set;for(const U of c){const j=n().connectionLookup.get(U);if(j)for(const{edgeId:X}of j.values()){const J=n().edgeLookup.get(X);J&&(J.selectable??K)&&u.add(X)}}fc(H,c)||n(n().nodes=n().nodes.map(dc(c)),!0),fc(Y,u)||n(n().edges=n().edges.map(dc(u)),!0),n(n().selectionRectMode="user",!0),n(n().selectionRect=L,!0)}function p(){if(!i()||!a)return;const[k,z]=Yi(b,a,n().autoPanSpeed);n().panBy({x:k,y:z}).then(O=>{if(!v||!O){m=requestAnimationFrame(p);return}C(b.x,b.y),m=requestAnimationFrame(p)})}function _(){cancelAnimationFrame(m),m=0,x=!1}Gr(()=>{typeof window<"u"&&_()});function S(k){if(!d(f)||!a||!n().selectionRect)return;const z=yt(k,a);b={x:z.x,y:z.y};const O={x:n().selectionRect.startX,y:n().selectionRect.startY},R=Kn(O,[n().viewport.x,n().viewport.y,n().viewport.zoom]);if(!v){const L=n().selectionKeyPressed?0:o();if(Math.hypot(z.x-R.x,z.y-R.y)<=L)return;n().unselectNodesAndEdges(),t.onselectionstart?.(k)}v=!0,x||(p(),x=!0),C(z.x,z.y)}function N(k){if(!d(g)){k.target===s&&n().connection.inProgress&&(l=!0);return}k.button===0&&(k.target?.releasePointerCapture?.(k.pointerId),!v&&k.target===s&&I?.(k),n(n().selectionRect=null,!0),v&&n(n().selectionRectMode=c.size>0?"nodes":null,!0),v&&t.onselectionend?.(k),_())}function D(k){k.target?.releasePointerCapture?.(k.pointerId),_()}const V=k=>{if(Array.isArray(d(h))&&d(h).includes(2)){k.preventDefault();return}t.onpanecontextmenu?.({event:k})},W=k=>{v&&(k.stopPropagation(),v=!1)};function I(k){if(v||n().connection.inProgress||l){v=!1,l=!1;return}t.onpaneclick?.({event:k}),n().unselectNodesAndEdges(),n(n().selectionRectMode=null,!0),n(n().selectionRect=null,!0)}var T=wm();let A;var y=w(()=>d(g)?void 0:uc(I,s)),E=w(()=>uc(V,s)),M=Z(T);Ne(M,()=>t.children),dr(T,k=>s=k,()=>s),$(k=>A=Ft(T,1,"svelte-flow__pane svelte-flow__container",null,A,k),[()=>({draggable:r()===!0||Array.isArray(r())&&r().includes(0),dragging:n().dragging,selection:d(f)})]),Vt("click",T,function(...k){d(y)?.apply(this,k)}),sr("pointerdown",T,function(...k){(d(g)?P:void 0)?.apply(this,k)},!0),Vt("pointermove",T,function(...k){(d(g)?S:void 0)?.apply(this,k)}),Vt("pointerup",T,N),sr("pointercancel",T,function(...k){(d(g)?D:void 0)?.apply(this,k)}),Vt("contextmenu",T,function(...k){d(E)?.apply(this,k)}),sr("click",T,function(...k){(d(g)?W:void 0)?.apply(this,k)},!0),q(e,T),ie()}Yr(["click","pointermove","pointerup","contextmenu"]);var xm=Q('<div class="svelte-flow__viewport xyflow__viewport svelte-flow__container"><!></div>');function km(e,t){oe(t,!0);var n=xm();let r;var o=Z(n);Ne(o,()=>t.children),$(()=>r=ft(n,"",r,{transform:`translate(${t.store.viewport.x??""}px, ${t.store.viewport.y??""}px) scale(${t.store.viewport.zoom??""})`})),q(e,n),ie()}function hc(e,t){const{store:n,onDrag:r,onDragStart:o,onDragStop:i,onNodeMouseDown:s}=t,a=kp({onDrag:r,onDragStart:o,onDragStop:i,onNodeMouseDown:s,getStoreItems:()=>{const{snapGrid:c,viewport:u}=n;return{nodes:n.nodes,nodeLookup:n.nodeLookup,edges:n.edges,nodeExtent:n.nodeExtent,snapGrid:c||[0,0],snapToGrid:!!c,nodeOrigin:n.nodeOrigin,multiSelectionActive:n.multiselectionKeyPressed,domNode:n.domNode,transform:[u.x,u.y,u.zoom],autoPanOnNodeDrag:n.autoPanOnNodeDrag,nodesDraggable:n.nodesDraggable,selectNodesOnDrag:n.selectNodesOnDrag,nodeDragThreshold:n.nodeDragThreshold,unselectNodesAndEdges:n.unselectNodesAndEdges,updateNodePositions:n.updateNodePositions,onSelectionDrag:n.onselectiondrag,onSelectionDragStart:n.onselectiondragstart,onSelectionDragStop:n.onselectiondragstop,panBy:n.panBy}}});function l(c,u){if(u.disabled){a.destroy();return}a.update({domNode:c,noDragClassName:u.noDragClass,handleSelector:u.handleSelector,nodeId:u.nodeId,isSelectable:u.isSelectable,nodeClickDistance:u.nodeClickDistance})}return l(e,t),{update(c){l(e,c)},destroy(){a.destroy()}}}var Sm=Q('<div aria-live="assertive" aria-atomic="true" class="a11y-live-msg svelte-i52n8g"> </div>'),Em=Q('<div class="a11y-hidden svelte-i52n8g"> </div> <div class="a11y-hidden svelte-i52n8g"> </div> <!>',1);function Tm(e,t){oe(t,!0);var n=Em(),r=de(n),o=Z(r),i=G(r,2),s=Z(i),a=G(i,2);{var l=c=>{var u=Sm(),h=Z(u);$(()=>{ne(u,"id",`${Cm}-${t.store.flowId}`),ce(h,t.store.ariaLiveMessage)}),q(c,u)};pe(a,c=>{t.store.disableKeyboardA11y||c(l)})}$(()=>{ne(r,"id",`${gc}-${t.store.flowId}`),ce(o,t.store.disableKeyboardA11y?t.store.ariaLabelConfig["node.a11yDescription.default"]:t.store.ariaLabelConfig["node.a11yDescription.keyboardDisabled"]),ne(i,"id",`${vc}-${t.store.flowId}`),ce(s,t.store.ariaLabelConfig["edge.a11yDescription.default"])}),q(e,n),ie()}const gc="svelte-flow__node-desc",vc="svelte-flow__edge-desc",Cm="svelte-flow__aria-live";var Am=Q("<div><!></div>");function Mm(e,t){oe(t,!0);let n=F(t,"store",15),r=w(()=>Ie(t.node.data,()=>({}),!0)),o=w(()=>Ie(t.node.selected,!1)),i=w(()=>t.node.draggable),s=w(()=>t.node.selectable),a=w(()=>Ie(t.node.deletable,!0)),l=w(()=>t.node.connectable),c=w(()=>t.node.focusable),u=w(()=>Ie(t.node.hidden,!1)),h=w(()=>Ie(t.node.dragging,!1)),f=w(()=>Ie(t.node.style,"")),g=w(()=>t.node.class),v=w(()=>Ie(t.node.type,"default")),m=w(()=>t.node.parentId),b=w(()=>t.node.sourcePosition),x=w(()=>t.node.targetPosition),P=w(()=>Ie(t.node.measured,()=>({width:0,height:0}),!0).width),C=w(()=>Ie(t.node.measured,()=>({width:0,height:0}),!0).height),p=w(()=>t.node.initialWidth),_=w(()=>t.node.initialHeight),S=w(()=>t.node.width),N=w(()=>t.node.height),D=w(()=>t.node.dragHandle),V=w(()=>Ie(t.node.internals.z,0)),W=w(()=>t.node.internals.positionAbsolute.x),I=w(()=>t.node.internals.positionAbsolute.y),T=w(()=>t.node.internals.userNode),{id:A}=t.node,y=w(()=>d(i)??n().nodesDraggable),E=w(()=>d(s)??n().elementsSelectable),M=w(()=>d(l)??n().nodesConnectable),k=w(()=>Xv(t.node)),z=w(()=>!!t.node.internals.handleBounds),O=w(()=>d(k)&&d(z)),R=w(()=>d(c)??n().nodesFocusable);function L(te){return n().parentLookup.has(te)}let H=w(()=>L(A)),Y=ue(null),K=null,U=d(v),j=d(b),X=d(x),J=w(()=>n().nodeTypes[d(v)]??oc),me=w(()=>n().ariaLabelConfig),le={get value(){return d(M)}};qp(A),Wp(le);let re=w(()=>{const te=d(P)===void 0?d(S)??d(p):d(S),ye=d(C)===void 0?d(N)??d(_):d(N);if(!(te===void 0&&ye===void 0&&d(f)===void 0))return`${d(f)};${te?`width:${Mt(te)};`:""}${ye?`height:${Mt(ye)};`:""}`});ut(()=>{(d(v)!==U||d(b)!==j||d(x)!==X)&&d(Y)!==null&&requestAnimationFrame(()=>{d(Y)!==null&&n().updateNodeInternals(new Map([[A,{id:A,nodeElement:d(Y),force:!0}]]))}),U=d(v),j=d(b),X=d(x)}),ut(()=>{t.resizeObserver&&(!d(O)||d(Y)!==K)&&(K&&t.resizeObserver.unobserve(K),d(Y)&&t.resizeObserver.observe(d(Y)),K=d(Y))}),Gr(()=>{K&&t.resizeObserver?.unobserve(K)});function _e(te){d(E)&&(!n().selectNodesOnDrag||!d(y)||n().nodeDragThreshold>0)&&n().handleNodeSelection(A),t.onnodeclick?.({node:d(T),event:te})}function ge(te){if(!(zl(te)||n().disableKeyboardA11y))if(_l.includes(te.key)&&d(E)){const ye=te.key==="Escape";n().handleNodeSelection(A,ye,d(Y))}else d(y)&&t.node.selected&&Object.prototype.hasOwnProperty.call(Mo,te.key)&&(te.preventDefault(),n(n().ariaLiveMessage=d(me)["node.a11yDescription.ariaLiveMessage"]({direction:te.key.replace("Arrow","").toLowerCase(),x:~~t.node.internals.positionAbsolute.x,y:~~t.node.internals.positionAbsolute.y}),!0),n().moveSelectedNodes(Mo[te.key],te.shiftKey?4:1))}const Se=()=>{if(n().disableKeyboardA11y||!n().autoPanOnNodeFocus||!d(Y)?.matches(":focus-visible"))return;const{width:te,height:ye,viewport:Fe}=n();Ki(new Map([[A,t.node]]),{x:0,y:0,width:te,height:ye},[Fe.x,Fe.y,Fe.zoom],!0).length>0||n().setCenter(t.node.position.x+(t.node.measured.width??0)/2,t.node.position.y+(t.node.measured.height??0)/2,{zoom:Fe.zoom})};var We=Be(),Qe=de(We);{var Ce=te=>{var ye=Am();rt(ye,()=>({"data-id":A,class:["svelte-flow__node",`svelte-flow__node-${d(v)}`,d(g)],style:d(re),onclick:_e,onpointerenter:t.onnodepointerenter?be=>t.onnodepointerenter({node:d(T),event:be}):void 0,onpointerleave:t.onnodepointerleave?be=>t.onnodepointerleave({node:d(T),event:be}):void 0,onpointermove:t.onnodepointermove?be=>t.onnodepointermove({node:d(T),event:be}):void 0,oncontextmenu:t.onnodecontextmenu?be=>t.onnodecontextmenu({node:d(T),event:be}):void 0,onkeydown:d(R)?ge:void 0,onfocus:d(R)?Se:void 0,tabIndex:d(R)?0:void 0,role:t.node.ariaRole??(d(R)?"group":void 0),"aria-label":t.node.ariaLabel,"aria-roledescription":"node","aria-describedby":n().disableKeyboardA11y?void 0:`${gc}-${n().flowId}`,...t.node.domAttributes,[nn]:{dragging:d(h),selected:d(o),draggable:d(y),connectable:d(M),selectable:d(E),nopan:d(y),parent:d(H)},[Kt]:{"z-index":d(V),transform:`translate(${d(W)??""}px, ${d(I)??""}px)`,visibility:d(k)?"visible":"hidden"}}));var Fe=Z(ye);hi(Fe,()=>d(J),(be,ot)=>{ot(be,{get data(){return d(r)},get id(){return A},get selected(){return d(o)},get selectable(){return d(E)},get deletable(){return d(a)},get sourcePosition(){return d(b)},get targetPosition(){return d(x)},get zIndex(){return d(V)},get dragging(){return d(h)},get draggable(){return d(y)},get dragHandle(){return d(D)},get parentId(){return d(m)},get type(){return d(v)},get isConnectable(){return d(M)},get positionAbsoluteX(){return d(W)},get positionAbsoluteY(){return d(I)},get width(){return d(S)},get height(){return d(N)}})}),Le(ye,(be,ot)=>hc?.(be,ot),()=>({nodeId:A,isSelectable:d(E),disabled:!d(y),handleSelector:d(D),noDragClass:n().noDragClass,nodeClickDistance:t.nodeClickDistance,onNodeMouseDown:n().handleNodeSelection,onDrag:(be,ot,Ke,it)=>{t.onnodedrag?.({event:be,targetNode:Ke,nodes:it})},onDragStart:(be,ot,Ke,it)=>{t.onnodedragstart?.({event:be,targetNode:Ke,nodes:it})},onDragStop:(be,ot,Ke,it)=>{t.onnodedragstop?.({event:be,targetNode:Ke,nodes:it})},store:n()})),dr(ye,be=>B(Y,be),()=>d(Y)),q(te,ye)};pe(Qe,te=>{d(u)||te(Ce)})}q(e,We),ie()}var Pm=Q('<div class="svelte-flow__nodes"></div>');function Nm(e,t){oe(t,!0);let n=F(t,"store",15);const r=typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(a=>{const l=a.target.getAttribute("data-id");s.set(l,{id:l,nodeElement:a.target,force:!0})}),n().updateNodeInternals(s)});Gr(()=>{r?.disconnect()});var o=Pm();en(o,21,()=>n().visible.nodes.values(),i=>i.id,(i,s)=>{Mm(i,{get node(){return d(s)},get resizeObserver(){return r},get nodeClickDistance(){return t.nodeClickDistance},get onnodeclick(){return t.onnodeclick},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get onnodecontextmenu(){return t.onnodecontextmenu},get store(){return n()},set store(a){n(a)}})}),q(e,o),ie()}var Im=Pe('<svg class="svelte-flow__edge-wrapper"><g><!></g></svg>');function zm(e,t){oe(t,!0);let n=w(()=>t.edge.id),r=w(()=>t.edge.source),o=w(()=>t.edge.target),i=w(()=>t.edge.sourceX),s=w(()=>t.edge.sourceY),a=w(()=>t.edge.targetX),l=w(()=>t.edge.targetY),c=w(()=>t.edge.sourcePosition),u=w(()=>t.edge.targetPosition),h=w(()=>Ie(t.edge.animated,!1)),f=w(()=>Ie(t.edge.selected,!1)),g=w(()=>t.edge.label),v=w(()=>t.edge.labelStyle),m=w(()=>Ie(t.edge.data,()=>({}),!0)),b=w(()=>t.edge.style),x=w(()=>t.edge.interactionWidth),P=w(()=>Ie(t.edge.type,"default")),C=w(()=>t.edge.sourceHandle),p=w(()=>t.edge.targetHandle),_=w(()=>t.edge.markerStart),S=w(()=>t.edge.markerEnd),N=w(()=>t.edge.selectable),D=w(()=>t.edge.focusable),V=w(()=>Ie(t.edge.deletable,!0)),W=w(()=>t.edge.hidden),I=w(()=>t.edge.zIndex),T=w(()=>t.edge.class),A=w(()=>t.edge.ariaLabel);Kp(d(n));let y=null,E=w(()=>d(N)??t.store.elementsSelectable),M=w(()=>d(D)??t.store.edgesFocusable),k=w(()=>t.store.edgeTypes[d(P)]??sc),z=w(()=>d(_)?`url('#${Ui(d(_),t.store.flowId)}')`:void 0),O=w(()=>d(S)?`url('#${Ui(d(S),t.store.flowId)}')`:void 0);function R(j){const X=t.store.edgeLookup.get(d(n));X&&(d(E)&&t.store.handleEdgeSelection(d(n)),t.onedgeclick?.({event:j,edge:X}))}function L(j,X){const J=t.store.edgeLookup.get(d(n));J&&X({event:j,edge:J})}function H(j){if(!t.store.disableKeyboardA11y&&_l.includes(j.key)&&d(E)){const{unselectNodesAndEdges:X,addSelectedEdges:J}=t.store;j.key==="Escape"?(y?.blur(),X({edges:[t.edge]})):J([d(n)])}}var Y=Be(),K=de(Y);{var U=j=>{var X=Im();let J;var me=Z(X);rt(me,()=>({class:["svelte-flow__edge",d(T)],"data-id":d(n),onclick:R,oncontextmenu:t.onedgecontextmenu?re=>{L(re,t.onedgecontextmenu)}:void 0,onpointerenter:t.onedgepointerenter?re=>{L(re,t.onedgepointerenter)}:void 0,onpointerleave:t.onedgepointerleave?re=>{L(re,t.onedgepointerleave)}:void 0,"aria-label":d(A)===null?void 0:d(A)?d(A):`Edge from ${d(r)} to ${d(o)}`,"aria-describedby":d(M)?`${vc}-${t.store.flowId}`:void 0,role:t.edge.ariaRole??(d(M)?"group":"img"),"aria-roledescription":"edge",onkeydown:d(M)?H:void 0,tabindex:d(M)?0:void 0,...t.edge.domAttributes,[nn]:{animated:d(h),selected:d(f),selectable:d(E)}}));var le=Z(me);hi(le,()=>d(k),(re,_e)=>{_e(re,{get id(){return d(n)},get source(){return d(r)},get target(){return d(o)},get sourceX(){return d(i)},get sourceY(){return d(s)},get targetX(){return d(a)},get targetY(){return d(l)},get sourcePosition(){return d(c)},get targetPosition(){return d(u)},get animated(){return d(h)},get selected(){return d(f)},get label(){return d(g)},get labelStyle(){return d(v)},get data(){return d(m)},get style(){return d(b)},get interactionWidth(){return d(x)},get selectable(){return d(E)},get deletable(){return d(V)},get type(){return d(P)},get sourceHandleId(){return d(C)},get targetHandleId(){return d(p)},get markerStart(){return d(z)},get markerEnd(){return d(O)}})}),dr(me,re=>y=re,()=>y),$(()=>J=ft(X,"",J,{"z-index":d(I)})),q(j,X)};pe(K,j=>{d(W)||j(U)})}q(e,Y),ie()}lu();var Om=Pe("<defs></defs>");function Dm(e,t){oe(t,!1);const n=_n();fd();var r=Om();en(r,5,()=>n.markers,o=>o.id,(o,i)=>{Lm(o,zn(()=>d(i)))}),q(e,r),ie()}var Rm=Pe('<polyline class="arrow" fill="none" stroke-linecap="round" stroke-linejoin="round" points="-5,-4 0,0 -5,4"></polyline>'),Hm=Pe('<polyline class="arrowclosed" stroke-linecap="round" stroke-linejoin="round" points="-5,-4 0,0 -5,4 -5,-4"></polyline>'),Bm=Pe('<marker class="svelte-flow__arrowhead" viewBox="-10 -10 20 20" refX="0" refY="0"><!></marker>');function Lm(e,t){oe(t,!0);let n=F(t,"width",3,12.5),r=F(t,"height",3,12.5),o=F(t,"markerUnits",3,"strokeWidth"),i=F(t,"orient",3,"auto-start-reverse"),s=F(t,"color",3,"none");var a=Bm(),l=Z(a);{var c=h=>{var f=Rm();let g;$(()=>{ne(f,"stroke-width",t.strokeWidth),g=ft(f,"",g,{stroke:s()})}),q(h,f)},u=h=>{var f=Hm();let g;$(()=>{ne(f,"stroke-width",t.strokeWidth),g=ft(f,"",g,{stroke:s(),fill:s()})}),q(h,f)};pe(l,h=>{t.type===Sr.Arrow?h(c):t.type===Sr.ArrowClosed&&h(u,1)})}$(()=>{ne(a,"id",t.id),ne(a,"markerWidth",`${n()}`),ne(a,"markerHeight",`${r()}`),ne(a,"markerUnits",o()),ne(a,"orient",i())}),q(e,a),ie()}var qm=Q('<div class="svelte-flow__edges"><svg class="svelte-flow__marker"><!></svg> <!></div>');function Vm(e,t){oe(t,!0);let n=F(t,"store",15);var r=qm(),o=Z(r),i=Z(o);Dm(i,{});var s=G(o,2);en(s,17,()=>n().visible.edges.values(),a=>a.id,(a,l)=>{zm(a,{get edge(){return d(l)},get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return n()},set store(c){n(c)}})}),q(e,r),ie()}var Wm=Q('<div class="svelte-flow__selection svelte-vt0ypg"></div>');function pc(e,t){oe(t,!0);let n=F(t,"x",3,0),r=F(t,"y",3,0),o=F(t,"width",3,0),i=F(t,"height",3,0),s=F(t,"isVisible",3,!0);var a=Be(),l=de(a);{var c=u=>{var h=Wm();let f;$(g=>f=ft(h,"",f,g),[()=>({width:typeof o()=="string"?o():Mt(o()),height:typeof i()=="string"?i():Mt(i()),transform:`translate(${n()}px, ${r()}px)`})]),q(u,h)};pe(l,u=>{s()&&u(c)})}q(e,a),ie()}var Fm=Q("<div><!></div>");function Km(e,t){oe(t,!0);let n=ue(void 0);ut(()=>{t.store.disableKeyboardA11y||d(n)?.focus({preventScroll:!0})});let r=w(()=>{if(t.store.selectionRectMode==="nodes"){t.store.nodes;const h=_o(t.store.nodeLookup,{filter:f=>!!f.selected});if(h.width>0&&h.height>0)return h}return null});function o(h){const f=t.store.nodes.filter(g=>g.selected);t.onselectioncontextmenu?.({nodes:f,event:h})}function i(h){const f=t.store.nodes.filter(g=>g.selected);t.onselectionclick?.({nodes:f,event:h})}function s(h){Object.prototype.hasOwnProperty.call(Mo,h.key)&&(h.preventDefault(),t.store.moveSelectedNodes(Mo[h.key],h.shiftKey?4:1))}var a=Be(),l=de(a);{var c=h=>{var f=Fm();let g;var v=Z(f);pc(v,{width:"100%",height:"100%",x:0,y:0}),Le(f,(m,b)=>hc?.(m,b),()=>({disabled:!1,store:t.store,onDrag:(m,b,x,P)=>{t.onnodedrag?.({event:m,targetNode:null,nodes:P})},onDragStart:(m,b,x,P)=>{t.onnodedragstart?.({event:m,targetNode:null,nodes:P})},onDragStop:(m,b,x,P)=>{t.onnodedragstop?.({event:m,targetNode:null,nodes:P})}})),dr(f,m=>B(n,m),()=>d(n)),$(m=>{Ft(f,1,hn(["svelte-flow__selection-wrapper",t.store.noPanClass]),"svelte-1n4hcy8"),ne(f,"role",t.store.disableKeyboardA11y?void 0:"button"),ne(f,"tabindex",t.store.disableKeyboardA11y?void 0:-1),g=ft(f,"",g,m)},[()=>({width:Mt(d(r).width),height:Mt(d(r).height),transform:`translate(${d(r).x??""}px, ${d(r).y??""}px)`})]),Vt("contextmenu",f,o),Vt("click",f,i),Vt("keydown",f,function(...m){(t.store.disableKeyboardA11y?void 0:s)?.apply(this,m)}),q(h,f)},u=w(()=>t.store.selectionRectMode==="nodes"&&d(r)&&Gt(d(r).x)&&Gt(d(r).y));pe(l,h=>{d(u)&&h(c)})}q(e,a),ie()}Yr(["contextmenu","click","keydown"]);function Ym(e){switch(e){case"none":return 0;case"ctrl":return 8;case"shift":return 4;case"alt":return 2;case"meta":return 1}}function Pt(e,t){let{enabled:n=!0,trigger:r,type:o="keydown"}=t;function i(a){const l=Array.isArray(r)?r:[r],c=[a.metaKey,a.altKey,a.shiftKey,a.ctrlKey].reduce((u,h,f)=>h?u|1<<f:u,0);for(const u of l){const h={preventDefault:!1,enabled:!0,...u},{modifier:f,key:g,code:v,callback:m,preventDefault:b,enabled:x}=h;if(!g&&!v&&console.warn("[svelte-put/shortcut] Trigger should have either `key` or `code`, a trigger missing both was detected! Check your configuration"),x&&(g||v)){if(v&&a.code!==v)continue;if(g&&a.key!==g)continue;if(f===null||f===!1){if(c!==0)continue}else if(f!==void 0&&f?.[0]?.length>0){const C=Array.isArray(f)?f:[f];let p=!1;for(const _ of C)if((Array.isArray(_)?_:[_]).reduce((N,D)=>N|Ym(D),0)===c){p=!0;break}if(!p)continue}b&&a.preventDefault();const P={node:e,trigger:h,originalEvent:a};e.dispatchEvent(new CustomEvent("shortcut",{detail:P})),m?.(P)}}}let s;return n&&(s=ui(e,o,i)),{update:a=>{const{enabled:l=!0,type:c="keydown"}=a;n&&(!l||o!==c)?s?.():!n&&l&&(s=ui(e,c,i)),n=l,o=c,r=a.trigger},destroy:()=>{s?.()}}}function Zm(){const e=w(_n),t=i=>{const s=ic(i)?i:d(e).nodeLookup.get(i.id),a=s.parentId?Gv(s.position,s.measured,s.parentId,d(e).nodeLookup,d(e).nodeOrigin):s.position,l={...s,position:a,width:s.measured?.width??s.width,height:s.measured?.height??s.height};return Tr(l)};function n(i,s,a={replace:!1}){d(e).nodes=Ge(()=>d(e).nodes).map(l=>{if(l.id===i){const c=typeof s=="function"?s(l):s;return a?.replace&&ic(c)?c:{...l,...c}}return l})}function r(i,s,a={replace:!1}){d(e).edges=Ge(()=>d(e).edges).map(l=>{if(l.id===i){const c=typeof s=="function"?s(l):s;return a.replace&&tm(c)?c:{...l,...c}}return l})}const o=i=>d(e).nodeLookup.get(i);return{zoomIn:d(e).zoomIn,zoomOut:d(e).zoomOut,getInternalNode:o,getNode:i=>o(i)?.internals.userNode,getNodes:i=>i===void 0?d(e).nodes:mc(d(e).nodeLookup,i),getEdge:i=>d(e).edgeLookup.get(i),getEdges:i=>i===void 0?d(e).edges:mc(d(e).edgeLookup,i),setZoom:async(i,s)=>{const a=d(e).panZoom;return a?a.scaleTo(i,s):!1},getZoom:()=>d(e).viewport.zoom,setViewport:async(i,s)=>{const a=d(e).viewport;return d(e).panZoom?(await d(e).panZoom.setViewport({x:i.x??a.x,y:i.y??a.y,zoom:i.zoom??a.zoom},s),!0):!1},getViewport:()=>Ss(d(e).viewport),setCenter:async(i,s,a)=>d(e).setCenter(i,s,a),fitView:i=>d(e).fitView(i),fitBounds:async(i,s)=>{if(!d(e).panZoom)return!1;const a=Xi(i,d(e).width,d(e).height,d(e).minZoom,d(e).maxZoom,s?.padding??.1);return await d(e).panZoom.setViewport(a,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0},getIntersectingNodes:(i,s=!0,a)=>{const l=Al(i),c=l?i:t(i);return c?(a||d(e).nodes).filter(u=>{const h=d(e).nodeLookup.get(u.id);if(!h||!l&&u.id===i.id)return!1;const f=Tr(h),g=Eo(f,c);return s&&g>0||g>=f.width*f.height||g>=c.width*c.height}):[]},isNodeIntersecting:(i,s,a=!0)=>{const c=Al(i)?i:t(i);if(!c)return!1;const u=Eo(c,s);return a&&u>0||u>=s.width*s.height||u>=c.width*c.height},deleteElements:async({nodes:i=[],edges:s=[]})=>{const{nodes:a,edges:l}=await Fv({nodesToRemove:i,edgesToRemove:s,nodes:d(e).nodes,edges:d(e).edges,onBeforeDelete:d(e).onbeforedelete});return a&&(d(e).nodes=Ge(()=>d(e).nodes).filter(c=>!a.some(({id:u})=>u===c.id))),l&&(d(e).edges=Ge(()=>d(e).edges).filter(c=>!l.some(({id:u})=>u===c.id))),(a.length>0||l.length>0)&&d(e).ondelete?.({nodes:a,edges:l}),{deletedNodes:a,deletedEdges:l}},screenToFlowPosition:(i,s={snapToGrid:!0})=>{if(!d(e).domNode)return i;const a=s.snapToGrid?d(e).snapGrid:!1,{x:l,y:c,zoom:u}=d(e).viewport,{x:h,y:f}=d(e).domNode.getBoundingClientRect(),g={x:i.x-h,y:i.y-f};return Ar(g,[l,c,u],a!==null,a||[1,1])},flowToScreenPosition:i=>{if(!d(e).domNode)return i;const{x:s,y:a,zoom:l}=d(e).viewport,{x:c,y:u}=d(e).domNode.getBoundingClientRect(),h=Kn(i,[s,a,l]);return{x:h.x+c,y:h.y+u}},toObject:()=>structuredClone({nodes:[...d(e).nodes],edges:[...d(e).edges],viewport:{...d(e).viewport}}),updateNode:n,updateNodeData:(i,s,a)=>{const l=d(e).nodeLookup.get(i)?.internals.userNode;if(!l)return;const c=typeof s=="function"?s(l):s;n(i,u=>({...u,data:a?.replace?c:{...u.data,...c}}))},updateEdge:r,getNodesBounds:i=>Lv(i,{nodeLookup:d(e).nodeLookup,nodeOrigin:d(e).nodeOrigin}),getHandleConnections:({type:i,id:s,nodeId:a})=>Array.from(d(e).connectionLookup.get(`${a}-${i}-${s??null}`)?.values()??[])}}function mc(e,t){const n=[];for(const r of t){const o=e.get(r);if(o){const i="internals"in o?o.internals?.userNode:o;n.push(i)}}return n}function Xm(e,t){oe(t,!0);let n=F(t,"store",15),r=F(t,"selectionKey",3,"Shift"),o=F(t,"multiSelectionKey",19,()=>To()?"Meta":"Control"),i=F(t,"deleteKey",3,"Backspace"),s=F(t,"panActivationKey",3," "),a=F(t,"zoomActivationKey",19,()=>To()?"Meta":"Control"),{deleteElements:l}=Zm();function c(m){return m!==null&&typeof m=="object"}function u(m){return c(m)?m.modifier||[]:[]}function h(m){return m==null?"":c(m)?m.key:m}function f(m,b){return(Array.isArray(m)?m:[m]).map(P=>{const C=h(P);return{key:C,modifier:u(P),enabled:C!==null,callback:b}})}function g(){n(n().selectionRect=null,!0),n(n().selectionKeyPressed=!1,!0),n(n().multiselectionKeyPressed=!1,!0),n(n().deleteKeyPressed=!1,!0),n(n().panActivationKeyPressed=!1,!0),n(n().zoomActivationKeyPressed=!1,!0)}function v(){const m=n().nodes.filter(x=>x.selected),b=n().edges.filter(x=>x.selected);l({nodes:m,edges:b})}sr("blur",Re,g),sr("contextmenu",Re,g),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(r(),()=>n(n().selectionKeyPressed=!0,!0)),type:"keydown"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(r(),()=>n(n().selectionKeyPressed=!1,!0)),type:"keyup"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(o(),()=>{n(n().multiselectionKeyPressed=!0,!0)}),type:"keydown"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(o(),()=>n(n().multiselectionKeyPressed=!1,!0)),type:"keyup"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(i(),m=>{!(m.originalEvent.ctrlKey||m.originalEvent.metaKey||m.originalEvent.shiftKey)&&!zl(m.originalEvent)&&(n(n().deleteKeyPressed=!0,!0),v())}),type:"keydown"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(i(),()=>n(n().deleteKeyPressed=!1,!0)),type:"keyup"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(s(),()=>n(n().panActivationKeyPressed=!0,!0)),type:"keydown"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(s(),()=>n(n().panActivationKeyPressed=!1,!0)),type:"keyup"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(a(),()=>n(n().zoomActivationKeyPressed=!0,!0)),type:"keydown"})),Le(Re,(m,b)=>Pt?.(m,b),()=>({trigger:f(a(),()=>n(n().zoomActivationKeyPressed=!1,!0)),type:"keyup"})),ie()}var Gm=Pe('<path fill="none" class="svelte-flow__connection-path"></path>'),jm=Pe('<svg class="svelte-flow__connectionline"><g><!></g></svg>');function Um(e,t){oe(t,!0);let n=w(()=>{if(!t.store.connection.inProgress)return"";const s={sourceX:t.store.connection.from.x,sourceY:t.store.connection.from.y,sourcePosition:t.store.connection.fromPosition,targetX:t.store.connection.to.x,targetY:t.store.connection.to.y,targetPosition:t.store.connection.toPosition};switch(t.type){case rn.Bezier:{const[a]=Hl(s);return a}case rn.Straight:{const[a]=Ll(s);return a}case rn.Step:case rn.SmoothStep:{const[a]=ji({...s,borderRadius:t.type===rn.Step?0:void 0});return a}}});var r=Be(),o=de(r);{var i=s=>{var a=jm(),l=Z(a),c=Z(l);{var u=f=>{var g=Be(),v=de(g);hi(v,()=>t.LineComponent,(m,b)=>{b(m,{})}),q(f,g)},h=f=>{var g=Gm();$(()=>{ne(g,"d",d(n)),ft(g,t.style)}),q(f,g)};pe(c,f=>{t.LineComponent?f(u):f(h,-1)})}$(f=>{ne(a,"width",t.store.width),ne(a,"height",t.store.height),ft(a,t.containerStyle),Ft(l,0,f)},[()=>hn(["svelte-flow__connection",Qv(t.store.connection.isValid)])]),q(s,a)};pe(o,s=>{t.store.connection.inProgress&&s(i)})}q(e,r),ie()}var Qm=new Set(["$$slots","$$events","$$legacy","position","style","class","children"]),Jm=Q("<div><!></div>");function yc(e,t){oe(t,!0);let n=F(t,"position",3,"top-right"),r=ht(t,Qm),o=w(()=>`${n()}`.split("-"));var i=Jm();rt(i,a=>({class:a,style:t.style,...r}),[()=>["svelte-flow__panel",t.class,...d(o)]]);var s=Z(i);Ne(s,()=>t.children??Je),q(e,i),ie()}var $m=Q('<a target="_blank" rel="noopener noreferrer" aria-label="Svelte Flow attribution">Svelte Flow</a>');function e0(e,t){oe(t,!0);let n=F(t,"position",3,"bottom-right");const r="https://svelteflow.dev?utm_source=attribution";ut(()=>{});var o=Be(),i=de(o);{var s=a=>{{let l=w(()=>`Please only hide this attribution when you are subscribed to Svelte Flow Pro: ${r}`);yc(a,{get position(){return n()},class:"svelte-flow__attribution",get"data-message"(){return d(l)},children:(c,u)=>{var h=$m();$(()=>ne(h,"href",r)),q(c,h)},$$slots:{default:!0}})}};pe(i,a=>{t.proOptions?.hideAttribution||a(s)})}q(e,o),ie()}var t0=Q("<div><!></div>");function n0(e,t){oe(t,!0);let n=F(t,"domNode",15),r=F(t,"clientWidth",15),o=F(t,"clientHeight",15),i=w(()=>t.rest.class),s=w(()=>Oc(t.rest,["id","class","nodeTypes","edgeTypes","colorMode","isValidConnection","onmove","onmovestart","onmoveend","onflowerror","ondelete","onbeforedelete","onbeforeconnect","onconnect","onconnectstart","onconnectend","onbeforereconnect","onreconnect","onreconnectstart","onreconnectend","onclickconnectstart","onclickconnectend","oninit","onselectionchange","onselectiondragstart","onselectiondrag","onselectiondragstop","onselectionstart","onselectionend","clickConnect","fitView","fitViewOptions","nodeOrigin","nodeDragThreshold","connectionDragThreshold","minZoom","maxZoom","initialViewport","connectionRadius","connectionMode","selectionMode","selectNodesOnDrag","snapGrid","defaultMarkerColor","translateExtent","nodeExtent","onlyRenderVisibleElements","autoPanOnConnect","autoPanOnNodeDrag","colorModeSSR","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","elementsSelectable","nodesFocusable","edgesFocusable","disableKeyboardA11y","noDragClass","noPanClass","noWheelClass","ariaLabelConfig","autoPanSpeed","panOnScrollSpeed","zIndexMode","autoPanOnSelection"]));function a(u){u.currentTarget.scrollTo({top:0,left:0,behavior:"auto"}),t.rest.onscroll&&t.rest.onscroll(u)}var l=t0();rt(l,u=>({class:["svelte-flow","svelte-flow__container",t.colorMode,d(i)],"data-testid":"svelte-flow__wrapper",role:"application",onscroll:a,...d(s),[Kt]:u}),[()=>({width:Mt(t.width),height:Mt(t.height)})],void 0,void 0,"svelte-1ca19db");var c=Z(l);Ne(c,()=>t.children??Je),dr(l,u=>n(u),()=>n()),Ea(l,"clientHeight",o),Ea(l,"clientWidth",r),q(e,l),ie()}var r0=new Set(["$$slots","$$events","$$legacy","width","height","proOptions","selectionKey","deleteKey","panActivationKey","multiSelectionKey","zoomActivationKey","paneClickDistance","nodeClickDistance","onmovestart","onmoveend","onmove","oninit","onnodeclick","onnodecontextmenu","onnodedrag","onnodedragstart","onnodedragstop","onnodepointerenter","onnodepointermove","onnodepointerleave","onselectionclick","onselectioncontextmenu","onselectionstart","onselectionend","onedgeclick","onedgecontextmenu","onedgepointerenter","onedgepointerleave","onpaneclick","onpanecontextmenu","panOnScrollMode","preventScrolling","zoomOnScroll","zoomOnDoubleClick","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnDrag","selectionOnDrag","autoPanOnSelection","connectionLineComponent","connectionLineStyle","connectionLineContainerStyle","connectionLineType","attributionPosition","children","nodes","edges","viewport"]),o0=Q('<div class="svelte-flow__viewport-back svelte-flow__container"></div> <!> <div class="svelte-flow__edge-labels svelte-flow__container"></div> <!> <!> <!> <div class="svelte-flow__viewport-front svelte-flow__container"></div>',1),i0=Q("<!> <!>",1),s0=Q("<!> <!> <!> <!> <!>",1);function a0(e,t){oe(t,!0);let n=F(t,"paneClickDistance",3,1),r=F(t,"nodeClickDistance",3,1),o=F(t,"panOnScrollMode",19,()=>Wn.Free),i=F(t,"preventScrolling",3,!0),s=F(t,"zoomOnScroll",3,!0),a=F(t,"zoomOnDoubleClick",3,!0),l=F(t,"zoomOnPinch",3,!0),c=F(t,"panOnScroll",3,!1),u=F(t,"panOnScrollSpeed",3,.5),h=F(t,"panOnDrag",3,!0),f=F(t,"selectionOnDrag",3,!1),g=F(t,"autoPanOnSelection",3,!0),v=F(t,"connectionLineType",19,()=>rn.Bezier),m=F(t,"nodes",31,()=>Bt([])),b=F(t,"edges",31,()=>Bt([])),x=F(t,"viewport",15,void 0),P=ht(t,r0),C=pm({props:P,width:t.width,height:t.height,get nodes(){return m()},set nodes(_){m(_)},get edges(){return b()},set edges(_){b(_)},get viewport(){return x()},set viewport(_){x(_)}});const p=Ko(ss);p&&p.setStore&&p.setStore(C),Es(ss,{provider:!1,getStore(){return C}}),ut(()=>{const _={nodes:C.selectedNodes,edges:C.selectedEdges};Ge(()=>t.onselectionchange)?.(_);for(const S of C.selectionChangeHandlers.values())S(_)}),Gr(()=>{C.reset()}),n0(e,{get colorMode(){return C.colorMode},get width(){return t.width},get height(){return t.height},get rest(){return P},get domNode(){return C.domNode},set domNode(_){C.domNode=_},get clientWidth(){return C.width},set clientWidth(_){C.width=_},get clientHeight(){return C.height},set clientHeight(_){C.height=_},children:(_,S)=>{var N=s0(),D=de(N);Xm(D,{get selectionKey(){return t.selectionKey},get deleteKey(){return t.deleteKey},get panActivationKey(){return t.panActivationKey},get multiSelectionKey(){return t.multiSelectionKey},get zoomActivationKey(){return t.zoomActivationKey},get store(){return C},set store(A){C=A}});var V=G(D,2);bm(V,{get panOnScrollMode(){return o()},get preventScrolling(){return i()},get zoomOnScroll(){return s()},get zoomOnDoubleClick(){return a()},get zoomOnPinch(){return l()},get panOnScroll(){return c()},get panOnScrollSpeed(){return u()},get panOnDrag(){return h()},get paneClickDistance(){return n()},get selectionOnDrag(){return f()},get onmovestart(){return t.onmovestart},get onmove(){return t.onmove},get onmoveend(){return t.onmoveend},get oninit(){return t.oninit},get store(){return C},set store(A){C=A},children:(A,y)=>{_m(A,{get onpaneclick(){return t.onpaneclick},get onpanecontextmenu(){return t.onpanecontextmenu},get onselectionstart(){return t.onselectionstart},get onselectionend(){return t.onselectionend},get panOnDrag(){return h()},get paneClickDistance(){return n()},get selectionOnDrag(){return f()},get autoPanOnSelection(){return g()},get store(){return C},set store(E){C=E},children:(E,M)=>{var k=i0(),z=de(k);km(z,{get store(){return C},set store(R){C=R},children:(R,L)=>{var H=o0(),Y=G(de(H),2);Vm(Y,{get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return C},set store(X){C=X}});var K=G(Y,4);Um(K,{get type(){return v()},get LineComponent(){return t.connectionLineComponent},get containerStyle(){return t.connectionLineContainerStyle},get style(){return t.connectionLineStyle},get store(){return C},set store(X){C=X}});var U=G(K,2);Nm(U,{get nodeClickDistance(){return r()},get onnodeclick(){return t.onnodeclick},get onnodecontextmenu(){return t.onnodecontextmenu},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return C},set store(X){C=X}});var j=G(U,2);Km(j,{get onselectionclick(){return t.onselectionclick},get onselectioncontextmenu(){return t.onselectioncontextmenu},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return C},set store(X){C=X}}),q(R,H)},$$slots:{default:!0}});var O=G(z,2);{let R=w(()=>!!(C.selectionRect&&C.selectionRectMode==="user")),L=w(()=>C.selectionRect?.width),H=w(()=>C.selectionRect?.height),Y=w(()=>C.selectionRect?.x),K=w(()=>C.selectionRect?.y);pc(O,{get isVisible(){return d(R)},get width(){return d(L)},get height(){return d(H)},get x(){return d(Y)},get y(){return d(K)}})}q(E,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var W=G(V,2);e0(W,{get proOptions(){return t.proOptions},get position(){return t.attributionPosition}});var I=G(W,2);Tm(I,{get store(){return C}});var T=G(I,2);Ne(T,()=>t.children??Je),q(_,N)},$$slots:{default:!0}}),ie()}var l0=new Set(["$$slots","$$events","$$legacy","class","bgColor","bgColorHover","color","colorHover","borderColor","onclick","children"]),c0=Q("<button><!></button>");function No(e,t){let n=ht(t,l0);var r=c0();rt(r,()=>({type:"button",onclick:t.onclick,class:["svelte-flow__controls-button",t.class],...n,[Kt]:{"--xy-controls-button-background-color-props":t.bgColor,"--xy-controls-button-background-color-hover-props":t.bgColorHover,"--xy-controls-button-color-props":t.color,"--xy-controls-button-color-hover-props":t.colorHover,"--xy-controls-button-border-color-props":t.borderColor}}));var o=Z(r);Ne(o,()=>t.children??Je),q(e,r)}var u0=Pe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"></path></svg>');function d0(e){var t=u0();q(e,t)}var f0=Pe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 5"><path d="M0 0h32v4.2H0z"></path></svg>');function h0(e){var t=f0();q(e,t)}var g0=Pe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 30"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"></path></svg>');function v0(e){var t=g0();q(e,t)}var p0=Pe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"></path></svg>');function m0(e){var t=p0();q(e,t)}var y0=Pe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"></path></svg>');function b0(e){var t=y0();q(e,t)}var w0=new Set(["$$slots","$$events","$$legacy","position","orientation","showZoom","showFitView","showLock","style","class","buttonBgColor","buttonBgColorHover","buttonColor","buttonColorHover","buttonBorderColor","fitViewOptions","children","before","after"]),_0=Q("<!> <!>",1),x0=Q("<!> <!> <!> <!> <!> <!>",1);function k0(e,t){oe(t,!0);let n=F(t,"position",3,"bottom-left"),r=F(t,"orientation",3,"vertical"),o=F(t,"showZoom",3,!0),i=F(t,"showFitView",3,!0),s=F(t,"showLock",3,!0),a=ht(t,w0),l=w(_n);const c=w(()=>({bgColor:t.buttonBgColor,bgColorHover:t.buttonBgColorHover,color:t.buttonColor,colorHover:t.buttonColorHover,borderColor:t.buttonBorderColor}));let u=w(()=>d(l).nodesDraggable||d(l).nodesConnectable||d(l).elementsSelectable),h=w(()=>d(l).viewport.zoom<=d(l).minZoom),f=w(()=>d(l).viewport.zoom>=d(l).maxZoom),g=w(()=>d(l).ariaLabelConfig),v=w(()=>r()==="horizontal"?"horizontal":"vertical");const m=()=>{d(l).zoomIn()},b=()=>{d(l).zoomOut()},x=()=>{d(l).fitView(t.fitViewOptions)},P=()=>{let C=!d(u);d(l).nodesDraggable=C,d(l).nodesConnectable=C,d(l).elementsSelectable=C};{let C=w(()=>["svelte-flow__controls",d(v),t.class]);yc(e,zn({get class(){return d(C)},get position(){return n()},"data-testid":"svelte-flow__controls",get"aria-label"(){return d(g)["controls.ariaLabel"]},get style(){return t.style}},()=>a,{children:(p,_)=>{var S=x0(),N=de(S);{var D=O=>{var R=Be(),L=de(R);Ne(L,()=>t.before),q(O,R)};pe(N,O=>{t.before&&O(D)})}var V=G(N,2);{var W=O=>{var R=_0(),L=de(R);No(L,zn({onclick:m,class:"svelte-flow__controls-zoomin",get title(){return d(g)["controls.zoomIn.ariaLabel"]},get"aria-label"(){return d(g)["controls.zoomIn.ariaLabel"]},get disabled(){return d(f)}},()=>d(c),{children:(Y,K)=>{d0(Y)},$$slots:{default:!0}}));var H=G(L,2);No(H,zn({onclick:b,class:"svelte-flow__controls-zoomout",get title(){return d(g)["controls.zoomOut.ariaLabel"]},get"aria-label"(){return d(g)["controls.zoomOut.ariaLabel"]},get disabled(){return d(h)}},()=>d(c),{children:(Y,K)=>{h0(Y)},$$slots:{default:!0}})),q(O,R)};pe(V,O=>{o()&&O(W)})}var I=G(V,2);{var T=O=>{No(O,zn({class:"svelte-flow__controls-fitview",onclick:x,get title(){return d(g)["controls.fitView.ariaLabel"]},get"aria-label"(){return d(g)["controls.fitView.ariaLabel"]}},()=>d(c),{children:(R,L)=>{v0(R)},$$slots:{default:!0}}))};pe(I,O=>{i()&&O(T)})}var A=G(I,2);{var y=O=>{No(O,zn({class:"svelte-flow__controls-interactive",onclick:P,get title(){return d(g)["controls.interactive.ariaLabel"]},get"aria-label"(){return d(g)["controls.interactive.ariaLabel"]}},()=>d(c),{children:(R,L)=>{var H=Be(),Y=de(H);{var K=j=>{b0(j)},U=j=>{m0(j)};pe(Y,j=>{d(u)?j(K):j(U,-1)})}q(R,H)},$$slots:{default:!0}}))};pe(A,O=>{s()&&O(y)})}var E=G(A,2);{var M=O=>{var R=Be(),L=de(R);Ne(L,()=>t.children),q(O,R)};pe(E,O=>{t.children&&O(M)})}var k=G(E,2);{var z=O=>{var R=Be(),L=de(R);Ne(L,()=>t.after),q(O,R)};pe(k,O=>{t.after&&O(z)})}q(p,S)},$$slots:{default:!0}}))}ie()}var sn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(sn||(sn={}));var S0=Pe("<circle></circle>");function E0(e,t){var n=S0();$(()=>{ne(n,"cx",t.radius),ne(n,"cy",t.radius),ne(n,"r",t.radius),Ft(n,0,hn(["svelte-flow__background-pattern","dots",t.class]))}),q(e,n)}var T0=Pe("<path></path>");function C0(e,t){oe(t,!0);var n=T0();$(()=>{ne(n,"stroke-width",t.lineWidth),ne(n,"d",`M${t.dimensions[0]/2} 0 V${t.dimensions[1]} M0 ${t.dimensions[1]/2} H${t.dimensions[0]}`),Ft(n,0,hn(["svelte-flow__background-pattern",t.variant,t.class]))}),q(e,n),ie()}const A0={[sn.Dots]:1,[sn.Lines]:1,[sn.Cross]:6};var M0=Pe('<svg data-testid="svelte-flow__background"><pattern patternUnits="userSpaceOnUse"><!></pattern><rect x="0" y="0" width="100%" height="100%"></rect></svg>');function P0(e,t){oe(t,!0);let n=F(t,"variant",19,()=>sn.Dots),r=F(t,"gap",3,20),o=F(t,"lineWidth",3,1),i=w(_n),s=w(()=>n()===sn.Dots),a=w(()=>n()===sn.Cross),l=w(()=>Array.isArray(r())?r():[r(),r()]),c=w(()=>`background-pattern-${d(i).flowId}-${t.id??""}`),u=w(()=>[d(l)[0]*d(i).viewport.zoom||1,d(l)[1]*d(i).viewport.zoom||1]),h=w(()=>(t.size??A0[n()])*d(i).viewport.zoom),f=w(()=>d(a)?[d(h),d(h)]:d(u)),g=w(()=>d(s)?[d(h)/2,d(h)/2]:[d(f)[0]/2,d(f)[1]/2]);var v=M0();let m;var b=Z(v),x=Z(b);{var P=_=>{{let S=w(()=>d(h)/2);E0(_,{get radius(){return d(S)},get class(){return t.patternClass}})}},C=_=>{C0(_,{get dimensions(){return d(f)},get variant(){return n()},get lineWidth(){return o()},get class(){return t.patternClass}})};pe(x,_=>{d(s)?_(P):_(C,-1)})}var p=G(b);$(()=>{Ft(v,0,hn(["svelte-flow__background","svelte-flow__container",t.class])),m=ft(v,"",m,{"--xy-background-color-props":t.bgColor,"--xy-background-pattern-color-props":t.patternColor}),ne(b,"id",d(c)),ne(b,"x",d(i).viewport.x%d(u)[0]),ne(b,"y",d(i).viewport.y%d(u)[1]),ne(b,"width",d(u)[0]),ne(b,"height",d(u)[1]),ne(b,"patternTransform",`translate(-${d(g)[0]},-${d(g)[1]})`),ne(p,"fill",`url(#${d(c)})`)}),q(e,v),ie()}var N0=Q("<strong> </strong>"),I0=Q("<!> <!> <!>",1);function z0(e,t){oe(t,!0);var n=I0(),r=de(n);Xn(r,{type:"target",get position(){return ee.Top}});var o=G(r,2);{let s=w(()=>t.data.container?"ecosystem-container":"ecosystem-node");jr(o,{get class(){return d(s)},children:(a,l)=>{var c=N0(),u=Z(c);$(()=>ce(u,t.data.label)),q(a,c)},$$slots:{default:!0}})}var i=G(o,2);Xn(i,{type:"source",get position(){return ee.Bottom}}),q(e,n),ie()}function O0(e){const t=new Map([[void 0,[]]]),n=new Map;for(const s of Object.values(e.relations)){if(s.type!=="contains")continue;const a=s.endpoints.find(c=>c.role==="parent").target,l=s.endpoints.find(c=>c.role==="child").target;n.set(l,a)}for(const s of Object.values(e.entities)){const a=n.get(s.id);t.has(a)||t.set(a,[]),t.get(a).push(s)}const r=[];function o(s){const a=t.get(s)??[];let l=s?48:0,c=0,u=s?24:0,h=288;return a.forEach((f,g)=>{const v=f.type==="container"?o(f.id):{width:240,height:110};g%2===0&&g&&(l+=c+50,u=s?24:0,c=0),r.push({id:f.id,type:"ecosystem",position:{x:u,y:l},...s?{parentId:s,extent:"parent"}:{},...f.type==="container"?{style:`width: ${v.width}px; height: ${v.height}px;`}:{},data:{label:f.attributes.name.value,container:f.type==="container"}}),u+=v.width+60,h=Math.max(h,u-36),c=Math.max(c,v.height)}),{width:h,height:l+c+24}}o(void 0);const i=s=>{let a=0;for(;n.has(s);s=n.get(s))a++;return a};return r.sort((s,a)=>i(s.id)-i(a.id))}var D0=Q("<!> <!>",1),R0=Q("<li> </li>"),H0=Q('<figure><figcaption> </figcaption> <p class="canvas-hint">Déplacez le schéma et pincez pour zoomer, ou utilisez les boutons + et −.</p> <div class="canvas" data-renderer="xyflow-svelte" role="region"><!></div> <details><summary>Lire les relations du schéma</summary> <ul></ul></details></figure>');function B0(e,t){oe(t,!0);let n=F(t,"dark",3,!1);const r={ecosystem:z0};let o=w(()=>O0(t.document)),i=w(()=>Object.values(t.document.relations).filter(m=>m.type==="link"));const s=(m,b)=>m.endpoints.find(x=>x.role===b).target;let a=w(()=>d(i).map(m=>({id:m.id,source:s(m,"source"),target:s(m,"target"),label:m.attributes?.label?.value,type:"smoothstep",style:"stroke: var(--st-semantic-border-strong); stroke-width: 1px;",labelStyle:"fill: var(--st-semantic-text-primary); font-size: 12px;",labelBgStyle:"fill: var(--st-semantic-surface-raised);",markerEnd:{type:Sr.ArrowClosed,color:n()?"#94a3b8":"#475569",width:16,height:16}})));var l=H0(),c=Z(l),u=Z(c),h=G(c,4),f=Z(h);{let m=w(()=>n()?"dark":"light");a0(f,{get nodes(){return d(o)},get edges(){return d(a)},get nodeTypes(){return r},fitView:!0,minZoom:.15,maxZoom:2.5,zoomOnPinch:!0,zoomOnScroll:!1,panOnDrag:!0,nodesDraggable:!1,nodesConnectable:!1,get colorMode(){return d(m)},children:(b,x)=>{var P=D0(),C=de(P);k0(C,{showInteractive:!1});var p=G(C,2);P0(p,{gap:20,size:1}),q(b,P)},$$slots:{default:!0}})}var g=G(h,2),v=G(Z(g),2);en(v,21,()=>d(i),lr,(m,b)=>{var x=R0(),P=Z(x);$((C,p)=>ce(P,`${C??""} → ${p??""}${d(b).attributes?.label?` : ${d(b).attributes.label.value}`:""}`),[()=>t.document.entities[s(d(b),"source")].attributes.name.value,()=>t.document.entities[s(d(b),"target")].attributes.name.value]),q(m,x)}),$(()=>{ne(l,"aria-label",t.alt),ce(u,t.alt),ne(h,"aria-label",`Schéma : ${t.alt}`)}),q(e,l),ie()}const Io={low:2,medium:8,high:30},Ue={minOwnerRequestQuoteLength:8,minStakesLength:20,minQuestionContextLength:20,maxDossierBudgetMinutes:30,wordsPerMinute:180,maxHeadingLength:100,maxDecisionLineLength:300,maxOptionLabelLength:100,maxConsequenceLength:160,maxOptionBodyLength:300},bc=/\b(?:[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+|[A-Z][A-Z0-9]*\d[A-Z0-9]*[a-z]?|[A-Z]{2,})\b/g,wc=new Set(["GO","NO-GO","NO","PENDING","DEFERRED","LR","RL","TB","BT","TD","UTF-8"]),as=/\beither\b[\s\S]{0,160}?\bor\b|\bsoit\b[\s\S]{0,160}?\bsoit\b|\b(?:instead of|rather than|plut[oô]t que|versus|vs\.?|choos(?:e|ing) between|choisir entre)\b/i,_c=/(?:^|[\n\r\u2028\u2029])\s*(?:[-*+•‣>]|\d+[.)]|[a-z][.)])\s+\S|\([a-z]\)[\s\S]*\([a-z]\)|\b(?:sub[- ]?options?|sous[- ]?options?)\b/i,xc=/[\n\r\u2028\u2029]/,Nt=e=>!e?.trim(),zo=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},kc=e=>(e.join(" ").match(/\S+/gu)?.length??0)/Ue.wordsPerMinute,L0=e=>{const t=[],n=(p,_,S)=>{t.push({path:p,code:_,message:S})},r=e.readability,o=r?.ownerRequestQuote?.trim()??"";r?.noOwnerRequest===!0?n("$.readability.noOwnerRequest",o?"conflicting_owner_request":"presentation_blocked",o?"A quoted owner request conflicts with noOwnerRequest: keep the literal request and remove the flag.":"No owner request: presentation is blocked until the owner's literal request is quoted."):o?o.length<Ue.minOwnerRequestQuoteLength&&n("$.readability.ownerRequestQuote","owner_request_too_short","Quote the full literal owner request so the owner recognizes their own intention."):n("$.readability.ownerRequestQuote","missing_owner_request","Quote the literal owner request this dossier serves, or set noOwnerRequest to block presentation explicitly."),Nt(r?.stakes)?n("$.readability.stakes","missing_stakes","State why the decision matters to the owner, using plain words about cost, time or consequences."):r.stakes.trim().length<Ue.minStakesLength&&n("$.readability.stakes","stakes_too_short","Explain the actual consequence for the owner in at least 20 characters; an internal label is insufficient.");const i=r?.stakesLevel;(!i||!Object.hasOwn(Io,i))&&n("$.readability.stakesLevel","missing_stakes_level","Declare stakesLevel: low for a small reversible inconvenience, medium for cost/disruption, high for lasting or major impact.");const s=r?.readingBudgetMinutes,a=s!==void 0&&Number.isFinite(s)&&s>=1&&s<=Ue.maxDossierBudgetMinutes;s===void 0?n("$.readability.readingBudgetMinutes","missing_reading_budget","Declare a total reading budget in minutes proportionate to the stakes: low up to 2, medium up to 8, high up to 30."):a?i&&Object.hasOwn(Io,i)&&s>Io[i]&&n("$.readability.readingBudgetMinutes","reading_budget_disproportionate",`The ${i} stakes budget is at most ${Io[i]} minutes; shorten this dossier or justify a different stakes level.`):n("$.readability.readingBudgetMinutes","reading_budget_out_of_range","The total reading budget must be a finite number between 1 and 30 minutes.");const l=new Map;r?.glossary?.forEach((p,_)=>{if(Nt(p.term)||Nt(p.definition))n(`$.readability.glossary[${_}]`,"empty_glossary_entry","Give every glossary term a definition in plain words visible to the reader.");else{const S=p.term.trim();(l.has(S)||p.definition.trim()===S)&&n(`$.readability.glossary[${_}]`,"invalid_glossary_entry","Use one definition per term and expand its meaning; repeating the code does not explain it."),(p.definition.match(bc)??[]).some(N=>!wc.has(N))&&n(`$.readability.glossary[${_}].definition`,"invalid_glossary_entry","Explain each term independently in plain words, without itself or another code, even one defined elsewhere."),l.set(S,p.definition)}});const c=(p,_)=>{for(const S of new Set(p?.match(bc)??[]))!wc.has(S)&&!l.has(S)&&n(_,"undefined_code",`Unexpanded code or acronym "${S}": define it in the visible glossary in plain words, or rewrite it.`)},u=[],h=(p,_)=>{c(p,_),p&&u.push(p)};for(const p of["title","subject"])h(e[p],`$.${p}`),Nt(e[p])&&n(`$.${p}`,"empty_heading","Name the subject and decision in a short, non-empty line the owner understands."),P(e[p],`$.${p}`,Ue.maxHeadingLength);h(o,"$.readability.ownerRequestQuote"),h(r?.stakes,"$.readability.stakes"),r?.glossary?.forEach((p,_)=>{u.push(p.term),h(p.definition,`$.readability.glossary[${_}].definition`)});const f=(p,_)=>{p.forEach((S,N)=>{h(S.author,`${_}[${N}].author`),h(S.summary,`${_}[${N}].summary`)})};f(e.amendmentTrace,"$.amendmentTrace"),e.interactions.forEach((p,_)=>h(p.label,`$.interactions[${_}].label`));const g=e.sections.filter(p=>p.kind==="question"),v=new Set(g.map(p=>p.id));g.length||n("$.sections","missing_question","A decision dossier needs an explicit question with context, options and a recommendation.");const m=(p,_,S)=>{Nt(p)?S&&n(_,"hidden_decision","This content implies a choice without an explicit question: set questionId to the question the owner must answer."):v.has(p)||n(_,"unknown_question_ref",`Question "${p}" does not exist in this dossier; link to an explicit question.`)},b=e.sections.filter(p=>p.kind==="optionSet");let x=0;return e.sections.forEach((p,_)=>{const S=`$.sections[${_}]`;switch(p.kind){case"prose":h(p.markdown,`${S}.markdown`),m(p.questionId,`${S}.questionId`,as.test(p.markdown));break;case"outcome":h(p.statement,`${S}.statement`),m(p.questionId,`${S}.questionId`,p.modality!=="comment"||as.test(p.statement));break;case"diagram":h(p.alt,`${S}.alt`),p.scene===void 0?h(p.source,`${S}.source`):c(p.source,`${S}.source`);for(const[N,D]of[["entities","name"],["relations","label"]])for(const[V,W]of Object.entries(zo(p.scene?.[N]))){const I=zo(zo(zo(W).attributes)[D]);I.kind==="text"&&typeof I.value=="string"&&h(I.value,`${S}.scene.${N}.${V}.attributes.${D}.value`)}break;case"amendmentTrace":f(p.steps,`${S}.steps`);break;case"optionSet":m(p.questionId,`${S}.questionId`,!0),c(p.title,`${S}.title`),P(p.title,`${S}.title`,Ue.maxHeadingLength),p.options.forEach((N,D)=>C(N,`${S}.options[${D}]`));break;case"question":{Nt(p.question)&&n(`${S}.question`,"empty_question","State the explicit decision the owner needs to make in this question."),Nt(p.context)?n(`${S}.context`,"missing_question_context","Add representative context in plain words so the question can be understood on its own."):p.context.trim().length<Ue.minQuestionContextLength&&n(`${S}.context`,"question_context_too_short","Give representative context of at least 20 characters, including what changes for the owner."),Nt(p.recommendedAnswer)&&n(`${S}.recommendedAnswer`,"missing_recommendation","Recommend an option with a short reason that relates to the owner's request and stakes."),P(p.question,`${S}.question`,Ue.maxDecisionLineLength),P(p.recommendedAnswer,`${S}.recommendedAnswer`,Ue.maxDecisionLineLength);const N=b.filter(T=>T.questionId===p.id),D=N.flatMap(T=>T.options);(D.length<2||D.length>4)&&n(S,"option_count",`Each question needs 2–4 short options; this question has ${D.length}.`),D.some(T=>T.id===p.recommendedOptionId)||n(`${S}.recommendedOptionId`,"unknown_recommended_option","Identify the recommended option by its id among this question's options, with the reason in recommendedAnswer.");const V=[p.question,p.context,p.recommendedAnswer,p.answer,D.find(T=>T.id===p.recommendedOptionId)?.label,...N.map(T=>T.title),...D.flatMap(T=>[T.label,T.consequence,T.body,T.annotationComment])];c(p.question,`${S}.question`),c(p.context,`${S}.context`),c(p.recommendedAnswer,`${S}.recommendedAnswer`),c(p.answer,`${S}.answer`);const W=p.readingTimeMinutes,I=kc(V);W===void 0?n(`${S}.readingTimeMinutes`,"missing_reading_time","Estimate the time to read this question, context and options in readingTimeMinutes (up to 2 minutes)."):!Number.isFinite(W)||W<=0||W>2?n(`${S}.readingTimeMinutes`,"reading_time_exceeded","Each question must take a positive finite time of at most 2 minutes; shorten or split it."):(W<I&&n(`${S}.readingTimeMinutes`,"reading_time_underestimated",`This question needs at least ${I.toFixed(2)} minutes at 180 words/minute; shorten it or correct its estimate (maximum 2 minutes).`),x+=Math.max(W,I));break}}}),a&&x+kc(u)>s&&n("$.readability.readingBudgetMinutes","reading_budget_exceeded","The questions plus shared context and glossary exceed the declared reading budget; shorten the dossier to match its stakes."),t;function P(p,_,S){p&&((p.trim().length>S||xc.test(p))&&n(_,"decision_line_too_long",`Use one short line of at most ${S} characters; put explanation in the question context.`),_c.test(p)&&n(_,"nested_suboptions","Expose sub-choices as separate options or questions, without nested lists or inline branches."))}function C(p,_){const S=[{field:"label",text:p.label,max:Ue.maxOptionLabelLength,code:"option_too_long"},{field:"consequence",text:p.consequence,max:Ue.maxConsequenceLength,code:"consequence_too_long"},{field:"body",text:p.body,max:Ue.maxOptionBodyLength,code:"option_too_long"},{field:"annotationComment",text:p.annotationComment,max:Ue.maxOptionBodyLength,code:"option_too_long"}];Nt(p.label)&&n(`${_}.label`,"empty_option_label","Name this option in a few plain words so the owner can compare it at a glance."),Nt(p.consequence)&&n(`${_}.consequence`,"missing_consequence","Add a one-line consequence: what choosing this option changes for the owner.");for(const{field:N,text:D,max:V,code:W}of S)D&&(c(D,`${_}.${N}`),(D.trim().length>V||xc.test(D))&&n(`${_}.${N}`,W,`Keep this option ${N} to one short line of at most ${V} characters; move necessary context to the question.`),(_c.test(D)||as.test(D))&&n(`${_}.${N}`,"nested_suboptions","This option hides sub-options: expose the choices as separate options or as a separate question."))}};class q0 extends Error{issues;constructor(t){super(`invalid DecisionDossierDocument: ${t.map(n=>`${n.path} ${n.code}: ${n.message}`).join("; ")}`),this.name="DecisionDossierValidationError",this.issues=t}}const ls=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),we=(e,t,n)=>({path:e,code:t,message:n}),Ve=(e,t,n,r,o,i)=>{if(!ls(e)){i.push(we(t,"invalid_type","expected an object"));return}const s=new Set(n);for(const a of Object.keys(e))s.has(a)||i.push(we(`${t}.${a}`,"unknown_field","field not in the closed schema"));for(const a of r)e[a]===void 0&&i.push(we(`${t}.${a}`,"missing_field","required field is missing"));for(const a of o)e[a]!==void 0&&typeof e[a]!="string"&&i.push(we(`${t}.${a}`,"invalid_type","expected a string"));return e},Mr=(e,t,n,r)=>{(typeof e!="string"||!n.includes(e))&&r.push(we(t,"invalid_enum",`expected one of: ${n.join(" | ")}`))},Sc=["ref","subject","title","hash","cursor","sections","interactions","provenance","amendmentTrace"],V0=["ref","subject","title","hash","cursor"],W0=[...Sc,"readability"],F0=(e,t,n)=>{const r=n.length,o=Ve(e,t,["kind","id","targetRef","label","body","annotation","annotationComment","consequence"],["kind","id","targetRef","label","annotation"],["id","targetRef","label","body","annotationComment","consequence"],n);if(o!==void 0&&(o.kind!=="option"&&n.push(we(`${t}.kind`,"invalid_discriminator",'expected "option"')),Mr(o.annotation,`${t}.annotation`,["none","accept","reject","comment"],n),n.length===r))return{kind:"option",id:o.id,targetRef:o.targetRef,label:o.label,...typeof o.body=="string"?{body:o.body}:{},annotation:o.annotation,...typeof o.annotationComment=="string"?{annotationComment:o.annotationComment}:{},...typeof o.consequence=="string"?{consequence:o.consequence}:{}}},Ec=(e,t,n)=>{const r=n.length,o=Ve(e,t,["at","author","summary"],["at","author","summary"],["at","author","summary"],n);if(!(o===void 0||n.length!==r))return{at:o.at,author:o.author,summary:o.summary}},K0=(e,t,n)=>{if(!ls(e)){n.push(we(t,"invalid_type","expected an object"));return}const r=e.kind;if(r!=="prose"&&r!=="question"&&r!=="optionSet"&&r!=="outcome"&&r!=="amendmentTrace"&&r!=="diagram"){n.push(we(`${t}.kind`,typeof r>"u"?"missing_field":"unknown_node_kind",`unknown section kind ${typeof r=="string"?`"${r}"`:" discriminant"}`));return}const o=n.length;switch(r){case"prose":{const i=Ve(e,t,["kind","id","targetRef","markdown","questionId"],["kind","id","targetRef","markdown"],["id","targetRef","markdown","questionId"],n);return i===void 0||n.length!==o?void 0:{kind:"prose",id:i.id,targetRef:i.targetRef,markdown:i.markdown,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"question":{const i=Ve(e,t,["kind","id","targetRef","question","recommendedAnswer","answer","state","context","readingTimeMinutes","recommendedOptionId"],["kind","id","targetRef","question","state"],["id","targetRef","question","recommendedAnswer","answer","context","recommendedOptionId"],n);return i===void 0||(Mr(i.state,`${t}.state`,["open","answered","validated"],n),i.readingTimeMinutes!==void 0&&(typeof i.readingTimeMinutes!="number"||!Number.isFinite(i.readingTimeMinutes))&&n.push(we(`${t}.readingTimeMinutes`,"invalid_type","expected a finite number")),n.length!==o)?void 0:{kind:"question",id:i.id,targetRef:i.targetRef,question:i.question,...typeof i.recommendedAnswer=="string"?{recommendedAnswer:i.recommendedAnswer}:{},...typeof i.answer=="string"?{answer:i.answer}:{},state:i.state,...typeof i.context=="string"?{context:i.context}:{},...typeof i.recommendedOptionId=="string"?{recommendedOptionId:i.recommendedOptionId}:{},...typeof i.readingTimeMinutes=="number"?{readingTimeMinutes:i.readingTimeMinutes}:{}}}case"optionSet":{const i=Ve(e,t,["kind","id","targetRef","title","options","questionId"],["kind","id","targetRef","options"],["id","targetRef","title","questionId"],n);if(i===void 0)return;const s=[];return Array.isArray(i.options)?i.options.forEach((a,l)=>{const c=F0(a,`${t}.options[${l}]`,n);c!==void 0&&s.push(c)}):n.push(we(`${t}.options`,"invalid_type","expected an array")),n.length!==o?void 0:{kind:"optionSet",id:i.id,targetRef:i.targetRef,...typeof i.title=="string"?{title:i.title}:{},options:s,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"outcome":{const i=Ve(e,t,["kind","id","targetRef","modality","statement","questionId"],["kind","id","targetRef","modality","statement"],["id","targetRef","statement","questionId"],n);return i===void 0||(Mr(i.modality,`${t}.modality`,["decision","orientation","amendment","comment"],n),n.length!==o)?void 0:{kind:"outcome",id:i.id,targetRef:i.targetRef,modality:i.modality,statement:i.statement,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"amendmentTrace":{const i=Ve(e,t,["kind","id","targetRef","steps"],["kind","id","targetRef","steps"],["id","targetRef"],n);if(i===void 0)return;const s=[];return Array.isArray(i.steps)?i.steps.forEach((a,l)=>{const c=Ec(a,`${t}.steps[${l}]`,n);c!==void 0&&s.push(c)}):n.push(we(`${t}.steps`,"invalid_type","expected an array")),n.length!==o?void 0:{kind:"amendmentTrace",id:i.id,targetRef:i.targetRef,steps:s}}case"diagram":{const i=Ve(e,t,["kind","id","targetRef","syntax","source","alt","scene"],["kind","id","targetRef","syntax","source","alt"],["id","targetRef","source","alt"],n);return i===void 0||(Mr(i.syntax,`${t}.syntax`,["mermaid","plantuml"],n),i.scene!==void 0&&!ls(i.scene)&&n.push(we(`${t}.scene`,"invalid_type","expected a diagram-core SemanticDocument object")),n.length!==o)?void 0:{kind:"diagram",id:i.id,targetRef:i.targetRef,syntax:i.syntax,source:i.source,alt:i.alt,...i.scene===void 0?{}:{scene:i.scene}}}}},Y0=(e,t,n)=>{const r=n.length,o=Ve(e,t,["name","targetRef","label","enabled"],["name","targetRef","label","enabled"],["name","targetRef","label"],n);if(o!==void 0&&(o.enabled!==!1&&n.push(we(`${t}.enabled`,"enabled_action","snapshot interactions must stay disabled (enabled:false)")),n.length===r))return{name:o.name,targetRef:o.targetRef,label:o.label,enabled:!1}},Z0=(e,t,n)=>{const r=n.length,o=Ve(e,t,["term","definition"],["term","definition"],["term","definition"],n);if(!(o===void 0||n.length!==r))return{term:o.term,definition:o.definition}},X0=(e,t,n)=>{const r=n.length,o=Ve(e,t,["ownerRequestQuote","noOwnerRequest","stakes","stakesLevel","readingBudgetMinutes","glossary"],[],["ownerRequestQuote","stakes"],n);if(o===void 0)return;o.stakesLevel!==void 0&&Mr(o.stakesLevel,`${t}.stakesLevel`,["low","medium","high"],n),o.noOwnerRequest!==void 0&&typeof o.noOwnerRequest!="boolean"&&n.push(we(`${t}.noOwnerRequest`,"invalid_type","expected a boolean")),o.readingBudgetMinutes!==void 0&&(typeof o.readingBudgetMinutes!="number"||!Number.isFinite(o.readingBudgetMinutes))&&n.push(we(`${t}.readingBudgetMinutes`,"invalid_type","expected a finite number"));let i;if(o.glossary!==void 0&&(i=[],Array.isArray(o.glossary)?o.glossary.forEach((s,a)=>{const l=Z0(s,`${t}.glossary[${a}]`,n);l!==void 0&&i.push(l)}):n.push(we(`${t}.glossary`,"invalid_type","expected an array"))),n.length===r)return{...typeof o.ownerRequestQuote=="string"?{ownerRequestQuote:o.ownerRequestQuote}:{},...typeof o.noOwnerRequest=="boolean"?{noOwnerRequest:o.noOwnerRequest}:{},...typeof o.stakes=="string"?{stakes:o.stakes}:{},...o.stakesLevel!==void 0?{stakesLevel:o.stakesLevel}:{},...typeof o.readingBudgetMinutes=="number"?{readingBudgetMinutes:o.readingBudgetMinutes}:{},...i!==void 0?{glossary:i}:{}}},G0=e=>{const t=[],n=Ve(e,"$",[...W0],[...Sc],[...V0],t);if(n===void 0)return{ok:!1,issues:t};const r=[];Array.isArray(n.sections)?n.sections.forEach((c,u)=>{const h=K0(c,`$.sections[${u}]`,t);h!==void 0&&r.push(h)}):t.push(we("$.sections","invalid_type","expected an array"));const o=[];Array.isArray(n.interactions)?n.interactions.forEach((c,u)=>{const h=Y0(c,`$.interactions[${u}]`,t);h!==void 0&&o.push(h)}):t.push(we("$.interactions","invalid_type","expected an array"));let i;const s=Ve(n.provenance,"$.provenance",["source","readAt","comprehensionEvidence"],["source","readAt"],["source","readAt"],t);if(s!==void 0){let c;if(s.comprehensionEvidence!==void 0){const u=t.length,h=Ve(s.comprehensionEvidence,"$.provenance.comprehensionEvidence",["subject","dossierHash","signature"],["subject","dossierHash"],["subject","dossierHash","signature"],t);h!==void 0&&t.length===u&&(c={subject:h.subject,dossierHash:h.dossierHash,...typeof h.signature=="string"?{signature:h.signature}:{}})}i={source:s.source,readAt:s.readAt,...c!==void 0?{comprehensionEvidence:c}:{}}}const a=[];Array.isArray(n.amendmentTrace)?n.amendmentTrace.forEach((c,u)=>{const h=Ec(c,`$.amendmentTrace[${u}]`,t);h!==void 0&&a.push(h)}):t.push(we("$.amendmentTrace","invalid_type","expected an array"));let l;return n.readability!==void 0&&(l=X0(n.readability,"$.readability",t)),t.length>0||i===void 0||n.readability!==void 0&&l===void 0?{ok:!1,issues:t}:typeof n.ref!="string"||typeof n.subject!="string"||typeof n.title!="string"||typeof n.hash!="string"||typeof n.cursor!="string"?{ok:!1,issues:t}:{ok:!0,value:{ref:n.ref,subject:n.subject,title:n.title,hash:n.hash,cursor:n.cursor,sections:r,interactions:o,provenance:i,amendmentTrace:a,...l!==void 0?{readability:l}:{}}}},j0=e=>{const t=[],n=new Map,r=(s,a)=>{const l=n.get(s);l!==void 0?t.push(we(a,"duplicate_id",`node id "${s}" already used at ${l}`)):n.set(s,a)};e.sections.forEach((s,a)=>{const l=`$.sections[${a}]`;r(s.id,`${l}.id`),s.kind==="optionSet"&&s.options.forEach((c,u)=>{r(c.id,`${l}.options[${u}].id`)})});const o=new Set([e.ref]);for(const s of e.sections)if(o.add(s.id),o.add(s.targetRef),s.kind==="optionSet")for(const a of s.options)o.add(a.id),o.add(a.targetRef);e.interactions.forEach((s,a)=>{o.has(s.targetRef)||t.push(we(`$.interactions[${a}].targetRef`,"unresolved_target",`interaction target "${s.targetRef}" resolves to no node`))});const i=e.provenance.comprehensionEvidence;return i!==void 0&&i.dossierHash!==e.hash&&t.push(we("$.provenance.comprehensionEvidence.dossierHash","evidence_mismatch","comprehension evidence does not match the snapshot hash")),t},U0=e=>{const t=G0(e);if(!t.ok)return t;const n=j0(t.value);return n.length>0?{ok:!1,issues:n}:t},Q0=e=>{const t=U0(e);if(!t.ok)return t;const n=L0(t.value);return n.length>0?{ok:!1,issues:n}:t},J0=e=>{const t=Q0(e);if(!t.ok)throw new q0(t.issues);return t.value},$0=e=>{const t=J0(e),n=t.sections.filter(o=>o.kind==="optionSet"),r=t.sections.flatMap(o=>{if(o.kind==="optionSet")return[];if(o.kind!=="question")return[o];const i=n.filter(u=>u.questionId===o.id),s=i.flatMap(u=>u.options).find(u=>u.id===o.recommendedOptionId),a=o.recommendedAnswer.trim(),l=s.label.trim(),c=a.toLowerCase().startsWith(l.toLowerCase())&&/^(?:$|[\s,:;.!?—–-])/.test(a.slice(l.length));return[{...o,recommendedAnswer:c?a:`${l} — ${a}`},...i]});return{...t,sections:r}};var ey=Q("<h2>Votre demande</h2><blockquote> </blockquote><p> </p>",1),ty=Q("<dt> </dt><dd> </dd>",1),ny=Q('<aside aria-label="Glossaire"><h2>En mots simples</h2><dl></dl></aside>'),ry=Q('<p class="prose"> </p>'),Oo=Q("<p> </p>"),oy=Q('<h2> </h2><p> </p> <p class="recommendation"><!> </p> <p class="muted"> </p> <!>',1),iy=Q("<h3> </h3>"),sy=Q("<strong> </strong> <!> <p> </p><!> <!> <!>",1),ay=Q("<button><!></button>"),ly=Q('<!> <div class="options" role="group"></div> <p class="selection" aria-live="polite"> </p>',1),cy=Q("<h3>Conclusion proposée</h3><p> </p>",1),uy=Q('<section class="dossier-section"><!></section>'),dy=Q("<li> </li>"),fy=Q("<details><summary>Historique</summary><ul></ul></details>"),hy=Q('<main><div class="reading-meta"><!> </div> <!> <!> <!> <!> <footer><p>Vos sélections restent dans cette page jusqu’à sa fermeture. Elles ne valent pas décision enregistrée.</p> <details><summary>Source et version</summary><p> </p><p> </p></details></footer></main>'),gy=Q('<div class="focus-page"><header class="title-band"><h1> </h1> <!></header> <!></div>');function vy(e,t){oe(t,!0);let n=ue(Bt(matchMedia("(prefers-color-scheme: dark)").matches));const r=new Gd;let o=w(()=>t.document.sections.filter(u=>u.kind==="question")),i=w(()=>$0(t.document).sections),s=w(()=>d(i).filter(u=>u.kind==="optionSet"));const a=(u,h)=>d(s).filter(f=>f.questionId===u).flatMap(f=>f.options).find(f=>f.id===h)?.label,l=(u,h)=>d(o).find(f=>f.id===u.questionId)?.recommendedOptionId===h.id;let c=w(()=>[...t.document.amendmentTrace,...t.document.sections.filter(u=>u.kind==="amendmentTrace").flatMap(u=>u.steps)]);{let u=w(()=>d(n)?ef:$d);Xd(e,{get theme(){return d(u)},children:(h,f)=>{var g=gy(),v=Z(g),m=Z(v),b=Z(m),x=G(m,2);xd(x,{variant:"ghost",size:"sm",get"aria-pressed"(){return d(n)},onclick:()=>B(n,!d(n)),children:(C,p)=>{var _=ar();$(()=>ce(_,`Thème ${d(n)?"clair":"sombre"}`)),q(C,_)},$$slots:{default:!0}});var P=G(v,2);Td(P,{size:"full",children:(C,p)=>{var _=hy(),S=Z(_),N=Z(S);bi(N,{tone:"info",children:(L,H)=>{var Y=ar("Focus");q(L,Y)},$$slots:{default:!0}});var D=G(N),V=G(S,2);jr(V,{children:(L,H)=>{var Y=ey(),K=G(de(Y)),U=Z(K),j=G(K),X=Z(j);$(()=>{ce(U,t.document.readability.ownerRequestQuote),ce(X,t.document.readability.stakes)}),q(L,Y)},$$slots:{default:!0}});var W=G(V,2);{var I=L=>{var H=ny(),Y=G(Z(H));en(Y,21,()=>t.document.readability.glossary,lr,(K,U)=>{var j=ty(),X=de(j),J=Z(X),me=G(X),le=Z(me);$(()=>{ce(J,d(U).term),ce(le,d(U).definition)}),q(K,j)}),q(L,H)};pe(W,L=>{t.document.readability.glossary?.length&&L(I)})}var T=G(W,2);en(T,17,()=>d(i),lr,(L,H)=>{var Y=uy(),K=Z(Y);{var U=le=>{var re=ry(),_e=Z(re);$(()=>ce(_e,d(H).markdown)),q(le,re)},j=le=>{var re=oy(),_e=de(re),ge=Z(_e),Se=G(_e),We=Z(Se),Qe=G(Se,2),Ce=Z(Qe);bi(Ce,{tone:"success",children:(Ke,it)=>{var Gn=ar("Recommandation");q(Ke,Gn)},$$slots:{default:!0}});var te=G(Ce),ye=G(Qe,2),Fe=Z(ye),be=G(ye,2);{var ot=Ke=>{var it=Oo(),Gn=Z(it);$(()=>ce(Gn,`Réponse enregistrée : ${d(H).answer??""}`)),q(Ke,it)};pe(be,Ke=>{d(H).answer&&Ke(ot)})}$(()=>{ce(ge,d(H).question),ce(We,d(H).context),ce(te,` ${d(H).recommendedAnswer??""}`),ce(Fe,`${d(H).readingTimeMinutes??""} minute(s) · ${d(H).state==="open"?"Question ouverte":d(H).state==="answered"?"Réponse reçue":"Décision validée"}`)}),q(le,re)},X=le=>{var re=ly(),_e=de(re);{var ge=Ce=>{var te=iy(),ye=Z(te);$(()=>ce(ye,d(H).title)),q(Ce,te)};pe(_e,Ce=>{d(H).title&&Ce(ge)})}var Se=G(_e,2);en(Se,21,()=>d(H).options,lr,(Ce,te)=>{var ye=ay();let Fe;var be=Z(ye);jr(be,{children:(ot,Ke)=>{var it=sy(),Gn=de(it),my=Z(Gn),Tc=G(Gn,2);{var yy=De=>{bi(De,{tone:"success",children:(It,jn)=>{var Ey=ar("Recommandée");q(It,Ey)},$$slots:{default:!0}})},by=w(()=>l(d(H),d(te)));pe(Tc,De=>{d(by)&&De(yy)})}var Cc=G(Tc,2),wy=Z(Cc),Ac=G(Cc);{var _y=De=>{var It=Oo(),jn=Z(It);$(()=>ce(jn,d(te).body)),q(De,It)};pe(Ac,De=>{d(te).body&&De(_y)})}var Mc=G(Ac,2);{var xy=De=>{var It=Oo(),jn=Z(It);$(()=>ce(jn,`Annotation source : ${d(te).annotation??""}`)),q(De,It)};pe(Mc,De=>{d(te).annotation!=="none"&&De(xy)})}var ky=G(Mc,2);{var Sy=De=>{var It=Oo(),jn=Z(It);$(()=>ce(jn,d(te).annotationComment)),q(De,It)};pe(ky,De=>{d(te).annotationComment&&De(Sy)})}$(()=>{ce(my,d(te).label),ce(wy,d(te).consequence)}),q(ot,it)},$$slots:{default:!0}}),$((ot,Ke)=>{Fe=Ft(ye,1,"option-card",null,Fe,ot),ne(ye,"aria-pressed",Ke)},[()=>({selected:r.get(d(H).questionId)===d(te).id}),()=>r.get(d(H).questionId)===d(te).id]),Vt("click",ye,()=>r.set(d(H).questionId,d(te).id)),q(Ce,ye)});var We=G(Se,2),Qe=Z(We);$(Ce=>{ne(Se,"aria-label",d(H).title??"Options"),ce(Qe,Ce)},[()=>r.get(d(H).questionId)?`Sélection locale : ${a(d(H).questionId,r.get(d(H).questionId))}. Communiquez ce choix au présentateur pour l’enregistrer.`:"Sélectionnez une option pour préparer votre réponse."]),q(le,re)},J=le=>{B0(le,{get document(){return d(H).scene},get dark(){return d(n)},get alt(){return d(H).alt}})},me=le=>{jr(le,{children:(re,_e)=>{var ge=cy(),Se=G(de(ge)),We=Z(Se);$(()=>ce(We,d(H).statement)),q(re,ge)},$$slots:{default:!0}})};pe(K,le=>{d(H).kind==="prose"?le(U):d(H).kind==="question"?le(j,1):d(H).kind==="optionSet"?le(X,2):d(H).kind==="diagram"?le(J,3):d(H).kind==="outcome"&&le(me,4)})}$(()=>ne(Y,"id",d(H).id)),q(L,Y)});var A=G(T,2);{var y=L=>{var H=fy(),Y=G(Z(H));en(Y,21,()=>d(c),lr,(K,U)=>{var j=dy(),X=Z(j);$(()=>ce(X,`${d(U).at??""} · ${d(U).author??""} : ${d(U).summary??""}`)),q(K,j)}),q(L,H)};pe(A,L=>{d(c).length&&L(y)})}var E=G(A,2),M=G(Z(E),2),k=G(Z(M)),z=Z(k),O=G(k),R=Z(O);$(()=>{ce(D,` ${d(o).length??""} question(s) · ${t.document.readability.readingBudgetMinutes??""} minutes`),ce(z,`${t.document.provenance.source??""} · ${t.document.provenance.readAt??""}`),ce(R,`${t.document.ref??""} · ${t.document.cursor??""} · ${t.document.hash??""}`)}),q(C,_)},$$slots:{default:!0}}),$(()=>{ne(g,"data-mode",d(n)?"dark":"light"),ce(b,t.document.title)}),q(h,g)},$$slots:{default:!0}})}ie()}Yr(["click"]);const py=JSON.parse(document.querySelector("[data-focus-document]").textContent);Zu(vy,{target:document.getElementById("app"),props:py})})();
|
|
278
|
+
</script></body></html>
|