diff --git a/app/public/assets/posts/encode-policy-multi-agent-ai-cover.png b/app/public/assets/posts/encode-policy-multi-agent-ai-cover.png new file mode 100644 index 000000000..edea6065d Binary files /dev/null and b/app/public/assets/posts/encode-policy-multi-agent-ai-cover.png differ diff --git a/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-BJx1p784.css b/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-BJx1p784.css new file mode 100644 index 000000000..6a04f87ab --- /dev/null +++ b/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-BJx1p784.css @@ -0,0 +1 @@ +:root{--bg-diagram: #f9f8f6;--bg-card: #ffffff;--grid-color: rgba(13, 115, 119, .08);--accent: #0d7377;--accent-light: rgba(13, 115, 119, .1);--accent-mid: rgba(13, 115, 119, .2);--text-dark: #1e3a3a;--text-mid: #4a6363;--text-light: #7a9494;--border: #d4dede;--border-accent: rgba(13, 115, 119, .4);--warning: #b45309;--warning-bg: rgba(180, 83, 9, .08)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:"Source Serif 4",Georgia,serif;line-height:1.9;color:#2d3748;background:#f7f8fa}.scrolly-container{max-width:1400px;margin:0 auto;padding:40px 20px}.article-wrapper{background:#fff;padding:80px 120px;box-shadow:0 4px 40px #0000000f;border-radius:3px}h1{font-family:"Source Serif 4",Georgia,serif;font-size:3rem;font-weight:700;color:#1a202c;margin-bottom:20px;line-height:1.2;letter-spacing:-.02em}.subtitle{font-size:1.4rem;color:#64748b;font-style:italic;margin-bottom:50px;padding-bottom:50px;border-bottom:1px solid #e2e8f0}h2{font-family:"Source Serif 4",Georgia,serif;font-size:2rem;font-weight:700;color:#1a202c;margin-top:70px;margin-bottom:30px;letter-spacing:-.01em}h3{font-size:1.4rem;font-weight:600;color:#2d3748;margin-top:40px;margin-bottom:20px}p{margin-bottom:24px;font-size:1.2rem;color:#4a5568}ul,ol{margin-bottom:24px;padding-left:32px}li{margin-bottom:12px;font-size:1.2rem;color:#4a5568}strong{color:#1a202c;font-weight:600}code{font-family:JetBrains Mono,monospace;background:#f1f5f9;padding:3px 8px;border-radius:4px;font-size:.9em;color:#0f766e}pre{background:#1e2d2f;color:#e8f0f0;padding:28px 32px;border-radius:8px;overflow-x:auto;margin-bottom:30px;font-family:JetBrains Mono,monospace;font-size:1rem;line-height:1.7;border:1px solid #2d4244}pre code{background:none;padding:0;color:inherit}hr{border:none;border-top:1px solid #e2e8f0;margin:60px 0}a{color:#0f766e;text-decoration:none;border-bottom:1px solid rgba(15,118,110,.3);transition:border-color .2s}a:hover{border-color:#0f766e}.footer{margin-top:60px;padding-top:40px;border-top:1px solid #e2e8f0;font-size:1.1rem;color:#64748b;font-style:italic}.iteration-container{margin:30px 0}.iteration-hint{text-align:center;color:var(--text-light);font-family:JetBrains Mono,monospace;font-size:.75rem;margin-bottom:12px}.iteration-cards{display:flex;gap:12px;margin-bottom:20px}.iteration-card{flex:1;background:var(--bg-card);border:2px solid var(--border);border-radius:10px;padding:16px 14px;text-align:center;cursor:pointer;transition:all .25s ease;position:relative}.iteration-card:after{content:"";position:absolute;bottom:-12px;left:50%;transform:translate(-50%) scaleY(0);width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--accent);transition:transform .2s ease;transform-origin:top}.iteration-card:hover{border-color:var(--accent);transform:translateY(-4px);box-shadow:0 8px 30px #0d737726}.iteration-card.active{background:var(--accent);border-color:var(--accent);transform:translateY(-4px);box-shadow:0 8px 30px #0d737733}.iteration-card.active:after{transform:translate(-50%) scaleY(1)}.iteration-num{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:var(--accent);color:#fff;border-radius:50%;font-family:JetBrains Mono,monospace;font-size:1rem;font-weight:700;margin:0 auto 10px}.iteration-card.active .iteration-num{background:#fff;color:var(--accent)}.iteration-title{font-family:JetBrains Mono,monospace;font-size:.9rem;font-weight:600;color:var(--text-dark);margin-bottom:4px}.iteration-card.active .iteration-title{color:#fff}.iteration-subtitle{font-family:"Source Serif 4",Georgia,serif;font-size:.8rem;color:var(--text-light);line-height:1.3}.iteration-card.active .iteration-subtitle{color:#fffc}.iteration-connector{display:flex;align-items:center;color:var(--text-light);font-size:1.2rem;padding:0 2px;margin-top:20px}.iteration-panel{background:var(--bg-diagram);border:2px solid var(--accent);border-radius:12px;padding:24px 32px;overflow:hidden}.iteration-panel p{margin:10px 0;line-height:1.7;font-size:1.05rem}.scrollytelling-container{display:flex;gap:40px;position:relative;margin:40px 0}.scrolly-narrative{flex:1;min-width:0}.scrolly-sticky{flex:0 0 420px;position:sticky;top:40px;height:fit-content;align-self:flex-start}.narrative-step{min-height:90vh;padding:40px 0;opacity:.3;transition:opacity .4s ease}.narrative-step.active{opacity:1}.narrative-step:first-child{padding-top:0}.narrative-step:last-child{min-height:auto;padding-bottom:100px}.step-header{display:flex;align-items:baseline;gap:12px;margin-bottom:20px}.step-number{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:var(--accent);color:#fff;border-radius:50%;font-family:JetBrains Mono,monospace;font-size:.95rem;font-weight:700;flex-shrink:0}.step-title{font-family:JetBrains Mono,monospace;font-size:1.3rem;font-weight:600;color:var(--text-dark)}.step-subtitle{font-size:.9rem;color:var(--text-light);margin-left:8px}.step-diagram{background:var(--bg-diagram);background-image:radial-gradient(circle,var(--grid-color) 1px,transparent 1px);background-size:20px 20px;border-radius:12px;padding:32px 40px;margin-bottom:28px;border:1px solid var(--border);display:flex;justify-content:center;align-items:center;overflow-x:auto}.full-width-flow-svg{width:100%;max-width:100%;height:auto;min-height:160px}.full-width-flow-svg .network-node{fill:var(--bg-card);stroke:var(--accent);stroke-width:2}.full-width-flow-svg .network-line{stroke:var(--text-mid);stroke-width:2;stroke-dasharray:6 4;fill:none}.full-width-flow-svg .network-label{font-family:JetBrains Mono,monospace;font-size:13px;fill:var(--text-mid);text-anchor:middle}.full-width-flow-svg .flow-arrow{fill:var(--accent)}.full-width-flow-svg .svg-icon{color:var(--text-mid);pointer-events:none}.full-width-flow-svg .loop-indicator{fill:#0d737708;stroke:var(--accent);stroke-width:2.5;stroke-dasharray:12 6;opacity:.7;animation:rotateLoop 6s linear infinite}.step-content{padding-left:0}.step-content p{font-size:1.1rem;line-height:1.8;margin-bottom:20px}.wins-shortcomings{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.wins,.shortcomings{padding:20px;border-radius:10px}.wins{background:#10b98114;border:1px solid rgba(16,185,129,.2)}.shortcomings{background:#ef44440f;border:1px solid rgba(239,68,68,.15)}.wins-title,.shortcomings-title{font-family:JetBrains Mono,monospace;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;margin-bottom:12px;display:flex;align-items:center;gap:8px}.wins-title{color:#059669}.shortcomings-title{color:#dc2626}.wins ul,.shortcomings ul{list-style:none;padding:0;margin:0}.wins li,.shortcomings li{font-size:.95rem;padding:6px 0 6px 20px;position:relative;margin:0}.wins li:before{content:"✓";position:absolute;left:0;color:#059669;font-weight:600}.shortcomings li:before{content:"✗";position:absolute;left:0;color:#dc2626;font-weight:600}.insight-box{background:linear-gradient(135deg,var(--accent-light) 0%,rgba(13,115,119,.05) 100%);border-left:4px solid var(--accent);padding:20px 24px;margin:28px 0;border-radius:0 10px 10px 0}.insight-box p{margin:0;font-size:1.05rem;color:var(--text-dark);font-style:italic}.insight-label{font-family:JetBrains Mono,monospace;font-size:.7rem;font-weight:600;color:var(--accent);text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px}.inline-code-example{background:#1e2d2f;border-radius:8px;overflow:hidden;margin:20px 0;border:1px solid #2d4244}.inline-code-title{background:#253538;padding:10px 16px;font-family:JetBrains Mono,monospace;font-size:.75rem;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid #2d4244}.inline-code-block{background:transparent;border:none;padding:16px 20px;margin:0;font-family:JetBrains Mono,monospace;font-size:.85rem;line-height:1.6;color:#e8f0f0;overflow-x:auto}.inline-code-block code{background:none;padding:0;color:inherit;font-size:inherit}.inline-diagram{background:var(--bg-diagram);border-radius:10px;overflow:hidden;margin:0 0 24px;border:1px solid var(--border)}.inline-diagram-title{background:var(--accent-light);padding:10px 16px;font-family:JetBrains Mono,monospace;font-size:.75rem;font-weight:600;color:var(--accent);text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid var(--border)}.inline-diagram-content{padding:16px 20px;display:flex;justify-content:center;align-items:center}.inline-flow-svg{width:100%;max-width:500px;height:auto}.example-panel{background:var(--bg-card);border-radius:12px;overflow:hidden;box-shadow:0 1px 3px #0d737714,0 8px 24px #0d73771f;border:2px solid var(--accent)}.example-panel.diagram-only{background:var(--bg-diagram)}.example-header{background:var(--bg-diagram);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.example-panel.diagram-only .example-header{background:var(--bg-diagram);border-bottom:1px solid var(--border)}.example-title{font-family:JetBrains Mono,monospace;font-size:.9rem;font-weight:600;color:var(--text-dark);letter-spacing:.02em}.example-badge{background:var(--accent);color:#fff;padding:5px 12px;border-radius:6px;font-family:JetBrains Mono,monospace;font-size:.7rem;font-weight:600;letter-spacing:.03em}.example-tabs{display:flex;gap:0;background:var(--bg-card);border-bottom:1px solid var(--border)}.example-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px 16px;background:transparent;border:none;cursor:pointer;font-family:JetBrains Mono,monospace;font-size:.75rem;color:var(--text-mid);transition:all .2s ease;position:relative}.example-tab:hover{background:var(--accent-light);color:var(--text-dark)}.example-tab.active{background:var(--accent-light);color:var(--accent)}.example-tab.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--accent)}.example-tab .tab-icon{font-size:.9rem}.example-tab .tab-label{font-weight:500}.example-file-status.success{background:#10b98126;color:#059669}.example-file-status.warning{background:#b4530926;color:#b45309}.example-body{padding:20px 24px 24px;min-height:400px;background:var(--bg-diagram)}.example-file-header{font-family:JetBrains Mono,monospace;font-size:.9rem;font-weight:600;color:var(--text-dark);margin-bottom:20px;padding-bottom:12px;border-bottom:1px solid var(--border)}.example-panel.diagram-only .example-body{padding:20px;min-height:350px;display:flex;flex-direction:column}.diagram-title{font-family:JetBrains Mono,monospace;font-size:1.1rem;font-weight:600;color:var(--text-dark);text-align:center;margin-bottom:20px;padding-bottom:12px;border-bottom:1px solid var(--border)}.diagram-container{flex:1;display:flex;align-items:center;justify-content:center;padding:10px}.diagram-container .flow-diagram-svg{width:100%;height:auto;max-height:320px}.example-section{margin-bottom:2px}.example-section:last-child{margin-bottom:0}.example-section-title{font-family:JetBrains Mono,monospace;font-size:.65rem;font-weight:600;color:var(--accent);text-transform:uppercase;letter-spacing:.12em;margin-top:0;margin-bottom:4px;display:flex;align-items:center;gap:8px}.example-section-title:after{content:"";flex:1;height:1px;background:var(--border)}.example-code{background:linear-gradient(135deg,#f5f7f7 0%,var(--bg-diagram) 100%);border-radius:8px;padding:16px 18px;font-family:JetBrains Mono,monospace;font-size:.82rem;line-height:1.7;color:var(--text-dark);overflow-x:auto;border:1px solid var(--border);box-shadow:inset 0 1px 3px #0000000a}.example-code .comment{color:var(--text-light);font-style:italic}.example-code .keyword{color:var(--accent);font-weight:500}.example-code .string{color:#047857}.example-code .number{color:#b45309}.example-code .error{color:#dc2626}.example-code .success{color:#059669}.example-file{display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--bg-card);border-radius:8px;margin-bottom:12px;border:1px solid var(--border);box-shadow:0 1px 3px #0000000a}.example-file-icon{font-size:1.1rem}.example-file-name{font-family:JetBrains Mono,monospace;font-size:.85rem;font-weight:500;color:var(--text-dark)}.example-file-status{margin-left:auto;font-size:.75rem;padding:2px 8px;border-radius:4px;font-family:JetBrains Mono,monospace}.example-file-status.created{background:#10b98126;color:#059669}.example-file-status.error{background:#dc26261f;color:#dc2626}.example-output{background:var(--bg-card);border-radius:8px;padding:16px 18px;font-family:JetBrains Mono,monospace;font-size:.8rem;border:1px solid var(--border)}.example-output-line{display:flex;align-items:flex-start;gap:10px;color:var(--text-mid);transition:background .15s ease;margin:0 -8px;padding:2px 8px;border-radius:4px}.example-output-line:hover{background:var(--accent-light)}.example-output-line .icon{flex-shrink:0;font-weight:600}.example-output-line.error{color:#dc2626}.example-output-line.error:hover{background:#dc262614}.example-output-line.success{color:#059669}.example-output-line.success:hover{background:#05966914}.example-output-line.warning{color:#b45309}.example-output-line.warning:hover{background:#b4530914}.example-diagram{background:var(--bg-diagram);border-radius:8px;padding:20px;margin-top:16px}.example-diagram svg{width:100%;height:auto}.example-diagram-container{background:var(--bg-diagram);border-radius:8px;padding:16px;border:1px solid var(--border)}.flow-diagram-svg{width:100%;height:auto;display:block}@media(max-width:1100px){.scrollytelling-container{flex-direction:column}.scrolly-sticky{position:relative;top:0;flex:none;width:100%;order:-1;margin-bottom:30px}.narrative-step{min-height:auto;padding:30px 0;opacity:1}}@media(max-width:768px){.wins-shortcomings{grid-template-columns:1fr}}.principles-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:40px 0}.principle-card{background:var(--bg-card);border:2px solid var(--border);border-radius:12px;padding:32px 28px;transition:all .25s ease;position:relative;overflow:hidden}.principle-card:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--accent);transform:scaleX(0);transform-origin:left;transition:transform .3s ease}.principle-card:hover{border-color:var(--accent);transform:translateY(-6px);box-shadow:0 12px 40px #0d73771f}.principle-card:hover:before{transform:scaleX(1)}.principle-icon{width:56px;height:56px;background:var(--accent-light);border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:20px;color:var(--accent)}.principle-icon svg{width:28px;height:28px}.principle-title{font-family:JetBrains Mono,monospace;font-size:1.1rem;font-weight:600;color:var(--text-dark);margin-bottom:12px}.principle-desc{font-family:"Source Serif 4",Georgia,serif;font-size:1.05rem;color:var(--text-mid);line-height:1.7;margin:0}.principles-bottom{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;max-width:820px;margin:0 auto}.workflow-timeline{background:var(--bg-diagram);background-image:radial-gradient(circle,var(--grid-color) 1px,transparent 1px);background-size:20px 20px;border-radius:16px;padding:50px 40px;margin:40px 0;border:1px solid var(--border)}.workflow-header{text-align:center;margin-bottom:40px}.workflow-command{display:inline-block;background:var(--accent);color:#fff;padding:14px 32px;border-radius:10px;font-family:JetBrains Mono,monospace;font-size:1.2rem;font-weight:600}.workflow-command-label{font-family:JetBrains Mono,monospace;font-size:.7rem;color:var(--text-light);text-transform:uppercase;letter-spacing:.15em;margin-bottom:10px}.timeline-phases{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;position:relative}.timeline-phases:before{content:"";position:absolute;top:25px;left:12%;right:12%;height:3px;background:linear-gradient(90deg,var(--accent) 0%,var(--accent) 100%);z-index:0}.timeline-phase{position:relative;z-index:1}.timeline-phase-header{text-align:center;margin-bottom:16px;transition:transform .2s ease}.timeline-phase-header:hover{transform:scale(1.05)}.timeline-phase-header:hover .timeline-phase-num{box-shadow:0 6px 20px #0d737766}.timeline-phase-num{display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;background:var(--accent);color:#fff;border-radius:50%;font-family:JetBrains Mono,monospace;font-size:1.2rem;font-weight:700;margin-bottom:10px;box-shadow:0 4px 15px #0d73774d}.timeline-phase-title{font-family:JetBrains Mono,monospace;font-size:1rem;font-weight:600;color:var(--text-dark)}.timeline-phase-chevron{display:inline-flex;align-items:center;justify-content:center;margin-top:8px;color:var(--accent);transition:transform .3s ease}.timeline-phase-chevron.expanded{transform:rotate(180deg)}.timeline-phase-card{background:var(--bg-card);border:2px solid var(--border);border-radius:12px;padding:24px 20px;min-height:280px;transition:all .25s ease}.timeline-phase-card:hover{border-color:var(--accent);box-shadow:0 8px 30px #0d73771a}.timeline-agents{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}.timeline-agent{background:var(--accent-light);color:var(--accent);padding:4px 10px;border-radius:4px;font-family:JetBrains Mono,monospace;font-size:.7rem;font-weight:500}.timeline-phase-desc{font-size:.95rem;color:var(--text-mid);line-height:1.6;margin:0}.timeline-phase-desc strong{color:var(--text-dark)}.timeline-steps{list-style:none;padding:0;margin:12px 0 0}.timeline-steps li{font-size:.9rem;color:var(--text-mid);padding:4px 0 4px 18px;position:relative}.timeline-steps li:before{content:"→";position:absolute;left:0;color:var(--accent)}.results-section{margin:40px 0}.results-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:40px}.stat-card{background:linear-gradient(135deg,var(--accent) 0%,#0a5d60 100%);border-radius:16px;padding:36px 28px;text-align:center;color:#fff;position:relative;overflow:hidden}.stat-card:before{content:"";position:absolute;top:-50%;right:-50%;width:100%;height:100%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 60%)}.stat-number{font-family:JetBrains Mono,monospace;font-size:3rem;font-weight:700;margin-bottom:8px;position:relative}.stat-label{font-family:"Source Serif 4",Georgia,serif;font-size:1.1rem;opacity:.9;position:relative}.stat-detail{font-size:.85rem;opacity:.75;margin-top:8px;position:relative}.results-description{background:var(--bg-diagram);border-radius:12px;padding:28px 32px;border-left:4px solid var(--accent)}.results-description p{margin:0;font-size:1.1rem}.terminal-container{background:#1a1a2e;border-radius:12px;overflow:hidden;margin:30px 0;box-shadow:0 8px 30px #0003}.terminal-header{background:#16162a;padding:12px 16px;display:flex;align-items:center;gap:8px}.terminal-dot{width:12px;height:12px;border-radius:50%}.terminal-dot.red{background:#ff5f57}.terminal-dot.yellow{background:#febc2e}.terminal-dot.green{background:#28c840}.terminal-title{margin-left:12px;font-family:JetBrains Mono,monospace;font-size:.8rem;color:#666}.terminal-body{padding:24px 28px}.terminal-body pre{background:transparent;border:none;padding:0;margin:0;color:#e8f0f0}.terminal-body code{background:transparent;color:inherit;font-size:1rem}.terminal-comment{color:#6b7280}.terminal-command{color:#10b981}.next-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:28px;margin:40px 0}.next-card{background:var(--bg-card);border:2px solid var(--border);border-radius:12px;padding:32px 28px;position:relative;transition:all .25s ease}.next-card:hover{border-color:var(--accent);transform:translateY(-4px);box-shadow:0 12px 40px #0d73771a}.next-card-badge{display:inline-block;background:var(--accent-light);color:var(--accent);padding:6px 14px;border-radius:20px;font-family:JetBrains Mono,monospace;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:16px}.next-card-title{font-family:JetBrains Mono,monospace;font-size:1.2rem;font-weight:600;color:var(--text-dark);margin-bottom:14px}.next-card-desc{font-size:1.05rem;color:var(--text-mid);line-height:1.7;margin:0}.agent-flow-container{background:var(--bg-diagram);background-image:radial-gradient(circle,var(--grid-color) 1px,transparent 1px);background-size:20px 20px;border-radius:12px;padding:60px 40px 50px;margin:50px 0;position:relative;border:1px solid var(--border);box-shadow:inset 0 2px 8px #00000008;overflow-x:auto}.agent-flow-container:before{content:"AGENT FLOW";position:absolute;top:18px;left:24px;font-family:JetBrains Mono,monospace;font-size:.7rem;font-weight:600;letter-spacing:.2em;color:var(--text-light);text-transform:uppercase}.agent-flow-svg{display:block;margin:0 auto;max-width:100%;height:auto}.agent-flow-svg .network-node{fill:var(--bg-card);stroke:var(--accent);stroke-width:2}.agent-flow-svg .network-line{stroke:var(--text-mid);stroke-width:2;stroke-dasharray:6 4;fill:none}.agent-flow-svg .network-line.thick{stroke-width:2.5}.agent-flow-svg .network-label{font-family:JetBrains Mono,monospace;font-size:13px;fill:var(--text-mid);text-anchor:middle}.agent-flow-svg .group-label{font-family:JetBrains Mono,monospace;font-size:14px;font-weight:600;fill:var(--accent);text-anchor:middle;text-transform:uppercase;letter-spacing:.05em}.agent-flow-svg .flow-arrow{fill:var(--accent)}.agent-flow-svg .svg-icon{color:var(--text-mid);pointer-events:none}.agent-flow-svg .loop-indicator{fill:#0d737708;stroke:var(--accent);stroke-width:2.5;stroke-dasharray:12 6;opacity:.7;animation:rotateLoop 6s linear infinite}@keyframes rotateLoop{0%{stroke-dashoffset:0}to{stroke-dashoffset:-72}}.agent-flow-svg .loop-label{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;font-style:italic;fill:#1a202c;text-anchor:middle;letter-spacing:.03em}.stage-diagram{padding:30px 20px 25px;margin:25px auto;max-width:100%;overflow-x:auto}.stage-diagram svg{display:block;margin:0 auto;width:100%;height:auto}.stages-diagram-container{background:var(--bg-diagram);border-radius:12px;padding:20px;margin:30px 0;border:1px solid var(--border);overflow-x:auto}.stages-diagram-svg{display:block;margin:0 auto;width:100%;max-width:1100px;height:auto;min-height:400px}.stages-diagram-svg .network-node{fill:var(--bg-card);stroke:var(--accent);stroke-width:2}.stages-diagram-svg .network-line{stroke:var(--text-mid);stroke-width:1.5;stroke-dasharray:5 3;fill:none}.stages-diagram-svg .network-label{font-family:JetBrains Mono,monospace;font-size:11px;fill:var(--text-mid);text-anchor:middle}.stages-diagram-svg .svg-icon{color:var(--text-mid);pointer-events:none}.stages-diagram-svg .loop-indicator{fill:#0d737708;stroke:var(--accent);stroke-width:2.5;stroke-dasharray:12 6;opacity:.6;animation:rotateLoop 6s linear infinite}@media(max-width:1200px){.article-wrapper{padding:60px}h1{font-size:2.4rem}.principles-grid{grid-template-columns:repeat(2,1fr)}.principles-bottom{grid-template-columns:1fr;max-width:100%}.timeline-phases{grid-template-columns:repeat(2,1fr)}.timeline-phases:before{display:none}}@media(max-width:768px){.article-wrapper{padding:30px 25px}h1{font-size:1.8rem}.iteration-cards{flex-direction:column}.iteration-connector{display:none}.principles-grid,.timeline-phases,.results-stats,.next-cards{grid-template-columns:1fr}}.step-diagram.clickable{cursor:zoom-in;position:relative;transition:all .2s ease}.step-diagram.clickable:hover{border-color:var(--accent);box-shadow:0 4px 20px #0d737726}.step-diagram.clickable:hover .expand-hint{opacity:1}.expand-hint{position:absolute;bottom:12px;right:16px;background:var(--accent);color:#fff;padding:6px 12px;border-radius:6px;font-family:JetBrains Mono,monospace;font-size:.7rem;font-weight:500;opacity:0;transition:opacity .2s ease;pointer-events:none}.diagram-modal-overlay{position:fixed;inset:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:9999;padding:40px;cursor:zoom-out}.diagram-modal-content{background:var(--bg-diagram);background-image:radial-gradient(circle,var(--grid-color) 1px,transparent 1px);background-size:20px 20px;border-radius:16px;padding:32px 40px 40px;max-width:95vw;max-height:90vh;overflow:auto;position:relative;cursor:default;box-shadow:0 20px 60px #0006;border:2px solid var(--accent)}.diagram-modal-close{position:absolute;top:16px;right:20px;background:var(--accent);color:#fff;border:none;width:36px;height:36px;border-radius:50%;font-size:24px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.diagram-modal-close:hover{background:#0a5d60;transform:scale(1.1)}.diagram-modal-title{font-family:JetBrains Mono,monospace;font-size:1.2rem;font-weight:600;color:var(--text-dark);margin-bottom:24px;padding-right:50px}.diagram-modal-diagram{display:flex;justify-content:center;align-items:center;min-width:800px}.diagram-modal-diagram svg{width:100%;height:auto;max-height:70vh}@media(max-width:900px){.diagram-modal-overlay{padding:20px}.diagram-modal-content{padding:24px}.diagram-modal-diagram{min-width:auto}} diff --git a/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-DC8RyDPP.js b/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-DC8RyDPP.js new file mode 100644 index 000000000..d85938477 --- /dev/null +++ b/app/public/assets/posts/encode-policy-multi-agent-ai/assets/index-DC8RyDPP.js @@ -0,0 +1,184 @@ +(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const d of m.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function o(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=o(f);fetch(f.href,m)}})();function lv(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Uu={exports:{}},sl={};var gp;function sv(){if(gp)return sl;gp=1;var i=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(r,f,m){var d=null;if(m!==void 0&&(d=""+m),f.key!==void 0&&(d=""+f.key),"key"in f){m={};for(var p in f)p!=="key"&&(m[p]=f[p])}else m=f;return f=m.ref,{$$typeof:i,type:r,key:d,ref:f!==void 0?f:null,props:m}}return sl.Fragment=l,sl.jsx=o,sl.jsxs=o,sl}var xp;function rv(){return xp||(xp=1,Uu.exports=sv()),Uu.exports}var c=rv(),Hu={exports:{}},at={};var vp;function ov(){if(vp)return at;vp=1;var i=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),T=Symbol.iterator;function w(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,G={};function U(A,k,X){this.props=A,this.context=k,this.refs=G,this.updater=X||N}U.prototype.isReactComponent={},U.prototype.setState=function(A,k){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,k,"setState")},U.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function q(){}q.prototype=U.prototype;function V(A,k,X){this.props=A,this.context=k,this.refs=G,this.updater=X||N}var Z=V.prototype=new q;Z.constructor=V,H(Z,U.prototype),Z.isPureReactComponent=!0;var Q=Array.isArray;function nt(){}var F={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function it(A,k,X){var $=X.ref;return{$$typeof:i,type:A,key:k,ref:$!==void 0?$:null,props:X}}function yt(A,k){return it(A.type,k,A.props)}function gt(A){return typeof A=="object"&&A!==null&&A.$$typeof===i}function Nt(A){var k={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(X){return k[X]})}var Jt=/\/+/g;function Ht(A,k){return typeof A=="object"&&A!==null&&A.key!=null?Nt(""+A.key):k.toString(36)}function Qt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(nt,nt):(A.status="pending",A.then(function(k){A.status==="pending"&&(A.status="fulfilled",A.value=k)},function(k){A.status==="pending"&&(A.status="rejected",A.reason=k)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function z(A,k,X,$,lt){var ut=typeof A;(ut==="undefined"||ut==="boolean")&&(A=null);var St=!1;if(A===null)St=!0;else switch(ut){case"bigint":case"string":case"number":St=!0;break;case"object":switch(A.$$typeof){case i:case l:St=!0;break;case v:return St=A._init,z(St(A._payload),k,X,$,lt)}}if(St)return lt=lt(A),St=$===""?"."+Ht(A,0):$,Q(lt)?(X="",St!=null&&(X=St.replace(Jt,"$&/")+"/"),z(lt,k,X,"",function(ha){return ha})):lt!=null&&(gt(lt)&&(lt=yt(lt,X+(lt.key==null||A&&A.key===lt.key?"":(""+lt.key).replace(Jt,"$&/")+"/")+St)),k.push(lt)),1;St=0;var se=$===""?".":$+":";if(Q(A))for(var Vt=0;Vt>>1,dt=z[ot];if(0>>1;otf(X,P))$f(lt,X)?(z[ot]=lt,z[$]=P,ot=$):(z[ot]=X,z[k]=P,ot=k);else if($f(lt,P))z[ot]=lt,z[$]=P,ot=$;else break t}}return B}function f(z,B){var P=z.sortIndex-B.sortIndex;return P!==0?P:z.id-B.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var d=Date,p=d.now();i.unstable_now=function(){return d.now()-p}}var y=[],g=[],v=1,b=null,T=3,w=!1,N=!1,H=!1,G=!1,U=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function Z(z){for(var B=o(g);B!==null;){if(B.callback===null)r(g);else if(B.startTime<=z)r(g),B.sortIndex=B.expirationTime,l(y,B);else break;B=o(g)}}function Q(z){if(H=!1,Z(z),!N)if(o(y)!==null)N=!0,nt||(nt=!0,Nt());else{var B=o(g);B!==null&&Qt(Q,B.startTime-z)}}var nt=!1,F=-1,K=5,it=-1;function yt(){return G?!0:!(i.unstable_now()-itz&&yt());){var ot=b.callback;if(typeof ot=="function"){b.callback=null,T=b.priorityLevel;var dt=ot(b.expirationTime<=z);if(z=i.unstable_now(),typeof dt=="function"){b.callback=dt,Z(z),B=!0;break e}b===o(y)&&r(y),Z(z)}else r(y);b=o(y)}if(b!==null)B=!0;else{var A=o(g);A!==null&&Qt(Q,A.startTime-z),B=!1}}break t}finally{b=null,T=P,w=!1}B=void 0}}finally{B?Nt():nt=!1}}}var Nt;if(typeof V=="function")Nt=function(){V(gt)};else if(typeof MessageChannel<"u"){var Jt=new MessageChannel,Ht=Jt.port2;Jt.port1.onmessage=gt,Nt=function(){Ht.postMessage(null)}}else Nt=function(){U(gt,0)};function Qt(z,B){F=U(function(){z(i.unstable_now())},B)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(z){z.callback=null},i.unstable_forceFrameRate=function(z){0>z||125ot?(z.sortIndex=P,l(g,z),o(y)===null&&z===o(g)&&(H?(q(F),F=-1):H=!0,Qt(Q,P-ot))):(z.sortIndex=dt,l(y,z),N||w||(N=!0,nt||(nt=!0,Nt()))),z},i.unstable_shouldYield=yt,i.unstable_wrapCallback=function(z){var B=T;return function(){var P=T;T=B;try{return z.apply(this,arguments)}finally{T=P}}}})(Gu)),Gu}var jp;function cv(){return jp||(jp=1,qu.exports=uv()),qu.exports}var Xu={exports:{}},ae={};var Tp;function fv(){if(Tp)return ae;Tp=1;var i=kc();function l(y){var g="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(l){console.error(l)}}return i(),Xu.exports=fv(),Xu.exports}var Cp;function hv(){if(Cp)return rl;Cp=1;var i=cv(),l=kc(),o=dv();function r(t){var e="https://react.dev/errors/"+t;if(1dt||(t.current=ot[dt],ot[dt]=null,dt--)}function X(t,e){dt++,ot[dt]=t.current,t.current=e}var $=A(null),lt=A(null),ut=A(null),St=A(null);function se(t,e){switch(X(ut,e),X(lt,t),X($,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Hm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Hm(e),t=Ym(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}k($),X($,t)}function Vt(){k($),k(lt),k(ut)}function ha(t){t.memoizedState!==null&&X(St,t);var e=$.current,n=Ym(e,t.type);e!==n&&(X(lt,t),X($,n))}function Dl(t){lt.current===t&&(k($),k(lt)),St.current===t&&(k(St),nl._currentValue=P)}var br,yf;function Fn(t){if(br===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);br=e&&e[1]||"",yf=-1)":-1s||S[a]!==E[s]){var _=` +`+S[a].replace(" at new "," at ");return t.displayName&&_.includes("")&&(_=_.replace("",t.displayName)),_}while(1<=a&&0<=s);break}}}finally{Sr=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Fn(n):""}function kg(t,e){switch(t.tag){case 26:case 27:case 5:return Fn(t.type);case 16:return Fn("Lazy");case 13:return t.child!==e&&e!==null?Fn("Suspense Fallback"):Fn("Suspense");case 19:return Fn("SuspenseList");case 0:case 15:return jr(t.type,!1);case 11:return jr(t.type.render,!1);case 1:return jr(t.type,!0);case 31:return Fn("Activity");default:return""}}function gf(t){try{var e="",n=null;do e+=kg(t,n),n=t,t=t.return;while(t);return e}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}var Tr=Object.prototype.hasOwnProperty,Ar=i.unstable_scheduleCallback,Cr=i.unstable_cancelCallback,Vg=i.unstable_shouldYield,Bg=i.unstable_requestPaint,ge=i.unstable_now,Ug=i.unstable_getCurrentPriorityLevel,xf=i.unstable_ImmediatePriority,vf=i.unstable_UserBlockingPriority,wl=i.unstable_NormalPriority,Hg=i.unstable_LowPriority,bf=i.unstable_IdlePriority,Yg=i.log,qg=i.unstable_setDisableYieldValue,ma=null,xe=null;function xn(t){if(typeof Yg=="function"&&qg(t),xe&&typeof xe.setStrictMode=="function")try{xe.setStrictMode(ma,t)}catch{}}var ve=Math.clz32?Math.clz32:Zg,Gg=Math.log,Xg=Math.LN2;function Zg(t){return t>>>=0,t===0?32:31-(Gg(t)/Xg|0)|0}var Ll=256,Nl=262144,_l=4194304;function Pn(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function zl(t,e,n){var a=t.pendingLanes;if(a===0)return 0;var s=0,u=t.suspendedLanes,h=t.pingedLanes;t=t.warmLanes;var x=a&134217727;return x!==0?(a=x&~u,a!==0?s=Pn(a):(h&=x,h!==0?s=Pn(h):n||(n=x&~t,n!==0&&(s=Pn(n))))):(x=a&~u,x!==0?s=Pn(x):h!==0?s=Pn(h):n||(n=a&~t,n!==0&&(s=Pn(n)))),s===0?0:e!==0&&e!==s&&(e&u)===0&&(u=s&-s,n=e&-e,u>=n||u===32&&(n&4194048)!==0)?e:s}function pa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Qg(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sf(){var t=_l;return _l<<=1,(_l&62914560)===0&&(_l=4194304),t}function Mr(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ya(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Kg(t,e,n,a,s,u){var h=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var x=t.entanglements,S=t.expirationTimes,E=t.hiddenUpdates;for(n=h&~n;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ig=/[\n"\\]/g;function De(t){return t.replace(Ig,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function _r(t,e,n,a,s,u,h,x){t.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.type=h:t.removeAttribute("type"),e!=null?h==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ee(e)):t.value!==""+Ee(e)&&(t.value=""+Ee(e)):h!=="submit"&&h!=="reset"||t.removeAttribute("value"),e!=null?zr(t,h,Ee(e)):n!=null?zr(t,h,Ee(n)):a!=null&&t.removeAttribute("value"),s==null&&u!=null&&(t.defaultChecked=!!u),s!=null&&(t.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.name=""+Ee(x):t.removeAttribute("name")}function Rf(t,e,n,a,s,u,h,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){Nr(t);return}n=n!=null?""+Ee(n):"",e=e!=null?""+Ee(e):n,x||e===t.value||(t.value=e),t.defaultValue=e}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=x?t.checked:!!a,t.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.name=h),Nr(t)}function zr(t,e,n){e==="number"&&kl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ci(t,e,n,a){if(t=t.options,e){e={};for(var s=0;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Br=!1;if(Ie)try{var ba={};Object.defineProperty(ba,"passive",{get:function(){Br=!0}}),window.addEventListener("test",ba,ba),window.removeEventListener("test",ba,ba)}catch{Br=!1}var bn=null,Ur=null,Bl=null;function Yf(){if(Bl)return Bl;var t,e=Ur,n=e.length,a,s="value"in bn?bn.value:bn.textContent,u=s.length;for(t=0;t=Ta),Kf=" ",Wf=!1;function Jf(t,e){switch(t){case"keyup":return E1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ff(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var wi=!1;function w1(t,e){switch(t){case"compositionend":return Ff(e);case"keypress":return e.which!==32?null:(Wf=!0,Kf);case"textInput":return t=e.data,t===Kf&&Wf?null:t;default:return null}}function L1(t,e){if(wi)return t==="compositionend"||!Xr&&Jf(t,e)?(t=Yf(),Bl=Ur=bn=null,wi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ad(n)}}function sd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function rd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=kl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=kl(t.document)}return e}function Kr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var B1=Ie&&"documentMode"in document&&11>=document.documentMode,Li=null,Wr=null,Ea=null,Jr=!1;function od(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Li==null||Li!==kl(a)||(a=Li,"selectionStart"in a&&Kr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ea&&Ma(Ea,a)||(Ea=a,a=Ns(Wr,"onSelect"),0>=h,s-=h,Ze=1<<32-ve(e)+s|n<rt?(mt=I,I=null):mt=I.sibling;var vt=D(C,I,M[rt],R);if(vt===null){I===null&&(I=mt);break}t&&I&&vt.alternate===null&&e(C,I),j=u(vt,j,rt),xt===null?tt=vt:xt.sibling=vt,xt=vt,I=mt}if(rt===M.length)return n(C,I),pt&&en(C,rt),tt;if(I===null){for(;rtrt?(mt=I,I=null):mt=I.sibling;var qn=D(C,I,vt.value,R);if(qn===null){I===null&&(I=mt);break}t&&I&&qn.alternate===null&&e(C,I),j=u(qn,j,rt),xt===null?tt=qn:xt.sibling=qn,xt=qn,I=mt}if(vt.done)return n(C,I),pt&&en(C,rt),tt;if(I===null){for(;!vt.done;rt++,vt=M.next())vt=O(C,vt.value,R),vt!==null&&(j=u(vt,j,rt),xt===null?tt=vt:xt.sibling=vt,xt=vt);return pt&&en(C,rt),tt}for(I=a(I);!vt.done;rt++,vt=M.next())vt=L(I,C,rt,vt.value,R),vt!==null&&(t&&vt.alternate!==null&&I.delete(vt.key===null?rt:vt.key),j=u(vt,j,rt),xt===null?tt=vt:xt.sibling=vt,xt=vt);return t&&I.forEach(function(av){return e(C,av)}),pt&&en(C,rt),tt}function Mt(C,j,M,R){if(typeof M=="object"&&M!==null&&M.type===H&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case w:t:{for(var tt=M.key;j!==null;){if(j.key===tt){if(tt=M.type,tt===H){if(j.tag===7){n(C,j.sibling),R=s(j,M.props.children),R.return=C,C=R;break t}}else if(j.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===K&&oi(tt)===j.type){n(C,j.sibling),R=s(j,M.props),za(R,M),R.return=C,C=R;break t}n(C,j);break}else e(C,j);j=j.sibling}M.type===H?(R=ii(M.props.children,C.mode,R,M.key),R.return=C,C=R):(R=Wl(M.type,M.key,M.props,null,C.mode,R),za(R,M),R.return=C,C=R)}return h(C);case N:t:{for(tt=M.key;j!==null;){if(j.key===tt)if(j.tag===4&&j.stateNode.containerInfo===M.containerInfo&&j.stateNode.implementation===M.implementation){n(C,j.sibling),R=s(j,M.children||[]),R.return=C,C=R;break t}else{n(C,j);break}else e(C,j);j=j.sibling}R=no(M,C.mode,R),R.return=C,C=R}return h(C);case K:return M=oi(M),Mt(C,j,M,R)}if(Qt(M))return W(C,j,M,R);if(Nt(M)){if(tt=Nt(M),typeof tt!="function")throw Error(r(150));return M=tt.call(M),et(C,j,M,R)}if(typeof M.then=="function")return Mt(C,j,es(M),R);if(M.$$typeof===V)return Mt(C,j,Pl(C,M),R);ns(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,j!==null&&j.tag===6?(n(C,j.sibling),R=s(j,M),R.return=C,C=R):(n(C,j),R=eo(M,C.mode,R),R.return=C,C=R),h(C)):n(C,j)}return function(C,j,M,R){try{_a=0;var tt=Mt(C,j,M,R);return Yi=null,tt}catch(I){if(I===Hi||I===Il)throw I;var xt=Se(29,I,null,C.mode);return xt.lanes=R,xt.return=C,xt}}}var ci=Nd(!0),_d=Nd(!1),Cn=!1;function po(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yo(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Mn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function En(t,e,n){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(bt&2)!==0){var s=a.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),a.pending=e,e=Kl(t),pd(t,null,n),e}return Ql(t,a,e,n),Kl(t)}function Ra(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,Tf(t,n)}}function go(t,e){var n=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var s=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?s=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?s=u=e:u=u.next=e}else s=u=e;n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var xo=!1;function Oa(){if(xo){var t=Ui;if(t!==null)throw t}}function ka(t,e,n,a){xo=!1;var s=t.updateQueue;Cn=!1;var u=s.firstBaseUpdate,h=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var S=x,E=S.next;S.next=null,h===null?u=E:h.next=E,h=S;var _=t.alternate;_!==null&&(_=_.updateQueue,x=_.lastBaseUpdate,x!==h&&(x===null?_.firstBaseUpdate=E:x.next=E,_.lastBaseUpdate=S))}if(u!==null){var O=s.baseState;h=0,_=E=S=null,x=u;do{var D=x.lane&-536870913,L=D!==x.lane;if(L?(ht&D)===D:(a&D)===D){D!==0&&D===Bi&&(xo=!0),_!==null&&(_=_.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});t:{var W=t,et=x;D=e;var Mt=n;switch(et.tag){case 1:if(W=et.payload,typeof W=="function"){O=W.call(Mt,O,D);break t}O=W;break t;case 3:W.flags=W.flags&-65537|128;case 0:if(W=et.payload,D=typeof W=="function"?W.call(Mt,O,D):W,D==null)break t;O=b({},O,D);break t;case 2:Cn=!0}}D=x.callback,D!==null&&(t.flags|=64,L&&(t.flags|=8192),L=s.callbacks,L===null?s.callbacks=[D]:L.push(D))}else L={lane:D,tag:x.tag,payload:x.payload,callback:x.callback,next:null},_===null?(E=_=L,S=O):_=_.next=L,h|=D;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;L=x,x=L.next,L.next=null,s.lastBaseUpdate=L,s.shared.pending=null}}while(!0);_===null&&(S=O),s.baseState=S,s.firstBaseUpdate=E,s.lastBaseUpdate=_,u===null&&(s.shared.lanes=0),_n|=h,t.lanes=h,t.memoizedState=O}}function zd(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Rd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;tu?u:8;var h=z.T,x={};z.T=x,Vo(t,!1,e,n);try{var S=s(),E=z.S;if(E!==null&&E(x,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var _=K1(S,a);Ua(t,e,_,Me(t))}else Ua(t,e,a,Me(t))}catch(O){Ua(t,e,{then:function(){},status:"rejected",reason:O},Me())}finally{B.p=u,h!==null&&x.types!==null&&(h.types=x.types),z.T=h}}function I1(){}function Oo(t,e,n,a){if(t.tag!==5)throw Error(r(476));var s=dh(t).queue;fh(t,s,e,P,n===null?I1:function(){return hh(t),n(a)})}function dh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:P},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function hh(t){var e=dh(t);e.next===null&&(e=t.alternate.memoizedState),Ua(t,e.next.queue,{},Me())}function ko(){return te(nl)}function mh(){return Ut().memoizedState}function ph(){return Ut().memoizedState}function tx(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Me();t=Mn(n);var a=En(e,t,n);a!==null&&(ye(a,e,n),Ra(a,e,n)),e={cache:co()},t.payload=e;return}e=e.return}}function ex(t,e,n){var a=Me();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ds(t)?gh(e,n):(n=Ir(t,e,n,a),n!==null&&(ye(n,t,a),xh(n,e,a)))}function yh(t,e,n){var a=Me();Ua(t,e,n,a)}function Ua(t,e,n,a){var s={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ds(t))gh(e,s);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var h=e.lastRenderedState,x=u(h,n);if(s.hasEagerState=!0,s.eagerState=x,be(x,h))return Ql(t,e,s,0),Et===null&&Zl(),!1}catch{}if(n=Ir(t,e,s,a),n!==null)return ye(n,t,a),xh(n,e,a),!0}return!1}function Vo(t,e,n,a){if(a={lane:2,revertLane:pu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ds(t)){if(e)throw Error(r(479))}else e=Ir(t,n,a,2),e!==null&&ye(e,t,2)}function ds(t){var e=t.alternate;return t===st||e!==null&&e===st}function gh(t,e){Gi=ls=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function xh(t,e,n){if((n&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,Tf(t,n)}}var Ha={readContext:te,use:os,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useLayoutEffect:Rt,useInsertionEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useSyncExternalStore:Rt,useId:Rt,useHostTransitionStatus:Rt,useFormState:Rt,useActionState:Rt,useOptimistic:Rt,useMemoCache:Rt,useCacheRefresh:Rt};Ha.useEffectEvent=Rt;var vh={readContext:te,use:os,useCallback:function(t,e){return re().memoizedState=[t,e===void 0?null:e],t},useContext:te,useEffect:nh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,cs(4194308,4,sh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return cs(4194308,4,t,e)},useInsertionEffect:function(t,e){cs(4,2,t,e)},useMemo:function(t,e){var n=re();e=e===void 0?null:e;var a=t();if(fi){xn(!0);try{t()}finally{xn(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=re();if(n!==void 0){var s=n(e);if(fi){xn(!0);try{n(e)}finally{xn(!1)}}}else s=e;return a.memoizedState=a.baseState=s,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},a.queue=t,t=t.dispatch=ex.bind(null,st,t),[a.memoizedState,t]},useRef:function(t){var e=re();return t={current:t},e.memoizedState=t},useState:function(t){t=Lo(t);var e=t.queue,n=yh.bind(null,st,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:zo,useDeferredValue:function(t,e){var n=re();return Ro(n,t,e)},useTransition:function(){var t=Lo(!1);return t=fh.bind(null,st,t.queue,!0,!1),re().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=st,s=re();if(pt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),Et===null)throw Error(r(349));(ht&127)!==0||Hd(a,e,n)}s.memoizedState=n;var u={value:n,getSnapshot:e};return s.queue=u,nh(qd.bind(null,a,u,t),[t]),a.flags|=2048,Zi(9,{destroy:void 0},Yd.bind(null,a,u,n,e),null),n},useId:function(){var t=re(),e=Et.identifierPrefix;if(pt){var n=Qe,a=Ze;n=(a&~(1<<32-ve(a)-1)).toString(32)+n,e="_"+e+"R_"+n,n=ss++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?h.createElement(s,{is:a.is}):h.createElement(s)}}u[$t]=e,u[ce]=a;t:for(h=e.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break t;for(;h.sibling===null;){if(h.return===null||h.return===e)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}e.stateNode=u;t:switch(ne(u,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&on(e)}}return Lt(e),Po(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&on(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(r(166));if(t=ut.current,ki(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,s=It,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}t[$t]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Bm(t.nodeValue,n)),t||Tn(e,!0)}else t=_s(t).createTextNode(a),t[$t]=e,e.stateNode=t}return Lt(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(a=ki(e),n!==null){if(t===null){if(!a)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[$t]=e}else ai(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Lt(e),t=!1}else n=so(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Te(e),e):(Te(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Lt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(s=ki(e),a!==null&&a.dehydrated!==null){if(t===null){if(!s)throw Error(r(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[$t]=e}else ai(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Lt(e),s=!1}else s=so(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),s=!0;if(!s)return e.flags&256?(Te(e),e):(Te(e),null)}return Te(e),(e.flags&128)!==0?(e.lanes=n,e):(n=a!==null,t=t!==null&&t.memoizedState!==null,n&&(a=e.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),gs(e,e.updateQueue),Lt(e),null);case 4:return Vt(),t===null&&vu(e.stateNode.containerInfo),Lt(e),null;case 10:return an(e.type),Lt(e),null;case 19:if(k(Bt),a=e.memoizedState,a===null)return Lt(e),null;if(s=(e.flags&128)!==0,u=a.rendering,u===null)if(s)qa(a,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=as(t),u!==null){for(e.flags|=128,qa(a,!1),t=u.updateQueue,e.updateQueue=t,gs(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)yd(n,t),n=n.sibling;return X(Bt,Bt.current&1|2),pt&&en(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&ge()>js&&(e.flags|=128,s=!0,qa(a,!1),e.lanes=4194304)}else{if(!s)if(t=as(u),t!==null){if(e.flags|=128,s=!0,t=t.updateQueue,e.updateQueue=t,gs(e,t),qa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!pt)return Lt(e),null}else 2*ge()-a.renderingStartTime>js&&n!==536870912&&(e.flags|=128,s=!0,qa(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ge(),t.sibling=null,n=Bt.current,X(Bt,s?n&1|2:n&1),pt&&en(e,a.treeForkCount),t):(Lt(e),null);case 22:case 23:return Te(e),bo(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(n&536870912)!==0&&(e.flags&128)===0&&(Lt(e),e.subtreeFlags&6&&(e.flags|=8192)):Lt(e),n=e.updateQueue,n!==null&&gs(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&k(ri),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),an(Yt),Lt(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function sx(t,e){switch(ao(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return an(Yt),Vt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Dl(e),null;case 31:if(e.memoizedState!==null){if(Te(e),e.alternate===null)throw Error(r(340));ai()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Te(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));ai()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return k(Bt),null;case 4:return Vt(),null;case 10:return an(e.type),null;case 22:case 23:return Te(e),bo(),t!==null&&k(ri),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return an(Yt),null;case 25:return null;default:return null}}function Gh(t,e){switch(ao(e),e.tag){case 3:an(Yt),Vt();break;case 26:case 27:case 5:Dl(e);break;case 4:Vt();break;case 31:e.memoizedState!==null&&Te(e);break;case 13:Te(e);break;case 19:k(Bt);break;case 10:an(e.type);break;case 22:case 23:Te(e),bo(),t!==null&&k(ri);break;case 24:an(Yt)}}function Ga(t,e){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&t)===t){a=void 0;var u=n.create,h=n.inst;a=u(),h.destroy=a}n=n.next}while(n!==s)}}catch(x){Tt(e,e.return,x)}}function Ln(t,e,n){try{var a=e.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var u=s.next;a=u;do{if((a.tag&t)===t){var h=a.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,s=e;var S=n,E=x;try{E()}catch(_){Tt(s,S,_)}}}a=a.next}while(a!==u)}}catch(_){Tt(e,e.return,_)}}function Xh(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Rd(e,n)}catch(a){Tt(t,t.return,a)}}}function Zh(t,e,n){n.props=di(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(a){Tt(t,e,a)}}function Xa(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof n=="function"?t.refCleanup=n(a):n.current=a}}catch(s){Tt(t,e,s)}}function Ke(t,e){var n=t.ref,a=t.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(s){Tt(t,e,s)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){Tt(t,e,s)}else n.current=null}function Qh(t){var e=t.type,n=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break t;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){Tt(t,t.return,s)}}function $o(t,e,n){try{var a=t.stateNode;Dx(a,t.type,n,e),a[ce]=e}catch(s){Tt(t,t.return,s)}}function Kh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Vn(t.type)||t.tag===4}function Io(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Kh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Vn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function tu(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=$e));else if(a!==4&&(a===27&&Vn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(tu(t,e,n),t=t.sibling;t!==null;)tu(t,e,n),t=t.sibling}function xs(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(a!==4&&(a===27&&Vn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(xs(t,e,n),t=t.sibling;t!==null;)xs(t,e,n),t=t.sibling}function Wh(t){var e=t.stateNode,n=t.memoizedProps;try{for(var a=t.type,s=e.attributes;s.length;)e.removeAttributeNode(s[0]);ne(e,a,n),e[$t]=t,e[ce]=n}catch(u){Tt(t,t.return,u)}}var un=!1,Xt=!1,eu=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function rx(t,e){if(t=t.containerInfo,ju=Us,t=rd(t),Kr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break t}var h=0,x=-1,S=-1,E=0,_=0,O=t,D=null;e:for(;;){for(var L;O!==n||s!==0&&O.nodeType!==3||(x=h+s),O!==u||a!==0&&O.nodeType!==3||(S=h+a),O.nodeType===3&&(h+=O.nodeValue.length),(L=O.firstChild)!==null;)D=O,O=L;for(;;){if(O===t)break e;if(D===n&&++E===s&&(x=h),D===u&&++_===a&&(S=h),(L=O.nextSibling)!==null)break;O=D,D=O.parentNode}O=L}n=x===-1||S===-1?null:{start:x,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tu={focusedElem:t,selectionRange:n},Us=!1,Pt=e;Pt!==null;)if(e=Pt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pt=t;else for(;Pt!==null;){switch(e=Pt,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n title"))),ne(u,a,n),u[$t]=t,Ft(u),a=u;break t;case"link":var h=ep("link","href",s).get(a+(n.href||""));if(h){for(var x=0;xMt&&(h=Mt,Mt=et,et=h);var C=ld(x,et),j=ld(x,Mt);if(C&&j&&(L.rangeCount!==1||L.anchorNode!==C.node||L.anchorOffset!==C.offset||L.focusNode!==j.node||L.focusOffset!==j.offset)){var M=O.createRange();M.setStart(C.node,C.offset),L.removeAllRanges(),et>Mt?(L.addRange(M),L.extend(j.node,j.offset)):(M.setEnd(j.node,j.offset),L.addRange(M))}}}}for(O=[],L=x;L=L.parentNode;)L.nodeType===1&&O.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;xn?32:n,z.T=null,n=ou,ou=null;var u=Rn,h=mn;if(Kt=0,Fi=Rn=null,mn=0,(bt&6)!==0)throw Error(r(331));var x=bt;if(bt|=4,sm(u.current),im(u,u.current,h,n),bt=x,Fa(0,!1),xe&&typeof xe.onPostCommitFiberRoot=="function")try{xe.onPostCommitFiberRoot(ma,u)}catch{}return!0}finally{B.p=s,z.T=a,Am(t,e)}}function Mm(t,e,n){e=Le(n,e),e=Yo(t.stateNode,e,2),t=En(t,e,2),t!==null&&(ya(t,2),We(t))}function Tt(t,e,n){if(t.tag===3)Mm(t,t,n);else for(;e!==null;){if(e.tag===3){Mm(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(zn===null||!zn.has(a))){t=Le(n,t),n=Eh(2),a=En(e,n,2),a!==null&&(Dh(n,a,e,t),ya(a,2),We(a));break}}e=e.return}}function du(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new cx;var s=new Set;a.set(e,s)}else s=a.get(e),s===void 0&&(s=new Set,a.set(e,s));s.has(n)||(au=!0,s.add(n),t=px.bind(null,t,e,n),e.then(t,t))}function px(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Et===t&&(ht&n)===n&&(Ot===4||Ot===3&&(ht&62914560)===ht&&300>ge()-Ss?(bt&2)===0&&Pi(t,0):lu|=n,Ji===ht&&(Ji=0)),We(t)}function Em(t,e){e===0&&(e=Sf()),t=ni(t,e),t!==null&&(ya(t,e),We(t))}function yx(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Em(t,n)}function gx(t,e){var n=0;switch(t.tag){case 31:case 13:var a=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(e),Em(t,n)}function xx(t,e){return Ar(t,e)}var Ds=null,Ii=null,hu=!1,ws=!1,mu=!1,kn=0;function We(t){t!==Ii&&t.next===null&&(Ii===null?Ds=Ii=t:Ii=Ii.next=t),ws=!0,hu||(hu=!0,bx())}function Fa(t,e){if(!mu&&ws){mu=!0;do for(var n=!1,a=Ds;a!==null;){if(t!==0){var s=a.pendingLanes;if(s===0)var u=0;else{var h=a.suspendedLanes,x=a.pingedLanes;u=(1<<31-ve(42|t)+1)-1,u&=s&~(h&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Nm(a,u))}else u=ht,u=zl(a,a===Et?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||pa(a,u)||(n=!0,Nm(a,u));a=a.next}while(n);mu=!1}}function vx(){Dm()}function Dm(){ws=hu=!1;var t=0;kn!==0&&Lx()&&(t=kn);for(var e=ge(),n=null,a=Ds;a!==null;){var s=a.next,u=wm(a,e);u===0?(a.next=null,n===null?Ds=s:n.next=s,s===null&&(Ii=n)):(n=a,(t!==0||(u&3)!==0)&&(ws=!0)),a=s}Kt!==0&&Kt!==5||Fa(t),kn!==0&&(kn=0)}function wm(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,s=t.expirationTimes,u=t.pendingLanes&-62914561;0x)break;var _=S.transferSize,O=S.initiatorType;_&&Um(O)&&(S=S.responseEnd,h+=_*(S"u"?null:document;function Pm(t,e,n){var a=ta;if(a&&typeof e=="string"&&e){var s=De(e);s='link[rel="'+t+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),Fm.has(s)||(Fm.add(s),t={rel:t,crossOrigin:n,href:e},a.querySelector(s)===null&&(e=a.createElement("link"),ne(e,"link",t),Ft(e),a.head.appendChild(e)))}}function Ux(t){pn.D(t),Pm("dns-prefetch",t,null)}function Hx(t,e){pn.C(t,e),Pm("preconnect",t,e)}function Yx(t,e,n){pn.L(t,e,n);var a=ta;if(a&&t&&e){var s='link[rel="preload"][as="'+De(e)+'"]';e==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+De(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+De(n.imageSizes)+'"]')):s+='[href="'+De(t)+'"]';var u=s;switch(e){case"style":u=ea(t);break;case"script":u=na(t)}ke.has(u)||(t=b({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),ke.set(u,t),a.querySelector(s)!==null||e==="style"&&a.querySelector(tl(u))||e==="script"&&a.querySelector(el(u))||(e=a.createElement("link"),ne(e,"link",t),Ft(e),a.head.appendChild(e)))}}function qx(t,e){pn.m(t,e);var n=ta;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",s='link[rel="modulepreload"][as="'+De(a)+'"][href="'+De(t)+'"]',u=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=na(t)}if(!ke.has(u)&&(t=b({rel:"modulepreload",href:t},e),ke.set(u,t),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(el(u)))return}a=n.createElement("link"),ne(a,"link",t),Ft(a),n.head.appendChild(a)}}}function Gx(t,e,n){pn.S(t,e,n);var a=ta;if(a&&t){var s=Ti(a).hoistableStyles,u=ea(t);e=e||"default";var h=s.get(u);if(!h){var x={loading:0,preload:null};if(h=a.querySelector(tl(u)))x.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":e},n),(n=ke.get(u))&&Lu(t,n);var S=h=a.createElement("link");Ft(S),ne(S,"link",t),S._p=new Promise(function(E,_){S.onload=E,S.onerror=_}),S.addEventListener("load",function(){x.loading|=1}),S.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Rs(h,e,a)}h={type:"stylesheet",instance:h,count:1,state:x},s.set(u,h)}}}function Xx(t,e){pn.X(t,e);var n=ta;if(n&&t){var a=Ti(n).hoistableScripts,s=na(t),u=a.get(s);u||(u=n.querySelector(el(s)),u||(t=b({src:t,async:!0},e),(e=ke.get(s))&&Nu(t,e),u=n.createElement("script"),Ft(u),ne(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(s,u))}}function Zx(t,e){pn.M(t,e);var n=ta;if(n&&t){var a=Ti(n).hoistableScripts,s=na(t),u=a.get(s);u||(u=n.querySelector(el(s)),u||(t=b({src:t,async:!0,type:"module"},e),(e=ke.get(s))&&Nu(t,e),u=n.createElement("script"),Ft(u),ne(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(s,u))}}function $m(t,e,n,a){var s=(s=ut.current)?zs(s):null;if(!s)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=ea(n.href),n=Ti(s).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=ea(n.href);var u=Ti(s).hoistableStyles,h=u.get(t);if(h||(s=s.ownerDocument||s,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,h),(u=s.querySelector(tl(t)))&&!u._p&&(h.instance=u,h.state.loading=5),ke.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ke.set(t,n),u||Qx(s,t,n,h.state))),e&&a===null)throw Error(r(528,""));return h}if(e&&a!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=na(n),n=Ti(s).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ea(t){return'href="'+De(t)+'"'}function tl(t){return'link[rel="stylesheet"]['+t+"]"}function Im(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function Qx(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),ne(e,"link",n),Ft(e),t.head.appendChild(e))}function na(t){return'[src="'+De(t)+'"]'}function el(t){return"script[async]"+t}function tp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+De(n.href)+'"]');if(a)return e.instance=a,Ft(a),a;var s=b({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Ft(a),ne(a,"style",s),Rs(a,n.precedence,t),e.instance=a;case"stylesheet":s=ea(n.href);var u=t.querySelector(tl(s));if(u)return e.state.loading|=4,e.instance=u,Ft(u),u;a=Im(n),(s=ke.get(s))&&Lu(a,s),u=(t.ownerDocument||t).createElement("link"),Ft(u);var h=u;return h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),ne(u,"link",a),e.state.loading|=4,Rs(u,n.precedence,t),e.instance=u;case"script":return u=na(n.src),(s=t.querySelector(el(u)))?(e.instance=s,Ft(s),s):(a=n,(s=ke.get(u))&&(a=b({},n),Nu(a,s)),t=t.ownerDocument||t,s=t.createElement("script"),Ft(s),ne(s,"link",a),t.head.appendChild(s),e.instance=s);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Rs(a,n.precedence,t));return e.instance}function Rs(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,u=s,h=0;h title"):null)}function Kx(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function ip(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Wx(t,e,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var s=ea(a.href),u=e.querySelector(tl(s));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=ks.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,Ft(u);return}u=e.ownerDocument||e,a=Im(a),(s=ke.get(s))&&Lu(a,s),u=u.createElement("link"),Ft(u);var h=u;h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),ne(u,"link",a),n.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=ks.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var _u=0;function Jx(t,e){return t.stylesheets&&t.count===0&&Bs(t,t.stylesheets),0_u?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function ks(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Vs=null;function Bs(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Vs=new Map,e.forEach(Fx,t),Vs=null,ks.call(t))}function Fx(t,e){if(!(e.state.loading&4)){var n=Vs.get(t);if(n)var a=n.get(null);else{n=new Map,Vs.set(t,n);for(var s=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(l){console.error(l)}}return i(),Yu.exports=hv(),Yu.exports}var pv=mv();const yv=()=>c.jsx("svg",{style:{display:"none"},children:c.jsxs("defs",{children:[c.jsxs("g",{id:"icon-clipboard",children:[c.jsx("rect",{x:"-12",y:"-16",width:"24",height:"32",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"-6",y:"-20",width:"12",height:"6",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"-4",x2:"7",y2:"-4",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"3",x2:"7",y2:"3",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"10",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-books",children:[c.jsx("rect",{x:"-14",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(-10)"}),c.jsx("rect",{x:"-4",y:"-10",width:"8",height:"24",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"6",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(10)"})]}),c.jsxs("g",{id:"icon-gear",children:[c.jsx("circle",{cx:"0",cy:"0",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-16 L3,-12 L3,-10 L-3,-10 L-3,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M0,16 L3,12 L3,10 L-3,10 L-3,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-16,0 L-12,3 L-10,3 L-10,-3 L-12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M16,0 L12,3 L10,3 L10,-3 L12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,-11 L-9,-8 L-7,-9 L-9,-12 Z",fill:"currentColor",transform:"rotate(0)"}),c.jsx("path",{d:"M11,-11 L9,-8 L7,-9 L9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,11 L-9,8 L-7,9 L-9,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,11 L9,8 L7,9 L9,12 Z",fill:"currentColor"})]}),c.jsxs("g",{id:"icon-flask",children:[c.jsx("path",{d:"M-5,-16 L-5,-4 L-14,14 L14,14 L5,-4 L5,-16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-7",y1:"-16",x2:"7",y2:"-16",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-9",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"3 2"})]}),c.jsx("g",{id:"icon-lambda",children:c.jsx("text",{x:"0",y:"8",fontFamily:"Georgia, serif",fontSize:"40",fontWeight:"400",fill:"currentColor",textAnchor:"middle",children:"λ"})}),c.jsx("g",{id:"icon-lightning",children:c.jsx("polygon",{points:"2,-16 -8,2 -1,2 -4,16 8,-2 1,-2",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-search",children:[c.jsx("circle",{cx:"-3",cy:"-3",r:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),c.jsx("line",{x1:"6",y1:"6",x2:"16",y2:"16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-link",children:[c.jsx("ellipse",{cx:"-6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"}),c.jsx("ellipse",{cx:"6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"})]}),c.jsx("g",{id:"icon-wrench",children:c.jsx("path",{d:"M-6,-16 C-12,-10 -12,-2 -6,4 L8,18 L14,12 L0,-2 C6,-8 6,-14 0,-16 L-2,-10 L-6,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-upload",children:[c.jsx("line",{x1:"0",y1:"12",x2:"0",y2:"-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),c.jsx("polyline",{points:"-8,-2 0,-12 8,-2",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"-12",y1:"16",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-book",children:[c.jsx("path",{d:"M0,-12 L0,14",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C-6,-14 -12,-12 -16,-8 L-16,12 C-12,8 -6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C6,-14 12,-12 16,-8 L16,12 C12,8 6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-12",y1:"-4",x2:"-4",y2:"-2",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("line",{x1:"-12",y1:"2",x2:"-4",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("line",{x1:"12",y1:"-4",x2:"4",y2:"-2",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("line",{x1:"12",y1:"2",x2:"4",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})]}),c.jsxs("g",{id:"icon-document",children:[c.jsx("path",{d:"M-10,-16 L6,-16 L14,-8 L14,16 L-10,16 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M6,-16 L6,-8 L14,-8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-5",y1:"0",x2:"9",y2:"0",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-5",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-5",y1:"12",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-chat",children:[c.jsx("path",{d:"M-14,-10 L14,-10 C16,-10 16,-10 16,-8 L16,6 C16,8 16,8 14,8 L4,8 L-2,16 L-2,8 L-14,8 C-16,8 -16,8 -16,6 L-16,-8 C-16,-10 -16,-10 -14,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("circle",{cx:"-7",cy:"-1",r:"2",fill:"currentColor"}),c.jsx("circle",{cx:"0",cy:"-1",r:"2",fill:"currentColor"}),c.jsx("circle",{cx:"7",cy:"-1",r:"2",fill:"currentColor"})]})]})}),Vc=Y.createContext({});function Bc(i){const l=Y.useRef(null);return l.current===null&&(l.current=i()),l.current}const t0=typeof window<"u",e0=t0?Y.useLayoutEffect:Y.useEffect,pr=Y.createContext(null);function Uc(i,l){i.indexOf(l)===-1&&i.push(l)}function Hc(i,l){const o=i.indexOf(l);o>-1&&i.splice(o,1)}const Fe=(i,l,o)=>o>l?l:o{};const gn={},n0=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);function i0(i){return typeof i=="object"&&i!==null}const a0=i=>/^0[^.\s]+$/u.test(i);function qc(i){let l;return()=>(l===void 0&&(l=i()),l)}const Ue=i=>i,gv=(i,l)=>o=>l(i(o)),Al=(...i)=>i.reduce(gv),vl=(i,l,o)=>{const r=l-i;return r===0?1:(o-i)/r};class Gc{constructor(){this.subscriptions=[]}add(l){return Uc(this.subscriptions,l),()=>Hc(this.subscriptions,l)}notify(l,o,r){const f=this.subscriptions.length;if(f)if(f===1)this.subscriptions[0](l,o,r);else for(let m=0;mi*1e3,Be=i=>i/1e3;function l0(i,l){return l?i*(1e3/l):0}const s0=(i,l,o)=>(((1-3*o+3*l)*i+(3*o-6*l))*i+3*l)*i,xv=1e-7,vv=12;function bv(i,l,o,r,f){let m,d,p=0;do d=l+(o-l)/2,m=s0(d,r,f)-i,m>0?o=d:l=d;while(Math.abs(m)>xv&&++pbv(m,0,1,i,o);return m=>m===0||m===1?m:s0(f(m),l,r)}const r0=i=>l=>l<=.5?i(2*l)/2:(2-i(2*(1-l)))/2,o0=i=>l=>1-i(1-l),u0=Cl(.33,1.53,.69,.99),Xc=o0(u0),c0=r0(Xc),f0=i=>(i*=2)<1?.5*Xc(i):.5*(2-Math.pow(2,-10*(i-1))),Zc=i=>1-Math.sin(Math.acos(i)),d0=o0(Zc),h0=r0(Zc),Sv=Cl(.42,0,1,1),jv=Cl(0,0,.58,1),m0=Cl(.42,0,.58,1),Tv=i=>Array.isArray(i)&&typeof i[0]!="number",p0=i=>Array.isArray(i)&&typeof i[0]=="number",Av={linear:Ue,easeIn:Sv,easeInOut:m0,easeOut:jv,circIn:Zc,circInOut:h0,circOut:d0,backIn:Xc,backInOut:c0,backOut:u0,anticipate:f0},Cv=i=>typeof i=="string",Ep=i=>{if(p0(i)){Yc(i.length===4);const[l,o,r,f]=i;return Cl(l,o,r,f)}else if(Cv(i))return Av[i];return i},Qs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mv(i,l){let o=new Set,r=new Set,f=!1,m=!1;const d=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function y(v){d.has(v)&&(g.schedule(v),i()),v(p)}const g={schedule:(v,b=!1,T=!1)=>{const N=T&&f?o:r;return b&&d.add(v),N.has(v)||N.add(v),v},cancel:v=>{r.delete(v),d.delete(v)},process:v=>{if(p=v,f){m=!0;return}f=!0,[o,r]=[r,o],o.forEach(y),o.clear(),f=!1,m&&(m=!1,g.process(v))}};return g}const Ev=40;function y0(i,l){let o=!1,r=!0;const f={delta:0,timestamp:0,isProcessing:!1},m=()=>o=!0,d=Qs.reduce((V,Z)=>(V[Z]=Mv(m),V),{}),{setup:p,read:y,resolveKeyframes:g,preUpdate:v,update:b,preRender:T,render:w,postRender:N}=d,H=()=>{const V=gn.useManualTiming?f.timestamp:performance.now();o=!1,gn.useManualTiming||(f.delta=r?1e3/60:Math.max(Math.min(V-f.timestamp,Ev),1)),f.timestamp=V,f.isProcessing=!0,p.process(f),y.process(f),g.process(f),v.process(f),b.process(f),T.process(f),w.process(f),N.process(f),f.isProcessing=!1,o&&l&&(r=!1,i(H))},G=()=>{o=!0,r=!0,f.isProcessing||i(H)};return{schedule:Qs.reduce((V,Z)=>{const Q=d[Z];return V[Z]=(nt,F=!1,K=!1)=>(o||G(),Q.schedule(nt,F,K)),V},{}),cancel:V=>{for(let Z=0;Z(ar===void 0&&oe.set(ie.isProcessing||gn.useManualTiming?ie.timestamp:performance.now()),ar),set:i=>{ar=i,queueMicrotask(Dv)}},g0=i=>l=>typeof l=="string"&&l.startsWith(i),x0=g0("--"),wv=g0("var(--"),Qc=i=>wv(i)?Lv.test(i.split("/*")[0].trim()):!1,Lv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dp(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}const ca={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},bl={...ca,transform:i=>Fe(0,1,i)},Ks={...ca,default:1},ml=i=>Math.round(i*1e5)/1e5,Kc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nv(i){return i==null}const _v=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wc=(i,l)=>o=>!!(typeof o=="string"&&_v.test(o)&&o.startsWith(i)||l&&!Nv(o)&&Object.prototype.hasOwnProperty.call(o,l)),v0=(i,l,o)=>r=>{if(typeof r!="string")return r;const[f,m,d,p]=r.match(Kc);return{[i]:parseFloat(f),[l]:parseFloat(m),[o]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},zv=i=>Fe(0,255,i),Qu={...ca,transform:i=>Math.round(zv(i))},gi={test:Wc("rgb","red"),parse:v0("red","green","blue"),transform:({red:i,green:l,blue:o,alpha:r=1})=>"rgba("+Qu.transform(i)+", "+Qu.transform(l)+", "+Qu.transform(o)+", "+ml(bl.transform(r))+")"};function Rv(i){let l="",o="",r="",f="";return i.length>5?(l=i.substring(1,3),o=i.substring(3,5),r=i.substring(5,7),f=i.substring(7,9)):(l=i.substring(1,2),o=i.substring(2,3),r=i.substring(3,4),f=i.substring(4,5),l+=l,o+=o,r+=r,f+=f),{red:parseInt(l,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:f?parseInt(f,16)/255:1}}const cc={test:Wc("#"),parse:Rv,transform:gi.transform},Ml=i=>({test:l=>typeof l=="string"&&l.endsWith(i)&&l.split(" ").length===1,parse:parseFloat,transform:l=>`${l}${i}`}),Gn=Ml("deg"),Je=Ml("%"),J=Ml("px"),Ov=Ml("vh"),kv=Ml("vw"),wp={...Je,parse:i=>Je.parse(i)/100,transform:i=>Je.transform(i*100)},aa={test:Wc("hsl","hue"),parse:v0("hue","saturation","lightness"),transform:({hue:i,saturation:l,lightness:o,alpha:r=1})=>"hsla("+Math.round(i)+", "+Je.transform(ml(l))+", "+Je.transform(ml(o))+", "+ml(bl.transform(r))+")"},Zt={test:i=>gi.test(i)||cc.test(i)||aa.test(i),parse:i=>gi.test(i)?gi.parse(i):aa.test(i)?aa.parse(i):cc.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?gi.transform(i):aa.transform(i),getAnimatableNone:i=>{const l=Zt.parse(i);return l.alpha=0,Zt.transform(l)}},Vv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bv(i){return isNaN(i)&&typeof i=="string"&&(i.match(Kc)?.length||0)+(i.match(Vv)?.length||0)>0}const b0="number",S0="color",Uv="var",Hv="var(",Lp="${}",Yv=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sl(i){const l=i.toString(),o=[],r={color:[],number:[],var:[]},f=[];let m=0;const p=l.replace(Yv,y=>(Zt.test(y)?(r.color.push(m),f.push(S0),o.push(Zt.parse(y))):y.startsWith(Hv)?(r.var.push(m),f.push(Uv),o.push(y)):(r.number.push(m),f.push(b0),o.push(parseFloat(y))),++m,Lp)).split(Lp);return{values:o,split:p,indexes:r,types:f}}function j0(i){return Sl(i).values}function T0(i){const{split:l,types:o}=Sl(i),r=l.length;return f=>{let m="";for(let d=0;dtypeof i=="number"?0:Zt.test(i)?Zt.getAnimatableNone(i):i;function Gv(i){const l=j0(i);return T0(i)(l.map(qv))}const Kn={test:Bv,parse:j0,createTransformer:T0,getAnimatableNone:Gv};function Ku(i,l,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?i+(l-i)*6*o:o<1/2?l:o<2/3?i+(l-i)*(2/3-o)*6:i}function Xv({hue:i,saturation:l,lightness:o,alpha:r}){i/=360,l/=100,o/=100;let f=0,m=0,d=0;if(!l)f=m=d=o;else{const p=o<.5?o*(1+l):o+l-o*l,y=2*o-p;f=Ku(y,p,i+1/3),m=Ku(y,p,i),d=Ku(y,p,i-1/3)}return{red:Math.round(f*255),green:Math.round(m*255),blue:Math.round(d*255),alpha:r}}function or(i,l){return o=>o>0?l:i}const zt=(i,l,o)=>i+(l-i)*o,Wu=(i,l,o)=>{const r=i*i,f=o*(l*l-r)+r;return f<0?0:Math.sqrt(f)},Zv=[cc,gi,aa],Qv=i=>Zv.find(l=>l.test(i));function Np(i){const l=Qv(i);if(!l)return!1;let o=l.parse(i);return l===aa&&(o=Xv(o)),o}const _p=(i,l)=>{const o=Np(i),r=Np(l);if(!o||!r)return or(i,l);const f={...o};return m=>(f.red=Wu(o.red,r.red,m),f.green=Wu(o.green,r.green,m),f.blue=Wu(o.blue,r.blue,m),f.alpha=zt(o.alpha,r.alpha,m),gi.transform(f))},fc=new Set(["none","hidden"]);function Kv(i,l){return fc.has(i)?o=>o<=0?i:l:o=>o>=1?l:i}function Wv(i,l){return o=>zt(i,l,o)}function Jc(i){return typeof i=="number"?Wv:typeof i=="string"?Qc(i)?or:Zt.test(i)?_p:Pv:Array.isArray(i)?A0:typeof i=="object"?Zt.test(i)?_p:Jv:or}function A0(i,l){const o=[...i],r=o.length,f=i.map((m,d)=>Jc(m)(m,l[d]));return m=>{for(let d=0;d{for(const m in r)o[m]=r[m](f);return o}}function Fv(i,l){const o=[],r={color:0,var:0,number:0};for(let f=0;f{const o=Kn.createTransformer(l),r=Sl(i),f=Sl(l);return r.indexes.var.length===f.indexes.var.length&&r.indexes.color.length===f.indexes.color.length&&r.indexes.number.length>=f.indexes.number.length?fc.has(i)&&!f.values.length||fc.has(l)&&!r.values.length?Kv(i,l):Al(A0(Fv(r,f),f.values),o):or(i,l)};function C0(i,l,o){return typeof i=="number"&&typeof l=="number"&&typeof o=="number"?zt(i,l,o):Jc(i)(i,l)}const $v=i=>{const l=({timestamp:o})=>i(o);return{start:(o=!0)=>Dt.update(l,o),stop:()=>Qn(l),now:()=>ie.isProcessing?ie.timestamp:oe.now()}},M0=(i,l,o=10)=>{let r="";const f=Math.max(Math.round(l/o),2);for(let m=0;m=ur?1/0:l}function Iv(i,l=100,o){const r=o({...i,keyframes:[0,l]}),f=Math.min(Fc(r),ur);return{type:"keyframes",ease:m=>r.next(f*m).value/l,duration:Be(f)}}const t2=5;function E0(i,l,o){const r=Math.max(l-t2,0);return l0(o-i(r),l-r)}const kt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ju=.001;function e2({duration:i=kt.duration,bounce:l=kt.bounce,velocity:o=kt.velocity,mass:r=kt.mass}){let f,m,d=1-l;d=Fe(kt.minDamping,kt.maxDamping,d),i=Fe(kt.minDuration,kt.maxDuration,Be(i)),d<1?(f=g=>{const v=g*d,b=v*i,T=v-o,w=dc(g,d),N=Math.exp(-b);return Ju-T/w*N},m=g=>{const b=g*d*i,T=b*o+o,w=Math.pow(d,2)*Math.pow(g,2)*i,N=Math.exp(-b),H=dc(Math.pow(g,2),d);return(-f(g)+Ju>0?-1:1)*((T-w)*N)/H}):(f=g=>{const v=Math.exp(-g*i),b=(g-o)*i+1;return-Ju+v*b},m=g=>{const v=Math.exp(-g*i),b=(o-g)*(i*i);return v*b});const p=5/i,y=i2(f,m,p);if(i=yn(i),isNaN(y))return{stiffness:kt.stiffness,damping:kt.damping,duration:i};{const g=Math.pow(y,2)*r;return{stiffness:g,damping:d*2*Math.sqrt(r*g),duration:i}}}const n2=12;function i2(i,l,o){let r=o;for(let f=1;fi[o]!==void 0)}function s2(i){let l={velocity:kt.velocity,stiffness:kt.stiffness,damping:kt.damping,mass:kt.mass,isResolvedFromDuration:!1,...i};if(!zp(i,l2)&&zp(i,a2))if(i.visualDuration){const o=i.visualDuration,r=2*Math.PI/(o*1.2),f=r*r,m=2*Fe(.05,1,1-(i.bounce||0))*Math.sqrt(f);l={...l,mass:kt.mass,stiffness:f,damping:m}}else{const o=e2(i);l={...l,...o,mass:kt.mass},l.isResolvedFromDuration=!0}return l}function cr(i=kt.visualDuration,l=kt.bounce){const o=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:l}:i;let{restSpeed:r,restDelta:f}=o;const m=o.keyframes[0],d=o.keyframes[o.keyframes.length-1],p={done:!1,value:m},{stiffness:y,damping:g,mass:v,duration:b,velocity:T,isResolvedFromDuration:w}=s2({...o,velocity:-Be(o.velocity||0)}),N=T||0,H=g/(2*Math.sqrt(y*v)),G=d-m,U=Be(Math.sqrt(y/v)),q=Math.abs(G)<5;r||(r=q?kt.restSpeed.granular:kt.restSpeed.default),f||(f=q?kt.restDelta.granular:kt.restDelta.default);let V;if(H<1){const Q=dc(U,H);V=nt=>{const F=Math.exp(-H*U*nt);return d-F*((N+H*U*G)/Q*Math.sin(Q*nt)+G*Math.cos(Q*nt))}}else if(H===1)V=Q=>d-Math.exp(-U*Q)*(G+(N+U*G)*Q);else{const Q=U*Math.sqrt(H*H-1);V=nt=>{const F=Math.exp(-H*U*nt),K=Math.min(Q*nt,300);return d-F*((N+H*U*G)*Math.sinh(K)+Q*G*Math.cosh(K))/Q}}const Z={calculatedDuration:w&&b||null,next:Q=>{const nt=V(Q);if(w)p.done=Q>=b;else{let F=Q===0?N:0;H<1&&(F=Q===0?yn(N):E0(V,Q,nt));const K=Math.abs(F)<=r,it=Math.abs(d-nt)<=f;p.done=K&&it}return p.value=p.done?d:nt,p},toString:()=>{const Q=Math.min(Fc(Z),ur),nt=M0(F=>Z.next(Q*F).value,Q,30);return Q+"ms "+nt},toTransition:()=>{}};return Z}cr.applyToOptions=i=>{const l=Iv(i,100,cr);return i.ease=l.ease,i.duration=yn(l.duration),i.type="keyframes",i};function hc({keyframes:i,velocity:l=0,power:o=.8,timeConstant:r=325,bounceDamping:f=10,bounceStiffness:m=500,modifyTarget:d,min:p,max:y,restDelta:g=.5,restSpeed:v}){const b=i[0],T={done:!1,value:b},w=K=>p!==void 0&&Ky,N=K=>p===void 0?y:y===void 0||Math.abs(p-K)-H*Math.exp(-K/r),V=K=>U+q(K),Z=K=>{const it=q(K),yt=V(K);T.done=Math.abs(it)<=g,T.value=T.done?U:yt};let Q,nt;const F=K=>{w(T.value)&&(Q=K,nt=cr({keyframes:[T.value,N(T.value)],velocity:E0(V,K,T.value),damping:f,stiffness:m,restDelta:g,restSpeed:v}))};return F(0),{calculatedDuration:null,next:K=>{let it=!1;return!nt&&Q===void 0&&(it=!0,Z(K),F(K)),Q!==void 0&&K>=Q?nt.next(K-Q):(!it&&Z(K),T)}}}function r2(i,l,o){const r=[],f=o||gn.mix||C0,m=i.length-1;for(let d=0;dl[0];if(m===2&&l[0]===l[1])return()=>l[1];const d=i[0]===i[1];i[0]>i[m-1]&&(i=[...i].reverse(),l=[...l].reverse());const p=r2(l,r,f),y=p.length,g=v=>{if(d&&v1)for(;bg(Fe(i[0],i[m-1],v)):g}function u2(i,l){const o=i[i.length-1];for(let r=1;r<=l;r++){const f=vl(0,l,r);i.push(zt(o,1,f))}}function c2(i){const l=[0];return u2(l,i.length-1),l}function f2(i,l){return i.map(o=>o*l)}function d2(i,l){return i.map(()=>l||m0).splice(0,i.length-1)}function pl({duration:i=300,keyframes:l,times:o,ease:r="easeInOut"}){const f=Tv(r)?r.map(Ep):Ep(r),m={done:!1,value:l[0]},d=f2(o&&o.length===l.length?o:c2(l),i),p=o2(d,l,{ease:Array.isArray(f)?f:d2(l,f)});return{calculatedDuration:i,next:y=>(m.value=p(y),m.done=y>=i,m)}}const h2=i=>i!==null;function Pc(i,{repeat:l,repeatType:o="loop"},r,f=1){const m=i.filter(h2),p=f<0||l&&o!=="loop"&&l%2===1?0:m.length-1;return!p||r===void 0?m[p]:r}const m2={decay:hc,inertia:hc,tween:pl,keyframes:pl,spring:cr};function D0(i){typeof i.type=="string"&&(i.type=m2[i.type])}class $c{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(l=>{this.resolve=l})}notifyFinished(){this.resolve()}then(l,o){return this.finished.then(l,o)}}const p2=i=>i/100;class Ic extends $c{constructor(l){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:o}=this.options;o&&o.updatedAt!==oe.now()&&this.tick(oe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=l,this.initAnimation(),this.play(),l.autoplay===!1&&this.pause()}initAnimation(){const{options:l}=this;D0(l);const{type:o=pl,repeat:r=0,repeatDelay:f=0,repeatType:m,velocity:d=0}=l;let{keyframes:p}=l;const y=o||pl;y!==pl&&typeof p[0]!="number"&&(this.mixKeyframes=Al(p2,C0(p[0],p[1])),p=[0,100]);const g=y({...l,keyframes:p});m==="mirror"&&(this.mirroredGenerator=y({...l,keyframes:[...p].reverse(),velocity:-d})),g.calculatedDuration===null&&(g.calculatedDuration=Fc(g));const{calculatedDuration:v}=g;this.calculatedDuration=v,this.resolvedDuration=v+f,this.totalDuration=this.resolvedDuration*(r+1)-f,this.generator=g}updateTime(l){const o=Math.round(l-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(l,o=!1){const{generator:r,totalDuration:f,mixKeyframes:m,mirroredGenerator:d,resolvedDuration:p,calculatedDuration:y}=this;if(this.startTime===null)return r.next(0);const{delay:g=0,keyframes:v,repeat:b,repeatType:T,repeatDelay:w,type:N,onUpdate:H,finalKeyframe:G}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,l):this.speed<0&&(this.startTime=Math.min(l-f/this.speed,this.startTime)),o?this.currentTime=l:this.updateTime(l);const U=this.currentTime-g*(this.playbackSpeed>=0?1:-1),q=this.playbackSpeed>=0?U<0:U>f;this.currentTime=Math.max(U,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let V=this.currentTime,Z=r;if(b){const K=Math.min(this.currentTime,f)/p;let it=Math.floor(K),yt=K%1;!yt&&K>=1&&(yt=1),yt===1&&it--,it=Math.min(it,b+1),it%2&&(T==="reverse"?(yt=1-yt,w&&(yt-=w/p)):T==="mirror"&&(Z=d)),V=Fe(0,1,yt)*p}const Q=q?{done:!1,value:v[0]}:Z.next(V);m&&(Q.value=m(Q.value));let{done:nt}=Q;!q&&y!==null&&(nt=this.playbackSpeed>=0?this.currentTime>=f:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&nt);return F&&N!==hc&&(Q.value=Pc(v,this.options,G,this.speed)),H&&H(Q.value),F&&this.finish(),Q}then(l,o){return this.finished.then(l,o)}get duration(){return Be(this.calculatedDuration)}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+Be(l)}get time(){return Be(this.currentTime)}set time(l){l=yn(l),this.currentTime=l,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=l:this.driver&&(this.startTime=this.driver.now()-l/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(l){this.updateTime(oe.now());const o=this.playbackSpeed!==l;this.playbackSpeed=l,o&&(this.time=Be(this.currentTime))}play(){if(this.isStopped)return;const{driver:l=$v,startTime:o}=this.options;this.driver||(this.driver=l(f=>this.tick(f))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(oe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(l){return this.startTime=0,this.tick(l,!0)}attachTimeline(l){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),l.observe(this)}}function y2(i){for(let l=1;li*180/Math.PI,mc=i=>{const l=xi(Math.atan2(i[1],i[0]));return pc(l)},g2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:mc,rotateZ:mc,skewX:i=>xi(Math.atan(i[1])),skewY:i=>xi(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},pc=i=>(i=i%360,i<0&&(i+=360),i),Rp=mc,Op=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),kp=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),x2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Op,scaleY:kp,scale:i=>(Op(i)+kp(i))/2,rotateX:i=>pc(xi(Math.atan2(i[6],i[5]))),rotateY:i=>pc(xi(Math.atan2(-i[2],i[0]))),rotateZ:Rp,rotate:Rp,skewX:i=>xi(Math.atan(i[4])),skewY:i=>xi(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function yc(i){return i.includes("scale")?1:0}function gc(i,l){if(!i||i==="none")return yc(l);const o=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,f;if(o)r=x2,f=o;else{const p=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=g2,f=p}if(!f)return yc(l);const m=r[l],d=f[1].split(",").map(b2);return typeof m=="function"?m(d):d[m]}const v2=(i,l)=>{const{transform:o="none"}=getComputedStyle(i);return gc(o,l)};function b2(i){return parseFloat(i.trim())}const fa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],da=new Set(fa),Vp=i=>i===ca||i===J,S2=new Set(["x","y","z"]),j2=fa.filter(i=>!S2.has(i));function T2(i){const l=[];return j2.forEach(o=>{const r=i.getValue(o);r!==void 0&&(l.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),l}const Zn={width:({x:i},{paddingLeft:l="0",paddingRight:o="0"})=>i.max-i.min-parseFloat(l)-parseFloat(o),height:({y:i},{paddingTop:l="0",paddingBottom:o="0"})=>i.max-i.min-parseFloat(l)-parseFloat(o),top:(i,{top:l})=>parseFloat(l),left:(i,{left:l})=>parseFloat(l),bottom:({y:i},{top:l})=>parseFloat(l)+(i.max-i.min),right:({x:i},{left:l})=>parseFloat(l)+(i.max-i.min),x:(i,{transform:l})=>gc(l,"x"),y:(i,{transform:l})=>gc(l,"y")};Zn.translateX=Zn.x;Zn.translateY=Zn.y;const vi=new Set;let xc=!1,vc=!1,bc=!1;function w0(){if(vc){const i=Array.from(vi).filter(r=>r.needsMeasurement),l=new Set(i.map(r=>r.element)),o=new Map;l.forEach(r=>{const f=T2(r);f.length&&(o.set(r,f),r.render())}),i.forEach(r=>r.measureInitialState()),l.forEach(r=>{r.render();const f=o.get(r);f&&f.forEach(([m,d])=>{r.getValue(m)?.set(d)})}),i.forEach(r=>r.measureEndState()),i.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vc=!1,xc=!1,vi.forEach(i=>i.complete(bc)),vi.clear()}function L0(){vi.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(vc=!0)})}function A2(){bc=!0,L0(),w0(),bc=!1}class tf{constructor(l,o,r,f,m,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...l],this.onComplete=o,this.name=r,this.motionValue=f,this.element=m,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(vi.add(this),xc||(xc=!0,Dt.read(L0),Dt.resolveKeyframes(w0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:l,name:o,element:r,motionValue:f}=this;if(l[0]===null){const m=f?.get(),d=l[l.length-1];if(m!==void 0)l[0]=m;else if(r&&o){const p=r.readValue(o,d);p!=null&&(l[0]=p)}l[0]===void 0&&(l[0]=d),f&&m===void 0&&f.set(l[0])}y2(l)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(l=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,l),vi.delete(this)}cancel(){this.state==="scheduled"&&(vi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const C2=i=>i.startsWith("--");function M2(i,l,o){C2(l)?i.style.setProperty(l,o):i.style[l]=o}const E2=qc(()=>window.ScrollTimeline!==void 0),D2={};function w2(i,l){const o=qc(i);return()=>D2[l]??o()}const N0=w2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dl=([i,l,o,r])=>`cubic-bezier(${i}, ${l}, ${o}, ${r})`,Bp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dl([0,.65,.55,1]),circOut:dl([.55,0,1,.45]),backIn:dl([.31,.01,.66,-.59]),backOut:dl([.33,1.53,.69,.99])};function _0(i,l){if(i)return typeof i=="function"?N0()?M0(i,l):"ease-out":p0(i)?dl(i):Array.isArray(i)?i.map(o=>_0(o,l)||Bp.easeOut):Bp[i]}function L2(i,l,o,{delay:r=0,duration:f=300,repeat:m=0,repeatType:d="loop",ease:p="easeOut",times:y}={},g=void 0){const v={[l]:o};y&&(v.offset=y);const b=_0(p,f);Array.isArray(b)&&(v.easing=b);const T={delay:r,duration:f,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:m+1,direction:d==="reverse"?"alternate":"normal"};return g&&(T.pseudoElement=g),i.animate(v,T)}function z0(i){return typeof i=="function"&&"applyToOptions"in i}function N2({type:i,...l}){return z0(i)&&N0()?i.applyToOptions(l):(l.duration??(l.duration=300),l.ease??(l.ease="easeOut"),l)}class _2 extends $c{constructor(l){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!l)return;const{element:o,name:r,keyframes:f,pseudoElement:m,allowFlatten:d=!1,finalKeyframe:p,onComplete:y}=l;this.isPseudoElement=!!m,this.allowFlatten=d,this.options=l,Yc(typeof l.type!="string");const g=N2(l);this.animation=L2(o,r,f,g,m),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!m){const v=Pc(f,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(v):M2(o,r,v),this.animation.cancel()}y?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:l}=this;l==="idle"||l==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const l=this.options?.element;!this.isPseudoElement&&l?.isConnected&&this.animation.commitStyles?.()}get duration(){const l=this.animation.effect?.getComputedTiming?.().duration||0;return Be(Number(l))}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+Be(l)}get time(){return Be(Number(this.animation.currentTime)||0)}set time(l){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=yn(l)}get speed(){return this.animation.playbackRate}set speed(l){l<0&&(this.finishedTime=null),this.animation.playbackRate=l}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(l){this.manualStartTime=this.animation.startTime=l}attachTimeline({timeline:l,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,l&&E2()?(this.animation.timeline=l,Ue):o(this)}}const R0={anticipate:f0,backInOut:c0,circInOut:h0};function z2(i){return i in R0}function R2(i){typeof i.ease=="string"&&z2(i.ease)&&(i.ease=R0[i.ease])}const Fu=10;class O2 extends _2{constructor(l){R2(l),D0(l),super(l),l.startTime!==void 0&&(this.startTime=l.startTime),this.options=l}updateMotionValue(l){const{motionValue:o,onUpdate:r,onComplete:f,element:m,...d}=this.options;if(!o)return;if(l!==void 0){o.set(l);return}const p=new Ic({...d,autoplay:!1}),y=Math.max(Fu,oe.now()-this.startTime),g=Fe(0,Fu,y-Fu);o.setWithVelocity(p.sample(Math.max(0,y-g)).value,p.sample(y).value,g),p.stop()}}const Up=(i,l)=>l==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(Kn.test(i)||i==="0")&&!i.startsWith("url("));function k2(i){const l=i[0];if(i.length===1)return!0;for(let o=0;oObject.hasOwnProperty.call(Element.prototype,"animate"));function H2(i){const{motionValue:l,name:o,repeatDelay:r,repeatType:f,damping:m,type:d}=i;if(!(l?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:y,transformTemplate:g}=l.owner.getProps();return U2()&&o&&B2.has(o)&&(o!=="transform"||!g)&&!y&&!r&&f!=="mirror"&&m!==0&&d!=="inertia"}const Y2=40;class q2 extends $c{constructor({autoplay:l=!0,delay:o=0,type:r="keyframes",repeat:f=0,repeatDelay:m=0,repeatType:d="loop",keyframes:p,name:y,motionValue:g,element:v,...b}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=oe.now();const T={autoplay:l,delay:o,type:r,repeat:f,repeatDelay:m,repeatType:d,name:y,motionValue:g,element:v,...b},w=v?.KeyframeResolver||tf;this.keyframeResolver=new w(p,(N,H,G)=>this.onKeyframesResolved(N,H,T,!G),y,g,v),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(l,o,r,f){this.keyframeResolver=void 0;const{name:m,type:d,velocity:p,delay:y,isHandoff:g,onUpdate:v}=r;this.resolvedAt=oe.now(),V2(l,m,d,p)||((gn.instantAnimations||!y)&&v?.(Pc(l,r,o)),l[0]=l[l.length-1],Sc(r),r.repeat=0);const T={startTime:f?this.resolvedAt?this.resolvedAt-this.createdAt>Y2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:l},w=!g&&H2(T),N=T.motionValue?.owner?.current,H=w?new O2({...T,element:N}):new Ic(T);H.finished.then(()=>{this.notifyFinished()}).catch(Ue),this.pendingTimeline&&(this.stopTimeline=H.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=H}get finished(){return this._animation?this.animation.finished:this._finished}then(l,o){return this.finished.finally(l).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),A2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(l){this.animation.time=l}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(l){this.animation.speed=l}get startTime(){return this.animation.startTime}attachTimeline(l){return this._animation?this.stopTimeline=this.animation.attachTimeline(l):this.pendingTimeline=l,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function O0(i,l,o,r=0,f=1){const m=Array.from(i).sort((g,v)=>g.sortNodePosition(v)).indexOf(l),d=i.size,p=(d-1)*r;return typeof o=="function"?o(m,d):f===1?m*r:p-m*r}const G2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function X2(i){const l=G2.exec(i);if(!l)return[,];const[,o,r,f]=l;return[`--${o??r}`,f]}function k0(i,l,o=1){const[r,f]=X2(i);if(!r)return;const m=window.getComputedStyle(l).getPropertyValue(r);if(m){const d=m.trim();return n0(d)?parseFloat(d):d}return Qc(f)?k0(f,l,o+1):f}const Z2={type:"spring",stiffness:500,damping:25,restSpeed:10},Q2=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),K2={type:"keyframes",duration:.8},W2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},J2=(i,{keyframes:l})=>l.length>2?K2:da.has(i)?i.startsWith("scale")?Q2(l[1]):Z2:W2,F2=i=>i!==null;function P2(i,{repeat:l,repeatType:o="loop"},r){const f=i.filter(F2),m=l&&o!=="loop"&&l%2===1?0:f.length-1;return f[m]}function ef(i,l){return i?.[l]??i?.default??i}function $2({when:i,delay:l,delayChildren:o,staggerChildren:r,staggerDirection:f,repeat:m,repeatType:d,repeatDelay:p,from:y,elapsed:g,...v}){return!!Object.keys(v).length}const nf=(i,l,o,r={},f,m)=>d=>{const p=ef(r,i)||{},y=p.delay||r.delay||0;let{elapsed:g=0}=r;g=g-yn(y);const v={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:l.getVelocity(),...p,delay:-g,onUpdate:T=>{l.set(T),p.onUpdate&&p.onUpdate(T)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:i,motionValue:l,element:m?void 0:f};$2(p)||Object.assign(v,J2(i,v)),v.duration&&(v.duration=yn(v.duration)),v.repeatDelay&&(v.repeatDelay=yn(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let b=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(Sc(v),v.delay===0&&(b=!0)),(gn.instantAnimations||gn.skipAnimations||f?.shouldSkipAnimations)&&(b=!0,Sc(v),v.delay=0),v.allowFlatten=!p.type&&!p.ease,b&&!m&&l.get()!==void 0){const T=P2(v.keyframes,p);if(T!==void 0){Dt.update(()=>{v.onUpdate(T),v.onComplete()});return}}return p.isSync?new Ic(v):new q2(v)};function Hp(i){const l=[{},{}];return i?.values.forEach((o,r)=>{l[0][r]=o.get(),l[1][r]=o.getVelocity()}),l}function af(i,l,o,r){if(typeof l=="function"){const[f,m]=Hp(r);l=l(o!==void 0?o:i.custom,f,m)}if(typeof l=="string"&&(l=i.variants&&i.variants[l]),typeof l=="function"){const[f,m]=Hp(r);l=l(o!==void 0?o:i.custom,f,m)}return l}function oa(i,l,o){const r=i.getProps();return af(r,l,o!==void 0?o:r.custom,i)}const V0=new Set(["width","height","top","left","right","bottom",...fa]),Yp=30,I2=i=>!isNaN(parseFloat(i));class tb{constructor(l,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const f=oe.now();if(this.updatedAt!==f&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const m of this.dependents)m.dirty()},this.hasAnimated=!1,this.setCurrent(l),this.owner=o.owner}setCurrent(l){this.current=l,this.updatedAt=oe.now(),this.canTrackVelocity===null&&l!==void 0&&(this.canTrackVelocity=I2(this.current))}setPrevFrameValue(l=this.current){this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt}onChange(l){return this.on("change",l)}on(l,o){this.events[l]||(this.events[l]=new Gc);const r=this.events[l].add(o);return l==="change"?()=>{r(),Dt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const l in this.events)this.events[l].clear()}attach(l,o){this.passiveEffect=l,this.stopPassiveEffect=o}set(l){this.passiveEffect?this.passiveEffect(l,this.updateAndNotify):this.updateAndNotify(l)}setWithVelocity(l,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt-r}jump(l,o=!0){this.updateAndNotify(l),this.prev=l,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(l){this.dependents||(this.dependents=new Set),this.dependents.add(l)}removeDependent(l){this.dependents&&this.dependents.delete(l)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const l=oe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||l-this.updatedAt>Yp)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,Yp);return l0(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(l){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=l(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ua(i,l){return new tb(i,l)}const jc=i=>Array.isArray(i);function eb(i,l,o){i.hasValue(l)?i.getValue(l).set(o):i.addValue(l,ua(o))}function nb(i){return jc(i)?i[i.length-1]||0:i}function ib(i,l){const o=oa(i,l);let{transitionEnd:r={},transition:f={},...m}=o||{};m={...m,...r};for(const d in m){const p=nb(m[d]);eb(i,d,p)}}const le=i=>!!(i&&i.getVelocity);function ab(i){return!!(le(i)&&i.add)}function Tc(i,l){const o=i.getValue("willChange");if(ab(o))return o.add(l);if(!o&&gn.WillChange){const r=new gn.WillChange("auto");i.addValue("willChange",r),r.add(l)}}function lf(i){return i.replace(/([A-Z])/g,l=>`-${l.toLowerCase()}`)}const lb="framerAppearId",B0="data-"+lf(lb);function U0(i){return i.props[B0]}function sb({protectedKeys:i,needsAnimating:l},o){const r=i.hasOwnProperty(o)&&l[o]!==!0;return l[o]=!1,r}function H0(i,l,{delay:o=0,transitionOverride:r,type:f}={}){let{transition:m=i.getDefaultTransition(),transitionEnd:d,...p}=l;const y=m?.reduceMotion;r&&(m=r);const g=[],v=f&&i.animationState&&i.animationState.getState()[f];for(const b in p){const T=i.getValue(b,i.latestValues[b]??null),w=p[b];if(w===void 0||v&&sb(v,b))continue;const N={delay:o,...ef(m||{},b)},H=T.get();if(H!==void 0&&!T.isAnimating&&!Array.isArray(w)&&w===H&&!N.velocity)continue;let G=!1;if(window.MotionHandoffAnimation){const V=U0(i);if(V){const Z=window.MotionHandoffAnimation(V,b,Dt);Z!==null&&(N.startTime=Z,G=!0)}}Tc(i,b);const U=y??i.shouldReduceMotion;T.start(nf(b,T,w,U&&V0.has(b)?{type:!1}:N,i,G));const q=T.animation;q&&g.push(q)}return d&&Promise.all(g).then(()=>{Dt.update(()=>{d&&ib(i,d)})}),g}function Ac(i,l,o={}){const r=oa(i,l,o.type==="exit"?i.presenceContext?.custom:void 0);let{transition:f=i.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(f=o.transitionOverride);const m=r?()=>Promise.all(H0(i,r,o)):()=>Promise.resolve(),d=i.variantChildren&&i.variantChildren.size?(y=0)=>{const{delayChildren:g=0,staggerChildren:v,staggerDirection:b}=f;return rb(i,l,y,g,v,b,o)}:()=>Promise.resolve(),{when:p}=f;if(p){const[y,g]=p==="beforeChildren"?[m,d]:[d,m];return y().then(()=>g())}else return Promise.all([m(),d(o.delay)])}function rb(i,l,o=0,r=0,f=0,m=1,d){const p=[];for(const y of i.variantChildren)y.notify("AnimationStart",l),p.push(Ac(y,l,{...d,delay:o+(typeof r=="function"?0:r)+O0(i.variantChildren,y,r,f,m)}).then(()=>y.notify("AnimationComplete",l)));return Promise.all(p)}function ob(i,l,o={}){i.notify("AnimationStart",l);let r;if(Array.isArray(l)){const f=l.map(m=>Ac(i,m,o));r=Promise.all(f)}else if(typeof l=="string")r=Ac(i,l,o);else{const f=typeof l=="function"?oa(i,l,o.custom):l;r=Promise.all(H0(i,f,o))}return r.then(()=>{i.notify("AnimationComplete",l)})}const ub={test:i=>i==="auto",parse:i=>i},Y0=i=>l=>l.test(i),q0=[ca,J,Je,Gn,kv,Ov,ub],qp=i=>q0.find(Y0(i));function cb(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||a0(i):!0}const fb=new Set(["brightness","contrast","saturate","opacity"]);function db(i){const[l,o]=i.slice(0,-1).split("(");if(l==="drop-shadow")return i;const[r]=o.match(Kc)||[];if(!r)return i;const f=o.replace(r,"");let m=fb.has(l)?1:0;return r!==o&&(m*=100),l+"("+m+f+")"}const hb=/\b([a-z-]*)\(.*?\)/gu,Cc={...Kn,getAnimatableNone:i=>{const l=i.match(hb);return l?l.map(db).join(" "):i}},Gp={...ca,transform:Math.round},mb={rotate:Gn,rotateX:Gn,rotateY:Gn,rotateZ:Gn,scale:Ks,scaleX:Ks,scaleY:Ks,scaleZ:Ks,skew:Gn,skewX:Gn,skewY:Gn,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:bl,originX:wp,originY:wp,originZ:J},sf={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,inset:J,insetBlock:J,insetBlockStart:J,insetBlockEnd:J,insetInline:J,insetInlineStart:J,insetInlineEnd:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,paddingBlock:J,paddingBlockStart:J,paddingBlockEnd:J,paddingInline:J,paddingInlineStart:J,paddingInlineEnd:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,marginBlock:J,marginBlockStart:J,marginBlockEnd:J,marginInline:J,marginInlineStart:J,marginInlineEnd:J,fontSize:J,backgroundPositionX:J,backgroundPositionY:J,...mb,zIndex:Gp,fillOpacity:bl,strokeOpacity:bl,numOctaves:Gp},pb={...sf,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:Cc,WebkitFilter:Cc},G0=i=>pb[i];function X0(i,l){let o=G0(i);return o!==Cc&&(o=Kn),o.getAnimatableNone?o.getAnimatableNone(l):void 0}const yb=new Set(["auto","none","0"]);function gb(i,l,o){let r=0,f;for(;r{l.getValue(p).set(y)}),this.resolveNoneKeyframes()}}function vb(i,l,o){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let r=document;const f=o?.[i]??r.querySelectorAll(i);return f?Array.from(f):[]}return Array.from(i).filter(r=>r!=null)}const Z0=(i,l)=>l&&typeof i=="number"?l.transform(i):i;function Mc(i){return i0(i)&&"offsetHeight"in i}const{schedule:rf}=y0(queueMicrotask,!1),Xe={x:!1,y:!1};function Q0(){return Xe.x||Xe.y}function bb(i){return i==="x"||i==="y"?Xe[i]?null:(Xe[i]=!0,()=>{Xe[i]=!1}):Xe.x||Xe.y?null:(Xe.x=Xe.y=!0,()=>{Xe.x=Xe.y=!1})}function K0(i,l){const o=vb(i),r=new AbortController,f={passive:!0,...l,signal:r.signal};return[o,f,()=>r.abort()]}function Xp(i){return!(i.pointerType==="touch"||Q0())}function Sb(i,l,o={}){const[r,f,m]=K0(i,o),d=p=>{if(!Xp(p))return;const{target:y}=p,g=l(y,p);if(typeof g!="function"||!y)return;const v=b=>{Xp(b)&&(g(b),y.removeEventListener("pointerleave",v))};y.addEventListener("pointerleave",v,f)};return r.forEach(p=>{p.addEventListener("pointerenter",d,f)}),m}const W0=(i,l)=>l?i===l?!0:W0(i,l.parentElement):!1,of=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1,jb=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Tb(i){return jb.has(i.tagName)||i.isContentEditable===!0}const Ab=new Set(["INPUT","SELECT","TEXTAREA"]);function Cb(i){return Ab.has(i.tagName)||i.isContentEditable===!0}const lr=new WeakSet;function Zp(i){return l=>{l.key==="Enter"&&i(l)}}function Pu(i,l){i.dispatchEvent(new PointerEvent("pointer"+l,{isPrimary:!0,bubbles:!0}))}const Mb=(i,l)=>{const o=i.currentTarget;if(!o)return;const r=Zp(()=>{if(lr.has(o))return;Pu(o,"down");const f=Zp(()=>{Pu(o,"up")}),m=()=>Pu(o,"cancel");o.addEventListener("keyup",f,l),o.addEventListener("blur",m,l)});o.addEventListener("keydown",r,l),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),l)};function Qp(i){return of(i)&&!Q0()}function Eb(i,l,o={}){const[r,f,m]=K0(i,o),d=p=>{const y=p.currentTarget;if(!Qp(p))return;lr.add(y);const g=l(y,p),v=(w,N)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",T),lr.has(y)&&lr.delete(y),Qp(w)&&typeof g=="function"&&g(w,{success:N})},b=w=>{v(w,y===window||y===document||o.useGlobalTarget||W0(y,w.target))},T=w=>{v(w,!1)};window.addEventListener("pointerup",b,f),window.addEventListener("pointercancel",T,f)};return r.forEach(p=>{(o.useGlobalTarget?window:p).addEventListener("pointerdown",d,f),Mc(p)&&(p.addEventListener("focus",g=>Mb(g,f)),!Tb(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),m}function J0(i){return i0(i)&&"ownerSVGElement"in i}function Db(i){return J0(i)&&i.tagName==="svg"}const wb=[...q0,Zt,Kn],Lb=i=>wb.find(Y0(i)),Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),la=()=>({x:Kp(),y:Kp()}),Wp=()=>({min:0,max:0}),Wt=()=>({x:Wp(),y:Wp()}),Ec={current:null},F0={current:!1},Nb=typeof window<"u";function _b(){if(F0.current=!0,!!Nb)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),l=()=>Ec.current=i.matches;i.addEventListener("change",l),l()}else Ec.current=!1}const zb=new WeakMap;function yr(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function jl(i){return typeof i=="string"||Array.isArray(i)}const uf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cf=["initial",...uf];function gr(i){return yr(i.animate)||cf.some(l=>jl(i[l]))}function P0(i){return!!(gr(i)||i.variants)}function Rb(i,l,o){for(const r in l){const f=l[r],m=o[r];if(le(f))i.addValue(r,f);else if(le(m))i.addValue(r,ua(f,{owner:i}));else if(m!==f)if(i.hasValue(r)){const d=i.getValue(r);d.liveStyle===!0?d.jump(f):d.hasAnimated||d.set(f)}else{const d=i.getStaticValue(r);i.addValue(r,ua(d!==void 0?d:f,{owner:i}))}}for(const r in o)l[r]===void 0&&i.removeValue(r);return l}const Jp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fr={};function $0(i){fr=i}function Ob(){return fr}class kb{scrapeMotionValuesFromProps(l,o,r){return{}}constructor({parent:l,props:o,presenceContext:r,reducedMotionConfig:f,skipAnimations:m,blockInitialAnimation:d,visualState:p},y={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=oe.now();this.renderScheduledAtthis.bindToMotionValue(r,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(F0.current||_b(),this.shouldReduceMotion=Ec.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Qn(this.notifyUpdate),Qn(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const o=this.features[l];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(l){this.children.add(l),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(l)}removeChild(l){this.children.delete(l),this.enteringChildren&&this.enteringChildren.delete(l)}bindToMotionValue(l,o){this.valueSubscriptions.has(l)&&this.valueSubscriptions.get(l)();const r=da.has(l);r&&this.onBindTransform&&this.onBindTransform();const f=o.on("change",d=>{this.latestValues[l]=d,this.props.onUpdate&&Dt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let m;typeof window<"u"&&window.MotionCheckAppearSync&&(m=window.MotionCheckAppearSync(this,l,o)),this.valueSubscriptions.set(l,()=>{f(),m&&m(),o.owner&&o.stop()})}sortNodePosition(l){return!this.current||!this.sortInstanceNodePosition||this.type!==l.type?0:this.sortInstanceNodePosition(this.current,l.current)}updateFeatures(){let l="animation";for(l in fr){const o=fr[l];if(!o)continue;const{isEnabled:r,Feature:f}=o;if(!this.features[l]&&f&&r(this.props)&&(this.features[l]=new f(this)),this.features[l]){const m=this.features[l];m.isMounted?m.update():(m.mount(),m.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wt()}getStaticValue(l){return this.latestValues[l]}setStaticValue(l,o){this.latestValues[l]=o}update(l,o){(l.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=l,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;ro.variantChildren.delete(l)}addValue(l,o){const r=this.values.get(l);o!==r&&(r&&this.removeValue(l),this.bindToMotionValue(l,o),this.values.set(l,o),this.latestValues[l]=o.get())}removeValue(l){this.values.delete(l);const o=this.valueSubscriptions.get(l);o&&(o(),this.valueSubscriptions.delete(l)),delete this.latestValues[l],this.removeValueFromRenderState(l,this.renderState)}hasValue(l){return this.values.has(l)}getValue(l,o){if(this.props.values&&this.props.values[l])return this.props.values[l];let r=this.values.get(l);return r===void 0&&o!==void 0&&(r=ua(o===null?void 0:o,{owner:this}),this.addValue(l,r)),r}readValue(l,o){let r=this.latestValues[l]!==void 0||!this.current?this.latestValues[l]:this.getBaseTargetFromProps(this.props,l)??this.readValueFromInstance(this.current,l,this.options);return r!=null&&(typeof r=="string"&&(n0(r)||a0(r))?r=parseFloat(r):!Lb(r)&&Kn.test(o)&&(r=X0(l,o)),this.setBaseTarget(l,le(r)?r.get():r)),le(r)?r.get():r}setBaseTarget(l,o){this.baseTarget[l]=o}getBaseTarget(l){const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const m=af(this.props,o,this.presenceContext?.custom);m&&(r=m[l])}if(o&&r!==void 0)return r;const f=this.getBaseTargetFromProps(this.props,l);return f!==void 0&&!le(f)?f:this.initialValues[l]!==void 0&&r===void 0?void 0:this.baseTarget[l]}on(l,o){return this.events[l]||(this.events[l]=new Gc),this.events[l].add(o)}notify(l,...o){this.events[l]&&this.events[l].notify(...o)}scheduleRenderMicrotask(){rf.render(this.render)}}class I0 extends kb{constructor(){super(...arguments),this.KeyframeResolver=xb}sortInstanceNodePosition(l,o){return l.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(l,o){const r=l.style;return r?r[o]:void 0}removeValueFromRenderState(l,{vars:o,style:r}){delete o[l],delete r[l]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:l}=this.props;le(l)&&(this.childSubscription=l.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}class Wn{constructor(l){this.isMounted=!1,this.node=l}update(){}}function tg({top:i,left:l,right:o,bottom:r}){return{x:{min:l,max:o},y:{min:i,max:r}}}function Vb({x:i,y:l}){return{top:l.min,right:i.max,bottom:l.max,left:i.min}}function Bb(i,l){if(!l)return i;const o=l({x:i.left,y:i.top}),r=l({x:i.right,y:i.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function $u(i){return i===void 0||i===1}function Dc({scale:i,scaleX:l,scaleY:o}){return!$u(i)||!$u(l)||!$u(o)}function yi(i){return Dc(i)||eg(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function eg(i){return Fp(i.x)||Fp(i.y)}function Fp(i){return i&&i!=="0%"}function dr(i,l,o){const r=i-o,f=l*r;return o+f}function Pp(i,l,o,r,f){return f!==void 0&&(i=dr(i,f,r)),dr(i,o,r)+l}function wc(i,l=0,o=1,r,f){i.min=Pp(i.min,l,o,r,f),i.max=Pp(i.max,l,o,r,f)}function ng(i,{x:l,y:o}){wc(i.x,l.translate,l.scale,l.originPoint),wc(i.y,o.translate,o.scale,o.originPoint)}const $p=.999999999999,Ip=1.0000000000001;function Ub(i,l,o,r=!1){const f=o.length;if(!f)return;l.x=l.y=1;let m,d;for(let p=0;p$p&&(l.x=1),l.y$p&&(l.y=1)}function sa(i,l){i.min=i.min+l,i.max=i.max+l}function ty(i,l,o,r,f=.5){const m=zt(i.min,i.max,f);wc(i,l,o,m,r)}function ra(i,l){ty(i.x,l.x,l.scaleX,l.scale,l.originX),ty(i.y,l.y,l.scaleY,l.scale,l.originY)}function ig(i,l){return tg(Bb(i.getBoundingClientRect(),l))}function Hb(i,l,o){const r=ig(i,o),{scroll:f}=l;return f&&(sa(r.x,f.offset.x),sa(r.y,f.offset.y)),r}const Yb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qb=fa.length;function Gb(i,l,o){let r="",f=!0;for(let m=0;m{if(!l.target)return i;if(typeof i=="string")if(J.test(i))i=parseFloat(i);else return i;const o=ey(i,l.target.x),r=ey(i,l.target.y);return`${o}% ${r}%`}},Xb={correct:(i,{treeScale:l,projectionDelta:o})=>{const r=i,f=Kn.parse(i);if(f.length>5)return r;const m=Kn.createTransformer(i),d=typeof f[0]!="number"?1:0,p=o.x.scale*l.x,y=o.y.scale*l.y;f[0+d]/=p,f[1+d]/=y;const g=zt(p,y,.5);return typeof f[2+d]=="number"&&(f[2+d]/=g),typeof f[3+d]=="number"&&(f[3+d]/=g),m(f)}},Lc={borderRadius:{...ol,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ol,borderTopRightRadius:ol,borderBottomLeftRadius:ol,borderBottomRightRadius:ol,boxShadow:Xb};function lg(i,{layout:l,layoutId:o}){return da.has(i)||i.startsWith("origin")||(l||o!==void 0)&&(!!Lc[i]||i==="opacity")}function df(i,l,o){const r=i.style,f=l?.style,m={};if(!r)return m;for(const d in r)(le(r[d])||f&&le(f[d])||lg(d,i)||o?.getValue(d)?.liveStyle!==void 0)&&(m[d]=r[d]);return m}function Zb(i){return window.getComputedStyle(i)}class Qb extends I0{constructor(){super(...arguments),this.type="html",this.renderInstance=ag}readValueFromInstance(l,o){if(da.has(o))return this.projection?.isProjecting?yc(o):v2(l,o);{const r=Zb(l),f=(x0(o)?r.getPropertyValue(o):r[o])||0;return typeof f=="string"?f.trim():f}}measureInstanceViewportBox(l,{transformPagePoint:o}){return ig(l,o)}build(l,o,r){ff(l,o,r.transformTemplate)}scrapeMotionValuesFromProps(l,o,r){return df(l,o,r)}}const Kb={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wb={offset:"strokeDashoffset",array:"strokeDasharray"};function Jb(i,l,o=1,r=0,f=!0){i.pathLength=1;const m=f?Kb:Wb;i[m.offset]=`${-r}`,i[m.array]=`${l} ${o}`}const Fb=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function sg(i,{attrX:l,attrY:o,attrScale:r,pathLength:f,pathSpacing:m=1,pathOffset:d=0,...p},y,g,v){if(ff(i,p,g),y){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:b,style:T}=i;b.transform&&(T.transform=b.transform,delete b.transform),(T.transform||b.transformOrigin)&&(T.transformOrigin=b.transformOrigin??"50% 50%",delete b.transformOrigin),T.transform&&(T.transformBox=v?.transformBox??"fill-box",delete b.transformBox);for(const w of Fb)b[w]!==void 0&&(T[w]=b[w],delete b[w]);l!==void 0&&(b.x=l),o!==void 0&&(b.y=o),r!==void 0&&(b.scale=r),f!==void 0&&Jb(b,f,m,d,!1)}const rg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),og=i=>typeof i=="string"&&i.toLowerCase()==="svg";function Pb(i,l,o,r){ag(i,l,void 0,r);for(const f in l.attrs)i.setAttribute(rg.has(f)?f:lf(f),l.attrs[f])}function ug(i,l,o){const r=df(i,l,o);for(const f in i)if(le(i[f])||le(l[f])){const m=fa.indexOf(f)!==-1?"attr"+f.charAt(0).toUpperCase()+f.substring(1):f;r[m]=i[f]}return r}class $b extends I0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wt}getBaseTargetFromProps(l,o){return l[o]}readValueFromInstance(l,o){if(da.has(o)){const r=G0(o);return r&&r.default||0}return o=rg.has(o)?o:lf(o),l.getAttribute(o)}scrapeMotionValuesFromProps(l,o,r){return ug(l,o,r)}build(l,o,r){sg(l,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(l,o,r,f){Pb(l,o,r,f)}mount(l){this.isSVGTag=og(l.tagName),super.mount(l)}}const Ib=cf.length;function cg(i){if(!i)return;if(!i.isControllingVariants){const o=i.parent?cg(i.parent)||{}:{};return i.props.initial!==void 0&&(o.initial=i.props.initial),o}const l={};for(let o=0;oPromise.all(l.map(({animation:o,options:r})=>ob(i,o,r)))}function iS(i){let l=nS(i),o=ny(),r=!0;const f=y=>(g,v)=>{const b=oa(i,v,y==="exit"?i.presenceContext?.custom:void 0);if(b){const{transition:T,transitionEnd:w,...N}=b;g={...g,...N,...w}}return g};function m(y){l=y(i)}function d(y){const{props:g}=i,v=cg(i.parent)||{},b=[],T=new Set;let w={},N=1/0;for(let G=0;GN&&Z,it=!1;const yt=Array.isArray(V)?V:[V];let gt=yt.reduce(f(U),{});Q===!1&&(gt={});const{prevResolvedValues:Nt={}}=q,Jt={...Nt,...gt},Ht=B=>{K=!0,T.has(B)&&(it=!0,T.delete(B)),q.needsAnimating[B]=!0;const P=i.getValue(B);P&&(P.liveStyle=!1)};for(const B in Jt){const P=gt[B],ot=Nt[B];if(w.hasOwnProperty(B))continue;let dt=!1;jc(P)&&jc(ot)?dt=!fg(P,ot):dt=P!==ot,dt?P!=null?Ht(B):T.add(B):P!==void 0&&T.has(B)?Ht(B):q.protectedKeys[B]=!0}q.prevProp=V,q.prevResolvedValues=gt,q.isActive&&(w={...w,...gt}),r&&i.blockInitialAnimation&&(K=!1);const Qt=nt&&F;K&&(!Qt||it)&&b.push(...yt.map(B=>{const P={type:U};if(typeof B=="string"&&r&&!Qt&&i.manuallyAnimateOnMount&&i.parent){const{parent:ot}=i,dt=oa(ot,B);if(ot.enteringChildren&&dt){const{delayChildren:A}=dt.transition||{};P.delay=O0(ot.enteringChildren,i,A)}}return{animation:B,options:P}}))}if(T.size){const G={};if(typeof g.initial!="boolean"){const U=oa(i,Array.isArray(g.initial)?g.initial[0]:g.initial);U&&U.transition&&(G.transition=U.transition)}T.forEach(U=>{const q=i.getBaseTarget(U),V=i.getValue(U);V&&(V.liveStyle=!0),G[U]=q??null}),b.push({animation:G})}let H=!!b.length;return r&&(g.initial===!1||g.initial===g.animate)&&!i.manuallyAnimateOnMount&&(H=!1),r=!1,H?l(b):Promise.resolve()}function p(y,g){if(o[y].isActive===g)return Promise.resolve();i.variantChildren?.forEach(b=>b.animationState?.setActive(y,g)),o[y].isActive=g;const v=d(y);for(const b in o)o[b].protectedKeys={};return v}return{animateChanges:d,setActive:p,setAnimateFunction:m,getState:()=>o,reset:()=>{o=ny()}}}function aS(i,l){return typeof l=="string"?l!==i:Array.isArray(l)?!fg(l,i):!1}function pi(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ny(){return{animate:pi(!0),whileInView:pi(),whileHover:pi(),whileTap:pi(),whileDrag:pi(),whileFocus:pi(),exit:pi()}}function iy(i,l){i.min=l.min,i.max=l.max}function Ge(i,l){iy(i.x,l.x),iy(i.y,l.y)}function ay(i,l){i.translate=l.translate,i.scale=l.scale,i.originPoint=l.originPoint,i.origin=l.origin}const dg=1e-4,lS=1-dg,sS=1+dg,hg=.01,rS=0-hg,oS=0+hg;function ue(i){return i.max-i.min}function uS(i,l,o){return Math.abs(i-l)<=o}function ly(i,l,o,r=.5){i.origin=r,i.originPoint=zt(l.min,l.max,i.origin),i.scale=ue(o)/ue(l),i.translate=zt(o.min,o.max,i.origin)-i.originPoint,(i.scale>=lS&&i.scale<=sS||isNaN(i.scale))&&(i.scale=1),(i.translate>=rS&&i.translate<=oS||isNaN(i.translate))&&(i.translate=0)}function yl(i,l,o,r){ly(i.x,l.x,o.x,r?r.originX:void 0),ly(i.y,l.y,o.y,r?r.originY:void 0)}function sy(i,l,o){i.min=o.min+l.min,i.max=i.min+ue(l)}function cS(i,l,o){sy(i.x,l.x,o.x),sy(i.y,l.y,o.y)}function ry(i,l,o){i.min=l.min-o.min,i.max=i.min+ue(l)}function hr(i,l,o){ry(i.x,l.x,o.x),ry(i.y,l.y,o.y)}function oy(i,l,o,r,f){return i-=l,i=dr(i,1/o,r),f!==void 0&&(i=dr(i,1/f,r)),i}function fS(i,l=0,o=1,r=.5,f,m=i,d=i){if(Je.test(l)&&(l=parseFloat(l),l=zt(d.min,d.max,l/100)-d.min),typeof l!="number")return;let p=zt(m.min,m.max,r);i===m&&(p-=l),i.min=oy(i.min,l,o,p,f),i.max=oy(i.max,l,o,p,f)}function uy(i,l,[o,r,f],m,d){fS(i,l[o],l[r],l[f],l.scale,m,d)}const dS=["x","scaleX","originX"],hS=["y","scaleY","originY"];function cy(i,l,o,r){uy(i.x,l,dS,o?o.x:void 0,r?r.x:void 0),uy(i.y,l,hS,o?o.y:void 0,r?r.y:void 0)}function fy(i){return i.translate===0&&i.scale===1}function mg(i){return fy(i.x)&&fy(i.y)}function dy(i,l){return i.min===l.min&&i.max===l.max}function mS(i,l){return dy(i.x,l.x)&&dy(i.y,l.y)}function hy(i,l){return Math.round(i.min)===Math.round(l.min)&&Math.round(i.max)===Math.round(l.max)}function pg(i,l){return hy(i.x,l.x)&&hy(i.y,l.y)}function my(i){return ue(i.x)/ue(i.y)}function py(i,l){return i.translate===l.translate&&i.scale===l.scale&&i.originPoint===l.originPoint}function Ve(i){return[i("x"),i("y")]}function pS(i,l,o){let r="";const f=i.x.translate/l.x,m=i.y.translate/l.y,d=o?.z||0;if((f||m||d)&&(r=`translate3d(${f}px, ${m}px, ${d}px) `),(l.x!==1||l.y!==1)&&(r+=`scale(${1/l.x}, ${1/l.y}) `),o){const{transformPerspective:g,rotate:v,rotateX:b,rotateY:T,skewX:w,skewY:N}=o;g&&(r=`perspective(${g}px) ${r}`),v&&(r+=`rotate(${v}deg) `),b&&(r+=`rotateX(${b}deg) `),T&&(r+=`rotateY(${T}deg) `),w&&(r+=`skewX(${w}deg) `),N&&(r+=`skewY(${N}deg) `)}const p=i.x.scale*l.x,y=i.y.scale*l.y;return(p!==1||y!==1)&&(r+=`scale(${p}, ${y})`),r||"none"}const yg=["TopLeft","TopRight","BottomLeft","BottomRight"],yS=yg.length,yy=i=>typeof i=="string"?parseFloat(i):i,gy=i=>typeof i=="number"||J.test(i);function gS(i,l,o,r,f,m){f?(i.opacity=zt(0,o.opacity??1,xS(r)),i.opacityExit=zt(l.opacity??1,0,vS(r))):m&&(i.opacity=zt(l.opacity??1,o.opacity??1,r));for(let d=0;drl?1:o(vl(i,l,r))}function bS(i,l,o){const r=le(i)?i:ua(i);return r.start(nf("",r,l,o)),r.animation}function Tl(i,l,o,r={passive:!0}){return i.addEventListener(l,o,r),()=>i.removeEventListener(l,o)}const SS=(i,l)=>i.depth-l.depth;class jS{constructor(){this.children=[],this.isDirty=!1}add(l){Uc(this.children,l),this.isDirty=!0}remove(l){Hc(this.children,l),this.isDirty=!0}forEach(l){this.isDirty&&this.children.sort(SS),this.isDirty=!1,this.children.forEach(l)}}function TS(i,l){const o=oe.now(),r=({timestamp:f})=>{const m=f-o;m>=l&&(Qn(r),i(m-l))};return Dt.setup(r,!0),()=>Qn(r)}function sr(i){return le(i)?i.get():i}class AS{constructor(){this.members=[]}add(l){Uc(this.members,l),l.scheduleRender()}remove(l){if(Hc(this.members,l),l===this.prevLead&&(this.prevLead=void 0),l===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(l){const o=this.members.findIndex(f=>l===f);if(o===0)return!1;let r;for(let f=o;f>=0;f--){const m=this.members[f];if(m.isPresent!==!1){r=m;break}}return r?(this.promote(r),!0):!1}promote(l,o){const r=this.lead;if(l!==r&&(this.prevLead=r,this.lead=l,l.show(),r)){r.instance&&r.scheduleRender(),l.scheduleRender();const f=r.options.layoutDependency,m=l.options.layoutDependency;f!==void 0&&m!==void 0&&f===m||(l.resumeFrom=r,o&&(l.resumeFrom.preserveOpacity=!0),r.snapshot&&(l.snapshot=r.snapshot,l.snapshot.latestValues=r.animationValues||r.latestValues),l.root&&l.root.isUpdating&&(l.isLayoutDirty=!0));const{crossfade:p}=l.options;p===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(l=>{const{options:o,resumingFrom:r}=l;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(l=>{l.instance&&l.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const rr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Iu=["","X","Y","Z"],CS=1e3;let MS=0;function tc(i,l,o,r){const{latestValues:f}=l;f[i]&&(o[i]=f[i],l.setStaticValue(i,0),r&&(r[i]=0))}function xg(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:l}=i.options;if(!l)return;const o=U0(l);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:f,layoutId:m}=i.options;window.MotionCancelOptimisedAnimation(o,"transform",Dt,!(f||m))}const{parent:r}=i;r&&!r.hasCheckedOptimisedAppear&&xg(r)}function vg({attachResizeListener:i,defaultParent:l,measureScroll:o,checkIsScrollRoot:r,resetTransform:f}){return class{constructor(d={},p=l?.()){this.id=MS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(wS),this.nodes.forEach(zS),this.nodes.forEach(RS),this.nodes.forEach(LS)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let y=0;ythis.root.updateBlockedByResize=!1;Dt.read(()=>{b=window.innerWidth}),i(d,()=>{const w=window.innerWidth;w!==b&&(b=w,this.root.updateBlockedByResize=!0,v&&v(),v=TS(T,250),rr.hasAnimatedSinceResize&&(rr.hasAnimatedSinceResize=!1,this.nodes.forEach(Sy)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||y)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:b,hasRelativeLayoutChanged:T,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const N=this.options.transition||g.getDefaultTransition()||US,{onLayoutAnimationStart:H,onLayoutAnimationComplete:G}=g.getProps(),U=!this.targetLayout||!pg(this.targetLayout,w),q=!b&&T;if(this.options.layoutRoot||this.resumeFrom||q||b&&(U||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const V={...ef(N,"layout"),onPlay:H,onComplete:G};(g.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V),this.setAnimationOrigin(v,q)}else b||Sy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Qn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(OS),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let y=0;y{const Q=Z/1e3;jy(b.x,d.x,Q),jy(b.y,d.y,Q),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(hr(T,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VS(this.relativeTarget,this.relativeTargetOrigin,T,Q),V&&mS(this.relativeTarget,V)&&(this.isProjectionDirty=!1),V||(V=Wt()),Ge(V,this.relativeTarget)),H&&(this.animationValues=v,gS(v,g,this.latestValues,Q,q,U)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Dt.update(()=>{rr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ua(0)),this.currentAnimation=bS(this.motionValue,[0,1e3],{...d,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},onStop:()=>{},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:y,layout:g,latestValues:v}=d;if(!(!p||!y||!g)){if(this!==d&&this.layout&&g&&bg(this.options.animationType,this.layout.layoutBox,g.layoutBox)){y=this.target||Wt();const b=ue(this.layout.layoutBox.x);y.x.min=d.target.x.min,y.x.max=y.x.min+b;const T=ue(this.layout.layoutBox.y);y.y.min=d.target.y.min,y.y.max=y.y.min+T}Ge(p,y),ra(p,v),yl(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new AS),this.sharedNodes.get(d).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){const{layoutId:d}=this.options;return d?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:d}=this.options;return d?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:p,preserveFollowOpacity:y}={}){const g=this.getStack();g&&g.promote(this,y),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:y}=d;if((y.z||y.rotate||y.rotateX||y.rotateY||y.rotateZ||y.skewX||y.skewY)&&(p=!0),!p)return;const g={};y.z&&tc("z",d,g,this.animationValues);for(let v=0;vd.currentAnimation?.stop()),this.root.nodes.forEach(vy),this.root.sharedNodes.clear()}}}function ES(i){i.updateLayout()}function DS(i){const l=i.resumeFrom?.snapshot||i.snapshot;if(i.isLead()&&i.layout&&l&&i.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=i.layout,{animationType:f}=i.options,m=l.source!==i.layout.source;f==="size"?Ve(v=>{const b=m?l.measuredBox[v]:l.layoutBox[v],T=ue(b);b.min=o[v].min,b.max=b.min+T}):bg(f,l.layoutBox,o)&&Ve(v=>{const b=m?l.measuredBox[v]:l.layoutBox[v],T=ue(o[v]);b.max=b.min+T,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[v].max=i.relativeTarget[v].min+T)});const d=la();yl(d,o,l.layoutBox);const p=la();m?yl(p,i.applyTransform(r,!0),l.measuredBox):yl(p,o,l.layoutBox);const y=!mg(d);let g=!1;if(!i.resumeFrom){const v=i.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:T}=v;if(b&&T){const w=Wt();hr(w,l.layoutBox,b.layoutBox);const N=Wt();hr(N,o,T.layoutBox),pg(w,N)||(g=!0),v.options.layoutRoot&&(i.relativeTarget=N,i.relativeTargetOrigin=w,i.relativeParent=v)}}}i.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:d,hasLayoutChanged:y,hasRelativeLayoutChanged:g})}else if(i.isLead()){const{onExitComplete:o}=i.options;o&&o()}i.options.transition=void 0}function wS(i){i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function LS(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function NS(i){i.clearSnapshot()}function vy(i){i.clearMeasurements()}function by(i){i.isLayoutDirty=!1}function _S(i){const{visualElement:l}=i.options;l&&l.getProps().onBeforeLayoutMeasure&&l.notify("BeforeLayoutMeasure"),i.resetTransform()}function Sy(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function zS(i){i.resolveTargetDelta()}function RS(i){i.calcProjection()}function OS(i){i.resetSkewAndRotation()}function kS(i){i.removeLeadSnapshot()}function jy(i,l,o){i.translate=zt(l.translate,0,o),i.scale=zt(l.scale,1,o),i.origin=l.origin,i.originPoint=l.originPoint}function Ty(i,l,o,r){i.min=zt(l.min,o.min,r),i.max=zt(l.max,o.max,r)}function VS(i,l,o,r){Ty(i.x,l.x,o.x,r),Ty(i.y,l.y,o.y,r)}function BS(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const US={duration:.45,ease:[.4,0,.1,1]},Ay=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),Cy=Ay("applewebkit/")&&!Ay("chrome/")?Math.round:Ue;function My(i){i.min=Cy(i.min),i.max=Cy(i.max)}function HS(i){My(i.x),My(i.y)}function bg(i,l,o){return i==="position"||i==="preserve-aspect"&&!uS(my(l),my(o),.2)}function YS(i){return i!==i.root&&i.scroll?.wasRoot}const qS=vg({attachResizeListener:(i,l)=>Tl(i,"resize",l),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ec={current:void 0},Sg=vg({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!ec.current){const i=new qS({});i.mount(window),i.setOptions({layoutScroll:!0}),ec.current=i}return ec.current},resetTransform:(i,l)=>{i.style.transform=l!==void 0?l:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),hf=Y.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});function Ey(i,l){if(typeof i=="function")return i(l);i!=null&&(i.current=l)}function GS(...i){return l=>{let o=!1;const r=i.map(f=>{const m=Ey(f,l);return!o&&typeof m=="function"&&(o=!0),m});if(o)return()=>{for(let f=0;f{const{width:b,height:T,top:w,left:N,right:H,bottom:G}=p.current;if(l||!d.current||!b||!T)return;const U=o==="left"?`left: ${N}`:`right: ${H}`,q=r==="bottom"?`bottom: ${G}`:`top: ${w}`;d.current.dataset.motionPopId=m;const V=document.createElement("style");y&&(V.nonce=y);const Z=f??document.head;return Z.appendChild(V),V.sheet&&V.sheet.insertRule(` + [data-motion-pop-id="${m}"] { + position: absolute !important; + width: ${b}px !important; + height: ${T}px !important; + ${U}px !important; + ${q}px !important; + } + `),()=>{Z.contains(V)&&Z.removeChild(V)}},[l]),c.jsx(ZS,{isPresent:l,childRef:d,sizeRef:p,children:Y.cloneElement(i,{ref:v})})}const KS=({children:i,initial:l,isPresent:o,onExitComplete:r,custom:f,presenceAffectsLayout:m,mode:d,anchorX:p,anchorY:y,root:g})=>{const v=Bc(WS),b=Y.useId();let T=!0,w=Y.useMemo(()=>(T=!1,{id:b,initial:l,isPresent:o,custom:f,onExitComplete:N=>{v.set(N,!0);for(const H of v.values())if(!H)return;r&&r()},register:N=>(v.set(N,!1),()=>v.delete(N))}),[o,v,r]);return m&&T&&(w={...w}),Y.useMemo(()=>{v.forEach((N,H)=>v.set(H,!1))},[o]),Y.useEffect(()=>{!o&&!v.size&&r&&r()},[o]),d==="popLayout"&&(i=c.jsx(QS,{isPresent:o,anchorX:p,anchorY:y,root:g,children:i})),c.jsx(pr.Provider,{value:w,children:i})};function WS(){return new Map}function jg(i=!0){const l=Y.useContext(pr);if(l===null)return[!0,null];const{isPresent:o,onExitComplete:r,register:f}=l,m=Y.useId();Y.useEffect(()=>{if(i)return f(m)},[i]);const d=Y.useCallback(()=>i&&r&&r(m),[m,r,i]);return!o&&r?[!1,d]:[!0]}const Ws=i=>i.key||"";function Dy(i){const l=[];return Y.Children.forEach(i,o=>{Y.isValidElement(o)&&l.push(o)}),l}const Nc=({children:i,custom:l,initial:o=!0,onExitComplete:r,presenceAffectsLayout:f=!0,mode:m="sync",propagate:d=!1,anchorX:p="left",anchorY:y="top",root:g})=>{const[v,b]=jg(d),T=Y.useMemo(()=>Dy(i),[i]),w=d&&!v?[]:T.map(Ws),N=Y.useRef(!0),H=Y.useRef(T),G=Bc(()=>new Map),U=Y.useRef(new Set),[q,V]=Y.useState(T),[Z,Q]=Y.useState(T);e0(()=>{N.current=!1,H.current=T;for(let K=0;K{const it=Ws(K),yt=d&&!v?!1:T===Z||w.includes(it),gt=()=>{if(U.current.has(it))return;if(U.current.add(it),G.has(it))G.set(it,!0);else return;let Nt=!0;G.forEach(Jt=>{Jt||(Nt=!1)}),Nt&&(F?.(),Q(H.current),d&&b?.(),r&&r())};return c.jsx(KS,{isPresent:yt,initial:!N.current||o?void 0:!1,custom:l,presenceAffectsLayout:f,mode:m,root:g,onExitComplete:yt?void 0:gt,anchorX:p,anchorY:y,children:K},it)})})},Tg=Y.createContext({strict:!1}),wy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ly=!1;function JS(){if(Ly)return;const i={};for(const l in wy)i[l]={isEnabled:o=>wy[l].some(r=>!!o[r])};$0(i),Ly=!0}function Ag(){return JS(),Ob()}function FS(i){const l=Ag();for(const o in i)l[o]={...l[o],...i[o]};$0(l)}const PS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function mr(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||PS.has(i)}let Cg=i=>!mr(i);function $S(i){typeof i=="function"&&(Cg=l=>l.startsWith("on")?!mr(l):i(l))}try{$S(require("@emotion/is-prop-valid").default)}catch{}function IS(i,l,o){const r={};for(const f in i)f==="values"&&typeof i.values=="object"||(Cg(f)||o===!0&&mr(f)||!l&&!mr(f)||i.draggable&&f.startsWith("onDrag"))&&(r[f]=i[f]);return r}const xr=Y.createContext({});function tj(i,l){if(gr(i)){const{initial:o,animate:r}=i;return{initial:o===!1||jl(o)?o:void 0,animate:jl(r)?r:void 0}}return i.inherit!==!1?l:{}}function ej(i){const{initial:l,animate:o}=tj(i,Y.useContext(xr));return Y.useMemo(()=>({initial:l,animate:o}),[Ny(l),Ny(o)])}function Ny(i){return Array.isArray(i)?i.join(" "):i}const mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mg(i,l,o){for(const r in l)!le(l[r])&&!lg(r,o)&&(i[r]=l[r])}function nj({transformTemplate:i},l){return Y.useMemo(()=>{const o=mf();return ff(o,l,i),Object.assign({},o.vars,o.style)},[l])}function ij(i,l){const o=i.style||{},r={};return Mg(r,o,i),Object.assign(r,nj(i,l)),r}function aj(i,l){const o={},r=ij(i,l);return i.drag&&i.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(o.tabIndex=0),o.style=r,o}const Eg=()=>({...mf(),attrs:{}});function lj(i,l,o,r){const f=Y.useMemo(()=>{const m=Eg();return sg(m,l,og(r),i.transformTemplate,i.style),{...m.attrs,style:{...m.style}}},[l]);if(i.style){const m={};Mg(m,i.style,i),f.style={...m,...f.style}}return f}const sj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pf(i){return typeof i!="string"||i.includes("-")?!1:!!(sj.indexOf(i)>-1||/[A-Z]/u.test(i))}function rj(i,l,o,{latestValues:r},f,m=!1,d){const y=(d??pf(i)?lj:aj)(l,r,f,i),g=IS(l,typeof i=="string",m),v=i!==Y.Fragment?{...g,...y,ref:o}:{},{children:b}=l,T=Y.useMemo(()=>le(b)?b.get():b,[b]);return Y.createElement(i,{...v,children:T})}function oj({scrapeMotionValuesFromProps:i,createRenderState:l},o,r,f){return{latestValues:uj(o,r,f,i),renderState:l()}}function uj(i,l,o,r){const f={},m=r(i,{});for(const T in m)f[T]=sr(m[T]);let{initial:d,animate:p}=i;const y=gr(i),g=P0(i);l&&g&&!y&&i.inherit!==!1&&(d===void 0&&(d=l.initial),p===void 0&&(p=l.animate));let v=o?o.initial===!1:!1;v=v||d===!1;const b=v?p:d;if(b&&typeof b!="boolean"&&!yr(b)){const T=Array.isArray(b)?b:[b];for(let w=0;w(l,o)=>{const r=Y.useContext(xr),f=Y.useContext(pr),m=()=>oj(i,l,r,f);return o?m():Bc(m)},cj=Dg({scrapeMotionValuesFromProps:df,createRenderState:mf}),fj=Dg({scrapeMotionValuesFromProps:ug,createRenderState:Eg}),dj=Symbol.for("motionComponentSymbol");function hj(i,l,o){const r=Y.useRef(o);Y.useInsertionEffect(()=>{r.current=o});const f=Y.useRef(null);return Y.useCallback(m=>{m&&i.onMount?.(m),l&&(m?l.mount(m):l.unmount());const d=r.current;if(typeof d=="function")if(m){const p=d(m);typeof p=="function"&&(f.current=p)}else f.current?(f.current(),f.current=null):d(m);else d&&(d.current=m)},[l])}const wg=Y.createContext({});function hl(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function mj(i,l,o,r,f,m){const{visualElement:d}=Y.useContext(xr),p=Y.useContext(Tg),y=Y.useContext(pr),g=Y.useContext(hf),v=g.reducedMotion,b=g.skipAnimations,T=Y.useRef(null),w=Y.useRef(!1);r=r||p.renderer,!T.current&&r&&(T.current=r(i,{visualState:l,parent:d,props:o,presenceContext:y,blockInitialAnimation:y?y.initial===!1:!1,reducedMotionConfig:v,skipAnimations:b,isSVG:m}),w.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const N=T.current,H=Y.useContext(wg);N&&!N.projection&&f&&(N.type==="html"||N.type==="svg")&&pj(T.current,o,f,H);const G=Y.useRef(!1);Y.useInsertionEffect(()=>{N&&G.current&&N.update(o,y)});const U=o[B0],q=Y.useRef(!!U&&!window.MotionHandoffIsComplete?.(U)&&window.MotionHasOptimisedAnimation?.(U));return e0(()=>{w.current=!0,N&&(G.current=!0,window.MotionIsMounted=!0,N.updateFeatures(),N.scheduleRenderMicrotask(),q.current&&N.animationState&&N.animationState.animateChanges())}),Y.useEffect(()=>{N&&(!q.current&&N.animationState&&N.animationState.animateChanges(),q.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(U)}),q.current=!1),N.enteringChildren=void 0)}),N}function pj(i,l,o,r){const{layoutId:f,layout:m,drag:d,dragConstraints:p,layoutScroll:y,layoutRoot:g,layoutCrossfade:v}=l;i.projection=new o(i.latestValues,l["data-framer-portal-id"]?void 0:Lg(i.parent)),i.projection.setOptions({layoutId:f,layout:m,alwaysMeasureLayout:!!d||p&&hl(p),visualElement:i,animationType:typeof m=="string"?m:"both",initialPromotionConfig:r,crossfade:v,layoutScroll:y,layoutRoot:g})}function Lg(i){if(i)return i.options.allowProjection!==!1?i.projection:Lg(i.parent)}function nc(i,{forwardMotionProps:l=!1,type:o}={},r,f){r&&FS(r);const m=o?o==="svg":pf(i),d=m?fj:cj;function p(g,v){let b;const T={...Y.useContext(hf),...g,layoutId:yj(g)},{isStatic:w}=T,N=ej(g),H=d(g,w);if(!w&&t0){gj();const G=xj(T);b=G.MeasureLayout,N.visualElement=mj(i,H,T,f,G.ProjectionNode,m)}return c.jsxs(xr.Provider,{value:N,children:[b&&N.visualElement?c.jsx(b,{visualElement:N.visualElement,...T}):null,rj(i,g,hj(H,N.visualElement,v),H,w,l,m)]})}p.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const y=Y.forwardRef(p);return y[dj]=i,y}function yj({layoutId:i}){const l=Y.useContext(Vc).id;return l&&i!==void 0?l+"-"+i:i}function gj(i,l){Y.useContext(Tg).strict}function xj(i){const l=Ag(),{drag:o,layout:r}=l;if(!o&&!r)return{};const f={...o,...r};return{MeasureLayout:o?.isEnabled(i)||r?.isEnabled(i)?f.MeasureLayout:void 0,ProjectionNode:f.ProjectionNode}}function vj(i,l){if(typeof Proxy>"u")return nc;const o=new Map,r=(m,d)=>nc(m,d,i,l),f=(m,d)=>r(m,d);return new Proxy(f,{get:(m,d)=>d==="create"?r:(o.has(d)||o.set(d,nc(d,void 0,i,l)),o.get(d))})}const bj=(i,l)=>l.isSVG??pf(i)?new $b(l):new Qb(l,{allowProjection:i!==Y.Fragment});class Sj extends Wn{constructor(l){super(l),l.animationState||(l.animationState=iS(l))}updateAnimationControlsSubscription(){const{animate:l}=this.node.getProps();yr(l)&&(this.unmountControls=l.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:l}=this.node.getProps(),{animate:o}=this.node.prevProps||{};l!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let jj=0;class Tj extends Wn{constructor(){super(...arguments),this.id=jj++}update(){if(!this.node.presenceContext)return;const{isPresent:l,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||l===r)return;const f=this.node.animationState.setActive("exit",!l);o&&!l&&f.then(()=>{o(this.id)})}mount(){const{register:l,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),l&&(this.unmount=l(this.id))}unmount(){}}const Aj={animation:{Feature:Sj},exit:{Feature:Tj}};function El(i){return{point:{x:i.pageX,y:i.pageY}}}const Cj=i=>l=>of(l)&&i(l,El(l));function gl(i,l,o,r){return Tl(i,l,Cj(o),r)}const Ng=({current:i})=>i?i.ownerDocument.defaultView:null,_y=(i,l)=>Math.abs(i-l);function Mj(i,l){const o=_y(i.x,l.x),r=_y(i.y,l.y);return Math.sqrt(o**2+r**2)}const zy=new Set(["auto","scroll"]);class _g{constructor(l,o,{transformPagePoint:r,contextWindow:f=window,dragSnapToOrigin:m=!1,distanceThreshold:d=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=ac(this.lastMoveEventInfo,this.history),N=this.startEvent!==null,H=Mj(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!N&&!H)return;const{point:G}=w,{timestamp:U}=ie;this.history.push({...G,timestamp:U});const{onStart:q,onMove:V}=this.handlers;N||(q&&q(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),V&&V(this.lastMoveEvent,w)},this.handlePointerMove=(w,N)=>{this.lastMoveEvent=w,this.lastMoveEventInfo=ic(N,this.transformPagePoint),Dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,N)=>{this.end();const{onEnd:H,onSessionEnd:G,resumeAnimation:U}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&U&&U(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const q=ac(w.type==="pointercancel"?this.lastMoveEventInfo:ic(N,this.transformPagePoint),this.history);this.startEvent&&H&&H(w,q),G&&G(w,q)},!of(l))return;this.dragSnapToOrigin=m,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=d,this.contextWindow=f||window;const y=El(l),g=ic(y,this.transformPagePoint),{point:v}=g,{timestamp:b}=ie;this.history=[{...v,timestamp:b}];const{onSessionStart:T}=o;T&&T(l,ac(g,this.history)),this.removeListeners=Al(gl(this.contextWindow,"pointermove",this.handlePointerMove),gl(this.contextWindow,"pointerup",this.handlePointerUp),gl(this.contextWindow,"pointercancel",this.handlePointerUp)),p&&this.startScrollTracking(p)}startScrollTracking(l){let o=l.parentElement;for(;o;){const r=getComputedStyle(o);(zy.has(r.overflowX)||zy.has(r.overflowY))&&this.scrollPositions.set(o,{x:o.scrollLeft,y:o.scrollTop}),o=o.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(l){const o=this.scrollPositions.get(l);if(!o)return;const r=l===window,f=r?{x:window.scrollX,y:window.scrollY}:{x:l.scrollLeft,y:l.scrollTop},m={x:f.x-o.x,y:f.y-o.y};m.x===0&&m.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=m.x,this.lastMoveEventInfo.point.y+=m.y):this.history.length>0&&(this.history[0].x-=m.x,this.history[0].y-=m.y),this.scrollPositions.set(l,f),Dt.update(this.updatePoint,!0))}updateHandlers(l){this.handlers=l}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Qn(this.updatePoint)}}function ic(i,l){return l?{point:l(i.point)}:i}function Ry(i,l){return{x:i.x-l.x,y:i.y-l.y}}function ac({point:i},l){return{point:i,delta:Ry(i,zg(l)),offset:Ry(i,Ej(l)),velocity:Dj(l,.1)}}function Ej(i){return i[0]}function zg(i){return i[i.length-1]}function Dj(i,l){if(i.length<2)return{x:0,y:0};let o=i.length-1,r=null;const f=zg(i);for(;o>=0&&(r=i[o],!(f.timestamp-r.timestamp>yn(l)));)o--;if(!r)return{x:0,y:0};const m=Be(f.timestamp-r.timestamp);if(m===0)return{x:0,y:0};const d={x:(f.x-r.x)/m,y:(f.y-r.y)/m};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function wj(i,{min:l,max:o},r){return l!==void 0&&io&&(i=r?zt(o,i,r.max):Math.min(i,o)),i}function Oy(i,l,o){return{min:l!==void 0?i.min+l:void 0,max:o!==void 0?i.max+o-(i.max-i.min):void 0}}function Lj(i,{top:l,left:o,bottom:r,right:f}){return{x:Oy(i.x,o,f),y:Oy(i.y,l,r)}}function ky(i,l){let o=l.min-i.min,r=l.max-i.max;return l.max-l.minr?o=vl(l.min,l.max-r,i.min):r>f&&(o=vl(i.min,i.max-f,l.min)),Fe(0,1,o)}function zj(i,l){const o={};return l.min!==void 0&&(o.min=l.min-i.min),l.max!==void 0&&(o.max=l.max-i.min),o}const _c=.35;function Rj(i=_c){return i===!1?i=0:i===!0&&(i=_c),{x:Vy(i,"left","right"),y:Vy(i,"top","bottom")}}function Vy(i,l,o){return{min:By(i,l),max:By(i,o)}}function By(i,l){return typeof i=="number"?i:i[l]||0}const Oj=new WeakMap;class kj{constructor(l){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=l}start(l,{snapToCursor:o=!1,distanceThreshold:r}={}){const{presenceContext:f}=this.visualElement;if(f&&f.isPresent===!1)return;const m=b=>{o?(this.stopAnimation(),this.snapToCursor(El(b).point)):this.pauseAnimation()},d=(b,T)=>{this.stopAnimation();const{drag:w,dragPropagation:N,onDragStart:H}=this.getProps();if(w&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bb(w),!this.openDragLock))return;this.latestPointerEvent=b,this.latestPanInfo=T,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(U=>{let q=this.getAxisMotionValue(U).get()||0;if(Je.test(q)){const{projection:V}=this.visualElement;if(V&&V.layout){const Z=V.layout.layoutBox[U];Z&&(q=ue(Z)*(parseFloat(q)/100))}}this.originPoint[U]=q}),H&&Dt.update(()=>H(b,T),!1,!0),Tc(this.visualElement,"transform");const{animationState:G}=this.visualElement;G&&G.setActive("whileDrag",!0)},p=(b,T)=>{this.latestPointerEvent=b,this.latestPanInfo=T;const{dragPropagation:w,dragDirectionLock:N,onDirectionLock:H,onDrag:G}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:U}=T;if(N&&this.currentDirection===null){this.currentDirection=Vj(U),this.currentDirection!==null&&H&&H(this.currentDirection);return}this.updateAxis("x",T.point,U),this.updateAxis("y",T.point,U),this.visualElement.render(),G&&Dt.update(()=>G(b,T),!1,!0)},y=(b,T)=>{this.latestPointerEvent=b,this.latestPanInfo=T,this.stop(b,T),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>Ve(b=>this.getAnimationState(b)==="paused"&&this.getAxisMotionValue(b).animation?.play()),{dragSnapToOrigin:v}=this.getProps();this.panSession=new _g(l,{onSessionStart:m,onStart:d,onMove:p,onSessionEnd:y,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,distanceThreshold:r,contextWindow:Ng(this.visualElement),element:this.visualElement.current})}stop(l,o){const r=l||this.latestPointerEvent,f=o||this.latestPanInfo,m=this.isDragging;if(this.cancel(),!m||!f||!r)return;const{velocity:d}=f;this.startAnimation(d);const{onDragEnd:p}=this.getProps();p&&Dt.postRender(()=>p(r,f))}cancel(){this.isDragging=!1;const{projection:l,animationState:o}=this.visualElement;l&&(l.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(l,o,r){const{drag:f}=this.getProps();if(!r||!Js(l,f,this.currentDirection))return;const m=this.getAxisMotionValue(l);let d=this.originPoint[l]+r[l];this.constraints&&this.constraints[l]&&(d=wj(d,this.constraints[l],this.elastic[l])),m.set(d)}resolveConstraints(){const{dragConstraints:l,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,f=this.constraints;l&&hl(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&r?this.constraints=Lj(r.layoutBox,l):this.constraints=!1,this.elastic=Rj(o),f!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ve(m=>{this.constraints!==!1&&this.getAxisMotionValue(m)&&(this.constraints[m]=zj(r.layoutBox[m],this.constraints[m]))})}resolveRefConstraints(){const{dragConstraints:l,onMeasureDragConstraints:o}=this.getProps();if(!l||!hl(l))return!1;const r=l.current,{projection:f}=this.visualElement;if(!f||!f.layout)return!1;const m=Hb(r,f.root,this.visualElement.getTransformPagePoint());let d=Nj(f.layout.layoutBox,m);if(o){const p=o(Vb(d));this.hasMutatedConstraints=!!p,p&&(d=tg(p))}return d}startAnimation(l){const{drag:o,dragMomentum:r,dragElastic:f,dragTransition:m,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),y=this.constraints||{},g=Ve(v=>{if(!Js(v,o,this.currentDirection))return;let b=y&&y[v]||{};d&&(b={min:0,max:0});const T=f?200:1e6,w=f?40:1e7,N={type:"inertia",velocity:r?l[v]:0,bounceStiffness:T,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...m,...b};return this.startAxisValueAnimation(v,N)});return Promise.all(g).then(p)}startAxisValueAnimation(l,o){const r=this.getAxisMotionValue(l);return Tc(this.visualElement,l),r.start(nf(l,r,0,o,this.visualElement,!1))}stopAnimation(){Ve(l=>this.getAxisMotionValue(l).stop())}pauseAnimation(){Ve(l=>this.getAxisMotionValue(l).animation?.pause())}getAnimationState(l){return this.getAxisMotionValue(l).animation?.state}getAxisMotionValue(l){const o=`_drag${l.toUpperCase()}`,r=this.visualElement.getProps(),f=r[o];return f||this.visualElement.getValue(l,(r.initial?r.initial[l]:void 0)||0)}snapToCursor(l){Ve(o=>{const{drag:r}=this.getProps();if(!Js(o,r,this.currentDirection))return;const{projection:f}=this.visualElement,m=this.getAxisMotionValue(o);if(f&&f.layout){const{min:d,max:p}=f.layout.layoutBox[o],y=m.get()||0;m.set(l[o]-zt(d,p,.5)+y)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:l,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!hl(o)||!r||!this.constraints)return;this.stopAnimation();const f={x:0,y:0};Ve(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const y=p.get();f[d]=_j({min:y,max:y},this.constraints[d])}});const{transformTemplate:m}=this.visualElement.getProps();this.visualElement.current.style.transform=m?m({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(d=>{if(!Js(d,l,null))return;const p=this.getAxisMotionValue(d),{min:y,max:g}=this.constraints[d];p.set(zt(y,g,f[d]))})}addListeners(){if(!this.visualElement.current)return;Oj.set(this.visualElement,this);const l=this.visualElement.current,o=gl(l,"pointerdown",y=>{const{drag:g,dragListener:v=!0}=this.getProps(),b=y.target,T=b!==l&&Cb(b);g&&v&&!T&&this.start(y)}),r=()=>{const{dragConstraints:y}=this.getProps();hl(y)&&y.current&&(this.constraints=this.resolveRefConstraints())},{projection:f}=this.visualElement,m=f.addEventListener("measure",r);f&&!f.layout&&(f.root&&f.root.updateScroll(),f.updateLayout()),Dt.read(r);const d=Tl(window,"resize",()=>this.scalePositionWithinConstraints()),p=f.addEventListener("didUpdate",(({delta:y,hasLayoutChanged:g})=>{this.isDragging&&g&&(Ve(v=>{const b=this.getAxisMotionValue(v);b&&(this.originPoint[v]+=y[v].translate,b.set(b.get()+y[v].translate))}),this.visualElement.render())}));return()=>{d(),o(),m(),p&&p()}}getProps(){const l=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:f=!1,dragConstraints:m=!1,dragElastic:d=_c,dragMomentum:p=!0}=l;return{...l,drag:o,dragDirectionLock:r,dragPropagation:f,dragConstraints:m,dragElastic:d,dragMomentum:p}}}function Js(i,l,o){return(l===!0||l===i)&&(o===null||o===i)}function Vj(i,l=10){let o=null;return Math.abs(i.y)>l?o="y":Math.abs(i.x)>l&&(o="x"),o}class Bj extends Wn{constructor(l){super(l),this.removeGroupControls=Ue,this.removeListeners=Ue,this.controls=new kj(l)}mount(){const{dragControls:l}=this.node.getProps();l&&(this.removeGroupControls=l.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ue}update(){const{dragControls:l}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};l!==o&&(this.removeGroupControls(),l&&(this.removeGroupControls=l.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const lc=i=>(l,o)=>{i&&Dt.update(()=>i(l,o),!1,!0)};class Uj extends Wn{constructor(){super(...arguments),this.removePointerDownListener=Ue}onPointerDown(l){this.session=new _g(l,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ng(this.node)})}createPanHandlers(){const{onPanSessionStart:l,onPanStart:o,onPan:r,onPanEnd:f}=this.node.getProps();return{onSessionStart:lc(l),onStart:lc(o),onMove:lc(r),onEnd:(m,d)=>{delete this.session,f&&Dt.postRender(()=>f(m,d))}}}mount(){this.removePointerDownListener=gl(this.node.current,"pointerdown",l=>this.onPointerDown(l))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sc=!1;class Hj extends Y.Component{componentDidMount(){const{visualElement:l,layoutGroup:o,switchLayoutGroup:r,layoutId:f}=this.props,{projection:m}=l;m&&(o.group&&o.group.add(m),r&&r.register&&f&&r.register(m),sc&&m.root.didUpdate(),m.addEventListener("animationComplete",()=>{this.safeToRemove()}),m.setOptions({...m.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rr.hasEverUpdated=!0}getSnapshotBeforeUpdate(l){const{layoutDependency:o,visualElement:r,drag:f,isPresent:m}=this.props,{projection:d}=r;return d&&(d.isPresent=m,l.layoutDependency!==o&&d.setOptions({...d.options,layoutDependency:o}),sc=!0,f||l.layoutDependency!==o||o===void 0||l.isPresent!==m?d.willUpdate():this.safeToRemove(),l.isPresent!==m&&(m?d.promote():d.relegate()||Dt.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:l}=this.props.visualElement;l&&(l.root.didUpdate(),rf.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:l,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:f}=l;sc=!0,f&&(f.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(f),r&&r.deregister&&r.deregister(f))}safeToRemove(){const{safeToRemove:l}=this.props;l&&l()}render(){return null}}function Rg(i){const[l,o]=jg(),r=Y.useContext(Vc);return c.jsx(Hj,{...i,layoutGroup:r,switchLayoutGroup:Y.useContext(wg),isPresent:l,safeToRemove:o})}const Yj={pan:{Feature:Uj},drag:{Feature:Bj,ProjectionNode:Sg,MeasureLayout:Rg}};function Uy(i,l,o){const{props:r}=i;i.animationState&&r.whileHover&&i.animationState.setActive("whileHover",o==="Start");const f="onHover"+o,m=r[f];m&&Dt.postRender(()=>m(l,El(l)))}class qj extends Wn{mount(){const{current:l}=this.node;l&&(this.unmount=Sb(l,(o,r)=>(Uy(this.node,r,"Start"),f=>Uy(this.node,f,"End"))))}unmount(){}}class Gj extends Wn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let l=!1;try{l=this.node.current.matches(":focus-visible")}catch{l=!0}!l||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Al(Tl(this.node.current,"focus",()=>this.onFocus()),Tl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hy(i,l,o){const{props:r}=i;if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&r.whileTap&&i.animationState.setActive("whileTap",o==="Start");const f="onTap"+(o==="End"?"":o),m=r[f];m&&Dt.postRender(()=>m(l,El(l)))}class Xj extends Wn{mount(){const{current:l}=this.node;l&&(this.unmount=Eb(l,(o,r)=>(Hy(this.node,r,"Start"),(f,{success:m})=>Hy(this.node,f,m?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zc=new WeakMap,rc=new WeakMap,Zj=i=>{const l=zc.get(i.target);l&&l(i)},Qj=i=>{i.forEach(Zj)};function Kj({root:i,...l}){const o=i||document;rc.has(o)||rc.set(o,{});const r=rc.get(o),f=JSON.stringify(l);return r[f]||(r[f]=new IntersectionObserver(Qj,{root:i,...l})),r[f]}function Wj(i,l,o){const r=Kj(l);return zc.set(i,o),r.observe(i),()=>{zc.delete(i),r.unobserve(i)}}const Jj={some:0,all:1};class Fj extends Wn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:l={}}=this.node.getProps(),{root:o,margin:r,amount:f="some",once:m}=l,d={root:o?o.current:void 0,rootMargin:r,threshold:typeof f=="number"?f:Jj[f]},p=y=>{const{isIntersecting:g}=y;if(this.isInView===g||(this.isInView=g,m&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:b}=this.node.getProps(),T=g?v:b;T&&T(y)};return Wj(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:l,prevProps:o}=this.node;["amount","margin","root"].some(Pj(l,o))&&this.startObserver()}unmount(){}}function Pj({viewport:i={}},{viewport:l={}}={}){return o=>i[o]!==l[o]}const $j={inView:{Feature:Fj},tap:{Feature:Xj},focus:{Feature:Gj},hover:{Feature:qj}},Ij={layout:{ProjectionNode:Sg,MeasureLayout:Rg}},tT={...Aj,...$j,...Yj,...Ij},xl=vj(tT,bj),Jn=({children:i,delay:l=0,className:o})=>c.jsx(xl.div,{className:o,initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,delay:l,ease:"easeOut"},children:i}),eT=()=>c.jsxs(Jn,{children:[c.jsx("h1",{children:"Automating Tax and Benefit Policy Modeling with Multi-Agent AI"}),c.jsx("p",{className:"subtitle",children:"How we built a multi-agent system that encodes policy into code"})]}),nT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"The manual process"}),c.jsx("p",{children:"When we add a new program to PolicyEngine, someone has to translate dozens of pages of legal language into working code. The process follows a predictable pattern: research official sources, extract eligibility rules and benefit formulas, write YAML parameters with legal citations, implement the calculation logic, create integration tests, validate against source documents, and handle multiple rounds of review."}),c.jsxs("p",{children:["Each program requires approximately ",c.jsx("strong",{children:"1,500 lines of code"})," across multiple files. It typically takes 2-3 weeks. We built a system to do it in ",c.jsx("strong",{children:"90 minutes"}),"."]})]});function Yy(i,l){(l==null||l>i.length)&&(l=i.length);for(var o=0,r=Array(l);oi[l]!==void 0).map(l=>`${l}_${l==="root"?gT(i.root):i[l]}`).toString()}function vT(i){const l=xT(i);let o=Oc.get(l);if(!o){const r=new Map;let f;const m=new IntersectionObserver(d=>{d.forEach(p=>{var y;const g=p.isIntersecting&&f.some(v=>p.intersectionRatio>=v);i.trackVisibility&&typeof p.isVisible>"u"&&(p.isVisible=g),(y=r.get(p.target))==null||y.forEach(v=>{v(g,p)})})},i);f=m.thresholds||(Array.isArray(i.threshold)?i.threshold:[i.threshold||0]),o={id:l,observer:m,elements:r},Oc.set(l,o)}return o}function bT(i,l,o={},r=yT){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const y=i.getBoundingClientRect();return l(r,{isIntersecting:r,target:i,intersectionRatio:typeof o.threshold=="number"?o.threshold:0,time:0,boundingClientRect:y,intersectionRect:y,rootBounds:y}),()=>{}}const{id:f,observer:m,elements:d}=vT(o),p=d.get(i)||[];return d.has(i)||d.set(i,p),p.push(l),m.observe(i),function(){p.splice(p.indexOf(l),1),p.length===0&&(d.delete(i),m.unobserve(i)),d.size===0&&(m.disconnect(),Oc.delete(f))}}function Zy({threshold:i,delay:l,trackVisibility:o,rootMargin:r,root:f,triggerOnce:m,skip:d,initialInView:p,fallbackInView:y,onChange:g}={}){var v;const[b,T]=Y.useState(null),w=Y.useRef(g),[N,H]=Y.useState({inView:!!p,entry:void 0});w.current=g,Y.useEffect(()=>{if(d||!b)return;let V;return V=bT(b,(Z,Q)=>{H({inView:Z,entry:Q}),w.current&&w.current(Z,Q),Q.isIntersecting&&m&&V&&(V(),V=void 0)},{root:f,rootMargin:r,threshold:i,trackVisibility:o,delay:l},y),()=>{V&&V()}},[Array.isArray(i)?i.toString():i,b,f,r,m,d,o,y,l]);const G=(v=N.entry)==null?void 0:v.target,U=Y.useRef(void 0);!b&&G&&!m&&!d&&U.current!==G&&(U.current=G,H({inView:!!p,entry:void 0}));const q=[T,N.inView,N.entry];return q.ref=q[0],q.inView=q[1],q.entry=q[2],q}var ST=function(l){return"-".concat(l*100,"% 0px -").concat(100-l*100,"% 0px")},jT=function(l,o,r,f){if(!r.current)return"0px";var m=r.current.offsetHeight/f;return l==="down"?"".concat((m-o)*100,"% 0px ").concat(o*100-100,"% 0px"):"-".concat(o*100,"% 0px ").concat(m*100-(100-o*100),"% 0px")},TT=function(l){var o=l.children,r=l.data,f=l.handleSetLastScrollTop,m=l.lastScrollTop,d=l.onStepEnter,p=d===void 0?function(){}:d,y=l.onStepExit,g=y===void 0?function(){}:y,v=l.onStepProgress,b=v===void 0?null:v,T=l.offset,w=l.scrollamaId,N=l.progressThreshold,H=l.innerHeight,G=typeof window<"u",U=G?document.documentElement.scrollTop:0,q=m>=U?"up":"down",V=ST(T),Z=Y.useRef(null),Q=Y.useState(!1),nt=Rc(Q,2),F=nt[0],K=nt[1],it=Zy({rootMargin:V,threshold:0}),yt=it.ref,gt=it.entry,Nt=Y.useMemo(function(){return jT(q,T,Z,H)},[q,T,Z,H]),Jt=Zy({rootMargin:Nt,threshold:N}),Ht=Jt.ref,Qt=Jt.entry,z=Y.useCallback(function(B){Z.current=B,yt(B),Ht(B)},[yt,Ht]);return Y.useEffect(function(){if(F){var B=Qt.target.getBoundingClientRect(),P=B.height,ot=B.top,dt=Math.min(1,Math.max(0,(window.innerHeight*T-ot)/P));b&&b({progress:dt,scrollamaId:w,data:r,element:Qt.target,entry:Qt,direction:q})}},[Qt]),Y.useEffect(function(){gt&&!gt.isIntersecting&&F?(g({element:gt.target,scrollamaId:w,data:r,entry:gt,direction:q}),K(!1),f(U)):gt&>.isIntersecting&&!F&&(K(!0),p({element:gt.target,scrollamaId:w,data:r,entry:gt,direction:q}),f(U))},[gt]),Y.cloneElement(Xn.Children.only(o),{"data-react-scrollama-id":w,ref:z,entry:gt})};const Qy=[{title:"parameter.yaml",status:"error",statusLabel:"wrong metadata",code:`grant_amount: 1333 +age_threshold: 18 +older_age_threshold: 19 +resource_limit: 1000`,issues:[{type:"error",text:"$1333 hard-coded, no dates"},{type:"error",text:"No official reference"},{type:"error",text:"All parameters in one file"},{type:"warning",text:"Will break when rates change"}]},{title:"grant_standard.yaml",status:"warning",statusLabel:"partial",code:`description: NH TANF grant standard + +1: + 2025-07-01: 773 + +metadata: + unit: currency-USD`,issues:[{type:"success",text:"Has date-based values"},{type:"warning",text:"Reference missing"},{type:"warning",text:"description does not meet PolicyEngine standard"},{type:"error",text:"Only 1 family size"}]},{title:"grant_standard.yaml",status:"warning",statusLabel:"partial",code:`description: NH TANF grant standard +1: + 2025-07-01: 773 +2: + 2025-07-01: 1058 +# ... all sizes covered +metadata: + unit: currency-USD + period: month + reference: + - title: RSA 167:77 + href: https://gc.nh.gov/...`,issues:[{type:"success",text:"Reference added from docs"},{type:"success",text:"period added"},{type:"warning",text:"Missing label"}]},{title:"rate.yaml",status:"success",statusLabel:"expanded",code:`description: NH TANF payment + standard FPL rate +values: + 2017-07-01: 0.6 +metadata: + unit: /1 + period: month + label: NH TANF payment standard + reference: + - title: RSA 167:77-g + href: https://gc.nh.gov/...`,issues:[{type:"success",text:"correct metadata section"},{type:"success",text:"dates align with legal reference date"},{type:"success",text:"Correct dependencies on pre-existing code"}]},{title:"child_care_deduction.yaml",status:"success",statusLabel:"structured",code:`brackets: + - threshold: + 2012-07-01: 0 + amount: + 2012-07-01: 200 + - threshold: + 2022-07-01: 6 + amount: + 2012-07-01: 175`,issues:[{type:"success",text:"Proper bracket structure"},{type:"success",text:"parameter-patterns skill"},{type:"success",text:"Proper folder structure"}]},{title:"nh/dhhs/tanf/",status:"success",statusLabel:"complete",code:`nh/dhhs/tanf/ +├─ income/ +│ ├─ child_care_deduction/ +│ │ ├─ full_time_threshold.yaml +│ │ ├─ full_time.yaml +│ │ └─ part_time.yaml +│ └─ earned_income_disregard/ +│ ├─ applicant_rate.yaml +│ └─ recipient_rate.yaml +├─ payment_standard/ +│ └─ fpg_rate.yaml +└─ resources/ + ├─ applicant_limit.yaml + └─ recipient_limit.yaml`,issues:[{type:"success",text:"11 parameter files"},{type:"success",text:"All references linked"},{type:"success",text:"Ready for production"}]}],Ky=[{title:"nh_tanf_eligible.py",status:"error",statusLabel:"wrong",code:`def formula(person, period): + income = person("income", period) + return income < 783 + # Hard-coded! Wrong threshold! + # Wrong entity (person vs unit)`,issues:[{type:"error",text:"$783 ≠ actual threshold"},{type:"error",text:"Wrong entity type"},{type:"error",text:"No reference attribute"}]},{title:"nh_income_eligible.py",status:"warning",statusLabel:"partial",code:`class nh_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + definition_period = YEAR + + def formula(spm_unit, period, params): + p = params(period).gov.states + .nh.dhhs.tanf + return spm_unit("income", period) + < p.grant_standard`,issues:[{type:"success",text:"Proper Variable class"},{type:"success",text:"Correct entity type"},{type:"error",text:"definition period matters"}]},{title:"nh_tanf_eligible.py",status:"warning",statusLabel:"flagged",code:`class nh_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + definition_period = YEAR + defined_for = StateCode.NH + + def formula(spm_unit, period): + income_eligible = spm_unit( + "nh_tanf_income_eligible", period) + return income_eligible + # Test says this is wrong!`,issues:[{type:"success",text:"Added defined_for"},{type:"warning",text:"Test mismatch detected"},{type:"warning",text:"Missing income check"}]},{title:"nh_tanf_eligible.py",status:"success",statusLabel:"fixed",code:`class nh_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + definition_period = YEAR + defined_for = StateCode.NH + + def formula(spm_unit, period, p): + demographic = spm_unit( + "is_demographic_tanf_eligible", + period) + income = spm_unit( + "nh_tanf_income_eligible", + period) + return demographic & income`,issues:[{type:"success",text:"Uses existing variables"},{type:"success",text:"Both eligibility checks"},{type:"error",text:"Inconsistent formatting"}]},{title:"nh_tanf_eligible.py",status:"success",statusLabel:"documented",code:`class nh_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "New Hampshire TANF eligible" + definition_period = YEAR + defined_for = StateCode.NH + reference = "https://gc.nh.gov/rsa/html... + + def formula(spm_unit, period, p): + demographic = spm_unit( + "is_demographic_tanf_eligible", + period) + income = spm_unit( + "nh_tanf_income_eligible", + period) + return demographic & income`,issues:[{type:"success",text:"Has label attribute"},{type:"success",text:"Has reference attribute"},{type:"success",text:"Follows variable-patterns"}]},{title:"nh/dhhs/tanf/",status:"success",statusLabel:"complete",code:`nh/dhhs/tanf/ +├─ eligibility/ +│ ├─ nh_tanf_eligible.py +│ ├─ nh_tanf_income_eligible.py +│ └─ nh_tanf_resources_eligible.py +└─ income/ + ├─ nh_tanf_child_care_deduction.py + ├─ nh_tanf_countable_earned_income.py + ├─ nh_tanf_countable_income.py + └─ nh_tanf_payment_standard.py +nh_tanf.py`,issues:[{type:"success",text:"8 variable files"},{type:"success",text:"All edge cases tested"},{type:"success",text:"PR ready for review"}]}],Wy=[{title:"test_nh_tanf.yaml",status:"error",statusLabel:"missing",code:`# No tests generated +# +# "Tests? What tests?" +# - Single prompt, 2025`,issues:[{type:"error",text:"No tests at all"},{type:"error",text:"Can't verify correctness"},{type:"warning",text:"Bug goes undetected"}]},{title:"test_nh_tanf.yaml",status:"warning",statusLabel:"circular",code:`- name: Basic eligibility + period: 2025 + input: + income: 700 + output: + nh_tanf_eligible: true + # Matches the buggy $773 check!`,issues:[{type:"warning",text:"Test derived from impl"},{type:"error",text:"Confirms bug, not regs"},{type:"success",text:"At least tests exist"}]},{title:"test_nh_tanf.yaml",status:"success",statusLabel:"independent",code:`- name: Income eligible but resource + ineligible, ineligible for TANF. + period: 2025 + input: + state_code: NH + nh_tanf_income_eligible: true + nh_tanf_resource_eligible: false + output: + nh_tanf_eligible: false`,issues:[{type:"success",text:"Based on regulations"},{type:"success",text:"Independent of impl"},{type:"error",text:"Missing edge case testing"}]},{title:"test_nh_tanf.yaml",status:"success",statusLabel:"expanded",code:`- name: Demographic but not income + period: 2023 + input: + is_demographic_tanf_eligible: true + nh_tanf_income_eligible: false + output: + nh_tanf_eligible: false + +- name: Income but not demographic + # ... more edge cases`,issues:[{type:"success",text:"Edge cases added"},{type:"success",text:"Both pass/fail scenarios"},{type:"success",text:"Generated by edge-case-gen"}]},{title:"test_nh_tanf_integration.yaml",status:"success",statusLabel:"integration",code:`- name: Full benefit calculation + period: 2023 + input: + state_code: NH + people: + parent: + age: 30 + child: + age: 5 + spm_units: + unit: + members: [parent, child] + output: + nh_tanf: 1_058 # From working-reference.md`,issues:[{type:"success",text:"End-to-end test"},{type:"success",text:"Realistic household"},{type:"success",text:"Follows testing-patterns"}]},{title:"dhhs/tanf/",status:"success",statusLabel:"complete",code:`dhhs/tanf/ +├─ integration.yaml +├─ nh_tanf_child_care_deduction.yaml +├─ nh_tanf_countable_earned_income.yaml +├─ nh_tanf_eligible.yaml +├─ nh_tanf_income_eligible.yaml +├─ nh_tanf_payment_standard.yaml +├─ nh_tanf_resources_eligible.yaml +└─ nh_tanf.yaml`,issues:[{type:"success",text:"8 test files with 65 test cases"},{type:"success",text:"All edge cases covered"},{type:"success",text:"CI passing"}]}],AT=[{key:"parameters",label:"Parameters",icon:"⚙️"},{key:"variables",label:"Variables",icon:"📄"},{key:"tests",label:"Tests",icon:"🧪"}],CT=(i,l)=>{switch(i){case"parameters":return Qy[l]||Qy[0];case"variables":return Ky[l]||Ky[0];case"tests":return Wy[l]||Wy[0]}},MT=({step:i})=>{const[l,o]=Y.useState("parameters"),r=CT(l,i);return c.jsxs("div",{className:"example-panel",children:[c.jsxs("div",{className:"example-header",children:[c.jsx("span",{className:"example-title",children:"New Hampshire TANF"}),c.jsxs("span",{className:"example-badge",children:["Iteration ",i+1]})]}),c.jsx("div",{className:"example-tabs",children:AT.map(f=>c.jsxs("button",{className:`example-tab ${l===f.key?"active":""}`,onClick:()=>o(f.key),children:[c.jsx("span",{className:"tab-icon",children:f.icon}),c.jsx("span",{className:"tab-label",children:f.label})]},f.key))}),c.jsx(Nc,{mode:"wait",children:c.jsxs(xl.div,{className:"example-body",initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},children:[c.jsx("div",{className:"example-section",children:c.jsxs("div",{className:"example-file",children:[c.jsx("span",{className:"example-file-icon",children:l==="parameters"?"⚙️":l==="variables"?"📄":"🧪"}),c.jsx("span",{className:"example-file-name",children:r.title}),c.jsx("span",{className:`example-file-status ${r.status}`,children:r.statusLabel})]})}),c.jsx("div",{className:"example-section",children:c.jsx("pre",{className:"example-code",children:r.code})}),c.jsxs("div",{className:"example-section",children:[c.jsx("div",{className:"example-section-title",children:"Status"}),c.jsx("div",{className:"example-output",children:r.issues.map((f,m)=>c.jsxs("div",{className:`example-output-line ${f.type}`,children:[c.jsx("span",{className:"icon",children:f.type==="success"?"✓":f.type==="error"?"✗":"⚠"}),c.jsx("span",{children:f.text})]},m))})]})]},`${i}-${l}`)})]})},Ps={"doc-collector":{x:80,y:240,r:45,icon:"#icon-books",label:"document-collector",labelY:305},"param-architect":{x:220,y:90,r:45,icon:"#icon-gear",label:"parameter-architect",labelY:30},"test-creator":{x:220,y:240,r:45,icon:"#icon-flask",label:"test-creator",labelY:305},"rules-engineer":{x:220,y:390,r:45,icon:"#icon-lambda",label:"rules-engineer",labelY:455},"edge-case-gen":{x:350,y:310,r:40,icon:"#icon-lightning",label:"edge-case-gen",labelY:368},"impl-validator":{x:520,y:90,r:52,icon:"#icon-search",label:"impl-validator",labelY:30},"ref-validator":{x:490,y:420,r:40,icon:"#icon-link",label:"reference-validator",labelY:478},"ci-fixer":{x:620,y:240,r:52,icon:"#icon-wrench",label:"ci-fixer",labelY:315}},oc=[{id:"variable",label:"variable",x:120,agents:["doc-collector","param-architect","rules-engineer"]},{id:"testing",label:"testing",x:230,agents:["test-creator","edge-case-gen","impl-validator"]},{id:"code-style",label:"code-style",x:340,agents:["param-architect","rules-engineer","ci-fixer"]},{id:"parameter",label:"parameter",x:450,agents:["param-architect","ref-validator"]},{id:"vectorize",label:"vectorize",x:560,agents:["impl-validator","ci-fixer"]}],ul=540,Jy=90,$s=36,ET=()=>c.jsxs("defs",{children:[c.jsxs("g",{id:"icon-books",children:[c.jsx("rect",{x:"-14",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(-10)"}),c.jsx("rect",{x:"-4",y:"-10",width:"8",height:"24",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"6",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(10)"})]}),c.jsxs("g",{id:"icon-gear",children:[c.jsx("circle",{cx:"0",cy:"0",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-16 L3,-12 L3,-10 L-3,-10 L-3,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M0,16 L3,12 L3,10 L-3,10 L-3,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-16,0 L-12,3 L-10,3 L-10,-3 L-12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M16,0 L12,3 L10,3 L10,-3 L12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,-11 L-9,-8 L-7,-9 L-9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,-11 L9,-8 L7,-9 L9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,11 L-9,8 L-7,9 L-9,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,11 L9,8 L7,9 L9,12 Z",fill:"currentColor"})]}),c.jsxs("g",{id:"icon-flask",children:[c.jsx("path",{d:"M-5,-16 L-5,-4 L-14,14 L14,14 L5,-4 L5,-16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-7",y1:"-16",x2:"7",y2:"-16",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-9",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"3 2"})]}),c.jsx("g",{id:"icon-lambda",children:c.jsx("text",{x:"0",y:"8",fontFamily:"Georgia, serif",fontSize:"40",fontWeight:"400",fill:"currentColor",textAnchor:"middle",children:"λ"})}),c.jsx("g",{id:"icon-lightning",children:c.jsx("polygon",{points:"2,-16 -8,2 -1,2 -4,16 8,-2 1,-2",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-search",children:[c.jsx("circle",{cx:"-3",cy:"-3",r:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),c.jsx("line",{x1:"6",y1:"6",x2:"16",y2:"16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-link",children:[c.jsx("ellipse",{cx:"-6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"}),c.jsx("ellipse",{cx:"6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"})]}),c.jsx("g",{id:"icon-wrench",children:c.jsx("path",{d:"M-6,-16 C-12,-10 -12,-2 -6,4 L8,18 L14,12 L0,-2 C6,-8 6,-14 0,-16 L-2,-10 L-6,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})})]}),DT=()=>{const[i,l]=Y.useState(null),o=[["doc-collector","param-architect"],["doc-collector","test-creator"],["doc-collector","rules-engineer"],["test-creator","edge-case-gen"],["rules-engineer","edge-case-gen"],["test-creator","impl-validator"],["test-creator","ci-fixer"],["param-architect","impl-validator"],["param-architect","ci-fixer"],["rules-engineer","ci-fixer"],["param-architect","ref-validator"],["rules-engineer","ref-validator"],["impl-validator","ci-fixer"],["ref-validator","ci-fixer"],["edge-case-gen","ci-fixer"]];return c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 720 620",children:[c.jsx(ET,{}),c.jsx("ellipse",{className:"loop-indicator",cx:"370",cy:"240",rx:"280",ry:"200"}),o.map(([r,f],m)=>{const d=Ps[r],p=Ps[f];return c.jsx("line",{className:"network-line",x1:d.x,y1:d.y,x2:p.x,y2:p.y,style:{opacity:i===null?1:.15,transition:"opacity 0.2s ease"}},m)}),oc.map(r=>r.agents.map(f=>{const m=Ps[f],d=i===r.id;return c.jsx("line",{x1:r.x,y1:ul,x2:m.x,y2:m.y+m.r,stroke:"var(--accent)",strokeWidth:d?2.5:1,strokeDasharray:d?"none":"4 3",opacity:i===null?.4:d?1:.15,style:{transition:"all 0.2s ease"}},`${r.id}-${f}`)})),Object.entries(Ps).map(([r,f])=>{const m=i?oc.find(d=>d.id===i)?.agents.includes(r):!1;return c.jsxs("g",{children:[c.jsx("circle",{className:"network-node",cx:f.x,cy:f.y,r:f.r,style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"}}),c.jsx("g",{transform:`translate(${f.x},${f.y+(r==="rules-engineer"?8:0)}) scale(${f.r/35})`,className:"svg-icon",style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"},children:c.jsx("use",{href:f.icon})}),c.jsx("text",{className:"network-label",x:f.x,y:f.labelY,style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"},children:f.label})]},r)}),c.jsx("text",{x:"30",y:ul+$s/2+5,fontFamily:"JetBrains Mono",fontSize:"11",fill:"var(--text-mid)",fontWeight:"600",children:"Skills"}),oc.map(r=>{const f=i===r.id;return c.jsxs("g",{onMouseEnter:()=>l(r.id),onMouseLeave:()=>l(null),style:{cursor:"pointer"},children:[c.jsx("rect",{x:r.x-Jy/2,y:ul,width:Jy,height:$s,rx:"5",fill:f?"var(--accent)":"var(--accent-light)",stroke:"var(--accent)",strokeWidth:f?2:1.5,style:{transition:"all 0.2s ease"}}),c.jsx("text",{x:r.x,y:ul+$s/2+5,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"12",fill:f?"white":"var(--accent)",fontWeight:f?600:400,style:{transition:"all 0.2s ease",pointerEvents:"none"},children:r.label})]},r.id)}),c.jsx("text",{x:"640",y:ul+$s/2+5,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"16",fill:"var(--accent)",children:"..."}),c.jsx("text",{x:"370",y:"600",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"12",fill:"var(--text-mid)",fontStyle:"italic",children:"Hover over a skill to see which agents use it"})]})},Is={"issue-manager":{x:65,y:290,r:45,icon:"#icon-clipboard",label:"issue-manager",labelY:355},"doc-collector":{x:180,y:290,r:50,icon:"#icon-books",label:["document-","collector"],labelY:365},"param-architect":{x:360,y:100,r:50,icon:"#icon-gear",label:"parameter-architect",labelY:35},"test-creator":{x:360,y:290,r:50,icon:"#icon-flask",label:"test-creator",labelY:365},"rules-engineer":{x:360,y:480,r:50,icon:"#icon-lambda",label:"rules-engineer",labelY:550},"edge-case-gen":{x:510,y:370,r:44,icon:"#icon-lightning",label:"edge-case-gen",labelY:430},"impl-validator":{x:720,y:100,r:58,icon:"#icon-search",label:"impl-validator",labelY:35},"ref-validator":{x:690,y:510,r:44,icon:"#icon-link",label:"reference-validator",labelY:572},"ci-fixer":{x:850,y:290,r:58,icon:"#icon-wrench",label:"ci-fixer",labelY:370},"pr-pusher":{x:960,y:290,r:32,icon:"#icon-upload",label:"pr-pusher",labelY:338},"program-reviewer":{x:1040,y:290,r:32,icon:"#icon-book",label:["program-","reviewer"],labelY:338},"draft-pr":{x:1120,y:290,r:32,icon:"#icon-document",label:"Draft PR",labelY:338}},uc=[{id:"variable",label:"variable",x:200,agents:["doc-collector","param-architect","rules-engineer"]},{id:"testing",label:"testing",x:340,agents:["test-creator","edge-case-gen","impl-validator"]},{id:"code-style",label:"code-style",x:480,agents:["param-architect","rules-engineer","ci-fixer"]},{id:"parameter",label:"parameter",x:620,agents:["param-architect","ref-validator"]},{id:"vectorize",label:"vectorize",x:760,agents:["impl-validator","ci-fixer"]},{id:"review",label:"review",x:900,agents:["program-reviewer","ci-fixer"]}],cl=620,Fy=90,tr=36,wT=()=>c.jsxs("defs",{children:[c.jsxs("g",{id:"icon-clipboard",children:[c.jsx("rect",{x:"-12",y:"-16",width:"24",height:"32",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"-6",y:"-20",width:"12",height:"6",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"-4",x2:"7",y2:"-4",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"3",x2:"7",y2:"3",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"10",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-books",children:[c.jsx("rect",{x:"-14",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(-10)"}),c.jsx("rect",{x:"-4",y:"-10",width:"8",height:"24",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"6",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(10)"})]}),c.jsxs("g",{id:"icon-gear",children:[c.jsx("circle",{cx:"0",cy:"0",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-16 L3,-12 L3,-10 L-3,-10 L-3,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M0,16 L3,12 L3,10 L-3,10 L-3,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-16,0 L-12,3 L-10,3 L-10,-3 L-12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M16,0 L12,3 L10,3 L10,-3 L12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,-11 L-9,-8 L-7,-9 L-9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,-11 L9,-8 L7,-9 L9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,11 L-9,8 L-7,9 L-9,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,11 L9,8 L7,9 L9,12 Z",fill:"currentColor"})]}),c.jsxs("g",{id:"icon-flask",children:[c.jsx("path",{d:"M-5,-16 L-5,-4 L-14,14 L14,14 L5,-4 L5,-16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-7",y1:"-16",x2:"7",y2:"-16",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-9",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"3 2"})]}),c.jsx("g",{id:"icon-lambda",children:c.jsx("text",{x:"0",y:"8",fontFamily:"Georgia, serif",fontSize:"40",fontWeight:"400",fill:"currentColor",textAnchor:"middle",children:"λ"})}),c.jsx("g",{id:"icon-lightning",children:c.jsx("polygon",{points:"2,-16 -8,2 -1,2 -4,16 8,-2 1,-2",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-search",children:[c.jsx("circle",{cx:"-3",cy:"-3",r:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),c.jsx("line",{x1:"6",y1:"6",x2:"16",y2:"16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-link",children:[c.jsx("ellipse",{cx:"-6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"}),c.jsx("ellipse",{cx:"6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"})]}),c.jsx("g",{id:"icon-wrench",children:c.jsx("path",{d:"M-6,-16 C-12,-10 -12,-2 -6,4 L8,18 L14,12 L0,-2 C6,-8 6,-14 0,-16 L-2,-10 L-6,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-upload",children:[c.jsx("line",{x1:"0",y1:"12",x2:"0",y2:"-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),c.jsx("polyline",{points:"-8,-2 0,-12 8,-2",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"-12",y1:"16",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-book",children:[c.jsx("path",{d:"M0,-12 L0,14",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C-6,-14 -12,-12 -16,-8 L-16,12 C-12,8 -6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C6,-14 12,-12 16,-8 L16,12 C12,8 6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-document",children:[c.jsx("path",{d:"M-10,-16 L6,-16 L14,-8 L14,16 L-10,16 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M6,-16 L6,-8 L14,-8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-5",y1:"0",x2:"9",y2:"0",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-5",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2"})]})]}),LT=()=>{const[i,l]=Y.useState(null),o=[["issue-manager","doc-collector"],["doc-collector","param-architect"],["doc-collector","test-creator"],["doc-collector","rules-engineer"],["test-creator","edge-case-gen"],["rules-engineer","edge-case-gen"],["test-creator","impl-validator"],["test-creator","ci-fixer"],["param-architect","impl-validator"],["param-architect","ci-fixer"],["rules-engineer","ci-fixer"],["param-architect","ref-validator"],["rules-engineer","ref-validator"],["impl-validator","ci-fixer"],["ref-validator","ci-fixer"],["edge-case-gen","ci-fixer"],["ci-fixer","pr-pusher"],["pr-pusher","program-reviewer"],["program-reviewer","draft-pr"]];return c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 1160 700",children:[c.jsx(wT,{}),c.jsx("ellipse",{className:"loop-indicator",cx:"540",cy:"290",rx:"320",ry:"250"}),c.jsx("text",{x:"540",y:"560",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"12",fill:"var(--text-mid)",fontStyle:"italic",children:"iterate until tests pass"}),o.map(([r,f],m)=>{const d=Is[r],p=Is[f];return c.jsx("line",{className:"network-line",x1:d.x,y1:d.y,x2:p.x,y2:p.y,style:{opacity:i===null?1:.15,transition:"opacity 0.2s ease"}},m)}),uc.map(r=>r.agents.map(f=>{const m=Is[f],d=i===r.id;return c.jsx("line",{x1:r.x,y1:cl,x2:m.x,y2:m.y+m.r,stroke:"var(--accent)",strokeWidth:d?2.5:1,strokeDasharray:d?"none":"4 3",opacity:i===null?.4:d?1:.15,style:{transition:"all 0.2s ease"}},`${r.id}-${f}`)})),Object.entries(Is).map(([r,f])=>{const m=i?uc.find(d=>d.id===i)?.agents.includes(r):!1;return c.jsxs("g",{children:[c.jsx("circle",{className:"network-node",cx:f.x,cy:f.y,r:f.r,style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"}}),c.jsx("g",{transform:`translate(${f.x},${f.y+(r==="rules-engineer"?8:r==="doc-collector"?-8:0)}) scale(${f.r/38})`,className:"svg-icon",style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"},children:c.jsx("use",{href:f.icon})}),Array.isArray(f.label)?f.label.map((d,p)=>c.jsx("text",{className:"network-label",x:f.x,y:f.labelY+p*16,style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"},children:d},p)):c.jsx("text",{className:"network-label",x:f.x,y:f.labelY,style:{opacity:i===null||m?1:.4,transition:"opacity 0.2s ease"},children:f.label})]},r)}),c.jsx("text",{x:"70",y:cl+tr/2+5,fontFamily:"JetBrains Mono",fontSize:"11",fill:"var(--text-mid)",fontWeight:"600",children:"Skills"}),uc.map(r=>{const f=i===r.id;return c.jsxs("g",{onMouseEnter:()=>l(r.id),onMouseLeave:()=>l(null),style:{cursor:"pointer"},children:[c.jsx("rect",{x:r.x-Fy/2,y:cl,width:Fy,height:tr,rx:"5",fill:f?"var(--accent)":"var(--accent-light)",stroke:"var(--accent)",strokeWidth:f?2:1.5,style:{transition:"all 0.2s ease"}}),c.jsx("text",{x:r.x,y:cl+tr/2+5,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"12",fill:f?"white":"var(--accent)",fontWeight:f?600:400,style:{transition:"all 0.2s ease",pointerEvents:"none"},children:r.label})]},r.id)}),c.jsx("text",{x:"1000",y:cl+tr/2+5,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"16",fill:"var(--accent)",children:"..."}),c.jsx("text",{x:"580",y:"685",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"12",fill:"var(--text-mid)",fontStyle:"italic",children:"Hover over a skill to see which agents use it"})]})},vr=()=>c.jsxs("defs",{children:[c.jsxs("g",{id:"icon-clipboard",children:[c.jsx("rect",{x:"-12",y:"-16",width:"24",height:"32",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"-6",y:"-20",width:"12",height:"6",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"-4",x2:"7",y2:"-4",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"3",x2:"7",y2:"3",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"10",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-books",children:[c.jsx("rect",{x:"-14",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(-10)"}),c.jsx("rect",{x:"-4",y:"-10",width:"8",height:"24",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"6",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(10)"})]}),c.jsxs("g",{id:"icon-gear",children:[c.jsx("circle",{cx:"0",cy:"0",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-16 L3,-12 L3,-10 L-3,-10 L-3,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M0,16 L3,12 L3,10 L-3,10 L-3,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-16,0 L-12,3 L-10,3 L-10,-3 L-12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M16,0 L12,3 L10,3 L10,-3 L12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,-11 L-9,-8 L-7,-9 L-9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,-11 L9,-8 L7,-9 L9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,11 L-9,8 L-7,9 L-9,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,11 L9,8 L7,9 L9,12 Z",fill:"currentColor"})]}),c.jsxs("g",{id:"icon-flask",children:[c.jsx("path",{d:"M-5,-16 L-5,-4 L-14,14 L14,14 L5,-4 L5,-16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-7",y1:"-16",x2:"7",y2:"-16",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-9",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"3 2"})]}),c.jsx("g",{id:"icon-lambda",children:c.jsx("text",{x:"0",y:"8",fontFamily:"Georgia, serif",fontSize:"40",fontWeight:"400",fill:"currentColor",textAnchor:"middle",children:"λ"})}),c.jsx("g",{id:"icon-lightning",children:c.jsx("polygon",{points:"2,-16 -8,2 -1,2 -4,16 8,-2 1,-2",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-search",children:[c.jsx("circle",{cx:"-3",cy:"-3",r:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),c.jsx("line",{x1:"6",y1:"6",x2:"16",y2:"16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-link",children:[c.jsx("ellipse",{cx:"-6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"}),c.jsx("ellipse",{cx:"6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"})]}),c.jsx("g",{id:"icon-wrench",children:c.jsx("path",{d:"M-6,-16 C-12,-10 -12,-2 -6,4 L8,18 L14,12 L0,-2 C6,-8 6,-14 0,-16 L-2,-10 L-6,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-upload",children:[c.jsx("line",{x1:"0",y1:"12",x2:"0",y2:"-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),c.jsx("polyline",{points:"-8,-2 0,-12 8,-2",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"-12",y1:"16",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-book",children:[c.jsx("path",{d:"M0,-12 L0,14",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C-6,-14 -12,-12 -16,-8 L-16,12 C-12,8 -6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C6,-14 12,-12 16,-8 L16,12 C12,8 6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-document",children:[c.jsx("path",{d:"M-10,-16 L6,-16 L14,-8 L14,16 L-10,16 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M6,-16 L6,-8 L14,-8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-5",y1:"0",x2:"9",y2:"0",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-5",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-chat",children:[c.jsx("path",{d:"M-14,-10 L14,-10 C16,-10 16,-10 16,-8 L16,6 C16,8 16,8 14,8 L4,8 L-2,16 L-2,8 L-14,8 C-16,8 -16,8 -16,6 L-16,-8 C-16,-10 -16,-10 -14,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("circle",{cx:"-7",cy:"-1",r:"2",fill:"currentColor"}),c.jsx("circle",{cx:"0",cy:"-1",r:"2",fill:"currentColor"}),c.jsx("circle",{cx:"7",cy:"-1",r:"2",fill:"currentColor"})]})]}),NT=()=>c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 500 200",children:[c.jsx(vr,{}),c.jsx("circle",{className:"network-node",cx:"150",cy:"100",r:"60"}),c.jsx("g",{transform:"translate(150,100) scale(1.8)",className:"svg-icon",children:c.jsx("use",{href:"#icon-chat"})}),c.jsx("text",{className:"network-label",x:"150",y:"180",children:"Single Prompt"}),c.jsx("line",{className:"network-line",x1:"210",y1:"100",x2:"280",y2:"100"}),c.jsx("polygon",{className:"flow-arrow",points:"280,94 294,100 280,106"}),c.jsx("circle",{className:"network-node",cx:"350",cy:"100",r:"50",style:{stroke:"#dc2626"}}),c.jsx("g",{transform:"translate(350,100) scale(1.4)",className:"svg-icon",style:{color:"#dc2626"},children:c.jsx("use",{href:"#icon-document"})}),c.jsx("text",{className:"network-label",x:"350",y:"170",children:"Output"}),c.jsx("circle",{cx:"420",cy:"55",r:"30",fill:"#fef2f2",stroke:"#dc2626",strokeWidth:"2.5"}),c.jsx("text",{x:"420",y:"52",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"15",fontWeight:"600",fill:"#dc2626",children:"70%"}),c.jsx("text",{x:"420",y:"68",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"10",fill:"#dc2626",children:"errors"})]}),_T=()=>c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 800 220",children:[c.jsx(vr,{}),c.jsx("circle",{className:"network-node",cx:"80",cy:"110",r:"50"}),c.jsx("g",{transform:"translate(80,100) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-books"})}),c.jsx("text",{className:"network-label",x:"80",y:"180",children:"doc-collector"}),c.jsx("line",{className:"network-line",x1:"130",y1:"110",x2:"170",y2:"110"}),c.jsx("polygon",{className:"flow-arrow",points:"170,104 184,110 170,116"}),c.jsx("circle",{className:"network-node",cx:"230",cy:"110",r:"50"}),c.jsx("g",{transform:"translate(230,110) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-gear"})}),c.jsx("text",{className:"network-label",x:"230",y:"180",children:"param-architect"}),c.jsx("line",{className:"network-line",x1:"280",y1:"110",x2:"320",y2:"110"}),c.jsx("polygon",{className:"flow-arrow",points:"320,104 334,110 320,116"}),c.jsx("circle",{className:"network-node",cx:"380",cy:"110",r:"50"}),c.jsx("g",{transform:"translate(380,118) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-lambda"})}),c.jsx("text",{className:"network-label",x:"380",y:"180",children:"rules-engineer"}),c.jsx("line",{className:"network-line",x1:"430",y1:"110",x2:"470",y2:"110"}),c.jsx("polygon",{className:"flow-arrow",points:"470,104 484,110 470,116"}),c.jsx("circle",{className:"network-node",cx:"530",cy:"110",r:"50"}),c.jsx("g",{transform:"translate(530,110) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-flask"})}),c.jsx("text",{className:"network-label",x:"530",y:"180",children:"test-creator"}),c.jsx("line",{className:"network-line",x1:"580",y1:"110",x2:"620",y2:"110"}),c.jsx("polygon",{className:"flow-arrow",points:"620,104 634,110 620,116"}),c.jsx("circle",{className:"network-node",cx:"680",cy:"110",r:"50"}),c.jsx("g",{transform:"translate(680,110) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-document"})}),c.jsx("text",{className:"network-label",x:"680",y:"180",children:"output"}),c.jsx("text",{x:"400",y:"30",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"13",fill:"var(--warning)",fontStyle:"italic",children:"tests created after seeing rules-engineer's work"})]}),zT=()=>c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 750 420",children:[c.jsx(vr,{}),c.jsx("circle",{className:"network-node",cx:"80",cy:"210",r:"55"}),c.jsx("g",{transform:"translate(80,200) scale(1.6)",className:"svg-icon",children:c.jsx("use",{href:"#icon-books"})}),c.jsx("text",{className:"network-label",x:"80",y:"285",children:"doc-collector"}),c.jsx("line",{className:"network-line",x1:"135",y1:"175",x2:"230",y2:"70"}),c.jsx("line",{className:"network-line",x1:"135",y1:"210",x2:"230",y2:"210"}),c.jsx("line",{className:"network-line",x1:"135",y1:"245",x2:"230",y2:"350"}),c.jsx("circle",{className:"network-node",cx:"280",cy:"70",r:"50"}),c.jsx("g",{transform:"translate(280,70) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-gear"})}),c.jsx("text",{className:"network-label",x:"280",y:"140",children:"param-architect"}),c.jsx("circle",{className:"network-node",cx:"280",cy:"210",r:"50"}),c.jsx("g",{transform:"translate(280,210) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-flask"})}),c.jsx("text",{className:"network-label",x:"280",y:"280",children:"test-creator"}),c.jsx("circle",{className:"network-node",cx:"280",cy:"350",r:"50"}),c.jsx("g",{transform:"translate(280,358) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-lambda"})}),c.jsx("text",{className:"network-label",x:"280",y:"420",children:"rules-engineer"}),c.jsx("line",{className:"network-line",x1:"330",y1:"70",x2:"450",y2:"165"}),c.jsx("line",{className:"network-line",x1:"330",y1:"210",x2:"435",y2:"210"}),c.jsx("line",{className:"network-line",x1:"330",y1:"350",x2:"450",y2:"255"}),c.jsx("circle",{className:"network-node",cx:"490",cy:"210",r:"55"}),c.jsx("g",{transform:"translate(490,210) scale(1.6)",className:"svg-icon",children:c.jsx("use",{href:"#icon-search"})}),c.jsx("text",{className:"network-label",x:"490",y:"285",children:"impl-validator"}),c.jsx("line",{className:"network-line",x1:"545",y1:"210",x2:"615",y2:"210"}),c.jsx("polygon",{className:"flow-arrow",points:"615,204 629,210 615,216"}),c.jsx("circle",{className:"network-node",cx:"670",cy:"210",r:"50"}),c.jsx("g",{transform:"translate(670,210) scale(1.4)",className:"svg-icon",children:c.jsx("use",{href:"#icon-document"})}),c.jsx("text",{className:"network-label",x:"670",y:"280",children:"output"})]}),RT=()=>c.jsxs("svg",{className:"full-width-flow-svg",viewBox:"0 0 1100 680",children:[c.jsx(vr,{}),c.jsx("ellipse",{className:"loop-indicator",cx:"500",cy:"340",rx:"350",ry:"290"}),c.jsx("text",{x:"500",y:"650",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"13",fill:"var(--text-mid)",fontStyle:"italic",children:"iterate until tests pass"}),c.jsx("line",{className:"network-line",x1:"162",y1:"300",x2:"245",y2:"165"}),c.jsx("line",{className:"network-line",x1:"162",y1:"340",x2:"238",y2:"340"}),c.jsx("line",{className:"network-line",x1:"162",y1:"380",x2:"245",y2:"515"}),c.jsx("line",{className:"network-line",x1:"362",y1:"365",x2:"470",y2:"425"}),c.jsx("line",{className:"network-line",x1:"349",y1:"525",x2:"470",y2:"425"}),c.jsx("line",{className:"network-line",x1:"362",y1:"340",x2:"635",y2:"120"}),c.jsx("line",{className:"network-line",x1:"362",y1:"340",x2:"780",y2:"340"}),c.jsx("line",{className:"network-line",x1:"362",y1:"120",x2:"635",y2:"120"}),c.jsx("line",{className:"network-line",x1:"355",y1:"145",x2:"780",y2:"340"}),c.jsx("line",{className:"network-line",x1:"362",y1:"560",x2:"815",y2:"400"}),c.jsx("line",{className:"network-line",x1:"344",y1:"165",x2:"705",y2:"560"}),c.jsx("line",{className:"network-line",x1:"362",y1:"560",x2:"705",y2:"560"}),c.jsx("line",{className:"network-line",x1:"755",y1:"165",x2:"815",y2:"285"}),c.jsx("line",{className:"network-line",x1:"705",y1:"560",x2:"815",y2:"400"}),c.jsx("line",{className:"network-line",x1:"514",y1:"425",x2:"780",y2:"340"}),c.jsx("line",{className:"network-line",x1:"915",y1:"340",x2:"980",y2:"340"}),c.jsx("circle",{className:"network-node",cx:"100",cy:"340",r:"62"}),c.jsx("g",{transform:"translate(100,330) scale(1.8)",className:"svg-icon",children:c.jsx("use",{href:"#icon-books"})}),c.jsx("text",{className:"network-label",x:"100",y:"425",children:"document-"}),c.jsx("text",{className:"network-label",x:"100",y:"445",children:"collector"}),c.jsx("circle",{className:"network-node",cx:"300",cy:"120",r:"62"}),c.jsx("g",{transform:"translate(300,120) scale(1.8)",className:"svg-icon",children:c.jsx("use",{href:"#icon-gear"})}),c.jsx("text",{className:"network-label",x:"300",y:"42",children:"parameter-architect"}),c.jsx("circle",{className:"network-node",cx:"300",cy:"340",r:"62"}),c.jsx("g",{transform:"translate(300,340) scale(1.8)",className:"svg-icon",children:c.jsx("use",{href:"#icon-flask"})}),c.jsx("text",{className:"network-label",x:"300",y:"425",children:"test-creator"}),c.jsx("circle",{className:"network-node",cx:"300",cy:"560",r:"62"}),c.jsx("g",{transform:"translate(300,568) scale(1.8)",className:"svg-icon",children:c.jsx("use",{href:"#icon-lambda"})}),c.jsx("text",{className:"network-label",x:"300",y:"645",children:"rules-engineer"}),c.jsx("circle",{className:"network-node",cx:"470",cy:"425",r:"55"}),c.jsx("g",{transform:"translate(470,425) scale(1.6)",className:"svg-icon",children:c.jsx("use",{href:"#icon-lightning"})}),c.jsx("text",{className:"network-label",x:"470",y:"503",children:"edge-case-gen"}),c.jsx("circle",{className:"network-node",cx:"705",cy:"120",r:"72"}),c.jsx("g",{transform:"translate(705,120) scale(2.0)",className:"svg-icon",children:c.jsx("use",{href:"#icon-search"})}),c.jsx("text",{className:"network-label",x:"705",y:"42",children:"impl-validator"}),c.jsx("circle",{className:"network-node",cx:"670",cy:"600",r:"55"}),c.jsx("g",{transform:"translate(670,600) scale(1.6)",className:"svg-icon",children:c.jsx("use",{href:"#icon-link"})}),c.jsx("text",{className:"network-label",x:"670",y:"678",children:"reference-validator"}),c.jsx("circle",{className:"network-node",cx:"850",cy:"340",r:"72"}),c.jsx("g",{transform:"translate(850,340) scale(2.0)",className:"svg-icon",children:c.jsx("use",{href:"#icon-wrench"})}),c.jsx("text",{className:"network-label",x:"850",y:"435",children:"ci-fixer"}),c.jsx("circle",{className:"network-node",cx:"1020",cy:"340",r:"45"}),c.jsx("g",{transform:"translate(1020,340) scale(1.3)",className:"svg-icon",children:c.jsx("use",{href:"#icon-document"})}),c.jsx("text",{className:"network-label",x:"1020",y:"405",children:"output"})]}),er=[{id:"iter1",num:1,title:"Single prompt",subtitle:"70% error rate",diagram:c.jsx(NT,{}),description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"We started with the simplest approach: a single prompt asking Claude to implement New Hampshire TANF end-to-end. One command, one output—parameters, variables, tests, everything in one shot."}),c.jsx("p",{children:"The prompt included program requirements, coding conventions, file structure rules, and testing standards. Too much context for one prompt to hold."})]}),wins:["Simple to start—just one prompt to maintain","Sometimes produced working code","Fast iteration on prompt wording"],shortcomings:["70% of outputs had errors","Hard-coded values instead of parameters","No citations to source documents","Tests passed but formulas were wrong"],insight:"Too much context for one prompt. The model couldn't hold coding standards, legal requirements, and testing patterns all at once."},{id:"iter2",num:2,title:"Core pipeline",subtitle:"4 agents, sequential",diagram:c.jsx(_T,{}),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["If one prompt couldn't handle everything, we'd divide the work. We introduced",c.jsxs("strong",{children:[" ",c.jsx("a",{href:"https://www.anthropic.com/engineering/building-effective-agents",target:"_blank",rel:"noopener noreferrer",children:"agents"})]}),"—specialized AI workers that each focus on a single concern."]}),c.jsxs("p",{children:["A ",c.jsx("code",{children:"document-collector"})," gathers sources. A ",c.jsx("code",{children:"parameter-architect"})," structures data. A ",c.jsx("code",{children:"rules-engineer"})," implements logic. A ",c.jsx("code",{children:"test-creator"})," writes validations."]})]}),wins:["Each agent focused on one task","Clearer, shorter prompts","Easier to debug which step failed","Could improve agents independently"],shortcomings:["Tests run after seeing implementation","Tests confirm bugs instead of catching them","No validation step"],insight:"Dividing work helped, but agents running sequentially created a new problem: tests are written based on the variable implementation not based on the references."},{id:"iter3",num:3,title:"Parallel execution",subtitle:"5 agents, 40% error rate",diagram:c.jsx(zT,{}),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["The deeper problem: ",c.jsx("strong",{children:"tests designed to pass, not to verify"}),". When test-creator sees rules-engineer's code first, it writes tests that validate what was built—not what the regulation requires."]}),c.jsxs("p",{children:["We run test-creator and rules-engineer in parallel. Both read the same documentation, neither sees the other's output. An ",c.jsx("code",{children:"impl-validator"})," checks the results."]})]}),wins:["Tests verify requirements, not implementation","Parallel execution catches real bugs","Error rate dropped to 40%","Added impl-validator for quality checks"],shortcomings:["Parameters and variables don't match each other","Manual iteration on failures","Missing reference validation","No edge case coverage"],insight:"Agent isolation prevents confirmation bias. When tests fail, it reveals actual discrepancies between implementation and requirements."},{id:"iter4",num:4,title:"Validation loop",subtitle:"8 agents with CI feedback",diagram:c.jsx(RT,{}),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["We added more specialized agents: ",c.jsx("code",{children:"edge-case-generator"})," for boundary tests,",c.jsx("code",{children:"reference-validator"})," to check citations, and ",c.jsx("code",{children:"ci-fixer"})," to automatically iterate on failures."]}),c.jsx("p",{children:"The workflow now loops—when tests fail, ci-fixer analyzes the error and retries until everything passes. No more manual debugging."})]}),wins:["Automatic iteration on failures","Edge cases covered systematically","Citations validated against sources","Less manual intervention needed"],shortcomings:["Agents had inconsistent patterns","Prompts grew long with repeated rules","Same instructions in every agent","Hard to maintain consistency"],insight:"More agents meant more capability, but also more inconsistency. The same rules about naming, structure, and style were repeated everywhere."},{id:"iter5",num:5,title:"Modular skills",subtitle:"15% error rate",diagram:c.jsx(DT,{}),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["We introduced ",c.jsx("strong",{children:c.jsx("a",{href:"https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview",target:"_blank",rel:"noopener noreferrer",children:"skills"})}),"—reusable knowledge modules that agents load on demand. Instead of repeating instructions in every prompt, we extracted shared knowledge into focused documents."]}),c.jsxs("p",{children:["The ",c.jsx("code",{children:"variable-patterns"})," skill teaches proper class structure. The ",c.jsx("code",{children:"testing"}),"skill ensures consistent test format. Multiple agents load the same skills."]})]}),wins:["Consistent patterns across all agents","Shorter, focused agent prompts","Error rate dropped to 15%","Easy to add new agents"],shortcomings:["Missing start-to-end orchestration","No PR creation or review step","Manual handoff between stages"],insight:"Skills let us scale without redundancy. One skill, many agents—consistent patterns everywhere."},{id:"iter6",num:6,title:"Full workflow",subtitle:"Complete pipeline",diagram:c.jsx(LT,{}),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["The final architecture adds orchestration agents: ",c.jsx("code",{children:"issue-manager"})," finds or creates GitHub issues, ",c.jsx("code",{children:"pr-pusher"})," creates the pull request, and ",c.jsx("code",{children:"program-reviewer"}),"validates against regulations before marking ready for human review."]}),c.jsxs("p",{children:["One command—",c.jsx("code",{children:'/encode-policy "New Hampshire TANF"'}),"—triggers the entire workflow and produces a draft PR in about 90 minutes."]})]}),wins:["End-to-end automation","90 minutes per implementation","Consistent quality across 42 states","Human reviews final PR only"],shortcomings:["Complex to debug across layers","Requires clear documentation"],insight:"The complete pipeline: issue → research → parallel implementation → validation loop → PR. Each agent does one thing well, skills ensure consistency."}],OT=()=>{const[i,l]=Y.useState(0),[o,r]=Y.useState(null),f=({data:m})=>{l(m)};return Y.useEffect(()=>{const m=d=>{d.key==="Escape"&&r(null)};return o!==null&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow=""}},[o]),c.jsxs(Jn,{children:[c.jsx("h2",{children:"The evolution: from prompt to workflow"}),c.jsx("p",{children:"Getting to a completed, tested and functioning pull request with a single command took many iterations. Each version addressed previous limitations while surfacing new challenges. Here's how the system evolved, illustrated through six key stages based on a concrete example: implementing New Hampshire's Temporary Assistance for Needy Families (TANF) program."}),c.jsx(Nc,{children:o!==null&&c.jsx(xl.div,{className:"diagram-modal-overlay",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(null),children:c.jsxs(xl.div,{className:"diagram-modal-content",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",damping:25,stiffness:300},onClick:m=>m.stopPropagation(),children:[c.jsx("button",{className:"diagram-modal-close",onClick:()=>r(null),"aria-label":"Close",children:"×"}),c.jsxs("div",{className:"diagram-modal-title",children:["Step ",er[o].num,": ",er[o].title]}),c.jsx("div",{className:"diagram-modal-diagram",children:er[o].diagram})]})})}),c.jsxs("div",{className:"scrollytelling-container",children:[c.jsx("div",{className:"scrolly-narrative",children:c.jsx(pT,{offset:.33,onStepEnter:f,children:er.map((m,d)=>c.jsx(TT,{data:d,children:c.jsxs("div",{className:`narrative-step ${i===d?"active":""}`,children:[c.jsxs("div",{className:"step-header",children:[c.jsx("div",{className:"step-number",children:m.num}),c.jsx("div",{className:"step-title",children:m.title}),c.jsxs("div",{className:"step-subtitle",children:["— ",m.subtitle]})]}),c.jsxs("div",{className:"step-diagram clickable",onClick:()=>r(d),title:"Click to expand",children:[c.jsx(Nc,{mode:"wait",children:c.jsx(xl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},style:{width:"100%",display:"flex",justifyContent:"center"},children:m.diagram},m.id)}),c.jsx("div",{className:"expand-hint",children:"Click to expand"})]}),c.jsxs("div",{className:"step-content",children:[m.description,c.jsxs("div",{className:"wins-shortcomings",children:[c.jsxs("div",{className:"wins",children:[c.jsxs("div",{className:"wins-title",children:[c.jsx("span",{children:"✓"})," What worked"]}),c.jsx("ul",{children:m.wins.map((p,y)=>c.jsx("li",{children:p},y))})]}),c.jsxs("div",{className:"shortcomings",children:[c.jsxs("div",{className:"shortcomings-title",children:[c.jsx("span",{children:"✗"})," What didn't"]}),c.jsx("ul",{children:m.shortcomings.map((p,y)=>c.jsx("li",{children:p},y))})]})]}),c.jsxs("div",{className:"insight-box",children:[c.jsx("div",{className:"insight-label",children:"Key Insight"}),c.jsx("p",{children:m.insight})]})]})]})},m.id))})}),c.jsx("div",{className:"scrolly-sticky",children:c.jsx(MT,{step:i})})]})]})},kT=()=>c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),c.jsx("polyline",{points:"14 2 14 8 20 8"}),c.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),c.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),c.jsx("polyline",{points:"10 9 9 9 8 9"})]}),VT=()=>c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),c.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),c.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),c.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]}),BT=()=>c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),c.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"}),c.jsx("line",{x1:"8",y1:"7",x2:"16",y2:"7"}),c.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]}),UT=()=>c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"3"}),c.jsx("path",{d:"M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83"})]}),HT=()=>c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"16 18 22 12 16 6"}),c.jsx("polyline",{points:"8 6 2 12 8 18"}),c.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"22"})]}),YT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"Design principles"}),c.jsx("p",{children:"These principles emerged from the evolution:"}),c.jsxs("div",{className:"principles-grid",children:[c.jsxs("div",{className:"principle-card",children:[c.jsx("div",{className:"principle-icon",children:c.jsx(kT,{})}),c.jsx("div",{className:"principle-title",children:"Source authority"}),c.jsx("p",{className:"principle-desc",children:"Collect only primary sources. Anchor parameters to legal documents—statutes, regulations, state plans—and use forms and benefit calculators as supporting references."})]}),c.jsxs("div",{className:"principle-card",children:[c.jsx("div",{className:"principle-icon",children:c.jsx(VT,{})}),c.jsx("div",{className:"principle-title",children:"Isolation"}),c.jsx("p",{className:"principle-desc",children:"Certain agents operate in isolation to prevent confirmation bias. When agents cannot see each other's output, mismatches reveal actual bugs rather than shared misconceptions."})]}),c.jsxs("div",{className:"principle-card",children:[c.jsx("div",{className:"principle-icon",children:c.jsx(BT,{})}),c.jsx("div",{className:"principle-title",children:"Shared knowledge"}),c.jsx("p",{className:"principle-desc",children:"Domain expertise lives in reusable modules shared by agents throughout the workflow. No redundancy, no forgetting."})]})]}),c.jsxs("div",{className:"principles-bottom",children:[c.jsxs("div",{className:"principle-card",children:[c.jsx("div",{className:"principle-icon",children:c.jsx(UT,{})}),c.jsx("div",{className:"principle-title",children:"Orchestrator pattern"}),c.jsx("p",{className:"principle-desc",children:"The orchestrator coordinates without implementing. It invokes specialized agents, checks quality gates, and manages workflow state—but never writes code itself."})]}),c.jsxs("div",{className:"principle-card",children:[c.jsx("div",{className:"principle-icon",children:c.jsx(HT,{})}),c.jsx("div",{className:"principle-title",children:"Composability"}),c.jsxs("p",{className:"principle-desc",children:["Agents and skills are primitives that can be combined into different workflows. A validator agent works in ",c.jsx("code",{children:"/encode-policy"}),", ",c.jsx("code",{children:"/review-pr"}),", and ",c.jsx("code",{children:"/fix-pr"})," alike."]})]})]})]}),nr={"issue-manager":{x:65,y:290,r:40,icon:"#icon-clipboard",label:"issue-manager",labelY:348,stage:1},"doc-collector":{x:170,y:290,r:48,icon:"#icon-books",label:["document-","collector"],labelY:358,stage:2},"param-architect":{x:330,y:100,r:48,icon:"#icon-gear",label:"parameter-architect",labelY:38,stage:2},"test-creator":{x:330,y:290,r:48,icon:"#icon-flask",label:"test-creator",labelY:358,stage:2},"rules-engineer":{x:330,y:480,r:48,icon:"#icon-lambda",label:"rules-engineer",labelY:548,stage:2},"edge-case-gen":{x:470,y:370,r:40,icon:"#icon-lightning",label:"edge-case-gen",labelY:428,stage:2},"impl-validator":{x:640,y:100,r:54,icon:"#icon-search",label:"impl-validator",labelY:38,stage:3},"ref-validator":{x:610,y:505,r:40,icon:"#icon-link",label:"reference-validator",labelY:563,stage:3},"ci-fixer":{x:760,y:290,r:54,icon:"#icon-wrench",label:"ci-fixer",labelY:365,stage:3},"pr-pusher":{x:870,y:290,r:32,icon:"#icon-upload",label:"pr-pusher",labelY:338,stage:4},"program-reviewer":{x:945,y:290,r:32,icon:"#icon-book",label:["program-","reviewer"],labelY:338,stage:4},"draft-pr":{x:1020,y:290,r:32,icon:"#icon-document",label:"Draft PR",labelY:338,stage:4}},Py=[{num:1,title:"Setup",x1:0,x2:115,color:"rgba(13, 115, 119, 0.08)",agents:["issue-manager"],description:"Establish coordination points for the workflow.",steps:["Search for existing issues","Create branch & draft PR","Set up status tracking"]},{num:2,title:"Development",x1:115,x2:555,color:"rgba(13, 115, 119, 0.05)",agents:["document-collector","parameter-architect","test-creator","rules-engineer","edge-case-gen"],description:"Research official sources, then build in parallel tracks.",steps:["Collect legal citations","Create YAML parameters","Write tests & variables"]},{num:3,title:"Validation",x1:555,x2:825,color:"rgba(13, 115, 119, 0.08)",agents:["impl-validator","ref-validator","ci-fixer"],description:"Validate code patterns, then fix until tests pass.",steps:["Check naming & structure","Verify citations","Run tests locally","Delegate fixes"]},{num:4,title:"Review",x1:825,x2:1060,color:"rgba(13, 115, 119, 0.05)",agents:["program-reviewer","pr-pusher"],description:"Review against regulations, then document the PR.",steps:["Compare to source docs","Update PR description","Human makes merge decision"]}],$y=[{id:"variable",label:"variable",x:180,agents:["doc-collector","param-architect","rules-engineer"]},{id:"testing",label:"testing",x:310,agents:["test-creator","edge-case-gen","impl-validator"]},{id:"code-style",label:"code-style",x:440,agents:["param-architect","rules-engineer","ci-fixer"]},{id:"parameter",label:"parameter",x:570,agents:["param-architect","ref-validator"]},{id:"vectorize",label:"vectorize",x:700,agents:["impl-validator","ci-fixer"]},{id:"review",label:"review",x:830,agents:["program-reviewer","ci-fixer"]}],fl=620,Iy=85,ir=32,qT=()=>c.jsxs("defs",{children:[c.jsxs("g",{id:"icon-clipboard",children:[c.jsx("rect",{x:"-12",y:"-16",width:"24",height:"32",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"-6",y:"-20",width:"12",height:"6",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"-4",x2:"7",y2:"-4",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"3",x2:"7",y2:"3",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-7",y1:"10",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-books",children:[c.jsx("rect",{x:"-14",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(-10)"}),c.jsx("rect",{x:"-4",y:"-10",width:"8",height:"24",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("rect",{x:"6",y:"-8",width:"8",height:"22",rx:"1",fill:"none",stroke:"currentColor",strokeWidth:"2",transform:"rotate(10)"})]}),c.jsxs("g",{id:"icon-gear",children:[c.jsx("circle",{cx:"0",cy:"0",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-16 L3,-12 L3,-10 L-3,-10 L-3,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M0,16 L3,12 L3,10 L-3,10 L-3,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-16,0 L-12,3 L-10,3 L-10,-3 L-12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M16,0 L12,3 L10,3 L10,-3 L12,-3 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,-11 L-9,-8 L-7,-9 L-9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,-11 L9,-8 L7,-9 L9,-12 Z",fill:"currentColor"}),c.jsx("path",{d:"M-11,11 L-9,8 L-7,9 L-9,12 Z",fill:"currentColor"}),c.jsx("path",{d:"M11,11 L9,8 L7,9 L9,12 Z",fill:"currentColor"})]}),c.jsxs("g",{id:"icon-flask",children:[c.jsx("path",{d:"M-5,-16 L-5,-4 L-14,14 L14,14 L5,-4 L5,-16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-7",y1:"-16",x2:"7",y2:"-16",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-9",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"3 2"})]}),c.jsx("g",{id:"icon-lambda",children:c.jsx("text",{x:"0",y:"8",fontFamily:"Georgia, serif",fontSize:"40",fontWeight:"400",fill:"currentColor",textAnchor:"middle",children:"λ"})}),c.jsx("g",{id:"icon-lightning",children:c.jsx("polygon",{points:"2,-16 -8,2 -1,2 -4,16 8,-2 1,-2",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-search",children:[c.jsx("circle",{cx:"-3",cy:"-3",r:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),c.jsx("line",{x1:"6",y1:"6",x2:"16",y2:"16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-link",children:[c.jsx("ellipse",{cx:"-6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"}),c.jsx("ellipse",{cx:"6",cy:"0",rx:"8",ry:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",transform:"rotate(-45)"})]}),c.jsx("g",{id:"icon-wrench",children:c.jsx("path",{d:"M-6,-16 C-12,-10 -12,-2 -6,4 L8,18 L14,12 L0,-2 C6,-8 6,-14 0,-16 L-2,-10 L-6,-10 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),c.jsxs("g",{id:"icon-upload",children:[c.jsx("line",{x1:"0",y1:"12",x2:"0",y2:"-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),c.jsx("polyline",{points:"-8,-2 0,-12 8,-2",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"-12",y1:"16",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),c.jsxs("g",{id:"icon-book",children:[c.jsx("path",{d:"M0,-12 L0,14",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C-6,-14 -12,-12 -16,-8 L-16,12 C-12,8 -6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"}),c.jsx("path",{d:"M0,-12 C6,-14 12,-12 16,-8 L16,12 C12,8 6,10 0,14",fill:"none",stroke:"currentColor",strokeWidth:"2"})]}),c.jsxs("g",{id:"icon-document",children:[c.jsx("path",{d:"M-10,-16 L6,-16 L14,-8 L14,16 L-10,16 Z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M6,-16 L6,-8 L14,-8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("line",{x1:"-5",y1:"0",x2:"9",y2:"0",stroke:"currentColor",strokeWidth:"2"}),c.jsx("line",{x1:"-5",y1:"6",x2:"9",y2:"6",stroke:"currentColor",strokeWidth:"2"})]})]}),GT=()=>{const[i,l]=Y.useState(null),o=[["issue-manager","doc-collector"],["doc-collector","param-architect"],["doc-collector","test-creator"],["doc-collector","rules-engineer"],["test-creator","edge-case-gen"],["rules-engineer","edge-case-gen"],["test-creator","impl-validator"],["test-creator","ci-fixer"],["param-architect","impl-validator"],["param-architect","ci-fixer"],["rules-engineer","ci-fixer"],["param-architect","ref-validator"],["rules-engineer","ref-validator"],["impl-validator","ci-fixer"],["ref-validator","ci-fixer"],["edge-case-gen","ci-fixer"],["ci-fixer","pr-pusher"],["pr-pusher","program-reviewer"],["program-reviewer","draft-pr"]];return c.jsx("div",{className:"stages-diagram-container",children:c.jsxs("svg",{className:"stages-diagram-svg",viewBox:"0 -75 1060 755",children:[c.jsx(qT,{}),Py.map(r=>{const f=i===r.num;return c.jsxs("g",{children:[c.jsx("rect",{x:r.x1,y:-75,width:r.x2-r.x1,height:755,fill:f?"rgba(13, 115, 119, 0.12)":r.color,style:{transition:"fill 0.2s ease",cursor:"pointer"},onMouseEnter:()=>l(r.num),onMouseLeave:()=>l(null)}),c.jsxs("g",{style:{cursor:"pointer"},onMouseEnter:()=>l(r.num),onMouseLeave:()=>l(null),children:[c.jsx("circle",{cx:(r.x1+r.x2)/2,cy:-30,r:32,fill:f?"var(--accent)":"var(--bg-card)",stroke:"var(--accent)",strokeWidth:"2",style:{transition:"fill 0.2s ease"}}),c.jsx("text",{x:(r.x1+r.x2)/2,y:-26,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"8",fontWeight:"600",fill:f?"white":"var(--accent)",style:{transition:"fill 0.2s ease"},children:r.title})]})]},r.num)}),c.jsx("ellipse",{className:"loop-indicator",cx:"465",cy:"290",rx:"310",ry:"235",style:{opacity:i===null?.6:i===3?1:.15,transition:"opacity 0.2s ease"}}),c.jsx("text",{x:"465",y:"545",textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"11",fill:"var(--text-mid)",fontStyle:"italic",style:{opacity:i===null||i===3?1:.3,transition:"opacity 0.2s ease"},children:"iterate until tests pass"}),o.map(([r,f],m)=>{const d=nr[r],p=nr[f],y=i!==null&&(d.stage===i||p.stage===i);return c.jsx("line",{className:"network-line",x1:d.x,y1:d.y,x2:p.x,y2:p.y,style:{opacity:i===null?.5:y?.8:.08,transition:"opacity 0.2s ease"}},m)}),Object.entries(nr).map(([r,f])=>{const m=i===null||f.stage===i;return c.jsxs("g",{children:[c.jsx("circle",{className:"network-node",cx:f.x,cy:f.y,r:f.r,style:{opacity:m?1:.3,transition:"opacity 0.2s ease"}}),c.jsx("g",{transform:`translate(${f.x},${f.y+(r==="rules-engineer"?8:r==="doc-collector"?-6:0)}) scale(${f.r/38})`,className:"svg-icon",style:{opacity:m?1:.3,transition:"opacity 0.2s ease"},children:c.jsx("use",{href:f.icon})}),Array.isArray(f.label)?f.label.map((d,p)=>c.jsx("text",{className:"network-label",x:f.x,y:f.labelY+p*14,style:{opacity:m?1:.3,transition:"opacity 0.2s ease",fontSize:"11px"},children:d},p)):c.jsx("text",{className:"network-label",x:f.x,y:f.labelY,style:{opacity:m?1:.3,transition:"opacity 0.2s ease",fontSize:"11px"},children:f.label})]},r)}),$y.map(r=>r.agents.map(f=>{const m=nr[f];return c.jsx("line",{x1:r.x,y1:fl,x2:m.x,y2:m.y+m.r,stroke:"var(--accent)",strokeWidth:"1",strokeDasharray:"4 3",opacity:"0.35"},`${r.id}-${f}`)})),c.jsx("text",{x:"70",y:fl+ir/2+4,fontFamily:"JetBrains Mono",fontSize:"10",fill:"var(--text-mid)",fontWeight:"600",children:"Skills"}),$y.map(r=>c.jsxs("g",{children:[c.jsx("rect",{x:r.x-Iy/2,y:fl,width:Iy,height:ir,rx:"5",fill:"var(--accent-light)",stroke:"var(--accent)",strokeWidth:"1.5"}),c.jsx("text",{x:r.x,y:fl+ir/2+4,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"11",fill:"var(--accent)",children:r.label})]},r.id)),c.jsx("text",{x:"940",y:fl+ir/2+4,textAnchor:"middle",fontFamily:"JetBrains Mono",fontSize:"14",fill:"var(--accent)",children:"..."}),i!==null&&(()=>{const r=Py.find(y=>y.num===i);if(!r)return null;const f=200,m=180,d=i<=2?r.x2+10:r.x1-f-10;return c.jsx("foreignObject",{x:d,y:60,width:f,height:m,style:{pointerEvents:"none",overflow:"visible"},children:c.jsxs("div",{style:{background:"var(--bg-card)",border:"2px solid var(--border)",borderRadius:"8px",padding:"10px 12px",boxShadow:"0 4px 16px rgba(0,0,0,0.1)",fontFamily:"JetBrains Mono, monospace"},children:[c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"8px"},children:r.agents.map(y=>c.jsx("span",{style:{background:"var(--accent-light)",color:"var(--accent)",padding:"2px 6px",borderRadius:"3px",fontSize:"9px",fontWeight:500},children:y},y))}),c.jsx("div",{style:{fontSize:"10px",color:"var(--text-mid)",lineHeight:"1.5",marginBottom:"8px"},children:r.description}),c.jsx("div",{style:{fontSize:"9px",color:"var(--text-mid)"},children:r.steps.map((y,g)=>c.jsxs("div",{style:{padding:"2px 0",display:"flex",gap:"6px"},children:[c.jsx("span",{style:{color:"var(--accent)"},children:"→"}),c.jsx("span",{children:y})]},g))})]})})})()]})})},XT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"The architecture today"}),c.jsxs("p",{children:["The ",c.jsx("code",{children:"/encode-policy"})," command is the most comprehensive instantiation of these patterns—but ",c.jsx("code",{children:"/review-pr"})," and ",c.jsx("code",{children:"/fix-pr"})," use the same agents and skills for focused tasks. Here's how ",c.jsx("code",{children:"/encode-policy"}),' works in detail: it orchestrates specialized agents to transform a policy request like "Oregon TANF" into a complete pull request with parameters, variables, tests, and documentation. The orchestrator never writes code—it invokes specialized agents and checks quality gates between phases.']}),c.jsx("h3",{children:"Workflow phases"}),c.jsx(GT,{})]}),ZT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"Results"}),c.jsxs("div",{className:"results-section",children:[c.jsxs("div",{className:"results-stats",children:[c.jsxs("div",{className:"stat-card",children:[c.jsx("div",{className:"stat-number",children:"90 min"}),c.jsx("div",{className:"stat-label",children:"Per implementation"}),c.jsx("div",{className:"stat-detail",children:"Down from 2-3 weeks"})]}),c.jsxs("div",{className:"stat-card",children:[c.jsx("div",{className:"stat-number",children:"45+"}),c.jsx("div",{className:"stat-label",children:"Programs in production"}),c.jsx("div",{className:"stat-detail",children:"TANF across states & Illinois programs"})]}),c.jsxs("div",{className:"stat-card",children:[c.jsx("div",{className:"stat-number",children:"60K+"}),c.jsx("div",{className:"stat-label",children:"Lines of code"}),c.jsx("div",{className:"stat-detail",children:"Consistent patterns & quality"})]})]}),c.jsx("div",{className:"results-description",children:c.jsxs("p",{children:["Specialized agents handle the mechanical work—research, parameterization, testing, documentation—while humans review the final PR and make the merge decision. Our API partner ",c.jsx("a",{href:"https://www.myfriendben.org",children:"MyFriendBen"})," uses the Illinois implementations to power their benefits screening tool."]})})]})]}),QT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"Try it yourself"}),c.jsxs("p",{children:["The ",c.jsx("code",{children:"/encode-policy"})," command is part of the ",c.jsx("a",{href:"https://github.com/PolicyEngine/policyengine-claude",children:"policyengine-claude"})," repository. To implement a new benefit program:"]}),c.jsxs("div",{className:"terminal-container",children:[c.jsxs("div",{className:"terminal-header",children:[c.jsx("span",{className:"terminal-dot red"}),c.jsx("span",{className:"terminal-dot yellow"}),c.jsx("span",{className:"terminal-dot green"}),c.jsx("span",{className:"terminal-title",children:"claude-code — zsh"})]}),c.jsx("div",{className:"terminal-body",children:c.jsx("pre",{children:c.jsxs("code",{children:[c.jsx("span",{className:"terminal-comment",children:"# Add the marketplace"}),` +`,c.jsx("span",{className:"terminal-command",children:"/plugin marketplace add PolicyEngine/policyengine-claude"}),` +`,` +`,c.jsx("span",{className:"terminal-comment",children:"# Install the complete plugin (includes encode-policy command)"}),` +`,c.jsx("span",{className:"terminal-command",children:"/plugin install complete@policyengine-claude"}),` +`,` +`,c.jsx("span",{className:"terminal-comment",children:"# Run the workflow"}),` +`,c.jsx("span",{className:"terminal-command",children:'/encode-policy "Iowa TANF"'})]})})})]}),c.jsx("p",{children:"The workflow guides you through each phase, checks quality gates, and fixes issues automatically."})]}),KT=()=>c.jsxs(Jn,{children:[c.jsx("h2",{children:"What's next"}),c.jsxs("p",{children:["The ",c.jsx("code",{children:"/encode-policy"})," workflow handles individual programs. The next challenge is understanding how programs interact."]}),c.jsxs("div",{className:"next-cards",children:[c.jsxs("div",{className:"next-card",children:[c.jsx("span",{className:"next-card-badge",children:"In Progress"}),c.jsx("div",{className:"next-card-title",children:"Cross-program validation"}),c.jsx("p",{className:"next-card-desc",children:"Benefit programs form a connected system—SNAP benefits count as unearned income for TANF, Medicaid enrollment affects SSI calculations, and some programs are mutually exclusive. A cross-program validator would detect these interactions during implementation rather than in production."})]}),c.jsxs("div",{className:"next-card",children:[c.jsx("span",{className:"next-card-badge",children:"Exploring"}),c.jsx("div",{className:"next-card-title",children:"Historical implementations"}),c.jsx("p",{className:"next-card-desc",children:"Parameters support multiple effective dates, but program reforms often involve structural changes—eliminating deductions, adding eligibility categories, or restructuring formulas. We are testing approaches to handle these reforms across time."})]})]}),c.jsx("div",{className:"footer",children:c.jsxs("p",{children:["PolicyEngine is a nonprofit building free, open-source tools for tax and benefit policy analysis. Learn more at ",c.jsx("a",{href:"https://policyengine.org",children:"policyengine.org"}),"."]})})]});function WT(){return c.jsxs(c.Fragment,{children:[c.jsx(yv,{}),c.jsx("div",{className:"scrolly-container",children:c.jsxs("article",{className:"article-wrapper",children:[c.jsx(eT,{}),c.jsx("hr",{}),c.jsx(nT,{}),c.jsx("hr",{}),c.jsx(OT,{}),c.jsx("hr",{}),c.jsx(YT,{}),c.jsx("hr",{}),c.jsx(XT,{}),c.jsx("hr",{}),c.jsx(ZT,{}),c.jsx("hr",{}),c.jsx(QT,{}),c.jsx("hr",{}),c.jsx(KT,{})]})})]})}pv.createRoot(document.getElementById("root")).render(c.jsx(Y.StrictMode,{children:c.jsx(WT,{})})); diff --git a/app/public/assets/posts/encode-policy-multi-agent-ai/index.html b/app/public/assets/posts/encode-policy-multi-agent-ai/index.html new file mode 100644 index 000000000..a996a44d4 --- /dev/null +++ b/app/public/assets/posts/encode-policy-multi-agent-ai/index.html @@ -0,0 +1,17 @@ + + + + + + + Automating Tax and Benefit Policy Modeling with Multi-Agent AI + + + + + + + +
+ + diff --git a/app/src/data/apps/appTransformers.test.ts b/app/src/data/apps/appTransformers.test.ts index a9d1f4bf9..3a93e351c 100644 --- a/app/src/data/apps/appTransformers.test.ts +++ b/app/src/data/apps/appTransformers.test.ts @@ -28,7 +28,8 @@ describe('appTransformers', () => { test('all apps have valid source URLs', () => { apps.forEach((app) => { - expect(app.source).toMatch(/^https?:\/\//); + // Allow external URLs (https://) or local paths (/assets/) + expect(app.source).toMatch(/^(https?:\/\/|\/assets\/)/); }); }); diff --git a/app/src/data/apps/apps.json b/app/src/data/apps/apps.json index 3847459ca..a849d0171 100644 --- a/app/src/data/apps/apps.json +++ b/app/src/data/apps/apps.json @@ -1,4 +1,17 @@ [ + { + "type": "iframe", + "slug": "encode-policy-multi-agent-ai", + "title": "Automating tax and benefit policy modeling with multi-agent AI", + "description": "How we built a system that transforms a policy request into a complete, tested pull request in 90 minutes.", + "source": "/assets/posts/encode-policy-multi-agent-ai/index.html", + "tags": ["us", "technical", "featured", "interactives"], + "countryId": "us", + "displayWithResearch": true, + "image": "encode-policy-multi-agent-ai-cover.png", + "date": "2026-02-02 12:00:00", + "authors": ["ziming-hua"] + }, { "type": "iframe", "slug": "scottish-budget-2026-27", diff --git a/app/src/data/posts/articles/encode-policy-multi-agent-ai.md b/app/src/data/posts/articles/encode-policy-multi-agent-ai.md new file mode 100644 index 000000000..598c53769 --- /dev/null +++ b/app/src/data/posts/articles/encode-policy-multi-agent-ai.md @@ -0,0 +1,5 @@ +# Automating tax and benefit policy modeling with multi-agent AI + +This is a placeholder for the interactive article. The actual content is served as an iframe app. + +For now, this entry maintains the blog post presence. diff --git a/app/src/data/posts/authors.json b/app/src/data/posts/authors.json index b2265902e..c8a6d38da 100644 --- a/app/src/data/posts/authors.json +++ b/app/src/data/posts/authors.json @@ -169,5 +169,12 @@ "github": "https://github.com/juaristi22", "headshot": "maria-juaristi.jpeg", "title": "Data Scientist at PolicyEngine" + }, + "ziming-hua": { + "name": "Ziming Hua", + "email": "ziming@policyengine.org", + "bio": "Ziming is a policy researcher at PolicyEngine.", + "headshot": "ziming-hua.jpg", + "title": "Policy Researcher at PolicyEngine" } }