@capagents/forgeqe 2.3.15 → 2.4.0
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 +9 -2
- package/README.md +2 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/forgeqe.js +1099 -1038
- package/dist/web/THIRD_PARTY_NOTICES.md +2542 -0
- package/dist/web/assets/ApiTests-CSSed9hU.js +2 -0
- package/dist/web/assets/Chat-CFfiv7wI.js +2 -0
- package/dist/web/assets/Data-Qolfhsd7.js +4 -0
- package/dist/web/assets/Features-BM48eq6x.js +1 -0
- package/dist/web/assets/Jobs-BjVNQUaK.js +3 -0
- package/dist/web/assets/Quality-F0sKErYg.js +1 -0
- package/dist/web/assets/Record-CkwV9gN8.js +1 -0
- package/dist/web/assets/Regression-DKaNfFu1.js +2 -0
- package/dist/web/assets/Reports-o_82URX6.js +3 -0
- package/dist/web/assets/Response-YL9AIB8R.js +8 -0
- package/dist/web/assets/Runs-Dp-DzyW1.js +2 -0
- package/dist/web/assets/circle-dashed-DbpKfamm.js +1 -0
- package/dist/web/assets/context-engine-BIWf1ZIT.svg +1 -0
- package/dist/web/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
- package/dist/web/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
- package/dist/web/assets/dm-sans-latin-600-normal-Aqo67rzb.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-600-normal-BmdmIIQ2.woff +0 -0
- package/dist/web/assets/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
- package/dist/web/assets/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-ext-500-normal-BJfUCQsA.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-ext-500-normal-DR84L5F-.woff +0 -0
- package/dist/web/assets/dm-sans-latin-ext-600-normal-4vooXBpG.woff2 +0 -0
- package/dist/web/assets/dm-sans-latin-ext-600-normal-DRtaDpgU.woff +0 -0
- package/dist/web/assets/external-link-pvVHJFAZ.js +1 -0
- package/dist/web/assets/file-chart-column-increasing-b-Yh6rmz.js +1 -0
- package/dist/web/assets/index-Bkx3fVbr.js +21 -0
- package/dist/web/assets/index-DSEYuBEd.css +2 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/web/assets/knowledge-base-CMsi5KtZ.svg +1 -0
- package/dist/web/assets/markdown-GKy06efH.js +10 -0
- package/dist/web/assets/model-CGrmjuJz.svg +1 -0
- package/dist/web/assets/report-mkgMJOFK.svg +1 -0
- package/dist/web/assets/rotate-ccw-BL6YOAPy.js +1 -0
- package/dist/web/assets/rule-DycAnn4u.svg +1 -0
- package/dist/web/assets/search-YLg3uzAx.js +1 -0
- package/dist/web/assets/status-CL_clA0J.js +3 -0
- package/dist/web/assets/sticky-note-DIQ2FWMw.js +1 -0
- package/dist/web/assets/terminal-BdTFlGZR.js +1 -0
- package/dist/web/assets/timer-NLZ0XmVl.js +1 -0
- package/dist/web/assets/trace-YEplLreO.svg +1 -0
- package/dist/web/assets/trash-DIUJbRpw.js +1 -0
- package/dist/web/index.html +15 -0
- package/docs/ARCHITECTURE.md +4 -1
- package/docs/user-guide.html +10 -2
- package/forgeqe.example.yaml +37 -0
- package/package.json +3 -3
- package/prompts/test-agent.md +2 -0
- package/py/forgeqe_engine/capture.py +33 -7
- package/py/forgeqe_engine/logins.py +5 -0
- package/py/forgeqe_engine/memory.py +80 -4
- package/py/forgeqe_engine/service.py +41 -5
- package/py/forgeqe_engine/userlike.py +150 -0
- package/py/forgeqe_mobile/hyperexecute.py +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function ee(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return T(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)},ne={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),f=l(d(),1),p=`forgeqe-web-token`,m=``;function h(e){return/(?:^#|&)token=([A-Za-z0-9]+)(?:&|$)/.exec(e)?.[1]}function g(){let e=h(location.hash);if(!e)return!1;let t=e!==v();m=e;try{sessionStorage.setItem(p,m)}catch{}return history.replaceState(null,``,`${location.pathname}${location.search}#/`),t}function _(){window.addEventListener(`hashchange`,()=>{g()&&location.reload()})}function v(){if(m)return m;try{return sessionStorage.getItem(p)||``}catch{return``}}var y=`forgeqe-web-signed-out`,b=`ForgeQE web does not accept this page's sign-in: it was started again, with a new token. Open the address it printed last (with its #token=…) in this tab.`,x=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function S(e,t,n){let r;try{r=await fetch(t,{method:e,headers:{Authorization:`Bearer ${v()}`,...n===void 0?{}:{"Content-Type":`application/json`}},body:n===void 0?void 0:JSON.stringify(n)})}catch{throw new x(`ForgeQE web is not running. Start it in your project folder with forgeqe web, then open the address it prints.`,0)}let i=await r.json().catch(()=>({}));if(r.status===401)throw window.dispatchEvent(new Event(y)),new x(b,401);if(!r.ok)throw new x(i.error||`The request failed (${r.status}).`,r.status);return i}var ee={settings:()=>S(`GET`,`/api/settings`),save:(e,t,n)=>S(`PUT`,`/api/settings/${e}`,{value:t,version:n}),saveText:(e,t,n,r)=>S(`PUT`,`/api/settings/${e}`,{text:t,env:n,version:r}),splitEnvironments:()=>S(`PUT`,`/api/settings/split`,{}),saveGrid:(e,t,n)=>S(`PUT`,`/api/settings/grid`,{grid:e,value:t,version:n}),test:(e,t,n,r)=>S(`POST`,`/api/test`,{kind:e,id:t,settings:n,values:r}),saveSecrets:e=>S(`PUT`,`/api/secrets`,{values:e}),saveGuardrails:(e,t)=>S(`PUT`,`/api/settings/guardrails`,{rules:e,version:t})},C={state:()=>S(`GET`,`/api/setup`),machine:()=>S(`GET`,`/api/setup/machine`),folders:e=>S(`GET`,`/api/folders${e?`?path=${encodeURIComponent(e)}`:``}`),newFolder:(e,t)=>S(`POST`,`/api/folders`,{parent:e,name:t}),open:e=>S(`PUT`,`/api/project`,{path:e}),init:()=>S(`POST`,`/api/project/init`),run:()=>S(`POST`,`/api/setup/run`)},w={prompts:()=>S(`GET`,`/api/prompts`),prompt:e=>S(`GET`,`/api/prompts/${encodeURIComponent(e)}`),savePrompt:(e,t)=>S(`PUT`,`/api/prompts/${encodeURIComponent(e)}`,{text:t}),resetPrompt:e=>S(`DELETE`,`/api/prompts/${encodeURIComponent(e)}`),skills:()=>S(`GET`,`/api/skills`),registry:()=>S(`GET`,`/api/registry`),logs:()=>S(`GET`,`/api/logs`),log:e=>S(`GET`,`/api/logs/${encodeURIComponent(e)}`),audit:()=>S(`GET`,`/api/audit`),tokenomics:()=>S(`GET`,`/api/tokenomics`)},T={start:(e,t)=>S(`POST`,`/api/chats`,{text:e,...t}),list:()=>S(`GET`,`/api/chats`),events:(e,t,n)=>S(`GET`,`/api/chats/${encodeURIComponent(e)}?after=${t}${n?`&wait=1`:``}`),send:(e,t)=>S(`POST`,`/api/chats/${encodeURIComponent(e)}/messages`,{text:t}),answer:(e,t,n)=>S(`POST`,`/api/chats/${encodeURIComponent(e)}/answer`,{ask:t,choice:n}),proceed:(e,t,n)=>S(`POST`,`/api/chats/${encodeURIComponent(e)}/continue`,{wait:t,ok:n}),stop:e=>S(`POST`,`/api/chats/${encodeURIComponent(e)}/stop`,{}),close:e=>S(`DELETE`,`/api/chats/${encodeURIComponent(e)}`)},E={knowledge:()=>S(`GET`,`/api/knowledge`),knowledgeFile:e=>S(`GET`,`/api/knowledge/file?rel=${encodeURIComponent(e)}`),saveKnowledgeFile:(e,t)=>S(`PUT`,`/api/knowledge/file`,{rel:e,text:t}),memory:()=>S(`GET`,`/api/memory`),clearMemory:e=>S(`POST`,`/api/memory/clear`,{...e?{target:e.name,kind:e.kind}:{},confirmed:!0})},D={get:()=>S(`GET`,`/api/workspace`)},te={open:e=>S(`POST`,`/api/files/open`,{path:e})},O={list:()=>S(`GET`,`/api/reports`),build:()=>S(`POST`,`/api/reports/project/build`),buildStatus:()=>S(`GET`,`/api/reports/project/build`)},k={list:()=>S(`GET`,`/api/jobs`),detail:e=>S(`GET`,`/api/jobs/${encodeURIComponent(e)}`),log:(e,t)=>S(`GET`,`/api/jobs/${encodeURIComponent(e)}/log?tail=400${t?`&run=${encodeURIComponent(t)}`:``}`),add:e=>S(`POST`,`/api/jobs`,e),act:(e,t)=>S(`POST`,`/api/jobs/${encodeURIComponent(e)}/${t}`),remove:e=>S(`DELETE`,`/api/jobs/${encodeURIComponent(e)}`)},A={list:()=>S(`GET`,`/api/runs`),detail:e=>S(`GET`,`/api/runs/${encodeURIComponent(e)}`),cancel:e=>S(`POST`,`/api/runs/${encodeURIComponent(e)}/cancel`)},j={get:()=>S(`GET`,`/api/record`),start:e=>S(`POST`,`/api/record`,e),command:e=>S(`POST`,`/api/record/command`,e)},M={list:()=>S(`GET`,`/api/packs`),detail:e=>S(`GET`,`/api/packs/${encodeURIComponent(e)}`),build:e=>S(`POST`,`/api/packs/build`,e),run:(e,t)=>S(`POST`,`/api/packs/${encodeURIComponent(e)}/run`,{on:t}),heal:(e,t)=>S(`POST`,`/api/packs/${encodeURIComponent(e)}/heal`,{tests:t}),stop:()=>S(`POST`,`/api/packs/stop`,{})},N={view:()=>S(`GET`,`/api/apitests`),set:e=>S(`GET`,`/api/apitests/${encodeURIComponent(e)}`),contracts:e=>S(`POST`,`/api/apitests/contracts`,e),run:(e,t)=>S(`POST`,`/api/apitests/${encodeURIComponent(e)}/run`,t),scenarios:(e,t)=>S(`POST`,`/api/apitests/${encodeURIComponent(e)}/scenarios`,t),runScenarios:(e,t)=>S(`POST`,`/api/apitests/${encodeURIComponent(e)}/run-scenarios`,t),stop:()=>S(`POST`,`/api/apitests/stop`,{})};async function P(e){let t=await fetch(e,{headers:{Authorization:`Bearer ${v()}`}});if(!t.ok||t.headers.get(`content-type`)!==`image/png`)throw new x(`The image could not be loaded.`,t.status);let n=new Blob([await t.arrayBuffer()],{type:`image/png`}),r=await new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(String(r.result)),r.onerror=()=>t(new x(`The image could not be read.`,0)),r.readAsDataURL(n)});if(!r.startsWith(`data:image/png;base64,`))throw new x(`The image could not be read.`,0);return r}var ne={view:()=>S(`GET`,`/api/quality`),run:e=>S(`GET`,`/api/quality/${encodeURIComponent(e)}`),compare:e=>S(`POST`,`/api/quality/${encodeURIComponent(e)}/compare`,{}),approve:(e,t,n)=>S(`POST`,`/api/quality/${encodeURIComponent(e)}/approve`,{pages:t,...n?{reason:n}:{}}),image:(e,t,n)=>P(`/api/quality/${encodeURIComponent(e)}/image/${t}/${n}`)},re={view:()=>S(`GET`,`/api/data`),impact:e=>S(`GET`,`/api/data/impact?of=${encodeURIComponent(e)}`),stop:()=>S(`POST`,`/api/data/stop`,{}),run:(e,t)=>S(`POST`,`/api/data/${e}`,t)},ie={view:()=>S(`GET`,`/api/features`),detail:e=>S(`GET`,`/api/features/${encodeURIComponent(e)}`),scope:(e,t)=>S(`POST`,`/api/features/${encodeURIComponent(e)}/scope`,{to:t})},F={job:()=>S(`GET`,`/api/refine`),start:(e,t)=>S(`POST`,`/api/refine`,{text:e,key:t}),stop:()=>S(`POST`,`/api/refine/stop`,{})},I={view:()=>S(`GET`,`/api/about`),generated:()=>S(`GET`,`/api/generated`),run:(e,t={})=>S(`POST`,`/api/about/${e}`,t),stop:()=>S(`POST`,`/api/about/stop`,{})},L=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ae(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:L(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var oe=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},R=e=>{let t=oe(e);return t.charAt(0).toUpperCase()+t.slice(1)},se=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),z={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function ce(e){return e!=null}function B(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??z.width,a=e.size??e.height??z.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?se(...c):se(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??z[`stroke-width`])*Number(e.size??e.width??z.width)/Number(t.size??t.width??z.width):t.strokeWidth??z[`stroke-width`];return[`svg`,{...Object.entries(z).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&ce(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&ce(t.width)&&{[r(`width`)]:t.width},...`height`in t&&ce(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function V(e,t={}){return B(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var le=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ue=(0,f.createContext)({}),de=()=>(0,f.useContext)(ue),fe=(0,f.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=de()??{},b=!!c||le(d),[x,S,ee=[]]=V(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:se(y,s),hasA11yProp:b,attributes:d});return(0,f.createElement)(x,{ref:p,...S},[...ee.map(([e,t])=>(0,f.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function H(e,t=[],n=[]){let r=typeof e==`string`?ae(e,t,n):e,i=(0,f.forwardRef)(({className:e,...t},n)=>(0,f.createElement)(fe,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=R(r.name)),i}var pe={name:`badge-check`,size:24,node:[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`verified`]};pe.node;var me=H(pe),he={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};he.node;var ge=H(he),_e={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};_e.node;var ve=H(_e),ye={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};ye.node;var be=H(ye),xe={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};xe.node;var Se=H(xe),Ce={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Ce.node;var we=H(Ce),Te={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Te.node;var Ee=H(Te),De={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};De.node;var Oe=H(De),ke={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};ke.node;var Ae=H(ke),je={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};je.node;var Me=H(je),Ne={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};Ne.node;var Pe=H(Ne),Fe={name:`database-zap`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 15 21.84`,key:`14ibmq`}],[`path`,{d:`M21 5V8`,key:`1marbg`}],[`path`,{d:`M21 12L18 17H22L19 22`,key:`zafso`}],[`path`,{d:`M3 12A9 3 0 0 0 14.59 14.87`,key:`1y4wr8`}]]};Fe.node;var Ie=H(Fe),Le={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Le.node;var Re=H(Le),ze={name:`file-chart-column`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-1`,key:`zg0ygc`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`M16 18v-3`,key:`j5jt4h`}]],aliases:[`file-bar-chart-2`]};ze.node;var Be=H(ze),Ve={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Ve.node;var He=H(Ve),Ue={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Ue.node;var We=H(Ue),Ge={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Ge.node;var Ke=H(Ge),qe={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};qe.node;var Je=H(qe),Ye={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Ye.node;var Xe=H(Ye),Ze={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};Ze.node;var Qe=H(Ze),$e={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};$e.node;var et=H($e),tt={name:`message-square-text`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]};tt.node;var nt=H(tt),rt={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};rt.node;var it=H(rt),at={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};at.node;var ot=H(at),st={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};st.node;var ct=H(st),lt={name:`panel-left-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]],aliases:[`sidebar-close`]};lt.node;var ut=H(lt),dt={name:`panel-left-open`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]],aliases:[`sidebar-open`]};dt.node;var ft=H(dt),pt={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};pt.node;var mt=H(pt),ht={name:`panel-right-open`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]};ht.node;var gt=H(ht),_t={name:`piggy-bank`,size:24,node:[[`path`,{d:`M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z`,key:`1piglc`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M2 8v1a2 2 0 0 0 2 2h1`,key:`1env43`}]]};_t.node;var vt=H(_t),yt={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};yt.node;var bt=H(yt),xt={name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]};xt.node;var St=H(xt),Ct={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Ct.node;var wt=H(Ct),Tt={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Tt.node;var Et=H(Tt),Dt={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Dt.node;var Ot=H(Dt),kt={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};kt.node;var At=H(kt),jt={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};jt.node;var Mt=H(jt),Nt={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Nt.node;var Pt=H(Nt),Ft={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Ft.node;var It=H(Ft),Lt={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Lt.node;var Rt=H(Lt),zt={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};zt.node;var Bt=H(zt),Vt={name:`wallet`,size:24,node:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]};Vt.node;var Ht=H(Vt),Ut={name:`webhook`,size:24,node:[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]};Ut.node;var Wt=H(Ut),Gt={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Gt.node;var Kt=H(Gt),qt={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};qt.node;var Jt=H(qt);function Yt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Yt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Xt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Yt(e))&&(r&&(r+=` `),r+=t);return r}var Zt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Qt=Xt,$t=(e,t)=>n=>{if(t?.variants==null)return Qt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Zt(t)||Zt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Qt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},en=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},tn=(e,t)=>({classGroupId:e,validator:t}),nn=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rn=`-`,an=[],on=`arbitrary..`,sn=e=>{let t=un(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ln(e);let n=e.split(rn);return cn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?en(i,t):t:i||an}return n[e]||an}}},cn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=cn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(rn):e.slice(t).join(rn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ln=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?on+r:void 0})(),un=e=>{let{theme:t,classGroups:n}=e;return dn(n,t)},dn=(e,t)=>{let n=nn();for(let r in e){let i=e[r];fn(i,n,r,t)}return n},fn=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];pn(i,t,n,r)}},pn=(e,t,n,r)=>{typeof e==`string`?mn(e,t,n):typeof e==`function`?hn(e,t,n,r):gn(e,t,n,r)},mn=(e,t,n)=>{let r=e===``?t:_n(t,e);r.classGroupId=n},hn=(e,t,n,r)=>{vn(e)?fn(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(tn(n,e)))},gn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];fn(o,_n(t,a),n,r)}},_n=(e,t)=>{let n=e,r=t.split(rn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=nn(),n.nextPart.set(t,i)),n=i}return n},vn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,yn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},bn=`!`,xn=`:`,Sn=[],Cn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),wn=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===xn){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(bn)?(c=s.slice(0,-1),l=!0):s.startsWith(bn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Cn(t,l,c,u)};if(t){let e=t+xn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Cn(Sn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Tn=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},En=e=>({cache:yn(e.cacheSize),parseClassName:wn(e),sortModifiers:Tn(e),postfixLookupClassGroupIds:Dn(e),...sn(e)}),Dn=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},On=/\s+/,kn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(On),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+bn:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},An=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=jn(n))&&(i&&(i+=` `),i+=r);return i},jn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=jn(e[r]))&&(n&&(n+=` `),n+=t);return n},Mn=(e,...t)=>{let n,r,i,a,o=o=>(n=En(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=kn(e,n);return i(e,a),a};return a=o,(...e)=>a(An(...e))},Nn=[],U=e=>{let t=t=>t[e]||Nn;return t.isThemeGetter=!0,t.themeKey=e,t},Pn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,In=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Bn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hn=e=>In.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Un=e=>!!e&&Number.isInteger(Number(e)),Wn=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),Gn=e=>Ln.test(e),Kn=()=>!0,qn=e=>Rn.test(e)&&!zn.test(e),Jn=()=>!1,Yn=e=>Bn.test(e),Xn=e=>Vn.test(e),Zn=e=>!G(e)&&!K(e),Qn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),$n=e=>mr(e,vr,Jn),G=e=>Pn.test(e),er=e=>mr(e,yr,qn),tr=e=>mr(e,br,W),nr=e=>mr(e,Sr,Kn),rr=e=>mr(e,xr,Jn),ir=e=>mr(e,gr,Jn),ar=e=>mr(e,_r,Xn),or=e=>mr(e,Cr,Yn),K=e=>Fn.test(e),sr=e=>hr(e,yr),cr=e=>hr(e,xr),lr=e=>hr(e,gr),ur=e=>hr(e,vr),dr=e=>hr(e,_r),fr=e=>hr(e,Cr,!0),pr=e=>hr(e,Sr,!0),mr=(e,t,n)=>{let r=Pn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},hr=(e,t,n=!1)=>{let r=Fn.exec(e);return r?r[1]?t(r[1]):n:!1},gr=e=>e===`position`||e===`percentage`,_r=e=>e===`image`||e===`url`,vr=e=>e===`length`||e===`size`||e===`bg-size`,yr=e=>e===`length`,br=e=>e===`number`,xr=e=>e===`family-name`,Sr=e=>e===`number`||e===`weight`,Cr=e=>e===`shadow`,wr=Mn(()=>{let e=U(`color`),t=U(`font`),n=U(`text`),r=U(`font-weight`),i=U(`tracking`),a=U(`leading`),o=U(`breakpoint`),s=U(`container`),c=U(`spacing`),l=U(`radius`),u=U(`shadow`),d=U(`inset-shadow`),f=U(`text-shadow`),p=U(`drop-shadow`),m=U(`blur`),h=U(`perspective`),g=U(`aspect`),_=U(`ease`),v=U(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],ee=()=>[`auto`,`contain`,`none`],C=()=>[K,G,c],w=()=>[Hn,`full`,`auto`,...C()],T=()=>[Un,`none`,`subgrid`,K,G],E=()=>[`auto`,{span:[`full`,Un,K,G]},Un,K,G],D=()=>[Un,`auto`,K,G],te=()=>[`auto`,`min`,`max`,`fr`,K,G],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...C()],j=()=>[Hn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],M=()=>[s,Hn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],N=()=>[Hn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],P=()=>[e,K,G],ne=()=>[...b(),lr,ir,{position:[K,G]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,ur,$n,{size:[K,G]}],F=()=>[Wn,sr,er],I=()=>[``,`none`,`full`,l,K,G],L=()=>[``,W,sr,er],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[W,Wn,lr,ir],se=()=>[``,`none`,m,K,G],z=()=>[`none`,W,K,G],ce=()=>[`none`,W,K,G],B=()=>[W,K,G],V=()=>[Hn,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Gn],breakpoint:[Gn],color:[Kn],container:[Gn],"drop-shadow":[Gn],ease:[`in`,`out`,`in-out`],font:[Zn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Gn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Gn],shadow:[Gn],spacing:[`px`,W],text:[Gn],"text-shadow":[Gn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Hn,G,K,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,K,G]}],"container-named":[Qn],columns:[{columns:[W,`auto`,G,K,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Un,`auto`,K,G]}],basis:[{basis:[Hn,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,Hn,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,W,K,G]}],shrink:[{shrink:[``,W,K,G]}],order:[{order:[Un,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,sr,er]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,pr,nr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Wn,G]}],"font-family":[{font:[cr,rr,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,K,G]}],"line-clamp":[{"line-clamp":[W,`none`,K,tr]}],leading:[{leading:[`none`,a,...C()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,K,er]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[W,`auto`,K,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[Un,K,G]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Un,K,G],radial:[``,K,G],conic:[``,Un,K,G]},dr,ar]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,K,G]}],"outline-w":[{outline:[``,W,sr,er]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,fr,or]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,fr,or]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[W,er]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,fr,or]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[W,K,G]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:se()}],brightness:[{brightness:[W,K,G]}],contrast:[{contrast:[W,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,fr,or]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,W,K,G]}],"hue-rotate":[{"hue-rotate":[W,K,G]}],invert:[{invert:[``,W,K,G]}],saturate:[{saturate:[W,K,G]}],sepia:[{sepia:[``,W,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[W,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[W,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,W,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[W,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[W,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,K,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[W,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":[`translate-none`],zoom:[{zoom:[Un,K,G]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,K,G]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[W,sr,er,tr]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function q(...e){return wr(Xt(e))}var Tr=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,Er=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Dr=o(((e,t)=>{t.exports=Er()})),J=Dr(),Or=$t(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap font-medium no-underline transition-colors disabled:cursor-not-allowed disabled:opacity-50`,{variants:{variant:{outline:`rounded-full border border-line bg-bg text-ink hover:bg-surface-muted hover:text-ink`,primary:`rounded-full border border-accent bg-accent text-white hover:border-accent-hover hover:bg-accent-hover hover:text-white`,ghost:`rounded-[10px] border-0 bg-transparent text-ink hover:bg-surface-strong`,icon:`rounded-[10px] border-0 bg-transparent text-ink-2 hover:bg-surface-strong hover:text-ink`},size:{default:`min-h-10 px-4 text-sm`,lg:`min-h-11 px-5 text-sm`,sm:`min-h-10 px-4 text-[13px]`,icon:`size-10`}},defaultVariants:{variant:`outline`,size:`default`}});function Y({className:e,variant:t,size:n,type:r=`button`,...i}){return(0,J.jsx)(`button`,{type:r,className:q(Or({variant:t,size:n}),e),...i})}function kr({icon:e,logo:t,size:n=`md`,className:r}){return(0,J.jsx)(`span`,{"aria-hidden":`true`,className:q(`inline-flex flex-none items-center justify-center rounded-[10px]`,t?`border border-line bg-bg`:`bg-surface-strong text-ink-2`,n===`lg`?`size-10`:`size-9`,r),children:t?(0,J.jsx)(t,{className:n===`lg`?`size-5`:`size-[18px]`}):e?(0,J.jsx)(e,{size:n===`lg`?20:18,strokeWidth:1.8}):null})}var Ar={idle:[`default`,`blink`],working:[`default`,`gyro`],reasoning:[`default`,`twins`],searching:[`default`,`lighthouse`],background:[`default`,`spiral`],retrying:[`default`,`surge`],compacting:[`default`,`squeeze`,`fuse`],waiting:[`default`],using:[`default`,`tap`,`scroll`,`type`,`zoom`,`snap`,`record`]},X=Math.PI*2,jr=Math.PI*(3-Math.sqrt(5)),Mr=e=>(1-Math.cos(Math.PI*e))/2,Nr=e=>{let t=Math.sin(e*127.1)*43758.5453;return t-Math.floor(t)},Pr=(e,t)=>(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2,Fr=(e,t,n)=>{let r=[],i=[],a=e[t];for(let o=0;o<e.length;o++){if(o===t)continue;let s=Pr(a,e[o]),c=r.length;if(c===n){if(s>=i[n-1])continue;c--}for(;c>0&&i[c-1]>s;)r[c]=r[c-1],i[c]=i[c-1],c--;r[c]=o,i[c]=s}return r},Ir={idle:6500,"idle-blink":13e3,working:3e3,"working-gyro":3e3,reasoning:6500,"reasoning-twins":6500,searching:13e3,"searching-lighthouse":13e3,background:13e3,"background-spiral":13e3,retrying:13e3,"retrying-surge":13e3,compacting:1e4,"compacting-squeeze":1e4,"compacting-fuse":1e4,waiting:13e3,using:13e3,"using-tap":13e3,"using-scroll":13e3,"using-type":13e3,"using-zoom":13e3,"using-snap":13e3,"using-record":13e3},Lr=new Map;function Rr(e,t,n){let r=Lr.get(e);return r||Lr.set(e,r={t:0,last:t}),t>r.last&&(r.t+=Math.min(t-r.last,100)*n,r.last=t),r.t}var zr=e=>1-Math.exp(-4.5*e)*Math.cos(3*Math.PI*e)-e*Math.exp(-4.5);function Br(e,t){let n=3200,r=Math.floor(e/n),i=e-r*n,a=1260*t,o=2200*t,s;if(i<2e3)s=i*t;else if(i<2200){let e=(i-2e3)/200;s=(2e3+200*(e-e*e/2))*t}else if(i<3e3)s=2100*t-a*zr((i-2200)/800);else{let e=(i-3e3)/200;s=2100*t-a+100*e*e*t}return r*(o-a)+s}function Vr(e,t){if(e===`retrying`)return Br(2*t,X/9e3);if(e===`retrying-surge`){let e=t/3250,n=e-Math.floor(e);return(Math.floor(e)+(1-(1-n)**3))*X}return e===`using-scroll`?.4:e===`using-snap`?(Math.floor(t/hi)*gi+Math.min(t%hi,gi))/Ir[e]*X:t/Ir[e]*X}var Hr=(()=>{let e=30*Math.PI/180,t=10*Math.PI/180;return[-Math.sin(t)*Math.cos(e),Math.cos(t)*Math.cos(e),Math.sin(e)]})(),Ur=1.4,Wr=30*Math.PI/180,Gr=Math.PI/2,Kr=1800,qr=.4,Jr=.6;function Yr(e){let t=e*2.45+Nr(e)*1.5,n=(15+30*Nr(e+.5))*Math.PI/180;return[Math.sin(n)*Math.cos(t),Math.sin(n)*Math.sin(t),Math.cos(n)]}function Xr(e){let t=Math.floor(e/Kr),n=e/Kr-t,r=n<qr?(1-Math.cos(n/qr*Math.PI))/2:1,i=Yr(t),a=Yr(t+1),o=i.map((e,t)=>e+(a[t]-e)*r),s=Math.hypot(o[0],o[1],o[2]);return o.map(e=>e/s)}var Zr=.45,Qr=.5,$r=600,ei=e=>Yr(e+57),ti=(e,t,n)=>{let r=e.map((e,r)=>e+(t[r]-e)*n),i=Math.hypot(r[0],r[1],r[2]);return r.map(e=>e/i)},ni=(e,t)=>e<t?(1-(e/t)**2)**2:0,ri=1400;function ii(e){let t=Math.floor(e/ri),n=e/ri-t;return{at:ti(ei(t),ei(t+1),n<.35?Mr(n/.35):1),click:ei(n<.5?t:t+1),since:(n<.5?n+.5:n-.5)*ri}}var ai=e=>e<60?e/60:Math.max(0,1-(e-60)/240)**2,oi=1,si=[[0,0],[0,16],[4,12],[7,18],[9,17],[6,11],[11,11]].map(([e,t])=>[e/18*oi,t/18*oi]);function ci(e,t,n){let r=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){let[o,s]=e[i],[c,l]=e[a];s>n!=l>n&&t<(c-o)*(n-s)/(l-s)+o&&(r=!r)}return r}var li=[-.3,.5],ui=(e,t)=>[e,t,Math.sqrt(Math.max(0,1-e*e-t*t))],di=e=>ui(li[0]+.35*e[0],li[1]+.35*e[1]),fi=1800;function pi(e,t){let n=e%fi/fi,r=n<.3?Mr(n/.3):n<.6?1:n<.85?1-Mr((n-.6)/.25):0,i=e=>ui(li[0]+.3*e*Math.cos(t),li[1]+.3*e*Math.sin(t));return{at:i(r),click:i(1),since:(n<.45?n+.55:n-.45)*fi}}var mi=2600,hi=2600,gi=2100;function _i(e){let t=e%hi-gi;return t<0?0:Math.exp(-t/220)}function vi(e){let t=e%hi;return t<120?1.2*(1-Mr(t/120)):t<180?0:t<430?1.2*Mr((t-180)/250):1.2}var yi=1200,bi=e=>Math.abs(1-2*(e%yi/yi));function xi(e){let t=e%mi/mi;return t<.25?Mr(t/.25):t<.5?1:t<.75?1-Mr((t-.5)/.25):0}var Si=1500,Ci=1.1;function wi(e){let t=Math.floor(e/Si),n=Math.min(1,(e/Si-t)/.75);return{by:(t+1-(1-n)**3)*Ci,pace:(1-n)**2}}var Ti={right:0,"up-right":45,up:90,"up-left":135,left:180,"down-left":225,down:270,"down-right":315},Ei=[90,270,45,180,0,225].map(e=>e*Math.PI/180);function Di(e,t){let n=-Math.sin(e),r=Math.cos(e),i=Math.sin(t),a=Math.cos(t),o=1-a;return[a+n*n*o,n*r*o,r*i,n*r*o,a+r*r*o,-n*i,-r*i,n*i,a]}var Oi=(e,t)=>e.map((n,r)=>e[r-r%3]*t[r%3]+e[r-r%3+1]*t[r%3+3]+e[r-r%3+2]*t[r%3+6]),ki=[`xxxx xxx xx`,`xxxxx xx xxxx`,`xxx xxxxx`],Ai=.09,ji=.3,Mi=.33,Ni=-.5,Pi=(()=>{let e=0;return ki.flatMap((t,n)=>[...t].map((r,i)=>{let a={row:n,col:i,at:e};return e+=r===` `?200:i===t.length-1?350:70+60*Nr(n*31+i),a}))})(),Fi=ki.map((e,t)=>Pi.flatMap((e,n)=>e.row===t?[n]:[])),Ii=Pi[Pi.length-1].at,Li=Ii+1300;function Ri(e){let t=e%Li,n=0;for(;n<Pi.length&&Pi[n].at<=t;)n++;let r=n?t-Pi[n-1].at:1/0,i=Pi[n]??{row:ki.length-1,col:ki[ki.length-1].length},a=r<300?1:+(Math.floor(t/450)%2==0);return{n,since:r,blink:a,caret:[Ni+i.col*Ai,Mi-i.row*ji],fade:t<Ii+900?1:Math.max(0,1-(t-Ii-900)/300)}}var zi=220,Bi=5,Vi=24,Hi=16,Ui={mount:({make:e,pts:t})=>{let n=t.map(()=>e(`circle`)),r=new Uint8Array(t.length);return{dot(e,t,i,a,o){let s=n[e],c=o.toFixed(2);c===`0.00`&&r[e]||(r[e]=+(c===`0.00`),s.setAttribute(`cx`,t.toFixed(2)),s.setAttribute(`cy`,i.toFixed(2)),s.setAttribute(`r`,Math.max(.45,a).toFixed(2)),s.setAttribute(`fill-opacity`,c))}}}};function Wi(e){let t=(e,t)=>[Math.cos(e)*Math.cos(t),Math.sin(e),Math.cos(e)*Math.sin(t)],n=Math.sqrt(4*Math.PI/e),r=.6*n;return Array.from({length:8},(e,i)=>{let a=i?i&-i:8,o=Math.min(85*Math.PI/180,Math.acos(Math.min(1,n*8/(X*a)))),s=[];for(let e=-o+i*.618%1*r;e<=o;e+=r/Math.sqrt(1+Math.cos(e)**2))s.push(t(e,i/8*X-e));return s}).flat()}function Gi(e,t,n){return n?n.points(t,e):e===`background-spiral`?Wi(t):Array.from({length:t},(e,n)=>{let r=1-2*(n+.5)/t,i=Math.sqrt(1-r*r),a=n*jr;return[i*Math.cos(a),r,i*Math.sin(a)]})}function Ki(e,{state:t,variant:n,size:r=20,speed:i=1,label:a,shape:o,render:s=Ui,density:c=1,dotSize:l=1,tilt:u=20,direction:d}={}){let f=t===`base`?`idle`:t,p=f&&Object.hasOwn(Ar,f)?f:`idle`,m=n!=="default"&&Ar[p].includes(n??``)?`${p}-${n}`:p,h={width:r,height:r,viewBox:`0 0 ${r} ${r}`,fill:`currentColor`};for(let[t,n]of Object.entries(h))e.setAttribute(t,String(n));a?(e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,a),e.removeAttribute(`aria-hidden`)):(e.setAttribute(`aria-hidden`,`true`),e.removeAttribute(`role`),e.removeAttribute(`aria-label`));let g=m===`background`?1:m===`using`||m===`using-type`?Math.max(4,1e3/r):4,_=Math.max(8,Math.round(r*g*c)),v=typeof o==`function`?{points:o}:o,y=r/2,b=y*.8*(v?.scale??1),x=(r/64)**.6*(.72*Math.sqrt(4/g))*l,S=Gi(m,_,v),ee=s.mount({make:t=>e.appendChild(document.createElementNS(`http://www.w3.org/2000/svg`,t)),pts:S,size:r,radius:x}),C=!!s.flat,w=(m===`reasoning`||m===`reasoning-twins`)&&S.length>1,T=m===`compacting`||m===`compacting-fuse`,E=w?S.map((e,t)=>Fr(S,t,Vi)):[],D=Array.from({length:m===`reasoning-twins`?2:1},()=>[]),te=0,O={k:0,m:[1,0,0,0,1,0,0,0,1]},k=e=>{let t=Ir[m],n=Vr(m,e),i=m===`using-scroll`?wi(e):null,a=d&&Ti[d],o=null;if(i&&a!==void 0)o=Di(a*Math.PI/180+Math.PI,i.by);else if(i){let t=Math.floor(e/Si);for(t<O.k&&(O={k:0,m:[1,0,0,0,1,0,0,0,1]});O.k<t;O.k++)O.m=Oi(Di(Ei[O.k%Ei.length],Ci),O.m);o=Oi(Di(Ei[t%Ei.length],i.by-t*Ci),O.m)}let s=m===`working-gyro`?e/5e3*X:null,c=((C?0:u)+(v?.tip??0)+(s===null?0:10*Math.cos(s)))*Math.PI/180,l=s===null?0:12*Math.sin(s)*Math.PI/180,f=Math.sin(l),p=Math.cos(l),h=Math.sin(n),g=Math.cos(n),_=Math.sin(c),k=Math.cos(c),A=e=>S[e][1]*_+(-S[e][0]*h+S[e][2]*g)*k,j=new Map;if(w){let t=e/zi,n=Math.floor(t),r=t-n;if(!D[0].length){let e=[...S.keys()].reduce((e,t)=>A(t)>A(e)?t:e,0),t=t=>A(t)+Pr(S[t],S[e]);D.forEach((n,r)=>n.push(r?[...S.keys()].reduce((e,n)=>t(n)>t(e)?n:e,0):e))}for(te=Math.max(te,n-Hi);te<n;te++)D.forEach((e,t)=>{let n=e.slice(-8),r=e[e.length-1],i=-1,a=-1/0,o=m===`reasoning-twins`?D[1-t].at(-1):void 0;E[r].forEach((e,r)=>{let s=o===void 0?0:1.2*Math.min(Math.sqrt(Pr(S[e],S[o])),.8),c=A(e)+.35*Nr(te*31+r+t*977)+s;!n.includes(e)&&c>a&&(a=c,i=e)}),e.push(i<0?E[r][0]:i),e.length>Hi&&e.shift()});let i=(e,t)=>e!==void 0&&j.set(e,Math.max(j.get(e)??0,t));for(let e of D)for(let t=4;t>=0;t--)i(e[e.length-1-t],t===0?Mr(Math.min(1,r*2)):1-(t-1+r)/Bi)}let M=e/2e3*X+n,N=X/2e3+X/t,P=e=>70*Math.PI/180*(1-2*(e%6e3/6e3)),ne=Math.min(1,3*Math.sin(Math.PI*(e%6e3/6e3))),re=m===`searching`?Xr(e):null,ie=m===`working-gyro`?.5*Math.sin(e/2600*X):m===`compacting-squeeze`?Math.sin(e/2600*X):0,F=null;if(T){let t=e%2800/2800,n=(t-.7)/.3,r=m===`compacting-fuse`?(1-n)**3:n<.45?1-1.25*Mr(n/.45):n<.7?-.25*(1-(n-.45)/.25)**2:0;F={at:-1.15+2.3*Math.min(1,t/.7),hold:t<.7?1:r}}let I=null;m===`using-tap`&&(I=ii(e));let L=m===`using`;if(L){let t=a===void 0?ii(e):null;I=t?{...t,at:di(t.at),click:di(t.click)}:pi(e,(a??0)*Math.PI/180)}let ae=L&&I?1-.15*ai(I.since):1,oe=m===`using-type`?Ri(e):null,R=m===`using-zoom`?xi(e):null,se=m===`using-snap`?_i(e):null,z=m===`idle-blink`?vi(e):null,ce=m===`using-record`?bi(e):null;S.forEach(([t,a,s],c)=>{let u=n+Ur*ie*a,[d,v]=ie?[Math.sin(u),Math.cos(u)]:[h,g],S=-t*d+s*v,T=t*v+s*d,E=a*k-S*_,D=S,te=T*_,O=a*_+S*k;o&&([T,E,O]=[0,3,6].map(e=>o[e]*T+o[e+1]*E+o[e+2]*O));let A=(O+1)/2,B=(.5+1.4*A)*x,V=Math.max(0,(A-.3)/.7);if(re){let e=Math.acos(Math.min(1,(T*re[0]+E*re[1]+O*re[2])/Math.hypot(T,E,O))),t=e<Jr?(1-(e/Jr)**2)**2:0;V*=1-.55*(1-t),r<=24&&(B*=1+.5*t),t&&(T*=1+.12*t,E*=1+.12*t,T+=(T-re[0])*.35*t,E+=(E-re[1])*.35*t,B*=1+.9*t,V+=(1-V)*t)}if(F){let e=T,t=Math.min(1,Math.max(0,(F.at-e)/.2))*F.hold,n=m===`compacting`?1.5:1;if(T*=1-.2*n*t,E*=1-.2*n*t,B*=1-.3*n*t,m===`compacting-fuse`){V*=1-.5*t;let n=Math.exp(-(((e-F.at)/.08)**2))*Math.max(0,F.hold)*Math.min(1,A/.5);B*=1+.8*n,V+=(1-V)*n}}if(m===`working`){let t=e%1700,n=1.3-2.6*Mr(Math.min(1,t/1200)),r=C?E:T*Hr[0]+E*Hr[1]+O*Hr[2],i=t<1200?Math.exp(-(((r-n)/.2)**2)):0;B*=1+.6*i,V+=(1-V)*i;let a=Math.min(1,Math.max(0,(r-n)/.2))*(t<1200?1:1-Math.min(1,1.6*((t-1200)/800)));T*=1-.08*a,E*=1-.08*a,B*=1-.15*a}if(m===`searching-lighthouse`){V*=.5;let t=Math.sin(Wr),n=Math.cos(Wr),r=T*n-E*t,i=-_*(T*t+E*n)+k*O,a=((Math.atan2(r,i)-(e/2500%1*X-Math.PI)+Math.PI)%X+X)%X-Math.PI,o=(a<0?Math.max(0,1+a/Gr):Math.exp(-((a/.45)**2)))*(.25+.75*Math.min(1,Math.max(0,(A-.4)/.3)));B*=1+.6*o,V+=(1-V)*o}if(w){let e=j.get(c)??0;V*=.5,e&&(B*=1+.8*e,V+=(1-V)*e)}if(m===`waiting`){let n=Math.asin(a/(Math.hypot(t,a,s)||1)),r=Math.atan2(s,t),i=Math.atan2(Math.sin(r-M),Math.cos(r-M)),o=i*Math.cos(n),c=Math.exp(-(((n-P(e+i/N))/.28)**2))*Math.exp(-((o/(i*N>0?.12:1))**2)),l=ne*c**.6;V=V*.5+(1-V*.5)*l,B*=1+1.1*l}if(I){let e=Math.hypot(T,E,O)||1,t=t=>Math.acos(Math.min(1,Math.max(-1,(T*t[0]+E*t[1]+O*t[2])/e)));V*=L?.25:.5;let n=I.since,r=L?0:ni(t(I.at),Zr),i=t(I.click),a=ai(n),o=a*ni(i,Qr),s=Math.min(1,n/$r),c=Math.exp(-(((i-(.15+1.3*(1-(1-s)**2)))/.18)**2))*(1-s)**2;if(T*=1-.14*o,E*=1-.14*o,B*=(1-.35*o)*(1+.7*Math.max(c,r*(1-a))),V+=(1-V)*Math.max(r,c),L&&ci(si,(T-I.at[0])/ae,(I.at[1]-E)/ae)){let e=Math.min(1,Math.max(0,(A-.5)/.2));B*=1+.15*e,V+=(1-V)*e}}if(oe){V*=.25;let e=Math.round((Mi-E)/ji),t=Math.floor((T-Ni)/Ai),n=Fi[e]?.[t],r=0;n!==void 0&&n<oe.n&&ki[e][t]===`x`&&Math.abs(Mi-e*ji-E)<.085&&(r=.75+(n===oe.n-1?.25*Math.exp(-oe.since/120):0));let[i,a]=oe.caret;Math.abs(E-a)<.1&&(r=Math.max(r,oe.blink*Math.exp(-(((T-i)/.04)**2)))),V+=(1-V)*r*oe.fade*Math.min(1,Math.max(0,(A-.5)/.2))}if(R){let e=R*Math.max(0,O);T*=1+.45*e,E*=1+.45*e,B*=1+.8*e,V*=Math.min(1,Math.max(0,(1.05-Math.hypot(T,E))/.1))}if(i&&(V*=.55+.45*i.pace),se!==null&&(V*=.55,B*=1+.25*se,V+=(1-V)*se),z!==null){let e=Math.exp(-(((Math.abs(E)-z)/.06)**2))*+(z<1.2);V*=Math.min(1,Math.max(0,(z-Math.abs(E))/.08)),B*=1+.4*e,V+=(1-V)*e*Math.min(1,Math.max(0,(A-.4)/.3))}ce!==null&&(T*=.92+.08*ce,E*=.92+.08*ce,V*=.3+.7*ce),l&&([T,E]=[T*p-E*f,T*f+E*p]),ee.dot(c,y+T*b,y-E*b,B,V,D,-te)}),ee.frame?.()},A=`${m}@${i}`;k(Rr(A,performance.now(),i));let j=matchMedia(`(prefers-reduced-motion: reduce)`).matches,M=!1,N=0,P=!1,ne=new IntersectionObserver(e=>M=e[e.length-1].isIntersecting);ne.observe(e);function re(e){M&&k(Rr(A,e,i)),N=requestAnimationFrame(re)}let ie=()=>{cancelAnimationFrame(N),N=0},F=()=>{N||j||P||(N=requestAnimationFrame(re))};return F(),{pause:ie,play:F,destroy(){P=!0,ie(),ne.disconnect(),e.replaceChildren()}}}function qi({state:e,variant:t,size:n=20,speed:r=1,paused:i=!1,label:a,shape:o,render:s,density:c,dotSize:l,tilt:u,direction:d,className:p}){let m=(0,f.useRef)(null),h=(0,f.useRef)(null);(0,f.useEffect)(()=>(h.current=Ki(m.current,{state:e,variant:t,size:n,speed:r,label:a,shape:o,render:s,density:c,dotSize:l,tilt:u,direction:d})).destroy,[e,t,n,r,a,o,s,c,l,u,d]),(0,f.useEffect)(()=>{i?h.current.pause():h.current.play()},[i,e,t,n,r,a,o,s,c,l,u,d]);let g=a?{role:`img`,"aria-label":a}:{"aria-hidden":!0};return(0,J.jsx)(`svg`,{ref:m,width:n,height:n,viewBox:`0 0 ${n} ${n}`,fill:`currentColor`,className:p,...g})}var Ji={thinking:{state:`reasoning`},searching:{state:`searching`},reading:{state:`searching`,variant:`lighthouse`},working:{state:`working`},writing:{state:`working`,variant:`gyro`},browsing:{state:`using`,variant:`tap`},recording:{state:`using`,variant:`record`},handing:{state:`background`},retrying:{state:`retrying`},compacting:{state:`compacting`},waiting:{state:`waiting`},idle:{state:`idle`}};function Yi({state:e=`working`,label:t,px:n=16,className:r}){return(0,J.jsx)(qi,{...Ji[e],size:n,label:t,className:q(`block flex-none text-ink`,r)})}var Xi=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{};function Zi(e,t){let n=e;for(let e of t)n=Xi(n)[e];return n}var Qi=e=>e===void 0||e===``||typeof e==`number`&&Number.isNaN(e);function $i(e,t,n){let[r,...i]=t;if(r===void 0)return e;let a={...e},o=i.length?$i(Xi(e[r]),i,n):n;return Qi(o)||i.length&&Qi(n)&&!Object.keys(Xi(o)).length?delete a[r]:a[r]=o,a}function ea(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[i===t?n:i]=a;return r}function ta(e,t){if(!(t in e))return t;for(let n=2;;n++)if(!(`${t}-${n}`in e))return`${t}-${n}`}var na=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function ra(){let e=()=>location.hash.replace(/^#\/?/,``).split(`/`).filter(Boolean),[t,n]=(0,f.useState)(e);return(0,f.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}var ia=(...e)=>`#/${e.join(`/`)}`,aa=`w-full min-w-0 rounded-[10px] border border-line bg-bg px-3 text-[15px] text-ink placeholder:text-muted hover:border-line-strong focus:border-accent focus:outline-none focus-visible:outline-2 focus-visible:outline-accent`;function oa({className:e,...t}){return(0,J.jsx)(`input`,{className:q(aa,`min-h-10`,e),...t})}function sa({className:e,...t}){return(0,J.jsx)(`textarea`,{className:q(aa,`py-2 leading-relaxed`,e),...t})}function ca({className:e,children:t,...n}){return(0,J.jsx)(`select`,{className:q(aa,`min-h-10 cursor-pointer appearance-none bg-[length:16px] bg-[right_10px_center] bg-no-repeat pr-9`,e),style:{backgroundImage:la},...n,children:t})}var la=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`;function ua({open:e,onClose:t,title:n,description:r,children:i,footer:a,wide:o}){let s=(0,f.useRef)(null),c=(0,f.useId)();return(0,f.useEffect)(()=>{let t=s.current;t&&(e&&!t.open&&t.showModal(),!e&&t.open&&t.close())},[e]),(0,J.jsx)(`dialog`,{ref:s,"aria-labelledby":c,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{e.target===s.current&&t()},className:q(`sheet fixed inset-y-0 right-0 left-auto m-0 h-dvh max-h-none w-full border-0 border-l border-line bg-bg p-0 text-ink shadow-menu backdrop:bg-[rgba(17,25,40,0.28)]`,o?`max-w-[760px]`:`max-w-[480px]`),children:e&&(0,J.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-3 border-b border-line-soft px-6 pt-5 pb-4`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,J.jsx)(`h2`,{id:c,className:`m-0 text-lg font-semibold`,children:n}),r&&(0,J.jsx)(`p`,{className:`m-0 text-sm leading-relaxed text-muted`,children:r})]}),(0,J.jsx)(Y,{variant:`icon`,size:`icon`,"aria-label":`Close`,onClick:t,className:`-mt-1 -mr-2`,children:(0,J.jsx)(Jt,{size:20,"aria-hidden":`true`})})]}),(0,J.jsx)(`div`,{className:`flex-1 overflow-y-auto px-6 pb-6`,children:i}),(0,J.jsx)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-line-soft px-6 py-4`,children:a})]})})}function da({checked:e,onChange:t,label:n,id:r,disabled:i}){return(0,J.jsx)(`button`,{type:`button`,role:`switch`,id:r,"aria-checked":e,"aria-label":n,disabled:i,onClick:()=>t(!e),className:q(`relative h-[26px] w-11 flex-none cursor-pointer rounded-full border-0 p-0 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,e?`bg-accent`:`bg-line`),children:(0,J.jsx)(`span`,{"aria-hidden":`true`,className:q(`absolute top-[3px] size-5 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,.25)] transition-[left]`,e?`left-[21px]`:`left-[3px]`)})})}var fa=(0,f.createContext)({pending:{},set:()=>{},saved:new Set,vars:{},store:`the credential store`}),pa=()=>(0,f.useContext)(fa);function ma(e){return/[\\/]/.test(e)?`ForgeQE's private credentials file (readable only by you)`:e}var ha=/^[A-Za-z_][A-Za-z0-9_]*$/;function ga(e,t){return t in e.pending?e.pending[t]===null?`removing`:`pending`:e.saved.has(t)?`saved`:e.vars[t]?`environment`:`missing`}var _a={pending:`Not saved yet`,removing:`Removed when you save`,saved:`Saved`,environment:`Set in the environment`,missing:`Not set`},va=(e,t)=>[`pending`,`saved`,`environment`].includes(ga(e,t));function ya({name:e}){let t=pa();if(!e)return null;if(!ha.test(e))return(0,J.jsx)(`span`,{className:`text-[13px] text-fail`,children:`Not a variable name`});let n=ga(t,e);return(0,J.jsx)(`span`,{className:q(`text-[13px]`,n===`saved`||n===`environment`?`text-pass`:n===`missing`?`text-muted`:`text-accent`),children:_a[n]})}var ba=/user|email|login|client_id|account/i;function xa({id:e,name:t,field:n,onRename:r,compact:i}){let a=pa(),o=(0,f.useId)(),s=e||o,[c,l]=(0,f.useState)(!1),u=ga(a,t),d=typeof a.pending[t]==`string`?a.pending[t]:``,p=ba.test(n)||ba.test(t);return(0,J.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(oa,{id:s,type:p?`text`:`password`,autoComplete:`off`,spellCheck:!1,value:d,disabled:!ha.test(t),placeholder:u===`saved`?`Saved. Type a new value to replace it`:u===`environment`?`Set in the environment. Type a value to save one`:p?`Type it once`:`Paste it once`,onChange:e=>a.set(t,e.target.value||void 0)}),u===`saved`&&(0,J.jsx)(Y,{size:`sm`,onClick:()=>a.set(t,null),"aria-label":`Remove the saved value of ${t}`,children:`Remove`}),u===`removing`&&(0,J.jsx)(Y,{size:`sm`,onClick:()=>a.set(t,void 0),children:`Keep`})]}),!i&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] text-muted`,children:[(0,J.jsx)(ya,{name:t}),(0,J.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),c&&r?(0,J.jsx)(oa,{"aria-label":`Variable name`,autoFocus:!0,defaultValue:t,spellCheck:!1,onBlur:e=>{let n=e.target.value.trim();n&&ha.test(n)&&n!==t&&r(n),l(!1)},onKeyDown:e=>e.key===`Enter`&&e.target.blur(),className:`min-h-8 max-w-[260px] font-mono text-[12px]`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{children:[`Kept as `,(0,J.jsx)(`span`,{className:`font-mono text-[12px]`,children:t})]}),r&&(0,J.jsx)(`button`,{type:`button`,onClick:()=>l(!0),className:`min-h-8 cursor-pointer border-0 bg-transparent p-0 text-[13px] font-medium text-accent hover:text-accent-hover`,children:`Change name`})]})]})]})}function Sa({name:e}){return(0,J.jsx)(ya,{name:e})}function Ca({id:e,name:t,field:n,named:r,onName:i}){let a=pa();return(0,J.jsx)(wa,{onFirstValue:()=>{!r&&t&&i(t)},secrets:a,children:(0,J.jsx)(xa,{id:e,name:t,field:n,onRename:i})})}function wa({secrets:e,onFirstValue:t,children:n}){return(0,J.jsx)(fa.Provider,{value:{...e,set:(n,r)=>{r&&t(),e.set(n,r)}},children:n})}function Ta({label:e,help:t,htmlFor:n,children:r,className:i,stacked:a,yamlKey:o}){let s=o?(0,J.jsx)(`code`,{className:`font-mono text-[11.5px] text-muted [overflow-wrap:anywhere]`,children:o}):null;return a?(0,J.jsxs)(`div`,{className:q(`flex flex-col gap-2 py-3`,i),children:[(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[n?(0,J.jsx)(`label`,{htmlFor:n,className:`font-medium`,children:e}):(0,J.jsx)(`span`,{className:`font-medium`,children:e}),t&&(0,J.jsx)(`span`,{className:`text-sm leading-normal text-muted`,children:t}),s]}),(0,J.jsx)(`div`,{className:`[&>*]:max-w-none`,children:r})]}):(0,J.jsxs)(`div`,{className:q(`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,i),children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-0.5`,children:[n?(0,J.jsx)(`label`,{htmlFor:n,className:`font-medium`,children:e}):(0,J.jsx)(`span`,{className:`font-medium`,children:e}),t&&(0,J.jsx)(`span`,{className:`text-sm leading-normal text-muted`,children:t}),s]}),r]})}function Ea({children:e,help:t,first:n}){return(0,J.jsxs)(`div`,{className:q(`mb-2 flex flex-col gap-0.5`,n?`mt-0`:`mt-8`),children:[(0,J.jsx)(`h3`,{className:`m-0 text-base font-semibold`,children:e}),t&&(0,J.jsx)(`p`,{className:`m-0 max-w-[60ch] text-sm leading-relaxed text-muted`,children:t})]})}var Da=e=>Array.isArray(e)?e.map(String).join(`, `):typeof e==`string`?e:``,Oa=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean);function ka({id:e,value:t,onChange:n,placeholder:r,mono:i}){let[a,o]=(0,f.useState)(Da(t)),[s,c]=(0,f.useState)(t);return JSON.stringify(s)!==JSON.stringify(t)&&(c(t),o(Da(t))),(0,J.jsx)(oa,{id:e,value:a,placeholder:r,className:q(i&&`font-mono text-[13px]`),onChange:e=>{o(e.target.value);let t=Oa(e.target.value);c(t.length?t:void 0),n(t.length?t:void 0)}})}function Aa({def:e,edit:t,base:n,stacked:r}){let i=(0,f.useId)(),a=e.key?[...n,...e.key.split(`.`)]:n,o=Zi(t.value,a),s=e=>t.set($i(t.value,a,e)),c=`flex-[1_1_280px] max-w-[420px]`,l=t.file?a.join(`.`):void 0,u;switch(e.type){case`switch`:{let t=o===void 0?!!e.default:o===!0||o===`true`||o===`on`;return(0,J.jsx)(Ta,{label:e.label,help:e.help,yamlKey:l,children:(0,J.jsx)(da,{checked:t,onChange:s,label:e.label})})}case`select`:u=(0,J.jsxs)(ca,{id:i,value:String(o===void 0?e.default??``:o),onChange:e=>s(e.target.value!==`false`&&e.target.value),className:`max-w-[260px] flex-[0_1_220px]`,children:[e.default===void 0&&(0,J.jsx)(`option`,{value:``,children:e.emptyLabel||`Not set`}),e.options.map(e=>(0,J.jsx)(`option`,{value:e.value,children:e.label},e.value))]});break;case`number`:u=(0,J.jsx)(oa,{id:i,type:`number`,inputMode:`numeric`,value:o==null?``:String(o),placeholder:e.default===void 0?e.placeholder:String(e.default),onChange:e=>s(e.target.value===``?void 0:Number(e.target.value)),className:`max-w-[160px] flex-[0_1_140px]`});break;case`list`:u=(0,J.jsx)(`div`,{className:c,children:(0,J.jsx)(ka,{id:i,value:o,onChange:s,placeholder:e.placeholder})});break;case`kv`:u=(0,J.jsx)(`div`,{className:c,children:(0,J.jsx)(ja,{id:i,value:o,onChange:s,placeholder:e.placeholder})});break;case`textarea`:u=(0,J.jsx)(sa,{id:i,rows:3,value:o===void 0?``:String(o),placeholder:e.placeholder,onChange:e=>s(e.target.value),className:c});break;case`var`:{let t=String(o??e.default??e.placeholder??``);return u=(0,J.jsx)(`div`,{className:c,children:(0,J.jsx)(Ca,{id:i,name:t,field:e.key,named:o!==void 0||e.default!==void 0,onName:e=>s(e)})}),(0,J.jsx)(Ta,{label:e.label.replace(/ variable$/,``),help:e.help,htmlFor:i,stacked:r,yamlKey:l,children:u})}default:u=(0,J.jsx)(oa,{id:i,type:e.type===`url`?`url`:`text`,value:o===void 0?``:String(o),placeholder:e.placeholder??(e.default===void 0?void 0:String(e.default)),spellCheck:e.type===`text`,onChange:e=>s(e.target.value),className:q(c,e.type===`path`&&`font-mono text-[13px]`)})}return(0,J.jsx)(Ta,{label:e.label,help:e.help,htmlFor:i,stacked:r,yamlKey:l,children:u})}function ja({id:e,value:t,onChange:n,placeholder:r}){let i=e=>Object.entries(e&&typeof e==`object`&&!Array.isArray(e)?e:{}).map(([e,t])=>`${e} = ${typeof t==`object`?JSON.stringify(t):String(t)}`).join(`
|
|
2
|
+
`),[a,o]=(0,f.useState)(i(t)),[s,c]=(0,f.useState)(t);return JSON.stringify(s)!==JSON.stringify(t)&&(c(t),o(i(t))),(0,J.jsx)(sa,{id:e,rows:3,value:a,spellCheck:!1,placeholder:r??`NAME = value`,className:`font-mono text-[13px]`,onChange:e=>{o(e.target.value);let t={};for(let n of e.target.value.split(`
|
|
3
|
+
`)){let e=n.indexOf(`=`),r=(e<0?n:n.slice(0,e)).trim();if(!r)continue;let i=e<0?``:n.slice(e+1).trim();t[r]=/^-?\d+(\.\d+)?$/.test(i)?Number(i):i===`true`||i!==`false`&&i}let r=Object.keys(t).length?t:void 0;c(r),n(r)}})}function Ma({defs:e,edit:t,base:n,stacked:r}){return(0,J.jsx)(J.Fragment,{children:e.map(e=>(0,J.jsx)(Aa,{def:e,edit:t,base:n,stacked:r},e.key))})}function Na({title:e,meta:t,state:n,open:r,onToggle:i,lead:a,actions:o,children:s,expandable:c}){let l=(0,f.useId)();return(0,J.jsxs)(`div`,{className:`border-t border-line-soft`,children:[(0,J.jsxs)(`div`,{className:`flex min-h-[68px] flex-wrap items-center gap-x-4 gap-y-2 py-3`,children:[a,c===!1?(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:e}),t&&(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:t})]}):(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":l,onClick:i,className:`flex min-w-0 flex-[1_1_260px] cursor-pointer items-center gap-3 rounded-[10px] border-0 bg-transparent p-0 text-left text-ink`,children:[(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}),t&&(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:t})]}),(0,J.jsx)(we,{size:18,"aria-hidden":`true`,className:q(`flex-none text-muted transition-transform`,r&&`rotate-180`)})]}),n,o]}),r&&c!==!1&&(0,J.jsx)(`div`,{id:l,className:`fade-in mb-4 rounded-[14px] bg-surface-muted px-4 pb-2 sm:px-5 [&>*:first-child]:border-t-0`,children:s})]})}function Pa(e){let[t,n]=(0,f.useState)(null),[r,i]=(0,f.useState)(``),a=(0,f.useCallback)(()=>{i(``),e().then(n,e=>i(e.message))},[e]);return(0,f.useEffect)(a,[a]),{data:t,error:r,reload:a}}function Fa({error:e,reload:t}){return e?(0,J.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-[14px] border border-line p-5`,children:[(0,J.jsx)(`p`,{className:`m-0 text-sm leading-relaxed text-ink-2`,children:e}),(0,J.jsx)(Y,{onClick:t,children:`Try again`})]}):(0,J.jsx)(`p`,{role:`status`,className:`m-0 py-3 text-sm text-muted`,children:`Loading…`})}function Ia({children:e}){return(0,J.jsx)(`p`,{className:`m-0 rounded-[14px] bg-surface-muted px-5 py-4 text-sm leading-relaxed text-ink-2`,children:e})}function Z(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Q(e,t){if(!t)return`—`;try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t,maximumFractionDigits:e<1?3:2}).format(e)}catch{return`${e.toFixed(2)} ${t}`}}var La=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})},Ra=e=>e>=1048576?`${(e/1048576).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} bytes`;function $({label:e,value:t,note:n,icon:r}){return(0,J.jsxs)(`div`,{className:`flex min-w-[112px] flex-[1_1_112px] flex-col gap-1 rounded-[14px] border border-line-soft px-4 py-3`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[13px] text-muted`,children:[r&&(0,J.jsx)(r,{size:14,"aria-hidden":`true`,className:`flex-none`}),e]}),(0,J.jsx)(`span`,{className:`text-[28px] leading-tight font-semibold tracking-[-0.02em]`,children:t}),n&&(0,J.jsx)(`span`,{className:`text-[13px] text-muted`,children:n})]})}function za({head:e,children:t,label:n}){return(0,J.jsx)(`div`,{className:`overflow-x-auto rounded-[12px] border border-line-soft`,children:(0,J.jsxs)(`table`,{"aria-label":n,className:`w-full border-collapse text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsx)(`tr`,{className:`bg-surface-muted text-left text-[13px] text-muted`,children:e.map((e,t)=>(0,J.jsx)(`th`,{scope:`col`,className:q(`px-3 py-2 font-medium whitespace-nowrap`,t>0&&`text-right`),children:e},e))})}),(0,J.jsx)(`tbody`,{children:t})]})})}function Ba({cells:e}){return(0,J.jsx)(`tr`,{className:`border-t border-line-soft`,children:e.map((e,t)=>(0,J.jsx)(`td`,{className:q(`px-3 py-2 align-top`,t>0?`text-right whitespace-nowrap tabular-nums`:`min-w-[200px]`),children:e},t))})}var Va={forgeqe:`ForgeQE's agent`,scribe:`Scribe`,browser:`the browser agent`},Ha={prebuilt:`ForgeQE's`,project:`this project's`,user:`yours`,external:`Claude or agent skills`,extra:`a shared folder`},Ua={title:`How skills are used`,base:[`skills`],fields:[{key:`enabled`,label:`Use skills`,type:`switch`,default:!0},{key:`external`,label:`Also read Claude and agent skills`,help:`~/.claude/skills, ~/.agents/skills, and the repository's own.`,type:`switch`,default:!1},{key:`dirs`,label:`More skill folders`,help:`Comma separated. They win over the others.`,type:`list`,placeholder:`../shared-skills`},{key:`browser_max_chars`,label:`Skill text per browser run`,help:`Characters.`,type:`number`,default:6e3}]};function Wa({edit:e}){let{data:t,error:n,reload:r}=Pa(w.skills),i=Zi(e.value,[`skills`,`disable`])||[],a=t=>e.set($i(e.value,[`skills`,`disable`],t.length?t:void 0));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ea,{first:!0,children:Ua.title}),(0,J.jsx)(Ma,{defs:Ua.fields,edit:e,base:Ua.base}),(0,J.jsx)(Ea,{help:`Folders with a SKILL.md that teach the agents your conventions, a framework or an app. Turning one off adds it to skills.disable.`,children:`Skills found`}),t?t.skills.length===0?(0,J.jsx)(Ia,{children:`No skills found. Add a folder with a SKILL.md to .forgeqe/skills, or start one with forgeqe skills new NAME.`}):t.skills.map(e=>{let t=!i.includes(e.name);return(0,J.jsxs)(`div`,{className:`flex min-h-[68px] items-center gap-4 border-t border-line-soft py-3`,children:[(0,J.jsx)(kr,{icon:ge}),(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:`line-clamp-2 text-sm text-muted`,children:e.description}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[Ha[e.source]||e.source,`, for `,e.agents.map(e=>Va[e]||e).join(`, `)]})]}),(0,J.jsx)(da,{checked:t,onChange:t=>a(t?i.filter(t=>t!==e.name):[...i,e.name]),label:`Use ${e.name}`})]},e.name)}):(0,J.jsx)(Fa,{error:n,reload:r}),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]})}function Ga({onChanged:e}){let{data:t,error:n,reload:r}=Pa(w.prompts),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(``),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(!1),[p,m]=(0,f.useState)(``),h=async t=>{m(``);try{let e=await w.prompt(t);a(e),s(e.text),l(!1)}catch(t){e(t.message)}},g=async(t,n)=>{d(!0),m(``);try{let i=await t();a(null),r(),e(n.replace(`{name}`,i.name))}catch(e){m(e.message)}finally{d(!1)}};if(!t)return(0,J.jsx)(Fa,{error:n,reload:r});let _=t.prompts.find(e=>e.name===i?.name);return(0,J.jsxs)(J.Fragment,{children:[t.prompts.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`,children:[(0,J.jsx)(kr,{icon:We}),(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:e.name}),(0,J.jsx)(`span`,{className:`line-clamp-2 text-sm text-muted`,children:e.description||e.usedBy})]}),(0,J.jsx)(`span`,{className:q(`text-[13px]`,e.outdated?`text-warn`:e.edited?`text-accent`:`text-muted`),children:e.outdated?`Edited, based on an older version`:e.edited?`Edited (${e.source})`:`ForgeQE's`}),(0,J.jsx)(Y,{size:`sm`,"aria-label":`Open ${e.name}`,onClick:()=>h(e.name),children:`Open`})]},e.name)),(0,J.jsx)(ua,{wide:!0,open:!!i,onClose:()=>a(null),title:i?.name||``,description:(0,J.jsxs)(J.Fragment,{children:[_?.usedBy?`Used by ${_.usedBy}. `:``,`Saving writes `,(0,J.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[`.forgeqe/prompts/`,i?.name,`.md`]}),` straight away; new chats and runs use it.`]}),footer:(0,J.jsxs)(J.Fragment,{children:[p&&(0,J.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail`,children:p}),_?.edited&&_.source===`project`&&(0,J.jsx)(Y,{disabled:u,onClick:()=>i&&g(()=>w.resetPrompt(i.name),`{name} is ForgeQE's own prompt again.`),className:`mr-auto`,children:`Reset to ForgeQE's`}),(0,J.jsx)(Y,{onClick:()=>a(null),children:`Cancel`}),(0,J.jsx)(Y,{variant:`primary`,disabled:u||!i||o===i.text,onClick:()=>i&&g(()=>w.savePrompt(i.name,o),`Saved your copy of {name}.`),children:u?`Saving…`:`Save prompt`})]}),children:i&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pt-4`,children:[_?.edited&&_.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 `,_.source,` copy; saving here makes a project copy, which the shared folder still wins over.`]}),(0,J.jsx)(`button`,{type:`button`,"aria-expanded":c,onClick:()=>l(!c),className:`min-h-10 cursor-pointer self-start border-0 bg-transparent p-0 text-sm font-medium text-accent hover:text-accent-hover`,children:c?`Hide ForgeQE's text`:`Show ForgeQE's text`}),c&&(0,J.jsx)(`pre`,{className:`m-0 max-h-[40vh] overflow-auto rounded-[12px] bg-surface-muted p-4 font-mono text-[12px] leading-relaxed whitespace-pre-wrap`,children:i.builtin}),(0,J.jsx)(`label`,{htmlFor:`prompt-text`,className:`font-medium`,children:`Prompt`}),(0,J.jsx)(sa,{id:`prompt-text`,spellCheck:!1,rows:22,value:o,onChange:e=>s(e.target.value),className:`font-mono text-[13px] leading-[1.6]`})]})})]})}function Ka({edit:e}){let{data:t,error:n,reload:r}=Pa(w.registry);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ma,{defs:[{key:`registry.mode`,label:`Rerun passed runs without the agent`,help:`On: a rerun of a passed run replays it with no model when its checks hold. Shadow only records what it would have done.`,type:`select`,default:`on`,options:[{value:`on`,label:`On`},{value:`shadow`,label:`Shadow`},{value:`off`,label:`Off`}]}],edit:e,base:[]}),t?t.exists?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-3`,children:[(0,J.jsx)($,{icon:Me,label:`Recorded plans`,value:String(t.plans.length)}),(0,J.jsx)($,{icon:et,label:`Requests`,value:String(t.total)}),(0,J.jsx)($,{icon:St,label:`Replayed without the agent`,value:String(t.replayed)}),(0,J.jsx)($,{icon:vt,label:`Input tokens not spent`,value:Z(t.tokensSaved),note:`Against the run that recorded each plan`})]}),(0,J.jsx)(Ea,{children:`Plans`}),t.plans.length===0?(0,J.jsx)(Ia,{children:`No plans recorded yet.`}):(0,J.jsx)(za,{label:`Recorded plans`,head:[`Goal`,`Passed`,`Failed`,`Tokens first run`,`Last used`],children:t.plans.map(e=>(0,J.jsx)(Ba,{cells:[(0,J.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.goal}),e.stale&&(0,J.jsx)(`span`,{className:`text-[13px] text-warn`,children:`Out of date: the next run takes the agent's path`})]}),e.successes,e.failures,e.firstTokens?Z(e.firstTokens):`—`,La(e.lastAt)]},e.id))}),(0,J.jsx)(Ea,{children:`Recent requests`}),t.requests.length===0?(0,J.jsx)(Ia,{children:`No requests logged yet.`}):(0,J.jsx)(za,{label:`Recent requests`,head:[`Request`,`Decision`,`Outcome`,`Tokens`,`When`],children:t.requests.map(e=>(0,J.jsx)(Ba,{cells:[(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.request||e.planGoal||e.id}),e.decision===`tier0`?`Replayed`:e.decision===`no match`?`Agent: no plan yet`:`Agent: ${e.decision}`,e.outcome||`—`,Z(e.tokens),La(e.startedAt)]},e.id))})]}):(0,J.jsxs)(Ia,{children:[`No registry yet. ForgeQE starts one the first time a run passes; it is kept in `,t.file,`.`]}):(0,J.jsx)(Fa,{error:n,reload:r})]})}function qa(){let{data:e,error:t,reload:n}=Pa(w.logs),[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(``);return e?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`mt-0 mb-4 text-sm text-muted`,children:[`Kept in `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.dir}),`. Secrets are replaced with their names before a log is shown.`]}),a&&(0,J.jsx)(`p`,{role:`alert`,className:`mt-0 mb-3 text-sm text-fail`,children:a}),e.logs.length===0?(0,J.jsx)(Ia,{children:`No session logs yet. ForgeQE writes one for each chat, run and suite.`}):e.logs.map(e=>(0,J.jsxs)(`div`,{className:`flex min-h-[60px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-2`,children:[(0,J.jsx)(kr,{icon:Et}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[13px] break-all`,children:e.name}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[La(e.modified),`, `,Ra(e.size)]})]}),(0,J.jsx)(Y,{size:`sm`,"aria-label":`Open ${e.name}`,onClick:()=>{o(``),w.log(e.name).then(i,e=>o(e.message))},children:`Open`})]},e.name)),(0,J.jsx)(ua,{wide:!0,open:!!r,onClose:()=>i(null),title:r?.name||``,description:r?.truncated?`The end of the log; the start is cut to keep it quick to open.`:void 0,footer:(0,J.jsx)(Y,{onClick:()=>i(null),children:`Close`}),children:r&&(0,J.jsx)(`pre`,{className:`m-0 mt-4 font-mono text-[12px] leading-relaxed whitespace-pre-wrap break-all`,children:r.text})})]}):(0,J.jsx)(Fa,{error:t,reload:n})}var Ja={error:`Error`,tool:`Tool call failed`,run:`Run failed`,engine:`Browser engine stopped`,agent:`Agent error`,model:`Model call failed`},Ya={chat:`Chat`,start:`Shell`,run:`Run`,suite:`Suite`,code:`Write tests`,heal:`Heal`,monitor:`Monitor`,mcp:`MCP`,explore:`Explore`};function Xa(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(``);return{show:e=>{r(``),w.log(e).then(t,e=>r(e.message))},error:n,sheet:(0,J.jsx)(ua,{wide:!0,open:!!e,onClose:()=>t(null),title:e?.name||``,description:e?.truncated?`The end of the log; the start is cut to keep it quick to open.`:void 0,footer:(0,J.jsx)(Y,{onClick:()=>t(null),children:`Close`}),children:e&&(0,J.jsx)(`pre`,{className:`m-0 mt-4 font-mono text-[12px] leading-relaxed break-all whitespace-pre-wrap`,children:e.text})})}}function Za({entries:e}){let[t,n]=(0,f.useState)(-1);return e.length?(0,J.jsx)(J.Fragment,{children:e.map((e,r)=>(0,J.jsx)(Na,{lead:(0,J.jsx)(kr,{icon:wt}),title:`${e.action}: ${e.file}`,meta:`${La(e.at)}, ${e.user} on ${e.machine}, ${e.changes.length} change${e.changes.length===1?``:`s`}`,open:t===r,onToggle:()=>n(t===r?-1:r),children:(0,J.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-2 p-0 py-3`,children:e.changes.map((e,t)=>(0,J.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.key}),(0,J.jsx)(`span`,{className:`text-muted`,children:e.before===void 0?(0,J.jsxs)(J.Fragment,{children:[`added `,(0,J.jsx)(`span`,{className:`text-ink`,children:e.after})]}):e.after===void 0?(0,J.jsxs)(J.Fragment,{children:[`removed `,(0,J.jsx)(`span`,{className:`text-ink line-through`,children:e.before})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`text-ink line-through`,children:e.before}),` → `,(0,J.jsx)(`span`,{className:`text-ink`,children:e.after})]})})]},t))})},r))}):(0,J.jsx)(Ia,{children:`No changes made in Settings yet.`})}function Qa({tabs:e,current:t,onPick:n,label:r}){return(0,J.jsx)(`div`,{role:`tablist`,"aria-label":r,className:`mb-5 flex flex-wrap gap-x-5 border-b border-line-soft`,children:e.map((r,i)=>(0,J.jsx)(`button`,{id:`tab-${r.id}`,type:`button`,role:`tab`,"aria-selected":t===r.id,"aria-controls":`panel-${r.id}`,tabIndex:t===r.id?0:-1,onClick:()=>n(r.id),onKeyDown:t=>{let r=t.key===`ArrowRight`?e[(i+1)%e.length]:t.key===`ArrowLeft`?e[(i-1+e.length)%e.length]:void 0;r&&(n(r.id),document.getElementById(`tab-${r.id}`)?.focus())},className:q(`-mb-px min-h-11 cursor-pointer border-0 border-b-2 bg-transparent px-0.5 text-sm font-medium`,t===r.id?`border-ink text-ink`:`border-transparent text-muted hover:text-ink`),children:r.label},r.id))})}function $a(){let{data:e,error:t,reload:n}=Pa(w.audit),[r,i]=(0,f.useState)(`summary`),a=Xa();if(!e)return(0,J.jsx)(Fa,{error:t,reload:n});let o=e.summary,s=o.totals,c=e=>e?`${e} failed`:`None failed`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`mt-0 mb-4 text-sm text-muted`,children:`The last 30 days, from the session logs on this machine and its usage ledger. Model calls count every project on this machine.`}),(0,J.jsx)(Qa,{label:`Audit`,current:r,onPick:i,tabs:[{id:`summary`,label:`Summary`},{id:`problems`,label:`Problems (${o.problems.length})`},{id:`sessions`,label:`Sessions (${o.sessions.length})`},{id:`changes`,label:`Settings changes (${e.entries.length})`}]}),a.error&&(0,J.jsx)(`p`,{role:`alert`,className:`mt-0 mb-3 text-sm text-fail`,children:a.error}),(0,J.jsxs)(`div`,{id:`panel-${r}`,role:`tabpanel`,"aria-labelledby":`tab-${r}`,children:[r===`summary`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,J.jsx)($,{icon:ot,label:`Sessions`,value:String(s.sessions),note:s.replays?`${s.replays} request${s.replays===1?``:`s`} replayed without the agent`:void 0}),(0,J.jsx)($,{icon:Kt,label:`Tool calls`,value:String(s.toolCalls),note:c(s.toolErrors)}),(0,J.jsx)($,{icon:bt,label:`Runs`,value:String(s.runs),note:c(s.runsFailed)}),(0,J.jsx)($,{icon:Pt,label:`Model calls`,value:String(s.modelCalls),note:c(s.modelErrors)}),(0,J.jsx)($,{icon:Bt,label:`Errors`,value:String(s.errors),note:s.escalations?`${s.escalations} switch${s.escalations===1?``:`es`} to a stronger model`:void 0})]}),o.problems.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ea,{children:`Latest problems`}),(0,J.jsx)(eo,{problems:o.problems.slice(0,5),onLog:a.show}),o.problems.length>5&&(0,J.jsxs)(`button`,{type:`button`,onClick:()=>i(`problems`),className:`mt-3 min-h-10 cursor-pointer border-0 bg-transparent p-0 text-sm font-medium text-accent hover:text-accent-hover`,children:[`All `,o.problems.length,` problems`]})]}),(0,J.jsx)(Ea,{children:`Tools used`}),o.tools.length===0?(0,J.jsx)(Ia,{children:`No tool calls logged in the last 30 days.`}):(0,J.jsx)(za,{label:`Tools used`,head:[`Tool`,`Calls`,`Failed`,`Average time`],children:o.tools.map(e=>(0,J.jsx)(Ba,{cells:[(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.name}),e.calls,e.errors?(0,J.jsx)(`span`,{className:`text-fail`,children:e.errors}):0,e.calls?`${(e.ms/e.calls/1e3).toFixed(1)} s`:`—`]},e.name))}),(0,J.jsx)(Ea,{children:`Model calls`}),o.models.length===0?(0,J.jsx)(Ia,{children:`No model calls in the usage ledger in the last 30 days.`}):(0,J.jsx)(za,{label:`Model calls`,head:[`Model`,`Calls`,`Failed`,`Tokens`],children:o.models.map(e=>(0,J.jsx)(Ba,{cells:[e.model,e.calls,e.errors?(0,J.jsx)(`span`,{className:`text-fail`,children:e.errors}):0,Z(e.tokens)]},e.model))})]}),r===`problems`&&(o.problems.length?(0,J.jsx)(eo,{problems:o.problems,onLog:a.show}):(0,J.jsx)(Ia,{children:`Nothing failed in the last 30 days.`})),r===`sessions`&&(o.sessions.length?(0,J.jsx)(za,{label:`Sessions`,head:[`Session`,`Tool calls`,`Runs`,`Errors`,`Tokens`,``],children:o.sessions.map(e=>(0,J.jsx)(Ba,{cells:[(0,J.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:Ya[e.command]||e.command}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[La(e.started),e.model?`, ${e.model}`:``]})]}),e.toolErrors?`${e.tools} (${e.toolErrors} failed)`:e.tools,e.runsFailed?`${e.runs} (${e.runsFailed} failed)`:e.runs,e.errors?(0,J.jsx)(`span`,{className:`text-fail`,children:e.errors}):0,Z(e.tokens),(0,J.jsx)(Y,{size:`sm`,"aria-label":`Open the log of the ${Ya[e.command]||e.command} session at ${La(e.started)}`,onClick:()=>a.show(e.log),children:`Log`})]},e.log))}):(0,J.jsx)(Ia,{children:`No sessions logged in the last 30 days.`})),r===`changes`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`mt-0 mb-4 text-sm text-muted`,children:[`Every change made in Settings, kept in `,(0,J.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.file}),`. Changes made to the files by hand are not here.`]}),(0,J.jsx)(Za,{entries:e.entries})]})]}),a.sheet]})}function eo({problems:e,onLog:t}){return(0,J.jsx)(J.Fragment,{children:e.map((e,n)=>(0,J.jsxs)(`div`,{className:`flex min-h-[64px] flex-wrap items-center gap-x-4 gap-y-2 border-t border-line-soft py-3`,children:[(0,J.jsx)(kr,{icon:e.kind===`run`||e.kind===`tool`?Ae:Bt,className:`bg-fail-soft text-fail`}),(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:Ja[e.kind]}),(0,J.jsx)(`span`,{className:`text-sm break-words text-ink-2`,children:e.text}),(0,J.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[La(e.at),`, `,Ya[e.command]||e.command]})]}),e.log&&(0,J.jsx)(Y,{size:`sm`,"aria-label":`Open the log for: ${e.text.slice(0,60)}`,onClick:()=>t(e.log),children:`Log`})]},n))})}var to={title:`Budgets`,help:`In the model's price currency. They only warn, at 80, 90 and 100 percent, and never stop a run. Day and month count every ForgeQE process on this machine.`,base:[`budget`],fields:[{key:`run`,label:`Per browser run`,type:`number`},{key:`day`,label:`Per day`,type:`number`},{key:`month`,label:`Per month`,type:`number`},{key:`currency`,label:`Currency`,type:`text`,placeholder:`USD`}]},no={suite:`Suites`,monitor:`Monitor rounds`,run:`Browser runs`,explore:`Exploratory`,api:`API tests`,desktop:`Desktop runs`,mobile:`Mobile runs`};function ro({days:e,currency:t}){let[n,r]=(0,f.useState)(-1),i=Math.max(1,...e.map(e=>e.input+e.output)),a=e.reduce((e,t)=>e+t.input+t.output,0),o=e.filter(e=>e.runs>0).length,s=e.reduce((e,t)=>t.input+t.output>e.input+e.output?t:e,e[0]),c=n>=0?e[n]:e[e.length-1],l=e=>new Date(`${e}T12:00:00Z`).toLocaleDateString(void 0,{month:`short`,day:`numeric`});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`p`,{"aria-live":`polite`,className:`m-0 text-sm text-ink-2`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:l(c.day)}),`: `,Z(c.input+c.output),` tokens, `,c.runs,` run`,c.runs===1?``:`s`,t?`, ${Q(c.amount,t)}`:``]}),(0,J.jsx)(`div`,{role:`img`,"aria-label":`Tokens a day for the last 30 days: ${Z(a)} in all, on ${o} days with runs; the busiest was ${l(s.day)} with ${Z(s.input+s.output)}.`,className:`flex h-[160px] items-end gap-[2px] border-b border-line`,onMouseLeave:()=>r(-1),children:e.map((t,a)=>{let o=t.input+t.output;return(0,J.jsx)(`div`,{className:`flex h-full flex-1 cursor-default items-end`,onMouseEnter:()=>r(a),children:(0,J.jsx)(`div`,{className:q(`w-full rounded-t-[4px] transition-[height]`,a===e.length-1||a===n?`bg-accent`:`bg-[#dbe1fe]`),style:{height:o?`${Math.max(2,o/i*100)}%`:`0`}})},t.day)})}),(0,J.jsxs)(`div`,{"aria-hidden":`true`,className:`flex justify-between text-[12px] text-muted`,children:[(0,J.jsx)(`span`,{children:l(e[0].day)}),(0,J.jsx)(`span`,{children:l(e[e.length-1].day)})]})]})}function io({rows:e,currency:t,label:n}){if(!e.length)return(0,J.jsx)(Ia,{children:`Nothing yet.`});let r=Math.max(1,...e.map(e=>e.sum.input+e.sum.output));return(0,J.jsx)(`ul`,{"aria-label":n,className:`m-0 flex list-none flex-col gap-3 p-0`,children:e.map(e=>{let n=e.sum.input+e.sum.output;return(0,J.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,J.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-sm`,children:[(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:e.name}),(0,J.jsxs)(`span`,{className:`whitespace-nowrap text-ink-2 tabular-nums`,children:[Z(n),` tokens`,t&&e.sum.amount?`, ${Q(e.sum.amount,t)}`:``]})]}),(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`h-2 rounded-full bg-surface-strong`,children:(0,J.jsx)(`div`,{className:`h-2 rounded-full bg-accent`,style:{width:`${Math.max(1,n/r*100)}%`}})})]},e.name)})})}function ao({label:e,spent:t,limit:n,currency:r}){let i=t/n*100,a=i>=100?`fail`:i>=80?`warn`:`ok`;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-sm`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:e}),(0,J.jsxs)(`span`,{className:q(`tabular-nums`,a===`fail`?`text-fail`:a===`warn`?`text-warn`:`text-ink-2`),children:[Q(t,r),` of `,Q(n,r),a===`fail`?`, over budget`:a===`warn`?`, ${Math.round(i)} percent used`:``]})]}),(0,J.jsx)(`div`,{role:`img`,"aria-label":`${e}: ${Q(t,r)} of ${Q(n,r)}, ${Math.round(i)} percent`,className:`h-2 rounded-full bg-surface-strong`,children:(0,J.jsx)(`div`,{className:q(`h-2 rounded-full`,a===`fail`?`bg-fail`:a===`warn`?`bg-warn`:`bg-accent`),style:{width:`${Math.min(100,Math.max(1,i))}%`}})})]})}function oo({edit:e}){let{data:t,error:n,reload:r}=Pa(w.tokenomics),i=(0,J.jsx)(Ma,{defs:to.fields,edit:e,base:to.base});if(!t)return(0,J.jsx)(Fa,{error:n,reload:r});let a=t,o=a.currency,s=a.totals.input+a.totals.output,c=a.budget,l=c?.currency||a.spent?.currency||o;return(0,J.jsxs)(J.Fragment,{children:[a.totals.runs===0?(0,J.jsx)(Ia,{children:`No reports with token counts yet. Every run and suite ForgeQE reports on is counted here.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`mt-0 mb-4 text-sm text-muted`,children:[`From `,a.totals.runs,` run`,a.totals.runs===1?``:`s`,` in this project's reports`,a.from?`, ${a.from} to ${a.to}`:``,`. Models and agents come from the `,a.totals.withCalls,` run`,a.totals.withCalls===1?``:`s`,` that kept their model calls.`]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,J.jsx)($,{icon:Pe,label:`Tokens`,value:Z(s),note:`${Z(a.totals.input)} in, ${Z(a.totals.output)} out`}),(0,J.jsx)($,{icon:Ht,label:`Cost`,value:Q(a.totals.amount,o),note:a.totals.unpriced?`${a.totals.unpriced} run${a.totals.unpriced===1?``:`s`} had no price`:o?`At the models' prices`:`No prices known`}),(0,J.jsx)($,{icon:Je,label:`Per run`,value:Z(Math.round(s/a.totals.runs)),note:o?Q(a.totals.amount/a.totals.runs,o):void 0}),(0,J.jsx)($,{icon:Ie,label:`Cached input`,value:a.totals.input?`${Math.round(a.totals.cached/a.totals.input*100)}%`:`—`,note:`Of the input tokens`})]}),a.otherCurrency>0&&(0,J.jsxs)(`p`,{className:`mt-3 mb-0 text-[13px] text-muted`,children:[a.otherCurrency,` run`,a.otherCurrency===1?` was`:`s were`,` priced in another currency and left out of the cost.`]}),(0,J.jsx)(Ea,{children:`Last 30 days`}),(0,J.jsx)(ro,{days:a.days,currency:o}),(0,J.jsxs)(`div`,{className:`mt-8 flex flex-wrap gap-x-10 gap-y-8`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-3`,children:[(0,J.jsx)(`h3`,{className:`m-0 text-base font-semibold`,children:`By model`}),(0,J.jsx)(io,{label:`Tokens by model`,rows:a.byModel.map(e=>({name:e.model,sum:e})),currency:o})]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-3`,children:[(0,J.jsx)(`h3`,{className:`m-0 text-base font-semibold`,children:`By agent`}),(0,J.jsx)(io,{label:`Tokens by agent`,rows:a.byAgent.map(e=>({name:e.agent,sum:e})),currency:o})]})]}),(0,J.jsx)(Ea,{children:`By kind of run`}),(0,J.jsx)(io,{label:`Tokens by kind of run`,rows:a.byKind.map(e=>({name:`${no[e.kind]||e.kind} (${e.runs})`,sum:e})),currency:o}),(0,J.jsx)(Ea,{children:`Runs that used the most`}),(0,J.jsx)(za,{label:`Runs that used the most tokens`,head:[`Run`,`Kind`,`Tokens`,`Cost`,`When`],children:a.top.map(e=>(0,J.jsx)(Ba,{cells:[(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.title}),no[e.kind]||e.kind,Z(e.tokens),e.amount===void 0?`—`:Q(e.amount,o),e.startedAt?La(e.startedAt):`—`]},`${e.kind}/${e.id}`))})]}),(0,J.jsx)(Ea,{help:to.help,children:to.title}),c&&a.spent&&(c.day||c.month)?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-4 rounded-[14px] border border-line-soft p-4`,children:[c.day?(0,J.jsx)(ao,{label:`Today`,spent:a.spent.today,limit:c.day,currency:l}):null,c.month?(0,J.jsx)(ao,{label:`This month`,spent:a.spent.month,limit:c.month,currency:l}):null]}):null,i]})}var so=`forgeqe-sidebar-panels`;function co(e,t){let[n,r]=(0,f.useState)(()=>{try{return JSON.parse(localStorage.getItem(so)||`{}`)[e]??t}catch{return t}});return[n,()=>{r(!n);try{let t=JSON.parse(localStorage.getItem(so)||`{}`);localStorage.setItem(so,JSON.stringify({...t,[e]:!n}))}catch{}}]}function lo({id:e,title:t,children:n,initial:r=!0}){let[i,a]=co(e,r);return(0,J.jsxs)(`section`,{"aria-labelledby":`panel-${e}`,className:`flex flex-col rounded-[14px] border border-line-soft bg-bg p-1.5`,children:[(0,J.jsx)(`h3`,{id:`panel-${e}`,className:`m-0`,children:(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":i,onClick:a,className:`flex min-h-9 w-full cursor-pointer items-center gap-1 rounded-[10px] border-0 bg-transparent px-2.5 text-left text-sm font-semibold text-ink hover:bg-surface-muted`,children:[(0,J.jsx)(`span`,{className:`flex-1`,children:t}),(0,J.jsx)(we,{size:16,"aria-hidden":`true`,className:q(`text-muted transition-transform`,!i&&`-rotate-90`)})]})}),i&&(0,J.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-1 pb-0.5`,children:n})]})}function uo({icon:e,label:t,value:n,to:r,title:i}){let a=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(e,{size:16,strokeWidth:1.8,"aria-hidden":`true`,className:`mt-0.5 flex-none text-muted`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`text-[12px] leading-tight text-muted`,children:t}),(0,J.jsx)(`span`,{className:`truncate text-[13px] text-ink`,children:n})]})]}),o=`flex items-start gap-2.5 rounded-[10px] px-3 py-1.5 no-underline`;return r?(0,J.jsx)(`a`,{href:r,title:i,className:q(o,`hover:bg-surface-muted`),children:a}):(0,J.jsx)(`div`,{title:i,className:o,children:a})}function fo({value:e,max:t,warnAt:n}){let r=t>0?Math.min(1,e/t):0,i=n?e>=n*.9:r>.75;return(0,J.jsx)(`span`,{role:`meter`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,"aria-label":`Context used`,className:`mt-1 block h-1.5 w-full overflow-hidden rounded-full bg-line`,children:(0,J.jsx)(`span`,{className:q(`block h-full rounded-full`,i?`bg-warn`:`bg-accent`),style:{width:`${Math.max(2,r*100)}%`}})})}var po=e=>{try{return e?new URL(e).host:``}catch{return``}};function mo({chat:e}){let[t,n]=(0,f.useState)(null),[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(!1);(0,f.useEffect)(()=>{let e=!1,t=()=>C.state().then(t=>{if(!e){if(n(t),!t.ready)return i(null);D.get().then(t=>!e&&i(t),()=>{})}},()=>{});return t(),window.addEventListener(`hashchange`,t),()=>{e=!0,window.removeEventListener(`hashchange`,t)}},[]),(0,f.useEffect)(()=>{if(!t?.ready)return;let e=!1,n=()=>w.tokenomics().then(t=>!e&&o(t),()=>{});n();let r=setInterval(n,18e4);return()=>{e=!0,clearInterval(r)}},[t?.ready,t?.project]);let l=t?t.project.split(/[\\/]/).filter(Boolean).pop()||t.project:``,u=r?.codeRepo||r?.repo,d=a?.days.find(e=>e.day===new Date().toISOString().slice(0,10)),p=r?.environment;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,J.jsxs)(lo,{id:`env`,title:`Environment`,children:[(0,J.jsx)(uo,{icon:Ke,label:`Project`,value:t?.ready?l:`Not set up`,to:ia(`settings`,`setup`),title:t?.project}),r&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(uo,{icon:Xe,label:r.codeRepo?`Tests go to`:`Repository`,value:u?`${u.name}${u.branch?` · ${u.branch}`:u.commit?` · ${u.commit}`:``}`:`Not a git repository`,title:u?`${u.root}${u.commit?` @ ${u.commit}`:``}`:void 0,to:ia(`settings`,`tests`)}),(0,J.jsx)(uo,{icon:Ot,label:`Test environment`,value:p?.active?`${p.active}${po(p.startUrl)?` · ${po(p.startUrl)}`:``}`:p?.names.length?`None active`:`None yet`,title:p?.names.length?`${p.names.length} environment${p.names.length===1?``:`s`}: ${p.names.join(`, `)}${p.apps.length?`. Apps: ${p.apps.join(`, `)}`:``}`:void 0,to:ia(`settings`,`environments`)}),(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":s,onClick:()=>c(!s),className:`flex cursor-pointer items-start gap-2.5 rounded-[10px] border-0 bg-transparent px-3 py-1.5 text-left hover:bg-surface-muted`,children:[(0,J.jsx)(He,{size:16,strokeWidth:1.8,"aria-hidden":`true`,className:`mt-0.5 flex-none text-muted`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`text-[12px] leading-tight text-muted`,children:`Files`}),(0,J.jsxs)(`span`,{className:`text-[13px] text-ink`,children:[r.files.filter(e=>e.exists).length,` in this project`]})]}),(0,J.jsx)(we,{size:14,"aria-hidden":`true`,className:q(`mt-1 flex-none text-muted transition-transform`,!s&&`-rotate-90`)})]}),s&&(0,J.jsx)(`ul`,{className:`m-0 mb-1 ml-9 flex list-none flex-col gap-0.5 p-0`,children:r.files.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`a`,{href:ia(`settings`,`files`),title:e.path,className:q(`flex flex-col rounded-md px-2 py-1 no-underline hover:bg-surface-muted`,!e.exists&&`opacity-60`),children:[(0,J.jsx)(`span`,{className:`text-[12px] text-muted`,children:e.label}),(0,J.jsx)(`span`,{className:`truncate font-mono text-[12px] text-ink`,children:e.path})]})},e.label))})]})]}),t?.ready&&(0,J.jsxs)(lo,{id:`usage`,title:`Context and tokens`,children:[e?.context&&(0,J.jsxs)(`div`,{className:`px-3 py-1.5`,title:e.context.compactsAt?`The agent summarises the conversation at ${Z(e.context.compactsAt)} tokens.`:void 0,children:[(0,J.jsxs)(`span`,{className:`flex items-baseline gap-2 text-[12px] text-muted`,children:[(0,J.jsx)(`span`,{className:`flex-1`,children:`This chat's context`}),(0,J.jsxs)(`span`,{className:`text-ink tabular-nums`,children:[Z(e.context.tokens),` / `,Z(e.context.limit)]})]}),(0,J.jsx)(fo,{value:e.context.tokens,max:e.context.limit,warnAt:e.context.compactsAt})]}),e?.usage&&(0,J.jsx)(uo,{icon:Je,label:`This chat`,value:(0,J.jsxs)(`span`,{className:`tabular-nums`,children:[Z(e.usage.input),` in · `,Z(e.usage.output),` out`]}),title:e.usage.cached?`${Z(e.usage.cached)} of the input came from the provider's cache.`:void 0}),(0,J.jsx)(uo,{icon:Je,label:`Today, this project`,value:(0,J.jsx)(`span`,{className:`tabular-nums`,children:d?`${Z(d.input+d.output)} tokens${a?.currency&&d.amount?` · ${Q(d.amount,a.currency)}`:``}`:`No runs yet`}),to:ia(`settings`,`tokenomics`)}),a?.spent&&a.budget?.month?(0,J.jsxs)(`div`,{className:`px-3 py-1.5`,children:[(0,J.jsxs)(`span`,{className:`flex items-baseline gap-2 text-[12px] text-muted`,children:[(0,J.jsx)(`span`,{className:`flex-1`,children:`This month`}),(0,J.jsxs)(`span`,{className:`text-ink tabular-nums`,children:[Q(a.spent.month,a.spent.currency),` / `,Q(a.budget.month,a.budget.currency||a.spent.currency)]})]}),(0,J.jsx)(fo,{value:a.spent.month,max:a.budget.month})]}):a&&(0,J.jsx)(uo,{icon:Je,label:`Last 30 days`,value:(0,J.jsxs)(`span`,{className:`tabular-nums`,children:[Z(a.totals.input+a.totals.output),` tokens`,a.currency&&a.totals.amount?` · ${Q(a.totals.amount,a.currency)}`:``]}),to:ia(`settings`,`tokenomics`)})]})]})}var ho=[{id:`chats`,label:`Chats`,icon:it},{id:`record`,label:`Record`,icon:Ee},{id:`regression`,label:`Regression`,icon:ct},{id:`api-tests`,label:`API tests`,icon:Wt},{id:`quality`,label:`Quality`,icon:Je},{id:`data`,label:`Data`,icon:Re},{id:`runs`,label:`Runs`,icon:bt},{id:`reports`,label:`Reports`,icon:Be},{id:`jobs`,label:`Jobs`,icon:be}],go=[{id:`knowledge`,label:`Knowledge`,icon:ge},{id:`memory`,label:`Memory`,icon:ve},{id:`guardrails`,label:`Guardrails`,icon:Mt},{id:`skills`,label:`Skills`,icon:Qe},{id:`prompts`,label:`Prompts`,icon:nt},{id:`features`,label:`What's ready`,icon:me}],_o=(0,f.createContext)({hidden:!1,open:()=>{},setChat:()=>{}});function vo(e){let{setChat:t}=(0,f.useContext)(_o),n=JSON.stringify(e);(0,f.useEffect)(()=>(t(e),()=>t(null)),[n,t])}var yo=`forgeqe-sidebar`,bo=()=>{try{return localStorage.getItem(yo)===`closed`}catch{return!1}};function xo({className:e}){let{hidden:t,open:n}=(0,f.useContext)(_o);return(0,J.jsx)(Y,{variant:`icon`,size:`icon`,"aria-label":`Open the sidebar`,onClick:n,className:q(t?`inline-flex`:`inline-flex md:hidden`,e),children:(0,J.jsx)(ft,{size:20,strokeWidth:1.8,"aria-hidden":`true`})})}function So(){let{hidden:e}=(0,f.useContext)(_o);return(0,J.jsxs)(`div`,{className:q(`sticky top-0 z-20 items-center gap-1 border-b border-line-soft bg-bg px-3 py-2`,e?`flex`:`flex md:hidden`),children:[(0,J.jsx)(xo,{}),(0,J.jsx)(`a`,{href:ia(),className:`ml-1 text-base font-semibold text-ink no-underline hover:text-ink`,children:`ForgeQE`})]})}function Co({item:e,current:t}){let n=t===e.id;return(0,J.jsxs)(`a`,{href:ia(e.id),"aria-current":n?`page`:void 0,className:q(`flex min-h-9 items-center gap-3 rounded-[10px] px-3 text-sm font-medium no-underline`,n?`bg-surface-strong text-ink hover:text-ink`:`text-ink-2 hover:bg-surface-strong hover:text-ink`),children:[(0,J.jsx)(e.icon,{size:18,strokeWidth:1.8,"aria-hidden":`true`,className:`flex-none`}),e.label]})}function wo({current:e,chat:t,onClose:n}){let[r,i]=(0,f.useState)([]);(0,f.useEffect)(()=>{let e=!1,t=()=>{C.state().then(t=>{e||t.ready&&T.list().then(t=>!e&&i(t.chats.slice(0,12)),()=>{})},()=>{})};return t(),window.addEventListener(`hashchange`,t),()=>{e=!0,window.removeEventListener(`hashchange`,t)}},[]);let a=r.some(e=>e.state===`busy`||e.state===`starting`);return(0,f.useEffect)(()=>{if(!a)return;let e=setInterval(()=>T.list().then(e=>i(e.chats.slice(0,12)),()=>{}),4e3);return()=>clearInterval(e)},[a]),(0,J.jsxs)(`nav`,{"aria-label":`ForgeQE`,className:`flex h-full w-[264px] flex-col gap-1 border-r border-line-soft bg-surface-muted px-3 pt-3 pb-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-1 pl-2`,children:[(0,J.jsx)(`a`,{href:ia(),className:`flex-1 text-base font-semibold text-ink no-underline hover:text-ink`,children:`ForgeQE`}),(0,J.jsx)(Y,{variant:`icon`,size:`icon`,"aria-label":`Close the sidebar`,onClick:n,children:(0,J.jsx)(ut,{size:20,strokeWidth:1.8,"aria-hidden":`true`})})]}),(0,J.jsxs)(`a`,{href:ia(),className:q(Or(),`mt-2 mb-3 justify-start gap-3 px-3`),children:[(0,J.jsx)(It,{size:18,strokeWidth:1.8,"aria-hidden":`true`}),`New chat`]}),(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto`,children:[(0,J.jsxs)(`div`,{role:`group`,"aria-labelledby":`nav-work`,className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{id:`nav-work`,className:`px-3 pb-1 text-[13px] font-medium text-muted`,children:`Work`}),ho.map(t=>(0,J.jsx)(Co,{item:t,current:e},t.id))]}),(0,J.jsxs)(`div`,{role:`group`,"aria-labelledby":`nav-knowledge`,className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{id:`nav-knowledge`,className:`px-3 pb-1 text-[13px] font-medium text-muted`,children:`Agents`}),go.map(t=>(0,J.jsx)(Co,{item:t,current:e},t.id))]}),r.length>0&&(0,J.jsxs)(`div`,{role:`group`,"aria-labelledby":`nav-recent`,className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`span`,{id:`nav-recent`,className:`px-3 pb-1 text-[13px] font-medium text-muted`,children:`Recent`}),r.map(e=>(0,J.jsxs)(`a`,{href:ia(`chats`,e.id),"aria-current":t===e.id?`page`:void 0,title:e.title,className:q(`flex min-h-9 items-center gap-2 rounded-[10px] px-3 text-sm no-underline`,t===e.id?`bg-surface-strong text-ink hover:text-ink`:`text-ink-2 hover:bg-surface-strong hover:text-ink`),children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title}),(e.state===`busy`||e.state===`starting`)&&(0,J.jsx)(Yi,{state:e.state===`busy`?`working`:`waiting`,label:`Working`,px:16})]},e.id))]})]}),(0,J.jsxs)(`div`,{className:`flex flex-none flex-col gap-0.5 border-t border-line pt-2`,children:[(0,J.jsxs)(`a`,{href:`/help/docs/user-guide.html`,target:`_blank`,rel:`noreferrer noopener`,className:`flex min-h-9 items-center gap-3 rounded-[10px] px-3 text-sm font-medium text-ink-2 no-underline hover:bg-surface-strong hover:text-ink`,children:[(0,J.jsx)(Oe,{size:18,strokeWidth:1.8,"aria-hidden":`true`,className:`flex-none`}),`Help`]}),(0,J.jsx)(Co,{item:{id:`settings`,label:`Settings`,icon:At},current:e})]})]})}function To(){let[e,t]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=()=>t(!0);return window.addEventListener(y,e),()=>window.removeEventListener(y,e)},[]),e?(0,J.jsx)(`p`,{role:`alert`,className:`mx-4 mt-4 mb-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:b}):null}function Eo({stats:e,onClose:t}){return(0,J.jsxs)(`aside`,{"aria-label":`Workspace`,className:`flex h-full w-[300px] flex-col border-l border-line-soft bg-surface-muted`,children:[(0,J.jsx)(`div`,{className:`flex justify-end px-3 pt-3`,children:(0,J.jsx)(Y,{variant:`icon`,size:`icon`,"aria-label":`Close the workspace panel`,onClick:t,children:(0,J.jsx)(mt,{size:20,strokeWidth:1.8,"aria-hidden":`true`})})}),(0,J.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pt-1 pb-3`,children:(0,J.jsx)(mo,{chat:e})})]})}var Do=`forgeqe-workspace-panel`,Oo=()=>{try{return localStorage.getItem(Do)!==`closed`}catch{return!0}};function ko({current:e,chat:t,children:n}){let[r,i]=(0,f.useState)(bo),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(!1),[l,u]=(0,f.useState)(Oo),[d,p]=(0,f.useState)(!1),m=()=>window.matchMedia(`(min-width: 1280px)`).matches,h=e=>{u(e);try{localStorage.setItem(Do,e?`open`:`closed`)}catch{}};(0,f.useEffect)(()=>{if(!d)return;let e=()=>p(!1),t=t=>t.key===`Escape`&&e();return window.addEventListener(`hashchange`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`hashchange`,e),window.removeEventListener(`keydown`,t)}},[d]);let g=e=>{i(e);try{localStorage.setItem(yo,e?`closed`:`open`)}catch{}};(0,f.useEffect)(()=>{if(!s)return;let e=()=>c(!1),t=t=>t.key===`Escape`&&e();return window.addEventListener(`hashchange`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`hashchange`,e),window.removeEventListener(`keydown`,t)}},[s]);let _=()=>window.matchMedia(`(min-width: 768px)`).matches;return(0,J.jsx)(_o.Provider,{value:{hidden:r,open:()=>_()?g(!1):c(!0),setChat:o},children:(0,J.jsxs)(`div`,{className:`flex min-h-screen bg-bg`,children:[(0,J.jsx)(`aside`,{className:q(`sticky top-0 h-screen flex-none`,r?`hidden`:`hidden md:block`),children:(0,J.jsx)(wo,{current:e,chat:t,onClose:()=>g(!0)})}),s&&(0,J.jsxs)(`div`,{className:`fixed inset-0 z-40 md:hidden`,children:[(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 bg-[rgba(17,25,40,0.28)]`,onClick:()=>c(!1)}),(0,J.jsx)(`aside`,{className:`fade-in absolute inset-y-0 left-0 max-w-[85vw] shadow-menu`,children:(0,J.jsx)(wo,{current:e,chat:t,onClose:()=>c(!1)})})]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`div`,{"aria-hidden":`true`,className:q(`h-4 flex-none`,r?`hidden`:`hidden md:block`,l&&`xl:hidden`)}),(0,J.jsx)(To,{}),n,(0,J.jsx)(Y,{variant:`icon`,size:`icon`,"aria-label":`Show the workspace panel`,onClick:()=>m()?h(!0):p(!0),className:q(`fixed top-3 right-3 z-30 bg-bg/80`,l&&`xl:hidden`),children:(0,J.jsx)(gt,{size:20,strokeWidth:1.8,"aria-hidden":`true`})})]}),(0,J.jsx)(`div`,{className:q(`sticky top-0 h-screen flex-none`,l?`hidden xl:block`:`hidden`),children:(0,J.jsx)(Eo,{stats:a,onClose:()=>h(!1)})}),d&&(0,J.jsxs)(`div`,{className:`fixed inset-0 z-40 xl:hidden`,children:[(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 bg-[rgba(17,25,40,0.28)]`,onClick:()=>p(!1)}),(0,J.jsx)(`div`,{className:`fade-in absolute inset-y-0 right-0 max-w-[85vw] shadow-menu`,children:(0,J.jsx)(Eo,{stats:a,onClose:()=>p(!1)})})]})]})})}var Ao={pass:`bg-pass-soft text-pass`,fail:`bg-fail-soft text-fail`,warn:`bg-warn-soft text-warn`,running:`bg-accent-soft text-accent`,neutral:`bg-surface-strong text-ink-2`},jo={pass:Se,fail:Jt,warn:Bt};function Mo({tone:e,children:t,className:n,icon:r=!0,orb:i=`working`}){let a=r?jo[e]:void 0,o=r&&e===`running`;return(0,J.jsxs)(`span`,{className:q(`inline-flex min-h-6 items-center gap-1 rounded-full px-2.5 text-xs font-medium whitespace-nowrap`,(a||o)&&`pl-1.5`,Ao[e],n),children:[o&&(0,J.jsx)(Yi,{state:i,px:16}),a&&(0,J.jsx)(a,{size:12,strokeWidth:2.5,"aria-hidden":`true`,className:`flex-none`}),t]})}export{Bt as $,s as $t,da as A,me as At,ea as B,k as Bt,Sa as C,Oe as Ct,va as D,be as Dt,fa as E,Se as Et,ia as F,N as Ft,Y as G,F as Gt,$i as H,M as Ht,ra as I,T as It,q as J,C as Jt,Or as K,O as Kt,ta as L,re as Lt,oa as M,x as Mt,ca as N,I as Nt,ma as O,ve as Ot,sa as P,ee as Pt,Wt as Q,o as Qt,Zi as R,ie as Rt,Ta as S,Ae as St,ya as T,we as Tt,Yi as U,ne as Ut,na as V,E as Vt,kr as W,j as Wt,Jt as X,_ as Xt,Tr as Y,g as Yt,Kt as Z,d as Zt,Z as _,He as _t,vo as a,Et as at,Ma as b,Pe as bt,qa as c,bt as ct,Wa as d,nt as dt,l as en,Rt as et,$ as f,Qe as ft,Q as g,We as gt,oo as h,Ke as ht,ko as i,Ot as it,ua as j,H as jt,pa as k,ge as kt,Ga as l,ct as lt,za as m,Je as mt,xo as n,Mt as nt,$a as o,wt as ot,Qa as p,Xe as pt,Dr as q,A as qt,So as r,At as rt,Ba as s,St as st,Mo as t,Pt as tt,Ka as u,it as ut,Na as v,Be as vt,xa as w,Ee as wt,Ea as x,Me as xt,Aa as y,Re as yt,Xi as z,te as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as e}from"./status-CL_clA0J.js";var t={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as e}from"./status-CL_clA0J.js";var t={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};t.node;var n=e(t),r={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as e}from"./status-CL_clA0J.js";var t={name:`timer`,size:24,node:[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 106 56" width="212" height="112" role="img" aria-label="trace"><g><path d="M1 45L5 41L15 41L11 45Z" fill="#a1ced9"/><path d="M11 45L15 41L15 51L11 55Z" fill="#4e7e89"/><rect x="1" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M21 45L25 41L35 41L31 45Z" fill="#a1ced9"/><rect x="21" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M31 45L35 41L45 41L41 45Z" fill="#a1ced9"/><rect x="31" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M41 45L45 41L55 41L51 45Z" fill="#a1ced9"/><rect x="41" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M51 45L55 41L65 41L61 45Z" fill="#a1ced9"/><rect x="51" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M61 45L65 41L75 41L71 45Z" fill="#a1ced9"/><rect x="61" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M71 45L75 41L85 41L81 45Z" fill="#a1ced9"/><rect x="71" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M81 45L85 41L95 41L91 45Z" fill="#a1ced9"/><rect x="81" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M91 45L95 41L105 41L101 45Z" fill="#a1ced9"/><path d="M101 45L105 41L105 51L101 55Z" fill="#4e7e89"/><rect x="91" y="45" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M1 25L5 21L15 21L11 25Z" fill="#a1ced9"/><path d="M11 25L15 21L15 31L11 35Z" fill="#4e7e89"/><rect x="1" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M21 25L25 21L35 21L31 25Z" fill="#a1ced9"/><rect x="21" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M31 25L35 21L45 21L41 25Z" fill="#a1ced9"/><rect x="31" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M41 25L45 21L55 21L51 25Z" fill="#a1ced9"/><rect x="41" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M51 25L55 21L65 21L61 25Z" fill="#a1ced9"/><rect x="51" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M61 25L65 21L75 21L71 25Z" fill="#a1ced9"/><rect x="61" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M71 25L75 21L85 21L81 25Z" fill="#a1ced9"/><rect x="71" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M81 25L85 21L95 21L91 25Z" fill="#a1ced9"/><rect x="81" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M91 25L95 21L105 21L101 25Z" fill="#a1ced9"/><path d="M101 25L105 21L105 31L101 35Z" fill="#4e7e89"/><rect x="91" y="25" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#a1ced9"/><path d="M11 5L15 1L15 11L11 15Z" fill="#4e7e89"/><rect x="1" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#a1ced9"/><rect x="21" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#a1ced9"/><rect x="31" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#a1ced9"/><rect x="41" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M51 5L55 1L65 1L61 5Z" fill="#a1ced9"/><rect x="51" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M61 5L65 1L75 1L71 5Z" fill="#a1ced9"/><rect x="61" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M71 5L75 1L85 1L81 5Z" fill="#a1ced9"/><rect x="71" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M81 5L85 1L95 1L91 5Z" fill="#a1ced9"/><rect x="81" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g><g><path d="M91 5L95 1L105 1L101 5Z" fill="#a1ced9"/><path d="M101 5L105 1L105 11L101 15Z" fill="#4e7e89"/><rect x="91" y="5" width="10" height="10" fill="#6fb4c4" stroke="#69abba" stroke-width=".25"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as e}from"./status-CL_clA0J.js";var t={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="referrer" content="no-referrer" />
|
|
7
|
+
<title>ForgeQE</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Bkx3fVbr.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/status-CL_clA0J.js">
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DSEYuBEd.css">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div id="root"></div>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -39,7 +39,8 @@ Copied from test-agent-nexus and trimmed to what a CLI run needs:
|
|
|
39
39
|
| `summary.py` | nexus browser service | Result markdown (the agent's own final answer and the checks it recorded; no filtering of what it read), fallback summaries, failure trace and screenshot, the judge's verdict |
|
|
40
40
|
| `workflow_yaml.py` | `browser_workflow_yaml.py` | `forgeqe-v2-compact` steps from history (or the live trace after a stop), semantic locators, execution metadata |
|
|
41
41
|
| `cli.py` | new | The stdin/stdout protocol above |
|
|
42
|
-
| `memory.py` | new | Page memory: element facts from the engine library's DOM, ranked locators with confidence, element identity across visits, recorded flows, prompt hints |
|
|
42
|
+
| `memory.py` | new | Page memory: element facts from the engine library's DOM, ranked locators with confidence, element identity across visits, recorded flows, prompt hints. Locators follow Playwright: `playwright_role_ok` (no link role for an `<a>` without `href`), `strip_icons` (icon-font characters out of names and text; such a name becomes a `role_pattern`), a `scope` (the nearest ancestor id) for a css locator scoped to a repeating item, and the `frame` an element sits in |
|
|
43
|
+
| `userlike.py` | new | The agent clicks as a user can: the library's occlusion check raises `Covered` with what covers the element instead of clicking it from JavaScript, and script clicks (`this.click()` through `Runtime.callFunctionOn`) and page typing (`_type_to_page`) it still makes are recorded. `install_effects` puts `take()` on each action; `_record_memory_results` keeps `covered_by` for the click that then worked, and `bypass` and `frame` on the step |
|
|
43
44
|
| `replay.py` | new | Replays a recorded flow through the engine library's `Tools` and writes the hand-off task for the agent |
|
|
44
45
|
| `logins.py` | new | Saved logins: the engine library's `sensitive_data` per domain, TOTP codes, session files (load, split by host, save when changed), and the interactive `login` command |
|
|
45
46
|
| `report.py` | new | `CaseReport` (per-step verdicts through the engine library's `output_model_schema`) and `steps.json` with step screenshots |
|
|
@@ -218,8 +219,10 @@ run dir ──► handoff.ts ──► handoff.md ──► Scribe session (forg
|
|
|
218
219
|
| `review.ts` | The `forgeqe-review` agent: prompt, `REVIEW_SCHEMA` (`approved`, `summary`, `issues[{file, problem, fix}]`), and `openReviewer`, a second, read-only Scribe session opened on the first passing run and kept for later attempts. `reviewPrompt` inlines the checks from the handoff and the changed files (`changedFiles`: up to 12 KB each, 40 KB in all), so the reviewer reads nothing again. It may load Scribe's skills and judges the test against their conventions too |
|
|
219
220
|
| `runtime.ts` | Maps the `llms.json` profile to an agent runtime provider, builds the config, starts the agent runtime server, and drives one session over the SDK. With `resume`, `openSession` reopens that session with `session.get` (the runtime keeps sessions on disk, so their messages survive a restart) and sets `resumed`; when it is gone, a new one is created. `FailedCommands` counts each exact shell command the agent runs that exits non-zero; at `stallAfter` failures of one command the turn is aborted and `prompt()` returns `stalled` (`command`, `count`, the last 40 lines of output). `resetStall()` clears the counts `READ_AGENT` (`forgeqe-read`) has the test agent's instructions with `edit` and `live_*` denied; the config builder takes it in `agents`, and a prompt picks it with `agent`. `PromptOptions` also carries `structured` (off: no JSON answer) and `tools` (per-prompt switches, used only for `live_*`: the agent runtime keeps them for later prompts, and `true` would override the agent's path rules for file tools) |
|
|
220
221
|
| `livebrowser.ts` | `liveBrowser(runDir)`: the `live` MCP server for the agent, Microsoft's Playwright MCP (`npx -y @playwright/mcp@0.0.83 --config …`), with a config written to `<run>/live-browser/config.json` from `run.json` `browser` (channel or executable, headless, viewport, locale, time zone, user agent) and snapshots and screenshots saved in that folder. `null` without `npx`. The loop switches its tools (`live_*`) on per prompt once a step fails |
|
|
222
|
+
| `pagefacts.ts` | What a step met that a test handles differently: `frameSelector` for a step's frame, `isAdStep` (an ad host's frame, or `#google_vignette`), and `AD_HOSTS` / `AD_ROUTE` for blocking them. `handoff.ts` renders `covered_by`, `bypass` and `frame` under each step and adds "What covered the page before a click", "Ads on these pages", and "State the run started with" (from `run.json` `sessions_restored`); `replay.ts` skips ad steps and reaches frame steps through `frameLocator` |
|
|
221
223
|
| `replay.ts` | The replay check. `replayScript(steps)` turns `workflow.yaml` into `flow.mjs`, one `step(n, action, run)` per recorded step, with each locator rebuilt from its type and value (`locatorExpr`), text typed with `pressSequentially`, secrets read with `env(NAME)` and one-time codes made with `totp(NAME)`; actions with no Playwright equivalent are marked "not replayed". `alternatives.mjs` holds each step's other locators. `ensurePlaywright` installs `playwright-core` (`PLAYWRIGHT_VERSION`) with Bun into `~/.forgeqe/tools` and removes older versions. `replayRun` writes a runner that launches the run's browser (`replayOptions`: channel or executable, headless, viewport, locale, time zone, user agent, extra headers), runs each step with a 10 s timeout, keeps an aria snapshot of each page after each step that worked (by host and path, the latest one; the final page's taken once two snapshots a second apart agree, up to 6 s, since a page can change its URL at once and re-render later) and writes them as `<setup>-page-N.aria.yml` in `ReplayPass.pages`, and on a failure saves a screenshot and an aria snapshot, counts the other locators' matches, and records console errors, failed requests, and HTTP errors; three failures in a row stop it. It runs under Bun with the session logins' env, 180 s per pass. The first pass uses Playwright's default launch; if it does not reach the run's final page (host and path), a second pass leaves out `--enable-automation` and adds `--disable-blink-features=AutomationControlled`. `replaySection` renders the handoff section (the page snapshots listed; a pass whose failed steps were followed by steps that all worked and that reached the final page, `reachedPastFailures`, reads as a working script with those steps to judge, and `replayFailed` is false for it so the live browser stays off): each pass, the failed steps with Playwright's reason, the page, the open dialogs from the snapshot, the other locators' matches, and the saved files, and the launch settings to copy when only the second pass got through. After the last step the runner looks up each recorded check on the page (`findCheck`: a visible exact heading, then exact text, then a looser heading or text, then a form field holding the value) and returns its locator, match count, and up to 3 containers in `ReplayPass.checks`; for a heading match, `sectionOf` adds `section` (the element `aria-labelledby` the heading, else the `section`/`article`/region it heads, else the element after it or after its only-child wrapper) with a stable locator (test id, id, or `aria-label`, else empty) and its visible link and list item counts |
|
|
222
224
|
| `testrun.ts` | Runs the reported command with `sh -c` in the repo (`CI=1`, `PLAYWRIGHT_HTML_OPEN=never`, no colour), with a timeout. `promptOutput` makes the prompt's copy of a failed run: `withoutPageDumps` takes out each "Aria snapshot:" block Playwright puts in a failed assertion, then `headAndTail` keeps the first 8 KB and the last 4 KB; the full output goes to `<run>/test-runs/attempt-N.log` and the first page dump to `attempt-N-page.aria.yml`. While it runs it samples the process tree (`ps -A -o pid=,ppid=,args=` every 250 ms; `Win32_Process` every 1.5 s on Windows) for browsers at or below the command that carry an automation switch (`--remote-debugging-pipe`, `--remote-debugging-port`, `-juggler-pipe`, `--inspector-pipe`, `-marionette`) and returns them as `browsers` |
|
|
225
|
+
| `loop.ts` (retries) | Each failed attempt (a failed run, a run that opened no browser, a rejected review) adds a `Tried` entry: Scribe's `tried` items from its result (else its notes), the failure, and `failureFacts` of the output (the last "waiting for" locator of Playwright's call log, and the element that "intercepts pointer events"), with `again` when an earlier entry failed on the same locator. `nextAttemptPrompt` renders them with `triedSection`; `runHeal` keeps the same list from each test's `reason` and passes it to `healNextPrompt`. The attempt log, and so `scribe-mistakes.jsonl`, uses the `tried` items too |
|
|
223
226
|
| `notes.ts` | `scribe-notes.json` in `memory.dir`: per repository, the reading turn's notes (`saveNotes`), when they were written, and up to 15 tests jobs wrote there (`addWrittenTest` on approval). `readNotes` returns nothing past 30 days; `notesSection` renders them for the first prompt |
|
|
224
227
|
| `worktree.ts` | The working tree before the job (`git status --porcelain -uall` with a hash of each file, and a copy of each file up to 5 MB, plus ForgeQE's `forgeqe.yaml` and `llms.json`); the paths the job changed since then; putting back files the job deleted or uncommitted edits it reverted to the committed version; and the protected paths in the form the agent runtime matches them |
|
|
225
228
|
| `loop.ts` | The attempt loop, stop handling, the replay (`code.replay`, on by default in `forgeqe.yaml`: `replayRun` runs while Scribe reads the repo, then the handoff is rebuilt with the replay and the result goes to `code.json` `replay`; skipped when `canReplay` finds no step beyond navigation and no checks), the reading turn (`READ_AGENT`, no structured answer, with or without a replay; skipped when `readNotes` has notes for the repo, which go into the first prompt instead; its reply is saved as the notes), the live browser (`code.live_browser`, on by default in `forgeqe.yaml`; its tools are off until the replay or a test run fails, a stall, a no-browser run, or a blocked report, and the prompt that switches them on says so), the stall guard (`code.stall_after`, default 5; counts reset after each ForgeQE test run), `code.json` (the run folder is recreated if it is gone, and a failed write is reported without changing the result), and resuming: `scribe-session.json` in the run folder (session id, repo, stage `reading`/`writing`, whether the live browser is on) is written when the session opens and updated as the job goes, and removed when the job ends with a result; after a stop, a crash, or a `ProviderAuthError`/`APIError` it stays, and a rerun for the same run and repo passes it as `openSession`'s `resume`. A reopened session skips the reading turn, takes `savedReplay` when the replay finished, and starts with `carryOnPrompt` (or `RESUMED_NOTE` plus the first prompt when it was still reading) |
|
package/docs/user-guide.html
CHANGED
|
@@ -1282,6 +1282,7 @@ forgeqe suite cases.yaml --no-code --no-write-back --out .forgeqe/reports/smoke
|
|
|
1282
1282
|
<pre><code class="language-yaml">suite:
|
|
1283
1283
|
parallel: 1 # browsers at once
|
|
1284
1284
|
code: true # with a repo set, passed cases go to Scribe
|
|
1285
|
+
restore_sessions: false # true: each case starts signed in from the saved logins' sessions
|
|
1285
1286
|
out_dir: ./.forgeqe/reports/suites
|
|
1286
1287
|
</code></pre>
|
|
1287
1288
|
<p>Browser runs happen <code>parallel</code> at a time and share page memory safely. Each passed case goes to the coding agent as soon as its own browser run ends, and its test is written and run before that browser slot starts the next case: explore, hand off, code, next case. Coding jobs run one after another, so two never edit the repo at once. A case with no test says why in the report (it failed, or no model is set up). With <code>--parallel</code> above 1, each line of output starts with the case id. Ctrl-C stops the suite: cases already running finish closing their browsers, and cases that never started are reported as not run.</p>
|
|
@@ -3957,9 +3958,16 @@ forgeqe run "..." --no-code # no tests
|
|
|
3957
3958
|
</table></div>
|
|
3958
3959
|
<p>A card says which it did and why (<em>Extending PracticeTests.Flow · covers 12 of 15; only 3 are missing</em>). Say how when you know ("extend the login test", "write a separate test", "update it") and ForgeQE's agent passes that on without asking. In every mode Scribe adds page-object members rather than changing what an existing member does for the other tests that use it.</p>
|
|
3959
3960
|
<p><strong>The same flow asked again.</strong> When a session writes tests and you ask for a flow an earlier job already wrote a test for, ForgeQE runs that test first, before any browser run. If it passes in a real browser, that is the answer: no browser run, no Scribe, and no new test file, in the seconds the test takes (<em>✓ Existing test passed · 19s · no browser run or new test needed</em>). If it fails, the flow runs in the browser and Scribe updates that test instead of writing another. ForgeQE's agent rewords a goal a little each time, so goals count as the same flow when they share their content words (endings, case, and phrasing aside) and the new goal keeps everything the earlier one checked; the same steps with a different final check, a shorter flow, or another site are a new flow. The agent also compares the earlier goal with your request and runs fresh when you ask for a check the earlier test does not have. Ask for "a fresh run" or "a new test" to skip the reuse.</p>
|
|
3960
|
-
<p><strong>
|
|
3961
|
+
<p><strong>The run as a test would do it.</strong> The browser agent works through the same page a test meets, and the handoff tells Scribe everything it did on the way:</p>
|
|
3962
|
+
<ul>
|
|
3963
|
+
<li>A click on an element something covers (a confirmation after Add to cart, a pop-up) fails and names what covers it, so the agent closes it as a user would and that step is in the flow; the step after says what covered it, and "What covered the page before a click" lists them. The engine library would otherwise click the element from JavaScript, which a test cannot do. What it still does from a script (a click, typing to the page) is named on its step.</li>
|
|
3964
|
+
<li>Locators are the ones Playwright finds: no link role for an <code><a></code> without <code>href</code> (Chrome calls it a link, Playwright does not), icon-font characters kept out of names (a name with one becomes a <code>role_pattern</code>), and a control that repeats on every row or card gets a locator scoped to its row (<code>#product-1 a.cart_quantity_delete</code>).</li>
|
|
3965
|
+
<li>An element in a frame says which frame, and the replay reaches it through <code>frameLocator</code>. Advertisements (Google's full-page ads, ad frames) are marked, left out of the replay, and "Ads on these pages" says to block the ad hosts in the test instead of closing them.</li>
|
|
3966
|
+
<li>A suite case runs from the state its test starts from: without the saved logins' sessions, so the agent signs in as the test will (<code>suite.restore_sessions: true</code> keeps them; a login with no username and password to sign in with keeps its session, the only way in) and from the case's own start page (its URL, first step, description, or preconditions). When a run did start with saved sessions, "State the run started with" says so.</li>
|
|
3967
|
+
</ul>
|
|
3968
|
+
<p><strong>When the flow cannot be reproduced.</strong> If ForgeQE's own replay of the run could not reach the run's final page and Scribe's test fails too, Scribe is told where the replay stopped and what was open on the page, since that is usually a pop-up, consent banner or ad the browser agent closed, or state its browser already had (signed in, items in a cart), and gets another attempt to handle it. The job stops, saying which replayed step failed and why, only when the test then fails the same way again, instead of spending its remaining attempts on a flow no script can repeat as recorded.</p>
|
|
3961
3969
|
<p><strong>Why a test failed.</strong> When ForgeQE's run of Scribe's test fails, the ✗ line and the next attempt say why in the test's own words: dotnet test's Error Message, pytest's <code>E</code> lines, or the error with its Expected and Received values (Playwright, Jest, JUnit), not the runner's summary line.</p>
|
|
3962
|
-
<p><strong>Keeping Scribe's cost down.</strong> ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. <code>code.max_attempts</code> (default 3) and <code>code.max_tokens</code> (default 1,500,000; <code>0</code> turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in <code>max_attempts</code>) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (<code>code.tidy: false</code> skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, and it does not send a page snapshot after every click or keystroke. <code>code.max_steps</code> (default 50) caps the tool calls in one of Scribe's turns. <code>code.review_profile</code> runs the reviewer on a cheaper llms.json profile.</p>
|
|
3970
|
+
<p><strong>Keeping Scribe's cost down.</strong> ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. The summary has a "Tried already, and did not work" list: for each failed attempt, what Scribe said it did (it reports each change in <code>tried</code>), how it failed, the locator the test was waiting for and the element that covered it and took the click, both read from the test's output, and whether an earlier attempt already failed on that locator. Scribe must not try those again in the same form and must say what it does differently. <code>forgeqe heal</code> keeps the same list across its attempts. <code>code.max_attempts</code> (default 3) and <code>code.max_tokens</code> (default 1,500,000; <code>0</code> turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in <code>max_attempts</code>) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (<code>code.tidy: false</code> skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. When a test passed and the reviewer sent it back, and the changes for the review then break it (or the attempts or the token budget run out first), ForgeQE puts back the version that passed: the result is passed but not approved, with the reviewer's issues in the notes, so you get a working test to finish instead of none. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, and it does not send a page snapshot after every click or keystroke. <code>code.max_steps</code> (default 50) caps the tool calls in one of Scribe's turns. <code>code.review_profile</code> runs the reviewer on a cheaper llms.json profile.</p>
|
|
3963
3971
|
<p><strong>Scribe's rulebook: the same mistake once.</strong> When a job passes after a failed test run or a reviewer's change, Scribe's report gives up to three one-line rules that would have avoided the mistake ("Wait for the cart badge with toHaveText before clicking Checkout; it updates after a request"). ForgeQE keeps them in <code>.forgeqe/scribe-rules.json</code> in the repository, and every attempt of later jobs, and every healing session, starts with them. A lesson from a job that did not pass, or that passed at once, is not kept: only a fix that worked becomes a rule. The book stays small, since it is sent with each model call: at most 15 rules of one line each; a lesson learned again is merged into its rule (shown as "learned 3 times") instead of added; when it is full, the rule confirmed least and longest ago goes, and a rule not learned again for 180 days expires. The rules are the coding agent's own words, so a rule with a link, something like a token, a destructive command, or wording that tells an agent to drop its instructions is refused, and the agents are told they are hints that never override their instructions or the team's guardrails. Commit the file to share the rules with the team and see each change in review; edit or delete a rule there (the agents cannot change <code>.forgeqe</code>). ForgeQE says each new rule as it learns it (<code>Learned for next time: …</code>). <code>code.rulebook: false</code> turns it off.</p>
|
|
3964
3972
|
</div>
|
|
3965
3973
|
</section>
|
package/forgeqe.example.yaml
CHANGED
|
@@ -44,6 +44,12 @@ environments:
|
|
|
44
44
|
# secrets: [COURIER_PASSWORD] # the only environment variables {{secret:…}} may read
|
|
45
45
|
# heal: true
|
|
46
46
|
|
|
47
|
+
# Windows desktop apps: the apps themselves are in env.yaml (kind: desktop). See docs/DESKTOP.md.
|
|
48
|
+
# desktop:
|
|
49
|
+
# secrets: [BILLING_PASSWORD] # the only environment variables {{secret:…}} may read
|
|
50
|
+
# heal: true # replay asks the model to re-find a control that moved
|
|
51
|
+
# screenshots: true # one screenshot per replayed step
|
|
52
|
+
|
|
47
53
|
# Services for test runs in Docker or Podman (a database, a queue, the API under test), and the mocks' image. ForgeQE
|
|
48
54
|
# starts only what is declared here, with ports on 127.0.0.1 and read-only mounts. See docs/CONTAINERS.md.
|
|
49
55
|
# containers:
|
|
@@ -315,8 +321,39 @@ sources:
|
|
|
315
321
|
suite:
|
|
316
322
|
parallel: 1 # browsers at once; coding jobs always run one at a time
|
|
317
323
|
code: true # with a repo set, passed cases get a test from Scribe
|
|
324
|
+
restore_sessions: false # true: each case starts signed in from the saved logins' sessions; false runs it as its test starts
|
|
325
|
+
# case_check: warn # before a run: warn (show the findings, run every case), block (leave out the cases that cannot run as written), off
|
|
318
326
|
# out_dir: ./.forgeqe/reports/suites
|
|
319
327
|
|
|
328
|
+
# Flaky tests: a failed test runs again in the same run; quarantine keeps a flaky one running without failing CI.
|
|
329
|
+
# flaky:
|
|
330
|
+
# retries: 1 # runs of a failed test in the same run (0 to 3)
|
|
331
|
+
# quarantine: suggest # suggest (the agent asks), auto (ForgeQE quarantines), off (history only)
|
|
332
|
+
# flaky_after: 2 # flakiness score from which a test counts as flaky
|
|
333
|
+
|
|
334
|
+
# Release readiness (GO / GO WITH RISKS / NO-GO) thresholds.
|
|
335
|
+
# release:
|
|
336
|
+
# max_critical: 0 # open severity-1 bugs allowed
|
|
337
|
+
# max_high: 0 # open severity-2 bugs allowed
|
|
338
|
+
# min_pass_rate: 95 # percent of executed test cases that must pass
|
|
339
|
+
# require_tests: true # a story without a test case is a risk
|
|
340
|
+
|
|
341
|
+
# Regression packs run in a CI pipeline (forgeqe pack run <name> --on pipeline).
|
|
342
|
+
# packs:
|
|
343
|
+
# pipeline:
|
|
344
|
+
# default: github # github | azure_devops
|
|
345
|
+
# github: { repo: acme/shop-tests, workflow: forgeqe-pack.yml, ref: main }
|
|
346
|
+
# azure_devops: { project: Shop, pipeline_id: 42, ref: refs/heads/main }
|
|
347
|
+
# timeout_minutes: 60
|
|
348
|
+
|
|
349
|
+
# A search service over your requirements (Confluence, a wiki, specs), for checking test cases against them.
|
|
350
|
+
# rag:
|
|
351
|
+
# url: http://localhost:8080/search # POST {"query", "top_k"}; answers a list of {text, source, score}
|
|
352
|
+
# # command: [python, rag/search.py] # or a local command: the query on stdin, the list on stdout
|
|
353
|
+
# token_env: RAG_TOKEN # optional, sent as a bearer token
|
|
354
|
+
# top_k: 5
|
|
355
|
+
# timeout_seconds: 20
|
|
356
|
+
|
|
320
357
|
# Accessibility (axe-core, WCAG) and performance (Core Web Vitals) of every page a run visits. Without budgets they
|
|
321
358
|
# are reported and tracked over time; a run fails on them only when a budget below is exceeded.
|
|
322
359
|
# quality:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capagents/forgeqe",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"bin": {
|
|
13
|
-
"forgeqe": "bin/forgeqe.js"
|
|
14
|
-
"webpilot": "bin/forgeqe.js"
|
|
13
|
+
"forgeqe": "bin/forgeqe.js"
|
|
15
14
|
},
|
|
16
15
|
"files": [
|
|
17
16
|
"bin/",
|
|
@@ -48,6 +47,7 @@
|
|
|
48
47
|
"test:release": "bun scripts/release-tests.ts",
|
|
49
48
|
"typecheck": "tsc --noEmit",
|
|
50
49
|
"build:report": "cd report-ui && npm install --no-audit --no-fund && npm run build && cp dist/index.html ../src/report/template.html",
|
|
50
|
+
"build:web": "cd web && npm install --no-audit --no-fund && npm run build",
|
|
51
51
|
"build": "bun scripts/build.ts",
|
|
52
52
|
"notices": "bun scripts/gen-notices.ts",
|
|
53
53
|
"prepack": "bun scripts/build.ts && bun scripts/gen-notices.ts",
|
package/prompts/test-agent.md
CHANGED
|
@@ -33,6 +33,7 @@ Move a verified browser flow into a test that fits this repository, so that it p
|
|
|
33
33
|
2. Write the test from the path of the handoff: its steps in sequence, with their locators and waits.
|
|
34
34
|
3. Reply with the command. ForgeQE runs it, and sends you the failure message when it fails. The full output is in a file.
|
|
35
35
|
4. To correct a failure, first use what ForgeQE sends: the failing element on both pages, and the saved snapshot.
|
|
36
|
+
When your message lists approaches that failed in earlier tries, you MUST NOT use them again in the same form. Use a different approach to that step.
|
|
36
37
|
5. When the live_browser_* tools are on, use them on the failing step before you change code: navigate, snapshot, click, type, press_key, select_option, take_screenshot, console_messages, and network_requests.
|
|
37
38
|
6. Without these tools, you MAY examine the failing step with a short scratch script in the framework of the repository. Delete it when you finish.
|
|
38
39
|
**Stop when**: the test is ready to run and passes, or a blocker stops you.
|
|
@@ -84,3 +85,4 @@ The structured result:
|
|
|
84
85
|
- The test file.
|
|
85
86
|
- The command that runs only this test from the repository root, with no prompts and no watch mode.
|
|
86
87
|
- What you used again, what you changed, and short notes.
|
|
88
|
+
- tried: what you did this time to make the test pass or to answer the review, one item for each change. Give the element and the locator, wait, or pop-up handling that you used.
|