@capagents/forgeqe 2.9.3 → 2.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOW_TO_USE.md +78 -13
- package/README.md +1 -1
- package/dist/docs-site/docs/architecture/index.html +1 -1
- package/dist/docs-site/docs/index.html +66 -10
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/forgeqe.js +1679 -1640
- package/dist/web/assets/Agent-BU8FKiQt.js +7 -0
- package/dist/web/assets/ApiTests-Bsv3NhD5.js +10 -0
- package/dist/web/assets/Browse-D-ho9bS_.js +2 -0
- package/dist/web/assets/{Chat-BdlfK2ra.js → Chat-czaM5kUi.js} +3 -3
- package/dist/web/assets/CommandPalette-CrLuxoE5.js +1 -0
- package/dist/web/assets/{Compare-BxUfo0rI.js → Compare-DfHMTNGi.js} +1 -1
- package/dist/web/assets/Cost-BYb3T8-c.js +1 -0
- package/dist/web/assets/Data-EF_k6c_T.js +6 -0
- package/dist/web/assets/Desktop-DY5Q1Sd3.js +1 -0
- package/dist/web/assets/DesktopReview-DFKpYor2.js +1 -0
- package/dist/web/assets/Evidence-Db9H4-Nu.js +1 -0
- package/dist/web/assets/{Explore--B18Jvg9.js → Explore-B0EkFCFe.js} +2 -2
- package/dist/web/assets/{Features-BerYifH7.js → Features-8jsv2A1d.js} +1 -1
- package/dist/web/assets/{Flags-ABMq---p.js → Flags-DtzmOA5o.js} +2 -2
- package/dist/web/assets/{Flaky-DKeceXsa.js → Flaky-BCzOx7Mq.js} +1 -1
- package/dist/web/assets/{ForceGraph-C9HFjZX3.js → ForceGraph-i1zlas5l.js} +1 -1
- package/dist/web/assets/Impact-Da9L1tDd.js +3 -0
- package/dist/web/assets/Jobs-CHw00lcx.js +5 -0
- package/dist/web/assets/KindPage-DiOmtzVZ.js +6 -0
- package/dist/web/assets/Migration-Cu4JgOj1.js +2 -0
- package/dist/web/assets/{Product-CgVhHMMY.js → Product-DmvUI7pH.js} +3 -3
- package/dist/web/assets/{Production-OdB4gZ3T.js → Production-CLoOV4jl.js} +1 -1
- package/dist/web/assets/{Quality-DOV4suvD.js → Quality-ylTg9e0c.js} +1 -1
- package/dist/web/assets/{Readiness-DawfUUHc.js → Readiness-BMD5Uj8D.js} +1 -1
- package/dist/web/assets/{Record-C9uAKGYM.js → Record-CoCnmfqW.js} +2 -2
- package/dist/web/assets/Regression-D_Hy9bMt.js +5 -0
- package/dist/web/assets/{Reports-BHOS6af1.js → Reports-DXphAHAy.js} +2 -2
- package/dist/web/assets/{Response-qfMk4Nrh.js → Response-PDQ8zEZU.js} +2 -2
- package/dist/web/assets/{RunDiff-BNywFV7t.js → RunDiff-C3MIKipo.js} +1 -1
- package/dist/web/assets/{Runs-BJPYXRiB.js → Runs-DSQZwCpE.js} +2 -2
- package/dist/web/assets/Steps-CY6WROAr.js +2 -0
- package/dist/web/assets/{TestCases-DcYY2l9q.js → TestCases-BjgWdtPi.js} +1 -1
- package/dist/web/assets/TestData-CDziNp2d.js +2 -0
- package/dist/web/assets/TestDebt-D59zFYSu.js +1 -0
- package/dist/web/assets/Tosca-umw1O224.js +3 -0
- package/dist/web/assets/{WhatsNew-CIOTidx-.js → WhatsNew-DqNMAytd.js} +1 -1
- package/dist/web/assets/{dataParts-CUb0Q0IZ.js → dataParts-DGVc48Ed.js} +3 -3
- package/dist/web/assets/{families-C9MndVzT.js → families-DlfXDoO8.js} +1 -1
- package/dist/web/assets/{filters-Bk7ovF3M.js → filters-NVjc0d8i.js} +1 -1
- package/dist/web/assets/{fold-97yBCSav.js → fold-BKAl2p_2.js} +1 -1
- package/dist/web/assets/frame-B0nzdTfN.js +4 -0
- package/dist/web/assets/index-BLUj4Sgh.js +73 -0
- package/dist/web/assets/index-RzPHjTCW.css +2 -0
- package/dist/web/assets/{logos-CbNeXLAM.js → logos-J0WPxDqj.js} +1 -1
- package/dist/web/assets/{palette-Dg3RS-ff.js → palette-DViz4KwG.js} +1 -1
- package/dist/web/assets/{parts-CPAyV15O.js → parts-W2J4TR3o.js} +1 -1
- package/dist/web/assets/{productParts-BpXw1jMa.js → productParts-_8gKGn4o.js} +1 -1
- package/dist/web/assets/{qualityParts-8TPKphgl.js → qualityParts-DnbSeK-G.js} +1 -1
- package/dist/web/assets/{recordTest-DvnpHsd2.js → recordTest-etYNiLQy.js} +1 -1
- package/dist/web/assets/{rows-BdYJLCRD.js → rows-CbXelp5_.js} +1 -1
- package/dist/web/assets/{segmented-DlF5rvSR.js → segmented-B7n6eLrO.js} +1 -1
- package/dist/web/assets/{thread-DlyX7xQt.js → thread-BIUxcjeu.js} +1 -1
- package/dist/web/assets/{usePageChat-Dhu3upXA.js → usePageChat-DMOtRwzT.js} +1 -1
- package/dist/web/index.html +4 -4
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/user-guide.html +66 -10
- package/forgeqe.example.yaml +4 -1
- package/package.json +1 -1
- package/prompts/README.md +2 -0
- package/prompts/brain.md +9 -0
- package/prompts/business-persona.md +62 -0
- package/prompts/heal.md +2 -0
- package/prompts/page-differs.md +16 -0
- package/prompts/test-agent.md +4 -3
- package/prompts/test-rules.md +1 -10
- package/py/forgeqe_engine/copilot_gateway.py +31 -0
- package/py/forgeqe_engine/persona.py +28 -11
- package/py/forgeqe_engine/service.py +2 -0
- package/skills/bdd-gherkin/SKILL.md +141 -0
- package/skills/bdd-gherkin/references/cucumber-js.md +52 -0
- package/skills/bdd-gherkin/references/cucumber-jvm.md +54 -0
- package/skills/bdd-gherkin/references/python-bdd.md +50 -0
- package/skills/bdd-gherkin/references/reqnroll-specflow.md +83 -0
- package/skills/bdd-gherkin/references/review-checklist.md +37 -0
- package/skills/bdd-scenario-design/SKILL.md +50 -0
- package/skills/dynamics-365/SKILL.md +30 -15
- package/skills/dynamics-365-automation/SKILL.md +72 -0
- package/skills/dynamics-365-automation/references/elements.md +187 -0
- package/skills/dynamics-365-automation/references/recipes.md +97 -0
- package/dist/web/assets/Agent-B6xfobJ9.js +0 -4
- package/dist/web/assets/ApiTests-BwgezlYi.js +0 -10
- package/dist/web/assets/Browse-DDzk_KTh.js +0 -2
- package/dist/web/assets/CommandPalette-Cla7m818.js +0 -1
- package/dist/web/assets/Cost-Dpa8aWQG.js +0 -1
- package/dist/web/assets/Data-D_7m2GL6.js +0 -6
- package/dist/web/assets/Desktop-CgslBkAr.js +0 -1
- package/dist/web/assets/DesktopReview-CsW65QZz.js +0 -1
- package/dist/web/assets/Evidence-SYt-mbDx.js +0 -1
- package/dist/web/assets/Impact-DQ2c0dTT.js +0 -3
- package/dist/web/assets/Jobs-Dy_C2x36.js +0 -5
- package/dist/web/assets/KindPage-DQzstMyM.js +0 -6
- package/dist/web/assets/Migration-B4GWsCLR.js +0 -2
- package/dist/web/assets/Regression-DZdddPfI.js +0 -5
- package/dist/web/assets/Steps-Cdzyueit.js +0 -2
- package/dist/web/assets/TestData-CrzKA3xh.js +0 -2
- package/dist/web/assets/TestDebt-CVDJT511.js +0 -1
- package/dist/web/assets/Tosca-CBwGCrbL.js +0 -3
- package/dist/web/assets/frame-CqWJMIHh.js +0 -4
- package/dist/web/assets/index-ASvNRLI7.js +0 -73
- package/dist/web/assets/index-B5o9vY-v.css +0 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Features-8jsv2A1d.js","assets/line-icons-CQ-3V8ax.js","assets/filters-NVjc0d8i.js","assets/frame-B0nzdTfN.js","assets/WhatsNew-DqNMAytd.js","assets/Chat-czaM5kUi.js","assets/Response-PDQ8zEZU.js","assets/thread-BIUxcjeu.js","assets/rows-CbXelp5_.js","assets/recordTest-etYNiLQy.js","assets/Reports-DXphAHAy.js","assets/segmented-B7n6eLrO.js","assets/families-DlfXDoO8.js","assets/Agent-BU8FKiQt.js","assets/usePageChat-DMOtRwzT.js","assets/Data-EF_k6c_T.js","assets/dataParts-DGVc48Ed.js","assets/TestData-CDziNp2d.js","assets/Runs-DSQZwCpE.js","assets/Record-CoCnmfqW.js","assets/DesktopReview-DFKpYor2.js","assets/Desktop-DY5Q1Sd3.js","assets/Regression-D_Hy9bMt.js","assets/Impact-Da9L1tDd.js","assets/ForceGraph-i1zlas5l.js","assets/ApiTests-Bsv3NhD5.js","assets/Migration-Cu4JgOj1.js","assets/fold-BKAl2p_2.js","assets/logos-J0WPxDqj.js","assets/parts-W2J4TR3o.js","assets/Tosca-umw1O224.js","assets/Steps-CY6WROAr.js","assets/Compare-DfHMTNGi.js","assets/Quality-ylTg9e0c.js","assets/qualityParts-DnbSeK-G.js","assets/Flaky-BCzOx7Mq.js","assets/RunDiff-C3MIKipo.js","assets/TestDebt-D59zFYSu.js","assets/Flags-DtzmOA5o.js","assets/Production-CLoOV4jl.js","assets/Cost-BYb3T8-c.js","assets/Explore-B0EkFCFe.js","assets/Readiness-BMD5Uj8D.js","assets/TestCases-BjgWdtPi.js","assets/KindPage-DiOmtzVZ.js","assets/Jobs-CHw00lcx.js","assets/Product-DmvUI7pH.js","assets/productParts-_8gKGn4o.js","assets/Product-DLioOiRN.css","assets/Evidence-Db9H4-Nu.js","assets/Browse-D-ho9bS_.js","assets/palette-DViz4KwG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$n as e,$t as t,A as n,An as r,Ar as i,B as a,Bn as o,C as s,Ct as c,D as l,Dn as u,Dt as d,Et as f,Fn as p,Fr as m,Ft as h,G as g,Gn as _,H as v,Ht as y,Ir as b,It as x,J as S,Kt as C,L as w,Ln as T,Lt as E,Mn as D,Mt as O,Nn as k,Nr as A,O as j,On as M,Or as N,Pn as P,Pr as F,Pt as I,Q as L,Qt as ee,Rt as te,Sr as ne,St as re,T as R,Tn as ie,Tr as ae,U as oe,Un as se,Ut as ce,V as le,Vn as ue,W as de,Wn as fe,Xn as pe,Yn as me,Zn as he,Zt as ge,_ as _e,_n as ve,_r as ye,a as be,an as xe,bt as Se,c as Ce,ct as we,d as Te,dt as Ee,er as De,gr as Oe,gt as ke,ht as Ae,in as je,it as Me,j as Ne,jt as Pe,kn as Fe,kr as Ie,kt as Le,l as Re,lt as ze,mn as Be,mt as Ve,nr as He,o as Ue,on as We,ot as Ge,p as Ke,pn as qe,pr as Je,q as Ye,qn as Xe,r as Ze,rt as Qe,s as $e,tr as et,tt,un as nt,ur as rt,ut as it,v as at,vr as ot,wr as st,wt as ct,xt as lt,yn as ut,yr as dt,yt as ft,z as pt,zt as mt}from"./line-icons-CQ-3V8ax.js";import{$ as ht,B as z,Bt as gt,Dt as _t,Ft as vt,Gt as yt,H as bt,Ht as xt,It as St,J as Ct,Jt as wt,Lt as Tt,Pt as Et,R as B,St as Dt,U as Ot,V as kt,Vt as At,Y as jt,Z as Mt,_ as Nt,_t as Pt,a as V,at as Ft,c as It,d as Lt,f as H,ft as Rt,h as zt,ht as Bt,i as Vt,it as Ht,jt as Ut,l as Wt,m as Gt,mt as Kt,o as qt,p as Jt,qt as Yt,rt as Xt,s as Zt,t as Qt,u as $t,ut as en,wt as tn,yt as nn,z as rn,zt as an}from"./filters-NVjc0d8i.js";import{$ as on,A as sn,B as cn,C as ln,Ct as U,D as un,Dt as dn,E as fn,Et as pn,F as mn,G as W,H as hn,It as gn,J as _n,K as G,Kt as vn,M as yn,N as bn,Nt as xn,O as Sn,Ot as Cn,P as wn,Q as Tn,R as En,S as Dn,St as On,T as kn,Tt as An,U as jn,Ut as Mn,W as Nn,X as Pn,Y as Fn,Yt as In,Z as Ln,_t as Rn,at as zn,b as Bn,bt as K,c as Vn,ct as Hn,d as Un,et as Wn,g as Gn,gt as Kn,h as qn,i as Jn,in as Yn,j as Xn,k as Zn,kt as Qn,l as $n,lt as er,m as tr,n as nr,nn as rr,nt as ir,o as ar,on as or,p as sr,q as cr,r as lr,rn as ur,rt as dr,s as fr,st as pr,t as mr,tt as hr,u as gr,v as _r,vt as vr,w as yr,x as br,xt as xr,y as Sr,yt as Cr}from"./frame-B0nzdTfN.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var wr=F((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Tr=F(((e,t)=>{t.exports=wr()})),Er=F((e=>{var t=Tr(),n=A(),r=wt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],ee=-1;function te(e){return{current:e}}function ne(e){0>ee||(e.current=L[ee],L[ee]=null,ee--)}function re(e,t){ee++,L[ee]=e.current,e.current=t}var R=te(null),ie=te(null),ae=te(null),oe=te(null);function se(e,t){switch(re(ae,t),re(ie,e),re(R,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(R),re(R,e)}function ce(){ne(R),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&re(oe,e);var t=R.current,n=Ud(t,e.type);t!==n&&(re(ie,e),re(R,n))}function ue(e){ie.current===e&&(ne(R),ne(ie)),oe.current===e&&(ne(oe),$f._currentValue=I)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function nt(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[it])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function z(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function gt(e){e[dt]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),St={},Ct={};function Tt(e){return ve.call(Ct,e)?!0:ve.call(St,e)?!1:xt.test(e)?Ct[e]=!0:(St[e]=!0,!1)}function Et(e,t,n){if(Tt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function B(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Dt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Nt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Pt=/[\n"\\]/g;function V(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Ot(n)):Lt(e,o,Ot(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ot(s):e.removeAttribute(`name`)}function It(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),jt(e)}function Lt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function H(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ot(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Rt(e,t,n){t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Ot(n)}function zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Bt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Ht(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Vt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ut(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Ht(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ht(e,o,t[o])}function Wt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Gt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Kt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qt(e){return Kt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Jt(){}var Yt=null;function Xt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zt=null,Qt=null;function $t(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+V(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Ft(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Mt(r)}break a;case`textarea`:Rt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&H(e,!!n.multiple,t,!1)}}}var en=!1;function tn(e,t,n){if(en)return e(t,n);en=!0;try{return e(t)}finally{if(en=!1,(Zt!==null||Qt!==null)&&(vu(),Zt&&(t=Zt,e=Qt,Qt=Zt=null,$t(t),e)))for(t=0;t<e.length;t++)$t(e[t])}}function nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var rn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,an=!1;if(rn)try{var on={};Object.defineProperty(on,"passive",{get:function(){an=!0}}),window.addEventListener(`test`,on,on),window.removeEventListener(`test`,on,on)}catch{an=!1}var sn=null,cn=null,ln=null;function U(){if(ln)return ln;var e,t=cn,n=t.length,r,i=`value`in sn?sn.value:sn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return ln=i.slice(e,1<r?1-r:void 0)}function un(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dn(){return!0}function fn(){return!1}function pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?dn:fn,this.isPropagationStopped=fn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=dn)},persist:function(){},isPersistent:dn}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},W=pn(mn),hn=f({},mn,{view:0,detail:0}),gn=pn(hn),_n,G,vn,yn=f({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==vn&&(vn&&e.type===`mousemove`?(_n=e.screenX-vn.screenX,G=e.screenY-vn.screenY):G=_n=0,vn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:G}}),bn=pn(yn),xn=pn(f({},yn,{dataTransfer:0})),Sn=pn(f({},hn,{relatedTarget:0})),Cn=pn(f({},mn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=pn(f({},mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=pn(f({},mn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=pn(f({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=un(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?un(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?un(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=pn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=pn(f({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=pn(f({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=pn(f({},yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),In=pn(f({},mn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=rn&&`CompositionEvent`in window,zn=null;rn&&`documentMode`in document&&(zn=document.documentMode);var Bn=rn&&`TextEvent`in window&&!zn,K=rn&&(!Rn||zn&&8<zn&&11>=zn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Rn&&Un(e,t)?(e=U(),ln=cn=sn=null,Gn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return K&&t.locale!==`ko`?null:t.data;default:return null}}var Jn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Jn[e.type]:t===`textarea`}function Xn(e,t,n,r){Zt?Qt?Qt.push(r):Qt=[r]:Zt=r,t=Ed(t,`onChange`),0<t.length&&(n=new W(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function $n(e){vd(e,0)}function er(e){if(Mt(ht(e)))return e}function tr(e,t){if(e===`change`)return t}var nr=!1;if(rn){var rr;if(rn){var ir=`oninput`in document;if(!ir){var ar=document.createElement(`div`);ar.setAttribute(`oninput`,`return;`),ir=typeof ar.oninput==`function`}rr=ir}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function or(){Zn&&(Zn.detachEvent(`onpropertychange`,sr),Qn=Zn=null)}function sr(e){if(e.propertyName===`value`&&er(Qn)){var t=[];Xn(t,Qn,e,Xt(e)),tn($n,t)}}function cr(e,t,n){e===`focusin`?(or(),Zn=t,Qn=n,Zn.attachEvent(`onpropertychange`,sr)):e===`focusout`&&or()}function lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return er(Qn)}function ur(e,t){if(e===`click`)return er(t)}function dr(e,t){if(e===`input`||e===`change`)return er(t)}function fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var pr=typeof Object.is==`function`?Object.is:fr;function mr(e,t){if(pr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ve.call(t,i)||!pr(e[i],t[i]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(e,t){var n=hr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nt(e.document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var br=rn&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==Nt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=Ed(Sr,`onSelect`),0<r.length&&(t=new W(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var q={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},Or={},J={};rn&&(J=document.createElement(`div`).style,`AnimationEvent`in window||(delete q.animationend.animation,delete q.animationiteration.animation,delete q.animationstart.animation),`TransitionEvent`in window||delete q.transitionend.transition);function kr(e){if(Or[e])return Or[e];if(!q[e])return e;var t=q[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in J)return Or[e]=t[n];return e}var Ar=kr(`animationend`),jr=kr(`animationiteration`),Mr=kr(`animationstart`),Nr=kr(`transitionrun`),Pr=kr(`transitionstart`),Fr=kr(`transitioncancel`),Ir=kr(`transitionend`),Lr=new Map,Rr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Rr.push(`scrollEnd`);function zr(e,t){Lr.set(e,t),yt(t,[e])}var Br=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Vr=[],Hr=0,Ur=0;function Wr(){for(var e=Hr,t=Ur=Hr=0;t<e;){var n=Vr[t];Vr[t++]=null;var r=Vr[t];Vr[t++]=null;var i=Vr[t];Vr[t++]=null;var a=Vr[t];if(Vr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Jr(n,i,a)}}function Gr(e,t,n,r){Vr[Hr++]=e,Vr[Hr++]=t,Vr[Hr++]=n,Vr[Hr++]=r,Ur|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Kr(e,t,n,r){return Gr(e,t,n,r),Yr(e)}function qr(e,t){return Gr(e,null,null,t),Yr(e)}function Jr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Yr(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xr={};function Zr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(e,t,n,r){return new Zr(e,t,n,r)}function $r(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ei(e,t){var n=e.alternate;return n===null?(n=Qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ti(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ni(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)$r(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,R.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=Qr(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ri(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=Qr(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=Qr(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=Qr(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Qr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ri(e,t,n,r){return e=Qr(7,e,r,t),e.lanes=n,e}function ii(e,t,n){return e=Qr(6,e,null,t),e.lanes=n,e}function ai(e){var t=Qr(18,null,null,0);return t.stateNode=e,t}function oi(e,t,n){return t=Qr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var si=new WeakMap;function ci(e,t){if(typeof e==`object`&&e){var n=si.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},si.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var li=[],ui=0,di=null,fi=0,pi=[],mi=0,hi=null,gi=1,_i=``;function vi(e,t){li[ui++]=fi,li[ui++]=di,di=e,fi=t}function yi(e,t,n){pi[mi++]=gi,pi[mi++]=_i,pi[mi++]=hi,hi=e;var r=gi;e=_i;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gi=1<<32-Fe(t)+i|n<<i|r,_i=a+e}else gi=1<<a|n<<i|r,_i=e}function bi(e){e.return!==null&&(vi(e,1),yi(e,1,0))}function xi(e){for(;e===di;)di=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null;for(;e===hi;)hi=pi[--mi],pi[mi]=null,_i=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null}function Si(e,t){pi[mi++]=gi,pi[mi++]=_i,pi[mi++]=hi,gi=t.id,_i=t.overflow,hi=e}var Ci=null,wi=null,Ti=!1,Ei=null,Di=!1,Oi=Error(i(519));function ki(e){throw Fi(ci(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Oi}function Ai(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),zt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||ki(e,!0)}function ji(e){for(Ci=e.return;Ci;)switch(Ci.tag){case 5:case 31:case 13:Di=!1;return;case 27:case 3:Di=!0;return;default:Ci=Ci.return}}function Mi(e){if(e!==Ci)return!1;if(!Ti)return ji(e),Ti=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Wd(e.type,e.memoizedProps)),n=!n),n&&wi&&ki(e),ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));wi=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));wi=df(e)}else t===27?(t=wi,Qd(e.type)?(e=uf,uf=null,wi=e):wi=t):wi=Ci?lf(e.stateNode.nextSibling):null;return!0}function Ni(){wi=Ci=null,Ti=!1}function Pi(){var e=Ei;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ei=null),e}function Fi(e){Ei===null?Ei=[e]:Ei.push(e)}var Ii=te(null),Li=null,Ri=null;function zi(e,t,n){re(Ii,t._currentValue),t._currentValue=n}function Bi(e){e._currentValue=Ii.current,ne(Ii)}function Vi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Hi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Vi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Vi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ui(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;pr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&Hi(t,e,n,r),t.flags|=262144}function Wi(e){for(e=e.firstContext;e!==null;){if(!pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gi(e){Li=e,Ri=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ki(e){return Ji(Li,e)}function qi(e,t){return Li===null&&Gi(e),Ji(e,t)}function Ji(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ri===null){if(e===null)throw Error(i(308));Ri=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ri=Ri.next=t;return n}var Yi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Xi=t.unstable_scheduleCallback,Zi=t.unstable_NormalPriority,Qi={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $i(){return{controller:new Yi,data:new Map,refCount:0}}function ea(e){e.refCount--,e.refCount===0&&Xi(Zi,function(){e.controller.abort()})}var ta=null,na=0,ra=0,ia=null;function aa(e,t){if(ta===null){var n=ta=[];na=0,ra=ud(),ia={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return na++,t.then(oa,oa),t}function oa(){if(--na===0&&ta!==null){ia!==null&&(ia.status=`fulfilled`);var e=ta;ta=null,ra=0,ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ca=P.S;P.S=function(e,t){Ql=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&aa(e,t),ca!==null&&ca(e,t)};var la=te(null);function ua(){var e=la.current;return e===null?Pl.pooledCache:e}function da(e,t){t===null?re(la,la.current):re(la,t.pool)}function fa(){var e=ua();return e===null?null:{parent:Qi._currentValue,pool:e}}var pa=Error(i(460)),ma=Error(i(474)),ha=Error(i(542)),ga={then:function(){}};function _a(e){return e=e.status,e===`fulfilled`||e===`rejected`}function va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Jt,Jt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Sa(e),e;default:if(typeof t.status==`string`)t.then(Jt,Jt);else{if(e=Pl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Sa(e),e}throw ba=t,pa}}function ya(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ba=e,pa):e}}var ba=null;function xa(){if(ba===null)throw Error(i(459));var e=ba;return ba=null,e}function Sa(e){if(e===pa||e===ha)throw Error(i(483))}var Ca=null,wa=0;function Ta(e){var t=wa;return wa+=1,Ca===null&&(Ca=[]),va(Ca,e,t)}function Ea(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Da(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Oa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ei(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ii(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&ya(i)===t.type)?(t=a(t,n.props),Ea(t,n),t.return=e,t):(t=ni(n.type,n.key,n.props,null,e.mode,r),Ea(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ni(t.type,t.key,t.props,null,e.mode,n),Ea(n,t),n.return=e,n;case h:return t=oi(t,e.mode,n),t.return=e,t;case T:return t=ya(t),f(e,t,n)}if(N(t)||k(t))return t=ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ta(t),n);if(t.$$typeof===b)return f(e,qi(e,t),n);Da(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=ya(n),p(e,t,n,r)}if(N(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ta(n),r);if(n.$$typeof===b)return p(e,t,qi(e,n),r);Da(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=ya(r),_(e,t,n,r,i)}if(N(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ta(r),i);if(r.$$typeof===b)return _(e,t,n,qi(t,r),i);Da(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ti&&vi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Ti&&vi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Ti&&vi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ti&&vi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ti&&vi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ti&&vi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ea(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=ri(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ni(o.type,o.key,o.props,null,e.mode,c),Ea(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=oi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=ya(o),x(e,r,o,c)}if(N(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ta(o),c);if(o.$$typeof===b)return x(e,r,qi(e,o),c);Da(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{wa=0;var i=x(e,t,n,r);return Ca=null,i}catch(t){if(t===pa||t===ha)throw t;var a=Qr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ka=Oa(!0),Aa=Oa(!1),ja=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Na(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Yr(e),Jr(e,null,n),t}return Gr(e,r,t,n),Yr(e)}function Ia(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function La(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ra=!1;function za(){if(Ra){var e=ia;if(e!==null)throw e}}function Ba(e,t,n,r){Ra=!1;var i=e.updateQueue;ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Fl&p)===p:(r&p)===p){p!==0&&p===ra&&(Ra=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:ja=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Va(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ha(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Va(n[e],t)}var Ua=te(null),Wa=te(0);function Ga(e,t){e=Vl,re(Wa,e),re(Ua,t),Vl=e|t.baseLanes}function Ka(){re(Wa,Vl),re(Ua,Ua.current)}function qa(){Vl=Wa.current,ne(Ua),ne(Wa)}var Ja=te(null),Ya=null;function Xa(e){var t=e.alternate;re(to,to.current&1),re(Ja,e),Ya===null&&(t===null||Ua.current!==null||t.memoizedState!==null)&&(Ya=e)}function Za(e){re(to,to.current),re(Ja,e),Ya===null&&(Ya=e)}function Qa(e){e.tag===22?(re(to,to.current),re(Ja,e),Ya===null&&(Ya=e)):$a(e)}function $a(){re(to,to.current),re(Ja,Ja.current)}function eo(e){ne(Ja),Ya===e&&(Ya=null),ne(to)}var to=te(0);function no(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ro=0,Y=null,io=null,ao=null,oo=!1,so=!1,co=!1,lo=0,uo=0,fo=null,po=0;function mo(){throw Error(i(321))}function ho(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,a){return ro=a,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ns:Ps,co=!1,a=n(r,i),co=!1,so&&(a=vo(t,n,r,i)),_o(e),a}function _o(e){P.H=Ms;var t=io!==null&&io.next!==null;if(ro=0,ao=io=Y=null,oo=!1,uo=0,fo=null,t)throw Error(i(300));e===null||Zs||(e=e.dependencies,e!==null&&Wi(e)&&(Zs=!0))}function vo(e,t,n,r){Y=e;var a=0;do{if(so&&(fo=null),uo=0,so=!1,25<=a)throw Error(i(301));if(a+=1,ao=io=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Fs,o=t(n,r)}while(so);return o}function yo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Eo(t):t,e=e.useState()[0],(io===null?null:io.memoizedState)!==e&&(Y.flags|=1024),t}function bo(){var e=lo!==0;return lo=0,e}function xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function So(e){if(oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}oo=!1}ro=0,ao=io=Y=null,so=!1,uo=lo=0,fo=null}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ao===null?Y.memoizedState=ao=e:ao=ao.next=e,ao}function wo(){if(io===null){var e=Y.alternate;e=e===null?null:e.memoizedState}else e=io.next;var t=ao===null?Y.memoizedState:ao.next;if(t!==null)ao=t,io=e;else{if(e===null)throw Y.alternate===null?Error(i(467)):Error(i(310));io=e,e={memoizedState:io.memoizedState,baseState:io.baseState,baseQueue:io.baseQueue,queue:io.queue,next:null},ao===null?Y.memoizedState=ao=e:ao=ao.next=e}return ao}function To(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(e){var t=uo;return uo+=1,fo===null&&(fo=[]),e=va(fo,e,t),t=Y,(ao===null?t.memoizedState:ao.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ns:Ps),e}function Do(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Eo(e);if(e.$$typeof===b)return Ki(e)}throw Error(i(438,String(e)))}function Oo(e){var t=null,n=Y.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Y.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=To(),Y.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function ko(e,t){return typeof t==`function`?t(e):t}function Ao(e){return jo(wo(),io,e)}function jo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ro&f)===f:(Fl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ra&&(d=!0);else if((ro&p)===p){u=u.next,p===ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Y.lanes|=p,Ul|=p;f=u.action,co&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Y.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!pr(o,e.memoizedState)&&(Zs=!0,d&&(n=ia,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Mo(e){var t=wo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);pr(o,t.memoizedState)||(Zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function No(e,t,n){var r=Y,a=wo(),o=Ti;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!pr((io||a).memoizedState,n);if(s&&(a.memoizedState=n,Zs=!0),a=a.queue,is(Io.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ao!==null&&ao.memoizedState.tag&1){if(r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,a,n,t),null),Pl===null)throw Error(i(349));o||ro&127||Po(r,t,n)}return n}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t=To(),Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,r){t.value=n,t.getSnapshot=r,Lo(t)&&Ro(e)}function Io(e,t,n){return n(function(){Lo(t)&&Ro(e)})}function Lo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch{return!0}}function Ro(e){var t=qr(e,2);t!==null&&pu(t,e,2)}function zo(e){var t=Co();if(typeof e==`function`){var n=e;if(e=n(),co){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},t}function Bo(e,t,n,r){return e.baseState=n,jo(e,io,typeof r==`function`?r:ko)}function Vo(e,t,n,r,a){if(ks(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ho(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ho(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Uo(e,t,s)}catch(n){Go(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Uo(e,t,a)}catch(n){Go(e,t,n)}}function Uo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Wo(e,t,n)},function(n){return Go(e,t,n)}):Wo(e,t,n)}function Wo(e,t,n){t.status=`fulfilled`,t.value=n,Ko(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ho(e,n)))}function Go(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ko(t),t=t.next;while(t!==r)}e.action=null}function Ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qo(e,t){return t}function Jo(e,t){if(Ti){var n=Pl.formState;if(n!==null){a:{var r=Y;if(Ti){if(wi){b:{for(var i=wi,a=Di;i.nodeType!==8;)if(!a||(i=lf(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){wi=lf(i.nextSibling),r=i.data===`F!`;break a}}ki(r)}r=!1}r&&(t=n[0])}}return n=Co(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:t},n.queue=r,n=Es.bind(null,Y,r),r.dispatch=n,r=zo(!1),a=Os.bind(null,Y,!1,r.queue),r=Co(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Vo.bind(null,Y,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Yo(e){return Xo(wo(),io,e)}function Xo(e,t,n){if(t=jo(e,t,qo)[0],e=Ao(ko)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Eo(t)}catch(e){throw e===pa?ha:e}else r=t;t=wo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Y.flags|=2048,$o(9,{destroy:void 0},Zo.bind(null,i,n),null)),[r,a,e]}function Zo(e,t){e.action=t}function Qo(e){var t=wo(),n=io;if(n!==null)return Xo(t,n,e);wo(),t=t.memoizedState,n=wo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function $o(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Y.updateQueue,t===null&&(t=To(),Y.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function es(){return wo().memoizedState}function ts(e,t,n,r){var i=Co();Y.flags|=e,i.memoizedState=$o(1|t,{destroy:void 0},n,r===void 0?null:r)}function ns(e,t,n,r){var i=wo();r=r===void 0?null:r;var a=i.memoizedState.inst;io!==null&&r!==null&&ho(r,io.memoizedState.deps)?i.memoizedState=$o(t,a,n,r):(Y.flags|=e,i.memoizedState=$o(1|t,a,n,r))}function rs(e,t){ts(8390656,8,e,t)}function is(e,t){ns(2048,8,e,t)}function as(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=To(),Y.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function os(e){var t=wo().memoizedState;return as({ref:t,nextImpl:e}),function(){if(Nl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ss(e,t){return ns(4,2,e,t)}function cs(e,t){return ns(4,4,e,t)}function ls(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function us(e,t,n){n=n==null?null:n.concat([e]),ns(4,4,ls.bind(null,t,e),n)}function ds(){}function fs(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ho(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ps(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ho(t,r[1]))return r[0];if(r=e(),co){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function ms(e,t,n){return n===void 0||ro&1073741824&&!(Fl&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),Y.lanes|=e,Ul|=e,n)}function hs(e,t,n,r){return pr(n,t)?n:Ua.current===null?!(ro&42)||ro&1073741824&&!(Fl&261930)?(Zs=!0,e.memoizedState=n):(e=fu(),Y.lanes|=e,Ul|=e,t):(e=ms(e,n,r),pr(e,t)||(Zs=!0),e)}function gs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Os(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,sa(c,r),du(e)):Ds(e,t,r,du(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,I,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},du())}function xs(){return Ki($f)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Pa(n);var r=Fa(t,e,n);r!==null&&(pu(r,t,n),Ia(r,t,n)),t={cache:$i()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=Kr(e,t,n,r),n!==null&&(pu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,du())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Gr(e,t,i,0),Pl===null&&Wr(),!1}catch{}if(n=Kr(e,t,i,r),n!==null)return pu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=Kr(e,n,r,2),t!==null&&pu(t,e,2)}function ks(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Ms={readContext:Ki,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:Ki,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,Y,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,Y,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Y,a=Co();if(Ti){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Pl===null)throw Error(i(349));Fl&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Pl.identifierPrefix;if(Ti){var n=_i,r=gi;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=po++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:xs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e){var t=Co();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Os.bind(null,Y,!0,n),n.dispatch=t,[e,t]},useMemoCache:Oo,useCacheRefresh:function(){return Co().memoizedState=ws.bind(null,Y)},useEffectEvent:function(e){var t=Co(),n={impl:e};return t.memoizedState=n,function(){if(Nl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Ki,use:Do,useCallback:fs,useContext:Ki,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Ao,useRef:es,useState:function(){return Ao(ko)},useDebugValue:ds,useDeferredValue:function(e,t){return hs(wo(),io.memoizedState,e,t)},useTransition:function(){var e=Ao(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){return Bo(wo(),io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Ps.useEffectEvent=os;var Fs={readContext:Ki,use:Do,useCallback:fs,useContext:Ki,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Mo,useRef:es,useState:function(){return Mo(ko)},useDebugValue:ds,useDeferredValue:function(e,t){var n=wo();return io===null?ms(n,e,t):hs(n,io.memoizedState,e,t)},useTransition:function(){var e=Mo(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){var n=wo();return io===null?(n.baseState=e,[e,n.queue.dispatch]):Bo(n,io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Fs.useEffectEvent=os;function Is(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ls={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Pa(r);i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Pa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Pa(n);r.tag=2,t!=null&&(r.callback=t),t=Fa(e,r,n),t!==null&&(pu(t,e,n),Ia(t,e,n))}};function Rs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!mr(n,r)||!mr(i,a):!0}function zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ls.enqueueReplaceState(t,t.state,null)}function Bs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Vs(e){Br(e)}function Hs(e){console.error(e)}function Us(e){Br(e)}function Ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){return n=Pa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ws(e,t)},n}function qs(e){return e=Pa(e),e.tag=3,e}function Js(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Gs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Gs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ys(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ui(t,n,a,!0),n=Ja.current,n!==null){switch(n.tag){case 31:case 13:return Ya===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ga?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ga?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(Ti)return t=Ja.current,t===null?(r!==Oi&&(t=Error(i(423),{cause:r}),Fi(ci(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ci(r,n),a=Ks(e.stateNode,r,a),La(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Oi&&(e=Error(i(422),{cause:r}),Fi(ci(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ci(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=ci(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ks(n.stateNode,r,e),La(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=qs(a),Js(a,e,n,r),La(n,a),!1}n=n.return}while(n!==null);return!1}var Xs=Error(i(461)),Zs=!1;function Qs(e,t,n,r){t.child=e===null?Aa(t,null,n,r):ka(t,e.child,n,r)}function $s(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Gi(t),r=go(e,t,n,o,a,i),s=bo(),e!==null&&!Zs?(xo(e,t,i),xc(e,t,i)):(Ti&&s&&bi(t),t.flags|=1,Qs(e,t,r,i),t.child)}function ec(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!$r(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,tc(e,t,a,r,i)):(e=ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?mr:n,n(o,r)&&e.ref===t.ref)return xc(e,t,i)}return t.flags|=1,e=ei(a,r),e.ref=t.ref,e.return=t,t.child=e}function tc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(mr(a,r)&&e.ref===t.ref){if(Zs=!1,t.pendingProps=r=a,Sc(e,i))e.flags&131072&&(Zs=!0);else return t.lanes=e.lanes,xc(e,t,i)}}return sc(e,t,n,r,i)}function nc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&da(t,a===null?null:a.cachePool),a===null?Ka():Ga(t,a),Qa(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&da(t,null),Ka(),$a(t)):(da(t,a.cachePool),Ga(t,a),$a(t),t.memoizedState=null);return Qs(e,t,i,n),t.child}function X(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rc(e,t,n,r,i){var a=ua();return a=a===null?null:{parent:Qi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&da(t,null),Ka(),Qa(t),e!==null&&Ui(e,t,r,!0),t.childLanes=i,null}function Z(e,t){return t=gc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ic(e,t,n){return ka(t,e.child,null,n),e=Z(t,t.pendingProps),e.flags|=2,eo(t),t.memoizedState=null,e}function ac(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ti){if(r.mode===`hidden`)return e=Z(t,r),t.lanes=536870912,X(null,e);if(Za(t),(e=wi)?(e=af(e,Di),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi===null?null:{id:gi,overflow:_i},retryLane:536870912,hydrationErrors:null},n=ai(e),n.return=t,t.child=n,Ci=t,wi=null)):e=null,e===null)throw ki(t);return t.lanes=536870912,null}return Z(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Za(t),a){if(t.flags&256)t.flags&=-257,t=ic(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Zs||Ui(e,t,n,!1),a=(n&e.childLanes)!==0,Zs||a){if(r=Pl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,qr(e,s),pu(r,e,s),Xs;Tu(),t=ic(e,t,n)}else e=o.treeContext,wi=lf(s.nextSibling),Ci=t,Ti=!0,Ei=null,Di=!1,e!==null&&Si(t,e),t=Z(t,r),t.flags|=4096;return t}return e=ei(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function sc(e,t,n,r,i){return Gi(t),n=go(e,t,n,r,void 0,i),r=bo(),e!==null&&!Zs?(xo(e,t,i),xc(e,t,i)):(Ti&&r&&bi(t),t.flags|=1,Qs(e,t,n,i),t.child)}function cc(e,t,n,r,i,a){return Gi(t),t.updateQueue=null,n=vo(t,r,n,i),_o(e),r=bo(),e!==null&&!Zs?(xo(e,t,a),xc(e,t,a)):(Ti&&r&&bi(t),t.flags|=1,Qs(e,t,n,a),t.child)}function lc(e,t,n,r,i){if(Gi(t),t.stateNode===null){var a=Xr,o=n.contextType;typeof o==`object`&&o&&(a=Ki(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ls,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ma(t),o=n.contextType,a.context=typeof o==`object`&&o?Ki(o):Xr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Is(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ls.enqueueReplaceState(a,a.state,null),Ba(t,r,a,i),za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Bs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Xr,typeof u==`object`&&u&&(o=Ki(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&zs(t,a,r,o),ja=!1;var f=t.memoizedState;a.state=f,Ba(t,r,a,i),za(),l=t.memoizedState,s||f!==l||ja?(typeof d==`function`&&(Is(t,n,d,r),l=t.memoizedState),(c=ja||Rs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Na(e,t),o=t.memoizedProps,u=Bs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Xr,typeof l==`object`&&l&&(c=Ki(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&zs(t,a,r,c),ja=!1,f=t.memoizedState,a.state=f,Ba(t,r,a,i),za();var p=t.memoizedState;o!==d||f!==p||ja||e!==null&&e.dependencies!==null&&Wi(e.dependencies)?(typeof s==`function`&&(Is(t,n,s,r),p=t.memoizedState),(u=ja||Rs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Wi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,oc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ka(t,e.child,null,i),t.child=ka(t,null,n,i)):Qs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=xc(e,t,i),e}function uc(e,t,n,r){return Ni(),t.flags|=256,Qs(e,t,n,r),t.child}var dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:fa()}}function pc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function mc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(to.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Ti){if(a?Xa(t):$a(t),(e=wi)?(e=af(e,Di),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi===null?null:{id:gi,overflow:_i},retryLane:536870912,hydrationErrors:null},n=ai(e),n.return=t,t.child=n,Ci=t,wi=null)):e=null,e===null)throw ki(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?($a(t),a=t.mode,c=gc({mode:`hidden`,children:c},a),r=ri(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,X(null,r)):(Xa(t),hc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=_c(e,t,n)):t.memoizedState===null?($a(t),c=r.fallback,a=t.mode,r=gc({mode:`visible`,children:r.children},a),c=ri(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ka(t,e.child,null,n),r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,t=X(null,r)):($a(t),t.child=e.child,t.flags|=128,t=null);else if(Xa(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Fi({value:r,source:null,stack:null}),t=_c(e,t,n)}else if(Zs||Ui(e,t,n,!1),s=(n&e.childLanes)!==0,Zs||s){if(s=Pl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,qr(e,r),pu(s,e,r),Xs;of(c)||Tu(),t=_c(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,wi=lf(c.nextSibling),Ci=t,Ti=!0,Ei=null,Di=!1,e!==null&&Si(t,e),t=hc(t,r.children),t.flags|=4096);return t}return a?($a(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ei(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ri(c,a,n,null),c.flags|=2):c=ei(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,X(null,r),r=t.child,c=e.child.memoizedState,c===null?c=fc(n):(a=c.cachePool,a===null?a=fa():(l=Qi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=pc(e,s,n),t.memoizedState=dc,X(e.child,r)):(Xa(t),n=e.child,e=n.sibling,n=ei(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function hc(e,t){return t=gc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function gc(e,t){return e=Qr(22,e,null,t),e.lanes=0,e}function _c(e,t,n){return ka(t,e.child,null,n),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Vi(e.return,t,n)}function yc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function bc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=to.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,re(to,o),Qs(e,t,r,n),r=Ti?fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vc(e,n,t);else if(e.tag===19)vc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&no(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),yc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&no(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}yc(t,!0,n,null,a,r);break;case`together`:yc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ui(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ei(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ei(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Wi(e)))}function Cc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),zi(t,Qi,e.memoizedState.cache),Ni();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Za(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Xa(t),e=xc(e,t,n),e===null?null:e.sibling):mc(e,t,n):(Xa(t),t.flags|=128,null);Xa(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Ui(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return bc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),re(to,to.current),r)break;return null;case 22:return t.lanes=0,nc(e,t,n,t.pendingProps);case 24:zi(t,Qi,e.memoizedState.cache)}return xc(e,t,n)}function wc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Zs=!0;else{if(!Sc(e,n)&&!(t.flags&128))return Zs=!1,Cc(e,t,n);Zs=!!(e.flags&131072)}}else Zs=!1,Ti&&t.flags&1048576&&yi(t,fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ya(t.elementType),t.type=e,typeof e==`function`)$r(e)?(r=Bs(e,r),t.tag=1,t=lc(null,t,e,r,n)):(t.tag=0,t=sc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=$s(null,t,e,r,n);break a}if(a===w){t.tag=14,t=ec(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Bs(r,t.pendingProps),lc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Na(e,t),Ba(t,r,null,n);var s=t.memoizedState;if(r=s.cache,zi(t,Qi,r),r!==o.cache&&Hi(t,[Qi],n,!0),za(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=uc(e,t,r,n);break a}if(r!==a){a=ci(Error(i(424)),t),Fi(a),t=uc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(wi=lf(e.firstChild),Ci=t,Ti=!0,Ei=null,Di=!0,n=Aa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ni(),r===a){t=xc(e,t,n);break a}Qs(e,t,r,n)}t=t.child}return t;case 26:return oc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ti||(n=t.type,e=t.pendingProps,r=Vd(ae.current).createElement(n),r[it]=t,r[at]=e,Fd(r,n,e),gt(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Ti&&(r=t.stateNode=pf(t.type,t.pendingProps,ae.current),Ci=t,Di=!0,a=wi,Qd(t.type)?(uf=a,wi=lf(r.firstChild)):wi=a),Qs(e,t,t.pendingProps.children,n),oc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ti&&((a=r=wi)&&(r=nf(r,t.type,t.pendingProps,Di),r===null?a=!1:(t.stateNode=r,Ci=t,wi=lf(r.firstChild),Di=!1,a=!0)),a||ki(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=go(e,t,yo,null,null,n),$f._currentValue=a),oc(e,t),Qs(e,t,r,n),t.child;case 6:return e===null&&Ti&&((e=n=wi)&&(n=rf(n,t.pendingProps,Di),n===null?e=!1:(t.stateNode=n,Ci=t,wi=null,e=!0)),e||ki(t)),null;case 13:return mc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ka(t,null,r,n):Qs(e,t,r,n),t.child;case 11:return $s(e,t,t.type,t.pendingProps,n);case 7:return Qs(e,t,t.pendingProps,n),t.child;case 8:return Qs(e,t,t.pendingProps.children,n),t.child;case 12:return Qs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,zi(t,t.type,r.value),Qs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Gi(t),a=Ki(a),r=r(a),t.flags|=1,Qs(e,t,r,n),t.child;case 14:return ec(e,t,t.type,t.pendingProps,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 19:return bc(e,t,n);case 31:return ac(e,t,n);case 22:return nc(e,t,n,t.pendingProps);case 24:return Gi(t),r=Ki(Qi),e===null?(a=ua(),a===null&&(a=Pl,o=$i(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ma(t),zi(t,Qi,a)):((e.lanes&n)!==0&&(Na(e,t),Ba(t,null,null,n),za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,zi(t,Qi,r),r!==a.cache&&Hi(t,[Qi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),zi(t,Qi,r))),Qs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Tc(e){e.flags|=4}function Ec(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw ba=ga,ma}}else e.flags&=-16777217}function Dc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t)){if(Su())e.flags|=8192;else throw ba=ga,ma}}function Oc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,ql|=t)}function kc(e,t){if(!Ti)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ac(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jc(e,t,n){var r=t.pendingProps;switch(xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ac(t),null;case 1:return Ac(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Bi(Qi),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Mi(t)?Tc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pi())),Ac(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Tc(t),o===null?(Ac(t),Ec(t,a,null,r,n)):(Ac(t),Dc(t,o))):o?o===e.memoizedState?(Ac(t),t.flags&=-16777217):(Tc(t),Ac(t),Dc(t,o)):(e=e.memoizedProps,e!==r&&Tc(t),Ac(t),Ec(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ac(t),null}e=R.current,Mi(t)?Ai(t,e):(e=pf(a,r,n),t.stateNode=e,Tc(t))}return Ac(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ac(t),null}if(o=R.current,Mi(t))Ai(t,o);else{var s=Vd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Tc(t)}}return Ac(t),Ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Mi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ci,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||ki(t,!0)}else e=Vd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Ac(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Mi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),e=!1}else n=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(eo(t),t):(eo(t),null);if(t.flags&128)throw Error(i(558))}return Ac(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),a=!1}else a=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(eo(t),t):(eo(t),null)}return eo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Oc(t,t.updateQueue),Ac(t),null);case 4:return ce(),e===null&&Sd(t.stateNode.containerInfo),Ac(t),null;case 10:return Bi(t.type),Ac(t),null;case 19:if(ne(to),r=t.memoizedState,r===null)return Ac(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)kc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=no(e),o!==null){for(t.flags|=128,kc(r,!1),e=o.updateQueue,t.updateQueue=e,Oc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ti(n,e),n=n.sibling;return re(to,to.current&1|2),Ti&&vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>$l&&(t.flags|=128,a=!0,kc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=no(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Oc(t,e),kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ti)return Ac(t),null}else 2*Ce()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,kc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ac(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=to.current,re(to,a?n&1|2:n&1),Ti&&vi(t,r.treeForkCount),e);case 22:case 23:return eo(t),qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ac(t),t.subtreeFlags&6&&(t.flags|=8192)):Ac(t),n=t.updateQueue,n!==null&&Oc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(la),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Bi(Qi),Ac(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Mc(e,t){switch(xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bi(Qi),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(eo(t),t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(eo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(to),null;case 4:return ce(),null;case 10:return Bi(t.type),null;case 22:case 23:return eo(t),qa(),e!==null&&ne(la),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Bi(Qi),null;case 25:return null;default:return null}}function Nc(e,t){switch(xi(t),t.tag){case 3:Bi(Qi),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&eo(t);break;case 13:eo(t);break;case 19:ne(to);break;case 10:Bi(t.type);break;case 22:case 23:eo(t),qa(),e!==null&&ne(la);break;case 24:Bi(Qi)}}function Pc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Fc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Ic(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ha(t,n)}catch(t){Uu(e,e.return,t)}}}function Lc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Rc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}}function Bc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Vc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[at]=t}catch(t){Uu(e,e.return,t)}}function Hc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Uc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Hc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[it]=e,t[at]=n}catch(t){Uu(e,e.return,t)}}var qc=!1,Jc=!1,Yc=!1,Xc=typeof WeakSet==`function`?WeakSet:Set,Zc=null;function Qc(e,t){if(e=e.containerInfo,zd=cp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,Zc=t;Zc!==null;)if(t=Zc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Zc=e;else for(;Zc!==null;){switch(t=Zc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Bs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Zc=e;break}Zc=t.return}}function $c(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ml(e,n),r&4&&Pc(5,n);break;case 1:if(ml(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Bs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}}r&64&&Ic(n),r&512&&Rc(n,n.return);break;case 3:if(ml(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ha(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Kc(n);case 26:case 5:ml(e,n),t===null&&r&4&&Bc(n),r&512&&Rc(n,n.return);break;case 12:ml(e,n);break;case 31:ml(e,n),r&4&&al(e,n);break;case 13:ml(e,n),r&4&&ol(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||qc,!r){t=t!==null&&t.memoizedState!==null||Jc,i=qc;var a=Jc;qc=r,(Jc=t)&&!a?gl(e,n,!!(n.subtreeFlags&8772)):ml(e,n),qc=i,Jc=a}break;case 30:break;default:ml(e,n)}}function el(e){var t=e.alternate;t!==null&&(e.alternate=null,el(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;n!==null;)il(e,t,n),n=n.sibling}function il(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:Jc||zc(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Jc||zc(n,t);var r=tl,i=nl;Qd(n.type)&&(tl=n.stateNode,nl=!1),rl(e,t,n),mf(n.stateNode),tl=r,nl=i;break;case 5:Jc||zc(n,t);case 6:if(r=tl,i=nl,tl=null,rl(e,t,n),tl=r,nl=i,tl!==null){if(nl)try{(tl.nodeType===9?tl.body:tl.nodeName===`HTML`?tl.ownerDocument.body:tl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{tl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}}break;case 18:tl!==null&&(nl?(e=tl,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(tl,n.stateNode));break;case 4:r=tl,i=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=i;break;case 0:case 11:case 14:case 15:Fc(2,n,t),Jc||Fc(4,n,t),rl(e,t,n);break;case 1:Jc||(zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Lc(n,t,r)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:Jc=(r=Jc)||n.memoizedState!==null,rl(e,t,n),Jc=r;break;default:rl(e,t,n)}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){Uu(t,t.return,e)}}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){Uu(t,t.return,e)}}function sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xc),t;default:throw Error(i(435,e.tag))}}function cl(e,t){var n=sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ll(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){tl=c.stateNode,nl=!1;break a}break;case 5:tl=c.stateNode,nl=!1;break a;case 3:case 4:tl=c.stateNode.containerInfo,nl=!0;break a}c=c.return}if(tl===null)throw Error(i(160));il(o,s,a),tl=null,nl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dl(t,e),t=t.sibling}var ul=null;function dl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ll(t,e),fl(e),r&4&&(Fc(3,e,e.return),Pc(3,e),Fc(5,e,e.return));break;case 1:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&64&&qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ul;if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[it]=e,gt(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,gt(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode)}else e.stateNode=Lf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),n!==null&&r&4&&Vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),e.flags&32){a=e.stateNode;try{Bt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Vc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Yc=!0);break;case 6:if(ll(t,e),fl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Vf=null,a=ul,ul=_f(t.containerInfo),ll(t,e),ul=a,fl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){Uu(e,e.return,t)}Yc&&(Yc=!1,pl(e));break;case 4:r=ul,ul=_f(e.stateNode.containerInfo),ll(t,e),fl(e),ul=r;break;case 12:ll(t,e),fl(e);break;case 31:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 13:ll(t,e),fl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=qc,d=Jc;if(qc=u||a,Jc=d||l,ll(t,e),Jc=d,qc=u,fl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||qc||Jc||hl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,cl(e,n))));break;case 19:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 30:break;case 21:break;default:ll(t,e),fl(e)}}function fl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Hc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Gc(e,Uc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Bt(o,``),n.flags&=-33),Gc(e,Uc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Wc(e,Uc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ml(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$c(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fc(4,t,t.return),hl(t);break;case 1:zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Lc(t,t.return,n),hl(t);break;case 27:mf(t.stateNode);case 26:case 5:zc(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function gl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:gl(i,a,n),Pc(4,a);break;case 1:if(gl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Va(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Ic(a),Rc(a,a.return);break;case 27:Kc(a);case 26:case 5:gl(i,a,n),n&&r===null&&o&4&&Bc(a),Rc(a,a.return);break;case 12:gl(i,a,n);break;case 31:gl(i,a,n),n&&o&4&&al(i,a);break;case 13:gl(i,a,n),n&&o&4&&ol(i,a);break;case 22:a.memoizedState===null&&gl(i,a,n),Rc(a,a.return);break;case 30:break;default:gl(i,a,n)}t=t.sibling}}function _l(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ea(n))}function vl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ea(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Pc(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ea(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&_l(o,t);break;case 24:yl(e,t,n,r),i&2048&&vl(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Pc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&_l(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&vl(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Sl(n,r),i&2048&&_l(r.alternate,r);break;case 24:Sl(n,r),i&2048&&vl(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)Tl(e,t,n),e=e.sibling}function Tl(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&Kf(n,ul,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=ul;ul=_f(e.stateNode.containerInfo),wl(e,t,n),ul=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function El(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,Al(r,e)}El(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ol(e),e=e.sibling}function Ol(e){switch(e.tag){case 0:case 11:case 15:Dl(e),e.flags&2048&&Fc(9,e,e.return);break;case 3:Dl(e);break;case 12:Dl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kl(e)):Dl(e);break;default:Dl(e)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,Al(r,e)}El(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fc(8,t,t.return),kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kl(t));break;default:kl(t)}e=e.sibling}}function Al(e,t){for(;Zc!==null;){var n=Zc;switch(n.tag){case 0:case 11:case 15:Fc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ea(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Zc=r;else a:for(n=e;Zc!==null;){r=Zc;var i=r.sibling,a=r.return;if(el(r),r===n){Zc=null;break a}if(i!==null){i.return=a,Zc=i;break a}Zc=a}}}var jl={getCacheForType:function(e){var t=Ki(Qi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ki(Qi).controller.signal}},Ml=typeof WeakMap==`function`?WeakMap:Map,Nl=0,Pl=null,Q=null,Fl=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Nl&2&&Fl!==0?Fl&-Fl:P.T===null?tt():ud()}function fu(){if(Kl===0){if(!(Fl&536870912)||Ti){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),Kl=e}else Kl=536870912}return e=Ja.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Pl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Fl,Kl,!1)),Je(e,n),Nl&2&&e===Pl||(e===Pl&&(!(Nl&2)&&(Wl|=n),Hl===4&&_u(e,Fl,Kl,!1)),nd(e))}function mu(e,t,n){if(Nl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||We(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}if(n=e.current.alternate,o&&!gu(n))a=Eu(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Ce(),10<a)){if(_u(r,t,Kl,!Rl),Ue(r,0,!0)!==0)break a;au=t,r.timeoutHandle=qd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}break}}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},Tl(t,a,d);var m=(a&62914560)===a?Zl-Ce():(a&4194048)===a?Ql-Ce():0;if(m=Jf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!pr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function vu(){return Nl&6?!0:(rd(0,!1),!1)}function yu(){if(Q!==null){if(Il===0)var e=Q.return;else e=Q,Ri=Li=null,So(e),Ca=null,wa=0,e=Q;for(;e!==null;)Nc(e.alternate,e),e=e.return;Q=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Pl=e,Q=n=ei(e.current,null),Fl=t,Il=0,Ll=null,Rl=!1,zl=We(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Wr(),n}function xu(e,t){Y=null,P.H=Ms,t===pa||t===ha?(t=xa(),Il=3):t===ma?(t=xa(),Il=4):Il=t===Xs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Q===null&&(Hl=1,Ws(e,ci(t,e.current)))}function Su(){var e=Ja.current;return e===null?!0:(Fl&4194048)===Fl?Ya===null:(Fl&62914560)===Fl||Fl&536870912?e===Ya:!1}function Cu(){var e=P.H;return P.H=Ms,e===null?Ms:e}function wu(){var e=P.A;return P.A=jl,e}function Tu(){Hl=4,Rl||(Fl&4194048)!==Fl&&Ja.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Pl===null||_u(Pl,Fl,Kl,!1)}function Eu(e,t,n){var r=Nl;Nl|=2;var i=Cu(),a=wu();(Pl!==e||Fl!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Q!==null){var s=Q,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Ja.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ri=Li=null,Nl=r,P.H=i,P.A=a,Q===null&&(Pl=null,Fl=0,Wr()),o}function Du(){for(;Q!==null;)Au(Q)}function Ou(e,t){var n=Nl;Nl|=2;var r=Cu(),a=wu();Pl!==e||Fl!==t?(eu=null,$l=Ce()+500,bu(e,t)):zl=We(e,t);a:do try{if(Il!==0&&Q!==null){t=Q;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(_a(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Pl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:_a(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Q.tag){case 26:s=Q.memoizedState;case 5:case 27:var c=Q;if(s?Gf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Q=l;else{var u=c.return;u===null?Q=null:(Q=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Ri=Li=null,P.H=r,P.A=a,Nl=n,Q===null?(Pl=null,Fl=0,Wr(),Hl):0}function ku(){for(;Q!==null&&!xe();)Au(Q)}function Au(e){var t=wc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Q=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=cc(n,t,t.pendingProps,t.type,void 0,Fl);break;case 11:t=cc(n,t,t.pendingProps,t.type.render,t.ref,Fl);break;case 5:So(t);default:Nc(n,t),t=Q=ti(t,Vl),t=wc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Q=t}function Mu(e,t,n,r){Ri=Li=null,So(t),Ca=null,wa=0;var i=t.return;try{if(Ys(e,i,t,n,Fl)){Hl=1,Ws(e,ci(n,e.current)),Q=null;return}}catch(t){if(i!==null)throw Q=i,t;Hl=1,Ws(e,ci(n,e.current)),Q=null;return}t.flags&32768?(Ti||r===1?e=!0:zl||Fl&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ja.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=jc(t.alternate,t,Vl);if(n!==null){Q=n;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Mc(e.alternate,e);if(n!==null){n.flags&=32767,Q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Q=e;return}Q=e=n}while(e!==null);Hl=6,Q=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Nl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Ur,Ye(e,n,o,s,c,l),e===Pl&&(Q=Pl=null,Fl=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(De,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Nl,Nl|=4;try{Qc(e,t,n)}finally{Nl=s,F.p=a,P.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Nl;Nl|=4;try{dl(t,e);var a=Bd,o=vr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&_r(s.ownerDocument.documentElement,s)){if(c!==null&&yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!zd,Bd=zd=null}finally{Nl=i,F.p=r,P.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Nl;Nl|=4;try{$c(e,t.alternate,t)}finally{Nl=i,F.p=r,P.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Se();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ea(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=et(au),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Nl&6)throw Error(i(331));var c=Nl;if(Nl|=4,Ol(o.current),bl(o,o.current,s,n),Nl=c,rd(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{F.p=a,P.T=r,zu(e,t)}}function Hu(e,t,n){t=ci(n,t),t=Ks(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(Je(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=ci(n,e),n=qs(2),r=Fa(t,n,2),r!==null&&(Js(n,r,t,e),Je(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ml;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pl===e&&(Fl&n)===n&&(Hl===4||Hl===3&&(Fl&62914560)===Fl&&300>Ce()-Zl?!(Nl&2)&&bu(e,0):Gl|=n,ql===Fl&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ke()),e=qr(e,t),e!==null&&(Je(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return ye(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Fl,a=Ue(r,r===Pl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,cd(r,a))}r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=Ce(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Pl,n=Fl,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=sd.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Fl;return r=Ue(e,e===Pl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Xd(function(){Nl&6?ye(Te,id):ad()})}function ud(){if(td===0){var e=ra;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:qt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new W(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Rr.length;md++){var hd=Rr[md];zr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}zr(Ar,`onAnimationEnd`),zr(jr,`onAnimationIteration`),zr(Mr,`onAnimationStart`),zr(`dblclick`,`onDoubleClick`),zr(`focusin`,`onFocus`),zr(`focusout`,`onBlur`),zr(Nr,`onTransitionRun`),zr(Pr,`onTransitionStart`),zr(Fr,`onTransitionCancel`),zr(Ir,`onTransitionEnd`),bt(`onMouseEnter`,[`mouseout`,`mouseover`]),bt(`onMouseLeave`,[`mouseout`,`mouseover`]),bt(`onPointerEnter`,[`pointerout`,`pointerover`]),bt(`onPointerLeave`,[`pointerout`,`pointerover`]),yt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),yt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),yt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),yt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Br(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Br(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,_t.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!an||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}tn(function(){var r=a,i=Xt(n),s=[];a:{var c=Lr.get(e);if(c!==void 0){var l=W,u=e;switch(e){case`keypress`:if(un(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Ar:case jr:case Mr:l=Cn;break;case Ir:l=Pn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=nn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Yt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=tr;else if(Yn(c)){if(nr)v=dr;else{v=lr;var y=cr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Wt(r.elementType)&&(v=tr):v=ur;if(v&&=v(e,r)){Xn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Lt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(Yn(y)||y.contentEditable===`true`)&&(xr=y,Sr=r,Cr=null);break;case`focusout`:Cr=Sr=xr=null;break;case`mousedown`:wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:wr=!1,Er(s,n,i);break;case`selectionchange`:if(br)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Gn?Un(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(K&&n.locale!==`ko`&&(Gn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Gn&&(b=U()):(sn=i,cn=`value`in sn?sn.value:sn.textContent,Gn=!0)),y=Ed(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Wn(n),b!==null&&(x.data=b)))),(b=Bn?Kn(e,n):qn(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=nn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=nn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=nn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=nn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
10
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Bt(e,``+r);break;case`className`:B(e,`class`,r);break;case`tabIndex`:B(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:B(e,n,r);break;case`style`:Ut(e,r,o);break;case`data`:if(t!==`object`){B(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Jt);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Gt.get(n)||n,Et(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Ut(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Bt(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Jt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Nd(e,t,r,d,n,null)}}It(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&H(e,!!r,n,!0):H(e,!!r,t,!1);return;case`textarea`:for(s in yd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Nd(e,t,s,c,n,null)}zt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(Wt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Ft(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?H(e,!!n,n?[]:``,!1):H(e,!!n,t,!0)):H(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}Rt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(Wt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e!==Gd&&(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body)}n=i}while(n);Pp(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=F.d;F.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?bs(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=V(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+V(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+V(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+V(n.imageSizes)+`"]`)):i+=`[href="`+V(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+V(r)+`"][href="`+V(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),gt(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=z(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);gt(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=z(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),gt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=z(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),gt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=ae.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=z(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=z(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=z(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+V(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),gt(t),e.head.appendChild(t))}function Ff(e){return`[src="`+V(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+V(n.href)+`"]`);if(r)return t.instance=r,gt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),gt(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,gt(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),gt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,gt(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),gt(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,gt(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),gt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:b,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Qr(3,null,null,t),e.current=a,a.stateNode=e,t=$i(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ma(a),e}function np(e){return e?(e=Xr,e):Xr}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Pa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Fa(e,r,t),n!==null&&(pu(n,e,t),Ia(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=qr(e,67108864);t!==null&&pu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=du();t=$e(t);var n=qr(e,t);n!==null&&pu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)wd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Nl&6)&&($l=Ce()+500,rd(0,!1))}}break;case 31:case 13:s=qr(a,2),s!==null&&pu(s,a,2),vu(),ap(a,2)}if(a=fp(r),a===null&&wd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function fp(e){return e=Xt(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yt=r,n.target.dispatchEvent(r),Yt=null}else return t=mt(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,du(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),vu(),t[ot]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.7`)throw Error(i(527,Rp,`19.2.7`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Me=Bp.inject(zp),Ne=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[ot]=t.current,Sd(e),new Ip(t)}})),Dr=F(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Er()}))(),q=b(A(),1),Or=b(wt(),1),J=Yt(),kr=`data-tip`,Ar=400,jr=300,Mr=8,Nr=8;function Pr(e){let t=e instanceof Element?e.closest(`[${kr}]`):null;return t&&t.getAttribute(`data-tip`)?.trim()?t:null}var Fr=`data-tip-side`,Ir=e=>e===`right`||e===`left`?e:`up`;function Lr(e,t,n,r,i,a=`up`){let o=(e,t,n)=>Math.min(Math.max(Nr,e),Math.max(Nr,n-Nr-t)),s=o(e.top+e.height/2-n/2,n,i);if(a===`right`&&e.left+e.width+Mr+t<=r-Nr)return{top:s,left:e.left+e.width+Mr,side:`right`};if(a===`left`&&e.left-Mr-t>=Nr)return{top:s,left:e.left-Mr-t,side:`left`};let c=e.top-Mr-n>=Nr,l=e.bottom+Mr+n<=i-Nr,u=c||!l?`up`:`down`;return{top:u===`up`?Math.max(Nr,e.top-Mr-n):e.bottom+Mr,left:o(e.left+e.width/2-t/2,t,r),side:u}}function Rr(e,t,n){let r=e.trim();return r===(t??``).trim()||r===(n??``).trim()}function zr({id:e,text:t,style:n,ref:r}){return(0,J.jsx)(`div`,{ref:r,id:e,role:`tooltip`,"data-keep-name":``,style:n,className:`fade-in pointer-events-none fixed z-50 w-max max-w-[320px] max-h-[calc(var(--screen)-16px)] overflow-hidden rounded-[10px] border border-line-soft bg-surface-muted px-3 py-2 text-[12.5px] leading-snug text-ink shadow-composer [overflow-wrap:anywhere]`,children:or(t)})}function Br(e){try{return e.matches(`:focus-visible`)}catch{return!0}}var Vr=e=>e.matches(`:disabled`),Hr=(e,t,n)=>{let r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom};function Ur(e,t,n){if(!(e instanceof Element))return null;for(let r of e.querySelectorAll(`:disabled[${kr}]`))if(r.getAttribute(`data-tip`)?.trim()&&Hr(r,t,n))return r;return null}function Wr(){let e=(0,q.useId)(),[t,n]=(0,q.useState)(null),[r,i]=(0,q.useState)({visibility:`hidden`,top:0,left:0}),a=(0,q.useRef)(null),o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useRef)(void 0),l=(0,q.useRef)(0);(0,q.useEffect)(()=>{let e=()=>{clearTimeout(c.current),s.current=null},t=(t,r=t)=>{e(),o.current=t,n({el:t,owner:r,text:or(t.getAttribute(`data-tip`)??``)})},r=()=>{e(),o.current&&(l.current=Date.now()),o.current=null,n(null)},i=n=>{if(n!==o.current&&n!==s.current){if(e(),o.current!==null||Date.now()-l.current<jr)return t(n);s.current=n,c.current=setTimeout(()=>n.isConnected?t(n):e(),Ar)}},a=e=>{if(e.pointerType===`touch`)return;let t=Pr(e.target);t&&i(t)},u=t=>{let n=Pr(t.target);!n||t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(n===s.current&&e(),n===o.current&&r())},d=t=>{if(t.pointerType===`touch`)return;let n=o.current??s.current;if(n&&Vr(n)&&!Hr(n,t.clientX,t.clientY)&&(n===s.current&&e(),n===o.current&&r()),Pr(t.target))return;let a=Ur(t.target,t.clientX,t.clientY);a&&i(a)},f=e=>{let n=Pr(e.target);n&&e.target instanceof Element&&Br(e.target)?t(n,e.target):o.current&&r()},p=e=>{let t=o.current;t&&e.target instanceof Node&&t.contains(e.target)&&(e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||r())},m=e=>{e.key===`Escape`&&o.current&&(e.preventDefault(),e.stopPropagation(),r())},h={capture:!0,passive:!0},g={capture:!0};return document.addEventListener(`pointerover`,a,h),document.addEventListener(`pointerout`,u,h),document.addEventListener(`pointermove`,d,h),document.addEventListener(`pointerdown`,r,h),document.addEventListener(`focusin`,f,h),document.addEventListener(`focusout`,p,h),document.addEventListener(`keydown`,m,g),window.addEventListener(`scroll`,r,h),window.addEventListener(`resize`,r,h),window.addEventListener(`blur`,r),()=>{e(),document.removeEventListener(`pointerover`,a,h),document.removeEventListener(`pointerout`,u,h),document.removeEventListener(`pointermove`,d,h),document.removeEventListener(`pointerdown`,r,h),document.removeEventListener(`focusin`,f,h),document.removeEventListener(`focusout`,p,h),document.removeEventListener(`keydown`,m,g),window.removeEventListener(`scroll`,r,h),window.removeEventListener(`resize`,r,h),window.removeEventListener(`blur`,r)}},[]),(0,q.useEffect)(()=>{if(!t)return;let e=new MutationObserver(()=>{let e=t.el.getAttribute(kr)?.trim();if(!t.el.isConnected||!e){o.current=null,n(null);return}let r=or(e);r!==t.text&&n({...t,text:r})});return e.observe(t.el,{attributes:!0,attributeFilter:[kr]}),e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()},[t]),(0,q.useEffect)(()=>{if(!t||Rr(t.text,t.owner.getAttribute(`aria-label`),t.owner.textContent))return;let n=t.owner,r=n.getAttribute(`aria-describedby`);return n.setAttribute(`aria-describedby`,r?`${r} ${e}`:e),()=>{let t=(n.getAttribute(`aria-describedby`)??``).split(/\s+/).filter(t=>t&&t!==e);t.length?n.setAttribute(`aria-describedby`,t.join(` `)):n.removeAttribute(`aria-describedby`)}},[t,e]);let u=t?t.el.closest(`dialog[open]`)??document.body:null;return(0,q.useLayoutEffect)(()=>{if(!t||!a.current||!u){i({visibility:`hidden`,top:0,left:0});return}let e=!1,n=()=>{if(e||!a.current)return;let n=a.current.getBoundingClientRect(),r=Lr(t.el.getBoundingClientRect(),n.width,n.height,window.innerWidth,window.innerHeight,Ir(t.el.getAttribute(Fr)));i({top:r.top,left:r.left})},r=u instanceof HTMLElement&&u!==document.body?u.getAnimations():[];return r.length?(i({visibility:`hidden`,top:0,left:0}),Promise.allSettled(r.map(e=>e.finished)).then(n)):n(),()=>{e=!0}},[t,u]),!t||!u?null:(0,Or.createPortal)((0,J.jsx)(zr,{ref:a,id:e,text:t.text,style:r}),u)}function Gr(e,t){if(!(!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<.25||t>4))return Math.round(e/t*100)/100}function Kr(e){let t=e.createElement(`div`);t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;top:0;left:0;width:1px;height:1000px;visibility:hidden;pointer-events:none`,e.body.appendChild(t);let n=t.getBoundingClientRect().height;return t.remove(),n/1e3}function qr(e=window){let t=e.document,n=()=>{let n=Gr(e.innerHeight,Kr(t));n===void 0?t.documentElement.style.removeProperty(`--screen`):t.documentElement.style.setProperty(`--screen`,`${n}px`)};return n(),e.addEventListener(`resize`,n),()=>e.removeEventListener(`resize`,n)}function Jr(e,t=900){let n=new Map,r=r=>{let i=r.target===e?e.documentElement:r.target;if(!i||!(i instanceof e.defaultView.Element))return;let a=n.get(i);a?clearTimeout(a):i.setAttribute(`data-scrolling`,``),n.set(i,setTimeout(()=>{n.delete(i),i.removeAttribute(`data-scrolling`)},t))};return e.addEventListener(`scroll`,r,{capture:!0,passive:!0}),()=>{e.removeEventListener(`scroll`,r,{capture:!0});for(let[e,t]of n)clearTimeout(t),e.removeAttribute(`data-scrolling`);n.clear()}}var Yr=5e3,Xr=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`});function Zr({onReload:e}){let[t,n]=(0,q.useState)(null);return(0,q.useEffect)(()=>{let e=!0,t=()=>void Ht.status().then(t=>e&&n(t),()=>{}),r=()=>{document.visibilityState===`visible`&&Ht.status().catch(()=>{})},i=setInterval(r,Yr);return window.addEventListener(Ot,t),document.addEventListener(`visibilitychange`,r),()=>{e=!1,clearInterval(i),window.removeEventListener(Ot,t),document.removeEventListener(`visibilitychange`,r)}},[]),t?t.error?(0,J.jsxs)(`div`,{role:`alert`,className:`mx-4 mt-4 flex flex-col gap-1 rounded-[12px] bg-warn-soft px-3 py-2 text-sm text-warn [overflow-wrap:anywhere]`,children:[(0,J.jsxs)(`span`,{className:`font-medium`,children:[`The settings files have a problem: `,t.error]}),(0,J.jsxs)(`span`,{className:`text-ink-2`,children:[t.loadedAt?`Pages show the settings as they were at ${Xr(t.loadedAt)}`:`Pages cannot show the settings`,`; nothing can be started until it is fixed. Fix it in Settings or in the file: no restart is needed.`]})]}):(0,J.jsxs)(`div`,{role:`status`,className:`mx-4 mt-4 flex flex-wrap items-center gap-2 rounded-[12px] border border-accent-line bg-accent-soft px-3 py-2 text-sm`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1`,children:`The settings changed on disk. They are in use already; show this page with them?`}),(0,J.jsxs)(B,{size:`sm`,variant:`primary`,onClick:()=>{n(null),e()},"data-tip":`Show this page with the new settings`,children:[(0,J.jsx)(D,{"aria-hidden":`true`}),`Reload`]}),(0,J.jsxs)(B,{size:`sm`,variant:`ghost`,onClick:()=>n(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Later`]})]}):null}var Qr=`(max-height: 820px)`,$r=()=>(0,q.useSyncExternalStore)(e=>{let t=typeof matchMedia==`function`?matchMedia(Qr):null;return t?.addEventListener(`change`,e),()=>t?.removeEventListener(`change`,e)},()=>typeof matchMedia==`function`&&matchMedia(`(max-height: 820px)`).matches,()=>!1),ei={fail:{icon:Oe,tone:`text-fail`,bar:`bg-fail`},warn:{icon:x,tone:`text-warn`,bar:`bg-warn`},accent:{icon:u,tone:`text-accent-fg`,bar:`bg-accent`}};function ti({items:e,title:t,id:n,className:r}){return e?.length?(0,J.jsxs)(`section`,{"aria-labelledby":n,className:z(`flex w-full flex-col gap-2`,r),children:[(0,J.jsx)(`h2`,{id:n,className:`m-0 text-[13px] font-semibold text-muted`,children:t}),(0,J.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-line overflow-hidden rounded-[12px] border border-line p-0`,children:e.map(e=>{let t=ei[e.tone];return(0,J.jsx)(`li`,{children:(0,J.jsxs)(`a`,{href:e.href,className:`group relative flex min-h-12 items-center gap-3 px-4 py-2.5 text-ink no-underline hover:bg-surface-muted hover:text-ink`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:z(`absolute inset-y-0 left-0 w-[3px]`,t.bar)}),(0,J.jsx)(zt,{icon:t.icon,size:16,className:z(`flex-none`,t.tone)}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[14px] font-medium`,children:e.label}),(0,J.jsx)(`span`,{className:`hidden flex-none text-[13px] text-muted sm:inline`,children:e.action}),(0,J.jsx)(l,{size:16,"aria-hidden":`true`,className:`flex-none text-muted group-hover:text-ink`})]})},e.id)})})]}):null}var ni=`[your objective: the story, feature or page to test]`,ri=[{label:`Generate functional test cases`,Icon:t,text:[`Role: A test analyst who writes functional test cases from requirements`,`Objective: Write functional test cases for ${ni}`,`Steps:
|
|
11
|
+
1. Read the story or requirement, its acceptance criteria and the pages it changes.
|
|
12
|
+
2. Write test cases for each acceptance criterion: the main path, other valid paths, invalid input and edge cases.
|
|
13
|
+
3. Compare them with the existing test cases, and reuse or extend a case where the steps are the same.
|
|
14
|
+
4. Save the new test cases, linked to the story.`,`Rules:
|
|
15
|
+
- Each step has one action and one expected result.
|
|
16
|
+
- Do not run tests and do not change code.`,`Output format: A table for each test case: id, title, preconditions, steps, expected results, and the acceptance criterion it covers.`,`Summary: Write and save functional test cases for the objective above.`].join(`
|
|
17
|
+
|
|
18
|
+
`)},{label:`Generate test cases and automation scripts`,Icon:oe,text:[`Role: A test automation engineer who writes test cases and automates them in the test repository`,`Objective: Write functional test cases for ${ni}, and automate them`,`Steps:
|
|
19
|
+
1. Read the story or requirement, its acceptance criteria and the pages it changes.
|
|
20
|
+
2. Write test cases for each acceptance criterion: the main path, other valid paths, invalid input and edge cases.
|
|
21
|
+
3. Compare them with the existing test cases, and save the new ones, linked to the story.
|
|
22
|
+
4. Run each test case in the browser on the selected test environment.
|
|
23
|
+
5. Turn each passed run into an automated test in the test repository, written in its framework, page objects and helpers.`,`Rules:
|
|
24
|
+
- Each step has one action and one expected result.
|
|
25
|
+
- Do not automate a test case that failed: report it with the reason.`,`Output format: A table of the test cases (id, title, acceptance criterion, run result), then each automation script's file and the command that runs it.`,`Summary: Write, run and automate test cases for the objective above.`].join(`
|
|
26
|
+
|
|
27
|
+
`)},{label:`Generate test cases, scripts and regression`,Icon:k,text:[`Role: A test automation engineer who writes test cases, automates them and keeps the regression pack current`,`Objective: Write functional test cases for ${ni}, automate them, and add them to the regression pack`,`Steps:
|
|
28
|
+
1. Read the story or requirement, its acceptance criteria and the pages it changes.
|
|
29
|
+
2. Write test cases for each acceptance criterion: the main path, other valid paths, invalid input and edge cases.
|
|
30
|
+
3. Compare them with the existing test cases, and save the new ones, linked to the story.
|
|
31
|
+
4. Run each test case in the browser on the selected test environment.
|
|
32
|
+
5. Turn each passed run into an automated test in the test repository, written in its framework, page objects and helpers.
|
|
33
|
+
6. Add the automated tests to the regression pack, then run the regression pack.`,`Rules:
|
|
34
|
+
- Each step has one action and one expected result.
|
|
35
|
+
- Do not automate a test case that failed: report it with the reason.
|
|
36
|
+
- Do not remove a test from the regression pack.`,`Output format: A table of the test cases (id, title, acceptance criterion, run result), each automation script's file and command, and the regression pack's result with every failure and its reason.`,`Summary: Write, automate and add to regression the test cases for the objective above.`].join(`
|
|
37
|
+
|
|
38
|
+
`)}];function ii(e){let t=e.indexOf(ni);return t<0?null:[t,t+52]}var ai=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function oi(e,t,n,r=new Date){let i=new Date(r);i.setHours(0,0,0,0);let a=e=>{let t=Date.parse(e);return Number.isFinite(t)&&t>=i.getTime()},o=[],s=(e||[]).filter(e=>e.status===`failed`&&a(e.lastAt||e.startedAt)).length;s&&o.push({id:`failed`,label:`${ai(s,`run`)} failed today`,action:`See what broke`,href:H(`runs`),tone:`fail`,category:`quality`});let c=(t||[]).filter(e=>e.state===`waiting`).length;c&&o.push({id:`approvals`,label:`${ai(c,`request`)} waiting for your approval`,action:`Approve or decline`,href:H(`agents`),tone:`warn`,category:`agents`});let l=(n||[]).filter(e=>e.enabled&&e.last&&[`failed`,`timed_out`].includes(e.last.status)).length;l&&o.push({id:`jobs`,label:`${ai(l,`job`)} failed last time`,action:`See the jobs`,href:H(`jobs`),tone:`fail`,category:`agents`});let u=(e||[]).filter(e=>e.status===`running`).length;return u&&o.push({id:`running`,label:`${ai(u,`run`)} going now`,action:`Watch them`,href:H(`runs`),tone:`accent`,category:`quality`}),o}function si(e){let t=e?.waiting.length||0;return t?[{id:`review`,label:`${ai(t,`agent run`)} waiting for review`,action:`Review them`,href:H(`evidence-review`),tone:`warn`,category:`assurance`}]:[]}var ci=2048,li=/\.(png|jpe?g|gif|webp|bmp|avif|svg|ico|heic|heif|tiff?)$/i,ui=new Set([`image/png`,`image/jpeg`,`image/webp`,`image/gif`]),di=e=>li.test(e),fi=e=>e.type.startsWith(`image/`)||li.test(e.name),pi=e=>/\.(png|jpe?g|gif|webp)$/i.test(e);function mi(e){return e.replace(/^.*[\\/]/,``).replace(/\.[^.]*$/,``).replace(/[^A-Za-z0-9._-]+/g,`-`).replace(/^[-.]+|-+$/g,``).slice(0,60)||`image`}var hi=0;function gi(e=new Date){let t=e=>String(e).padStart(2,`0`);return`pasted-${e.getFullYear()}${t(e.getMonth()+1)}${t(e.getDate())}-${t(e.getHours())}${t(e.getMinutes())}${t(e.getSeconds())}-${++hi}`}var _i=e=>!e||/^image\.(png|jpe?g|gif|webp|bmp)$/i.test(e);async function vi(e){let t=new Uint8Array(await e.arrayBuffer()),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}async function yi(e){if(e.type!==`image/svg+xml`)try{let t=await createImageBitmap(e,{imageOrientation:`from-image`});return{source:t,width:t.width,height:t.height,close:()=>t.close()}}catch{}let t=await bi(e);try{let e=new Image;e.decoding=`async`,e.src=t,await e.decode();let n=e.naturalWidth||1024;return{source:e,width:n,height:e.naturalHeight||Math.round(n*.75)}}catch{throw Error(`This browser cannot read that image. Save it as PNG or JPEG and attach it again.`)}}function bi(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||``)),r.onerror=()=>n(Error(`The image could not be read.`)),r.readAsDataURL(e)})}function xi(e,t){let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}function Si(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}function Ci(e){let t=e.getContext(`2d`);if(!t)return!1;let{data:n}=t.getImageData(0,0,e.width,e.height),r=Math.max(1,Math.floor(n.length/4/25e4))*4;for(let e=3;e<n.length;e+=r)if(n[e]<255)return!0;return!1}async function wi(e,t={}){let n=t.max??5242880,r=t.name??e.name??``,i=_i(r)?gi():mi(r);if(e.type===`image/gif`&&e.size<=n){let t=await yi(e).catch(()=>null);if(t?.close?.(),t)return{name:`${i}.gif`,type:`image/gif`,data:await vi(e),width:t.width,height:t.height,changed:!1}}let a=await yi(e);try{let t=Math.min(1,ci/Math.max(a.width,a.height));for(let o=0;o<6;o++){let o=Math.max(1,Math.round(a.width*t)),s=Math.max(1,Math.round(a.height*t)),c=xi(o,s),l=c.getContext(`2d`);if(!l)throw Error(`This browser cannot draw the image.`);l.imageSmoothingQuality=`high`,l.drawImage(a.source,0,0,o,s);let u=Ci(c),d=/^image\/(jpeg|heic|heif|avif)$/.test(e.type)||/\.(jpe?g|heic|heif|avif)$/i.test(r),f=u?[[`image/png`,void 0],[`image/webp`,.92],[`image/webp`,.8]]:d?[[`image/jpeg`,.9],[`image/jpeg`,.8],[`image/jpeg`,.7]]:[[`image/png`,void 0],[`image/webp`,.92],[`image/jpeg`,.9],[`image/jpeg`,.8],[`image/jpeg`,.7]];for(let[e,t]of f){let r=await Si(c,e,t);if(r&&r.type===e&&ui.has(e)&&r.size<=n)return{name:`${i}${e===`image/png`?`.png`:e===`image/webp`?`.webp`:`.jpg`}`,type:e,data:await vi(r),width:o,height:s,changed:!0}}t*=.75}throw Error(`The image could not be made small enough to attach.`)}finally{a.close?.()}}var Ti=/<!-- (?:attached-files|forgeqe:files)\s*([\s\S]*?)-->\s*/,Ei=/^(?:\.forgeqe\/inbox\/[A-Za-z0-9][A-Za-z0-9._-]*|(?:[A-Za-z0-9][A-Za-z0-9 ._-]*\/)*[A-Za-z0-9][A-Za-z0-9 ._-]*\/?)$/,Di=/\.(png|jpe?g|gif|webp)$/i,Oi=e=>Di.test(e),ki=/\.(png|jpe?g|gif|webp|pdf|md|txt|csv|tsv|json|xml|ya?ml|tsx?|jsx?|mjs|cjs|py|java|cs|go|rb|sql|log|feature|toml|ini|sh|ps1)$/i,Ai=e=>ki.test(e),ji=e=>/\s/.test(e)?`@"${e}"`:`@${e}`;function Mi(e,t){let n=ji(t),r=e.indexOf(n);for(;r>=0;){let t=r+n.length;if((r===0||/\s/.test(e[r-1]))&&(t===e.length||/\s/.test(e[t])))return e.slice(0,r)+e.slice(t).replace(/^ /,``);r=e.indexOf(n,r+1)}return e}function Ni(e,t){return Mi(e,t)!==e}function Pi(e){let t=e.endsWith(`/`)&&e.length>1,n=t?e.slice(0,-1):e,r=n.lastIndexOf(`/`),i=t?`/`:``;return r<=0?{name:`${n}${i}`,dir:``}:{name:`${n.slice(r+1)}${i}`,dir:n.slice(0,r)}}function Fi(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t),r=n.lastIndexOf(`@`);if(r<0||r>0&&/[\w./]/.test(n[r-1]))return null;let i=n.slice(r+1);return i.length>200?null:i.startsWith(`"`)?/["@\n]/.test(i.slice(1))?null:{start:r,query:i.slice(1)}:/[\s@"]/.test(i)?null:{start:r,query:i}}function Ii(e,t,n,r){let i=`${ji(r)} `;return{text:`${e.slice(0,t)}${i}${e.slice(n)}`,cursor:t+i.length}}function Li(e,t){let n=e.trim(),r=t.filter(e=>e.path);return r.length?`<!-- attached-files\nRead these files with your tools; each path is relative to your working folder:\n${r.map(e=>`- ${e.path}`).join(`
|
|
39
|
+
`)}\n-->\n${n}`.trim():n}function Ri(e){let t=Ti.exec(e),n=t?t[1].split(/\r?\n/).map(e=>e.replace(/^- /,``).trim()).filter(e=>Ei.test(e)):[];return{body:e.replace(Ti,``).replace(/^<!--[\s\S]*?-->\s*/,``).trim(),files:n}}function zi(e,t){let n=/^\/([a-z0-9-]{0,40})$/i.exec(e.slice(0,t));return n&&/^[a-z0-9-]*(\s|$)/i.test(e.slice(t))?n[1].toLowerCase():null}var Bi=8;function Vi(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=String(r.result||``),n=e.indexOf(`,`);t(n>=0?e.slice(n+1):``)},r.onerror=()=>n(Error(`The file could not be read.`)),r.readAsDataURL(e)})}function Hi({path:e,name:t,note:n}){let r=Pi(e),i=n||r.dir;return(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start gap-0.5`,children:[(0,J.jsx)(`span`,{className:`max-w-full truncate text-[13px] font-medium leading-tight text-ink`,children:t||r.name}),i?(0,J.jsx)(`span`,{className:`max-w-full truncate text-[12px] leading-tight text-muted`,"data-tip":e||void 0,children:i}):null]})}function Ui({file:e,scope:t,onView:n}){let r=e.pending&&e.pending.type.startsWith(`image/`)&&Oi(e.name)?`data:${e.pending.type};base64,${e.pending.data}`:``,[i,a]=(0,q.useState)(``),o=`${t.chat||``}|${t.code===!1?0:1}`;(0,q.useEffect)(()=>{if(a(``),r||!e.path||!Oi(e.path))return;let n=!1;return Xt.openFile(e.path,t).then(e=>!n&&e.kind===`image`&&a(e.url)).catch(()=>{}),()=>{n=!0}},[e.path,r,o]);let s=r||i;if(!s)return null;let c=(0,J.jsx)(`img`,{src:s,alt:``,className:`size-8 flex-none rounded-[8px] border border-line-soft bg-surface-muted object-cover`});return n?(0,J.jsx)(`button`,{type:`button`,"aria-label":`Preview ${e.name}`,"data-tip":`Preview`,onClick:()=>n(s),className:`inline-flex flex-none cursor-zoom-in rounded-[8px] border-0 bg-transparent p-0`,children:c}):c}function Wi({text:e,scope:t={}}){let{body:n,files:r}=Ri(e),[i,a]=(0,q.useState)(``);return!n&&!r.length?null:(0,J.jsxs)(`div`,{className:`ml-auto flex max-w-[min(85%,640px)] flex-col items-end gap-1.5`,children:[r.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Attached files`,className:`m-0 flex list-none flex-wrap justify-end gap-1.5 p-0`,children:r.map(e=>(0,J.jsx)(`li`,{className:`inline-flex max-w-full`,children:e.endsWith(`/`)?(0,J.jsx)(`span`,{className:`inline-flex max-w-full items-center gap-2 rounded-[8px] bg-surface-strong px-2.5 py-1.5`,children:(0,J.jsx)(Hi,{path:e})}):(0,J.jsxs)(`button`,{type:`button`,"data-tip":`Open ${e}`,onClick:async()=>{a(``),a(await $t(e,e=>Xt.openFile(e,t)))},className:`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-[8px] border-0 bg-surface-strong px-2.5 py-1.5 text-left hover:bg-line`,children:[(0,J.jsx)(Ui,{file:{path:e,name:Pi(e).name},scope:t}),(0,J.jsx)(Hi,{path:e})]})},e))}),i&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 text-[12px] text-muted`,children:i}),n&&(0,J.jsx)(`div`,{className:`rounded-[18px] bg-surface-strong px-4 py-2.5 text-[15px] leading-relaxed whitespace-pre-wrap text-ink [overflow-wrap:anywhere]`,children:n})]})}function Gi({file:e,scope:t,onRemove:n,onView:r}){return(0,J.jsxs)(`span`,{className:`inline-flex max-w-[260px] items-center gap-2 rounded-[8px] bg-surface-strong py-1.5 pr-1 pl-2.5`,children:[(0,J.jsx)(Ui,{file:e,scope:e.scope??t,onView:r}),(0,J.jsx)(Hi,{path:e.path,name:e.name,note:e.pending?`Saves when you send`:void 0}),(0,J.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,"data-tip":`Remove ${e.name}`,onClick:n,className:`inline-flex size-5 flex-none cursor-pointer items-center justify-center self-start rounded-[6px] border-0 bg-transparent text-muted hover:bg-line hover:text-ink`,children:(0,J.jsx)(i,{size:12,"aria-hidden":`true`})})]})}async function Ki(e,t,n){try{let r=await Xt.openFile(e,n),i=await fetch(r.url,{credentials:`same-origin`});if(!i.ok)return null;let a=t.replace(/\.[^.]*$/,``),o=await wi(await i.blob(),{name:`${a}-picture`}),s=await Xt.attachFile({name:o.name,type:o.type,data:o.data},n);return{id:s.path,path:s.path,name:s.name,kind:`upload`,image:!0,scope:n,copyOf:e}}catch{return null}}var qi=716800,Ji=52428800,Yi=null,Xi=()=>((!Yi||Date.now()-Yi.at>1e4)&&(Yi={at:Date.now(),list:_t.list().then(e=>e.personas,e=>{throw Yi=null,e})}),Yi.list);function Zi(e,t,n,r={}){let[a,o]=(0,q.useState)([]),[s,c]=(0,q.useState)(``),[l,u]=(0,q.useState)([]),[d,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(0),[_,v]=(0,q.useState)(`file`),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)(null),T=(0,q.useRef)(null),E=(0,q.useRef)(0),D=(0,q.useRef)(null),O=(0,q.useRef)(0),k=(0,q.useRef)(e);k.current=e;let A=(0,q.useRef)(a),j=(0,q.useRef)(r);j.current=r;let M=`${r.chat||``}|${r.code===!1?0:1}`,N=e=>{A.current=e,o(e)},P=e=>{let t=++O.current;_===`persona`?(b(!0),Xi().then(n=>{t===O.current&&(u(n.filter(t=>t.handle.startsWith(e)||t.id.startsWith(e)).slice(0,8).map(e=>({path:`/${e.handle}`,name:e.name,role:e.role}))),g(0))}).catch(e=>t===O.current&&c(`The personas did not load: ${e.message}`)).finally(()=>t===O.current&&b(!1))):Xt.files(e,j.current).then(e=>{t===O.current&&(u(e.files),g(0))}).catch(e=>t===O.current&&c(e.message))};(0,q.useEffect)(()=>{if(p===null)return;let e=setTimeout(()=>P(p),80);return()=>clearTimeout(e)},[p,M,_]),(0,q.useEffect)(()=>{d&&document.getElementById(`${n}-file-${h}`)?.scrollIntoView({block:`nearest`})},[d,h,n]);let F=()=>{++O.current,f(!1),m(null),u([]),T.current=null},I=e=>{let t=A.current;return e.path&&t.some(t=>t.path===e.path)?``:e.pending&&t.some(t=>t.kind===`upload`&&t.name===e.name)?`${e.name} is already attached.`:t.length>=Bi?`At most ${Bi} files go with one message.`:(N([...t,e]),``)},L=e=>{e.kind===`upload`&&e.path&&Xt.dropFile(e.path,e.scope??j.current).catch(e=>c(e.message))},ee=e=>{let n=A.current.find(t=>(t.id||t.path||t.name)===e);if(n){if(N(A.current.filter(e=>e!==n)),L(n),n.kind===`project`){let e=Mi(k.current,n.name);e!==k.current&&t(e)}c(``)}},te=e=>{requestAnimationFrame(()=>{let t=document.getElementById(n);t?.focus(),t?.setSelectionRange(e,e)})},ne=e=>{if(_===`persona`){let n=k.current.slice(E.current).replace(/^[a-z0-9-]*/i,``);F();let r=`${e.path} `;t(`${r}${n.replace(/^\s+/,``)}`),te(r.length);return}let n=T.current,r=I({id:e.path,path:e.path,name:e.name,kind:`project`,image:Oi(e.path)});if(c(r),F(),!n||r)return;let i=Ii(k.current,n.start,E.current,e.name);t(i.text),te(i.cursor)},re=(e,t)=>{E.current=t;let n=k.current;if(e!==n){let t=A.current.filter(t=>t.kind===`project`&&Ni(n,t.name)&&!Ni(e,t.name));t.length&&N(A.current.filter(e=>!t.includes(e)))}let r=zi(e,t);if(r!==null){T.current=null,_!==`persona`&&(++O.current,u([])),d&&_===`persona`||b(!0),v(`persona`),m(r),f(!0);return}let i=Fi(e,t);i?(T.current=i,_!==`file`&&(++O.current,u([])),v(`file`),m(i.query),f(!0)):d&&F()},R=e=>d?e.key===`ArrowDown`?(e.preventDefault(),g(e=>Math.min(e+1,Math.max(l.length-1,0))),!0):e.key===`ArrowUp`?(e.preventDefault(),g(e=>Math.max(e-1,0)),!0):e.key===`Escape`?(e.preventDefault(),F(),!0):(e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey&&l[h]?(e.preventDefault(),E.current=e.currentTarget.selectionStart??E.current,ne(l[h]),!0):!1:!1,ie=e=>{c(``);let t=[...e];(async()=>{let e=[];for(let n of t)if(!n.size)e.push(`${n.name||`The pasted file`} is empty.`);else if(fi(n)){if(n.size>Ji){e.push(`${n.name} is over ${Ji/1024/1024} MB: save a smaller copy and attach that.`);continue}try{let t=await wi(n),r=I({id:`pending:${t.name}:${n.size}:${n.lastModified}`,path:``,name:t.name,kind:`upload`,image:!0,pending:{name:t.name,type:t.type,data:t.data}});if(r&&(e.push(r),A.current.length>=Bi))break}catch(t){e.push(`${n.name}: ${t.message}`)}}else if(!Ai(n.name))e.push(`${n.name}: attach an image, a PDF, or a text or code file.`);else if(n.size>qi)e.push(`${n.name} is too large to attach here (${Math.round(qi/1024)} KB at most): put it in the agent's folder and @ its path instead.`);else try{let t=await Vi(n),r=I({id:`pending:${n.name}:${n.size}:${n.lastModified}`,path:``,name:n.name,kind:`upload`,image:Oi(n.name),pending:{name:n.name,type:n.type||`application/octet-stream`,data:t}});if(r&&(e.push(r),A.current.length>=Bi))break}catch(t){e.push(t.message)}e.length&&c(e.join(` `))})()};return{files:a,error:s,setError:c,hasFiles:a.length>0,wrap:async e=>{let t=A.current,n=j.current,r=[];for(let e=0;e<t.length;e++){let i=t[e];try{if(i.kind===`project`){let e=await Xt.attachFile({path:i.path},n);if(r.push({...i,id:e.path,path:e.path,name:e.name}),di(e.name)&&(!pi(e.name)||(e.size??0)>5242880)&&!t.some(t=>t.copyOf===e.path)&&!r.some(t=>t.copyOf===e.path)){let t=await Ki(e.path,e.name,n);t&&r.push(t)}}else if(i.pending){let e=await Xt.attachFile(i.pending,n);r.push({id:e.path,path:e.path,name:e.name,kind:`upload`,image:Oi(e.path),scope:n,...i.copyOf?{copyOf:i.copyOf}:{}})}else r.push(i);N([...r,...t.slice(e+1)])}catch(n){throw N([...r,...t.slice(e)]),Error(`${i.name}: ${n.message}`)}}return N(r),Li(e,r)},reset:e=>{if(!e?.keep)for(let e of A.current)L(e);N([]),c(``),F()},onEdit:re,onKeyDown:R,onFiles:ie,drop:{onDragEnter:e=>{e.preventDefault(),[...e.dataTransfer.types].includes(`Files`)&&S(!0)},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||S(!1)},onDrop:e=>{e.preventDefault(),S(!1),e.dataTransfer.files.length&&ie(e.dataTransfer.files)}},dropping:x,paperclip:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(B,{variant:`ghost`,className:`px-2.5 text-[15px]`,"aria-label":`Attach a file`,"data-tip":`Attach a file, or type @ to name one in the agent's folder`,onClick:()=>D.current?.click(),children:(0,J.jsx)(ot,{"aria-hidden":`true`})}),(0,J.jsx)(`input`,{ref:D,type:`file`,multiple:!0,className:`hidden`,onChange:e=>(e.target.files&&ie(e.target.files),e.target.value=``)})]}),chips:(0,J.jsxs)(J.Fragment,{children:[a.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Attached files`,className:`m-0 mb-2 flex list-none flex-wrap gap-1.5 p-0`,children:a.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsx)(Gi,{file:e,scope:r,onRemove:()=>ee(e.id||e.path||e.name),onView:t=>w({src:t,name:e.name,pending:!!e.pending})})},e.id||e.path||e.name))}),(0,J.jsx)(Cn,{wide:!0,open:!!C,onClose:()=>w(null),title:C?.name||``,description:C?.pending?`As it goes to the model when you send: at most 2048 pixels across, with no location or camera details.`:`From the agent's folder.`,footer:(0,J.jsxs)(B,{onClick:()=>w(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),children:C&&(0,J.jsx)(`img`,{src:C.src,alt:`${C.name}, attached`,className:`block h-auto max-w-full rounded-[10px] border border-line-soft`})})]}),combo:{expanded:d,listId:`${n}-files`,activeId:d&&l[h]?`${n}-file-${h}`:void 0},mentions:d&&(0,J.jsxs)(`div`,{className:`absolute bottom-full left-0 z-20 mb-2 w-[min(420px,calc(100vw-48px))] rounded-[12px] border border-line bg-bg py-1 shadow-menu`,children:[l.length===0&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 px-3 py-2 text-sm text-muted`,children:_===`persona`?y?`Reading the personas…`:s.startsWith(`The personas did not load`)?`The personas did not load.`:`No persona has this command. Business personas are on the Persona agent's page.`:p?`No file or folder matches.`:`Type a name to find a file or folder.`}),(0,J.jsx)(`div`,{id:`${n}-files`,role:`listbox`,"aria-label":_===`persona`?`Business personas`:`Files in the agent's folder`,className:`max-h-64 overflow-y-auto`,children:l.map((e,t)=>{let r=_===`persona`?[e.path,e.role].filter(Boolean).join(` · `):Pi(e.path).dir;return(0,J.jsxs)(`button`,{id:`${n}-file-${t}`,type:`button`,tabIndex:-1,role:`option`,"aria-selected":t===h,className:z(`flex w-full min-w-0 cursor-pointer flex-col items-start gap-0.5 border-0 px-3 py-1.5 text-left`,t===h?`bg-accent-soft`:`bg-transparent hover:bg-surface-muted`),onMouseDown:e=>e.preventDefault(),onClick:()=>ne(e),children:[(0,J.jsx)(`span`,{className:`max-w-full truncate text-sm font-medium text-ink`,children:e.name}),r?(0,J.jsx)(`span`,{className:`max-w-full truncate text-[12px] text-muted`,children:r}):null]},e.path)})})]})}}function Qi({id:t,value:n,onChange:r,onSend:i,onStop:a,busy:o,disabled:s,placeholder:c,label:l,left:u,right:d,top:f,rows:p=2,canSend:m,onEdit:h,onKey:g,onFiles:_,dropping:v,drop:y,mentions:b,combo:x}){let S=m??n.trim().length>0,C=(0,q.useRef)(null),w=$r()&&p===2?1:p;return(0,q.useLayoutEffect)(()=>{let e=C.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[n,w]),(0,J.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o?a?.():S&&!s&&i()},onDragEnter:y?.onDragEnter,onDragOver:y?.onDragOver,onDragLeave:y?.onDragLeave,onDrop:y?.onDrop,className:z(`relative box-border w-full rounded-[22px] border border-line bg-bg py-[18px] pr-3.5 pl-5 shadow-composer short:py-3 has-[textarea:focus-visible]:outline-2 has-[textarea:focus-visible]:outline-offset-2 has-[textarea:focus-visible]:outline-accent`,v&&`outline-2 outline-offset-2 outline-accent`),children:[v&&(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-[22px] bg-accent-soft/80 text-sm font-medium text-accent-fg`,children:`Drop files here`}),b,(0,J.jsx)(`label`,{htmlFor:t,className:`sr-only`,children:l}),f,(0,J.jsx)(`textarea`,{ref:C,id:t,rows:w,value:n,disabled:s,onChange:e=>{r(e.target.value),h?.(e.target.value,e.target.selectionStart)},onSelect:e=>h?.(e.currentTarget.value,e.currentTarget.selectionStart),onPaste:e=>{let t=[...e.clipboardData.files];t.length&&_&&(e.preventDefault(),_(t))},...x?{role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":x.expanded,"aria-controls":x.listId,...x.expanded&&x.activeId?{"aria-activedescendant":x.activeId}:{}}:{},onKeyDown:e=>{g?.(e)||e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),!o&&S&&!s&&i())},placeholder:c,className:`box-border max-h-[50vh] w-full resize-none overflow-y-auto border-0 bg-transparent p-0 text-base leading-[1.55] text-ink outline-none placeholder:text-muted focus-visible:outline-none disabled:opacity-60`}),(0,J.jsxs)(`div`,{className:`mt-2.5 -ml-2.5 flex items-center gap-1 short:mt-1.5`,children:[u,(0,J.jsx)(`div`,{className:`flex-auto`}),d,o?(0,J.jsx)(`button`,{type:`submit`,"aria-label":`Stop`,className:`ml-1.5 inline-flex size-11 flex-none cursor-pointer items-center justify-center rounded-full border-0 bg-ink text-bg hover:bg-ink-2`,children:(0,J.jsx)(e,{size:14,fill:`currentColor`,"aria-hidden":`true`})}):(0,J.jsx)(`button`,{type:`submit`,"aria-label":`Send`,disabled:s,className:z(`ml-1.5 inline-flex size-11 flex-none cursor-pointer items-center justify-center rounded-full border-0 transition-colors disabled:cursor-not-allowed`,S&&!s?`bg-accent text-accent-ink hover:bg-accent-hover`:`bg-line text-muted`),children:(0,J.jsx)($e,{size:20,strokeWidth:2.2,"aria-hidden":`true`})})]})]})}function $i(e,t){let[n,r]=(0,q.useState)(null),i=(0,q.useRef)(null),a=(0,q.useRef)(t);a.current=t;let o=()=>{i.current&&clearInterval(i.current),i.current=null};return(0,q.useEffect)(()=>o,[]),{state:n,start:(0,q.useCallback)(async t=>{if(t.trim()){o(),r({original:t,job:null,error:``});try{let n=await Ut.start(t,e);r({original:t,job:n,error:``}),i.current=setInterval(async()=>{try{let t=await Ut.job();if(!t||t.target!==e||t.startedAt!==n.startedAt)return;if(t.running)return r(e=>e&&{...e,job:t});o();let i=t.exitCode===0?t.result:void 0;i?.refined&&a.current(i.refined),r(e=>e&&{...e,job:t,result:i})}catch(e){o(),r(t=>t&&{...t,error:e.message})}},700)}catch(e){r({original:t,job:null,error:e.message})}}},[e]),stop:(0,q.useCallback)(async()=>{o(),await Ut.stop().catch(()=>{}),r(null)},[]),close:(0,q.useCallback)(()=>{o(),r(null)},[]),undo:(0,q.useCallback)(()=>{r(e=>(e&&a.current(e.original),null))},[]),running:!!n&&!n.error&&(!n.job||n.job.running)}}function ea({onClick:e,running:t,disabled:n}){return(0,J.jsxs)(B,{variant:`ghost`,className:`flex-none px-2 text-[15px] sm:px-2.5`,"aria-label":`Refine`,disabled:n||t,onClick:e,"data-tip":`Make the request precise before sending it: nothing runs`,children:[t?(0,J.jsx)(Gt,{state:`thinking`,px:18}):(0,J.jsx)(st,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden sm:inline`,children:`Refine`})]})}function ta({state:t,onStop:n,onUndo:r,onClose:a}){let[o,s]=(0,q.useState)(!1),c=t.job,l=t.result,u=!t.error&&(!c||c.running),d=t.error||c?.lines.filter(e=>!/^→ |^args /.test(e)).slice(-3).join(` `)||`Refine gave no result.`;return(0,J.jsxs)(`div`,{"aria-live":`polite`,className:`-mt-1 mb-3 flex flex-col gap-2 border-b border-line-soft pb-3 text-[13px]`,children:[(0,J.jsxs)(`div`,{className:`flex min-h-7 flex-wrap items-center gap-x-2 gap-y-1`,children:[u?(0,J.jsx)(Gt,{state:`thinking`,px:18,label:`Refining`}):l?(0,J.jsx)(zt,{icon:he,size:16}):(0,J.jsx)(zt,{icon:Oe,size:16,className:`text-fail`}),(0,J.jsx)(`span`,{className:z(`font-medium`,u&&`shimmer`),children:(0,J.jsx)(`span`,{children:u?`Refining your request…`:l?`Refined: your request below, made precise`:`Refine did not finish`})}),u&&(0,J.jsx)(`span`,{className:`text-muted`,children:`Checking it against the capabilities, the systems and the project. Nothing runs.`}),l&&(0,J.jsxs)(`span`,{className:`text-muted`,children:[l.grounded.filter(e=>e.checked).length,` of `,l.grounded.length,` facts checked`]}),(0,J.jsx)(`span`,{className:`flex-auto`}),u?(0,J.jsxs)(B,{size:`sm`,variant:`ghost`,onClick:n,children:[(0,J.jsx)(e,{"aria-hidden":`true`}),`Stop`]}):(0,J.jsxs)(J.Fragment,{children:[l&&(l.assumed.length>0||typeof l.ste==`number`)&&(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":o,onClick:()=>s(!o),className:`inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-[8px] border-0 bg-transparent px-2 font-medium text-muted hover:bg-surface-strong hover:text-ink`,children:[`Details`,(0,J.jsx)(R,{size:14,"aria-hidden":`true`,className:z(`transition-transform`,o&&`rotate-180`)})]}),l&&(0,J.jsxs)(`button`,{type:`button`,onClick:r,"data-tip":`Put your own words back`,className:`inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-[8px] border-0 bg-transparent px-2 font-medium text-muted hover:bg-surface-strong hover:text-ink`,children:[(0,J.jsx)(ye,{size:14,"aria-hidden":`true`}),`Undo`]}),(0,J.jsx)(`button`,{type:`button`,"aria-label":`Close the note`,"data-tip":`Close the note`,onClick:a,className:`inline-flex size-7 flex-none cursor-pointer items-center justify-center rounded-[7px] border-0 bg-transparent text-muted hover:bg-surface-strong hover:text-ink`,children:(0,J.jsx)(i,{size:14,"aria-hidden":`true`})})]})]}),!u&&!l&&(0,J.jsx)(`p`,{className:`m-0 rounded-[10px] bg-fail-soft px-3 py-1.5 text-fail [overflow-wrap:anywhere]`,children:d}),l&&l.missing.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 rounded-[10px] bg-warn-soft px-3 py-1.5`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5 font-medium text-warn`,children:[(0,J.jsx)(zt,{icon:Oe,size:14}),`Still missing: add it before you send`]}),(0,J.jsx)(`ul`,{className:`m-0 list-disc pl-5 text-ink-2`,children:l.missing.map(e=>(0,J.jsx)(`li`,{children:e},e))})]}),l&&(0,J.jsx)(dn,{open:o,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-1 text-muted [overflow-wrap:anywhere]`,children:[l.assumed.length>0&&(0,J.jsxs)(`p`,{className:`m-0`,children:[`Assumed: `,l.assumed.join(`; `)]}),typeof l.ste==`number`&&(0,J.jsxs)(`p`,{className:`m-0`,children:[Math.round(l.ste*100),`% of its sentences in plain technical English`]})]})})]})}function na(e){requestAnimationFrame(()=>{let t=document.getElementById(e);t&&(t.focus(),t.setSelectionRange(0,0),t.scrollTop=0)})}function ra({open:e,onClose:t,children:n,className:r,label:i,role:a=`menu`,side:o=`up`}){let s=(0,q.useRef)(null),[c,l]=(0,q.useState)({});return(0,q.useLayoutEffect)(()=>{if(!e||o!==`auto`||!s.current?.parentElement)return;let t=s.current.parentElement.getBoundingClientRect(),n=window.innerHeight-t.bottom-16,r=t.top-16;l(n>=s.current.scrollHeight||n>=r?{top:t.height+8,bottom:`auto`,maxHeight:n}:{bottom:t.height+8,top:`auto`,maxHeight:r})},[e,o]),(0,q.useEffect)(()=>{if(!e)return;let n=e=>{s.current&&!s.current.parentElement?.contains(e.target)&&t()},r=e=>{e.key===`Escape`&&t()};return document.addEventListener(`mousedown`,n),document.addEventListener(`keydown`,r),()=>{document.removeEventListener(`mousedown`,n),document.removeEventListener(`keydown`,r)}},[e,t]),An(e,120)?(0,J.jsx)(`div`,{ref:s,role:a,"aria-label":i,inert:!e||void 0,style:c,className:z(e?`fade-in`:`menu-out`,`absolute bottom-[52px] z-10 min-w-[260px] overflow-y-auto rounded-[14px] border border-line bg-bg p-1.5 shadow-menu`,r),children:n}):null}function ia({checked:e,onSelect:t,role:n,children:r}){return(0,J.jsxs)(`button`,{type:`button`,role:n,"aria-checked":e,onClick:t,className:`flex min-h-11 w-full cursor-pointer items-center gap-2.5 rounded-[10px] border-0 bg-transparent px-3 text-left text-sm text-ink hover:bg-surface-strong`,children:[r,(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`w-[18px] text-accent-fg`,children:e?`✓`:``})]})}function aa({onClick:e,children:t}){return(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`flex min-h-9 w-full cursor-pointer items-center rounded-[8px] border-0 bg-transparent px-3 text-left text-[13px] text-ink hover:bg-surface-strong`,children:t})}var oa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 150`,width:`2.06em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#34a853`,d:`M255.285 143.47c-.084-.524-.164-1.042-.251-1.56a128.1 128.1 0 0 0-12.794-38.288a128.8 128.8 0 0 0-23.45-31.86a129.2 129.2 0 0 0-22.713-18.005c.049-.08.09-.168.14-.25c2.582-4.461 5.172-8.917 7.755-13.38l7.576-13.068c1.818-3.126 3.632-6.26 5.438-9.386q.643-1.115 1.023-2.297a11.78 11.78 0 0 0-.36-8.188q-.32-.76-.743-1.472a11.7 11.7 0 0 0-4.08-4.064a11.85 11.85 0 0 0-5.005-1.61a12 12 0 0 0-2.218.02q-.912.094-1.814.33a11.74 11.74 0 0 0-7.154 5.467c-1.814 3.127-3.628 6.26-5.438 9.386l-7.576 13.069c-2.583 4.462-5.173 8.918-7.755 13.38c-.282.487-.567.973-.848 1.467q-.586-.237-1.172-.462c-14.24-5.43-29.688-8.4-45.836-8.4c-.442 0-.879 0-1.324.006c-14.357.143-28.152 2.64-41.022 7.12a119 119 0 0 0-4.42 1.642c-.262-.455-.532-.911-.79-1.367c-2.583-4.462-5.173-8.918-7.755-13.38l-7.576-13.07a3915 3915 0 0 1-5.439-9.386A11.74 11.74 0 0 0 48.5.048a11.7 11.7 0 0 0-5.01 1.612a11.7 11.7 0 0 0-4.077 4.063c-.281.474-.532.967-.742 1.473a11.8 11.8 0 0 0-.365 8.188c.259.786.594 1.554 1.023 2.296a3973 3973 0 0 1 5.439 9.386q3.793 6.535 7.58 13.069c2.582 4.462 5.168 8.918 7.75 13.38c.02.038.046.075.065.112A129 129 0 0 0 45.32 64.38a129.7 129.7 0 0 0-22.2 24.015a128 128 0 0 0-9.34 15.24a128.2 128.2 0 0 0-10.843 28.764a131 131 0 0 0-1.951 9.524c-.087.518-.167 1.042-.247 1.56A125 125 0 0 0 0 149.118h256q-.307-2.837-.734-5.636z`}),(0,J.jsx)(`path`,{fill:`#202124`,d:`M194.59 113.712c5.122-3.41 5.867-11.3 1.661-17.62c-4.203-6.323-11.763-8.682-16.883-5.273c-5.122 3.41-5.868 11.3-1.662 17.621c4.203 6.322 11.764 8.682 16.883 5.272m-116.071-5.25c4.206-6.321 3.46-14.21-1.662-17.62c-5.123-3.41-12.68-1.05-16.886 5.27c-4.203 6.323-3.458 14.212 1.662 17.622c5.122 3.41 12.683 1.05 16.886-5.272`})]})),sa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 315`,width:`0.99em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{d:`M213.803 167.03c.442 47.58 41.74 63.413 42.197 63.615c-.35 1.116-6.599 22.563-21.757 44.716c-13.104 19.153-26.705 38.235-48.13 38.63c-21.05.388-27.82-12.483-51.888-12.483c-24.061 0-31.582 12.088-51.51 12.871c-20.68.783-36.428-20.71-49.64-39.793c-27-39.033-47.633-110.3-19.928-158.406c13.763-23.89 38.36-39.017 65.056-39.405c20.307-.387 39.475 13.662 51.889 13.662c12.406 0 35.699-16.895 60.186-14.414c10.25.427 39.026 4.14 57.503 31.186c-1.49.923-34.335 20.044-33.978 59.822M174.24 50.199c10.98-13.29 18.369-31.79 16.353-50.199c-15.826.636-34.962 10.546-46.314 23.828c-10.173 11.763-19.082 30.589-16.678 48.633c17.64 1.365 35.66-8.964 46.64-22.262`})]})),ca=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 242`,width:`1.28em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsxs)(`defs`,{children:[(0,J.jsxs)(`linearGradient`,{id:`SVG4V795Kgq`,x1:`58.972%`,x2:`37.191%`,y1:`7.411%`,y2:`103.762%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#114a8b`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#0669bc`})]}),(0,J.jsxs)(`linearGradient`,{id:`SVGzpurqcJr`,x1:`59.719%`,x2:`52.691%`,y1:`52.313%`,y2:`54.864%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopOpacity:.3}),(0,J.jsx)(`stop`,{offset:`7.1%`,stopOpacity:.2}),(0,J.jsx)(`stop`,{offset:`32.1%`,stopOpacity:.1}),(0,J.jsx)(`stop`,{offset:`62.3%`,stopOpacity:.05}),(0,J.jsx)(`stop`,{offset:`100%`,stopOpacity:0})]}),(0,J.jsxs)(`linearGradient`,{id:`SVGZ5kCkZNr`,x1:`37.279%`,x2:`62.473%`,y1:`4.6%`,y2:`99.979%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#3ccbf4`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2892df`})]})]}),(0,J.jsx)(`path`,{fill:`url(#SVG4V795Kgq)`,d:`M85.343.003h75.753L82.457 233a12.08 12.08 0 0 1-11.442 8.216H12.06A12.06 12.06 0 0 1 .633 225.303L73.898 8.219A12.08 12.08 0 0 1 85.343 0z`}),(0,J.jsx)(`path`,{fill:`#0078d4`,d:`M195.423 156.282H75.297a5.56 5.56 0 0 0-3.796 9.627l77.19 72.047a12.14 12.14 0 0 0 8.28 3.26h68.02z`}),(0,J.jsx)(`path`,{fill:`url(#SVGzpurqcJr)`,d:`M85.343.003a11.98 11.98 0 0 0-11.471 8.376L.723 225.105a12.045 12.045 0 0 0 11.37 16.112h60.475a12.93 12.93 0 0 0 9.921-8.437l14.588-42.991l52.105 48.6a12.33 12.33 0 0 0 7.757 2.828h67.766l-29.721-84.935l-86.643.02L161.37.003z`}),(0,J.jsx)(`path`,{fill:`url(#SVGZ5kCkZNr)`,d:`M182.098 8.207A12.06 12.06 0 0 0 170.67.003H86.245c5.175 0 9.773 3.301 11.428 8.204L170.94 225.3a12.062 12.062 0 0 1-11.428 15.92h84.429a12.062 12.062 0 0 0 11.425-15.92z`})]})),la=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`defs`,{children:(0,J.jsxs)(`radialGradient`,{id:`SVGwZwAicDR`,cx:`50.141%`,cy:`50.003%`,r:`50.119%`,fx:`50.141%`,fy:`50.003%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#797979`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#4c4c4c`})]})}),(0,J.jsx)(`circle`,{cx:127.949,cy:128.603,r:127.397,fill:`#f5bb60`}),(0,J.jsx)(`circle`,{cx:114.961,cy:115.615,r:114.685,fill:`#e86f32`}),(0,J.jsx)(`circle`,{cx:130.16,cy:100.416,r:99.485,fill:`#e53d42`}),(0,J.jsx)(`circle`,{cx:138.174,cy:108.43,r:91.471,fill:`#bfd141`}),(0,J.jsx)(`circle`,{cx:131.542,cy:115.062,r:84.839,fill:`#6db64c`}),(0,J.jsx)(`circle`,{cx:118.001,cy:101.798,r:71.298,fill:`#afdbe7`}),(0,J.jsx)(`circle`,{cx:129.607,cy:89.915,r:59.691,fill:`#57badf`}),(0,J.jsx)(`circle`,{cx:137.069,cy:97.376,r:52.506,fill:`#02b2d6`}),(0,J.jsx)(`circle`,{cx:129.331,cy:104.837,r:44.768,fill:`url(#SVGwZwAicDR)`}),(0,J.jsx)(`circle`,{cx:129.331,cy:104.837,r:44.768,fill:`#231f20`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`M141.088 98.971c4.439 1.992 10.56-2.016 13.672-8.951s2.036-14.173-2.402-16.164c-4.44-1.992-10.56 2.016-13.672 8.951s-2.037 14.173 2.402 16.164`})]})),ua=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 246`,width:`1.26em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsxs)(`defs`,{children:[(0,J.jsxs)(`linearGradient`,{id:`SVGvnhR7dox`,x1:`99.14%`,x2:`33.859%`,y1:`112.708%`,y2:`37.755%`,children:[(0,J.jsx)(`stop`,{offset:`18%`,stopColor:`#0052cc`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2684ff`})]}),(0,J.jsxs)(`linearGradient`,{id:`SVGgker3cTp`,x1:`.926%`,x2:`66.18%`,y1:`-12.582%`,y2:`62.306%`,children:[(0,J.jsx)(`stop`,{offset:`18%`,stopColor:`#0052cc`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2684ff`})]})]}),(0,J.jsx)(`path`,{fill:`url(#SVGvnhR7dox)`,d:`M9.26 187.33c-2.64 4.307-5.607 9.305-8.126 13.287a8.127 8.127 0 0 0 2.722 11.052l52.823 32.507a8.127 8.127 0 0 0 11.256-2.763c2.113-3.536 4.835-8.127 7.801-13.044c20.926-34.538 41.974-30.312 79.925-12.19l52.376 24.908a8.127 8.127 0 0 0 10.93-4.063l25.152-56.886a8.127 8.127 0 0 0-4.063-10.646c-11.052-5.201-33.034-15.562-52.823-25.111c-71.189-34.579-131.691-32.344-177.972 42.949`}),(0,J.jsx)(`path`,{fill:`url(#SVGgker3cTp)`,d:`M246.115 58.232c2.641-4.307 5.607-9.305 8.127-13.287a8.127 8.127 0 0 0-2.723-11.052L198.696 1.386a8.127 8.127 0 0 0-11.58 2.682c-2.113 3.535-4.835 8.127-7.802 13.043c-20.926 34.538-41.974 30.313-79.925 12.19L47.176 4.515a8.127 8.127 0 0 0-10.93 4.063L11.093 65.465a8.127 8.127 0 0 0 4.063 10.645c11.052 5.202 33.035 15.563 52.823 25.112c71.351 34.538 131.854 32.222 178.135-42.99`})]})),da=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 208`,width:`1.49em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{d:`M205.28 31.36c14.096 14.88 20.016 35.2 22.512 63.68c6.626 0 12.805 1.47 16.976 7.152l7.792 10.56A17.55 17.55 0 0 1 256 123.2v28.688c-.008 3.704-1.843 7.315-4.832 9.504C215.885 187.222 172.35 208 128 208c-49.066 0-98.19-28.273-123.168-46.608c-2.989-2.189-4.825-5.8-4.832-9.504V123.2c0-3.776 1.2-7.424 3.424-10.464l7.792-10.544c4.173-5.657 10.38-7.152 16.992-7.152c2.496-28.48 8.4-48.8 22.512-63.68C77.331 3.165 112.567.06 127.552 0H128c14.72 0 50.4 2.88 77.28 31.36m-77.264 47.376c-3.04 0-6.544.176-10.272.544c-1.312 4.896-3.248 9.312-6.08 12.128c-11.2 11.2-24.704 12.928-31.936 12.928c-6.802 0-13.927-1.42-19.744-5.088c-5.502 1.808-10.786 4.415-11.136 10.912c-.586 12.28-.637 24.55-.688 36.824c-.026 6.16-.05 12.322-.144 18.488c.024 3.579 2.182 6.903 5.44 8.384C79.936 185.92 104.976 192 128.016 192c23.008 0 48.048-6.08 74.512-18.144c3.258-1.48 5.415-4.805 5.44-8.384c.317-18.418.062-36.912-.816-55.312h.016c-.342-6.534-5.648-9.098-11.168-10.912c-5.82 3.652-12.927 5.088-19.728 5.088c-7.232 0-20.72-1.728-31.936-12.928c-2.832-2.816-4.768-7.232-6.08-12.128a106 106 0 0 0-10.24-.544m-26.941 43.93c5.748 0 10.408 4.66 10.408 10.409v19.183c0 5.749-4.66 10.409-10.408 10.409s-10.408-4.66-10.408-10.409v-19.183c0-5.748 4.66-10.408 10.408-10.408m53.333 0c5.749 0 10.409 4.66 10.409 10.409v19.183c0 5.749-4.66 10.409-10.409 10.409c-5.748 0-10.408-4.66-10.408-10.409v-19.183c0-5.748 4.66-10.408 10.408-10.408M81.44 28.32c-11.2 1.12-20.64 4.8-25.44 9.92c-10.4 11.36-8.16 40.16-2.24 46.24c4.32 4.32 12.48 7.2 21.28 7.2c6.72 0 19.52-1.44 30.08-12.16c4.64-4.48 7.52-15.68 7.2-27.04c-.32-9.12-2.88-16.64-6.72-19.84c-4.16-3.68-13.6-5.28-24.16-4.32m68.96 4.32c-3.84 3.2-6.4 10.72-6.72 19.84c-.32 11.36 2.56 22.56 7.2 27.04c10.56 10.72 23.36 12.16 30.08 12.16c8.8 0 16.96-2.88 21.28-7.2c5.92-6.08 8.16-34.88-2.24-46.24c-4.8-5.12-14.24-8.8-25.44-9.92c-10.56-.96-20 .64-24.16 4.32M128 56c-2.56 0-5.6.16-8.96.48c.32 1.76.48 3.68.64 5.76c0 1.44 0 2.88-.16 4.48c3.2-.32 5.92-.32 8.48-.32s5.28 0 8.48.32c-.16-1.6-.16-3.04-.16-4.48c.16-2.08.32-4 .64-5.76c-3.36-.32-6.4-.48-8.96-.48`})]})),fa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 250`,width:`1.24em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#161614`,d:`M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0m-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931m6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66m4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08m7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27m9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622m10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868m10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403`})]})),pa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 247`,width:`1.25em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#e24329`,d:`m251.845 97.642l-.328-.986l-34.85-90.903c-.657-1.808-1.972-3.287-3.616-4.274Q210.586 0 207.627 0c-1.973 0-3.78.822-5.26 1.973a8.73 8.73 0 0 0-3.124 4.767l-23.506 71.999H80.56l-23.506-72c-.493-1.808-1.644-3.451-3.123-4.766C52.45.822 50.643 0 48.67 0s-3.781.329-5.425 1.48c-1.644.986-2.96 2.465-3.617 4.273L4.781 96.656l-.33.986c-10.355 26.959-1.479 57.37 21.535 74.794h.328c0 .164 53.096 39.944 53.096 39.944l26.3 19.89l15.946 12c3.78 2.96 9.205 2.96 12.986 0l15.945-12l26.3-19.89l53.424-39.944c23.014-17.425 31.726-47.835 21.37-74.794z`}),(0,J.jsx)(`path`,{fill:`#fc6d26`,d:`m251.845 97.642l-.328-.986c-17.26 3.616-33.205 10.85-46.849 21.04c-.164 0-41.424 31.398-76.602 57.863a18377 18377 0 0 0 48.657 36.821l53.424-39.944c23.013-17.425 31.726-47.835 21.37-74.794z`}),(0,J.jsx)(`path`,{fill:`#fca326`,d:`m79.245 212.38l26.301 19.89l15.945 12c3.78 2.96 9.206 2.96 12.986 0l15.945-12l26.301-19.89s-22.684-17.095-48.657-36.82c-26.136 19.725-48.82 36.82-48.82 36.82`}),(0,J.jsx)(`path`,{fill:`#fc6d26`,d:`M51.465 117.697c-13.644-10.192-29.589-17.589-46.849-21.04l-.329.985c-10.356 26.959-1.479 57.37 21.534 74.794h.33c0 .164 53.094 39.944 53.094 39.944s22.685-17.095 48.821-36.82c-35.013-26.466-76.272-57.699-76.601-57.863`})]})),ma=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 206`,width:`1.5em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#ea4335`,d:`m170.252 56.819l22.253-22.253l1.483-9.37C153.437-11.677 88.976-7.496 52.42 33.92C42.267 45.423 34.734 59.764 30.717 74.573l7.97-1.123l44.505-7.34l3.436-3.513c19.797-21.742 53.27-24.667 76.128-6.168z`}),(0,J.jsx)(`path`,{fill:`#4285f4`,d:`M224.205 73.918a100.25 100.25 0 0 0-30.217-48.722l-31.232 31.232a55.52 55.52 0 0 1 20.379 44.037v5.544c15.35 0 27.797 12.445 27.797 27.796c0 15.352-12.446 27.485-27.797 27.485h-55.671l-5.466 5.934v33.34l5.466 5.231h55.67c39.93.311 72.553-31.494 72.864-71.424a72.3 72.3 0 0 0-31.793-60.453`}),(0,J.jsx)(`path`,{fill:`#34a853`,d:`M71.87 205.796h55.593V161.29H71.87a27.3 27.3 0 0 1-11.399-2.498l-7.887 2.42l-22.409 22.253l-1.952 7.574c12.567 9.489 27.9 14.825 43.647 14.757`}),(0,J.jsx)(`path`,{fill:`#fbbc05`,d:`M71.87 61.426C31.94 61.663-.237 94.227.001 134.158a72.3 72.3 0 0 0 28.222 56.88l32.248-32.246c-13.99-6.322-20.208-22.786-13.887-36.776s22.786-20.208 36.775-13.888a27.8 27.8 0 0 1 13.887 13.888l32.248-32.248A72.22 72.22 0 0 0 71.87 61.427`})]})),ha=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 231`,width:`1.34em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`defs`,{children:(0,J.jsxs)(`linearGradient`,{id:`SVGR9diIphF`,x1:`108.633%`,x2:`46.927%`,y1:`13.818%`,y2:`78.776%`,children:[(0,J.jsx)(`stop`,{offset:`18%`,stopColor:`#0052cc`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2684ff`})]})}),(0,J.jsxs)(`g`,{fill:`none`,children:[(0,J.jsx)(`path`,{d:`M101.272 152.561h53.449l12.901-75.319H87.06z`}),(0,J.jsx)(`path`,{fill:`#2684ff`,d:`M8.308 0A8.202 8.202 0 0 0 .106 9.516l34.819 211.373a11.155 11.155 0 0 0 10.909 9.31h167.04a8.2 8.2 0 0 0 8.201-6.89l34.82-213.752a8.202 8.202 0 0 0-8.203-9.514zm146.616 152.768h-53.315l-14.436-75.42h80.67z`}),(0,J.jsx)(`path`,{fill:`url(#SVGR9diIphF)`,d:`M244.61 77.242h-76.916l-12.909 75.36h-53.272l-62.902 74.663a11.1 11.1 0 0 0 7.171 2.704H212.73a8.196 8.196 0 0 0 8.196-6.884z`})]})]})),ga=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsxs)(`defs`,{children:[(0,J.jsxs)(`linearGradient`,{id:`SVGSBI7obaC`,x1:`98.031%`,x2:`58.888%`,y1:`.161%`,y2:`40.766%`,children:[(0,J.jsx)(`stop`,{offset:`18%`,stopColor:`#0052cc`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2684ff`})]}),(0,J.jsxs)(`linearGradient`,{id:`SVGHifZlbzE`,x1:`100.665%`,x2:`55.402%`,y1:`.455%`,y2:`44.727%`,children:[(0,J.jsx)(`stop`,{offset:`18%`,stopColor:`#0052cc`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#2684ff`})]})]}),(0,J.jsx)(`path`,{fill:`#2684ff`,d:`M244.658 0H121.707a55.5 55.5 0 0 0 55.502 55.502h22.649V77.37c.02 30.625 24.841 55.447 55.466 55.467V10.666C255.324 4.777 250.55 0 244.658 0`}),(0,J.jsx)(`path`,{fill:`url(#SVGSBI7obaC)`,d:`M183.822 61.262H60.872c.019 30.625 24.84 55.447 55.466 55.467h22.649v21.938c.039 30.625 24.877 55.43 55.502 55.43V71.93c0-5.891-4.776-10.667-10.667-10.667`}),(0,J.jsx)(`path`,{fill:`url(#SVGHifZlbzE)`,d:`M122.951 122.489H0c0 30.653 24.85 55.502 55.502 55.502h22.72v21.867c.02 30.597 24.798 55.408 55.396 55.466V133.156c0-5.891-4.776-10.667-10.667-10.667`})]})),_a=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 339`,width:`0.92em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{d:`M189.485 144.651c-3.445.99-6.306 3.4-7.867 6.626l-1.015 2.087l.014 2.918c0 2.721.057 3.06.832 4.977c1.072 2.72 2.143 4.399 4.103 6.316c3.383 3.355 7.19 4.23 12.294 2.89a12.13 12.13 0 0 0 7.288-6.147a10.6 10.6 0 0 0 1.128-7.02c-.902-6.387-4.652-11.026-10.207-12.647a14.94 14.94 0 0 0-6.57 0m-129.746.07c-4.3 1.354-7.515 4.512-9.164 9.01a16.7 16.7 0 0 0-.846 7.33c.803 4.357 4.37 8.319 8.43 9.404c5.104 1.34 8.91.465 12.294-2.89c1.974-1.917 3.031-3.595 4.103-6.316c.775-1.917.832-2.256.832-4.977l.014-2.918l-1.015-2.087a12.6 12.6 0 0 0-7.966-6.654a14.4 14.4 0 0 0-6.682.099m58.987 28.197c-1.847 1.001-3.144 3.525-2.75 5.4c.438 2.016 2.214 4.06 4.977 5.738c1.48.888 1.58 1.015 1.65 1.917c.056.536-.141 2.059-.409 3.426c-.282 1.325-.507 2.735-.507 3.13c.028 1.043.986 2.75 2.016 3.567c.902.733 1.071.761 3.595.832c2.312.07 2.791.014 3.722-.423c2.382-1.156 2.988-3.3 2.114-7.402c-.733-3.426-.592-3.947 1.227-5.005c1.931-1.128 3.962-3.087 4.568-4.427a5.146 5.146 0 0 0-2.467-6.767a5.56 5.56 0 0 0-2.552-.465c-1.777 0-2.919.423-5.005 1.748l-1.198.747l-.748-.45c-3.087-1.834-3.651-2.045-5.512-2.017a5.6 5.6 0 0 0-2.721.451m5.498-30.946c-5.258.508-6.696.705-9.22 1.213c-4.103.846-9.587 2.75-13.408 4.624c-13.252 6.485-22.402 17.285-25.193 29.804c-.564 2.481-.635 3.299-.635 7.472c0 4.145.07 5.033.607 7.388c3.722 16.354 18.779 28.436 38.262 30.635c4.23.465 22.501.465 26.73 0c15.65-1.762 29.1-10.25 35.148-22.148c1.607-3.186 2.382-5.245 3.101-8.487c.55-2.355.62-3.243.62-7.374c0-4.187-.07-5.005-.634-7.486c-4.06-18.187-21.697-32.482-43.31-35.203a97 97 0 0 0-12.054-.438zm9.094 13.21a46.3 46.3 0 0 1 20.301 7.247c3.144 2.087 7.571 6.457 9.46 9.333c2.34 3.539 3.666 7.162 4.272 11.56c.282 2.017.14 3.54-.606 6.796c-1.128 4.864-4.68 9.94-9.474 13.492a44 44 0 0 1-9.714 4.906c-5.386 1.72-8.91 2.03-21.5 1.946c-8.205-.085-9.671-.141-12.026-.592c-8.036-1.509-14.408-4.709-19.033-9.587c-3.721-3.947-5.427-7.543-6.344-13.337c-.423-2.707.353-7.176 1.932-10.94c1.917-4.596 6.88-10.292 11.786-13.577c5.681-3.792 13.168-6.485 20.048-7.218c2.636-.282 8.261-.282 10.898-.028M55.735.103a23.3 23.3 0 0 0-9.63 4.2c-8.092 6.133-14.352 19.188-17.002 35.444c-.987 6.147-1.678 14.662-1.678 21.19c0 7.669.903 17.481 2.186 24.263c.282 1.508.437 2.847.324 2.932q-1.302 1.091-2.637 2.143a75 75 0 0 0-13.379 14.38A77.4 77.4 0 0 0 .667 137.63a93.4 93.4 0 0 0-.325 19.132c1.283 10.996 4.582 20.273 10.25 28.76l1.833 2.75l-.522.902c-3.792 6.372-7.02 15.578-8.53 24.418c-1.184 6.993-1.339 8.868-1.339 18.243c0 9.446.127 11.321 1.24 17.848c1.34 7.825 4.061 16.115 7.092 21.627c1.001 1.805 3.426 5.54 3.722 5.738c.099.043-.197.945-.648 1.988a104.4 104.4 0 0 0-7.726 26.406c-.874 5.88-1.001 7.783-1.001 13.972c0 7.895.437 11.73 2.087 18.031l.24.917h20.836l-.704-1.283c-4.188-7.782-4.582-22.205-.96-36.613c1.65-6.655 3.525-11.547 7.022-18.272l2.086-4.088v-2.496c0-2.326-.042-2.594-.803-4.13a12.9 12.9 0 0 0-2.735-3.525a24.5 24.5 0 0 1-5.428-7.655c-5.978-12.97-7.134-32.23-2.933-48.654c1.749-6.851 4.639-12.942 7.67-16.27a11.1 11.1 0 0 0 3.144-7.485c0-2.75-.987-5.005-3.158-7.36a44.2 44.2 0 0 1-11.519-24.376c-1.973-13.534 1.608-28.267 9.728-39.954c7.938-11.476 19.075-18.836 31.538-20.795c2.806-.465 8.036-.395 10.94.14c3.187.565 5.175.396 7.219-.577c2.523-1.199 3.778-2.679 5.273-6.077c1.31-3.03 2.326-4.694 5.075-8.12c3.299-4.089 6.485-6.894 11.589-10.278c5.822-3.806 12.463-6.584 19.06-7.909c2.397-.493 3.525-.564 8.023-.564s5.61.07 8.022.564a57.4 57.4 0 0 1 26.984 14.056c1.65 1.537 5.61 6.443 6.88 8.487c.479.804 1.339 2.496 1.86 3.764c1.48 3.398 2.75 4.878 5.273 6.063c1.974.958 4.032 1.156 7.092.634c4.836-.818 8.557-.747 13.294.226c16.129 3.242 30.17 16.537 36.388 34.357c5.428 15.621 3.891 31.961-4.173 44.452c-1.367 2.115-2.72 3.807-4.695 5.907c-4.243 4.54-4.243 10.18-.014 14.846c6.95 7.599 11.293 26.307 9.982 42.802c-.874 10.884-3.666 20.626-7.515 26.139a29.6 29.6 0 0 1-3.158 3.637a12.9 12.9 0 0 0-2.735 3.524c-.76 1.537-.803 1.805-.803 4.131v2.51l2.086 4.088c3.497 6.711 5.358 11.603 7.021 18.258c3.567 14.21 3.257 28.337-.832 36.387q-.353.671-.62 1.382c0 .084 4.639.127 10.32.127h10.292l.282-1.043l.507-1.89c.268-1.071.804-4.23 1.241-7.274c.409-3.06.409-14.324 0-17.736c-1.55-12.336-4.159-22.134-8.417-31.383c-.45-1.043-.747-1.945-.648-1.988c.113-.07.803-1.043 1.522-2.143c5.301-8.022 8.558-18.102 10.208-31.41c.437-3.666.437-19.428 0-22.953c-1.17-9.093-2.566-15.254-4.907-21.5a86 86 0 0 0-4.638-9.868l-.536-.903l1.847-2.735c5.668-8.515 8.967-17.792 10.25-28.76a93.4 93.4 0 0 0-.339-19.146a77.7 77.7 0 0 0-13.238-32.976a75 75 0 0 0-13.393-14.38a114 114 0 0 1-2.623-2.143a9.8 9.8 0 0 1 .325-2.932c2.932-15.325 2.833-34.443-.24-49.387c-2.679-13.027-7.543-23.375-13.816-29.352c-4.991-4.766-10.095-6.796-16.213-6.415c-14.042.832-25.377 16.988-29.832 42.436a96 96 0 0 0-1.368 10.235c0 .508-.099.93-.211.93a13.5 13.5 0 0 1-2.101-1.099a68.5 68.5 0 0 0-34.611-9.827c-11.73 0-23.784 3.426-34.626 9.841c-.662.427-1.36.795-2.086 1.1c-.113 0-.212-.423-.212-.93a95 95 0 0 0-1.367-10.222C85.665 19.627 76.36 4.5 63.996.679A29.6 29.6 0 0 0 55.75.101zm4.13 19.765c3.497 2.777 7.374 10.7 9.616 19.569c.422 1.593.845 3.44.972 4.116c.099.663.367 2.143.578 3.285c.945 5.146 1.382 10.715 1.438 17.482l.029 6.697l-1.692 2.467l-1.664 2.51h-3.92c-4.567 0-9.107.577-13.449 1.748l-3.355.846c-.466.098-.536-.043-.804-2.03a119 119 0 0 1 .226-32.751c1.748-11.11 5.822-21.162 9.812-24.122c.945-.705 1.114-.691 2.213.183m138.516-.17c2.397 1.777 5.047 6.486 7.021 12.52c3.948 12.04 5.076 28.592 2.99 44.34c-.269 1.973-.34 2.128-.805 2.03l-3.355-.846a52 52 0 0 0-13.45-1.749h-3.919l-1.678-2.509l-1.677-2.467l.028-6.683c.056-9.432.93-16.777 3.017-24.982c2.213-8.783 6.118-16.707 9.587-19.484c1.1-.874 1.268-.888 2.241-.17`})]})),va=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 260`,width:`1.19em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{d:`M239.184 106.203a64.72 64.72 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.72 64.72 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.67 64.67 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.77 64.77 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483m-97.56 136.338a48.4 48.4 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.6 8.6 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601M37.158 197.93a48.35 48.35 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.34 8.34 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803M23.549 85.38a48.5 48.5 0 0 1 25.58-21.333v61.39a8.29 8.29 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.82.82 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405zm179.466 41.695l-63.08-36.63L161.73 77.86a.82.82 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.54 8.54 0 0 0-4.4-7.213m21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.72.72 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391zM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.6 8.6 0 0 0-4.246 7.367zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218z`})]})),ya=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M254.953 144.253c8.959-70.131-40.569-134.248-110.572-143.206C74.378-7.912 10.005 41.616 1.047 111.619c-8.959 70.003 40.569 134.248 110.572 143.334c70.131 8.959 134.248-40.569 143.334-110.7`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m174.2 82.184l-54.007 54.007l-15.23-15.23c53.111-53.11 58.358-48.503 69.236-38.777`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M120.193 137.47c-.384 0-.64-.128-.896-.384l-15.357-15.229a1.237 1.237 0 0 1 0-1.791c54.006-54.007 59.637-48.888 71.027-38.65c.256.256.384.512.384.896s-.128.64-.384.896l-54.006 53.878c-.128.256-.512.384-.768.384m-13.437-16.509l13.437 13.438l52.087-52.087c-9.47-8.446-15.87-11.006-65.524 38.65`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m135.678 151.676l-14.717-14.718l54.006-54.006c14.462 14.59-7.166 38.265-39.289 68.724`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M135.678 152.956c-.384 0-.64-.128-.895-.384l-14.718-14.718c-.256-.256-.256-.512-.256-.896c0-.383.128-.64.384-.895L174.2 82.056a1.237 1.237 0 0 1 1.792 0a15.58 15.58 0 0 1 4.991 11.902c-.256 14.206-16.38 32.25-44.28 58.614c-.384.256-.768.384-1.024.384m-12.925-15.998c8.19 8.319 11.646 11.646 12.925 12.926c21.5-20.476 42.36-41.464 42.489-55.926c.128-3.327-1.152-6.655-3.328-9.214z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m105.22 121.345l10.878 10.878q.384.384 0 .768c-.128.128-.128.128-.256.128l-22.524 4.863c-1.152.128-2.176-.64-2.432-1.791c-.128-.64.128-1.28.512-1.664l13.054-13.054c.256-.256.64-.384.768-.128`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M92.934 139.262c-1.92 0-3.327-1.536-3.327-3.455c0-.896.384-1.792 1.024-2.432l13.053-13.054c.768-.64 1.792-.64 2.56 0l10.878 10.878c.768.64.768 1.792 0 2.56c-.256.256-.512.384-.896.512l-22.524 4.863c-.256 0-.512.128-.768.128m11.902-16.509l-12.542 12.542c-.256.256-.384.64-.128 1.024c.128.384.512.511.896.384l21.116-4.608z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`M202.738 52.238c-8.19-7.935-21.372-7.679-29.306.64c-7.935 8.318-7.679 21.372.64 29.306A20.68 20.68 0 0 0 199.154 85l-14.59-14.59z`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M188.405 89.223c-12.158 0-22.012-9.854-22.012-22.012s9.854-22.012 22.012-22.012c5.63 0 11.134 2.176 15.23 6.143c.255.256.383.512.383.896s-.128.64-.384.896L186.357 70.41l13.566 13.566c.512.512.512 1.28 0 1.792l-.256.256c-3.328 2.047-7.295 3.2-11.262 3.2m0-41.336c-10.75 0-19.453 8.702-19.325 19.452c0 10.75 8.703 19.453 19.453 19.325c2.943 0 5.887-.64 8.574-2.048l-13.437-13.31c-.256-.256-.384-.512-.384-.896c0-.383.128-.64.384-.895l17.149-17.15c-3.456-2.943-7.807-4.478-12.414-4.478`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m203.122 52.622l-.256-.256l-18.3 18.044l14.461 14.462c1.408-.896 2.815-1.92 3.967-3.072a20.51 20.51 0 0 0 .128-29.178`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M199.155 86.28c-.384 0-.64-.128-.896-.384l-14.59-14.59c-.255-.256-.383-.512-.383-.896c0-.383.128-.64.384-.895l18.172-18.173a1.237 1.237 0 0 1 1.792 0l.384.256c8.575 8.574 8.575 22.396.128 31.098c-1.28 1.28-2.687 2.432-4.223 3.328c-.384.128-.64.256-.768.256m-12.798-15.87l12.926 12.926c1.024-.64 2.048-1.536 2.815-2.303c7.295-7.295 7.679-19.197.64-26.876z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`M176.375 84.488a7.88 7.88 0 0 0-11.134 0l-48.247 48.247l8.062 8.063l51.063-44.792c3.328-2.816 3.583-7.807.768-11.134c-.256-.128-.384-.256-.512-.384`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M124.928 142.078c-.384 0-.64-.128-.896-.384l-8.062-8.063a1.237 1.237 0 0 1 0-1.792l48.247-48.247a9.115 9.115 0 0 1 12.926 0a9.115 9.115 0 0 1 0 12.926l-.384.384l-51.063 44.792q-.192.384-.768.384m-6.143-9.343l6.271 6.271l50.167-44.024c2.816-2.304 3.072-6.527.768-9.342c-2.303-2.816-6.527-3.072-9.342-.768c-.128.128-.256.256-.512.384z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`M80.008 187.637c-.511.256-.767.768-.64 1.28l2.176 9.214c.512 1.28-.256 2.816-1.664 3.2c-1.023.384-2.175 0-2.815-.768l-14.078-13.95l45.944-45.943l15.87.256l10.75 10.75c-2.56 2.175-18.045 17.149-55.543 35.961`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M78.985 202.61c-1.024 0-2.048-.383-2.688-1.151l-13.95-13.95c-.255-.256-.383-.512-.383-.895c0-.384.128-.64.384-.896l45.943-45.944c.256-.256.64-.384.896-.384l15.87.256c.383 0 .64.128.895.384l10.75 10.75c.256.256.384.64.384 1.024s-.128.64-.512.896l-.896.767c-13.565 11.902-31.994 23.804-54.902 35.194l2.176 9.087c.384 1.663-.384 3.455-1.92 4.35c-.768.385-1.408.513-2.047.513m-14.078-15.996l13.182 13.053c.384.64 1.152.896 1.791.512c.64-.384.896-1.152.512-1.792l-2.175-9.214c-.256-1.152.256-2.176 1.28-2.687c22.651-11.39 40.952-23.164 54.39-34.81l-9.47-9.47l-14.718-.256z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m52.11 197.62l11.005-11.006l16.382 16.38l-26.108-1.791c-1.152-.128-1.92-1.152-1.791-2.304c0-.512.128-1.024.511-1.28`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`m79.497 204.146l-26.236-1.791c-1.92-.128-3.2-1.792-3.071-3.712c.128-.768.384-1.535 1.024-2.047L62.22 185.59a1.237 1.237 0 0 1 1.791 0l16.381 16.38c.384.385.512.897.256 1.408q-.384.768-1.151.768m-16.382-15.74l-10.11 10.11c-.384.255-.384.895 0 1.151c.128.128.256.256.512.256l22.652 1.536zm41.337-41.849c-.768 0-1.28-.64-1.28-1.28c0-.384.128-.64.384-.896l12.414-12.414a1.237 1.237 0 0 1 1.792 0l8.062 8.063c.384.384.512.768.384 1.28c-.128.384-.512.768-1.024.896l-20.476 4.35zm12.414-11.902l-8.447 8.446l13.822-2.943z`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`m124.8 140.926l-14.077 3.071c-1.024.256-2.048-.384-2.304-1.408c-.128-.64 0-1.28.512-1.791l7.807-7.807z`}),(0,J.jsx)(`path`,{fill:`#ff6c37`,d:`M110.467 145.277a3.17 3.17 0 0 1-3.2-3.2c0-.895.384-1.663.896-2.303l7.807-7.807a1.237 1.237 0 0 1 1.792 0l8.062 8.063c.384.384.512.768.384 1.28c-.128.384-.512.768-1.024.896l-14.077 3.071zm6.399-10.622l-6.911 6.91c-.256.257-.256.513-.128.768q.192.384.768.384l11.774-2.56zm86.384-69.748c-.256-.767-1.152-1.151-1.92-.895c-.767.256-1.151 1.151-.895 1.92c0 .127.128.255.128.383c.768 1.536.512 3.456-.512 4.863c-.512.64-.384 1.536.128 2.048c.64.512 1.535.384 2.047-.256c1.92-2.432 2.304-5.503 1.024-8.063`})]})),ba=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 227`,width:`1.36em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#362d59`,d:`M148.368 12.403a23.935 23.935 0 0 0-41.003 0L73.64 70.165c52.426 26.174 87.05 78.177 90.975 136.642h-23.679c-3.918-50.113-34.061-94.41-79.238-116.448l-31.213 53.97a81.6 81.6 0 0 1 47.307 62.375h-54.38a3.895 3.895 0 0 1-3.178-5.69l15.069-25.626a55 55 0 0 0-17.221-9.738L3.167 191.277a23.27 23.27 0 0 0 8.662 31.982a23.9 23.9 0 0 0 11.583 3.075h74.471a99.43 99.43 0 0 0-41.003-88.72l11.84-20.5c35.679 24.504 55.754 66.038 52.79 109.22h63.094c2.99-65.43-29.047-127.512-84.107-162.986l23.935-41.002a3.947 3.947 0 0 1 5.382-1.384c2.716 1.486 103.993 178.208 105.89 180.258a3.895 3.895 0 0 1-3.486 5.792h-24.396q.46 9.789 0 19.528h24.499A23.53 23.53 0 0 0 256 202.91a23 23 0 0 0-3.178-11.685z`})]})),xa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 239`,width:`1.3em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsxs)(`defs`,{children:[(0,J.jsxs)(`linearGradient`,{id:`SVGCo9xpmZW`,x1:`17.372%`,x2:`82.628%`,y1:`-6.51%`,y2:`106.51%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#5a62c3`}),(0,J.jsx)(`stop`,{offset:`50%`,stopColor:`#4d55bd`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#3940ab`})]}),(0,J.jsx)(`path`,{id:`SVGhJCUgeMn`,d:`M136.93 64.476v12.8a32.7 32.7 0 0 1-5.953-.952a38.7 38.7 0 0 1-26.79-22.742h21.848c6.008.022 10.872 4.887 10.895 10.894`})]}),(0,J.jsx)(`path`,{fill:`#5059c9`,d:`M178.563 89.302h66.125c6.248 0 11.312 5.065 11.312 11.312v60.231c0 22.96-18.613 41.574-41.573 41.574h-.197c-22.96.003-41.576-18.607-41.579-41.568V95.215a5.91 5.91 0 0 1 5.912-5.913`}),(0,J.jsx)(`circle`,{cx:223.256,cy:50.605,r:26.791,fill:`#5059c9`}),(0,J.jsx)(`circle`,{cx:139.907,cy:38.698,r:38.698,fill:`#7b83eb`}),(0,J.jsx)(`path`,{fill:`#7b83eb`,d:`M191.506 89.302H82.355c-6.173.153-11.056 5.276-10.913 11.449v68.697c-.862 37.044 28.445 67.785 65.488 68.692c37.043-.907 66.35-31.648 65.489-68.692v-68.697c.143-6.173-4.74-11.296-10.913-11.449`}),(0,J.jsx)(`path`,{d:`M142.884 89.302v96.268a10.96 10.96 0 0 1-6.787 10.062c-1.3.55-2.697.833-4.108.833H76.68c-.774-1.965-1.488-3.93-2.084-5.953a72.5 72.5 0 0 1-3.155-21.076v-68.703c-.143-6.163 4.732-11.278 10.895-11.43z`,opacity:.1}),(0,J.jsx)(`path`,{d:`M136.93 89.302v102.222c0 1.411-.283 2.808-.833 4.108a10.96 10.96 0 0 1-10.062 6.787H79.48c-1.012-1.965-1.965-3.93-2.798-5.954a59 59 0 0 1-2.084-5.953a72.5 72.5 0 0 1-3.155-21.076v-68.703c-.143-6.163 4.732-11.278 10.895-11.43z`,opacity:.2}),(0,J.jsx)(`path`,{d:`M136.93 89.302v90.315c-.045 5.998-4.896 10.85-10.895 10.895H74.597a72.5 72.5 0 0 1-3.155-21.076v-68.703c-.143-6.163 4.732-11.278 10.895-11.43z`,opacity:.2}),(0,J.jsx)(`path`,{d:`M130.977 89.302v90.315c-.046 5.998-4.897 10.85-10.895 10.895H74.597a72.5 72.5 0 0 1-3.155-21.076v-68.703c-.143-6.163 4.732-11.278 10.895-11.43z`,opacity:.2}),(0,J.jsx)(`path`,{d:`M142.884 58.523v18.753c-1.012.06-1.965.12-2.977.12s-1.965-.06-2.977-.12a32.7 32.7 0 0 1-5.953-.952a38.7 38.7 0 0 1-26.791-22.742a33 33 0 0 1-1.905-5.954h29.708c6.007.023 10.872 4.887 10.895 10.895`,opacity:.1}),(0,J.jsx)(`use`,{href:`#SVGhJCUgeMn`,opacity:.2}),(0,J.jsx)(`use`,{href:`#SVGhJCUgeMn`,opacity:.2}),(0,J.jsx)(`path`,{d:`M130.977 64.476v11.848a38.7 38.7 0 0 1-26.791-22.743h15.896c6.008.023 10.872 4.888 10.895 10.895`,opacity:.2}),(0,J.jsx)(`path`,{fill:`url(#SVGCo9xpmZW)`,d:`M10.913 53.581h109.15c6.028 0 10.914 4.886 10.914 10.913v109.151c0 6.027-4.886 10.913-10.913 10.913H10.913C4.886 184.558 0 179.672 0 173.645V64.495C0 58.466 4.886 53.58 10.913 53.58`}),(0,J.jsx)(`path`,{fill:`#fff`,d:`M94.208 95.125h-21.82v59.416H58.487V95.125H36.769V83.599h57.439z`})]})),Sa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#0078d4`,d:`M0 0h121.329v121.329H0zm134.671 0H256v121.329H134.671zM0 134.671h121.329V256H0zm134.671 0H256V256H134.671z`})]})),Ca=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 128 128`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`defs`,{children:(0,J.jsxs)(`linearGradient`,{id:`SVG6uMEBcPj`,x1:9,x2:9,y1:16.97,y2:1.03,gradientTransform:`scale(7.11111)`,gradientUnits:`userSpaceOnUse`,children:[(0,J.jsx)(`stop`,{offset:0,stopColor:`#0078d4`}),(0,J.jsx)(`stop`,{offset:.16,stopColor:`#1380da`}),(0,J.jsx)(`stop`,{offset:.53,stopColor:`#3c91e5`}),(0,J.jsx)(`stop`,{offset:.82,stopColor:`#559cec`}),(0,J.jsx)(`stop`,{offset:1,stopColor:`#5ea0ef`})]})}),(0,J.jsx)(`path`,{fill:`url(#SVG6uMEBcPj)`,d:`M120.89 28.445v69.262l-28.445 23.324l-44.09-16.07v15.93L23.395 88.25l72.746 5.688V31.574ZM96.64 31.93L55.82 7.11v16.285L18.348 34.418L7.109 48.852v32.785l16.075 7.11V46.718Zm0 0`})]})),wa=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 128 128`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#1a62b3`,d:`M50.782 42.96h26.436a7.536 7.536 0 0 1 7.553 7.552v26.976a7.536 7.536 0 0 1-7.553 7.552H50.782a7.536 7.536 0 0 1-7.553-7.552V50.512a7.536 7.536 0 0 1 7.553-7.553zm55.803 41.611V34.477A13.566 13.566 0 0 0 92.99 20.88H35.01a13.566 13.566 0 0 0-13.595 13.596v59.046a13.566 13.566 0 0 0 13.595 13.595l92.171.002c-.935 11.716-10.67 20.88-22.623 20.88H23.442A22.61 22.61 0 0 1 .783 105.341V22.66A22.61 22.61 0 0 1 23.443 0h81.115a22.61 22.61 0 0 1 22.659 22.66v61.91z`})]})),Ta=(0,q.forwardRef)(({title:e,titleId:t,...n},r)=>(0,J.jsxs)(`svg`,{viewBox:`0 0 128 128`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,J.jsx)(`title`,{id:t,children:e}):null,(0,J.jsx)(`path`,{fill:`#50d18d`,d:`m37.701 127.439l-15.398-14.782a1.813 1.813 0 0 1 0-2.666l15.41-14.773a2.005 2.005 0 0 1 2.78 0l15.412 14.783c.778.73.778 1.936 0 2.666L40.494 127.44a2.003 2.003 0 0 1-2.78 0zm24.907-23.89l-15.41-14.783a1.813 1.813 0 0 1 0-2.656l15.41-14.782a2.005 2.005 0 0 1 2.78 0L80.79 86.11c.778.73.778 1.936 0 2.666l-15.4 14.773a2.01 2.01 0 0 1-2.774 0zm24.908-23.892l-15.4-14.783a1.81 1.81 0 0 1 0-2.656L87.52 47.437a2.005 2.005 0 0 1 2.78 0l15.402 14.781a1.81 1.81 0 0 1 0 2.656L90.29 79.657a2.006 2.006 0 0 1-2.779 0h.01zm-49.346.447L22.758 65.333a1.817 1.817 0 0 1 0-2.66l15.412-14.79a2.004 2.004 0 0 1 2.779 0l15.41 14.784a1.81 1.81 0 0 1 0 2.656L40.95 80.116a2.007 2.007 0 0 1-2.78 0zm24.906-23.89L47.664 41.441a1.817 1.817 0 0 1 0-2.668l15.412-14.781a2.004 2.004 0 0 1 2.78 0l15.4 14.781a1.81 1.81 0 0 1 0 2.658l-15.4 14.781a2.006 2.006 0 0 1-2.774 0v-.01v.005zm-24.43-23.41l-15.42-14.828a1.814 1.814 0 0 1 0-2.667L38.647.56a2.004 2.004 0 0 1 2.78 0l15.41 14.782c.78.731.78 1.937 0 2.667l-15.42 14.75a2.004 2.004 0 0 1-2.78 0l.01.032z`})]})),Ea=`/assets/dataverse-CH0w-aF1.png`,Da=`/assets/zephyr-BNWDPG5u.png`,Oa=(e,t,n)=>r=>(0,J.jsx)(`svg`,{viewBox:`0 0 ${t} ${n}`,...r,children:(0,J.jsx)(`image`,{href:e,width:t,height:n})}),ka=e=>(0,J.jsxs)(`svg`,{viewBox:`-55 0 209 209`,...e,children:[(0,J.jsx)(`path`,{fill:`#31b34b`,d:`m98.092 104.307l-49.011 12.252l-24.54 91.807z`,opacity:`.5`}),(0,J.jsx)(`path`,{fill:`#31b34b`,d:`M98.092 104.307L0 129.024V67.443h73.551l24.718 36.828z`,opacity:`.8`}),(0,J.jsx)(`path`,{fill:`#31b34b`,d:`M0 67.443v61.44L73.551 0z`})]}),Aa=e=>(0,J.jsxs)(`svg`,{viewBox:`0 0 256 153`,...e,children:[(0,J.jsx)(`path`,{className:`logo-ink`,fill:`#252f3e`,d:`M72.392 55.438c0 3.137.34 5.68.933 7.545a45.4 45.4 0 0 0 2.712 6.103c.424.678.593 1.356.593 1.95c0 .847-.508 1.695-1.61 2.543l-5.34 3.56c-.763.509-1.526.763-2.205.763c-.847 0-1.695-.424-2.543-1.187a26 26 0 0 1-3.051-3.984c-.848-1.44-1.696-3.052-2.628-5.001q-9.919 11.697-24.922 11.698c-7.12 0-12.8-2.035-16.954-6.103c-4.153-4.07-6.272-9.495-6.272-16.276c0-7.205 2.543-13.054 7.714-17.462c5.17-4.408 12.037-6.612 20.768-6.612c2.882 0 5.849.254 8.985.678c3.137.424 6.358 1.102 9.749 1.865V29.33c0-6.443-1.357-10.935-3.985-13.563c-2.712-2.628-7.29-3.9-13.817-3.9c-2.967 0-6.018.34-9.155 1.103s-6.188 1.695-9.155 2.882c-1.356.593-2.373.932-2.967 1.102s-1.017.254-1.356.254c-1.187 0-1.78-.848-1.78-2.628v-4.154c0-1.356.17-2.373.593-2.966c.424-.594 1.187-1.187 2.374-1.78q4.45-2.29 10.68-3.815C33.908.763 38.316.255 42.978.255c10.088 0 17.463 2.288 22.21 6.866c4.662 4.577 7.036 11.528 7.036 20.853v27.464zM37.976 68.323c2.798 0 5.68-.508 8.731-1.526c3.052-1.017 5.765-2.882 8.053-5.425c1.357-1.61 2.374-3.39 2.882-5.425c.509-2.034.848-4.493.848-7.375v-3.56a71 71 0 0 0-7.799-1.441a64 64 0 0 0-7.968-.509c-5.68 0-9.833 1.102-12.63 3.391s-4.154 5.51-4.154 9.748c0 3.984 1.017 6.951 3.136 8.986c2.035 2.119 5.002 3.136 8.901 3.136m68.069 9.155c-1.526 0-2.543-.254-3.221-.848c-.678-.508-1.272-1.695-1.78-3.305L81.124 7.799c-.51-1.696-.764-2.798-.764-3.391c0-1.356.678-2.12 2.035-2.12h8.307c1.61 0 2.713.255 3.306.848c.678.509 1.187 1.696 1.695 3.306l14.241 56.117l13.224-56.117c.424-1.695.933-2.797 1.61-3.306c.679-.508 1.866-.847 3.392-.847h6.781c1.61 0 2.713.254 3.39.847c.679.509 1.272 1.696 1.611 3.306l13.394 56.795L168.01 6.442c.508-1.695 1.102-2.797 1.695-3.306c.678-.508 1.78-.847 3.306-.847h7.883c1.357 0 2.12.678 2.12 2.119c0 .424-.085.848-.17 1.356s-.254 1.187-.593 2.12l-20.43 65.525q-.762 2.544-1.78 3.306c-.678.509-1.78.848-3.22.848h-7.29c-1.611 0-2.713-.254-3.392-.848c-.678-.593-1.271-1.695-1.61-3.39l-13.14-54.676l-13.054 54.59c-.423 1.696-.932 2.798-1.61 3.391c-.678.594-1.865.848-3.39.848zm108.927 2.289c-4.408 0-8.816-.509-13.054-1.526c-4.239-1.017-7.544-2.12-9.748-3.39c-1.357-.764-2.29-1.611-2.628-2.374a6 6 0 0 1-.509-2.374V65.78c0-1.78.678-2.628 1.95-2.628a4.8 4.8 0 0 1 1.526.255c.508.17 1.271.508 2.119.847a46 46 0 0 0 9.324 2.967a51 51 0 0 0 10.088 1.017c5.34 0 9.494-.932 12.376-2.797s4.408-4.577 4.408-8.053c0-2.373-.763-4.323-2.289-5.934s-4.408-3.051-8.561-4.408l-12.292-3.814c-6.188-1.95-10.765-4.832-13.563-8.647c-2.797-3.73-4.238-7.883-4.238-12.291q0-5.34 2.289-9.41c1.525-2.712 3.56-5.085 6.103-6.95c2.543-1.95 5.425-3.391 8.816-4.408c3.39-1.017 6.95-1.441 10.68-1.441c1.865 0 3.815.085 5.68.339c1.95.254 3.73.593 5.51.932c1.695.424 3.306.848 4.832 1.357q2.288.762 3.56 1.525c1.187.679 2.034 1.357 2.543 2.12q.763 1.017.763 2.797v3.984c0 1.78-.678 2.713-1.95 2.713c-.678 0-1.78-.34-3.22-1.018q-7.25-3.306-16.276-3.306c-4.832 0-8.647.763-11.275 2.374c-2.627 1.61-3.984 4.069-3.984 7.544c0 2.374.848 4.408 2.543 6.019s4.832 3.221 9.325 4.662l12.037 3.815c6.103 1.95 10.511 4.662 13.139 8.137s3.9 7.46 3.9 11.868c0 3.645-.764 6.951-2.205 9.833c-1.525 2.882-3.56 5.425-6.188 7.46c-2.628 2.119-5.764 3.645-9.409 4.747c-3.815 1.187-7.799 1.78-12.122 1.78`}),(0,J.jsx)(`path`,{fill:`#f90`,d:`M230.993 120.964c-27.888 20.599-68.408 31.534-103.247 31.534c-48.827 0-92.821-18.056-126.05-48.064c-2.628-2.373-.255-5.594 2.881-3.73c35.942 20.854 80.276 33.484 126.136 33.484c30.94 0 64.932-6.442 96.212-19.666c4.662-2.12 8.646 3.052 4.068 6.442m11.614-13.224c-3.56-4.577-23.566-2.204-32.636-1.102c-2.713.34-3.137-2.034-.678-3.814c15.936-11.19 42.13-7.968 45.181-4.239c3.052 3.815-.848 30.008-15.767 42.554c-2.288 1.95-4.492.933-3.475-1.61c3.39-8.393 10.935-27.296 7.375-31.789`})]}),ja=e=>(0,J.jsxs)(`svg`,{viewBox:`0 0 18.02 20.27`,fill:`#000`,...e,children:[(0,J.jsx)(`path`,{d:`M18.0137 0H12.6097V13.0595H18.0137V0Z`}),(0,J.jsx)(`path`,{d:`M5.4043 0H0V7.43041L5.4043 13.0595V0Z`}),(0,J.jsx)(`path`,{d:`M5.4043 13.0595H0V20.2648H5.4043V13.0595Z`}),(0,J.jsx)(`path`,{d:`M12.6104 13.0595H5.4051L9.68322 18.4634H12.6104V13.0595Z`})]}),Ma=e=>t=>(0,J.jsx)(e,{...t,className:z(t.className,`logo-mono`)}),Na={jira:ga,azure_devops:Ca,confluence:ua,testrail:Ta,qtest:wa,github:Ma(fa),browserstack:la,xray:ka,gitlab:pa,bitbucket:ha,postman:ya,sentry:Ma(ba),testmu:Ma(ja),zephyr:Oa(Da,128,128),dataverse:Oa(Ea,128,98),aws:Aa,gcp:ma},Pa={openai:Ma(va),azure:ca,github_copilot:Ma(da),ollama:Ma(_a)},Fa={android:oa,ios:Ma(sa),windows:Sa};function Ia(e,t){if(!e)return[];let n=[],r=[!e.engine&&`the browser engine`,!e.runtime&&`the agent runtime`].filter(e=>!!e);r.length&&n.push({title:`Install ${r.join(` and `)}`,detail:`The agents run tests with them. Installing needs no admin rights and takes a few minutes.`,fix:`Install what's missing`,to:H(`settings`,`setup`)});let i=e.model.usable??[],a=t??e.model.active;return e.model.ready?a&&!i.includes(a)&&n.push({title:`${a} has no key or sign-in yet`,detail:`Add its key, or pick a model that is ready in the box below: ${i.join(`, `)}.`,fix:`Add its key`,to:H(`settings`,`models`)}):n.push({title:`No model is ready`,detail:e.model.detail,fix:`Add a model key`,to:H(`settings`,`models`)}),n}function La(e){let t=K(e?.environments),n=Object.entries(K(t.environments)).map(([e,t])=>({name:e,env:K(t)}));return{envs:n,fallback:[K(e?.config.environments).default,t.default].find(e=>typeof e==`string`&&n.some(t=>t.name===e))||(n.length===1?n[0].name:``)}}function Ra(e){let t=e?.config||{},n=K(t.browser),r=K(t.sources),i=[`jira`,`azure_devops`,`testrail`,`xray`,`zephyr`,`qtest`,`github`].find(e=>r[e]),a={jira:`Jira`,azure_devops:`Azure DevOps`,testrail:`TestRail`,xray:`Xray`,zephyr:`Zephyr`,qtest:`qTest`,github:`GitHub`},o=String(n.provider||`local`);return{code:!0,headed:n.headless===!1,repo:K(t.code).repo?String(K(t.code).repo):`the project folder`,browser:o===`local`?`Chrome on this machine`:o===`testmu`?`TestMu AI`:o===`browserstack`?`BrowserStack`:o,cases:i?a[i]:`Files in the project`}}var za={azure:`Azure OpenAI`,openai:`OpenAI`,ollama:`Ollama`,openai_compatible:`OpenAI-compatible`,github_copilot:`GitHub Copilot`,github:`GitHub Models`,anthropic:`Anthropic`};function Ba({children:e}){return(0,J.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-[11.5px] font-semibold tracking-wide text-muted uppercase`,children:e})}function Va({tools:e,onChange:n,chat:r}){let i=(t,r,i,a)=>(0,J.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-[10px] px-3 py-2.5 hover:bg-surface-muted`,children:[(0,J.jsx)(pn,{icon:t}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:i}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted [overflow-wrap:anywhere]`,children:a})]}),(0,J.jsx)(Rn,{checked:e[r],label:i,onChange:t=>n({...e,[r]:t})})]}),a=(e,t,n)=>(0,J.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-2`,children:[(0,J.jsx)(zt,{icon:e,size:16,className:`flex-none text-muted`}),(0,J.jsx)(`span`,{className:`flex-1 text-sm text-ink-2`,children:t}),(0,J.jsx)(`span`,{className:`truncate text-sm text-ink`,children:n})]});return(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(Ba,{children:r?`This chat, from your next message`:`This chat`}),i(v,`code`,`Write the test`,`Turn a passed run into a test in ${e.repo}`),i(Ze,`headed`,`Show the browser`,`Watch each run in a Chrome window`),(0,J.jsx)(`div`,{className:`mx-3 my-1.5 border-t border-line-soft`}),(0,J.jsx)(Ba,{children:`From your settings`}),a(Pe,`Browsers run on`,e.browser),a(t,`Test cases from`,e.cases),r?.model&&(0,J.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-2`,children:[Pa[r.provider||``]?(()=>{let e=Pa[r.provider||``];return(0,J.jsx)(e,{"aria-hidden":`true`,className:`size-4 flex-none`})})():(0,J.jsx)(zt,{icon:he,size:16,className:`flex-none text-muted`}),(0,J.jsx)(`span`,{className:`flex-1 text-sm text-ink-2`,children:`Model`}),(0,J.jsx)(`span`,{className:`truncate text-sm text-ink`,children:r.model})]}),(0,J.jsx)(`div`,{className:`mx-1.5 mt-1 mb-1 flex flex-wrap gap-x-1`,children:(0,J.jsxs)(`a`,{href:H(`settings`),className:`flex min-h-9 items-center gap-2 rounded-[10px] px-1.5 text-[13px] font-medium no-underline hover:bg-surface-muted`,children:[(0,J.jsx)(_,{size:14,"aria-hidden":`true`}),`Change them in Settings`]})})]})}function Ha({models:e,current:t,onPick:n,auto:r=!0}){let i=(e,r=!1)=>{let i=t===e.name;return(0,J.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i,onClick:()=>n(e.name),className:z(`flex w-full cursor-pointer items-center gap-3 rounded-[10px] border-0 px-3 py-2 text-left hover:bg-surface-muted`,i?`bg-accent-soft hover:bg-accent-soft`:`bg-transparent`),children:[r?(0,J.jsx)(`span`,{className:`flex size-9 flex-none items-center justify-center rounded-[10px] bg-[linear-gradient(135deg,var(--color-accent),var(--color-accent-grad))] text-accent-ink`,children:(0,J.jsx)(zt,{icon:he,size:17})}):Pa[e.provider]?(0,J.jsx)(pn,{logo:Pa[e.provider]}):(0,J.jsx)(pn,{icon:M}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm font-medium text-ink`,children:e.name}),!r&&za[e.provider]&&(0,J.jsx)(`span`,{className:`flex-none text-[11.5px] text-muted`,children:za[e.provider]})]}),e.note&&(0,J.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.note})]}),(0,J.jsx)(s,{size:16,"aria-hidden":`true`,className:z(`flex-none text-accent-fg`,!i&&`invisible`)})]},e.name)};return(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(Ba,{children:`Model for this chat`}),r&&i({name:`Auto routing`,provider:``,note:`The cheapest model good enough for each step`},!0),e.length>0&&(0,J.jsxs)(J.Fragment,{children:[r&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`mx-3 my-1.5 border-t border-line-soft`}),(0,J.jsx)(Ba,{children:`Your models`})]}),(0,J.jsx)(`div`,{className:`flex flex-col`,children:e.map(e=>i(e))})]}),(0,J.jsx)(`div`,{className:`mx-3 my-1.5 border-t border-line-soft`}),(0,J.jsxs)(`a`,{href:H(`settings`,`models`),className:`mx-1.5 mb-1 flex min-h-9 items-center gap-2 rounded-[10px] px-1.5 text-[13px] font-medium no-underline hover:bg-surface-muted`,children:[(0,J.jsx)(_,{size:14,"aria-hidden":`true`}),`Manage models`]})]})}var Ua={web:Pe,api:fe,desktop:qe,mobile:me};function Wa({icon:e,label:t,value:n}){return(0,J.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 px-3 py-1 text-[12.5px]`,children:[(0,J.jsx)(zt,{icon:e,size:14,className:`mt-0.5 flex-none text-muted`}),(0,J.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[(0,J.jsx)(`span`,{className:`font-medium text-ink`,children:t}),n&&(0,J.jsxs)(`span`,{className:`text-muted`,children:[` `,n]})]})]})}function Ga({row:e}){let t=e.env,n=Object.entries(K(t.apps)).map(([e,t])=>({...K(t),name:e})),r=Object.entries(K(t.variables)),i=Object.entries(K(t.data)),a=Object.keys(K(t.databases)),o=Array.isArray(t.secrets)?t.secrets.filter(e=>typeof e==`string`):[],s=typeof t.file==`string`?t.file:``,c=!s&&!n.length&&!r.length&&!i.length&&!a.length&&!o.length;return(0,J.jsxs)(`div`,{className:`flex flex-col pb-1`,children:[(0,J.jsxs)(Ba,{children:[`What the agent gets in `,e.name]}),(0,J.jsxs)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:[s&&(0,J.jsx)(Wa,{icon:Ae,label:`Read from`,value:s}),n.map(e=>(0,J.jsx)(Wa,{icon:Ua[String(e.kind||`web`)]||Pe,label:e.name,value:[String(e.url||e.path||e.app_id||``),e.login?`signs in as ${String(e.login)}`:``].filter(Boolean).join(` · `)},`app:${e.name}`)),r.length>0&&(0,J.jsx)(Wa,{icon:ne,label:`Values`,value:r.map(([e,t])=>`${e} = ${String(t??``)}`).join(`, `)}),i.length>0&&(0,J.jsx)(Wa,{icon:Ve,label:`Test data`,value:i.map(([e,t])=>`${e}: ${String(t)}`).join(`, `)}),a.length>0&&(0,J.jsx)(Wa,{icon:L,label:`Databases`,value:a.join(`, `)}),o.length>0&&(0,J.jsx)(Wa,{icon:ce,label:`Secrets, by name`,value:o.join(`, `)}),c&&(0,J.jsx)(`li`,{className:`px-3 py-1 text-[12.5px] text-muted`,children:`Nothing set yet. Add its apps and test data in Settings.`})]})]})}function Ka({envs:e,current:t,onPick:n}){let r=e.find(e=>e.name===t);return(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(Ba,{children:`Environment for this chat`}),e.length?e.map(e=>{let r=e.name===t,i=typeof e.env.description==`string`?e.env.description:``;return(0,J.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r,onClick:()=>n(e.name),className:z(`flex w-full cursor-pointer items-center gap-3 rounded-[10px] border-0 px-3 py-2 text-left hover:bg-surface-muted`,r?`bg-accent-soft hover:bg-accent-soft`:`bg-transparent`),children:[(0,J.jsx)(pn,{icon:C}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm font-medium text-ink`,children:e.name}),i&&(0,J.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:i})]}),(0,J.jsx)(s,{size:16,"aria-hidden":`true`,className:z(`flex-none text-accent-fg`,!r&&`invisible`)})]},e.name)}):(0,J.jsx)(`p`,{className:`m-0 px-3 py-1 text-[12.5px] text-muted`,children:`No environments yet. Add one with its apps, test data and the names of its secrets.`}),r&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`mx-3 my-1.5 border-t border-line-soft`}),(0,J.jsx)(Ga,{row:r})]}),(0,J.jsx)(`div`,{className:`mx-3 my-1.5 border-t border-line-soft`}),(0,J.jsxs)(`a`,{href:H(`settings`,`environments`),className:`mx-1.5 mb-1 flex min-h-9 items-center gap-2 rounded-[10px] px-1.5 text-[13px] font-medium no-underline hover:bg-surface-muted`,children:[(0,J.jsx)(_,{size:14,"aria-hidden":`true`}),`Manage environments`]})]})}function qa(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(()=>Ra(null)),[u,d]=(0,q.useState)(``);(0,q.useEffect)(()=>{St.state().then(e=>{r(e),e.ready&&St.machine().then(a,()=>{}),e.ready&&Mt.settings().then(e=>{t(e),l(Ra(e))},()=>{})},()=>{})},[]);let f=Object.entries(K(e?.models.models)).map(([e,t])=>({name:e,provider:String(K(t).provider||``),note:String(K(t).description||``)})).filter(e=>e.provider!==`mock`&&e.name!==`mock`),p=String(K(e?.config.llm).routing||`off`)===`auto`,m=e=>typeof e==`string`&&f.some(t=>t.name===e)?e:``,h=m(e?.models.default)||f[0]?.name||``,g=u||(p?`Auto routing`:m(K(e?.config.llm).active)||h||`Auto routing`),{envs:_,fallback:v}=La(e),y=_.some(e=>e.name===o)?o:v,b={profile:f.some(e=>e.name===g)?g:void 0,headed:c.headed,code:c.code,env:y||void 0};return{snap:e,setup:n,machine:i,ready:!n||n.ready,tools:c,setTools:l,profiles:f,current:g,setModel:d,envs:_,environment:y,setEnvName:s,choice:b}}function Ja({c:e}){let[t,n]=(0,q.useState)(``);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`relative`,children:[(0,J.jsxs)(B,{variant:`ghost`,className:`max-w-[40vw] px-2 text-[15px] sm:px-2.5`,"aria-expanded":t===`env`,"aria-haspopup":`menu`,"aria-label":`Environment: ${e.environment||`none`}`,onClick:()=>n(t===`env`?``:`env`),children:[(0,J.jsx)(fe,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden truncate sm:inline`,children:e.environment||`Environment`}),(0,J.jsx)(R,{size:16,"aria-hidden":`true`,className:`hidden sm:block`})]}),(0,J.jsx)(ra,{open:t===`env`,onClose:()=>n(``),label:`Environment for this chat`,role:`dialog`,side:`auto`,className:`left-0 w-[min(400px,calc(100vw-48px))]`,children:(0,J.jsx)(Ka,{envs:e.envs,current:e.environment,onPick:e.setEnvName})})]}),(0,J.jsxs)(`div`,{className:`relative`,children:[(0,J.jsxs)(B,{variant:`ghost`,className:`px-2 text-[15px] sm:px-2.5`,"aria-expanded":t===`tools`,"aria-haspopup":`menu`,"aria-label":`Tools`,onClick:()=>n(t===`tools`?``:`tools`),children:[(0,J.jsx)(Ie,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden sm:inline`,children:`Tools`}),(e.tools.headed||!e.tools.code)&&(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full bg-accent`})]}),(0,J.jsx)(ra,{open:t===`tools`,onClose:()=>n(``),label:`Tools for this chat`,role:`dialog`,side:`auto`,className:`left-0 w-[min(380px,calc(100vw-48px))]`,children:(0,J.jsx)(Va,{tools:e.tools,onChange:e.setTools})})]})]})}function Ya({c:e}){let[t,n]=(0,q.useState)(!1),r=e.profiles.find(t=>t.name===e.current)?.provider||``,i=e.current===`Auto routing`?void 0:Pa[r];return(0,J.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,J.jsxs)(B,{variant:`ghost`,className:`max-w-[46vw] min-w-0 px-2 text-[15px] sm:px-2.5`,"aria-expanded":t,"aria-haspopup":`menu`,"aria-label":`Model: ${e.current}`,onClick:()=>n(!t),children:[i?(0,J.jsx)(i,{"aria-hidden":`true`,className:`size-4`}):(0,J.jsx)(pe,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden truncate sm:inline`,children:e.current}),(0,J.jsx)(R,{size:16,"aria-hidden":`true`,className:`hidden sm:block`})]}),(0,J.jsx)(ra,{open:t,onClose:()=>n(!1),label:`Model`,side:`auto`,className:`right-0 w-[min(400px,calc(100vw-48px))]`,children:(0,J.jsx)(Ha,{models:e.profiles,current:e.current,onPick:t=>{e.setModel(t),n(!1)}})})]})}function Xa({chat:e,thread:t,ended:n,busy:r,snap:i,onError:a}){let[o,s]=(0,q.useState)(!1),c=t.model?.name||``;if(!c)return null;let l=K(i?.models.models),u=(t.models||[]).map(e=>({...e,note:String(K(l[e.name]).description||``)})),d=Pa[t.model?.provider||``],f=u.length<2;return(0,J.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,J.jsxs)(B,{variant:`ghost`,className:`max-w-[46vw] min-w-0 px-2 text-[15px] sm:px-2.5`,disabled:n||r||f,"data-tip":f?`This chat has no other model to switch to`:r?`When ForgeQE has finished`:void 0,"aria-expanded":o,"aria-haspopup":`menu`,"aria-label":`Model: ${c}`,onClick:()=>s(!o),children:[d?(0,J.jsx)(d,{"aria-hidden":`true`,className:`size-4`}):(0,J.jsx)(pe,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden truncate sm:inline`,children:c}),!f&&(0,J.jsx)(R,{size:16,"aria-hidden":`true`,className:`hidden sm:block`})]}),(0,J.jsx)(ra,{open:o,onClose:()=>s(!1),label:`Model`,side:`auto`,className:`right-0 w-[min(400px,calc(100vw-48px))]`,children:(0,J.jsx)(Ha,{models:u,current:c,auto:!1,onPick:t=>{s(!1),t!==c&&Xt.model(e,t).catch(e=>a(e.message))}})})]})}function Za({chat:e,thread:t,ended:n,snap:r,onError:i}){let[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)({});(0,q.useEffect)(()=>c({}),[t.headed,t.writeTests]);let l={...Ra(r),headed:s.headed??t.headed??!1,code:s.code??t.writeTests??!0};return(0,J.jsxs)(`div`,{className:`relative`,children:[(0,J.jsxs)(B,{variant:`ghost`,className:`px-2 text-[15px] sm:px-2.5`,disabled:n,"aria-expanded":a,"aria-haspopup":`dialog`,"aria-label":`Tools`,onClick:()=>o(!a),children:[(0,J.jsx)(Ie,{"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`hidden sm:inline`,children:`Tools`}),(l.headed||!l.code)&&(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full bg-accent`})]}),(0,J.jsx)(ra,{open:a,onClose:()=>o(!1),label:`Tools for this chat`,role:`dialog`,side:`auto`,className:`left-0 w-[min(380px,calc(100vw-48px))]`,children:(0,J.jsx)(Va,{tools:l,chat:{model:t.model?.name,provider:t.model?.provider},onChange:t=>{let n={};t.headed!==l.headed&&(n.headed=t.headed),t.code!==l.code&&(n.writeTests=t.code),Object.keys(n).length&&(c({headed:t.headed,code:t.code}),Xt.settings(e,n).catch(e=>i(e.message)))}})})]})}function Qa({project:e}){return(0,J.jsxs)(`div`,{role:`status`,className:`flex w-full flex-wrap items-center gap-x-4 gap-y-3 border-y border-line py-4 short:gap-y-2 short:py-2.5`,children:[(0,J.jsx)(zt,{icon:P,size:20,className:`flex-none text-accent-fg`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_280px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Set up ForgeQE first`}),(0,J.jsxs)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:[`Choose your project folder and set ForgeQE up in it. It is not set up in `,e,` yet.`]})]}),(0,J.jsxs)(`a`,{className:z(rn({variant:`primary`}),`short:min-h-8 short:px-3 short:text-[13px]`),href:H(`settings`,`setup`),children:[(0,J.jsx)(_,{"aria-hidden":`true`}),`Set up`]})]})}function $a({c:e}){let t=Ia(e.machine,e.choice.profile);return t.length?(0,J.jsx)(`div`,{role:`status`,className:`flex w-full flex-col gap-3 border-y border-line py-4 short:gap-2 short:py-2.5`,children:t.map(e=>(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3 short:gap-y-2`,children:[(0,J.jsx)(zt,{icon:P,size:20,className:`flex-none text-accent-fg`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_280px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:e.detail})]}),(0,J.jsxs)(`a`,{className:z(rn({variant:`primary`}),`short:min-h-8 short:px-3 short:text-[13px]`),href:e.to,"data-tip":e.fix,children:[e.fix.startsWith(`Add`)?(0,J.jsx)(r,{"aria-hidden":`true`}):(0,J.jsx)(tt,{"aria-hidden":`true`}),e.fix.split(` `)[0]]})]},e.title))}):null}var eo=`forgeqe.regression.handoff`,to=`forgeqe.home.handoff`,no={$comment:`ForgeQE's release notes, newest first: the web app's What's new and each GitHub Release. See RELEASING.md.`,releases:[{version:`2.9.5`,date:`2026-11-11`,summary:`Writing a test from a recording uses far fewer tokens: the coding agent no longer loops on re-reads and repeated edits, and a stopped job carries on fresh. Accessibility checks keep their zoom and no longer pass when nothing ran.`,changes:[{kind:`improved`,title:`The coding agent stops going round in circles`,detail:`When the coding agent re-reads files that have not changed or keeps editing the same files without running the test, ForgeQE stops it and asks for its test. code.repeat_after (default 6) and code.edit_after (default 8) set when, also in Settings. The planner keeps to 15 steps and no longer looks up the same thing twice.`,to:[`settings`]},{kind:`improved`,title:`A stopped or extended job carries on fresh`,detail:`Running a stopped job again, or raising its token budget, now starts a short new session from the job's brief, the agreed plan and the files already written, instead of re-sending the whole earlier conversation on every call.`},{kind:`improved`,title:`Live browser when the replay cannot get through`,detail:`When ForgeQE's replay of a recording cannot reach its last page, the coding agent gets the live browser from the start instead of patching steps blind.`},{kind:`fixed`,title:`Unattended writing no longer asks Carry on?`,detail:`A test written with nobody watching stops at code.max_tokens instead of asking. When a person is asked, Carry on? now says whether the test has been run yet and how many model calls the job made.`},{kind:`fixed`,title:`A stopped job says truthfully what it left`,detail:`A stopped job now lists the files it changed and whether the test ever ran. It no longer says Test run 1 failed or Test written when no test ran.`},{kind:`improved`,title:`See why GitHub Copilot calls cache so little`,detail:`With a Copilot model profile, each call logs a line with its input and cached tokens (never the prompt's text), and the low-cache notice points to it.`},{kind:`fixed`,title:`Accessibility checks keep their zoom and report honestly`,detail:`The low-vision persona's 200% zoom is kept after the page changes. A persona whose run broke (no model, no browser) is now Not tested and fails the check, and forgeqe a11y exits 1 instead of showing a pass. A stopped session lists the personas it never ran, and every persona run includes the axe-core rule checks.`}]},{version:`2.9.4`,date:`2026-11-11`,summary:`Business personas any agent can act as (/priya, /sam and more), BDD skills for Gherkin feature files, Dynamics 365 know-how for the browser agent and Scribe, and project logos that fit the sidebar by themselves.`,changes:[{kind:`new`,title:`Persona agent: test as the business would`,detail:`A business persona is someone who accepts the software the way the business does: a payments expert, an end user, a compliance specialist or an operations manager, each with what they check before they accept it. Five are built in, and the Persona agent drafts your own from a description.`,to:[`agents`,`persona`]},{kind:`new`,title:`/priya, /sam and other persona commands`,detail:`Start a message with a persona's command (/priya, /sam, /dana, /lee, /alex, or your own) in the terminal, forgeqe run or any web chat, and the agent works as that persona. The chat box suggests them after /.`,to:[`agents`,`persona`]},{kind:`new`,title:`Persona page`,detail:`The Persona agent's page has an Agent tab to describe a person and save the persona it drafts, a list of personas with what each checks, and Run as this persona. Each saved persona also gets a readable Markdown profile.`,to:[`agents`,`persona`]},{kind:`new`,title:`Share personas between projects`,detail:`Export personas as a file and import them in another project, from the page or with forgeqe persona export and import. An import adds only new personas, never replaces one, and is refused whole if anything in it is not a persona.`},{kind:`new`,title:`BDD feature files`,detail:`Tests can be written as Gherkin feature files for Reqnroll/SpecFlow, cucumber-js, playwright-bdd, Cucumber-JVM, behave or pytest-bdd. Before writing one, the agent asks whether you want a Scenario Outline with Examples, a Background and Rule blocks, and it writes scenarios from the acceptance criteria.`},{kind:`new`,title:`Dynamics 365 know-how`,detail:`The browser agent knows Dynamics 365's own names for its controls (site map, Quick Create, Quick Find, subgrids, lookups, business process flow and more), and tests written for D365 use reliable locators and wait for the page to settle.`},{kind:`improved`,title:`Project logos fit the sidebar by themselves`,detail:`Settings › Appearance › Logo size has Fit automatically, now the default: the logo is sized from its shape so it is seen and its words can be read. A logo with no project name fills the brand area, and a logo with its own background gets rounded corners instead of a second plate.`,to:[`settings`,`appearance`]}]},{version:`2.9.3`,date:`2026-11-11`,summary:`A redesigned Record page that follows each recording to its test, desktop recordings you can review and edit, video of recordings and replays, ForgeQE working on every Windows, and a hosted mode for forgeqe web.`,changes:[{kind:`improved`,title:`Record page redesigned`,detail:`Record now opens on headline numbers, the New recording form beside a short How it works, and a table of recordings with search and filters. Each row shows its test case, browser, duration and what it produced, with a menu to open, write the test, open the chat, read the steps or delete.`,to:[`record`]},{kind:`new`,title:`See the test written from each recording`,detail:`Every web recording says whether it has a test: No test yet, Writing the test, Test written with its file, Test out of date, Test not passing or Writing failed. Writing again updates that test instead of adding a second one.`,to:[`record`]},{kind:`improved`,title:`Writing a test carries on without you`,detail:`Writing a test from a recording keeps going when you leave the page, and the chat and the recording link to each other. It says why a writing failed, and Stop writing ends one. If the model cannot be reached, ForgeQE checks every 30 seconds for up to 15 minutes and carries on where it stopped.`,to:[`record`]},{kind:`new`,title:`Stop a recording's Re-run`,detail:`A re-run of a web recording now has Stop, so you no longer wait for every step to time out. The steps already done are kept and the result is marked stopped, not failed.`,to:[`record`]},{kind:`new`,title:`Review desktop recordings like web ones`,detail:`A desktop workflow opens in a review with Steps, Test data and Last run tabs. See how each step went on the last replay, add a check, wait or keys after a step, change or drop a step with a preview, and turn a typed value into test data or a secret.`,to:[`desktop`]},{kind:`new`,title:`A picture of each desktop step, and click it to add a check`,detail:`Desktop recordings and replays keep a picture of the app after each step. Click a control in the picture to add a check that it shows its text, or that it is there. A password field's text is never kept.`,to:[`desktop`]},{kind:`new`,title:`Video of recordings, replays and desktop runs`,detail:`Recordings by hand, re-runs and desktop runs now keep a video, and the review plays it. browser.video and desktop.video turn it off. Making a typed value a secret removes that recording's videos.`},{kind:`improved`,title:`Change or remove desktop apps, with arguments`,detail:`Desktop apps' list has Change (path, arguments, description) and Remove, which says first which workflows name the app. Adding an app now takes arguments too, typed as on a command line and never run through a shell.`,to:[`desktop`]},{kind:`new`,title:`Hosted mode for forgeqe web`,detail:`forgeqe web --port 8080 --public-url https://NAME serves a demo or security test through a TLS proxy that limits who gets in. It still listens only on 127.0.0.1 and needs its token. Anyone who gets through the proxy with the link can use ForgeQE and its credentials, so give that server test credentials only.`},{kind:`improved`,title:`Home starts from better requests`,detail:`Home's starters are now three requests written out in full (test cases; test cases and scripts; test cases, scripts and regression): type only your objective. What needs a look is a clear list of rows saying what each one opens.`},{kind:`improved`,title:`Tidier Tosca conversion header`,detail:`A conversion's header keeps Start again, Run and Report as buttons, with Re-import, CI, Pull request and Delete under More.`,to:[`tosca`]},{kind:`improved`,title:`Context and tokens shows the 30-day total`,detail:`The panel's This project section now opens with the project's 30-day token total, which leads to Settings › Tokenomics, and each row has its own icon.`},{kind:`fixed`,title:`ForgeQE works on every Windows`,detail:`Fixes for Windows x64 and ARM64: Tosca exports that could not be read, API tests losing their address, test commands built for the wrong shell, the Azure CLI not starting, short user folder names, and Edge's own new tab appearing at the start of a run. Every change is now tested on Windows too.`},{kind:`fixed`,title:`Git hooks stay off on Windows, and protected folders stay protected`,detail:`On Windows, a git hook in a folder any user could create could run during ForgeQE's own checkouts; it no longer can. The coding agent could also write to ForgeQE's run folder when it was on another drive; that is now refused.`}]},{version:`2.9.2`,date:`2026-11-10`,summary:`A Desktop apps page and a Desktop agent that replays, explores and accepts heals from the web app or chat, recording any desktop app by its path, Copy to edit for built-in skills, and safer project .env files and tool downloads.`,changes:[{kind:`new`,title:`Desktop apps page`,detail:`Quality Engineering › Automation › Desktop apps does what forgeqe desktop does: Workflows, Runs, and Machine and apps tabs, with Replay (variables, data rows, heal, new baselines), Explore and Set up in sheets. Accept a passed replay's heals from its run. Fix with the agent and Why did it fail open a chat.`,to:[`desktop`]},{kind:`new`,title:`Desktop agent in chat`,detail:`The Desktop agent has its own agent page, and in chat it can list workflows and runs, validate a workflow, replay with data rows, accept a passed replay's heals and set up the engine (asking first for anything that changes something).`},{kind:`new`,title:`Record any desktop app`,detail:`Record's app list ends with Another app…: type the program's path or pick it with Browse, name it, and ForgeQE adds it to the environment's apps and records it. Machine and apps has Add an app too. Only a real program file is accepted, never a .bat, .cmd or script.`,to:[`record`]},{kind:`new`,title:`Copy to edit a built-in skill`,detail:`A built-in skill's panel offers Copy to edit: save the project's own copy under the same name, with its reference files, and it replaces the built-in one in this project.`,to:[`skills`]},{kind:`fixed`,title:`Scheduled custom agents keep their request`,detail:`A schedule ran agent run <id> --unattended with no request, because the request was read as the switch's value. It now runs with the request it was given.`,to:[`agents`]},{kind:`fixed`,title:`Sidebar foot stays in view on laptops`,detail:`On laptop-sized windows in some browsers the sidebar ran past the window and hid Settings, Help and Dark/Light. It now fits in every browser.`},{kind:`fixed`,title:`A malformed address no longer blanks the web app`,detail:`An address like #/regression/%E0 left a blank app. Pages now read it safely, and a page that fails to draw shows a short note in its place instead of taking the app down. Errors in ForgeQE's own code now answer 500, not 400.`},{kind:`improved`,title:`A project's .env cannot run other code`,detail:`A cloned repository's .env can no longer set NODE_OPTIONS=--require, LD_PRELOAD, PYTHONSTARTUP, GIT_SSH_COMMAND and similar names that make every program ForgeQE starts load other code. Keys, proxies and CA files load as before; the shell and ForgeQE's own .env are unchanged.`},{kind:`improved`,title:`Downloaded tools need a matching checksum`,detail:`The agent runtime and uv install only when their SHA-256 matches one pinned in ForgeQE. A download whose checksum cannot be checked (a rate limit, a proxy) is refused instead of installed unchecked.`}]},{version:`2.9.1`,date:`2026-11-10`,summary:`Tosca migration grows up: an assistant that sets it up in chat, API, desktop, mobile and database steps converted, batches, CI pipelines and pull requests. Settings › Secrets keeps every secret and pulls from Azure, Google and AWS vaults.`,changes:[{kind:`new`,title:`Tosca assistant`,detail:`The Tosca page opens on an Agent tab. Say what to migrate in your own words; the assistant asks only what it still needs (exports, framework, language, where the tests start, the app or database the cases use, the secret behind each test variable) and opens the wizard on Review with every stage filled in. It can clone exports from a git repository, and conversations survive a restart.`,to:[`tosca`]},{kind:`new`,title:`Tosca converts API, desktop, mobile, database and file steps`,detail:`API test cases become API tests. Desktop and mobile test cases become ForgeQE workflows, written by code with no model, with their test data in a .data.csv and secrets typed from variables; inside a web test they are replayed at their step. Read-only database queries become checks with the target's own client (values bound as parameters), and file and Excel reads become checks. Mixed test cases convert their web and API steps and mark the rest for a person; anything that writes stays for a person.`,to:[`tosca`]},{kind:`new`,title:`Know what can be migrated before you start`,detail:`Every test case of an export is sorted by kind with what becomes of it (also as a CSV), Ready to run checks what the run needs before Start, and Review estimates the conversion's tokens and cost.`,to:[`tosca`]},{kind:`new`,title:`Several exports, batches and re-import`,detail:`A plan can read many .tsu files or a folder of them (duplicates converted once). Convert in batches (--batch N) checks each batch before the next. Read exports again (forgeqe tosca reimport) brings in what changed, and tosca-map.json traces each Tosca test case by its id to its test and last outcome.`,to:[`tosca`]},{kind:`new`,title:`Tosca test data from a data file`,detail:`Name Tosca's Export to Excel of a test sheet, or any CSV, Excel or JSON file, on Review (or forgeqe tosca data) and {XL[...]} values are filled from it instead of left for a person.`,to:[`tosca`]},{kind:`new`,title:`CI pipelines and pull requests for a conversion`,detail:`forgeqe tosca ci (or the CI pipeline sheet) writes a GitHub Actions or Azure Pipelines file with one job per execution list, plus replay jobs for desktop and mobile workflows. Pull request on a finished conversion (or forgeqe tosca pr) commits the target folder on ForgeQE's own branch without touching your checkout.`,to:[`tosca`]},{kind:`improved`,title:`Tosca report built for thousands of test cases`,detail:`One compact summary on top, test cases grouped as Failed, Needs attention, Passed, Not run and Left out, searchable, 50 at a time. Every test run keeps a failure screenshot and a video by default. Download the HTML report as a zip with every video. Activity groups its log by unit, with search and filters. A stopped or failed conversion can be started again from its page.`,to:[`tosca`]},{kind:`new`,title:`Settings › Secrets and vaults`,detail:`Every saved secret by name in one place: add, replace or remove; a value is never shown again. Connect Azure Key Vault, Google Secret Manager or AWS Secrets Manager (browser sign-in recommended), browse names and pull a value straight into the credential store. Export vault connections, without values, for teammates to import. Repository tokens are a filter here, and the suggested token name is now REPO_TOKEN.`,to:[`settings`,`secrets`]},{kind:`fixed`,title:`Desktop replay on Windows`,detail:`Replay brings the app forward and refuses to click or type while another program's window is in front, types text as keys (Save dialogs), and no longer stops when healing is off or its model cannot be used. A heal is remembered only from a replay that passed. Recording by hand catches the OK that closes a dialog.`},{kind:`fixed`,title:`Sidebar and browser detection fixes`,detail:`A shell starting a browser is no longer counted as a browser, and the sidebar no longer falls back to tiles because its icons were mis-measured.`}]},{version:`2.9.0`,date:`2026-11-10`,summary:`Browsers start on locked-down PCs (through Playwright, or attached to one you opened), forgeqe doctor browser explains a failed start, the sidebar keeps your recent chats and pages, and one 30-day token figure across the app.`,changes:[{kind:`new`,title:`Start the browser through Playwright, or attach to your own`,detail:`browser.launch in forgeqe.yaml (and Settings › Browser) is auto, direct, playwright or attach. Auto starts the browser directly and, once this computer stops that, through ForgeQE's own Playwright; what worked is remembered. Attach connects to a browser you started with --remote-debugging-port (browser.attach_port, this computer only) and never closes it. A browser started through Playwright now looks to a site like one started directly.`,to:[`settings`,`browser`]},{kind:`new`,title:`forgeqe doctor browser`,detail:`Tries each way of starting the browser and writes .forgeqe/reports/browser-check-<time>.md with each start's log, the browser policies that block automation, security software, and (on Windows) AppLocker and code integrity events about browsers. Send it when a browser will not start on a managed PC.`},{kind:`fixed`,title:`No browsers left running after a failed start`,detail:`Browsers a failed start leaves behind (relaunched by a launcher, or by a stopped Playwright) are closed right away and checked again over the next minute. A browser on any other profile, yours included, is never touched. A slow first start also gets one more try.`},{kind:`fixed`,title:`Windows update no longer loops`,detail:`On 2.8.x, forgeqe update on Windows could open and close command windows forever without updating. The update now runs once, waits up to 5 minutes for ForgeQE to exit, and clears the stuck scripts an earlier update left behind.`},{kind:`fixed`,title:`Recordings no longer stall when a step leaves the page`,detail:`A click that submitted a form or followed a link could crash Chrome's page renderer about one time in ten, leaving the recording waiting until it timed out. It no longer does.`},{kind:`new`,title:`Recent chats and pages in the sidebar`,detail:`The sidebar lists your recent chats below the main options at every level, and inside a chat shows its last chats under Chat history. Every landing page and category shows its pinned pages and the ones you opened lately. Agents › Chat lists as many chats as fit, a page at a time, with search.`,to:[`browse`]},{kind:`new`,title:`Search Administration`,detail:`A search box on Administration finds its pages and any setting by name or forgeqe.yaml key, and opens its section.`},{kind:`improved`,title:`One token figure across the app`,detail:`The workspace panel, Tokenomics and Cost now share one 30-day window and one total, so chats are counted on Tokenomics too (they showed 0 before). Test-run figures sit below under Test runs, and Cost shows the amount charged at the time beside today's price.`,to:[`settings`,`tokenomics`]},{kind:`improved`,title:`Settings as text`,detail:`Settings › Files is now Settings as text: forgeqe.yaml, llms.json and env.yaml as they are on disk, laid out with the page, with Save always at the foot of the window.`,to:[`settings`]},{kind:`improved`,title:`Shorter buttons, one icon per action`,detail:`Buttons across the web app and the HTML report have short labels and one icon for each kind of action, icon-only where space is short. Checkboxes are animated, and scrollbars are thin and appear only while an area scrolls.`},{kind:`fixed`,title:`Terminal replies no longer flicker blank`,detail:`On a busy machine a reply in the terminal could show empty for a moment while it was highlighted. The words now appear at once and the highlighting follows.`}]},{version:`2.8.9`,date:`2026-11-09`,summary:`Pick the local browser in Settings, wait out a browser launcher handover, and hold every custom-agent sub-agent to the agent's limits.`,changes:[{kind:`new`,title:`Pick the local browser in Settings`,detail:`browser.local_browser in forgeqe.yaml (and Settings › Browser) chooses Automatic (Chrome, then Edge, then Playwright's Chromium), or Chrome, Edge or Chromium alone. It applies to runs, recordings and forgeqe login. A path in BROWSER_USE_EXECUTABLE_PATH still wins.`,to:[`settings`,`browser`]},{kind:`fixed`,title:`Wait when a launcher starts the real browser`,detail:`On some managed Windows PCs the process ForgeQE starts exits after opening another browser on the same DevTools port. ForgeQE now waits for that browser (up to 90s) instead of failing when the launcher exits, and logs each step of the start.`},{kind:`improved`,title:`Every sub-agent a tool starts respects the agent's limits`,detail:`Custom agents' "agents it may start" now covers tools that start a sub-agent without listing it before (DB agent, test planning, product knowledge, defect analysis). The editor offers those agents and warns when a capability needs one the draft does not allow.`,to:[`agents`]},{kind:`fixed`,title:`Safer custom agent pack import`,detail:`Importing a zip refuses oversized or hostile entries, linked paths out of the project, and overwriting another agent's notes. Knowledge and skills are written only inside the project.`,to:[`agents`]}]},{version:`2.8.8`,date:`2026-11-09`,summary:`Fall back when Chrome will not start, category landing pages with what needs a look, and a unique icon for every agent.`,changes:[{kind:`fixed`,title:`Try Edge or Chromium when Chrome will not start`,detail:`Runs, recordings and forgeqe login fall back to Microsoft Edge, then Playwright's Chromium, when installed Chrome closes before it can be driven or does not answer. The report names the browser used. Pin one with BROWSER_USE_EXECUTABLE_PATH, or set BROWSER_USE_FALLBACK=0 to keep that browser only.`},{kind:`improved`,title:`Landing pages show what needs a look`,detail:`Each category's landing page lists what needs attention there and the built-in agents that work in it. Everything shows every category's. Home's suggestions come from more of ForgeQE, and Sign-ins, Environments and Set up no longer say the agents only test.`,to:[`browse`]},{kind:`improved`,title:`Own icons for Agents, Quality Engineering and AI Assurance`,detail:`The three sidebar categories each have a ForgeQE-drawn icon, matching the rest of the nav.`,to:[`browse`]},{kind:`improved`,title:`A unique icon for every agent`,detail:`No two agents on Agents or Settings › Routing share an icon. Chat-only agents (builder, bug report, Evidence and others) have their own faces instead of the Helper. Tooltips keep your agent.app_name when the page is renamed.`,to:[`agents`]}]},{version:`2.8.7`,date:`2026-11-09`,summary:`Delete a custom agent from Details, and a shorter Versions history.`,changes:[{kind:`new`,title:`Delete a custom agent`,detail:`Details opens Delete under Versions. Type the agent id to confirm. It removes the manifest, approved versions, runs, waiting approvals and its schedule job. Knowledge files and skills it named stay. forgeqe agent delete does the same at the terminal.`,to:[`agents`]},{kind:`improved`,title:`Shorter Versions history`,detail:`The current version shows a Running pill. Who approved it uses your git name when set, and long GitHub noreply emails shorten to the username with · web when done in the app.`,to:[`agents`]}]},{version:`2.8.6`,date:`2026-11-08`,summary:`A custom agent's page uses the same ask box and layout as ForgeQE's own agents.`,changes:[{kind:`improved`,title:`Custom agent page like the API agent`,detail:`One large icon, name and description, then the shared chat composer (environment, tools, Refine, model). Starter pills and what it needs sit below. Export, Details and Edit stay as icon buttons; Details opens a right-side panel for reach, versions and runs.`,to:[`agents`]}]},{version:`2.8.5`,date:`2026-11-08`,summary:`Custom agent page matches Jobs, searchable Phosphor and Lucide icons, and chat no longer shows the model price mismatch note.`,changes:[{kind:`improved`,title:`Custom agent page like Jobs`,detail:`An agent's page centres on try and ask, with icon-only Export, Details and Edit. Details opens a right-side panel for reach, versions, runs and approve or disable.`,to:[`agents`]},{kind:`improved`,title:`Search Phosphor and Lucide for agent icons`,detail:`The icon picker searches ForgeQE's faces plus Phosphor and Lucide by name, shows the top ten matches, and offers Show more. Manifests keep only safe ph: and lucide: ids.`,to:[`agents`]},{kind:`fixed`,title:`No price mismatch note when chat starts`,detail:`Opening forgeqe chat no longer prints the Note about llms.json prices not matching the provider. Other commands still show it when the catalog is off.`}]},{version:`2.8.4`,date:`2026-11-08`,summary:`Custom agents: share a zip across projects, and pick an icon from ForgeQE's set.`,changes:[{kind:`new`,title:`Export and import a custom agent`,detail:`Export to share packs agent.json with its knowledge files and skills into a zip. Import agent (or forgeqe agent import) always creates a draft to edit, try and approve. Environments and systems stay in the target project. Same-repo teams still commit .forgeqe/agents.`,to:[`agents`]},{kind:`new`,title:`Icon for each custom agent`,detail:`The builder and editor let you pick one of ForgeQE's agent icons. The Agents list and the agent's page show it; a manifest without an icon uses the Helper face.`,to:[`agents`]}]},{version:`2.8.3`,date:`2026-11-08`,summary:`Tosca report: searchable test list, structured LLM usage, and the failed stage only — no progress bar on a finished conversion.`,changes:[{kind:`improved`,title:`Report scales to many test cases`,detail:`The conversion report lists test cases in a searchable, filterable table (all, needs attention, converted) with paging. Pick a row for Tosca steps, output, and failure screenshots or video instead of scrolling one card per case.`,to:[`tosca`]},{kind:`improved`,title:`LLM usage as labeled figures`,detail:`The report sidebar shows model, tokens (read, cached, written), and cost as rows — not the long CLI usage line with pricing footnotes.`,to:[`tosca`]},{kind:`improved`,title:`Failed stage instead of a progress bar`,detail:`A finished report no longer repeats the Prepare–Review stage row. If a stage failed, one line names that stage and its note.`,to:[`tosca`]}]},{version:`2.8.2`,date:`2026-11-08`,summary:`Tosca: a full-page conversion report with total time, LLM usage and cost, per-test fidelity, and failure screenshots or video.`,changes:[{kind:`new`,title:`Full-page Tosca conversion report`,detail:`Report opens a dedicated page for the conversion instead of a Markdown sheet. It shows total time, model and token cost, every test case with fidelity and output, environment variables to set, and steps a person still has to finish.`,to:[`tosca`]},{kind:`new`,title:`Failure screenshots and video on the report`,detail:`When a converted Playwright test fails, ForgeQE keeps its screenshot and short video under the plan and shows them on the report. New conversions ask Playwright for only-on-failure screenshots and retain-on-failure video.`,to:[`tosca`]},{kind:`improved`,title:`tosca.md includes time and LLM cost`,detail:`The Markdown report written for the CLI and downloads now lists total time, the model, and a readable token and cost line alongside the test table.`}]},{version:`2.8.1`,date:`2026-11-07`,summary:`Tosca: confirming Start opens the running overview at once, and conversion progress stays within 100%.`,changes:[{kind:`fixed`,title:`Confirming Start opens the overview`,detail:`After you type the plan id and start a Tosca conversion, the page leaves the confirm sheet and shows the running overview instead of staying on the plan. A running result is written as soon as the job starts so the list and progress update immediately.`,to:[`tosca`]},{kind:`fixed`,title:`Conversion progress never exceeds 100%`,detail:`The Tosca list and overview counted finished files against the number of test cases only, so exports with many page objects could show 133% or more. Progress now uses every planned unit and stays at most 99% while running.`,to:[`tosca`]},{kind:`improved`,title:`Tooltips use a grey surface`,detail:`Tooltips and the Reports day tip use the muted surface colour so they read clearly on both light and dark themes.`}]},{version:`2.8.0`,date:`2026-11-07`,summary:`Tosca and Migration: Stop ends a stuck run, delete old plans from the page, Cloud exports keep their locators, and __pycache__ no longer looks like an outside edit.`,changes:[{kind:`fixed`,title:`Stop ends a Tosca or Migration run`,detail:`Stop sends SIGTERM the conversion handles, and settles a result left as Running after the process is already gone, so the page does not keep offering Stop with nothing to stop.`,to:[`tosca`]},{kind:`new`,title:`Delete an old Migration or Tosca plan`,detail:`On a plan's page, Delete removes it from the list after you type its id. Converted tests in the target folder stay; a running job must be stopped first.`,to:[`migration`]},{kind:`fixed`,title:`Tosca Cloud exports keep their locators`,detail:`Cloud .tsu files that omit the reverse XParam link no longer convert with empty page objects. ForgeQE fills ExtendableObject the same way it already fills missing TestStep links.`,to:[`tosca`]},{kind:`fixed`,title:`Bytecode caches are not outside edits`,detail:`Python __pycache__ and similar junk are ignored when ForgeQE checks that the agent wrote only inside the target folder, so conversions are not blocked by false Put them back messages. The Tosca export itself is protected the same way.`,to:[`tosca`]}]},{version:`2.7.9`,date:`2026-11-07`,summary:`Tosca conversion reads Tosca Cloud exports and opens browser tests that use OpenUrl and CloseBrowser, so web cases can start instead of showing Mixed or Not supported.`,changes:[{kind:`fixed`,title:`Tosca Cloud exports read their steps`,detail:`Some Tosca Cloud .tsu files list step values only on the step, without the reverse link Commander exports. ForgeQE fills that link before reading, so those exports show real actions, checks and page objects instead of empty Web cases.`,to:[`tosca`]},{kind:`fixed`,title:`OpenUrl and CloseBrowser stay on the web route`,detail:`Tosca's Framework OpenUrl and CloseBrowser modules no longer mark an otherwise Html test as Mixed or Not supported. They become navigate and close steps; TBox Wait becomes a wait. Json and Xml engines show as API (later), not Not supported.`,to:[`tosca`]},{kind:`improved`,title:`Web cases with a few non-web notes can start`,detail:`A test that is mostly web, with only unsupported extras such as mail or screenshots left as marked comments, can be picked and started. Pure API, desktop and other non-web routes still wait for a later version.`,to:[`tosca`]}]},{version:`2.7.8`,date:`2026-11-07`,summary:`Change impact gains Product and Internal views, readiness and pull-request links, and forgeqe web answers on a .localhost name without picking a port.`,changes:[{kind:`improved`,title:`Change impact: Product and Internal`,detail:`Browse a change in two views: Product for how it spreads through the business, and Internal for the whole repository as Graph and Code. Each change sits beside how it spreads, with counts and areas by severity and priority.`,to:[`impact`]},{kind:`improved`,title:`Change impact: readiness and pull requests`,detail:`See readiness, history, effort and confidence on the page, with pull requests, missing tests and links. ForgeQE reads what a change does before it traces impact, and forgeqe impact runs the same analysis from the terminal.`,to:[`impact`]},{kind:`improved`,title:`Change impact layout`,detail:`Compact cards in one row, areas, changes and the files map as tabs, a labelled view toggle, and keyboard focus on an opened area. Regression areas read as plain sentences.`,to:[`impact`]},{kind:`new`,title:`forgeqe web behind a local proxy`,detail:`Serve the app at a .localhost name (for example through portless) without choosing a port yourself. Host and Origin checks still bind to this computer only.`},{kind:`fixed`,title:`Change impact review fixes`,detail:`Security and UI consistency fixes from review on the Change impact pages.`}]},{version:`2.7.7`,date:`2026-11-07`,summary:`Ten new quality pages (flaky tests, release readiness, cost and more), data-driven tests and MFA sign-ins, wider API and cloud testing, desktop replay on macOS and Linux, and a far more reliable mobile agent.`,changes:[{kind:`new`,title:`Flaky tests and run diff`,detail:`Runs › Flaky tests scores each test by how often it flips, passes only on retry or varies in run time, names the likely cause, and quarantines or heals it. Runs › Run diff lines up two runs step by step and shows the first difference that matters.`,to:[`flaky`]},{kind:`new`,title:`Release readiness`,detail:`One verdict for a release from the regression pack, untested changes, the tracker, flaky tests, quality, security and Evidence, with a sign-off record. The agent can work out the verdict; signing off stays with a person.`,to:[`readiness`]},{kind:`new`,title:`Test debt`,detail:`Untested code and business rules, tests that never fail or test nothing that exists any more, near-duplicate tests, and cases not yet automated, in one place.`,to:[`test-debt`]},{kind:`new`,title:`Feature-flag matrix`,detail:`Read your flags from env.yaml, LaunchDarkly or Unleash (read only) and run the regression pack for each combination, all of them or pairwise.`,to:[`flags`]},{kind:`new`,title:`Production signals`,detail:`Errors from Sentry, Datadog and Application Insights, with which of them no test covers. Record a repro of one straight from the list.`,to:[`production`]},{kind:`new`,title:`Security smoke checks and localization`,detail:`Quality › Security checks headers, CSP, cookie flags, mixed content, open redirects, CORS and keys in answers, passively. Quality › Localization finds keys shown as text, English left in other languages and cut-off text, with pseudo-localized and right-to-left stress runs.`,to:[`quality`,`security`]},{kind:`new`,title:`Exploratory sessions and cost`,detail:`Test › Exploratory runs a session with a goal, a cap on charters and a time limit. Results › Cost shows spend by agent, job, model and day, the router's picks, and what each pack run cost.`,to:[`explore`]},{kind:`new`,title:`Data-driven tests`,detail:`A test case runs once per row of a CSV, Excel or JSON file, a read-only query or a kept DB agent request, with values as {{row.column}}. Each row is its own run; the case fails if any row fails. Written tests read every row from one parameterised test, and Try it on the Record page plays up to 20 rows.`,to:[`test-cases`]},{kind:`new`,title:`MFA sign-ins`,detail:`Saved logins handle authenticator codes, codes sent by email, text or a test address, security keys and passkeys, and push approvals (the run waits for a person). A login column gives each row its own user. Codes are never shown to the model.`},{kind:`new`,title:`API testing: streams, OAuth2, mTLS, load and security`,detail:`gRPC streaming, GraphQL subscriptions, WebSocket and SSE contracts. OAuth2 client credentials and client certificates. forgeqe api load reports latency and error rate for read-only calls (never production); forgeqe api security checks an API you own against the OWASP API Top 10. The mock adds rules, stateful CRUD and faults, and Pact contracts import.`,to:[`api-tests`]},{kind:`new`,title:`Cloud testing for Azure, AWS and Google Cloud`,detail:`Agents know each cloud's SDK and its emulators. An env.yaml environment names its subscription, account or project (cloud:), editable in Settings › Environments. AWS and Google Cloud MCP servers read resources, and the cloud-verifier agent template checks a run's effects in the cloud without changing anything.`,to:[`settings`,`environments`]},{kind:`new`,title:`Desktop replay on macOS and Linux`,detail:`Desktop workflows replay through agent-desktop on macOS, Linux and headless Windows, with the same healing, memory and reports. desktop.driver: auto picks it outside Windows. Apps can be a macOS .app or a Linux program; explore and recording stay on Windows.`,to:[`settings`,`desktop`]},{kind:`new`,title:`Mobile: drag and drop, and real iPhones`,detail:`The mobile agent drags one control onto another (a puzzle piece onto its slot), saved as a drag step and replayed on Appium. iOS runs on TestMu's real iPhones and simulators: a permission prompt is closed when it shows and never fails a device where it doesn't.`,to:[`settings`,`mobile`]},{kind:`improved`,title:`A far more reliable mobile agent`,detail:`Swipes and scrolls move React Native carousels and pages that ignored them. An explore stops after a few actions that change nothing instead of spending its budget, records checks before a dialog closes, and keeps only checks a replay can see. iOS sees only controls on screen and keeps app alerts open for checks.`,to:[`settings`,`mobile`]},{kind:`improved`,title:`Mobile runs on several devices`,detail:`Each step line names its device, each failed device says which step failed, and a device TestMu reports unavailable is skipped for the rest of a suite instead of costing ten minutes per workflow. mobile doctor checks TestMu's hub and sign-in when every device is in the cloud.`,to:[`settings`,`mobile`]},{kind:`improved`,title:`Settings changes without a restart`,detail:`forgeqe web keeps working while you edit forgeqe.yaml, llms.json, env.yaml or .env: a half-saved file keeps the last good settings, the page offers to show the changes, open chats can switch to them, and .env values reload. After forgeqe update, Settings › About restarts the server on the same port.`,to:[`settings`,`about`]},{kind:`improved`,title:`Large logos are shrunk`,detail:`Settings › Appearance makes a PNG, JPEG or WebP logo up to 20 MB smaller in the browser instead of refusing anything over 512 KB.`,to:[`settings`,`appearance`]},{kind:`improved`,title:`Data page tabs and database chips`,detail:`The Data page's tabs wrap on a phone and take the arrow keys. A read-only database shows green with a tick, a writable one in amber with a pencil.`,to:[`data`]},{kind:`fixed`,title:`Two runs started at once no longer share a folder`,detail:`Mobile and desktop runs started in the same second each get their own report folder; one no longer overwrote the other's workflow.`},{kind:`fixed`,title:`A missing secret stops a mobile replay at once`,detail:`A replay that types a secret which is not set, or not listed, stops in seconds with what to set, before a cloud device is taken.`},{kind:`fixed`,title:`Agent tabs keep the message box at the bottom`,detail:`Before the first message, the Agent tabs of Jobs, Regression, API tests, Accessibility, Performance and Visual showed the message box in the middle of the window. API tests now lines up with the other pages.`}]},{version:`2.7.6`,date:`2026-11-06`,summary:`Runs check the users, logins and values they need before the browser opens. Test cases use env.yaml values, recordings can be deleted, and the app fits laptop screens.`,changes:[{kind:`new`,title:`A check before every run`,detail:`Before a run or a set of test cases starts, ForgeQE checks that the test users, saved logins, apps and values they name exist in env.yaml and forgeqe.yaml. Anything missing is listed with how to fix it, by name only, never a value, and you choose to stop and add it or run anyway.`,to:[`runs`]},{kind:`new`,title:`env.yaml values in test cases`,detail:`Write {{var.NAME}} or {{app.NAME}} in a test case's title, steps or expected results, and the run fills in the environment's variable or the app's address. A case that names an app starts there. Secrets are never put into a case.`,to:[`test-cases`]},{kind:`new`,title:`Delete recordings`,detail:`Record › Recordings has a checkbox on each row and Delete selected. One confirmation lists what goes; tests already written from a recording stay.`,to:[`record`]},{kind:`improved`,title:`Edits to forgeqe.yaml and env.yaml apply mid-chat`,detail:`A chat, in the web app or the terminal, reads forgeqe.yaml and env.yaml again when either changes and carries the conversation on. An edit that no longer loads keeps the old settings and says why.`,to:[`chats`]},{kind:`improved`,title:`env.yaml says what it did not read`,detail:`Apps are found even in a file copied from the example with leftovers, an app's kind is worked out from what it has, and names match in any case. Anything ForgeQE could not read is listed by forgeqe apps and the agent instead of being dropped silently. Values written beside apps: are read as variables; a password there is reported and never used.`},{kind:`improved`,title:`Fits 13 and 14 inch laptops`,detail:`On laptop-sized windows the app draws slightly smaller, so Home, the sidebar and the agent tabs fit without scrolling. The sidebar's foot is one row: Settings, Help and Dark/Light. What's ready and What's new are now in Settings › Advanced.`,to:[`settings`]},{kind:`improved`,title:`ForgeQE's own engine and runtime`,detail:`Setup, forgeqe doctor and Settings name ForgeQE's browser engine and agent runtime, and the runtime keeps its data in ForgeQE's own folder. An earlier download is moved, not downloaded again. Agent sessions from before this update start fresh when resumed.`},{kind:`fixed`,title:`Open the web app in new tabs`,detail:`Links, bookmarks and typed addresses open in a new tab without signing in again: open tabs share the sign-in. A tab with nothing to sign in from now says so, instead of saying ForgeQE was restarted.`},{kind:`fixed`,title:`Re-running a chat's test keeps the right test`,detail:`Turning a run into code reuses an existing test only when most of the run's steps are found in it, so an unrelated test is no longer picked from one matching locator. A captcha's answer is worked out in the test, never copied from the run.`,to:[`chats`]},{kind:`fixed`,title:`A sign-in never types a secret's name`,detail:`When a login's values are missing, or the sign-in page is on a site the login does not list, the browser stops and says why instead of typing the placeholder into the page.`},{kind:`fixed`,title:`Mobile runs on TestMu and longer mobile flows`,detail:`Native app sessions on TestMu (LambdaTest) and other device clouds no longer fail because a browser name was sent with the app. A mobile explore run that is still making progress carries on past its step limit, as browser runs do, so a full sign-in flow finishes.`}]},{version:`2.7.5`,date:`2026-11-06`,summary:`Report a problem with ForgeQE from Settings, drafted from the session that went wrong. Browsers close after every run, and Windows works like macOS and Linux.`,changes:[{kind:`new`,title:`Report a problem`,detail:`Settings › Report a problem picks the recent session that went wrong and shows what ForgeQE found in its log: what was asked, ForgeQE's own errors and its failing checks. Draft the bug fills in the title, steps, expected and actual result, and asks only what the log can't show. You check the attachments (the log with secrets removed, ForgeQE's checks, screenshots) before anything is sent, and you don't need an Azure DevOps account. Copy as text works anywhere.`,to:[`settings`]},{kind:`fixed`,title:`No terminal windows during an update on Windows`,detail:`forgeqe update on Windows no longer opens extra terminal windows that had to be closed before the update could finish. It runs in one minimised window.`},{kind:`fixed`,title:`Browsers close after every run`,detail:`A finished, stopped or failed run closes the browser it opened, and the recorder's and sign-in browsers do too. On Windows, stopping a run, test or job now ends everything it started, not only its first process. A browser ForgeQE only connected to is never closed.`},{kind:`fixed`,title:`Windows works like macOS and Linux`,detail:`Links open safely on Windows, including links with & in them. Tools such as npx, az and gh start reliably, copying keeps non-English text, and the guides show PowerShell lines beside the macOS and Linux ones. The Requirement Agent installs and starts on Windows without reinstalling its packages every time.`},{kind:`fixed`,title:`Setup repairs a broken engine`,detail:`If an interrupted setup left the browser engine's environment broken, forgeqe setup rebuilds it instead of failing with "externally managed". The engine also uses a Python version it is tested on (3.13 on Windows) rather than the newest one installed.`}]},{version:`2.7.4`,date:`2026-11-06`,summary:`Change impact: see the features, journeys and tests a branch or commit range affects, on a map of the whole code in red, amber and green. Also a shorter sidebar with Ctrl+K search.`,changes:[{kind:`new`,title:`Change impact`,detail:`Test › Change impact compares two branches, tags or commits of a product repository and says what the change affects: each feature with its risk and the reasons for it, the journeys and business rules it touches, the tests to run and why, and what no test covers. Read from the product graph; nothing is run.`,to:[`impact`]},{kind:`new`,title:`Impact map`,detail:`The change drawn over the whole repository, file by file in its folders: red what it changed, amber what it affects (files that use it, and the services a front end's change calls), green the tests that reach it. Switch to Whole product to see every repository, or colour the files by how often they change in git. Click a file for the chain back to the change and the features it serves.`,to:[`impact`]},{kind:`improved`,title:`A shorter sidebar and Ctrl+K search`,detail:`Pages that showed the same work share one entry, so the sidebar goes from 28 entries to 19; pages of one entry link to each other beside their titles. Press Ctrl+K (or Search in the sidebar) to go to any page, agent, Settings section or setting by its name or its forgeqe.yaml key.`,to:[`settings`]},{kind:`improved`,title:`Know what stops a chat before you send it`,detail:`Home and the agents' pages say when a chat cannot start (the browser engine or agent runtime not installed, or the model without its key) and link to the Settings section that fixes it.`,to:[`chats`,`agents`]},{kind:`improved`,title:`Clearer pages`,detail:`Home links to runs that failed today, approvals waiting, failed jobs and runs going now. Empty pages offer the one action that fills them. Settings keeps the common sections in view and folds the rest under More settings. The agent groups are Advisers, Builders and Operators, and API tests gather the agent's actions under one Ask the agent menu.`,to:[`agents`,`runs`,`settings`]},{kind:`improved`,title:`Forget one flow or page`,detail:`Memory can forget a single flow or a single page, not only a whole site, and flows with no site can be cleared on their own. Each asks first and is written to the audit log.`,to:[`memory`]}]},{version:`2.7.3`,date:`2026-11-06`,summary:`A Code map of your product's files with seven views and a blast radius, product knowledge read by Graphify, Build and Refresh on the Product page, each agent run's prompt and output in Evidence, and icons in a colour of your choice.`,changes:[{kind:`new`,title:`Code map`,detail:`Product › Engineering › Code map shows every file of your repositories in seven views: Graph, Treemap, Matrix, Tree, Flow, Bundle and Cluster. The graph moves live: drag files, pan, and zoom with the wheel. Pick one repository to see its files grouped by folder. Click a file to see what uses it, what it uses, and every file a change to it would reach.`,to:[`product`,`code`]},{kind:`new`,title:`Product knowledge read by Graphify`,detail:`Building product knowledge now reads the code with Graphify, in about 40 languages: classes, functions, and who calls and imports whom. It also reads a repository's database schema, PDF, Word and Excel documents, and the comments that say why code exists. A service's page shows its modules and the parts most depended on.`,to:[`product`]},{kind:`new`,title:`Build and Refresh on the Product page`,detail:`Start or refresh the product's knowledge from the Product page and follow it on a progress bar, step by step and repository by repository. A running build also shows under Background tasks, with a Stop button.`,to:[`product`]},{kind:`new`,title:`Prompt and output of each agent run`,detail:`An agent run's page in Evidence shows what the agent was told (its system prompt), what it was asked, its final answer and what it said on the way, with each model call's model and tokens. Runs recorded from Langfuse and OpenTelemetry now keep the system prompt, with secrets cut out, and the token counts.`,to:[`evidence-runs`]},{kind:`new`,title:`Evidence demo in your project`,detail:`forgeqe evidence demo --project fills an empty Evidence section with a demo shop's made-up AI agents, so every Evidence page has something to show next to your product. It writes only while the project has no runs or contracts of its own.`,to:[`evidence`]},{kind:`new`,title:`Find missing packages`,detail:`Settings › Set up lists every package ForgeQE installs, with the version needed, the one installed and the command that fixes it. The same report is forgeqe doctor --packages.`,to:[`settings`,`setup`]},{kind:`new`,title:`Icon colour and Lucide icons`,detail:`Settings › Appearance › Icon colour draws the icons in black (white in dark mode), the buttons' colour, or a colour of your own; two-tone icons keep their shape with a pale second tone. Lucide joins the icon sets. Attaching in the chat box is now a plus.`,to:[`settings`,`appearance`]},{kind:`improved`,title:`How it is built, Journeys and Records`,detail:`The capability and record diagrams can be dragged and zoomed, and a large map opens on one capability at a time. A journey reads as a summary and numbered steps. A record shows its fields, with personal data marked, and what writes, reads and shares it.`,to:[`product`,`business`]},{kind:`improved`,title:`Clearer product maps`,detail:`The Landscape and Services maps put front ends, gateways, services, data and test suites in their own bands. A gateway shows its routes, and workers and test suites say what they are.`},{kind:`improved`,title:`Package updates`,detail:`The agent runtime, browser engine, Playwright, Copilot, the data engine's drivers and the desktop packages are updated to their latest versions.`},{kind:`fixed`,title:`Re-run on the Record page`,detail:`A recording made without Google Chrome, or in Docker, now re-runs: ForgeQE tries the run's own browser, then Chrome, Edge and an installed Chromium, instead of failing to start a browser.`,to:[`record`]},{kind:`fixed`,title:`More calls linked between repositories`,detail:`The product graph matches a call to the endpoint it reaches by the route's shape, reads request options written over several lines, and recognises database upserts and .NET message consumers.`}]},{version:`2.7.2`,date:`2026-11-05`,summary:`Convert Tricentis Tosca test cases with the new Tosca agent and page, past chats kept and carried on after forgeqe web restarts, and one flat icon style across the app.`,changes:[{kind:`new`,title:`Convert Tosca test cases`,detail:`The Tosca agent reads a Tosca .tsu export and, once you confirm its plan, writes one page object per Tosca module and one test per web test case, each Tosca step marked in the test so nothing is lost. Tests go under their Tosca folders and are tagged with the execution lists that run them. forgeqe tosca verify runs the converted tests again without a model.`,to:[`tosca`]},{kind:`new`,title:`Tosca page`,detail:`Under Test, after Migration: start a conversion in four steps (export and test cases, framework and language, instructions, review), follow each test's Tosca steps beside the converted code, and run the tests again, all of them or one suite at a time, with each test's output.`,to:[`tosca`]},{kind:`new`,title:`Past chats are kept`,detail:`Chats are saved in the project and are still listed after forgeqe web restarts, so a link to an earlier chat opens it. Send a message to an ended chat and it carries on with its earlier turns.`,to:[`chats`]},{kind:`improved`,title:`One icon style`,detail:`Pages, agents, buttons and menus use Phosphor icons, drawn in the text's colour so they read on any sidebar. Appearance also offers Solar Bold Duotone, or ForgeQE's 3D icons as before.`,to:[`settings`,`appearance`]},{kind:`fixed`,title:`Azure DevOps sign-in in Evidence`,detail:`An Azure DevOps address on dev.azure.com or visualstudio.com is treated as the cloud, so the Azure CLI sign-in is offered. A sign-in question already answered no longer comes back, and an answer cannot be sent twice.`,to:[`settings`,`evidence`]},{kind:`fixed`,title:`API calls in the product graph`,detail:`A call whose method comes from options built by a helper or held in a variable is read with its real method, such as POST, instead of GET.`}]},{version:`2.7.1`,date:`2026-11-05`,summary:`Set up Evidence in five steps, with repositories picked from your GitHub, Azure DevOps, GitLab or Bitbucket account, and forgeqe update now finds an older copy still running.`,changes:[{kind:`new`,title:`Repositories from your account`,detail:`In Settings, Evidence, add a GitHub, Azure DevOps, GitLab or Bitbucket account (Cloud or Data Center), sign in in the browser or with a personal access token, and pick its repositories from a list. Local clones and links can still be added by hand.`,to:[`settings`,`evidence`]},{kind:`new`,title:`Search through an MCP server`,detail:`The search service can be a service at an address, a tool of one of your MCP servers, or a command, with a search to try on the page.`,to:[`settings`,`evidence`]},{kind:`new`,title:`Add documents from the page`,detail:`Add Markdown and text documents in Settings, Evidence, and the product knowledge build reads them beside your folders, links, Confluence spaces and web apps.`,to:[`settings`,`evidence`]},{kind:`improved`,title:`Evidence set up in five steps`,detail:`Settings, Evidence walks through repositories, search, documents, the product and its knowledge, and building the graph, in that order. The search and knowledge folder settings move here from Agents.`,to:[`settings`,`evidence`]},{kind:`fixed`,title:`forgeqe update finds an older running copy`,detail:`When the ForgeQE you are running is older than the installs it finds, forgeqe update names it and the command that fixes it, instead of saying everything is up to date. On Windows, a pip install whose Python comes from the Microsoft Store is found and updated too.`}]},{version:`2.7.0`,date:`2026-11-05`,summary:`TestMu AI's tools for the agent with a browser sign-in, real logos for more systems in Settings, and quicker moves between Settings sections.`,changes:[{kind:`new`,title:`TestMu AI's tools`,detail:`Turn on TestMu AI's MCP server to give ForgeQE's agent HyperExecute, failure triage, SmartUI, accessibility and Test Manager. Sign in once in the browser; no key is needed. forgeqe auth login testmu offers the browser sign-in or the grid's user name and access key.`,to:[`settings`]},{kind:`improved`,title:`Real logos in Settings`,detail:`GitLab, Postman, Sentry, Xray, TestMu AI, Dataverse and Zephyr Scale show their own logos instead of plain icons.`,to:[`settings`]},{kind:`improved`,title:`Quicker moves in Settings`,detail:`Moving between Settings sections changes at once, without the whole page fading out and back in.`,to:[`settings`]}]},{version:`2.6.9`,date:`2026-11-05`,summary:`A fix for setup on 64-bit Windows, a model picker that holds any number of models, a separate Evidence section in Settings, and a more consistent look on every page.`,changes:[{kind:`improved`,title:`Pick any number of models per area`,detail:`In Settings, Routing, each area of work picks its models from a searchable list instead of a row of chips. Each agent shows its icon and what it does, and the order that decides which model a call gets is a numbered list.`,to:[`settings`]},{kind:`improved`,title:`Evidence has its own Settings page`,detail:`The product, its knowledge graph, repositories, documents and links, and the team's knowledge move from Agents to a new Evidence page in Settings. Agents keeps instructions, custom agents, capabilities and agent names.`,to:[`settings`]},{kind:`improved`,title:`Colours from a website`,detail:`Appearance reads more of a website's colours, up to 16 of them. A site that shows a bot check instead of its page is reported as turned away, rather than offering the check page's colours as the site's.`,to:[`settings`,`appearance`]},{kind:`improved`,title:`The same look on every page`,detail:`Every page uses one style for empty states, tabs and headings. Grey labels are easier to read, and long agent names wrap onto a second line instead of being cut off.`},{kind:`fixed`,title:`Setup on 64-bit Windows`,detail:`forgeqe setup no longer fails on 64-bit Windows when a 32-bit Python is installed: it uses a 64-bit Python instead.`}]},{version:`2.6.8`,date:`2026-11-05`,summary:`A tidier Settings, one standard for buttons and fields across the app, a page background colour, and an easier Runs page.`,changes:[{kind:`new`,title:`A page background colour`,detail:`Set a light background colour for the app in Appearance, or read one from your website or design file. Text and lines adjust so they stay readable.`,to:[`settings`,`appearance`]},{kind:`improved`,title:`A tidier Settings`,detail:`Every setting's control sits in the same column, so fields line up on every section. MCP servers are under AI, and Browser and Replays under Testing. Routing shows which model a call gets, and lists each area of work with its agents under it.`,to:[`settings`]},{kind:`improved`,title:`One standard for buttons and fields`,detail:`Buttons, text fields, dropdowns, search boxes, checkboxes and radios look and size the same across the app. Each view has at most one main button, and secondary buttons have an outline so they no longer look switched off.`},{kind:`improved`,title:`An easier Runs page`,detail:`Runs share the app's search, filters and pages. A run's next steps are clear buttons, and the open tab is kept in the address, so a link or a reload opens it again.`,to:[`runs`]},{kind:`improved`,title:`Easier to read`,detail:`Explanations use darker text, Home's animation settles after a few seconds, the side panel's Environment section has more room, and on a phone the workspace button no longer covers the page heading.`},{kind:`improved`,title:`Reading your website's look`,detail:`When a website turns ForgeQE's reader away, Appearance says so once and what to do instead.`}]},{version:`2.6.7`,date:`2026-11-04`,summary:`A lighter look without boxes, run pages that read cleanly, token counts for every agent in a chat, and a clearer view of how a test was written and reviewed.`,changes:[{kind:`improved`,title:`A lighter look across the app`,detail:`Pages, chat replies and run pages drop their boxes: each section is its heading and content, set apart by space and a thin line. A question still waiting for you keeps its highlight, so it stands out.`},{kind:`improved`,title:`Run pages that read cleanly`,detail:`A run's summary shows its final message once, each test as one result with its full command to copy, and the files the run wrote. The activity is a timeline with each event's time, and Details counts the tokens of every agent that worked on the run.`,to:[`runs`]},{kind:`improved`,title:`Tokens for every agent in a chat`,detail:`Context and tokens counts every agent that works in a chat, such as the Coding agent and the Engineering review agent, as each model call comes back. Today and Last 30 days count all of the project's chats, runs and agents.`},{kind:`improved`,title:`How a test was written and reviewed`,detail:`A chat shows ForgeQE handing a test to the Coding agent, with its work, test runs and reviews below. The reviewer, now called the Engineering review agent, shows its verdict and each issue next to the attempt it judged. Step icons show how a step went by their colour.`},{kind:`improved`,title:`Custom agent runs linked to their session`,detail:`A custom agent's recent runs link to the session they ran in on the Runs page.`,to:[`runs`]},{kind:`fixed`,title:`Times in the activity log`,detail:`Each line shows the time it happened, instead of the same +0:00 for every line.`},{kind:`fixed`,title:`Tooltips in chat`,detail:`Copy buttons, a test's full name and the model picker's reason use the app's own tooltip.`}]},{version:`2.6.6`,date:`2026-11-04`,summary:`Change a chat's model without starting over, and reports with your project's logo and a cleaner look.`,changes:[{kind:`new`,title:`Change the model mid-chat`,detail:`Pick another model from the chat's composer between messages, and the chat carries on with its conversation, tools and files. In the terminal, /profile does the same.`,to:[`settings`,`models`]},{kind:`improved`,title:`Your logo in reports`,detail:`Reports show the logo and name set in Settings, Appearance, in their sidebar and as the tab's icon, in place of ForgeQE's.`,to:[`settings`,`appearance`]},{kind:`improved`,title:`A cleaner report`,detail:`Reports drop the cards inside cards: each block is its heading and content on a white page, as in the web app's chat and Settings. Tooltips are styled, show on keyboard focus, and never grow taller than the window.`}]},{version:`2.6.4`,date:`2026-11-04`,summary:`Test cases reused instead of duplicated in every test case system, a product knowledge graph, an Evidence section for checking agents, and new integrations.`,changes:[{kind:`new`,title:`Reuse existing test cases`,detail:`Before saving, ForgeQE compares new cases with the story's linked cases and its scope, and asks before it links to or extends an existing one instead of adding a copy. Optionally it also compares with the other stories under the same feature or epic. Cases older than their story's last change are flagged.`},{kind:`new`,title:`Test cases in Xray, TestRail and Zephyr Scale`,detail:`Save, update and link test cases there as in Azure DevOps, and record which cases are automated. New Azure DevOps cases join the scope's suite with priority, tags, state, shared steps and parameters. Cases can also be saved with no story, under an area path or a project.`},{kind:`new`,title:`Product knowledge`,detail:`ForgeQE reads your repositories, documents and deployment files into one graph of the product's systems and how they talk, with the evidence for each link. The agents use it, the Product page shows it in the business's words, and the Engineering view draws the landscape. It can be built once in a pipeline and shared with the team.`,to:[`product`]},{kind:`new`,title:`Evidence`,detail:`A section for checking AI agents, ForgeQE's own or any other: their runs from OpenTelemetry, Langfuse or LangSmith, contracts and behaviour checks, a scenario suite and a release gate, and monitoring for drift. forgeqe evidence demo fills every page with a demo project.`,to:[`evidence`]},{kind:`new`,title:`More integrations`,detail:`GitLab, BrowserStack, Postman, Azure, Dataverse and Sentry, added from the catalog in the MCP view. MCP servers that need a browser sign-in get one, and every system's sign-in is in Settings.`,to:[`settings`]},{kind:`improved`,title:`Mobile and desktop settings`,detail:`Separate settings for each, devices described by what they are, cloud devices for BrowserStack and TestMu edited in Settings, and mobile tests run on several devices at once.`,to:[`settings`]},{kind:`improved`,title:`A model and a name for each agent`,detail:`Choose a default model for each agent, and call each agent what your team calls it.`,to:[`settings`]},{kind:`improved`,title:`Release readiness for Jira`,detail:`Release readiness works on Jira scopes, as it does on Azure DevOps.`},{kind:`improved`,title:`Carry on, or stop`,detail:`Healing, the Regression page, forgeqe suite and a browser run that makes no progress ask before they stop at a limit.`},{kind:`fixed`,title:`Links and proxies`,detail:`Links in chat are fetched only after ForgeQE's own checks, and web fetches work behind a company proxy.`},{kind:`fixed`,title:`Migration`,detail:`The source framework is found from the project's packages and code, not a word in a comment, and a remote grid is named only when the code starts one.`}]},{version:`2.6.3`,date:`2026-11-03`,summary:`A migration agent for old test suites, a DB agent that finds test data for every agent, and the same chat box on every agent's page.`,changes:[{kind:`new`,title:`Migration agent`,detail:`Move a test suite to another framework with forgeqe migrate or the Migration page. Bring the tests from git, a folder, an upload or a paste; ForgeQE migrates them, runs them, fixes what fails, and shows the old and new side by side in Compare.`,to:[`migration`]},{kind:`new`,title:`DB agent`,detail:`Every agent asks the DB agent for test data before it runs. Its page under Agents shows your databases, their schema as a diagram, and an Ask box.`,to:[`agents`]},{kind:`new`,title:`Test data page`,detail:`Every request for test data is logged, with what was asked and what came back.`,to:[`test-data`]},{kind:`improved`,title:`Data page`,detail:`Redesigned around the DB agent, with paged lists and one clear main action.`,to:[`data`]},{kind:`improved`,title:`The same chat box everywhere`,detail:`Every Agent tab has attachments, @ files, Refine, the environment, tools and the model. Nothing is sent until ForgeQE is set up, and Home's Set up card says what is missing.`},{kind:`improved`,title:`A page for every agent`,detail:`Each agent's page has its own tools, requests and runs below its chat.`,to:[`agents`]},{kind:`improved`,title:`Headline numbers`,detail:`Shown as one stat panel with a trend for each number.`}]},{version:`2.6.2`,date:`2026-11-02`,summary:`Custom agents, a page for every agent, Accessibility, Performance and Visual pages, and pictures in chat.`,changes:[{kind:`new`,title:`Custom agents`,detail:`Build your own agent with the agent builder. It runs only an approved version, held to its limits on every tool call, and can run on a schedule with a person approving what it may not do alone.`,to:[`agents`]},{kind:`new`,title:`Accessibility, Performance and Visual pages`,detail:`Each has its own page and agent. Accessibility tests a goal as personas (blind, keyboard-only, low vision…) and keeps every session in a Results tab.`,to:[`accessibility`]},{kind:`new`,title:`Agents page`,detail:`Every agent in four columns by category, with what each can do and whether it is ready. Mark favourites to keep them close.`,to:[`agents`]},{kind:`new`,title:`Pictures and files in chat`,detail:`Attach files with @ or drop them on the composer. Images of any format are shrunk and stripped of their metadata before the model sees them; /paste works in the terminal.`},{kind:`new`,title:`GitHub Copilot models`,detail:`Pick a Copilot model in Settings, count and budget premium requests, and sign in with GitHub Enterprise Cloud.`,to:[`settings`,`models`]},{kind:`new`,title:`Jobs agent`,detail:`Make a job by asking for it in the Agent tab; jobs show as a table.`,to:[`jobs`]},{kind:`improved`,title:`At a limit, carry on`,detail:`When a run reaches its budget, ForgeQE asks whether to carry on instead of ending the work.`},{kind:`improved`,title:`Tables everywhere`,detail:`Memory, Knowledge, Skills, Guardrails and Prompts are tables that look and page the same, each with a search box.`},{kind:`improved`,title:`What's ready`,detail:`One box per area, one line per feature, and the details in a side sheet.`,to:[`features`]},{kind:`improved`,title:`Dark and light in the sidebar`,detail:`Switch the theme from the sidebar; the sidebar itself is dark.`},{kind:`fixed`,title:`Copilot errors`,detail:`Rate limits, cut-off replies and Windows' reason for not loading Copilot's runtime are now reported clearly.`}]},{version:`2.4.0`,date:`2026-10-28`,summary:`Each agent gets only the tools it needs.`,changes:[{kind:`new`,title:`Scoped MCP tools`,detail:`An agent's tool server offers only the tools its work needs, so it chooses among fewer and calls fewer by mistake.`}]}]},ro=[`new`,`improved`,`fixed`],Y=/^[a-z0-9][a-z0-9-]*$/,io=/^[0-9]+\.[0-9]+\.[0-9]+([a-zA-Z0-9.-]*)?$/,ao={summary:240,title:80,detail:600},oo=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function so(e,t){if(typeof e!=`string`)return;let n=e.trim();if(!(!n||n.length>t||/[\u0000-\u001f\u007f\u2028\u2029]/.test(n)))return n}function co(e){if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return;let t=new Date(`${e}T00:00:00Z`);return!isNaN(t.getTime())&&t.toISOString().slice(0,10)===e?e:void 0}function lo(e){let t=/^([0-9]+)\.([0-9]+)\.([0-9]+)(.*)$/.exec(e);return t?[Number(t[1]),Number(t[2]),Number(t[3]),+!t[4],t[4]??``]:[0,0,0,0,e]}function uo(e,t){let n=lo(e),r=lo(t);for(let e=0;e<4;e++)if(n[e]!==r[e])return n[e]-r[e];return n[4]<r[4]?-1:+(n[4]>r[4])}function fo(e,t,n){if(!oo(e))return void n.push(`${t}: not an object`);let r=Object.keys(e).filter(e=>![`kind`,`title`,`detail`,`to`].includes(e));if(r.length)return void n.push(`${t}: unknown key ${r.join(`, `)}`);let i=ro.find(t=>t===e.kind);if(!i)return void n.push(`${t}: kind must be one of ${ro.join(`, `)}`);let a=so(e.title,ao.title);if(!a)return void n.push(`${t}: title must be one line of at most ${ao.title} characters`);let o=so(e.detail,ao.detail);return o?e.to===void 0?{kind:i,title:a,detail:o}:!Array.isArray(e.to)||!e.to.length||e.to.length>4||!e.to.every(e=>typeof e==`string`&&Y.test(e))?void n.push(`${t}: to must be 1 to 4 route parts of the web app, like ["settings", "models"]`):{kind:i,title:a,detail:o,to:[...e.to]}:void n.push(`${t}: detail must be one line of at most ${ao.detail} characters`)}function po(e,t,n){if(!oo(e))return void n.push(`${t}: not an object`);let r=Object.keys(e).filter(e=>![`version`,`date`,`summary`,`changes`].includes(e));if(r.length)return void n.push(`${t}: unknown key ${r.join(`, `)}`);let i=typeof e.version==`string`&&io.test(e.version)?e.version:void 0;if(!i)return void n.push(`${t}: version must be like 2.6.2`);let a=`${t} (${i})`,o=co(e.date);if(!o)return void n.push(`${a}: date must be a real day, like 2026-11-02`);let s=so(e.summary,ao.summary);if(!s)return void n.push(`${a}: summary must be one line of at most ${ao.summary} characters`);if(!Array.isArray(e.changes)||!e.changes.length)return void n.push(`${a}: changes must list at least one change`);let c=n.length,l=e.changes.map((e,t)=>fo(e,`${a} change ${t+1}`,n)).filter(e=>!!e);if(!(n.length>c))return{version:i,date:o,summary:s,changes:l}}function mo(e){let t=[];if(!oo(e)||!Array.isArray(e.releases))return{releases:[],problems:[`the file must be an object with a "releases" list`]};let n=Object.keys(e).filter(e=>e!==`releases`&&e!==`$comment`);n.length&&t.push(`unknown key ${n.join(`, `)}`);let r=[];return e.releases.forEach((e,n)=>{let i=po(e,`release ${n+1}`,t);if(!i)return;let a=r[r.length-1];if(r.some(e=>e.version===i.version))return void t.push(`release ${n+1}: version ${i.version} is listed twice`);if(a&&(uo(i.version,a.version)>=0||i.date>a.date))return void t.push(`release ${n+1}: ${i.version} must come after ${a.version} (newest first, by version and date)`);r.push(i)}),{releases:r,problems:t}}var ho=mo(no).releases,go=ho[0],_o=e=>e.to?.length&&e.to.every(e=>Y.test(e))?H(...e.to):void 0,vo=e=>new Date(`${e}T00:00:00`),yo=e=>vo(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`}),bo=e=>vo(e).toLocaleDateString(void 0,{month:`long`,year:`numeric`});function xo(e=ho){let t=[];for(let n of e){let e=bo(n.date),r=t[t.length-1];r?.month===e?r.releases.push(n):t.push({month:e,releases:[n]})}return t}var So=`forgeqe-whats-new-seen`,Co=()=>{try{return localStorage.getItem(So)===go?.version}catch{return!1}},wo=()=>{try{go&&localStorage.setItem(So,go.version)}catch{}};function To(e,t){setTimeout(()=>{let n=document.getElementById(e);if(!n)return;n.focus();let r=ii(t);r&&n.setSelectionRange(r[0],r[1])},0)}function Eo(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(null);return(0,q.useEffect)(()=>{Et.list().then(e=>t(e.runs),()=>t([])),ht.list().then(e=>r(e.approvals),()=>r([])),Dt.list().then(e=>a(e.jobs),()=>a([]))},[]),!e||!n||!i?null:(0,J.jsx)(ti,{items:oi(e,n,i),title:`Needs a look today`,id:`needs-look-today`})}function Do(){let[e,t]=(0,q.useState)(()=>!!go&&!Co());if(!e||!go)return null;let n=go.changes.filter(e=>e.kind===`new`).slice(0,3);return(0,J.jsxs)(`section`,{"aria-labelledby":`whats-new-title`,className:`flex w-full items-start gap-x-4 border-y border-line py-4`,children:[(0,J.jsx)(zt,{icon:he,size:20,className:`mt-0.5 flex-none text-accent-fg`}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-x-4 gap-y-3`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_280px] flex-col gap-0.5`,children:[(0,J.jsxs)(`span`,{id:`whats-new-title`,className:`font-medium`,children:[`What's new in ForgeQE `,go.version]}),(0,J.jsx)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:n.length?n.map(e=>e.title).join(` · `):go.summary})]}),(0,J.jsxs)(`a`,{className:rn({variant:`outline`}),href:H(`settings`,`whats-new`),"data-tip":`See all changes`,children:[(0,J.jsx)(Ue,{"aria-hidden":`true`}),`Changes`]})]}),(0,J.jsx)(B,{variant:`icon`,size:`icon`,"aria-label":`Close until the next release`,"data-tip":`Close until the next release`,onClick:()=>{wo(),t(!1)},className:`-my-1.5 -mr-2 size-8 flex-none`,children:(0,J.jsx)(i,{size:16,"aria-hidden":`true`})})]})}function Oo({agent:e,below:t,wide:n}={}){let r=e&&Mn(e.agent),i=e?e.starters:ri,[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(``);(0,q.useEffect)(()=>{if(!e)try{let e=sessionStorage.getItem(to);sessionStorage.removeItem(to),e&&e.trim()&&(o(e.slice(0,2e4)),setTimeout(()=>na(`msg`),0))}catch{}},[]);let[l,u]=(0,q.useState)(!1),d=qa(),f=$r(),{setup:p}=d,m=Zi(a,e=>{o(e),c(``)},`msg`,{code:d.tools.code}),h=$i(`home`,e=>{o(e),na(`msg`)}),g=async(t=a)=>{let n=r&&e?.agent!==`forgeqe`&&t.trim()?`${r.name}: ${t.trim()}`:t.trim();if(!(l||!n.trim()&&!m.hasFiles)){u(!0),c(``);try{let e=await m.wrap(n);if(!e.trim()){u(!1);return}let{id:t}=await Xt.start(e,d.choice);m.reset({keep:!0}),location.hash=H(`chats`,t)}catch(e){c(e.message),u(!1)}}};return(0,J.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,J.jsxs)(`header`,{className:`flex items-center gap-1 px-5 py-3.5 short:py-2`,children:[(0,J.jsx)(nr,{}),e&&(0,J.jsxs)(`a`,{href:H(`agents`),className:`inline-flex min-h-9 items-center gap-1.5 text-sm`,children:[(0,J.jsx)(be,{size:16,"aria-hidden":`true`}),`All agents`]})]}),(0,J.jsxs)(`main`,{className:`flex flex-auto flex-col items-center justify-center px-5 pt-6 pb-[120px] short:pt-0 short:pb-8`,children:[(0,J.jsxs)(`div`,{className:`flex w-full max-w-[780px] flex-col items-center gap-9 short:gap-6`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col items-center gap-3.5 text-center short:gap-2.5`,children:[e?(0,J.jsx)(Qn,{agent:e.agent,px:f?64:96,decorative:!0,working:l,className:`mb-1`}):(0,J.jsx)(Gt,{state:`idle`,px:f?72:112,label:`ForgeQE is ready`,className:`mb-1`}),(0,J.jsx)(`h1`,{className:`m-0 text-[34px] leading-tight font-semibold short:text-[28px] tracking-[-0.015em] text-ink`,children:r?r.name:`What are we assuring today?`}),e?(0,J.jsx)(`p`,{className:`m-0 max-w-[52ch] text-[15px] short:max-w-[72ch] leading-relaxed text-ink-2`,children:e.about}):(0,J.jsx)(`p`,{className:`m-0 max-w-[46ch] text-[15px] short:max-w-[72ch] leading-relaxed text-ink-2`,children:`ForgeQE assures every release: it uses your app as your customers do, shows what broke and why, and keeps the proof.`})]}),p&&!p.ready&&(0,J.jsx)(Qa,{project:p.project}),p?.ready&&(0,J.jsx)($a,{c:d}),(0,J.jsx)(Qi,{id:`msg`,label:r?`Message ${In(r.name)}`:`Message ForgeQE`,value:a,onChange:e=>{o(e),c(``)},onSend:()=>void g(),disabled:l||!!p&&!p.ready||h.running,canSend:!!a.trim()||m.hasFiles,onEdit:m.onEdit,onKey:m.onKeyDown,onFiles:m.onFiles,dropping:m.dropping,drop:m.drop,mentions:m.mentions,combo:m.combo,placeholder:r?`Ask ${In(r.name)} to…`:`Ask ForgeQE to test something…`,top:(0,J.jsxs)(J.Fragment,{children:[m.chips,h.state&&(0,J.jsx)(ta,{state:h.state,onStop:()=>void h.stop(),onUndo:h.undo,onClose:h.close})]}),left:(0,J.jsxs)(J.Fragment,{children:[m.paperclip,(0,J.jsx)(Ja,{c:d}),(0,J.jsx)(ea,{running:h.running,disabled:!a.trim()||l||!!p&&!p.ready,onClick:()=>void h.start(a)})]}),right:(0,J.jsx)(Ya,{c:d})}),(0,J.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:z(`-mt-5 m-0 text-center short:-mt-3 text-sm text-ink-2`,!(s||m.error)&&`sr-only`),children:(0,J.jsx)(`span`,{className:m.error&&!s?`text-fail`:``,children:s||m.error||``})}),(0,J.jsx)(`div`,{className:`flex flex-wrap justify-center gap-3`,children:i.map(({label:e,Icon:t,text:n})=>(0,J.jsxs)(B,{onClick:()=>{o(n),c(``),To(`msg`,n)},children:[t&&(0,J.jsx)(t,{"aria-hidden":`true`}),e]},e))}),!e&&p?.ready&&(0,J.jsx)(Eo,{}),!e&&(0,J.jsx)(Do,{}),t]}),n&&(0,J.jsx)(`div`,{className:`mt-10 flex w-full max-w-[1180px] flex-col`,children:n})]})]})}function ko(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function Ao(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var jo=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Mo=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),No=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),Po=[...Mo,...No],Fo=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Io=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),Lo=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),Ro=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function zo(e){let t=e.regex,n=jo(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+Io.join(`|`)+`)`},{begin:`:(:)?(`+Lo.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+Ro.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Fo.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+Po.join(`|`)+`)\\b`}]}}function Bo(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function Vo(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function Ho(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var Uo=`[0-9](_*[0-9])*`,Wo=`\\.(${Uo})`,Go=`[0-9a-fA-F](_*[0-9a-fA-F])*`,Ko={className:`number`,variants:[{begin:`(\\b(${Uo})((${Wo})|\\.)?|(${Wo}))[eE][+-]?(${Uo})[fFdD]?\\b`},{begin:`\\b(${Uo})((${Wo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Wo})[fFdD]?\\b`},{begin:`\\b(${Uo})[fFdD]\\b`},{begin:`\\b0[xX]((${Go})\\.?|(${Go})?\\.(${Go}))[pP][+-]?(${Uo})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${Go})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function qo(e,t,n){return n===-1?``:e.replace(t,r=>qo(e,t,n-1))}function Jo(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+qo(`(?:<`+n+`~~~(?:\\s*,\\s*`+n+`~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Ko,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Ko,a]}}var Yo=`[A-Za-z$_][0-9A-Za-z$_]*`,Xo=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),Zo=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],Qo=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),$o=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],es=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],ts=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],ns=[].concat(es,Qo,$o);function rs(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=Yo,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:Yo,keyword:Xo,literal:Zo,built_in:ns,"variable.language":ts},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...Qo,...$o]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...es,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var is={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function as(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,is,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var os=`[0-9](_*[0-9])*`,ss=`\\.(${os})`,cs=`[0-9a-fA-F](_*[0-9a-fA-F])*`,ls={className:`number`,variants:[{begin:`(\\b(${os})((${ss})|\\.)?|(${ss}))[eE][+-]?(${os})[fFdD]?\\b`},{begin:`\\b(${os})((${ss})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ss})[fFdD]?\\b`},{begin:`\\b(${os})[fFdD]\\b`},{begin:`\\b0[xX]((${cs})\\.?|(${cs})?\\.(${cs}))[pP][+-]?(${os})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${cs})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function us(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=ls,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
40
|
+
`},l]}}function ds(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function fs(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function ps(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function ms(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}var hs=`[A-Za-z$_][0-9A-Za-z$_]*`,gs=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),_s=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],vs=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),ys=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],bs=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],xs=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],Ss=[].concat(bs,vs,ys);function Cs(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=hs,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:hs,keyword:gs,literal:_s,built_in:Ss,"variable.language":xs},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...vs,...ys]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...bs,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function ws(e){let t=e.regex,n=Cs(e),r=hs,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:hs,keyword:gs.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:_s,built_in:Ss.concat(i),"variable.language":xs},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function Ts(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Es(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}function Ds(e){return{name:`Dockerfile`,aliases:[`docker`],case_insensitive:!0,keywords:[`from`,`maintainer`,`expose`,`env`,`arg`,`user`,`onbuild`,`stopsignal`],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:`run cmd entrypoint volume add copy workdir label healthcheck shell`,starts:{end:/[^\\]$/,subLanguage:`bash`}}],illegal:`</`}}function Os(e){return{name:`Gherkin`,aliases:[`feature`],keywords:`Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When`,contains:[{className:`symbol`,begin:`\\*`,relevance:0},{className:`meta`,begin:`@[^@\\s]+`},{begin:`\\|`,end:`\\|\\w*$`,contains:[{className:`string`,begin:`[^|]+`}]},{className:`variable`,begin:`<`,end:`>`},e.HASH_COMMENT_MODE,{className:`string`,begin:`"""`,end:`"""`},e.QUOTE_STRING_MODE]}}function ks(e){let t=[`string`,`char`,`byte`,`int`,`long`,`bool`,`decimal`,`single`,`double`,`DateTime`,`xml`,`array`,`hashtable`,`void`],n={$pattern:/-?[A-z\.\-]+\b/,keyword:`if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter`,built_in:`ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write`},r=/\w[\w\d]*((-)[\w\d]+)*/,i={begin:"`[\\s\\S]",relevance:0},a={className:`variable`,variants:[{begin:/\$\B/},{className:`keyword`,begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},o={className:`literal`,begin:/\$(null|true|false)\b/},s={className:`string`,variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[i,a,{className:`variable`,begin:/\$[A-z]/,end:/[^A-z]/}]},c={className:`string`,variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},l=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:`doctag`,variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),u={className:`built_in`,variants:[{begin:`(Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where)+(-)[\\w\\d]+`}]},d={className:`class`,beginKeywords:`class enum`,end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[e.TITLE_MODE]},f={className:`function`,begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:`function`,relevance:0,className:`keyword`},{className:`title`,begin:r,relevance:0},{begin:/\(/,end:/\)/,className:`params`,relevance:0,contains:[a]}]},p={begin:/using\s/,end:/$/,returnBegin:!0,contains:[s,c,{className:`keyword`,begin:/(using|assembly|command|module|namespace|type)/}]},m={variants:[{className:`operator`,begin:`(-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor)\\b`},{className:`literal`,begin:/(-){1,2}[\w\d-]+/,relevance:0}]},h={className:`selector-tag`,begin:/@\B/,relevance:0},g={className:`function`,begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:`keyword`,begin:`(${n.keyword.toString().replace(/\s/g,`|`)})\\b`,endsParent:!0,relevance:0},e.inherit(e.TITLE_MODE,{endsParent:!0})]},_=[g,l,i,e.NUMBER_MODE,s,c,u,a,o,h],v={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[`self`].concat(_,{begin:`(`+t.join(`|`)+`)`,className:`built_in`,relevance:0},{className:`type`,begin:/[\.\w\d]+/,relevance:0})};return g.contains.unshift(v),{name:`PowerShell`,aliases:[`pwsh`,`ps`,`ps1`],case_insensitive:!0,keywords:n,contains:_.concat(d,f,p,m,v)}}var As=b(F(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;i!==`object`&&i!==`function`||Object.isFrozen(r)||n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},L=I(`//`,`$`),ee=I(`/\\*`,`\\*/`),te=I(`#`,`$`),ne=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:I,C_BLOCK_COMMENT_MODE:ee,C_LINE_COMMENT_MODE:L,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:te,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function re(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function R(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ie(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=re,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ae(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function oe(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function se(e,t){e.relevance===void 0&&(e.relevance=1)}var ce=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},le=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],ue=`keyword`;function de(e,t,n=ue){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,de(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,fe(n[0],n[1])]})}}function fe(e,t){return t?Number(t):+!pe(e)}function pe(e){return le.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[R,oe,Ce,ce].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ie,ae,se].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=de(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.11.2`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ke=i,Ae=a,je=Symbol(`nomatch`),Me=7,Ne=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead.
|
|
41
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};te(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,te(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(P);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(P),n=``;for(;t;){n+=P.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Me&&(F+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(P)}n+=P.substring(e),M.addText(n)}function f(){if(P===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(P);return}e=v(A.subLanguage,P,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(P,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(F+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),P=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(P=i,d(),P=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(P,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),P=``):e.beginScope._multi&&(h(e.beginScope,t),P=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(P+=e[0],1):(ee=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?P+=t:(n.excludeBegin&&(P+=t),p(),!n.returnBegin&&!n.excludeBegin&&(P=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return je;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?P+=t:(a.returnEnd||a.excludeEnd||(P+=t),p(),a.excludeEnd&&(P=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(F+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(P+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(P+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}if(r.type===`end`){let e=C(r);if(e!==je)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(P+=`
|
|
42
|
+
`),1;if(L>1e5&&L>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=we(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,I=0,L=0,ee=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){L++,ee?ee=!1:A.matcher.considerAll(),A.matcher.lastIndex=I;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(I,e.index),e);I=e.index+t}E(n.substring(I))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:I,context:n.slice(I-100,I+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(te(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),te(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ae(l,e)}let E=()=>{k(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}document.readyState===`loading`?(O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function I(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function L(e){I(e),a.push(e)}function ee(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function te(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function re(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:re,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Ae,addPlugin:L,removePlugin:ee}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ne)typeof ne[e]==`object`&&n(ne[e]);return Object.assign(e,ne),e},Pe=Ne({});Pe.newInstance=()=>Ne({}),t.exports=Pe,Pe.HighlightJS=Pe,Pe.default=Pe}))()).default,js={},Ms=`hljs-`;function Ns(e){let t=As.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||js,a=typeof i.prefix==`string`?i.prefix:Ms;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:Ps,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||js).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var Ps=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},Fs={};function Is(e,t){let n=t||Fs;return Ls(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Ls(e,t,n){if(zs(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Rs(e.children,t,n)}return Array.isArray(e)?Rs(e,t,n):``}function Rs(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Ls(e[i],t,n);return r.join(``)}function zs(e){return!!(e&&typeof e==`object`)}var Bs=document.createElement(`i`);function Vs(e){let t=`&`+e+`;`;Bs.innerHTML=t;let n=Bs.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Hs(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Us(e,t){return e.length>0?(Hs(e,e.length,0,t),e):t}var Ws={}.hasOwnProperty;function Gs(e){let t={},n=-1;for(;++n<e.length;)Ks(t,e[n]);return t}function Ks(e,t){let n;for(n in t){let r=(Ws.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ws.call(r,a)||(r[a]=[]);let e=i[a];qs(r[a],Array.isArray(e)?e:e?[e]:[])}}}function qs(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Hs(e,0,0,r)}function Js(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ys(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Xs=oc(/[A-Za-z]/),Zs=oc(/[\dA-Za-z]/),Qs=oc(/[#-'*+\--9=?A-Z^-~]/);function $s(e){return e!==null&&(e<32||e===127)}var ec=oc(/\d/),tc=oc(/[\dA-Fa-f]/),nc=oc(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function rc(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var ic=oc(/\p{P}|\p{S}/u),ac=oc(/\s/);function oc(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function sc(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function cc(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Z(t)?(e.enter(r),c(t)):l(t)}function c(t){return Z(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var lc={tokenize:uc};function uc(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),sc(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var dc=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){fc(this,e,t,n,!1)}addBefore(e,t,n){fc(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function fc(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var pc={tokenize:hc},mc={tokenize:gc};function hc(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new dc;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mc,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(mc,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new dc;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function gc(e,t,n){return sc(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function _c(e){if(e===null||rc(e)||ac(e))return 1;if(ic(e))return 2}function vc(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var yc={name:`attention`,resolveAll:bc,tokenize:xc};function bc(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Sc(o,-a),Sc(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Us(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Us(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Us(r,vc(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Us(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Us(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Hs(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function xc(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_c(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=_c(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Sc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Cc={name:`autolink`,tokenize:wc};function wc(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Xs(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Zs(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Zs(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||$s(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Qs(t)?(e.consume(t),l):n(t)}function u(e){return Zs(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Zs(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Tc={partial:!0,tokenize:Ec};function Ec(e,t,n){return r;function r(t){return Z(t)?sc(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var Dc={continuation:{tokenize:kc},exit:Ac,name:`blockQuote`,tokenize:Oc};function Oc(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function kc(e,t,n){let r=this;return i;function i(t){return Z(t)?sc(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Dc,t,n)(r)}}function Ac(e){e.exit(`blockQuote`)}var jc={name:`characterEscape`,tokenize:Mc};function Mc(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return nc(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Nc={name:`characterReference`,tokenize:Pc};function Pc(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Zs,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=tc,u):(e.enter(`characterReferenceValue`),a=7,o=ec,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Zs&&!Vs(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Fc={partial:!0,tokenize:Ic};function Ic(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Lc={concrete:!0,name:`codeFenced`,tokenize:Rc};function Rc(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?sc(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Fc,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),sc(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?sc(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(Fc,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?sc(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?sc(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var zc={name:`codeIndented`,tokenize:Vc},Bc={partial:!0,tokenize:Hc};function Vc(e,t,n){return r;function r(t){return e.enter(`codeIndented`),cc(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):X(t)?e.attempt(Bc,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||X(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Hc(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):X(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):cc(e,t,a,`linePrefix`,4,4)(o)}function a(e){return X(e)?i(e):n(e)}}var Uc={name:`codeText`,previous:Gc,resolve:Wc,tokenize:Kc};function Wc(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Gc(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Kc(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var qc=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Jc(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Jc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Jc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Jc(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Jc(this.left,t.reverse())}}}};function Jc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Yc(e){let t={},n=-1,r,i,a,o,s,c,l,u=new qc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Xc(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Hs(e,0,1/0,u.slice(0)),!l}function Xc(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Zc={resolve:$c,tokenize:el},Qc={partial:!0,tokenize:tl};function $c(e){return Yc(e),e}function el(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(Qc,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function tl(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),sc(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function nl(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||$s(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||rc(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||$s(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function rl(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function il(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),sc(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function al(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?sc(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ol={name:`definition`,tokenize:cl},sl={partial:!0,tokenize:ll};function cl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return rl.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return rc(t)?al(e,l)(t):l(t)}function l(t){return nl(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(sl,d,d)(t)}function d(t){return Z(t)?sc(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ll(e,t,n){return r;function r(t){return rc(t)?al(e,i)(t):n(t)}function i(t){return il(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?sc(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var ul={name:`hardBreakEscape`,tokenize:dl};function dl(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var fl={name:`headingAtx`,resolve:pl,tokenize:ml};function pl(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Hs(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function ml(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||rc(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Z(n)?sc(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||rc(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var hl=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),gl=[`pre`,`script`,`style`,`textarea`],_l={concrete:!0,name:`htmlFlow`,resolveTo:yl,tokenize:bl},vl={partial:!0,tokenize:xl};function yl(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function bl(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):Xs(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Xs(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Xs(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||rc(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&gl.includes(l)?(i=1,r.interrupt?t(s):O(s)):hl.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Zs(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Xs(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Zs(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||rc(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||X(t)?O(t):Z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(vl,ee,k)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Fc,A,ee)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||X(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return gl.includes(n)?(e.consume(t),L):O(t)}return Xs(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||X(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),L)}function ee(n){return e.exit(`htmlFlow`),t(n)}}function xl(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Tc,t,n)}}var Sl={name:`htmlText`,tokenize:Cl};function Cl(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Xs(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Xs(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):X(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Xs(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Zs(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,N(t)):Z(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Zs(t)?(e.consume(t),w):t===47||t===62||rc(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Xs(t)?(e.consume(t),E):X(t)?(o=T,N(t)):Z(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Zs(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):X(t)?(o=D,N(t)):Z(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):X(t)?(o=O,N(t)):Z(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):X(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||rc(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||rc(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Z(t)?sc(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var wl={name:`labelEnd`,resolveAll:Ol,resolveTo:kl,tokenize:Al},Tl={tokenize:jl},El={tokenize:Ml},Dl={tokenize:Nl};function Ol(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Hs(e,0,e.length,n),e}function kl(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Us(o,e.slice(i+1,i+r+3)),o=Us(o,[[`enter`,l,t]]),o=Us(o,vc(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Us(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Us(o,e.slice(a+1)),o=Us(o,[[`exit`,s,t]]),Hs(e,i,e.length,o),e}function Al(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ys(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Tl,u,o?u:d)(t):t===91?e.attempt(El,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Dl,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function jl(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return rc(t)?al(e,a)(t):a(t)}function a(t){return t===41?u(t):nl(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return rc(t)?al(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?il(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return rc(t)?al(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ml(e,t,n){let r=this;return i;function i(t){return rl.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Nl(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Pl={name:`labelStartImage`,resolveAll:wl.resolveAll,tokenize:Q};function Q(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Fl={name:`labelStartLink`,resolveAll:wl.resolveAll,tokenize:Il};function Il(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ll={name:`lineEnding`,tokenize:Rl};function Rl(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),sc(e,t,`linePrefix`)}}var zl={name:`thematicBreak`,tokenize:Bl};function Bl(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?sc(e,s,`whitespace`)(t):s(t))}}var Vl={continuation:{tokenize:Gl},exit:ql,name:`list`,tokenize:Wl},Hl={partial:!0,tokenize:Jl},Ul={partial:!0,tokenize:Kl};function Wl(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:ec(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(zl,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return ec(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Tc,r.interrupt?n:u,e.attempt(Hl,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Gl(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Tc,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,sc(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ul,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,sc(e,e.attempt(Vl,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Kl(e,t,n){let r=this;return sc(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ql(e){e.exit(this.containerState.type)}function Jl(e,t,n){let r=this;return sc(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Yl={name:`setextUnderline`,resolveTo:Xl,tokenize:Zl};function Xl(e,t){let n=new dc,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Zl(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?sc(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Ql={tokenize:$l};function $l(e){let t=this,n=e.attempt(Tc,r,e.attempt(this.parser.constructs.flowInitial,i,sc(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zc,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var eu={resolveAll:iu()},tu=ru(`string`),nu=ru(`text`);function ru(e){return{resolveAll:iu(e===`text`?au:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function iu(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function au(e,t){let n=new dc,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var ou=m({attentionMarkers:()=>mu,contentInitial:()=>cu,disable:()=>hu,document:()=>su,flow:()=>uu,flowInitial:()=>lu,insideSpan:()=>pu,string:()=>du,text:()=>fu}),su={42:Vl,43:Vl,45:Vl,48:Vl,49:Vl,50:Vl,51:Vl,52:Vl,53:Vl,54:Vl,55:Vl,56:Vl,57:Vl,62:Dc},cu={91:ol},lu={[-2]:zc,[-1]:zc,32:zc},uu={35:fl,42:zl,45:[Yl,zl],60:_l,61:Yl,95:zl,96:Lc,126:Lc},du={38:Nc,92:jc},fu={[-5]:Ll,[-4]:Ll,[-3]:Ll,33:Pl,38:Nc,42:yc,60:[Cc,Sl],91:Fl,92:[ul,jc],93:wl,95:yc,96:Uc},pu={null:[yc,eu]},mu={null:[42,95]},hu={null:[]};function gu(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Us(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=vc(a,l.events,l),l.events):[]}function f(e,t){return vu(p(e),t)}function p(e){return _u(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Hs(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _u(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function vu(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
43
|
+
`;break;case-3:o=`\r
|
|
44
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function yu(e){let t={constructs:Gs([ou,...(e||{}).extensions||[]]),content:n(lc),defined:[],document:n(pc),flow:n(Ql),lazy:{},string:n(tu),text:n(nu)};return t;function n(e){return n;function n(n){return gu(t,e,n)}}}function bu(e){for(;!Yc(e););return e}var xu=/[\0\t\n\r]/g;function Su(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){xu.lastIndex=c;let n=xu.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Cu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wu(e){return e.replace(Cu,Tu)}function Tu(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Js(n.slice(t?2:1),t?16:10)}return Vs(n)||e}function Eu(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ou(e.position):`start`in e||`end`in e?Ou(e):`line`in e||`column`in e?Du(e):``}function Du(e){return ku(e&&e.line)+`:`+ku(e&&e.column)}function Ou(e){return Du(e&&e.start)+`-`+Du(e&&e.end)}function ku(e){return e&&typeof e==`number`?e:1}var Au={}.hasOwnProperty;function ju(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Mu(n)(bu(yu(n).document().write(Su()(e,t,!0))))}function Mu(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(pe),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(le,s),codeText:o(ue,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(de),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(fe),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:ne,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(pe),strong:o(xe),thematicBreak:o(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:ie,characterReference:ae,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:L,resourceTitleString:ee,resource:te,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Pu(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Au.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Iu).call(o,void 0,e[0])}for(r.position={start:Nu(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Nu(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Nu(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Eu({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Iu).call(this,e,r[0])),n.position.end=Nu(e.end)}function d(){return Is(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ys(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Se(),n.position={start:Nu(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Nu(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Nu(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=wu(t),n.identifier=Ys(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ys(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function R(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Js(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Vs(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=Nu(e.end)}function oe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[],position:void 0}}function le(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ue(){return{type:`inlineCode`,value:``,position:void 0}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function fe(){return{type:`emphasis`,children:[],position:void 0}}function pe(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function xe(){return{type:`strong`,children:[],position:void 0}}function Se(){return{type:`text`,value:``,position:void 0}}function Ce(){return{type:`thematicBreak`,position:void 0}}}function Nu(e){return{line:e.line,column:e.column,offset:e.offset}}function Pu(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Pu(e,r):Fu(e,r)}}function Fu(e,t){let n;for(n in t)if(Au.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Iu(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Eu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Eu({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Eu({start:t.start,end:t.end})+`) is still open`)}function Lu(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ru(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var zu=(function(e){if(e==null)return Wu;if(typeof e==`function`)return Uu(e);if(typeof e==`object`)return Array.isArray(e)?Bu(e):Vu(e);if(typeof e==`string`)return Hu(e);throw Error(`Expected function, string, or object as test`)});function Bu(e){let t=[],n=-1;for(;++n<e.length;)t[n]=zu(e[n]);return Uu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Vu(e){let t=e;return Uu(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Hu(e){return Uu(t);function t(t){return t&&t.type===e}}function Uu(e){return t;function t(t,n,r){return!!(Gu(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Wu(){return!0}function Gu(e){return typeof e==`object`&&!!e&&`type`in e}function Ku(e){return e}var qu=[],Ju=`skip`;function Yu(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=zu(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+Ku(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=qu;if(s&&r&&(o=Xu(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=Xu(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function Xu(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?qu:[e]}function Zu(e,t,n){let r=zu((n||{}).ignore||[]),i=Qu(t),a=-1;for(;++a<i.length;)Yu(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return Ju}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Qu(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([$u(e[0]),ed(e[1])])}return t}function $u(e){return typeof e==`string`?new RegExp(Ru(e),`g`):e}function ed(e){return typeof e==`function`?e:function(){return e}}function td(){return{transforms:[cd],enter:{literalAutolink:nd,literalAutolinkEmail:rd,literalAutolinkHttp:rd,literalAutolinkWww:rd},exit:{literalAutolink:sd,literalAutolinkEmail:od,literalAutolinkHttp:id,literalAutolinkWww:ad}}}function nd(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function rd(e){this.config.enter.autolinkProtocol.call(this,e)}function id(e){this.config.exit.autolinkProtocol.call(this,e)}function ad(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function od(e){this.config.exit.autolinkEmail.call(this,e)}function sd(e){this.exit(e)}function cd(e){Zu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ld],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ud]],{ignore:[`link`,`linkReference`]})}function ld(e,t,n,r,i){let a=``;if(!pd(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!dd(n)))return!1;let o=fd(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ud(e,t,n,r){return!pd(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function dd(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fd(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Lu(e,`(`),a=Lu(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function pd(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||ac(n)||ic(n))&&(!t||n!==47)}Cd.peek=Sd;function md(){this.buffer()}function hd(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function gd(){this.buffer()}function _d(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function vd(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ys(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yd(e){this.exit(e)}function bd(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ys(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xd(e){this.exit(e)}function Sd(){return`[`}function Cd(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function wd(){return{enter:{gfmFootnoteCallString:md,gfmFootnoteCall:hd,gfmFootnoteDefinitionLabelString:gd,gfmFootnoteDefinition:_d},exit:{gfmFootnoteCallString:vd,gfmFootnoteCall:yd,gfmFootnoteDefinitionLabelString:bd,gfmFootnoteDefinition:xd}}}Od.attention=kd,Od.peek=Ad;function Td(){return{canContainEols:[`delete`],enter:{strikethrough:Ed},exit:{strikethrough:Dd}}}function Ed(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Dd(e){this.exit(e)}function Od(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function kd(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Ad(){return`~`}function jd(){return{enter:{table:Md,tableData:Id,tableHeader:Id,tableRow:Pd},exit:{codeText:Ld,table:Nd,tableData:Fd,tableHeader:Fd,tableRow:Fd}}}function Md(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Nd(e){this.exit(e),this.data.inTable=void 0}function Pd(e){this.enter({type:`tableRow`,children:[]},e)}function Fd(e){this.exit(e)}function Id(e){this.enter({type:`tableCell`,children:[]},e)}function Ld(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Rd));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Rd(e,t){return t===`|`?t:e}function zd(){return{exit:{taskListCheckValueChecked:Bd,taskListCheckValueUnchecked:Bd,paragraph:Vd}}}function Bd(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Vd(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Hd(){return[td(),wd(),Td(),jd(),zd()]}var Ud={tokenize:rf,partial:!0},Wd={tokenize:af,partial:!0},Gd={tokenize:of,partial:!0},Kd={tokenize:sf,partial:!0},qd={tokenize:cf,partial:!0},Jd={name:`wwwAutolink`,tokenize:tf,previous:lf},Yd={name:`protocolAutolink`,tokenize:nf,previous:uf},Xd={name:`emailAutolink`,tokenize:ef,previous:df},Zd={};function Qd(){return{text:Zd}}for(var $d=48;$d<123;)Zd[$d]=Xd,$d++,$d===58?$d=65:$d===91&&($d=97);Zd[43]=Xd,Zd[45]=Xd,Zd[46]=Xd,Zd[95]=Xd,Zd[72]=[Xd,Yd],Zd[104]=[Xd,Yd],Zd[87]=[Xd,Jd],Zd[119]=[Xd,Jd];function ef(e,t,n){let r=this,i,a;return o;function o(t){return!ff(t)||!df.call(r,r.previous)||pf(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ff(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(qd,u,l)(t):t===45||t===95||Zs(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Xs(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function tf(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!lf.call(r,r.previous)||pf(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Ud,e.attempt(Wd,e.attempt(Gd,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function nf(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&uf.call(r,r.previous)&&!pf(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Xs(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||$s(t)||rc(t)||ac(t)||ic(t)?n(t):e.attempt(Wd,e.attempt(Gd,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function rf(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function af(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Kd,c,s)(t):t===null||rc(t)||ac(t)||t!==45&&ic(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function of(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Kd,t,a)(o):o===null||rc(o)||ac(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function sf(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||rc(o)||ac(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||rc(e)||ac(e)?t(e):r(e)}function a(e){return Xs(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Xs(t)?(e.consume(t),o):n(t)}}function cf(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Zs(e)?n(e):t(e)}}function lf(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||rc(e)}function uf(e){return!Xs(e)}function df(e){return!(e===47||ff(e))}function ff(e){return e===43||e===45||e===46||e===95||Zs(e)}function pf(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var mf={tokenize:Sf,partial:!0};function hf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:yf,continuation:{tokenize:bf},exit:xf}},text:{91:{name:`gfmFootnoteCall`,tokenize:vf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:gf,resolveTo:_f}}}}function gf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ys(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function _f(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function vf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||rc(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ys(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return rc(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function yf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||rc(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ys(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return rc(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),sc(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function bf(e,t,n){return e.check(Tc,t,e.attempt(mf,t,n))}function xf(e){e.exit(`gfmFootnoteDefinition`)}function Sf(e,t,n){let r=this;return sc(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Cf(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Hs(o,o.length,0,vc(s,e.slice(r+1,n),t)),Hs(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Hs(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=_c(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=_c(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var wf=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Tf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Tf(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Ef(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Df(){return{flow:{null:{name:`table`,tokenize:Of,resolveAll:kf}}}}function Of(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?sc(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||rc(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?sc(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?sc(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?sc(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Z(n)?sc(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||rc(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function kf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new wf;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(jf(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Af(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Af(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Af(f,t,o,i,n,d)):(o[0]=o[1],d=Af(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&jf(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Ef(t.events,n))}return e}function Af(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Mf(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Mf(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Mf(t.events,n[2]),a=Mf(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Mf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function jf(e,t,n,r,i){let a=[],o=Mf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Mf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Nf={name:`tasklistCheck`,tokenize:Ff};function Pf(){return{text:{91:Nf}}}function Ff(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return rc(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Z(r)?e.check({tokenize:If},t,n)(r):n(r)}}function If(e,t,n){return sc(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Lf(e){return Gs([Qd(),hf(),Cf(e),Df(),Pf()])}var Rf=Ns({bash:ko,csharp:Ao,css:zo,diff:Bo,dockerfile:Ds,gherkin:Os,go:Vo,ini:Ho,java:Jo,javascript:rs,json:as,kotlin:us,markdown:ds,plaintext:fs,powershell:ks,python:ps,sql:ms,typescript:ws,xml:Ts,yaml:Es}),zf={ts:`typescript`,js:`javascript`,py:`python`,sh:`bash`,shell:`bash`,zsh:`bash`,console:`bash`,yml:`yaml`,cs:`csharp`,"c#":`csharp`,feature:`gherkin`,ps1:`powershell`,pwsh:`powershell`,docker:`dockerfile`,html:`xml`,svg:`xml`,jsonc:`json`,tsx:`typescript`,jsx:`javascript`,kt:`kotlin`,md:`markdown`,toml:`ini`,text:`plaintext`,txt:`plaintext`,log:`plaintext`},Bf=6e4,Vf=24,Hf=12;function Uf(e){let t=String(e??``).replace(/[\u0000-\u0020\u007f-\u009f]/g,``).trim();return t?/^https?:\/\/[^/]/i.test(t)?`web`:/^mailto:[^\s@]+@/i.test(t)?`mail`:/^[a-z]:[\\/]/i.test(t)?`path`:/^[a-z][a-z0-9+.-]*:/i.test(t)?`unsafe`:`path`:`unsafe`}function Wf(e){return ju(e,{extensions:[Lf()],mdastExtensions:[Hd()]})}var Gf=e=>`value`in e&&typeof e.value==`string`?e.value:`children`in e?e.children.map(Gf).join(``):``;async function Kf(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function qf({text:e,label:t}){let[n,r]=(0,q.useState)(!1);return(0,J.jsx)(`button`,{type:`button`,"aria-label":n?`Copied`:t,"data-tip":n?`Copied`:t,onClick:async()=>{await Kf(e)&&(r(!0),setTimeout(()=>r(!1),1500))},className:`inline-flex size-8 flex-none cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent text-muted hover:bg-surface-strong hover:text-ink`,children:n?(0,J.jsx)(s,{size:14,"aria-hidden":`true`,className:`text-pass`}):(0,J.jsx)(S,{size:14,"aria-hidden":`true`})})}function Jf(e){return e.map((e,t)=>{if(e.type===`text`)return e.value;if(e.type===`element`){let n=e.properties?.className;return(0,J.jsx)(`span`,{className:Array.isArray(n)?n.join(` `):typeof n==`string`?n:void 0,children:Jf(e.children)},t)}return null})}function Yf(e,t){if(e.length>Bf)return e;try{let n=zf[t]||t;return Jf((n&&Rf.registered(n)?Rf.highlight(n,e):Rf.highlightAuto(e,{subset:[`typescript`,`python`,`java`,`csharp`,`json`,`yaml`,`bash`,`sql`,`xml`,`gherkin`]})).children)}catch{return e}}function Xf(e){return(/(?:title|file|filename)=["']?([^"'\s]+)["']?/.exec(e||``)||/^\s*([\w./\\-]+\.\w{1,8})\s*$/.exec(e||``))?.[1]??``}function Zf(e){let[t=``,n=``]=String(e||``).split(`:`);return{lang:t.toLowerCase(),file:n}}function Qf({value:e,lang:t,meta:n}){let{lang:r,file:i}=Zf(t),a=i||Xf(n),o=e.split(`
|
|
45
|
+
`),[s,c]=(0,q.useState)(!1),l=!s&&o.length>28,u=l?o.slice(0,Vf).join(`
|
|
46
|
+
`):e,d=r===`diff`||r===`patch`,f=(0,q.useMemo)(()=>d?null:Yf(u,r),[u,r,d]);return(0,J.jsxs)(`figure`,{className:`my-3 overflow-hidden rounded-[12px] border border-line bg-surface-muted`,children:[(0,J.jsxs)(`figcaption`,{className:`flex min-h-9 items-center gap-2 border-b border-line-soft pr-1 pl-3`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[12px] text-muted`,children:a||r||`text`}),a&&r&&(0,J.jsx)(`span`,{className:`font-mono text-[12px] text-muted`,children:r}),(0,J.jsx)(qf,{text:e,label:`Copy ${a||`the code`}`})]}),(0,J.jsx)(`pre`,{className:`m-0 overflow-x-auto px-4 py-3 font-mono text-[13px] leading-relaxed`,children:(0,J.jsx)(`code`,{className:`hljs`,children:d?u.split(`
|
|
47
|
+
`).map((e,t)=>(0,J.jsx)(`span`,{className:z(`-mx-4 block px-4`,/^\+(?!\+\+)/.test(e)?`bg-pass-soft text-pass`:/^-(?!--)/.test(e)?`bg-fail-soft text-fail`:/^@@/.test(e)?`text-accent-fg`:``),children:e||` `},t)):f})}),l&&(0,J.jsxs)(`button`,{type:`button`,onClick:()=>c(!0),"data-tip":`Show all ${o.length} lines`,className:`flex min-h-9 w-full cursor-pointer items-center justify-center gap-1.5 border-0 border-t border-line-soft bg-transparent text-[13px] font-medium text-ink-2 hover:bg-surface-strong`,children:[(0,J.jsx)(R,{size:14,"aria-hidden":`true`}),`All (`,o.length,`)`]})]})}var $f=/^(passed|pass|ok|success|succeeded|done|✓|✅|yes)$/i,ep=/^(failed|fail|error|errored|broken|✗|❌|no)$/i,tp=/^(skipped|skip|pending|blocked|n\/a|stopped|flaky)$/i;function np({node:e,ctx:t}){let[n,r]=(0,q.useState)(!1),[i,...a]=e.children,o=e.align||[],s=n?a:a.slice(0,Hf),c=e.children.map(e=>e.children.map(e=>Gf(e).replace(/\s+/g,` `).trim()).join(` `)).join(`
|
|
48
|
+
`),l=(e,n,r,i)=>{let a=Gf(e).trim(),s=r?`th`:`td`,c=!r&&($f.test(a)?`pass`:ep.test(a)?`fail`:tp.test(a)?`skip`:``);return(0,J.jsx)(s,{scope:r?`col`:void 0,className:z(`border-t border-line-soft px-3 py-2 align-top`,r&&`border-t-0 bg-surface-muted text-[13px] font-medium whitespace-nowrap text-ink-2`,o[i]===`right`?`text-right tabular-nums`:o[i]===`center`?`text-center`:`text-left`),children:c?(0,J.jsx)(`span`,{className:z(`inline-flex min-h-6 items-center rounded-full px-2.5 text-xs font-medium`,c===`pass`?`bg-pass-soft text-pass`:c===`fail`?`bg-fail-soft text-fail`:`bg-surface-strong text-ink-2`),children:a}):gp(e,t)},n)};return(0,J.jsxs)(`figure`,{className:`my-3`,children:[(0,J.jsx)(`div`,{className:`overflow-x-auto rounded-[12px] card border`,children:(0,J.jsxs)(`table`,{className:`min-w-full border-collapse text-sm [overflow-wrap:normal]`,children:[i&&(0,J.jsx)(`thead`,{className:`bg-surface-strong`,children:(0,J.jsx)(`tr`,{children:i.children.map((e,t)=>l(e,t,!0,t))})}),(0,J.jsx)(`tbody`,{children:s.map((e,t)=>(0,J.jsx)(`tr`,{className:`even:bg-surface-muted/50`,children:e.children.map((e,t)=>l(e,t,!1,t))},t))})]})}),(0,J.jsxs)(`figcaption`,{className:`mt-1 flex items-center gap-2`,children:[(0,J.jsxs)(`span`,{className:`flex-1 text-[12px] text-muted`,children:[a.length,` row`,a.length===1?``:`s`]}),a.length>s.length&&(0,J.jsxs)(`button`,{type:`button`,onClick:()=>r(!0),"data-tip":`Show all ${a.length} rows`,className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-lg border-0 bg-transparent px-2 text-[12px] font-medium text-ink-2 hover:bg-surface-strong`,children:[(0,J.jsx)(R,{size:14,"aria-hidden":`true`}),`All (`,a.length,`)`]}),(0,J.jsx)(qf,{text:c,label:`Copy the table, for a spreadsheet`})]})]})}var rp=e=>{try{return new URL(e).host.replace(/^www\./,``)}catch{return``}},ip=e=>{try{let t=new URL(e);return`${t.host.replace(/^www\./,``)}${t.pathname.replace(/\/$/,``)}`}catch{return e}};function ap(e){let t=e.trim().replace(/[\\/]+$/,``);return/\.html?$/i.test(t)||!/\.[A-Za-z][A-Za-z0-9]{0,7}$/.test(t.split(/[\\/]/).pop()||``)?`report`:/\.(cs|ts|tsx|js|jsx|mjs|py|java|kt|go|rb|php|feature|spec|robot|cy\.ts|json|ya?ml|xml|csproj|sln|sql|sh|ps1)$/i.test(t)?`code`:`file`}function op(e,t=3){let n=e.trim().split(/[\\/]/).filter(Boolean);return n.length>t?`…/${n.slice(-t).join(`/`)}`:e.trim()}function sp({path:e,children:t}){let[n,r]=(0,q.useState)(``),[i,a]=(0,q.useState)(!1),o=async()=>{r(``),r(await $t(e))},c=ap(e),l=c===`report`?/\.html?$/i.test(e)?Ge:ct:c===`code`?we:Ae;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`group/file mx-0.5 inline-flex max-w-full items-baseline gap-0.5 align-baseline`,children:[(0,J.jsxs)(`button`,{type:`button`,"data-tip":`Open ${e}`,onClick:()=>void o(),className:`inline-flex min-w-0 cursor-pointer items-center gap-1 self-center rounded border-0 bg-transparent p-0 font-mono text-[13px] text-accent-fg underline decoration-accent/30 underline-offset-[3px] hover:decoration-accent`,children:[(0,J.jsx)(zt,{icon:l,size:13,className:`flex-none`}),(0,J.jsx)(`span`,{className:`truncate`,children:t??op(e)})]}),(0,J.jsx)(`button`,{type:`button`,"aria-label":i?`Copied`:`Copy the path ${e}`,"data-tip":i?`Copied`:`Copy the path ${e}`,onClick:async()=>{await Kf(e)&&(a(!0),setTimeout(()=>a(!1),1500))},className:`inline-flex cursor-pointer items-center self-center rounded border-0 bg-transparent p-0.5 text-muted opacity-40 group-hover/file:opacity-100 hover:bg-surface-strong hover:text-ink focus-visible:opacity-100`,children:i?(0,J.jsx)(s,{size:12,"aria-hidden":`true`,className:`text-pass`}):(0,J.jsx)(S,{size:12,"aria-hidden":`true`})})]}),n&&(0,J.jsx)(`span`,{role:`status`,className:`mx-1 text-[12px] text-muted`,children:n})]})}function cp({path:e,alt:t}){let[n,r]=(0,q.useState)(``),[i,a]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{let t=!1;return Bt.open(e).then(e=>!t&&(e.kind===`image`?r(e.url):a(!0)),()=>!t&&a(!0)),()=>{t=!0}},[e]),i?(0,J.jsx)(sp,{path:e,children:t}):n?(0,J.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,"data-tip":`${t}: open full size`,className:`my-2 block w-fit`,children:(0,J.jsx)(`img`,{src:n,alt:t,className:`block max-h-[360px] max-w-full rounded-[10px] border border-line-soft`})}):(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[t,`…`]})}var lp=/(?<![\w/\\.:@~-])((?:[A-Za-z]:)?(?:\.{1,2})?[\\/]?(?:\.?[\w@-][\w@.-]*[\\/])+\.?[\w@-][\w@.-]*\.[A-Za-z][A-Za-z0-9]{0,7})(?![\w\\/-])/g;function up(e){let t=[],n=0;for(let r of e.matchAll(lp))r.index>n&&t.push(e.slice(n,r.index)),t.push((0,J.jsx)(sp,{path:r[1]},r.index)),n=r.index+r[0].length;return t.length?(n<e.length&&t.push(e.slice(n)),t):e}var dp=/^(?:[A-Za-z]:)?[\\/]?(?:[\w@.~-]+[\\/])*\.forgeqe[\\/]reports[\\/][\w.-]+[\\/]?$/,fp=e=>{if(dp.test(e.trim()))return!0;lp.lastIndex=0;let t=[...e.trim().matchAll(lp)];return t.length===1&&t[0][0]===e.trim()};function pp({url:e,children:t}){return(0,J.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`inline text-accent-fg underline-offset-2 hover:underline`,"data-tip":e,children:[t,(0,J.jsx)(Qe,{size:12,"aria-hidden":`true`,className:`ml-0.5 inline align-[-1px]`})]})}function mp({name:e,refs:t,code:n}){return(0,J.jsx)(`button`,{type:`button`,onClick:()=>t.open(e),className:z(`cursor-pointer border-0 bg-transparent p-0 font-medium text-accent-fg underline decoration-1 underline-offset-2 hover:text-accent-fg-hover`,n&&`font-mono text-[13px]`),children:e})}function hp(e,t){let n=[...t].filter(Boolean).sort((e,t)=>t.length-e.length);if(!n.length)return[{text:e,ref:!1}];let r=RegExp(`(?<![\\w./-])(${n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})(?![\\w/-]|\\.\\w)`,`g`),i=[],a=0;for(let t of e.matchAll(r))t.index>a&&i.push({text:e.slice(a,t.index),ref:!1}),i.push({text:t[0],ref:!0}),a=t.index+t[0].length;return a<e.length&&i.push({text:e.slice(a),ref:!1}),i}function gp(e,t){return`children`in e?e.children.map((e,n)=>(0,J.jsx)(q.Fragment,{children:_p(e,t)},n)):null}function _p(t,n){switch(t.type){case`paragraph`:return(0,J.jsx)(`p`,{className:`my-2.5`,children:gp(t,n)});case`heading`:{let e=[`text-[18px]`,`text-[17px]`,`text-[16px]`,`text-[15px]`,`text-[15px]`,`text-[15px]`][t.depth-1],r=`h${Math.min(6,t.depth+2)}`;return(0,J.jsx)(r,{className:z(`mt-5 mb-2 font-semibold`,e),children:gp(t,n)})}case`text`:if(n.refs?.names.length){let e=n.refs;return hp(t.value,e.names).map((t,n)=>(0,J.jsx)(q.Fragment,{children:t.ref?(0,J.jsx)(mp,{name:t.text,refs:e}):up(t.text)},n))}return up(t.value);case`strong`:return(0,J.jsx)(`strong`,{className:`font-semibold`,children:gp(t,n)});case`emphasis`:return(0,J.jsx)(`em`,{children:gp(t,n)});case`delete`:return(0,J.jsx)(`del`,{className:`text-muted`,children:gp(t,n)});case`inlineCode`:return n.refs?.names.includes(t.value.trim())?(0,J.jsx)(mp,{name:t.value.trim(),refs:n.refs,code:!0}):fp(t.value)?(0,J.jsx)(sp,{path:t.value.trim()}):(0,J.jsx)(`code`,{className:`rounded-md bg-surface-strong px-1.5 py-px font-mono text-[13px]`,children:t.value});case`break`:return(0,J.jsx)(`br`,{});case`thematicBreak`:return(0,J.jsx)(`hr`,{className:`my-5 border-0 border-t border-line`});case`blockquote`:return(0,J.jsx)(`blockquote`,{className:`my-3 border-0 border-l-[3px] border-solid border-line pl-3 text-ink-2`,children:gp(t,n)});case`list`:{let e=t.children.some(e=>typeof e.checked==`boolean`),r=t.ordered?`ol`:`ul`;return(0,J.jsx)(r,{start:t.ordered&&t.start&&t.start!==1?t.start:void 0,className:z(`my-2.5 pl-6`,e?`list-none pl-1`:t.ordered?`list-decimal`:`list-disc`),children:gp(t,n)})}case`listItem`:{let r=t.children.map((e,r)=>e.type===`paragraph`&&!t.spread?(0,J.jsx)(q.Fragment,{children:gp(e,n)},r):(0,J.jsx)(q.Fragment,{children:_p(e,n)},r));return typeof t.checked==`boolean`?(0,J.jsxs)(`li`,{className:`my-1 flex items-start gap-2`,children:[t.checked?(0,J.jsx)(De,{size:16,"aria-label":`Done`,className:`mt-[3px] flex-none text-pass`}):(0,J.jsx)(e,{size:16,"aria-label":`Not done`,className:`mt-[3px] flex-none text-muted`}),(0,J.jsx)(`span`,{className:z(`min-w-0`,t.checked&&`text-ink-2`),children:r})]}):(0,J.jsx)(`li`,{className:`my-1 pl-0.5`,children:r})}case`code`:return(0,J.jsx)(Qf,{value:t.value,lang:t.lang,meta:t.meta});case`table`:return(0,J.jsx)(np,{node:t,ctx:n});case`link`:{let e=Uf(t.url),r=gp(t,{...n,refs:void 0});if(e===`web`){let e=Gf(t);return(0,J.jsx)(pp,{url:t.url,children:e===t.url?ip(t.url):r})}return e===`mail`?(0,J.jsx)(`a`,{href:t.url,className:`text-accent-fg underline-offset-2 hover:underline`,children:r}):e===`path`?(0,J.jsx)(sp,{path:t.url,children:Gf(t)===t.url?void 0:r}):(0,J.jsx)(`span`,{children:r})}case`image`:{let e=Uf(t.url),n=t.alt||`image`;return e===`web`?(0,J.jsxs)(pp,{url:t.url,children:[(0,J.jsx)(te,{size:14,"aria-hidden":`true`,className:`mr-1 inline align-[-2px]`}),n,` (`,rp(t.url),`)`]}):e===`path`?(0,J.jsx)(cp,{path:t.url,alt:n}):(0,J.jsx)(`span`,{children:n})}case`html`:return(0,J.jsx)(`span`,{className:`font-mono text-[13px] text-ink-2`,children:t.value});case`footnoteReference`:{let e=n.footnotes.get(t.identifier)??n.footnotes.size+1;return n.footnotes.set(t.identifier,e),(0,J.jsxs)(`sup`,{className:`text-[11px] text-muted`,children:[`[`,e,`]`]})}case`footnoteDefinition`:return(0,J.jsxs)(`div`,{className:`my-1 flex gap-2 text-[13px] text-ink-2`,children:[(0,J.jsxs)(`span`,{className:`text-muted`,children:[`[`,n.footnotes.get(t.identifier)??t.label??t.identifier,`]`]}),(0,J.jsx)(`div`,{className:`min-w-0 [&>p]:my-0`,children:gp(t,n)})]});case`definition`:return null;case`yaml`:return(0,J.jsx)(Qf,{value:t.value,lang:`yaml`});default:return`children`in t?gp(t,n):`value`in t?String(t.value):null}}function vp({text:e,className:t,refs:n}){let r=(0,q.useMemo)(()=>Wf(e),[e]),i={footnotes:new Map,refs:n};return(0,J.jsx)(`div`,{className:z(`text-[15px] leading-[1.65] text-ink [overflow-wrap:anywhere] [&>:first-child]:mt-0 [&>:last-child]:mb-0`,t),children:r.children.map((e,t)=>(0,J.jsx)(q.Fragment,{children:_p(e,i)},t))})}function yp({groups:e,edit:t,continued:n}){return(0,J.jsx)(J.Fragment,{children:e.map((e,r)=>(0,J.jsxs)(`div`,{children:[(0,J.jsx)(W,{help:e.help,first:r===0&&!n,children:e.title}),(0,J.jsx)(Nn,{defs:e.fields,edit:t,base:e.base})]},e.title))})}function bp(e,t,n,r){return t.map(t=>{let r=e[t]??n.find(e=>e.key===t)?.default;return typeof r==`string`?r:``}).filter(e=>e&&!r(e))}var xp=[{key:`url`,label:`Sign-in page`,type:`url`,placeholder:`https://staging.shop.example/login`},{key:`domains`,label:`Or sites`,help:`Comma separated; * matches a subdomain.`,type:`list`,placeholder:`https://staging.shop.example, https://*.shop.example`},{key:`app`,label:`Or desktop app`,help:`A desktop app of desktop.apps this login signs in to, instead of a site.`,type:`text`,placeholder:`billing`},{key:`username_env`,label:`User name variable`,type:`var`,placeholder:`SHOP_USER`},{key:`password_env`,label:`Password variable`,type:`var`,placeholder:`SHOP_PASSWORD`},{key:`totp_env`,label:`Authenticator secret variable`,help:`Optional: a base32 secret for two-factor codes.`,type:`var`,placeholder:`SHOP_TOTP_SECRET`},{key:`save_session`,label:`Keep the session`,help:`The next run starts signed in (.forgeqe/sessions). Off signs in every run.`,type:`switch`,default:!0},{key:`code`,label:`Codes sent by`,help:`A one-time code the site sends another way than an authenticator app: ForgeQE reads it where it arrives and types it.`,type:`select`,options:[{value:`email`,label:`Email (a test mailbox, IMAP)`},{value:`sms`,label:`Text message (Twilio)`},{value:`http`,label:`The test environment's address`}],emptyLabel:`None`},{key:`code_host`,label:`Mailbox server`,help:`The IMAP server, on port 993.`,type:`text`,placeholder:`imap.mail.example`,when:e=>e.code===`email`},{key:`code_user_env`,label:`Mailbox user or Twilio SID variable`,help:`Email: the mailbox user. Text message: the Twilio account SID.`,type:`var`,placeholder:`QA_MAIL_USER`,when:e=>e.code===`email`||e.code===`sms`},{key:`code_secret_env`,label:`Mailbox password or token variable`,help:`Email: the mailbox password. Text message: the Twilio auth token. Address: its token (optional).`,type:`var`,placeholder:`QA_MAIL_PASSWORD`,when:e=>!!e.code},{key:`code_to`,label:`Sent to`,help:`Email: the address the code goes to (optional). Text message: the number, +15550100.`,type:`text`,placeholder:`+15550100 or qa1@mail.example`,when:e=>e.code===`email`||e.code===`sms`},{key:`code_sender`,label:`Sent from`,help:`Optional: only messages from this address or number.`,type:`text`,placeholder:`no-reply@shop.example`,when:e=>e.code===`email`||e.code===`sms`},{key:`code_folder`,label:`Mailbox folder`,type:`text`,default:`INBOX`,when:e=>e.code===`email`},{key:`code_url`,label:`Address with the latest code`,help:`https (http only on this computer); answers with the code as text or JSON.`,type:`url`,placeholder:`https://qa-api.shop.example/otp/latest?user=qa1`,when:e=>e.code===`http`},{key:`code_header`,label:`Token header`,help:`Optional: the header the token goes in (Authorization: Bearer otherwise).`,type:`text`,placeholder:`X-Api-Key`,when:e=>e.code===`http`},{key:`code_pattern`,label:`Code pattern`,help:`Optional: a regular expression whose group is the code (4 to 8 digits otherwise).`,type:`text`,placeholder:`Your code is ([0-9]{6})`,when:e=>!!e.code},{key:`code_wait`,label:`Wait for it (seconds)`,type:`number`,default:90,when:e=>!!e.code},{key:`passkey_env`,label:`Security key variable`,help:`Holds a security key or passkey registered once; runs present it as a virtual key.`,type:`var`,placeholder:`SHOP_PASSKEY`},{key:`push_wait`,label:`Wait for a push approval (seconds)`,help:`A push to a phone needs a person: the run waits this long and tells the notification channels that ask for sign-in approvals.`,type:`number`,placeholder:`120`}],Sp=/^[A-Za-z0-9][A-Za-z0-9_.-]{0,62}$/;function Cp(e,t,n){return e?Sp.test(e)?e!==t&&n.includes(e)?`There is already a sign-in named ${e}.`:``:`Letters, digits, . _ and -.`:`Needs a name.`}function wp(e){let t=e.toUpperCase().replace(/[^A-Z0-9]/g,`_`);return{username_env:`${t}_USER`,password_env:`${t}_PASSWORD`}}function Tp({edit:e}){let[t,n]=(0,q.useState)(null),i=on(),a=K(e.value.logins),o=Object.keys(a);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`One for each app the agent signs in to.`}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add a sign-in`,onClick:()=>{let e=vr(a,`shop`);n({mode:`add`,from:``,name:e,login:wp(e)})},children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),o.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`None yet.`}),Object.entries(a).map(([t,r])=>{let a=K(r),o=bp(a,[`username_env`,`password_env`],xp,e=>Ln(i,e)),s=a.username_env||a.password_env;return(0,J.jsx)(hn,{expandable:!1,open:!1,onToggle:()=>{},lead:(0,J.jsx)(pn,{icon:ce}),title:t,meta:String(a.url||(Array.isArray(a.domains)?a.domains.join(`, `):``)||`No site yet`),state:s?o.length?(0,J.jsx)(`span`,{className:`text-sm text-warn`,"data-tip":o.join(`, `),children:o.length===1?`Needs ${o[0]}`:`Needs ${o.length} variables`}):(0,J.jsx)(`span`,{className:`text-sm text-pass`,children:`Ready`}):(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Not set up`}),actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Edit ${t}`,"data-tip":`Edit ${t}`,onClick:()=>n({mode:`edit`,from:t,name:t,login:{...a}}),children:(0,J.jsx)(ie,{"aria-hidden":`true`})}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${t}`,"data-tip":`Remove ${t}`,onClick:()=>e.set(U(e.value,[`logins`,t],void 0)),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]}),children:null},t)}),(0,J.jsx)(Ep,{panel:t,setPanel:n,taken:o,vars:e.vars,onApply:t=>{t.mode===`add`?e.set(U(e.value,[`logins`,t.name],t.login)):e.set(U(e.value,[`logins`],{...xr(a,t.from,t.name),[t.name]:t.login}))}})]})}function Ep({panel:e,setPanel:t,taken:n,vars:a,onApply:o}){let c={value:e?K(e.login):{},set:n=>e&&t({...e,login:n}),vars:a},l=e?Cp(e.name,e.from,n):``,u=()=>t(null);return(0,J.jsx)(Cn,{open:!!e,onClose:u,title:e?.mode===`add`?`Add a sign-in`:`Edit ${e?.from}`,description:(0,J.jsxs)(J.Fragment,{children:[`The page and variables for one app login. Changes apply when you press the button below; a secret's value goes to your credential store as you type it.`,e?.name&&Sp.test(e.name)?(0,J.jsxs)(J.Fragment,{children:[` `,`Sign in by hand with `,(0,J.jsxs)(`code`,{className:`font-mono text-[13px]`,children:[`forgeqe login `,e.name]}),`.`]}):null]}),footer:(0,J.jsxs)(J.Fragment,{children:[l&&(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:`Needs a valid name`}),(0,J.jsxs)(B,{onClick:u,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!!l,onClick:()=>{o(e),u()},children:[e?.mode===`add`?(0,J.jsx)(r,{"aria-hidden":`true`}):(0,J.jsx)(s,{"aria-hidden":`true`}),e?.mode===`add`?`Add`:`Done`]})]}),children:e&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Name`,help:l?(0,J.jsx)(`span`,{className:`text-fail`,children:l}):`How environments and forgeqe login name it.`,htmlFor:`login-name`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(V,{id:`login-name`,value:e.name,spellCheck:!1,placeholder:`shop-qa`,"aria-invalid":!!l,onChange:n=>t({...e,name:n.target.value.trim()}),className:`font-mono`})}),(0,J.jsx)(Nn,{defs:xp,edit:c,base:[],stacked:!0})]})})}function Dp({rules:e,others:t,onChange:n}){let[i,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(``),c=i.trim().length>0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`form`,{onSubmit:r=>{r.preventDefault();let o=i.replace(/^\s*[-*+]\s+/,``).trim();if(o){if(o.length>300)return s(`A rule is at most 300 characters: make it shorter.`);if([...e,...t.map(e=>e.text)].some(e=>e.toLowerCase()===o.toLowerCase()))return s(`That rule is already in force.`);s(``),n([...e,o]),a(``)}},className:`mb-4 flex items-center gap-2 rounded-[10px] border border-line py-1.5 pr-1.5 pl-5 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-accent`,children:[(0,J.jsx)(`label`,{htmlFor:`rule`,className:`sr-only`,children:`New rule`}),(0,J.jsx)(`input`,{id:`rule`,value:i,maxLength:300,onChange:e=>{a(e.target.value),s(``)},placeholder:`Add a rule every agent must follow`,className:`min-h-10 min-w-0 flex-auto border-0 bg-transparent text-[15px] outline-none focus-visible:outline-none`}),(0,J.jsxs)(`button`,{type:`submit`,disabled:!c,"data-tip":`Add the rule`,className:z(`inline-flex min-h-10 cursor-pointer items-center gap-2 rounded-[7px] border-0 px-4 text-sm font-medium disabled:cursor-not-allowed [&>svg]:size-4`,c?`bg-accent text-accent-ink hover:bg-accent-hover`:`bg-surface-strong text-muted`),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),o&&(0,J.jsx)(`p`,{role:`alert`,className:`mt-0 mb-4 text-sm text-fail`,children:o}),e.length===0&&t.length===0?(0,J.jsx)(`p`,{className:`m-0 py-5 text-sm text-muted`,children:`No rules yet. Add the first one above.`}):(0,J.jsx)(`div`,{className:`@container`,children:(0,J.jsx)(Wn,{label:`Rules`,placeholder:`Find a rule`,empty:`No rule matches.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:dr,children:`Rule`}),(0,J.jsx)(`th`,{className:z(dr,`hidden @xl:table-cell`),children:`Set in`}),(0,J.jsx)(`th`,{className:dr,children:(0,J.jsx)(`span`,{className:`sr-only`,children:`Remove`})})]}),children:[...e.map((t,r)=>(0,J.jsxs)(`tr`,{className:zn,children:[(0,J.jsx)(`td`,{className:z(hr,`leading-normal`),children:t}),(0,J.jsx)(`td`,{className:z(hr,`hidden w-[1%] whitespace-nowrap @xl:table-cell`),children:(0,J.jsx)(`span`,{className:`rounded-full bg-pass-soft px-2 py-px text-[11.5px] font-medium text-pass`,children:`This project`})}),(0,J.jsx)(`td`,{className:z(hr,`w-[1%] py-1.5 text-right`),children:(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove rule: ${t}`,"data-tip":`Remove rule: ${t}`,onClick:()=>n(e.filter((e,t)=>t!==r)),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})})]},`own-${r}`)),...t.map(e=>(0,J.jsxs)(`tr`,{className:zn,children:[(0,J.jsx)(`td`,{className:z(hr,`leading-normal`),children:e.text}),(0,J.jsxs)(`td`,{className:z(hr,`hidden w-[1%] whitespace-nowrap @xl:table-cell`),children:[(0,J.jsx)(`span`,{className:`font-mono text-[12px] text-muted`,children:e.source}),e.agents?.length?(0,J.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[`For `,e.agents.length>2?`${e.agents.length} agents`:e.agents.map(e=>Mn(e).name).join(` and `)]}):null]}),(0,J.jsx)(`td`,{className:z(hr,`w-[1%] text-right text-[12px] whitespace-nowrap text-muted`),children:`Read only`})]},`other-${e.source}-${e.text}`))]})})]})}function Op(e){let t=e=>e.split(/[\\/]/).pop()||e,n=e.paths.environments;return[{id:`config`,label:t(e.paths.config),file:`config`,path:e.paths.config,text:e.raw.config},{id:`models`,label:t(e.paths.models),file:`models`,path:e.paths.models,text:e.raw.models},...e.raw.environments.map(e=>({id:`env:${e.name}`,label:t(e.path),file:`environments`,env:n.layout===`dir`?e.name:void 0,path:e.path,text:e.text}))]}var kp=`m-0 px-4 py-3 font-mono text-[13px] leading-[1.7] whitespace-pre-wrap [overflow-wrap:anywhere] [tab-size:2]`;function Ap({id:e,value:t,lang:n,onChange:r,plain:i=!1}){let a=(0,q.useMemo)(()=>Yf(t,n),[t,n]);return(0,J.jsx)(`div`,{className:z(`outline-accent has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2`,i?`rounded-[4px] [&_pre]:px-0 [&_textarea]:px-0`:`max-h-[calc(var(--screen)-300px)] min-h-[360px] overflow-auto rounded-[8px] border border-line bg-field hover:border-line-strong focus-within:border-accent focus-within:bg-bg`),children:(0,J.jsxs)(`div`,{className:`grid`,children:[(0,J.jsxs)(`pre`,{"aria-hidden":`true`,className:z(kp,`pointer-events-none text-ink [grid-area:1/1]`),children:[a,`
|
|
49
|
+
`]}),(0,J.jsx)(`textarea`,{id:e,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,value:t,onChange:e=>r(e.target.value),className:z(kp,`resize-none overflow-hidden border-0 !bg-transparent text-transparent caret-ink outline-none selection:bg-accent-soft [grid-area:1/1]`)})]})})}function jp({snap:e,dirty:t,onSave:n}){let r=Op(e),[i,a]=(0,q.useState)(`config`),[o,c]=(0,q.useState)({}),[l,u]=(0,q.useState)(!1),d=r.find(e=>e.id===i)||r[0],f=o[d.id]??d.text,p=f!==d.text,m=e=>`file-tab-${e.id.replace(/[^A-Za-z0-9_-]/g,`_`)}`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{role:`tablist`,"aria-label":`Settings files`,className:`mb-4 flex flex-wrap gap-x-4 border-b border-line-soft`,children:r.map(e=>(0,J.jsx)(`button`,{id:m(e),type:`button`,role:`tab`,"aria-selected":d.id===e.id,"aria-controls":`file-panel`,tabIndex:d.id===e.id?0:-1,onClick:()=>a(e.id),onKeyDown:t=>{let n=r.indexOf(e),i=t.key===`ArrowRight`?r[(n+1)%r.length]:t.key===`ArrowLeft`?r[(n-1+r.length)%r.length]:void 0;i&&(a(i.id),document.getElementById(m(i))?.focus())},className:z(`-mb-px min-h-10 cursor-pointer border-0 border-b-2 bg-transparent px-0.5 font-mono text-[13px]`,d.id===e.id?`border-ink text-ink`:`border-transparent text-muted hover:text-ink`),children:e.label},e.id))}),(0,J.jsxs)(`div`,{id:`file-panel`,role:`tabpanel`,"aria-labelledby":m(d),className:`flex flex-col gap-3`,children:[(0,J.jsx)(`p`,{className:`m-0 font-mono text-[13px] break-all text-muted`,children:d.path}),e.errors[d.file]&&(0,J.jsxs)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:[`Does not parse: `,e.errors[d.file]]}),(0,J.jsx)(`label`,{htmlFor:`file-text`,className:`sr-only`,children:d.label}),(0,J.jsx)(Ap,{id:`file-text`,plain:!0,value:f,lang:d.label.endsWith(`.json`)?`json`:`yaml`,onChange:e=>c({...o,[d.id]:e})}),(0,J.jsxs)(`div`,{className:`sticky bottom-0 z-[1] -mx-1 flex flex-wrap items-center gap-3 border-t border-line-soft bg-bg px-1 py-3`,children:[(0,J.jsxs)(B,{size:`sm`,variant:`primary`,"data-tip":`Save file`,disabled:!p||l||t[d.file],onClick:async()=>{u(!0);try{if(await n(d.file,f,d.env)){let e={...o};delete e[d.id],c(e)}}finally{u(!1)}},children:[(0,J.jsx)(s,{"aria-hidden":`true`}),l?`Saving…`:`Save`]}),p&&(0,J.jsxs)(B,{size:`sm`,onClick:()=>{let e={...o};delete e[d.id],c(e)},disabled:l,"data-tip":`Discard your changes`,children:[(0,J.jsx)(ye,{"aria-hidden":`true`}),`Discard`]}),t[d.file]&&(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Save or discard the form's changes to this file first.`})]})]})]})}var Mp=/^[A-Za-z0-9][A-Za-z0-9_-]{0,62}$/;function Np({edit:e,base:t,defs:n,noun:i,meta:a,start:o={},placeholder:s}){let c=K(Cr(e.value,t)),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(``),p=d&&!Mp.test(d)?`Letters, digits, - and _.`:d in c?`There is a ${i} named ${d}.`:``,m=()=>{d&&!p&&(e.set(U(e.value,[...t,d],{...o})),u(d),f(``))};return(0,J.jsxs)(J.Fragment,{children:[Object.keys(c).length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-4 text-sm text-muted`,children:`None yet.`}),Object.entries(c).map(([r,i])=>(0,J.jsx)(hn,{title:r,meta:a(K(i))||void 0,open:l===r,onToggle:()=>u(l===r?null:r),actions:(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${r}`,"data-tip":`Remove ${r}`,onClick:()=>e.set(U(e.value,[...t,r],void 0)),children:(0,J.jsx)(Je,{"aria-hidden":`true`})}),children:(0,J.jsx)(Nn,{defs:n,edit:e,base:[...t,r]})},r)),(0,J.jsx)(G,{label:`Add a ${i}`,help:p?(0,J.jsx)(`span`,{className:`text-fail`,children:p}):`A short name: letters, digits, - and _.`,htmlFor:`add-${t.join(`-`)}`,children:(0,J.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[(0,J.jsx)(V,{id:`add-${t.join(`-`)}`,value:d,spellCheck:!1,placeholder:`Name, such as ${s}`,"aria-invalid":!!p,onChange:e=>f(e.target.value.trim()),onKeyDown:e=>e.key===`Enter`&&m(),className:`min-w-0 flex-1`}),(0,J.jsxs)(B,{size:`sm`,disabled:!d||!!p,"data-tip":`Add a ${i}`,onClick:m,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]})})]})}function Pp({icon:e,pixel:t,title:n,intro:r,children:i}){return(0,J.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,J.jsx)(lr,{}),(0,J.jsxs)(`main`,{className:z(mr),children:[(0,J.jsxs)(`div`,{className:`mb-1 flex items-center gap-3`,children:[(0,J.jsx)(pn,{icon:e,pixel:t,size:`lg`}),(0,J.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:n})]}),(0,J.jsx)(`p`,{className:`mt-1 mb-6 max-w-[64ch] text-sm leading-relaxed text-ink-2`,children:r}),i]})]})}function Fp({text:e,onRetry:t}){return(0,J.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-[14px] bg-fail-soft px-4 py-3 text-sm text-fail`,children:[(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:e}),t&&(0,J.jsxs)(B,{onClick:t,"data-tip":`Try again`,children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Retry`]})]})}function Ip(){let[e,t]=(0,q.useState)(null),[n,a]=(0,q.useState)(``),[o,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(`read`),_=()=>{f(``),g(`edit`),c({rel:``,text:`#
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
-
|
|
54
|
+
`,was:``,isNew:!0})},v=(0,q.useCallback)(()=>{a(``),tn.knowledge().then(t,e=>a(e.message))},[]);(0,q.useEffect)(v,[v]);let y=async e=>{f(``);try{let t=await tn.knowledgeFile(e);c({rel:e,text:t.text,was:t.text,isNew:!1}),g(`read`)}catch(e){a(e.message)}},b=async()=>{if(o){u(!0),f(``);try{let e=o.rel.trim();await tn.saveKnowledgeFile(e,o.text),c(null),m(`Saved ${e}. Agents read it from their next request.`),v()}catch(e){f(e.message)}finally{u(!1)}}},x=e?.files.filter(e=>e.used).length??0;return(0,J.jsxs)(Pp,{icon:Ke,pixel:Kn.knowledge,title:`Knowledge`,intro:(0,J.jsxs)(J.Fragment,{children:[`What the agents know about your product: its features, business rules and terms, as Markdown files in`,` `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e?.dir||`.forgeqe/knowledge`}),`. Each agent reads the parts that match its task. The industry and regulations are in`,` `,(0,J.jsx)(`a`,{href:H(`settings`,`evidence`),children:`Settings, Evidence`}),`, and the folders in `,(0,J.jsx)(`a`,{href:H(`settings`,`agents`),children:`Settings, Agents`}),`.`]}),children:[n&&(0,J.jsx)(Fp,{text:n,onRetry:v}),!e&&!n&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),e&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Hn,{label:`Knowledge files`,className:`mb-6`,children:[(0,J.jsx)(pr,{icon:Ae,label:`Files`,value:String(e.files.length)}),(0,J.jsx)(pr,{icon:ve,label:`Read by agents`,value:String(x),note:x<e.files.length?`The others are templates still to fill in`:void 0}),(0,J.jsx)(pr,{icon:Pe,label:`Per browser run`,value:e.maxChars?`${e.maxChars.toLocaleString()}`:`Off`,note:e.maxChars?`characters at most`:void 0})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:p&&(0,J.jsx)(`p`,{className:`mt-0 mb-4 rounded-[12px] bg-pass-soft px-3 py-2 text-sm text-pass`,children:p})}),(0,J.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`flex-1 text-sm text-muted`,children:`Open a file to read it; a template is a starting point for you to fill in.`}),(0,J.jsxs)(B,{variant:`primary`,onClick:_,"data-tip":`Add a file`,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),(0,J.jsx)(Wn,{label:`Knowledge files`,placeholder:`Find a file`,empty:`No knowledge files yet. Add one for each product area: what it does, its rules, its words.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`File`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`text-right`),children:`Status`})]}),children:e.files.map(e=>(0,J.jsxs)(`tr`,{onClick:()=>void y(e.rel),className:`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,children:[(0,J.jsxs)(`td`,{className:`px-3 py-2`,children:[(0,J.jsxs)(`button`,{type:`button`,onClick:t=>(t.stopPropagation(),void y(e.rel)),className:`flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left`,children:[(0,J.jsx)(zt,{icon:Ae,size:16,className:`flex-none text-muted`}),(0,J.jsx)(`span`,{className:`font-medium text-ink hover:underline [overflow-wrap:anywhere]`,children:e.title})]}),(0,J.jsx)(`span`,{className:`mt-0.5 block pl-6 font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.rel})]}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`w-[1%] text-right whitespace-nowrap`),children:(0,J.jsx)(It,{tone:e.used?`pass`:`neutral`,icon:!!e.used,children:e.used?e.state===`edited`?`Filled in`:`Read by agents`:`Template: fill it in`})})]},e.rel))})]}),(0,J.jsx)(Cn,{wide:!0,open:!!o,onClose:()=>c(null),title:o?.isNew?`Add a knowledge file`:e?.files.find(e=>e.rel===o?.rel)?.title||o?.rel||``,description:o?.isNew?`Markdown. Headings split it into parts; an agent gets the parts that match its task. Never put passwords or keys here.`:o?.rel,footer:(0,J.jsxs)(J.Fragment,{children:[d&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:d}),(0,J.jsxs)(B,{onClick:()=>c(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:l||!o||!o.rel.trim()||!o.isNew&&o.text===o.was,onClick:()=>void b(),children:[(0,J.jsx)(s,{"aria-hidden":`true`}),l?`Saving…`:`Save`]})]}),children:o&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[o.isNew&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`label`,{htmlFor:`knowledge-name`,className:`font-medium`,children:`File name`}),(0,J.jsx)(V,{id:`knowledge-name`,value:o.rel,spellCheck:!1,placeholder:`products/checkout.md`,className:`font-mono`,onChange:e=>c({...o,rel:e.target.value})}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`In the knowledge folder; a folder before the name groups files.`})]}),!o.isNew&&(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show the file`,className:`flex gap-1 self-start rounded-[10px] bg-surface-strong p-1`,children:[[`read`,`Read`],[`edit`,`Edit`]].map(([e,t])=>(0,J.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":h===e,onClick:()=>g(e),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,h===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:t},e))}),h===`read`&&!o.isNew?(0,J.jsx)(vp,{text:o.text,className:`max-w-[72ch] text-[14.5px]`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`knowledge-text`,className:`sr-only`,children:`Text`}),(0,J.jsx)(Ap,{id:`knowledge-text`,value:o.text,lang:`markdown`,onChange:e=>c({...o,text:e})}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Markdown. Headings split it into parts; an agent gets the parts that match its task. Never put passwords or keys here.`})]})]})})]})}var Lp=``;function Rp(e){let t=e?Date.parse(e):NaN;if(Number.isNaN(t))return``;let n=(Date.now()-t)/1e3;return n<3600?`${Math.max(1,Math.floor(n/60))} min ago`:n<86400?`${Math.floor(n/3600)} h ago`:n<604800?`${Math.floor(n/86400)} d ago`:new Date(t).toLocaleDateString([],{day:`numeric`,month:`short`})}var zp=e=>!!e.lastStatus&&/pass|success|complete/i.test(e.lastStatus),Bp=e=>e.successes===0?`never`:e.lastStatus&&!zp(e)?`failing`:e.replays>0?`replaying`:`ok`,Vp=e=>e||`Other`;function Hp({view:e}){let t=e.stats.areas.find(e=>e.area===`browser`),n=(t?.replayedSteps??0)+(t?.modelSteps??0),r=n?Math.round((t?.replayedSteps??0)/n*100):0,i=new Set([...e.flows.map(e=>Vp(e.host)),...e.pages.map(e=>Vp(e.host))]).size,a=e.flows.reduce((e,t)=>e+t.replays,0);return(0,J.jsxs)(Hn,{label:`Memory`,className:`mb-5`,children:[(0,J.jsx)(pr,{icon:T,label:`Flows`,value:String(e.flows.length),note:`tasks it can replay`}),(0,J.jsx)(pr,{icon:Ze,label:`Pages`,value:String(e.pages.length),note:`with the elements found on them`}),(0,J.jsx)(pr,{icon:Pe,label:`Sites`,value:String(i)}),(0,J.jsx)(pr,{icon:k,label:`Steps from memory`,value:n?`${r}%`:`—`,note:n?`of recent runs, ${kt(a,`replay`)}`:`no run has used it yet`})]})}var Up={never:{label:`Never passed`,tone:`fail`},failing:{label:`Failed last time`,tone:`fail`},replaying:{label:`Replaying`,tone:`pass`},ok:{label:`Learned`,tone:`neutral`}},Wp=e=>e.replayedSteps+e.modelSteps?`${Math.round(e.replayedSteps/(e.replayedSteps+e.modelSteps)*100)}%`:`—`;function Gp({f:e,showSite:t,onOpen:n}){let r=Up[Bp(e)];return(0,J.jsxs)(`tr`,{onClick:n,className:`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,children:[(0,J.jsxs)(`td`,{className:hr,children:[(0,J.jsx)(`button`,{type:`button`,onClick:e=>(e.stopPropagation(),n()),className:`cursor-pointer border-0 bg-transparent p-0 text-left text-[13.5px] text-ink hover:underline`,children:(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.goal})}),(0,J.jsxs)(`span`,{className:`mt-0.5 block text-[12px] text-muted`,children:[kt(e.steps,`step`),` · passed `,e.successes,` of `,e.runs]})]}),t&&(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`hidden max-w-[200px] truncate text-[12.5px] text-muted @3xl:table-cell`),children:Vp(e.host)}),(0,J.jsx)(`td`,{className:z(hr,`w-[1%] whitespace-nowrap`),children:(0,J.jsx)(It,{tone:r.tone,icon:r.tone!==`neutral`,children:r.label})}),(0,J.jsx)(`td`,{className:z(ir,`hidden @2xl:table-cell`),children:Wp(e)}),(0,J.jsx)(`td`,{className:z(ir,`text-muted`),children:Rp(e.lastRun)})]})}function Kp({p:e,showSite:t,forget:n}){return(0,J.jsxs)(`tr`,{className:zn,children:[(0,J.jsxs)(`td`,{className:hr,children:[(0,J.jsx)(`span`,{className:`block text-[13.5px] text-ink`,children:e.title||e.path}),(0,J.jsx)(`span`,{className:`block truncate font-mono text-[11.5px] text-muted`,"data-tip":`${e.host}${e.path}`,children:e.path})]}),t&&(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`hidden max-w-[200px] truncate text-[12.5px] text-muted @3xl:table-cell`),children:Vp(e.host)}),(0,J.jsx)(`td`,{className:ir,children:e.elements}),(0,J.jsx)(`td`,{className:z(ir,`hidden @2xl:table-cell`),children:e.visits}),(0,J.jsx)(`td`,{className:z(ir,`text-muted`),children:Rp(e.lastSeen)}),(0,J.jsx)(`td`,{className:z(hr,`w-[1%] text-right whitespace-nowrap`),children:n})]})}function qp({view:e,target:t,files:n,label:r,question:i,done:a,icon:o,onCleared:c}){let[l,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)(!1);if((0,q.useEffect)(()=>u(!1),[t?.name]),!n)return null;let p=async()=>{f(!0);try{let e=await tn.clearMemory(t);c(e,`Removed ${kt(e.removed??0,`file`)} of memory${a}. The next runs learn it again.`)}catch(t){c(e,t.message)}finally{f(!1),u(!1)}};return l?(0,J.jsxs)(`span`,{role:`alertdialog`,"aria-label":r,className:z(`inline-flex flex-wrap items-center gap-2 rounded-[10px] border border-fail bg-fail-soft px-3 py-1.5 text-left text-[13px] text-ink`,o&&`w-[240px] whitespace-normal [overflow-wrap:anywhere]`),children:[i,(0,J.jsxs)(B,{variant:`destructive`,size:`sm`,disabled:d,onClick:()=>void p(),children:[(0,J.jsx)(Je,{"aria-hidden":`true`}),t?.kind===`flow`||t?.kind===`page`?`Forget`:`Clear`]}),(0,J.jsxs)(B,{size:`sm`,onClick:()=>u(!1),children:[(0,J.jsx)(s,{"aria-hidden":`true`}),`Keep`]})]}):o?(0,J.jsx)(B,{size:`icon`,variant:`icon`,"aria-label":r,"data-tip":r,onClick:()=>u(!0),className:`size-8`,children:(0,J.jsx)(Je,{"aria-hidden":`true`})}):(0,J.jsxs)(B,{variant:`danger`,size:`sm`,onClick:()=>u(!0),"data-tip":r,children:[(0,J.jsx)(Je,{"aria-hidden":`true`}),t?.kind===`flow`||t?.kind===`page`?`Forget`:`Clear`]})}function Jp(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(``),[a,o]=(0,q.useState)(Lp),[s,c]=(0,q.useState)(`flows`),[l,d]=(0,q.useState)(`all`),[f,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(null),[v,y]=(0,q.useState)(``),b=(0,q.useCallback)(()=>{r(``),tn.memory().then(t,e=>r(e.message))},[]);(0,q.useEffect)(b,[b]);let x=(0,q.useMemo)(()=>{let t=new Map,n=e=>t.get(Vp(e))??t.set(Vp(e),{flows:0,pages:0,failing:0}).get(Vp(e));for(let t of e?.flows||[]){let e=n(t.host);e.flows++,(Bp(t)===`failing`||Bp(t)===`never`)&&e.failing++}for(let t of e?.pages||[])n(t.host).pages++;for(let t of e?.targets||[])n(t.name);return[...t.entries()].map(([e,t])=>({name:e,...t})).sort((e,t)=>t.flows+t.pages-(e.flows+e.pages))},[e]),S=a?e?.targets.find(e=>e.name===a):void 0,C=(e,n)=>{t({...e}),y(n)},w=f.toLowerCase().split(/\s+/).filter(Boolean),T=(0,q.useMemo)(()=>(e?.flows||[]).filter(e=>(!a||Vp(e.host)===a)&&(l===`all`||Bp(e)===l)&&w.every(t=>`${e.goal} ${e.host||``}`.toLowerCase().includes(t))).sort((e,t)=>(Date.parse(t.lastRun||``)||0)-(Date.parse(e.lastRun||``)||0)),[e,a,l,f]),E=(0,q.useMemo)(()=>(e?.pages||[]).filter(e=>(!a||Vp(e.host)===a)&&w.every(t=>`${e.title||``} ${e.path} ${e.host}`.toLowerCase().includes(t))).sort((e,t)=>(Date.parse(t.lastSeen||``)||0)-(Date.parse(e.lastSeen||``)||0)),[e,a,f]),D=(0,q.useMemo)(()=>{let t={all:0,replaying:0,failing:0,never:0};for(let n of e?.flows||[]){if(a&&Vp(n.host)!==a)continue;t.all++;let e=Bp(n);e!==`ok`&&t[e]++}return t},[e,a]);return(0,J.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,J.jsx)(lr,{}),(0,J.jsxs)(`main`,{className:z(mr,`@container`),children:[(0,J.jsxs)(`div`,{className:`mb-1 flex flex-wrap items-center gap-3`,children:[(0,J.jsx)(pn,{pixel:Kn.memory,size:`lg`}),(0,J.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`Memory`}),(0,J.jsxs)(`a`,{href:H(`settings`,`runs`),className:z(rn({size:`sm`,variant:`ghost`}),`gap-1.5`),"data-tip":`Memory settings`,children:[(0,J.jsx)(_,{"aria-hidden":`true`}),`Settings`]})]}),(0,J.jsxs)(`p`,{className:`mt-1 mb-5 max-w-[78ch] text-sm leading-relaxed text-ink-2`,children:[`What ForgeQE learned from runs that passed, so the next run of the same task is faster and cheaper. A `,(0,J.jsx)(`b`,{className:`font-medium text-ink-2`,children:`flow`}),` is a task's steps, replayed without the AI; a `,(0,J.jsx)(`b`,{className:`font-medium text-ink-2`,children:`page`}),` keeps the elements found on it.`]}),n&&(0,J.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-[14px] bg-fail-soft px-4 py-3 text-sm text-fail`,children:[n,(0,J.jsxs)(B,{onClick:b,"data-tip":`Try again`,children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Retry`]})]}),!e&&!n&&(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`}),e&&(0,J.jsxs)(J.Fragment,{children:[!e.enabled&&(0,J.jsxs)(`p`,{className:`mt-0 mb-4 rounded-[12px] bg-warn-soft px-4 py-3 text-sm text-warn`,children:[`Memory is off for this project: runs neither use nor add to it. Turn it on in `,(0,J.jsx)(`a`,{href:H(`settings`,`runs`),children:`Memory settings`}),`.`]}),(0,J.jsx)(Hp,{view:e}),v&&(0,J.jsx)(`p`,{role:`status`,className:`mt-0 mb-4 rounded-[10px] bg-surface-muted px-3 py-2 text-sm text-ink-2`,children:v}),e.flows.length+e.pages.length===0?(0,J.jsx)(Wt,{icon:_e,title:`Nothing remembered yet`,action:(0,J.jsxs)(`a`,{className:rn({size:`sm`}),href:H(),"data-tip":`Run something from Home`,children:[(0,J.jsx)(u,{"aria-hidden":`true`}),`Run`]}),children:`Each browser run that passes adds its pages and steps, and the next run of the same task replays them.`}):(0,J.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`div`,{role:`tablist`,"aria-label":`What to show`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`flows`,`Flows`,T.length],[`pages`,`Pages`,E.length]].map(([e,t,n])=>(0,J.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===e,onClick:()=>c(e),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,s===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[t,(0,J.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:n})]},e))}),(0,J.jsxs)(qt,{"aria-label":`Site`,value:a,onChange:e=>o(e.target.value),className:`w-auto max-w-[280px] min-w-[180px] flex-[0_1_240px]`,children:[(0,J.jsxs)(`option`,{value:Lp,children:[`All sites (`,x.length,`)`]}),x.map(e=>(0,J.jsxs)(`option`,{value:e.name,children:[e.name,e.failing?` (${e.failing} failed)`:``]},e.name))]}),(0,J.jsx)(Vt,{id:`tab-flows-find-a-flow-fi`,label:s===`flows`?`Find a flow`:`Find a page`,value:f,onChange:m,placeholder:s===`flows`?`Find a flow by its task`:`Find a page by title or path`}),(0,J.jsx)(`span`,{className:`ml-auto`,children:(0,J.jsx)(qp,{view:e,target:S,files:a?S?.files??0:e.files,label:a?`Clear this site`:`Clear everything`,question:`Remove ${kt(a?S?.files??0:e.files,`file`)} for ${a||`everything`}? Runs learn it again.`,done:S?` for ${S.name}`:``,onCleared:C})})]}),s===`flows`&&(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:[[`all`,`All`],[`replaying`,`Replaying`],[`failing`,`Failed last time`],[`never`,`Never passed`]].map(([e,t])=>(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":l===e,onClick:()=>d(e),className:z(`inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-[8px] border px-2.5 text-[12.5px] font-medium`,l===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[t,(0,J.jsx)(`span`,{className:z(`tabular-nums`,(e===`failing`||e===`never`)&&D[e]?`text-fail`:``),children:D[e]})]},e))}),(0,J.jsx)(`div`,{className:`@container`,children:s===`flows`?(0,J.jsx)(Wn,{label:`Flows`,search:!1,resetKey:`${a}|${l}|${f}`,empty:`Nothing matches.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Task`}),!a&&(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @3xl:table-cell`),children:`Site`}),(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Status`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-right text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Replayed`}),(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-right text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Last run`})]}),children:T.map(e=>(0,J.jsx)(Gp,{f:e,showSite:!a,onOpen:()=>g(e)},e.id))}):(0,J.jsx)(Wn,{label:`Pages`,search:!1,resetKey:`${a}|${f}`,empty:`Nothing matches.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Page`}),!a&&(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @3xl:table-cell`),children:`Site`}),(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-right text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Elements`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-right text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Visits`}),(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-right text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Last seen`}),(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:(0,J.jsx)(`span`,{className:`sr-only`,children:`Forget`})})]}),children:E.map(t=>(0,J.jsx)(Kp,{p:t,showSite:!a,forget:(0,J.jsx)(qp,{icon:!0,view:e,target:{name:t.id,kind:`page`},files:1,label:`Forget ${t.title||t.path}`,question:`Forget ${t.host}${t.path}? Runs find its elements again.`,done:` for ${t.host}${t.path}`,onCleared:C})},t.id))})})]})]})]}),(0,J.jsx)(Cn,{open:!!h,onClose:()=>g(null),title:`Flow`,description:h?.host?`On ${h.host}`:`A task ForgeQE remembers`,footer:(0,J.jsxs)(B,{onClick:()=>g(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),children:h&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4 text-sm`,children:[(0,J.jsx)(`p`,{className:`m-0 leading-relaxed whitespace-pre-wrap text-ink [overflow-wrap:anywhere]`,children:h.goal}),(0,J.jsxs)(`dl`,{className:`m-0 grid grid-cols-[auto_1fr] gap-x-4 gap-y-2`,children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:`Steps`}),(0,J.jsx)(`dd`,{className:`m-0`,children:h.steps}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`Runs`}),(0,J.jsxs)(`dd`,{className:`m-0`,children:[h.runs,`, `,h.successes,` passed, `,h.failures,` failed`]}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`Replayed`}),(0,J.jsxs)(`dd`,{className:`m-0`,children:[kt(h.replays,`time`),`; `,h.replayedSteps,` of `,h.replayedSteps+h.modelSteps,` steps without a model`]}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`Last run`}),(0,J.jsxs)(`dd`,{className:`m-0`,children:[h.lastRun?new Date(h.lastRun).toLocaleString([],{dateStyle:`medium`,timeStyle:`short`}):`—`,h.lastStatus?`, ${h.lastStatus}`:``]})]}),(0,J.jsx)(`p`,{className:`m-0 rounded-[10px] bg-surface-muted px-3 py-2 text-ink-2`,children:Bp(h)===`never`?`It has not passed yet, so nothing replays: the next run of this task asks the model at each step.`:Bp(h)===`failing`?`Its last run failed. The next run replays the steps that worked, then the agent takes over from where it went wrong.`:`The next run of this task replays its steps without a model, and the agent looks once to confirm the result.`}),e&&(0,J.jsx)(`div`,{className:`border-t border-line-soft pt-4`,children:(0,J.jsx)(qp,{view:e,target:{name:h.id,kind:`flow`},files:1,label:`Forget this flow`,question:`Forget this flow? The next run of its task asks the model at each step and learns it again.`,done:` for this flow`,onCleared:(e,t)=>{C(e,t),e.flows.some(e=>e.id===h.id)||g(null)}})})]})})]})}var Yp=[];function Xp({section:e}){return(0,J.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,J.jsx)(lr,{}),(0,J.jsxs)(`main`,{className:z(mr,`gap-3`),children:[(0,J.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:e.label}),(0,J.jsxs)(`p`,{className:`m-0 max-w-[60ch] leading-relaxed text-ink-2`,children:[e.what,` are not in the web app yet. In a terminal in your project folder, run`,` `,(0,J.jsx)(`code`,{className:`rounded-md bg-surface-strong px-1.5 py-0.5 font-mono text-[13px]`,children:e.command}),`.`]})]})]})}function Zp({names:e,max:t=4}){let n=e.slice(0,t);return(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1`,children:[n.map(e=>(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[12.5px] text-ink-2`,"data-tip":Mn(e).name,children:[(0,J.jsx)(Qn,{agent:e,px:16,decorative:!0}),Mn(e).name]},e)),e.length>t&&(0,J.jsxs)(`span`,{className:`text-[12.5px] text-muted`,children:[`+`,e.length-t,` more`]}),!e.length&&(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Not used by an agent`})]})}function Qp({p:e}){return(0,J.jsx)(`span`,{className:z(`rounded-full px-2 py-0.5 text-[12px] font-medium whitespace-nowrap`,e.outdated?`bg-warn-soft text-warn`:e.edited?`bg-accent-soft text-accent-fg`:`bg-surface-strong text-muted`),children:e.outdated?`Edited, older base`:e.edited?`Edited`:`ForgeQE's`})}function $p(e){let t=/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/.exec(e);return t?{head:t[0],body:e.slice(t[0].length)}:{head:``,body:e}}var em=e=>e.replace(/\{\{>\s*([\w-]+)\s*\}\}/g,`the shared part $1`);function tm(e){return e.replace(/^[ \t]*\{\{>\s*([\w-]+)\s*\}\}[ \t]*$/gm,(e,t)=>`> Also includes ForgeQE's shared part: ${t}`)}function nm({label:e,rows:t}){return(0,J.jsx)(`div`,{className:`@container`,children:(0,J.jsx)(Wn,{label:e,search:!1,empty:`No prompt matches.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:dr,children:`Prompt`}),(0,J.jsx)(`th`,{className:z(dr,`hidden @2xl:table-cell`),children:`Used by`}),(0,J.jsx)(`th`,{className:z(dr,`text-right`),children:`Status`})]}),children:t.map(e=>(0,J.jsxs)(`tr`,{onClick:e.onOpen,className:`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,children:[(0,J.jsxs)(`td`,{className:z(hr,`min-w-0`),children:[(0,J.jsxs)(`button`,{type:`button`,onClick:t=>(t.stopPropagation(),e.onOpen()),className:`flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left`,children:[e.mark,(0,J.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-ink hover:underline`,children:e.name})]}),(0,J.jsx)(`span`,{className:`mt-0.5 line-clamp-1 text-[13px] text-muted`,children:e.about})]}),(0,J.jsx)(`td`,{className:z(hr,`hidden w-[34%] @2xl:table-cell`),children:(0,J.jsx)(Zp,{names:e.agents,max:2})}),(0,J.jsx)(`td`,{className:z(hr,`w-[1%] text-right whitespace-nowrap`),children:e.state})]},e.key))})})}function rm({p:e,onOpen:t,agents:n=!0}){return(0,J.jsxs)(`button`,{type:`button`,onClick:t,"aria-label":`Open ${e.name}`,className:`grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] border-0 bg-transparent px-3 py-2 text-left hover:bg-surface-muted`,children:[(0,J.jsx)(zt,{icon:Ae,size:16,className:`text-muted`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-ink`,children:e.name}),(0,J.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:em(e.description||e.usedBy)}),n?(0,J.jsx)(Zp,{names:e.agents}):e.agents.length>1&&(0,J.jsxs)(`span`,{className:`text-[12px] text-muted`,children:[`Shared with `,kt(e.agents.length-1,`other agent`),`: editing it changes them too`]})]}),(0,J.jsx)(Qp,{p:e})]})}function im({t:e,onOpen:t}){return(0,J.jsxs)(`button`,{type:`button`,onClick:t,"aria-label":`Edit ${e.name}`,className:`grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] border-0 bg-transparent px-3 py-2 text-left hover:bg-surface-muted`,children:[(0,J.jsx)(dt,{size:16,strokeWidth:1.8,"aria-hidden":`true`,className:`text-accent-fg`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-ink`,children:e.name}),(0,J.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:e.description||e.text.split(`
|
|
55
|
+
`)[0]}),(0,J.jsx)(Zp,{names:e.agents})]}),(0,J.jsx)(`span`,{className:`rounded-full bg-pass-soft px-2 py-0.5 text-[12px] font-medium whitespace-nowrap text-pass`,children:`Yours`})]})}function am({onChanged:e}){let{data:t,error:n,reload:a}=cn(jt.prompts),[c,l]=(0,q.useState)(`all`),[u,d]=(0,q.useState)(``),[f,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(``),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(`read`),[x,S]=(0,q.useState)(null),[C,w]=(0,q.useState)(null),[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(``),k=u.toLowerCase().split(/\s+/).filter(Boolean),A=e=>k.every(t=>e.toLowerCase().includes(t)),M=(0,q.useMemo)(()=>(t?.prompts||[]).filter(e=>A(`${e.name} ${e.description} ${e.usedBy} ${e.agents.map(e=>Mn(e).name).join(` `)}`)),[t,u]),N=(0,q.useMemo)(()=>(t?.team||[]).filter(e=>A(`${e.name} ${e.description} ${e.text} ${e.agents.map(e=>Mn(e).name).join(` `)}`)),[t,u]),P=async t=>{O(``);try{let e=await jt.prompt(t);m(e),g(e.text),v(!1),b(`read`)}catch(t){e(t.message)}},F=async t=>{try{let e=await jt.agentPrompt(t);w({agent:t,text:e.text})}catch(t){e(t.message)}},I=async(t,n,r)=>{E(!0),O(``);try{await t(),r(),a(),e(n)}catch(e){O(e.message)}finally{E(!1)}};if(!t)return(0,J.jsx)(Zn,{error:n,reload:a});let L=t.prompts.find(e=>e.name===f?.name),ee=t.agents,te=[{id:`all`,label:`All prompts`,n:t.prompts.length},{id:`agents`,label:`By agent`,n:ee.length},{id:`team`,label:`Your prompts`,n:t.team.length}];return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pb-3`,children:[(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:te.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":c===e.id,onClick:()=>l(e.id),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,c===e.id?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[e.label,(0,J.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:e.n})]},e.id))}),(0,J.jsx)(Vt,{id:`find-a-prompt`,label:`Find a prompt`,value:u,onChange:d,placeholder:`Find a prompt or agent`}),(0,J.jsxs)(B,{variant:`primary`,"data-tip":`Add a prompt`,onClick:()=>(O(``),S({name:``,description:``,agents:[],text:``})),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),c===`agents`&&(0,J.jsx)(`div`,{className:`flex flex-col gap-3`,children:ee.filter(e=>M.some(t=>t.agents.includes(e.name))||N.some(t=>t.agents.includes(e.name))).map(e=>{let t=Mn(e.name),n=M.filter(t=>t.agents.includes(e.name)).sort((t,n)=>t.name===e.prompt?-1:n.name===e.prompt?1:t.name.localeCompare(n.name)),r=N.filter(t=>t.agents.includes(e.name));return(0,J.jsxs)(`section`,{"aria-labelledby":`agent-${e.name}`,className:`rounded-[14px] card border p-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-3 py-2`,children:[(0,J.jsx)(Qn,{agent:e.name,px:28,decorative:!0}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`h3`,{id:`agent-${e.name}`,className:`m-0 text-[15px] font-semibold`,style:{color:t.hue},children:t.name}),(0,J.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:e.title})]}),(0,J.jsxs)(`span`,{className:`text-[12.5px] text-muted`,children:[kt(n.length,`prompt`),r.length?` · ${r.length} yours`:``]}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Full prompt of ${t.name}`,"data-tip":`Full prompt of ${t.name}`,onClick:()=>F(e.name),children:(0,J.jsx)(Me,{"aria-hidden":`true`})})]}),(0,J.jsxs)(`div`,{className:`flex flex-col border-t border-line-soft pt-1`,children:[n.map(e=>(0,J.jsx)(rm,{p:e,agents:!1,onOpen:()=>P(e.name)},e.name)),r.map(e=>(0,J.jsx)(im,{t:e,onOpen:()=>(O(``),S({name:e.name,description:e.description,agents:e.agents,text:e.text,existing:e.name}))},e.name))]})]},e.name)})}),c===`all`&&(0,J.jsx)(nm,{label:`All prompts`,rows:M.map(e=>({key:e.name,name:e.name,about:em(e.description||e.usedBy),agents:e.agents,state:(0,J.jsx)(Qp,{p:e}),onOpen:()=>P(e.name)}))}),c===`team`&&(t.team.length===0?(0,J.jsx)(Wt,{icon:o,title:`No prompts of your own yet`,action:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add a prompt`,onClick:()=>S({name:``,description:``,agents:[],text:``}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]}),children:`Write instructions once for the agents that should follow them: "Tag every test with its Azure DevOps work item id" for the Coding agent, or "Answer in British English" for the Orchestrator agent. They are added at the end of those agents' instructions, saved in .forgeqe/prompts/team, and shared with the project.`}):(0,J.jsx)(nm,{label:`Your prompts`,rows:N.map(e=>({key:e.name,name:e.name,about:e.description||e.text.split(`
|
|
56
|
+
`)[0]||``,agents:e.agents,mark:(0,J.jsx)(dt,{size:15,strokeWidth:1.8,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),state:(0,J.jsx)(`span`,{className:`rounded-full bg-pass-soft px-2 py-0.5 text-[12px] font-medium whitespace-nowrap text-pass`,children:`Yours`}),onOpen:()=>(O(``),S({name:e.name,description:e.description,agents:e.agents,text:e.text,existing:e.name}))}))})),(0,J.jsx)(Cn,{wide:!0,open:!!f,onClose:()=>m(null),title:f?.name||``,description:em(L?.description||L?.usedBy||``),footer:(0,J.jsxs)(J.Fragment,{children:[D&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail`,children:D}),L?.edited&&L.source===`project`&&(0,J.jsxs)(B,{disabled:T,onClick:()=>f&&I(()=>jt.resetPrompt(f.name),`${f.name} is ForgeQE's own prompt again.`,()=>m(null)),className:`mr-auto`,"data-tip":`Reset to ForgeQE's own prompt`,children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Reset`]}),(0,J.jsxs)(B,{onClick:()=>m(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:T||!f||h===f.text,onClick:()=>f&&I(()=>jt.savePrompt(f.name,h),`Saved your copy of ${f.name}.`,()=>m(null)),children:[(0,J.jsx)(s,{"aria-hidden":`true`}),T?`Saving…`:`Save`]})]}),children:f&&(()=>{let{head:e,body:t}=$p(h);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,J.jsxs)(`dl`,{className:`m-0 grid grid-cols-[96px_minmax(0,1fr)] items-center gap-x-4 gap-y-2.5 text-sm`,children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:`Used by`}),(0,J.jsx)(`dd`,{className:`m-0`,children:L?(0,J.jsx)(Zp,{names:L.agents,max:8}):null}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`Status`}),(0,J.jsx)(`dd`,{className:`m-0`,children:L?(0,J.jsx)(Qp,{p:L}):null})]}),L?.edited&&L.source!==`project`&&(0,J.jsxs)(`p`,{className:`m-0 rounded-[10px] bg-surface-muted px-3 py-2 text-sm text-ink-2`,children:[`This prompt comes from a `,L.source,` copy; saving here makes a project copy, which the shared folder still wins over.`]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 border-t border-line-soft pt-4`,children:[(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show the prompt`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`read`,`Read`],[`edit`,`Edit`]].map(([e,t])=>(0,J.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":y===e,onClick:()=>b(e),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,y===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:t},e))}),L?.edited&&(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":_,onClick:()=>v(!_),"data-tip":_?`Hide ForgeQE's original`:`Compare with ForgeQE's original`,className:`inline-flex min-h-10 cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 text-sm font-medium text-accent-fg hover:text-accent-fg-hover [&>svg]:size-4`,children:[_?(0,J.jsx)(j,{"aria-hidden":`true`}):(0,J.jsx)(Ee,{"aria-hidden":`true`}),_?`Hide`:`Compare`]})]}),(0,J.jsx)(dn,{open:_,children:(0,J.jsx)(`div`,{className:`max-h-[40vh] overflow-auto rounded-[12px] bg-surface-muted p-4`,children:(0,J.jsx)(vp,{text:tm($p(f.builtin).body),className:`text-[14px]`})})}),y===`read`?(0,J.jsx)(vp,{text:tm(t),className:`max-w-[72ch] text-[14.5px]`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`prompt-text`,className:`sr-only`,children:`Prompt`}),(0,J.jsx)(Ap,{id:`prompt-text`,value:t,lang:`markdown`,onChange:t=>g(e+t)}),(0,J.jsxs)(`span`,{className:`text-[12.5px] text-muted`,children:[`Saved to `,(0,J.jsxs)(`span`,{className:`font-mono`,children:[`.forgeqe/prompts/`,f.name,`.md`]}),`; new chats and runs use it.`]})]})]})})()}),(0,J.jsx)(Cn,{wide:!0,open:!!x,onClose:()=>S(null),title:x?.existing?`Edit ${x.existing}`:`Add a prompt`,description:(0,J.jsxs)(J.Fragment,{children:[`Added at the end of the chosen agents' instructions, from their next start. Saved in `,(0,J.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[`.forgeqe/prompts/team/`,x?.name||`name`,`.md`]}),`, shared with the project.`]}),footer:(0,J.jsxs)(J.Fragment,{children:[D&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:D}),x?.existing&&(0,J.jsxs)(B,{disabled:T,onClick:()=>x.existing&&I(()=>jt.deleteTeamPrompt(x.existing),`Removed ${x.existing}.`,()=>S(null)),className:`mr-auto text-fail`,children:[(0,J.jsx)(Je,{"aria-hidden":`true`}),`Delete`]}),(0,J.jsxs)(B,{onClick:()=>S(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:T||!x?.name||!x.agents.length||!x.text.trim(),onClick:()=>x&&I(()=>x.existing?jt.saveTeamPrompt(x.existing,x):jt.addTeamPrompt(x),`${x.existing?`Saved`:`Added`} ${x.name}: ${x.agents.map(e=>Mn(e).name).join(`, `)} use it from their next start.`,()=>S(null)),children:[x?.existing?(0,J.jsx)(s,{"aria-hidden":`true`}):(0,J.jsx)(r,{"aria-hidden":`true`}),T?`Saving…`:x?.existing?`Save`:`Add`]})]}),children:x&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Name`}),(0,J.jsx)(V,{value:x.name,disabled:!!x.existing,placeholder:`tag-tests-with-work-items`,onChange:e=>S({...x,name:e.target.value.toLowerCase().replace(/[^a-z0-9-]+/g,`-`).slice(0,48)}),className:`font-mono`}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Lowercase letters, digits and dashes.`})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`What it is for`}),(0,J.jsx)(V,{value:x.description,maxLength:200,placeholder:`Tests carry the work item they cover`,onChange:e=>S({...x,description:e.target.value})})]}),(0,J.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,J.jsx)(`legend`,{className:`mb-1.5 p-0 font-medium`,children:`Agents that follow it`}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ee.map(e=>{let t=x.agents.includes(e.name);return(0,J.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":t,"data-tip":e.title,onClick:()=>S({...x,agents:t?x.agents.filter(t=>t!==e.name):[...x.agents,e.name]}),className:z(`inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-[8px] border px-3 text-[13px] font-medium`,t?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[(0,J.jsx)(Qn,{agent:e.name,px:18,decorative:!0}),Mn(e.name).name]},e.name)})})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Instructions`}),(0,J.jsx)(Zt,{rows:14,spellCheck:!0,value:x.text,placeholder:`Tag every test with the Azure DevOps work item it covers, as [Property("WorkItem", "1234")].
|
|
57
|
+
If the request names no work item, ask for it.`,onChange:e=>S({...x,text:e.target.value}),className:`leading-[1.6]`}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Plain words, as you would tell a colleague. Use MUST for a rule the agent may never break.`})]})]})}),(0,J.jsx)(Cn,{wide:!0,open:!!C,onClose:()=>w(null),title:C?`${Mn(C.agent).name}: full prompt`:``,description:`What the agent starts with now: ForgeQE's prompt (or your edited copy), with the included parts and your prompts for it.`,footer:(0,J.jsxs)(B,{onClick:()=>w(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),children:C&&(0,J.jsx)(vp,{text:tm($p(C.text).body),className:`mt-4 max-w-[72ch] text-[14.5px]`})})]})}var om={prebuilt:`ForgeQE's`,project:`This project`,user:`Yours`,external:`Claude / agent skill`,extra:`Shared folder`};function sm({agents:e,max:t=6}){return(0,J.jsxs)(`span`,{className:`flex items-center -space-x-1`,children:[e.slice(0,t).map(e=>(0,J.jsx)(`span`,{role:`img`,"aria-label":Mn(e).name,"data-tip":Mn(e).name,className:`rounded-md bg-bg p-0.5 ring-1 ring-line-soft`,children:(0,J.jsx)(Qn,{agent:e,px:18,decorative:!0})},e)),e.length>t&&(0,J.jsxs)(`span`,{className:`pl-2 text-[12px] text-muted`,children:[`+`,e.length-t]})]})}function cm({edit:e}){let{data:t,error:n,reload:a}=cn(jt.skills),o=Cr(e.value,[`skills`,`disable`])||[],c=t=>e.set(U(e.value,[`skills`,`disable`],t.length?t:void 0)),[l,u]=(0,q.useState)(`all`),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(!1),[h,g]=(0,q.useState)(null),[v,y]=(0,q.useState)([]),[b,x]=(0,q.useState)(null),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(``),[D,O]=(0,q.useState)(``),k=d.toLowerCase().split(/\s+/).filter(Boolean),A=(0,q.useMemo)(()=>(t?.skills||[]).filter(e=>k.every(t=>`${e.name} ${e.description} ${e.users.map(e=>Mn(e).name).join(` `)}`.toLowerCase().includes(t))),[t,d]),j=async(e,t,n)=>{w(!0),E(``);try{await e(),n(),a(),O(t)}catch(e){E(e.message)}finally{w(!1)}},M=async e=>{try{let t=await jt.skill(e.name);g({name:e.name,text:t.text,editable:t.editable})}catch(e){O(e.message)}},N=(e,t)=>(y(t?[...v,t]:[]),M(e)),P=(e,t)=>{let n=t.replace(/^---\n[\s\S]*?\n---\n?/,``).trim();E(``),g(null),x({name:e.name,description:e.description,agents:e.agents,body:n,existing:e.name})},F=(e,t)=>{let n=t.replace(/^---\n[\s\S]*?\n---\n?/,``).trim();E(``),g(null),x({name:e.name,description:e.description,agents:e.agents,body:n,copyOf:e.name})},I=e=>t?.audiences.filter(t=>e.agents.includes(t.id)).map(e=>e.label).join(`, `)||``,L=e=>(0,J.jsx)(`span`,{className:z(`rounded-full px-2 py-px text-[11.5px] font-medium whitespace-nowrap`,e.source===`project`?`bg-pass-soft text-pass`:`bg-surface-strong text-muted`),children:om[e.source]||e.source}),ee=e=>{let t=!o.includes(e.name);return(0,J.jsx)(Rn,{checked:t,onChange:t=>c(t?o.filter(t=>t!==e.name):[...o,e.name]),label:`Use ${e.name}`})},te=Cr(e.value,[`skills`,`enabled`])!==!1,ne=(e,n)=>{let r=!o.includes(e.name);return(0,J.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 rounded-[10px] px-3 py-2.5 hover:bg-surface-muted`,children:[(0,J.jsxs)(`button`,{type:`button`,onClick:()=>N(e),"aria-label":`Read ${e.name}`,className:`flex min-w-0 cursor-pointer flex-col gap-0.5 border-0 bg-transparent p-0 text-left`,children:[(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:z(`font-mono text-[13px] font-medium`,r?`text-ink`:`text-muted line-through`),children:e.name}),(0,J.jsx)(`span`,{className:z(`rounded-full px-2 py-px text-[11.5px] font-medium`,e.source===`project`?`bg-pass-soft text-pass`:`bg-surface-strong text-muted`),children:om[e.source]||e.source})]}),(0,J.jsx)(`span`,{className:`line-clamp-2 text-[13px] text-muted`,children:e.description}),n&&(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 pt-0.5`,children:[(0,J.jsx)(sm,{agents:e.users}),(0,J.jsx)(`span`,{className:`text-[12px] text-muted`,children:t?.audiences.filter(t=>e.agents.includes(t.id)).map(e=>e.label).join(`, `)})]})]}),(0,J.jsx)(Rn,{checked:r,onChange:t=>c(t?o.filter(t=>t!==e.name):[...o,e.name]),label:`Use ${e.name}`})]},e.name)};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`section`,{className:`mb-4 rounded-[14px] card border`,children:[(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":p,onClick:()=>m(!p),className:`flex min-h-12 w-full cursor-pointer items-center gap-3 rounded-[14px] border-0 bg-transparent px-4 text-left hover:bg-surface-muted`,children:[(0,J.jsx)(_,{size:16,"aria-hidden":`true`,className:`text-muted`}),(0,J.jsx)(`span`,{className:`flex-1 text-sm font-medium`,children:`How skills are used`}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[te?`On`:`Off`,` · `,kt(o.length,`turned off`,`turned off`),` · `,String(Cr(e.value,[`skills`,`browser_max_chars`])??6e3),` characters a browser run`]}),(0,J.jsx)(R,{size:16,"aria-hidden":`true`,className:z(`text-muted transition-transform`,!p&&`-rotate-90`)})]}),(0,J.jsx)(dn,{open:p,children:(0,J.jsx)(`div`,{className:`border-t border-line-soft px-4 pb-2`,children:(0,J.jsx)(Nn,{defs:yn.fields,edit:e,base:yn.base})})})]}),t?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pb-3`,children:[(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`agents`,`By agent`,t.audiences.length],[`all`,`All skills`,t.skills.length]].map(([e,t,n])=>(0,J.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":l===e,onClick:()=>u(e),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,l===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[t,(0,J.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:n})]},e))}),(0,J.jsx)(Vt,{id:`find-a-skill`,label:`Find a skill`,value:d,onChange:f,placeholder:`Find a skill or agent`}),(0,J.jsxs)(B,{variant:`primary`,"data-tip":`Add a skill`,onClick:()=>(E(``),x({name:``,description:``,agents:[],body:``})),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),D&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 mb-3 rounded-[10px] bg-surface-muted px-3 py-2 text-sm text-ink-2`,children:D}),t.skills.length===0&&(0,J.jsx)(Sn,{children:`No skills found. Add one for your framework, conventions or app.`}),l===`agents`&&t.audiences.map(e=>{let t=A.filter(t=>t.agents.includes(e.id));return!t.length&&k.length?null:(0,J.jsxs)(`section`,{"aria-labelledby":`aud-${e.id}`,className:`mb-3 rounded-[14px] card border p-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 px-3 py-2`,children:[(0,J.jsx)(sm,{agents:e.agents,max:8}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`h3`,{id:`aud-${e.id}`,className:`m-0 text-[15px] font-semibold`,children:e.label}),(0,J.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.agents.map(e=>Mn(e).name).filter((e,t,n)=>n.indexOf(e)===t).join(`, `)})]}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:kt(t.length,`skill`)})]}),(0,J.jsx)(`div`,{className:`flex flex-col border-t border-line-soft pt-1`,children:t.length?t.map(e=>ne(e,!1)):(0,J.jsx)(`p`,{className:`m-0 px-3 py-2 text-[13px] text-muted`,children:`No skills for them yet.`})})]},e.id)}),l===`all`&&t.skills.length>0&&(0,J.jsx)(`div`,{className:`@container`,children:(0,J.jsx)(Wn,{label:`All skills`,search:!1,empty:`No skill matches.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Skill`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Who uses it`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`From`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`text-right`),children:`On`})]}),children:A.map(e=>{let t=!o.includes(e.name);return(0,J.jsxs)(`tr`,{onClick:()=>N(e),className:`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,children:[(0,J.jsxs)(`td`,{className:`px-3 py-2`,children:[(0,J.jsx)(`button`,{type:`button`,onClick:t=>(t.stopPropagation(),N(e)),className:z(`cursor-pointer border-0 bg-transparent p-0 text-left font-mono text-[13px] font-medium hover:underline`,t?`text-ink`:`text-muted line-through`),children:e.name}),(0,J.jsx)(`span`,{className:`mt-0.5 line-clamp-1 text-[13px] text-muted`,children:e.description})]}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`hidden w-[30%] @2xl:table-cell`),children:(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(sm,{agents:e.users,max:4}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:I(e)})]})}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`hidden w-[1%] @xl:table-cell`),children:L(e)}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`w-[1%] text-right`),onClick:e=>e.stopPropagation(),children:ee(e)})]},e.name)})})}),t.problems.length?(0,J.jsx)(`div`,{role:`alert`,className:`mt-4 rounded-[12px] bg-warn-soft px-4 py-3 text-sm text-warn`,children:t.problems.map(e=>(0,J.jsx)(`p`,{className:`m-0`,children:e},e))}):null]}):(0,J.jsx)(Zn,{error:n,reload:a}),(0,J.jsx)(Cn,{wide:!0,open:!!h,onClose:()=>g(null),title:h?.name||``,description:h?.editable?`This project's own skill: you can edit it.`:`ForgeQE's skill: read only. Copy it to edit your own version for this project.`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(B,{onClick:()=>g(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),h?.editable&&(0,J.jsxs)(B,{variant:`primary`,onClick:()=>h&&t&&P(t.skills.find(e=>e.name===h.name),h.text),children:[(0,J.jsx)(ie,{"aria-hidden":`true`}),`Edit`]}),h&&!h.editable&&(0,J.jsxs)(B,{variant:`primary`,"data-tip":`Your copy replaces this skill in this project`,onClick:()=>h&&t&&F(t.skills.find(e=>e.name===h.name),h.text),children:[(0,J.jsx)(S,{"aria-hidden":`true`}),`Copy to edit`]})]}),children:h&&t&&(()=>{let e=t.skills.find(e=>e.name===h.name),n=v[v.length-1],r=n?t.skills.find(e=>e.name===n):void 0;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[r&&(0,J.jsxs)(`button`,{type:`button`,onClick:()=>(y(v.slice(0,-1)),void M(r)),"data-tip":`Back to ${r.name}`,className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 self-start border-0 bg-transparent p-0 text-sm font-medium text-accent-fg hover:text-accent-fg-hover [&>svg]:size-4`,children:[(0,J.jsx)(be,{"aria-hidden":`true`}),`Back`]}),e&&(0,J.jsxs)(`dl`,{className:`m-0 grid grid-cols-[110px_minmax(0,1fr)] items-start gap-x-4 gap-y-2.5 text-sm`,children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:`Use when`}),(0,J.jsx)(`dd`,{className:`m-0 text-ink-2`,children:e.description.replace(/^Use when\s+/i,``)}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`Who uses it`}),(0,J.jsxs)(`dd`,{className:`m-0 flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(sm,{agents:e.users,max:8}),(0,J.jsx)(`span`,{className:`text-ink-2`,children:I(e)})]}),(0,J.jsx)(`dt`,{className:`text-muted`,children:`From`}),(0,J.jsx)(`dd`,{className:`m-0`,children:L(e)}),(0,J.jsx)(`dt`,{className:`self-center text-muted`,children:`On`}),(0,J.jsx)(`dd`,{className:`m-0`,children:ee(e)})]}),(0,J.jsx)(`div`,{className:`border-t border-line-soft pt-4`,children:(0,J.jsx)(vp,{text:tm($p(h.text).body),className:`max-w-[72ch] text-[14.5px]`,refs:{names:t.skills.map(e=>e.name).filter(e=>e!==h.name),open:e=>{let n=t.skills.find(t=>t.name===e);n&&N(n,h.name)}}})})]})})()}),(0,J.jsx)(Cn,{wide:!0,open:!!b,onClose:()=>x(null),title:b?.existing?`Edit ${b.existing}`:b?.copyOf?`Copy ${b.copyOf}`:`Add a skill`,description:(0,J.jsxs)(J.Fragment,{children:[b?.copyOf&&b.name===b.copyOf&&(0,J.jsxs)(J.Fragment,{children:[`Replaces ForgeQE's `,b.copyOf,` in this project. `]}),`Saved in `,(0,J.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[`.forgeqe/skills/`,b?.name||`name`,`/SKILL.md`]}),`, shared with the project. The agents read a skill when its "use when" matches the work.`]}),footer:(0,J.jsxs)(J.Fragment,{children:[T&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:T}),b?.existing&&(0,J.jsxs)(B,{disabled:C,onClick:()=>b.existing&&j(()=>jt.removeSkill(b.existing),`Removed ${b.existing}.`,()=>x(null)),className:`mr-auto text-fail`,children:[(0,J.jsx)(Je,{"aria-hidden":`true`}),`Delete`]}),(0,J.jsxs)(B,{onClick:()=>x(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:C||!b?.name||!b.description.trim()||!b.agents.length||!!b.existing&&!b.body.trim(),onClick:()=>b&&j(()=>b.existing?jt.saveSkill(b.existing,b):jt.addSkill(b),b.existing?`Saved ${b.name}.`:b.copyOf&&b.name===b.copyOf?`Copied ${b.name}: yours is used in this project.`:`Added ${b.name}.`,()=>x(null)),children:[b?.existing?(0,J.jsx)(s,{"aria-hidden":`true`}):(0,J.jsx)(r,{"aria-hidden":`true`}),C?`Saving…`:b?.existing?`Save`:b?.copyOf&&b.name===b.copyOf?`Save copy`:`Add`]})]}),children:b&&t&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Name`}),(0,J.jsx)(V,{value:b.name,disabled:!!b.existing,placeholder:`sap-fiori`,onChange:e=>x({...b,name:e.target.value.toLowerCase().replace(/[^a-z0-9-]+/g,`-`).slice(0,64)}),className:`font-mono`})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Use when`}),(0,J.jsx)(V,{value:b.description,placeholder:`Use when the site is SAP Fiori: tiles, smart tables, value help dialogs.`,onChange:e=>x({...b,description:e.target.value})}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`The agents choose skills by this line: say when it applies.`})]}),(0,J.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,J.jsx)(`legend`,{className:`mb-1.5 p-0 font-medium`,children:`Who it is for`}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.audiences.map(e=>{let t=b.agents.includes(e.id);return(0,J.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":t,onClick:()=>x({...b,agents:t?b.agents.filter(t=>t!==e.id):[...b.agents,e.id]}),className:z(`inline-flex min-h-10 cursor-pointer items-center gap-2 rounded-[8px] border px-3 text-[13px] font-medium`,t?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[(0,J.jsx)(sm,{agents:e.agents,max:3}),e.label]},e.id)})})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`label`,{htmlFor:`skill-text`,className:`font-medium`,children:`Instructions`}),(0,J.jsx)(Ap,{id:`skill-text`,value:b.body,lang:`markdown`,onChange:e=>x({...b,body:e})}),(0,J.jsxs)(`span`,{className:`text-[12.5px] text-muted`,children:[b.existing?``:`Leave it empty to start from ForgeQE's outline for that agent. `,`Markdown; short rules the agent can follow step by step.`]})]})]})})]})}function lm({checked:e,onSelect:t,label:n}){return(0,J.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e,"aria-label":n,onClick:t,className:z(`relative inline-flex size-4 flex-none cursor-pointer items-center justify-center rounded-full border-[1.5px] bg-bg p-0 before:absolute before:-inset-2.5 before:content-['']`,e?`border-accent`:`border-muted`),children:(0,J.jsx)(`span`,{"aria-hidden":`true`,className:z(`size-2 rounded-full`,e?`bg-accent`:`bg-transparent`)})})}function um(e,t,n){return e?/^[A-Za-z0-9_-][A-Za-z0-9_.-]*$/.test(e)?e!==t&&n.includes(e)?`There is already an environment called ${e}.`:``:`Letters, digits, dots, dashes and underscores only.`:`Give it a name.`}var dm=/^[A-Za-z_][A-Za-z0-9_]*$/,fm=/\.(csv|tsv|json|ya?ml|xlsx|xls|xml|sql|txt)$/i;function pm(e){for(let[t,n]of Object.entries(e)){if(!dm.test(t))return`${t||`A test data file`}: the name is letters, digits and _`;let e=String(n??``).trim();if(!e)return`${t}: pick its file`;if(!fm.test(e)||e.startsWith(`/`)||/^[A-Za-z]:/.test(e)||e.split(/[\\/]/).some(e=>e===`..`||e.startsWith(`.`)))return`${t}: a data file of the project (.csv, .json, .yaml, .xlsx…)`}return``}var mm=e=>{if(!(`data`in e))return`data`;for(let t=2;;t++)if(!(`data_${t}`in e))return`data_${t}`},hm=e=>(e.split(/[\\/]/).pop()||``).replace(/\.[^.]+$/,``).replace(/[^A-Za-z0-9_]+/g,`_`).replace(/^(?=\d)/,`_`)||`data`,gm={azure:{subscription:[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,`a subscription id, a GUID`],tenant:[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,`a tenant id, a GUID`],resource_group:[/^[A-Za-z0-9_.()-]{0,89}[A-Za-z0-9_()-]$/,`a resource group's name`]},aws:{account:[/^\d{12}$/,`a 12-digit account id`],region:[/^[a-z]{2}(?:-[a-z]+){1,2}-\d{1,2}$/,`a region such as eu-west-1`],profile:[/^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/,`a profile's name`]},gcp:{project:[/^[a-z][a-z0-9-]{4,28}[a-z0-9]$/,`a project id`],region:[/^[a-z]+-[a-z]+\d{1,2}$/,`a region such as europe-west1`]}},_m={azure:[`subscription`,`Azure`,`subscription id`],aws:[`account`,`AWS`,`account id`],gcp:[`project`,`Google Cloud`,`project id`]};function vm(e){for(let[t,n]of Object.entries(e)){let e=gm[t];if(!e||!n||typeof n!=`object`)continue;let r=n,[i,a,o]=_m[t];if(Object.values(r).some(e=>String(e??``).trim())&&!String(r[i]??``).trim())return`${a}: give its ${o}`;for(let[t,n]of Object.entries(r)){let r=String(n??``).trim(),i=e[t];if(r&&i&&!i[0].test(r))return`${a}: ${i[1]}`}}return``}var ym=[[`web`,`Web`],[`api`,`API`],[`desktop`,`Windows desktop`],[`mobile`,`Mobile`]],bm={web:Pe,api:fe,desktop:qe,mobile:me};function xm(e){let t=String(e.kind||`web`),n=[{key:`kind`,label:`Kind`,type:`select`,default:`web`,options:ym.map(([e,t])=>({value:e,label:t}))}];return(t===`web`||t===`api`)&&n.push({key:`url`,label:`Address`,type:`url`,placeholder:t===`api`?`https://qa.api.example.com/v1`:`https://qa.shop.example.com`}),t===`desktop`&&n.push({key:`path`,label:`Program`,type:`path`,placeholder:`C:\\Program Files\\Contoso\\Billing\\Billing.exe`},{key:`args`,label:`Arguments`,help:`Comma separated.`,type:`list`,placeholder:`--server, qa-db01`}),t===`mobile`&&n.push({key:`platform`,label:`Platform`,type:`select`,options:[{value:`android`,label:`Android`},{value:`ios`,label:`iOS`}]},{key:`app_id`,label:`App id`,type:`path`,placeholder:`com.contoso.courier`},{key:`activity`,label:`Activity`,help:`Android: the activity to start.`,type:`path`,placeholder:`.MainActivity`},{key:`app`,label:`Build to install`,help:`An .apk or .ipa, an https address, or bs://…`,type:`path`}),n.push({key:`description`,label:`Description`,help:`The agent picks apps by this, so say what the app is for.`,type:`text`}),t===`web`&&n.push({key:`login`,label:`Sign-in`,help:`A sign-in from Sign-ins.`,type:`text`,placeholder:`shop-qa`}),n}function Sm({value:e,onChange:t}){let n=Object.entries(e);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-surface-strong py-3`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Variables`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Plain values tests read as FORGEQE_VAR_NAME. No secrets here: list those under Secrets.`}),n.map(([n,r],i)=>(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(V,{"aria-label":`Variable name`,value:n,spellCheck:!1,onChange:r=>t(xr(e,n,r.target.value)),className:`max-w-[200px] flex-[1_1_140px] font-mono`}),(0,J.jsx)(V,{"aria-label":`Value of ${n}`,value:String(r??``),onChange:r=>t({...e,[n]:r.target.value}),className:`flex-[2_1_200px]`}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${n}`,"data-tip":`Remove ${n}`,onClick:()=>{let r={...e};delete r[n],t(r)},children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]},i)),(0,J.jsx)(`div`,{children:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add a variable`,onClick:()=>t({...e,[vr(e,`name`)]:``}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})})]})}function Cm({value:e,onChange:t}){let n=Array.isArray(e)?e.map(String):[],[i,a]=(0,q.useState)(``),o=/^[A-Za-z_][A-Za-z0-9_]*$/.test(i.trim());return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-surface-strong py-3`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Secrets`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Passwords and keys this environment's tests and desktop flows read, by name. Their values are kept in your credential store.`}),n.map(e=>(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-line-soft pt-2`,children:[(0,J.jsx)(`code`,{className:`w-full font-mono text-[13px] sm:w-[200px]`,children:e}),(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,J.jsx)(_n,{name:e,field:e,compact:!0})}),(0,J.jsx)(Fn,{name:e}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Stop using ${e} here`,"data-tip":`Stop using ${e} here`,onClick:()=>t(n.filter(t=>t!==e)),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]},e)),(0,J.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),o&&!n.includes(i.trim())&&t([...n,i.trim()]),a(``)},children:[(0,J.jsx)(V,{"aria-label":`Secret's variable name`,value:i,placeholder:`BILLING_PASSWORD_QA`,spellCheck:!1,onChange:e=>a(e.target.value),className:`max-w-[280px] flex-[1_1_200px] font-mono`}),(0,J.jsxs)(B,{size:`sm`,type:`submit`,disabled:!o,"data-tip":`Add a secret`,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]})]})}var wm=(e,t)=>(t.startsWith(e)?t.slice(e.length).replace(/^[\\/]+/,``):t).replace(/\\/g,`/`);function Tm({envs:e,layout:t,files:n,base:i,onSplit:a,splitBlocked:o,config:s}){let[c,l]=(0,q.useState)(null),u=t.layout===`dir`?wm(i,t.dir):``,d=e=>{let t=n.find(t=>t.name===e);return t?wm(i,t.path):`${u}/${e}.yaml`},f=K(e.value.environments),p=Object.keys(f),m=typeof e.value.default==`string`?e.value.default:p[0]||``;return(0,J.jsxs)(J.Fragment,{children:[s&&(0,J.jsx)(`div`,{className:`mb-5`,children:t.layout===`dir`?(0,J.jsx)(jn,{def:{key:`dir`,label:`Environments folder`,help:`One YAML file per environment, named after it. Relative to forgeqe.yaml; read from there after you save.`,type:`path`,placeholder:`./environments`},edit:s,base:[`environments`]}):(0,J.jsx)(jn,{def:{key:`file`,label:`Environments file`,help:`All environments in one YAML file. Relative to forgeqe.yaml; read from there after you save. --env NAME or FORGEQE_ENV picks one for a run.`,type:`path`,default:`./env.yaml`},edit:s,base:[`environments`]})}),t.layout===`file`?(0,J.jsxs)(`div`,{className:`mb-5 flex flex-wrap items-center gap-x-4 gap-y-3 rounded-[14px] bg-surface-muted px-5 py-4`,children:[(0,J.jsxs)(`p`,{className:`m-0 flex-[1_1_300px] text-sm leading-relaxed text-ink-2`,children:[`All environments are in one file, `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:wm(i,t.file)}),`. One file per environment is easier to change and review: each goes into`,` `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:`environments/`}),`, and the old file is left as it is.`,o&&(0,J.jsx)(`span`,{className:`mt-1 block text-muted`,children:o})]}),(0,J.jsxs)(B,{size:`sm`,onClick:a,disabled:!!o,"data-tip":`Split into one file each`,children:[(0,J.jsx)(ie,{"aria-hidden":`true`}),`Split`]})]}):(0,J.jsxs)(`p`,{className:`mt-0 mb-4 text-sm leading-relaxed text-ink-2`,children:[`Each environment is its own file in `,(0,J.jsxs)(`span`,{className:`font-mono text-[13px]`,children:[u,`/`]}),`. The active one is set in forgeqe.yaml.`]}),(0,J.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`The active one is used when a run names none.`}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add an environment`,onClick:()=>l({mode:`add`,from:``,name:vr(f,p.length?`new-environment`:`qa`),env:{description:``,apps:{}}}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),(0,J.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Active environment`,children:[p.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`No environments yet. Add one with the apps your tests use.`}),p.map(r=>{let i=K(f[r]),a=K(i.apps);return(0,J.jsx)(hn,{expandable:!1,open:!1,onToggle:()=>{},lead:(0,J.jsx)(lm,{checked:m===r,onSelect:()=>e.set({...e.value,default:r}),label:`Use ${r}`}),title:r,meta:(0,J.jsxs)(J.Fragment,{children:[[i.description,typeof i.file==`string`?`reads ${i.file}`:`${Object.keys(a).length} app${Object.keys(a).length===1?``:`s`}`,Object.keys(K(i.data)).length?`${Object.keys(K(i.data)).length} test data file${Object.keys(K(i.data)).length===1?``:`s`}`:``].filter(Boolean).map(String).join(`, `),t.layout===`dir`&&(0,J.jsxs)(`span`,{className:`block font-mono text-[12px]`,children:[d(r),n.some(e=>e.name===r)?``:` (new)`]})]}),state:m===r?(0,J.jsx)(`span`,{className:`text-sm text-pass`,children:`Active`}):void 0,actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Edit ${r}`,"data-tip":`Edit ${r}`,onClick:()=>l({mode:`edit`,from:r,name:r,env:i}),children:(0,J.jsx)(ie,{"aria-hidden":`true`})}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${r}`,"data-tip":`Remove ${r}`,onClick:()=>{let t={...f};delete t[r];let n={...e.value,environments:t};m===r&&delete n.default,e.set(n)},children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]}),children:null},r)})]}),(0,J.jsx)(Em,{panel:c,setPanel:l,taken:p,vars:e.vars,dirLayout:t.layout===`dir`,onApply:t=>{t.mode===`add`?e.set({...e.value,...p.length?{}:{default:t.name},environments:{...f,[t.name]:t.env}}):e.set({...e.value,...m===t.from&&e.value.default!==void 0?{default:t.name}:{},environments:{...xr(f,t.from,t.name),[t.name]:t.env}})}})]})}function Em({panel:e,setPanel:t,taken:n,vars:a,dirLayout:o,onApply:c}){let[l,u]=(0,q.useState)(``),d=e?K(e.env):{},f=K(d.apps),p=n=>e&&t({...e,env:n}),m={value:d,set:p,vars:a},h=Object.entries(f).filter(([,e])=>(K(e).kind||`web`)===`web`),g=Object.entries(f).filter(([,e])=>K(e).kind===`api`),_=typeof d.file==`string`?String(d.file):``,v=K(d.data),y=e?um(e.name,e.from,n):``,b=K(d.cloud),x=pm(v)||vm(b),[S,C]=(0,q.useState)([]),w=()=>{t(null),u(``),C([])},T=(e,t)=>{p({...e,...e.data?{}:Object.keys(v).length?{data:v}:{},...e.cloud?{}:Object.keys(b).length?{cloud:b}:{},...!e.description&&d.description?{description:d.description}:{}}),u(``),C(t.length?[`Secret values written in the YAML were left out (${t.join(`, `)}): put each in an environment variable and add its name under Secrets.`]:[])};return(0,J.jsx)(Cn,{wide:!0,open:!!e,onClose:w,title:e?.mode===`add`?`Add an environment`:`Edit ${e?.from}`,description:`The apps, values and secrets tests use in one place, such as QA or staging. Changes apply when you press the button below; a secret's value goes to your credential store as you type it.`,footer:(0,J.jsxs)(J.Fragment,{children:[(y||x)&&(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:y?`Needs a valid name`:x}),(0,J.jsxs)(B,{onClick:w,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!!y||!!x,onClick:()=>{c(e),w()},children:[e?.mode===`add`?(0,J.jsx)(r,{"aria-hidden":`true`}):(0,J.jsx)(s,{"aria-hidden":`true`}),e?.mode===`add`?`Add`:`Done`]})]}),children:e&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Name`,help:y?(0,J.jsx)(`span`,{className:`text-fail`,children:y}):o?`Also its file's name. Pick it with --env NAME or FORGEQE_ENV.`:`Pick it with --env NAME or FORGEQE_ENV.`,htmlFor:`env-name`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(V,{id:`env-name`,value:e.name,spellCheck:!1,placeholder:`qa`,"aria-invalid":!!y,onChange:n=>t({...e,name:n.target.value.trim()}),className:`font-mono`})}),(0,J.jsx)(Nn,{defs:[{key:`description`,label:`Description`,type:`text`}],edit:m,base:[],stacked:!0}),(0,J.jsx)(Dm,{name:e.name,linked:_,onFill:T,onLink:e=>p({file:e,...d.description?{description:d.description}:{},...Object.keys(v).length?{data:v}:{},...Object.keys(b).length?{cloud:b}:{}})}),S.map(e=>(0,J.jsxs)(`p`,{role:`status`,className:`mt-3 mb-0 flex items-start gap-2 text-sm leading-relaxed text-warn`,children:[(0,J.jsx)(zt,{icon:Oe,size:16,className:`mt-0.5 flex-none`}),e]},e)),_?(0,J.jsx)(Om,{file:_,name:e.name,onCopy:T}):(0,J.jsxs)(J.Fragment,{children:[h.length>1&&(0,J.jsx)(jn,{def:{key:`start_app`,label:`Start app`,help:`Where browser runs start when no app or address is given.`,type:`select`,options:h.map(([e])=>({value:e,label:e}))},edit:m,base:[],stacked:!0}),g.length>1&&(0,J.jsx)(jn,{def:{key:`api_app`,label:`API app`,help:`The API that API tests call.`,type:`select`,options:g.map(([e])=>({value:e,label:e}))},edit:m,base:[],stacked:!0}),(0,J.jsx)(W,{children:`Apps`}),Object.keys(f).length===0&&(0,J.jsx)(`p`,{className:`m-0 pb-2 text-sm text-muted`,children:`No apps yet: add the web pages, APIs and programs tests use here.`}),Object.entries(f).map(([e,t],n)=>{let r=K(t);return(0,J.jsxs)(hn,{lead:(0,J.jsx)(pn,{icon:bm[String(r.kind||`web`)]||Pe,logo:r.kind===`mobile`?Fa[String(r.platform)]:r.kind===`desktop`?Fa.windows:void 0}),title:e,meta:[ym.find(([e])=>e===(r.kind||`web`))?.[1],r.url||r.path||r.app_id].filter(Boolean).map(String).join(`, `),open:l===String(n),onToggle:()=>u(l===String(n)?``:String(n)),actions:(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${e}`,"data-tip":`Remove ${e}`,onClick:()=>{let t={...f};delete t[e],p({...d,apps:t})},children:(0,J.jsx)(Je,{"aria-hidden":`true`})}),children:[(0,J.jsx)(G,{label:`Name`,htmlFor:`app-${n}`,stacked:!0,children:(0,J.jsx)(V,{id:`app-${n}`,defaultValue:e,spellCheck:!1,onBlur:t=>{let n=t.target.value.trim();n&&n!==e&&/^[A-Za-z0-9_.-]+$/.test(n)&&!(n in f)?p({...d,apps:xr(f,e,n)}):t.target.value=e},className:`font-mono`})}),(0,J.jsx)(Nn,{defs:xm(r),edit:{value:r,set:t=>p({...d,apps:{...f,[e]:t}}),vars:a},base:[],stacked:!0})]},n)}),(0,J.jsx)(`div`,{className:`border-t border-line-soft py-3`,children:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add an app`,onClick:()=>{p({...d,apps:{...f,[vr(f,`app`)]:{kind:`web`}}}),u(String(Object.keys(f).length))},children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})}),(0,J.jsx)(Sm,{value:K(d.variables),onChange:e=>p(U(d,[`variables`],Object.keys(e).length?e:void 0))}),(0,J.jsx)(Cm,{value:d.secrets,onChange:e=>p(U(d,[`secrets`],e.length?e:void 0))})]}),(0,J.jsx)(jm,{value:v,onChange:e=>p(U(d,[`data`],Object.keys(e).length?e:void 0))}),(0,J.jsx)(Am,{edit:m})]})})}function Dm({name:e,linked:t,onFill:n,onLink:r}){let[i,o]=(0,q.useState)(``),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(``),[m,h]=(0,q.useState)(null),[g,_]=(0,q.useState)(``),[v,y]=(0,q.useState)(null),[b,x]=(0,q.useState)(``),S=(0,q.useRef)(null),C=(0,q.useId)(),w=(0,q.useId)();(0,q.useEffect)(()=>{i===`link`&&v===null&&en.files(`yaml`).then(e=>y(e.files)).catch(e=>p(e.message))},[i,v]);let T=(e,t)=>{n(K(e.environments[t]),e.literalByEnv[t]||[]),h(null),o(``),l(``)},E=async t=>{d(!0),p(``);try{let n=await en.convert(t,e),r=Object.keys(n.environments);r.length===1?T(n,r[0]):r.includes(e)?T(n,e):(h(n),_(n.default&&r.includes(n.default)?n.default:r[0]))}catch(e){p(e.message)}finally{d(!1)}};return(0,J.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3 rounded-[12px] bg-surface-muted px-4 py-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-2 text-[14px] font-medium text-ink`,children:[(0,J.jsx)(zt,{icon:we,size:16,className:`text-muted`}),t?`Read from your team's YAML`:`Start from your team's YAML`]}),(0,J.jsx)(`span`,{className:`text-[13px] leading-relaxed text-ink-2`,children:`Any layout works: ForgeQE finds the addresses, programs, values and secret names in it. Secret values are never copied.`})]}),(0,J.jsx)(`div`,{role:`group`,"aria-label":`How to bring the YAML in`,className:`flex flex-wrap gap-2`,children:(0,J.jsx)(Qt,{items:[{id:`paste`,label:`Paste`,icon:a},{id:`import`,label:`Import a file`,icon:ke},{id:`link`,label:`Link a project file`,icon:ee}],value:i,onChange:e=>{o(i===e?``:e),p(``),h(null)}})}),i===`paste`&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(`label`,{htmlFor:C,className:`text-[13px] text-ink-2`,children:`The environment's YAML, or a file of several`}),(0,J.jsx)(Zt,{id:C,rows:8,spellCheck:!1,value:c,placeholder:`base_url: https://qa.shop.example.com
|
|
58
|
+
db_server: qa-db01
|
|
59
|
+
admin_password: \${ADMIN_PASSWORD_QA}`,onChange:e=>l(e.target.value),className:`font-mono leading-[1.6]`}),(0,J.jsx)(`div`,{children:(0,J.jsxs)(B,{size:`sm`,variant:`primary`,disabled:!c.trim()||u,"data-tip":`Fill in the fields`,onClick:()=>E({text:c}),children:[(0,J.jsx)(s,{"aria-hidden":`true`}),u?`Reading…`:`Fill in`]})})]}),i===`import`&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,J.jsx)(`input`,{ref:S,type:`file`,accept:`.yaml,.yml,.json`,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`,onChange:async e=>{let t=e.target.files?.[0];if(e.target.value=``,t){if(t.size>262144)return p(`${t.name} is over 256 KB.`);await E({text:await t.text()})}}}),(0,J.jsxs)(B,{size:`sm`,disabled:u,"data-tip":`Choose a YAML file`,onClick:()=>S.current?.click(),children:[(0,J.jsx)(ke,{"aria-hidden":`true`}),u?`Reading…`:`Choose`]}),(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`From anywhere on this computer; its fields are copied here.`})]}),i===`link`&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(`label`,{htmlFor:w,className:`text-[13px] text-ink-2`,children:`A YAML file in the project. ForgeQE reads it every run, so the team keeps changing it there.`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsxs)(qt,{id:w,value:b,onChange:e=>x(e.target.value),disabled:!v?.length,className:`min-w-0 flex-[1_1_280px] font-mono`,children:[(0,J.jsx)(`option`,{value:``,children:v===null?`Looking for YAML files…`:v.length?`Pick a file`:`No YAML files in the project`}),(v||[]).map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]}),(0,J.jsxs)(B,{size:`sm`,variant:`primary`,disabled:!b,onClick:()=>{r(b),o(``)},"data-tip":`Link a project file`,children:[(0,J.jsx)(ge,{"aria-hidden":`true`}),`Link`]})]})]}),m&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsxs)(`span`,{className:`text-[13px] text-ink-2`,children:[`The YAML has `,Object.keys(m.environments).join(`, `),`. Fill in from`]}),(0,J.jsx)(qt,{"aria-label":`Which environment to fill in from`,value:g,onChange:e=>_(e.target.value),className:`max-w-[220px] flex-[0_1_200px]`,children:Object.keys(m.environments).map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))}),(0,J.jsxs)(B,{size:`sm`,variant:`primary`,"data-tip":`Fill in from ${g}`,onClick:()=>T(m,g),children:[(0,J.jsx)(s,{"aria-hidden":`true`}),`Fill in`]})]}),f&&(0,J.jsx)(`p`,{role:`alert`,className:`m-0 text-sm text-fail`,children:f})]})}function Om({file:e,name:t,onCopy:n}){let[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(``);(0,q.useEffect)(()=>{let n=!0;return i(null),o(``),en.convert({file:e},t).then(e=>{let r=K(e.environments[t]??Object.values(e.environments)[0]);n&&i({env:r,literal:e.literalByEnv[t]??Object.values(e.literalByEnv)[0]??[]})}).catch(e=>n&&o(e.message)),()=>{n=!1}},[e,t]);let s=Object.entries(K(r?.env.apps)),c=Object.entries(K(r?.env.variables)),l=Array.isArray(r?.env.secrets)?r.env.secrets.map(String):[];return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:(0,J.jsxs)(J.Fragment,{children:[`Read from `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e}),` every run; change them in that file.`]}),children:`What ForgeQE reads`}),a&&(0,J.jsx)(`p`,{role:`alert`,className:`m-0 text-sm text-fail`,children:a}),!r&&!a&&(0,J.jsxs)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:[`Reading `,e,`…`]}),r&&(0,J.jsxs)(`dl`,{className:`m-0 flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`border-t border-line-soft pt-3 text-[13px] font-medium text-muted`,children:`Apps`}),(0,J.jsxs)(`dd`,{className:`m-0 flex flex-col gap-2 pt-2 pb-3`,children:[s.length===0&&(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`None found`}),s.map(([e,t])=>{let n=K(t);return(0,J.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,J.jsx)(pn,{icon:bm[String(n.kind||`web`)]||Pe}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e}),(0,J.jsx)(`span`,{className:`text-sm break-all text-muted`,children:[ym.find(([e])=>e===(n.kind||`web`))?.[1],n.url||n.path||n.app_id].filter(Boolean).map(String).join(`, `)})]})]},e)})]}),(0,J.jsx)(`dt`,{className:`border-t border-line-soft pt-3 text-[13px] font-medium text-muted`,children:`Values`}),(0,J.jsx)(`dd`,{className:`m-0 pt-2 pb-3 text-sm`,children:c.length?(0,J.jsx)(`span`,{className:`flex flex-col gap-1`,children:c.map(([e,t])=>(0,J.jsxs)(`span`,{className:`break-all`,children:[(0,J.jsx)(`code`,{className:`font-mono text-[13px]`,children:e}),` `,(0,J.jsx)(`span`,{className:`text-muted`,children:`=`}),` `,String(t)]},e))}):(0,J.jsx)(`span`,{className:`text-muted`,children:`None`})}),(0,J.jsx)(`dt`,{className:`border-t border-line-soft pt-3 text-[13px] font-medium text-muted`,children:`Secrets, by name`}),(0,J.jsx)(`dd`,{className:`m-0 pt-2 pb-3 text-sm`,children:l.length?(0,J.jsx)(`code`,{className:`font-mono text-[13px]`,children:l.join(`, `)}):(0,J.jsx)(`span`,{className:`text-muted`,children:`None`})})]}),r?.literal.length?(0,J.jsxs)(`p`,{className:`m-0 flex items-start gap-2 text-sm leading-relaxed text-warn`,children:[(0,J.jsx)(zt,{icon:Oe,size:16,className:`mt-0.5 flex-none`}),`The file has secret values written in (`,r.literal.join(`, `),`). They are not used: move each to an environment variable.`]}):null,(0,J.jsx)(`div`,{className:`border-t border-line-soft py-3`,children:(0,J.jsxs)(B,{size:`sm`,disabled:!r,"data-tip":`Copy into fields instead`,onClick:()=>r&&n(r.env,r.literal),children:[(0,J.jsx)(S,{"aria-hidden":`true`}),`Copy`]})})]})}var km=[{id:`azure`,title:`Azure`,note:`Tests read these as FORGEQE_CLOUD_AZURE_SUBSCRIPTION_ID, _TENANT_ID and _RESOURCE_GROUP.`,fields:[{key:`subscription`,label:`Subscription id`,type:`path`,placeholder:`00000000-0000-0000-0000-000000000000`},{key:`tenant`,label:`Tenant id`,type:`path`,placeholder:`00000000-0000-0000-0000-000000000000`},{key:`resource_group`,label:`Resource group`,type:`path`,placeholder:`rg-shop-qa`}]},{id:`aws`,title:`AWS`,note:`Tests read these as FORGEQE_CLOUD_AWS_ACCOUNT_ID, _REGION and _PROFILE.`,fields:[{key:`account`,label:`Account id`,help:`12 digits.`,type:`path`,placeholder:`123456789012`},{key:`region`,label:`Region`,type:`path`,placeholder:`eu-west-1`},{key:`profile`,label:`Profile`,help:`A profile in ~/.aws/config on the computers that run the tests.`,type:`path`,placeholder:`shop-qa`}]},{id:`gcp`,title:`Google Cloud`,note:`Tests read these as FORGEQE_CLOUD_GCP_PROJECT and _REGION.`,fields:[{key:`project`,label:`Project id`,type:`path`,placeholder:`shop-qa-123`},{key:`region`,label:`Region`,type:`path`,placeholder:`europe-west1`}]}];function Am({edit:e}){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{icon:le,help:`Where this environment's cloud resources are, so the agents look in the right account and tests read it instead of a fixed id. Identifiers only: sign-ins stay with each cloud's own tools.`,children:`Cloud accounts`}),km.map(t=>{let n=vm({[t.id]:K(K(e.value.cloud)[t.id])});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-surface-strong py-3`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:t.title}),n?(0,J.jsx)(`span`,{className:`text-sm text-fail`,children:n}):(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:t.note}),(0,J.jsx)(Nn,{defs:t.fields,edit:e,base:[`cloud`,t.id],stacked:!0})]},t.id)})]})}function jm({value:e,onChange:t}){let[n,i]=(0,q.useState)([]),a=(0,q.useId)();(0,q.useEffect)(()=>{en.files(`data`).then(e=>i(e.files)).catch(()=>i([]))},[]);let o=Object.entries(e);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{icon:Ve,help:`Files of rows this environment's tests use, so one test reads QA's rows in QA and UAT's in UAT. Each file's path is in FORGEQE_DATA_<NAME>, from the folder of forgeqe.yaml.`,children:`Test data`}),(0,J.jsx)(`datalist`,{id:a,children:n.map(e=>(0,J.jsx)(`option`,{value:e},e))}),o.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-3 text-sm text-muted`,children:`No test data files yet.`}),o.map(([n,r],i)=>(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(V,{"aria-label":`Data name`,value:n,spellCheck:!1,"aria-invalid":!dm.test(n),onChange:r=>t(xr(e,n,r.target.value)),className:`max-w-[180px] flex-[1_1_140px] font-mono`}),(0,J.jsx)(V,{"aria-label":`File of ${n}`,list:a,value:String(r??``),spellCheck:!1,placeholder:`test-data/qa/customers.csv`,onChange:r=>{let i=r.target.value,a=/^data(_\d+)?$/.test(n)&&i&&!(hm(i)in e)?hm(i):n;t({...xr(e,n,a),[a]:i})},className:`flex-[2_1_220px] font-mono`}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${n}`,"data-tip":`Remove ${n}`,onClick:()=>{let r={...e};delete r[n],t(r)},children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]},i)),(0,J.jsx)(`div`,{className:`border-t border-line-soft py-3`,children:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add a data file`,onClick:()=>t({...e,[mm(e)]:``}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})})]})}var Mm=[{name:`forgeqe`,label:`Orchestrator (shell, forgeqe run, forgeqe mcp)`,area:`agent`},{name:`engine`,label:`Browser agent (browser, desktop and mobile runs)`,area:`browser`},{name:`forgeqe-test`,label:`Coding agent: writes tests`,area:`coding`},{name:`forgeqe-heal`,label:`Heals tests`,area:`coding`},{name:`forgeqe-migrate`,label:`Migrates test suites`,area:`coding`},{name:`forgeqe-tosca`,label:`Converts Tosca test cases`,area:`coding`},{name:`forgeqe-tosca-assistant`,label:`Tosca assistant`,area:`planning`},{name:`forgeqe-api`,label:`Writes API and contract tests`,area:`coding`},{name:`forgeqe-review`,label:`Reviews the coding agent's tests`,area:`review`},{name:`forgeqe-pr-review`,label:`Reviews pull requests`,area:`review`},{name:`forgeqe-judge`,label:`Judges domain evaluations`,area:`review`},{name:`forgeqe-defect-rca`,label:`Root cause of defects`,area:`analysis`},{name:`forgeqe-refine`,label:`Refines requests`,area:`planning`},{name:`forgeqe-find`,label:`Finds the tests a request means`,area:`planning`},{name:`forgeqe-test-plan`,label:`Plans tests recorded by hand`,area:`planning`},{name:`forgeqe-api-plan`,label:`Plans API scenarios`,area:`planning`},{name:`forgeqe-explore-plan`,label:`Plans exploratory charters`,area:`planning`},{name:`forgeqe-data`,label:`DB agent: test data`,area:`planning`},{name:`forgeqe-persona`,label:`Persona agent: business personas`,area:`planning`},{name:`forgeqe-agent-builder`,label:`Custom agent builder`,area:`planning`},{name:`forgeqe-bug-report`,label:`Drafts ForgeQE bug reports`,area:`planning`},{name:`forgeqe-knowledge`,label:`Reads the product into its knowledge graph`,area:`analysis`},{name:`forgeqe-investigate`,label:`Investigates questions about the product`,area:`analysis`},{name:`forgeqe-evidence-acceptance`,label:`Evidence: reads a change against acceptance criteria`,area:`analysis`},{name:`forgeqe-impact-reader`,label:`Change impact: reads what a change does against its pull request`,area:`analysis`},{name:`forgeqe-evidence-content`,label:`Evidence: judges an agent's answers`,area:`analysis`},{name:`forgeqe-evidence-scenarios`,label:`Evidence: drafts test scenarios`,area:`analysis`}];Mm.map(e=>e.name);var Nm={browser:`GitHub sign-in in the browser`,token:`a saved fine-grained token`,gh:`the GitHub CLI's sign-in`,environment:`a token in the environment ForgeQE started in`};function Pm({onChanged:e}){let[t,n]=(0,q.useState)(null),[r,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(``),m=(0,q.useCallback)(()=>{Ft.get().then(t=>{n(t.status),a(n=>(n&&(n.state===`running`||n.state===`waiting`)&&t.signin?.state===`done`&&e?.(),t.signin))},e=>s(e.message))},[e]);(0,q.useEffect)(m,[m]);let h=r?.state===`running`||r?.state===`waiting`;(0,q.useEffect)(()=>{if(!h)return;let e=setInterval(m,1e3);return()=>clearInterval(e)},[h,m]);let g=async e=>{s(``),p(``);try{a((await Ft.signIn(e)).signin)}catch(e){s(e.message)}},_=async e=>{if(r?.question){s(``);try{a((await Ft.answer(r.question.id,e)).signin),l(``)}catch(e){s(e.message)}}},v=r?.question;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line-soft py-3`,children:[(0,J.jsxs)(`div`,{className:`flex min-h-[44px] flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,J.jsx)(pn,{logo:Pa.github_copilot}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`GitHub Copilot`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:t?t.signedIn?`Signed in${t.account?` as ${t.account}`:``}${t.host?` on ${t.host}`:``}, with ${Nm[t.how]}.${t.model?` Model: ${t.model}.`:``}`:`Not signed in. The agents can run on your Copilot seat.`:`Reading the sign-in…`})]}),!h&&t&&(0,J.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsxs)(B,{size:`sm`,"data-tip":t.signedIn?`Sign in to GitHub again`:`Sign in with GitHub, in your browser`,onClick:()=>void g(`browser`),children:[(0,J.jsx)(ce,{"aria-hidden":`true`}),`Sign in`]}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Sign in with your company's GitHub Enterprise`,onClick:()=>void g(`enterprise`),children:[(0,J.jsx)(Qe,{"aria-hidden":`true`}),`Enterprise`]}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Use a fine-grained GitHub token`,onClick:()=>void g(`token`),children:[(0,J.jsx)(ce,{"aria-hidden":`true`}),`Token`]}),t.signedIn&&t.how!==`environment`&&(0,J.jsxs)(B,{size:`sm`,onClick:async()=>{let e=await Ft.signOut();n(e.status),p(e.message),a(null)},children:[(0,J.jsx)(xe,{"aria-hidden":`true`}),`Sign out`]})]})]}),r&&(r.lines.length>0||h||r.link)&&(0,J.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`flex flex-col gap-3 rounded-[12px] card border p-4`,children:[(r.link||r.code)&&h&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[r.code&&(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Your code`}),(0,J.jsx)(`span`,{className:`rounded-[8px] border border-line bg-bg px-3 py-1.5 font-mono text-lg font-semibold tracking-[0.12em]`,children:r.code}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Copy the code`,onClick:()=>{navigator.clipboard?.writeText(r.code).then(()=>d(!0)),setTimeout(()=>d(!1),1500)},children:[(0,J.jsx)(S,{"aria-hidden":`true`}),u?`Copied`:`Copy`]})]}),r.link&&(0,J.jsxs)(`a`,{href:r.link,target:`_blank`,rel:`noreferrer noopener`,"data-tip":`Open GitHub`,className:rn({variant:`primary`,size:`sm`}),children:[(0,J.jsx)(Qe,{"aria-hidden":`true`}),`Open`]})]}),(0,J.jsxs)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-sm`,children:[r.lines.slice(-6).map((e,t)=>(0,J.jsx)(`li`,{className:z(`[overflow-wrap:anywhere]`,e.kind===`err`?`text-fail`:e.kind===`ok`?`text-pass`:`text-ink-2`),children:e.text},t)),r.state===`running`&&(0,J.jsx)(`li`,{className:`text-muted`,children:`Waiting for GitHub…`})]}),v?.kind===`choose`&&(0,J.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,J.jsx)(`legend`,{className:`mb-1 text-sm font-medium`,children:v.title}),v.detail&&(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:v.detail}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:v.options.map(e=>(0,J.jsx)(B,{size:`sm`,variant:e.id===`cancel`?`outline`:`primary`,onClick:()=>void _(e.id),children:e.label},e.id))})]}),v?.kind===`input`&&(0,J.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),c.trim()&&_(c)},children:[(0,J.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_320px] flex-col gap-1 text-sm font-medium`,children:[v.label,(0,J.jsx)(V,{type:v.secret?`password`:`text`,autoComplete:`off`,spellCheck:!1,value:c,onChange:e=>l(e.target.value)})]}),(0,J.jsxs)(B,{type:`submit`,size:`sm`,variant:`primary`,disabled:!c.trim(),children:[(0,J.jsx)(Ue,{"aria-hidden":`true`}),`Continue`]})]}),h&&(0,J.jsx)(`span`,{children:(0,J.jsxs)(B,{size:`sm`,onClick:async()=>a((await Ft.cancel()).signin),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]})})]}),(o||f)&&(0,J.jsx)(`p`,{className:z(`m-0 text-sm`,o?`text-fail`:`text-ink-2`),children:o||f})]})}var Fm=[[`openai`,`OpenAI`],[`azure`,`Azure OpenAI`],[`github_copilot`,`GitHub Copilot seat`],[`ollama`,`Ollama on this machine`],[`openai_compatible`,`OpenAI-compatible endpoint`]],Im=e=>Fm.find(([t])=>t===e)?.[1]||String(e||`No provider`),Lm={openai:{provider:`openai`,model:`gpt-4o`,api_key_env:`OPENAI_API_KEY`,temperature:.2},azure:{provider:`azure`,model:`gpt-4o`,deployment:`gpt-4o`,api_key_env:`WP_AZURE_API_KEY`,api_version:`2024-05-01-preview`,temperature:.2,deployment_type:`global`},github_copilot:{provider:`github_copilot`,model:`gpt-4.1`},ollama:{provider:`ollama`,model:`llama3.2`,endpoint:`http://127.0.0.1:11434/v1`,context:32768,temperature:.2},openai_compatible:{provider:`openai_compatible`,model:`gpt-4o`,api_key_env:`WP_API_KEY`,temperature:.2}};function Rm(e){let t=e.multiplier===0?`included in your plan`:typeof e.multiplier==`number`?`${e.multiplier}x premium requests`:`premium requests`;return`${e.id} (${e.vision?`screenshots`:`no screenshots`}, ${t})`}function zm(e,t,n){let r=e.map(e=>({value:e.id,label:Rm(e)}));if(typeof t==`string`&&t&&!e.some(e=>e.id===t)){let e=n.find(e=>e.id===t),i=e?e.policy&&e.policy!==`enabled`?`turned off on your seat`:`takes no screenshots`:`not on your seat`;r.push({value:t,label:`${t} (${i})`})}return r}function Bm(e){return!e||!e.models&&!e.error?`Reading your seat's models…`:e.error?`Your seat's list could not be read (below); type a Copilot model id, or try again.`:`Your seat has no model turned on: turn one on in GitHub's Copilot settings, or type a Copilot model id.`}function Vm(e,t){let n=String(e.provider||``),r=e.auth===`entra`,i=t?.models?.filter(e=>!e.policy||e.policy===`enabled`)||[];if(n===`github_copilot`&&i.length)return[{key:`model`,label:`Model`,help:`Your Copilot seat's models. ForgeQE's agent and Scribe use it, and the browser engine too unless Engine model says otherwise.`,type:`select`,options:zm(i,e.model,t.models)},{key:`engine_model`,label:`Engine model`,help:`For the browser, desktop and mobile agents, which send screenshots.`,type:`select`,emptyLabel:`Same as the model`,options:zm(i.filter(e=>e.vision),e.engine_model,t.models)},{key:`description`,label:`Description`,help:`Shown in the model picker.`,type:`text`}];let a=[{key:`model`,label:`Model`,...n===`github_copilot`?{help:Bm(t)}:{},type:`text`,placeholder:n===`ollama`?`llama3.2`:n===`github_copilot`?`gpt-4.1`:`gpt-4o`}];return n===`azure`&&(a.push({key:`endpoint`,label:`Endpoint`,type:`url`,placeholder:`https://YOUR_RESOURCE.openai.azure.com/`},{key:`deployment`,label:`Deployment`,type:`text`,placeholder:`gpt-4o`},{key:`auth`,label:`Sign-in`,help:`Entra ID uses a managed identity, workload identity or az login; no key.`,type:`select`,emptyLabel:`API key`,options:[{value:`entra`,label:`Microsoft Entra ID`}]}),r&&a.push({key:`managed_identity_client_id`,label:`Managed identity client id`,type:`text`})),(n===`ollama`||n===`openai_compatible`)&&a.push({key:`endpoint`,label:`Endpoint`,type:`url`,placeholder:n===`ollama`?`http://127.0.0.1:11434/v1`:`https://your-gateway.example/v1`}),n!==`github_copilot`&&!r&&a.push({key:`api_key_env`,label:`API key`,help:`Kept in your credential store, never in llms.json.`,type:`var`}),a.push({key:`description`,label:`Description`,help:`Shown in the model picker.`,type:`text`}),a}function Hm(e){let t=String(e.provider||``),n=[];return t===`azure`&&n.push({key:`api_version`,label:`API version`,type:`text`,placeholder:`2024-05-01-preview`},{key:`deployment_type`,label:`Deployment type`,help:`For prices.`,type:`select`,options:[`global`,`data_zone`].map(e=>({value:e,label:e}))}),t===`ollama`&&n.push({key:`context`,label:`Context window`,help:`Tokens.`,type:`number`,default:32768}),t!==`github_copilot`&&n.push({key:`temperature`,label:`Temperature`,type:`number`,placeholder:`0.2`}),t===`github_copilot`&&n.push({key:`reasoning_effort`,label:`Reasoning effort`,help:`How hard a reasoning model thinks. Sent only to a model that takes it.`,type:`select`,emptyLabel:`The model's default`,options:[`low`,`medium`,`high`,`xhigh`,`max`].map(e=>({value:e,label:e}))}),n}var Um=/^[A-Za-z0-9_.-]+$/;function Wm({panel:e,setPanel:t,taken:n,onApply:a,vars:o}){let[c,l]=(0,q.useState)(!1),u=e?.profile||{},d=u.provider===`github_copilot`,f=(0,q.useCallback)(()=>d?Ft.models().then(e=>e.models):Promise.resolve(null),[d]),p=cn(f),m={models:p.data,error:p.error},h=e?.name?Um.test(e.name)?e.name!==e.from&&n(e.name)?`Another model has this name.`:``:`Use letters, digits and _ . -`:``,g=String(u.provider||``),_=[...e&&!e.name?[[``,`a name`]]:[],[`model`,`a model`],...g===`azure`?[[`endpoint`,`an endpoint`],[`deployment`,`a deployment`]]:[],...g===`openai_compatible`?[[`endpoint`,`an endpoint`]]:[]].filter(([e])=>!e||!String(u[e]??``).trim()),v=!!e&&!h&&!_.length,y={value:u,set:n=>e&&t({...e,profile:n}),vars:o},b=()=>{t(null),l(!1)},x=Hm(u);return(0,J.jsx)(Cn,{open:!!e,onClose:b,title:e?.mode===`add`?`Add a model`:`Edit ${e?.from}`,description:`Saved to llms.json, and its key to ${Tn(on().store)}, as soon as you add it.`,footer:(0,J.jsxs)(J.Fragment,{children:[_.length>0&&(0,J.jsxs)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:[`Needs `,_.map(([,e])=>e).join(` and `)]}),(0,J.jsxs)(B,{onClick:b,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!v,onClick:()=>{a(e),b()},children:[e?.mode===`add`?(0,J.jsx)(r,{"aria-hidden":`true`}):(0,J.jsx)(s,{"aria-hidden":`true`}),e?.mode===`add`?`Add`:`Done`]})]}),children:e&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`fieldset`,{className:`m-0 border-0 p-0 pt-5`,children:[(0,J.jsx)(`legend`,{className:`mb-2 font-medium`,children:`Provider`}),(0,J.jsx)(`div`,{className:`flex flex-col gap-1`,children:Fm.map(([n,r])=>(0,J.jsxs)(`label`,{className:`flex min-h-12 cursor-pointer items-center gap-3 rounded-[10px] px-3 hover:bg-surface-muted has-[:checked]:bg-surface-strong`,children:[(0,J.jsx)(`input`,{type:`radio`,name:`provider`,checked:u.provider===n,onChange:()=>t({...e,profile:e.mode===`add`?{...Lm[n],...u.description?{description:u.description}:{}}:{...u,provider:n}})}),(0,J.jsx)(pn,{icon:M,logo:Pa[n]}),r]},n))})]}),(0,J.jsx)(G,{label:`Name`,help:h?(0,J.jsx)(`span`,{className:`text-fail`,children:h}):`How you pick it in chats and with --profile.`,htmlFor:`model-name`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(V,{id:`model-name`,value:e.name,spellCheck:!1,placeholder:`openai-gpt4o`,"aria-invalid":!!h,onChange:n=>t({...e,name:n.target.value.trim()})})}),(0,J.jsx)(Nn,{defs:Vm(u,m),edit:y,base:[],stacked:!0}),d&&p.error&&(0,J.jsx)(Zn,{error:`Your Copilot seat's models could not be read: ${p.error}`,reload:p.reload}),x.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":c,onClick:()=>l(!c),"data-tip":c?`Fewer settings`:`More settings`,className:`mt-2 inline-flex min-h-10 cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 text-sm font-medium text-accent-fg hover:text-accent-fg-hover [&>svg]:size-4`,children:[c?(0,J.jsx)(j,{"aria-hidden":`true`}):(0,J.jsx)(R,{"aria-hidden":`true`}),c?`Less`:`More`]}),(0,J.jsx)(dn,{open:c,children:(0,J.jsx)(Nn,{defs:x,edit:y,base:[],stacked:!0})})]})]})})}function Gm({config:e,models:t,vars:n,onReload:i}){let[a,o]=(0,q.useState)(null),s=K(t.value.models),c=Object.keys(s),l=typeof t.value.default==`string`?t.value.default:``,u=String(Cr(e.value,[`llm`,`active`])??``);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{first:!0,children:`Models file`}),(0,J.jsx)(jn,{def:{key:`models_file`,label:`Models file`,help:`Relative to forgeqe.yaml. Kept apart, so it can be shared.`,type:`path`,default:`./llms.json`},edit:e,base:[`llm`]}),(0,J.jsx)(G,{label:`Profile in use`,help:`Empty: the default below. --profile overrides it for one command.`,htmlFor:`llm-active`,yamlKey:e.file?`llm.active`:void 0,children:(0,J.jsxs)(qt,{id:`llm-active`,value:u,onChange:t=>e.set(U(e.value,[`llm`,`active`],t.target.value||void 0)),className:`w-full`,children:[(0,J.jsxs)(`option`,{value:``,children:[`The default (`,l||`none`,`)`]}),c.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e)),u&&!c.includes(u)&&(0,J.jsxs)(`option`,{value:u,children:[u,` (not in the file)`]})]})}),(0,J.jsx)(W,{help:`Signing in adds the Copilot model and makes it the default.`,children:`Sign-ins`}),(0,J.jsx)(Pm,{onChanged:i}),(0,J.jsx)(W,{children:`Default model`}),(0,J.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Default model`,children:[c.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`No models yet. Add one to start.`}),c.map(e=>{let r=K(s[e]),i=typeof r.api_key_env==`string`&&r.auth!==`entra`?r.api_key_env:``;return(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(lm,{checked:l===e,onSelect:()=>t.set({...t.value,default:e}),label:`Make ${e} the default`}),(0,J.jsx)(pn,{icon:M,logo:Pa[String(r.provider)]}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_220px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:[Im(r.provider),r.model].filter(Boolean).map(String).join(`, `)})]}),(0,J.jsxs)(`span`,{className:`flex items-center gap-3`,children:[i&&(0,J.jsx)(cr,{name:i,vars:n}),l===e&&(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Default`})]}),(0,J.jsxs)(`span`,{className:`flex gap-2`,children:[(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Edit ${e}`,"data-tip":`Edit ${e}`,onClick:()=>o({mode:`edit`,from:e,name:e,profile:r}),children:(0,J.jsx)(ie,{"aria-hidden":`true`})}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${e}`,"data-tip":`Remove ${e}`,onClick:()=>{let n={...s};delete n[e];let r=l===e?Object.keys(n)[0]||``:l,i={...t.value,models:n};r?i.default=r:delete i.default,t.set(i)},children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]})]},e)})]}),(0,J.jsx)(`div`,{className:`pt-4`,children:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add a model`,onClick:()=>o({mode:`add`,from:``,name:``,profile:{...Lm.openai}}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})}),(0,J.jsx)(Wm,{panel:a,setPanel:o,taken:e=>e in s,onApply:e=>{let n={...e.mode===`edit`&&e.name!==e.from?xr(s,e.from,e.name):s,[e.name]:e.profile},r=!l||e.mode===`edit`&&l===e.from?e.name:l;t.set({...t.value,default:r,models:n})},vars:n})]})}var Km=[[`agent`,`Orchestrator`,`The shell, forgeqe run and forgeqe mcp.`],[`browser`,`Browser, desktop and mobile`,`Only models that take screenshots.`],[`coding`,`Writing and healing tests`,`Best model: a weaker one fails more.`],[`review`,`Reviews and judging`,``],[`analysis`,`Analysis and root cause`,`Best model.`],[`planning`,`Refining and planning`,``]],qm=[[`--profile`,`for one command`],[`The agent's own model`,`under its area below`],[`Its area's models`,`when Routing is Auto`],[`The profile in use`,`on Models`]];function Jm({id:e,label:t,names:n,picked:r,onChange:i}){let[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(``),l=(0,q.useCallback)(()=>(o(!1),c(``)),[]),u=s.toLowerCase().split(/\s+/).filter(Boolean),d=n.filter(e=>u.every(t=>e.toLowerCase().includes(t))),f=r.length===0?`Auto: any model good enough`:r.length<=2?r.join(`, `):`${r.slice(0,2).join(`, `)} and ${r.length-2} more`;return(0,J.jsxs)(`div`,{className:`relative w-full`,children:[(0,J.jsxs)(`button`,{id:e,type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a,onClick:()=>o(!a),className:`flex min-h-10 w-full cursor-pointer items-center gap-2 rounded-[8px] border border-line bg-bg px-3 text-left text-sm text-ink hover:border-line-strong`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:f}),(0,J.jsx)(R,{size:16,"aria-hidden":`true`,className:`flex-none text-muted`})]}),(0,J.jsxs)(ra,{open:a,onClose:l,label:`Models for ${t}`,role:`dialog`,side:`auto`,className:`right-0 left-0 max-h-[360px] min-w-0`,children:[n.length>6&&(0,J.jsxs)(`label`,{className:`relative mb-1 flex items-center`,children:[(0,J.jsx)(ue,{size:14,"aria-hidden":`true`,className:`pointer-events-none absolute left-2.5 text-muted`}),(0,J.jsx)(`span`,{className:`sr-only`,children:`Find a model`}),(0,J.jsx)(V,{value:s,placeholder:`Find a model`,onChange:e=>c(e.target.value),className:`h-9 pl-8 text-[13px]`,autoFocus:!0})]}),(0,J.jsxs)(`div`,{role:`group`,"aria-label":`Models for ${t}`,className:`flex flex-col`,children:[!s&&(0,J.jsx)(Xm,{checked:!r.length,onSelect:()=>i([]),hint:`any model good enough for it`,children:`Auto`}),d.map(e=>(0,J.jsx)(Xm,{checked:r.includes(e),onSelect:()=>i(r.includes(e)?r.filter(t=>t!==e):[...r,e]),children:e},e)),s&&!d.length&&(0,J.jsx)(`p`,{className:`m-0 px-3 py-2 text-[13px] text-muted`,children:`No model matches.`})]})]})]})}function Ym(e,t){let n=e.toLowerCase().startsWith(`${t.toLowerCase()}:`)?e.slice(t.length+1).trim():e;return n.charAt(0).toUpperCase()+n.slice(1)}function Xm({checked:e,onSelect:t,hint:n,children:r}){return(0,J.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":e,onClick:t,className:`flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-[8px] border-0 bg-transparent px-3 text-left text-[13.5px] text-ink hover:bg-surface-strong`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:z(`flex size-4 flex-none items-center justify-center rounded-[4px] border text-[11px]`,e?`border-accent bg-accent text-accent-ink`:`border-line-strong bg-bg`),children:e?`✓`:``}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r}),n&&(0,J.jsx)(`span`,{className:`flex-none text-[12px] text-muted`,children:n})]})}function Zm({config:e,models:t}){let n=Object.keys(K(t.value.models)),r=String(Cr(e.value,[`llm`,`routing`])??`off`),i=Cr(e.value,[`llm`,`fallback`])!==!1,a=K(Cr(e.value,[`llm`,`routes`])),o=K(Cr(e.value,[`llm`,`agents`])),s=t=>e.file?`llm.${t}`:void 0,c=e=>typeof o[e]==`string`?String(o[e]):``,[u,d]=(0,q.useState)({}),f=e=>{let t=a[e];return t===void 0||t===`auto`?[]:(Array.isArray(t)?t:[t]).map(String)},p=(t,n)=>e.set(U(e.value,[`llm`,`routes`,t],n.length?n:void 0));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{first:!0,children:`Which model a call gets`}),(0,J.jsx)(`ol`,{"aria-label":`The first that applies wins`,className:`m-0 mb-3 flex list-none flex-col gap-2 p-0 text-[13.5px]`,children:qm.map(([e,t],n)=>(0,J.jsxs)(`li`,{className:`flex items-baseline gap-3`,children:[(0,J.jsx)(`span`,{className:`flex size-6 flex-none items-center justify-center self-center rounded-full bg-surface-strong text-[12px] font-semibold tabular-nums text-ink`,children:n+1}),(0,J.jsx)(`span`,{className:`font-medium text-ink`,children:e}),(0,J.jsx)(`span`,{className:`text-ink-2`,children:t})]},e))}),(0,J.jsx)(`p`,{className:`m-0 mb-2 text-[13px] text-muted`,children:`The first that applies wins. A model with no key or a refused sign-in falls back to one that works, when Fall back is on.`}),(0,J.jsx)(G,{label:`Routing`,help:`Auto: each area gets the cheapest model good enough for it. Shadow: decides and logs only.`,htmlFor:`llm-routing`,yamlKey:s(`routing`),children:(0,J.jsxs)(qt,{id:`llm-routing`,value:r,onChange:t=>e.set(U(e.value,[`llm`,`routing`],t.target.value===`off`?void 0:t.target.value)),className:`w-full`,children:[(0,J.jsx)(`option`,{value:`off`,children:`Off: the profile in use`}),(0,J.jsx)(`option`,{value:`auto`,children:`Auto`}),(0,J.jsx)(`option`,{value:`shadow`,children:`Shadow (log only)`})]})}),(0,J.jsx)(G,{label:`Fall back`,help:`Use a working model when one has no key or its sign-in is refused, Copilot first.`,yamlKey:s(`fallback`),children:(0,J.jsx)(Rn,{checked:i,onChange:t=>e.set(U(e.value,[`llm`,`fallback`],t?void 0:!1)),label:`Fall back to a working model`})}),(0,J.jsx)(W,{help:r===`off`?`Routing is off: an area's models apply once it is Auto. An agent's own model applies always.`:`Auto: any model good enough. One model picked pins the area to it.`,children:`Areas of work`}),n.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-4 text-sm text-muted`,children:`Add models under Models first.`}),n.length>0&&Km.map(([t,r,i])=>{let a=f(t),o=a.filter(e=>!n.includes(e)),m=Mm.filter(e=>e.area===t),h=m.filter(e=>c(e.name)).length,g=u[t]??h>0;return(0,J.jsxs)(`div`,{className:`border-t border-line-soft`,children:[(0,J.jsx)(G,{label:r,help:o.length?(0,J.jsxs)(`span`,{className:`text-fail`,children:[`Not in the models file: `,o.join(`, `)]}):i||void 0,yamlKey:s(`routes.${t}`),className:`border-t-0`,children:(0,J.jsx)(`div`,{className:`flex w-full flex-wrap items-center gap-2 sm:w-[340px] sm:flex-none sm:justify-end`,children:(0,J.jsx)(Jm,{id:`llm-route-${t}`,label:r,names:n,picked:a,onChange:e=>p(t,e)})})}),(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":g,onClick:()=>d({...u,[t]:!g}),className:`-mt-2 mb-2 inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[8px] border-0 bg-transparent px-2 text-[13px] text-ink-2 hover:bg-surface-muted hover:text-ink`,children:[(0,J.jsx)(l,{size:14,"aria-hidden":`true`,className:z(`transition-transform`,g&&`rotate-90`)}),(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center -space-x-1`,children:m.slice(0,5).map(e=>(0,J.jsx)(Qn,{agent:e.name,px:18,decorative:!0,className:`rounded-[5px] ring-2 ring-bg`},e.name))}),m.length,` `,m.length===1?`agent`:`agents`,h>0&&(0,J.jsxs)(`span`,{className:`text-muted`,children:[`· `,h,` with `,h===1?`its`:`their`,` own model`]})]}),(0,J.jsx)(dn,{open:g,children:(0,J.jsx)(`ul`,{className:`m-0 mb-3 flex list-none flex-col p-0 pl-6`,children:m.map(t=>{let r=c(t.name),i=`llm-agent-${t.name}`;return(0,J.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-10 gap-y-1.5 py-1.5`,children:[(0,J.jsxs)(`label`,{htmlFor:i,"data-tip":s(`agents.${t.name}`),className:`flex min-w-0 flex-[1_1_220px] items-start gap-2.5 text-[13.5px] text-ink`,children:[(0,J.jsx)(Qn,{agent:t.name,px:22,decorative:!0,className:`mt-0.5`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:Mn(t.name).name}),(0,J.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:Ym(t.label,Mn(t.name).name)}),r&&!n.includes(r)&&(0,J.jsxs)(`span`,{className:`block text-[12.5px] text-fail`,children:[`Not in the models file: `,r]})]})]}),(0,J.jsx)(`div`,{className:`flex w-full flex-wrap items-center gap-2 sm:w-[340px] sm:flex-none sm:justify-end`,children:(0,J.jsxs)(qt,{id:i,value:r,onChange:n=>e.set(U(e.value,[`llm`,`agents`,t.name],n.target.value||void 0)),className:`w-full`,children:[(0,J.jsx)(`option`,{value:``,children:`The area's model`}),n.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e)),r&&!n.includes(r)&&(0,J.jsxs)(`option`,{value:r,children:[r,` (not in the file)`]})]})})]},t.name)})})})]},t)})]})}var Qm=(...e)=>e.map(([e,t])=>({value:e,label:t})),$m=[{title:`Where runs happen`,base:[`browser`],fields:[{key:`provider`,label:`Browser`,help:`Where the browser agent runs. Remote grids need their sign-in under Integrations.`,type:`select`,default:`local`,options:Qm([`local`,`Chrome on this machine`],[`docker`,`Chrome in Docker`],[`browserstack`,`BrowserStack`],[`testmu`,`TestMu AI (LambdaTest)`])},{key:`local_browser`,label:`Local browser`,help:`Automatic tries Chrome first, then Edge, then Playwright's Chromium, each when the one before does not start.`,type:`select`,default:`auto`,options:Qm([`auto`,`Automatic`],[`chrome`,`Google Chrome`],[`edge`,`Microsoft Edge`],[`chromium`,`Playwright's Chromium`]),when:e=>!e.provider||e.provider===`local`},{key:`launch`,label:`How it starts`,help:`Automatic starts the browser directly, then through Playwright when this computer stops it, and remembers what worked.`,type:`select`,default:`auto`,options:Qm([`auto`,`Automatic`],[`direct`,`Directly`],[`playwright`,`Through Playwright`],[`attach`,`Connect to a browser I started`]),when:e=>!e.provider||e.provider===`local`},{key:`attach_port`,label:`Port of your browser`,help:`Start it with --remote-debugging-port and this number. Only on this computer.`,type:`number`,placeholder:`9222`,when:e=>(!e.provider||e.provider===`local`)&&e.launch===`attach`},{key:`start_url`,label:`Start page`,help:`Leave empty to let the agent choose, or to start at the active environment's app.`,type:`url`,placeholder:`https://staging.example.com`},{key:`allowed_hosts`,label:`Allowed sites`,help:`Hosts the agent may open, comma separated. Empty: the environment's apps.`,type:`list`,placeholder:`staging.example.com, auth.example.com`}]},{title:`The browser window`,base:[`browser`],fields:[{key:`headless`,label:`Run without a window`,help:`Off shows the browser while the agent works.`,type:`switch`,default:!0},{key:`window`,label:`Visible window`,type:`select`,default:`maximized`,options:Qm([`maximized`,`Maximized`],[`viewport`,`The size below`])},{key:`viewport.width`,label:`Page width`,type:`number`,default:1280},{key:`viewport.height`,label:`Page height`,type:`number`,default:800},{key:`overlay`,label:`Show what the agent does`,help:`In a visible browser: a bar with the current step, and your mouse and keyboard locked while it works.`,type:`switch`,default:!0}]},{title:`Limits and checks`,base:[`browser`],fields:[{key:`max_steps`,label:`Steps before a checkpoint`,help:`A run still making progress carries on, up to three times this.`,type:`number`,default:40},{key:`timeout_seconds`,label:`Time limit per run`,help:`In seconds.`,type:`number`,default:600},{key:`vision_detail`,label:`Screenshot detail`,help:`High reads small text better and costs more.`,type:`select`,default:`low`,options:Qm([`low`,`Low`],[`high`,`High`])},{key:`video`,label:`Record a video`,type:`switch`,default:!0},{key:`judge`,label:`Second check of each result`,help:`Another model call checks each finished run against its goal, and can fail it.`,type:`switch`,default:!1},{key:`rulebook`,label:`Learn rules per site`,help:`One-line rules the agent keeps after it recovers from a failed action.`,type:`switch`,default:!0}]},{title:`Remote browser, set here`,help:`For BrowserStack or TestMu AI set inline in forgeqe.yaml. These win over the grid's own file under Integrations when both are set.`,base:[`browser`,`remote`],fields:[{key:`browser`,label:`Browser`,type:`text`,placeholder:`chrome`},{key:`browser_version`,label:`Browser version`,type:`text`,placeholder:`latest`},{key:`os`,label:`Operating system`,help:`BrowserStack: Windows or OS X.`,type:`text`,placeholder:`Windows`},{key:`os_version`,label:`Its version`,type:`text`,placeholder:`11, or Sequoia`},{key:`platform`,label:`Platform`,help:`TestMu AI; or set the two above and ForgeQE joins them.`,type:`text`,placeholder:`Windows 11`},{key:`username_env`,label:`User name`,type:`var`,placeholder:`BROWSERSTACK_USERNAME`},{key:`access_key_env`,label:`Access key`,type:`var`,placeholder:`BROWSERSTACK_ACCESS_KEY`},{key:`project`,label:`Project`,type:`text`,placeholder:`ForgeQE`},{key:`build`,label:`Build`,type:`text`,placeholder:`nightly`},{key:`name`,label:`Session name`,type:`text`,placeholder:`checkout smoke`},{key:`local`,label:`Through a tunnel`,help:`BrowserStack Local or the LambdaTest tunnel, for sites only your network reaches.`,type:`switch`,default:!1},{key:`extra`,label:`More capabilities`,help:`The provider's own, one per line.`,type:`kv`,placeholder:`browserstack.console = errors`}]}],eh=[{title:`Where tests go`,base:[`code`],fields:[{key:`repo`,label:`Repository`,help:`Where passed runs become tests. Empty: this folder.`,type:`path`,placeholder:`../my-app`},{key:`test_command`,label:`Test command`,help:`Empty: the agent finds it.`,type:`path`,placeholder:`npx playwright test`},{key:`model`,label:`Model`,help:`Empty: the default model.`,type:`text`,placeholder:`anthropic/claude-sonnet-4-5`},{key:`review_profile`,label:`Reviewer's model`,help:`A profile from Models. The reviewer only reads and judges, so a cheaper one is enough.`,type:`text`},{key:`runtime`,label:`Agent runtime`,help:`Empty: the runtime ForgeQE downloads.`,type:`path`,placeholder:`/path/to/agent-runtime`}]},{title:`How hard it tries`,base:[`code`],fields:[{key:`max_attempts`,label:`Attempts`,help:`Test runs before it gives up, and healing attempts.`,type:`number`,default:3},{key:`test_timeout_seconds`,label:`Time limit per test run`,help:`In seconds.`,type:`number`,default:600},{key:`confirm_runs`,label:`Passes in a row before a test counts`,help:`A new test is run again until it has passed this many times in a row, to catch a flaky test. 1 runs it once.`,type:`number`,default:3},{key:`stall_after`,label:`Stop after repeated failures`,help:`When one command has failed this many times.`,type:`number`,default:5},{key:`repeat_after`,label:`Stop after repeated look-ups`,help:`When the coding agent has re-read files or state it already saw, unchanged, this many times; it is then asked for its test.`,type:`number`,default:6},{key:`edit_after`,label:`Stop after repeated edits`,help:`When the coding agent has changed files it already changed this many times without handing its test over to be run.`,type:`number`,default:8},{key:`max_tokens`,label:`Token limit per job`,help:`Cached input counts at its share of the input price. 0 turns the limit off.`,type:`number`,default:15e5}]},{title:`Help it gets`,base:[`code`],fields:[{key:`replay`,label:`Replay the steps first`,help:`Runs the steps as a Playwright script and hands over what worked.`,type:`switch`,default:!0},{key:`live_browser`,label:`Look at the failing page`,help:`Once a step fails, the agent looks at that page in a browser.`,type:`switch`,default:!0},{key:`graph`,label:`Read the repository's code`,help:`Links the run's elements to the page objects that already locate them.`,type:`switch`,default:!0},{key:`duplicates`,label:`Check for copied code`,help:`Tells the reviewer which code a new test or a pull request copied from the repository (jscpd).`,type:`switch`,default:!0},{key:`header`,label:`Mark generated files`,help:`Files ForgeQE creates start with a “Generated with ForgeQE” line.`,type:`switch`,default:!0},{key:`rulebook`,label:`Learn from its own mistakes`,type:`switch`,default:!0}]}],th=[{title:`Reports`,base:[],fields:[{key:`export.out_dir`,label:`Report folder`,help:`One folder per run.`,type:`path`,default:`./.forgeqe/reports`},{key:`export.format`,label:`Test format`,type:`select`,default:`playwright`,options:Qm([`playwright`,`Playwright`])},{key:`report.screenshots`,label:`Screenshots in reports`,type:`select`,default:`all`,options:Qm([`all`,`Every step`],[`failures`,`Failures only`],[`off`,`None`])},{key:`report.accessibility`,label:`Check accessibility of each page`,type:`switch`,default:!0},{key:`suite.out_dir`,label:`Suite report folder`,type:`path`,default:`./.forgeqe/reports/suites`}]},{title:`Memory and replays`,base:[],fields:[{key:`memory.enabled`,label:`Remember pages and flows`,type:`switch`,default:!0},{key:`memory.dir`,label:`Memory folder`,type:`path`,default:`./.forgeqe/memory`},{key:`memory.replay`,label:`Replays`,help:`Verify checks each recorded step; trust replays without a model.`,type:`select`,default:`verify`,options:Qm([`verify`,`Verify`],[`trust`,`Trust`],[`off`,`Off`])},{key:`registry.mode`,label:`Replay passed runs for free`,help:`Running a passed test again repeats its saved steps without the AI; if the page changed, the AI takes over. Test mode only notes what it would have replayed.`,type:`select`,default:`on`,options:Qm([`on`,`On`],[`shadow`,`Test mode: only note it`],[`off`,`Off`])}]},{title:`Suites`,base:[],fields:[{key:`suite.code`,label:`Write tests for passed cases`,help:`With a repository set under Code.`,type:`switch`,default:!0},{key:`suite.restore_sessions`,label:`Start each case signed in`,help:`Cases start from the saved logins' sessions. Off runs each case as its test starts, signed out.`,type:`switch`,default:!1},{key:`suite.case_check`,label:`Before a run, check the cases`,help:`Warn shows what the check found and runs every case; block leaves out the ones that cannot run as written.`,type:`select`,default:`warn`,options:Qm([`warn`,`Warn`],[`block`,`Block`],[`off`,`Off`])}]},{title:`Flaky tests`,help:`A test that fails and then passes is flaky; quarantine keeps it running, but its failures stop failing the run and CI.`,base:[`flaky`],fields:[{key:`retries`,label:`Runs again in the same run`,help:`0 to 3.`,type:`number`,default:1},{key:`quarantine`,label:`Quarantine`,type:`select`,default:`suggest`,options:Qm([`suggest`,`The agent asks first`],[`auto`,`ForgeQE does it`],[`off`,`Off: history only`])},{key:`flaky_after`,label:`Flaky from this score`,type:`number`,default:2}]},{title:`Release readiness`,help:`When a release reads GO, GO WITH RISKS or NO-GO.`,base:[`release`],fields:[{key:`max_critical`,label:`Open critical bugs allowed`,type:`number`,default:0},{key:`max_high`,label:`Open high bugs allowed`,type:`number`,default:0},{key:`min_pass_rate`,label:`Pass rate needed`,help:`Percent of executed test cases.`,type:`number`,default:95},{key:`require_tests`,label:`A story needs a test case`,help:`Without one it is a risk.`,type:`switch`,default:!0}]},{title:`Regression packs in a pipeline`,help:`Where Run in the pipeline sends a pack (forgeqe pack run --on pipeline).`,base:[`packs`,`pipeline`],fields:[{key:`default`,label:`Pipeline`,type:`select`,options:Qm([`github`,`GitHub Actions`],[`azure_devops`,`Azure Pipelines`])},{key:`github.repo`,label:`GitHub repository`,type:`text`,placeholder:`acme/shop-tests`},{key:`github.workflow`,label:`Workflow file`,type:`text`,default:`forgeqe-pack.yml`},{key:`github.ref`,label:`Branch`,type:`text`,default:`main`},{key:`azure_devops.project`,label:`Azure DevOps project`,type:`text`,placeholder:`Shop`},{key:`azure_devops.pipeline_id`,label:`Pipeline id`,type:`number`,placeholder:`42`},{key:`azure_devops.ref`,label:`Branch`,type:`text`,default:`refs/heads/main`},{key:`timeout_minutes`,label:`Wait for it`,help:`In minutes.`,type:`number`,default:60}]},{title:`Defect analysis`,help:`For a failed case that is a defect: a repro, suspect commits in the product's repository, and a root-cause hypothesis.`,base:[`defects`],fields:[{key:`product_repo`,label:`Product repository`,help:`The application's code: suspect commits, and what the analysis reads.`,type:`path`,placeholder:`../shop`},{key:`reproduce`,label:`Run a new defect's case once more`,help:`To see whether it repeats.`,type:`switch`,default:!0},{key:`analyze`,label:`Write a root-cause hypothesis`,help:`One model session per new defect or regression.`,type:`switch`,default:!0},{key:`max_analyses`,label:`Analyses per suite`,type:`number`,default:3}]}],nh=[{title:`Accessibility`,base:[`quality`],fields:[{key:`accessibility.standard`,label:`Standard`,type:`select`,default:`wcag21aa`,options:Qm([`wcag2a`,`WCAG 2.0 A`],[`wcag21aa`,`WCAG 2.1 AA`],[`wcag22aa`,`WCAG 2.2 AA`],[`wcag21aaa`,`WCAG 2.1 AAA`],[`section508`,`Section 508`],[`en301549`,`EN 301 549`],[`best-practice`,`Best practice`])},{key:`accessibility.ask_before_run`,label:`Ask before running a persona session`,help:`The Accessibility agent shows its plan and asks before it starts the browser runs, a few minutes and model tokens each. Off: it runs the plan straight away.`,type:`switch`,default:!0},{key:`budgets.accessibility.critical`,label:`Critical issues allowed`,help:`Empty: reported, never failed on.`,type:`number`},{key:`budgets.accessibility.serious`,label:`Serious issues allowed`,type:`number`},{key:`budgets.accessibility.ignore`,label:`Rules to ignore`,type:`list`,placeholder:`region`}]},{title:`Performance and visual changes`,base:[`quality`],fields:[{key:`budgets.performance`,label:`Performance budget`,help:`web-vitals uses Google's thresholds. Per-page budgets are edited in Settings as text.`,type:`select`,options:Qm([`web-vitals`,`Core Web Vitals`])},{key:`budgets.visual`,label:`Visual change allowed`,help:`Percent of a page's pixels.`,type:`number`},{key:`visual.full_page`,label:`Compare whole pages`,type:`switch`,default:!1},{key:`visual.mask`,label:`Hide before comparing`,help:`CSS selectors, comma separated.`,type:`list`,placeholder:`.clock, #ad-slot`}]},{title:`API tests`,base:[`api`],fields:[{key:`capture`,label:`Record the app's API calls`,help:`In every browser run, with secrets redacted.`,type:`switch`,default:!0},{key:`base_url`,label:`API address`,type:`url`,placeholder:`https://staging.shop.example`},{key:`third_party`,label:`Keep calls to other sites`,type:`switch`,default:!1},{key:`timeout_seconds`,label:`Time limit per call`,help:`In seconds.`,type:`number`,default:30},{key:`headers`,label:`Headers on every call`,help:"Values are ${NAME} references to environment variables, never the values.",type:`kv`,placeholder:"Authorization = Bearer ${API_TOKEN}"}]},{title:`API sign-in with OAuth2`,base:[`api`,`oauth2`],fields:[{key:`token_url`,label:`Token address`,help:`https only. ForgeQE asks it for a token with the client-credentials grant and sends it as a bearer token.`,type:`url`,placeholder:`https://login.shop.example/oauth2/token`},{key:`client_id_env`,label:`Client id`,type:`var`,placeholder:`SHOP_API_CLIENT_ID`},{key:`client_secret_env`,label:`Client secret`,type:`var`,placeholder:`SHOP_API_CLIENT_SECRET`},{key:`scope`,label:`Scope`,help:`Space separated.`,type:`text`,placeholder:`orders.read orders.write`},{key:`audience`,label:`Audience`,help:`When the provider asks for one.`,type:`text`,placeholder:`https://api.shop.example`}]},{title:`API load testing`,base:[`api`,`load`],fields:[{key:`users`,label:`Virtual users`,help:`1 to 50.`,type:`number`,placeholder:`10`},{key:`duration_seconds`,label:`Duration`,help:`In seconds, up to 600.`,type:`number`,placeholder:`60`},{key:`limits.p95_ms`,label:`p95 latency limit`,help:`Milliseconds. Broken: the run fails.`,type:`number`,placeholder:`800`},{key:`limits.p99_ms`,label:`p99 latency limit`,help:`Milliseconds.`,type:`number`,placeholder:`1500`},{key:`limits.error_rate`,label:`Error rate limit`,help:`0 to 1.`,type:`number`,placeholder:`0.01`},{key:`limits.min_rps`,label:`Throughput floor`,help:`Calls per second.`,type:`number`,placeholder:`20`}]},{title:`API client certificate (mutual TLS)`,base:[`api`,`tls`],fields:[{key:`cert`,label:`Certificate`,help:`A PEM file.`,type:`path`,placeholder:`~/.certs/shop-client.pem`},{key:`key`,label:`Private key`,help:`A PEM file kept out of the repository.`,type:`path`,placeholder:`~/.certs/shop-client-key.pem`},{key:`ca`,label:`Authorities trusted`,help:`A PEM file, for an API with its own certificate authority.`,type:`path`,placeholder:`~/.certs/shop-ca.pem`},{key:`key_passphrase_env`,label:`Key passphrase`,type:`var`,placeholder:`SHOP_API_KEY_PASSPHRASE`}]}],rh=[{title:`Search service`,base:[`rag`],fields:[{key:`url`,label:`Address`,help:`ForgeQE sends POST {query, top_k} and reads the passages it answers.`,type:`url`,placeholder:`https://search.acme.example/search`},{key:`token_env`,label:`Token`,help:`Sent as a bearer token to that address only.`,type:`var`,placeholder:`RAG_TOKEN`},{key:`mcp.server`,label:`MCP server`,help:`Its name under MCP servers.`,type:`text`,placeholder:`docs`},{key:`mcp.tool`,label:`Its search tool`,type:`text`,placeholder:`search`},{key:`mcp.query_arg`,label:`The tool's query argument`,type:`text`,default:`query`},{key:`mcp.top_k_arg`,label:`The tool's argument for how many`,help:`Empty: the tool decides.`,type:`text`,placeholder:`limit`},{key:`command`,label:`Command`,help:`Gets {query, top_k} on stdin and prints passages. Comma separated.`,type:`list`,placeholder:`python, rag/search.py`},{key:`top_k`,label:`Passages per search`,type:`number`,default:5},{key:`timeout_seconds`,label:`Time limit`,help:`In seconds.`,type:`number`,default:20}]}],ih=[{title:`The product`,help:`Agents design and judge tests as an expert in this industry, and add the obligations of each regulation a feature touches.`,base:[],fields:[{key:`product.name`,label:`Product name`,type:`text`,placeholder:`Shop`},{key:`domain.industry`,label:`Industry`,type:`text`,placeholder:`retail banking`},{key:`domain.regulations`,label:`Regulations`,type:`list`,placeholder:`DORA, PSD2, GDPR`},{key:`domain.notes`,label:`Notes`,type:`textarea`,placeholder:`Payments to UK and EU accounts; customers are consumers and small businesses.`}]},{title:`Where the knowledge is kept`,help:`The product graph forgeqe knowledge build writes, and how much of it a browser run gets. Page memory is under Reports and memory.`,base:[`knowledge`],fields:[{key:`dir`,label:`Product knowledge folder`,type:`path`,default:`.forgeqe/knowledge`},{key:`browser_max_chars`,label:`Knowledge per browser run`,help:`Characters. 0: none.`,type:`number`,default:1500}]},{title:`The team's knowledge`,help:`Where the pipeline publishes the built product knowledge (forgeqe knowledge pipeline init). forgeqe knowledge pull brings it here: no repository needs to be cloned. One of a git branch, a link, or a file.`,base:[`product`,`shared`],fields:[{key:`git`,label:`Repository`,help:`The repository the pipeline publishes to.`,type:`text`,placeholder:`https://dev.azure.com/acme/Shop/_git/qa`},{key:`branch`,label:`Branch`,type:`text`,placeholder:`forgeqe-knowledge`},{key:`file`,label:`Pack in it`,type:`text`,placeholder:`shop.knowledge.forgeqe`},{key:`url`,label:`Or a link`,help:`https; a token goes to that host only.`,type:`url`,placeholder:`https://files.acme.local/shop.knowledge.forgeqe`},{key:`path`,label:`Or a file`,help:`On this computer or a shared folder.`,type:`path`,placeholder:`//share/qa/shop.knowledge.forgeqe`},{key:`token_env`,label:`Token`,help:`With the repository or the link. Empty: git's own sign-in.`,type:`var`,placeholder:`ADO_PAT`},{key:`user`,label:`User name for the token`,help:`Only when the server needs one.`,type:`text`}]}],ah=[{title:`Building the graph`,help:`forgeqe knowledge build reads the repositories and documents into one graph the agents search: services, endpoints, tables, tests, and how they connect.`,base:[`product`],fields:[{key:`exclude`,label:`Files to leave out`,help:`Glob patterns, comma separated, beside each repository's .gitignore and .forgeqeignore.`,type:`list`,placeholder:`**/generated/**`},{key:`model`,label:`Understand the code with the model`,help:`Off: structure only; nothing is sent to a model.`,type:`switch`,default:!0},{key:`max_model_files`,label:`Files the model reads per build`,help:`0: none. Only new and changed files are read again.`,type:`number`,default:400},{key:`max_investigation_steps`,label:`Steps per question`,help:`5 to 200. Most tool calls one question to the product makes; at the limit it answers with what it found.`,type:`number`,placeholder:`40`}]}],oh=[...rh,...ih,...ah],sh=[{key:`host`,label:`Host`,type:`select`,options:Qm([`github`,`GitHub`],[`azure-devops`,`Azure DevOps`],[`gitlab`,`GitLab`],[`bitbucket-cloud`,`Bitbucket Cloud`],[`bitbucket-server`,`Bitbucket Data Center`])},{key:`url`,label:`Address`,help:`A server of your own (GitHub Enterprise, GitLab, Azure DevOps Server, Bitbucket Data Center). Empty: the host's cloud.`,type:`url`,placeholder:`https://git.acme.example`},{key:`org`,label:`Organization`,help:`Azure DevOps' organization; a Bitbucket Cloud workspace.`,type:`text`,placeholder:`acme`},{key:`auth`,label:`Sign in`,type:`select`,options:Qm([`browser`,`In the browser`],[`token`,`With a token`])},{key:`token_env`,label:`Token`,type:`var`,placeholder:`GITHUB_TOKEN`},{key:`user`,label:`User name for the token`,help:`Bitbucket only, with an app password.`,type:`text`}],ch=[{title:`Instructions and knowledge`,base:[],fields:[{key:`prompts.step_instruction`,label:`Extra instruction for the browser agent`,type:`textarea`},{key:`prompts.dir`,label:`Shared prompts folder`,help:`Wins over .forgeqe/prompts.`,type:`path`,placeholder:`../shared-prompts`},{key:`guardrails.dir`,label:`Guardrails folder`,type:`path`,default:`.forgeqe/guardrails`},{key:`prompts.guiderails`,label:`Guardrails kept in forgeqe.yaml`,help:`The older way: one rule per line. Prefer Guardrails.`,type:`textarea`}]},{title:`Custom agents`,help:`The team's agents for one job each (Agents, Custom agents). Off: none of them runs, from the terminal, this app, the Orchestrator or a schedule; their files and history are kept.`,base:[`custom_agents`],fields:[{key:`enabled`,label:`Custom agents on`,help:`Off: none runs, and their scheduled runs do not start.`,type:`switch`,default:!0}]},{title:`Capabilities`,help:`The agent gets the tools a request is about. Pin some on, or turn some off for this project (forgeqe features lists them).`,base:[`agent`,`capabilities`],fields:[{key:`always`,label:`Always given`,type:`list`,placeholder:`regression-packs`},{key:`off`,label:`Never given`,type:`list`,placeholder:`desktop-apps`}]}],lh=[{id:`jira`,icon:rt,name:`Jira`,note:`Test cases, results and bugs`,base:[`sources`,`jira`],vars:[`email_env`,`token_env`],fields:[{key:`url`,label:`Site`,type:`url`,placeholder:`https://acme.atlassian.net`},{key:`email_env`,label:`Email variable`,help:`Cloud only.`,type:`var`,default:`JIRA_EMAIL`},{key:`token_env`,label:`Token variable`,type:`var`,default:`JIRA_API_TOKEN`},{key:`mcp`,label:`MCP server`,type:`select`,default:`mcp-atlassian`,options:Qm([`mcp-atlassian`,`mcp-atlassian (Cloud and Server)`],[`rovo`,`Rovo (Atlassian's, Cloud)`],[`false`,`None`])},{key:`test_cases`,label:`Where existing test cases are`,help:`One line per story project: the Jira project key (or * for the rest) = project=, label=, component=, type=, separated by ;. Saving cases reads only there (at most 300) to reuse or extend one.`,type:`kv`,placeholder:`SHOP = label=regression; component=Checkout
|
|
60
|
+
* = project=QA`},{key:`sibling_cases`,label:`Also compare with the epic's other stories`,help:`The tests of the other stories under the story's epic (Jira Cloud parent; the first 30 stories).`,type:`switch`,default:!1},{key:`new_cases.priority`,label:`Priority of new test cases`,help:`A priority name. The agent may give a case its own.`,type:`text`,placeholder:`Medium`},{key:`new_cases.tags`,label:`Labels on new test cases`,help:`No spaces. Added to the case's own.`,type:`list`,placeholder:`forgeqe`},{key:`retire_label`,label:`Label of a retired test case`,help:`What retire_test_case adds; nothing is deleted.`,type:`text`,default:`obsolete`}]},{id:`azure_devops`,icon:N,name:`Azure DevOps`,note:`Test plans, work items and wiki`,base:[`sources`,`azure_devops`],vars:[`token_env`],fields:[{key:`org_url`,label:`Organization`,type:`url`,placeholder:`https://dev.azure.com/acme`},{key:`project`,label:`Project`,help:`Empty: every project.`,type:`text`,placeholder:`Shop`},{key:`token_env`,label:`Token variable`,help:`A PAT with Test Management and Work Items, read and write.`,type:`var`,default:`ADO_PAT`},{key:`mcp`,label:`Use Microsoft's MCP server`,type:`switch`,default:!0},{key:`mcp_domains`,label:`MCP tool groups`,type:`list`,placeholder:`core, work, work-items, pipelines`},{key:`test_cases`,label:`Where existing test cases are`,help:`One line per story area path (or * for the rest) = plan=12, plan=12/suite=34, or area=<area path>. Saving cases reads only there (at most 300) to reuse or extend one.`,type:`kv`,placeholder:`Shop\\Checkout = plan=12/suite=34
|
|
61
|
+
* = area=Shop\\Regression`},{key:`sibling_cases`,label:`Also compare with the feature's other stories`,help:`The cases of the other stories under the story's feature or epic (the first 30 stories).`,type:`switch`,default:!1},{key:`new_cases.priority`,label:`Priority of new test cases`,help:`1 (highest) to 4. The agent may give a case its own.`,type:`number`,placeholder:`2`},{key:`new_cases.tags`,label:`Tags on new test cases`,help:`Added to the case's own.`,type:`list`,placeholder:`forgeqe`},{key:`new_cases.state`,label:`State of new test cases`,help:`For example Design, so a person reviews a case before it is Ready.`,type:`text`,placeholder:`Design`},{key:`retire_state`,label:`State of a retired test case`,help:`What retire_test_case sets; nothing is deleted.`,type:`text`,default:`Closed`},{key:`shared_steps`,label:`Shared steps to use`,help:`Shared Steps work item ids. New cases refer to them instead of copying their steps.`,type:`list`,placeholder:`345, 346`}]},{id:`xray`,icon:ft,name:`Xray`,note:`Test cases in Jira, through Xray Cloud`,base:[`sources`,`xray`],vars:[`client_id_env`,`client_secret_env`],fields:[{key:`url`,label:`Address`,type:`url`,default:`https://xray.cloud.getxray.app`},{key:`client_id_env`,label:`Client id variable`,type:`var`,default:`XRAY_CLIENT_ID`},{key:`client_secret_env`,label:`Client secret variable`,type:`var`,default:`XRAY_CLIENT_SECRET`},{key:`save_steps`,label:`Save cases as Xray tests`,help:`Cases saved from a Jira story become Xray tests with their steps in Xray.`,type:`switch`,default:!1}]},{id:`confluence`,icon:Ke,name:`Confluence`,note:`Requirements pages`,base:[`sources`,`confluence`],vars:[`email_env`,`token_env`],fields:[{key:`url`,label:`Site`,help:`Empty: the Jira site, same account.`,type:`url`,placeholder:`https://acme.atlassian.net/wiki`},{key:`email_env`,label:`Email variable`,type:`var`,default:`CONFLUENCE_EMAIL`},{key:`token_env`,label:`Token variable`,type:`var`,default:`CONFLUENCE_TOKEN`},{key:`space`,label:`Space`,help:`Search this space only.`,type:`text`,placeholder:`QA`}]},{id:`testrail`,icon:t,name:`TestRail`,note:`Test cases and results`,base:[`sources`,`testrail`],vars:[`email_env`,`token_env`],fields:[{key:`url`,label:`Site`,type:`url`,placeholder:`https://acme.testrail.io`},{key:`email_env`,label:`Email variable`,type:`var`,default:`TESTRAIL_EMAIL`},{key:`token_env`,label:`API key variable`,type:`var`,default:`TESTRAIL_API_KEY`},{key:`project_id`,label:`Project id`,type:`number`},{key:`section_id`,label:`Section for new test cases`,help:`Where cases written from a story are saved, with the story in refs.`,type:`number`},{key:`template_id`,label:`Template of new test cases`,help:`2 is Test Case (Steps).`,type:`number`,default:2},{key:`retired_section_id`,label:`Section for retired test cases`,help:`Retiring a case moves it here; TestRail has no retired state.`,type:`number`},{key:`automation_field`,label:`Automation field`,help:`Your custom field a passing test marks, e.g. custom_automation_type.`,type:`text`,placeholder:`custom_automation_type`},{key:`automation_value`,label:`Automation value`,help:`What the field is set to.`,type:`text`,placeholder:`2`}]},{id:`zephyr`,icon:pt,name:`Zephyr Scale`,note:`Test cases and results`,base:[`sources`,`zephyr`],vars:[`token_env`],fields:[{key:`token_env`,label:`Token variable`,type:`var`,default:`ZEPHYR_API_TOKEN`},{key:`project_key`,label:`Project key`,type:`text`,placeholder:`SHOP`},{key:`folder_id`,label:`Folder for new test cases`,help:`Where cases written from a story are saved, and where ForgeQE looks for ones to reuse.`,type:`number`},{key:`retire_status`,label:`Status of a retired test case`,help:`What retire_test_case sets.`,type:`text`,default:`Deprecated`}]},{id:`qtest`,icon:et,name:`qTest`,note:`Test cases and results`,base:[`sources`,`qtest`],vars:[`token_env`],fields:[{key:`url`,label:`Site`,type:`url`,placeholder:`https://acme.qtestnet.com`},{key:`token_env`,label:`Token variable`,type:`var`,default:`QTEST_TOKEN`},{key:`project_id`,label:`Project id`,type:`number`},{key:`statuses`,label:`Status names`,help:`Your qTest's automation status for each result, one per line.`,type:`kv`,placeholder:`passed = PASS
|
|
62
|
+
failed = FAIL
|
|
63
|
+
error = BLOCKED`},{key:`module_id`,label:`Module for new test cases`,help:`Where cases written from a requirement are saved, linked to it.`,type:`number`}]},{id:`github`,icon:d,name:`GitHub`,note:`Issues as test cases, bugs, pull requests`,base:[`sources`,`github`],vars:[`token_env`],fields:[{key:`repo`,label:`Repository`,type:`text`,placeholder:`acme/shop`},{key:`token_env`,label:`Token variable`,help:`Without it, the GitHub CLI's sign-in.`,type:`var`,default:`GITHUB_TOKEN`},{key:`toolsets`,label:`MCP tool groups`,type:`list`,placeholder:`repos, issues, pull_requests, actions`}]},{id:`gitlab`,icon:Le,name:`GitLab`,note:`Issues, merge requests and pipelines`,group:`tools`,base:[`integrations`,`gitlab`],vars:[`token_env`],fields:[{key:`url`,label:`Address`,help:`GitLab.com or your own GitLab.`,type:`url`,default:`https://gitlab.com`},{key:`token_env`,label:`Token variable`,help:`A fine-grained personal access token with the MCP permission.`,type:`var`,default:`GITLAB_TOKEN`},{key:`toolsets`,label:`MCP tool groups`,help:`Empty: all of them.`,type:`list`,placeholder:`core, work_items`}]},{id:`browserstack_mcp`,icon:Be,logo:`browserstack`,name:`BrowserStack tools`,note:`Sessions, accessibility and test management`,group:`tools`,base:[`integrations`,`browserstack`],vars:[`username_env`,`access_key_env`],fields:[{key:`username_env`,label:`User name variable`,type:`var`,default:`BROWSERSTACK_USERNAME`},{key:`access_key_env`,label:`Access key variable`,type:`var`,default:`BROWSERSTACK_ACCESS_KEY`}]},{id:`postman`,icon:se,name:`Postman`,note:`Collections, environments and mocks`,group:`tools`,base:[`integrations`,`postman`],vars:[`api_key_env`],fields:[{key:`api_key_env`,label:`API key variable`,type:`var`,default:`POSTMAN_API_KEY`},{key:`region`,label:`Region`,type:`select`,default:`us`,options:Qm([`us`,`US`],[`eu`,`EU`])},{key:`tools`,label:`Tools`,type:`select`,default:`full`,options:Qm([`full`,`Full`],[`minimal`,`Minimal`],[`code`,`Code`])}]},{id:`azure`,icon:le,name:`Azure`,note:`Azure resources, as az login's account`,untestable:!0,group:`tools`,base:[`integrations`,`azure`],vars:[],fields:[{key:`namespaces`,label:`MCP tool groups`,help:`Empty: all of them.`,type:`list`,placeholder:`storage, keyvault`},{key:`read_only`,label:`Read only`,help:`Off: its tools that change resources too.`,type:`switch`,default:!0}]},{id:`aws`,icon:le,name:`AWS`,note:`AWS resources, as this computer's AWS sign-in`,untestable:!0,group:`tools`,base:[`integrations`,`aws`],vars:[],fields:[{key:`read_only`,label:`Read only`,help:`Off: its tools that may change resources too.`,type:`switch`,default:!0},{key:`profile`,label:`Profile`,help:`Empty: the profile of the environment in use, else this computer's default AWS sign-in.`,type:`text`,placeholder:`shop-qa`},{key:`region`,label:`Region`,help:`Empty: the region of the environment in use.`,type:`text`,placeholder:`eu-west-1`},{key:`endpoint_region`,label:`Server region`,help:`The region of the AWS MCP Server's address.`,type:`text`,default:`us-east-1`}]},{id:`gcp`,icon:le,name:`Google Cloud`,note:`Google Cloud resources, as gcloud's account`,untestable:!0,group:`tools`,base:[`integrations`,`gcp`],vars:[],fields:[{key:`project`,label:`Project`,help:`Empty: the project of the environment in use.`,type:`text`,placeholder:`shop-qa-123`},{key:`allow`,label:`More commands`,help:`Whole gcloud commands it may run besides its read commands, comma separated.`,type:`list`,placeholder:`pubsub topics publish, run services update`}]},{id:`dataverse`,icon:L,name:`Dataverse`,note:`Tables and records`,untestable:!0,group:`tools`,base:[`integrations`,`dataverse`],vars:[],fields:[{key:`url`,label:`Environment`,help:`Sign in once: npx @microsoft/dataverse@1.0.82 auth create --environment <address>.`,type:`url`,placeholder:`https://acme.crm.dynamics.com`},{key:`preview`,label:`Preview endpoint`,type:`switch`,default:!1}]},{id:`sentry`,icon:at,name:`Sentry`,note:`Errors, stack traces and releases`,group:`tools`,base:[`integrations`,`sentry`],vars:[`token_env`],fields:[{key:`url`,label:`Address`,help:`sentry.io or your own Sentry.`,type:`url`,default:`https://sentry.io`},{key:`token_env`,label:`Token variable`,help:`A user auth token.`,type:`var`,default:`SENTRY_ACCESS_TOKEN`},{key:`organization`,label:`Organization`,type:`text`,placeholder:`acme`}]},{id:`datadog`,icon:at,name:`Datadog`,note:`Production errors, for Production signals`,untestable:!0,group:`tools`,base:[`integrations`,`datadog`],vars:[`api_key_env`,`app_key_env`],fields:[{key:`site`,label:`Site`,type:`select`,default:`us1`,options:Qm([`us1`,`US1 (datadoghq.com)`],[`us3`,`US3`],[`us5`,`US5`],[`eu`,`EU (datadoghq.eu)`],[`ap1`,`AP1`],[`ap2`,`AP2`],[`gov`,`US1-FED`])},{key:`api_key_env`,label:`API key variable`,type:`var`,default:`DD_API_KEY`},{key:`app_key_env`,label:`Application key variable`,help:`With the error tracking and RUM read scopes.`,type:`var`,default:`DD_APP_KEY`},{key:`track`,label:`Errors from`,type:`select`,default:`rum`,options:Qm([`rum`,`Real user monitoring (has the page)`],[`logs`,`Logs`],[`trace`,`Traces`])},{key:`query`,label:`Search`,help:`Optional, in Datadog's search syntax, such as service:shop env:prod.`,type:`text`,placeholder:`service:shop`}]},{id:`appinsights`,icon:at,name:`Application Insights`,note:`Production exceptions, for Production signals`,untestable:!0,group:`tools`,base:[`integrations`,`appinsights`],vars:[`api_key_env`],fields:[{key:`app_id`,label:`Application ID`,help:`API Access in the Azure portal.`,type:`text`,placeholder:`00000000-0000-0000-0000-000000000000`},{key:`cloud`,label:`Cloud`,type:`select`,default:`public`,options:Qm([`public`,`Azure`],[`china`,`Azure China`],[`usgov`,`Azure US Government`])},{key:`auth`,label:`Sign in with`,type:`select`,default:`azure-cli`,options:Qm([`azure-cli`,`The Azure CLI (az login)`],[`api-key`,`An API key`])},{key:`api_key_env`,label:`API key variable`,help:`Only when signing in with an API key.`,type:`var`,default:`APPINSIGHTS_API_KEY`}]},{id:`testmu_mcp`,icon:le,logo:`testmu`,name:`TestMu AI tools`,note:`HyperExecute, failure triage, SmartUI, accessibility and Test Manager`,signinOnly:!0,group:`tools`,base:[`integrations`,`testmu`],vars:[],fields:[]}],uh={title:`Bugs`,help:`A bug for each defect a run finds; a comment on the open bug while it still fails.`,base:[`sources`,`bugs`],fields:[{key:`system`,label:`Where bugs go`,type:`select`,options:Qm([`jira`,`Jira`],[`azure_devops`,`Azure DevOps`],[`github`,`GitHub`])},{key:`project`,label:`Project`,help:`Jira project key, or GitHub owner/repo.`,type:`text`,placeholder:`SHOP`},{key:`type`,label:`Issue type`,type:`text`,default:`Bug`},{key:`labels`,label:`Labels`,help:`Jira labels, or Azure DevOps tags.`,type:`list`,placeholder:`forgeqe`},{key:`area_path`,label:`Area path`,help:`Azure DevOps.`,type:`text`,placeholder:`Shop\\Web`},{key:`group_by`,label:`One bug per`,type:`select`,default:`defect`,options:Qm([`defect`,`Defect (cases failing the same way share one)`],[`case`,`Case`])},{key:`on_error`,label:`Also for cases that could not run`,type:`switch`,default:!1}]},dh=[[`suite_failed`,`A suite failed`],[`suite_passed`,`A suite passed`],[`release`,`Release verdict`],[`eval_failed`,`An eval failed`],[`job_failed`,`A schedule failed`],[`job_recovered`,`A schedule recovered`],[`job_done`,`A schedule finished`],[`job_investigated`,`A failure was investigated`],[`agent_waiting`,`A custom agent waits for a person's approval`],[`evidence_drift`,`An agent under test drifted from its baseline (Evidence)`],[`sign_in_waiting`,`A run waits for a person to approve a sign-in (a push to a phone)`]],fh=[{title:`Project report`,help:`forgeqe bi builds a static site from ForgeQE's data and the datasets below, with no server (Reports, Build project report).`,base:[`bi`],fields:[{key:`title`,label:`Title`,type:`text`,default:`ForgeQE BI`},{key:`evidence_dir`,label:`Evidence project`,type:`path`,default:`./evidence`},{key:`data_dir`,label:`Data folder`,type:`path`,default:`./evidence/sources/forgeqe`},{key:`build_dir`,label:`Built site`,type:`path`,default:`./.forgeqe/reports/bi`},{key:`collect`,label:`Teammates' exports`,help:`Files or folders of forgeqe bi export, comma separated.`,type:`list`,placeholder:`//share/qa-reports`}]}],ph=[{key:`kind`,label:`From`,type:`select`,options:Qm([`ado_wiql`,`Azure DevOps (WIQL)`],[`jira_jql`,`Jira (JQL)`])},{key:`title`,label:`Title`,type:`text`,placeholder:`Current sprint stories`},{key:`project`,label:`Azure DevOps project`,type:`text`,placeholder:`Shop`},{key:`wiql`,label:`WIQL`,type:`textarea`,placeholder:`SELECT [System.Id] FROM WorkItems WHERE ...`},{key:`jql`,label:`JQL`,type:`textarea`,placeholder:`project = SHOP AND issuetype = Bug`}],mh=[{title:`Running in parallel`,help:`More at once finishes sooner, and uses more of this machine (or of your grid's sessions) and more model calls at the same time.`,base:[],fields:[{key:`suite.parallel`,label:`Browsers at once in a suite`,help:`Test cases of one suite run side by side. Coding jobs always go one at a time.`,type:`number`,default:1},{key:`jobs.parallel`,label:`Scheduled runs at once`,help:`Over all jobs of the jobs service.`,type:`number`,default:2},{key:`monitor.parallel`,label:`Monitor checks at once`,help:`In each monitor round.`,type:`number`,default:1}]}],hh=[{title:`Driver`,help:`Appium runs workflows step by step and explores goals; Maestro replays them and runs your team's own flows. The apps themselves are in Environments (kind: mobile).`,base:[`mobile`],fields:[{key:`driver`,label:`Replays run on`,type:`select`,default:`appium`,options:Qm([`appium`,`Appium`],[`maestro`,`Maestro`])},{key:`heal`,label:`Heal a replay that breaks`,help:`A step that no longer finds its element is found again from the screen.`,type:`switch`,default:!0},{key:`secrets`,label:`Secrets a flow may read`,help:`The only environment variables {{secret:…}} may read, comma separated.`,type:`list`,placeholder:`COURIER_PASSWORD`}]}],gh=e=>e.runs_on===`browserstack`||e.runs_on===`testmu`,_h=[{key:`runs_on`,label:`Runs on`,help:`Devices on a cloud are kept in its own file, below.`,type:`select`,default:`local`,options:Qm([`local`,`This computer`],[`browserstack`,`BrowserStack`],[`testmu`,`TestMu AI`]),when:e=>gh(e)},{key:`type`,label:`Type`,type:`select`,emptyLabel:`Emulator here, real device on a cloud`,options:Qm([`real`,`Real device`],[`virtual`,`Emulator or simulator`]),when:e=>e.runs_on!==`browserstack`},{key:`platform`,label:`Platform`,type:`select`,default:`android`,options:Qm([`android`,`Android`],[`ios`,`iOS`])},{key:`model`,label:`Device model`,help:`An iOS simulator's name; else optional.`,type:`text`,placeholder:`iPhone 15`},{key:`os_version`,label:`OS version`,help:`Android or iOS version.`,type:`text`,placeholder:`14`},{key:`udid`,label:`Device id`,help:`From adb devices or xcrun simctl list. Empty: the one connected.`,type:`text`,placeholder:`emulator-5554`,when:e=>!gh(e)},{key:`enabled`,label:`Use in runs`,help:`Off: kept here, run only when a run names it.`,type:`switch`,default:!0}],vh=[{title:`Running in parallel`,help:`Each replay and each set of Maestro flows runs on every device in use. More at once finishes sooner, and uses more of this machine or of your device cloud's sessions.`,base:[`mobile`],fields:[{key:`parallel`,label:`Devices at once`,help:`Empty: all of them. 1: one after another. TestMu AI's too.`,type:`number`,placeholder:`All`}]},{title:`Appium on this computer`,help:`For devices that run on this computer.`,base:[`mobile`,`appium`],fields:[{key:`url`,label:`Appium server`,type:`url`,default:`http://127.0.0.1:4723`},{key:`capabilities`,label:`Extra capabilities`,help:`Rarely needed: ForgeQE builds them from the app and each device. Added to every session, one per line.`,type:`kv`,placeholder:`appium:newCommandTimeout = 300`}]},{title:`Maestro`,help:`Runs on this computer's devices, and on TestMu AI's through HyperExecute. Not on BrowserStack.`,base:[`mobile`],fields:[{key:`maestro.command`,label:`Maestro program`,help:`With its arguments, comma separated.`,type:`list`,placeholder:`maestro`},{key:`hyperexecute`,label:`hyperexecute program`,help:`TestMu AI's, for Maestro on its devices.`,type:`path`,placeholder:`hyperexecute`}]}],yh=[{title:`Desktop apps`,base:[`desktop`],fields:[{key:`heal`,label:`Heal a replay that breaks`,help:`The model re-finds a control that moved.`,type:`switch`,default:!0},{key:`screenshots`,label:`Screenshot each replayed step`,type:`switch`,default:!0},{key:`video`,label:`Record a video`,help:`Of the whole screen, while a workflow replays, explores or is recorded.`,type:`switch`,default:!0},{key:`driver`,label:`Replay on`,help:`agent-desktop replays on macOS, Linux and Windows without taking the mouse. Exploring and recording by hand need Windows.`,type:`select`,default:`auto`,options:Qm([`auto`,`Automatic (pywinauto on Windows, agent-desktop elsewhere)`],[`pywinauto`,`pywinauto (Windows)`],[`agent-desktop`,`agent-desktop (macOS, Linux, Windows)`])},{key:`headed`,label:`Let agent-desktop use the mouse and keyboard`,help:`Only a double-click needs it; replay is headless otherwise.`,type:`switch`,default:!1},{key:`secrets`,label:`Secrets a workflow may read`,help:`The only environment variables {{secret:…}} may read, comma separated.`,type:`list`,placeholder:`BILLING_PASSWORD`}]}],bh=[{title:`Runtime`,help:`ForgeQE starts only what is declared here, with ports on 127.0.0.1 and read-only mounts inside the project. Images take an exact version or a digest, never latest.`,base:[`containers`],fields:[{key:`runtime`,label:`Runtime`,type:`select`,emptyLabel:`Docker, else Podman`,options:Qm([`docker`,`Docker`],[`podman`,`Podman`])},{key:`compose`,label:`Compose files`,help:`Services from a compose file too, checked by the same rules.`,type:`list`,placeholder:`docker-compose.yml`},{key:`mock.image`,label:`Mocks' image`,type:`text`,placeholder:`wiremock/wiremock:3.9.1`}]},{title:`Tests in a container`,help:`run_tests runs the repository's tests in this image, its services started first and reachable by name.`,base:[`containers`,`tests`],fields:[{key:`image`,label:`Image`,type:`text`,placeholder:`mcr.microsoft.com/playwright:v1.48.2-jammy`},{key:`services`,label:`Services first`,type:`list`,placeholder:`db`},{key:`env`,label:`Environment`,type:`kv`,placeholder:`CI = true`},{key:`secrets`,label:`Secrets`,help:`Environment variable names.`,type:`list`,placeholder:`TEST_DB_PASSWORD`}]},{title:`The coding agents' workspace`,help:`Their shell commands, builds and test runs happen in this image, with the repository mounted; the agents and their keys stay on this machine.`,base:[`containers`,`workspace`],fields:[{key:`image`,label:`Image`,type:`text`,placeholder:`node:20.18.0`},{key:`services`,label:`Services first`,type:`list`,placeholder:`db`},{key:`env`,label:`Environment`,type:`kv`},{key:`secrets`,label:`Secrets`,type:`list`}]},{title:`Browser in a container`,help:`Used when Browser is set to Chrome in Docker.`,base:[`containers`,`browser`],fields:[{key:`image`,label:`Image`,type:`text`,placeholder:`the image ForgeQE ships`},{key:`headless`,label:`Without a window`,type:`switch`,default:!0}]}],xh=[{key:`path`,label:`Folder of documents`,help:`Markdown, text, or HTML. Relative to forgeqe.yaml.`,type:`path`,placeholder:`../shop-docs`},{key:`url`,label:`Or a link`,help:`A docs site or help centre, or an OpenAPI, Swagger, WSDL, or GraphQL description.`,type:`url`,placeholder:`https://help.shop.example/`},{key:`depth`,label:`Links to follow`,help:`How many links deep, on the same site only. 0 to 5; 0: the page alone.`,type:`number`,placeholder:`1`},{key:`max_pages`,label:`Most pages`,help:`A link: 1 to 2000, 100 if empty. Confluence: 1 to 25, 25 if empty.`,type:`number`,placeholder:`100`},{key:`token_env`,label:`Token for the link`,help:`Sent as a bearer token, to that site only.`,type:`var`,placeholder:`DOCS_TOKEN`},{key:`confluence`,label:`Or a Confluence space or page`,help:`A space key, or a page's link with the pages under it.`,type:`text`,placeholder:`SHOP`},{key:`app`,label:`Or a web app of env.yaml`,help:`The pages ForgeQE's runs and explorations remember of it.`,type:`text`,placeholder:`shop-web`}],Sh=[{key:`path`,label:`Local clone`,help:`Relative to forgeqe.yaml.`,type:`path`,placeholder:`../shop-web`},{key:`git`,label:`Or its link`,help:`GitHub, Azure DevOps, GitLab, Bitbucket, or any git server, over https or ssh. ForgeQE fetches the branch's latest commit into its own cache, only when it moved.`,type:`text`,placeholder:`https://dev.azure.com/acme/Shop/_git/orders`},{key:`branch`,label:`Branch`,help:`With a link. The repository's default branch if empty.`,type:`text`,placeholder:`main`},{key:`token_env`,label:`Token`,help:`With an https link. Sent to that host only; empty: git's own sign-in.`,type:`var`,placeholder:`ADO_PAT`},{key:`user`,label:`User name for the token`,help:`Only when the server needs one, like a Bitbucket app password.`,type:`text`},{key:`auth`,label:`Browser sign-in`,help:`In place of a token: the GitHub CLI's or the Azure CLI's sign-in. Empty: the token, or git's own sign-in.`,type:`select`,options:Qm([`github-cli`,`GitHub CLI`],[`azure-cli`,`Azure CLI`]),emptyLabel:`None`},{key:`account`,label:`Account`,help:`The account it was connected from (Repositories).`,type:`text`},{key:`system`,label:`System`,help:`The system it is part of, as your teams name it, for the Landscape on the Product page. Empty: grouped by its name.`,type:`text`,placeholder:`CRM`},{key:`database`,label:`Its database`,help:`A database of Databases, whose tables, keys and foreign keys are read into the graph. Only one that is not Writable.`,type:`text`,placeholder:`orders`}],Ch=[{key:`image`,label:`Image`,help:`An exact version or a digest.`,type:`text`,placeholder:`postgres:16.4`},{key:`description`,label:`What it is`,type:`text`,placeholder:`Orders database`},{key:`ports`,label:`Ports`,help:`5432, or 15432:5432 (this machine:container). On 127.0.0.1 only.`,type:`list`,placeholder:`5432`},{key:`env`,label:`Environment`,type:`kv`,placeholder:`POSTGRES_DB = shop`},{key:`secrets`,label:`Secrets`,help:`Environment variable names (.env works).`,type:`list`,placeholder:`POSTGRES_PASSWORD`},{key:`volumes`,label:`Mounts`,help:`Read-only, inside the project: ./host:/container.`,type:`list`,placeholder:`./db/init:/docker-entrypoint-initdb.d`},{key:`command`,label:`Command`,help:`Its arguments, comma separated.`,type:`list`},{key:`depends_on`,label:`Starts after`,type:`list`,placeholder:`db`},{key:`ready.tcp`,label:`Ready when this port answers`,type:`number`,placeholder:`5432`},{key:`ready.http`,label:`Or when this path answers`,type:`text`,placeholder:`/health`},{key:`ready.port`,label:`On port`,type:`number`,placeholder:`8080`},{key:`timeout`,label:`Wait for it`,help:`In seconds.`,type:`number`,placeholder:`60`}],wh=[{key:`description`,label:`What it holds`,type:`text`,placeholder:`Orders written by the checkout app`},{key:`url_env`,label:`Connection string`,help:`A whole URI, JDBC or ADO.NET string. Or give the parts below.`,type:`var`,placeholder:`ORDERS_DB_URL`},{key:`engine`,label:`Engine`,type:`select`,options:Qm([`postgres`,`PostgreSQL`],[`mysql`,`MySQL`],[`mariadb`,`MariaDB`],[`mssql`,`SQL Server`],[`oracle`,`Oracle`],[`snowflake`,`Snowflake`],[`redshift`,`Redshift`],[`cockroachdb`,`CockroachDB`],[`sqlite`,`SQLite`],[`duckdb`,`DuckDB`],[`mongodb`,`MongoDB`],[`kafka`,`Kafka`])},{key:`host`,label:`Host`,type:`text`,placeholder:`localhost`},{key:`port`,label:`Port`,type:`number`,placeholder:`5432`},{key:`database`,label:`Database`,type:`text`,placeholder:`test`},{key:`schema`,label:`Schema`,type:`text`},{key:`path`,label:`File`,help:`SQLite or DuckDB.`,type:`path`,placeholder:`./data/test.db`},{key:`user`,label:`User`,type:`text`,placeholder:`qa`},{key:`auth`,label:`Signs in with`,type:`select`,default:`password`,options:Qm([`password`,`A password`],[`azure`,`Microsoft Entra`],[`aws_iam`,`AWS IAM`],[`none`,`Nothing`])},{key:`password_env`,label:`Password`,type:`var`,placeholder:`FIXTURES_DB_PASSWORD`},{key:`region`,label:`AWS region`,type:`text`,placeholder:`eu-west-1`},{key:`ssl`,label:`TLS`,type:`select`,emptyLabel:`The driver's default`,options:Qm([`verify`,`Verify the certificate`],[`require`,`Require`],[`disable`,`Off`])},{key:`ssl_ca`,label:`CA certificate`,type:`path`,placeholder:`./certs/ca.pem`},{key:`writable`,label:`Writable`,help:`Allows confirmed INSERT, and UPDATE or DELETE with a WHERE clause. Each one is asked first.`,type:`switch`,default:!1},{key:`timeout_seconds`,label:`Query time limit`,help:`In seconds.`,type:`number`,placeholder:`30`},{key:`options`,label:`Driver options`,type:`kv`}];function Th(e,t){if(!e)return``;let n=e.account?` as ${e.account}`:``,r=[e.via===`azcli`?`Signed in with the Azure CLI${n}`:e.via===`gh`?`Signed in with the GitHub CLI${n}`:e.via===`dataverse`?`Signed in with the Dataverse CLI`:e.via===`token`?`Signed in with a saved key${n}`:e.via?`Signed in${n}`:``,e.browser?`${t}'s MCP server is signed in in the browser`:``].filter(Boolean).join(`; `);return r?`${r}.`:``}function Eh({system:e,label:t,keyless:n,onChanged:r}){let[a,o]=(0,q.useState)(),[s,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(``),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(!1),x=(0,q.useRef)(0),C=(0,q.useCallback)(()=>{let t=x.current;an.get().then(n=>{t===x.current&&(o(n.saved[e]),c(!0),u(e=>(e&&(e.state===`running`||e.state===`waiting`)&&n.signin?.state===`done`&&r?.(),n.signin)))},e=>f(e.message))},[e,r]);(0,q.useEffect)(C,[C]);let w=l&&l.system===e?l:null,T=w?.state===`running`||w?.state===`waiting`,E=l&&l.system!==e&&(l.state===`running`||l.state===`waiting`);(0,q.useEffect)(()=>{if(!T)return;let e=setInterval(C,1e3);return()=>clearInterval(e)},[T,C]);let D=async()=>{f(``),m(``),x.current++;try{u((await an.start(e)).signin)}catch(e){f(e.message)}},O=async e=>{if(w?.question&&!y){f(``),b(!0),x.current++;try{let t=(await an.answer(w.question.id,e)).signin;x.current++,u(t),g(``)}catch(e){f(e.message),C()}finally{b(!1)}}},k=w?.question,A=k?.kind===`input`&&!k.secret&&/\(empty to [^)]*\)$/.test(k.label),j=w?.link&&/^https:\/\//.test(w.link)?w.link:void 0;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line-soft py-3`,children:[(0,J.jsxs)(`div`,{className:`flex min-h-[44px] flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Sign-in`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:s?Th(a,t)||(n?`Not signed in here. Sign in with ${t}; it takes no key.`:`Not signed in here. Sign in with ${t}, or set its variables below.`):`Reading the sign-in…`})]}),!T&&s&&(0,J.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsxs)(B,{size:`sm`,variant:a?`outline`:`primary`,disabled:!!E,"data-tip":a?`Sign in to ${t} again`:`Sign in with ${t}`,onClick:()=>void D(),children:[(0,J.jsx)(ce,{"aria-hidden":`true`}),`Sign in`]}),a&&(0,J.jsxs)(B,{size:`sm`,onClick:async()=>{try{let t=await an.signOut(e);o(t.saved[e]),m(t.message),u(null),r?.()}catch(e){f(e.message)}},children:[(0,J.jsx)(xe,{"aria-hidden":`true`}),`Sign out`]})]})]}),E&&(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Another sign-in is running. Finish or cancel it first.`}),w&&(w.lines.length>0||T||j)&&(0,J.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`flex flex-col gap-3 rounded-[12px] card border p-4`,children:[(j||w.code)&&T&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[w.code&&(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Your code`}),(0,J.jsx)(`span`,{className:`rounded-[8px] border border-line bg-bg px-3 py-1.5 font-mono text-lg font-semibold tracking-[0.12em]`,children:w.code}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Copy the code`,onClick:()=>{navigator.clipboard?.writeText(w.code).then(()=>v(!0)),setTimeout(()=>v(!1),1500)},children:[(0,J.jsx)(S,{"aria-hidden":`true`}),_?`Copied`:`Copy`]})]}),j&&(0,J.jsxs)(`a`,{href:j,target:`_blank`,rel:`noreferrer noopener`,"data-tip":`Open ${new URL(j).host}`,className:rn({variant:`primary`,size:`sm`}),children:[(0,J.jsx)(Qe,{"aria-hidden":`true`}),`Open`]})]}),(0,J.jsxs)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-sm`,children:[w.lines.slice(-6).map((e,t)=>(0,J.jsx)(`li`,{className:z(`[overflow-wrap:anywhere]`,e.kind===`err`?`text-fail`:e.kind===`ok`?`text-pass`:`text-ink-2`),children:e.text},t)),w.state===`running`&&(0,J.jsxs)(`li`,{className:`text-muted`,children:[`Waiting for `,t,`…`]})]}),k?.kind===`choose`&&(0,J.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,J.jsx)(`legend`,{className:`mb-1 text-sm font-medium`,children:k.title}),k.detail&&(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:k.detail}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:k.options.map(e=>(0,J.jsx)(B,{size:`sm`,variant:e.id===`cancel`?`outline`:`primary`,disabled:y,onClick:()=>void O(e.id),children:e.label},e.id))})]}),k?.kind===`input`&&(0,J.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),(h.trim()||A)&&O(h)},children:[(0,J.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_320px] flex-col gap-1 text-sm font-medium`,children:[k.label,(0,J.jsx)(V,{type:k.secret?`password`:`text`,autoComplete:`off`,spellCheck:!1,value:h,onChange:e=>g(e.target.value)})]}),(0,J.jsxs)(B,{type:`submit`,size:`sm`,variant:`primary`,disabled:y||!h.trim()&&!A,children:[(0,J.jsx)(Ue,{"aria-hidden":`true`}),`Continue`]})]}),T&&(0,J.jsx)(`span`,{children:(0,J.jsxs)(B,{size:`sm`,onClick:async()=>{x.current++,u((await an.cancel()).signin)},"data-tip":`Cancel sign-in`,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]})})]}),(d||p)&&(0,J.jsx)(`p`,{className:z(`m-0 text-sm`,d?`text-fail`:`text-ink-2`),children:d||p})]})}var Dh=Object.defineProperty,Oh=(e,t)=>Dh(e,`name`,{value:t,configurable:!0});function kh(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Oh(kh,`setRef`);function Ah(...e){return t=>{let n=!1,r=e.map(e=>{let r=kh(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():kh(e[t],null)}}}}Oh(Ah,`composeRefs`);function jh(...e){return q.useCallback(Ah(...e),e)}Oh(jh,`useComposedRefs`);var Mh=Object.defineProperty,Nh=(e,t)=>Mh(e,`name`,{value:t,configurable:!0});function Ph(e,t){let n=q.createContext(t);n.displayName=e+`Context`;let r=Nh(e=>{let{children:t,...r}=e,i=q.useMemo(()=>r,Object.values(r));return(0,J.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=q.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Nh(i,`useContext`),[r,i]}Nh(Ph,`createContext`);function Fh(e,t=[]){let n=[];function r(t,r){let i=q.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Nh(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=q.useMemo(()=>o,Object.values(o));return(0,J.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=q.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Nh(s,`useContext`),[o,s]}Nh(r,`createContext`);let i=Nh(()=>{let t=n.map(e=>q.createContext(e));return Nh(function(n){let r=n?.[e]||t;return q.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Ih(i,...t)]}Nh(Fh,`createContextScope`);function Ih(...e){let t=e[0];if(e.length===1)return t;let n=Nh(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Nh(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return q.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Nh(Ih,`composeContextScopes`);var Lh=Object.defineProperty,Rh=(e,t)=>Lh(e,`name`,{value:t,configurable:!0}),zh=!!(typeof window<`u`&&window.document&&window.document.createElement);function Bh(e,t,{checkForDefaultPrevented:n=!0}={}){return Rh(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Rh(Bh,`composeEventHandlers`);function Vh(e){if(!zh)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Rh(Vh,`getOwnerWindow`);function Hh(e){if(!zh)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Rh(Hh,`getOwnerDocument`);function Uh(e,t=!1){let{activeElement:n}=Hh(e);if(!n?.nodeName)return null;if(Wh(n)&&n.contentDocument)return Uh(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Hh(n).getElementById(e);if(t)return t}}return n}Rh(Uh,`getActiveElement`);function Wh(e){return e.tagName===`IFRAME`}Rh(Wh,`isFrame`);var Gh=globalThis?.document?q.useLayoutEffect:()=>{},Kh=Object.defineProperty,qh=(e,t)=>Kh(e,`name`,{value:t,configurable:!0}),Jh=q.useEffectEvent,Yh=q.useInsertionEffect;function Xh(e){if(typeof Jh==`function`)return Jh(e);let t=q.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Yh==`function`?Yh(()=>{t.current=e}):Gh(()=>{t.current=e}),q.useMemo(()=>((...e)=>t.current?.(...e)),[])}qh(Xh,`useEffectEvent`);var Zh=Object.defineProperty,Qh=(e,t)=>Zh(e,`name`,{value:t,configurable:!0}),$h=q.useInsertionEffect||Gh;function eg({prop:e,defaultProp:t,onChange:n=Qh(()=>{},`onChange`),caller:r}){let[i,a,o]=tg({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,q.useCallback(t=>{if(s){let n=ng(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Qh(eg,`useControllableState`);function tg({defaultProp:e,onChange:t}){let[n,r]=q.useState(e),i=q.useRef(n),a=q.useRef(t);return $h(()=>{a.current=t},[t]),q.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Qh(tg,`useUncontrolledState`);function ng(e){return typeof e==`function`}Qh(ng,`isFunction`);var rg=Symbol(`RADIX:SYNC_STATE`);function ig(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Xh(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=q.useReducer((t,n)=>{if(n.type===rg)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=q.useRef(p);q.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=q.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return q.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:rg,state:i})},[i,d.state,c]),[h,f]}Qh(ig,`useControllableStateReducer`);var ag=Object.defineProperty,og=(e,t)=>ag(e,`name`,{value:t,configurable:!0});function sg(e){let[t,n]=q.useState(void 0);return Gh(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}og(sg,`useSize`);var cg=Object.defineProperty,lg=(e,t)=>cg(e,`name`,{value:t,configurable:!0});function ug(e){let t=q.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=bg(r),q.Children.forEach(r,e=>{if(gg(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;vg(n)&&typeof wg==`function`;)n=wg(n._payload);a=pg(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=q.cloneElement(a,void 0,s):!o&&q.Children.count(r)===1&&q.isValidElement(r)&&(a=r);let c=a?hg(a):void 0,l=jh(n,c);if(!a){if(r||r===0)throw Error(o?Cg(e):Sg(e));return r}let u=mg(i,a.props??{});return a.type!==q.Fragment&&(u.ref=n?l:c),q.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}lg(ug,`createSlot`);var dg=Symbol.for(`radix.slottable`);function fg(e){let t=lg(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=dg,t}lg(fg,`createSlottable`);var pg=lg((e,t)=>`child`in e.props?q.isValidElement(t)?q.cloneElement(t,void 0,e.props.children(t.props.children)):null:q.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function mg(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=xg(a,i))}return{...e,...n}}lg(mg,`mergeProps`);function hg(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}lg(hg,`getElementRef`);function gg(e){return q.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===dg}lg(gg,`isSlottable`);var _g=Symbol.for(`react.lazy`);function vg(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_g&&`_payload`in e&&yg(e._payload)}lg(vg,`isLazyComponent`);function yg(e){return typeof e==`object`&&!!e&&`then`in e}lg(yg,`isPromiseLike`);function bg(e){let t=e;for(;vg(t)&&typeof wg==`function`;)t=wg(t._payload);return t}lg(bg,`useUnwrappedLazy`);function xg(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}lg(xg,`concatAriaDescribedby`);var Sg=lg(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Cg=lg(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),wg=q.use,Tg=Object.defineProperty,Eg=(e,t)=>Tg(e,`name`,{value:t,configurable:!0}),Dg=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ug(`Primitive.${t}`),r=q.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,J.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Og(e,t){e&&Or.flushSync(()=>e.dispatchEvent(t))}Eg(Og,`dispatchDiscreteCustomEvent`);var kg=Object.defineProperty,Ag=(e,t)=>kg(e,`name`,{value:t,configurable:!0}),jg=`Checkbox`,[Mg,Ng]=Fh(jg),[Pg,Fg]=Mg(jg);function Ig(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=eg({prop:n,defaultProp:i??!1,onChange:c,caller:jg}),[m,h]=q.useState(null),[g,_]=q.useState(null),[v,y]=q.useState(null),b=!m||!!o||!!m.closest(`form`),x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,userClick:v,onUserClick:y,required:l,defaultChecked:!Ug(i)&&i,isFormControl:b,bubbleInput:g,setBubbleInput:_};return(0,J.jsx)(Pg,{scope:t,...x,children:Hg(d)?d(x):r})}Ag(Ig,`CheckboxProvider`);var Lg=`CheckboxTrigger`,Rg=q.forwardRef(Ag(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=Fg(Lg,e),h=jh(i,u),g=q.useRef(c);return q.useEffect(()=>{let e=a?.form;if(e){let t=Ag(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,J.jsx)(Dg.button,{type:`button`,role:`checkbox`,"aria-checked":Ug(c)?`mixed`:c,"aria-required":l,"data-state":Wg(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Bh(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Bh(n,e=>{let t=e.isPropagationStopped();f({requestedChecked:Ug(c)?!0:!c,hasConsumerStoppedPropagation:t}),d(e=>Ug(e)?!0:!e),m&&p&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),zg=q.forwardRef(Ag(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,J.jsx)(Ig,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Rg,{...d,ref:t,__scopeCheckbox:n}),e&&(0,J.jsx)(Vg,{__scopeCheckbox:n})]})})},`Checkbox`)),Bg=`CheckboxBubbleInput`,Vg=q.forwardRef(Ag(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=Fg(Bg,e),h=jh(r,m),g=sg(i),_=q.useRef(!1),v=q.useRef(o),y=q.useRef(a),b=q.useRef(null);q.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=v.current!==o;v.current=o;let i=a!==null&&a!==y.current;if(y.current=a,i)b.current=r?null:a,r&&(e.indeterminate=Ug(o),n.call(e,!Ug(o)&&o)),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=t?.requestedChecked===o;_.current=!0,e.indeterminate=Ug(o),n.call(e,!Ug(o)&&o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let x=q.useRef(!Ug(o)&&o);return(0,J.jsx)(Dg.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??x.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:Bh(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function Hg(e){return typeof e==`function`}Ag(Hg,`isFunction`);function Ug(e){return e===`indeterminate`}Ag(Ug,`isIndeterminate`);function Wg(e){return Ug(e)?`indeterminate`:e?`checked`:`unchecked`}Ag(Wg,`getState`);var Gg=(0,q.createContext)({});function Kg(e){let t=(0,q.useRef)(null);return t.current===null&&(t.current=e()),t.current}var qg=typeof window<`u`?q.useLayoutEffect:q.useEffect,Jg=(0,q.createContext)(null);function Yg(e,t){e.indexOf(t)===-1&&e.push(t)}function Xg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Zg=(e,t,n)=>n>t?t:n<e?e:n,Qg={},$g=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),e_=e=>typeof e==`object`&&!!e,t_=e=>/^0[^.\s]+$/u.test(e);function n_(e){let t;return()=>(t===void 0&&(t=e()),t)}var r_=e=>e,i_=(...e)=>e.reduce((e,t)=>n=>t(e(n))),a_=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},o_=class{constructor(){this.subscriptions=[]}add(e){return Yg(this.subscriptions,e),()=>this.remove(e)}remove(e){Xg(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},s_=e=>e*1e3,c_=e=>e/1e3,l_=(e,t)=>t?1e3/t*e:0,u_=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function d_(e,t,n,r){return e===t&&n===r?r_:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=u_(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(u_(s+1e-7,e,n)-i-r)}return u_(s,t,r)}}var f_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,p_=e=>t=>1-e(1-t),m_=d_(.33,1.53,.69,.99),h_=p_(m_),g_=f_(h_),__=e=>e>=1?1:(e*=2)<1?.5*h_(e):.5*(2-2**(-10*(e-1))),v_=e=>1-Math.sin(Math.acos(e)),y_=p_(v_),b_=f_(v_),x_=d_(.42,0,1,1),S_=d_(0,0,.58,1),C_=d_(.42,0,.58,1),w_=e=>Array.isArray(e)&&typeof e[0]!=`number`,T_=e=>Array.isArray(e)&&typeof e[0]==`number`,E_={linear:r_,easeIn:x_,easeInOut:C_,easeOut:S_,circIn:v_,circInOut:b_,circOut:y_,backIn:h_,backInOut:g_,backOut:m_,anticipate:__},D_=e=>typeof e==`string`,O_=e=>{if(T_(e)){e.length;let[t,n,r,i]=e;return d_(t,n,r,i)}return D_(e)?(E_[e],`${e}`,E_[e]):e},k_={delta:0,timestamp:0,isProcessing:!1},A_;function j_(){A_=void 0}var M_={now:()=>(A_===void 0&&M_.set(k_.isProcessing||Qg.useManualTiming?k_.timestamp:performance.now()),A_),set:e=>{A_=e,queueMicrotask(j_)}},N_=e=>Math.round(e*1e5)/1e5,P_=e=>t=>typeof t==`string`&&t.startsWith(e),F_=P_(`--`),I_=P_(`var(--`),L_=e=>I_(e)?R_.test(e.split(`/*`)[0].trim()):!1,R_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function z_(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var B_={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},V_={...B_,transform:e=>Zg(0,1,e)},H_={...B_,default:1},U_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function W_(e){return e==null}var G_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,K_=(e,t)=>n=>!!(typeof n==`string`&&G_.test(n)&&n.startsWith(e)||t&&!W_(n)&&Object.prototype.hasOwnProperty.call(n,t)),q_=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(U_);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},J_=e=>Zg(0,255,e),Y_={...B_,transform:e=>Math.round(J_(e))},X_={test:K_(`rgb`,`red`),parse:q_(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Y_.transform(e)+`, `+Y_.transform(t)+`, `+Y_.transform(n)+`, `+N_(V_.transform(r))+`)`};function Z_(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Q_={test:K_(`#`),parse:Z_,transform:X_.transform},$_=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ev=$_(`deg`),tv=$_(`%`),$=$_(`px`),nv=$_(`vh`),rv=$_(`vw`),iv={...tv,parse:e=>tv.parse(e)/100,transform:e=>tv.transform(e*100)},av={test:K_(`hsl`,`hue`),parse:q_(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+tv.transform(N_(t))+`, `+tv.transform(N_(n))+`, `+N_(V_.transform(r))+`)`},ov={test:e=>X_.test(e)||Q_.test(e)||av.test(e),parse:e=>X_.test(e)?X_.parse(e):av.test(e)?av.parse(e):Q_.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?X_.transform(e):av.transform(e),getAnimatableNone:e=>{let t=ov.parse(e);return t.alpha=0,ov.transform(t)}},sv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,cv=new RegExp(U_.source),lv=new RegExp(sv.source,`i`);function uv(e){return isNaN(e)&&typeof e==`string`&&(cv.test(e)||lv.test(e))}var dv=`number`,fv=`color`,pv=`var`,mv=`var(`,hv="${}",gv=/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+)(?![a-z]*\()/giu;function _v(e){let t=e.toString();return cv.test(t)||lv.test(t)}function vv(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(gv,e=>(ov.test(e)?(r.color.push(a),i.push(fv),n.push(ov.parse(e))):e.startsWith(mv)?(r.var.push(a),i.push(pv),n.push(e)):(r.number.push(a),i.push(dv),n.push(parseFloat(e))),++a,hv)).split(hv),indexes:r,types:i}}function yv(e){return vv(e).values}function bv({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===dv?N_(r[a]):e===fv?ov.transform(r[a]):r[a]}return i}}function xv(e){return bv(vv(e))}var Sv=e=>typeof e==`number`?0:ov.test(e)?ov.getAnimatableNone(e):e,Cv=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Sv(e);function wv(e){let t=vv(e);return bv(t)(t.values.map((e,n)=>Cv(e,t.split[n])))}var Tv={test:uv,parse:yv,createTransformer:xv,getAnimatableNone:wv};function Ev(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Dv({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ev(s,r,e+1/3),a=Ev(s,r,e),o=Ev(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Ov(e,t){return n=>n>0?t:e}var kv=(e,t,n)=>e+(t-e)*n,Av=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jv=[Q_,X_,av],Mv=e=>jv.find(t=>t.test(e));function Nv(e){let t=Mv(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===av&&(n=Dv(n)),n}var Pv=(e,t)=>{let n=Nv(e),r=Nv(t);if(!n||!r)return Ov(e,t);let i={...n};return e=>(i.red=Av(n.red,r.red,e),i.green=Av(n.green,r.green,e),i.blue=Av(n.blue,r.blue,e),i.alpha=kv(n.alpha,r.alpha,e),X_.transform(i))},Fv=new Set([`none`,`hidden`]);function Iv(e,t){return Fv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lv(e,t){return n=>kv(e,t,n)}function Rv(e){return typeof e==`number`?Lv:typeof e==`string`?L_(e)?Ov:ov.test(e)?Pv:Hv:Array.isArray(e)?zv:typeof e==`object`?ov.test(e)?Pv:Bv:Ov}function zv(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Rv(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Bv(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Rv(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Vv(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Hv=(e,t)=>{let n=Tv.createTransformer(t),r=vv(e),i=vv(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Fv.has(e)&&!i.values.length||Fv.has(t)&&!r.values.length?Iv(e,t):i_(zv(Vv(r,i),i.values),n):(`${e}${t}`,Ov(e,t))},Uv=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Wv(e,t){let n=Uv.exec(e);if(!n)return;let r=Uv.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>N_(kv(a,o,e))+i}function Gv(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return kv(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Wv(e,t);if(n)return n}return Rv(e)(e,t)}var Kv=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function qv(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var Jv=40;function Yv(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Kv.reduce((e,t)=>(e[t]=qv(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Qg.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Jv),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Kv.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Kv.length;t++)o[Kv[t]].cancel(e)},state:n,steps:o}}var{schedule:Xv,cancel:Zv,steps:Qv}=Yv(typeof requestAnimationFrame<`u`?requestAnimationFrame:r_,!0,k_),$v=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Xv.update(t,e),stop:()=>Zv(t),now:()=>k_.isProcessing?k_.timestamp:M_.now()}},ey=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ty=2e4;function ny(e,t=50,n=ty,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function ry(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(ny(o),ty);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:c_(s)}}var iy={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},ay=e=>e<0?1/Math.max(1+e,iy.minDamping):Math.max(1-e,iy.minDamping);function oy(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return ly(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function sy(e,t){return e*Math.sqrt(1-t*t)}var cy=12;function ly(e,t,n){let r=n;for(let n=1;n<cy;n++)r-=e(r)/t(r);return r}var uy=.001;function dy({duration:e=iy.duration,bounce:t=iy.bounce}){let n,r;iy.maxDuration;let i=ay(t);e=Zg(iy.minDuration,iy.maxDuration,c_(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=sy(t,i),o=Math.exp(-r);return uy-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=sy(t*t,i);return(-n(t)+uy>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=ly(n,r,a),s=o*oy(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:s_(e)}}var fy=(e,t)=>(t?e>=0:e>0)&&e<1/0;function py(e,t){if(fy(e,t))return e}function my(e){let t=py(e.stiffness),n=py(e.damping,!0),r=py(e.mass),i={...e,stiffness:t??iy.stiffness,damping:n??iy.damping,mass:r??iy.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=ay(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*oy(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,dy(i)),i.isResolvedFromDuration=!0;fy(i.stiffness)&&fy(i.damping,!0)||(i.stiffness=iy.stiffness,i.damping=iy.damping)}return i}function hy(e=iy.visualDuration,t=iy.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=my({...n}),f=e=>d?0:-c_(e),p=s/(2*Math.sqrt(o*c)),m=c_(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?iy.restSpeed.granular:iy.restSpeed.default),g.restDelta=n.restDelta||(e?iy.restDelta.granular:iy.restDelta.default)};_();let v,y,b;if(p<1){let e=sy(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>s_(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=s_(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(ny(S),ty),t=ey(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var gy=Object.assign(hy,{applyToOptions:e=>{let t=ry(e,100,hy);return e.ease=t.ease,e.duration=s_(t.duration),e.type=`keyframes`,e}});function _y({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=gy({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function vy(e,t,n){let r=[],i=n||Qg.mix||Gv,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=i_(Array.isArray(t)?t[n]||r_:t,a)),r.push(a)}return r}function yy(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=vy(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=a_(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Zg(e[0],e[a-1],t)):l}function by(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=a_(0,t,r);e.push(kv(n,1,i))}}function xy(e){let t=[0];return by(t,e.length-1),t}function Sy(e,t){return e.map(e=>e*t)}function Cy(e,t){return e.map(()=>t||C_).splice(0,e.length-1)}function wy({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=w_(r)?r.map(O_):O_(r)||C_,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(Qg.mix||Gv)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?Zg(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=yy(Sy(n&&n.length===t.length?n:xy(t),e),t,{ease:Array.isArray(i)?i:Cy(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Ty=5;function Ey(e,t,n){let r=Math.max(t-Ty,0);return l_(n-e(r),t-r)}function Dy(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Ey(t=>e.next(t).value,t,e.next(t).value)}var Oy=e=>e!==null;function ky(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Oy),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ay={decay:_y,inertia:_y,tween:wy,keyframes:wy,spring:gy};function jy(e){typeof e.type==`string`&&(e.type=Ay[e.type])}var My=40,Ny=(e,t)=>t-e>My&&!Qg.useManualTiming?t:e;function Py(e,t){return{kind:e,animation:t,timestamp:M_.now(),frameTimestamp:k_.timestamp,frameIsProcessing:k_.isProcessing}}function Fy(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Py(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Iy(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Py(`layout-animation-start`,e),node:t})}catch{}}var Ly=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Ry=e=>e/100,zy=e=>Math.round(e*1e4)/1e4,By=class extends Ly{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M_.now()&&this.tick(M_.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Fy(this,this.options)}initAnimation(){let{options:e}=this;jy(e);let{type:t=wy,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||wy;s!==wy&&typeof o[0]!=`number`&&(this.mixKeyframes=i_(Ry,Gv(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=ny(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Ny(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;!d&&i!==null&&(p=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==_y&&(f.value=ky(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??zy((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==_y?ky(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=Zg(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}then(e,t){return this.finished.then(e,t)}get duration(){return c_(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+c_(e)}get time(){return c_(this.currentTime)}set time(e){e=s_(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Dy(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M_.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=c_(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=$v,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),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(M_.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(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Vy=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Hy(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(U_)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Vy.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Uy=/\b([a-z-]*)\(.*?\)/gu,Wy={...Tv,getAnimatableNone:e=>{let t=e.match(Uy);return t?t.map(Hy).join(` `):e}},Gy={...Tv,getAnimatableNone:e=>{let t=Tv.parse(e);return Tv.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ky={...B_,transform:Math.round},qy={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,rotate:ev,pathRotation:ev,rotateX:ev,rotateY:ev,rotateZ:ev,scale:H_,scaleX:H_,scaleY:H_,scaleZ:H_,skew:ev,skewX:ev,skewY:ev,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:V_,originX:iv,originY:iv,originZ:$,zIndex:Ky,fillOpacity:V_,strokeOpacity:V_,numOctaves:Ky},Jy={...qy,color:ov,backgroundColor:ov,outlineColor:ov,fill:ov,stroke:ov,borderColor:ov,borderTopColor:ov,borderRightColor:ov,borderBottomColor:ov,borderLeftColor:ov,filter:Wy,WebkitFilter:Wy,mask:Gy,WebkitMask:Gy},Yy=e=>Jy[e],Xy=new Set([Wy,Gy]);function Zy(e,t){let n=Yy(e);return Xy.has(n)||(n=Tv),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Qy(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var $y=e=>e*180/Math.PI,eb=e=>nb($y(Math.atan2(e[1],e[0]))),tb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:eb,rotateZ:eb,skewX:e=>$y(Math.atan(e[1])),skewY:e=>$y(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},nb=e=>(e%=360,e<0&&(e+=360),e),rb=eb,ib=e=>Math.hypot(e[0],e[1]),ab=e=>Math.hypot(e[4],e[5]),ob={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ib,scaleY:ab,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(ib(e)+ab(e))/2,rotateX:e=>nb($y(Math.atan2(e[6],e[5]))),rotateY:e=>nb($y(Math.atan2(-e[2],e[0]))),rotateZ:rb,rotate:rb,skewX:e=>$y(Math.atan(e[4])),skewY:e=>$y(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sb(e){return+!!e.includes(`scale`)}function cb(e,t){if(!e||e===`none`)return sb(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=ob,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=tb,i=t}if(!i)return sb(t);let a=r[t],o=i[1].split(`,`).map(ub);return typeof a==`function`?a(o):o[a]}var lb=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return cb(n,t)};function ub(e){return parseFloat(e.trim())}var db=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],fb=new Set([...db,`pathRotation`]),pb=e=>e===B_||e===$,mb=new Set([`x`,`y`,`z`]),hb=db.filter(e=>!mb.has(e));function gb(e){let t=[];return hb.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var _b=new Set([`bottom`,`right`]);function vb(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var yb=({transform:e})=>cb(e,`x`),bb=({transform:e})=>cb(e,`y`),xb={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>vb(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>vb(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:yb,y:bb,translateX:yb,translateY:bb},Sb=new Set,Cb=!1,wb=!1,Tb=!1;function Eb(){if(wb){let e=[],t=new Set,n=new Set;Sb.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),_b.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=gb(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}wb=!1,Cb=!1,Sb.forEach(e=>e.complete(Tb)),Sb.clear()}function Db(){Sb.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wb=!0)})}function Ob(){Tb=!0,Db(),Eb(),Tb=!1}function kb(e,t,n){if(typeof e==`string`){if($g(e)||t_(e))return parseFloat(e);if(!Tv.test(e)&&Tv.test(n))return Zy(t,n)}return e??void 0}var Ab=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Sb.add(this),Cb||(Cb=!0,Xv.read(Db),Xv.resolveKeyframes(Eb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=kb(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Qy(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Sb.delete(this)}cancel(){this.state===`scheduled`&&(Sb.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},jb=e=>e.startsWith(`--`);function Mb(e,t,n){jb(t)?e.style.setProperty(t,n):e.style[t]=n}var Nb={};function Pb(e,t){let n=n_(e);return()=>Nb[t]??n()}var Fb=Pb(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ib=Pb(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Lb=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rb={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Lb([0,.65,.55,1]),circOut:Lb([.55,0,1,.45]),backIn:Lb([.31,.01,.66,-.59]),backOut:Lb([.33,1.53,.69,.99])};function zb(e,t){if(e)return typeof e==`function`?Ib()?ey(e,t):`ease-out`:T_(e)?Lb(e):Array.isArray(e)?e.map(e=>zb(e,t)||Rb.easeOut):Rb[e]}function Bb(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=zb(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Vb(e){return typeof e==`function`&&`applyToOptions`in e}function Hb({type:e,...t}){return Vb(e)&&Ib()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Ub=class extends Ly{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Hb(e);this.animation=Bb(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=ky(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Mb(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Fy(this,e,c)}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(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return c_(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+c_(e)}get time(){return c_(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=s_(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Fb()?(this.animation.timeline=e,t?.(this.animation),r_):n(this)}},Wb={anticipate:__,backInOut:g_,circInOut:b_};function Gb(e){return e in Wb}function Kb(e){typeof e.ease==`string`&&Gb(e.ease)&&(e.ease=Wb[e.ease])}var qb=class extends Ub{constructor(e){Kb(e),jy(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(M_.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new By({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?Zg(0,10,a):0,s=this.sample(a);n&&r&&Mb(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Jb=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Tv.test(e)||e===`0`)&&!e.startsWith(`url(`));function Yb(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Xb(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Jb(i,t),s=Jb(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Yb(e)||(n===`spring`||Vb(n))&&r}function Zb(e){e.duration=0,e.type=`keyframes`}var Qb=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),$b=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ex(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&$b.test(e[t]))return!0;return!1}var tx=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),nx=()=>!Qg.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function rx(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Qb.has(n)||tx.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return nx()&&(Qb.has(n)||tx.has(n)&&ex(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ix=(e,t)=>t&&typeof e==`number`?t.transform(e):e,ax={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ox=db.length;function sx(e,t,n){let r=``,i=!0;for(let a=0;a<ox;a++){let o=db[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=ix(s,qy[o]);if(!c){i=!1;let t=ax[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${ix(a,qy.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}var cx=new WeakMap,lx=200,ux=.001,dx=.1,fx=.001,px=100,mx=e=>/^(linear|ease(In|Out|InOut))$/.test(e),hx=(e,t)=>e-t,gx=(e,t,n)=>{let r=[];for(let i=0;i<=n;i++)r.push(kv(e,t,i/n));return r},_x=e=>e.motionValue.owner,vx=e=>cx.get(e),yx=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),bx=({name:e,motionValue:t})=>e&&db.includes(e)&&t?.owner?.current instanceof HTMLElement&&nx()&&Ib();function xx(e){let t=_x(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(yx(t,`transform`)||`none`)===`none`&&!yx(t,`pathRotation`)&&!t.projection?.isProjecting()}var Sx=class extends By{constructor(e){let t=_x(e).current,{driver:n=$v}=e,r,i=xx(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=vx(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=vx(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return vx(_x(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(M_.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=T_(n)?Lb(n):mx(n)&&Rb[n];if(o&&!i&&!r&&e.length===2&&t===wy&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||wy)===wy?u||xy(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=M_.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||Cx(_x(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(M_.now())}get time(){return this.isAccelerated()?c_(Zg(0,this.totalDuration,this.at(M_.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function Cx(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?db:a){let a=r.get(s),c=t===void 0?yx(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``,r=m(e,t);for(let e in r)n+=(ax[e]||e)+`(`+ix(r[e],qy[e])+`) `;return n||`none`},g=(e=m())=>{t.style.transform=sx(e,{})},_=(e=!0)=>{e&&g(),s.forEach(({animation:e})=>e.cancel()),s=[]},v=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=M_.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),O.schedule(!1)}),e.oncancel=()=>s.includes(r)&&O.demote(),s.push(r)},y=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},b=(e,t,n,r)=>{let i=Math.min(lx,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=gx(t,n,i).concat(r).sort(hx),o=e=>a_(t,n,e),s,c;for(let t of e){let e=a.map(e=>t.numberAt(e)),[n]=e,r=e.map(e=>e-n),i=r[r.length-1],o=r.some(e=>Math.abs(e)*ux>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(!o){if(l.some(e=>!(Math.abs(e)<=ux)))return}else if(!s)s=l,c=e=>(t.numberAt(e)-n)/o;else if(l.some((e,t)=>!(Math.abs(e-s[t])<=ux)))return}if(!s||s.every((e,t)=>Math.abs(e-o(a[t]))<=ux))return`linear`;let l=[],u=(e,t=c(e))=>l.push(zy(t)+` `+zy(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&y(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},x=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?fx:dx))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...y(e=>r.numberAt(e),t,n));i.push(n)}},s=gx(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(hx))e>c&&o(c,e,0),c=e;return i.sort(hx)},S=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},C=(e,n,r,i={fill:`both`},a,o)=>{let s=e.flatMap(e=>e.boundaries(n,r)),c=o||b(e,n,r,s),l=c?[n,r]:x(e,n,r,s),u=l.map(e=>h(e,a)),d={transform:u};return c||(d.offset=l.map(e=>a_(n,r,e))),u.every(e=>e===u[0])&&(g(m(n,a)),d=null),t.animate(d,{...i,duration:r-n,easing:c||`linear`})},w=c=>{let l=c,u=0,d=0,f=[],p=[],m=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[t,n]=e.timing(),i=t===1/0;if(o.set(e,[e.at(c),e.speed,i]),i)e.sync();else{if(e.speed<0)return;if(n){if(u){let e=(t-d)/n;if(Math.abs(n-u)>1||Math.abs(e-Math.round(e))*u>1)return}else u=n,d=t;p.push(e)}else m.add(t);f.push(e),l=Math.max(l,t)}}i={},a=db.filter(t=>{if(r.has(t))return!0;let n=i[t]=yx(e,t);return n!==void 0&&parseFloat(n)!==+!!t.startsWith(`scale`)}),_(!1);let h=!u&&S(f);try{if(h&&h[1]>c){let[e,t,n]=h;v(C(f,e,t,void 0,void 0,n),e-c,t-e)}else l>c&&(v(C(f,c,l),0,l-c),m.forEach(e=>e<l-1&&v(t.animate(null,{duration:e-c}),0,e-c)));if(u){let e=d+Math.floor((l-d)/u)*u;v(C(p,e,e+u,{iterations:1/0,iterationStart:(l-e)/u,fill:`forwards`},l),l-c)}}catch{return}return s.length||_(),!0},T=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r?(n.playbackRate=r,n.startTime=e-o/r):(n.pause(),n.currentTime=o)}return!0},E=()=>!n.size&&(u=!0,vx(t)===O&&cx.delete(t),O.isJS||_(),!0),D=()=>{let t=M_.now();if(O.isJS||(O.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=yx(e,n.name),o.has(n)||(c=!0))}),O.isFinishing=!1),l=!1,u||(n.forEach(({state:e},t)=>{(e===`idle`||e===`finished`)&&n.delete(t)}),E()))return;for(let e of n)if(!e.canAccelerate)return O.demote(!0);O.isJS&&(O.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!T(t)){if(a){if(t-f<px)return O.demote();f=t}if(!w(t))return O.demote()}},O={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,k_.isProcessing?Xv.render(D,!1,!0):queueMicrotask(D)))},release(e){let{state:t}=e;(t===`idle`||t===`finished`)&&n.delete(e),E()||O.schedule(!0)},check(){if(!O.isJS){for(let t in i)if(yx(e,t)!==i[t]&&!p(t))return O.schedule(!0,!0)}},demote(e){O.isJS||u||(n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),O.isJS=!0,o=new Map,_(),n.forEach(e=>e.state===`running`&&e.js?.start()))}};return cx.set(t,O),O}var wx=class extends Ly{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M_.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Ab;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M_.now();let u=!0;Xb(e,i,a,o)||(u=!1,(Qg.instantAnimations||!s)&&l?.(ky(e,n,t)),e[0]=e[e.length-1],Zb(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&rx(n),p=!f&&bx(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=Ny(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new qb(n)}catch{m=new By(n)}}else m=p?new Sx(n):new By(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ob()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Tx(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Ex=30,Dx=e=>!isNaN(parseFloat(e)),Ox={current:void 0},kx=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M_.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dx(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new o_)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new o_,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Xv.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){Ox.current&&Ox.current.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=M_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ex)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ex);return l_(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ax(e,t){return new kx(e,t)}function jx(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Mx(e,t){let n=e?.[t]??e?.default??e;return n===e?n:jx(n,e)}var Nx={type:`spring`,stiffness:500,damping:25,restSpeed:10},Px=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fx={type:`keyframes`,duration:.8},Ix={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Lx=(e,{keyframes:t})=>t.length>2?Fx:fb.has(e)?e.startsWith(`scale`)?Px(t[1]):Nx:Ix,Rx=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function zx(e){for(let t in e)if(!Rx.has(t))return!0;return!1}var Bx=(e,t,n,r={},i,a)=>o=>{let s=Mx(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=s_(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};zx(s)||Object.assign(u,Lx(e,u)),u.duration&&=s_(u.duration),u.repeatDelay&&=s_(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Zb(u),u.delay===0&&(d=!0)),(Qg.instantAnimations||Qg.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Zb(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=ky(u.keyframes,s);if(e!==void 0){Xv.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new By(u):new wx(u)},Vx=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hx(e){let t=Vx.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ux(e,t,n=1){`${e}`;let[r,i]=Hx(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return $g(e)?parseFloat(e):e}return L_(i)?Ux(i,t,n+1):i}function Wx(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gx(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Wx(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Kx(e,t,n){return Gx(e.getProps(),t,n,e)}var qx=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Jx=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...db]),Yx=e=>Array.isArray(e);function Xx(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ax(n))}function Zx(e){return Yx(e)?e[e.length-1]||0:e}function Qx(e,t){let{transitionEnd:n={},transition:r={},...i}=Kx(e,t)||{};i={...i,...n};for(let t in i)Xx(e,t,Zx(i[t]))}var $x=e=>!!(e&&e.getVelocity);function eS(e){return!!($x(e)&&e.add)}function tS(e,t){let n=e.getValue(`willChange`);if(eS(n))return n.add(t);if(!n&&Qg.WillChange){let n=new Qg.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var nS=`data-framer-appear-id`;function rS(e){return e.props[nS]}var iS=typeof window<`u`;function aS({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function oS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?jx(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&aS(f,t))continue;let o={delay:n,...Mx(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Xv.update(()=>r.set(i));continue}let p=!1;if(iS&&window.MotionHandoffAnimation){let n=rS(e);if(n){let e=window.MotionHandoffAnimation(n,t,Xv);e!==null&&(o.startTime=e,p=!0)}}tS(e,t);let m=l??e.shouldReduceMotion;r.start(Bx(t,r,i,m&&Jx.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Xv.update(()=>{o&&Qx(e,o)});d.length?Promise.all(d).then(t):t()}return d}function sS(e,t,n={}){let r=Kx(e,t,qx(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?oS(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(sS(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Tx(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function cS(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>sS(e,t,n))):typeof t==`string`?sS(e,t,n):Promise.all(oS(e,Kx(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var lS={test:e=>e===`auto`,parse:e=>e},uS=e=>t=>t.test(e),dS=[B_,$,tv,ev,rv,nv,lS],fS=e=>dS.find(uS(e));function pS(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||t_(e)}var mS=new Set([`auto`,`none`,`0`]);function hS(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!mS.has(t)&&_v(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Zy(n,i))}var gS=class extends Ab{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(z_(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),L_(r))){let i=Ux(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Jx.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=fS(r),o=fS(i);if(z_(r)!==z_(i)&&xb[n])this.needsMeasurement=!0;else if(a!==o){if(pb(a)&&pb(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else xb[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||pS(e[t]))&&n.push(t);n.length&&hS(e,n,t)}measure(){let{element:e,name:t}=this;return xb[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},_S=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function vS(e){return e_(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function yS(e){return e_(e)&&`ownerSVGElement`in e}var bS={};function xS(e){return bS.current?.add(e),e}var SS=e=>bS.current?bS.current.bind(e):e;function CS(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:bS.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function wS(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function TS(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(fb.has(e))o=!0;else if(F_(e))i[e]=n;else{let t=ix(n,qy[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=sx(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var ES={offset:`stroke-dashoffset`,array:`stroke-dasharray`},DS={offset:`strokeDashoffset`,array:`strokeDasharray`};function OS(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ES:DS;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var kS=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function AS(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(TS(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of kS)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&OS(d,i,a,o,!1)}function jS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NS(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function PS(e){return e===void 0||e===1}function FS({scale:e,scaleX:t,scaleY:n}){return!PS(e)||!PS(t)||!PS(n)}function IS(e){return FS(e)||LS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function LS(e){return RS(e.x)||RS(e.y)}function RS(e){return e&&e!==`0%`}function zS(e,t,n){return n+t*(e-n)}function BS(e,t,n,r,i){return i!==void 0&&(e=zS(e,i,r)),zS(e,n,r)+t}function VS(e,t=0,n=1,r,i){e.min=BS(e.min,t,n,r,i),e.max=BS(e.max,t,n,r,i)}function HS(e,{x:t,y:n}){VS(e.x,t.translate,t.scale,t.originPoint),VS(e.y,n.translate,n.scale,n.originPoint)}var US=.999999999999,WS=1.0000000000001;function GS(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(KS(e.x,-a.scroll.offset.x),KS(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,HS(e,o)),r&&IS(a.latestValues)&&YS(e,a.latestValues,a.layout?.layoutBox))}t.x<WS&&t.x>US&&(t.x=1),t.y<WS&&t.y>US&&(t.y=1)}function KS(e,t){e.min+=t,e.max+=t}function qS(e,t,n,r,i=.5){VS(e,t,n,kv(e.min,e.max,i),r)}function JS(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function YS(e,t,n){let r=n??e;qS(e.x,JS(t.x,r.x),t.scaleX,t.scale,t.originX),qS(e.y,JS(t.y,r.y),t.scaleY,t.scale,t.originY)}function XS(e,t){return jS(NS(e.getBoundingClientRect(),t))}function ZS(e,t,n){let r=XS(e,n),{scroll:i}=t;return i&&(KS(r.x,i.offset.x),KS(r.y,i.offset.y)),r}var{schedule:QS,cancel:$S}=Yv(queueMicrotask,!1);function eC(e,t,n){let r=$x(e)?e:Ax(e);return r.start(Bx(``,r,t,n)),r.animation}var tC={},nC={value:null,addProjectionMetrics:null};function rC(e,t){let n=M_.now();e=SS(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(Zv(r),e(a-t))};return Xv.setup(r,!0),xS(()=>Zv(r))}function iC(e){return yS(e)&&e.tagName===`svg`}function aC(e){return $x(e)?e.get():e}var oC=e=>typeof e==`number`?e:parseFloat(e),sC=_S.length,cC=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`],lC=cC.length,uC=e=>typeof e==`number`||$.test(e);function dC(e,t,n,r,i,a){i?(e.opacity=kv(0,n.opacity??1,pC(r)),e.opacityExit=kv(t.opacity??1,0,mC(r))):a&&(e.opacity=kv(t.opacity??1,n.opacity??1,r));for(let i=0;i<sC;i++){let a=_S[i],o=fC(t,a),s=fC(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||uC(o)===uC(s)?(e[a]=Math.max(kv(oC(o),oC(s),r),0),(tv.test(s)||tv.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<lC;i++){let a=cC[i];(t[a]||n[a])&&(e[a]=kv(t[a]||0,n[a]||0,r))}}function fC(e,t){return e[t]===void 0?e.borderRadius:e[t]}var pC=hC(0,.5,y_),mC=hC(.5,.95,r_);function hC(e,t,n){return r=>r<e?0:r>t?1:n(a_(e,t,r))}function gC(e,t){e.min=t.min,e.max=t.max}function _C(e,t){gC(e.x,t.x),gC(e.y,t.y)}function vC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var yC=.9999,bC=1.0001,xC=-.01,SC=.01;function CC(e){return e.max-e.min}function wC(e,t,n){return Math.abs(e-t)<=n}function TC(e,t,n,r=.5){e.origin=r,e.originPoint=kv(t.min,t.max,e.origin),e.scale=CC(n)/CC(t),e.translate=kv(n.min,n.max,e.origin)-e.originPoint,(e.scale>=yC&&e.scale<=bC||isNaN(e.scale))&&(e.scale=1),(e.translate>=xC&&e.translate<=SC||isNaN(e.translate))&&(e.translate=0)}function EC(e,t,n,r){TC(e.x,t.x,n.x,r?r.originX:void 0),TC(e.y,t.y,n.y,r?r.originY:void 0)}function DC(e,t,n,r=0){e.min=(r?kv(n.min,n.max,r):n.min)+t.min,e.max=e.min+CC(t)}function OC(e,t,n,r){DC(e.x,t.x,n.x,r?.x),DC(e.y,t.y,n.y,r?.y)}function kC(e,t,n,r=0){let i=r?kv(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+CC(t)}function AC(e,t,n,r){kC(e.x,t.x,n.x,r?.x),kC(e.y,t.y,n.y,r?.y)}function jC(e,t,n,r,i){return e-=t,e=zS(e,1/n,r),i!==void 0&&(e=zS(e,1/i,r)),e}function MC(e,t=0,n=1,r=.5,i,a=e,o=e){if(tv.test(t)&&(t=parseFloat(t),t=kv(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=kv(a.min,a.max,r);e===a&&(s-=t),e.min=jC(e.min,t,n,s,i),e.max=jC(e.max,t,n,s,i)}function NC(e,t,[n,r,i],a,o){MC(e,t[n],t[r],t[i],t.scale,a,o)}var PC=[`x`,`scaleX`,`originX`],FC=[`y`,`scaleY`,`originY`];function IC(e,t,n,r){NC(e.x,t,PC,n?n.x:void 0,r?r.x:void 0),NC(e.y,t,FC,n?n.y:void 0,r?r.y:void 0)}var LC=()=>({translate:0,scale:1,origin:0,originPoint:0}),RC=()=>({x:LC(),y:LC()}),zC=()=>({min:0,max:0}),BC=()=>({x:zC(),y:zC()});function VC(e){return e.translate===0&&e.scale===1}function HC(e){return VC(e.x)&&VC(e.y)}function UC(e,t){return e.min===t.min&&e.max===t.max}function WC(e,t){return UC(e.x,t.x)&&UC(e.y,t.y)}function GC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function KC(e,t){return GC(e.x,t.x)&&GC(e.y,t.y)}function qC(e){return CC(e.x)/CC(e.y)}function JC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var YC=class{constructor(){this.members=[]}add(e){Yg(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Xg(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Xg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function XC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ZC={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if($.test(e))e=parseFloat(e);else return e}return`${XC(e,t.target.x)}% ${XC(e,t.target.y)}%`}},QC={borderRadius:Object.assign({},ZC,{applyTo:_S.slice()}),borderTopLeftRadius:ZC,borderTopRightRadius:ZC,borderBottomLeftRadius:ZC,borderBottomRightRadius:ZC,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Tv.parse(e);if(i.length>5)return r;let a=Tv.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=kv(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function $C(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,rotateZ:s,skewX:c,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`rotateZ(${s}deg) `),c&&(r+=`skewX(${c}deg) `),l&&(r+=`skewY(${l}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function ew(e){return[e(`x`),e(`y`)]}var tw=(e,t)=>e.depth-t.depth,nw=class{constructor(){this.children=[],this.isDirty=!1}add(e){Yg(this.children,e),this.isDirty=!0}remove(e){Xg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tw),this.isDirty=!1,this.children.forEach(e)}},rw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},iw={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},aw=[``,`X`,`Y`,`Z`],ow=1e3,sw=0;function cw(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var lw=({instance:e})=>e&&cx.get(e)?.demote();function uw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=rS(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Xv,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&uw(r)}function dw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(tC,{...QC,...tC}),class{constructor(e={},n=t?.()){this.id=sw++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nC.value&&(iw.nodes=iw.calculatedTargetDeltas=iw.calculatedProjections=0),this.nodes.forEach(mw),this.nodes.forEach(Tw),this.nodes.forEach(Ew),this.nodes.forEach(hw),nC.addProjectionMetrics&&nC.addProjectionMetrics(iw)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nw)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new o_),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=yS(t)&&!iC(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Xv.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=rC(i,250),rw.hasAnimatedSinceResize&&(rw.hasAnimatedSinceResize=!1,this.nodes.forEach(ww)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||Mw,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!KC(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Mx(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||ww(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Zv(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dw),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&uw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;lw(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,lw(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(vw),this.nodes.forEach(_w);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(yw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xw),this.nodes.forEach(Sw),this.nodes.forEach(Cw),this.nodes.forEach(fw),this.nodes.forEach(pw)):this.nodes.forEach(yw),this.clearAllSnapshots();let e=M_.now();k_.delta=Zg(0,1e3/60,e-k_.timestamp),k_.timestamp=e,k_.isProcessing=!0,Qv.update.process(k_),Qv.preRender.process(k_),Qv.render.process(k_),k_.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,QS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gw),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xv.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xv.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!CC(this.snapshot.measuredBox.x)&&!CC(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=BC(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&lw(this);let t=this.projectionDelta&&!HC(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||IS(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Iw(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return BC();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Rw))){let{scroll:e}=this.root;e&&(KS(t.x,e.offset.x),KS(t.y,e.offset.y))}return t}removeElementScroll(e){let t=BC();if(_C(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&_C(t,e),KS(t.x,i.offset.x),KS(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r){let i=n||BC();_C(i,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(KS(i.x,-n.scroll.offset.x),KS(i.y,-n.scroll.offset.y)),IS(n.latestValues)&&YS(i,n.latestValues,n.layout?.layoutBox)}return!r&&IS(this.latestValues)&&YS(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(e){let t=BC();_C(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!IS(n.latestValues))continue;let r;n.instance&&(FS(n.latestValues)&&n.updateSnapshot(),r=BC(),_C(r,n.measurePageBox())),IC(t,n.latestValues,n.snapshot?.layoutBox,r)}return IS(this.latestValues)&&IC(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==k_.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=k_.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=BC(),this.targetWithTransforms=BC()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),OC(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):_C(this.target,this.layout.layoutBox),HS(this.target,this.targetDelta)):_C(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),nC.value&&iw.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||FS(this.parent.latestValues)||LS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=BC(),this.relativeTargetOrigin=BC(),AC(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),_C(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===k_.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;_C(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;GS(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=BC());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vC(this.prevProjectionDelta.x,this.projectionDelta.x),vC(this.prevProjectionDelta.y,this.projectionDelta.y)),EC(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&JC(this.projectionDelta.x,this.prevProjectionDelta.x)&&JC(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),nC.value&&iw.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=RC(),this.projectionDelta=RC(),this.projectionDeltaWithTransform=RC()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=RC();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=BC(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(jw));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=kv(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=kv(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Ow(o.x,e.x,n),Ow(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(AC(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Aw(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&WC(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=BC(),_C(f,this.relativeTarget)),c&&(this.animationValues=a,dC(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Zv(this.pendingAnimation),void 0),this.pendingAnimation=Xv.update(()=>{rw.hasAnimatedSinceResize=!0,this.motionValue||=Ax(0),this.motionValue.jump(0,!1),this.currentAnimation=eC(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Iy(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ow),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Lw(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||BC();let t=CC(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=CC(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}_C(t,i),YS(t,r),EC(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new YC),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&cw(`z`,e,r,this.animationValues);for(let t=0;t<aw.length;t++)cw(`rotate${aw[t]}`,e,r,this.animationValues),cw(`skew${aw[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=aC(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=aC(t?.pointerEvents)||``),this.hasProjected&&!IS(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$C(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in tC){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=tC[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?aC(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(_w),this.root.sharedNodes.clear()}}}function fw(e){e.updateLayout(),bw(e)}function pw(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)ew(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=CC(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;gC(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Lw(i,t.layoutBox,n)&&ew(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=CC(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=RC();EC(o,n,t.layoutBox);let s=RC();a?EC(s,e.applyTransform(r,!0),t.measuredBox):EC(s,n,t.layoutBox);let c=!HC(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=BC();AC(s,t.layoutBox,i.layoutBox,o);let c=BC();AC(c,n,a.layoutBox,o),KC(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function mw(e){nC.value&&iw.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function hw(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gw(e){e.clearSnapshot()}function _w(e){e.clearMeasurements()}function vw(e){e.isLayoutDirty=!0,e.updateLayout()}function yw(e){e.isLayoutDirty=!1}function bw(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;ew(e=>KS(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function xw(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Sw(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Cw(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ww(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tw(e){e.resolveTargetDelta()}function Ew(e){e.calcProjection()}function Dw(e){e.resetSkewAndRotation()}function Ow(e,t,n){e.translate=kv(t.translate,0,n),e.scale=kv(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kw(e,t,n,r){e.min=kv(t.min,n.min,r),e.max=kv(t.max,n.max,r)}function Aw(e,t,n,r){kw(e.x,t.x,n.x,r),kw(e.y,t.y,n.y,r)}function jw(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Mw={duration:.45,ease:[.4,0,.1,1]},Nw=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Pw=Nw(`applewebkit/`)&&!Nw(`chrome/`)?Math.round:r_;function Fw(e){e.min=Pw(e.min),e.max=Pw(e.max)}function Iw(e){Fw(e.x),Fw(e.y)}function Lw(e,t,n){return e===`position`||e===`preserve-aspect`&&!wC(qC(t),qC(n),.2)}function Rw(e){return e!==e.root&&e.scroll?.wasRoot}function zw(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Bw=dw({attachResizeListener:(e,t)=>zw(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Vw={current:void 0},Hw=dw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vw.current){let e=new Bw({});e.mount(window),e.setOptions({layoutScroll:!0}),Vw.current=e}return Vw.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Uw=new WeakMap;function Ww(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Gw(e){return typeof e==`string`||Array.isArray(e)}var Kw=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],qw=[`initial`].concat(Kw);function Jw(e){if(Ww(e.animate))return!0;for(let t=0;t<qw.length;t++)if(Gw(e[qw[t]]))return!0;return!1}function Yw(e){return!!(Jw(e)||e.variants)}function Xw(e,t,n){for(let r in t){let i=t[r],a=n[r];if($x(i))e.addValue(r,i);else if($x(a))e.addValue(r,Ax(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ax(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Zw={current:null},Qw={current:!1},$w=typeof window<`u`;function eT(){if(Qw.current=!0,$w){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Zw.current=e.matches;e.addEventListener(`change`,t),t()}else Zw.current=!1}}var tT=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],nT={};function rT(e){nT=e}function iT(){return nT}var aT=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=Ab,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=M_.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Xv.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Jw(t),this.isVariantNode=Yw(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&$x(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,Uw.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Qw.current||eT(),this.shouldReduceMotion=Zw.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Zv(this.notifyUpdate),Zv(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Qb.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Ub({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:s_(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=fb.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Xv.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),cx.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in nT){let t=nT[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):BC()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&cx.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tT.length;t++){let n=tT[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Xw(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ax(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&($g(n)||t_(n))?n=parseFloat(n):typeof n!=`number`&&!Tv.test(n)&&Tv.test(t)&&(n=Zy(e,t)),this.setBaseTarget(e,$x(n)?n.get():n)),$x(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new o_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){QS.render(this.render)}},oT=class extends aT{constructor(){super(...arguments),this.KeyframeResolver=gS}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$x(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function sT(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function cT(e,{layout:t,layoutId:n}){return fb.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!tC[e]||e===`opacity`)}function lT(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)($x(r[t])||i&&$x(i[t])||cT(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function uT(e){return window.getComputedStyle(e)}var dT=class extends oT{constructor(){super(...arguments),this.type=`html`,this.renderInstance=sT}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(fb.has(t))return this.projection?.isProjecting?sb(t):lb(e,t);{let n=uT(e),r=(F_(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return XS(e,t)}build(e,t,n){TS(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return lT(e,t,n)}},fT=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function pT(e){return{point:{x:e.pageX,y:e.pageY}}}var mT=e=>t=>fT(t)&&e(t,pT(t));function hT(e,t,n,r){return zw(e,t,mT(n),r)}var gT=new WeakMap,_T,vT=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:yS(r)&&`getBBox`in r?r.getBBox()[t]:r[n],yT=vT(`inline`,`width`,`offsetWidth`),bT=vT(`block`,`height`,`offsetHeight`);function xT({target:e,borderBoxSize:t}){gT.get(e)?.forEach(n=>{n(e,{get width(){return yT(e,t)},get height(){return bT(e,t)}})})}function ST(e){e.forEach(xT)}function CT(){typeof ResizeObserver<`u`&&(_T=new ResizeObserver(ST))}function wT(e,t){_T||CT();let n=CS(e);return n.forEach(e=>{let n=gT.get(e);n||(n=new Set,gT.set(e,n)),n.add(t),_T?.observe(e)}),()=>{n.forEach(e=>{let n=gT.get(e);n?.delete(t),n?.size||_T?.unobserve(e)})}}var TT=new Set,ET;function DT(){ET=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};TT.forEach(t=>t(e))},window.addEventListener(`resize`,ET)}function OT(e){return TT.add(e),ET||DT(),()=>{TT.delete(e),!TT.size&&typeof ET==`function`&&(window.removeEventListener(`resize`,ET),ET=void 0)}}function kT(e,t){return xS(typeof e==`function`?OT(e):wT(e,t))}var AT=(e,t)=>Math.abs(e-t);function jT(e,t){let n=AT(e.x,t.x),r=AT(e.y,t.y);return Math.sqrt(n**2+r**2)}var MT=new Set([`auto`,`scroll`]),NT=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=PT(this.lastRawMoveEventInfo,this.transformPagePoint));let e=IT(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=jT(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:M_.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=PT(t,this.transformPagePoint),this.hasPendingMove=!0,Xv.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=IT(e.type===`pointercancel`?this.lastMoveEventInfo:PT(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!fT(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=PT(pT(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=k_;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,IT(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=i_(hT(this.contextWindow,`pointermove`,this.handlePointerMove,d),hT(this.contextWindow,`pointerup`,this.handlePointerUp,d),hT(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(MT.has(e.overflowX)||MT.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Xv.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Zv(this.updatePoint)}};function PT(e,t){return t?{point:t(e.point)}:e}function FT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function IT({point:e},t){return{point:e,delta:FT(e,RT(t)),offset:FT(e,LT(t)),velocity:zT(t,.1)}}function LT(e){return e[0]}function RT(e){return e[e.length-1]}function zT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=RT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>s_(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>s_(t)*2&&(r=e[1]);let a=c_(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var BT=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function VT(e){return BT.has(e.tagName)||e.isContentEditable===!0}var HT=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function UT(e){return HT.has(e.tagName)||e.isContentEditable===!0}var WT={x:!1,y:!1};function GT(){return WT.x||WT.y}function KT(e){return e===`x`||e===`y`?WT[e]?null:(WT[e]=!0,()=>{WT[e]=!1}):WT.x||WT.y?null:(WT.x=WT.y=!0,()=>{WT.x=WT.y=!1})}function qT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?kv(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?kv(n,e,r.max):Math.min(e,n)),e}function JT(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function YT(e,{top:t,left:n,bottom:r,right:i}){return{x:JT(e.x,n,i),y:JT(e.y,t,r)}}function XT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZT(e,t){return{x:XT(e.x,t.x),y:XT(e.y,t.y)}}function QT(e,t){let n=.5,r=CC(e),i=CC(t);return i>r?n=a_(t.min,t.max-r,e.min):r>i&&(n=a_(e.min,e.max-i,t.min)),Zg(0,1,n)}function $T(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var eE=.35;function tE(e=eE){return e===!1?e=0:e===!0&&(e=eE),{x:nE(e,`left`,`right`),y:nE(e,`top`,`bottom`)}}function nE(e,t,n){return{min:rE(e,t),max:rE(e,n)}}function rE(e,t){return typeof e==`number`?e:e[t]||0}var iE=new WeakMap,aE=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=BC(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=KT(n),!this.openDragLock))return;this.latestPointerEvent=e,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),ew(e=>{let t=this.getAxisMotionValue(e).get()||0;if(L_(t)&&(t=Ux(t,this.visualElement.current)||0),$.test(t))t=parseFloat(t);else if(tv.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=CC(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Xv.update(()=>i(e,t),!1,!0),tS(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=dE(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Xv.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new NT(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&Xv.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!uE(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=qT(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;oE(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?YT(n.layoutBox,e):!1,this.elastic=tE(t),r!==this.constraints&&!oE(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&ew(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=$T(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!oE(e))return!1;let n=sE(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=ZS(n,r.root,this.visualElement.getTransformPagePoint()),a=ZT(r.layout.layoutBox,i);if(t){let e=t(MS(a));this.hasMutatedConstraints=!!e,e&&(a=jS(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=ew(s=>{if(!uE(s,t||n,this.currentDirection))return;let l=c&&c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return tS(this.visualElement,e),n.start(Bx(e,n,0,t,this.visualElement,!1))}stopAnimation(){ew(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();ew(e=>{if(!uE(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-kv(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!oE(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};ew(e=>{let t=this.getAxisMotionValue(e).get();i[e]=QT({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ew(t=>{let n=this.getAxisMotionValue(t);if(!uE(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(kv(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;iE.set(this.visualElement,this);let e=this.visualElement.current,t=hT(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&UT(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=oE(t)&&sE(t);r&&(this.constraints=this.resolveRefConstraints(),n||=lE(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xv.read(r);let o=zw(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ew(t=>{if(!uE(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.readProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=eE,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function oE(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var sE=e=>`current`in e?e.current:e;function cE(e){let t=!0;return()=>{t?t=!1:e()}}function lE(e,t,n){let r=kT(e,cE(n)),i=kT(t,cE(n));return()=>{r(),i()}}function uE(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dE(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function fE(e,t){let n=CS(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},xS(()=>r.abort())]}function pE(e){return!(e.pointerType===`touch`||GT())}function mE(e,t,n={}){t=SS(t);let[r,i,a]=fE(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!pE(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var hE=(e,t)=>t?e===t||hE(e,t.parentElement):!1,gE=new WeakSet;function _E(e){return t=>{t.key===`Enter`&&e(t)}}function vE(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var yE=(e,t)=>{let n=!1,r=_E(()=>{gE.has(e)||(n=!0,vE(e,`down`))}),i=_E(()=>{n&&(n=!1,vE(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&vE(e,`cancel`)},{...t,once:!0})};function bE(e){return fT(e)&&!GT()}var xE=new WeakSet;function SE(e,t,n={}){t=SS(t);let[r,i,a]=fE(e,n),o=e=>{let r=e.currentTarget;if(!bE(e)||xE.has(e))return;gE.add(r),n.stopPropagation&&xE.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),gE.has(r)&&gE.delete(r),bE(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||hE(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),vS(e)&&(e.addEventListener(`focus`,()=>yE(e,i),i),!VT(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var CE=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},wE=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`]),TE=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function EE(e,t,n,r){sT(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(wE.has(n)?n:wS(n),t.attrs[n])}function DE(e,t,n){let r=lT(e,t,n);for(let n in e)if(n!==`children`&&($x(e[n])||$x(t[n]))){let t=db.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var OE=class extends oT{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=BC}getBaseTargetFromProps(e,t){return fb.has(t)?super.getBaseTargetFromProps(e,t)??sb(t):e[t]}getDefaultValue(e){return fb.has(e)?this.latestValues[e]??sb(e):void 0}readValueFromInstance(e,t){if(fb.has(t)){let e=Yy(t);return e&&e.default||0}if(kS.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=wE.has(t)?t:wS(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return DE(e,t,n)}build(e,t,n){AS(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){EE(e,t,n,r)}mount(e){this.isSVGTag=TE(e.tagName),super.mount(e)}};function kE(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var AE=[...Kw].reverse();function jE(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>cS(e,t,n))),n=NE(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(AE.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Gw(g)||g===!1?g:void 0:h,v=Gw(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||Ww(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=ME(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=Kx(e,n,qx(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!kE(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Kx(s,n)?.transition?.delayChildren;r.delay=Tx(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Kx(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!$x(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=NE(),i=!0}}}function ME(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!kE(t,e):!1}function NE(){let e={};for(let t of Kw)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}var PE=(0,q.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function FE(e=!0){let t=(0,q.useContext)(Jg);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,q.useId)();(0,q.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,q.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var IE=(0,q.createContext)({strict:!1}),LE={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`]},RE=!1;function zE(){if(RE)return;let e={};for(let t in LE)e[t]={isEnabled:e=>LE[t].some(t=>!!e[t])};rT(e),RE=!0}function BE(){return zE(),iT()}function VE(e){let t=BE();for(let n in e)t[n]={...t[n],...e[n]};rT(t)}var HE=(0,q.createContext)({});function UE(e,t){if(Jw(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Gw(t)?t:void 0,animate:Gw(n)?n:void 0}}return e.inherit===!1?{}:t}function WE(e){let{initial:t,animate:n}=UE(e,(0,q.useContext)(HE));return(0,q.useMemo)(()=>({initial:t,animate:n}),[GE(t),GE(n)])}function GE(e){return Array.isArray(e)?e.join(` `):e}var KE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qE(e,t,n){for(let r in t)!$x(t[r])&&!cT(r,n)&&(e[r]=t[r])}function JE({transformTemplate:e},t){return(0,q.useMemo)(()=>{let n=KE();return TS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function YE(e,t){let n=e.style||{},r={};return qE(r,n,e),Object.assign(r,JE(e,t)),r}function XE(e,t){let n={},r=YE(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var ZE=()=>({...KE(),attrs:{}});function QE(e,t,n,r){let i=(0,q.useMemo)(()=>{let n=ZE();return AS(n,t,TE(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return qE(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var $E=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function eD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||$E.has(e)}function tD(e,t){return e.startsWith(`on`)?!eD(e):t?.(e)??!eD(e)}function nD(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||$x(e[a])||(tD(a,r)||n===!0&&eD(a)||!t&&!eD(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var rD=[`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 iD(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(rD.indexOf(e)>-1||/[A-Z]/u.test(e))}function aD(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??iD(e)?QE:XE)(t,r,i,e),l=nD(t,typeof e==`string`,a,s),u=e===q.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,q.useMemo)(()=>$x(d)?d.get():d,[d]);return(0,q.createElement)(e,{...u,children:f})}function oD({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:sD(n,r,i,e),renderState:t()}}function sD(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=aC(a[e]);let{initial:o,animate:s}=e,c=Jw(e),l=Yw(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Ww(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Gx(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var cD=e=>(t,n)=>{let r=(0,q.useContext)(HE),i=(0,q.useContext)(Jg),a=()=>oD(e,t,r,i);return n?a():Kg(a)},lD=cD({scrapeMotionValuesFromProps:lT,createRenderState:KE}),uD=cD({scrapeMotionValuesFromProps:DE,createRenderState:ZE}),dD=Symbol.for(`motionComponentSymbol`);function fD(e,t,n){let r=(0,q.useRef)(n);(0,q.useInsertionEffect)(()=>{r.current=n});let i=(0,q.useRef)(null);return(0,q.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var pD=(0,q.createContext)({});function mD(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function hD(e,t,n,r,i,a){let{visualElement:o}=(0,q.useContext)(HE),s=(0,q.useContext)(IE),c=(0,q.useContext)(Jg),l=(0,q.useContext)(PE),u=l.reducedMotion,d=l.skipAnimations,f=(0,q.useRef)(null),p=(0,q.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,q.useContext)(pD);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&gD(f.current,n,i,h),(0,q.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[nS],_=(0,q.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return qg(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),qg(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,q.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function gD(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t,f=e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:_D(e.parent));f.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&mD(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u});let p=f.getStack()?.lead;p&&!f.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}function _D(e){if(e)return e.options.allowProjection===!1?_D(e.parent):e.projection}function vD(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&VE(r);let a=n?n===`svg`:iD(e),o=a?uD:lD;function s(n,s){let c,l=yD(n);Kg(()=>!!Vw.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,q.useContext)(PE),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=WE(n),m=o(n,d);if(!d&&typeof window<`u`){bD(u,r);let t=xD(u);c=t.MeasureLayout,p.visualElement=hD(e,m,u,i,t.ProjectionNode,a)}return(0,J.jsxs)(HE.Provider,{value:p,children:[c&&p.visualElement?(0,J.jsx)(c,{visualElement:p.visualElement,...u}):null,aD(e,n,fD(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,q.forwardRef)(s);return c[dD]=e,c}function yD({layoutId:e}){let t=(0,q.useContext)(Gg).id;return t&&e!==void 0?t+`-`+e:e}function bD(e,t){(0,q.useContext)(IE).strict}function xD(e){let{drag:t,layout:n}=BE();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function SD(e,t){if(typeof Proxy>`u`)return vD;let n=new Map,r=(n,r)=>vD(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,vD(a,void 0,e,t)),n.get(a))})}var CD=(e,t)=>t.isSVG??iD(e)?new OE(t):new dT(t,{allowProjection:e!==q.Fragment}),wD=class extends CE{constructor(e){super(e),e.animationState||=jE(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ww(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},TD=0,ED={animation:{Feature:wD},exit:{Feature:class extends CE{constructor(){super(...arguments),this.id=TD++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Kx(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},DD=class extends CE{constructor(e){super(e),this.removeGroupControls=r_,this.removeListeners=r_,this.controls=new aE(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||r_}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},OD=({current:e})=>e?e.ownerDocument.defaultView:null,kD=e=>(t,n)=>{e&&Xv.update(()=>e(t,n),!1,!0)},AD=class extends CE{constructor(){super(...arguments),this.removePointerDownListener=r_}onPointerDown(e){this.session=new NT(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:OD(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:kD(e),onStart:kD(t),onMove:kD(n),onEnd:(e,t)=>{delete this.session,r&&Xv.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=hT(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},jD=!1,MD=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),ND=class extends q.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),jD&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...MD(this.props),onExitComplete:()=>this.safeToRemove()})),rw.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...MD(this.props)}),jD=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Xv.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),QS.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;jD=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function PD(e){let[t,n]=FE(),r=(0,q.useContext)(Gg);return(0,J.jsx)(ND,{...e,layoutGroup:r,switchLayoutGroup:(0,q.useContext)(pD),isPresent:t,safeToRemove:n})}var FD={pan:{Feature:AD},drag:{Feature:DD,ProjectionNode:Hw,MeasureLayout:PD}};function ID(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Xv.postRender(()=>i(t,pT(t)))}var LD=class extends CE{mount(){let{current:e}=this.node;e&&(this.unmount=mE(e,(e,t)=>(ID(this.node,t,`Start`),e=>ID(this.node,e,`End`))))}unmount(){}},RD=class extends CE{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&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=i_(zw(this.node.current,`focus`,()=>this.onFocus()),zw(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function zD(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Xv.postRender(()=>i(t,pT(t)))}var BD=class extends CE{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=SE(e,(e,t)=>(zD(this.node,t,`Start`),(e,{success:t})=>zD(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},VD=new WeakMap,HD=new WeakMap,UD=e=>{let t=VD.get(e.target);t&&t(e)},WD=e=>{e.forEach(UD)};function GD({root:e,...t}){let n=e||document;HD.has(n)||HD.set(n,{});let r=HD.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(WD,{root:e,...t})),r[i]}function KD(e,t,n){let r=GD(t);return VD.set(e,n),r.observe(e),()=>{VD.delete(e),r.unobserve(e)}}var qD={some:0,all:1},JD=class extends CE{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:qD[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=KD(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(YD(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function YD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var XD=SD(Object.assign({},ED,{inView:{Feature:JD},tap:{Feature:BD},focus:{Feature:RD},hover:{Feature:LD}},FD,{layout:{ProjectionNode:Hw,MeasureLayout:PD}}),CD);function ZD(){!Qw.current&&eT();let[e]=(0,q.useState)(Zw.current);return e}var QD=XD;function $D({className:e,checked:t,onCheckedChange:n,disabled:r,defaultChecked:i,...a}){let[o,s]=q.useState(i??!1),c=t??o,l=ZD()??!1,u=e=>{t===void 0&&s(e),n?.(e)},d=!r&&!l;return(0,J.jsx)(QD.div,{className:`inline-flex flex-none`,whileTap:d?{scale:.95}:void 0,whileHover:d?{scale:1.05}:void 0,transition:{type:`spring`,stiffness:400,damping:25},children:(0,J.jsx)(zg,{checked:c,onCheckedChange:e=>u(e===!0),disabled:r,className:z(`flex size-[16px] shrink-0 cursor-pointer items-center justify-center rounded-[4px] border-[1.5px] border-muted bg-bg p-0 text-accent-ink transition-colors duration-200 outline-none hover:border-accent`,`data-[state=checked]:border-accent data-[state=checked]:bg-accent`,`focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-muted`,e),...a,children:(0,J.jsx)(`svg`,{className:`size-full`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:(0,J.jsx)(QD.path,{d:`M2.5 6L4.5 8L9.5 3`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`,initial:!1,animate:c?`checked`:`unchecked`,variants:{checked:{pathLength:1,opacity:1,transition:l?{duration:0}:{pathLength:{duration:.2,ease:`easeInOut`,delay:.1},opacity:{duration:.1,ease:`easeInOut`}}},unchecked:{pathLength:0,opacity:0,transition:l?{duration:0}:{pathLength:{duration:.2,ease:`easeInOut`},opacity:{duration:.2,ease:`easeInOut`,delay:.05}}}}})})})})}var eO=[`Test cases and bugs`,`Browser grids`,`Notifications`,`Other tools`],tO=e=>e.group===`tools`?eO[3]:eO[0],nO={jira:`jira`,azure_devops:`azure_devops`,xray:`xray`,confluence:`confluence`,testrail:`testrail`,zephyr:`zephyr`,qtest:`qtest`,github:`github`,gitlab:`gitlab`,browserstack_mcp:`browserstack`,testmu_mcp:`testmu`,postman:`postman`,azure:`azure`,dataverse:`dataverse`,sentry:`sentry`,browserstack:`browserstack`,testmu:`testmu`},rO=[...lh.map(e=>({id:e.id,kind:`source`,group:tO(e),name:e.name,note:e.note,icon:e.icon,logo:Na[e.logo||e.id]??Pa[e.logo||e.id]})),{id:`browserstack`,kind:`grid`,group:eO[1],name:`BrowserStack`,note:`Remote browsers and devices`,icon:le,logo:Na.browserstack},{id:`testmu`,kind:`grid`,group:eO[1],name:`TestMu AI`,note:`Remote browsers (LambdaTest)`,icon:le,logo:Na.testmu},{id:`teams`,kind:`teams`,group:eO[2],name:`Microsoft Teams`,note:`A channel's webhook, for suites, releases and schedules`,icon:We,logo:xa,many:!0},{id:`email`,kind:`email`,group:eO[2],name:`Email`,note:`The same alerts by email`,icon:We,many:!0},{id:`mcp`,kind:`mcp`,group:eO[3],name:`MCP server`,note:`Any other system with an MCP server, as tools for ForgeQE's agent`,icon:Te,many:!0}],iO={browserstack:[{key:`username_env`,label:`User name variable`,type:`var`,default:`BROWSERSTACK_USERNAME`},{key:`access_key_env`,label:`Access key variable`,type:`var`,default:`BROWSERSTACK_ACCESS_KEY`},{key:`browser`,label:`Browser`,help:`ForgeQE drives the browser over CDP: Chrome or Edge.`,type:`select`,default:`chrome`,options:[{value:`chrome`,label:`Chrome`},{value:`edge`,label:`Edge`}]},{key:`browser_version`,label:`Browser version`,type:`text`,default:`latest`},{key:`os`,label:`Operating system`,type:`select`,default:`Windows`,options:[{value:`Windows`,label:`Windows`},{value:`OS X`,label:`macOS`}]},{key:`os_version`,label:`Its version`,type:`text`,placeholder:`11, or Sequoia`},{key:`project`,label:`Project`,type:`text`,placeholder:`ForgeQE`},{key:`build`,label:`Build`,type:`text`,placeholder:`nightly`},{key:`local`,label:`Through BrowserStack Local`,help:`For sites only your network reaches.`,type:`switch`,default:!1}],testmu:[{key:`username_env`,label:`User name variable`,type:`var`,default:`LT_USERNAME`},{key:`access_key_env`,label:`Access key variable`,type:`var`,default:`LT_ACCESS_KEY`},{key:`browser`,label:`Browser`,help:`TestMu AI's CDP endpoint serves Chrome.`,type:`select`,default:`Chrome`,options:[{value:`Chrome`,label:`Chrome`}]},{key:`browser_version`,label:`Browser version`,type:`text`,default:`latest`},{key:`platform`,label:`Platform`,type:`text`,default:`Windows 11`,placeholder:`Windows 11, or macOS Sequoia`},{key:`project`,label:`Project`,type:`text`,placeholder:`ForgeQE`},{key:`build`,label:`Build`,type:`text`,placeholder:`nightly`},{key:`local`,label:`Through the LambdaTest tunnel`,help:`For sites only your network reaches.`,type:`switch`,default:!1}]},aO={browserstack:iO.browserstack.filter(e=>[`browser`,`browser_version`,`os`,`os_version`].includes(e.key)),testmu:iO.testmu.filter(e=>[`browser`,`browser_version`,`platform`].includes(e.key))},oO={browserstack:{provider:`browserstack`,remote:{browser:`chrome`,browser_version:`latest`,os:`Windows`,os_version:`11`,username_env:`BROWSERSTACK_USERNAME`,access_key_env:`BROWSERSTACK_ACCESS_KEY`,project:`ForgeQE`,local:!1}},testmu:{provider:`testmu`,remote:{browser:`Chrome`,browser_version:`latest`,platform:`Windows 11`,username_env:`LT_USERNAME`,access_key_env:`LT_ACCESS_KEY`,project:`ForgeQE`,local:!1}}},sO=[{key:`host`,label:`Mail server`,type:`text`,placeholder:`smtp.office365.com`},{key:`port`,label:`Port`,help:`587 is STARTTLS; 465 is TLS from the start.`,type:`number`,default:587},{key:`username_env`,label:`User name variable`,type:`var`,placeholder:`SMTP_USERNAME`},{key:`password_env`,label:`Password variable`,type:`var`,placeholder:`SMTP_PASSWORD`},{key:`from`,label:`From`,help:`Empty: the user name.`,type:`text`,placeholder:`ForgeQE <qa-bot@example.com>`},{key:`to`,label:`To`,help:`Comma separated.`,type:`list`,placeholder:`qa-team@example.com`}],cO=/^[A-Za-z0-9_-][A-Za-z0-9_.-]*$/;function lO({entry:e,title:t,meta:n,state:r,onEdit:i,onRemove:a,setUp:o}){return(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(pn,{icon:e.icon,logo:e.logo}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_220px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:t}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:n}),r]}),(0,J.jsx)(`span`,{className:`flex gap-2`,children:o?(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Set up ${t}`,"data-tip":`Set up ${t}`,onClick:i,children:(0,J.jsx)(_,{"aria-hidden":`true`})}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Edit ${t}`,"data-tip":`Edit ${t}`,onClick:i,children:(0,J.jsx)(ie,{"aria-hidden":`true`})}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Disconnect ${t}`,"data-tip":`Disconnect ${t}`,onClick:a,children:(0,J.jsx)(Fe,{"aria-hidden":`true`})})]})})]})}var uO=(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Not set up`}),dO=(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,children:`Needs a sign-in: Edit to sign in`}),fO=(e,t=``)=>t?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:t}):e.length?(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,children:e.length===1?`Needs its key or password: Edit to add it`:`Needs ${e.length} values: Edit to add them`}):(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Connected`}),pO={integrations:[eO[0],eO[1]],notifications:[eO[2]],mcp:[eO[3]]};function mO({edit:e,grids:t,setGrids:n,gridPaths:i,view:a=`integrations`}){let[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)({}),u=(0,q.useCallback)(()=>{an.get().then(e=>l(e.saved),()=>{})},[]);(0,q.useEffect)(u,[u]);let d=e=>{let t=c[nO[e]||``];return t&&(t.via!==`token`||t.browser)&&Th(t,y(e).name)?`Signed in`:``},f=on(),p=e=>Ln(f,e),m=e.value,h=e.vars,g=K(Cr(m,[`notify`,`channels`])),_=K(m.mcp),v=String(Cr(m,[`browser`,`provider`])??`local`),y=e=>rO.find(t=>t.id===e),b=e=>{let t=lh.find(t=>t.id===e),n=Cr(m,t.base);return n!==void 0&&n!==!1},x=e=>e.kind===`source`?b(e.id):e.kind===`grid`&&!!t[e.id],S=Object.fromEntries(eO.map(e=>[e,[]]));for(let t of lh){if(!b(t.id)){t.group===`tools`&&S[tO(t)].push((0,J.jsx)(lO,{entry:y(t.id),title:t.name,meta:t.note,state:uO,setUp:!0,onEdit:()=>w(y(t.id))},t.id));continue}let n=K(Cr(m,t.base));S[tO(t)].push((0,J.jsx)(lO,{entry:y(t.id),title:t.name,meta:String(n.url||n.org_url||n.repo||t.note),state:t.signinOnly&&!d(t.id)?dO:fO(bp(n,t.vars,t.fields,p),d(t.id)),onEdit:()=>s({step:`form`,entry:y(t.id),mode:`edit`,name:t.id,from:t.id,value:n}),onRemove:()=>e.set(U(m,t.base,void 0))},t.id))}for(let e of[`browserstack`,`testmu`]){let n=t[e];if(!n)continue;let r=K(n.remote),i=y(e),a=[(e=>typeof e==`string`&&e?e[0].toUpperCase()+e.slice(1):e)(r.browser),r.os?`${r.os} ${r.os_version||``}`.trim():r.platform].filter(Boolean).join(`, `);S[eO[1]].push((0,J.jsx)(lO,{entry:i,title:i.name,meta:`${a}${v===e?`, used for browser runs`:``}`,state:fO(bp(r,[`username_env`,`access_key_env`],iO[e],p),d(e)),onEdit:()=>s({step:`form`,entry:i,mode:`edit`,name:e,from:e,value:n,useGrid:v===e}),onRemove:()=>C(e)},e))}for(let[t,n]of Object.entries(g)){let r=K(n),i=y(r.teams?`teams`:`email`),a=Array.isArray(r.on)?r.on.length:0,o=[...r.teams?bp(K(r.teams),[`webhook_env`],[],p):[],...r.email?bp(K(r.email),[`username_env`,`password_env`],[],p):[]];S[eO[2]].push((0,J.jsx)(lO,{entry:i,title:t,meta:`${[r.teams&&`Teams`,r.email&&`Email`].filter(Boolean).join(` and `)||`No way to reach it yet`}, ${a} event${a===1?``:`s`}`,state:fO(o),onEdit:()=>s({step:`form`,entry:i,mode:`edit`,name:t,from:t,value:r}),onRemove:()=>e.set(U(m,[`notify`,`channels`,t],void 0))},`ch-${t}`))}for(let[t,n]of Object.entries(_)){let r=K(n);S[eO[3]].push((0,J.jsx)(lO,{entry:{...y(`mcp`),icon:fe},title:t,meta:String(r.url||r.command||`MCP server`),onEdit:()=>s({step:`form`,entry:y(`mcp`),mode:`edit`,name:t,from:t,value:r}),onRemove:()=>e.set(U(m,[`mcp`,t],void 0))},`mcp-${t}`))}function C(r){let i=U(m,[`browser`,`providers`,r],void 0);v===r&&(i=U(i,[`browser`,`provider`],`local`)),e.set(i),n({...t,[r]:null})}function w(e){if(e.kind===`source`){let t=lh.find(t=>t.id===e.id);s({step:`form`,entry:e,mode:`add`,name:e.id,from:e.id,value:Object.fromEntries(t.fields.filter(e=>e.type===`var`&&e.default).map(e=>[e.key,e.default]))})}else e.kind===`grid`?s({step:`form`,entry:e,mode:`add`,name:e.id,from:e.id,value:oO[e.id],useGrid:v===`local`}):e.kind===`teams`?s({step:`form`,entry:e,mode:`add`,name:``,from:``,value:{teams:{webhook_env:`TEAMS_WEBHOOK_URL`},on:[`suite_failed`,`job_failed`]}}):e.kind===`email`?s({step:`form`,entry:e,mode:`add`,name:``,from:``,value:{email:{port:587},on:[`suite_failed`,`job_failed`]}}):s({step:`form`,entry:e,mode:`add`,name:``,from:``,value:{url:``}})}function T(r){let a=r.entry.kind;if(a===`source`){let t=lh.find(e=>e.id===r.entry.id);e.set(U(m,t.base,t.signinOnly&&!Object.keys(K(r.value)).length?!0:r.value))}else if(a===`grid`){let a=r.entry.id,o=U(m,[`browser`,`providers`,a],i[a]);r.useGrid?o=U(o,[`browser`,`provider`],a):v===a&&(o=U(o,[`browser`,`provider`],`local`)),e.set(o),n({...t,[a]:r.value})}else{let t=a===`mcp`?[`mcp`]:[`notify`,`channels`],n=m;r.mode===`edit`&&r.from!==r.name&&(n=U(n,[...t,r.from],void 0)),e.set(U(n,[...t,r.name],r.value))}s(null)}let E=pO[a],D=E.filter(e=>S[e].length),O=a===`mcp`?`Add an MCP server`:a===`notifications`?`Add a channel`:`Add an integration`,k=a===`mcp`?`No other MCP servers yet. The test case systems' own MCP servers are set with each system under Integrations.`:a===`notifications`?`No channels yet: add a Teams channel or an email list, and pick the events it gets.`:`Nothing connected yet.`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`p`,{className:`m-0 max-w-[60ch] text-sm text-muted`,children:D.length?a===`mcp`?`Their tools show as <name>_<tool>. Sign in from Edit where a server offers it.`:a===`notifications`?`Each channel gets the events it picks.`:`Connected to ForgeQE.`:k}),(0,J.jsxs)(B,{size:`sm`,"data-tip":O,onClick:()=>a===`mcp`?w(y(`mcp`)):s({step:`catalog`}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),D.map(e=>(0,J.jsxs)(`div`,{children:[E.length>1&&(0,J.jsx)(W,{children:e}),S[e]]},e)),a===`notifications`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{children:`Links in alerts`}),(0,J.jsx)(jn,{def:{key:`notify.report_url`,label:`Where reports are published`,help:`Teams and email alerts link each report there.`,type:`url`,placeholder:`https://reports.example.com/forgeqe`},edit:e,base:[]})]}),a===`integrations`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{children:`Results and bugs`}),(0,J.jsx)(jn,{def:{key:`sources.write_back`,label:`Post results back`,help:`To the system each test case came from.`,type:`switch`,default:!0},edit:e,base:[]}),(0,J.jsx)(W,{help:uh.help,children:(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,J.jsx)(zt,{icon:at,size:18}),uh.title]})}),(0,J.jsx)(Nn,{defs:uh.fields,edit:e,base:uh.base})]}),(0,J.jsx)(hO,{panel:o,setPanel:s,isOn:x,onPick:w,onApply:T,vars:h,taken:(e,t)=>t in(e===`mcp`?_:g),groups:E,title:O,onSigned:u})]})}function hO({panel:e,setPanel:t,isOn:n,onPick:r,onApply:a,vars:o,taken:c,groups:l,title:d,onSigned:f}){let p=on(),[m,h]=(0,q.useState)({busy:!1}),[g,_]=(0,q.useState)(null),v=e?.step===`form`?`${e.entry.id}/${e.from}`:e?.step||``;(0,q.useEffect)(()=>{h({busy:!1}),_(null)},[v]);let y=()=>{t(null),h({busy:!1}),_(null)};if(e?.step===`form`){let n=e,r=n.entry.kind,l=e=>t({...n,value:e}),d=r===`teams`||r===`email`||r===`mcp`,v=d&&n.name?cO.test(n.name)?n.name!==n.from&&c(r,n.name)?`Another one has this name.`:``:`Use letters, digits and _ . -`:``,b=r===`mcp`&&K(n.value).command===void 0,x=(!d||n.name&&!v)&&(r!==`mcp`||String(K(n.value)[b?`url`:`command`]||``).trim()),S=n.mode===`add`?`Connect ${n.entry.name}`:`Edit ${d?n.name:n.entry.name}`,C=!(r===`mcp`&&!b)&&!(r===`source`&&lh.find(e=>e.id===n.entry.id)?.untestable);return(0,J.jsxs)(Cn,{open:!0,onClose:y,title:S,description:`Saved as soon as you connect it. Keys and passwords you type are kept in ${Tn(p.store)}, never in the settings files.`,footer:(0,J.jsxs)(J.Fragment,{children:[n.mode===`add`&&(0,J.jsxs)(B,{onClick:()=>t({step:`catalog`}),children:[(0,J.jsx)(be,{"aria-hidden":`true`}),`Back`]}),C&&(0,J.jsxs)(B,{onClick:async()=>{h({busy:!0});let e=Object.fromEntries(Object.entries(p.pending).filter(e=>typeof e[1]==`string`));try{let t=await Mt.test(r,n.entry.id,n.value,e);h({busy:!1,ok:t.ok,message:t.message})}catch(e){h({busy:!1,ok:!1,message:e.message})}},disabled:m.busy,className:`mr-auto`,"data-tip":r===`teams`||r===`email`?`Send a test message`:`Test the connection`,children:[r===`teams`||r===`email`?(0,J.jsx)(se,{"aria-hidden":`true`}):(0,J.jsx)(M,{"aria-hidden":`true`}),m.busy?`Testing…`:`Test`]}),!C&&(0,J.jsx)(`span`,{className:`mr-auto`}),(0,J.jsxs)(B,{onClick:y,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!x,onClick:()=>a(n),children:[n.mode===`add`?(0,J.jsx)(M,{"aria-hidden":`true`}):(0,J.jsx)(s,{"aria-hidden":`true`}),n.mode===`add`?`Connect`:`Done`]})]}),children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3 pt-5 pb-2`,children:[(0,J.jsx)(pn,{icon:n.entry.icon,logo:n.entry.logo,size:`lg`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:n.entry.note})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:m.message&&(0,J.jsxs)(`p`,{role:m.ok?`status`:`alert`,className:z(`mt-2 mb-1 flex items-start gap-2 rounded-[12px] px-3 py-2 text-sm`,m.ok?`bg-pass-soft text-pass`:`bg-fail-soft text-fail`),children:[m.ok?(0,J.jsx)(Ne,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}):(0,J.jsx)(w,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:m.message})]})}),d&&(0,J.jsx)(G,{label:`Name`,help:v?(0,J.jsx)(`span`,{className:`text-fail`,children:v}):r===`mcp`?`Its tools show as <name>_<tool> to ForgeQE's agent.`:`A short name for the channel, such as qa or release.`,htmlFor:`int-name`,stacked:!0,children:(0,J.jsx)(V,{id:`int-name`,value:n.name,spellCheck:!1,"aria-invalid":!!v,placeholder:r===`mcp`?`xray`:`qa`,onChange:e=>t({...n,name:e.target.value.trim()})})}),(r===`source`||r===`grid`)&&nO[n.entry.id]&&(n.mode===`edit`?(0,J.jsx)(Eh,{system:nO[n.entry.id],label:n.entry.name.replace(/ tools$/,``),keyless:r===`source`&&!!lh.find(e=>e.id===n.entry.id)?.signinOnly,onChanged:f}):(0,J.jsxs)(`p`,{className:`m-0 border-t border-line-soft py-3 text-sm text-muted`,children:[`Connect it first; then sign in from Edit, in the browser where `,n.entry.name,` offers that.`]})),r===`source`&&(0,J.jsx)(Nn,{defs:lh.find(e=>e.id===n.entry.id).fields,edit:{value:n.value,set:l,vars:o},base:[],stacked:!0}),r===`source`&&n.mode===`edit`&&(n.entry.id===`azure_devops`||n.entry.id===`jira`)&&Object.values(K(K(n.value).test_cases)).some(e=>String(e??``).trim())&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Try where existing test cases are: how many cases each line, as typed, finds through the saved connection.`}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Object.entries(K(K(n.value).test_cases)).filter(([,e])=>String(e??``).trim()).map(([e,t])=>(0,J.jsxs)(B,{size:`sm`,disabled:g?.busy,onClick:async()=>{_({key:e,busy:!0});try{let r=await At.tryMapping(n.entry.id,e,String(t??``));_({key:e,busy:!1,ok:!0,message:`${e}: ${r.cases} case${r.cases===1?``:`s`}${r.sample.length?`, such as ${r.sample.join(`; `)}`:``}`})}catch(t){_({key:e,busy:!1,ok:!1,message:`${e}: ${t.message}`})}},children:[(0,J.jsx)(u,{"aria-hidden":`true`}),g?.busy&&g.key===e?`Trying…`:`Try ${e}`]},e))}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:g?.message&&(0,J.jsxs)(`p`,{role:g.ok?`status`:`alert`,className:z(`m-0 flex items-start gap-2 rounded-[12px] px-3 py-2 text-sm`,g.ok?`bg-pass-soft text-pass`:`bg-fail-soft text-fail`),children:[g.ok?(0,J.jsx)(Ne,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}):(0,J.jsx)(w,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:g.message})]})})]}),r===`grid`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Nn,{defs:iO[n.entry.id],edit:{value:n.value,set:l,vars:o},base:[`remote`],stacked:!0}),(0,J.jsxs)(`label`,{className:`mt-2 flex min-h-11 cursor-pointer items-center gap-3 text-sm`,children:[(0,J.jsx)($D,{checked:!!n.useGrid,onCheckedChange:e=>t({...n,useGrid:e})}),`Run browser tests here by default`]}),(0,J.jsx)(W,{help:(0,J.jsxs)(J.Fragment,{children:[`Each one the browser settings above with its own on top. Run on several at once with `,(0,J.jsx)(`code`,{className:`font-mono text-[12.5px]`,children:`--devices`}),`.`]}),children:`Browser devices`}),(0,J.jsx)(Np,{edit:{value:n.value,set:l,vars:o},base:[`devices`],defs:aO[n.entry.id],noun:`browser device`,placeholder:`win11-chrome`,meta:e=>[e.browser,e.browser_version,e.platform||[e.os,e.os_version].filter(Boolean).join(` `)].filter(Boolean).map(String).join(`, `)}),(0,J.jsxs)(`p`,{className:`m-0 border-t border-line-soft py-3 text-sm text-muted`,children:[`Its phones and tablets are in this file too: `,(0,J.jsx)(`a`,{href:H(`settings`,`mobile`),children:`Settings → Mobile`}),`.`]})]}),(r===`teams`||r===`email`)&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(gO,{value:n.value,set:l}),r===`teams`||K(n.value).teams?(0,J.jsx)(jn,{def:{key:`teams.webhook_env`,label:`Webhook variable`,help:`The address of a Teams Workflows webhook (post to a channel when a webhook request is received). It is a secret, so it is kept in your credential store.`,type:`var`,placeholder:`TEAMS_WEBHOOK_URL`},edit:{value:n.value,set:l,vars:o},base:[],stacked:!0}):null,r===`email`||K(n.value).email?(0,J.jsx)(Nn,{defs:sO,edit:{value:n.value,set:l,vars:o},base:[`email`],stacked:!0}):null]}),r===`mcp`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`fieldset`,{className:`m-0 border-0 p-0 py-3`,children:[(0,J.jsx)(`legend`,{className:`mb-2 font-medium`,children:`Where it runs`}),[[!0,`A server at an address`],[!1,`A command on this machine`]].map(([e,t])=>(0,J.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-3 text-sm`,children:[(0,J.jsx)(`input`,{type:`radio`,name:`mcp-kind`,checked:b===e,onChange:()=>l(e?{url:``}:{command:``})}),t]},String(e)))]}),b?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(jn,{def:{key:`url`,label:`Address`,type:`url`,placeholder:`https://api.githubcopilot.com/mcp/`},edit:{value:n.value,set:l,vars:o},base:[],stacked:!0}),(0,J.jsx)(_O,{value:n.value,set:l,vars:o})]}):(0,J.jsx)(jn,{def:{key:`command`,label:`Command`,help:`Started by ForgeQE's agent runtime. Name secrets as {env:NAME}, never their values.`,type:`path`,placeholder:`npx -y @triparc/xray-mcp`},edit:{value:n.value,set:l,vars:o},base:[],stacked:!0})]})]})}return(0,J.jsx)(Cn,{open:e?.step===`catalog`,onClose:y,title:d,description:`Pick a service to connect.`,footer:(0,J.jsxs)(B,{onClick:y,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),children:l.map(e=>(0,J.jsxs)(`div`,{className:`pt-4`,children:[(0,J.jsx)(`h3`,{className:`m-0 mb-1 text-sm font-medium text-muted`,children:e}),rO.filter(t=>t.group===e).map(e=>{let t=!e.many&&n(e);return(0,J.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>r(e),className:z(`flex min-h-14 w-full items-center gap-3 rounded-[12px] border-0 bg-transparent px-2 py-2 text-left text-ink`,t?`cursor-default`:`cursor-pointer hover:bg-surface-muted`),children:[(0,J.jsx)(pn,{icon:e.icon,logo:e.logo}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:e.note})]}),(0,J.jsx)(`span`,{className:z(`text-[13px]`,t?`text-pass`:`text-accent-fg`),children:t?`Connected`:e.many?`Add`:`Connect`})]},e.id)})]},e))})}function gO({value:e,set:t}){let n=Array.isArray(e.on)?e.on.map(String):[];return(0,J.jsxs)(`fieldset`,{className:`m-0 border-0 p-0 py-3`,children:[(0,J.jsx)(`legend`,{className:`mb-2 font-medium`,children:`Tell it when`}),(0,J.jsx)(`div`,{className:`grid grid-cols-1 gap-x-4 sm:grid-cols-2`,children:dh.map(([r,i])=>(0,J.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-2 text-sm`,children:[(0,J.jsx)($D,{checked:n.includes(r),onCheckedChange:i=>t({...e,on:i?[...n,r]:n.filter(e=>e!==r)})}),i]},r))})]})}function _O({value:e,set:t,vars:n}){let r=String(K(e.headers).Authorization||``),i=/\{env:([A-Za-z_][A-Za-z0-9_]*)\}/.exec(r)?.[1]||``;return(0,J.jsx)(jn,{def:{key:`token`,label:`Token`,help:`Sent as a bearer token. Leave it empty for none.`,type:`var`,placeholder:`MCP_TOKEN`},edit:{value:{token:i},set:n=>{let r=String(n.token||``),i={...K(e.headers)};r?i.Authorization=`Bearer {env:${r}}`:delete i.Authorization,t(Object.keys(i).length?{...e,headers:i}:(({headers:e,...t})=>t)(e))},vars:n},base:[],stacked:!0})}var vO=[{key:`checks`,label:`Checks`,help:`Test case sources, comma separated: files or folders, jira:…, ado:…, testrail:…`,type:`list`,placeholder:`checks/smoke.yaml, jira:SHOP-12`},{key:`every`,label:`How often`,help:`30s, 15m, 1h or 1h30m; at least 10s.`,type:`text`,default:`15m`},{key:`replay`,label:`Checking a recorded run`,help:`Verify: one model call per check confirms the result. Trust: none.`,type:`select`,default:`verify`,options:[{value:`verify`,label:`Verify`},{value:`trust`,label:`Trust`}]},{key:`parallel`,label:`Checks at once`,type:`number`,default:1},{key:`write_back`,label:`Post each round's results`,help:`To the system each check came from.`,type:`switch`,default:!1}],yO=[{key:`fail_after`,label:`Failing rounds before the first alert`,help:`2 or more rides out a flaky run.`,type:`number`,default:1},{key:`remind_every`,label:`Remind while it keeps failing`,help:`Every 2h, for example. Empty: never.`,type:`text`,placeholder:`2h`},{key:`report_url`,label:`Where rounds are published`,help:`Alerts link each round's report there.`,type:`url`,placeholder:`https://reports.example.com/monitor`},{key:`keep`,label:`Rounds kept`,help:`Older round folders are deleted.`,type:`number`,default:100},{key:`out_dir`,label:`Round folder`,help:`Rounds and state.json: which checks are failing, and since when.`,type:`path`,default:`./.forgeqe/reports/monitor`}];function bO({kind:e,settings:t}){let n=on(),[r,i]=(0,q.useState)({busy:!1});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 py-2`,children:[(0,J.jsxs)(B,{size:`sm`,className:`self-start`,"data-tip":`Send a test message`,disabled:r.busy,onClick:async()=>{i({busy:!0});let r=Object.fromEntries(Object.entries(n.pending).filter(e=>typeof e[1]==`string`));try{let n=await Mt.test(e,e,t,r);i({busy:!1,ok:n.ok,message:n.message})}catch(e){i({busy:!1,ok:!1,message:e.message})}},children:[(0,J.jsx)(se,{"aria-hidden":`true`}),r.busy?`Sending…`:`Test`]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:r.message&&(0,J.jsxs)(`p`,{role:r.ok?`status`:`alert`,className:z(`m-0 flex items-start gap-2 rounded-[12px] px-3 py-2 text-sm`,r.ok?`bg-pass-soft text-pass`:`bg-fail-soft text-fail`),children:[r.ok?(0,J.jsx)(Ne,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}):(0,J.jsx)(w,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:r.message})]})})]})}function xO({edit:e}){let t=K(Cr(e.value,[`monitor`,`alerts`])),n=(t,n)=>e.set(U(e.value,[`monitor`,`alerts`,t],n));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`mt-0 mb-2 text-sm text-muted`,children:[`Start it with `,(0,J.jsx)(`code`,{className:`rounded-md bg-surface-strong px-1.5 py-0.5 font-mono text-[13px]`,children:`forgeqe monitor`}),`, or as a schedule.`]}),(0,J.jsx)(W,{first:!0,children:`What runs`}),(0,J.jsx)(Nn,{defs:vO,edit:e,base:[`monitor`]}),(0,J.jsx)(W,{children:`When to alert`}),(0,J.jsx)(Nn,{defs:yO,edit:e,base:[`monitor`]}),(0,J.jsx)(W,{help:`The monitor's own alerts: when a check starts failing, keeps failing, or recovers.`,children:`Alerts`}),(0,J.jsx)(G,{label:`Microsoft Teams`,help:`A channel's Workflows webhook.`,children:(0,J.jsx)(Rn,{checked:!!t.teams,onChange:e=>n(`teams`,e?{webhook_env:`TEAMS_MONITOR_WEBHOOK_URL`}:void 0),label:`Alert in Microsoft Teams`})}),!!t.teams&&(0,J.jsxs)(`div`,{className:`rounded-[14px] bg-surface-muted px-4 pb-2`,children:[(0,J.jsx)(jn,{def:{key:`teams.webhook_env`,label:`Webhook address`,help:`Kept in your credential store.`,type:`var`,placeholder:`TEAMS_MONITOR_WEBHOOK_URL`},edit:e,base:[`monitor`,`alerts`],stacked:!0}),(0,J.jsx)(bO,{kind:`teams`,settings:{teams:K(t.teams)}})]}),(0,J.jsx)(G,{label:`Email`,help:`The same alerts by email.`,children:(0,J.jsx)(Rn,{checked:!!t.email,onChange:e=>n(`email`,e?{port:587}:void 0),label:`Alert by email`})}),!!t.email&&(0,J.jsxs)(`div`,{className:`rounded-[14px] bg-surface-muted px-4 pb-2`,children:[(0,J.jsx)(Nn,{defs:sO,edit:e,base:[`monitor`,`alerts`,`email`],stacked:!0}),(0,J.jsx)(bO,{kind:`email`,settings:{email:K(t.email)}})]})]})}function SO(e){return $p(e).body.replace(/<!--[\s\S]*?(-->|$)/g,``).split(/\r?\n/).filter(e=>/^\s*(?:[-*+]|\d+[.)])\s+\S/.test(e)).length}var CO=65536;function wO({rules:e,others:t,onChange:n,onChanged:a}){let{data:o,error:c,reload:l}=cn(nn.files),[u,d]=(0,q.useState)(`rules`),[f,p]=(0,q.useState)(``),[m,h]=(0,q.useState)(null),[g,_]=(0,q.useState)(!1),[v,y]=(0,q.useState)(``),[b,x]=(0,q.useState)(``),S=(0,q.useRef)(null),C=f.toLowerCase().split(/\s+/).filter(Boolean),w=(0,q.useMemo)(()=>(o?.files||[]).filter(e=>C.every(t=>`${e.name} ${e.description} ${e.text} ${(e.agents||[]).map(e=>Mn(e).name).join(` `)}`.toLowerCase().includes(t))),[o,f]),T=e=>(y(``),x(``),h(e)),E=()=>({name:``,description:``,every:!0,agents:[],text:``}),D=async(e,t)=>{_(!0),y(``);try{await e(),h(null),l(),a(t)}catch(e){y(e.message)}finally{_(!1)}};if(!o)return(0,J.jsx)(Zn,{error:c,reload:l});let O=o.agents,k=[{id:`rules`,label:`All rules`,n:e.length+t.length},{id:`files`,label:`Guardrail files`,n:o.files.length}],A=e=>e?.length?(0,J.jsx)(Zp,{names:e,max:2}):(0,J.jsx)(`span`,{className:`text-[12.5px] text-ink-2`,children:`Every agent`}),j=m?SO(m.text):0,M=m&&!m.every?m.agents:[],N=m?{name:m.name,description:m.description,agents:M,text:m.text}:null;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pb-3`,children:[(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:k.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":u===e.id,onClick:()=>d(e.id),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,u===e.id?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[e.label,(0,J.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:e.n})]},e.id))}),u===`files`&&(0,J.jsx)(Vt,{id:`find-guardrails`,label:`Find guardrails`,value:f,onChange:p,placeholder:`Find guardrails or an agent`}),(0,J.jsxs)(B,{variant:`primary`,"data-tip":`Add guardrails`,onClick:()=>T(E()),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),u===`rules`&&(0,J.jsx)(Dp,{rules:e,others:t,onChange:n}),u===`files`&&(o.files.length===0?(0,J.jsxs)(Wt,{icon:Xe,title:`No guardrail files yet`,action:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add guardrails`,onClick:()=>T(E()),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]}),children:[`Paste or upload a Markdown file of rules, one "- rule" line each: "- Never open a production URL" for every agent, or "- Use only the test cards in knowledge/test-data.md" for the Browser and Coding agents. Saved in `,o.dir,`, shared with the project.`]}):(0,J.jsx)(`div`,{className:`@container`,children:(0,J.jsx)(Wn,{label:`Guardrail files`,search:!1,empty:`No guardrails match.`,head:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`th`,{className:`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,children:`Guardrails`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Applies to`}),(0,J.jsx)(`th`,{className:z(`px-3 py-1.5 text-left text-[11.5px] font-medium whitespace-nowrap text-muted`,`text-right`),children:`Rules`})]}),children:w.map(e=>{let t=()=>T({name:e.name,description:e.description,every:!e.agents,agents:e.agents||[],text:e.text,existing:e.name});return(0,J.jsxs)(`tr`,{onClick:t,className:`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,children:[(0,J.jsxs)(`td`,{className:z(`px-3 py-2`,`min-w-0`),children:[(0,J.jsxs)(`button`,{type:`button`,onClick:e=>(e.stopPropagation(),t()),className:`flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left`,children:[(0,J.jsx)(Xe,{size:15,strokeWidth:1.8,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),(0,J.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-ink hover:underline`,children:e.name})]}),(0,J.jsx)(`span`,{className:`mt-0.5 line-clamp-1 text-[13px] text-muted`,children:e.description||e.text.split(`
|
|
64
|
+
`).find(e=>e.trim())||``})]}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`hidden w-[34%] @2xl:table-cell`),children:A(e.agents)}),(0,J.jsx)(`td`,{className:z(`px-3 py-2`,`w-[1%] text-right whitespace-nowrap`),children:(0,J.jsx)(`span`,{className:`rounded-full bg-surface-strong px-2 py-0.5 text-[12px] font-medium whitespace-nowrap text-muted tabular-nums`,children:kt(e.rules,`rule`)})})]},e.name)})})})),(0,J.jsx)(Cn,{wide:!0,open:!!m,onClose:()=>h(null),title:m?.existing?`Edit ${m.existing}`:`Add guardrails`,description:(0,J.jsxs)(J.Fragment,{children:[`Rules the chosen agents must follow, from their next start. Saved in `,(0,J.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[o.dir,`/`,m?.name||`name`,`.md`]}),`, shared with the project.`]}),footer:(0,J.jsxs)(J.Fragment,{children:[v&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:v}),m?.existing&&(0,J.jsxs)(B,{disabled:g,onClick:()=>m.existing&&D(()=>nn.remove(m.existing),`Removed ${m.existing}.`),className:`mr-auto text-fail`,children:[(0,J.jsx)(Je,{"aria-hidden":`true`}),`Delete`]}),(0,J.jsxs)(B,{onClick:()=>h(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:g||!m?.name||!m.every&&!m.agents.length||!j,onClick:()=>m&&N&&D(()=>m.existing?nn.save(m.existing,N):nn.add(N),`${m.existing?`Saved`:`Added`} ${m.name}: ${kt(j,`rule`)} for ${m.every?`every agent`:m.agents.map(e=>Mn(e).name).join(`, `)}, from their next start.`),children:[m?.existing?(0,J.jsx)(s,{"aria-hidden":`true`}):(0,J.jsx)(r,{"aria-hidden":`true`}),g?`Saving…`:m?.existing?`Save`:`Add`]})]}),children:m&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Name`}),(0,J.jsx)(V,{value:m.name,disabled:!!m.existing,placeholder:`payments-rules`,onChange:e=>h({...m,name:e.target.value.toLowerCase().replace(/[^a-z0-9-]+/g,`-`).slice(0,48)}),className:`font-mono`}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Lowercase letters, digits and dashes.`})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`What it is for`}),(0,J.jsx)(V,{value:m.description,maxLength:200,placeholder:`Keep runs off real cards and accounts`,onChange:e=>h({...m,description:e.target.value})})]}),(0,J.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,J.jsx)(`legend`,{className:`mb-1.5 p-0 font-medium`,children:`Agents that follow it`}),(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Agents that follow it`,className:`flex w-fit gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[!0,`Every agent`],[!1,`Chosen agents`]].map(([e,t])=>(0,J.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":m.every===e,onClick:()=>h({...m,every:e}),className:z(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,m.every===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:t},t))}),!m.every&&(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:O.map(e=>{let t=m.agents.includes(e.name);return(0,J.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":t,"data-tip":e.title,onClick:()=>h({...m,agents:t?m.agents.filter(t=>t!==e.name):[...m.agents,e.name]}),className:z(`inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-[8px] border px-3 text-[13px] font-medium`,t?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[(0,J.jsx)(Qn,{agent:e.name,px:18,decorative:!0}),Mn(e.name).name]},e.name)})}),(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:m.every?`Every agent ForgeQE runs, and your custom agents, follow these rules.`:m.agents.length?`${m.agents.length===1?`Only this agent follows`:`Only these ${m.agents.length} agents follow`} these rules. Custom agents follow every guardrail.`:`Pick at least one agent.`})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,J.jsx)(`label`,{htmlFor:`guardrails-text`,className:`font-medium`,children:`Rules`}),(0,J.jsx)(`input`,{ref:S,type:`file`,accept:`.md,.markdown,.txt`,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`,onChange:async e=>{let t=e.target.files?.[0];if(e.target.value=``,!t)return;if(y(``),t.size>CO)return y(`${t.name} is over 64 KB.`);let{head:n,body:r}=$p((await t.text()).replace(/\r\n/g,`
|
|
65
|
+
`)),i=r.trim(),a=e=>RegExp(`^${e}:\\s*(.*?)\\s*$`,`m`).exec(n)?.[1]||``,o=a(`for`).split(/[,\s]+/).filter(e=>O.some(t=>t.name===e)),s=a(`description`).replace(/^"(.*)"$/,`$1`),c=m.name||t.name.replace(/\.[^.]+$/,``).toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48);h({...m,name:m.existing?m.name:c,text:i,description:m.description||s,...o.length?{every:!1,agents:o}:{}}),x(`From ${t.name}: ${kt(SO(i),`rule`)}${o.length?`, for ${o.map(e=>Mn(e).name).join(`, `)}`:``}.`)}}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Upload a .md file`,onClick:()=>S.current?.click(),children:[(0,J.jsx)(ot,{"aria-hidden":`true`}),`Upload`]})]}),(0,J.jsx)(Zt,{id:`guardrails-text`,rows:14,spellCheck:!0,value:m.text,placeholder:`# Payments
|
|
66
|
+
|
|
67
|
+
- Never open a production URL.
|
|
68
|
+
- Use only the test cards in knowledge/test-data.md.`,onChange:e=>(x(``),h({...m,text:e.target.value})),className:`leading-[1.6]`}),(0,J.jsx)(`span`,{role:`status`,className:z(`text-[12.5px]`,m.text.trim()&&!j?`text-warn`:`text-muted`),children:b||(m.text.trim()&&!j?`No rules yet: start each rule on a line of its own with "- ".`:`${kt(j,`rule`)}. Paste Markdown or upload a .md file: each "- " line is a rule; headings and other lines explain them and are not sent.`)})]})]})})]})}var TO=m({SETTINGS_INDEX:()=>kO}),EO=[`theme.logo`,`theme.logo_mark`,`theme.logo_frame`,`theme.logo_size`,`theme.icon_style`,`theme.icon_set`,`theme.icon_colour`,`theme.name`,`theme.primary`,`theme.gradient`,`theme.secondary`,`theme.background`,`agent.names.*`,`agent.app_name`,`llm.models_file`,`llm.active`,`llm.routing`,`llm.fallback`,`llm.routes.*`,`llm.agents.*`,`environments.file`,`environments.dir`,`environments.default`,`logins.*.url`,`logins.*.domains`,`logins.*.username_env`,`logins.*.password_env`,`logins.*.totp_env`,`logins.*.save_session`,`logins.*.app`,`logins.*.code`,`logins.*.code_host`,`logins.*.code_user_env`,`logins.*.code_secret_env`,`logins.*.code_to`,`logins.*.code_sender`,`logins.*.code_folder`,`logins.*.code_url`,`logins.*.code_header`,`logins.*.code_pattern`,`logins.*.code_wait`,`logins.*.passkey_env`,`logins.*.push_wait`,`browser.providers.browserstack`,`browser.providers.testmu`,`notify.report_url`,`notify.channels.*.teams`,`notify.channels.*.email`,`notify.channels.*.on`,`mcp.*.url`,`mcp.*.headers`,`mcp.*.command`,`mcp.*.env`,...[`checks`,`every`,`replay`,`parallel`,`write_back`,`fail_after`,`remind_every`,`report_url`,`keep`,`out_dir`,`alerts.teams.webhook_env`,`alerts.email.host`,`alerts.email.port`,`alerts.email.username_env`,`alerts.email.password_env`,`alerts.email.from`,`alerts.email.to`].map(e=>`monitor.${e}`),...[`enabled`,`external`,`dirs`,`browser_max_chars`,`disable`].map(e=>`skills.${e}`),...[`run`,`day`,`month`,`currency`].map(e=>`budget.${e}`),...[`run`,`day`,`month`].map(e=>`budget.premium_requests.${e}`),`export.format`];[...(e=>e.flatMap(e=>e.fields.map(t=>[...e.base,t.key].join(`.`))))([...$m,...eh,...th,...mh,...nh,...oh,...ch,...hh,...vh,...yh,...bh,...fh,uh]),...lh.flatMap(e=>e.fields.length?e.fields.map(t=>[...e.base,t.key].join(`.`)):[e.base.join(`.`)]),...Ch.map(e=>`containers.services.*.${e.key}`),...Sh.map(e=>`product.repos.*.${e.key}`),...sh.map(e=>`product.accounts.*.${e.key}`),...xh.map(e=>`product.docs.*.${e.key}`),...wh.map(e=>`databases.*.${e.key}`),...ph.map(e=>`bi.datasets.*.${e.key}`),..._h.map(e=>`mobile.devices.*.${e.key}`),...EO];var DO=(e,t)=>t.flatMap(t=>t.fields.map(n=>({section:e,label:n.label,key:[...t.base,n.key].join(`.`)}))),OO=(e,t,n)=>n.map(n=>({section:e,label:n.label,key:`${t}.*.${n.key}`})),kO=[...DO(`browser`,$m),...DO(`tests`,eh),...DO(`runs`,[...th,...fh]),...OO(`runs`,`bi.datasets`,ph),...DO(`parallel`,mh),...DO(`quality`,nh),...DO(`evidence`,oh),...OO(`evidence`,`product.accounts`,sh),...OO(`evidence`,`product.repos`,Sh),...OO(`evidence`,`product.docs`,xh),...DO(`agents`,ch),...DO(`mobile`,[...hh,...vh]),...OO(`mobile`,`mobile.devices`,_h),...DO(`desktop`,yh),...DO(`containers`,bh),...OO(`containers`,`containers.services`,Ch),...OO(`databases`,`databases`,wh),...DO(`integrations`,[uh]),...lh.flatMap(e=>e.fields.map(t=>({section:e.group===`tools`?`mcp`:`integrations`,label:`${e.name}: ${t.label}`,key:[...e.base,t.key].join(`.`)}))),{section:`integrations`,label:`Post results back`,key:`sources.write_back`},{section:`integrations`,label:`Remote browser grids`,key:`browser.providers`},{section:`models`,label:`Models file`,key:`llm.models_file`},{section:`models`,label:`Profile in use`,key:`llm.active`},{section:`routing`,label:`Routing`,key:`llm.routing`},{section:`routing`,label:`Fall back to a working model`,key:`llm.fallback`},{section:`routing`,label:`An agent's own model`,key:`llm.agents`},{section:`routing`,label:`Areas of work`,key:`llm.routes`},{section:`environments`,label:`Environments file`,key:`environments.file`},{section:`environments`,label:`Environments folder`,key:`environments.dir`},{section:`environments`,label:`Active environment`,key:`environments.default`},{section:`signins`,label:`Sign-ins`,key:`logins`},{section:`notifications`,label:`Teams and email channels`,key:`notify.channels`},{section:`notifications`,label:`Where reports are published`,key:`notify.report_url`},{section:`appearance`,label:`Logo`,key:`theme.logo`},{section:`appearance`,label:`Small logo`,key:`theme.logo_mark`},{section:`appearance`,label:`Logo frame`,key:`theme.logo_frame`},{section:`appearance`,label:`Logo size`,key:`theme.logo_size`},{section:`appearance`,label:`Icon style`,key:`theme.icon_style`},{section:`appearance`,label:`Icons (3D, Phosphor, Solar or Lucide)`,key:`theme.icon_set`},{section:`appearance`,label:`Icon colour`,key:`theme.icon_colour`},{section:`appearance`,label:`Name beside the logo`,key:`theme.name`},{section:`appearance`,label:`Sidebar colour (primary)`,key:`theme.primary`},{section:`appearance`,label:`Sidebar gradient`,key:`theme.gradient`},{section:`appearance`,label:`Buttons and highlights colour (secondary)`,key:`theme.secondary`},{section:`appearance`,label:`Page background`,key:`theme.background`},{section:`mcp`,label:`MCP servers`,key:`mcp`},{section:`monitor`,label:`Monitor checks, schedule and alerts`,key:`monitor`},{section:`monitor`,label:`Monitor alerts by Teams or email`,key:`monitor.alerts`},{section:`skills`,label:`Skills`,key:`skills`},{section:`tokenomics`,label:`Spending budgets`,key:`budget`},{section:`about`,label:`Version and updates`,key:`forgeqe update`},{section:`about`,label:`Guides: user guide, how to use, architecture`,key:`forgeqe docs`},{section:`report`,label:`Report a problem in ForgeQE (raise a bug)`,key:`forgeqe bug report`},{section:`notifications`,label:`Send a test notification`,key:`forgeqe notify test`},{section:`agents`,label:`Agent names`,key:`agent.names`},{section:`agents`,label:`ForgeQE's name (rename the app)`,key:`agent.app_name`},{section:`evidence`,label:`Check the agent's domain knowledge`,key:`forgeqe eval domain`},{section:`generated`,label:`Generated code still in the repository`,key:`forgeqe generated`}],AO=`font-mono text-[13px] [overflow-wrap:anywhere]`;function jO({ok:e,children:t}){return(0,J.jsxs)(`p`,{role:e?`status`:`alert`,className:z(`m-0 flex items-start gap-2 rounded-[12px] px-3 py-2 text-sm leading-relaxed`,e?`bg-pass-soft text-pass`:`bg-fail-soft text-fail`),children:[e?(0,J.jsx)(Ne,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}):(0,J.jsx)(n,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t})]})}function MO({open:e,start:t,onClose:n,onPick:a}){let[o,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(!1),_=(0,q.useCallback)(async e=>{f(``);try{let t=await St.folders(e);c(t),u(t.path)}catch(e){f(e.message)}},[]);(0,q.useEffect)(()=>{e?_(t||void 0):(m(null),f(``))},[e,t,_]);let v=async()=>{if(o&&p!==null){f(``);try{let e=await St.newFolder(o.path,p);c(e),u(e.path),m(null)}catch(e){f(e.message)}}};return(0,J.jsxs)(Cn,{open:e,onClose:n,wide:!0,title:`Choose the project folder`,description:`The folder of the app or test repository ForgeQE works on. Its settings, reports and logs are kept in it.`,footer:(0,J.jsxs)(J.Fragment,{children:[o?.project&&(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-pass`,children:`ForgeQE is set up here`}),(0,J.jsxs)(B,{onClick:n,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!o||h,onClick:async()=>{g(!0);try{await a(o.path)}catch(e){f(e.message)}finally{g(!1)}},"data-tip":`Use this folder`,children:[(0,J.jsx)(s,{"aria-hidden":`true`}),`Use`]})]}),children:[(0,J.jsxs)(`form`,{className:`flex gap-2 pt-5`,onSubmit:e=>{e.preventDefault(),_(l.trim())},children:[(0,J.jsx)(`label`,{htmlFor:`folder-path`,className:`sr-only`,children:`Folder path`}),(0,J.jsx)(V,{id:`folder-path`,value:l,spellCheck:!1,onChange:e=>u(e.target.value),className:`font-mono`,placeholder:`/Users/you/shop`}),(0,J.jsxs)(B,{size:`sm`,type:`submit`,children:[(0,J.jsx)(Ue,{"aria-hidden":`true`}),`Go`]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2 pt-3`,children:[(0,J.jsxs)(B,{size:`sm`,disabled:!o?.parent,onClick:()=>o?.parent&&void _(o.parent),children:[(0,J.jsx)($e,{"aria-hidden":`true`}),`Up`]}),(0,J.jsxs)(B,{size:`sm`,onClick:()=>void _(o?.home),children:[(0,J.jsx)(E,{"aria-hidden":`true`}),`Home`]}),(0,J.jsxs)(B,{size:`sm`,disabled:!o,"data-tip":`New folder`,onClick:()=>m(``),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`New`]})]}),p!==null&&(0,J.jsxs)(`form`,{className:`flex flex-wrap gap-2 pt-3`,onSubmit:e=>{e.preventDefault(),v()},children:[(0,J.jsx)(`label`,{htmlFor:`new-folder`,className:`sr-only`,children:`New folder's name`}),(0,J.jsx)(V,{id:`new-folder`,autoFocus:!0,value:p,placeholder:`my-shop-tests`,onChange:e=>m(e.target.value),className:`flex-[1_1_200px]`}),(0,J.jsxs)(B,{size:`sm`,type:`submit`,variant:`primary`,disabled:!p.trim(),"data-tip":`Make the folder`,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Create`]}),(0,J.jsxs)(B,{size:`sm`,onClick:()=>m(null),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,className:`pt-3`,children:d&&(0,J.jsx)(jO,{ok:!1,children:d})}),o&&(0,J.jsxs)(`ul`,{"aria-label":`Folders in ${o.path}`,className:`m-0 mt-2 flex list-none flex-col p-0`,children:[o.folders.length===0&&(0,J.jsx)(`li`,{className:`border-t border-line-soft py-4 text-sm text-muted`,children:`No folders in here.`}),o.folders.map(e=>(0,J.jsx)(`li`,{className:`border-t border-line-soft`,children:(0,J.jsxs)(`button`,{type:`button`,onClick:()=>void _(e.path),className:`flex min-h-12 w-full cursor-pointer items-center gap-3 border-0 bg-transparent px-2 text-left text-ink hover:bg-surface-muted`,children:[e.project?(0,J.jsx)(lt,{size:18,"aria-hidden":`true`,className:`flex-none text-pass`}):(0,J.jsx)(zt,{icon:Se,size:18,className:`flex-none text-muted`}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:e.name}),e.project&&(0,J.jsx)(It,{tone:`pass`,children:`ForgeQE`})]})},e.path))]})]})}function NO({report:e}){let t=[...new Set(e.rows.map(e=>e.group))];return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(jO,{ok:!e.missing&&!e.outdated,children:e.missing||e.outdated?`${e.missing} missing and ${e.outdated} out of date. Install what's missing puts back the browser engine and the agent runtime; the others say what installs them.`:`Every package ForgeQE needs now is installed.`}),t.map(t=>(0,J.jsxs)(`ul`,{"aria-label":t,className:`m-0 flex list-none flex-col p-0`,children:[(0,J.jsx)(`li`,{className:`pt-3 pb-1 text-sm font-medium text-ink-2`,children:t}),e.rows.filter(e=>e.group===t).map(e=>(0,J.jsxs)(`li`,{className:`flex min-h-[48px] flex-wrap items-center gap-x-4 gap-y-1 border-t border-line-soft py-2`,children:[(0,J.jsx)(`span`,{className:z(`min-w-0 flex-[1_1_180px]`,AO),children:e.name}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-[2_1_240px] text-sm text-muted [overflow-wrap:anywhere]`,children:[e.status===`ok`?e.installed||`Installed`:e.status===`missing`?`Needs ${e.wanted}`:`${e.installed} installed, needs ${e.wanted}`,e.status!==`ok`&&(0,J.jsxs)(J.Fragment,{children:[` · Fix: `,/^forgeqe /.test(e.fix)?(0,J.jsx)(`code`,{className:`font-mono text-[12px]`,children:e.fix}):e.fix]})]}),(0,J.jsx)(It,{tone:e.status===`ok`?`pass`:e.later?`neutral`:`warn`,children:e.status===`ok`?`Installed`:e.later?`When first used`:e.status===`missing`?`Missing`:`Out of date`})]},e.name))]},t))]})}function PO({state:e,onState:t}){let[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)({busy:!1}),[c,l]=(0,q.useState)(null),[u,d]=(0,q.useState)(``),[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)({busy:!1}),g=async()=>{h({busy:!0});try{h({busy:!1,report:await St.packages()})}catch(e){h({busy:!1,error:e.message})}},v=(0,q.useCallback)(()=>{d(``),St.machine().then(l,e=>d(e.message))},[]);(0,q.useEffect)(v,[v,e.project,e.ready]);let y=!!c?.job?.running;(0,q.useEffect)(()=>{if(!y)return;let e=setInterval(v,1500);return()=>clearInterval(e)},[y,v]),(0,q.useEffect)(()=>{!y&&m.report&&g()},[y]);let b=async e=>{let n=await St.open(e);s({busy:!1}),t(n),a(!1)},x=c?.job,S=c?.checks.filter(e=>!/^(Models?\b|Copilot sign-in)/.test(e.name))||[],C=S.filter(e=>!e.ok&&/forgeqe setup/.test(e.fix||``));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{first:!0,help:`The folder of the project ForgeQE works on: an app, its tests, or both. ForgeQE keeps its settings, reports and logs there.`,children:`1. Project folder`}),(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(pn,{icon:e.ready?lt:Se}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:z(`font-medium`,AO),children:e.project}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:e.ready?`ForgeQE is set up here (${e.config}).`:`ForgeQE is not set up in this folder yet.`})]}),(0,J.jsxs)(B,{size:`sm`,"data-tip":e.ready?`Open another folder`:`Choose a folder`,onClick:()=>a(!0),children:[(0,J.jsx)(ct,{"aria-hidden":`true`}),`Browse`]})]}),e.recent.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Recent projects`,className:`m-0 flex list-none flex-col p-0`,children:e.recent.map(e=>(0,J.jsxs)(`li`,{className:`flex min-h-[56px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-2 pl-[52px]`,children:[(0,J.jsx)(`span`,{className:z(`min-w-0 flex-[1_1_260px] text-ink-2`,AO),children:e}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Open ${e}`,"data-tip":`Open ${e}`,onClick:()=>void b(e).catch(e=>d(e.message)),children:(0,J.jsx)(Ue,{"aria-hidden":`true`})})]},e))}),(0,J.jsx)(W,{help:`forgeqe.yaml, llms.json, env.yaml and a .forgeqe folder with prompts, skills and guardrails to change. Files already there are kept.`,children:`2. ForgeQE in this folder`}),(0,J.jsx)(G,{label:e.ready?`Set up`:`Not set up yet`,help:e.ready?`${e.config} is in this folder, so every section of Settings is open.`:`Until it is, the other sections of Settings stay locked: there is nothing for them to change.`,children:e.ready?(0,J.jsx)(It,{tone:`pass`,children:`Done`}):(0,J.jsxs)(B,{size:`sm`,variant:`primary`,"data-tip":`Set up this folder`,disabled:o.busy,onClick:async()=>{s({busy:!0});try{let e=await St.init();s({busy:!1,result:e}),t(e.setup)}catch(e){s({busy:!1,error:e.message})}},children:[(0,J.jsx)(_,{"aria-hidden":`true`}),o.busy?`Setting up…`:`Set up`]})}),(0,J.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,children:[o.error&&(0,J.jsx)(jO,{ok:!1,children:o.error}),o.result&&(0,J.jsxs)(jO,{ok:!o.result.failed.length,children:[o.result.created.length?`Made ${o.result.created.join(`, `)}.`:`Nothing new was needed.`,o.result.failed.length>0&&` Could not write: ${o.result.failed.join(`; `)}.`]})]}),(0,J.jsx)(W,{help:`What ForgeQE runs with: its browser engine and the agent runtime. Installing them needs no admin rights${c?`. ForgeQE ${c.version}`:``}.`,children:`3. This computer`}),u&&(0,J.jsx)(jO,{ok:!1,children:u}),!c&&!u&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`Checking this computer…`}),c&&(0,J.jsx)(`ul`,{"aria-label":`What this computer has`,className:`m-0 flex list-none flex-col p-0`,children:S.map(e=>(0,J.jsxs)(`li`,{className:`flex min-h-[56px] items-start gap-3 border-t border-line-soft py-3`,children:[e.ok?(0,J.jsx)(Ne,{size:18,"aria-label":`Ready`,className:`mt-0.5 flex-none text-pass`}):(0,J.jsx)(n,{size:18,"aria-label":`Missing`,className:`mt-0.5 flex-none text-warn`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,J.jsxs)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:[e.detail,!e.ok&&e.fix&&(0,J.jsxs)(J.Fragment,{children:[`. `,/forgeqe setup/.test(e.fix)?`Install, below, sets it up.`:e.fix]})]})]})]},e.name))}),c&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 border-t border-line-soft py-4`,children:[(0,J.jsx)(B,{size:`sm`,variant:C.length?`primary`:`outline`,"data-tip":C.length?`Install what's missing`:`Check and repair`,disabled:y||f,onClick:async()=>{p(!0);try{await St.run(),v()}catch(e){d(e.message)}finally{p(!1)}},children:y?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Gt,{state:`handing`,px:16}),`Installing…`]}):C.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(tt,{"aria-hidden":`true`}),`Install`]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ie,{"aria-hidden":`true`}),`Repair`]})}),(0,J.jsxs)(B,{size:`sm`,disabled:m.busy,onClick:()=>void g(),"data-tip":`Find missing packages: lists every package ForgeQE installs here, with the version it needs and the one installed`,children:[(0,J.jsx)(ue,{"aria-hidden":`true`}),m.busy?`Finding…`:`Find`]}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Install runs forgeqe setup. The first time it downloads a few hundred MB and takes a few minutes.`})]}),(0,J.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,children:[m.error&&(0,J.jsx)(jO,{ok:!1,children:m.error}),m.report&&(0,J.jsx)(NO,{report:m.report})]}),x&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[!x.running&&(0,J.jsx)(jO,{ok:!!x.ok,children:x.ok?`forgeqe setup finished.`:`forgeqe setup stopped with a problem. The last lines below say what.`}),(0,J.jsx)(`pre`,{"aria-label":`forgeqe setup output`,"aria-live":`polite`,className:`m-0 max-h-[280px] overflow-auto rounded-[12px] bg-surface-muted px-4 py-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2 [overflow-wrap:anywhere]`,children:x.lines.length?x.lines.join(`
|
|
69
|
+
`):`Starting…`})]}),(0,J.jsx)(W,{help:`At least one model with its key or sign-in, for the agents to think with.`,children:`4. A model`}),(0,J.jsx)(G,{label:c?.model.ready?`Ready`:`Not yet`,help:c?.model.detail||``,children:e.ready?(0,J.jsxs)(`a`,{className:rn({variant:c?.model.ready?`outline`:`primary`}),href:H(`settings`,`models`),"data-tip":c?.model.ready?`Open Models`:`Add a model`,children:[c?.model.ready?(0,J.jsx)(Ue,{"aria-hidden":`true`}):(0,J.jsx)(r,{"aria-hidden":`true`}),c?.model.ready?`Models`:`Add`]}):(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`After step 2`})}),e.ready&&(0,J.jsx)(Pm,{}),(0,J.jsx)(MO,{open:i,start:e.project,onClose:()=>a(!1),onPick:b})]})}var FO={"notify-test":[`Sending a test card`,`Sent a test card`,`working`],"update-check":[`Looking for a new version`,`Looked for a new version`,`searching`],update:[`Updating ForgeQE`,`Updated ForgeQE`,`working`],"eval-domain":[`Checking the agent's domain knowledge`,`Checked the agent's domain knowledge`,`thinking`]};function IO(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(``),i=(0,q.useCallback)(()=>Ct.view().then(t,e=>r(e.message)),[]);(0,q.useEffect)(()=>void i(),[i]);let a=!!e?.job?.running;return(0,q.useEffect)(()=>{if(!a)return;let e=setInterval(i,1e3);return()=>clearInterval(e)},[a,i]),{view:e,error:n,run:async(e,t={})=>{r(``);try{await Ct.run(e,t),i()}catch(e){r(e.message)}},running:a,load:i}}function LO({job:t,kinds:n,onStop:r}){let i=(0,q.useRef)(null);if((0,q.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[t?.lines.length]),!t||!n.includes(t.kind))return null;let[a,o,s]=FO[t.kind];return(0,J.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 rounded-[12px] card border p-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`flex-1 text-sm font-medium`,children:t.running?a:o}),(0,J.jsx)(It,{tone:t.running?`running`:t.exitCode===0?`pass`:`fail`,orb:s,children:t.running?`Working`:t.exitCode===0?`Done`:`Did not finish`}),t.running&&(0,J.jsxs)(B,{size:`sm`,variant:`danger`,onClick:r,children:[(0,J.jsx)(e,{fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,J.jsx)(`pre`,{ref:i,className:`m-0 max-h-[260px] overflow-auto rounded-[10px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:t.lines.join(`
|
|
70
|
+
`)||`Starting…`})]})}function RO({text:e,note:t,yes:n,icon:r,onYes:a,onNo:o}){return(0,J.jsxs)(`div`,{role:`alertdialog`,"aria-label":e,className:`mt-3 flex flex-col gap-2 rounded-[12px] border border-warn bg-warn-soft p-3`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:e}),(0,J.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:t}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsxs)(B,{size:`sm`,variant:`primary`,onClick:a,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),n]}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Not now`,onClick:o,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Later`]})]})]})}var zO=6e4;function BO({view:e,onError:t}){let[n,r]=(0,q.useState)(!1),[i,a]=(0,q.useState)(!1);if(!e.running||!e.version||e.running===e.version)return null;let o=async()=>{r(!1);try{await Ct.restart()}catch(e){t(e.message);return}a(!0);let n=Date.now()+zO;for(;Date.now()<n;){await new Promise(e=>setTimeout(e,1e3));try{if((await Ct.view()).running!==e.running)return location.reload()}catch{}}a(!1),t(`forgeqe web did not come back. Start it again in its terminal; this page reconnects with the address it prints.`)};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Installed`,help:e.restart?`This page runs ${e.running}. Restart forgeqe web to use ${e.version}.`:`This page runs ${e.running}. Start forgeqe web again in its terminal to use ${e.version}.`,children:(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[15px]`,children:e.version}),e.restart&&(0,J.jsxs)(B,{size:`sm`,variant:`primary`,disabled:i,"data-tip":`Restart forgeqe web`,onClick:()=>r(!0),children:[(0,J.jsx)(D,{"aria-hidden":`true`}),i?`Restarting…`:`Restart`]})]})}),n&&(0,J.jsx)(RO,{text:`Restart forgeqe web with ${e.version}?`,note:`Open chats close; a message carries each one on. It waits for nothing at work: stop it first. This page reconnects by itself.`,yes:`Restart`,icon:D,onYes:()=>void o(),onNo:()=>r(!1)})]})}function VO(){let{view:e,error:n,run:r,running:i}=IO(),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(!1),l=e?.job,u=l?.kind===`update-check`&&!l.running?l.lines.join(`
|
|
71
|
+
`):``,d=/installs (\d[\w.-]*)/.exec(u)?.[1];return(0,J.jsxs)(J.Fragment,{children:[(n||a)&&(0,J.jsx)(`p`,{className:`m-0 mb-3 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:n||a}),(0,J.jsx)(G,{label:`Version`,help:d?`${d} is out.`:u&&/latest/.test(u)?`This is the latest.`:`forgeqe update installs a new one for every forgeqe on this computer (bun, npm, pip).`,className:`border-t-0 pt-0`,children:(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[15px]`,children:e?e.running||e.version:`…`}),(0,J.jsxs)(B,{size:`sm`,disabled:i,"data-tip":`Check for updates`,onClick:()=>void r(`update-check`),children:[(0,J.jsx)(t,{"aria-hidden":`true`}),`Check`]}),(0,J.jsxs)(B,{size:`sm`,variant:d?`primary`:`outline`,disabled:i,"data-tip":d?`Update to ${d}`:`Update to the latest version`,onClick:()=>c(!0),children:[(0,J.jsx)(D,{"aria-hidden":`true`}),`Update`]})]})}),s&&(0,J.jsx)(RO,{text:`Update ForgeQE${d?` to ${d}`:` to the latest version`} on this computer?`,note:`It replaces every forgeqe on PATH. When it is done, restart forgeqe web from here; on Windows the update starts once ForgeQE exits.`,yes:`Update`,icon:D,onYes:()=>{c(!1),r(`update`,{confirmed:!0})},onNo:()=>c(!1)}),(0,J.jsx)(LO,{job:l,kinds:[`update-check`,`update`],onStop:()=>void Ct.stop()}),e&&(0,J.jsx)(BO,{view:e,onError:o}),(0,J.jsx)(W,{children:`Guides`}),[[`User guide`,`Every feature, with examples, in one page.`,e?.help.guide],[`How to use`,`The full reference: settings, commands and how each feature works.`,e?.help.howTo],[`Architecture`,`How ForgeQE is built: its agents, the engine and where data goes.`,e?.help.architecture]].map(([e,t,n])=>(0,J.jsx)(G,{label:e,help:t,children:(0,J.jsxs)(`a`,{href:n||`#`,target:`_blank`,rel:`noreferrer noopener`,className:rn({size:`sm`}),children:[(0,J.jsx)(Ke,{"aria-hidden":`true`}),`Open`]})},e))]})}function HO(){let{view:e,error:t,run:n,running:r}=IO(),[i,a]=(0,q.useState)(``);return e?.channels.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`A card says it is a test and which events each channel gets; nothing else is sent.`,children:`Send a test`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsxs)(qt,{"aria-label":`Channel`,value:i,onChange:e=>a(e.target.value),className:`w-[220px]`,children:[(0,J.jsx)(`option`,{value:``,children:`Every channel`}),e.channels.map(e=>(0,J.jsx)(`option`,{children:e},e))]}),(0,J.jsxs)(B,{size:`sm`,disabled:r,"data-tip":`Send a test`,onClick:()=>void n(`notify-test`,i?{channel:i}:{}),children:[(0,J.jsx)(se,{"aria-hidden":`true`}),`Test`]})]}),t&&(0,J.jsx)(`p`,{className:`m-0 mt-2 text-sm text-fail`,children:t}),(0,J.jsx)(LO,{job:e.job,kinds:[`notify-test`],onStop:()=>void Ct.stop()})]}):null}function UO(){let{view:e,error:t,run:n,running:r}=IO(),[i,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(!1);return e?.evalCases.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`Runs stories from ForgeQE's evaluation cases (banking, insurance, lending, privacy) with the domain declared and without, and scores how many domain and regulation expectations the agent's test design meets. It makes model calls for each case.`,children:`Check the agent's domain knowledge`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsxs)(qt,{"aria-label":`Cases`,value:i,onChange:e=>a(e.target.value),className:`w-[320px] max-w-full`,children:[(0,J.jsxs)(`option`,{value:``,children:[`All `,e.evalCases.length,` cases`]}),e.evalCases.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.title},e.id))]}),(0,J.jsxs)(B,{size:`sm`,disabled:r,"data-tip":`Run the domain check`,onClick:()=>s(!0),children:[(0,J.jsx)(u,{"aria-hidden":`true`}),`Run`]})]}),o&&(0,J.jsx)(RO,{text:`Run ${i?`one case`:`all ${e.evalCases.length} cases`} of the domain check?`,note:`Each case is a model session with the domain and one without, plus a judge; it takes a few minutes and costs tokens.`,yes:`Run`,icon:u,onYes:()=>{s(!1),n(`eval-domain`,{confirmed:!0,...i?{only:[i]}:{}})},onNo:()=>s(!1)}),t&&(0,J.jsx)(`p`,{className:`m-0 mt-2 text-sm text-fail`,children:t}),(0,J.jsx)(LO,{job:e.job,kinds:[`eval-domain`],onStop:()=>void Ct.stop()})]}):null}function WO(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(``);if((0,q.useEffect)(()=>{Ct.generated().then(t,e=>r(e.message))},[]),n)return(0,J.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:n});if(!e)return(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});let i=(e,t)=>t?`${Math.round(e/t*100)}%`:`–`;return e.runs?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`mt-0 mb-4 text-sm text-muted`,children:[`In `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.repo}),`, from .forgeqe/generated.jsonl: every line ForgeQE added, checked against the files as they are now.`]}),(0,J.jsxs)(Hn,{label:`Generated code`,children:[(0,J.jsx)(pr,{label:`Lines written`,value:e.written.toLocaleString(),note:`${kt(e.files,`file`)}: ${e.created} created, ${e.edited} edited`}),(0,J.jsx)(pr,{label:`Still in the code`,value:i(e.present,e.written),note:`${e.present.toLocaleString()} lines`}),(0,J.jsx)(pr,{label:`Share of those files`,value:i(e.present,e.totalLines),note:`of ${e.totalLines.toLocaleString()} lines`}),(0,J.jsx)(pr,{label:`Files it created`,value:String(e.headers.unchanged),note:`as written; ${e.headers.changed} changed, ${e.headers.removed} gone`})]}),(0,J.jsx)(W,{children:`By run, newest first`}),(0,J.jsx)(wn,{label:`Runs that wrote code`,head:[`Run`,`Files`,`Lines still there`],children:e.byRun.map(e=>(0,J.jsx)(un,{cells:[(0,J.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[12px]`,children:e.fq}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted [overflow-wrap:anywhere]`,children:[e.run,e.test?` · ${e.test}`:``]})]},`r`),e.files,`${e.present} of ${e.written}`]},e.fq))}),e.missing.length>0&&(0,J.jsxs)(`p`,{className:`m-0 mt-3 text-[13px] text-muted [overflow-wrap:anywhere]`,children:[`Not found now: `,e.missing.slice(0,10).join(`, `)]})]}):(0,J.jsxs)(`p`,{className:`m-0 flex items-center gap-2 text-sm text-muted`,children:[(0,J.jsx)(zt,{icon:ze,size:16}),`ForgeQE has not written code in `,!e.repo||e.repo===`.`?`this repository`:(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.repo}),` yet.`]})}function GO(e){let t=e?Date.parse(e):NaN;if(Number.isNaN(t))return``;let n=Math.max(0,(Date.now()-t)/1e3);if(n<60)return`just now`;if(n<3600)return`${Math.floor(n/60)} min ago`;if(n<21600)return`${Math.floor(n/3600)} h ago`;let r=new Date(t);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):n<518400?r.toLocaleString([],{weekday:`short`,hour:`2-digit`,minute:`2-digit`}):r.toLocaleDateString([],{day:`numeric`,month:`short`})}function KO(e,t=new Date){let n=e?new Date(e):null;if(!n||Number.isNaN(n.getTime()))return`Older`;let r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return n.getTime()>=r?`Today`:n.getTime()>=r-864e5?`Yesterday`:n.getTime()>=r-5184e5?`Earlier this week`:`Older`}var qO={critical:`Critical: ForgeQE cannot start, or loses or exposes data`,high:`High: a main feature does not work`,medium:`Medium: there is a workaround`,low:`Low: small or cosmetic`},JO=3,YO={done:`finished`,failed:`failed`,stopped:`stopped`,running:`running`};function XO(e){let[t,n]=(0,q.useState)(null),[r,i]=(0,q.useState)(``),a=(0,q.useCallback)(()=>Kt.view(e).then(n,e=>i(e.message)),[e]);(0,q.useEffect)(()=>void a(),[a]);let o=!!t?.job?.running;return(0,q.useEffect)(()=>{if(!o)return;let e=setInterval(a,1e3);return()=>clearInterval(e)},[o,a]),{view:t,error:r,setError:i,load:a,running:o}}function ZO({draft:e,areas:t,severities:n,onChange:r}){let i=(0,q.useId)(),a=(t,n)=>r({...e,[t]:n});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Title`,htmlFor:`${i}-title`,stacked:!0,className:`border-t-0 pt-0`,children:(0,J.jsx)(V,{id:`${i}-title`,value:e.title,maxLength:200,onChange:e=>a(`title`,e.target.value)})}),(0,J.jsx)(G,{label:`What happened`,htmlFor:`${i}-summary`,stacked:!0,children:(0,J.jsx)(Zt,{id:`${i}-summary`,rows:4,value:e.summary,maxLength:4e3,onChange:e=>a(`summary`,e.target.value)})}),(0,J.jsx)(G,{label:`Steps to reproduce`,help:`One step on each line.`,htmlFor:`${i}-steps`,stacked:!0,children:(0,J.jsx)(Zt,{id:`${i}-steps`,rows:4,value:e.steps.join(`
|
|
72
|
+
`),onChange:e=>a(`steps`,e.target.value.split(`
|
|
73
|
+
`))})}),(0,J.jsx)(G,{label:`Expected result`,htmlFor:`${i}-expected`,stacked:!0,children:(0,J.jsx)(Zt,{id:`${i}-expected`,rows:2,value:e.expected,maxLength:2e3,onChange:e=>a(`expected`,e.target.value)})}),(0,J.jsx)(G,{label:`Actual result`,help:`Copy an error message exactly.`,htmlFor:`${i}-actual`,stacked:!0,children:(0,J.jsx)(Zt,{id:`${i}-actual`,rows:2,value:e.actual,maxLength:2e3,onChange:e=>a(`actual`,e.target.value)})}),(0,J.jsx)(G,{label:`Severity`,htmlFor:`${i}-severity`,children:(0,J.jsx)(qt,{id:`${i}-severity`,value:e.severity,onChange:e=>a(`severity`,e.target.value),children:n.map(e=>(0,J.jsx)(`option`,{value:e,children:qO[e]??e},e))})}),(0,J.jsx)(G,{label:`Area`,htmlFor:`${i}-area`,children:(0,J.jsx)(qt,{id:`${i}-area`,value:e.area,onChange:e=>a(`area`,e.target.value),children:t.map(e=>(0,J.jsx)(`option`,{value:e,children:e[0].toUpperCase()+e.slice(1)},e))})})]})}var QO=e=>e<1024?`${e} bytes`:`${Math.round(e/1024)} KB`;function $O(){let[e,t]=(0,q.useState)(null),{view:n,error:a,setError:o,load:s,running:c}=XO(e),l=(0,q.useId)(),[u,d]=(0,q.useState)(``),[f,p]=(0,q.useState)(null),[m,h]=(0,q.useState)([]),[g,_]=(0,q.useState)({}),[v,y]=(0,q.useState)(null),[b,x]=(0,q.useState)([]),[C,w]=(0,q.useState)(``),[T,E]=(0,q.useState)(!1),[O,k]=(0,q.useState)(``),[A,j]=(0,q.useState)(null),M=(0,q.useRef)(null),N=(0,q.useRef)(null),P=n?.job;(0,q.useEffect)(()=>{P&&!P.running&&N.current!==P&&(N.current=P,P.error?o(P.error):P.kind===`draft`&&P.result?(p(P.result.draft),h(P.result.questions),_({})):P.kind===`send`&&P.result&&j(P.result))},[P,o]);let F=n?.attachments??[],I=n?.session??void 0,L=v??new Set(F.filter(e=>e.picked).map(e=>e.id)),ee=e=>{t(e),y(null)},te=(e,t)=>{let n=new Set(L);t?n.add(e):n.delete(e),y(n)},ne=async e=>{o(``);try{await Kt.draft(e),s()}catch(e){o(e.message)}},re=()=>void ne({session:I,description:u,current:f??void 0,answers:m.map(e=>({question:e,answer:g[e]??``}))}),R=async e=>{o(``);for(let t of Array.from(e??[]).slice(0,JO-b.length))try{let e=await wi(t);if(e.type!==`image/png`&&e.type!==`image/jpeg`)throw Error(`${t.name}: use a PNG or JPEG picture.`);x(t=>[...t,{name:e.name,url:`data:${e.type};base64,${e.data}`}])}catch(e){o(e.message)}},ie=async()=>{if(f){E(!1),o(``);try{await Kt.send({session:I,draft:f,attach:[...L],images:b.map(e=>e.url),contact:C.trim()||void 0,confirmed:!0}),s()}catch(e){o(e.message)}}},ae=async()=>{if(f){o(``);try{let{text:e}=await Kt.text(f);await navigator.clipboard.writeText(e),k(`Copied. Paste it into an email or a Teams message to the ForgeQE team.`)}catch(e){o(e.message)}}},oe=()=>{d(``),t(null),p(null),h([]),_({}),x([]),y(null),j(null),k(``)};if(!n)return a?(0,J.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:a}):(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});let ce=n.intake.url&&(n.intake.key||n.intake.entra),le=A?.url&&/^https:\/\/dev\.azure\.com\/[^\s"<>]+$/.test(A.url)?A.url:null;return A?(0,J.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`m-0 text-sm text-ink-2`,children:[A.existing?`This problem was already reported, so your report was added to bug `:`Thank you. The ForgeQE team has your report as bug `,le?(0,J.jsxs)(`a`,{href:le,target:`_blank`,rel:`noreferrer noopener`,className:`font-medium text-ink no-underline hover:underline`,children:[`#`,A.id]}):(0,J.jsxs)(`span`,{className:`font-medium`,children:[`#`,A.id]}),` `,`in `,n.target,`.`]}),(0,J.jsx)(`div`,{children:(0,J.jsxs)(B,{size:`sm`,"data-tip":`Report another problem`,onClick:oe,children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`New`]})})]}):(0,J.jsxs)(J.Fragment,{children:[a&&(0,J.jsx)(`p`,{role:`alert`,className:`m-0 mb-3 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:a}),(0,J.jsx)(W,{first:!0,help:n.sessions.length?`ForgeQE looked at your recent sessions and picked the one that went wrong. Pick another if that is not the one.`:`ForgeQE has no session on this computer to look at. Say what went wrong in your own words.`,children:`What went wrong`}),n.sessions.length>0&&(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Session to report`,children:n.sessions.map(e=>(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3 first:border-t-0`,children:[(0,J.jsx)(lm,{checked:n.session===e.name,onSelect:()=>ee(e.name),label:`Report ${e.title}`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.title}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:[`forgeqe ${e.command}`,GO(e.startedAt),YO[e.status]].join(` · `)}),e.error&&(0,J.jsx)(`span`,{className:`text-sm text-fail [overflow-wrap:anywhere]`,children:e.error})]}),e.problem&&(0,J.jsx)(It,{tone:`fail`,children:`Went wrong`})]},e.name))}),n.findings&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`From the session's log, with secrets removed. The bug is drafted from this. Test cases that failed are your app's results, so they are only counted.`,children:`What ForgeQE found`}),(0,J.jsxs)(`dl`,{className:`m-0 flex flex-col gap-3 text-sm`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`dt`,{className:`font-medium text-ink`,children:`What was asked or run`}),(0,J.jsx)(`dd`,{className:`m-0 font-mono text-[13px] text-ink-2 [overflow-wrap:anywhere]`,children:n.findings.request})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`dt`,{className:`font-medium text-ink`,children:`ForgeQE's errors`}),(0,J.jsx)(`dd`,{className:`m-0`,children:n.findings.errors.length?(0,J.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0`,children:n.findings.errors.map(e=>(0,J.jsx)(`li`,{className:`rounded-[10px] bg-surface-muted px-3 py-2 font-mono text-[12px] leading-relaxed text-ink-2 [overflow-wrap:anywhere]`,children:e},e))}):(0,J.jsx)(`span`,{className:`text-ink-2`,children:`None logged. Say below what went wrong.`})})]}),n.findings.facts.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`dt`,{className:`font-medium text-ink`,children:`Also`}),(0,J.jsx)(`dd`,{className:`m-0`,children:(0,J.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-0.5 pl-5 text-ink-2`,children:n.findings.facts.map(e=>(0,J.jsx)(`li`,{className:`[overflow-wrap:anywhere]`,children:e},e))})})]})]})]}),(0,J.jsx)(G,{label:n.findings?`Anything to add`:`Describe the problem`,help:n.findings?`Optional: what you were trying to do, or what you expected.`:void 0,htmlFor:`${l}-description`,stacked:!0,className:n.findings?void 0:`border-t-0 pt-0`,children:(0,J.jsx)(Zt,{id:`${l}-description`,rows:n.findings?3:5,value:u,maxLength:8e3,placeholder:n.findings?`For example: I expected the run to open the login page.`:`For example: I clicked Run on a test case in the web app and nothing happened for ten minutes.`,onChange:e=>d(e.target.value)})}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-2`,children:[(0,J.jsxs)(B,{size:`sm`,variant:f?`outline`:`primary`,disabled:c||!I&&u.trim().length<10,"data-tip":f?`Draft again`:`Draft the bug`,onClick:()=>void ne({session:I,description:u}),children:[(0,J.jsx)(He,{"aria-hidden":`true`}),`Draft`]}),c&&P?.kind===`draft`&&(0,J.jsx)(It,{tone:`running`,orb:`thinking`,children:`Drafting`})]}),m.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`Answer what you can, then update the draft. You can leave a question empty.`,children:`Questions`}),m.map((e,t)=>(0,J.jsx)(G,{label:e,htmlFor:`${l}-q${t}`,stacked:!0,className:t===0?`border-t-0 pt-0`:void 0,children:(0,J.jsx)(Zt,{id:`${l}-q${t}`,rows:2,value:g[e]??``,maxLength:2e3,onChange:t=>_(n=>({...n,[e]:t.target.value}))})},e)),(0,J.jsx)(`div`,{className:`pt-2`,children:(0,J.jsxs)(B,{size:`sm`,disabled:c||!Object.values(g).some(e=>e.trim()),"data-tip":`Update the draft`,onClick:re,children:[(0,J.jsx)(D,{"aria-hidden":`true`}),`Update`]})})]}),f&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`Check each field and change what is not right. This is what the ForgeQE team reads.`,children:`The bug`}),(0,J.jsx)(ZO,{draft:f,areas:n.areas,severities:n.severities,onChange:p}),(0,J.jsx)(W,{help:`Secrets ForgeQE knows are replaced in every file. Open a log first if you are not sure what is in it: it can show addresses and test data of your project.`,children:`What is attached`}),(0,J.jsxs)(`ul`,{"aria-label":`Attachments`,className:`m-0 list-none p-0`,children:[F.map(e=>(0,J.jsx)(`li`,{className:`border-t border-line-soft`,children:(0,J.jsxs)(`label`,{className:`flex min-h-12 cursor-pointer items-center gap-3 py-2`,children:[(0,J.jsx)($D,{checked:L.has(e.id),onCheckedChange:t=>te(e.id,t)}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[13px] [overflow-wrap:anywhere]`,children:e.name}),(0,J.jsxs)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:[e.note,` · `,QO(e.bytes)]})]})]})},e.id)),b.map((e,t)=>(0,J.jsxs)(`li`,{className:`flex min-h-12 items-center gap-3 border-t border-line-soft py-2`,children:[(0,J.jsx)(`img`,{src:e.url,alt:`Screenshot ${t+1}`,className:`h-10 w-16 rounded-[8px] border border-line-soft bg-surface-muted object-cover`}),(0,J.jsx)(`span`,{className:`flex-1 font-mono text-[13px] [overflow-wrap:anywhere]`,children:e.name}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${e.name}`,"data-tip":`Remove ${e.name}`,onClick:()=>x(t=>t.filter(t=>t!==e)),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]},e.url))]}),(0,J.jsxs)(`div`,{className:`pt-2`,children:[(0,J.jsx)(`input`,{ref:M,type:`file`,accept:`image/png,image/jpeg`,multiple:!0,hidden:!0,onChange:e=>void R(e.target.files).then(()=>e.target.value=``)}),(0,J.jsxs)(B,{size:`sm`,disabled:b.length>=JO,"data-tip":`Add a screenshot`,onClick:()=>M.current?.click(),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),(0,J.jsx)(W,{children:`Send`}),(0,J.jsx)(G,{label:`Your contact`,help:`Optional: an email or a Teams name, so the team can ask you about it.`,htmlFor:`${l}-contact`,className:`border-t-0 pt-0`,children:(0,J.jsx)(V,{id:`${l}-contact`,value:C,maxLength:200,onChange:e=>w(e.target.value)})}),n.intake.url?!ce&&(0,J.jsx)(G,{label:`Intake key`,help:`Sign in to your organization with the Azure CLI (az login), or save the key the ForgeQE team gave you. It is kept in your credential store when you save.`,htmlFor:`${l}-key`,children:(0,J.jsx)(_n,{id:`${l}-key`,name:n.keyEnv,field:`Intake key`})}):(0,J.jsx)(G,{label:`Not set up yet`,help:`ForgeQE's defect intake is not set up on this computer. Copy the report and send it to the ForgeQE team.`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-2`,children:[(0,J.jsxs)(B,{size:`sm`,variant:`primary`,disabled:c||!ce||!f.title.trim()||!f.summary.trim(),"data-tip":`Send to the ForgeQE team`,onClick:()=>E(!0),children:[(0,J.jsx)(se,{"aria-hidden":`true`}),`Send`]}),(0,J.jsxs)(B,{size:`sm`,disabled:!f.title.trim()||!f.summary.trim(),"data-tip":`Copy as text`,onClick:()=>void ae(),children:[(0,J.jsx)(S,{"aria-hidden":`true`}),`Copy`]}),c&&P?.kind===`send`&&(0,J.jsx)(It,{tone:`running`,children:`Sending`})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:O&&(0,J.jsx)(`p`,{className:`m-0 mt-2 text-sm text-ink-2`,children:O})}),T&&(0,J.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Send this bug?`,className:`mt-3 flex flex-col gap-2 rounded-[12px] border border-warn bg-warn-soft p-3`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Send this bug to the ForgeQE team?`}),(0,J.jsxs)(`span`,{className:`text-[13px] text-ink-2`,children:[`It is filed in `,n.target,` with the fields above`,L.size+b.length?`, and ${L.size+b.length} attached file${L.size+b.length===1?``:`s`}: ${[...F.filter(e=>L.has(e.id)).map(e=>e.name),...b.map(e=>e.name)].join(`, `)}`:`, with nothing attached`,`.`]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsxs)(B,{size:`sm`,variant:`primary`,onClick:()=>void ie(),children:[(0,J.jsx)(se,{"aria-hidden":`true`}),`Send`]}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Not now`,onClick:()=>E(!1),children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Later`]})]})]})]})]})}function ek({config:e}){let{saved:t,preview:n,reload:r}=Un(),i=K(Cr(e.value,[`agent`,`names`])),a=Yn(i),o=Cr(e.value,[`agent`,`app_name`]),s=typeof o==`string`?o:``,c=ur(s),l=JSON.stringify([a,c]);return(0,q.useEffect)(()=>n({...t,agentNames:a,appName:c}),[l,t]),(0,q.useEffect)(()=>()=>{n(null),r()},[n,r]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{icon:Ze,help:(0,J.jsx)(`span`,{"data-keep-name":!0,children:`What the web app calls ForgeQE itself: in every page, message and tab title, and in the reports and documents it writes. Commands, files and settings keep forgeqe. Empty keeps ForgeQE.`}),children:(0,J.jsx)(`span`,{"data-keep-name":!0,children:`ForgeQE's name`})}),(0,J.jsx)(G,{label:(0,J.jsx)(`span`,{"data-keep-name":!0,children:`App name`}),help:(0,J.jsx)(`span`,{"data-keep-name":!0,children:`Instead of ForgeQE, for everyone who opens this project.`}),htmlFor:`agent-app-name`,yamlKey:`agent.app_name`,children:(0,J.jsx)(V,{id:`agent-app-name`,"data-keep-name":!0,value:s,maxLength:40,placeholder:`ForgeQE`,onChange:t=>e.set(U(e.value,[`agent`,`app_name`],t.target.value.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]/g,``)||void 0)),className:`w-full`})}),(0,J.jsx)(W,{icon:dt,help:`Call each agent what your team calls it: the name shows in chats, on the Agents page and in the terminal, for everyone who opens this project. What it does and may do stay the same. Empty keeps ForgeQE's name.`,children:`Agent names`}),rr.map(t=>{let n=vn(t).name,r=`agent-name-${t}`,a=typeof i[t]==`string`?i[t]:``;return(0,J.jsx)(G,{label:(0,J.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,J.jsx)(Qn,{agent:t,px:22,decorative:!0}),n]}),help:t,htmlFor:r,yamlKey:`agent.names.${t}`,children:(0,J.jsx)(V,{id:r,value:a,maxLength:40,placeholder:n,onChange:n=>e.set(U(e.value,[`agent`,`names`,t],n.target.value.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]/g,``)||void 0)),className:`w-full`})},t)})]})}var tk=524288,nk=[`image/png`,`image/jpeg`,`image/webp`,`image/svg+xml`];async function rk(e){let t=new Uint8Array(await e.arrayBuffer()),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}function ik({children:e,className:t}){return(0,J.jsx)(`div`,{className:z(`flex w-full flex-wrap items-center gap-2 sm:justify-end`,t),children:e})}function ak({colour:e,label:t}){return(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm text-ink-2`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`size-4 flex-none rounded-[4px] border border-line`,style:{background:e}}),t&&(0,J.jsx)(`span`,{className:`text-muted`,children:t}),(0,J.jsx)(`code`,{className:`font-mono text-[12.5px]`,children:e})]})}function ok({onUse:e}){let t=(0,q.useId)(),[n,r]=(0,q.useState)(``),[i,a]=(0,q.useState)(!1),[o,c]=(0,q.useState)(``),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(!1);return(0,J.jsx)(G,{label:`From a website`,help:`Suggests its sidebar, button and page colours. Nothing changes until you use them.`,htmlFor:t,children:(0,J.jsxs)(ik,{children:[(0,J.jsxs)(`form`,{className:`flex w-full items-center gap-2`,onSubmit:async e=>{e.preventDefault(),a(!0),c(``),u(null),f(!1);try{u(await xt.fromUrl(n.trim()))}catch(e){c(e.message)}finally{a(!1)}},children:[(0,J.jsx)(V,{id:t,type:`url`,value:n,placeholder:`https://www.example.com`,spellCheck:!1,onChange:e=>r(e.target.value),className:`min-w-0 flex-1`}),(0,J.jsxs)(B,{size:`sm`,type:`submit`,disabled:!n.trim()||i,"data-tip":`Read the site's colours`,children:[(0,J.jsx)(ot,{"aria-hidden":`true`}),i?`Importing…`:`Import`]})]}),o&&(0,J.jsx)(`p`,{role:`alert`,className:`m-0 w-full text-[13px] text-fail sm:text-right`,children:o}),l&&(0,J.jsxs)(`div`,{role:`status`,className:`flex w-full flex-col gap-2 sm:items-end`,children:[(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`From `,new URL(l.url).host]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 sm:justify-end`,children:[l.primary&&(0,J.jsx)(ak,{colour:l.primary,label:`Sidebar`}),l.gradient&&(0,J.jsx)(ak,{colour:l.gradient,label:`Gradient`}),l.secondary&&(0,J.jsx)(ak,{colour:l.secondary,label:`Buttons`}),l.background&&(0,J.jsx)(ak,{colour:l.background,label:`Page`})]}),(0,J.jsxs)(B,{size:`sm`,variant:`primary`,onClick:()=>{e(l),f(!0)},"data-tip":`Use these colours`,children:[(0,J.jsx)(s,{"aria-hidden":`true`}),d?`Used`:`Use`]}),l.palette.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 sm:justify-end`,children:[(0,J.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`Others:`}),l.palette.map(e=>(0,J.jsx)(ak,{colour:e},e))]})]})]})})}function sk({label:e,help:t,yamlKey:n,value:r,fallback:i,check:a,onChange:o}){let s=(0,q.useId)(),[c,l]=(0,q.useState)(r);(0,q.useEffect)(()=>l(r),[r]);let u=Sr(c),d=c.trim()!==``&&!u?`Write a colour as #rrggbb, for example #0b1f3a.`:u&&a?a(u):``;return(0,J.jsx)(G,{label:e,help:d?(0,J.jsx)(`span`,{className:`text-fail`,children:d}):t,htmlFor:s,yamlKey:n,children:(0,J.jsxs)(ik,{className:`flex-nowrap`,children:[(0,J.jsx)(`input`,{type:`color`,"aria-label":`${e}: pick a colour`,value:Sr(r)||i||`#ffffff`,onChange:e=>o(a?.(e.target.value)?``:e.target.value),className:`size-10 flex-none cursor-pointer rounded-[8px] border border-line bg-bg p-1`}),(0,J.jsx)(V,{id:s,value:c,spellCheck:!1,placeholder:i?`${i} (default)`:`None`,"aria-invalid":!!d,onChange:e=>{l(e.target.value);let t=Sr(e.target.value);(t&&!a?.(t)||!e.target.value.trim())&&o(t||``)},className:`min-w-0 flex-1 font-mono`})]})})}function ck({which:e,label:t,yamlKey:n,value:r,url:i,savedError:a,onChange:o}){let[s,c]=(0,q.useState)(``),[l,u]=(0,q.useState)(!1),d=(0,q.useRef)(null),f=e===`mark`?`small logo`:`logo`;return(0,J.jsx)(G,{label:t,help:s||r&&!i&&a?(0,J.jsx)(`span`,{className:`text-fail`,children:s||a}):e===`mark`?`For the narrow sidebar. Square or round works best.`:`In the sidebar, reports and documents. PNG, JPEG or WebP (a large one is made smaller), or SVG up to 512 KB; an empty margin round it is cut off.`,yamlKey:n,children:(0,J.jsxs)(ik,{children:[i&&(0,J.jsx)(`span`,{className:z(`theme-side flex h-12 items-center justify-center rounded-[8px] border border-line`,e===`mark`?`w-12`:`min-w-16 px-3`),children:(0,J.jsx)(`img`,{src:i,alt:`The ${f}`,className:z(`block object-contain`,e===`mark`?`max-h-9 max-w-9`:`max-h-8 max-w-[140px]`)})}),(0,J.jsx)(`input`,{ref:d,type:`file`,accept:`.png,.jpg,.jpeg,.webp,.svg`,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`,onChange:async t=>{let n=t.target.files?.[0];if(t.target.value=``,n){if(c(``),!nk.includes(n.type))return c(`A ${f} is a PNG, JPEG, WebP or SVG image.`);if(n.type===`image/svg+xml`&&n.size>tk)return c(`${n.name} is over 512 KB.`);if(n.size>20971520)return c(`${n.name} is over ${Vn/1024/1024} MB: save a smaller copy and upload that.`);u(!0);try{let t=await $n(n,tk),r=await xt.uploadLogo(await rk(t),t.type,e);o(r.file,(e===`mark`?r.view.logoMark:r.view.logo)||``)}catch(e){c(e.message)}finally{u(!1)}}}}),(0,J.jsxs)(B,{size:`sm`,disabled:l,"data-tip":i?`Change the ${f}`:`Upload a ${f}`,onClick:()=>d.current?.click(),children:[i?(0,J.jsx)(ie,{"aria-hidden":`true`}):(0,J.jsx)(ot,{"aria-hidden":`true`}),l?`Uploading…`:i?`Change`:`Upload`]}),r&&(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove the ${f}`,"data-tip":`Remove the ${f}`,onClick:()=>o(``),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})]})})}var lk={auto:`Auto (recommended)`,plain:`Plain`,tiles:`On tiles`,outline:`Outlined`,mono:`One colour`};function uk(e){for(let{item:t}of er)if(t.icon===e||Kn[t.id]===e)return t.label;for(let t of gn)if(Mn(t.agent).icon===e)return Mn(t.agent).name;return e}function dk({draft:e,value:t,onChange:n}){let{mode:r}=Un(),i=Dn(e,void 0,r),a=ln(e)!==`3d`,o=!a&&t!==`mono`&&t!==`outline`&&i.lowest<2,s=o?`${i.faint.length||`Some`} ${i.faint.length===1?`icon is`:`icons are`} hard to see on this colour${i.faint.length?` (${i.faint.slice(0,2).map(e=>uk(e.icon)).join(`, `)}${i.faint.length>2?`, …`:``})`:``}. Try Auto or On tiles.`:!a&&t===`auto`&&i.style!==`plain`?`Auto put them on tiles: this colour hides some of them.`:``;return(0,J.jsx)(G,{label:`Sidebar icons`,help:a?`For the 3D icons. Flat icons take the Icon colour above.`:`Auto puts them on tiles when the sidebar's colour hides any.`,htmlFor:`theme-icons`,yamlKey:`theme.icon_style`,children:(0,J.jsxs)(ik,{children:[(0,J.jsx)(qt,{id:`theme-icons`,value:t,disabled:a,onChange:e=>n(e.target.value),className:`w-full`,children:Gn.map(e=>(0,J.jsx)(`option`,{value:e,children:lk[e]},e))}),!a&&(0,J.jsx)(fk,{}),s&&(0,J.jsx)(`span`,{className:z(`w-full text-[13px] sm:text-right`,o?`text-warn`:`text-muted`),children:s})]})})}function fk(){let e=[`record`,`data`,`jobs`,`guardrails`].map(e=>Kn[e]).concat([`orchestrator`,`healer`,`browser-agent`]);return(0,J.jsx)(`span`,{"aria-label":`How the sidebar's icons look`,className:`theme-side flex w-full items-center justify-between rounded-[10px] border border-line-soft px-3 py-2`,children:e.map(e=>(0,J.jsx)(Nt,{name:e,px:18},e))})}var pk={phosphor:`Phosphor Duotone (default)`,solar:`Solar Bold Duotone`,lucide:`Lucide (buttons and menus too)`,"3d":`3D (ForgeQE's pixel icons)`};function mk({value:e,onChange:t}){return(0,J.jsx)(G,{label:`Icons`,help:`Flat icons are black, or the Icon colour below, so they show on any sidebar.`,htmlFor:`theme-icon-set`,yamlKey:`theme.icon_set`,children:(0,J.jsxs)(ik,{children:[(0,J.jsx)(qt,{id:`theme-icon-set`,value:e,onChange:e=>t(e.target.value),className:`w-full`,children:qn.map(e=>(0,J.jsx)(`option`,{value:e,children:pk[e]},e))}),(0,J.jsx)(fk,{})]})})}var hk={text:`Black, white in dark mode (default)`,accent:`The buttons' colour`,custom:`A colour of their own`};function gk({draft:e,value:t,onChange:n}){let{mode:r}=Un(),i=Bn({iconColour:t}),a=ln(e)!==`3d`,[o,s]=(0,q.useState)(i===`custom`?t:``);(0,q.useEffect)(()=>s(i===`custom`?t:``),[t,i]);let c=i===`custom`&&o.trim()!==``&&!Sr(o)?`Write a colour as #rrggbb, for example #7c3aed.`:``,l=a?br(e,r).moved:[],u=l.length?`Made ${r===`dark`?`lighter`:`darker`} on the ${l.join(` and the `)} so the icons show.`:``;return(0,J.jsx)(G,{label:`Icon colour`,help:c?(0,J.jsx)(`span`,{className:`text-fail`,children:c}):a?`For the flat icons of the pages and agents: their lines take the colour, and their second tone its palest shade.`:`For the flat icons. The 3D icons keep their own colours.`,htmlFor:`theme-icon-colour`,yamlKey:`theme.icon_colour`,children:(0,J.jsxs)(ik,{children:[(0,J.jsx)(qt,{id:`theme-icon-colour`,value:i,disabled:!a,onChange:t=>{let r=t.target.value;n(r===`accent`?`accent`:r===`custom`?Sr(e.secondary)||tr:``)},className:`w-full`,children:Object.keys(hk).map(e=>(0,J.jsx)(`option`,{value:e,children:hk[e]},e))}),a&&i===`custom`&&(0,J.jsxs)(`span`,{className:`flex w-full flex-nowrap items-center gap-2`,children:[(0,J.jsx)(`input`,{type:`color`,"aria-label":`Icon colour: pick a colour`,value:Sr(t)||tr,onChange:e=>n(e.target.value),className:`size-10 flex-none cursor-pointer rounded-[8px] border border-line bg-bg p-1`}),(0,J.jsx)(V,{id:`theme-icon-colour-hex`,"aria-label":`Icon colour`,value:o,spellCheck:!1,placeholder:`#7c3aed`,"aria-invalid":!!c,onChange:e=>{s(e.target.value);let t=Sr(e.target.value);(t||!e.target.value.trim())&&n(t||``)},className:`min-w-0 flex-1 font-mono`})]}),u&&(0,J.jsx)(`span`,{className:`w-full text-[13px] text-warn sm:text-right`,children:u})]})})}function _k(){let{choice:e,setChoice:t}=Un();return(0,J.jsx)(G,{label:`Colour mode`,help:`Only for you, in this browser.`,children:(0,J.jsx)(ik,{children:(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Colour mode`,className:`inline-flex flex-wrap gap-1 rounded-[10px] bg-surface-strong p-1`,children:[{id:`system`,label:`System`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`}].map(n=>(0,J.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===n.id,onClick:()=>t(n.id),className:z(`min-h-8 cursor-pointer rounded-[8px] border-0 px-3 text-sm`,e===n.id?`bg-bg font-medium text-ink shadow-[0_1px_2px_rgba(0,0,0,.15)]`:`bg-transparent text-ink-2 hover:text-ink`),children:n.label},n.id))})})})}var vk=[`primary`,`gradient`,`secondary`,`background`,`icon_style`,`icon_set`,`icon_colour`];function yk({theme:e,value:t,onReset:n}){let{choice:r,setChoice:i}=Un(),a=vk.some(t=>e[t]!==void 0)||r!==`system`;return(0,J.jsxs)(B,{size:`sm`,disabled:!a,"data-tip":`Reset colours: ForgeQE's own colours and icons, and System mode. The logo and name stay.`,onClick:()=>{let e=t;for(let t of vk)e=U(e,[`theme`,t],void 0);n(e),i(`system`)},children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Reset`]})}var bk=e=>yr(e)<.75?`Choose a light colour: dark mode gives the dark page.`:``;function xk({config:e}){let{saved:t,preview:r,reload:i}=Un(),a=K(e.value.theme),o=e=>typeof a[e]==`string`?a[e]:``,s=(t,n)=>e.set(U(e.value,[`theme`,t],n||void 0)),[c,l]=(0,q.useState)(null),[u,d]=(0,q.useState)(null),[f,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(!1),_=(0,q.useRef)(null),v=c&&c.file===o(`logo`)?c.url:t.logoFile===o(`logo`)?t.logo:void 0,y=u&&u.file===o(`logo_mark`)?u.url:t.logoMarkFile===o(`logo_mark`)?t.logoMark:void 0,b=[`plain`,`rounded`,`circle`,`tile`].find(e=>e===o(`logo_frame`)),x=o(`logo_size`)===`large`||o(`logo_size`)===`standard`?o(`logo_size`):void 0,S=Gn.find(e=>e===o(`icon_style`)),C=qn.find(e=>e===o(`icon_set`)),w=Yn(Cr(e.value,[`agent`,`names`])),T={...Object.keys(w).length?{agentNames:w}:{},logoSize:x,name:o(`name`)||void 0,primary:Sr(o(`primary`)),gradient:Sr(o(`gradient`)),secondary:Sr(o(`secondary`)),background:Sr(o(`background`)),logo:o(`logo`)?v:void 0,logoMark:o(`logo_mark`)?y:void 0,logoFrame:b,iconStyle:S,iconSet:C,iconColour:o(`icon_colour`)===`accent`?`accent`:Sr(o(`icon_colour`))},E=JSON.stringify(T);(0,q.useEffect)(()=>r(T),[E]),(0,q.useEffect)(()=>()=>{r(null),i()},[r,i]);let D=kn(T).filter(e=>!e.ok);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{icon:mt,first:!0,children:`Logo and name`}),(0,J.jsx)(ck,{which:`logo`,label:`Logo`,yamlKey:`theme.logo`,value:o(`logo`),url:v,savedError:t.logoError,onChange:(e,t)=>(l(t?{file:e,url:t}:null),s(`logo`,e))}),(0,J.jsx)(ck,{which:`mark`,label:`Small logo`,yamlKey:`theme.logo_mark`,value:o(`logo_mark`),url:y,savedError:t.logoMarkError,onChange:(e,t)=>(d(t?{file:e,url:t}:null),s(`logo_mark`,e))}),(0,J.jsx)(G,{label:`Logo frame`,help:`A circle suits a square logo; a white tile, a dark logo on a dark sidebar.`,htmlFor:`theme-frame`,yamlKey:`theme.logo_frame`,children:(0,J.jsx)(ik,{children:(0,J.jsxs)(qt,{id:`theme-frame`,value:b||`plain`,onChange:e=>s(`logo_frame`,e.target.value===`plain`?``:e.target.value),className:`w-full`,children:[(0,J.jsx)(`option`,{value:`plain`,children:`As it is`}),(0,J.jsx)(`option`,{value:`rounded`,children:`Rounded corners`}),(0,J.jsx)(`option`,{value:`circle`,children:`Circle`}),(0,J.jsx)(`option`,{value:`tile`,children:`On a white tile`})]})})}),(0,J.jsx)(G,{label:`Logo size`,help:`Fit automatically sizes the logo from its shape, so its words can be read. Large spreads a wide logo across the top of the sidebar.`,htmlFor:`theme-size`,yamlKey:`theme.logo_size`,children:(0,J.jsx)(ik,{children:(0,J.jsxs)(qt,{id:`theme-size`,value:x||`auto`,onChange:e=>s(`logo_size`,e.target.value===`large`||e.target.value===`standard`?e.target.value:``),className:`w-full`,children:[(0,J.jsx)(`option`,{value:`auto`,children:`Fit automatically`}),(0,J.jsx)(`option`,{value:`standard`,children:`Standard`}),(0,J.jsx)(`option`,{value:`large`,children:`Large`})]})})}),(0,J.jsx)(G,{label:`Name`,help:`Beside a square logo, or instead of one. Screen readers say it.`,htmlFor:`theme-name`,yamlKey:`theme.name`,children:(0,J.jsx)(ik,{children:(0,J.jsx)(V,{id:`theme-name`,value:o(`name`),maxLength:40,placeholder:`ForgeQE`,onChange:e=>s(`name`,e.target.value),className:`w-full`})})}),(0,J.jsx)(G,{label:`Preview`,help:h?(0,J.jsx)(`span`,{className:`text-warn`,children:`The logo is close to the sidebar's colour, so it sits on a plate. A different sidebar colour sets it off without one.`}):`The sidebar's top, wide and narrow.`,children:(0,J.jsxs)(ik,{className:`flex-nowrap`,children:[(0,J.jsx)(`span`,{"aria-label":`How the sidebar's top looks`,className:`theme-side flex min-h-14 min-w-0 flex-1 items-center rounded-[10px] border border-line-soft px-4 text-base font-semibold`,children:(0,J.jsx)(ar,{theme:T,onPlate:g})}),(0,J.jsx)(`span`,{"aria-label":`How the narrow sidebar's top looks`,className:`theme-side flex size-14 flex-none items-center justify-center rounded-[10px] border border-line-soft`,children:(0,J.jsx)(fr,{theme:T})})]})}),(0,J.jsx)(W,{icon:ut,help:`Leave a colour empty to keep ForgeQE's own.`,children:`Colours`}),(0,J.jsx)(_k,{}),(0,J.jsx)(sk,{label:`Sidebar`,help:`Light mode. Its text turns white on a dark colour.`,yamlKey:`theme.primary`,value:o(`primary`),fallback:sr,onChange:e=>s(`primary`,e)}),(0,J.jsx)(sk,{label:`Sidebar gradient`,help:`The sidebar fades into it, top to bottom.`,yamlKey:`theme.gradient`,value:o(`gradient`),onChange:e=>s(`gradient`,e)}),(0,J.jsx)(sk,{label:`Buttons and links`,help:`Also selected tabs and filters, with shades made from it.`,yamlKey:`theme.secondary`,value:o(`secondary`),fallback:tr,onChange:e=>s(`secondary`,e)}),(0,J.jsx)(sk,{label:`Page background`,help:`Light mode, a light colour. Dark mode keeps its dark page.`,yamlKey:`theme.background`,value:o(`background`),fallback:`#ffffff`,check:bk,onChange:e=>s(`background`,e)}),(0,J.jsx)(mk,{value:C||`phosphor`,onChange:e=>s(`icon_set`,e===`phosphor`?``:e)}),(0,J.jsx)(gk,{draft:T,value:o(`icon_colour`),onChange:e=>s(`icon_colour`,e)}),(0,J.jsx)(dk,{draft:T,value:S||`auto`,onChange:e=>s(`icon_style`,e===`auto`?``:e)}),(0,J.jsx)(G,{label:`Preview`,help:D.length?(0,J.jsx)(`span`,{className:`flex flex-col gap-0.5 text-warn`,children:D.map(e=>(0,J.jsxs)(`span`,{className:`flex items-start gap-1.5`,children:[(0,J.jsx)(n,{size:14,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),e.label,` is hard to read (`,e.ratio,`:1, 4.5:1 needed).`]},e.label))}):`Every text reads on these colours.`,children:(0,J.jsxs)(ik,{children:[(0,J.jsxs)(`span`,{className:`flex w-full items-center justify-end gap-4 rounded-[10px] border border-line-soft bg-bg p-3`,children:[(0,J.jsx)(`a`,{href:`#appearance-preview`,onClick:e=>e.preventDefault(),className:`text-sm`,children:`A link`}),(0,J.jsx)(B,{variant:`primary`,size:`sm`,tabIndex:-1,"aria-hidden":`true`,className:`pointer-events-none`,children:`A button`})]}),(0,J.jsx)(yk,{theme:a,onReset:t=>e.set(t),value:e.value})]})}),(0,J.jsx)(W,{icon:Pe,children:`Import colours`}),(0,J.jsx)(ok,{onUse:t=>{let n=e.value;for(let e of[`primary`,`gradient`,`secondary`,`background`])n=U(n,[`theme`,e],t[e]||void 0);e.set(n)}}),(0,J.jsx)(G,{label:`From a DESIGN.md`,help:f?(0,J.jsx)(`span`,{role:`status`,className:`text-ink-2`,children:f}):`Reads the lines that name primary, secondary, gradient and background.`,children:(0,J.jsxs)(ik,{children:[(0,J.jsx)(`input`,{ref:_,type:`file`,accept:`.md,.markdown,.txt,.css`,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`,onChange:async t=>{let n=t.target.files?.[0];if(t.target.value=``,!n)return;if(n.size>262144)return m(`${n.name} is over 256 KB.`);let r=_r(await n.text()),i=Object.entries(r).map(([e,t])=>`${e} ${t}`);if(!i.length)return m(`No primary, secondary, gradient or background colour in ${n.name}.`);let a=e.value;for(let[e,t]of Object.entries(r))a=U(a,[`theme`,e],t);e.set(a),m(`From ${n.name}: ${i.join(`, `)}.`)}}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Choose a DESIGN.md`,onClick:()=>_.current?.click(),children:[(0,J.jsx)(ke,{"aria-hidden":`true`}),`Choose`]})]})}),(0,J.jsx)(G,{label:`Reset all`,help:`The logo, name and colours back to ForgeQE's own.`,children:(0,J.jsx)(ik,{children:(0,J.jsxs)(B,{size:`sm`,disabled:!Object.keys(a).length,"data-tip":`The logo, name and colours back to ForgeQE's own`,onClick:()=>e.set(U(e.value,[`theme`],void 0)),children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Reset all`]})})})]})}var Sk=[{id:`github`,name:`GitHub`,note:`github.com, or GitHub Enterprise at your own address.`,logo:Na.github,tokenEnv:`GITHUB_TOKEN`,cloud:!0,cli:{system:`github`,label:`GitHub`}},{id:`azure-devops`,name:`Azure DevOps`,note:`An organization on dev.azure.com, or Azure DevOps Server.`,logo:Na.azure_devops,tokenEnv:`ADO_PAT`,cloud:!0,org:`Organization`,cli:{system:`azure_devops`,label:`Azure DevOps`}},{id:`gitlab`,name:`GitLab`,note:`gitlab.com, or GitLab at your own address.`,logo:Na.gitlab,tokenEnv:`GITLAB_TOKEN`,cloud:!0},{id:`bitbucket-cloud`,name:`Bitbucket Cloud`,note:`bitbucket.org: a workspace's repositories, or every one you can read.`,logo:Na.bitbucket,tokenEnv:`BITBUCKET_TOKEN`,cloud:!0,org:`Workspace`},{id:`bitbucket-server`,name:`Bitbucket Data Center`,note:`Bitbucket Server or Data Center at your own address.`,logo:Na.bitbucket,tokenEnv:`BITBUCKET_TOKEN`,cloud:!1}],Ck=e=>Sk.find(t=>t.id===e),wk=/^[A-Za-z0-9][A-Za-z0-9_-]{0,62}$/;function Tk(e,t){let n=!t.url||Ek(e?.id,String(t.url)).cloud;return e?.id===`github`?n?`cli`:`gh-host`:e?.id===`azure-devops`&&n?`cli`:`git`}function Ek(e,t){let n;try{n=new URL(t.trim())}catch{return{cloud:!1}}let r=n.hostname.toLowerCase(),i=Lt(n.pathname).split(`/`).filter(Boolean)[0],a=i&&/^[A-Za-z0-9][A-Za-z0-9 ._-]{0,99}$/.test(i)?i:void 0;if(e===`azure-devops`){if(r===`dev.azure.com`)return{cloud:!0,org:a};let e=/^([a-z0-9][a-z0-9-]{0,62})\.visualstudio\.com$/.exec(r);return e?{cloud:!0,org:e[1]}:{cloud:!1}}return e===`bitbucket-cloud`?r===`bitbucket.org`?{cloud:!0,org:a}:{cloud:!1}:e===`github`?{cloud:r===`github.com`}:e===`gitlab`?{cloud:r===`gitlab.com`}:{cloud:!1}}function Dk({logo:e,icon:t,title:n,meta:r,state:i,actions:a}){return(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(pn,{icon:t,logo:e}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_220px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:n}),(0,J.jsx)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:r}),i]}),(0,J.jsx)(`span`,{className:`flex gap-2`,children:a})]})}function Ok({ok:e,message:t}){return(0,J.jsxs)(`p`,{role:e?`status`:`alert`,className:z(`mt-2 mb-1 flex items-start gap-2 rounded-[12px] px-3 py-2 text-sm`,e?`bg-pass-soft text-pass`:`bg-fail-soft text-fail`),children:[e?(0,J.jsx)(Ne,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}):(0,J.jsx)(w,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),(0,J.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t})]})}function kk({title:e,help:t}){return(0,J.jsxs)(`div`,{className:`mt-8 mb-2 flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`m-0 text-[14px] font-semibold text-ink`,children:e}),t&&(0,J.jsx)(`p`,{className:`m-0 max-w-[64ch] text-[13px] leading-relaxed text-ink-2`,children:t})]})}var Ak=({children:e})=>(0,J.jsx)(`p`,{role:`status`,className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:e}),jk=e=>Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`));function Mk(e,t,n){let r=K(Cr(e,[`product`,`repos`])),i=e;for(let[e,a]of Object.entries(r))K(a).account===t&&(i=U(i,[`product`,`repos`,e,`account`],n));return i}function Nk({edit:e}){let t=e.value,n=K(Cr(t,[`product`,`accounts`])),i=K(Cr(t,[`product`,`repos`])),[a,o]=(0,q.useState)(null),[s,l]=(0,q.useState)(null),[u,d]=(0,q.useState)({}),f=(0,q.useCallback)(()=>{an.get().then(e=>d(e.saved),()=>{})},[]);(0,q.useEffect)(f,[f]);let p=on(),m=e=>Object.values(i).filter(t=>K(t).account===e).length,h=(e,t)=>{let n=Ck(t.host),r=m(e),i=`${r} ${r===1?`repository`:`repositories`} connected`;if(t.auth===`token`)return Ln(p,String(t.token_env||``))?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Connected with a token, ${i}`}):(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,children:`Needs its token: Edit to add it`});let a=Tk(n,t),o=u[n.cli.system];return a===`cli`?o&&(o.via!==`token`||o.browser)&&Th(o,n.name)?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Signed in, ${i}`}):(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,children:`Needs a sign-in: Edit to sign in`}):(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`${a===`gh-host`?`The GitHub CLI's`:`Git Credential Manager's`} sign-in, ${i}`})};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{first:!0,help:`Sign in to where your code is, then pick the repositories ForgeQE reads into the product graph.`,children:`1. Repositories`}),(0,J.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`p`,{className:`m-0 max-w-[60ch] text-sm text-muted`,children:Object.keys(n).length?`Your accounts. Pick more repositories from one with Repositories.`:`No account yet: add GitHub, Azure DevOps, GitLab or Bitbucket.`}),(0,J.jsxs)(B,{size:`sm`,"data-tip":`Add an account`,onClick:()=>o({step:`catalog`}),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add`]})]}),Object.entries(n).map(([n,r])=>{let i=K(r),a=Ck(i.host);return(0,J.jsx)(Dk,{logo:a?.logo,icon:c,title:n,meta:[a?.name||`Unknown host`,i.org,i.url].filter(Boolean).map(String).join(`, `),state:h(n,i),actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Repositories of ${n}`,"data-tip":`Repositories of ${n}`,disabled:!a,onClick:()=>l(n),children:(0,J.jsx)(ct,{"aria-hidden":`true`})}),a&&(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Edit ${n}`,"data-tip":`Edit ${n}`,onClick:()=>o({step:`form`,host:a,mode:`edit`,name:n,from:n,value:i}),children:(0,J.jsx)(ie,{"aria-hidden":`true`})}),(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Disconnect ${n}`,"data-tip":`Disconnect ${n}`,onClick:()=>e.set(Mk(U(t,[`product`,`accounts`,n],void 0),n,void 0)),children:(0,J.jsx)(Fe,{"aria-hidden":`true`})})]})},n)}),(0,J.jsx)(kk,{title:`Connected repositories`,help:`Each one a repository the graph reads: connected from an account, or a local clone or a link added by hand.`}),(0,J.jsx)(Np,{edit:e,base:[`product`,`repos`],defs:Sh,noun:`repository by hand`,placeholder:`web`,meta:e=>typeof e.git==`string`&&e.git?`${e.git}${typeof e.branch==`string`&&e.branch?` (${e.branch})`:``}${typeof e.account==`string`?`, from ${e.account}`:``}`:typeof e.path==`string`?e.path:``}),(0,J.jsx)(zk,{edit:e}),(0,J.jsx)(Hk,{edit:e}),(0,J.jsx)(W,{help:ih[0].help,children:`4. The product and its knowledge`}),(0,J.jsx)(Nn,{defs:ih[0].fields,edit:e,base:ih[0].base}),ih.slice(1).map(t=>(0,J.jsxs)(`div`,{children:[(0,J.jsx)(kk,{title:t.title,help:t.help}),(0,J.jsx)(Nn,{defs:t.fields,edit:e,base:t.base})]},t.title)),(0,J.jsx)(W,{help:ah[0].help,children:`5. ${ah[0].title}`}),(0,J.jsx)(Nn,{defs:ah[0].fields,edit:e,base:ah[0].base}),(0,J.jsx)(Pk,{sheet:a,setSheet:o,taken:e=>e in n,onSigned:f,onApply:n=>{let r=t;n.mode===`edit`&&n.from!==n.name&&(r=Mk(U(r,[`product`,`accounts`,n.from],void 0),n.from,n.name)),e.set(U(r,[`product`,`accounts`,n.name],n.value)),o(null),n.mode===`add`&&l(n.name)}}),(0,J.jsx)(Fk,{id:s,account:s?K(n[s]):{},repos:i,onClose:()=>l(null),onConnect:n=>e.set(U(t,[`product`,`repos`],{...i,...n}))})]})}function Pk({sheet:e,setSheet:t,taken:n,onApply:r,onSigned:a}){let o=on(),[l,u]=(0,q.useState)({busy:!1}),d=e?.step===`form`?`${e.host.id}/${e.from}`:e?.step||``;(0,q.useEffect)(()=>u({busy:!1}),[d]);let f=()=>t(null);if(e?.step===`form`){let d=e,p=d.value,m=e=>t({...d,value:e}),h=d.name?wk.test(d.name)?d.name!==d.from&&n(d.name)?`Another account has this name.`:``:`Letters, digits, - and _.`:``,g=!p.url||Ek(d.host.id,String(p.url)).cloud,_=d.host.id===`azure-devops`&&g&&!(p.url&&Ek(d.host.id,String(p.url)).org),v=(()=>{let e=String(p.url||``).trim();if(!e)return``;try{let t=new URL(e);return t.protocol===`https:`?t.username||t.password?`No user name or password in the address: the token goes in its own field.`:``:`The address is https.`}catch{return`That is not an address.`}})(),y=!!d.name&&!h&&!v&&(d.host.cloud||!!String(p.url||``).trim())&&(!_||!!String(p.org||``).trim())&&(p.auth!==`token`||!!String(p.token_env||``).trim()),b=Tk(d.host,p),x=async e=>{u({busy:!0});try{if(e===`signin`){let e=await Rt.signIn(d.name||`account`,p);u({busy:!1,ok:e.ok,message:e.message})}else{let e=await Rt.repos(d.name||`account`,p,jk(o.pending),[]);u({busy:!1,ok:e.ok,message:e.ok?`Signed in: ${e.repos.length} ${e.repos.length===1?`repository`:`repositories`} to pick from${e.truncated?` (the first ones)`:``}.`:e.message})}}catch(e){u({busy:!1,ok:!1,message:e.message})}};return(0,J.jsxs)(Cn,{open:!0,onClose:f,title:d.mode===`add`?`Connect ${d.host.name}`:`Edit ${d.name}`,description:`Then pick its repositories. A token you type is kept in ${Tn(o.store)}, never in the settings files.`,footer:(0,J.jsxs)(J.Fragment,{children:[d.mode===`add`&&(0,J.jsxs)(B,{onClick:()=>t({step:`catalog`}),children:[(0,J.jsx)(be,{"aria-hidden":`true`}),`Back`]}),(0,J.jsxs)(B,{onClick:()=>x(`list`),disabled:l.busy||!y,className:`mr-auto`,"data-tip":`Test the connection`,children:[(0,J.jsx)(M,{"aria-hidden":`true`}),l.busy?`Testing…`:`Test`]}),(0,J.jsxs)(B,{onClick:f,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!y,onClick:()=>r(d),children:[d.mode===`add`?(0,J.jsx)(M,{"aria-hidden":`true`}):(0,J.jsx)(s,{"aria-hidden":`true`}),d.mode===`add`?`Connect`:`Done`]})]}),children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3 pt-5 pb-2`,children:[(0,J.jsx)(pn,{logo:d.host.logo,icon:c,size:`lg`}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:d.host.note})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:l.message&&(0,J.jsx)(Ok,{ok:!!l.ok,message:l.message})}),(0,J.jsx)(G,{label:`Name`,help:h?(0,J.jsx)(`span`,{className:`text-fail`,children:h}):`A short name for the account, such as work.`,htmlFor:`acct-name`,stacked:!0,children:(0,J.jsx)(V,{id:`acct-name`,value:d.name,spellCheck:!1,"aria-invalid":!!h,placeholder:`work`,onChange:e=>t({...d,name:e.target.value.trim()})})}),(0,J.jsx)(G,{label:d.host.cloud?`Address of your own server`:`Address`,help:v?(0,J.jsx)(`span`,{className:`text-fail`,children:v}):d.host.cloud?`Empty: ${d.host.name}'s cloud.`:`https, the server's address.`,htmlFor:`acct-url`,stacked:!0,children:(0,J.jsx)(V,{id:`acct-url`,"aria-invalid":!!v,value:String(p.url||``),spellCheck:!1,placeholder:d.host.cloud?``:`https://bitbucket.acme.example`,onChange:e=>m(U(p,[`url`],e.target.value.trim()||void 0))})}),d.host.org&&(0,J.jsx)(G,{label:d.host.org,help:_?`Its name, as in dev.azure.com/<organization>.`:`Empty: every repository you can read.`,htmlFor:`acct-org`,stacked:!0,children:(0,J.jsx)(V,{id:`acct-org`,value:String(p.org||``),spellCheck:!1,placeholder:`acme`,onChange:e=>m(U(p,[`org`],e.target.value.trim()||void 0))})}),(0,J.jsxs)(`fieldset`,{className:`m-0 border-0 p-0 py-3`,children:[(0,J.jsx)(`legend`,{className:`mb-2 font-medium`,children:`Sign in`}),[[`browser`,b===`git`?`In the browser, with Git Credential Manager`:d.host.id===`github`?`In the browser, with the GitHub CLI`:`In the browser, with Microsoft (the Azure CLI)`],[`token`,`With a personal access token`]].map(([e,t])=>(0,J.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-3 text-sm`,children:[(0,J.jsx)(`input`,{type:`radio`,name:`acct-auth`,checked:p.auth===`token`==(e===`token`),onChange:()=>m(e===`token`?{...p,auth:`token`,token_env:p.token_env||d.host.tokenEnv}:{...p,auth:`browser`,token_env:void 0,user:void 0})}),t]},e))]}),p.auth===`token`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Token`,help:`Read access to the repositories (code: read).`,stacked:!0,children:(0,J.jsx)(_n,{name:String(p.token_env||d.host.tokenEnv),field:`token`,onRename:e=>m({...p,token_env:e})})}),(d.host.id===`bitbucket-cloud`||d.host.id===`bitbucket-server`)&&(0,J.jsx)(G,{label:`User name for the token`,help:`With a Bitbucket app password. Empty: an access token.`,htmlFor:`acct-user`,stacked:!0,children:(0,J.jsx)(V,{id:`acct-user`,value:String(p.user||``),spellCheck:!1,onChange:e=>m(U(p,[`user`],e.target.value.trim()||void 0))})})]}):b===`cli`?(0,J.jsx)(Eh,{system:d.host.cli.system,label:d.host.cli.label,keyless:!0,onChanged:a}):b===`gh-host`?(0,J.jsx)(G,{label:`Sign in with the GitHub CLI`,help:`In a terminal: gh auth login --web --hostname ${(()=>{try{return new URL(String(p.url)).hostname}catch{return`<your server>`}})()}. Then Test.`,stacked:!0}):(0,J.jsx)(G,{label:`Sign in with the browser`,help:`Git Credential Manager opens the sign-in on this computer and keeps it for git, which fetches the repositories with it.`,stacked:!0,children:(0,J.jsxs)(B,{onClick:()=>x(`signin`),disabled:l.busy||!y,"data-tip":`Sign in with the browser`,children:[(0,J.jsx)(ce,{"aria-hidden":`true`}),l.busy?`Signing in…`:`Sign in`]})})]})}return(0,J.jsx)(Cn,{open:e?.step===`catalog`,onClose:f,title:`Add an account`,description:`Pick where your code is.`,footer:(0,J.jsxs)(B,{onClick:f,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Close`]}),children:(0,J.jsx)(`div`,{className:`pt-4`,children:Sk.map(e=>(0,J.jsxs)(`button`,{type:`button`,onClick:()=>t({step:`form`,host:e,mode:`add`,name:``,from:``,value:{host:e.id,auth:`browser`}}),className:`flex min-h-14 w-full cursor-pointer items-center gap-3 rounded-[12px] border-0 bg-transparent px-2 py-2 text-left text-ink hover:bg-surface-muted`,children:[(0,J.jsx)(pn,{logo:e.logo,icon:c}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:e.note})]}),(0,J.jsx)(`span`,{className:`text-[13px] text-accent-fg`,children:`Add`})]},e.id))})})}function Fk({id:e,account:t,repos:n,onClose:r,onConnect:a}){let o=on(),[s,c]=(0,q.useState)({busy:!1}),[l,u]=(0,q.useState)(new Set),[d,f]=(0,q.useState)(``),p=(0,q.useMemo)(()=>new Set(Object.values(n).map(e=>String(K(e).git||``))),[n]);(0,q.useEffect)(()=>{e&&(u(new Set),f(``),c({busy:!0}),Rt.repos(e,t,jk(o.pending),Object.keys(n)).then(e=>c(e.ok?{busy:!1,repos:e.repos,truncated:e.truncated,skipped:e.skipped}:{busy:!1,message:e.message}),e=>c({busy:!1,message:e.message})))},[e]);let m=(s.repos||[]).filter(e=>!d||e.fullName.toLowerCase().includes(d.toLowerCase()));return(0,J.jsxs)(Cn,{open:!!e,onClose:r,wide:!0,title:`Repositories of ${e||``}`,description:`Pick the ones ForgeQE reads into the product graph. They are fetched into ForgeQE's own cache, never your workspace.`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`mr-auto text-sm text-muted`,children:l.size?`${l.size} picked`:``}),(0,J.jsxs)(B,{onClick:r,children:[(0,J.jsx)(i,{"aria-hidden":`true`}),`Cancel`]}),(0,J.jsxs)(B,{variant:`primary`,disabled:!l.size,onClick:()=>{let e={};for(let t of s.repos||[])l.has(t.git)&&(e[t.key]=t.entry);a(e),r()},"data-tip":l.size>1?`Connect ${l.size} repositories`:void 0,children:[(0,J.jsx)(M,{"aria-hidden":`true`}),l.size>1?`Connect (${l.size})`:`Connect`]})]}),children:[(0,J.jsxs)(`div`,{"aria-live":`polite`,children:[s.busy&&(0,J.jsx)(Ak,{children:`Reading the account's repositories…`}),s.message&&(0,J.jsx)(Ok,{ok:!1,message:s.message})]}),s.repos&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Find`,htmlFor:`repo-find`,stacked:!0,children:(0,J.jsx)(V,{id:`repo-find`,value:d,placeholder:`shop`,onChange:e=>f(e.target.value)})}),!m.length&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:s.repos.length?`None matches.`:`None yet: the account can read no repository.`}),(0,J.jsx)(`ul`,{"aria-label":`Repositories`,className:`m-0 list-none p-0`,children:m.map(e=>{let t=p.has(e.git);return(0,J.jsx)(`li`,{className:`border-t border-line-soft`,children:(0,J.jsxs)(`label`,{className:z(`flex min-h-12 items-center gap-3 py-2`,t?`cursor-default`:`cursor-pointer`),children:[(0,J.jsx)($D,{disabled:t,checked:t||l.has(e.git),onCheckedChange:t=>u(n=>{let r=new Set(n);return t?r.add(e.git):r.delete(e.git),r})}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.fullName}),(0,J.jsx)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:[e.branch,e.private?`private`:e.private===!1?`public`:``,e.description].filter(Boolean).join(` · `)})]}),t&&(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Connected`})]})},e.git)})}),(s.truncated||!!s.skipped)&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft pt-3 text-[13px] text-muted`,children:[s.truncated?`The first 2,000 are listed: find narrows them.`:``,s.skipped?`${s.skipped} left out: their links are not of this host, or not https.`:``].filter(Boolean).join(` `)})]})]})}var Ik=e=>e.url?`url`:e.mcp?`mcp`:e.command?`command`:`none`,Lk=rh[0].fields,Rk=e=>e.map(e=>Lk.find(t=>t.key===e));function zk({edit:e}){let t=on(),n=K(e.value.rag),r=Ik(n),[i,a]=(0,q.useState)(r),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)({busy:!1});(0,q.useEffect)(()=>a(r),[r]);let u=t=>{a(t),l({busy:!1});let r={top_k:n.top_k,timeout_seconds:n.timeout_seconds},i=t===`none`?{}:Object.fromEntries(Object.entries({...r,...t===`url`?{url:n.url,token_env:n.token_env}:t===`mcp`?{mcp:n.mcp}:{command:n.command}}).filter(([,e])=>e!==void 0));e.set(U(e.value,[`rag`],Object.keys(i).length?i:void 0))},d=Object.keys(K(e.value.mcp)),f=async()=>{l({busy:!0});try{let r=await Rt.testSearch(n,K(e.value.mcp),o,jk(t.pending));l({busy:!1,...r})}catch(e){l({busy:!1,ok:!1,message:e.message})}};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`Where your requirements, specs and wiki are searched (a RAG index): checking a test case or a story adds the passages it finds.`,children:`2. Search service`}),(0,J.jsxs)(`fieldset`,{className:`m-0 border-0 p-0 pb-2`,children:[(0,J.jsx)(`legend`,{className:`mb-2 font-medium`,children:`The search service is`}),[[`none`,`None`],[`url`,`A service at an address`],[`mcp`,`A tool of one of your MCP servers`],[`command`,`A command on this machine`]].map(([e,t])=>(0,J.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-3 text-sm`,children:[(0,J.jsx)(`input`,{type:`radio`,name:`rag-kind`,checked:i===e,onChange:()=>u(e)}),t]},e))]}),i===`url`&&(0,J.jsx)(Nn,{defs:Rk([`url`,`token_env`,`top_k`,`timeout_seconds`]),edit:e,base:[`rag`]}),i===`mcp`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Nn,{defs:Rk([`mcp.server`,`mcp.tool`,`mcp.query_arg`,`mcp.top_k_arg`,`top_k`,`timeout_seconds`]),edit:e,base:[`rag`]}),(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-3 text-[13px] text-muted`,children:d.length?`MCP servers set up: ${d.join(`, `)}.`:`No MCP server is set up yet: add one under MCP servers, then name it here.`})]}),i===`command`&&(0,J.jsx)(Nn,{defs:Rk([`command`,`top_k`,`timeout_seconds`]),edit:e,base:[`rag`]}),i!==`none`&&(0,J.jsx)(G,{label:`Try a search`,help:i===`command`?`A command runs on the next real search, not from this page.`:`What a test case would search for. Nothing is saved.`,htmlFor:`rag-query`,children:(0,J.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[(0,J.jsx)(V,{id:`rag-query`,value:o,placeholder:`refunds over 500 EUR`,onChange:e=>s(e.target.value),onKeyDown:e=>e.key===`Enter`&&o.trim()&&f(),className:`min-w-0 flex-1`}),(0,J.jsxs)(B,{size:`sm`,disabled:c.busy||!o.trim(),onClick:f,children:[(0,J.jsx)(ue,{"aria-hidden":`true`}),c.busy?`Searching…`:`Search`]})]})}),(0,J.jsxs)(`div`,{"aria-live":`polite`,children:[c.message&&(0,J.jsx)(Ok,{ok:!!c.ok,message:c.message}),!!c.passages?.length&&(0,J.jsx)(`ul`,{"aria-label":`Passages found`,className:`m-0 list-none p-0`,children:c.passages.map((e,t)=>(0,J.jsxs)(`li`,{className:`border-t border-line-soft py-2 text-sm [overflow-wrap:anywhere]`,children:[e.source&&(0,J.jsxs)(`span`,{className:`font-medium`,children:[e.source,`: `]}),(0,J.jsx)(`span`,{className:`text-ink-2`,children:e.text})]},t))})]})]})}var Bk=/^[A-Za-z0-9][A-Za-z0-9 _.()-]{0,99}\.(md|markdown|txt)$/i,Vk=e=>e<1024?`${e} bytes`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Hk({edit:e}){let[t,n]=(0,q.useState)(null),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(!1),s=(0,q.useRef)(null);(0,q.useEffect)(()=>{Rt.documents().then(e=>n(e.documents),e=>i({ok:!1,message:e.message}))},[]);let c=async e=>{if(!e?.length)return;o(!0),i(null);let r=[];try{for(let i of Array.from(e)){if(!Bk.test(i.name))throw Error(`${i.name}: only a .md, .markdown or .txt file with a plain name.`);if(i.size>1e6)throw Error(`${i.name} is over 1 MB.`);let e=t?.some(e=>e.name===i.name)??!1,a=await Rt.addDocument(i.name,await i.text(),e);n(a.documents),r.push(i.name)}i({ok:!0,message:`Added ${r.join(`, `)}. forgeqe knowledge build reads them with the other documents.`})}catch(e){i({ok:!1,message:e.message})}finally{o(!1),s.current&&(s.current.value=``)}},l=async e=>{try{n((await Rt.removeDocument(e)).documents)}catch(e){i({ok:!1,message:e.message})}};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(W,{help:`What the graph reads beside the code: Markdown files you add here, folders on this computer, links, Confluence spaces, and the pages ForgeQE remembers of a web app.`,children:`3. Documents`}),(0,J.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`p`,{className:`m-0 max-w-[60ch] text-sm text-muted`,children:`Added here: kept in .forgeqe/documents, read as the source uploaded.`}),(0,J.jsxs)(B,{size:`sm`,disabled:a,"data-tip":`Add Markdown files`,onClick:()=>s.current?.click(),children:[(0,J.jsx)(ot,{"aria-hidden":`true`}),a?`Uploading…`:`Upload`]}),(0,J.jsx)(`input`,{ref:s,type:`file`,accept:`.md,.markdown,.txt,text/markdown,text/plain`,multiple:!0,hidden:!0,onChange:e=>c(e.target.files)})]}),(0,J.jsx)(`div`,{"aria-live":`polite`,children:r&&(0,J.jsx)(Ok,{ok:r.ok,message:r.message})}),!t&&!r&&(0,J.jsx)(Ak,{children:`Reading the documents…`}),t&&!t.length&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`None yet.`}),t?.map(e=>(0,J.jsx)(Dk,{icon:Ae,title:e.title,meta:`${e.name}, ${Vk(e.bytes)}`,actions:(0,J.jsx)(B,{variant:`icon`,size:`icon-sm`,"aria-label":`Remove ${e.name}`,"data-tip":`Remove ${e.name}`,onClick:()=>l(e.name),children:(0,J.jsx)(Je,{"aria-hidden":`true`})})},e.name)),(0,J.jsx)(kk,{title:`Documents and links`,help:`Each one a folder of documents, a link, a Confluence space, or a web app whose pages ForgeQE remembers, by a name no repository has.`}),(0,J.jsx)(Np,{edit:e,base:[`product`,`docs`],defs:xh,noun:`source`,placeholder:`help`,meta:e=>String(e.path||e.url||(e.confluence?`Confluence ${e.confluence}`:e.app?`app ${e.app}`:``))})]})}var Uk=/^[A-Z][A-Z0-9_]{1,63}$/,Wk=/^(PATH|PATHEXT|HOME|SHELL|USER|USERNAME|LOGNAME|PWD|TMPDIR|TEMP|TMP|LANG|LC_\w+|TERM|COMSPEC|SYSTEMROOT|WINDIR|APPDATA|LOCALAPPDATA|USERPROFILE|NODE_\w+|BUN_\w+|NPM_\w+|PYTHON\w*|VIRTUAL_ENV|UV_\w+|LD_\w+|DYLD_\w+|SSL_CERT_\w+|REQUESTS_CA_BUNDLE|CURL_CA_BUNDLE|(HTTPS?|ALL|NO)_PROXY|GIT_\w+|SSH_\w+|GNUPGHOME|EDITOR|VISUAL|PAGER|FORGEQE_\w+|WEBPILOT_\w+|WP_CONFIG|WP_LLMS_JSON|WP_LLM_PROFILE)$/i,Gk=/(TOKEN|PAT)$/,Kk=(e,t=`SHOP_PASSWORD`)=>Uk.test(e)?Wk.test(e)?`${e} changes how programs start: pick another name.`:``:`Capital letters, digits and _, such as ${t}.`,qk=[{id:`azure`,label:`Azure Key Vault`,where:`Key vault`,whereHelp:`Its name, as in https://<name>.vault.azure.net.`,placeholder:`shop-qa-kv`,cli:`Microsoft, in the browser (az login)`},{id:`gcp`,label:`Google Secret Manager`,where:`Project`,whereHelp:`The Google Cloud project's id.`,placeholder:`shop-qa-123456`,cli:`Google, in the browser (gcloud auth login)`},{id:`aws`,label:`AWS Secrets Manager`,where:`Region`,whereHelp:`Where its secrets are, such as eu-west-1.`,placeholder:`eu-west-1`,cli:`AWS SSO, in the browser (aws sso login)`}],Jk={tenant:`Tenant id`,clientId:`Client id`,clientSecret:`Client secret`,serviceAccount:`Service account key (JSON)`,accessKeyId:`Access key id`,secretAccessKey:`Secret access key`,sessionToken:`Session token (optional)`},Yk=e=>e?.length?`Used by ${e.slice(0,2).join(`, `)}${e.length>2?` and ${e.length-2} more`:``}`:``,Xk=()=>vt.list();function Zk({show:e}){let{data:t,error:n,reload:i}=cn(Xk),[a,o]=(0,q.useState)(null),[s,c]=(0,q.useState)(`sec-saved`),[l,u]=(0,q.useState)(e||`all`);(0,q.useEffect)(()=>{e&&c(`sec-saved`),u(e||`all`)},[e]);let[f,p]=(0,q.useState)(``),[m,h]=(0,q.useState)(``),[g,_]=(0,q.useState)(null),[v,y]=(0,q.useState)(null),[b,x]=(0,q.useState)(null),[S,C]=(0,q.useState)(!1),w=(0,q.useRef)(null),[T,E]=(0,q.useState)(!1),[O,k]=(0,q.useState)(``),[A,j]=(0,q.useState)(null),[M,N]=(0,q.useState)({}),P=a??t,F=(P?.vaults||[]).filter(e=>e.auth===`cli`).map(e=>e.id).join(`,`),I=e=>{N(t=>({...t,[e]:`checking`})),vt.check(e).then(t=>N(n=>({...n,[e]:t})),t=>N(n=>({...n,[e]:{signedIn:!1,problem:t.message}})))};(0,q.useEffect)(()=>{if(s===`sec-vaults`)for(let e of F.split(`,`).filter(Boolean))M[e]||I(e)},[s,F]),(0,q.useEffect)(()=>{if(A?.state!==`running`)return;let e=setTimeout(()=>{vt.signinState().then(e=>{j(e.signin),e.signin&&e.signin.state!==`running`&&I(e.signin.vault)},()=>{})},1e3);return()=>clearTimeout(e)},[A]);let L=async e=>{p(``),h(``);try{j(await vt.signIn(e))}catch(e){h(e.message)}},ee=async(e,t,n)=>{C(!0),k(``);try{o(await e()),n(),p(t)}catch(e){k(e.message)}finally{C(!1)}},te=e=>{k(``),p(``),e()};if(!P)return(0,J.jsx)(Zn,{error:n,reload:i});let ne=P.secrets.filter(e=>e.from===`vault`&&!e.pending).length,re=async()=>{p(``),h(``);try{let e=await vt.exportVaults(),t=URL.createObjectURL(new Blob([`${JSON.stringify(e,null,2)}\n`],{type:`application/json;charset=utf-8`})),n=document.createElement(`a`);n.href=t,n.download=`forgeqe-vaults.json`,n.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3),p(`Exported the vault connections: no value is in the file. A teammate imports it here and pulls with their own sign-in.`)}catch(e){h(e.message)}},R=async e=>{let t=e?.[0];if(t){if(p(``),h(``),t.size>262144)return h(`${t.name} is over 256 KB.`);C(!0),E(!0);try{let e=await vt.importVaults(await t.text());o(e.view);let n=[e.added.length?`Added ${e.added.length===1?`the vault`:`${e.added.length} vaults:`} ${e.added.join(`, `)}.`:`No new vault.`,e.toPull.length?`${e.toPull.length===1?`1 secret is`:`${e.toPull.length} secrets are`} ready to pull on Saved: sign in, then Pull.`:``];p(n.filter(Boolean).join(` `)),e.skipped.length&&h(`Not imported: ${e.skipped.map(e=>`${e.id} (${e.why})`).join(`; `)}`)}catch(e){h(e.message)}finally{C(!1),E(!1)}}},ie=P.secrets.filter(e=>e.token),ae=l===`tokens`?ie:P.secrets,oe=(e=P.suggestedTokens[0]||`REPO_TOKEN`)=>te(()=>_({mode:`add`,name:e,value:``,token:!0})),se=async e=>{C(!0),p(``),h(``);try{let t=await vt.pullAgain(e);o(t.view),t.failed.length?h(`Not pulled: ${t.failed.map(e=>`${e.name} (${e.error})`).join(`; `)}`):p(`Pulled ${e}.`)}catch(e){h(e.message)}finally{C(!1)}},ue=async()=>{C(!0),p(``),h(``);try{let e=await vt.pullAgain();o(e.view),p(`Pulled ${e.pulled.length} again from their vaults.`),h(e.failed.length?`Not pulled: ${e.failed.map(e=>`${e.name} (${e.error})`).join(`; `)}`:``)}catch(e){h(e.message)}finally{C(!1)}};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(bn,{label:`Secrets`,current:s,onPick:e=>{c(e),p(``),h(``)},tabs:[{id:`sec-saved`,label:`Saved (${P.secrets.length})`},{id:`sec-vaults`,label:`Vaults (${P.vaults.length})`}]}),f&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 mb-3 rounded-[10px] bg-surface-muted px-3 py-2 text-sm text-ink-2 [overflow-wrap:anywhere]`,children:f}),m&&(0,J.jsx)(`p`,{role:`alert`,className:`m-0 mb-3 rounded-[10px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:m}),s===`sec-saved`?(0,J.jsxs)(`div`,{role:`tabpanel`,id:`panel-sec-saved`,"aria-labelledby":`tab-sec-saved`,children:[(0,J.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,role:`group`,"aria-label":`Show`,children:(0,J.jsx)(Qt,{value:l,onChange:e=>{u(e),p(``)},items:[{id:`all`,label:`All`,n:P.secrets.length},{id:`tokens`,label:`Repository tokens`,n:ie.length+P.neededTokens.length}]})}),(0,J.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[ne>0&&(0,J.jsxs)(B,{size:`sm`,disabled:S,onClick:()=>void ue(),children:[(0,J.jsx)(D,{"aria-hidden":`true`}),S?`Pulling…`:`Pull all again`]}),l===`tokens`?(0,J.jsxs)(B,{size:`sm`,onClick:()=>oe(),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add a token`]}):(0,J.jsxs)(B,{size:`sm`,onClick:()=>te(()=>_({mode:`add`,name:``,value:``})),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add a secret`]})]})]}),(0,J.jsx)(`p`,{className:`m-0 mb-3 text-sm text-muted`,children:l===`tokens`?`The tokens ForgeQE clones and reads git repositories with: one for each git host or account. A clone picks one by its name.`:`Agents and tests use a secret by its name: in a sign-in, an environment's secrets, or a test's variables.`}),P.neededTokens.map(e=>(0,J.jsx)(hn,{expandable:!1,open:!1,onToggle:()=>{},lead:(0,J.jsx)(pn,{icon:d}),title:(0,J.jsx)(`span`,{className:`font-mono`,children:e.name}),meta:`${Yk(e.usedBy)}. It has no value here yet.`,state:(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Not set`}),actions:(0,J.jsx)(B,{size:`sm`,"aria-label":`Add ${e.name}`,onClick:()=>oe(e.name),children:`Add`}),children:null},`needed-${e.name}`)),ae.length===0&&!P.neededTokens.length&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:l===`tokens`?`No repository tokens yet. Add one for each git host or account.`:`None yet. Add one, or pull one from a vault.`}),ae.map(e=>(0,J.jsx)(hn,{expandable:!1,open:!1,onToggle:()=>{},lead:(0,J.jsx)(pn,{icon:e.from===`vault`?le:e.from===`sign-in`?ce:e.token?d:je}),title:(0,J.jsx)(`span`,{className:`font-mono`,children:e.name}),meta:[e.from===`vault`&&e.vault?`From ${e.vault.provider} ${e.vault.id}: ${e.vault.secret}${e.vault.key?` › ${e.vault.key}`:``} · ${e.pending?`not pulled yet`:`pulled ${GO(e.vault.at)}`}`:e.from===`sign-in`?`From the ${e.system} sign-in: sign out of it to remove it.`:e.from===`shell`?`Set in your shell: change or remove it there.`:`Saved in Settings`,e.token?Yk(e.usedBy)||`Not used yet`:``].filter(Boolean).join(` · `),state:e.from===`shell`?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Set in the environment`}):e.set?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Saved`}):(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Not set`}),actions:e.pending?(0,J.jsx)(B,{size:`sm`,"aria-label":`Pull ${e.name}`,disabled:S,onClick:()=>void se(e.name),children:`Pull`}):e.from===`sign-in`||e.from===`shell`?void 0:(0,J.jsx)(B,{size:`sm`,"aria-label":`Edit ${e.name}`,onClick:()=>te(()=>_({mode:`edit`,name:e.name,value:``,row:e,...e.token?{token:!0}:{}})),children:`Edit`}),children:null},e.name)),(0,J.jsxs)(`p`,{className:`m-0 mt-3 text-[12.5px] text-muted`,children:[`Kept in `,Tn(P.store),`. ForgeQE never shows a value again, and the agents see only names.`,l===`tokens`?` Give each token read access to the repositories it clones, nothing more.`:``]})]}):(0,J.jsxs)(`div`,{role:`tabpanel`,id:`panel-sec-vaults`,"aria-labelledby":`tab-sec-vaults`,children:[(0,J.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-end gap-2`,children:[P.vaults.length>0&&(0,J.jsxs)(B,{size:`sm`,onClick:()=>void re(),"data-tip":`A file of the connections, without values, for a teammate to import`,children:[(0,J.jsx)(tt,{"aria-hidden":`true`}),`Export`]}),(0,J.jsxs)(B,{size:`sm`,disabled:S,onClick:()=>w.current?.click(),"data-tip":`Connections a teammate exported`,children:[(0,J.jsx)(ot,{"aria-hidden":`true`}),T?`Importing…`:`Import`]}),(0,J.jsx)(`input`,{ref:w,type:`file`,accept:`.json,application/json`,hidden:!0,onChange:e=>(R(e.target.files),e.target.value=``)}),(0,J.jsxs)(B,{size:`sm`,onClick:()=>te(()=>y({mode:`add`,v:{id:``,provider:`azure`,where:``,auth:`cli`}})),children:[(0,J.jsx)(r,{"aria-hidden":`true`}),`Add a vault`]})]}),(0,J.jsx)(`p`,{className:`m-0 mb-3 text-sm text-muted`,children:`Where ForgeQE pulls secrets from. It reads a value only when you pull that secret.`}),A&&(0,J.jsx)(tA,{s:A,onCancel:()=>void vt.cancelSignin().then(e=>j(e.signin),()=>{}),onClose:()=>j(null)}),P.vaults.length===0&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`None yet. Add Azure Key Vault, Google Secret Manager or AWS Secrets Manager.`}),P.vaults.map(e=>(0,J.jsx)(hn,{expandable:!1,open:!1,onToggle:()=>{},lead:(0,J.jsx)(pn,{icon:le}),title:e.id,meta:`${e.providerLabel} · ${e.where} · ${e.auth===`cli`?`signs in with your browser${e.profile?`, profile ${e.profile}`:``}`:`signs in with saved keys`}${e.pulled?` · ${e.pulled} pulled`:``}${e.missing.length?` · not saved yet: ${e.missing.join(`, `)}`:``}`,state:e.auth===`cli`?M[e.id]===`checking`||!M[e.id]?(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Checking the sign-in…`}):M[e.id].signedIn?(0,J.jsx)(`span`,{className:`text-[13px] text-pass`,children:`Signed in`}):(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,"data-tip":M[e.id].problem,children:`Not signed in`}):e.missing.length?(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,"data-tip":e.missing.join(`, `),children:e.missing.length===1?`Needs ${e.missing[0]}`:`Needs ${e.missing.length} variables`}):(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.pulled===1?`1 secret pulled`:`${e.pulled} secrets pulled`}),actions:(0,J.jsxs)(J.Fragment,{children:[e.auth===`cli`&&M[e.id]!==`checking`&&M[e.id]&&!M[e.id].signedIn?(0,J.jsxs)(B,{size:`sm`,variant:`primary`,"aria-label":`Sign in to ${e.id}`,disabled:A?.state===`running`,onClick:()=>void L(e.id),children:[(0,J.jsx)(ce,{"aria-hidden":`true`}),`Sign in`]}):(0,J.jsx)(B,{size:`sm`,"aria-label":`Browse ${e.id}`,disabled:e.missing.length>0||e.auth===`cli`&&M[e.id]===`checking`,onClick:()=>te(()=>x(e)),children:`Browse`}),(0,J.jsx)(B,{size:`sm`,"aria-label":`Edit ${e.id}`,onClick:()=>te(()=>y({mode:`edit`,v:{id:e.id,provider:e.provider,where:e.where,auth:e.auth,...e.profile?{profile:e.profile}:{},...e.keys?{keys:e.keys}:{}}})),children:`Edit`})]}),children:null},e.id)),(0,J.jsx)(`p`,{className:`m-0 mt-3 text-[12.5px] text-muted`,children:`Vaults are kept on this computer for this project, never in the repository: share them with Export and Import, which carry no value. Give ForgeQE's sign-in read access to the secrets it needs, nothing more.`})]}),(0,J.jsx)(Qk,{panel:g,setPanel:_,busy:S,error:O,onSave:e=>void ee(()=>vt.save(e.name,e.value),`${e.mode===`add`?`Added`:`Saved`} ${e.name}.`,()=>_(null)),onRemove:e=>void ee(()=>vt.remove(e),`Removed ${e}.`,()=>_(null)),onPull:e=>void ee(async()=>{let t=await vt.pullAgain(e);if(t.failed.length)throw Error(t.failed[0].error);return t.view},`Pulled ${e} again.`,()=>_(null)),taken:new Set(P.secrets.map(e=>e.name))}),(0,J.jsx)($k,{panel:v,setPanel:y,busy:S,error:O,roles:P.keyRoles,taken:new Set(P.vaults.map(e=>e.id)),missing:P.vaults.find(e=>e.id===v?.v.id)?.missing,onSave:e=>void ee(()=>vt.saveVault(e.v,e.mode===`edit`),`${e.mode===`add`?`Added`:`Saved`} the vault ${e.v.id}.${e.v.auth===`cli`?` Sign in on its row if it says Not signed in.`:``}`,()=>{y(null),N(t=>{let{[e.v.id]:n,...r}=t;return r})}),onRemove:e=>void ee(()=>vt.removeVault(e),`Removed the vault ${e}. The secrets pulled from it stay saved.`,()=>y(null))}),(0,J.jsx)(eA,{vault:b,onClose:()=>x(null),taken:new Set(P.secrets.map(e=>e.name)),onPulled:(e,t,n)=>{o(e),x(null),c(`sec-saved`),p(`Pulled ${n} as ${t}. Agents and tests can use it by that name.`)}})]})}function Qk({panel:e,setPanel:t,busy:n,error:r,onSave:i,onRemove:a,onPull:o,taken:s}){let c=e?.mode===`add`?Kk(e.name,e.token?`GITHUB_TOKEN`:void 0)||(s.has(e.name)?`${e.name} is already in the list: edit it there.`:``)||(e.token&&!Gk.test(e.name)?`A token's name ends in TOKEN or PAT, such as GITHUB_TOKEN.`:``):``,l=e?.row?.from===`vault`,[u,d]=(0,q.useState)(!1);return(0,q.useEffect)(()=>d(!1),[!!e]),(0,J.jsx)(Cn,{open:!!e,onClose:()=>t(null),title:e?.mode===`edit`?`Edit ${e.name}`:e?.token?`Add a repository token`:`Add a secret`,description:`The value goes to your credential store when you press the button below. ForgeQE never shows it again, and the agents see only its name.`,footer:(0,J.jsxs)(J.Fragment,{children:[r?(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:r}):c?(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:`Needs a valid name`}):null,e?.mode===`edit`&&(0,J.jsx)(B,{disabled:n,onClick:()=>a(e.name),className:`mr-auto text-fail`,children:`Remove`}),(0,J.jsx)(B,{onClick:()=>t(null),children:`Cancel`}),(0,J.jsx)(B,{variant:`primary`,disabled:n||!!c||!e?.value.trim(),onClick:()=>e&&i(e),children:n?`Saving…`:e?.mode===`add`?e.token?`Add token`:`Add secret`:e?.token?`Save token`:`Save secret`})]}),children:e&&(0,J.jsxs)(J.Fragment,{children:[e.mode===`add`&&(0,J.jsx)(G,{label:`Name`,help:c?(0,J.jsx)(`span`,{className:`text-fail`,children:c}):e.token?`The variable a clone signs in with: one per host or account.`:`The variable agents and tests read it by.`,htmlFor:`sh-name`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(V,{id:`sh-name`,value:e.name,spellCheck:!1,maxLength:64,placeholder:e.token?`GITHUB_TOKEN`:`SHOP_PASSWORD`,"aria-invalid":!!c,onChange:n=>t({...e,name:n.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,`_`)}),className:`font-mono`})}),l&&e.row?.vault&&(0,J.jsx)(G,{label:`From a vault`,help:`${e.row.vault.provider} ${e.row.vault.id}: ${e.row.vault.secret}${e.row.vault.key?` › ${e.row.vault.key}`:``}, pulled ${GO(e.row.vault.at)}. Pull it again for the vault's newest value; a value typed below replaces it and is no longer the vault's.`,className:`mt-4`,stacked:!0,children:(0,J.jsxs)(B,{size:`sm`,disabled:n,onClick:()=>o(e.name),children:[(0,J.jsx)(D,{"aria-hidden":`true`}),`Pull again`]})}),(0,J.jsx)(G,{label:e.mode===`edit`?`New value`:e.token?`Token`:`Value`,help:e.token?`A personal access token with read access to the repositories (GitHub: Contents read; Azure DevOps: Code read; GitLab: read_repository).`:(0,J.jsxs)(J.Fragment,{children:[`At most 16 KB.`,` `,(0,J.jsx)(`button`,{type:`button`,onClick:()=>d(!u),className:`cursor-pointer border-0 bg-transparent p-0 text-[13px] text-accent-fg underline`,children:u?`One line, hidden`:`Several lines (shown as you type), such as a JSON key`})]}),htmlFor:`sh-value`,className:e.mode===`edit`&&!l?`mt-4`:void 0,stacked:!0,children:u&&!e.token?(0,J.jsx)(Zt,{id:`sh-value`,rows:6,autoComplete:`off`,spellCheck:!1,value:e.value,onChange:n=>t({...e,value:n.target.value}),className:`font-mono`}):(0,J.jsx)(V,{id:`sh-value`,type:`password`,autoComplete:`off`,value:e.value,onChange:n=>t({...e,value:n.target.value})})})]})})}function $k({panel:e,setPanel:t,busy:n,error:r,roles:i,taken:a,missing:o,onSave:s,onRemove:c}){let l=e?.v,u=qk.find(e=>e.id===l?.provider)??qk[0],d=n=>e&&t({...e,v:{...e.v,...n}}),f=l?.auth===`keys`?Object.entries(i[l.provider]).map(([e,t])=>[e,Kk(l.keys?.[e]??t)]).filter(([,e])=>e):[],p=e?.mode===`add`?/^[a-z][a-z0-9-]{0,39}$/.test(l?.id||``)?a.has(l.id)?`A vault is already named ${l.id}.`:``:`Lower case letters, digits and -, such as qa-kv.`:``;return(0,J.jsx)(Cn,{open:!!e,onClose:()=>t(null),title:e?.mode===`edit`?`Edit ${l?.id}`:`Add a vault`,description:`Where ForgeQE pulls secrets from, and how it signs in. Kept on this computer for this project. Nothing is read until you pull a secret.`,footer:(0,J.jsxs)(J.Fragment,{children:[r?(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:r}):p||f.length?(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:`Needs a valid name`}):null,e?.mode===`edit`&&(0,J.jsx)(B,{disabled:n,onClick:()=>c(l.id),className:`mr-auto text-fail`,children:`Remove`}),(0,J.jsx)(B,{onClick:()=>t(null),children:`Cancel`}),(0,J.jsx)(B,{variant:`primary`,disabled:n||!!p||f.length>0||!l?.where.trim(),onClick:()=>e&&s(e),children:n?`Saving…`:e?.mode===`add`?`Add vault`:`Save vault`})]}),children:e&&l&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Provider`,htmlFor:`vt-provider`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(qt,{id:`vt-provider`,value:l.provider,disabled:e.mode===`edit`,onChange:e=>d({provider:e.target.value,where:``,keys:void 0,profile:void 0}),children:qk.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.label},e.id))})}),e.mode===`add`&&(0,J.jsx)(G,{label:`Name`,help:p?(0,J.jsx)(`span`,{className:`text-fail`,children:p}):`What this project calls it.`,htmlFor:`vt-id`,stacked:!0,children:(0,J.jsx)(V,{id:`vt-id`,value:l.id,spellCheck:!1,maxLength:40,placeholder:`qa-kv`,"aria-invalid":!!p,onChange:e=>d({id:e.target.value.toLowerCase().replace(/[^a-z0-9-]/g,`-`)}),className:`font-mono`})}),(0,J.jsx)(G,{label:u.where,help:u.whereHelp,htmlFor:`vt-where`,stacked:!0,children:(0,J.jsx)(V,{id:`vt-where`,value:l.where,spellCheck:!1,maxLength:64,placeholder:u.placeholder,onChange:e=>d({where:e.target.value.trim()}),className:`font-mono`})}),(0,J.jsx)(G,{label:`Sign in with`,help:l.auth===`cli`?`Your own account, in your browser: Sign in on the vault's row after you add it. The cloud's CLI keeps the sign-in and renews it; ForgeQE saves nothing.`:`For a computer with nobody to sign in, such as a build agent.`,htmlFor:`vt-auth`,stacked:!0,children:(0,J.jsxs)(qt,{id:`vt-auth`,value:l.auth,onChange:e=>d({auth:e.target.value,keys:e.target.value===`keys`?{...i[l.provider]}:void 0}),children:[(0,J.jsxs)(`option`,{value:`cli`,children:[u.cli,` (recommended)`]}),(0,J.jsx)(`option`,{value:`keys`,children:l.provider===`azure`?`A service principal's keys, saved as secrets (no browser)`:l.provider===`gcp`?`A service account's key, saved as a secret (no browser)`:`Access keys, saved as secrets (no browser)`})]})}),l.provider===`aws`&&l.auth===`cli`&&(0,J.jsx)(G,{label:`Profile (optional)`,help:`An SSO profile of ~/.aws/config (set one up once with aws configure sso). Empty: the default.`,htmlFor:`vt-profile`,stacked:!0,children:(0,J.jsx)(V,{id:`vt-profile`,value:l.profile||``,spellCheck:!1,maxLength:64,placeholder:`qa`,onChange:e=>d({profile:e.target.value.trim()||void 0}),className:`font-mono`})}),l.auth===`keys`&&Object.entries(i[l.provider]).map(([e,t])=>(0,J.jsx)(G,{label:Jk[e]||e,help:(()=>{let n=l.keys?.[e]??t,r=Kk(n);return r?(0,J.jsx)(`span`,{className:`text-fail`,children:r}):o?.includes(n)?(0,J.jsx)(`span`,{className:`text-warn`,children:`Not saved yet: add ${n} on the Saved tab.`}):`The secret that holds it, saved on the Saved tab as ${n}.`})(),htmlFor:`vt-${e}`,stacked:!0,children:(0,J.jsx)(V,{id:`vt-${e}`,"aria-invalid":!!Kk(l.keys?.[e]??t),value:l.keys?.[e]??t,spellCheck:!1,maxLength:64,onChange:t=>d({keys:{...l.keys||i[l.provider],[e]:t.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,`_`)}}),className:`font-mono`})},e))]})})}function eA({vault:e,onClose:t,taken:n,onPulled:r}){let[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(null),[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)(``),g=()=>{e&&(a(null),s(``),vt.names(e.id).then(a,e=>s(e.message)))};(0,q.useEffect)(()=>{d(null),l(``),h(``),g()},[e?.id]);let _=(i?.names||[]).filter(e=>e.toLowerCase().includes(c.trim().toLowerCase())),v=_.slice(0,200),y=u?Kk(u.name):``,b=async()=>{if(e&&u){p(!0),h(``);try{r(await vt.pull({vault:e.id,secret:u.secret,name:u.name,...u.key.trim()?{key:u.key.trim()}:{}}),u.name,u.secret)}catch(e){h(e.message)}finally{p(!1)}}};return(0,J.jsxs)(Cn,{open:!!e,onClose:t,wide:!0,title:e?`Secrets of ${e.id}`:`Secrets`,description:e?`The names in ${e.providerLabel} ${e.where}. Pick one to pull its value into your credential store under a variable's name; ForgeQE never shows the value.`:void 0,footer:(0,J.jsxs)(J.Fragment,{children:[m?(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:m}):(0,J.jsx)(`span`,{className:`mr-auto self-center text-sm text-muted`,children:u?y?`Needs a valid name`:`${u.secret} as ${u.name}`:``}),(0,J.jsx)(B,{onClick:t,children:`Cancel`}),(0,J.jsx)(B,{variant:`primary`,disabled:f||!u||!!y,onClick:()=>void b(),children:f?`Pulling…`:`Pull secret`})]}),children:[(0,J.jsxs)(`div`,{"aria-live":`polite`,children:[!i&&!o&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:`Reading the vault's names…`}),o&&(0,J.jsx)(`div`,{className:`mt-4`,children:(0,J.jsx)(Zn,{error:o,reload:g})})]}),i&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(G,{label:`Find`,htmlFor:`br-find`,className:`mt-4`,stacked:!0,children:(0,J.jsx)(V,{id:`br-find`,value:c,placeholder:`password`,onChange:e=>l(e.target.value)})}),!_.length&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft py-5 text-sm text-muted`,children:i.total?`None matches.`:`None yet: ForgeQE's sign-in can see no secret in this vault.`}),(0,J.jsx)(`ul`,{"aria-label":`Secrets in the vault`,className:`m-0 list-none p-0`,children:v.map(e=>{let t=u?.secret===e;return(0,J.jsxs)(`li`,{className:`border-t border-line-soft`,children:[(0,J.jsxs)(`label`,{className:`flex min-h-12 cursor-pointer items-center gap-3 py-2`,children:[(0,J.jsx)(`input`,{type:`radio`,name:`br-secret`,checked:t,onChange:()=>d({secret:e,name:e.toUpperCase().replace(/[^A-Z0-9_]/g,`_`).replace(/^([^A-Z])/,`S_$1`).slice(0,64),key:``})}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 font-mono text-[13px] [overflow-wrap:anywhere]`,children:e})]}),t&&u&&(0,J.jsxs)(`div`,{className:`mb-3 ml-7 flex flex-col gap-3 rounded-[12px] bg-surface-muted p-3`,children:[(0,J.jsx)(G,{label:`Save as`,help:y?(0,J.jsx)(`span`,{className:`text-fail`,children:y}):n.has(u.name)?`${u.name} is saved already: pulling replaces its value.`:`The variable agents and tests read it by.`,htmlFor:`br-name`,stacked:!0,className:`py-0`,children:(0,J.jsx)(V,{id:`br-name`,value:u.name,spellCheck:!1,maxLength:64,"aria-invalid":!!y,onChange:e=>d({...u,name:e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,`_`)}),className:`font-mono`})}),(0,J.jsx)(G,{label:`JSON field (optional)`,help:`When the secret holds JSON, the one field to keep, such as password.`,htmlFor:`br-key`,stacked:!0,className:`py-0`,children:(0,J.jsx)(V,{id:`br-key`,value:u.key,spellCheck:!1,maxLength:128,placeholder:`password`,onChange:e=>d({...u,key:e.target.value}),className:`font-mono`})})]})]},e)})}),(_.length>v.length||i.total>i.names.length)&&(0,J.jsx)(`p`,{className:`m-0 border-t border-line-soft pt-3 text-[13px] text-muted`,children:[_.length>v.length?`The first ${v.length} of ${_.length} are shown: find narrows them.`:``,i.total>i.names.length?`The first ${i.names.length.toLocaleString()} of the vault's names are listed.`:``].filter(Boolean).join(` `)})]})]})}function tA({s:e,onCancel:t,onClose:n}){let[r,i]=(0,q.useState)(!1),a=e.state===`running`,o=e.link&&/^https:\/\//.test(e.link)?e.link:void 0;return(0,J.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`mb-3 flex flex-col gap-3 rounded-[12px] card border p-4`,children:[(0,J.jsxs)(`span`,{className:`text-sm font-medium`,children:[`Signing in to `,e.vault]}),(o||e.code)&&a&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[e.code&&(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:`Your code`}),(0,J.jsx)(`span`,{className:`rounded-[8px] border border-line bg-bg px-3 py-1.5 font-mono text-lg font-semibold tracking-[0.12em]`,children:e.code}),(0,J.jsxs)(B,{size:`sm`,"aria-label":`Copy the code`,onClick:()=>{navigator.clipboard?.writeText(e.code).then(()=>i(!0)),setTimeout(()=>i(!1),1500)},children:[(0,J.jsx)(S,{"aria-hidden":`true`}),r?`Copied`:`Copy`]})]}),o&&(0,J.jsxs)(`a`,{href:o,target:`_blank`,rel:`noreferrer noopener`,className:rn({variant:`primary`,size:`sm`}),children:[(0,J.jsx)(Qe,{"aria-hidden":`true`}),`Open `,new URL(o).host]})]}),(0,J.jsxs)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-sm`,children:[e.lines.slice(-6).map((t,n)=>(0,J.jsx)(`li`,{className:z(`[overflow-wrap:anywhere]`,n===e.lines.slice(-6).length-1&&e.state===`done`?`text-pass`:n===e.lines.slice(-6).length-1&&e.state===`failed`?`text-fail`:`text-ink-2`),children:t},n)),a&&(0,J.jsx)(`li`,{className:`text-muted`,children:`Waiting for you to finish in the browser…`})]}),(0,J.jsx)(`div`,{children:a?(0,J.jsx)(B,{size:`sm`,onClick:t,children:`Cancel`}):(0,J.jsx)(B,{size:`sm`,onClick:n,children:`Close`})})]})}var nA={testmu:`TestMu AI`,browserstack:`BrowserStack`},rA={testmu:{provider:`testmu`,remote:{username_env:`LT_USERNAME`,access_key_env:`LT_ACCESS_KEY`}},browserstack:{provider:`browserstack`,remote:{username_env:`BROWSERSTACK_USERNAME`,access_key_env:`BROWSERSTACK_ACCESS_KEY`}}},iA=(...e)=>e.map(([e,t])=>({value:e,label:t})),aA={testmu:[{key:`type`,label:`Type`,type:`select`,default:`real`,options:iA([`real`,`Real device`],[`virtual`,`Emulator or simulator`])},{key:`platform`,label:`Platform`,type:`select`,default:`android`,options:iA([`android`,`Android`],[`ios`,`iOS`])},{key:`model`,label:`Device model`,help:`As TestMu AI names it.`,type:`text`,placeholder:`Galaxy S23`},{key:`os_version`,label:`OS version`,type:`text`,placeholder:`13`},{key:`enabled`,label:`Use in runs`,help:`Off: kept here, run only when a run names it.`,type:`switch`,default:!0}],browserstack:[{key:`platform`,label:`Platform`,type:`select`,default:`android`,options:iA([`android`,`Android`],[`ios`,`iOS`])},{key:`model`,label:`Device model`,help:`As BrowserStack names it. Real devices only.`,type:`text`,placeholder:`Google Pixel 7`},{key:`os_version`,label:`OS version`,type:`text`,placeholder:`13.0`},{key:`enabled`,label:`Use in runs`,help:`Off: kept here, run only when a run names it.`,type:`switch`,default:!0}]},oA=`Kept in your credential store; the file has only the variable's name. The same sign-in as its browsers.`,sA={testmu:[{key:`remote.username_env`,label:`TestMu AI user`,help:oA,type:`var`,default:`LT_USERNAME`},{key:`remote.access_key_env`,label:`TestMu AI key`,help:oA,type:`var`,default:`LT_ACCESS_KEY`},{key:`mobile.region`,label:`Region for devices`,type:`text`,placeholder:`us`}],browserstack:[{key:`remote.username_env`,label:`BrowserStack user`,help:oA,type:`var`,default:`BROWSERSTACK_USERNAME`},{key:`remote.access_key_env`,label:`BrowserStack key`,help:oA,type:`var`,default:`BROWSERSTACK_ACCESS_KEY`}]};function cA(e){return[e.type===`virtual`?e.platform===`ios`?`simulator`:`emulator`:`real device`,`${e.platform===`ios`?`iOS`:`Android`}${e.os_version?` ${String(e.os_version)}`:``}`,e.model,e.enabled===!1?`not in use`:``].filter(Boolean).map(String).join(` · `)}function lA({grids:e,setGrids:t,paths:n,vars:r}){return(0,J.jsx)(J.Fragment,{children:[`testmu`,`browserstack`].map(i=>{let a=nA[i],o={value:e[i]??rA[i],set:n=>t({...e,[i]:n}),vars:r,file:n[i]};return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(W,{help:(0,J.jsxs)(J.Fragment,{children:[`Kept in `,(0,J.jsx)(`code`,{className:`font-mono text-[12.5px]`,children:n[i]}),`, `,a,`'s own file`,e[i]?``:`, made when you add a device`,`. Its browsers and their devices are in the same file:`,` `,(0,J.jsxs)(`a`,{href:H(`settings`,`integrations`),children:[`Integrations → `,a]}),`.`]}),children:`${a} devices`}),(0,J.jsx)(Np,{edit:o,base:[`mobile`,`devices`],defs:aA[i],noun:`${a} device`,placeholder:i===`testmu`?`galaxy-s23`:`pixel7`,start:i===`testmu`?{type:`real`,platform:`android`}:{platform:`android`},meta:cA}),(0,J.jsx)(Nn,{defs:sA[i],edit:o,base:[]})]},i)})})}var uA=(0,q.lazy)(()=>xn(()=>import(`./Features-8jsv2A1d.js`).then(e=>({default:()=>(0,J.jsx)(e.Features,{embedded:!0})})),__vite__mapDeps([0,1,2,3]))),dA=(0,q.lazy)(()=>xn(()=>import(`./WhatsNew-DqNMAytd.js`).then(e=>({default:()=>(0,J.jsx)(e.WhatsNew,{embedded:!0})})),__vite__mapDeps([4,1,2,3]))),fA=[{id:`setup`,group:`Start`,icon:re,label:`Set up`,file:``,intro:`The project folder ForgeQE works on, ForgeQE in it, and what this computer needs to run it.`},{id:`environments`,group:`General`,icon:C,label:`Environments`,file:``,intro:`Where the agents work, and the apps in each place. The active one is used unless a request names another.`},{id:`signins`,group:`General`,icon:ce,label:`Sign-ins`,file:`forgeqe.yaml`,intro:`Logins for the apps the agents sign in to. Passwords go to your credential store; the model sees only a placeholder.`},{id:`secrets`,group:`General`,icon:je,label:`Secrets`,file:``,intro:`Every password, key and token ForgeQE keeps, by name, and the vaults it pulls them from: Azure Key Vault, Google Secret Manager and AWS Secrets Manager. Values go to your credential store; the agents see only the names.`},{id:`integrations`,group:`General`,icon:M,label:`Integrations`,file:`forgeqe.yaml`,intro:`Test case systems and bugs (sources:), and remote browser grids (browser.providers).`},{id:`notifications`,group:`General`,icon:Re,label:`Notifications`,file:`forgeqe.yaml`,intro:`Teams channels and email lists, and the events each one gets (notify:). Monitor alerts are set under Monitor.`},{id:`appearance`,group:`General`,icon:ut,label:`Appearance`,file:`forgeqe.yaml`,intro:`The project's logo, name and colours in this web app, for everyone who opens it (theme:).`},{id:`models`,group:`AI`,icon:he,label:`Models`,file:`llms.json and forgeqe.yaml`,intro:`The models the agents use (llm:). Keys you type go to your credential store, never to a file.`},{id:`routing`,group:`AI`,icon:T,label:`Routing`,file:`forgeqe.yaml`,intro:`Which model each area of work and each agent gets (llm.routing, llm.routes, llm.agents).`},{id:`skills`,group:`AI`,icon:O,label:`Skills`,file:`forgeqe.yaml`,intro:`What the agents know how to do: your test conventions, frameworks and apps, as folders with a SKILL.md, grouped by the agents that use them. Add your own for this project.`},{id:`prompts`,group:`AI`,icon:nt,label:`Prompts`,file:``,intro:`The instructions each agent starts from, with the agents that use each. Edit one to change how that agent works in this project, or add your own prompt for the agents you choose.`},{id:`guardrails`,group:`AI`,icon:Xe,label:`Guardrails`,file:`.forgeqe/guardrails`,intro:`Rules your agents follow in every chat and schedule: for every agent, or only the ones you choose.`},{id:`agents`,group:`AI`,icon:ve,label:`Agents`,file:`forgeqe.yaml`,intro:`What you call the agents, their instructions, where their knowledge and guardrails are, custom agents, and the tools they get.`},{id:`evidence`,group:`AI`,icon:ft,label:`Evidence`,file:`forgeqe.yaml`,intro:`What Evidence and the agents know about your product, in five steps: its repositories, where its requirements are searched, its documents, the product and its knowledge, and how the graph is built.`},{id:`mcp`,group:`AI`,icon:fe,label:`MCP servers`,file:`forgeqe.yaml`,intro:`More MCP servers whose tools ForgeQE's agent gets (mcp:). Each test case system's own server is set with it under Integrations.`},{id:`tests`,group:`Testing`,icon:v,label:`Code`,file:`forgeqe.yaml`,intro:`Writing tests (code:): where passed runs become tests, how hard the coding agent tries, its time limits, and the help it gets.`},{id:`runs`,group:`Testing`,icon:Ge,label:`Reports and memory`,file:`forgeqe.yaml`,intro:`Where reports are exported (export:, report:), page memory and replays (memory:, registry:), suites, flaky tests, release readiness, defect analysis, and the project report (bi:).`},{id:`registry`,group:`Testing`,icon:k,label:`Replays`,file:`forgeqe.yaml`,intro:`Run a passed test again for free: ForgeQE repeats its saved steps without the AI.`},{id:`parallel`,group:`Testing`,icon:g,label:`Parallel execution`,file:`forgeqe.yaml`,intro:`How many browsers, scheduled runs and monitor checks go at once. Mobile devices at once are set under Mobile.`},{id:`browser`,group:`Testing`,icon:Ze,label:`Browser`,file:`forgeqe.yaml`,intro:`How the browser agent runs: where, how it looks, and how long it may take.`},{id:`monitor`,group:`Testing`,icon:I,label:`Monitor`,file:`forgeqe.yaml`,intro:`Checks that run on a schedule, and the alerts when one starts failing, keeps failing, or recovers.`},{id:`mobile`,group:`Testing`,icon:me,label:`Mobile`,file:`forgeqe.yaml and the clouds' files`,intro:`How Android and iOS apps run (mobile:): Appium or Maestro, on several devices at once, on this machine or a device cloud such as TestMu AI. The apps themselves are in Environments.`},{id:`desktop`,group:`Testing`,icon:qe,label:`Desktop`,file:`forgeqe.yaml`,intro:`How Windows desktop apps replay (desktop:). The apps themselves are in Environments.`},{id:`containers`,group:`Testing`,icon:Ye,label:`Containers`,file:`forgeqe.yaml`,intro:`Services for test runs in Docker or Podman (containers:): databases, queues, the API under test, mocks, and the images tests and agents run in.`},{id:`databases`,group:`Testing`,icon:L,label:`Databases`,file:`forgeqe.yaml`,intro:`Databases the agent may read, and write to after you confirm (databases:), for questions, test data and data flows. An environment can add its own.`},{id:`quality`,group:`Testing`,icon:f,label:`Quality`,file:`forgeqe.yaml`,intro:`Accessibility, performance, visual and API checks on every page a run visits.`},{id:`logs`,group:`Activity`,icon:o,label:`Logs`,file:``,intro:`A log of each chat, run and suite on this machine, for finding out what happened.`},{id:`audit`,group:`Activity`,icon:h,label:`Audit`,file:``,intro:`What ForgeQE did and what went wrong: sessions, tool and model calls, runs and errors, and who changed which setting.`},{id:`tokenomics`,group:`Activity`,icon:de,label:`Tokenomics`,file:`forgeqe.yaml`,intro:`Where the tokens and money went, from this project's reports, and the budgets that warn before they run out.`},{id:`generated`,group:`Activity`,icon:ae,label:`Generated code`,file:``,intro:`How much of the code ForgeQE wrote in the repository is still there, by run (forgeqe generated).`},{id:`files`,group:`Advanced`,icon:it,label:`Settings as text`,file:``,intro:`forgeqe.yaml, llms.json and env.yaml as they are on disk, for anything the form does not have.`},{id:`report`,group:`Advanced`,icon:at,label:`Report a problem`,file:``,intro:`Tell the ForgeQE team about a problem in ForgeQE. It drafts the bug with you, shows everything it will send, and files it in their Azure DevOps.`},{id:`features`,group:`Advanced`,icon:Ce,label:`What's ready`,file:``,intro:`What ForgeQE can do here. Pick one to see what it needs.`},{id:`whats-new`,group:`Advanced`,icon:P,label:`What's new`,file:``,intro:`What each release of ForgeQE added, improved and fixed. Pick a change to read more.`},{id:`about`,group:`Advanced`,icon:y,label:`About ForgeQE`,file:``,intro:`The version of ForgeQE on this computer, updating it, and its guides.`}],pA=[`guardrails`,`skills`,`prompts`],mA=fA.filter(e=>!pA.includes(e.id)),hA=[...new Set(mA.map(e=>e.group))],gA=[`setup`,`environments`,`signins`,`secrets`,`integrations`,`notifications`,`appearance`,`models`,`databases`,`features`,`whats-new`,`report`,`about`],_A=`forgeqe-settings-more`,vA={config:`forgeqe.yaml`,models:`llms.json`,environments:`the environment files`,guardrails:`guardrails.md`,grids:`the browser grid files`,secrets:`keys and passwords`};function yA(e,t){let n=e.paths.base.replace(/[\\/]+$/,``);return t.startsWith(`${n}/`)||t.startsWith(`${n}\\`)?`./${t.slice(n.length+1).replace(/\\/g,`/`)}`:t}function bA(e){return{config:e.config,models:e.models,environments:e.environments,guardrails:e.guardrails.filter(e=>e.editable).map(e=>e.text),grids:{browserstack:e.grids.browserstack.linked?e.grids.browserstack.value:null,testmu:e.grids.testmu.linked?e.grids.testmu.value:null},secrets:{}}}var xA={local:`This computer`,browserstack:`BrowserStack`,testmu:`TestMu AI`};function SA(e){let t=xA[String(e.runs_on??`local`)]??String(e.runs_on),n=e.type===`real`||e.type===void 0&&e.runs_on!==void 0&&e.runs_on!==`local`?`real device`:e.platform===`ios`?`simulator`:`emulator`,r=`${e.platform===`ios`?`iOS`:`Android`}${e.os_version?` ${String(e.os_version)}`:``}`;return[`${t}, ${n}`,r,e.model||e.udid,e.enabled===!1?`not in use`:``].filter(Boolean).map(String).join(` · `)}function CA({section:e,only:t}){let n=t??e,[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(null),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(``),[f,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(null),x=(0,q.useCallback)(()=>{l(``),Mt.settings().then(e=>{i(e),o(bA(e))},e=>l(e.message))},[]),S=(0,q.useCallback)(()=>{l(``),St.state().then(e=>{b(e),e.ready&&x()},e=>l(e.message))},[x]);(0,q.useEffect)(S,[S]);let C=e=>{e.project===y?.project&&e.ready||(i(null),o(null)),b(e),e.ready&&x()},w=!!y?.ready;(0,q.useEffect)(()=>{y&&!w&&n!==`setup`?location.replace(H(`settings`,`setup`)):!t&&n&&pA.includes(n)&&location.replace(H(n))},[y,w,n]);let T=(y&&!w?fA[0]:fA.find(e=>e.id===(n===`repo-tokens`?`secrets`:n)))||fA.find(e=>e.id===`models`),[E,O]=(0,q.useState)(()=>{try{return localStorage.getItem(_A)===`open`}catch{return!1}}),k=e=>{O(e);try{localStorage.setItem(_A,e?`open`:`closed`)}catch{}};(0,q.useEffect)(()=>{m(``),d(``),v(!1)},[T.id]);let A=r?bA(r):null,j=e=>!!a&&!!A&&!On(a[e],A[e]),M=Object.keys(vA).filter(j);(0,q.useEffect)(()=>{if(!M.length)return;let e=e=>e.preventDefault();return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[M.length]);let N=e=>({value:a[e],set:t=>{m(``),o(n=>({...n,[e]:t}))},vars:r.variables,...e===`config`?{file:`forgeqe.yaml`}:{}}),P=(0,q.useRef)(a);P.current=a;let F=(0,q.useRef)(r);F.current=r;let[I,L]=(0,q.useState)(``),ee=(0,q.useCallback)(async()=>{let e=P.current,t=F.current;if(!e||!t)return;let n=bA(t),r=Object.keys(vA).filter(t=>!On(e[t],n[t]));if(!r.length)return;g(!0),d(``),v(!1);let a=t,s=(t,n)=>o(r=>{if(!r)return r;let i=bA(t),a={...r};for(let t of Object.keys(vA))if(t===`secrets`){if(!n)continue;a.secrets=Object.fromEntries(Object.entries(r.secrets).filter(([t,n])=>e.secrets[t]!==n))}else(n?On(r[t],e[t]):On(r[t],i[t]))&&(a[t]=i[t]);return a});try{for(let i of r)if(i===`secrets`)a=await Mt.saveSecrets(e.secrets);else if(i===`grids`)for(let[r,i]of Object.entries(e.grids))i&&!On(i,n.grids[r])&&(a=await Mt.saveGrid(r,i,t.versions[`grid:${r}`]));else a=i===`guardrails`?await Mt.saveGuardrails(e.guardrails,t.versions.guardrails):await Mt.save(i,e[i],t.versions[i]);i(a),s(a,!0),L(``),m(`Saved`)}catch(n){d(n.message),v(n instanceof bt&&n.status===409),L(JSON.stringify(e)),a!==t&&(i(a),s(a,!1))}finally{g(!1)}},[]);(0,q.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>m(``),4e3);return()=>clearTimeout(e)},[f]);let te=a?JSON.stringify(a):``;(0,q.useEffect)(()=>{if(!M.length||h||_||I&&I===te)return;let e=M.every(e=>e===`secrets`),t=setTimeout(ee,e?2e3:1e3);return()=>clearTimeout(t)},[te,h,_,I]);let ne=async()=>{d(``);try{let e=await Mt.splitEnvironments();i(e),o(bA(e)),m(`Each environment is now its own file in environments/. The old file is left as it is; ForgeQE no longer reads it.`)}catch(e){d(e.message)}},re=async(e,t,n)=>{d(``);try{let a=await Mt.saveText(e,t,n,r?.versions[e]);return i(a),o(bA(a)),m(`Saved ${vA[e]}.`),!0}catch(e){return d(e.message),!1}},R=null;if(T.id===`setup`)R=y&&(0,J.jsx)(PO,{state:y,onState:C});else if(r&&a){let e=(T.id===`models`||T.id===`routing`?[`models`,`config`]:T.id===`environments`?[`environments`,`config`]:[`files`,`guardrails`,`prompts`,`logs`,`audit`,`generated`,`about`,`report`,`features`,`whats-new`].includes(T.id)?[]:[`config`]).find(e=>r.errors[e]);switch(T.id){case`models`:R=(0,J.jsx)(Gm,{config:N(`config`),models:N(`models`),vars:r.variables,onReload:x});break;case`environments`:R=(0,J.jsx)(Tm,{envs:N(`environments`),layout:r.paths.environments,files:r.raw.environments,base:r.paths.base,onSplit:ne,config:N(`config`),splitBlocked:j(`environments`)||j(`config`)?`Save or discard your changes to the environments and forgeqe.yaml first.`:``});break;case`browser`:R=(0,J.jsx)(yp,{groups:$m,edit:N(`config`)});break;case`appearance`:R=(0,J.jsx)(xk,{config:N(`config`)});break;case`routing`:R=(0,J.jsx)(Zm,{config:N(`config`),models:N(`models`)});break;case`generated`:R=(0,J.jsx)(WO,{});break;case`about`:R=(0,J.jsx)(VO,{});break;case`features`:case`whats-new`:R=(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Opening…`}),children:T.id===`features`?(0,J.jsx)(uA,{}):(0,J.jsx)(dA,{})});break;case`report`:R=(0,J.jsx)($O,{});break;case`notifications`:case`mcp`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(mO,{view:T.id,edit:N(`config`),grids:a.grids,setGrids:e=>o(t=>({...t,grids:e})),gridPaths:{browserstack:yA(r,r.grids.browserstack.file),testmu:yA(r,r.grids.testmu.file)}}),T.id===`notifications`&&(0,J.jsx)(HO,{})]});break;case`parallel`:R=(0,J.jsx)(yp,{groups:mh,edit:N(`config`)});break;case`mobile`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(yp,{groups:hh,edit:N(`config`)}),(0,J.jsx)(W,{help:`Phones, tablets, emulators and simulators connected to this computer. Every device in use, here and on the clouds below, runs each replay and set of Maestro flows; ForgeQE sets up Appium, Maestro and the cloud for each.`,children:`Devices on this computer`}),(0,J.jsx)(Np,{edit:N(`config`),base:[`mobile`,`devices`],defs:_h,noun:`device`,placeholder:`pixel8`,start:{type:`virtual`,platform:`android`},meta:SA}),(0,J.jsx)(lA,{grids:a.grids,setGrids:e=>{m(``),o(t=>({...t,grids:e}))},paths:{browserstack:yA(r,r.grids.browserstack.file),testmu:yA(r,r.grids.testmu.file)},vars:r.variables}),(0,J.jsx)(yp,{groups:vh,edit:N(`config`),continued:!0})]});break;case`desktop`:R=(0,J.jsx)(yp,{groups:yh,edit:N(`config`)});break;case`containers`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(yp,{groups:bh.slice(0,1),edit:N(`config`)}),(0,J.jsx)(W,{help:`Each one ForgeQE may start, stop and read: a database, a queue, the API under test.`,children:`Services`}),(0,J.jsx)(Np,{edit:N(`config`),base:[`containers`,`services`],defs:Ch,noun:`service`,placeholder:`db`,meta:e=>[e.image,Array.isArray(e.ports)?`ports ${e.ports.join(`, `)}`:``].filter(Boolean).map(String).join(`, `)}),(0,J.jsx)(yp,{groups:bh.slice(1),edit:N(`config`),continued:!0})]});break;case`databases`:R=(0,J.jsx)(Np,{edit:N(`config`),base:[`databases`],defs:wh,noun:`database`,placeholder:`orders`,meta:e=>[e.description,e.engine,e.url_env?`from ${e.url_env}`:e.host,e.writable?`writable`:`read only`].filter(Boolean).map(String).join(`, `)});break;case`signins`:R=(0,J.jsx)(Tp,{edit:N(`config`)});break;case`secrets`:R=(0,J.jsx)(Zk,{show:n===`repo-tokens`?`tokens`:void 0});break;case`integrations`:R=(0,J.jsx)(mO,{edit:N(`config`),grids:a.grids,setGrids:e=>{m(``),o(t=>({...t,grids:e}))},gridPaths:{browserstack:yA(r,r.grids.browserstack.file),testmu:yA(r,r.grids.testmu.file)}});break;case`tests`:R=(0,J.jsx)(yp,{groups:eh,edit:N(`config`)});break;case`runs`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(yp,{groups:th,edit:N(`config`)}),(0,J.jsx)(yp,{groups:fh,edit:N(`config`),continued:!0}),(0,J.jsx)(W,{help:`Each one a table of the project report: forgeqe.<name>.`,children:`Report datasets`}),(0,J.jsx)(Np,{edit:N(`config`),base:[`bi`,`datasets`],defs:ph,noun:`dataset`,placeholder:`open_bugs`,meta:e=>[e.title,e.kind===`jira_jql`?`Jira`:e.kind===`ado_wiql`?`Azure DevOps`:``].filter(Boolean).map(String).join(`, `)})]});break;case`quality`:R=(0,J.jsx)(yp,{groups:nh,edit:N(`config`)});break;case`evidence`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Nk,{edit:N(`config`)}),(0,J.jsx)(UO,{})]});break;case`agents`:R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(yp,{groups:ch,edit:N(`config`)}),(0,J.jsx)(ek,{config:N(`config`)})]});break;case`guardrails`:R=(0,J.jsx)(wO,{rules:a.guardrails,others:r.guardrails.filter(e=>!e.editable),onChange:e=>o({...a,guardrails:e}),onChanged:e=>(m(e),Mt.settings().then(i,()=>{}))});break;case`monitor`:R=(0,J.jsx)(xO,{edit:N(`config`)});break;case`skills`:R=(0,J.jsx)(cm,{edit:N(`config`)});break;case`prompts`:R=(0,J.jsx)(am,{onChanged:m});break;case`registry`:R=(0,J.jsx)(Xn,{edit:N(`config`)});break;case`logs`:R=(0,J.jsx)(sn,{});break;case`audit`:R=(0,J.jsx)(fn,{});break;case`tokenomics`:R=(0,J.jsx)(mn,{edit:N(`config`)});break;case`files`:R=(0,J.jsx)(jp,{snap:r,dirty:{config:j(`config`),models:j(`models`),environments:j(`environments`)},onSave:re})}e&&(R=(0,J.jsxs)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-4 py-3 text-sm leading-relaxed text-fail`,children:[e===`environments`?`An environment file`:vA[e],` does not parse, so the form cannot show it: `,r.errors[e],`. Fix it in `,(0,J.jsx)(`a`,{href:H(`settings`,`files`),children:`Settings as text`}),`.`]}))}let ie=u?(0,J.jsxs)(`div`,{role:`alert`,className:`flex w-full flex-wrap items-center gap-3 rounded-[14px] border border-fail-soft bg-fail-soft px-4 py-3 text-sm leading-relaxed text-fail shadow-composer`,children:[(0,J.jsx)(`span`,{className:`flex-[1_1_260px] [overflow-wrap:anywhere]`,children:u}),_?(0,J.jsxs)(B,{size:`sm`,onClick:()=>{v(!1),d(``),L(``),S()},"data-tip":`Reload, and lose my unsaved changes`,children:[(0,J.jsx)(D,{"aria-hidden":`true`}),`Reload`]}):(0,J.jsxs)(`span`,{className:`flex gap-2`,children:[M.length>0&&(0,J.jsxs)(B,{size:`sm`,onClick:()=>{o(A),d(``),L(``)},"data-tip":`Undo my change`,children:[(0,J.jsx)(ye,{"aria-hidden":`true`}),`Undo`]}),(0,J.jsxs)(B,{size:`sm`,onClick:()=>{d(``),L(``),ee()},children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Retry`]})]})]}):null,ae={pending:a?.secrets||{},set:(e,t)=>{m(``),o(n=>{let r={...n.secrets};return t===void 0?delete r[e]:r[e]=t,{...n,secrets:r}})},saved:new Set(r?.saved||[]),vars:r?.variables||{},store:r?.store||`the credential store`};return(0,J.jsx)(Pn.Provider,{value:ae,children:(0,J.jsxs)(`div`,{className:`settings-fields flex min-h-(--screen) flex-col`,children:[(0,J.jsx)(lr,{}),(0,J.jsxs)(`main`,{className:z(`box-border flex w-full flex-auto flex-col items-stretch sm:flex-row sm:items-start`,t&&`mx-auto box-border flex w-full max-w-[1180px] flex-col px-6 pt-8 pb-10 md:px-12 short:pt-5 short:pb-6`),children:[(0,J.jsxs)(`div`,{className:z(`theme-side theme-side--wide w-full flex-col gap-3 border-line px-3 pt-5 pb-4 sm:sticky sm:top-0 sm:h-(--screen) sm:w-[248px] sm:flex-none sm:overflow-y-auto sm:border-r sm:bg-surface-muted`,t?`hidden`:`flex`),children:[(0,J.jsxs)(`a`,{href:H(),className:`inline-flex min-h-9 items-center gap-2 self-start rounded-[8px] px-2 text-[13.5px] font-medium text-ink-2 no-underline hover:bg-surface-strong hover:text-ink`,children:[(0,J.jsx)(be,{size:16,"aria-hidden":`true`}),`Back`]}),(0,J.jsx)(`p`,{className:`m-0 px-2 pt-1 text-[15px] font-semibold`,children:`Settings`}),(0,J.jsx)(EA,{ready:w}),(0,J.jsx)(`label`,{htmlFor:`section-pick`,className:`sr-only`,children:`Section`}),(0,J.jsx)(qt,{id:`section-pick`,value:T.id,onChange:e=>location.hash=H(`settings`,e.target.value),className:`sm:hidden`,children:hA.map(e=>(0,J.jsx)(`optgroup`,{label:e,children:mA.filter(t=>t.group===e).map(e=>(0,J.jsx)(`option`,{value:e.id,disabled:!w&&e.id!==`setup`,children:e.label},e.id))},e))}),(0,J.jsxs)(`nav`,{"aria-label":`Settings sections`,className:`hidden flex-col gap-3 sm:flex`,children:[(0,J.jsx)(wA,{sections:mA.filter(e=>gA.includes(e.id)),current:T.id,locked:!!y&&!w}),(0,J.jsx)(TA,{open:E||!gA.includes(T.id),onToggle:()=>k(!E),children:(0,J.jsx)(wA,{sections:mA.filter(e=>!gA.includes(e.id)),current:T.id,locked:!!y&&!w})})]})]}),(0,J.jsxs)(`section`,{"aria-labelledby":`sec-h`,className:z(`flex min-w-0 flex-1 flex-col`,!t&&`mx-auto box-border flex w-full max-w-[1180px] flex-col px-6 pt-8 pb-10 md:px-12 short:pt-5 short:pb-6`),children:[t?(0,J.jsxs)(`div`,{className:`mb-1 flex items-center gap-3`,children:[(0,J.jsx)(pn,{icon:T.icon,pixel:Kn[T.id],size:`lg`}),(0,J.jsx)(`h1`,{id:`sec-h`,className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:T.label})]}):(0,J.jsxs)(`h1`,{id:`sec-h`,className:`m-0 mb-2 flex items-center gap-3 text-[26px] leading-tight font-semibold tracking-[-0.01em]`,children:[(0,J.jsx)(zt,{icon:T.icon,size:22,className:`flex-none text-muted`}),T.label]}),(0,J.jsxs)(`p`,{className:`mt-0 mb-10 max-w-[64ch] text-[14px] leading-relaxed text-ink-2`,children:[T.intro,T.file&&r&&(0,J.jsxs)(J.Fragment,{children:[` `,`Saved in `,(0,J.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:T.file}),`.`]})]}),c&&(0,J.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-4 border-t border-line pt-6`,children:[(0,J.jsx)(`p`,{className:`m-0 max-w-[60ch] leading-relaxed text-ink-2`,children:c}),(0,J.jsxs)(B,{size:`sm`,onClick:S,children:[(0,J.jsx)(p,{"aria-hidden":`true`}),`Retry`]})]}),y&&!w&&(0,J.jsxs)(`p`,{className:`mt-0 mb-5 flex items-start gap-2 rounded-[12px] bg-surface-muted px-4 py-3 text-sm leading-relaxed text-ink-2`,children:[(0,J.jsx)(je,{size:16,"aria-hidden":`true`,className:`mt-0.5 flex-none`}),`The other sections open once ForgeQE is set up in a project folder: choose the folder, then Set up.`]}),!c&&(!y||T.id!==`setup`&&!r)&&(0,J.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading settings…`}),R,(0,J.jsxs)(`div`,{className:`sticky bottom-4 z-10 mt-8 flex flex-col items-end gap-2`,children:[ie,(0,J.jsx)(`div`,{"aria-live":`polite`,className:`contents`,children:!u&&(M.length>0||h||f)&&(0,J.jsx)(`span`,{className:z(`inline-flex min-h-9 items-center gap-2 rounded-full border border-line bg-bg px-4 text-[13px] shadow-composer`,M.length||h?`text-ink-2`:`text-pass`),children:M.length||h?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Gt,{state:`working`,px:16}),`Saving…`]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{size:14,"aria-hidden":`true`}),f]})})})]})]})]})]})})}function wA({sections:e,current:t,locked:n}){let r=[...new Set(e.map(e=>e.group))];return(0,J.jsx)(J.Fragment,{children:r.map(r=>{let i=`group-${r}-${e[0]?.id}`;return(0,J.jsxs)(`div`,{role:`group`,"aria-labelledby":i,className:`flex flex-col gap-px`,children:[(0,J.jsx)(`span`,{id:i,className:`px-2 pt-1 pb-1 text-[12px] font-medium text-muted`,children:r}),e.filter(e=>e.group===r).map(e=>n&&e.id!==`setup`?(0,J.jsxs)(`span`,{"aria-disabled":`true`,"data-tip":`Set up ForgeQE in a project folder first`,className:`flex min-h-8 cursor-not-allowed items-center gap-2.5 rounded-[7px] px-2 text-[13.5px] text-muted opacity-60`,children:[(0,J.jsx)(zt,{icon:e.icon,size:16,className:`flex-none`}),(0,J.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,J.jsx)(je,{size:13,"aria-label":`Locked`,className:`flex-none`})]},e.id):(0,J.jsxs)(`a`,{href:H(`settings`,e.id),"aria-current":t===e.id?`page`:void 0,className:z(`group flex min-h-8 items-center gap-2.5 rounded-[7px] px-2 text-[13.5px] no-underline`,t===e.id?`bg-surface-strong font-medium text-ink hover:text-ink`:`text-ink-2 hover:bg-surface-strong hover:text-ink`),children:[(0,J.jsx)(zt,{icon:e.icon,size:16,className:z(`flex-none`,t===e.id?`text-ink`:`text-muted group-hover:text-ink`)}),e.label]},e.id))]},r)})})}function TA({open:e,onToggle:t,children:n}){return(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line-soft pt-2`,children:[(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":e,"aria-controls":`settings-more`,onClick:t,className:`flex h-7 cursor-pointer items-center gap-1 rounded-[6px] border-0 bg-transparent px-2 text-left text-[12px] font-medium text-muted hover:text-ink`,children:[(0,J.jsx)(`span`,{className:`flex-1`,children:`More settings`}),(0,J.jsx)(l,{size:14,strokeWidth:2,"aria-hidden":`true`,className:z(`flex-none transition-transform duration-200`,e&&`rotate-90`)})]}),(0,J.jsx)(dn,{open:e,id:`settings-more`,children:(0,J.jsx)(`div`,{className:`flex flex-col gap-3`,children:n})})]})}function EA({ready:e}){let[t,n]=(0,q.useState)(``),r=t.toLowerCase().split(/\s+/).filter(Boolean),i=e=>fA.find(t=>t.id===e)?.label||e,a=r.length?kO.filter(e=>r.every(t=>`${e.label} ${e.key} ${i(e.section)}`.toLowerCase().includes(t))).slice(0,12):[];return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`label`,{htmlFor:`find-setting`,className:`sr-only`,children:`Find a setting`}),(0,J.jsx)(V,{size:`sm`,id:`find-setting`,type:`search`,value:t,disabled:!e,placeholder:`Search settings`,className:`bg-bg`,"data-tip":`By its name or its forgeqe.yaml key: max attempts, memory.dir`,onChange:e=>n(e.target.value)}),r.length>0&&(0,J.jsxs)(`ul`,{"aria-label":`Settings found`,className:`m-0 flex list-none flex-col p-0`,children:[a.length===0&&(0,J.jsx)(`li`,{className:`px-2 py-2 text-[13px] text-muted`,children:`Nothing called that. Every key can also be edited in Settings as text.`}),a.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`a`,{href:H(`settings`,e.section),onClick:()=>n(``),className:`flex flex-col rounded-[10px] px-2 py-1.5 text-ink no-underline hover:bg-surface-muted hover:text-ink`,children:[(0,J.jsx)(`span`,{className:`text-sm`,children:e.label}),(0,J.jsxs)(`span`,{className:`text-[12px] text-muted`,children:[i(e.section),` · `,(0,J.jsx)(`code`,{className:`font-mono text-[11.5px]`,children:e.key})]})]})},`${e.section}:${e.key}`))]})]})}var DA=class extends q.Component{state={failed:!1,at:this.props.at};static getDerivedStateFromError(){return{failed:!0}}static getDerivedStateFromProps(e,t){return e.at===t.at?null:{failed:!1,at:e.at}}componentDidCatch(e){console.error(`This page could not be shown:`,e)}render(){return this.state.failed?(0,J.jsxs)(`div`,{role:`alert`,className:`m-0 px-6 py-10 text-sm text-muted`,children:[(0,J.jsx)(`p`,{className:`m-0`,children:`This page could not be shown. Check the address, or go back and try again.`}),(0,J.jsx)(`p`,{className:`m-0 mt-2`,children:(0,J.jsx)(`a`,{href:H(),className:`underline`,children:`Go to Home`})})]}):this.props.children}};function OA(e,t){let n,r,i=()=>r??=e().then(e=>n=t(e),e=>{throw r=void 0,e}),a=(0,q.lazy)(()=>i().then(()=>({default:n})));return Object.assign(e=>(0,q.createElement)(n||a,e),{preload:i})}var kA=()=>xn(()=>import(`./Chat-czaM5kUi.js`),__vite__mapDeps([5,1,2,3,6,7,8,9])),AA=OA(kA,e=>e.Chat),jA=OA(kA,e=>e.Chats),MA=OA(()=>xn(()=>import(`./Reports-DXphAHAy.js`),__vite__mapDeps([10,1,2,3,11,12])),e=>e.Reports),NA=OA(()=>xn(()=>import(`./Agent-BU8FKiQt.js`),__vite__mapDeps([13,1,2,3,6,7,11,14,15,16,17,18,12])),e=>e.Agent),PA=OA(()=>xn(()=>import(`./Runs-DSQZwCpE.js`),__vite__mapDeps([18,1,2,3,6,7,11,12])),e=>e.Runs),FA=OA(()=>xn(()=>import(`./Record-CoCnmfqW.js`),__vite__mapDeps([19,1,2,3,11,7,9,20,16])),e=>e.Record),IA=OA(()=>xn(()=>import(`./Desktop-DY5Q1Sd3.js`),__vite__mapDeps([21,1,2,3,11,16,20])),e=>e.Desktop),LA=OA(()=>xn(()=>import(`./Regression-D_Hy9bMt.js`),__vite__mapDeps([22,1,2,3,6,7,14])),e=>e.Regression),RA=OA(()=>xn(()=>import(`./Impact-Da9L1tDd.js`),__vite__mapDeps([23,1,2,3,11,24])),e=>e.Impact),zA=OA(()=>xn(()=>import(`./ApiTests-Bsv3NhD5.js`),__vite__mapDeps([25,1,2,3,6,7,14])),e=>e.ApiTests),BA=OA(()=>xn(()=>import(`./Migration-Cu4JgOj1.js`),__vite__mapDeps([26,1,2,3,11,12,27,28,29])),e=>e.Migration),VA=OA(()=>xn(()=>import(`./Tosca-umw1O224.js`),__vite__mapDeps([30,1,2,3,11,12,27,28,29,31])),e=>e.Tosca),HA=OA(()=>xn(()=>import(`./Compare-DfHMTNGi.js`),__vite__mapDeps([32,1,2,28,31,29,11])),e=>e.ToscaCompare),UA=OA(()=>xn(()=>import(`./Quality-ylTg9e0c.js`),__vite__mapDeps([33,1,2,3,11,34])),e=>e.Quality),WA=OA(()=>xn(()=>import(`./Flaky-BCzOx7Mq.js`),__vite__mapDeps([35,1,2,3,11,12,34])),e=>e.Flaky),GA=OA(()=>xn(()=>import(`./RunDiff-C3MIKipo.js`),__vite__mapDeps([36,1,2,3,11,12,34])),e=>e.RunDiff),KA=OA(()=>xn(()=>import(`./TestDebt-D59zFYSu.js`),__vite__mapDeps([37,1,2,3,34])),e=>e.TestDebt),qA=OA(()=>xn(()=>import(`./Flags-DtzmOA5o.js`),__vite__mapDeps([38,1,2,3,34])),e=>e.Flags),JA=OA(()=>xn(()=>import(`./Production-CLoOV4jl.js`),__vite__mapDeps([39,1,2,3,34])),e=>e.Production),YA=OA(()=>xn(()=>import(`./Cost-BYb3T8-c.js`),__vite__mapDeps([40,1,2,3,34])),e=>e.Cost),XA=OA(()=>xn(()=>import(`./Explore-B0EkFCFe.js`),__vite__mapDeps([41,1,2,3,34])),e=>e.Explore),ZA=OA(()=>xn(()=>import(`./Readiness-BMD5Uj8D.js`),__vite__mapDeps([42,1,2,3,34])),e=>e.Readiness),QA=OA(()=>xn(()=>import(`./TestCases-BjgWdtPi.js`),__vite__mapDeps([43,1,2,3])),e=>e.TestCases),$A=OA(()=>xn(()=>import(`./KindPage-DiOmtzVZ.js`),__vite__mapDeps([44,1,2,3,6,7,14,34])),e=>e.Accessibility),ej=OA(()=>xn(()=>import(`./KindPage-DiOmtzVZ.js`),__vite__mapDeps([44,1,2,3,6,7,14,34])),e=>e.Performance),tj=OA(()=>xn(()=>import(`./KindPage-DiOmtzVZ.js`),__vite__mapDeps([44,1,2,3,6,7,14,34])),e=>e.Visual),nj=OA(()=>xn(()=>import(`./Data-EF_k6c_T.js`).then(e=>e.n),__vite__mapDeps([15,1,2,3,6,7,11,14,16])),e=>e.Data),rj=OA(()=>xn(()=>import(`./TestData-CDziNp2d.js`).then(e=>e.n),__vite__mapDeps([17,1,2,3,11,16])),e=>e.TestData),ij=OA(()=>xn(()=>import(`./Features-8jsv2A1d.js`),__vite__mapDeps([0,1,2,3])),e=>e.Features),aj=OA(()=>xn(()=>import(`./Jobs-CHw00lcx.js`),__vite__mapDeps([45,1,2,3,6,7,14])),e=>e.Jobs),oj=OA(()=>xn(()=>import(`./Product-DmvUI7pH.js`),__vite__mapDeps([46,1,2,3,11,47,24,29,48])),e=>e.Product),sj=OA(()=>xn(()=>import(`./Evidence-Db9H4-Nu.js`),__vite__mapDeps([49,1,2,3,11,12,47])),e=>e.Evidence),cj=OA(()=>xn(()=>import(`./WhatsNew-DqNMAytd.js`),__vite__mapDeps([4,1,2,3])),e=>e.WhatsNew),lj=OA(()=>xn(()=>import(`./Browse-D-ho9bS_.js`),__vite__mapDeps([50,1,2,3,51,8])),e=>e.Browse),uj={chats:jA,reports:MA,agents:NA,runs:PA,record:FA,desktop:IA,regression:LA,impact:RA,"api-tests":zA,migration:BA,tosca:VA,quality:UA,flaky:WA,"run-diff":GA,"test-debt":KA,flags:qA,production:JA,cost:YA,explore:XA,readiness:ZA,"test-cases":QA,accessibility:$A,performance:ej,visual:tj,data:nj,"test-data":rj,features:ij,jobs:aj,schedules:aj,product:oj,evidence:sj,"evidence-runs":sj,"evidence-contracts":sj,"evidence-review":sj,"evidence-releases":sj,"evidence-learn":sj,"evidence-monitor":sj,"whats-new":cj,browse:lj},dj=e=>uj[e[0]||``]?.preload();function fj(){let e=Jt(dj),[t=``,n,...r]=e;Un();let[,i]=(0,q.useState)(0),[a,o]=(0,q.useState)(0);return(0,q.useEffect)(()=>{let e=()=>Object.values(uj).forEach(e=>void e.preload().catch(()=>{}));if(typeof requestIdleCallback==`function`){let t=requestIdleCallback(e,{timeout:3e3});return()=>cancelIdleCallback(t)}let t=setTimeout(e,1500);return()=>clearTimeout(t)},[]),(0,q.useEffect)(()=>{Pt.get().then(e=>{En(e),i(e=>e+1)},()=>{})},[]),t===`tosca`&&n&&r[0]===`compare`?(0,J.jsx)(DA,{at:e.join(`/`),children:(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(HA,{id:n,caseId:r[1]?Lt(r[1]):void 0})})}):(0,J.jsxs)(Jn,{current:t,route:e,children:[(0,J.jsx)(Zr,{onReload:()=>o(e=>e+1)}),(0,J.jsx)(q.Fragment,{children:(0,J.jsx)(DA,{at:e.join(`/`),children:(0,J.jsx)(pj,{page:t,sub:(t===`data`||t===`product`||t===`agents`||t===`runs`||t===`evidence`||t===`evidence-runs`||t===`accessibility`||t===`test-cases`||t===`quality`||t===`record`||t===`tosca`||t===`browse`)&&n?[n,...r].join(`/`):n})})},a)]})}function pj({page:e,sub:t}){if(e===`settings`)return(0,J.jsx)(CA,{section:t});if(e===`chats`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:t?(0,J.jsx)(AA,{id:t}):(0,J.jsx)(jA,{})});if(e===`reports`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(MA,{sub:t})});if(e===`jobs`||e===`schedules`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(aj,{sub:e===`jobs`?t:void 0})});if(e===`impact`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(RA,{})});if(e===`regression`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(LA,{sub:t})});if(e===`api-tests`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(zA,{sub:t})});if(e===`migration`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(BA,{sub:t})});if(e===`tosca`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(VA,{sub:t})});if(e===`quality`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(UA,{sub:t})});if(e===`readiness`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(ZA,{})});if(e===`explore`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(XA,{sub:t})});if(e===`cost`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(YA,{})});if(e===`production`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(JA,{})});if(e===`flags`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(qA,{})});if(e===`test-debt`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(KA,{sub:t})});if(e===`run-diff`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(GA,{sub:t})});if(e===`flaky`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(WA,{})});if(e===`test-cases`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(QA,{sub:t})});if(e===`accessibility`||e===`performance`||e===`visual`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(e===`accessibility`?$A:e===`performance`?ej:tj,{sub:t},e)});if(e===`data`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(nj,{sub:t})});if(e===`test-data`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(rj,{sub:t})});if(e===`features`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(ij,{})});if(e===`whats-new`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(cj,{})});if(e===`record`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(FA,{sub:t})});if(e===`desktop`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(IA,{sub:t})});if(e===`agents`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(NA,{id:t})});if(e===`runs`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(PA,{sub:t})});if(e===`product`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(oj,{sub:t})});if(e===`evidence`||e===`evidence-runs`||e===`evidence-contracts`||e===`evidence-review`||e===`evidence-releases`||e===`evidence-learn`||e===`evidence-monitor`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(sj,{page:e,sub:t})});if(e===`browse`)return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(`p`,{className:`m-0 px-6 py-10 text-sm text-muted`,children:`Opening…`}),children:(0,J.jsx)(lj,{sub:t})});if(e===`knowledge`)return(0,J.jsx)(Ip,{});if(e===`memory`)return(0,J.jsx)(Jp,{});if(pA.includes(e))return(0,J.jsx)(CA,{only:e},e);let n=Yp.find(t=>t.id===e);return n?(0,J.jsx)(Xp,{section:n}):(0,J.jsx)(Oo,{})}gt(),yt(),Tt(),Jr(document),qr(),(0,Dr.createRoot)(document.getElementById(`root`)).render((0,J.jsx)(q.StrictMode,{children:(0,J.jsxs)(gr,{children:[(0,J.jsx)(fj,{}),(0,J.jsx)(Wr,{})]})}));export{ha as A,Wi as B,Ya as C,Qa as D,$a as E,ea as F,$r as G,si as H,ta as I,na as L,ra as M,aa as N,qa as O,ia as P,$i as R,Ja as S,Za as T,oi as U,Zi as V,ti as W,_o as _,kO as a,to as b,qf as c,Kf as d,Yf as f,xo as g,go as h,KO as i,fa as j,Ca as k,sp as l,Oo as m,pA as n,TO as o,Uf as p,GO as r,$D as s,fA as t,vp as u,wo as v,Xa as w,eo as x,yo as y,Qi as z};
|