@jait/gateway 0.1.371 → 0.1.372

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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/web-dist/assets/{_basePickBy-C3axlzkk.js → _basePickBy-Bz8o8KEa.js} +1 -1
  3. package/web-dist/assets/{_baseUniq-DDR_yQAg.js → _baseUniq-CKquSyt6.js} +1 -1
  4. package/web-dist/assets/{arc-BEiKuuWm.js → arc-eJ222fob.js} +1 -1
  5. package/web-dist/assets/{architectureDiagram-2XIMDMQ5-Cw-NjNKo.js → architectureDiagram-2XIMDMQ5-CtojB01Z.js} +1 -1
  6. package/web-dist/assets/{blockDiagram-WCTKOSBZ-BKxd3Ooj.js → blockDiagram-WCTKOSBZ-BH0BuRpG.js} +1 -1
  7. package/web-dist/assets/{c4Diagram-IC4MRINW-CbJwdugY.js → c4Diagram-IC4MRINW-DAsf-mfs.js} +1 -1
  8. package/web-dist/assets/channel-CvTCoZV4.js +1 -0
  9. package/web-dist/assets/{chunk-4BX2VUAB-Bmj_hkUU.js → chunk-4BX2VUAB-2QD6o8sy.js} +1 -1
  10. package/web-dist/assets/{chunk-55IACEB6-WdDbxt-j.js → chunk-55IACEB6-BiI92_dD.js} +1 -1
  11. package/web-dist/assets/{chunk-FMBD7UC4-BQwo53XZ.js → chunk-FMBD7UC4-CdkmzGqF.js} +1 -1
  12. package/web-dist/assets/{chunk-JSJVCQXG-Cw4A-HE1.js → chunk-JSJVCQXG-Dx0e4kbC.js} +1 -1
  13. package/web-dist/assets/{chunk-KX2RTZJC-9kiV-xrA.js → chunk-KX2RTZJC-owWiSGGM.js} +1 -1
  14. package/web-dist/assets/{chunk-NQ4KR5QH-BSn_1CZD.js → chunk-NQ4KR5QH-BWXjhRK4.js} +1 -1
  15. package/web-dist/assets/{chunk-QZHKN3VN-COF5dPlJ.js → chunk-QZHKN3VN-BI7vD52S.js} +1 -1
  16. package/web-dist/assets/{chunk-WL4C6EOR-D5fyhr1r.js → chunk-WL4C6EOR-BwVCRyEo.js} +1 -1
  17. package/web-dist/assets/classDiagram-VBA2DB6C-BifiH1ZA.js +1 -0
  18. package/web-dist/assets/classDiagram-v2-RAHNMMFH-BifiH1ZA.js +1 -0
  19. package/web-dist/assets/clone-V5wxeYq5.js +1 -0
  20. package/web-dist/assets/{cose-bilkent-S5V4N54A-CALsjz5o.js → cose-bilkent-S5V4N54A-CXholsmC.js} +1 -1
  21. package/web-dist/assets/{dagre-KLK3FWXG-Cq8z3ow9.js → dagre-KLK3FWXG-BXJ4DKqW.js} +1 -1
  22. package/web-dist/assets/{diagram-E7M64L7V-Dg3bdak8.js → diagram-E7M64L7V-W-C1TADn.js} +1 -1
  23. package/web-dist/assets/{diagram-IFDJBPK2-DFyKhP2X.js → diagram-IFDJBPK2-i7mEwhNk.js} +1 -1
  24. package/web-dist/assets/{diagram-P4PSJMXO-U6XQer8U.js → diagram-P4PSJMXO-CdmiX24Q.js} +1 -1
  25. package/web-dist/assets/{erDiagram-INFDFZHY-BAueFxUI.js → erDiagram-INFDFZHY-CbC8dvkE.js} +1 -1
  26. package/web-dist/assets/{flowDiagram-PKNHOUZH-CL9Uh8Ca.js → flowDiagram-PKNHOUZH-DTMhxds-.js} +1 -1
  27. package/web-dist/assets/{ganttDiagram-A5KZAMGK-VBu7-6DS.js → ganttDiagram-A5KZAMGK-tGsvg2KY.js} +1 -1
  28. package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-e3-ha6pZ.js → gitGraphDiagram-K3NZZRJ6-DVrdA4by.js} +1 -1
  29. package/web-dist/assets/{graph-DAjVcUGc.js → graph-beGcURtb.js} +1 -1
  30. package/web-dist/assets/{index-DFUZbJNo.js → index-N12m6lEF.js} +4 -4
  31. package/web-dist/assets/{infoDiagram-LFFYTUFH-Dlyj4_xF.js → infoDiagram-LFFYTUFH-HAmLLWhq.js} +1 -1
  32. package/web-dist/assets/{ishikawaDiagram-PHBUUO56-Drr_j2xF.js → ishikawaDiagram-PHBUUO56-BGAwwwZG.js} +1 -1
  33. package/web-dist/assets/{journeyDiagram-4ABVD52K-Cl_BcnKy.js → journeyDiagram-4ABVD52K-BCWzxGN-.js} +1 -1
  34. package/web-dist/assets/{kanban-definition-K7BYSVSG-BfFhG82i.js → kanban-definition-K7BYSVSG-BsNORE4Q.js} +1 -1
  35. package/web-dist/assets/{layout-DUy71oh2.js → layout-Bn85RM4b.js} +1 -1
  36. package/web-dist/assets/{linear-CF7T44xE.js → linear-B7ZPXYEc.js} +1 -1
  37. package/web-dist/assets/{mindmap-definition-YRQLILUH-B1NsYvyW.js → mindmap-definition-YRQLILUH-ECaJ_nKc.js} +1 -1
  38. package/web-dist/assets/{pieDiagram-SKSYHLDU-D_NNC3Gw.js → pieDiagram-SKSYHLDU-6n9KQ9dP.js} +1 -1
  39. package/web-dist/assets/{quadrantDiagram-337W2JSQ-BIfpZdJ6.js → quadrantDiagram-337W2JSQ-DEzmjA7C.js} +1 -1
  40. package/web-dist/assets/{requirementDiagram-Z7DCOOCP-DetJJ1Bx.js → requirementDiagram-Z7DCOOCP-Cx-GDQT1.js} +1 -1
  41. package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-7xdr38Sx.js → sankeyDiagram-WA2Y5GQK-CJEImT9q.js} +1 -1
  42. package/web-dist/assets/{sequenceDiagram-2WXFIKYE-BK5q57Tv.js → sequenceDiagram-2WXFIKYE-DHhKaFyY.js} +1 -1
  43. package/web-dist/assets/{stateDiagram-RAJIS63D-Cc88Ig0Y.js → stateDiagram-RAJIS63D-byq-_nka.js} +1 -1
  44. package/web-dist/assets/stateDiagram-v2-FVOUBMTO-B_DIBqmp.js +1 -0
  45. package/web-dist/assets/{timeline-definition-YZTLITO2-HIEHbvI9.js → timeline-definition-YZTLITO2-BmqgTnAD.js} +1 -1
  46. package/web-dist/assets/{treemap-KZPCXAKY-Dzgz1LTW.js → treemap-KZPCXAKY-na7VH9EU.js} +1 -1
  47. package/web-dist/assets/{vennDiagram-LZ73GAT5-DmKNuHTP.js → vennDiagram-LZ73GAT5-B4lahq9Q.js} +1 -1
  48. package/web-dist/assets/{xychartDiagram-JWTSCODW-C0iSRRSL.js → xychartDiagram-JWTSCODW-DLVLsIfk.js} +1 -1
  49. package/web-dist/index.html +1 -1
  50. package/web-dist/assets/channel-B_EnFV9t.js +0 -1
  51. package/web-dist/assets/classDiagram-VBA2DB6C-DfXPGN4E.js +0 -1
  52. package/web-dist/assets/classDiagram-v2-RAHNMMFH-DfXPGN4E.js +0 -1
  53. package/web-dist/assets/clone-DvrW-T_0.js +0 -1
  54. package/web-dist/assets/stateDiagram-v2-FVOUBMTO-GVBz7S0f.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-Cq8z3ow9.js","./graph-DAjVcUGc.js","./_baseUniq-DDR_yQAg.js","./layout-DUy71oh2.js","./_basePickBy-C3axlzkk.js","./clone-DvrW-T_0.js","./cose-bilkent-S5V4N54A-CALsjz5o.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-CbJwdugY.js","./chunk-JSJVCQXG-Cw4A-HE1.js","./flowDiagram-PKNHOUZH-CL9Uh8Ca.js","./chunk-FMBD7UC4-BQwo53XZ.js","./chunk-55IACEB6-WdDbxt-j.js","./chunk-KX2RTZJC-9kiV-xrA.js","./channel-B_EnFV9t.js","./erDiagram-INFDFZHY-BAueFxUI.js","./gitGraphDiagram-K3NZZRJ6-e3-ha6pZ.js","./chunk-4BX2VUAB-Bmj_hkUU.js","./chunk-QZHKN3VN-COF5dPlJ.js","./treemap-KZPCXAKY-Dzgz1LTW.js","./ganttDiagram-A5KZAMGK-VBu7-6DS.js","./linear-CF7T44xE.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-Dlyj4_xF.js","./pieDiagram-SKSYHLDU-D_NNC3Gw.js","./arc-BEiKuuWm.js","./quadrantDiagram-337W2JSQ-BIfpZdJ6.js","./xychartDiagram-JWTSCODW-C0iSRRSL.js","./requirementDiagram-Z7DCOOCP-DetJJ1Bx.js","./sequenceDiagram-2WXFIKYE-BK5q57Tv.js","./classDiagram-VBA2DB6C-DfXPGN4E.js","./chunk-WL4C6EOR-D5fyhr1r.js","./classDiagram-v2-RAHNMMFH-DfXPGN4E.js","./stateDiagram-RAJIS63D-Cc88Ig0Y.js","./chunk-NQ4KR5QH-BSn_1CZD.js","./stateDiagram-v2-FVOUBMTO-GVBz7S0f.js","./journeyDiagram-4ABVD52K-Cl_BcnKy.js","./timeline-definition-YZTLITO2-HIEHbvI9.js","./mindmap-definition-YRQLILUH-B1NsYvyW.js","./kanban-definition-K7BYSVSG-BfFhG82i.js","./diagram-P4PSJMXO-U6XQer8U.js","./diagram-IFDJBPK2-DFyKhP2X.js","./blockDiagram-WCTKOSBZ-BKxd3Ooj.js","./architectureDiagram-2XIMDMQ5-Cw-NjNKo.js","./diagram-E7M64L7V-Dg3bdak8.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-BXJ4DKqW.js","./graph-beGcURtb.js","./_baseUniq-CKquSyt6.js","./layout-Bn85RM4b.js","./_basePickBy-Bz8o8KEa.js","./clone-V5wxeYq5.js","./cose-bilkent-S5V4N54A-CXholsmC.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-DAsf-mfs.js","./chunk-JSJVCQXG-Dx0e4kbC.js","./flowDiagram-PKNHOUZH-DTMhxds-.js","./chunk-FMBD7UC4-CdkmzGqF.js","./chunk-55IACEB6-BiI92_dD.js","./chunk-KX2RTZJC-owWiSGGM.js","./channel-CvTCoZV4.js","./erDiagram-INFDFZHY-CbC8dvkE.js","./gitGraphDiagram-K3NZZRJ6-DVrdA4by.js","./chunk-4BX2VUAB-2QD6o8sy.js","./chunk-QZHKN3VN-BI7vD52S.js","./treemap-KZPCXAKY-na7VH9EU.js","./ganttDiagram-A5KZAMGK-tGsvg2KY.js","./linear-B7ZPXYEc.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-HAmLLWhq.js","./pieDiagram-SKSYHLDU-6n9KQ9dP.js","./arc-eJ222fob.js","./quadrantDiagram-337W2JSQ-DEzmjA7C.js","./xychartDiagram-JWTSCODW-DLVLsIfk.js","./requirementDiagram-Z7DCOOCP-Cx-GDQT1.js","./sequenceDiagram-2WXFIKYE-DHhKaFyY.js","./classDiagram-VBA2DB6C-BifiH1ZA.js","./chunk-WL4C6EOR-BwVCRyEo.js","./classDiagram-v2-RAHNMMFH-BifiH1ZA.js","./stateDiagram-RAJIS63D-byq-_nka.js","./chunk-NQ4KR5QH-BWXjhRK4.js","./stateDiagram-v2-FVOUBMTO-B_DIBqmp.js","./journeyDiagram-4ABVD52K-BCWzxGN-.js","./timeline-definition-YZTLITO2-BmqgTnAD.js","./mindmap-definition-YRQLILUH-ECaJ_nKc.js","./kanban-definition-K7BYSVSG-BsNORE4Q.js","./diagram-P4PSJMXO-CdmiX24Q.js","./diagram-IFDJBPK2-i7mEwhNk.js","./blockDiagram-WCTKOSBZ-BH0BuRpG.js","./architectureDiagram-2XIMDMQ5-CtojB01Z.js","./diagram-E7M64L7V-W-C1TADn.js"])))=>i.map(i=>d[i]);
2
2
  var bhe=Object.defineProperty;var _he=(e,r,n)=>r in e?bhe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var He=(e,r,n)=>_he(e,typeof r!="symbol"?r+"":r,n);function whe(e,r){for(var n=0;n<r.length;n++){const i=r[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function z0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x1t(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var n=function i(){return this instanceof i?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var oN={exports:{}},Zx={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -1116,8 +1116,8 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
1116
1116
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-n.x),a=e.width/2;let l=n.x<r.x?a-o:a+o;const d=e.height/2,u=Math.abs(r.y-n.y),f=Math.abs(r.x-n.x);if(Math.abs(s-r.y)*a>Math.abs(i-r.x)*d){let p=n.y<r.y?r.y-d-s:s-d-r.y;l=f*p/u;const g={x:n.x<r.x?n.x+l:n.x-f+l,y:n.y<r.y?n.y+u-p:n.y-u+p};return l===0&&(g.x=r.x,g.y=r.y),f===0&&(g.x=r.x),u===0&&(g.y=r.y),bt.debug(`abc89 top/bottom calc, Q ${u}, q ${p}, R ${f}, r ${l}`,g),g}else{n.x<r.x?l=r.x-a-i:l=i-a-r.x;let p=u*l/f,g=n.x<r.x?n.x+f-l:n.x-f+l,v=n.y<r.y?n.y+p:n.y-p;return bt.debug(`sides calc abc89, Q ${u}, q ${p}, R ${f}, r ${l}`,{_x:g,_y:v}),l===0&&(g=r.x,v=r.y),f===0&&(g=r.x),u===0&&(v=r.y),{x:g,y:v}}},"intersection"),TF=X((e,r)=>{bt.warn("abc88 cutPathAtIntersect",e,r);let n=[],i=e[0],s=!1;return e.forEach(o=>{if(bt.info("abc88 checking point",o,r),!oVe(r,o)&&!s){const a=aVe(r,i,o);bt.debug("abc88 inside",o,i,a),bt.debug("abc88 intersection",a,r);let l=!1;n.forEach(d=>{l=l||d.x===a.x&&d.y===a.y}),n.some(d=>d.x===a.x&&d.y===a.y)?bt.warn("abc88 no intersect",a,n):n.push(a),s=!0}else bt.warn("abc88 outside",o,i),i=o,s||n.push(o)}),bt.debug("returning points",n),n},"cutPathAtIntersect");function vse(e){const r=[],n=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(r.push(o),n.push(i))}return{cornerPoints:r,cornerPointPositions:n}}X(vse,"extractCornerPoints");var EF=X(function(e,r,n){const i=r.x-e.x,s=r.y-e.y,o=Math.sqrt(i*i+s*s),a=n/o;return{x:r.x-a*i,y:r.y-a*s}},"findAdjacentPoint"),lVe=X(function(e){const{cornerPointPositions:r}=vse(e),n=[];for(let i=0;i<e.length;i++)if(r.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],l=EF(s,a,5),d=EF(o,a,5),u=d.x-l.x,f=d.y-l.y;n.push(l);const p=Math.sqrt(2)*2;let g={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){bt.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const v=5;a.x===l.x?g={x:u<0?l.x-v+p:l.x+v-p,y:f<0?l.y-p:l.y+p}:g={x:u<0?l.x-p:l.x+p,y:f<0?l.y-v+p:l.y+v-p}}else bt.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));n.push(g,d)}else n.push(e[i]);return n},"fixCorners"),cVe=X((e,r,n)=>{const i=e-r-n,s=2,o=2,a=s+o,l=Math.floor(i/a),d=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${r} ${d} ${n}`},"generateDashArray"),uVe=X(function(e,r,n,i,s,o,a,l=!1){var L;const{handDrawnSeed:d}=ii();let u=r.points,f=!1;const p=s;var g=o;const v=[];for(const F in r.cssCompiledStyles)vne(F)||v.push(r.cssCompiledStyles[F]);bt.debug("UIO intersect check",r.points,g.x,p.x),g.intersect&&p.intersect&&!l&&(u=u.slice(1,r.points.length-1),u.unshift(p.intersect(u[0])),bt.debug("Last point UIO",r.start,"-->",r.end,u[u.length-1],g,g.intersect(u[u.length-1])),u.push(g.intersect(u[u.length-1])));const b=btoa(JSON.stringify(u));r.toCluster&&(bt.info("to cluster abc88",n.get(r.toCluster)),u=TF(r.points,n.get(r.toCluster).node),f=!0),r.fromCluster&&(bt.debug("from cluster abc88",n.get(r.fromCluster),JSON.stringify(u,null,2)),u=TF(u.reverse(),n.get(r.fromCluster).node).reverse(),f=!0);let _=u.filter(F=>!Number.isNaN(F.y));const S=nVe(r.curve);S!=="rounded"&&(_=lVe(_));let w=R_;switch(S){case"linear":w=R_;break;case"basis":w=LA;break;case"cardinal":w=Jee;break;case"bumpX":w=Gee;break;case"bumpY":w=Kee;break;case"catmullRom":w=ete;break;case"monotoneX":w=ote;break;case"monotoneY":w=ate;break;case"natural":w=cte;break;case"step":w=ute;break;case"stepAfter":w=hte;break;case"stepBefore":w=dte;break;case"rounded":w=R_;break;default:w=LA}const{x:C,y:j}=oze(r),N=$Ie().x(C).y(j).curve(w);let A;switch(r.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(r.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let E,R=S==="rounded"?xse(bse(_,r),5):N(_);const P=Array.isArray(r.style)?r.style:[r.style];let B=P.find(F=>F==null?void 0:F.startsWith("stroke:")),$="";r.animate&&($="edge-animation-fast"),r.animation&&($="edge-animation-"+r.animation);let W=!1;if(r.look==="handDrawn"){const F=xr.svg(e);Object.assign([],_);const V=F.path(R,{roughness:.3,seed:d});A+=" transition",E=Dr(V).select("path").attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+($?" "+$:"")).attr("style",P?P.reduce((H,U)=>H+";"+U,""):"");let Y=E.attr("d");E.attr("d",Y),e.node().appendChild(E.node())}else{const F=v.join(";"),V=P?P.reduce((ee,re)=>ee+re+";",""):"",Y=(F?F+";"+V+";":V)+";"+(P?P.reduce((ee,re)=>ee+";"+re,""):"");E=e.append("path").attr("d",R).attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+($?" "+$:"")).attr("style",Y),B=(L=Y.match(/stroke:([^;]+)/))==null?void 0:L[1],W=r.animate===!0||!!r.animation||F.includes("animation");const H=E.node(),U=typeof H.getTotalLength=="function"?H.getTotalLength():0,J=Uz[r.arrowTypeStart]||0,q=Uz[r.arrowTypeEnd]||0;if(r.look==="neo"&&!W){const re=`stroke-dasharray: ${r.pattern==="dotted"||r.pattern==="dashed"?cVe(U,J,q):`0 ${J} ${U-J-q} ${q}`}; stroke-dashoffset: 0;`;E.attr("style",re+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",r.id),E.attr("data-points",b),r.showPoints&&_.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let I="";(ii().flowchart.arrowMarkerAbsolute||ii().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),bt.info("arrowTypeStart",r.arrowTypeStart),bt.info("arrowTypeEnd",r.arrowTypeEnd),tVe(E,r,I,a,i,B);const K=Math.floor(u.length/2),M=u[K];od.isLabelCoordinateInPath(M,E.attr("d"))||(f=!0);let z={};return f&&(z.updatedPath=u),z.originalPath=r.points,z},"insertEdge");function xse(e,r){if(e.length<2)return"";let n="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],l=e[o-1],d=e[o+1];if(o===0)n+=`M${a.x},${a.y}`;else if(o===i-1)n+=`L${a.x},${a.y}`;else{const u=a.x-l.x,f=a.y-l.y,p=d.x-a.x,g=d.y-a.y,v=Math.hypot(u,f),b=Math.hypot(p,g);if(v<s||b<s){n+=`L${a.x},${a.y}`;continue}const _=u/v,S=f/v,w=p/b,C=g/b,j=_*w+S*C,N=Math.max(-1,Math.min(1,j)),A=Math.acos(N);if(A<s||Math.abs(Math.PI-A)<s){n+=`L${a.x},${a.y}`;continue}const E=Math.min(r/Math.sin(A/2),v/2,b/2),R=a.x-_*E,P=a.y-S*E,B=a.x+w*E,$=a.y+C*E;n+=`L${R},${P}`,n+=`Q${a.x},${a.y} ${B},${$}`}}return n}X(xse,"generateRoundedPath");function cO(e,r){if(!e||!r)return{angle:0,deltaX:0,deltaY:0};const n=r.x-e.x,i=r.y-e.y;return{angle:Math.atan2(i,n),deltaX:n,deltaY:i}}X(cO,"calculateDeltaAndAngle");function bse(e,r){const n=e.map(s=>({...s}));if(e.length>=2&&ja[r.arrowTypeStart]){const s=ja[r.arrowTypeStart],o=e[0],a=e[1],{angle:l}=cO(o,a),d=s*Math.cos(l),u=s*Math.sin(l);n[0].x=o.x+d,n[0].y=o.y+u}const i=e.length;if(i>=2&&ja[r.arrowTypeEnd]){const s=ja[r.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:l}=cO(a,o),d=s*Math.cos(l),u=s*Math.sin(l);n[i-1].x=o.x-d,n[i-1].y=o.y-u}return n}X(bse,"applyMarkerOffsetsToPoints");var dVe=X((e,r,n,i)=>{r.forEach(s=>{NVe[s](e,n,i)})},"insertMarkers"),hVe=X((e,r,n)=>{bt.trace("Making markers for ",n),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionStart").attr("class","marker extension "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionEnd").attr("class","marker extension "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),fVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionStart").attr("class","marker composition "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionEnd").attr("class","marker composition "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),pVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationStart").attr("class","marker aggregation "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationEnd").attr("class","marker aggregation "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),mVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyStart").attr("class","marker dependency "+r).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyEnd").attr("class","marker dependency "+r).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),gVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopStart").attr("class","marker lollipop "+r).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopEnd").attr("class","marker lollipop "+r).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),yVe=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-pointEnd").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-pointStart").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),vVe=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-circleEnd").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-circleStart").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),xVe=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-crossEnd").attr("class","marker cross "+r).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-crossStart").attr("class","marker cross "+r).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),bVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),_Ve=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneStart").attr("class","marker onlyOne "+r).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneEnd").attr("class","marker onlyOne "+r).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),wVe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneStart").attr("class","marker zeroOrOne "+r).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+r).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),SVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreStart").attr("class","marker oneOrMore "+r).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreEnd").attr("class","marker oneOrMore "+r).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),kVe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+r).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+r).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),CVe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
1117
1117
  L20,10
1118
1118
  M20,10
1119
- L0,20`)},"requirement_arrow"),jVe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),NVe={extension:hVe,composition:fVe,aggregation:pVe,dependency:mVe,lollipop:gVe,point:yVe,circle:vVe,cross:xVe,barb:bVe,only_one:_Ve,zero_or_one:wVe,one_or_more:SVe,zero_or_more:kVe,requirement_arrow:CVe,requirement_contains:jVe},TVe=dVe,EVe={common:kS,getConfig:Ma,insertCluster:LUe,insertEdge:uVe,insertEdgeLabel:iVe,insertMarkers:TVe,insertNode:yse,interpolateToCurve:NM,labelHelper:Hr,log:bt,positionEdgeLabel:sVe},V2={},_se=X(e=>{for(const r of e)V2[r.name]=r},"registerLayoutLoaders"),AVe=X(()=>{_se([{name:"dagre",loader:X(async()=>await Ke(()=>import("./dagre-KLK3FWXG-Cq8z3ow9.js"),__vite__mapDeps([47,48,49,50,51,52]),import.meta.url),"loader")},{name:"cose-bilkent",loader:X(async()=>await Ke(()=>import("./cose-bilkent-S5V4N54A-CALsjz5o.js"),__vite__mapDeps([53,54]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");AVe();var ovt=X(async(e,r)=>{if(!(e.layoutAlgorithm in V2))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const n=V2[e.layoutAlgorithm];return(await n.loader()).render(e,r,EVe,{algorithm:n.algorithm})},"render"),avt=X((e="",{fallback:r="dagre"}={})=>{if(e in V2)return e;if(r in V2)return bt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${e} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm"),OVe=Zre(Object.keys,Object),RVe=Object.prototype,MVe=RVe.hasOwnProperty;function PVe(e){if(!qj(e))return OVe(e);var r=[];for(var n in Object(e))MVe.call(e,n)&&n!="constructor"&&r.push(n);return r}var uO=X0(Td,"DataView"),dO=X0(Td,"Promise"),hO=X0(Td,"Set"),fO=X0(Td,"WeakMap"),AF="[object Map]",LVe="[object Object]",OF="[object Promise]",RF="[object Set]",MF="[object WeakMap]",PF="[object DataView]",$Ve=Y0(uO),DVe=Y0(W2),IVe=Y0(dO),BVe=Y0(hO),zVe=Y0(fO),Kg=K0;(uO&&Kg(new uO(new ArrayBuffer(1)))!=PF||W2&&Kg(new W2)!=AF||dO&&Kg(dO.resolve())!=OF||hO&&Kg(new hO)!=RF||fO&&Kg(new fO)!=MF)&&(Kg=function(e){var r=K0(e),n=r==LVe?e.constructor:void 0,i=n?Y0(n):"";if(i)switch(i){case $Ve:return PF;case DVe:return AF;case IVe:return OF;case BVe:return RF;case zVe:return MF}return r});var FVe="[object Map]",HVe="[object Set]",WVe=Object.prototype,UVe=WVe.hasOwnProperty;function LF(e){if(e==null)return!0;if(Gj(e)&&(H5(e)||typeof e=="string"||typeof e.splice=="function"||CM(e)||jM(e)||F5(e)))return!e.length;var r=Kg(e);if(r==FVe||r==HVe)return!e.size;if(qj(e))return!PVe(e).length;for(var n in e)if(UVe.call(e,n))return!1;return!0}var wse="c4",VVe=X(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),qVe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./c4Diagram-IC4MRINW-CbJwdugY.js");return{diagram:r}},__vite__mapDeps([55,56]),import.meta.url);return{id:wse,diagram:e}},"loader"),GVe={id:wse,detector:VVe,loader:qVe},KVe=GVe,Sse="flowchart",YVe=X((e,r)=>{var n,i;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),XVe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-CL9Uh8Ca.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:Sse,diagram:e}},"loader"),ZVe={id:Sse,detector:YVe,loader:XVe},JVe=ZVe,kse="flowchart-v2",QVe=X((e,r)=>{var n,i,s;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&((s=r==null?void 0:r.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),eqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-CL9Uh8Ca.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:kse,diagram:e}},"loader"),tqe={id:kse,detector:QVe,loader:eqe},rqe=tqe,Cse="er",nqe=X(e=>/^\s*erDiagram/.test(e),"detector"),iqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./erDiagram-INFDFZHY-BAueFxUI.js");return{diagram:r}},__vite__mapDeps([62,59,60,61]),import.meta.url);return{id:Cse,diagram:e}},"loader"),sqe={id:Cse,detector:nqe,loader:iqe},oqe=sqe,jse="gitGraph",aqe=X(e=>/^\s*gitGraph/.test(e),"detector"),lqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./gitGraphDiagram-K3NZZRJ6-e3-ha6pZ.js");return{diagram:r}},__vite__mapDeps([63,64,65,66,49,51,52]),import.meta.url);return{id:jse,diagram:e}},"loader"),cqe={id:jse,detector:aqe,loader:lqe},uqe=cqe,Nse="gantt",dqe=X(e=>/^\s*gantt/.test(e),"detector"),hqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./ganttDiagram-A5KZAMGK-VBu7-6DS.js");return{diagram:r}},__vite__mapDeps([67,68,69]),import.meta.url);return{id:Nse,diagram:e}},"loader"),fqe={id:Nse,detector:dqe,loader:hqe},pqe=fqe,Tse="info",mqe=X(e=>/^\s*info/.test(e),"detector"),gqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./infoDiagram-LFFYTUFH-Dlyj4_xF.js");return{diagram:r}},__vite__mapDeps([70,66,49,51,52]),import.meta.url);return{id:Tse,diagram:e}},"loader"),yqe={id:Tse,detector:mqe,loader:gqe},Ese="pie",vqe=X(e=>/^\s*pie/.test(e),"detector"),xqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./pieDiagram-SKSYHLDU-D_NNC3Gw.js");return{diagram:r}},__vite__mapDeps([71,64,66,49,51,52,72]),import.meta.url);return{id:Ese,diagram:e}},"loader"),bqe={id:Ese,detector:vqe,loader:xqe},Ase="quadrantChart",_qe=X(e=>/^\s*quadrantChart/.test(e),"detector"),wqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./quadrantDiagram-337W2JSQ-BIfpZdJ6.js");return{diagram:r}},__vite__mapDeps([73,68,69]),import.meta.url);return{id:Ase,diagram:e}},"loader"),Sqe={id:Ase,detector:_qe,loader:wqe},kqe=Sqe,Ose="xychart",Cqe=X(e=>/^\s*xychart(-beta)?/.test(e),"detector"),jqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./xychartDiagram-JWTSCODW-C0iSRRSL.js");return{diagram:r}},__vite__mapDeps([74,68,69]),import.meta.url);return{id:Ose,diagram:e}},"loader"),Nqe={id:Ose,detector:Cqe,loader:jqe},Tqe=Nqe,Rse="requirement",Eqe=X(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Aqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./requirementDiagram-Z7DCOOCP-DetJJ1Bx.js");return{diagram:r}},__vite__mapDeps([75,59,60]),import.meta.url);return{id:Rse,diagram:e}},"loader"),Oqe={id:Rse,detector:Eqe,loader:Aqe},Rqe=Oqe,Mse="sequence",Mqe=X(e=>/^\s*sequenceDiagram/.test(e),"detector"),Pqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./sequenceDiagram-2WXFIKYE-BK5q57Tv.js");return{diagram:r}},__vite__mapDeps([76,56,65]),import.meta.url);return{id:Mse,diagram:e}},"loader"),Lqe={id:Mse,detector:Mqe,loader:Pqe},$qe=Lqe,Pse="class",Dqe=X((e,r)=>{var n;return((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Iqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./classDiagram-VBA2DB6C-DfXPGN4E.js");return{diagram:r}},__vite__mapDeps([77,78,58,56,59,60]),import.meta.url);return{id:Pse,diagram:e}},"loader"),Bqe={id:Pse,detector:Dqe,loader:Iqe},zqe=Bqe,Lse="classDiagram",Fqe=X((e,r)=>{var n;return/^\s*classDiagram/.test(e)&&((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Hqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./classDiagram-v2-RAHNMMFH-DfXPGN4E.js");return{diagram:r}},__vite__mapDeps([79,78,58,56,59,60]),import.meta.url);return{id:Lse,diagram:e}},"loader"),Wqe={id:Lse,detector:Fqe,loader:Hqe},Uqe=Wqe,$se="state",Vqe=X((e,r)=>{var n;return((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),qqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./stateDiagram-RAJIS63D-Cc88Ig0Y.js");return{diagram:r}},__vite__mapDeps([80,81,59,60,48,49,50,51]),import.meta.url);return{id:$se,diagram:e}},"loader"),Gqe={id:$se,detector:Vqe,loader:qqe},Kqe=Gqe,Dse="stateDiagram",Yqe=X((e,r)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),Xqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./stateDiagram-v2-FVOUBMTO-GVBz7S0f.js");return{diagram:r}},__vite__mapDeps([82,81,59,60]),import.meta.url);return{id:Dse,diagram:e}},"loader"),Zqe={id:Dse,detector:Yqe,loader:Xqe},Jqe=Zqe,Ise="journey",Qqe=X(e=>/^\s*journey/.test(e),"detector"),eGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./journeyDiagram-4ABVD52K-Cl_BcnKy.js");return{diagram:r}},__vite__mapDeps([83,58,56,72]),import.meta.url);return{id:Ise,diagram:e}},"loader"),tGe={id:Ise,detector:Qqe,loader:eGe},rGe=tGe,nGe=X((e,r,n)=>{bt.debug(`rendering svg for syntax error
1120
- `);const i=JIe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),fee(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),Bse={draw:nGe},iGe=Bse,sGe={db:{},renderer:Bse,parser:{parse:X(()=>{},"parse")}},oGe=sGe,zse="flowchart-elk",aGe=X((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),lGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-CL9Uh8Ca.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:zse,diagram:e}},"loader"),cGe={id:zse,detector:aGe,loader:lGe},uGe=cGe,Fse="timeline",dGe=X(e=>/^\s*timeline/.test(e),"detector"),hGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./timeline-definition-YZTLITO2-HIEHbvI9.js");return{diagram:r}},__vite__mapDeps([84,72]),import.meta.url);return{id:Fse,diagram:e}},"loader"),fGe={id:Fse,detector:dGe,loader:hGe},pGe=fGe,Hse="mindmap",mGe=X(e=>/^\s*mindmap/.test(e),"detector"),gGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./mindmap-definition-YRQLILUH-B1NsYvyW.js");return{diagram:r}},__vite__mapDeps([85,59,60]),import.meta.url);return{id:Hse,diagram:e}},"loader"),yGe={id:Hse,detector:mGe,loader:gGe},vGe=yGe,Wse="kanban",xGe=X(e=>/^\s*kanban/.test(e),"detector"),bGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./kanban-definition-K7BYSVSG-BfFhG82i.js");return{diagram:r}},__vite__mapDeps([86,58]),import.meta.url);return{id:Wse,diagram:e}},"loader"),_Ge={id:Wse,detector:xGe,loader:bGe},wGe=_Ge,Use="sankey",SGe=X(e=>/^\s*sankey(-beta)?/.test(e),"detector"),kGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./sankeyDiagram-WA2Y5GQK-7xdr38Sx.js");return{diagram:r}},[],import.meta.url);return{id:Use,diagram:e}},"loader"),CGe={id:Use,detector:SGe,loader:kGe},jGe=CGe,Vse="packet",NGe=X(e=>/^\s*packet(-beta)?/.test(e),"detector"),TGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-P4PSJMXO-U6XQer8U.js");return{diagram:r}},__vite__mapDeps([87,64,66,49,51,52]),import.meta.url);return{id:Vse,diagram:e}},"loader"),EGe={id:Vse,detector:NGe,loader:TGe},qse="radar",AGe=X(e=>/^\s*radar-beta/.test(e),"detector"),OGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-IFDJBPK2-DFyKhP2X.js");return{diagram:r}},__vite__mapDeps([88,64,66,49,51,52]),import.meta.url);return{id:qse,diagram:e}},"loader"),RGe={id:qse,detector:AGe,loader:OGe},Gse="block",MGe=X(e=>/^\s*block(-beta)?/.test(e),"detector"),PGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./blockDiagram-WCTKOSBZ-BKxd3Ooj.js");return{diagram:r}},__vite__mapDeps([89,58,52,49,48,61]),import.meta.url);return{id:Gse,diagram:e}},"loader"),LGe={id:Gse,detector:MGe,loader:PGe},$Ge=LGe,Kse="architecture",DGe=X(e=>/^\s*architecture/.test(e),"detector"),IGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./architectureDiagram-2XIMDMQ5-Cw-NjNKo.js");return{diagram:r}},__vite__mapDeps([90,64,66,49,51,52,54]),import.meta.url);return{id:Kse,diagram:e}},"loader"),BGe={id:Kse,detector:DGe,loader:IGe},zGe=BGe,Yse="ishikawa",FGe=X(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),HGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./ishikawaDiagram-PHBUUO56-Drr_j2xF.js");return{diagram:r}},[],import.meta.url);return{id:Yse,diagram:e}},"loader"),WGe={id:Yse,detector:FGe,loader:HGe},Xse="venn",UGe=X(e=>/^\s*venn-beta/.test(e),"detector"),VGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./vennDiagram-LZ73GAT5-DmKNuHTP.js");return{diagram:r}},[],import.meta.url);return{id:Xse,diagram:e}},"loader"),qGe={id:Xse,detector:UGe,loader:VGe},GGe=qGe,Zse="treemap",KGe=X(e=>/^\s*treemap/.test(e),"detector"),YGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-E7M64L7V-Dg3bdak8.js");return{diagram:r}},__vite__mapDeps([91,60,64,66,49,51,52,69]),import.meta.url);return{id:Zse,diagram:e}},"loader"),XGe={id:Zse,detector:KGe,loader:YGe},$F=!1,t6=X(()=>{$F||($F=!0,S5("error",oGe,e=>e.toLowerCase().trim()==="error"),S5("---",{db:{clear:X(()=>{},"clear")},styles:{},renderer:{draw:X(()=>{},"draw")},parser:{parse:X(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:X(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),bA(uGe,vGe,zGe),bA(KVe,wGe,Uqe,zqe,oqe,pqe,yqe,bqe,Rqe,$qe,rqe,JVe,pGe,uqe,Jqe,Kqe,rGe,kqe,jGe,EGe,Tqe,$Ge,RGe,WGe,XGe,GGe))},"addDiagrams"),ZGe=X(async()=>{bt.debug("Loading registered diagrams");const r=(await Promise.allSettled(Object.entries(j0).map(async([n,{detector:i,loader:s}])=>{if(s)try{kA(n)}catch{try{const{diagram:o,id:a}=await s();S5(a,o,i)}catch(o){throw bt.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete j0[n],o}}}))).filter(n=>n.status==="rejected");if(r.length>0){bt.error(`Failed to load ${r.length} external diagrams`);for(const n of r)bt.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams"),JGe="graphics-document document";function Jse(e,r){e.attr("role",JGe),r!==""&&e.attr("aria-roledescription",r)}X(Jse,"setA11yDiagramInfo");function Qse(e,r,n,i){if(e.insert!==void 0){if(n){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(n)}if(r){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(r)}}}X(Qse,"addSVGa11yTitleDescription");var g0,pO=(g0=class{constructor(r,n,i,s,o){this.type=r,this.text=n,this.db=i,this.parser=s,this.renderer=o}static async fromText(r,n={}){var u,f;const i=Ma(),s=KR(r,i);r=tWe(r)+`
1119
+ L0,20`)},"requirement_arrow"),jVe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),NVe={extension:hVe,composition:fVe,aggregation:pVe,dependency:mVe,lollipop:gVe,point:yVe,circle:vVe,cross:xVe,barb:bVe,only_one:_Ve,zero_or_one:wVe,one_or_more:SVe,zero_or_more:kVe,requirement_arrow:CVe,requirement_contains:jVe},TVe=dVe,EVe={common:kS,getConfig:Ma,insertCluster:LUe,insertEdge:uVe,insertEdgeLabel:iVe,insertMarkers:TVe,insertNode:yse,interpolateToCurve:NM,labelHelper:Hr,log:bt,positionEdgeLabel:sVe},V2={},_se=X(e=>{for(const r of e)V2[r.name]=r},"registerLayoutLoaders"),AVe=X(()=>{_se([{name:"dagre",loader:X(async()=>await Ke(()=>import("./dagre-KLK3FWXG-BXJ4DKqW.js"),__vite__mapDeps([47,48,49,50,51,52]),import.meta.url),"loader")},{name:"cose-bilkent",loader:X(async()=>await Ke(()=>import("./cose-bilkent-S5V4N54A-CXholsmC.js"),__vite__mapDeps([53,54]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");AVe();var ovt=X(async(e,r)=>{if(!(e.layoutAlgorithm in V2))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const n=V2[e.layoutAlgorithm];return(await n.loader()).render(e,r,EVe,{algorithm:n.algorithm})},"render"),avt=X((e="",{fallback:r="dagre"}={})=>{if(e in V2)return e;if(r in V2)return bt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${e} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm"),OVe=Zre(Object.keys,Object),RVe=Object.prototype,MVe=RVe.hasOwnProperty;function PVe(e){if(!qj(e))return OVe(e);var r=[];for(var n in Object(e))MVe.call(e,n)&&n!="constructor"&&r.push(n);return r}var uO=X0(Td,"DataView"),dO=X0(Td,"Promise"),hO=X0(Td,"Set"),fO=X0(Td,"WeakMap"),AF="[object Map]",LVe="[object Object]",OF="[object Promise]",RF="[object Set]",MF="[object WeakMap]",PF="[object DataView]",$Ve=Y0(uO),DVe=Y0(W2),IVe=Y0(dO),BVe=Y0(hO),zVe=Y0(fO),Kg=K0;(uO&&Kg(new uO(new ArrayBuffer(1)))!=PF||W2&&Kg(new W2)!=AF||dO&&Kg(dO.resolve())!=OF||hO&&Kg(new hO)!=RF||fO&&Kg(new fO)!=MF)&&(Kg=function(e){var r=K0(e),n=r==LVe?e.constructor:void 0,i=n?Y0(n):"";if(i)switch(i){case $Ve:return PF;case DVe:return AF;case IVe:return OF;case BVe:return RF;case zVe:return MF}return r});var FVe="[object Map]",HVe="[object Set]",WVe=Object.prototype,UVe=WVe.hasOwnProperty;function LF(e){if(e==null)return!0;if(Gj(e)&&(H5(e)||typeof e=="string"||typeof e.splice=="function"||CM(e)||jM(e)||F5(e)))return!e.length;var r=Kg(e);if(r==FVe||r==HVe)return!e.size;if(qj(e))return!PVe(e).length;for(var n in e)if(UVe.call(e,n))return!1;return!0}var wse="c4",VVe=X(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),qVe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./c4Diagram-IC4MRINW-DAsf-mfs.js");return{diagram:r}},__vite__mapDeps([55,56]),import.meta.url);return{id:wse,diagram:e}},"loader"),GVe={id:wse,detector:VVe,loader:qVe},KVe=GVe,Sse="flowchart",YVe=X((e,r)=>{var n,i;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),XVe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-DTMhxds-.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:Sse,diagram:e}},"loader"),ZVe={id:Sse,detector:YVe,loader:XVe},JVe=ZVe,kse="flowchart-v2",QVe=X((e,r)=>{var n,i,s;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&((s=r==null?void 0:r.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),eqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-DTMhxds-.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:kse,diagram:e}},"loader"),tqe={id:kse,detector:QVe,loader:eqe},rqe=tqe,Cse="er",nqe=X(e=>/^\s*erDiagram/.test(e),"detector"),iqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./erDiagram-INFDFZHY-CbC8dvkE.js");return{diagram:r}},__vite__mapDeps([62,59,60,61]),import.meta.url);return{id:Cse,diagram:e}},"loader"),sqe={id:Cse,detector:nqe,loader:iqe},oqe=sqe,jse="gitGraph",aqe=X(e=>/^\s*gitGraph/.test(e),"detector"),lqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./gitGraphDiagram-K3NZZRJ6-DVrdA4by.js");return{diagram:r}},__vite__mapDeps([63,64,65,66,49,51,52]),import.meta.url);return{id:jse,diagram:e}},"loader"),cqe={id:jse,detector:aqe,loader:lqe},uqe=cqe,Nse="gantt",dqe=X(e=>/^\s*gantt/.test(e),"detector"),hqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./ganttDiagram-A5KZAMGK-tGsvg2KY.js");return{diagram:r}},__vite__mapDeps([67,68,69]),import.meta.url);return{id:Nse,diagram:e}},"loader"),fqe={id:Nse,detector:dqe,loader:hqe},pqe=fqe,Tse="info",mqe=X(e=>/^\s*info/.test(e),"detector"),gqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./infoDiagram-LFFYTUFH-HAmLLWhq.js");return{diagram:r}},__vite__mapDeps([70,66,49,51,52]),import.meta.url);return{id:Tse,diagram:e}},"loader"),yqe={id:Tse,detector:mqe,loader:gqe},Ese="pie",vqe=X(e=>/^\s*pie/.test(e),"detector"),xqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./pieDiagram-SKSYHLDU-6n9KQ9dP.js");return{diagram:r}},__vite__mapDeps([71,64,66,49,51,52,72]),import.meta.url);return{id:Ese,diagram:e}},"loader"),bqe={id:Ese,detector:vqe,loader:xqe},Ase="quadrantChart",_qe=X(e=>/^\s*quadrantChart/.test(e),"detector"),wqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./quadrantDiagram-337W2JSQ-DEzmjA7C.js");return{diagram:r}},__vite__mapDeps([73,68,69]),import.meta.url);return{id:Ase,diagram:e}},"loader"),Sqe={id:Ase,detector:_qe,loader:wqe},kqe=Sqe,Ose="xychart",Cqe=X(e=>/^\s*xychart(-beta)?/.test(e),"detector"),jqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./xychartDiagram-JWTSCODW-DLVLsIfk.js");return{diagram:r}},__vite__mapDeps([74,68,69]),import.meta.url);return{id:Ose,diagram:e}},"loader"),Nqe={id:Ose,detector:Cqe,loader:jqe},Tqe=Nqe,Rse="requirement",Eqe=X(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Aqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./requirementDiagram-Z7DCOOCP-Cx-GDQT1.js");return{diagram:r}},__vite__mapDeps([75,59,60]),import.meta.url);return{id:Rse,diagram:e}},"loader"),Oqe={id:Rse,detector:Eqe,loader:Aqe},Rqe=Oqe,Mse="sequence",Mqe=X(e=>/^\s*sequenceDiagram/.test(e),"detector"),Pqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./sequenceDiagram-2WXFIKYE-DHhKaFyY.js");return{diagram:r}},__vite__mapDeps([76,56,65]),import.meta.url);return{id:Mse,diagram:e}},"loader"),Lqe={id:Mse,detector:Mqe,loader:Pqe},$qe=Lqe,Pse="class",Dqe=X((e,r)=>{var n;return((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Iqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./classDiagram-VBA2DB6C-BifiH1ZA.js");return{diagram:r}},__vite__mapDeps([77,78,58,56,59,60]),import.meta.url);return{id:Pse,diagram:e}},"loader"),Bqe={id:Pse,detector:Dqe,loader:Iqe},zqe=Bqe,Lse="classDiagram",Fqe=X((e,r)=>{var n;return/^\s*classDiagram/.test(e)&&((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Hqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./classDiagram-v2-RAHNMMFH-BifiH1ZA.js");return{diagram:r}},__vite__mapDeps([79,78,58,56,59,60]),import.meta.url);return{id:Lse,diagram:e}},"loader"),Wqe={id:Lse,detector:Fqe,loader:Hqe},Uqe=Wqe,$se="state",Vqe=X((e,r)=>{var n;return((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),qqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./stateDiagram-RAJIS63D-byq-_nka.js");return{diagram:r}},__vite__mapDeps([80,81,59,60,48,49,50,51]),import.meta.url);return{id:$se,diagram:e}},"loader"),Gqe={id:$se,detector:Vqe,loader:qqe},Kqe=Gqe,Dse="stateDiagram",Yqe=X((e,r)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),Xqe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./stateDiagram-v2-FVOUBMTO-B_DIBqmp.js");return{diagram:r}},__vite__mapDeps([82,81,59,60]),import.meta.url);return{id:Dse,diagram:e}},"loader"),Zqe={id:Dse,detector:Yqe,loader:Xqe},Jqe=Zqe,Ise="journey",Qqe=X(e=>/^\s*journey/.test(e),"detector"),eGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./journeyDiagram-4ABVD52K-BCWzxGN-.js");return{diagram:r}},__vite__mapDeps([83,58,56,72]),import.meta.url);return{id:Ise,diagram:e}},"loader"),tGe={id:Ise,detector:Qqe,loader:eGe},rGe=tGe,nGe=X((e,r,n)=>{bt.debug(`rendering svg for syntax error
1120
+ `);const i=JIe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),fee(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),Bse={draw:nGe},iGe=Bse,sGe={db:{},renderer:Bse,parser:{parse:X(()=>{},"parse")}},oGe=sGe,zse="flowchart-elk",aGe=X((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),lGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-DTMhxds-.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:zse,diagram:e}},"loader"),cGe={id:zse,detector:aGe,loader:lGe},uGe=cGe,Fse="timeline",dGe=X(e=>/^\s*timeline/.test(e),"detector"),hGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./timeline-definition-YZTLITO2-BmqgTnAD.js");return{diagram:r}},__vite__mapDeps([84,72]),import.meta.url);return{id:Fse,diagram:e}},"loader"),fGe={id:Fse,detector:dGe,loader:hGe},pGe=fGe,Hse="mindmap",mGe=X(e=>/^\s*mindmap/.test(e),"detector"),gGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./mindmap-definition-YRQLILUH-ECaJ_nKc.js");return{diagram:r}},__vite__mapDeps([85,59,60]),import.meta.url);return{id:Hse,diagram:e}},"loader"),yGe={id:Hse,detector:mGe,loader:gGe},vGe=yGe,Wse="kanban",xGe=X(e=>/^\s*kanban/.test(e),"detector"),bGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./kanban-definition-K7BYSVSG-BsNORE4Q.js");return{diagram:r}},__vite__mapDeps([86,58]),import.meta.url);return{id:Wse,diagram:e}},"loader"),_Ge={id:Wse,detector:xGe,loader:bGe},wGe=_Ge,Use="sankey",SGe=X(e=>/^\s*sankey(-beta)?/.test(e),"detector"),kGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./sankeyDiagram-WA2Y5GQK-CJEImT9q.js");return{diagram:r}},[],import.meta.url);return{id:Use,diagram:e}},"loader"),CGe={id:Use,detector:SGe,loader:kGe},jGe=CGe,Vse="packet",NGe=X(e=>/^\s*packet(-beta)?/.test(e),"detector"),TGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-P4PSJMXO-CdmiX24Q.js");return{diagram:r}},__vite__mapDeps([87,64,66,49,51,52]),import.meta.url);return{id:Vse,diagram:e}},"loader"),EGe={id:Vse,detector:NGe,loader:TGe},qse="radar",AGe=X(e=>/^\s*radar-beta/.test(e),"detector"),OGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-IFDJBPK2-i7mEwhNk.js");return{diagram:r}},__vite__mapDeps([88,64,66,49,51,52]),import.meta.url);return{id:qse,diagram:e}},"loader"),RGe={id:qse,detector:AGe,loader:OGe},Gse="block",MGe=X(e=>/^\s*block(-beta)?/.test(e),"detector"),PGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./blockDiagram-WCTKOSBZ-BH0BuRpG.js");return{diagram:r}},__vite__mapDeps([89,58,52,49,48,61]),import.meta.url);return{id:Gse,diagram:e}},"loader"),LGe={id:Gse,detector:MGe,loader:PGe},$Ge=LGe,Kse="architecture",DGe=X(e=>/^\s*architecture/.test(e),"detector"),IGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./architectureDiagram-2XIMDMQ5-CtojB01Z.js");return{diagram:r}},__vite__mapDeps([90,64,66,49,51,52,54]),import.meta.url);return{id:Kse,diagram:e}},"loader"),BGe={id:Kse,detector:DGe,loader:IGe},zGe=BGe,Yse="ishikawa",FGe=X(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),HGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./ishikawaDiagram-PHBUUO56-BGAwwwZG.js");return{diagram:r}},[],import.meta.url);return{id:Yse,diagram:e}},"loader"),WGe={id:Yse,detector:FGe,loader:HGe},Xse="venn",UGe=X(e=>/^\s*venn-beta/.test(e),"detector"),VGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./vennDiagram-LZ73GAT5-B4lahq9Q.js");return{diagram:r}},[],import.meta.url);return{id:Xse,diagram:e}},"loader"),qGe={id:Xse,detector:UGe,loader:VGe},GGe=qGe,Zse="treemap",KGe=X(e=>/^\s*treemap/.test(e),"detector"),YGe=X(async()=>{const{diagram:e}=await Ke(async()=>{const{diagram:r}=await import("./diagram-E7M64L7V-W-C1TADn.js");return{diagram:r}},__vite__mapDeps([91,60,64,66,49,51,52,69]),import.meta.url);return{id:Zse,diagram:e}},"loader"),XGe={id:Zse,detector:KGe,loader:YGe},$F=!1,t6=X(()=>{$F||($F=!0,S5("error",oGe,e=>e.toLowerCase().trim()==="error"),S5("---",{db:{clear:X(()=>{},"clear")},styles:{},renderer:{draw:X(()=>{},"draw")},parser:{parse:X(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:X(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),bA(uGe,vGe,zGe),bA(KVe,wGe,Uqe,zqe,oqe,pqe,yqe,bqe,Rqe,$qe,rqe,JVe,pGe,uqe,Jqe,Kqe,rGe,kqe,jGe,EGe,Tqe,$Ge,RGe,WGe,XGe,GGe))},"addDiagrams"),ZGe=X(async()=>{bt.debug("Loading registered diagrams");const r=(await Promise.allSettled(Object.entries(j0).map(async([n,{detector:i,loader:s}])=>{if(s)try{kA(n)}catch{try{const{diagram:o,id:a}=await s();S5(a,o,i)}catch(o){throw bt.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete j0[n],o}}}))).filter(n=>n.status==="rejected");if(r.length>0){bt.error(`Failed to load ${r.length} external diagrams`);for(const n of r)bt.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams"),JGe="graphics-document document";function Jse(e,r){e.attr("role",JGe),r!==""&&e.attr("aria-roledescription",r)}X(Jse,"setA11yDiagramInfo");function Qse(e,r,n,i){if(e.insert!==void 0){if(n){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(n)}if(r){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(r)}}}X(Qse,"addSVGa11yTitleDescription");var g0,pO=(g0=class{constructor(r,n,i,s,o){this.type=r,this.text=n,this.db=i,this.parser=s,this.renderer=o}static async fromText(r,n={}){var u,f;const i=Ma(),s=KR(r,i);r=tWe(r)+`
1121
1121
  `;try{kA(s)}catch{const p=WMe(s);if(!p)throw new QQ(`Diagram ${s} not found.`);const{id:g,diagram:v}=await p();S5(g,v)}const{db:o,parser:a,renderer:l,init:d}=kA(s);return a.parser&&(a.parser.yy=o),(u=o.clear)==null||u.call(o),d==null||d(i),n.title&&((f=o.setDiagramTitle)==null||f.call(o,n.title)),await a.parse(r),new g0(s,r,o,a,l)}async render(r,n){await this.renderer.draw(this.text,r,n,this)}getParser(){return this.parser}getType(){return this.type}},X(g0,"Diagram"),g0),DF=[],QGe=X(()=>{DF.forEach(e=>{e()}),DF=[]},"attachFunctions"),eKe=X(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function eoe(e){const r=e.match(JQ);if(!r)return{text:e,metadata:{}};let n=sze(r[1],{schema:ize})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const i={};return n.displayMode&&(i.displayMode=n.displayMode.toString()),n.title&&(i.title=n.title.toString()),n.config&&(i.config=n.config),{text:e.slice(r[0].length),metadata:i}}X(eoe,"extractFrontMatter");var tKe=X(e=>e.replace(/\r\n?/g,`
1122
1122
  `).replace(/<(\w+)([^>]*)>/g,(r,n,i)=>"<"+n+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),rKe=X(e=>{const{text:r,metadata:n}=eoe(e),{displayMode:i,title:s,config:o={}}=n;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:r}},"processFrontmatter"),nKe=X(e=>{const r=od.detectInit(e)??{},n=od.detectDirective(e,"wrap");return Array.isArray(n)?r.wrap=n.some(({type:i})=>i==="wrap"):(n==null?void 0:n.type)==="wrap"&&(r.wrap=!0),{text:HHe(e),directive:r}},"processDirectives");function KM(e){const r=tKe(e),n=rKe(r),i=nKe(n.text),s=RM(n.config,i.directive);return e=eKe(i.text),{code:e,title:n.title,config:s}}X(KM,"preprocessDiagram");function toe(e){const r=new TextEncoder().encode(e),n=Array.from(r,i=>String.fromCodePoint(i)).join("");return btoa(n)}X(toe,"toBase64");var iKe=5e4,sKe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",oKe="sandbox",aKe="loose",lKe="http://www.w3.org/2000/svg",cKe="http://www.w3.org/1999/xlink",uKe="http://www.w3.org/1999/xhtml",dKe="100%",hKe="100%",fKe="border:0;margin:0;",pKe="margin:0",mKe="allow-top-navigation-by-user-activation allow-popups",gKe='The "iframe" tag is not supported by your browser.',yKe=["foreignobject"],vKe=["dominant-baseline"];function YM(e){const r=KM(e);return _5(),sPe(r.config??{}),r}X(YM,"processAndSetConfigs");async function roe(e,r){t6();try{const{code:n,config:i}=YM(e);return{diagramType:(await ioe(n)).type,config:i}}catch(n){if(r!=null&&r.suppressErrors)return!1;throw n}}X(roe,"parse");var IF=X((e,r,n=[])=>`
1123
1123
  .${e} ${r} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),xKe=X((e,r=new Map)=>{let n="";if(e.themeCSS!==void 0&&(n+=`
@@ -1160,7 +1160,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1160
1160
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EQe(e,r){if(e){if(typeof e=="string")return FH(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FH(e,r)}}function FH(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function AQe(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,s,o,a,l=[],d=!0,u=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(d=(i=o.call(n)).done)&&(l.push(i.value),l.length!==r);d=!0);}catch(f){u=!0,s=f}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return l}}function OQe(e){if(Array.isArray(e))return e}function RQe(e,r){if(e==null)return{};var n=MQe(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function MQe(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=RQe(e,SQe),o=Tj(Mh,13),a=NQe(o,13),l=a[0],d=a[1],u=a[2],f=a[3],p=a[4],g=a[5],v=a[6],b=a[7],_=a[8],S=a[9],w=a[10],C=a[11],j=a[12];return c.jsxs("svg",yE(yE({height:n,style:yE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Mh}),c.jsx("path",{d:"M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z",fill:l.fill}),c.jsx("path",{d:"M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z",fill:d.fill}),c.jsx("path",{d:"M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z",fill:u.fill}),c.jsx("path",{d:"M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z",fill:f.fill}),c.jsx("path",{d:"M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z",fill:p.fill}),c.jsx("path",{d:"M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z",fill:g.fill}),c.jsx("path",{d:"M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z",fill:"#0082FB"}),c.jsx("path",{d:"M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z",fill:v.fill}),c.jsx("path",{d:"M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z",fill:"#0082FB"}),c.jsx("path",{d:"M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z",fill:b.fill}),c.jsx("path",{d:"M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z",fill:_.fill}),c.jsx("path",{d:"M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z",fill:S.fill}),c.jsx("path",{d:"M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z",fill:w.fill}),c.jsx("path",{d:"M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z",fill:C.fill}),c.jsx("path",{d:"M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z",fill:j.fill}),c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:l.id,x1:"75.897%",x2:"26.312%",y1:"89.199%",y2:"12.194%",children:[c.jsx("stop",{offset:".06%",stopColor:"#0867DF"}),c.jsx("stop",{offset:"45.39%",stopColor:"#0668E1"}),c.jsx("stop",{offset:"85.91%",stopColor:"#0064E0"})]}),c.jsxs("linearGradient",{id:d.id,x1:"21.67%",x2:"97.068%",y1:"75.874%",y2:"23.985%",children:[c.jsx("stop",{offset:"13.23%",stopColor:"#0064DF"}),c.jsx("stop",{offset:"99.88%",stopColor:"#0064E0"})]}),c.jsxs("linearGradient",{id:u.id,x1:"38.263%",x2:"60.895%",y1:"89.127%",y2:"16.131%",children:[c.jsx("stop",{offset:"1.47%",stopColor:"#0072EC"}),c.jsx("stop",{offset:"68.81%",stopColor:"#0064DF"})]}),c.jsxs("linearGradient",{id:f.id,x1:"47.032%",x2:"52.15%",y1:"90.19%",y2:"15.745%",children:[c.jsx("stop",{offset:"7.31%",stopColor:"#007CF6"}),c.jsx("stop",{offset:"99.43%",stopColor:"#0072EC"})]}),c.jsxs("linearGradient",{id:p.id,x1:"52.155%",x2:"47.591%",y1:"58.301%",y2:"37.004%",children:[c.jsx("stop",{offset:"7.31%",stopColor:"#007FF9"}),c.jsx("stop",{offset:"100%",stopColor:"#007CF6"})]}),c.jsxs("linearGradient",{id:g.id,x1:"37.689%",x2:"61.961%",y1:"12.502%",y2:"63.624%",children:[c.jsx("stop",{offset:"7.31%",stopColor:"#007FF9"}),c.jsx("stop",{offset:"100%",stopColor:"#0082FB"})]}),c.jsxs("linearGradient",{id:v.id,x1:"34.808%",x2:"62.313%",y1:"68.859%",y2:"23.174%",children:[c.jsx("stop",{offset:"27.99%",stopColor:"#007FF8"}),c.jsx("stop",{offset:"91.41%",stopColor:"#0082FB"})]}),c.jsxs("linearGradient",{id:b.id,x1:"43.762%",x2:"57.602%",y1:"6.235%",y2:"98.514%",children:[c.jsx("stop",{offset:"0%",stopColor:"#0082FB"}),c.jsx("stop",{offset:"99.95%",stopColor:"#0081FA"})]}),c.jsxs("linearGradient",{id:_.id,x1:"60.055%",x2:"39.88%",y1:"4.661%",y2:"69.077%",children:[c.jsx("stop",{offset:"6.19%",stopColor:"#0081FA"}),c.jsx("stop",{offset:"100%",stopColor:"#0080F9"})]}),c.jsxs("linearGradient",{id:S.id,x1:"30.282%",x2:"61.081%",y1:"59.32%",y2:"33.244%",children:[c.jsx("stop",{offset:"0%",stopColor:"#027AF3"}),c.jsx("stop",{offset:"100%",stopColor:"#0080F9"})]}),c.jsxs("linearGradient",{id:w.id,x1:"20.433%",x2:"82.112%",y1:"50.001%",y2:"50.001%",children:[c.jsx("stop",{offset:"0%",stopColor:"#0377EF"}),c.jsx("stop",{offset:"99.94%",stopColor:"#0279F1"})]}),c.jsxs("linearGradient",{id:C.id,x1:"40.303%",x2:"72.394%",y1:"35.298%",y2:"57.811%",children:[c.jsx("stop",{offset:".19%",stopColor:"#0471E9"}),c.jsx("stop",{offset:"100%",stopColor:"#0377EF"})]}),c.jsxs("linearGradient",{id:j.id,x1:"32.254%",x2:"68.003%",y1:"19.719%",y2:"84.908%",children:[c.jsx("stop",{offset:"27.65%",stopColor:"#0867DF"}),c.jsx("stop",{offset:"100%",stopColor:"#0471E9"})]})]})]}))});function ow(e){"@babel/helpers - typeof";return ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ow(e)}var PQe=["size","style"];function HH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function vE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?HH(Object(n),!0).forEach(function(i){LQe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function LQe(e,r,n){return r=$Qe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $Qe(e){var r=DQe(e,"string");return ow(r)=="symbol"?r:String(r)}function DQe(e,r){if(ow(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(ow(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function IQe(e,r){if(e==null)return{};var n=BQe(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function BQe(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var gae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=IQe(e,PQe);return c.jsxs("svg",vE(vE({fill:"currentColor",fillRule:"evenodd",height:n,style:vE({flex:"none",lineHeight:1},i),viewBox:"0 0 75 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Mh}),c.jsx("path",{d:"M2 21.73V2.81h2.878V19h9.98v2.73zM17.722 21.73V2h2.69v19.73zM27.352 22c-1.416 0-2.517-.367-3.302-1.101-.784-.735-1.176-1.7-1.176-2.899 0-1.19.441-2.185 1.324-2.986.884-.802 2.294-1.203 4.23-1.203h3.659v-.04c0-2.271-1.04-3.406-3.12-3.406-.87 0-1.603.158-2.2.473a3.828 3.828 0 00-1.446 1.324l-1.842-1.5a5.763 5.763 0 012.266-2.054c.937-.477 2.002-.716 3.194-.716h.296c1.65 0 2.977.477 3.981 1.432 1.005.955 1.507 2.383 1.507 4.284v8.122H32.14v-2.203a5.325 5.325 0 01-2.004 1.831c-.816.428-1.744.642-2.784.642zm.592-2.405c1.04 0 1.905-.237 2.596-.71.69-.473 1.206-1.115 1.547-1.926v-1.027h-3.551c-1.058 0-1.814.17-2.266.507-.453.338-.68.795-.68 1.372 0 1.189.785 1.784 2.354 1.784zM37.776 21.73V8.216h2.69v2.216c.484-.792 1.085-1.414 1.802-1.864.717-.45 1.547-.676 2.488-.676h.296c1.04 0 1.914.257 2.623.77.708.514 1.232 1.252 1.573 2.216.52-.928 1.184-1.657 1.99-2.189.808-.531 1.722-.797 2.744-.797h.296c1.507 0 2.657.527 3.45 1.581.794 1.054 1.19 2.536 1.19 4.446v7.81h-2.69v-7.486c0-2.558-.878-3.838-2.636-3.838h-.269c-.887 0-1.638.282-2.252.845-.615.563-1.074 1.273-1.379 2.128v8.352h-2.69v-7.487c0-2.558-.879-3.838-2.636-3.838h-.269c-.888 0-1.639.282-2.253.845-.614.563-1.074 1.273-1.378 2.128v8.352h-2.69zM65.63 22c-1.417 0-2.518-.367-3.302-1.101-.785-.735-1.177-1.7-1.177-2.899 0-1.19.442-2.185 1.325-2.986.883-.802 2.293-1.203 4.23-1.203h3.658v-.04c0-2.271-1.04-3.406-3.12-3.406-.87 0-1.603.158-2.2.473a3.828 3.828 0 00-1.445 1.324l-1.843-1.5a5.763 5.763 0 012.266-2.054c.937-.477 2.002-.716 3.195-.716h.296c1.65 0 2.976.477 3.98 1.432C72.499 10.28 73 11.707 73 13.608v8.122h-2.582v-2.203a5.325 5.325 0 01-2.004 1.831c-.816.428-1.744.642-2.784.642zm.591-2.405c1.04 0 1.906-.237 2.596-.71.69-.473 1.206-1.115 1.547-1.926v-1.027h-3.55c-1.059 0-1.814.17-2.267.507-.453.338-.68.795-.68 1.372 0 1.189.785 1.784 2.354 1.784z"})]}))});function aw(e){"@babel/helpers - typeof";return aw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},aw(e)}var zQe=["type"];function WH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function FQe(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?WH(Object(n),!0).forEach(function(i){HQe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function HQe(e,r,n){return r=WQe(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function WQe(e){var r=UQe(e,"string");return aw(r)=="symbol"?r:String(r)}function UQe(e,r){if(aw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(aw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function VQe(e,r){if(e==null)return{};var n=qQe(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function qQe(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var GQe=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=VQe(e,zQe),s=n==="color"?mae:sP;return c.jsx(ml,FQe({Icon:s,Text:gae,"aria-label":Mh,spaceMultiple:FJe,textMultiple:zJe},i))}),Fh=sP;Fh.Color=mae;Fh.Text=gae;Fh.Combine=GQe;Fh.Avatar=nQe;Fh.Brand=wQe;Fh.BrandColor=mQe;Fh.colorPrimary=HJe;Fh.colorGradient=pae;Fh.title=Mh;var Pv="Mistral",KQe=.6,YQe=.2,yae="#FA520F",XQe=yae,ZQe="#fff",JQe=.75;function lw(e){"@babel/helpers - typeof";return lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lw(e)}var QQe=["size","style"];function UH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function xE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UH(Object(n),!0).forEach(function(i){eet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function eet(e,r,n){return r=tet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tet(e){var r=ret(e,"string");return lw(r)=="symbol"?r:String(r)}function ret(e,r){if(lw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(lw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function net(e,r){if(e==null)return{};var n=iet(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function iet(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var oP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=net(e,QQe);return c.jsxs("svg",xE(xE({fill:"currentColor",fillRule:"evenodd",height:n,style:xE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Pv}),c.jsx("path",{clipRule:"evenodd",d:"M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"})]}))});function cw(e){"@babel/helpers - typeof";return cw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cw(e)}function VH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function set(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?VH(Object(n),!0).forEach(function(i){oet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function oet(e,r,n){return r=aet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function aet(e){var r=cet(e,"string");return cw(r)=="symbol"?r:String(r)}function cet(e,r){if(cw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(cw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function uet(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var det=y.memo(function(e){var r=Object.assign({},(uet(e),e));return c.jsx(pl,set({Icon:oP,"aria-label":Pv,background:XQe,color:ZQe,iconMultiple:JQe},r))});function uw(e){"@babel/helpers - typeof";return uw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uw(e)}var het=["size","style"];function qH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function bE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qH(Object(n),!0).forEach(function(i){fet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function fet(e,r,n){return r=pet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function pet(e){var r=met(e,"string");return uw(r)=="symbol"?r:String(r)}function met(e,r){if(uw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(uw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function get(e,r){if(e==null)return{};var n=yet(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function yet(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var vae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=get(e,het);return c.jsxs("svg",bE(bE({height:n,style:bE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Pv}),c.jsx("path",{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"}),c.jsx("path",{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"}),c.jsx("path",{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"}),c.jsx("path",{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"}),c.jsx("path",{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"})]}))});function dw(e){"@babel/helpers - typeof";return dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dw(e)}var vet=["size","style"];function GH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function _E(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?GH(Object(n),!0).forEach(function(i){xet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function xet(e,r,n){return r=bet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bet(e){var r=_et(e,"string");return dw(r)=="symbol"?r:String(r)}function _et(e,r){if(dw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(dw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function wet(e,r){if(e==null)return{};var n=ket(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function ket(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var xae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=wet(e,vet);return c.jsxs("svg",_E(_E({fill:"currentColor",fillRule:"evenodd",height:n,style:_E({flex:"none",lineHeight:1},i),viewBox:"0 0 134 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Pv}),c.jsx("path",{d:"M2 22.638V1h6.55l3.933 14.76L16.37 1h6.565v21.638H18.87V5.605l-4.302 17.033h-4.214L6.066 5.605v17.033H2zm25.011-17.8V1.002h4.155V4.84h-4.155zm0 17.801V6.964h4.155V22.64h-4.155zm6.707-4.473l4.17-.635c.177.807.536 1.42 1.079 1.838.986.864 3.753.796 4.702.036.588-.404.753-1.367.25-1.89-.206-.196-.67-.378-1.389-.545-3.351-.738-5.475-1.412-6.372-2.022-2.418-1.526-2.465-5.18-.252-6.952 1.76-1.8 7.852-1.78 9.788-.34 1.045.699 1.764 1.732 2.159 3.1l-3.918.723c-.413-1.402-1.417-1.886-2.957-1.89-1.094 0-1.878.154-2.35.458-.591.383-.651 1.179-.06 1.595.374.275 1.668.664 3.88 1.165 2.213.502 3.759 1.117 4.636 1.845 1.993 1.694 1.615 5.13-.503 6.79-2.087 2.01-8.091 2.034-10.416.25-1.247-.865-2.063-2.04-2.447-3.527zm31.88 4.472h-4.154V6.963h3.86v2.229c.66-1.053 1.253-1.747 1.78-2.081 1.374-.857 3.144-.536 4.532.28l-1.286 3.617c-1.877-1.247-3.849-.81-4.384 1.535-.468 1.352-.329 7.76-.347 10.096zm10.67-10.892l-3.77-.679c1.014-3.408 3.08-4.43 6.801-4.457 2.81.037 4.804.362 6.055 2.324.37.674.554 1.912.554 3.713.013 1.729-.178 6.48.155 7.889.133.654.382 1.355.747 2.103H82.7c-.124-.272-.411-1.286-.547-1.712-1.378 1.335-2.97 2.066-4.865 2.067-2.945.058-5.22-1.756-5.219-4.635-.011-1.72.87-3.225 2.418-3.963.764-.37 1.865-.691 3.304-.967 1.942-.364 3.287-.703 4.037-1.018v-.413c0-.797-.197-1.366-.591-1.705-.57-.582-3.147-.744-3.963-.074-.414.29-.75.8-1.006 1.527zm5.56 3.365c-.757.315-4.139.86-4.79 1.358-1.077.707-1.038 2.141-.163 2.967 1.017.987 2.672.733 3.8-.103 1.374-.983 1.117-2.455 1.153-4.221zm7.933 7.527V1h4.155v21.638H89.76zm35.917 0h-4.761l-1.892-4.915h-8.665l-1.789 4.915h-4.643L112.371 1h4.627l8.679 21.638h.001zm-8.058-8.56l-2.987-8.03-2.927 8.03h5.914zm10.004 8.56V1H132v21.638h-4.376zM58.98 6.964v3.307H56.14v6.317l.081 2.236c.434 1.136 1.612.712 2.743.332l.355 3.218c-2.416 1.02-6.87 1.14-7.215-2.346-.096-.537-.123-1.89-.133-3.44v-6.317h-1.908V6.965h1.908V3.85l4.17-2.42v5.535h2.838z"})]}))});function hw(e){"@babel/helpers - typeof";return hw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hw(e)}var Cet=["type"];function KH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function jet(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?KH(Object(n),!0).forEach(function(i){Net(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Net(e,r,n){return r=Tet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tet(e){var r=Eet(e,"string");return hw(r)=="symbol"?r:String(r)}function Eet(e,r){if(hw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(hw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Aet(e,r){if(e==null)return{};var n=Oet(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Oet(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Ret=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=Aet(e,Cet),s=n==="color"?vae:oP;return c.jsx(ml,jet({Icon:s,Text:xae,"aria-label":Pv,spaceMultiple:YQe,textMultiple:KQe},i))}),ld=oP;ld.Color=vae;ld.Text=xae;ld.Combine=Ret;ld.Avatar=det;ld.colorPrimary=yae;ld.title=Pv;var Lv="DeepSeek",Met=.65,Pet=.2,bae="#4D6BFE",Let=bae,$et="#fff",Det=.75;function fw(e){"@babel/helpers - typeof";return fw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fw(e)}var Iet=["size","style"];function YH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function wE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?YH(Object(n),!0).forEach(function(i){Bet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Bet(e,r,n){return r=zet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zet(e){var r=Fet(e,"string");return fw(r)=="symbol"?r:String(r)}function Fet(e,r){if(fw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(fw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Het(e,r){if(e==null)return{};var n=Wet(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Wet(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var aP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Het(e,Iet);return c.jsxs("svg",wE(wE({fill:"currentColor",fillRule:"evenodd",height:n,style:wE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Lv}),c.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]}))});function pw(e){"@babel/helpers - typeof";return pw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pw(e)}function XH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Uet(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?XH(Object(n),!0).forEach(function(i){Vet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vet(e,r,n){return r=qet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qet(e){var r=Get(e,"string");return pw(r)=="symbol"?r:String(r)}function Get(e,r){if(pw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(pw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ket(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Yet=y.memo(function(e){var r=Object.assign({},(Ket(e),e));return c.jsx(pl,Uet({Icon:aP,"aria-label":Lv,background:Let,color:$et,iconMultiple:Det},r))});function mw(e){"@babel/helpers - typeof";return mw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mw(e)}var Xet=["size","style"];function ZH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function SE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ZH(Object(n),!0).forEach(function(i){Zet(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Zet(e,r,n){return r=Jet(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Jet(e){var r=Qet(e,"string");return mw(r)=="symbol"?r:String(r)}function Qet(e,r){if(mw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(mw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ett(e,r){if(e==null)return{};var n=ttt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function ttt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var _ae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=ett(e,Xet);return c.jsxs("svg",SE(SE({height:n,style:SE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Lv}),c.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"})]}))});function gw(e){"@babel/helpers - typeof";return gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gw(e)}var rtt=["size","style"];function JH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function kE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?JH(Object(n),!0).forEach(function(i){ntt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ntt(e,r,n){return r=itt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function itt(e){var r=stt(e,"string");return gw(r)=="symbol"?r:String(r)}function stt(e,r){if(gw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(gw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ott(e,r){if(e==null)return{};var n=att(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function att(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var wae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=ott(e,rtt);return c.jsxs("svg",kE(kE({fill:"currentColor",fillRule:"evenodd",height:n,style:kE({flex:"none",lineHeight:1},i),viewBox:"0 0 131 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Lv}),c.jsx("path",{d:"M117.986 0h-3.21v19.404h3.21V0zM8.7 5.215h1.83v2.838H8.7c-1.135 0-2.28.282-3.019 1.068-.738.785-1.016 1.99-1.016 3.194s.267 2.408 1.016 3.193c.75.786 1.884 1.068 3.018 1.068 1.135 0 2.28-.282 3.018-1.068.739-.785 1.017-1.99 1.017-3.193V.649h3.21v18.755h-3.21V18.21h-.589a3.498 3.498 0 01-.192.199c-.803.733-2.034.995-3.243.995-1.894 0-3.788-.472-5.03-1.78C2.44 16.314 2 14.303 2 12.303c0-2 .45-4 1.68-5.32 1.242-1.308 3.136-1.77 5.02-1.77zM57.564 18.9h-1.83v-2.837h1.83c1.134 0 2.28-.283 3.017-1.068.739-.785 1.017-1.99 1.017-3.194s-.267-2.408-1.017-3.194c-.749-.785-1.883-1.068-3.017-1.068s-2.28.283-3.018 1.068c-.738.786-1.017 1.99-1.017 3.194v11.655h-3.21V4.712h3.21v1.194h.59a3.42 3.42 0 01.186-.194l.005-.005c.803-.733 2.034-.995 3.243-.995 1.895 0 3.788.471 5.03 1.78 1.241 1.31 1.68 3.32 1.68 5.32 0 2-.45 4-1.68 5.319-1.23 1.32-3.135 1.77-5.019 1.77zM32.05 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.264-1.843-5.223-1.843-1.958 0-3.928.492-5.222 1.843-1.295 1.35-1.755 3.434-1.755 5.497 0 2.063.47 4.136 1.755 5.498 1.284 1.36 3.264 1.843 5.222 1.843 1.959 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168a5.026 5.026 0 01-.3.367c-.77.816-1.958 1.11-3.135 1.11-1.177 0-2.365-.304-3.136-1.11-.77-.807-1.048-2.063-1.048-3.299 0-1.236.278-2.482 1.049-3.298.77-.817 1.958-1.11 3.135-1.11 1.177 0 2.365.293 3.136 1.11.535.565.834 1.34.963 2.167H23.5v2.272h8.55zM48.168 12.063v1.141h-8.55v-2.272h5.671c-.129-.827-.428-1.602-.963-2.167-.77-.817-1.959-1.11-3.136-1.11s-2.365.293-3.136 1.11c-.77.816-1.049 2.063-1.049 3.298 0 1.236.279 2.492 1.05 3.299.77.806 1.958 1.11 3.135 1.11 1.177 0 2.365-.294 3.136-1.11.107-.116.203-.241.299-.367h3.168c-.278.985-.717 1.874-1.38 2.566-1.285 1.35-3.264 1.843-5.223 1.843s-3.938-.482-5.222-1.843c-1.285-1.362-1.756-3.435-1.756-5.498s.46-4.147 1.755-5.497c1.296-1.351 3.264-1.843 5.223-1.843s3.938.481 5.222 1.843c1.296 1.36 1.756 3.434 1.756 5.497zM78.635 18.315c-1.284.806-3.263 1.089-5.222 1.089-1.958 0-3.917-.294-5.212-1.09-1.295-.795-1.755-2.03-1.755-3.246h3.767c0 .472.225.953.824 1.257.6.304 1.54.419 2.462.419.92 0 1.851-.115 2.46-.42.611-.303.825-.784.825-1.256 0-.47-.214-.952-.824-1.256-.61-.304-1.627-.419-2.547-.419-1.777 0-3.563-.293-4.73-1.09-1.167-.795-1.584-2.03-1.584-3.245 0-1.215.417-2.44 1.584-3.246 1.167-.807 2.953-1.09 4.73-1.09 1.776 0 3.564.294 4.73 1.09 1.167.795 1.584 2.031 1.584 3.246h-3.264c0-.471-.203-.942-.749-1.257-.546-.303-1.391-.419-2.226-.419s-1.68.105-2.226.42c-.556.303-.75.785-.75 1.256 0 .47.204.942.75 1.256.545.304 1.316.42 2.151.42 1.959 0 3.938.292 5.222 1.088 1.295.796 1.756 2.032 1.756 3.246 0 1.215-.471 2.44-1.756 3.247zM96.507 12.063v1.141h-8.55v-2.272h5.672c-.129-.827-.429-1.602-.963-2.167-.771-.817-1.959-1.11-3.136-1.11s-2.366.293-3.136 1.11c-.77.816-1.048 2.063-1.048 3.298 0 1.236.278 2.492 1.048 3.299.77.806 1.959 1.11 3.135 1.11 1.178 0 2.366-.294 3.137-1.11.106-.116.203-.241.3-.367h3.167c-.279.985-.717 1.874-1.38 2.566-1.284 1.35-3.265 1.843-5.224 1.843-1.957 0-3.938-.482-5.222-1.843-1.284-1.362-1.754-3.435-1.754-5.498s.46-4.147 1.754-5.497c1.296-1.351 3.265-1.843 5.222-1.843 1.96 0 3.94.481 5.224 1.843 1.294 1.36 1.754 3.434 1.754 5.497zM112.624 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.265-1.843-5.223-1.843-1.959 0-3.928.492-5.222 1.843-1.296 1.35-1.756 3.434-1.756 5.497 0 2.063.471 4.136 1.756 5.498 1.284 1.36 3.263 1.843 5.222 1.843 1.958 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168l-.012.016c-.093.12-.185.24-.288.35-.77.817-1.957 1.11-3.135 1.11-1.177 0-2.365-.303-3.136-1.11-.77-.806-1.049-2.062-1.049-3.298 0-1.236.279-2.482 1.049-3.298.771-.817 1.959-1.11 3.136-1.11 1.178 0 2.365.293 3.135 1.11.536.565.836 1.34.964 2.167h-5.672v2.272h8.55zM128.73 19.404l-5.264-7.78 5.264-6.252h-3.97l-5.265 6.251 5.265 7.78h3.97z"})]}))});function yw(e){"@babel/helpers - typeof";return yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yw(e)}var ltt=["type"];function QH(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ctt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?QH(Object(n),!0).forEach(function(i){utt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QH(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function utt(e,r,n){return r=dtt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function dtt(e){var r=htt(e,"string");return yw(r)=="symbol"?r:String(r)}function htt(e,r){if(yw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(yw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ftt(e,r){if(e==null)return{};var n=ptt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function ptt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mtt=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=ftt(e,ltt),s=n==="color"?_ae:aP;return c.jsx(ml,ctt({Icon:s,Text:wae,"aria-label":Lv,spaceMultiple:Pet,textMultiple:Met},i))}),Wm=aP;Wm.Color=_ae;Wm.Text=wae;Wm.Combine=mtt;Wm.Avatar=Yet;Wm.colorPrimary=bae;Wm.title=Lv;var $S="Grok",gtt=.75,ytt=.2,Sae="#000",vtt=Sae,xtt="#fff",btt=.75;function vw(e){"@babel/helpers - typeof";return vw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vw(e)}var _tt=["size","style"];function eW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function CE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?eW(Object(n),!0).forEach(function(i){wtt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function wtt(e,r,n){return r=Stt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Stt(e){var r=ktt(e,"string");return vw(r)=="symbol"?r:String(r)}function ktt(e,r){if(vw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(vw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ctt(e,r){if(e==null)return{};var n=jtt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function jtt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var lP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Ctt(e,_tt);return c.jsxs("svg",CE(CE({fill:"currentColor",fillRule:"evenodd",height:n,style:CE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:$S}),c.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]}))});function xw(e){"@babel/helpers - typeof";return xw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xw(e)}function tW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Ntt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?tW(Object(n),!0).forEach(function(i){Ttt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ttt(e,r,n){return r=Ett(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ett(e){var r=Att(e,"string");return xw(r)=="symbol"?r:String(r)}function Att(e,r){if(xw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(xw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ott(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Rtt=y.memo(function(e){var r=Object.assign({},(Ott(e),e));return c.jsx(pl,Ntt({Icon:lP,"aria-label":$S,background:vtt,color:xtt,iconMultiple:btt},r))});function bw(e){"@babel/helpers - typeof";return bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bw(e)}var Mtt=["size","style"];function rW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function jE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?rW(Object(n),!0).forEach(function(i){Ptt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ptt(e,r,n){return r=Ltt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ltt(e){var r=$tt(e,"string");return bw(r)=="symbol"?r:String(r)}function $tt(e,r){if(bw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(bw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Dtt(e,r){if(e==null)return{};var n=Itt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Itt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var kae=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Dtt(e,Mtt);return c.jsxs("svg",jE(jE({fill:"currentColor",fillRule:"evenodd",height:n,style:jE({flex:"none",lineHeight:1},i),viewBox:"0 0 63 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:$S}),c.jsx("path",{d:"M47.419 21.645V2.457h3.033V15.12l6.415-7.369h3.678l-5.772 6.316 5.825 7.578h-3.624l-4.717-6.512-1.805-.012v6.524h-3.033zM38.22 21.968c-4.51 0-6.952-3.198-6.952-7.283 0-4.112 2.443-7.283 6.952-7.283 4.537 0 6.952 3.17 6.952 7.283 0 4.085-2.415 7.283-6.952 7.283zm-3.785-7.283c0 3.17 1.718 4.756 3.785 4.756 2.094 0 3.785-1.585 3.785-4.756 0-3.172-1.691-4.784-3.785-4.784-2.067 0-3.785 1.612-3.785 4.784zM22.826 21.645V9.955l2.55-2.204h5.422v2.58H25.86v11.314h-3.033zM11.228 22C5.447 22 2 17.802 2 12.078 2 6.3 5.57 2 11.341 2c4.51 0 7.811 2.311 8.59 6.611h-3.463c-.51-2.445-2.55-3.816-5.127-3.816-4.16 0-5.986 3.601-5.986 7.283 0 3.682 1.826 7.256 5.986 7.256 3.973 0 5.717-2.876 5.852-5.267h-5.986v-2.783h9.046l-.015 1.455c0 5.406-2.203 9.261-9.01 9.261z"})]}))});function _w(e){"@babel/helpers - typeof";return _w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_w(e)}function nW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Btt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?nW(Object(n),!0).forEach(function(i){ztt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ztt(e,r,n){return r=Ftt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ftt(e){var r=Htt(e,"string");return _w(r)=="symbol"?r:String(r)}function Htt(e,r){if(_w(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(_w(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Wtt(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Utt=y.memo(function(e){var r=Object.assign({},(Wtt(e),e));return c.jsx(ml,Btt({Icon:lP,Text:kae,"aria-label":$S,spaceMultiple:ytt,textMultiple:gtt},r))}),Q0=lP;Q0.Text=kae;Q0.Combine=Utt;Q0.Avatar=Rtt;Q0.colorPrimary=Sae;Q0.title=$S;function Cae({size:e=20,className:r}){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 1024 1024",className:r,children:[c.jsx("path",{d:"M318 372 L430 486 L318 600",fill:"none",stroke:"currentColor",strokeWidth:"88",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M610 258 L610 642 C610 734 549 796 455 796 C393 796 338 766 299 715",fill:"none",stroke:"currentColor",strokeWidth:"88",strokeLinecap:"round",strokeLinejoin:"round"})]})}const h1=Fh,NE={"gpt-4":es,"gpt-4o":es,"gpt-4-turbo":es,"gpt-5":es,"gpt-3.5-turbo":es,o1:es,"o1-mini":es,"o1-preview":es,codex:es,"claude-3":Fl,"claude-3-opus":Fl,"claude-3-sonnet":Fl,"claude-sonnet":Fl,"claude-3-haiku":Fl,"claude-2":Fl,qwen:hd,qwen2:hd,"qwen2.5":hd,qwen3:hd,llama:h1,llama2:h1,llama3:h1,"llama3.1":h1,"llama3.2":h1,mistral:ld,mixtral:ld,dolphin:ld,"dolphin-mistral":ld,"dolphin-mistral-nemo":ld,deepseek:Wm,"deepseek-coder":Wm,gemini:Ah,"gemini-pro":Ah,grok:Q0},iW={openai:es,anthropic:Fl,ollama:J0,local:h1,jait:Cae};function Vtt(e,r){if(r){if(NE[r])return NE[r];const n=r.split(":")[0].toLowerCase(),i=n.includes("/")?n.split("/").pop():n;for(const[s,o]of Object.entries(NE))if(i.startsWith(s.toLowerCase())||s.toLowerCase().startsWith(i))return o}return iW[e]??iW.ollama}function s4({provider:e,model:r,size:n=20,className:i}){const s=Vtt(e,r);return c.jsx(s,{size:n,className:i})}function qtt(e){const n=(e.includes("/")?e.split("/").pop():e).split(":"),i=n[0],s=n[1],o=i.split(/[-_]/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ");return s&&!["latest","stable"].includes(s.toLowerCase())?`${o} ${s.toUpperCase()}`:o}const MO=[{label:"Every minute",value:"* * * * *",description:"Runs every minute"},{label:"Every 5 minutes",value:"*/5 * * * *",description:"Runs every 5 minutes"},{label:"Every 15 minutes",value:"*/15 * * * *",description:"Runs every 15 minutes"},{label:"Every 30 minutes",value:"*/30 * * * *",description:"Runs every 30 minutes"},{label:"Hourly",value:"0 * * * *",description:"Runs at the start of every hour"},{label:"Every 2 hours",value:"0 */2 * * *",description:"Runs every 2 hours"},{label:"Daily at midnight",value:"0 0 * * *",description:"Runs at 00:00 every day"},{label:"Daily at 9am",value:"0 9 * * *",description:"Runs at 09:00 every day"},{label:"Daily at 6pm",value:"0 18 * * *",description:"Runs at 18:00 every day"},{label:"Weekly (Sunday)",value:"0 0 * * 0",description:"Runs at midnight every Sunday"},{label:"Weekly (Monday)",value:"0 9 * * 1",description:"Runs at 9am every Monday"},{label:"Monthly",value:"0 0 1 * *",description:"Runs at midnight on the 1st of each month"}];function jae(e){const r=e.split(" ");if(r.length!==5)return e;const[n,i,s,o,a]=r,l=MO.find(u=>u.value===e);if(l)return l.description;const d=[];if(n==="*"&&i==="*"?d.push("Every minute"):n.startsWith("*/")?d.push(`Every ${n.slice(2)} minutes`):i==="*"?d.push(`At minute ${n} of every hour`):n==="0"?d.push(`At ${i}:00`):d.push(`At ${i}:${n.padStart(2,"0")}`),a!=="*"){const u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=parseInt(a);!isNaN(f)&&f>=0&&f<=6&&d.push(`on ${u[f]}`)}if(s!=="*"&&d.push(`on day ${s}`),o!=="*"){const u=["","January","February","March","April","May","June","July","August","September","October","November","December"],f=parseInt(o);!isNaN(f)&&f>=1&&f<=12&&d.push(`in ${u[f]}`)}return d.join(" ")}function Gtt(e){const r=e.trim().split(/\s+/);if(r.length!==5)return{valid:!1,error:"Cron expression must have 5 parts (minute hour day month weekday)"};const[n,i,s,o,a]=r,l=[{name:"minute",value:n,min:0,max:59},{name:"hour",value:i,min:0,max:23},{name:"day",value:s,min:1,max:31},{name:"month",value:o,min:1,max:12},{name:"weekday",value:a,min:0,max:6}];for(const d of l)if(!Ktt(d.value,d.min,d.max))return{valid:!1,error:`Invalid ${d.name}: ${d.value}`};return{valid:!0}}function Ktt(e,r,n){if(e==="*")return!0;if(e.startsWith("*/")){const s=parseInt(e.slice(2));return!isNaN(s)&&s>0&&s<=n}if(e.includes("-")){const[s,o]=e.split("-").map(Number);return!isNaN(s)&&!isNaN(o)&&s>=r&&o<=n&&s<=o}if(e.includes(","))return e.split(",").every(s=>{const o=parseInt(s);return!isNaN(o)&&o>=r&&o<=n});const i=parseInt(e);return!isNaN(i)&&i>=r&&i<=n}function Ytt(e){try{const r=new Date,n=e.split(" ");if(n.length!==5)return null;const[i,s]=n;if(i.startsWith("*/")){const o=parseInt(i.slice(2)),a=Math.ceil(r.getMinutes()/o)*o,l=new Date(r);return a>=60?(l.setHours(l.getHours()+1),l.setMinutes(a%60)):l.setMinutes(a),l.setSeconds(0),l.setMilliseconds(0),l}if(i!=="*"&&s!=="*"){const o=parseInt(i),a=parseInt(s),l=new Date(r);return l.setHours(a),l.setMinutes(o),l.setSeconds(0),l.setMilliseconds(0),l<=r&&l.setDate(l.getDate()+1),l}return null}catch{return null}}function Xtt(e){const r=new Date,n=e.getTime()-r.getTime(),i=Math.round(n/6e4),s=Math.round(n/36e5),o=Math.round(n/864e5);return i<1?"now":i<60?`in ${i}m`:s<24?`in ${s}h`:`in ${o}d`}function Ztt({job:e,recentRun:r,onToggle:n,onTrigger:i,onDelete:s,onEdit:o,onViewHistory:a,isLoading:l=!1}){const[d,u]=y.useState(!1),[f,p]=y.useState(!1),g=async S=>{u(!0);try{await n(e.id,S)}finally{u(!1)}},v=async()=>{p(!0);try{await i(e.id)}finally{p(!1)}},b=e.enabled?Ytt(e.cron_expression):null,_={agent_task:"Agent Task",system_job:"System Job"};return c.jsxs(Rn,{"data-testid":`job-card-${e.id}`,className:Ue("transition-opacity",l&&"opacity-50",!e.enabled&&"opacity-75"),children:[c.jsx(Zoe,{className:"space-y-3 pb-3",children:c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.job_type==="agent_task"&&e.model&&e.provider&&c.jsx(s4,{provider:e.provider,model:e.model,size:32}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx(Joe,{className:"truncate text-base md:text-lg",children:e.name}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[c.jsx(nn,{variant:e.job_type==="agent_task"?"default":"secondary",children:_[e.job_type]}),e.provider&&c.jsx(nn,{variant:"outline",className:"text-xs",children:e.provider})]})]})]}),c.jsxs("div",{className:"flex items-center justify-between rounded-md border bg-muted/20 px-3 py-2 md:min-w-[92px] md:justify-end md:border-0 md:bg-transparent md:p-0",children:[c.jsx("span",{className:"text-xs text-muted-foreground md:hidden",children:e.enabled?"Enabled":"Paused"}),c.jsx(Kf,{checked:e.enabled,onCheckedChange:g,disabled:d})]})]})}),c.jsxs(Qoe,{className:"space-y-3 pt-0",children:[c.jsxs("div",{className:"flex flex-col gap-1 text-sm text-muted-foreground md:flex-row md:items-center md:gap-2",children:[c.jsx(Ym,{className:"h-4 w-4"}),c.jsx("span",{className:"break-all font-mono",children:e.cron_expression}),c.jsxs("span",{className:"text-xs md:text-xs",children:["(",jae(e.cron_expression),")"]})]}),b&&c.jsxs("div",{className:"text-sm text-muted-foreground",children:["Next run: ",b.toLocaleString()," (",Xtt(b),")"]}),e.prompt&&c.jsxs("div",{className:"line-clamp-2 text-sm italic text-muted-foreground",children:['"',e.prompt,'"']}),r&&c.jsxs("div",{className:"flex flex-col gap-1 text-sm md:flex-row md:items-center md:gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[r.status==="completed"&&c.jsxs(c.Fragment,{children:[c.jsx(ql,{className:"h-4 w-4 text-green-500"}),c.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Last run succeeded"})]}),r.status==="failed"&&c.jsxs(c.Fragment,{children:[c.jsx(Oa,{className:"h-4 w-4 text-red-500"}),c.jsx("span",{className:"text-red-600 dark:text-red-400",children:"Last run failed"})]}),r.status==="running"&&c.jsxs(c.Fragment,{children:[c.jsx(sr,{className:"h-4 w-4 animate-spin text-blue-500"}),c.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"Running now..."})]})]}),r.started_at&&c.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(r.started_at).toLocaleString()})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t pt-3 md:grid-cols-[minmax(0,1fr)_auto_auto_auto] md:items-center",children:[c.jsxs(_e,{variant:"outline",size:"sm",onClick:v,disabled:f||!e.enabled,"data-testid":`job-trigger-${e.id}`,className:"w-full md:justify-self-start",children:[f?c.jsx(sr,{className:"h-4 w-4 mr-1 animate-spin"}):c.jsx(F4,{className:"h-4 w-4 mr-1"}),"Run Now"]}),c.jsxs(_e,{variant:"ghost",size:"sm",onClick:()=>a(e),"data-testid":`job-history-${e.id}`,className:"w-full md:w-auto",children:[c.jsx(sK,{className:"h-4 w-4 mr-1"}),c.jsx("span",{className:"md:hidden lg:inline",children:"History"})]}),c.jsx(_e,{variant:"ghost",size:"icon",onClick:()=>o(e),"aria-label":`Edit job ${e.name}`,"data-testid":`job-edit-${e.id}`,className:"h-8 w-full md:w-8",children:c.jsx(Uye,{className:"h-4 w-4"})}),c.jsx(_e,{variant:"ghost",size:"icon",onClick:()=>s(e.id),className:"h-8 w-full text-destructive hover:bg-destructive/10 hover:text-destructive md:w-8","aria-label":`Delete job ${e.name}`,"data-testid":`job-delete-${e.id}`,children:c.jsx(_h,{className:"h-4 w-4"})})]})]})]})}function Jtt(e,r=[]){let n=[];function i(o,a){const l=y.createContext(a),d=n.length;n=[...n,a];const u=p=>{var w;const{scope:g,children:v,...b}=p,_=((w=g==null?void 0:g[e])==null?void 0:w[d])||l,S=y.useMemo(()=>b,Object.values(b));return c.jsx(_.Provider,{value:S,children:v})};u.displayName=o+"Provider";function f(p,g){var _;const v=((_=g==null?void 0:g[e])==null?void 0:_[d])||l,b=y.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[u,f]}const s=()=>{const o=n.map(a=>y.createContext(a));return function(l){const d=(l==null?void 0:l[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return s.scopeName=e,[i,Qtt(s,...r)]}function Qtt(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=i.reduce((l,{useScope:d,scopeName:u})=>{const p=d(o)[`__scope${u}`];return{...l,...p}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return n.scopeName=r.scopeName,n}function Nae(e){const r=ert(e),n=y.forwardRef((i,s)=>{const{children:o,...a}=i,l=y.Children.toArray(o),d=l.find(rrt);if(d){const u=d.props.children,f=l.map(p=>p===d?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:p);return c.jsx(r,{...a,ref:s,children:y.isValidElement(u)?y.cloneElement(u,void 0,f):null})}return c.jsx(r,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function ert(e){const r=y.forwardRef((n,i)=>{const{children:s,...o}=n;if(y.isValidElement(s)){const a=irt(s),l=nrt(o,s.props);return s.type!==y.Fragment&&(l.ref=i?xs(i,a):a),y.cloneElement(s,l)}return y.Children.count(s)>1?y.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var trt=Symbol("radix.slottable");function rrt(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===trt}function nrt(e,r){const n={...r};for(const i in r){const s=e[i],o=r[i];/^on[A-Z]/.test(i)?s&&o?n[i]=(...l)=>{const d=o(...l);return s(...l),d}:s&&(n[i]=s):i==="style"?n[i]={...s,...o}:i==="className"&&(n[i]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function irt(e){var i,s;let r=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=r&&"isReactWarning"in r&&r.isReactWarning;return n?e.ref:(r=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=r&&"isReactWarning"in r&&r.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var srt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oc=srt.reduce((e,r)=>{const n=Nae(`Primitive.${r}`),i=y.forwardRef((s,o)=>{const{asChild:a,...l}=s,d=a?n:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:o})});return i.displayName=`Primitive.${r}`,{...e,[r]:i}},{}),ort=[" ","Enter","ArrowUp","ArrowDown"],art=[" ","Enter"],P0="Select",[o6,a6,lrt]=A9(P0),[$v]=Jtt(P0,[lrt,Xm]),l6=Xm(),[crt,rg]=$v(P0),[urt,drt]=$v(P0),Tae=e=>{const{__scopeSelect:r,children:n,open:i,defaultOpen:s,onOpenChange:o,value:a,defaultValue:l,onValueChange:d,dir:u,name:f,autoComplete:p,disabled:g,required:v,form:b}=e,_=l6(r),[S,w]=y.useState(null),[C,j]=y.useState(null),[N,A]=y.useState(!1),E=rS(u),[R,P]=Nh({prop:i,defaultProp:s??!1,onChange:o,caller:P0}),[B,$]=Nh({prop:a,defaultProp:l,onChange:d,caller:P0}),W=y.useRef(null),I=S?b||!!S.closest("form"):!0,[K,M]=y.useState(new Set),z=Array.from(K).map(L=>L.props.value).join(";");return c.jsx(Y4,{..._,children:c.jsxs(crt,{required:v,scope:r,trigger:S,onTriggerChange:w,valueNode:C,onValueNodeChange:j,valueNodeHasChildren:N,onValueNodeHasChildrenChange:A,contentId:Cc(),value:B,onValueChange:$,open:R,onOpenChange:P,dir:E,triggerPointerDownPosRef:W,disabled:g,children:[c.jsx(o6.Provider,{scope:r,children:c.jsx(urt,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(L=>{M(F=>new Set(F).add(L))},[]),onNativeOptionRemove:y.useCallback(L=>{M(F=>{const V=new Set(F);return V.delete(L),V})},[]),children:n})}),I?c.jsxs(Jae,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:p,value:B,onChange:L=>$(L.target.value),disabled:g,form:b,children:[B===void 0?c.jsx("option",{value:""}):null,Array.from(K)]},z):null]})})};Tae.displayName=P0;var Eae="SelectTrigger",Aae=y.forwardRef((e,r)=>{const{__scopeSelect:n,disabled:i=!1,...s}=e,o=l6(n),a=rg(Eae,n),l=a.disabled||i,d=yn(r,a.onTriggerChange),u=a6(n),f=y.useRef("touch"),[p,g,v]=ele(_=>{const S=u().filter(j=>!j.disabled),w=S.find(j=>j.value===a.value),C=tle(S,_,w);C!==void 0&&a.onValueChange(C.value)}),b=_=>{l||(a.onOpenChange(!0),v()),_&&(a.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return c.jsx(iS,{asChild:!0,...o,children:c.jsx(Oc.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Qae(a.value)?"":void 0,...s,ref:d,onClick:Xt(s.onClick,_=>{_.currentTarget.focus(),f.current!=="mouse"&&b(_)}),onPointerDown:Xt(s.onPointerDown,_=>{f.current=_.pointerType;const S=_.target;S.hasPointerCapture(_.pointerId)&&S.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(b(_),_.preventDefault())}),onKeyDown:Xt(s.onKeyDown,_=>{const S=p.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&g(_.key),!(S&&_.key===" ")&&ort.includes(_.key)&&(b(),_.preventDefault())})})})});Aae.displayName=Eae;var Oae="SelectValue",Rae=y.forwardRef((e,r)=>{const{__scopeSelect:n,className:i,style:s,children:o,placeholder:a="",...l}=e,d=rg(Oae,n),{onValueNodeHasChildrenChange:u}=d,f=o!==void 0,p=yn(r,d.onValueNodeChange);return Rs(()=>{u(f)},[u,f]),c.jsx(Oc.span,{...l,ref:p,style:{pointerEvents:"none"},children:Qae(d.value)?c.jsx(c.Fragment,{children:a}):o})});Rae.displayName=Oae;var hrt="SelectIcon",Mae=y.forwardRef((e,r)=>{const{__scopeSelect:n,children:i,...s}=e;return c.jsx(Oc.span,{"aria-hidden":!0,...s,ref:r,children:i||"▼"})});Mae.displayName=hrt;var frt="SelectPortal",Pae=e=>c.jsx(vv,{asChild:!0,...e});Pae.displayName=frt;var L0="SelectContent",Lae=y.forwardRef((e,r)=>{const n=rg(L0,e.__scopeSelect),[i,s]=y.useState();if(Rs(()=>{s(new DocumentFragment)},[]),!n.open){const o=i;return o?F0.createPortal(c.jsx($ae,{scope:e.__scopeSelect,children:c.jsx(o6.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(Dae,{...e,ref:r})});Lae.displayName=L0;var Qu=10,[$ae,ng]=$v(L0),prt="SelectContentImpl",mrt=Nae("SelectContent.RemoveScroll"),Dae=y.forwardRef((e,r)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:_,avoidCollisions:S,...w}=e,C=rg(L0,n),[j,N]=y.useState(null),[A,E]=y.useState(null),R=yn(r,fe=>N(fe)),[P,B]=y.useState(null),[$,W]=y.useState(null),I=a6(n),[K,M]=y.useState(!1),z=y.useRef(!1);y.useEffect(()=>{if(j)return B4(j)},[j]),D4();const L=y.useCallback(fe=>{const[te,...ie]=I().map(Qe=>Qe.ref.current),[ge]=ie.slice(-1),le=document.activeElement;for(const Qe of fe)if(Qe===le||(Qe==null||Qe.scrollIntoView({block:"nearest"}),Qe===te&&A&&(A.scrollTop=0),Qe===ge&&A&&(A.scrollTop=A.scrollHeight),Qe==null||Qe.focus(),document.activeElement!==le))return},[I,A]),F=y.useCallback(()=>L([P,j]),[L,P,j]);y.useEffect(()=>{K&&F()},[K,F]);const{onOpenChange:V,triggerPointerDownPosRef:Y}=C;y.useEffect(()=>{if(j){let fe={x:0,y:0};const te=ge=>{var le,Qe;fe={x:Math.abs(Math.round(ge.pageX)-(((le=Y.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((Qe=Y.current)==null?void 0:Qe.y)??0))}},ie=ge=>{fe.x<=10&&fe.y<=10?ge.preventDefault():j.contains(ge.target)||V(!1),document.removeEventListener("pointermove",te),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",ie,{capture:!0})}}},[j,V,Y]),y.useEffect(()=>{const fe=()=>V(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[V]);const[H,U]=ele(fe=>{const te=I().filter(le=>!le.disabled),ie=te.find(le=>le.ref.current===document.activeElement),ge=tle(te,fe,ie);ge&&setTimeout(()=>ge.ref.current.focus())}),J=y.useCallback((fe,te,ie)=>{const ge=!z.current&&!ie;(C.value!==void 0&&C.value===te||ge)&&(B(fe),ge&&(z.current=!0))},[C.value]),q=y.useCallback(()=>j==null?void 0:j.focus(),[j]),ee=y.useCallback((fe,te,ie)=>{const ge=!z.current&&!ie;(C.value!==void 0&&C.value===te||ge)&&W(fe)},[C.value]),re=i==="popper"?PO:Iae,de=re===PO?{side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:_,avoidCollisions:S}:{};return c.jsx($ae,{scope:n,content:j,viewport:A,onViewportChange:E,itemRefCallback:J,selectedItem:P,onItemLeave:q,itemTextRefCallback:ee,focusSelectedItem:F,selectedItemText:$,position:i,isPositioned:K,searchRef:H,children:c.jsx(tS,{as:mrt,allowPinchZoom:!0,children:c.jsx(Qw,{asChild:!0,trapped:C.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:Xt(s,fe=>{var te;(te=C.trigger)==null||te.focus({preventScroll:!0}),fe.preventDefault()}),children:c.jsx(yv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:c.jsx(re,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:fe=>fe.preventDefault(),...w,...de,onPlaced:()=>M(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Xt(w.onKeyDown,fe=>{const te=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!te&&fe.key.length===1&&U(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let ge=I().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const le=fe.target,Qe=ge.indexOf(le);ge=ge.slice(Qe+1)}setTimeout(()=>L(ge)),fe.preventDefault()}})})})})})})});Dae.displayName=prt;var grt="SelectItemAlignedPosition",Iae=y.forwardRef((e,r)=>{const{__scopeSelect:n,onPlaced:i,...s}=e,o=rg(L0,n),a=ng(L0,n),[l,d]=y.useState(null),[u,f]=y.useState(null),p=yn(r,R=>f(R)),g=a6(n),v=y.useRef(!1),b=y.useRef(!0),{viewport:_,selectedItem:S,selectedItemText:w,focusSelectedItem:C}=a,j=y.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&_&&S&&w){const R=o.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),$=w.getBoundingClientRect();if(o.dir!=="rtl"){const le=$.left-P.left,Qe=B.left-le,Ze=R.left-Qe,Ie=R.width+Ze,ne=Math.max(Ie,P.width),Ne=window.innerWidth-Qu,Ce=xO(Qe,[Qu,Math.max(Qu,Ne-ne)]);l.style.minWidth=Ie+"px",l.style.left=Ce+"px"}else{const le=P.right-$.right,Qe=window.innerWidth-B.right-le,Ze=window.innerWidth-R.right-Qe,Ie=R.width+Ze,ne=Math.max(Ie,P.width),Ne=window.innerWidth-Qu,Ce=xO(Qe,[Qu,Math.max(Qu,Ne-ne)]);l.style.minWidth=Ie+"px",l.style.right=Ce+"px"}const W=g(),I=window.innerHeight-Qu*2,K=_.scrollHeight,M=window.getComputedStyle(u),z=parseInt(M.borderTopWidth,10),L=parseInt(M.paddingTop,10),F=parseInt(M.borderBottomWidth,10),V=parseInt(M.paddingBottom,10),Y=z+L+K+V+F,H=Math.min(S.offsetHeight*5,Y),U=window.getComputedStyle(_),J=parseInt(U.paddingTop,10),q=parseInt(U.paddingBottom,10),ee=R.top+R.height/2-Qu,re=I-ee,de=S.offsetHeight/2,fe=S.offsetTop+de,te=z+L+fe,ie=Y-te;if(te<=ee){const le=W.length>0&&S===W[W.length-1].ref.current;l.style.bottom="0px";const Qe=u.clientHeight-_.offsetTop-_.offsetHeight,Ze=Math.max(re,de+(le?q:0)+Qe+F),Ie=te+Ze;l.style.height=Ie+"px"}else{const le=W.length>0&&S===W[0].ref.current;l.style.top="0px";const Ze=Math.max(ee,z+_.offsetTop+(le?J:0)+de)+ie;l.style.height=Ze+"px",_.scrollTop=te-ee+_.offsetTop}l.style.margin=`${Qu}px 0`,l.style.minHeight=H+"px",l.style.maxHeight=I+"px",i==null||i(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,l,u,_,S,w,o.dir,i]);Rs(()=>j(),[j]);const[N,A]=y.useState();Rs(()=>{u&&A(window.getComputedStyle(u).zIndex)},[u]);const E=y.useCallback(R=>{R&&b.current===!0&&(j(),C==null||C(),b.current=!1)},[j,C]);return c.jsx(vrt,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:c.jsx(Oc.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Iae.displayName=grt;var yrt="SelectPopperPosition",PO=y.forwardRef((e,r)=>{const{__scopeSelect:n,align:i="start",collisionPadding:s=Qu,...o}=e,a=l6(n);return c.jsx(X4,{...a,...o,ref:r,align:i,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});PO.displayName=yrt;var[vrt,cP]=$v(L0,{}),LO="SelectViewport",Bae=y.forwardRef((e,r)=>{const{__scopeSelect:n,nonce:i,...s}=e,o=ng(LO,n),a=cP(LO,n),l=yn(r,o.onViewportChange),d=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),c.jsx(o6.Slot,{scope:n,children:c.jsx(Oc.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Xt(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g!=null&&g.current&&p){const v=Math.abs(d.current-f.scrollTop);if(v>0){const b=window.innerHeight-Qu*2,_=parseFloat(p.style.minHeight),S=parseFloat(p.style.height),w=Math.max(_,S);if(w<b){const C=w+v,j=Math.min(b,C),N=C-j;p.style.height=j+"px",p.style.bottom==="0px"&&(f.scrollTop=N>0?N:0,p.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Bae.displayName=LO;var zae="SelectGroup",[xrt,brt]=$v(zae),_rt=y.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,s=Cc();return c.jsx(xrt,{scope:n,id:s,children:c.jsx(Oc.div,{role:"group","aria-labelledby":s,...i,ref:r})})});_rt.displayName=zae;var Fae="SelectLabel",Hae=y.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,s=brt(Fae,n);return c.jsx(Oc.div,{id:s.id,...i,ref:r})});Hae.displayName=Fae;var o4="SelectItem",[wrt,Wae]=$v(o4),Uae=y.forwardRef((e,r)=>{const{__scopeSelect:n,value:i,disabled:s=!1,textValue:o,...a}=e,l=rg(o4,n),d=ng(o4,n),u=l.value===i,[f,p]=y.useState(o??""),[g,v]=y.useState(!1),b=yn(r,C=>{var j;return(j=d.itemRefCallback)==null?void 0:j.call(d,C,i,s)}),_=Cc(),S=y.useRef("touch"),w=()=>{s||(l.onValueChange(i),l.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(wrt,{scope:n,value:i,disabled:s,textId:_,isSelected:u,onItemTextChange:y.useCallback(C=>{p(j=>j||((C==null?void 0:C.textContent)??"").trim())},[]),children:c.jsx(o6.ItemSlot,{scope:n,value:i,disabled:s,textValue:f,children:c.jsx(Oc.div,{role:"option","aria-labelledby":_,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:b,onFocus:Xt(a.onFocus,()=>v(!0)),onBlur:Xt(a.onBlur,()=>v(!1)),onClick:Xt(a.onClick,()=>{S.current!=="mouse"&&w()}),onPointerUp:Xt(a.onPointerUp,()=>{S.current==="mouse"&&w()}),onPointerDown:Xt(a.onPointerDown,C=>{S.current=C.pointerType}),onPointerMove:Xt(a.onPointerMove,C=>{var j;S.current=C.pointerType,s?(j=d.onItemLeave)==null||j.call(d):S.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Xt(a.onPointerLeave,C=>{var j;C.currentTarget===document.activeElement&&((j=d.onItemLeave)==null||j.call(d))}),onKeyDown:Xt(a.onKeyDown,C=>{var N;((N=d.searchRef)==null?void 0:N.current)!==""&&C.key===" "||(art.includes(C.key)&&w(),C.key===" "&&C.preventDefault())})})})})});Uae.displayName=o4;var a_="SelectItemText",Vae=y.forwardRef((e,r)=>{const{__scopeSelect:n,className:i,style:s,...o}=e,a=rg(a_,n),l=ng(a_,n),d=Wae(a_,n),u=drt(a_,n),[f,p]=y.useState(null),g=yn(r,w=>p(w),d.onItemTextChange,w=>{var C;return(C=l.itemTextRefCallback)==null?void 0:C.call(l,w,d.value,d.disabled)}),v=f==null?void 0:f.textContent,b=y.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:_,onNativeOptionRemove:S}=u;return Rs(()=>(_(b),()=>S(b)),[_,S,b]),c.jsxs(c.Fragment,{children:[c.jsx(Oc.span,{id:d.textId,...o,ref:g}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren?F0.createPortal(o.children,a.valueNode):null]})});Vae.displayName=a_;var qae="SelectItemIndicator",Gae=y.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e;return Wae(qae,n).isSelected?c.jsx(Oc.span,{"aria-hidden":!0,...i,ref:r}):null});Gae.displayName=qae;var $O="SelectScrollUpButton",Kae=y.forwardRef((e,r)=>{const n=ng($O,e.__scopeSelect),i=cP($O,e.__scopeSelect),[s,o]=y.useState(!1),a=yn(r,i.onScrollButtonChange);return Rs(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=d.scrollTop>0;o(u)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?c.jsx(Xae,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop-d.offsetHeight)}}):null});Kae.displayName=$O;var DO="SelectScrollDownButton",Yae=y.forwardRef((e,r)=>{const n=ng(DO,e.__scopeSelect),i=cP(DO,e.__scopeSelect),[s,o]=y.useState(!1),a=yn(r,i.onScrollButtonChange);return Rs(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;o(f)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?c.jsx(Xae,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop+d.offsetHeight)}}):null});Yae.displayName=DO;var Xae=y.forwardRef((e,r)=>{const{__scopeSelect:n,onAutoScroll:i,...s}=e,o=ng("SelectScrollButton",n),a=y.useRef(null),l=a6(n),d=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>d(),[d]),Rs(()=>{var f;const u=l().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),c.jsx(Oc.div,{"aria-hidden":!0,...s,ref:r,style:{flexShrink:0,...s.style},onPointerDown:Xt(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(i,50))}),onPointerMove:Xt(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),a.current===null&&(a.current=window.setInterval(i,50))}),onPointerLeave:Xt(s.onPointerLeave,()=>{d()})})}),Srt="SelectSeparator",Zae=y.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e;return c.jsx(Oc.div,{"aria-hidden":!0,...i,ref:r})});Zae.displayName=Srt;var IO="SelectArrow",krt=y.forwardRef((e,r)=>{const{__scopeSelect:n,...i}=e,s=l6(n),o=rg(IO,n),a=ng(IO,n);return o.open&&a.position==="popper"?c.jsx(Z4,{...s,...i,ref:r}):null});krt.displayName=IO;var Crt="SelectBubbleInput",Jae=y.forwardRef(({__scopeSelect:e,value:r,...n},i)=>{const s=y.useRef(null),o=yn(i,s),a=tae(r);return y.useEffect(()=>{const l=s.current;if(!l)return;const d=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==r&&f){const p=new Event("change",{bubbles:!0});f.call(l,r),l.dispatchEvent(p)}},[a,r]),c.jsx(Oc.select,{...n,style:{...vX,...n.style},ref:o,defaultValue:r})});Jae.displayName=Crt;function Qae(e){return e===""||e===void 0}function ele(e){const r=Po(e),n=y.useRef(""),i=y.useRef(0),s=y.useCallback(a=>{const l=n.current+a;r(l),(function d(u){n.current=u,window.clearTimeout(i.current),u!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(l)},[r]),o=y.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,s,o]}function tle(e,r,n){const s=r.length>1&&Array.from(r).every(u=>u===r[0])?r[0]:r,o=n?e.indexOf(n):-1;let a=jrt(e,Math.max(o,0));s.length===1&&(a=a.filter(u=>u!==n));const d=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function jrt(e,r){return e.map((n,i)=>e[(r+i)%e.length])}var Nrt=Tae,rle=Aae,Trt=Rae,Ert=Mae,Art=Pae,nle=Lae,Ort=Bae,ile=Hae,sle=Uae,Rrt=Vae,Mrt=Gae,ole=Kae,ale=Yae,lle=Zae;const D_=Nrt,I_=Trt,O1=y.forwardRef(({className:e,children:r,...n},i)=>c.jsxs(rle,{ref:i,className:Ue("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-lg border border-input bg-background/90 px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/60 focus:ring-offset-2 focus:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,c.jsx(Ert,{asChild:!0,children:c.jsx(hl,{className:"h-4 w-4 opacity-50"})})]}));O1.displayName=rle.displayName;const cle=y.forwardRef(({className:e,...r},n)=>c.jsx(ole,{ref:n,className:Ue("flex cursor-default items-center justify-center py-1",e),...r,children:c.jsx(_9,{className:"h-4 w-4"})}));cle.displayName=ole.displayName;const ule=y.forwardRef(({className:e,...r},n)=>c.jsx(ale,{ref:n,className:Ue("flex cursor-default items-center justify-center py-1",e),...r,children:c.jsx(hl,{className:"h-4 w-4"})}));ule.displayName=ale.displayName;const R1=y.forwardRef(({className:e,children:r,position:n="popper",...i},s)=>c.jsx(Art,{children:c.jsxs(nle,{ref:s,className:Ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-border/70 bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[c.jsx(cle,{}),c.jsx(Ort,{className:Ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),c.jsx(ule,{})]})}));R1.displayName=nle.displayName;const Prt=y.forwardRef(({className:e,...r},n)=>c.jsx(ile,{ref:n,className:Ue("px-2 py-1.5 text-sm font-semibold",e),...r}));Prt.displayName=ile.displayName;const td=y.forwardRef(({className:e,children:r,...n},i)=>c.jsxs(sle,{ref:i,className:Ue("relative flex w-full cursor-default select-none items-center rounded-md py-2 pl-2.5 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Mrt,{children:c.jsx(hs,{className:"h-4 w-4"})})}),c.jsx(Rrt,{children:r})]}));td.displayName=sle.displayName;const Lrt=y.forwardRef(({className:e,...r},n)=>c.jsx(lle,{ref:n,className:Ue("-mx-1 my-1 h-px bg-muted",e),...r}));Lrt.displayName=lle.displayName;const om=Ln();class uP{getToken(){return d0()}getHeaders(r=!1){const n={};r&&(n["Content-Type"]="application/json");const i=this.getToken();return i&&(n.Authorization=`Bearer ${i}`),n}async listJobsPage(r=1,n=20,i=!0){const s=new URLSearchParams({page:r.toString(),size:n.toString(),include_disabled:i.toString()}),o=await fetch(`${om}/jobs?${s}`,{headers:this.getHeaders()});if(!o.ok)throw new Error(`Failed to list jobs: ${o.statusText}`);const a=await o.json();if(Array.isArray(a))return{items:a,total:a.length,page:1,size:a.length};const l=a&&typeof a=="object"?a:{},d=Array.isArray(l.items)?l.items:[],u=typeof l.total=="number"?l.total:d.length,f=typeof l.page=="number"?l.page:r,p=typeof l.size=="number"?l.size:n;return{items:d,total:u,page:f,size:p}}async listJobs(r=1,n=100,i=!0){return(await this.listJobsPage(r,n,i)).items}async getJob(r){const n=await fetch(`${om}/jobs/${r}`,{headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to get job: ${n.statusText}`);return n.json()}async createJob(r){const n=await fetch(`${om}/jobs`,{method:"POST",headers:this.getHeaders(!0),body:JSON.stringify(r)});if(!n.ok){const i=await n.json().catch(()=>({detail:n.statusText}));throw new Error(i.detail||"Failed to create job")}return n.json()}async updateJob(r,n){const i=await fetch(`${om}/jobs/${r}`,{method:"PATCH",headers:this.getHeaders(!0),body:JSON.stringify(n)});if(!i.ok){const s=await i.json().catch(()=>({detail:i.statusText}));throw new Error(s.detail||"Failed to update job")}return i.json()}async deleteJob(r){const n=await fetch(`${om}/jobs/${r}`,{method:"DELETE",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to delete job: ${n.statusText}`)}async triggerJob(r){const n=await fetch(`${om}/jobs/${r}/trigger`,{method:"POST",headers:this.getHeaders(!0),body:JSON.stringify({})});if(!n.ok){const i=await n.json().catch(()=>({detail:n.statusText}));throw new Error(i.detail||`Failed to trigger job: ${n.statusText}`)}return n.json()}async getJobRuns(r,n=20,i=1){const s=new URLSearchParams({page:i.toString(),size:n.toString()}),o=await fetch(`${om}/jobs/${r}/runs?${s}`,{headers:this.getHeaders()});if(!o.ok)throw new Error(`Failed to get job runs: ${o.statusText}`);const a=await o.json();return Array.isArray(a)?a:a.items??[]}async getAvailableProviders(){const r=await fetch(`${om}/jobs/providers/available`,{headers:this.getHeaders()});if(!r.ok)throw new Error(`Failed to get providers: ${r.statusText}`);const n=await r.json();return n.providers&&!Array.isArray(n.providers)?n.providers:n}}const Ok=new uP;function $rt({isOpen:e,onClose:r,onCreated:n,editJob:i,onUpdated:s}){const[o,a]=y.useState(!1),[l,d]=y.useState(null),[u,f]=y.useState({}),[p,g]=y.useState(""),[v,b]=y.useState("agent_task"),[_,S]=y.useState("0 * * * *"),[w,C]=y.useState(""),[j,N]=y.useState(!1),[A,E]=y.useState(!0),[R,P]=y.useState(""),[B,$]=y.useState(""),[W,I]=y.useState(""),[K,M]=y.useState(""),[z,L]=y.useState("");y.useEffect(()=>{Ok.getAvailableProviders().then(f).catch(console.error)},[]);const F=U=>{if(g(U.name),b(U.job_type),S(U.cron_expression),E(U.enabled),P(U.provider||""),$(U.model||""),I(U.prompt||""),U.job_type==="system_job"){const ee=U.payload&&typeof U.payload=="object"?U.payload:void 0,re=typeof(ee==null?void 0:ee.command)=="string"?ee.command:void 0,de=typeof U.tool_name=="string"?U.tool_name:"";M(re||de);const fe=ee==null?void 0:ee.args;if(fe&&typeof fe=="object")try{L(JSON.stringify(fe,null,2))}catch{L("")}else L("")}else L(""),M("");const J=(U.cron_expression||"").trim(),q=MO.some(ee=>ee.value===J);N(!q),C(q?"":J)};y.useEffect(()=>{if(i){F(i);let U=!1;return Ok.getJob(i.id).then(J=>{U||F(J)}).catch(()=>{}),()=>{U=!0}}else g(""),b("agent_task"),S("0 * * * *"),C(""),N(!1),E(!0),P(""),$(""),I(""),M(""),L("")},[i,e]);const V=j?w:_,Y=Gtt(V),H=async U=>{if(U.preventDefault(),d(null),!Y.valid){d(Y.error||"Invalid cron expression");return}const J={name:p,job_type:v,cron_expression:V,enabled:A};if(v==="agent_task"){if(!R||!B||!W){d("Provider, model, and prompt are required for agent tasks");return}J.provider=R,J.model=B,J.prompt=W}else{if(!K){d("Command is required for system jobs");return}const q={command:K};if(z)try{q.args=JSON.parse(z)}catch{d("Args must be valid JSON");return}J.payload=q}a(!0);try{if(i){const q=await Ok.updateJob(i.id,J);s==null||s(q)}else{const q=await Ok.createJob(J);n(q)}r()}catch(q){d(q instanceof Error?q.message:"Failed to save job")}finally{a(!1)}};return e?c.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/50 sm:items-center",children:c.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"create-job-dialog-title","data-testid":"create-job-dialog",className:"h-[92dvh] w-full overflow-y-auto border border-border bg-background text-foreground shadow-xl sm:h-auto sm:max-h-[90vh] sm:max-w-2xl sm:rounded-lg",children:[c.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3 sm:p-4",children:[c.jsx("h2",{id:"create-job-dialog-title",className:"text-lg font-semibold sm:text-xl",children:i?"Edit Job":"Create New Job"}),c.jsx(_e,{variant:"ghost",size:"sm",onClick:r,"aria-label":"Close dialog",children:c.jsx(Zn,{className:"h-5 w-5"})})]}),c.jsxs("form",{onSubmit:H,className:"space-y-5 p-4 sm:space-y-6",children:[c.jsxs(V1,{value:v,onValueChange:U=>b(U),children:[c.jsxs(b0,{className:"grid h-auto w-full grid-cols-2",children:[c.jsx(Zo,{value:"agent_task",children:"Agent Task"}),c.jsx(Zo,{value:"system_job",children:"System Job"})]}),c.jsxs(Jo,{value:"agent_task",className:"space-y-4 mt-4",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"provider",children:"Provider"}),c.jsxs(D_,{value:R,onValueChange:U=>{P(U),$("")},children:[c.jsx(O1,{"data-testid":"provider-select",children:c.jsx(I_,{placeholder:"Select provider"})}),c.jsx(R1,{children:Object.entries(u).map(([U,J])=>c.jsx(td,{value:U,children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(s4,{provider:U,size:20}),c.jsx("span",{children:J.name})]})},U))})]})]}),R&&u[R]&&c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"model",children:"Model"}),c.jsxs(D_,{value:B,onValueChange:$,children:[c.jsx(O1,{"data-testid":"model-select",children:c.jsx(I_,{placeholder:"Select model"})}),c.jsx(R1,{children:u[R].models.map(U=>c.jsx(td,{value:U,children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(s4,{provider:R,model:U,size:20}),c.jsx("span",{children:U})]})},U))})]})]}),c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"prompt",children:"Prompt"}),c.jsx(r4,{id:"prompt",value:W,onChange:U=>I(U.target.value),placeholder:"What should the agent do?",rows:4})]})]}),c.jsxs(Jo,{value:"system_job",className:"space-y-4 mt-4",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"command",children:"Command"}),c.jsx(Hn,{id:"command",value:K,onChange:U=>M(U.target.value),placeholder:"e.g., cleanup_old_files"})]}),c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"args",children:"Arguments (JSON)"}),c.jsx(r4,{id:"args",value:z,onChange:U=>L(U.target.value),placeholder:'{"days": 30}',rows:3})]})]})]}),c.jsxs("div",{className:"border-t pt-4 space-y-4",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"name",children:"Job Name"}),c.jsx(Hn,{id:"name",value:p,onChange:U=>g(U.target.value),placeholder:"My scheduled job",required:!0})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[c.jsx(wi,{children:"Schedule"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(wi,{htmlFor:"custom-schedule",className:"text-sm text-muted-foreground",children:"Custom"}),c.jsx(Kf,{id:"custom-schedule",checked:j,onCheckedChange:N})]})]}),j?c.jsxs("div",{children:[c.jsx(Hn,{value:w,onChange:U=>C(U.target.value),placeholder:"* * * * *",className:Y.valid?"":"border-red-500"}),w&&c.jsx("p",{className:`text-sm mt-1 ${Y.valid?"text-muted-foreground":"text-red-500"}`,children:Y.valid?jae(w):Y.error})]}):c.jsxs(D_,{value:_,onValueChange:S,children:[c.jsx(O1,{"data-testid":"schedule-select",children:c.jsx(I_,{})}),c.jsx(R1,{children:MO.map(U=>c.jsx(td,{value:U.value,children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{children:U.label}),c.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:U.value})]})},U.value))})]})]}),c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"enabled",children:"Enabled"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Job will run according to schedule"})]}),c.jsx(Kf,{id:"enabled",checked:A,onCheckedChange:E})]})]}),l&&c.jsxs("div",{className:"flex items-center gap-2 text-destructive text-sm bg-destructive/10 p-3 rounded-md",children:[c.jsx(Oa,{className:"h-4 w-4"}),l]}),c.jsxs("div",{className:"grid grid-cols-1 gap-3 border-t pt-4 sm:flex sm:justify-end",children:[c.jsx(_e,{type:"button",variant:"outline",onClick:r,className:"w-full sm:w-auto",children:"Cancel"}),c.jsxs(_e,{type:"submit",disabled:o,className:"w-full sm:w-auto",children:[o&&c.jsx(sr,{className:"h-4 w-4 mr-2 animate-spin"}),i?"Save Changes":"Create Job"]})]})]})]})}):null}const Drt=new uP;function Irt({job:e,isOpen:r,onClose:n}){const[i,s]=y.useState([]),[o,a]=y.useState(!1),[l,d]=y.useState(null),u=async()=>{if(e){a(!0),d(null);try{const v=await Drt.getJobRuns(e.id,50);s(v)}catch(v){d(v instanceof Error?v.message:"Failed to load history")}finally{a(!1)}}};if(y.useEffect(()=>{r&&e&&u()},[r,e==null?void 0:e.id]),!r||!e)return null;const f=v=>{switch(v){case"completed":return c.jsx(ql,{className:"h-4 w-4 text-green-500"});case"failed":return c.jsx(Oa,{className:"h-4 w-4 text-red-500"});case"running":return c.jsx(sr,{className:"h-4 w-4 text-blue-500 animate-spin"});case"pending":return c.jsx(Ym,{className:"h-4 w-4 text-yellow-500"});default:return null}},p=v=>{const b={completed:"default",failed:"destructive",running:"secondary",pending:"outline"};return c.jsx(nn,{variant:b[v]||"outline",children:v})},g=(v,b)=>{if(!b)return"—";const _=new Date(v),w=new Date(b).getTime()-_.getTime();return w<1e3?`${w}ms`:w<6e4?`${(w/1e3).toFixed(1)}s`:`${(w/6e4).toFixed(1)}m`};return c.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/50 sm:items-center",children:c.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"job-history-dialog-title","data-testid":"job-history-dialog",className:"flex h-[92dvh] w-full flex-col overflow-hidden border border-border bg-background text-foreground shadow-xl sm:h-auto sm:max-h-[90vh] sm:max-w-3xl sm:rounded-lg",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3 border-b px-4 py-3 sm:p-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{id:"job-history-dialog-title",className:"text-lg font-semibold sm:text-xl",children:"Job History"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:e.name})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_e,{variant:"outline",size:"sm",onClick:u,disabled:o,children:c.jsx(Ta,{className:`h-4 w-4 ${o?"animate-spin":""}`})}),c.jsx(_e,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close history dialog",children:c.jsx(Zn,{className:"h-5 w-5"})})]})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[l&&c.jsxs("div",{className:"flex items-center gap-2 text-destructive text-sm bg-destructive/10 p-3 rounded-md mb-4",children:[c.jsx(Oa,{className:"h-4 w-4"}),l]}),o&&i.length===0?c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(sr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i.length===0?c.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No runs yet. This job hasn't been executed."}):c.jsx("div",{className:"space-y-3",children:i.map(v=>c.jsxs("div",{className:"border border-border rounded-lg p-4 hover:bg-muted/40 transition-colors",children:[c.jsxs("div",{className:"mb-2 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f(v.status),p(v.status),v.triggered_by&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["by ",v.triggered_by]})]}),c.jsxs("div",{className:"text-sm text-muted-foreground",children:["Duration: ",g(v.started_at,v.completed_at)]})]}),c.jsxs("div",{className:"mb-2 text-sm text-muted-foreground",children:[c.jsx("span",{className:"font-medium",children:"Started:"})," ",v.started_at?new Date(v.started_at).toLocaleString():"Not started",v.completed_at&&c.jsxs(c.Fragment,{children:[" → ",c.jsx("span",{className:"font-medium",children:"Completed:"})," ",new Date(v.completed_at).toLocaleString()]})]}),v.status==="completed"&&v.result&&c.jsxs("details",{className:"mt-2",children:[c.jsx("summary",{className:"text-sm text-green-600 dark:text-green-400 cursor-pointer hover:underline",children:"View result"}),c.jsx("pre",{className:"mt-2 p-2 bg-muted rounded text-xs overflow-x-auto",children:typeof v.result=="string"?v.result:JSON.stringify(v.result,null,2)})]}),v.status==="failed"&&v.error&&c.jsxs("div",{className:"mt-2 p-2 bg-destructive/10 rounded text-sm text-destructive",children:[c.jsx("strong",{children:"Error:"})," ",v.error]})]},v.id))})]})]})})}const jb=new uP,Brt=20,zrt=[10,20,50,100];function Frt(){const e=bv(),[r,n]=y.useState([]),[i,s]=y.useState({}),[o,a]=y.useState(0),[l,d]=y.useState(1),[u,f]=y.useState(Brt),[p,g]=y.useState(!0),[v,b]=y.useState(null),[_,S]=y.useState(!1),[w,C]=y.useState(null),[j,N]=y.useState(null),A=y.useCallback(async(F,V)=>{g(!0),b(null);try{const Y=await jb.listJobsPage(F,V,!0);n(Y.items),a(Y.total),d(Y.page),f(Y.size);const H={};await Promise.all(Y.items.map(async U=>{try{const J=await jb.getJobRuns(U.id,1);H[U.id]=J[0]||null}catch{H[U.id]=null}})),s(U=>({...U,...H}))}catch(Y){b(Y instanceof Error?Y.message:"Failed to load jobs")}finally{g(!1)}},[]);y.useEffect(()=>{A(l,u)},[A,l,u]);const E=async(F,V)=>{try{const Y=await jb.updateJob(F,{enabled:V});n(H=>H.map(U=>U.id===F?Y:U))}catch(Y){b(Y instanceof Error?Y.message:"Failed to update job")}},R=async F=>{try{const V=await jb.triggerJob(F);s(Y=>({...Y,[F]:V}))}catch(V){b(V instanceof Error?V.message:"Failed to trigger job")}},P=async F=>{if(await e({title:"Delete job",description:"Are you sure you want to delete this job?",confirmLabel:"Delete",variant:"destructive"}))try{await jb.deleteJob(F);const Y=Math.max(0,o-1),H=Math.max(1,Math.ceil(Y/u)),U=Math.min(l,H);d(U),await A(U,u)}catch(Y){b(Y instanceof Error?Y.message:"Failed to delete job")}},B=F=>{d(1),A(1,u),S(!1)},$=F=>{n(V=>V.map(Y=>Y.id===F.id?F:Y)),C(null)},W=Math.max(1,Math.ceil(o/u)),I=o===0?0:(l-1)*u+1,K=Math.min(o,l*u),M=r.filter(F=>F.enabled).length,z=r.filter(F=>F.job_type==="agent_task").length,L=r.filter(F=>F.job_type==="system_job").length;return c.jsxs("div",{className:"container mx-auto max-w-6xl px-3 py-4 sm:px-4 sm:py-6",children:[c.jsxs("div",{className:"mb-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("h1",{className:"flex items-center gap-2 text-xl font-bold sm:text-2xl",children:[c.jsx(w_,{className:"h-6 w-6"}),"Scheduled Jobs"]}),c.jsx("p",{className:"mt-1 text-sm text-muted-foreground sm:text-base",children:"Manage your automated tasks and agent schedules"})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[c.jsxs(_e,{variant:"outline",onClick:()=>void A(l,u),disabled:p,className:"w-full sm:w-auto",children:[c.jsx(Ta,{className:`h-4 w-4 mr-2 ${p?"animate-spin":""}`}),"Refresh"]}),c.jsxs(_e,{onClick:()=>S(!0),className:"w-full sm:w-auto",children:[c.jsx(Ro,{className:"h-4 w-4 mr-2"}),"New Job"]})]})]}),c.jsxs("div",{className:"mb-6 grid grid-cols-2 gap-2 sm:flex sm:flex-wrap sm:items-center sm:gap-4",children:[c.jsxs(nn,{variant:"outline",className:"justify-center px-3 py-1 text-xs sm:text-sm",children:[o," total"]}),c.jsxs(nn,{variant:"default",className:"justify-center px-3 py-1 text-xs sm:text-sm",children:[M," enabled on page"]}),c.jsxs(nn,{variant:"secondary",className:"justify-center px-3 py-1 text-xs sm:text-sm",children:[z," agent tasks on page"]}),c.jsxs(nn,{variant:"secondary",className:"justify-center px-3 py-1 text-xs sm:text-sm",children:[L," system jobs on page"]})]}),v&&c.jsxs("div",{className:"flex items-center gap-2 text-destructive text-sm bg-destructive/10 p-3 rounded-md mb-4",children:[c.jsx(Oa,{className:"h-4 w-4"}),v,c.jsx(_e,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>b(null),children:"Dismiss"})]}),p&&r.length===0?c.jsx("div",{className:"flex items-center justify-center py-24",children:c.jsx(sr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r.length===0?c.jsxs("div",{className:"rounded-lg border-2 border-dashed px-4 py-16 text-center sm:py-24",children:[c.jsx(w_,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),c.jsx("h3",{className:"text-lg font-medium mb-2",children:"No scheduled jobs yet"}),c.jsx("p",{className:"text-muted-foreground mb-4",children:"Create your first job to automate tasks or schedule agent prompts"}),c.jsxs(_e,{onClick:()=>S(!0),children:[c.jsx(Ro,{className:"h-4 w-4 mr-2"}),"Create Your First Job"]})]}):c.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:r.map(F=>c.jsx(Ztt,{job:F,recentRun:i[F.id],onToggle:E,onTrigger:R,onDelete:P,onEdit:C,onViewHistory:N},F.id))}),c.jsxs("div",{className:"mt-6 flex flex-col gap-3 border-t pt-4 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",children:[c.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",I,"–",K," of ",o]}),c.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[c.jsx("label",{className:"text-sm text-muted-foreground",htmlFor:"jobs-page-size",children:"Per page"}),c.jsx("select",{id:"jobs-page-size",className:"h-9 rounded-md border bg-background px-2 text-sm",value:u,onChange:F=>{const V=Number.parseInt(F.target.value,10);!Number.isFinite(V)||V<=0||(d(1),f(V))},children:zrt.map(F=>c.jsx("option",{value:F,children:F},F))}),c.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center gap-2 sm:flex sm:items-center",children:[c.jsxs(_e,{variant:"outline",size:"sm",disabled:l<=1||p,onClick:()=>d(F=>Math.max(1,F-1)),className:"w-full",children:[c.jsx(b9,{className:"h-4 w-4 mr-1"}),"Prev"]}),c.jsxs("span",{className:"text-center text-sm text-muted-foreground tabular-nums",children:["Page ",l," / ",W]}),c.jsxs(_e,{variant:"outline",size:"sm",disabled:l>=W||p,onClick:()=>d(F=>Math.min(W,F+1)),className:"w-full",children:["Next",c.jsx(ao,{className:"h-4 w-4 ml-1"})]})]})]})]}),c.jsx($rt,{isOpen:_||!!w,onClose:()=>{S(!1),C(null)},onCreated:B,editJob:w,onUpdated:$}),c.jsx(Irt,{job:j,isOpen:!!j,onClose:()=>N(null)})]})}function sW({status:e}){switch(e){case"A":case"?":return c.jsx(eC,{className:"h-3.5 w-3.5 text-green-500 shrink-0"});case"D":return c.jsx(f0e,{className:"h-3.5 w-3.5 text-red-500 shrink-0"});case"R":return c.jsx(c0e,{className:"h-3.5 w-3.5 text-blue-500 shrink-0"});default:return c.jsx(nK,{className:"h-3.5 w-3.5 text-yellow-500 shrink-0"})}}function oW(e){switch(e){case"A":return"Added";case"?":return"Untracked";case"D":return"Deleted";case"R":return"Renamed";default:return"Modified"}}function Hrt({cwd:e,baseBranch:r,branch:n,onClose:i}){const[s,o]=y.useState([]),[a,l]=y.useState(!0),[d,u]=y.useState(0),[f,p]=y.useState(()=>typeof window<"u"&&window.innerWidth<960);y.useEffect(()=>{let _=!1;return l(!0),io.fileDiffs(e,r,n).then(S=>{_||(o(S),u(0))}).catch(()=>{_||o([])}).finally(()=>{_||l(!1)}),()=>{_=!0}},[r,n,e]),y.useEffect(()=>{const _=()=>p(window.innerWidth<960);return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]);const g=s[d]??null,v=g?$_(g.path):"plaintext",b=y.useCallback(_=>{_.key==="Escape"?i():_.key==="ArrowDown"||_.key==="j"?(_.preventDefault(),u(S=>Math.min(S+1,s.length-1))):(_.key==="ArrowUp"||_.key==="k")&&(_.preventDefault(),u(S=>Math.max(S-1,0)))},[i,s.length]);return c.jsx("div",{className:"fixed inset-0 z-[100] bg-background/80 backdrop-blur-sm flex items-center justify-center p-4",onKeyDown:b,tabIndex:-1,children:c.jsxs("div",{className:"bg-popover border rounded-lg shadow-xl w-full max-w-6xl h-[85vh] flex flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nK,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h3",{className:"text-sm font-medium",children:"Changes"}),!a&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.length," file",s.length!==1?"s":""," changed"]})]}),c.jsx(_e,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:i,children:c.jsx(Zn,{className:"h-4 w-4"})})]}),a?c.jsx("div",{className:"flex-1 flex items-center justify-center",children:c.jsx(sr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):s.length===0?c.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No changes detected."}):c.jsxs("div",{className:Ue("flex-1 flex min-h-0",f&&"flex-col"),children:[c.jsxs("div",{className:Ue("border-r flex flex-col shrink-0 bg-muted/20",f?"w-full border-r-0 border-b max-h-40":"w-56"),children:[c.jsx("div",{className:"px-3 py-2 border-b",children:c.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Files"})}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:s.map((_,S)=>c.jsxs("button",{className:Ue("flex items-center gap-2 w-full px-3 py-1.5 text-left text-xs hover:bg-accent/50 transition-colors",S===d&&"bg-accent"),onClick:()=>u(S),title:`${_.path} (${oW(_.status)})`,children:[c.jsx(sW,{status:_.status}),c.jsx("span",{className:"truncate font-mono",children:_.path.split(/[/\\]/).pop()})]},_.path))})]}),c.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b bg-muted/10 shrink-0",children:[c.jsx(sW,{status:(g==null?void 0:g.status)??"M"}),c.jsx("span",{className:"text-xs font-mono text-muted-foreground truncate",children:g==null?void 0:g.path}),c.jsx("span",{className:Ue("text-2xs px-1.5 py-0.5 rounded font-medium",(g==null?void 0:g.status)==="A"||(g==null?void 0:g.status)==="?"?"bg-green-500/10 text-green-500":(g==null?void 0:g.status)==="D"?"bg-red-500/10 text-red-500":"bg-yellow-500/10 text-yellow-500"),children:oW((g==null?void 0:g.status)??"M")})]}),c.jsx("div",{className:"flex-1 min-h-0",children:g&&c.jsx(O2,{original:g.original,modified:g.modified,language:v,modelKey:g.path,className:"h-full",editorClassName:"h-full",renderSideBySide:!f,options:{readOnly:!0,minimap:{enabled:!1},renderOverviewRuler:!0,ignoreTrimWhitespace:!1,enableSplitViewResizing:!0}},g.path)})]})]})]})})}const aW={github:{placeholder:"ghp_... or github_pat_...",createUrl:"https://github.com/settings/tokens/new?scopes=repo,read:org,workflow&description=Jait+CLI",createLabel:"Create a GitHub token",scopes:"repo, read:org, and workflow",cliName:"gh",cliUrl:"https://cli.github.com"},gitlab:{placeholder:"glpat-...",createUrl:"https://gitlab.com/-/user_settings/personal_access_tokens",createLabel:"Create a GitLab token",scopes:"api and write_repository",cliName:"glab",cliUrl:"https://gitlab.com/gitlab-org/cli"},gitea:{placeholder:"your-gitea-token",createUrl:"",createLabel:"Create a token in your Gitea settings",scopes:"repo access",cliName:"tea",cliUrl:"https://gitea.com/gitea/tea"},"azure-devops":{placeholder:"your-azure-devops-pat",createUrl:"https://dev.azure.com/_usersSettings/tokens",createLabel:"Create an Azure DevOps PAT",scopes:"Code (Read & Write)",cliName:"az",cliUrl:"https://learn.microsoft.com/en-us/cli/azure/install-azure-cli"},bitbucket:{placeholder:"your-bitbucket-app-password",createUrl:"https://bitbucket.org/account/settings/app-passwords/",createLabel:"Create a Bitbucket app password",scopes:"Repositories (Read/Write) and Pull Requests (Read/Write)"}};function Wrt({open:e,onOpenChange:r,cwd:n,remoteUrl:i,onReady:s}){const[o,a]=y.useState("checking"),[l,d]=y.useState(null),[u,f]=y.useState(""),[p,g]=y.useState(null),v=(l==null?void 0:l.provider)??"github",b=(l==null?void 0:l.forgeName)??"Git Forge",_=aW[v]??aW.github,S=y.useCallback(async()=>{a("checking"),g(null);try{const j=await io.forgeStatus(n,i);d(j),!j.installed&&!j.authenticated?a("not-installed"):j.authenticated?a("success"):a("not-authenticated")}catch(j){g(j instanceof Error?j.message:"Failed to check forge status"),a("error")}},[n,i]);y.useEffect(()=>{e&&(S(),f(""))},[e,S]);const w=y.useCallback(async()=>{if(u.trim()){a("authenticating"),g(null);try{const j=await io.forgeAuth(u.trim(),n,i);j.ok?(d(N=>N&&{...N,authenticated:!0,username:j.username}),a("success"),f("")):(g(j.error??"Authentication failed — check your token permissions."),a("not-authenticated"))}catch(j){g(j instanceof Error?j.message:"Authentication failed"),a("not-authenticated")}}},[u,n,i]),C=y.useCallback(()=>{r(!1),s==null||s()},[r,s]);return c.jsx($h,{open:e,onOpenChange:r,children:c.jsxs(jd,{className:"max-w-md",children:[c.jsxs(Eh,{children:[c.jsxs(bd,{children:[b," Setup"]}),c.jsxs(v0,{children:["Pull request creation requires authentication with ",b,"."]})]}),o==="checking"&&c.jsxs("div",{className:"flex items-center gap-3 py-4",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",b," status…"]})]}),(o==="not-installed"||o==="not-authenticated")&&c.jsxs("div",{className:"space-y-4 py-2",children:[c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Th,{className:`h-5 w-5 mt-0.5 shrink-0 ${o==="not-installed"?"text-red-500":"text-amber-500"}`}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm font-medium",children:o==="not-installed"?`${b} CLI not detected`:`${b} is not authenticated`}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Paste a Personal Access Token with ",_.scopes," scope to sign in."]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(wi,{htmlFor:"forge-token",className:"text-xs",children:"Personal Access Token"}),c.jsx(Hn,{id:"forge-token",type:"password",placeholder:_.placeholder,value:u,onChange:j=>f(j.target.value),onKeyDown:j=>{j.key==="Enter"&&w()},autoFocus:!0}),c.jsxs("p",{className:"text-2xs text-muted-foreground",children:[_.createUrl?c.jsx("a",{href:_.createUrl,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:_.createLabel}):c.jsx("span",{children:_.createLabel})," ","with ",c.jsx("code",{className:"text-2xs",children:_.scopes})," permissions."]})]}),o==="not-installed"&&_.cliName&&_.cliUrl&&c.jsxs("p",{className:"text-2xs text-muted-foreground",children:["Optionally install the ",c.jsx("code",{className:"text-2xs",children:_.cliName})," CLI:"," ",c.jsx("a",{href:_.cliUrl,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:_.cliUrl})]}),p&&c.jsx("p",{className:"text-xs text-red-500",children:p})]}),o==="authenticating"&&c.jsxs("div",{className:"flex items-center gap-3 py-4",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Authenticating with ",b,"…"]})]}),o==="success"&&c.jsxs("div",{className:"flex items-start gap-3 py-4",children:[c.jsx(ql,{className:"h-5 w-5 text-green-500 mt-0.5 shrink-0"}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("p",{className:"text-sm font-medium",children:["Authenticated",l!=null&&l.username?` as ${l.username}`:""," on ",b]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"You can now create pull requests."})]})]}),o==="error"&&c.jsxs("div",{className:"flex items-start gap-3 py-4",children:[c.jsx(Th,{className:"h-5 w-5 text-red-500 mt-0.5 shrink-0"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm font-medium",children:"Something went wrong"}),p&&c.jsx("p",{className:"text-xs text-muted-foreground",children:p})]})]}),c.jsxs(xv,{children:[(o==="not-installed"||o==="not-authenticated"||o==="error")&&c.jsxs(c.Fragment,{children:[o==="error"&&c.jsx(_e,{variant:"outline",size:"sm",onClick:()=>void S(),children:"Re-check"}),c.jsx(_e,{size:"sm",disabled:!u.trim(),onClick:()=>void w(),children:"Sign in"})]}),o==="success"&&c.jsx(_e,{size:"sm",onClick:C,children:"Continue"})]})]})})}const Urt=Wrt;function BO(e,r){return e?r==="creating"||r==="open"||r==="merged"||r==="closed":!1}function lW(e,r,n){return r?BO(r,n)?{baseBranch:e,branch:r}:{baseBranch:e}:{}}function Vrt(e,r,n){return e?e.hasWorkingTreeChanges||!(n==="merged"||n==="closed")?!0:!!r:!1}function qrt({hasRepository:e,threadKind:r,threadStatus:n,threadBranch:i,prUrl:s,prState:o}){return!e||r!=="delivery"?!1:!!(i||n==="completed"||s||o==="creating"||o==="open")}function Grt({insertions:e,deletions:r}){return c.jsxs("span",{className:"inline-flex items-center gap-1 font-medium tabular-nums",children:[c.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["+",e]}),c.jsxs("span",{className:"text-red-600 dark:text-red-400",children:["-",r]})]})}function dP({threadId:e,cwd:r,branch:n,baseBranch:i,threadTitle:s,prUrl:o,prState:a,threadStatus:l,threadKind:d="delivery",showStatusBadge:u=!0}){var ee;const f=Cv(),[p,g]=y.useState(!1),[v,b]=y.useState(!1),[_,S]=y.useState(!1),[w,C]=y.useState(null),[j,N]=y.useState(null),A=y.useRef(!1),E=y.useRef(!1),[R,P]=y.useState(o?{url:o,kind:"created"}:null);y.useEffect(()=>{P(re=>o?{url:o,kind:"created"}:(re==null?void 0:re.kind)==="create"?re:null)},[o]),y.useEffect(()=>{let re=!1;const de=BO(n,a),fe=lW(i,n,a);return(async()=>{try{const ie=await io.status(r,de?void 0:n??void 0),ge=n?await io.diffStats(r,fe.baseBranch,fe.branch).catch(()=>null):null;if(re)return;if(C(ie),ge){N({insertions:ge.insertions,deletions:ge.deletions,hasChanges:ge.hasChanges});return}if(n){N(null);return}N({insertions:ie.index.insertions+ie.workingTree.insertions,deletions:ie.index.deletions+ie.workingTree.deletions,hasChanges:ie.hasWorkingTreeChanges})}catch{re||(C(null),N(null))}})(),()=>{re=!0}},[i,n,r,l,o,a]);const[B,$]=y.useState(null),W=y.useRef(null);y.useEffect(()=>{if(!n||!o||a==="merged"||a==="closed"){$(null),W.current&&(clearInterval(W.current),W.current=null);return}const re=async()=>{try{const de=await io.prChecks(r,n);if(!de||de.length===0){$(null);return}const fe=de.some(ie=>ie.conclusion==="failure"||ie.conclusion==="cancelled"),te=de.some(ie=>ie.state==="PENDING"||ie.state==="QUEUED"||ie.state==="IN_PROGRESS"||!ie.conclusion);$(fe?"failing":te?"pending":"passing")}catch{}};return re(),W.current=setInterval(re,15e3),()=>{W.current&&(clearInterval(W.current),W.current=null)}},[n,r,o,a]);const I=R??(o?{url:o,kind:"created"}:null)??((ee=w==null?void 0:w.pr)!=null&&ee.url?{url:w.pr.url,kind:"created"}:null),K=a==="creating"&&(I==null?void 0:I.kind)==="created"?"open":a,M=BO(n,K),z=lW(i,n,K),L=K==="creating",F=M?!!(j!=null&&j.hasChanges):Vrt(w,n,K),V=L&&!I?"Creating PR...":I?I.kind==="created"?"Open PR":"Open PR Page":"Create Pull Request",Y=L&&!I?"Creating pull request":I?V:"Create pull request",H=d==="delivery"&&(I!=null||l==="completed"),U=p||L,J=y.useCallback(async()=>{if(I){window.open(I.url,"_blank");return}if(l!=="completed"){fi.error("Thread not completed",{description:"Finish the thread before creating a pull request."});return}if(d!=="delivery"){fi.error("PR creation unavailable",{description:"Delegation threads are helper workers and do not create pull requests."});return}if(g(!0),!E.current)try{if((await io.status(r)).prProvider==="github"){const de=await io.ghStatus(r);if(!de.installed||!de.authenticated){g(!1),A.current=!0,S(!0);return}}}catch{}E.current=!1;try{const re=s.replace(/^\[.*?\]\s*/,""),de=await tn.createPullRequest(e,{commitMessage:re,baseBranch:i}),fe=de.result;de.pushFailed?de.resumed?fi.info("Push failed — thread resumed",{description:"The agent is investigating the push failure and will fix the issue."}):fi.error("Push failed",{description:de.error??"Git push failed. Re-open the thread to fix the issue."}):fe.pr.url?P({url:fe.pr.url,kind:"created"}):fe.push.createPrUrl&&P({url:fe.push.createPrUrl,kind:"create"})}catch(re){fi.error("Failed",{description:re instanceof Error?re.message:"Unknown error"})}finally{g(!1)}},[i,r,e,d,l,s,I]),q=y.useCallback(()=>{A.current&&(A.current=!1,E.current=!0,J())},[J]);return c.jsxs(c.Fragment,{children:[c.jsx(Urt,{open:_,onOpenChange:S,cwd:r,onReady:q}),c.jsxs("div",{className:"inline-flex items-center gap-1",children:[F&&j&&c.jsxs(_e,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs sm:h-6 sm:text-2xs",onClick:()=>b(!0),title:"View changes","aria-label":`View changes: +${j.insertions} -${j.deletions}`,children:[c.jsx(Grt,{insertions:j.insertions,deletions:j.deletions}),!f&&"Changes"]}),c.jsxs(_e,{variant:"ghost",size:"sm",className:"h-7 min-w-8 gap-1 px-2 text-xs sm:h-6 sm:min-w-7 sm:text-2xs",disabled:U||!H,onClick:J,title:d!=="delivery"?"Delegation threads do not create pull requests.":!I&&l!=="completed"?"Finish the thread before creating a pull request.":Y,"aria-label":Y,children:[U?c.jsx(sr,{className:"h-3.5 w-3.5 animate-spin sm:h-3 sm:w-3"}):c.jsx(S0e,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3"}),!f&&V]}),u&&I&&c.jsx(nn,{variant:"outline",className:`h-5 px-1.5 text-2xs font-medium ${K==="merged"?"border-purple-500/40 text-purple-700 bg-purple-500/10 dark:text-purple-300 dark:bg-purple-500/20 dark:border-purple-400/40":K==="closed"?"border-red-500/40 text-red-700 bg-red-500/10 dark:text-red-300 dark:bg-red-500/20 dark:border-red-400/40":K==="creating"?"border-amber-500/40 text-amber-700 bg-amber-500/10 dark:text-amber-300 dark:bg-amber-500/20 dark:border-amber-400/40":I.kind==="created"?"border-green-500/40 text-green-700 dark:text-green-300 dark:border-green-400/40":"border-amber-500/40 text-amber-700 dark:text-amber-300 dark:border-amber-400/40"}`,children:K==="merged"?"PR merged":K==="closed"?"PR closed":K==="creating"?"PR creating":I.kind==="created"?"PR open":"PR ready to open"}),u&&(I==null?void 0:I.kind)==="created"&&K==="open"&&B&&c.jsxs(nn,{variant:"outline",className:`h-5 px-1.5 text-2xs font-medium inline-flex items-center gap-0.5 ${B==="failing"?"border-red-500/40 text-red-700 bg-red-500/10 dark:text-red-300 dark:bg-red-500/20 dark:border-red-400/40":B==="pending"?"border-amber-500/40 text-amber-700 bg-amber-500/10 dark:text-amber-300 dark:bg-amber-500/20 dark:border-amber-400/40":"border-green-500/40 text-green-700 bg-green-500/10 dark:text-green-300 dark:bg-green-500/20 dark:border-green-400/40"}`,children:[B==="failing"?c.jsx(Th,{className:"h-3 w-3"}):B==="pending"?c.jsx(Ym,{className:"h-3 w-3"}):c.jsx(ql,{className:"h-3 w-3"}),B==="failing"?"Checks failing":B==="pending"?"Checks pending":"Checks passed"]})]}),v&&c.jsx(Hrt,{cwd:r,baseBranch:z.baseBranch,branch:z.branch,onClose:()=>b(!1)})]})}const Krt={bundled:"bg-sky-500/10 text-sky-600",user:"bg-amber-500/10 text-amber-600",workspace:"bg-emerald-500/10 text-emerald-600",plugin:"bg-fuchsia-500/10 text-fuchsia-600"},Yrt=[{pattern:/\b(debug|bug|troubleshoot|fix)\b/i,icon:N8},{pattern:/\b(review|audit|security|secure|vuln)\b/i,icon:W0e},{pattern:/\b(test|qa|spec)\b/i,icon:Zye},{pattern:/\b(perf|performance|optimi[sz]e|latency|profil)\b/i,icon:T8},{pattern:/\b(arch|design|system|topology|diagram)\b/i,icon:oye},{pattern:/\b(research|investigate|search|explore)\b/i,icon:Vl},{pattern:/\b(data|analysis|analytics|report)\b/i,icon:T8},{pattern:/\b(code|generate|scaffold|tool|workflow)\b/i,icon:T9}];function Xrt(e){const r=`${e.id} ${e.name} ${e.description}`,n=Yrt.find(({pattern:i})=>i.test(r));return{icon:(n==null?void 0:n.icon)??yge,className:Krt[e.source]}}function Zrt(e){return e.open&&!e.attemptedLoad&&e.skillsLength===0&&!e.loading}const Jrt=Ln();function Qrt({token:e,threadId:r,selectedSkillIds:n}){const[i,s]=y.useState(!1),[o,a]=y.useState([]),[l,d]=y.useState(!1),[u,f]=y.useState(null),[p,g]=y.useState(!1),[v,b]=y.useState(!1),_=y.useCallback(async()=>{d(!0),f(null);try{const A={};e&&(A.Authorization=`Bearer ${e}`);const E=await fetch(`${Jrt}/api/skills`,{headers:A});if(!E.ok)throw new Error(`Failed to load skills (HTTP ${E.status})`);const R=await E.json();a(R)}catch(A){f(A instanceof Error?A.message:"Failed to load skills")}finally{d(!1),g(!0)}},[e]);y.useEffect(()=>{Zrt({open:i,attemptedLoad:p,skillsLength:o.length,loading:l})&&_()},[p,_,l,i,o.length]);const S=y.useMemo(()=>o.filter(A=>A.enabled),[o]),w=n??S.map(A=>A.id),C=n===null,j=y.useCallback(async A=>{b(!0);try{await tn.updateThread(r,{skillIds:A})}finally{b(!1)}},[r]),N=y.useCallback(async(A,E)=>{const R=E?[...new Set([...w,A])]:w.filter(P=>P!==A);await j(R)},[w,j]);return c.jsxs(G9,{open:i,onOpenChange:s,children:[c.jsx(K9,{asChild:!0,children:c.jsxs(_e,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-[10px] text-muted-foreground",children:[c.jsx(P0e,{className:"h-3 w-3"}),C?"Skills:auto":`Skills:${(n==null?void 0:n.length)??0}`]})}),c.jsxs(Y9,{align:"end",className:"w-80 space-y-3 p-3",children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium",children:"Thread skills"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:C?"Uses globally enabled skills.":"Uses only pinned skills for this thread."})]}),C?c.jsx(nn,{variant:"secondary",className:"text-[10px]",children:"global"}):c.jsx(nn,{variant:"outline",className:"text-[10px]",children:"custom"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(_e,{size:"sm",variant:C?"secondary":"outline",className:"h-7 text-xs",disabled:v,onClick:()=>void j(null),children:"Global"}),c.jsx(_e,{size:"sm",variant:!C&&((n==null?void 0:n.length)??0)===0?"secondary":"outline",className:"h-7 text-xs",disabled:v,onClick:()=>void j([]),children:"None"})]}),l?c.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted-foreground",children:[c.jsx(sr,{className:"h-4 w-4 animate-spin"}),"Loading skills..."]}):u?c.jsxs("div",{className:"space-y-3 rounded-lg border border-destructive/50 bg-destructive/5 p-3",children:[c.jsxs("div",{className:"flex items-start gap-2 text-sm text-destructive",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0"}),c.jsx("span",{children:u})]}),c.jsx(_e,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>{g(!1),_()},children:"Retry"})]}):S.length===0?c.jsx("div",{className:"rounded-lg border border-dashed p-4 text-xs text-muted-foreground",children:"No enabled skills. Install/enable ClawHub skills in Settings."}):c.jsx("div",{className:"max-h-64 space-y-2 overflow-y-auto pr-1",children:S.map(A=>{const E=w.includes(A.id),R=Xrt(A),P=R.icon;return c.jsxs("div",{className:"flex items-start gap-3 rounded-lg border p-2.5",children:[c.jsx("div",{className:`mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md ${R.className}`,children:c.jsx(P,{className:"h-3.5 w-3.5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate text-sm font-medium",children:A.name}),c.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:A.description})]}),c.jsx(Kf,{checked:E,disabled:v||C,onCheckedChange:B=>{N(A.id,B)}})]},A.id)})})]})]})}function ent({open:e,onOpenChange:r,repoId:n,repoName:i}){const s=bv(),[o,a]=y.useState(""),[l,d]=y.useState(""),[u,f]=y.useState(!1),[p,g]=y.useState(!1),[v,b]=y.useState(!1),[_,S]=y.useState(null),w=o!==l,C=Aj();y.useEffect(()=>{if(!e||!n)return;let R=!1;return f(!0),S(null),tn.getRepoStrategy(n).then(P=>{R||(a(P),d(P))}).catch(P=>{R||S(P instanceof Error?P.message:"Failed to load strategy")}).finally(()=>{R||f(!1)}),()=>{R=!0}},[e,n]);const j=y.useCallback(async()=>{g(!0),S(null);try{const R=await tn.updateRepoStrategy(n,o);d(R),a(R)}catch(R){S(R instanceof Error?R.message:"Failed to save strategy")}finally{g(!1)}},[n,o]),N=y.useCallback(async()=>{b(!0),S(null);try{const R=await tn.generateRepoStrategy(n);R&&a(R)}catch(R){S(R instanceof Error?R.message:"Failed to generate strategy")}finally{b(!1)}},[n]),A=y.useCallback(()=>{a(l)},[l]),E=y.useCallback(R=>{if(R||!w){r(R);return}(async()=>await s({title:"Discard changes",description:"You have unsaved changes. Discard them?",confirmLabel:"Discard",variant:"destructive"})&&r(!1))()},[s,w,r]);return c.jsx($h,{open:e,onOpenChange:E,children:c.jsxs(jd,{className:"flex max-h-[85vh] w-full max-w-3xl flex-col gap-0 overflow-hidden p-0",children:[c.jsx(Eh,{className:"shrink-0 border-b px-4 py-3",children:c.jsxs(bd,{className:"flex items-center gap-2 text-sm",children:[c.jsx("span",{children:"Strategy"}),c.jsx("span",{className:"text-muted-foreground",children:"—"}),c.jsx("span",{className:"font-normal text-muted-foreground",children:i}),w&&c.jsx("span",{className:"ml-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-2xs text-amber-600 dark:text-amber-400",children:"unsaved"})]})}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[u?c.jsx("div",{className:"flex flex-1 items-center justify-center py-12",children:c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):c.jsxs("div",{className:"relative min-h-0 flex-1",children:[c.jsx(Oj,{height:"55vh",language:"markdown",beforeMount:C0,theme:C,value:o,onChange:R=>a(R??""),options:{minimap:{enabled:!1},lineNumbers:"off",wordWrap:"on",fontSize:13,padding:{top:12,bottom:12},scrollBeyondLastLine:!1,renderLineHighlight:"none",overviewRulerLanes:0,folding:!0,tabSize:2}}),!o.trim()&&c.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center px-8 text-center",children:c.jsxs("div",{className:"max-w-md space-y-2",children:[c.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Add repository guidance for your agents"}),c.jsxs("p",{className:"text-xs leading-5 text-muted-foreground/80",children:["This works like a ",c.jsx("code",{children:"CLAUDE.md"})," or ",c.jsx("code",{children:"AGENTS.md"})," file: describe build commands, test workflow, code conventions, and repo-specific rules."]})]})})]}),_&&c.jsx("div",{className:"border-t bg-destructive/5 px-4 py-2 text-xs text-destructive",children:_})]}),c.jsx(xv,{className:"shrink-0 border-t px-4 py-3",children:c.jsxs("div",{className:"flex w-full items-center justify-between",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(_e,{variant:"outline",size:"sm",className:"gap-1.5 text-xs",disabled:v||u,onClick:N,children:[v?c.jsx(sr,{className:"h-3.5 w-3.5 animate-spin"}):c.jsx(Y_,{className:"h-3.5 w-3.5"}),"Generate template"]}),w&&c.jsxs(_e,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs",onClick:A,children:[c.jsx(dK,{className:"h-3.5 w-3.5"}),"Reset"]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(_e,{variant:"ghost",size:"sm",className:"text-xs",onClick:()=>r(!1),children:"Cancel"}),c.jsxs(_e,{size:"sm",className:"gap-1.5 text-xs",disabled:!w||p||u,onClick:j,children:[p?c.jsx(sr,{className:"h-3.5 w-3.5 animate-spin"}):c.jsx(N9,{className:"h-3.5 w-3.5"}),"Save"]})]})]})})]})})}const tnt={proposed:{label:"Proposed",color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-500/10"},approved:{label:"Ready",color:"text-green-600 dark:text-green-400",bg:"bg-green-500/10"},running:{label:"Running",color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-500/10"},completed:{label:"Done",color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-500/10"},skipped:{label:"Skipped",color:"text-muted-foreground",bg:"bg-muted/50"}};function rnt({status:e}){const r=tnt[e];return c.jsx("span",{className:`inline-flex items-center rounded-full px-1.5 py-0.5 text-2xs font-medium ${r.color} ${r.bg}`,children:r.label})}function nnt({open:e,onOpenChange:r,repoId:n,repoName:i,defaultBranch:s,repoLocalPath:o,provider:a,model:l,onStartThread:d}){const u=bv(),[f,p]=y.useState([]),[g,v]=y.useState(null),[b,_]=y.useState(!1),[S,w]=y.useState(!1),[C,j]=y.useState(null),[N,A]=y.useState(""),[E,R]=y.useState(new Set),[P,B]=y.useState(null),[$,W]=y.useState(""),[I,K]=y.useState(""),M=f.find(te=>te.id===g)??f[0]??null;y.useEffect(()=>{if(!e||!n)return;let te=!1;return _(!0),j(null),tn.listPlans(n).then(ie=>{te||(p(ie),ie.length>0&&!g&&v(ie[0].id))}).catch(ie=>{te||j(ie instanceof Error?ie.message:"Failed to load plans")}).finally(()=>{te||_(!1)}),()=>{te=!0}},[e,n]);const z=y.useCallback(async()=>{j(null);try{const te=await tn.createPlan(n,{title:"New Plan"});p(ie=>[te,...ie]),v(te.id)}catch(te){j(te instanceof Error?te.message:"Failed to create plan")}},[n]),L=y.useCallback(async()=>{if(M){w(!0),j(null);try{const te=await tn.generatePlanTasks(M.id,{prompt:N||void 0,provider:a,model:a==="jait"?null:l??null});p(ie=>ie.map(ge=>ge.id===te.plan.id?te.plan:ge)),A("")}catch(te){j(te instanceof Error?te.message:"Failed to generate tasks")}finally{w(!1)}}},[M,N,l,a]),F=y.useCallback(async(te,ie)=>{if(!M)return;const ge=M.tasks.map(le=>le.id===te?{...le,status:ie}:le);try{const le=await tn.updatePlan(M.id,{tasks:ge});p(Qe=>Qe.map(Ze=>Ze.id===le.id?le:Ze))}catch(le){j(le instanceof Error?le.message:"Failed to update task")}},[M]),V=y.useCallback(async te=>{if(!M)return;const ie=M.tasks.filter(ge=>ge.id!==te);try{const ge=await tn.updatePlan(M.id,{tasks:ie});p(le=>le.map(Qe=>Qe.id===ge.id?ge:Qe))}catch(ge){j(ge instanceof Error?ge.message:"Failed to remove task")}},[M]),Y=y.useCallback(async()=>{if(!M||!P)return;const te=M.tasks.map(ie=>ie.id===P?{...ie,title:$,description:I}:ie);try{const ie=await tn.updatePlan(M.id,{tasks:te});p(ge=>ge.map(le=>le.id===ie.id?ie:le)),B(null)}catch(ie){j(ie instanceof Error?ie.message:"Failed to save task")}},[M,P,$,I]),H=y.useCallback(async te=>{if(M){j(null);try{await tn.startPlanTask(M.id,te.id),d(te,M,{name:i,localPath:o,defaultBranch:s}),p(ie=>ie.map(ge=>ge.id===M.id?{...ge,tasks:ge.tasks.map(le=>le.id===te.id?{...le,status:"running"}:le)}:ge))}catch(ie){j(ie instanceof Error?ie.message:"Failed to start task")}}},[M,i,o,s,d]),U=y.useCallback(async()=>{if(!M)return;j(null);const te=M.tasks.filter(ge=>ge.status==="approved"||ge.status==="proposed");if(te.length===0){j("No tasks to start. Approve some tasks first, or generate new ones.");return}const ie=M.tasks.map(ge=>ge.status==="proposed"?{...ge,status:"approved"}:ge);try{const ge=await tn.updatePlan(M.id,{tasks:ie,status:"active"});p(le=>le.map(Qe=>Qe.id===ge.id?ge:Qe))}catch{}for(const ge of te)try{d(ge,M,{name:i,localPath:o,defaultBranch:s}),p(le=>le.map(Qe=>Qe.id===M.id?{...Qe,tasks:Qe.tasks.map(Ze=>Ze.id===ge.id?{...Ze,status:"running"}:Ze)}:Qe)),await new Promise(le=>setTimeout(le,500))}catch{}},[M,i,o,s,d]),J=y.useCallback(async()=>{if(!(!M||!await u({title:"Delete plan",description:`Delete plan "${M.title}"?`,confirmLabel:"Delete",variant:"destructive"})))try{await tn.deletePlan(M.id),p(ie=>ie.filter(ge=>ge.id!==M.id)),v(null)}catch(ie){j(ie instanceof Error?ie.message:"Failed to delete plan")}},[M,u]),q=te=>{R(ie=>{const ge=new Set(ie);return ge.has(te)?ge.delete(te):ge.add(te),ge})},ee=te=>{B(te.id),W(te.title),K(te.description),R(ie=>new Set(ie).add(te.id))},re=(M==null?void 0:M.tasks.filter(te=>te.status==="approved"||te.status==="proposed").length)??0,de=(M==null?void 0:M.tasks.filter(te=>te.status==="completed").length)??0,fe=(M==null?void 0:M.tasks.length)??0;return c.jsx($h,{open:e,onOpenChange:r,children:c.jsxs(jd,{className:"flex max-h-[85vh] w-full max-w-2xl flex-col gap-0 overflow-hidden p-0",children:[c.jsx(Eh,{className:"shrink-0 border-b px-4 py-3",children:c.jsxs(bd,{className:"flex items-center gap-2 text-sm",children:[c.jsx("span",{children:"Plans"}),c.jsx("span",{className:"text-muted-foreground",children:"—"}),c.jsx("span",{className:"font-normal text-muted-foreground",children:i}),M&&fe>0&&c.jsxs("span",{className:"ml-auto text-2xs text-muted-foreground",children:[de,"/",fe," done"]})]})}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[b?c.jsx("div",{className:"flex flex-1 items-center justify-center py-12",children:c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):M?c.jsxs(c.Fragment,{children:[f.length>1&&c.jsxs("div",{className:"flex items-center gap-2 border-b px-4 py-2",children:[c.jsx("select",{className:"flex-1 rounded border bg-transparent px-2 py-1 text-xs",value:M.id,onChange:te=>v(te.target.value),children:f.map(te=>c.jsxs("option",{value:te.id,children:[te.title," (",te.tasks.length," tasks)"]},te.id))}),c.jsx(_e,{variant:"ghost",size:"sm",className:"h-6 px-2 text-2xs",onClick:z,children:c.jsx(Ro,{className:"h-3 w-3"})})]}),c.jsxs("div",{className:"flex items-center gap-2 border-b px-4 py-2",children:[c.jsx(Hn,{placeholder:"Describe what you want to accomplish…",className:"h-8 flex-1 text-xs",value:N,onChange:te=>A(te.target.value),onKeyDown:te=>{te.key==="Enter"&&!te.shiftKey&&(te.preventDefault(),L())}}),c.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:S,onClick:()=>void L(),children:[S?c.jsx(sr,{className:"h-3.5 w-3.5 animate-spin"}):c.jsx(Y_,{className:"h-3.5 w-3.5"}),"Generate"]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:M.tasks.length===0?c.jsx("div",{className:"flex flex-col items-center justify-center gap-2 py-8",children:c.jsx("p",{className:"text-xs text-muted-foreground",children:"No tasks yet. Use the prompt above to generate tasks, or add them manually."})}):c.jsx("div",{className:"divide-y",children:M.tasks.map(te=>{const ie=E.has(te.id),ge=P===te.id,le=te.status==="proposed"||te.status==="approved",Qe=te.status==="proposed"||te.status==="approved";return c.jsxs("div",{className:"px-4 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",className:"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground",onClick:()=>q(te.id),children:ie?c.jsx(hl,{className:"h-3.5 w-3.5"}):c.jsx(ao,{className:"h-3.5 w-3.5"})}),c.jsx(rnt,{status:te.status}),ge?c.jsx(Hn,{className:"h-6 flex-1 text-xs",value:$,onChange:Ze=>W(Ze.target.value),onKeyDown:Ze=>{Ze.key==="Enter"&&Y(),Ze.key==="Escape"&&B(null)},autoFocus:!0}):c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[c.jsx("span",{className:`min-w-0 flex-1 truncate text-xs ${te.status==="skipped"?"line-through text-muted-foreground":"font-medium"}`,children:te.title}),te.skillCandidate&&c.jsx("span",{className:"inline-flex shrink-0 items-center rounded-full bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-medium text-violet-600 dark:text-violet-400",children:"skill"})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[le&&c.jsx("button",{type:"button",title:"Start thread",className:"rounded p-1 text-green-600 hover:bg-green-500/10 dark:text-green-400",onClick:()=>void H(te),children:c.jsx(F4,{className:"h-3.5 w-3.5",fill:"currentColor"})}),te.status==="proposed"&&c.jsx("button",{type:"button",title:"Approve",className:"rounded p-1 text-green-600 hover:bg-green-500/10 dark:text-green-400",onClick:()=>void F(te.id,"approved"),children:c.jsx(hs,{className:"h-3.5 w-3.5"})}),Qe&&c.jsx("button",{type:"button",title:"Skip",className:"rounded p-1 text-muted-foreground hover:bg-muted",onClick:()=>void F(te.id,"skipped"),children:c.jsx(zye,{className:"h-3.5 w-3.5"})}),!ge&&(te.status==="proposed"||te.status==="approved")&&c.jsx("button",{type:"button",title:"Edit",className:"rounded p-1 text-muted-foreground hover:bg-muted",onClick:()=>ee(te),children:c.jsx(j9,{className:"h-3 w-3"})}),ge&&c.jsx("button",{type:"button",title:"Save",className:"rounded p-1 text-green-600 hover:bg-green-500/10",onClick:()=>void Y(),children:c.jsx(hs,{className:"h-3.5 w-3.5"})}),(te.status==="proposed"||te.status==="approved"||te.status==="skipped")&&c.jsx("button",{type:"button",title:"Remove",className:"rounded p-1 text-muted-foreground hover:text-destructive",onClick:()=>void V(te.id),children:c.jsx(_h,{className:"h-3 w-3"})})]})]}),ie&&c.jsxs("div",{className:"mt-2 pl-6",children:[ge?c.jsx("textarea",{className:"w-full rounded border bg-transparent px-2 py-1.5 text-xs leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary",rows:4,value:I,onChange:Ze=>K(Ze.target.value)}):c.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground",children:te.description||"No description."}),te.threadId&&c.jsxs("p",{className:"mt-1 text-2xs text-muted-foreground",children:["Thread: ",c.jsx("code",{className:"rounded bg-muted px-1",children:te.threadId.slice(-8)})]}),(te.skillCandidate||te.skillRationale||te.skillTitle)&&c.jsxs("div",{className:"mt-2 rounded-md border border-violet-500/20 bg-violet-500/5 px-2 py-1.5 text-[10px] text-muted-foreground",children:[c.jsxs("p",{children:["Skill eval: ",te.skillCandidate?"yes":"no",te.skillTitle?` · ${te.skillTitle}`:""]}),te.skillRationale&&c.jsx("p",{className:"mt-1 whitespace-pre-wrap",children:te.skillRationale})]})]})]},te.id)})})})]}):c.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 py-12",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No plans yet for this repository."}),c.jsxs(_e,{size:"sm",className:"gap-1.5 text-xs",onClick:z,children:[c.jsx(Ro,{className:"h-3.5 w-3.5"}),"Create plan"]})]}),C&&c.jsx("div",{className:"border-t bg-destructive/5 px-4 py-2 text-xs text-destructive",children:C})]}),c.jsx(xv,{className:"shrink-0 border-t px-4 py-3",children:c.jsxs("div",{className:"flex w-full items-center justify-between",children:[c.jsxs("div",{className:"flex gap-2",children:[!M&&c.jsxs(_e,{size:"sm",className:"gap-1.5 text-xs",onClick:z,children:[c.jsx(Ro,{className:"h-3.5 w-3.5"}),"New plan"]}),M&&c.jsxs(_e,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-destructive hover:text-destructive",onClick:()=>void J(),children:[c.jsx(_h,{className:"h-3.5 w-3.5"}),"Delete plan"]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(_e,{variant:"ghost",size:"sm",className:"text-xs",onClick:()=>r(!1),children:"Close"}),M&&re>0&&c.jsxs(_e,{size:"sm",className:"gap-1.5 text-xs",onClick:()=>void U(),children:[c.jsx($ge,{className:"h-3.5 w-3.5"}),"Start all (",re,")"]})]})]})})]})})}function lv(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Es(e){return typeof e=="string"&&e.trim()?e:null}function dle(e){if(typeof e!="string")return null;try{const r=JSON.parse(e);return lv(r)}catch{return null}}function l_(...e){const r={};for(const n of e)if(n)for(const[i,s]of Object.entries(n))s!=null&&s!==""&&(r[i]=s);return r}function TE(e,r){const n=lv(e.args),i=lv(e.data),s=dle(e.message),o=r.replace("_","."),a=l_(i,s);return Object.keys(n??{}).length>0?l_(a,n):o==="edit"||o.startsWith("file.")?l_(a,{path:Es(e.path)??Es(e.file)??Es(e.name)??Es(i==null?void 0:i.path)??Es(i==null?void 0:i.file)??"",search:e.search??(i==null?void 0:i.search),replace:e.replace??(i==null?void 0:i.replace),content:e.content??(i==null?void 0:i.content)}):o==="web"||o.startsWith("web.")||o.startsWith("browser.")?l_(a,{url:Es(e.url)??Es(i==null?void 0:i.url)??Es(i==null?void 0:i.finalUrl)??"",query:Es(e.query)??Es(e.name)??Es(i==null?void 0:i.query)??"",content:e.content??(i==null?void 0:i.content)}):a}function int(e,r){const n=Es(e.message)??Es(e.output)??Es(e.content)??Es(e.text)??Es(e.summary);if(n)return n;const i=lv(e.data),s=Es(i==null?void 0:i.message)??Es(i==null?void 0:i.output)??Es(i==null?void 0:i.content)??Es(i==null?void 0:i.text)??Es(i==null?void 0:i.summary);return s||r}function snt(e){const r=[];let n=null,i=[];const s=new Map;let o=[];function a(){o.length>0&&(i.push({type:"toolGroup",callIds:[...o]}),o=[])}function l(){n&&(a(),i.length>0&&(n.segments=[...i]),r.push(n),n=null,i=[])}function d(u){return(!n||n.role!=="assistant")&&(l(),n={id:u,role:"assistant",content:"",toolCalls:[]},i=[]),n}for(const u of e){const f=u.payload??{};switch(u.kind){case"message":{const p=f.role,g=typeof f.content=="string"?f.content:u.summary,v=Array.isArray(f.referencedFiles)?f.referencedFiles.flatMap(_=>{if(!_||typeof _!="object")return[];const S=typeof _.path=="string"?_.path:null,w=typeof _.name=="string"?_.name:null;return S&&w?[{path:S,name:w}]:[]}):void 0,b=OR(f.displaySegments);if(p==="user")l(),r.push({id:u.id,role:"user",content:g,displayContent:b.length>0?Y1(b):g,referencedFiles:v,displaySegments:b.length>0?b:void 0});else{const _=d(u.id);a();const S=g??"";S&&(_.content+=(_.content?`
1161
1161
  `:"")+S,i.push({type:"text",content:S}))}break}case"tool.start":{const p=d(u.id),g=f.callId??u.id,v=f.tool??"unknown";if(s.has(g))break;const b={callId:g,parentCallId:f.parentCallId,tool:v,args:yu(v,TE(f,v)),status:"running",startedAt:new Date(u.createdAt).getTime()};p.toolCalls=p.toolCalls??[],p.toolCalls.push(b),s.set(g,b),o.push(g);break}case"tool.output":{const p=f.callId;if(p&&s.has(p)){const g=s.get(p);g.streamingOutput=(g.streamingOutput??"")+(f.content??"")}break}case"tool.result":case"tool.error":{const p=f.callId,g=f.tool??"unknown",v=typeof f.ok=="boolean"?f.ok:u.kind==="tool.result",b=int(f,u.summary),_=f.data!==void 0?f.data:dle(f.message);let S=p?s.get(p):void 0;if(!S){const w=d(u.id),C=p??u.id;S={callId:C,parentCallId:f.parentCallId,tool:g,args:yu(g,TE(f,g),lv(_)??void 0),status:v?"success":"error",startedAt:new Date(u.createdAt).getTime()},w.toolCalls=w.toolCalls??[],w.toolCalls.push(S),s.set(C,S),o.push(C)}S.args=yu(S.tool,l_(S.args,TE(f,g)),lv(_)??void 0),S.parentCallId=S.parentCallId??f.parentCallId,S.status=v?"success":"error",S.result={ok:v,message:b,..._!==void 0?{data:_}:{}},S.completedAt=new Date(u.createdAt).getTime();break}case"tool.approval":{const p=d(u.id),g=f.requestId??u.id,v={callId:g,parentCallId:f.parentCallId,tool:f.tool??"unknown",args:yu(String(f.tool??"unknown"),f.args??{}),status:"pending",startedAt:new Date(u.createdAt).getTime()};p.toolCalls=p.toolCalls??[],p.toolCalls.push(v),s.set(g,v),o.push(g);break}case"skill.active":{const p=d(u.id),g=Array.isArray(f.names)?f.names.join(", "):"unknown",v=Array.isArray(f.skills)?f.skills:[],b=u.id,_={callId:b,parentCallId:f.parentCallId,tool:"skill",args:{skills:v.map(S=>S.name).join(", ")},status:"success",startedAt:new Date(u.createdAt).getTime(),completedAt:new Date(u.createdAt).getTime(),result:{ok:!0,message:`Using skills: ${g}`}};p.toolCalls=p.toolCalls??[],p.toolCalls.push(_),s.set(b,_),o.push(b);break}case"context_flow":{const p={provider:typeof f.provider=="string"?f.provider:"jait",model:typeof f.model=="string"?f.model:void 0,rounds:Array.isArray(f.rounds)?f.rounds:[]},g=n;if(g&&g.role==="assistant")g.contextFlow=p;else for(let v=r.length-1;v>=0;v--){const b=r[v];if(b&&b.role==="assistant"){b.contextFlow=p;break}}break}case"session":{l();break}case"error":{const p=d(u.id);a();const g=`**Error:** ${u.summary}`;p.content+=(p.content?`
1162
1162
  `:"")+g,i.push({type:"text",content:g});break}default:{const g=(typeof f.content=="string"?f.content:typeof f.text=="string"?f.text:typeof f.message=="string"?f.message:null)??(u.kind==="activity"?u.summary:null);if(f.role==="user"&&g)l(),r.push({id:u.id,role:"user",content:g});else if(g){const b=d(u.id);a(),b.content+=(b.content?`
1163
- `:"")+g,i.push({type:"text",content:g})}break}}}return l(),r}const cW=Ln(),uW={core:{variant:"default",label:"core"},standard:{variant:"secondary",label:"standard"},external:{variant:"warning",label:"external"}},dW=["meta","terminal","filesystem","os","agent","browser","web","surfaces","scheduler","memory","voice","screen","gateway","external"];function ont({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(!1),[l,d]=y.useState(null),[u,f]=y.useState("");y.useEffect(()=>{if(!e)return;let S=!1;return(async()=>{try{const w=await fetch(`${cW}/auth/settings/tools`,{headers:{Authorization:`Bearer ${e}`}});if(!S)if(w.ok){const C=await w.json();n(C.tools)}else d(`Failed to load tools (${w.status})`)}catch{S||d("Failed to load tools")}finally{S||s(!1)}})(),()=>{S=!0}},[e]);const p=y.useCallback(async(S,w)=>{if(e){n(C=>C.map(j=>j.name===S?{...j,enabled:w}:j)),a(!0),d(null);try{const C=r.map(N=>N.name===S?{...N,enabled:w}:N).filter(N=>!N.enabled&&!N.locked).map(N=>N.name);if(!(await fetch(`${cW}/auth/settings/tools`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({disabled_tools:C})})).ok)throw new Error("Failed to save")}catch{n(C=>C.map(j=>j.name===S?{...j,enabled:!w}:j)),d("Failed to update tool setting")}finally{a(!1)}}},[e,r]),g=new Map,v=u.trim().toLowerCase();for(const S of r){if(v&&!`${S.name} ${S.description} ${S.category}`.toLowerCase().includes(v))continue;const w=S.category;g.has(w)||g.set(w,[]),g.get(w).push(S)}const b=[...g.keys()].sort((S,w)=>{const C=dW.indexOf(S),j=dW.indexOf(w);return(C===-1?999:C)-(j===-1?999:j)}),_={total:r.length,enabled:r.filter(S=>S.enabled).length,core:r.filter(S=>S.tier==="core").length,standard:r.filter(S=>S.tier==="standard").length,external:r.filter(S=>S.tier==="external").length};return i?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading tools..."})}):c.jsxs(Rn,{className:"p-5 space-y-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Tools"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage which tools are available to the AI agent. Core tools are always enabled. Standard tools can be toggled. External (MCP) tools are discovered on demand."})]}),c.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(H4,{className:"h-3.5 w-3.5"}),_.core," core"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(T9,{className:"h-3.5 w-3.5"}),_.standard," standard"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(K_,{className:"h-3.5 w-3.5"}),_.external," external"]}),c.jsxs("span",{className:"ml-auto",children:[_.enabled,"/",_.total," enabled"]})]}),c.jsxs("div",{className:"relative",children:[c.jsx(Vl,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Hn,{placeholder:"Filter tools...",value:u,onChange:S=>f(S.target.value),className:"pl-9"})]}),l&&c.jsx("p",{className:"text-sm text-destructive",children:l}),c.jsxs("div",{className:"space-y-5",children:[b.map(S=>{const w=g.get(S);return c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-2",children:S}),c.jsx("div",{className:"space-y-1",children:w.map(C=>{const j=uW[C.tier]??uW.standard;return c.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 rounded-md hover:bg-muted/50 transition-colors",children:[c.jsx(Kf,{checked:C.enabled,onCheckedChange:N=>{p(C.name,N)},disabled:C.locked||o,"aria-label":`Toggle ${C.name}`}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-mono text-sm font-medium",children:C.name}),c.jsx(nn,{variant:j.variant,className:"text-2xs px-1.5 py-0",children:j.label}),C.source==="mcp"&&c.jsx(nn,{variant:"outline",className:"text-2xs px-1.5 py-0",children:"MCP"})]}),c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:C.description})]})]},C.name)})})]},S)}),b.length===0&&c.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:v?"No tools match your filter.":"No tools available."})]})]})}const c_=Ln(),ant={installed:{variant:"secondary",label:"installed"},enabled:{variant:"default",label:"enabled"},disabled:{variant:"outline",label:"disabled"},error:{variant:"destructive",label:"error"}};function hle(e){return y.useCallback(()=>{const r={"Content-Type":"application/json"};return e&&(r.Authorization=`Bearer ${e}`),r},[e])}function lnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState(null),p=hle(e),g=y.useCallback(async()=>{s(!0),a(null);try{const C=await fetch(`${c_}/api/plugins`,{headers:p()});if(!C.ok)throw new Error(`Failed to load extensions (HTTP ${C.status})`);const j=await C.json();n(j)}catch(C){a(C instanceof Error?C.message:"Failed to load extensions")}finally{s(!1)}},[p]);y.useEffect(()=>{g()},[g]);const v=y.useCallback(async(C,j)=>{f(C);try{const N=j?"enable":"disable",A=await fetch(`${c_}/api/plugins/${encodeURIComponent(C)}/${N}`,{method:"POST",headers:p()});if(!A.ok){const E=await A.json().catch(()=>({}));throw new Error(E.error??`Failed to ${N} (HTTP ${A.status})`)}await g()}catch(N){a(N instanceof Error?N.message:"Action failed")}finally{f(null)}},[p,g]),b=y.useCallback(async C=>{f(C);try{const j=await fetch(`${c_}/api/plugins/${encodeURIComponent(C)}`,{method:"DELETE",headers:p()});if(!j.ok){const N=await j.json().catch(()=>({}));throw new Error(N.error??`Failed to uninstall (HTTP ${j.status})`)}await g()}catch(j){a(j instanceof Error?j.message:"Action failed")}finally{f(null)}},[p,g]),_=y.useCallback(async()=>{s(!0);try{const C=await fetch(`${c_}/api/plugins/scan`,{method:"POST",headers:p()});if(!C.ok)throw new Error(`Scan failed (HTTP ${C.status})`);const j=await C.json();n(j)}catch(C){a(C instanceof Error?C.message:"Scan failed")}finally{s(!1)}},[p]),S=l.toLowerCase(),w=r.filter(C=>S?C.id.toLowerCase().includes(S)||C.displayName.toLowerCase().includes(S)||(C.description??"").toLowerCase().includes(S)||(C.author??"").toLowerCase().includes(S):!0);return i&&r.length===0?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions..."})}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:C=>d(C.target.value),placeholder:"Filter extensions...",className:"pl-9"})]}),c.jsxs(_e,{variant:"outline",size:"sm",onClick:()=>void _(),disabled:i,children:[c.jsx(Ta,{className:`mr-1.5 h-3.5 w-3.5 ${i?"animate-spin":""}`}),"Scan"]})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),w.length===0&&!i&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(K_,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r.length===0?"No extensions installed. Drop plugin folders into ~/.jait/extensions/ and click Scan.":"No extensions match your filter."})]}),w.map(C=>{const j=ant[C.status],N=C.status==="enabled",A=u===C.id;return c.jsxs(Rn,{className:"flex items-start gap-4 p-4",children:[c.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(K_,{className:"h-5 w-5 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:C.displayName}),c.jsx(nn,{variant:j.variant,className:"text-2xs",children:j.label}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",C.version]})]}),C.description&&c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:C.description}),C.author&&c.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["by ",C.author]}),C.error&&c.jsx("p",{className:"mt-1 text-xs text-destructive",children:C.error}),c.jsx("p",{className:"mt-0.5 text-2xs text-muted-foreground/60 font-mono",children:C.id})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c.jsx(Kf,{checked:N,disabled:A,onCheckedChange:E=>void v(C.id,E),"aria-label":N?"Disable":"Enable"}),c.jsx(_e,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",disabled:A,onClick:()=>void b(C.id),title:"Uninstall",children:c.jsx(_h,{className:"h-4 w-4"})})]})]},C.id)})]})}function cnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),l=hle(e),d=y.useCallback(async()=>{s(!0),a(null);try{const u=await fetch(`${c_}/api/store/packages?limit=50`,{headers:l()});if(!u.ok)throw new Error(`Failed to browse ClawHub (HTTP ${u.status})`);const f=await u.json();n(f.items??[])}catch(u){a(u instanceof Error?u.message:"Failed to load marketplace")}finally{s(!1)}},[l]);return y.useEffect(()=>{d()},[d]),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Rn,{className:"bg-muted/30 p-4 text-sm text-muted-foreground",children:["Browse OpenClaw plugins on"," ",c.jsx("a",{href:"https://clawhub.ai/plugins",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"}),". To install, download the plugin and place it in"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/extensions/"}),", then click Scan on the Installed tab."]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),i&&r.length===0&&c.jsxs(Rn,{className:"flex items-center justify-center gap-2 p-8",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading from ClawHub..."})]}),!i&&r.length===0&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(K_,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"No packages available."})]}),r.map((u,f)=>{const p=u.displayName??u.name??"Unknown",g=u.description??"",v=u.type??"plugin";return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(K_,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:p}),u.version&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",u.version]}),c.jsx(nn,{variant:"outline",className:"text-2xs",children:v})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:g}),u.author&&c.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["by @",u.author]})]}),c.jsx("a",{href:`https://clawhub.ai/plugins/${encodeURIComponent(u.name??"")}`,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(_e,{variant:"outline",size:"sm",className:"h-7 text-xs",children:[c.jsx(Lm,{className:"mr-1 h-3 w-3"}),"View"]})})]},u.name??f)})]})}function unt({token:e}){return c.jsxs(V1,{defaultValue:"installed",className:"space-y-4",children:[c.jsxs(Rn,{className:"space-y-3 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Extensions"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Manage plugins and extensions. Browse the"," ",c.jsx("a",{href:"https://clawhub.ai/plugins",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"})," ","marketplace or drop plugins into"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/extensions/"}),"."]})]}),c.jsxs(b0,{children:[c.jsx(Zo,{value:"installed",children:"Installed"}),c.jsx(Zo,{value:"marketplace",children:"Marketplace"})]})]}),c.jsx(Jo,{value:"installed",className:"mt-0 space-y-4",children:c.jsx(lnt,{token:e})}),c.jsx(Jo,{value:"marketplace",className:"mt-0 space-y-4",children:c.jsx(cnt,{token:e})})]})}const a4=Ln();function hW(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const fW={bundled:{variant:"default",label:"bundled"},user:{variant:"secondary",label:"user"},workspace:{variant:"outline",label:"workspace"},plugin:{variant:"secondary",label:"plugin"}};function fle(e){return y.useCallback(()=>{const r={"Content-Type":"application/json"};return e&&(r.Authorization=`Bearer ${e}`),r},[e])}function dnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState(null),p=fle(e),g=y.useCallback(async()=>{s(!0),a(null);try{const S=await fetch(`${a4}/api/skills`,{headers:p()});if(!S.ok)throw new Error(`Failed to load skills (HTTP ${S.status})`);const w=await S.json();n(w)}catch(S){a(S instanceof Error?S.message:"Failed to load skills")}finally{s(!1)}},[p]);y.useEffect(()=>{g()},[g]);const v=y.useCallback(async(S,w)=>{f(S);try{const C=await fetch(`${a4}/api/skills/${encodeURIComponent(S)}`,{method:"PATCH",headers:p(),body:JSON.stringify({enabled:w})});if(!C.ok)throw new Error(`Failed to update skill (HTTP ${C.status})`);n(j=>j.map(N=>N.id===S?{...N,enabled:w}:N))}catch(C){a(C instanceof Error?C.message:"Action failed")}finally{f(null)}},[p]),b=l.toLowerCase(),_=r.filter(S=>b?S.id.toLowerCase().includes(b)||S.name.toLowerCase().includes(b)||S.description.toLowerCase().includes(b)||S.source.includes(b):!0);return i&&r.length===0?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading skills..."})}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:S=>d(S.target.value),placeholder:"Filter installed skills...",className:"pl-9"})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),_.length===0&&!i&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(FC,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r.length===0?"No skills discovered. Install from the Marketplace or create a SKILL.md in ~/.jait/skills/.":"No skills match your filter."})]}),_.map(S=>{const w=fW[S.source]??fW.user,C=u===S.id;return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(FC,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:S.name}),c.jsx(nn,{variant:w.variant,className:"text-2xs",children:w.label})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:S.description}),c.jsx("p",{className:"mt-0.5 text-2xs text-muted-foreground/60 font-mono truncate",children:S.filePath})]}),c.jsx(Kf,{checked:S.enabled,disabled:C,onCheckedChange:j=>void v(S.id,j),"aria-label":S.enabled?"Disable":"Enable",className:"shrink-0"})]},S.id)})]})}function hnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState("tool workflow agent"),[p,g]=y.useState(null),v=y.useRef(null),b=fle(e),_=y.useCallback(async(C,j)=>{s(!0),a(null);try{const N=new URLSearchParams;C?N.set("q",C):N.set("sort",j??"tool workflow agent"),N.set("limit","25");const A=await fetch(`${a4}/api/store/skills?${N}`,{headers:b()});if(!A.ok)throw new Error(`Failed to browse ClawHub (HTTP ${A.status})`);const E=await A.json();n(E.results??[])}catch(N){a(N instanceof Error?N.message:"Failed to load marketplace")}finally{s(!1)}},[b]);y.useEffect(()=>{_(void 0,u)},[_,u]);const S=y.useCallback(C=>{d(C),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{_(C||void 0,u)},400)},[_,u]),w=y.useCallback(async C=>{g(C),a(null);try{const j=await fetch(`${a4}/api/store/skills/${encodeURIComponent(C)}/install`,{method:"POST",headers:b(),body:JSON.stringify({})});if(!j.ok){const N=await j.json().catch(()=>({}));throw new Error(N.error??`Install failed (HTTP ${j.status})`)}n(N=>N.map(A=>A.slug===C?{...A,installed:!0}:A))}catch(j){a(j instanceof Error?j.message:"Install failed")}finally{g(null)}},[b]);return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:C=>S(C.target.value),placeholder:"Search ClawHub skills...",className:"pl-9"})]}),c.jsxs("select",{value:u,onChange:C=>f(C.target.value),className:"h-9 rounded-md border bg-background px-3 text-sm",children:[c.jsx("option",{value:"tool workflow agent",children:"Popular"}),c.jsx("option",{value:"memory learning self-improving",children:"Memory"}),c.jsx("option",{value:"search web browser automation",children:"Search"}),c.jsx("option",{value:"git github code development",children:"Development"}),c.jsx("option",{value:"calendar slack obsidian productivity",children:"Productivity"})]})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),i&&r.length===0&&c.jsxs(Rn,{className:"flex items-center justify-center gap-2 p-8",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading from ClawHub..."})]}),!i&&r.length===0&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(Vl,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:l?"No skills match your search.":"No skills available."})]}),r.map(C=>{var W,I,K;const j=C.slug??"",N=C.displayName??j,A=C.summary??"",E=((W=C.latestVersion)==null?void 0:W.version)??C.version??"",R=((I=C.stats)==null?void 0:I.stars)??0,P=((K=C.stats)==null?void 0:K.downloads)??0,B=C.installed===!0,$=p===j;return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(FC,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:N}),E&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",E]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:A}),c.jsxs("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[R>0&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(Gye,{className:"h-3 w-3"}),hW(R)]}),P>0&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(Tm,{className:"h-3 w-3"}),hW(P)]}),c.jsxs("a",{href:`https://clawhub.ai/skills?focus=search&q=${encodeURIComponent(j)}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-0.5 hover:text-foreground",children:[c.jsx(Lm,{className:"h-3 w-3"}),"ClawHub"]})]})]}),c.jsx("div",{className:"shrink-0",children:B?c.jsxs(nn,{variant:"secondary",className:"flex items-center gap-1 text-2xs",children:[c.jsx(hs,{className:"h-3 w-3"}),"Installed"]}):c.jsxs(_e,{size:"sm",variant:"outline",disabled:$,onClick:()=>void w(j),className:"h-7 text-xs",children:[$?c.jsx(sr,{className:"mr-1 h-3 w-3 animate-spin"}):c.jsx(Tm,{className:"mr-1 h-3 w-3"}),"Install"]})})]},j)})]})}function fnt({token:e}){return c.jsxs(V1,{defaultValue:"installed",className:"space-y-4",children:[c.jsxs(Rn,{className:"space-y-3 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Skills"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Specialized instruction sets that teach the AI how to use specific tools and workflows. Install from"," ",c.jsx("a",{href:"https://clawhub.ai/skills",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"})," ","or place SKILL.md files in"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/skills/"}),"."]})]}),c.jsxs(b0,{children:[c.jsx(Zo,{value:"installed",children:"Installed"}),c.jsx(Zo,{value:"marketplace",children:"Marketplace"})]})]}),c.jsx(Jo,{value:"installed",className:"mt-0 space-y-4",children:c.jsx(dnt,{token:e})}),c.jsx(Jo,{value:"marketplace",className:"mt-0 space-y-4",children:c.jsx(hnt,{token:e})})]})}function pnt({events:e}){return c.jsx(ph,{className:"h-full w-full",children:c.jsx("div",{className:"p-4 space-y-2",children:e.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No activity yet."}):e.map(r=>c.jsxs("div",{className:"rounded-md border p-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("p",{className:"text-sm font-medium",children:r.title}),c.jsx("span",{className:"text-xs text-muted-foreground",children:r.source})]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r.detail})]},r.id))})})}function Nb(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function mnt(e,r){const n=r.trim();if(!n)return Nb(e);const i=e.toLowerCase(),s=n.toLowerCase();let o=0,a=i.indexOf(s);if(a===-1)return Nb(e);let l="";for(;a!==-1;){a>o&&(l+=Nb(e.slice(o,a)));const d=a+n.length;l+=`<mark class="rounded bg-yellow-200/80 px-0.5 text-inherit dark:bg-yellow-500/30">${Nb(e.slice(a,d))}</mark>`,o=d,a=i.indexOf(s,o)}return o<e.length&&(l+=Nb(e.slice(o))),l}var Dv="Perplexity",gnt=.75,ynt=.2,ple="#22B8CD",vnt=ple,xnt="#000",bnt=.75;function ww(e){"@babel/helpers - typeof";return ww=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ww(e)}var _nt=["size","style"];function pW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function EE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?pW(Object(n),!0).forEach(function(i){wnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function wnt(e,r,n){return r=Snt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Snt(e){var r=knt(e,"string");return ww(r)=="symbol"?r:String(r)}function knt(e,r){if(ww(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(ww(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Cnt(e,r){if(e==null)return{};var n=jnt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function jnt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var hP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Cnt(e,_nt);return c.jsxs("svg",EE(EE({fill:"currentColor",fillRule:"evenodd",height:n,style:EE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"})]}))});function Sw(e){"@babel/helpers - typeof";return Sw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sw(e)}function mW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Nnt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?mW(Object(n),!0).forEach(function(i){Tnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Tnt(e,r,n){return r=Ent(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ent(e){var r=Ant(e,"string");return Sw(r)=="symbol"?r:String(r)}function Ant(e,r){if(Sw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Sw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ont(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Rnt=y.memo(function(e){var r=Object.assign({},(Ont(e),e));return c.jsx(pl,Nnt({Icon:hP,"aria-label":Dv,background:vnt,color:xnt,iconMultiple:bnt},r))});function kw(e){"@babel/helpers - typeof";return kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},kw(e)}var Mnt=["size","style"];function gW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function AE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?gW(Object(n),!0).forEach(function(i){Pnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Pnt(e,r,n){return r=Lnt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Lnt(e){var r=$nt(e,"string");return kw(r)=="symbol"?r:String(r)}function $nt(e,r){if(kw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(kw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Dnt(e,r){if(e==null)return{};var n=Int(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Int(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Dnt(e,Mnt);return c.jsxs("svg",AE(AE({height:n,style:AE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z",fill:"#22B8CD",fillRule:"nonzero"})]}))});function Cw(e){"@babel/helpers - typeof";return Cw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cw(e)}var Bnt=["size","style"];function yW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function OE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yW(Object(n),!0).forEach(function(i){znt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function znt(e,r,n){return r=Fnt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fnt(e){var r=Hnt(e,"string");return Cw(r)=="symbol"?r:String(r)}function Hnt(e,r){if(Cw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Cw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Wnt(e,r){if(e==null)return{};var n=Unt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Unt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var gle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Wnt(e,Bnt);return c.jsxs("svg",OE(OE({fill:"currentColor",fillRule:"evenodd",height:n,style:OE({flex:"none",lineHeight:1},i),viewBox:"0 0 117 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M38.542 5.218h1.151V7.59h-1.49c-1.167 0-2.036.281-2.612.843-.575.563-.863 1.485-.863 2.768v7.773h-2.351V5.271h2.351v2.187c0 .123.062.185.184.185.069 0 .121-.017.157-.053a.58.58 0 00.104-.211c.453-1.44 1.577-2.16 3.371-2.16h-.002zm15.36 2.938c.617 1.098.928 2.42.928 3.966 0 1.545-.309 2.867-.928 3.965-.62 1.098-1.42 1.92-2.404 2.464a6.446 6.446 0 01-3.174.817c-2.23 0-3.797-.896-4.703-2.688-.069-.14-.157-.211-.262-.211-.105 0-.157.052-.157.158v7.352h-2.351V5.271h2.351v2.345c0 .106.052.159.157.159.105 0 .191-.07.262-.211.906-1.793 2.473-2.689 4.703-2.689 1.132 0 2.19.272 3.174.817.984.545 1.785 1.366 2.404 2.464zm-1.424 3.966c0-1.617-.43-2.877-1.292-3.781-.862-.904-1.998-1.357-3.41-1.357-1.413 0-2.548.453-3.41 1.357-.863.905-1.179 2.166-1.179 3.78 0 1.616.316 2.878 1.178 3.782.863.905 2 1.356 3.41 1.356 1.411 0 2.549-.453 3.411-1.356.862-.904 1.292-2.166 1.292-3.781zM15.05 8.177c.618 1.098.928 2.42.928 3.965 0 1.546-.308 2.868-.928 3.966-.619 1.098-1.42 1.919-2.403 2.464a6.448 6.448 0 01-3.175.817c-2.23 0-3.797-.896-4.702-2.688-.07-.14-.158-.212-.262-.212-.105 0-.158.053-.158.159V24H2V5.292h2.351v2.345c0 .106.053.159.158.159.104 0 .19-.07.261-.212.906-1.792 2.473-2.688 4.703-2.688 1.132 0 2.19.272 3.175.817.983.545 1.784 1.366 2.403 2.464h-.002zm-1.423 3.965c0-1.616-.43-2.877-1.293-3.78-.862-.904-1.998-1.357-3.41-1.357-1.412 0-2.548.453-3.41 1.357-.862.905-1.178 2.165-1.178 3.78 0 1.615.316 2.878 1.178 3.781.862.906 1.998 1.357 3.41 1.357 1.412 0 2.548-.453 3.41-1.357.863-.903 1.293-2.166 1.293-3.78zm14.422 2.481h2.482c-.33 1.283-1.006 2.395-2.023 3.334-1.02.94-2.479 1.41-4.378 1.41-1.429 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.521-2.516c-.593-1.089-.889-2.372-.889-3.847 0-1.476.288-2.758.863-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.393 0 2.547.29 3.514.87.968.58 1.69 1.349 2.168 2.305.48.959.719 2.008.719 3.15v1.58H19.427c.086 1.37.544 2.46 1.37 3.268.828.807 1.939 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.601-.466 1.04-1.111 1.32-1.938zm-8.595-3.82h8.204c0-1.194-.305-2.13-.914-2.807-.61-.676-1.568-1.015-2.874-1.015-1.22 0-2.217.33-2.99.988-.775.659-1.25 1.604-1.424 2.832l-.002.002zm37.238 8.17h2.352V0H56.69v18.974-.002zM89.316 3.774h2.747V.81h-2.747v2.966zm9.688 13.156c-.426.043-.684.066-.77.066a.39.39 0 01-.289-.106.395.395 0 01-.104-.29c0-.087.022-.348.065-.778.043-.43.066-1.094.066-1.988V7.279h3.354l-.66-2.008h-2.692v-3.69h-2.352v3.688h-2.557v2.008h2.557v7.214c0 1.512.367 2.636 1.098 3.374.732.737 1.846 1.107 3.345 1.107h1.83v-2.107h-.915c-.889 0-1.547.022-1.974.066h-.002zm13.759-11.662l-3.893 11.498c-.053.141-.135.326-.402.326-.268 0-.35-.185-.402-.326l-3.893-11.498h-2.398l4.508 13.703h1.594a.81.81 0 01.235.026c.053.017.096.06.131.133.07.105.06.264-.026.473l-.731 2.002c-.105.264-.305.396-.6.396-.106 0-.349-.023-.732-.066a13.71 13.71 0 00-1.49-.066h-1.907v2.107h2.508c1.463 0 2.344-.25 3.102-.75.757-.5 1.345-1.383 1.764-2.65L115 5.795v-.526h-2.237v.001zm-31.127 5.113L77.953 5.27h-2.588v.527l4.415 5.93-5.382 6.72v.526h2.64l4.285-5.507 3.998 5.507h2.535v-.526l-4.677-6.324 5.07-6.298v-.553h-2.64l-3.971 5.113-.002-.002zm7.931 8.59h2.351v-13.7h-2.35v13.702-.002zm-15.062-4.349c-.331 1.283-1.006 2.395-2.024 3.334-1.02.94-2.479 1.41-4.377 1.41-1.43 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.522-2.516c-.593-1.089-.888-2.372-.888-3.847 0-1.476.288-2.758.862-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.394 0 2.547.29 3.515.87.967.58 1.689 1.349 2.168 2.305.479.959.718 2.008.718 3.15v1.58H63.401c.086 1.37.544 2.46 1.371 3.268.827.807 1.938 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.6-.466 1.04-1.111 1.319-1.938h2.482zm-11.078-3.82h8.205c0-1.194-.305-2.13-.915-2.807-.61-.676-1.568-1.015-2.873-1.015-1.22 0-2.217.33-2.991.988-.775.659-1.25 1.604-1.424 2.832l-.002.002z"})]}))});function jw(e){"@babel/helpers - typeof";return jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jw(e)}var Vnt=["type"];function vW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function qnt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?vW(Object(n),!0).forEach(function(i){Gnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gnt(e,r,n){return r=Knt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Knt(e){var r=Ynt(e,"string");return jw(r)=="symbol"?r:String(r)}function Ynt(e,r){if(jw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(jw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Xnt(e,r){if(e==null)return{};var n=Znt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Znt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Jnt=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=Xnt(e,Vnt),s=n==="color"?mle:hP;return c.jsx(ml,qnt({Icon:s,Text:gle,"aria-label":Dv,spaceMultiple:ynt,textMultiple:gnt},i))}),ey=hP;ey.Color=mle;ey.Text=gle;ey.Combine=Jnt;ey.Avatar=Rnt;ey.colorPrimary=ple;ey.title=Dv;var DS="OpenRouter",Qnt=1,eit=.4,fP="#6566F1",tit=fP,rit="#fff",nit=.75;function Nw(e){"@babel/helpers - typeof";return Nw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Nw(e)}var iit=["size","style"];function xW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function RE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?xW(Object(n),!0).forEach(function(i){sit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function sit(e,r,n){return r=oit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oit(e){var r=ait(e,"string");return Nw(r)=="symbol"?r:String(r)}function ait(e,r){if(Nw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Nw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function lit(e,r){if(e==null)return{};var n=cit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function cit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var pP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=lit(e,iit);return c.jsxs("svg",RE(RE({fill:"currentColor",fillRule:"evenodd",height:n,style:RE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:DS}),c.jsx("path",{d:"M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"})]}))});function Tw(e){"@babel/helpers - typeof";return Tw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Tw(e)}function bW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function uit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?bW(Object(n),!0).forEach(function(i){dit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function dit(e,r,n){return r=hit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function hit(e){var r=fit(e,"string");return Tw(r)=="symbol"?r:String(r)}function fit(e,r){if(Tw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Tw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function pit(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var mit=y.memo(function(e){var r=Object.assign({},(pit(e),e));return c.jsx(pl,uit({Icon:pP,"aria-label":DS,background:tit,color:rit,iconMultiple:nit},r))});function Ew(e){"@babel/helpers - typeof";return Ew=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ew(e)}var git=["size","style"];function _W(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ME(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_W(Object(n),!0).forEach(function(i){yit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yit(e,r,n){return r=vit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function vit(e){var r=xit(e,"string");return Ew(r)=="symbol"?r:String(r)}function xit(e,r){if(Ew(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ew(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function bit(e,r){if(e==null)return{};var n=_it(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _it(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var yle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=bit(e,git);return c.jsxs("svg",ME(ME({fill:"currentColor",fillRule:"evenodd",height:n,style:ME({flex:"none",lineHeight:1},i),viewBox:"0 0 143 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:DS}),c.jsx("path",{d:"M9.623 2c1.46 0 2.763.35 3.91 1.05 1.149.699 2.053 1.7 2.714 3.002.66 1.303.991 2.861.991 4.675 0 1.814-.33 3.372-.991 4.675-.66 1.302-1.565 2.303-2.713 3.003-1.148.7-2.452 1.049-3.91 1.049-1.465 0-2.772-.35-3.92-1.05-1.148-.699-2.052-1.701-2.713-3.007-.66-1.305-.991-2.862-.991-4.67 0-1.814.33-3.372.991-4.675.66-1.302 1.565-2.303 2.713-3.003C6.852 2.35 8.16 2 9.624 2zm0 2.34c-.974 0-1.844.244-2.61.734-.765.489-1.37 1.208-1.813 2.156-.443.949-.664 2.114-.664 3.497s.221 2.548.664 3.497c.444.948 1.048 1.667 1.813 2.156.766.49 1.636.735 2.61.735.97 0 1.838-.245 2.606-.735.768-.489 1.374-1.208 1.817-2.156.443-.949.665-2.114.665-3.497s-.222-2.548-.665-3.497c-.443-.948-1.049-1.667-1.817-2.156-.768-.49-1.637-.735-2.606-.735zm16.32 1.974c1.024 0 1.938.26 2.742.78s1.436 1.269 1.896 2.248c.46.979.69 2.156.69 3.534 0 1.377-.23 2.556-.686 3.538-.457.981-1.085 1.736-1.883 2.264-.799.529-1.71.793-2.734.793-.771 0-1.4-.13-1.887-.39-.488-.26-.869-.564-1.144-.913a6.908 6.908 0 01-.636-.929h-.149V24h-2.47V6.48h2.412v2.065h.207c.143-.265.35-.572.62-.92.27-.349.643-.655 1.123-.917.479-.263 1.112-.394 1.9-.394zm-.528 2.107c-.716 0-1.32.185-1.813.556-.493.37-.866.887-1.12 1.55-.253.665-.38 1.439-.38 2.324 0 .896.13 1.68.389 2.356.259.674.633 1.201 1.123 1.58s1.09.568 1.8.568c.738 0 1.355-.198 1.85-.593.496-.395.872-.933 1.128-1.613.256-.68.384-1.447.384-2.298 0-.84-.125-1.596-.376-2.265-.25-.67-.625-1.197-1.123-1.584-.498-.388-1.12-.581-1.862-.581zm13.387-2.107c.716 0 1.41.119 2.082.356a5.037 5.037 0 011.809 1.12c.534.51.955 1.169 1.263 1.979.309.81.463 1.793.463 2.949v.88l-9.016-.001.002.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.26 1.364.539.313 1.17.469 1.89.469.469 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.281-.271.496-.606.644-1.004l2.338.423a4.247 4.247 0 01-1.004 1.813c-.482.517-1.084.918-1.808 1.203-.725.284-1.549.427-2.474.427-1.25 0-2.325-.27-3.225-.809-.9-.54-1.594-1.3-2.082-2.281-.487-.982-.73-2.134-.73-3.455 0-1.306.243-2.456.73-3.451.488-.996 1.17-1.773 2.049-2.331.878-.559 1.906-.838 3.084-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.593c0-.653-.132-1.232-.397-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.034-.44-1.673-.44zm10.29 3.293v7.566H46.64V6.48h2.37v2.074h.158a3.63 3.63 0 011.375-1.626c.625-.41 1.413-.614 2.366-.614.864 0 1.622.18 2.271.543.65.362 1.154.9 1.512 1.614.358.713.537 1.595.537 2.646v8.105h-2.47v-7.806c0-.924-.24-1.647-.718-2.17-.48-.522-1.137-.784-1.974-.784-.573 0-1.081.125-1.524.374a2.65 2.65 0 00-1.05 1.09c-.255.479-.383 1.055-.383 1.73zm17.122-9.424c1.31 0 2.4.227 3.266.68.868.454 1.516 1.08 1.945 1.88.43.799.645 1.72.645 2.766 0 1.04-.216 1.954-.649 2.742-.432.788-1.082 1.4-1.949 1.837a5.1 5.1 0 01-.501.22l3.743 6.865h-2.907l-3.436-6.43h-3.634v6.43h-2.552V2.232h6.029zm-.273 2.199h-3.204v6.155h3.237c.826 0 1.5-.119 2.02-.357s.901-.583 1.144-1.037c.242-.453.363-.998.363-1.634 0-.641-.122-1.197-.367-1.667-.246-.47-.628-.831-1.148-1.083-.52-.252-1.202-.377-2.045-.377zM79.66 6.314c1.19 0 2.227.273 3.114.821.886.548 1.575 1.316 2.065 2.306s.735 2.146.735 3.468c0 1.316-.245 2.466-.735 3.45-.49.985-1.179 1.751-2.065 2.299-.887.547-1.924.82-3.114.82s-2.227-.273-3.113-.82c-.887-.548-1.575-1.314-2.065-2.298-.49-.985-.735-2.135-.735-3.451 0-1.322.245-2.478.735-3.468.49-.99 1.178-1.758 2.065-2.306.886-.548 1.924-.821 3.113-.821zm.008 2.074c-.776 0-1.419.207-1.928.622-.51.415-.887.963-1.132 1.646a6.602 6.602 0 00-.367 2.244c0 .819.122 1.568.367 2.249.245.68.623 1.225 1.132 1.634.51.41 1.152.614 1.928.614.771 0 1.41-.205 1.917-.614.506-.41.882-.954 1.127-1.634.245-.68.367-1.43.367-2.249 0-.813-.122-1.56-.367-2.244-.245-.683-.62-1.231-1.127-1.646-.507-.415-1.146-.622-1.917-.622zm16.164 5.55V6.48h2.477v12.742h-2.428v-2.207h-.132a3.956 3.956 0 01-1.4 1.697c-.641.45-1.438.676-2.391.676-.815 0-1.535-.181-2.16-.544-.625-.362-1.115-.9-1.47-1.613-.355-.714-.533-1.596-.533-2.647V6.48h2.47v7.806c0 .868.24 1.56.718 2.074.48.514 1.102.771 1.867.771.462 0 .924-.116 1.383-.348.46-.232.843-.584 1.148-1.054.306-.47.456-1.067.45-1.792zm8.58-10.511v3.052h2.602v1.992h-2.602v7.01c0 .48.072.841.215 1.082.144.24.33.404.558.49.228.085.478.128.747.128.199 0 .372-.014.52-.041l.348-.067.446 2.05a4.42 4.42 0 01-.612.17c-.264.057-.594.09-.99.095a4.331 4.331 0 01-1.818-.349 3.12 3.12 0 01-1.362-1.128c-.347-.509-.52-1.148-.52-1.916l-.002-7.525h-1.857V6.48h1.857l.001-3.053h2.47zm9.961 2.887c.716 0 1.41.119 2.081.356a5.037 5.037 0 011.81 1.12c.533.51.954 1.169 1.263 1.979.308.81.462 1.793.462 2.949v.88l-9.016-.001.003.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.259 1.364.54.313 1.17.469 1.891.469.468 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.28-.271.495-.606.644-1.004l2.337.423a4.247 4.247 0 01-1.003 1.813c-.482.517-1.085.918-1.809 1.203-.724.284-1.548.427-2.473.427-1.25 0-2.325-.27-3.226-.809-.9-.54-1.594-1.3-2.08-2.281-.488-.982-.732-2.134-.732-3.455 0-1.306.244-2.456.731-3.451.487-.996 1.17-1.773 2.048-2.331.879-.559 1.907-.838 3.085-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.592c0-.653-.132-1.232-.396-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.035-.44-1.673-.44zm7.821 10.859V6.48h2.387v2.024h.132a3.092 3.092 0 011.227-1.622 3.485 3.485 0 011.994-.593l.396.01.153.006c.212.011.379.025.5.042v2.372c-.1-.027-.275-.059-.529-.095a5.4 5.4 0 00-.76-.054c-.583 0-1.102.123-1.556.37a2.799 2.799 0 00-1.078 1.02 2.79 2.79 0 00-.397 1.48v7.782h-2.469z"})]}))});function Aw(e){"@babel/helpers - typeof";return Aw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aw(e)}var wit=["type","iconProps"];function wW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function SW(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?wW(Object(n),!0).forEach(function(i){Sit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Sit(e,r,n){return r=kit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function kit(e){var r=Cit(e,"string");return Aw(r)=="symbol"?r:String(r)}function Cit(e,r){if(Aw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Aw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function jit(e,r){if(e==null)return{};var n=Nit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Nit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Tit=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=e.iconProps,s=jit(e,wit);return c.jsx(ml,SW({Icon:pP,Text:yle,"aria-label":DS,iconProps:SW({color:n==="color"?fP:void 0},i),spaceMultiple:eit,textMultiple:Qnt},s))}),Iv=pP;Iv.Text=yle;Iv.Combine=Tit;Iv.Avatar=mit;Iv.colorPrimary=fP;Iv.title=DS;var IS="Grok",Eit=.75,Ait=.25,vle="#fff",Oit=vle,Rit="#000",Mit=.65;function Ow(e){"@babel/helpers - typeof";return Ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ow(e)}var Pit=["size","style"];function kW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function PE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?kW(Object(n),!0).forEach(function(i){Lit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Lit(e,r,n){return r=$it(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $it(e){var r=Dit(e,"string");return Ow(r)=="symbol"?r:String(r)}function Dit(e,r){if(Ow(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ow(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Iit(e,r){if(e==null)return{};var n=Bit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Bit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var xle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Iit(e,Pit);return c.jsxs("svg",PE(PE({fill:"currentColor",fillRule:"evenodd",height:n,style:PE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:IS}),c.jsx("path",{d:"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"})]}))});function Rw(e){"@babel/helpers - typeof";return Rw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Rw(e)}function CW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function zit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?CW(Object(n),!0).forEach(function(i){Fit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Fit(e,r,n){return r=Hit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Hit(e){var r=Wit(e,"string");return Rw(r)=="symbol"?r:String(r)}function Wit(e,r){if(Rw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Rw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Uit(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var ble=y.memo(function(e){var r=Object.assign({},(Uit(e),e));return c.jsx(pl,zit({Icon:xle,"aria-label":IS,background:Oit,color:Rit,iconMultiple:Mit},r))});function Mw(e){"@babel/helpers - typeof";return Mw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mw(e)}var Vit=["size","style"];function jW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function LE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?jW(Object(n),!0).forEach(function(i){qit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function qit(e,r,n){return r=Git(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Git(e){var r=Kit(e,"string");return Mw(r)=="symbol"?r:String(r)}function Kit(e,r){if(Mw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Mw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Yit(e,r){if(e==null)return{};var n=Xit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Xit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var _le=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Yit(e,Vit);return c.jsxs("svg",LE(LE({fill:"currentColor",fillRule:"evenodd",height:n,style:LE({flex:"none",lineHeight:1},i),viewBox:"0 0 41 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:IS}),c.jsx("path",{d:"M36.867 2h2.577v20h-2.577V2zM23.875 2h2.717l7.759 20H31.55l-2.101-5.574h-8.571L18.777 22h-2.69l7.788-20zm4.79 12.185l-3.53-9.272-3.473 9.272h7.003zM7.35 14.381L2.504 7.518h2.857l3.446 5.126 3.585-5.126h2.605l-4.762 6.835L15.501 22h-2.829l-3.977-5.854L4.689 22H2l5.35-7.619z"})]}))});function Pw(e){"@babel/helpers - typeof";return Pw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pw(e)}function NW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Zit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NW(Object(n),!0).forEach(function(i){Jit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Jit(e,r,n){return r=Qit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Qit(e){var r=est(e,"string");return Pw(r)=="symbol"?r:String(r)}function est(e,r){if(Pw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Pw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function tst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var rst=y.memo(function(e){var r=Object.assign({},(tst(e),e));return c.jsx(ml,Zit({Icon:ble,Text:_le,"aria-label":IS,iconProps:{shape:"square"},spaceMultiple:Ait,textMultiple:Eit},r))}),Bv=xle;Bv.Text=_le;Bv.Combine=rst;Bv.Avatar=ble;Bv.colorPrimary=vle;Bv.title=IS;var BS="MoonshotAI",nst=.75,ist=.4,wle="#16191E",sst=wle,ost="#fff",ast=.75;function Lw(e){"@babel/helpers - typeof";return Lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Lw(e)}var lst=["size","style"];function TW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function $E(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?TW(Object(n),!0).forEach(function(i){cst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function cst(e,r,n){return r=ust(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ust(e){var r=dst(e,"string");return Lw(r)=="symbol"?r:String(r)}function dst(e,r){if(Lw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Lw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hst(e,r){if(e==null)return{};var n=fst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function fst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=hst(e,lst);return c.jsxs("svg",$E($E({fill:"currentColor",fillRule:"evenodd",height:n,style:$E({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:BS}),c.jsx("path",{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"})]}))});function $w(e){"@babel/helpers - typeof";return $w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$w(e)}function EW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function pst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?EW(Object(n),!0).forEach(function(i){mst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function mst(e,r,n){return r=gst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function gst(e){var r=yst(e,"string");return $w(r)=="symbol"?r:String(r)}function yst(e,r){if($w(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if($w(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function vst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var xst=y.memo(function(e){var r=Object.assign({},(vst(e),e));return c.jsx(pl,pst({Icon:mP,"aria-label":BS,background:sst,color:ost,iconMultiple:ast},r))});function Dw(e){"@babel/helpers - typeof";return Dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Dw(e)}var bst=["size","style"];function AW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function DE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AW(Object(n),!0).forEach(function(i){_st(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _st(e,r,n){return r=wst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function wst(e){var r=Sst(e,"string");return Dw(r)=="symbol"?r:String(r)}function Sst(e,r){if(Dw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Dw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function kst(e,r){if(e==null)return{};var n=Cst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Cst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Sle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=kst(e,bst);return c.jsxs("svg",DE(DE({fill:"currentColor",fillRule:"evenodd",height:n,style:DE({flex:"none",lineHeight:1},i),viewBox:"0 0 171 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:BS}),c.jsx("path",{d:"M165.484 2H169v19.507h-3.516V2zm-35.707 0v5.26h3.186v3.507h-3.186v10.74h-3.516v-10.74h-2.966V7.26h2.966V2h3.516zm-24.598 11.023v8.498h-3.345v-8.804c.008-2.1-2.109-2.895-3.109-2.895l-.064.001c-1.073.026-3.521.694-3.54 3.863v7.835h-3.468V2.014L95.14 2v6.918c1.228-1.986 3.93-2.243 4.755-2.243.926 0 1.768.155 2.525.465.757.31 1.378.783 1.864 1.42.413.54.665 1.096.757 1.667.092.571.138 1.503.138 2.796zM89.29 9.507l-2.362 2.41c-2.911-2.41-6.647-2.136-7.196-.93-.55 1.205 2.444 1.484 4.734 1.98l.634.146c1.731.408 4.603 1.274 4.52 4.12-.11 3.78-4.23 4.767-6.867 4.767-2.637 0-5.933-1.808-7.636-3.342l2.527-2.63c2.582 2.63 7.142 2.958 7.856 1.534.714-1.425-1.263-1.48-4.834-1.973-3.175-.438-4.837-2.85-4.813-4.13.034-1.843 1.543-4.85 6.31-4.886 3.227-.025 5.425.961 7.127 2.934zm-22.617.386l-.033.001c-1.905.083-3.443 1.453-3.458 3.746v7.867h-3.83V7.185h3.702v2.061l.088-.12c.591-.8 2.07-2.555 4.796-2.523 2.675.032 5.696 1.95 5.696 5.17v9.734H69.69v-8.813c-.01-2.197-2.102-2.824-3.016-2.8zm-33.14-3.29c4.247 0 7.69 3.434 7.69 7.671s-3.443 7.671-7.69 7.671c-4.248 0-7.692-3.434-7.692-7.671s3.444-7.671 7.691-7.671zm0 3.726a3.95 3.95 0 00-3.956 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.956-3.945 3.95 3.95 0 00-3.956-3.945zm16.7-3.726c4.247 0 7.69 3.434 7.69 7.671s-3.443 7.671-7.69 7.671c-4.248 0-7.692-3.434-7.692-7.671s3.444-7.671 7.691-7.671zm0 3.726a3.95 3.95 0 00-3.956 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.956-3.945 3.95 3.95 0 00-3.956-3.945zm64.382-3.726c4.248 0 7.69 3.434 7.69 7.671s-3.442 7.671-7.69 7.671c-4.247 0-7.69-3.434-7.69-7.671s3.443-7.671 7.69-7.671zm0 3.726a3.95 3.95 0 00-3.955 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.955-3.945 3.95 3.95 0 00-3.955-3.945zM2 21.616V2l10.987 7.89L23.919 2v19.616h-3.79V9.452l-7.17 5.26-7.169-5.26v12.164H2zM153.344 2l10.492 19.507h-4.138l-1.833-3.288h-5.235l-1.789-3.46-3.632 6.748h-4.358L153.344 2zm0 8.11l-2.478 4.602h5.044l-2.566-4.602z"})]}))});function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Iw(e)}function OW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function jst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OW(Object(n),!0).forEach(function(i){Nst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Nst(e,r,n){return r=Tst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tst(e){var r=Est(e,"string");return Iw(r)=="symbol"?r:String(r)}function Est(e,r){if(Iw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Iw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ast(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Ost=y.memo(function(e){var r=Object.assign({},(Ast(e),e));return c.jsx(ml,jst({Icon:mP,Text:Sle,"aria-label":BS,spaceMultiple:ist,textMultiple:nst},r))}),zv=mP;zv.Text=Sle;zv.Combine=Ost;zv.Avatar=xst;zv.colorPrimary=wle;zv.title=BS;var Fv="Kimi",Rst=.7,Mst=.25,kle="#000",Pst=kle,Lst="#fff",$st=.6;function Bw(e){"@babel/helpers - typeof";return Bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bw(e)}var Dst=["size","style"];function RW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function IE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?RW(Object(n),!0).forEach(function(i){Ist(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ist(e,r,n){return r=Bst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Bst(e){var r=zst(e,"string");return Bw(r)=="symbol"?r:String(r)}function zst(e,r){if(Bw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Bw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Fst(e,r){if(e==null)return{};var n=Hst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Hst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Cle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Fst(e,Dst);return c.jsxs("svg",IE(IE({height:n,style:IE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z",fill:"#1783FF"}),c.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z",fill:"#fff"})]}))});function zw(e){"@babel/helpers - typeof";return zw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},zw(e)}function MW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Wst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?MW(Object(n),!0).forEach(function(i){Ust(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ust(e,r,n){return r=Vst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vst(e){var r=qst(e,"string");return zw(r)=="symbol"?r:String(r)}function qst(e,r){if(zw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(zw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Gst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var jle=y.memo(function(e){var r=Object.assign({},(Gst(e),e));return c.jsx(pl,Wst({Icon:Cle,"aria-label":Fv,background:Pst,color:Lst,iconMultiple:$st},r))});function Fw(e){"@babel/helpers - typeof";return Fw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fw(e)}var Kst=["size","style"];function PW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function BE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PW(Object(n),!0).forEach(function(i){Yst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Yst(e,r,n){return r=Xst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xst(e){var r=Zst(e,"string");return Fw(r)=="symbol"?r:String(r)}function Zst(e,r){if(Fw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Fw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jst(e,r){if(e==null)return{};var n=Qst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Qst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Nle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Jst(e,Kst);return c.jsxs("svg",BE(BE({fill:"currentColor",fillRule:"evenodd",height:n,style:BE({flex:"none",lineHeight:1},i),viewBox:"0 0 64 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M24.353 21.58c0 .232.188.42.42.42h2.69a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-2.69a.42.42 0 00-.42.42v19.16zM58.47 21.58c0 .232.188.42.42.42h2.691a.42.42 0 00.419-.42V2.42a.42.42 0 00-.419-.42H58.89a.42.42 0 00-.42.42v19.16zM47.786 2a.42.42 0 00-.408.32L43.4 18.633c-.066.267-.38.267-.444 0L38.976 2.32A.417.417 0 0038.57 2H31.83a.418.418 0 00-.418.42v19.16c0 .232.188.42.42.42h2.988c.231 0 .419-.182.419-.414V5.471c0-.322.378-.389.454-.079l3.974 16.288a.42.42 0 00.407.32h6.208a.42.42 0 00.407-.32L50.66 5.394c.076-.31.455-.243.455.079V21.58c0 .231.187.419.419.419h2.987a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-6.735zM11.55 11.273l8.115-8.565A.42.42 0 0019.36 2h-3.776a.42.42 0 00-.298.124l-9.303 9.39c-.144.146-.357.016-.357-.218V2.42a.42.42 0 00-.42-.42H2.42a.42.42 0 00-.42.42v19.16c0 .232.188.42.42.42h2.786a.42.42 0 00.42-.42v-3.82c0-.085.03-.166.081-.219l2.87-2.931c.07-.07.166-.081.243-.029l7.678 5.816c1.123.778 2.552 1.288 3.861 1.5a.403.403 0 00.464-.404v-3.461c0-.206-.15-.38-.35-.423-.76-.164-1.604-.474-2.244-.918l-6.647-4.953c-.138-.095-.155-.34-.033-.465z"})]}))});function Hw(e){"@babel/helpers - typeof";return Hw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hw(e)}var eot=["iconProps"];function LW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function $W(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LW(Object(n),!0).forEach(function(i){tot(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function tot(e,r,n){return r=rot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function rot(e){var r=not(e,"string");return Hw(r)=="symbol"?r:String(r)}function not(e,r){if(Hw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Hw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function iot(e,r){if(e==null)return{};var n=sot(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function sot(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var oot=y.memo(function(e){var r=e.iconProps,n=iot(e,eot);return c.jsx(ml,$W({Icon:jle,Text:Nle,"aria-label":Fv,iconProps:$W({shape:"square"},r),spaceMultiple:Mst,textMultiple:Rst},n))});function Ww(e){"@babel/helpers - typeof";return Ww=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ww(e)}var aot=["size","style"];function DW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function zE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?DW(Object(n),!0).forEach(function(i){lot(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function lot(e,r,n){return r=cot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cot(e){var r=uot(e,"string");return Ww(r)=="symbol"?r:String(r)}function uot(e,r){if(Ww(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ww(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dot(e,r){if(e==null)return{};var n=hot(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function hot(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var fot=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=dot(e,aot);return c.jsxs("svg",zE(zE({fill:"currentColor",fillRule:"evenodd",height:n,style:zE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),c.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]}))}),ty=fot;ty.Color=Cle;ty.Text=Nle;ty.Combine=oot;ty.Avatar=jle;ty.colorPrimary=kle;ty.title=Fv;const Tle=[{label:"OpenAI / Jait",fields:["OPENAI_API_KEY","OPENAI_BASE_URL","OPENAI_MODEL","OPENAI_TRANSCRIBE_MODEL","OPENAI_WEB_SEARCH_MODEL"]},{label:"Ollama",fields:["OLLAMA_URL","OLLAMA_MODEL"]},{label:"Perplexity",fields:["PERPLEXITY_API_KEY","PERPLEXITY_MODEL","PERPLEXITY_OPENROUTER_MODEL"]},{label:"OpenRouter",fields:["OPENROUTER_API_KEY"]},{label:"xAI / Grok",fields:["XAI_API_KEY","GROK_MODEL"]},{label:"Google Gemini",fields:["GEMINI_API_KEY","GEMINI_MODEL"]},{label:"Moonshot / Kimi",fields:["MOONSHOT_API_KEY","KIMI_BASE_URL","KIMI_MODEL"]},{label:"Brave Search",fields:["BRAVE_API_KEY"]},{label:"Speech / Home Assistant",fields:["WHISPER_URL","HA_URL","HA_TOKEN","HA_STT_ENTITY","ELEVENLABS_API_KEY","ELEVENLABS_STT_MODEL","ELEVENLABS_STT_URL","ELEVENLABS_LANGUAGE_CODE"]}],IW=Tle.flatMap(e=>e.fields),pot={OPENAI:es,PERPLEXITY:ey,OPENROUTER:Iv,XAI:Bv,GEMINI:Ah,ELEVENLABS:cK,MOONSHOT:zv,KIMI:ty,GROK:Q0,OLLAMA:J0,HA:oK};function mot(e){const r=e.split("_")[0];return pot[r]??null}function got(e){return e.endsWith("_KEY")||e.endsWith("_URL")}const yot=Ln();function vot({username:e,token:r,apiKeys:n,onSaveApiKeys:i,sttProvider:s,onSttProviderChange:o,jaitBackend:a,onJaitBackendChange:l,onClearArchive:d,onClearArchivedWorkspaces:u,onFetchArchivedWorkspaces:f,onRestoreWorkspace:p,activityEvents:g,updateInfo:v,updateChecking:b,onCheckUpdate:_,onApplyUpdate:S,updateApplying:w,platform:C}){const[j,N]=y.useState(n),[A,E]=y.useState(!1),[R,P]=y.useState(!1),[B,$]=y.useState(!1),[W,I]=y.useState([]),[K,M]=y.useState(!1),[z,L]=y.useState(null),[F,V]=y.useState(null),[Y,H]=y.useState(null),[U,J]=y.useState({}),[q,ee]=y.useState({}),[re,de]=y.useState("general"),[fe,te]=y.useState(""),ie=y.useRef(null),{importedThemes:ge,activeTheme:le}=zQ(),[Qe,Ze]=y.useState(!1),[Ie,ne]=y.useState(null);y.useEffect(()=>{var Oe;C!=="electron"||!((Oe=window.jaitDesktop)!=null&&Oe.getInfo)||window.jaitDesktop.getInfo().then(ye=>{ye.appVersion&&ne(ye.appVersion)})},[C]),y.useEffect(()=>{var Oe;C!=="electron"||!((Oe=window.jaitDesktop)!=null&&Oe.getSetting)||window.jaitDesktop.getSetting("closeOnWindowClose",!1).then(ye=>{Ze(ye===!0)})},[C]),y.useEffect(()=>{N(n)},[n]);const Ne=IW.some(Oe=>(j[Oe]??"")!==(n[Oe]??"")),Ce=y.useCallback(()=>{N(n),V(null),H(null)},[n]);y.useEffect(()=>{if(!r)return;let Oe=!1;return(async()=>{try{const ye=await fetch(`${yot}/auth/settings/env-status`,{headers:{Authorization:`Bearer ${r}`}});if(ye.ok&&!Oe){const St=await ye.json();J(St.env_set)}}catch{}})(),()=>{Oe=!0}},[r]);const we=y.useCallback(Oe=>{ee(ye=>({...ye,[Oe]:!ye[Oe]}))},[]),Be=async()=>{E(!0),H(null),V(null);try{await i(j),V("API keys saved.")}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to save API keys")}finally{E(!1)}},_t=async()=>{P(!0),H(null),V(null);try{const Oe=await d();V(`Cleared ${Oe} archived session(s).`)}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to clear archive")}finally{P(!1)}},mt=async()=>{$(!0),H(null),V(null);try{const Oe=await u();I([]),V(`Cleared ${Oe} archived workspace(s).`)}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to clear archived workspaces")}finally{$(!1)}},Rt=y.useCallback(async()=>{M(!0);try{const Oe=await f();I(Oe)}finally{M(!1)}},[f]),Jt=async Oe=>{L(Oe);try{await p(Oe)?(I(St=>St.filter(lt=>lt.id!==Oe)),V("Workspace restored.")):H("Failed to restore workspace.")}catch{H("Failed to restore workspace.")}finally{L(null)}},Ot=y.useCallback(async Oe=>{var St;const ye=(St=Oe.target.files)==null?void 0:St[0];if(Oe.target.value="",!!ye){H(null),V(null);try{const lt=FRe(ye.name,await ye.text());V(lt.hasInclude?`Imported theme "${lt.name}". Relative "include" files are not resolved yet.`:`Imported theme "${lt.name}".`)}catch(lt){H(lt instanceof Error?lt.message:"Failed to import theme")}}},[]);function or(Oe){var lt;const ye=!!((lt=j[Oe])!=null&&lt.trim()),St=!!U[Oe];return ye?c.jsx(nn,{variant:"default",className:"text-2xs px-1.5 py-0",children:"user"}):St?c.jsx(nn,{variant:"success",className:"text-2xs px-1.5 py-0",children:".env"}):c.jsx(nn,{variant:"outline",className:"text-2xs px-1.5 py-0 text-muted-foreground",children:"empty"})}const Te=fe.trim().toLowerCase(),Le=(...Oe)=>!Te||Oe.some(ye=>ye==null?void 0:ye.toLowerCase().includes(Te)),Se=Oe=>c.jsx("span",{dangerouslySetInnerHTML:{__html:mnt(Oe,fe)}}),ze=Le("software update version gateway desktop release download install",v==null?void 0:v.currentVersion,v==null?void 0:v.latestVersion,Ie),it=C==="electron"&&Le("desktop tray close window quit minimize app",Ie),ft=C!=="web"&&Le("gateway connection url domain ip server host network",Ln()),st=Le("session archive archived clear delete messages history"),ot=Le("workspace archive archived clear delete workspaces remove"),Dt=Le("jait backend provider openai openrouter model api llm",a),Xe=Le("speech stt input microphone whisper wyoming home assistant transcription gpt openai elevenlabs scribe",s,j.WHISPER_URL,j.HA_URL,j.HA_TOKEN,j.HA_STT_ENTITY,j.OPENAI_TRANSCRIBE_MODEL,j.ELEVENLABS_API_KEY,j.ELEVENLABS_STT_MODEL,j.ELEVENLABS_STT_URL,j.ELEVENLABS_LANGUAGE_CODE),tt=IW.filter(Oe=>Le(Oe,Oe.replaceAll("_"," "),j[Oe])),Et=Le("tools permissions mcp core standard external toggle meta terminal filesystem os agent browser web surfaces scheduler memory voice screen gateway"),nt=Le("activity recent messages terminal sessions feed history"),Zt=Le("extensions plugins store install uninstall enable disable"),Je=Le("skills instructions prompts specialized workflows SKILL.md"),Ge=Le(...kRe(),"import json token colors workbench sidebar tabs"),Tt=c.jsx(Rn,{className:"p-5",children:c.jsxs("p",{className:"text-sm text-muted-foreground",children:["No settings match ",c.jsx("span",{className:"font-medium text-foreground",children:fe}),"."]})});return c.jsxs("div",{className:"mx-auto w-full max-w-5xl space-y-6 p-4 sm:p-6",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Settings"}),c.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Signed in as ",c.jsx("span",{className:"font-medium text-foreground",children:e})]})]}),c.jsxs("div",{className:"relative w-full md:max-w-sm",children:[c.jsx(Vl,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:fe,onChange:Oe=>te(Oe.target.value),placeholder:"Search settings...",className:"pl-9"})]})]}),c.jsxs(V1,{value:re,onValueChange:Oe=>de(Oe),className:"space-y-4",children:[c.jsxs(b0,{className:"flex h-auto w-full flex-wrap justify-start gap-1 rounded-xl bg-muted/70 p-1",children:[c.jsx(Zo,{value:"general",className:"flex-1 sm:flex-none",children:"General"}),c.jsx(Zo,{value:"api",className:"flex-1 sm:flex-none",children:"API"}),c.jsx(Zo,{value:"tools",className:"flex-1 sm:flex-none",children:"Tools"}),c.jsx(Zo,{value:"extensions",className:"flex-1 sm:flex-none",children:"Extensions"}),c.jsx(Zo,{value:"skills",className:"flex-1 sm:flex-none",children:"Skills"}),c.jsx(Zo,{value:"activity",className:"flex-1 sm:flex-none",children:"Activity"})]}),c.jsxs(Jo,{value:"general",className:"space-y-6",children:[Ge&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Editor theme")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Import a VS Code theme JSON file and apply its Monaco token colors plus a mapped shell palette."})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("input",{ref:ie,type:"file",accept:".json,application/json",className:"hidden",onChange:Oe=>{Ot(Oe)}}),c.jsx(_e,{variant:"outline",size:"sm",onClick:()=>{var Oe;return(Oe=ie.current)==null?void 0:Oe.click()},children:"Import theme JSON"}),c.jsx(_e,{variant:"ghost",size:"sm",disabled:!le,onClick:()=>v5(null),children:"Use built-in theme"})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Imported themes stay local to this device. The quick light/system/dark toggle falls back to the built-in theme set."}),ge.length>0?c.jsx("div",{className:"space-y-2",children:ge.map(Oe=>{const ye=(le==null?void 0:le.id)===Oe.id;return c.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg border px-3 py-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("p",{className:"truncate text-sm font-medium",children:Oe.name}),c.jsx(nn,{variant:ye?"default":"outline",className:"h-5 px-1.5 text-2xs",children:ye?"active":Oe.colorMode})]}),c.jsx("p",{className:"truncate text-xs text-muted-foreground",children:Oe.sourceLabel})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!ye&&c.jsx(_e,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>v5(Oe.id),children:"Apply"}),c.jsx(_e,{variant:"ghost",size:"sm",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:()=>HRe(Oe.id),children:"Remove"})]})]},Oe.id)})}):c.jsx("p",{className:"text-sm text-muted-foreground",children:"No imported themes yet."})]}),ze&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsxs("h2",{className:"flex items-center gap-2 text-base font-medium",children:[c.jsx(rK,{className:"h-4 w-4"}),Se("Software Update")]}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[v?c.jsxs(c.Fragment,{children:["Gateway ",c.jsxs("span",{className:"font-mono font-medium text-foreground",children:["v",v.currentVersion]})]}):"Check for the latest Jait version.",Ie&&c.jsxs(c.Fragment,{children:[" · Desktop app ",c.jsxs("span",{className:"font-mono font-medium text-foreground",children:["v",Ie]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs(_e,{variant:"outline",size:"sm",onClick:_,disabled:b||w,children:[b?c.jsx(sr,{className:"mr-1.5 h-4 w-4 animate-spin"}):null,b?"Checking...":"Check for updates"]}),(v==null?void 0:v.hasUpdate)&&c.jsxs(c.Fragment,{children:[c.jsxs(_e,{size:"sm",onClick:S,disabled:w,children:[w?c.jsx(sr,{className:"mr-1.5 h-4 w-4 animate-spin"}):c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),w?"Updating...":`Update gateway to v${v.latestVersion}`]}),C==="electron"?c.jsxs(_e,{size:"sm",variant:"outline",onClick:async()=>{const Oe=window.jaitDesktop;(await Oe.checkForUpdate()).updateAvailable&&(await Oe.downloadUpdate(),await Oe.installUpdate())},children:[c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),"Update desktop app"]}):C!=="web"&&c.jsx(_e,{size:"sm",variant:"outline",asChild:!0,children:c.jsxs("a",{href:"https://github.com/Widev-e-U/Jait/releases/latest",target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),"Download latest APK"]})})]})]}),v&&!v.hasUpdate&&c.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400",children:[c.jsx(ql,{className:"h-3.5 w-3.5"}),"You're on the latest version."]}),(v==null?void 0:v.hasUpdate)&&c.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-amber-600 dark:text-amber-400",children:[c.jsx(Oa,{className:"h-3.5 w-3.5"}),"Version ",v.latestVersion," is available",C!=="web"?" — download from jait.dev":"","."]})]}),it&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Desktop")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Settings specific to the desktop application."})]}),c.jsxs("div",{className:"flex max-w-md items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"close-on-window-close",children:"Quit on window close"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"When off, closing the window minimizes Jait to the system tray."})]}),c.jsx(Kf,{id:"close-on-window-close",checked:Qe,onCheckedChange:Oe=>{var ye;Ze(Oe),(ye=window.jaitDesktop)==null||ye.setSetting("closeOnWindowClose",Oe)}})]})]}),ft&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Gateway connection")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Desktop and mobile clients can connect to a different Jait gateway."})]}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Current gateway: ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:Ln()})]})]}),st&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Session archive")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Permanently remove archived sessions and their messages from your account."})]}),c.jsx("div",{children:c.jsx(_e,{variant:"destructive",onClick:()=>{_t()},disabled:R,children:R?"Clearing...":"Clear archived sessions"})})]}),ot&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Workspace archive")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Restore or permanently remove archived workspaces and their sessions."})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(_e,{variant:"outline",onClick:()=>{Rt()},disabled:K,children:K?c.jsxs(c.Fragment,{children:[c.jsx(sr,{className:"mr-2 h-3.5 w-3.5 animate-spin"})," Loading..."]}):"Show archived workspaces"}),c.jsx(_e,{variant:"destructive",onClick:()=>{mt()},disabled:B,children:B?"Clearing...":"Clear all archived"})]}),W.length>0&&c.jsx("div",{className:"space-y-2",children:W.map(Oe=>c.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-lg border px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(w9,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-medium truncate",children:Oe.title||Oe.rootPath||Oe.id}),Oe.rootPath&&Oe.title&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:Oe.rootPath})]})]}),c.jsxs(_e,{variant:"outline",size:"sm",className:"shrink-0 h-7 text-xs",onClick:()=>{Jt(Oe.id)},disabled:z===Oe.id,children:[z===Oe.id?c.jsx(sr,{className:"mr-1.5 h-3 w-3 animate-spin"}):c.jsx(dge,{className:"mr-1.5 h-3 w-3"}),"Restore"]})]},Oe.id))})]}),Dt&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Jait LLM Backend")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose which API backend the Jait provider uses for model inference."})]}),c.jsxs("div",{className:"max-w-sm",children:[c.jsx(wi,{htmlFor:"jait-backend",className:"mb-1.5 block",children:"Backend provider"}),c.jsxs(D_,{value:a,onValueChange:Oe=>{l(Oe)},children:[c.jsx(O1,{id:"jait-backend",children:c.jsx(I_,{placeholder:"Select backend"})}),c.jsxs(R1,{children:[c.jsx(td,{value:"openai",children:"OpenAI (direct)"}),c.jsx(td,{value:"openrouter",children:"OpenRouter"}),c.jsx(td,{value:"ollama",children:"Ollama (local)"})]})]}),c.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:a==="openrouter"?"Models will be fetched from OpenRouter. Set your OPENROUTER_API_KEY in the API tab.":a==="ollama"?"Models will be fetched from your local Ollama instance. Set OLLAMA_URL in the API tab if not running on localhost:11434.":"Uses your OPENAI_API_KEY and OPENAI_BASE_URL."})]})]}),Xe&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Spracheingabe (Speech-to-Text)")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Wähle aus, wie gesprochene Sprache in Text umgewandelt wird, bevor sie als Nachricht gesendet wird."})]}),c.jsxs("div",{className:"max-w-sm",children:[c.jsx(wi,{htmlFor:"stt-provider",className:"mb-1.5 block",children:"STT-Anbieter"}),c.jsxs(D_,{value:s,onValueChange:Oe=>{o(Oe)},children:[c.jsx(O1,{id:"stt-provider",children:c.jsx(I_,{placeholder:"STT-Anbieter wählen"})}),c.jsxs(R1,{children:[c.jsx(td,{value:"whisper",children:"Faster Whisper (lokal)"}),c.jsx(td,{value:"gpt",children:"GPT (OpenAI)"}),c.jsx(td,{value:"elevenlabs",children:"ElevenLabs Scribe"}),c.jsx(td,{value:"wyoming",children:"Wyoming / Whisper (Home Assistant)"})]})]})]}),s==="whisper"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses a local Faster Whisper server for free, offline transcription. Start the server with ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"python whisper-server/server.py"})," from the gateway package. Optionally set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"WHISPER_URL"})," in API keys below (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"http://localhost:8178"}),")."]})}),s==="wyoming"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Configure your Home Assistant Wyoming/Whisper STT integration. Set these values in the API keys section below: ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_URL"}),", ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_TOKEN"}),", and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_STT_ENTITY"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"stt.faster_whisper"}),")."]})}),s==="gpt"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses OpenAI audio transcription. Set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"OPENAI_API_KEY"})," and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"OPENAI_TRANSCRIBE_MODEL"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"gpt-4o-mini-transcribe"}),")."]})}),s==="elevenlabs"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses ElevenLabs Speech to Text. Set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_API_KEY"})," and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_STT_MODEL"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"scribe_v2"}),") and ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_LANGUAGE_CODE"}),"."]})})]}),!Ge&&!ze&&!it&&!ft&&!st&&!ot&&!Dt&&!Xe&&Tt]}),c.jsx(Jo,{value:"api",className:"space-y-6 pb-20",children:tt.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Values stored here are user-specific and override environment defaults for your account."}),Tle.map(Oe=>{const ye=Oe.fields.filter(lt=>tt.includes(lt));if(ye.length===0)return null;const St=mot(ye[0]);return c.jsx(yS,{defaultOpen:!1,children:c.jsxs(Rn,{className:"p-0 overflow-hidden",children:[c.jsxs(vS,{className:"flex w-full items-center gap-2 px-5 py-3.5 text-left hover:bg-muted/50 transition-colors group",children:[c.jsx(ao,{className:"h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-90"}),St?c.jsx(St,{size:16,className:"text-muted-foreground"}):c.jsx(cK,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-semibold",children:Se(Oe.label)})]}),c.jsx(xS,{children:c.jsx("div",{className:"grid gap-4 px-5 pb-5 md:grid-cols-2",children:ye.map(lt=>{const pt=got(lt),dr=!!q[lt];return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(wi,{htmlFor:`api-${lt}`,className:"font-mono text-xs",children:Se(lt)}),or(lt)]}),c.jsxs("div",{className:"relative",children:[c.jsx(Hn,{id:`api-${lt}`,type:pt&&!dr?"password":"text",value:j[lt]??"",onChange:Nr=>{N(mn=>({...mn,[lt]:Nr.target.value}))},placeholder:U[lt]?"(set via .env)":"(empty)",className:pt?"pr-9":""}),pt&&c.jsx("button",{type:"button",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:()=>we(lt),tabIndex:-1,"aria-label":dr?"Hide value":"Show value",children:dr?c.jsx(fh,{className:"h-4 w-4"}):c.jsx(Ef,{className:"h-4 w-4"})})]})]},lt)})})})]})},Oe.label)}),c.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-30 border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:c.jsxs("div",{className:"mx-auto flex max-w-5xl items-center gap-3 px-4 py-3 sm:px-6",children:[c.jsx(_e,{onClick:()=>{Be()},disabled:A||!Ne,children:A?"Saving...":"Save API settings"}),c.jsx(_e,{variant:"ghost",onClick:Ce,disabled:!Ne,children:"Discard"}),F&&c.jsx("span",{className:"text-sm text-muted-foreground",children:F}),Y&&c.jsx("span",{className:"text-sm text-destructive",children:Y})]})})]}):Tt}),c.jsx(Jo,{value:"tools",className:"space-y-6",children:Et?c.jsx(ont,{token:r}):Tt}),c.jsx(Jo,{value:"extensions",className:"space-y-6",children:Zt?c.jsx(unt,{token:r}):Tt}),c.jsx(Jo,{value:"skills",className:"space-y-6",children:Je?c.jsx(fnt,{token:r}):Tt}),c.jsxs(Jo,{value:"activity",className:"space-y-6",children:[nt&&g&&g.length>0&&c.jsxs(Rn,{className:"p-5 space-y-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Recent activity")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent chat messages and terminal sessions."})]}),c.jsx(pnt,{events:g})]}),nt&&(!g||g.length===0)&&c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"No recent activity yet."})}),!nt&&Tt]})]})]})}function xot(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,s,o,a,l=[],d=!0,u=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(i=o.call(n)).done)&&(l.push(i.value),l.length!==r);d=!0);}catch(f){u=!0,s=f}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return l}}function bot(e,r,n){return r=Tot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function BW(e,r){return Sot(e)||xot(e,r)||Ele(e,r)||jot()}function _ot(e){return wot(e)||kot(e)||Ele(e)||Cot()}function wot(e){if(Array.isArray(e))return zO(e)}function Sot(e){if(Array.isArray(e))return e}function kot(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ele(e,r){if(e){if(typeof e=="string")return zO(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zO(e,r)}}function zO(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Cot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1163
+ `:"")+g,i.push({type:"text",content:g})}break}}}return l(),r}const cW=Ln(),uW={core:{variant:"default",label:"core"},standard:{variant:"secondary",label:"standard"},external:{variant:"warning",label:"external"}},dW=["meta","terminal","filesystem","os","agent","browser","web","surfaces","scheduler","memory","voice","screen","gateway","external"];function ont({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(!1),[l,d]=y.useState(null),[u,f]=y.useState("");y.useEffect(()=>{if(!e)return;let S=!1;return(async()=>{try{const w=await fetch(`${cW}/auth/settings/tools`,{headers:{Authorization:`Bearer ${e}`}});if(!S)if(w.ok){const C=await w.json();n(C.tools)}else d(`Failed to load tools (${w.status})`)}catch{S||d("Failed to load tools")}finally{S||s(!1)}})(),()=>{S=!0}},[e]);const p=y.useCallback(async(S,w)=>{if(e){n(C=>C.map(j=>j.name===S?{...j,enabled:w}:j)),a(!0),d(null);try{const C=r.map(N=>N.name===S?{...N,enabled:w}:N).filter(N=>!N.enabled&&!N.locked).map(N=>N.name);if(!(await fetch(`${cW}/auth/settings/tools`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({disabled_tools:C})})).ok)throw new Error("Failed to save")}catch{n(C=>C.map(j=>j.name===S?{...j,enabled:!w}:j)),d("Failed to update tool setting")}finally{a(!1)}}},[e,r]),g=new Map,v=u.trim().toLowerCase();for(const S of r){if(v&&!`${S.name} ${S.description} ${S.category}`.toLowerCase().includes(v))continue;const w=S.category;g.has(w)||g.set(w,[]),g.get(w).push(S)}const b=[...g.keys()].sort((S,w)=>{const C=dW.indexOf(S),j=dW.indexOf(w);return(C===-1?999:C)-(j===-1?999:j)}),_={total:r.length,enabled:r.filter(S=>S.enabled).length,core:r.filter(S=>S.tier==="core").length,standard:r.filter(S=>S.tier==="standard").length,external:r.filter(S=>S.tier==="external").length};return i?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading tools..."})}):c.jsxs(Rn,{className:"p-5 space-y-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Tools"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage which tools are available to the AI agent. Core tools are always enabled. Standard tools can be toggled. External (MCP) tools are discovered on demand."})]}),c.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(H4,{className:"h-3.5 w-3.5"}),_.core," core"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(T9,{className:"h-3.5 w-3.5"}),_.standard," standard"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(K_,{className:"h-3.5 w-3.5"}),_.external," external"]}),c.jsxs("span",{className:"ml-auto",children:[_.enabled,"/",_.total," enabled"]})]}),c.jsxs("div",{className:"relative",children:[c.jsx(Vl,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Hn,{placeholder:"Filter tools...",value:u,onChange:S=>f(S.target.value),className:"pl-9"})]}),l&&c.jsx("p",{className:"text-sm text-destructive",children:l}),c.jsxs("div",{className:"space-y-5",children:[b.map(S=>{const w=g.get(S);return c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wide mb-2",children:S}),c.jsx("div",{className:"space-y-1",children:w.map(C=>{const j=uW[C.tier]??uW.standard;return c.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 rounded-md hover:bg-muted/50 transition-colors",children:[c.jsx(Kf,{checked:C.enabled,onCheckedChange:N=>{p(C.name,N)},disabled:C.locked||o,"aria-label":`Toggle ${C.name}`}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-mono text-sm font-medium",children:C.name}),c.jsx(nn,{variant:j.variant,className:"text-2xs px-1.5 py-0",children:j.label}),C.source==="mcp"&&c.jsx(nn,{variant:"outline",className:"text-2xs px-1.5 py-0",children:"MCP"})]}),c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:C.description})]})]},C.name)})})]},S)}),b.length===0&&c.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:v?"No tools match your filter.":"No tools available."})]})]})}const c_=Ln(),ant={installed:{variant:"secondary",label:"installed"},enabled:{variant:"default",label:"enabled"},disabled:{variant:"outline",label:"disabled"},error:{variant:"destructive",label:"error"}};function hle(e){return y.useCallback(()=>{const r={"Content-Type":"application/json"};return e&&(r.Authorization=`Bearer ${e}`),r},[e])}function lnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState(null),p=hle(e),g=y.useCallback(async()=>{s(!0),a(null);try{const C=await fetch(`${c_}/api/plugins`,{headers:p()});if(!C.ok)throw new Error(`Failed to load extensions (HTTP ${C.status})`);const j=await C.json();n(j)}catch(C){a(C instanceof Error?C.message:"Failed to load extensions")}finally{s(!1)}},[p]);y.useEffect(()=>{g()},[g]);const v=y.useCallback(async(C,j)=>{f(C);try{const N=j?"enable":"disable",A=await fetch(`${c_}/api/plugins/${encodeURIComponent(C)}/${N}`,{method:"POST",headers:p()});if(!A.ok){const E=await A.json().catch(()=>({}));throw new Error(E.error??`Failed to ${N} (HTTP ${A.status})`)}await g()}catch(N){a(N instanceof Error?N.message:"Action failed")}finally{f(null)}},[p,g]),b=y.useCallback(async C=>{f(C);try{const j=await fetch(`${c_}/api/plugins/${encodeURIComponent(C)}`,{method:"DELETE",headers:p()});if(!j.ok){const N=await j.json().catch(()=>({}));throw new Error(N.error??`Failed to uninstall (HTTP ${j.status})`)}await g()}catch(j){a(j instanceof Error?j.message:"Action failed")}finally{f(null)}},[p,g]),_=y.useCallback(async()=>{s(!0);try{const C=await fetch(`${c_}/api/plugins/scan`,{method:"POST",headers:p()});if(!C.ok)throw new Error(`Scan failed (HTTP ${C.status})`);const j=await C.json();n(j)}catch(C){a(C instanceof Error?C.message:"Scan failed")}finally{s(!1)}},[p]),S=l.toLowerCase(),w=r.filter(C=>S?C.id.toLowerCase().includes(S)||C.displayName.toLowerCase().includes(S)||(C.description??"").toLowerCase().includes(S)||(C.author??"").toLowerCase().includes(S):!0);return i&&r.length===0?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions..."})}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:C=>d(C.target.value),placeholder:"Filter extensions...",className:"pl-9"})]}),c.jsxs(_e,{variant:"outline",size:"sm",onClick:()=>void _(),disabled:i,children:[c.jsx(Ta,{className:`mr-1.5 h-3.5 w-3.5 ${i?"animate-spin":""}`}),"Scan"]})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),w.length===0&&!i&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(K_,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r.length===0?"No extensions installed. Drop plugin folders into ~/.jait/extensions/ and click Scan.":"No extensions match your filter."})]}),w.map(C=>{const j=ant[C.status],N=C.status==="enabled",A=u===C.id;return c.jsxs(Rn,{className:"flex items-start gap-4 p-4",children:[c.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(K_,{className:"h-5 w-5 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:C.displayName}),c.jsx(nn,{variant:j.variant,className:"text-2xs",children:j.label}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",C.version]})]}),C.description&&c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:C.description}),C.author&&c.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["by ",C.author]}),C.error&&c.jsx("p",{className:"mt-1 text-xs text-destructive",children:C.error}),c.jsx("p",{className:"mt-0.5 text-2xs text-muted-foreground/60 font-mono",children:C.id})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c.jsx(Kf,{checked:N,disabled:A,onCheckedChange:E=>void v(C.id,E),"aria-label":N?"Disable":"Enable"}),c.jsx(_e,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",disabled:A,onClick:()=>void b(C.id),title:"Uninstall",children:c.jsx(_h,{className:"h-4 w-4"})})]})]},C.id)})]})}function cnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),l=hle(e),d=y.useCallback(async()=>{s(!0),a(null);try{const u=await fetch(`${c_}/api/store/packages?limit=50`,{headers:l()});if(!u.ok)throw new Error(`Failed to browse ClawHub (HTTP ${u.status})`);const f=await u.json();n(f.items??[])}catch(u){a(u instanceof Error?u.message:"Failed to load marketplace")}finally{s(!1)}},[l]);return y.useEffect(()=>{d()},[d]),c.jsxs("div",{className:"space-y-4",children:[c.jsxs(Rn,{className:"bg-muted/30 p-4 text-sm text-muted-foreground",children:["Browse OpenClaw plugins on"," ",c.jsx("a",{href:"https://clawhub.ai/plugins",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"}),". To install, download the plugin and place it in"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/extensions/"}),", then click Scan on the Installed tab."]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),i&&r.length===0&&c.jsxs(Rn,{className:"flex items-center justify-center gap-2 p-8",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading from ClawHub..."})]}),!i&&r.length===0&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(K_,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"No packages available."})]}),r.map((u,f)=>{const p=u.displayName??u.name??"Unknown",g=u.description??"",v=u.type??"plugin";return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(K_,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:p}),u.version&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",u.version]}),c.jsx(nn,{variant:"outline",className:"text-2xs",children:v})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:g}),u.author&&c.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["by @",u.author]})]}),c.jsx("a",{href:`https://clawhub.ai/plugins/${encodeURIComponent(u.name??"")}`,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(_e,{variant:"outline",size:"sm",className:"h-7 text-xs",children:[c.jsx(Lm,{className:"mr-1 h-3 w-3"}),"View"]})})]},u.name??f)})]})}function unt({token:e}){return c.jsxs(V1,{defaultValue:"installed",className:"space-y-4",children:[c.jsxs(Rn,{className:"space-y-3 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Extensions"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Manage plugins and extensions. Browse the"," ",c.jsx("a",{href:"https://clawhub.ai/plugins",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"})," ","marketplace or drop plugins into"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/extensions/"}),"."]})]}),c.jsxs(b0,{children:[c.jsx(Zo,{value:"installed",children:"Installed"}),c.jsx(Zo,{value:"marketplace",children:"Marketplace"})]})]}),c.jsx(Jo,{value:"installed",className:"mt-0 space-y-4",children:c.jsx(lnt,{token:e})}),c.jsx(Jo,{value:"marketplace",className:"mt-0 space-y-4",children:c.jsx(cnt,{token:e})})]})}const a4=Ln();function hW(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const fW={bundled:{variant:"default",label:"bundled"},user:{variant:"secondary",label:"user"},workspace:{variant:"outline",label:"workspace"},plugin:{variant:"secondary",label:"plugin"}};function fle(e){return y.useCallback(()=>{const r={"Content-Type":"application/json"};return e&&(r.Authorization=`Bearer ${e}`),r},[e])}function dnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState(null),p=fle(e),g=y.useCallback(async()=>{s(!0),a(null);try{const S=await fetch(`${a4}/api/skills`,{headers:p()});if(!S.ok)throw new Error(`Failed to load skills (HTTP ${S.status})`);const w=await S.json();n(w)}catch(S){a(S instanceof Error?S.message:"Failed to load skills")}finally{s(!1)}},[p]);y.useEffect(()=>{g()},[g]);const v=y.useCallback(async(S,w)=>{f(S);try{const C=await fetch(`${a4}/api/skills/${encodeURIComponent(S)}`,{method:"PATCH",headers:p(),body:JSON.stringify({enabled:w})});if(!C.ok)throw new Error(`Failed to update skill (HTTP ${C.status})`);n(j=>j.map(N=>N.id===S?{...N,enabled:w}:N))}catch(C){a(C instanceof Error?C.message:"Action failed")}finally{f(null)}},[p]),b=l.toLowerCase(),_=r.filter(S=>b?S.id.toLowerCase().includes(b)||S.name.toLowerCase().includes(b)||S.description.toLowerCase().includes(b)||S.source.includes(b):!0);return i&&r.length===0?c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading skills..."})}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:S=>d(S.target.value),placeholder:"Filter installed skills...",className:"pl-9"})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),_.length===0&&!i&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(FC,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r.length===0?"No skills discovered. Install from the Marketplace or create a SKILL.md in ~/.jait/skills/.":"No skills match your filter."})]}),_.map(S=>{const w=fW[S.source]??fW.user,C=u===S.id;return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(FC,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:S.name}),c.jsx(nn,{variant:w.variant,className:"text-2xs",children:w.label})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:S.description}),c.jsx("p",{className:"mt-0.5 text-2xs text-muted-foreground/60 font-mono truncate",children:S.filePath})]}),c.jsx(Kf,{checked:S.enabled,disabled:C,onCheckedChange:j=>void v(S.id,j),"aria-label":S.enabled?"Disable":"Enable",className:"shrink-0"})]},S.id)})]})}function hnt({token:e}){const[r,n]=y.useState([]),[i,s]=y.useState(!0),[o,a]=y.useState(null),[l,d]=y.useState(""),[u,f]=y.useState("tool workflow agent"),[p,g]=y.useState(null),v=y.useRef(null),b=fle(e),_=y.useCallback(async(C,j)=>{s(!0),a(null);try{const N=new URLSearchParams;C?N.set("q",C):N.set("sort",j??"tool workflow agent"),N.set("limit","25");const A=await fetch(`${a4}/api/store/skills?${N}`,{headers:b()});if(!A.ok)throw new Error(`Failed to browse ClawHub (HTTP ${A.status})`);const E=await A.json();n(E.results??[])}catch(N){a(N instanceof Error?N.message:"Failed to load marketplace")}finally{s(!1)}},[b]);y.useEffect(()=>{_(void 0,u)},[_,u]);const S=y.useCallback(C=>{d(C),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{_(C||void 0,u)},400)},[_,u]),w=y.useCallback(async C=>{g(C),a(null);try{const j=await fetch(`${a4}/api/store/skills/${encodeURIComponent(C)}/install`,{method:"POST",headers:b(),body:JSON.stringify({})});if(!j.ok){const N=await j.json().catch(()=>({}));throw new Error(N.error??`Install failed (HTTP ${j.status})`)}n(N=>N.map(A=>A.slug===C?{...A,installed:!0}:A))}catch(j){a(j instanceof Error?j.message:"Install failed")}finally{g(null)}},[b]);return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Vl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:l,onChange:C=>S(C.target.value),placeholder:"Search ClawHub skills...",className:"pl-9"})]}),c.jsxs("select",{value:u,onChange:C=>f(C.target.value),className:"h-9 rounded-md border bg-background px-3 text-sm",children:[c.jsx("option",{value:"tool workflow agent",children:"Popular"}),c.jsx("option",{value:"memory learning self-improving",children:"Memory"}),c.jsx("option",{value:"search web browser automation",children:"Search"}),c.jsx("option",{value:"git github code development",children:"Development"}),c.jsx("option",{value:"calendar slack obsidian productivity",children:"Productivity"})]})]}),o&&c.jsxs(Rn,{className:"flex items-start gap-2 border-destructive/50 bg-destructive/5 p-4",children:[c.jsx(Oa,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),c.jsx("p",{className:"text-sm text-destructive",children:o})]}),i&&r.length===0&&c.jsxs(Rn,{className:"flex items-center justify-center gap-2 p-8",children:[c.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading from ClawHub..."})]}),!i&&r.length===0&&c.jsxs(Rn,{className:"p-8 text-center",children:[c.jsx(Vl,{className:"mx-auto h-8 w-8 text-muted-foreground/40"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:l?"No skills match your search.":"No skills available."})]}),r.map(C=>{var W,I,K;const j=C.slug??"",N=C.displayName??j,A=C.summary??"",E=((W=C.latestVersion)==null?void 0:W.version)??C.version??"",R=((I=C.stats)==null?void 0:I.stars)??0,P=((K=C.stats)==null?void 0:K.downloads)??0,B=C.installed===!0,$=p===j;return c.jsxs(Rn,{className:"flex items-start gap-3 p-4",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(FC,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium",children:N}),E&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",E]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground line-clamp-2",children:A}),c.jsxs("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[R>0&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(Gye,{className:"h-3 w-3"}),hW(R)]}),P>0&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(Tm,{className:"h-3 w-3"}),hW(P)]}),c.jsxs("a",{href:`https://clawhub.ai/skills?focus=search&q=${encodeURIComponent(j)}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-0.5 hover:text-foreground",children:[c.jsx(Lm,{className:"h-3 w-3"}),"ClawHub"]})]})]}),c.jsx("div",{className:"shrink-0",children:B?c.jsxs(nn,{variant:"secondary",className:"flex items-center gap-1 text-2xs",children:[c.jsx(hs,{className:"h-3 w-3"}),"Installed"]}):c.jsxs(_e,{size:"sm",variant:"outline",disabled:$,onClick:()=>void w(j),className:"h-7 text-xs",children:[$?c.jsx(sr,{className:"mr-1 h-3 w-3 animate-spin"}):c.jsx(Tm,{className:"mr-1 h-3 w-3"}),"Install"]})})]},j)})]})}function fnt({token:e}){return c.jsxs(V1,{defaultValue:"installed",className:"space-y-4",children:[c.jsxs(Rn,{className:"space-y-3 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:"Skills"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Specialized instruction sets that teach the AI how to use specific tools and workflows. Install from"," ",c.jsx("a",{href:"https://clawhub.ai/skills",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"ClawHub"})," ","or place SKILL.md files in"," ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.jait/skills/"}),"."]})]}),c.jsxs(b0,{children:[c.jsx(Zo,{value:"installed",children:"Installed"}),c.jsx(Zo,{value:"marketplace",children:"Marketplace"})]})]}),c.jsx(Jo,{value:"installed",className:"mt-0 space-y-4",children:c.jsx(dnt,{token:e})}),c.jsx(Jo,{value:"marketplace",className:"mt-0 space-y-4",children:c.jsx(hnt,{token:e})})]})}function pnt({events:e}){return c.jsx(ph,{className:"h-full w-full",children:c.jsx("div",{className:"p-4 space-y-2",children:e.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No activity yet."}):e.map(r=>c.jsxs("div",{className:"rounded-md border p-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("p",{className:"text-sm font-medium",children:r.title}),c.jsx("span",{className:"text-xs text-muted-foreground",children:r.source})]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r.detail})]},r.id))})})}function Nb(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function mnt(e,r){const n=r.trim();if(!n)return Nb(e);const i=e.toLowerCase(),s=n.toLowerCase();let o=0,a=i.indexOf(s);if(a===-1)return Nb(e);let l="";for(;a!==-1;){a>o&&(l+=Nb(e.slice(o,a)));const d=a+n.length;l+=`<mark class="rounded bg-yellow-200/80 px-0.5 text-inherit dark:bg-yellow-500/30">${Nb(e.slice(a,d))}</mark>`,o=d,a=i.indexOf(s,o)}return o<e.length&&(l+=Nb(e.slice(o))),l}var Dv="Perplexity",gnt=.75,ynt=.2,ple="#22B8CD",vnt=ple,xnt="#000",bnt=.75;function ww(e){"@babel/helpers - typeof";return ww=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ww(e)}var _nt=["size","style"];function pW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function EE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?pW(Object(n),!0).forEach(function(i){wnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function wnt(e,r,n){return r=Snt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Snt(e){var r=knt(e,"string");return ww(r)=="symbol"?r:String(r)}function knt(e,r){if(ww(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(ww(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Cnt(e,r){if(e==null)return{};var n=jnt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function jnt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var hP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Cnt(e,_nt);return c.jsxs("svg",EE(EE({fill:"currentColor",fillRule:"evenodd",height:n,style:EE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"})]}))});function Sw(e){"@babel/helpers - typeof";return Sw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sw(e)}function mW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Nnt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?mW(Object(n),!0).forEach(function(i){Tnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Tnt(e,r,n){return r=Ent(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ent(e){var r=Ant(e,"string");return Sw(r)=="symbol"?r:String(r)}function Ant(e,r){if(Sw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Sw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ont(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Rnt=y.memo(function(e){var r=Object.assign({},(Ont(e),e));return c.jsx(pl,Nnt({Icon:hP,"aria-label":Dv,background:vnt,color:xnt,iconMultiple:bnt},r))});function kw(e){"@babel/helpers - typeof";return kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},kw(e)}var Mnt=["size","style"];function gW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function AE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?gW(Object(n),!0).forEach(function(i){Pnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Pnt(e,r,n){return r=Lnt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Lnt(e){var r=$nt(e,"string");return kw(r)=="symbol"?r:String(r)}function $nt(e,r){if(kw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(kw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Dnt(e,r){if(e==null)return{};var n=Int(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Int(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Dnt(e,Mnt);return c.jsxs("svg",AE(AE({height:n,style:AE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z",fill:"#22B8CD",fillRule:"nonzero"})]}))});function Cw(e){"@babel/helpers - typeof";return Cw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cw(e)}var Bnt=["size","style"];function yW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function OE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yW(Object(n),!0).forEach(function(i){znt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function znt(e,r,n){return r=Fnt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fnt(e){var r=Hnt(e,"string");return Cw(r)=="symbol"?r:String(r)}function Hnt(e,r){if(Cw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Cw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Wnt(e,r){if(e==null)return{};var n=Unt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Unt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var gle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Wnt(e,Bnt);return c.jsxs("svg",OE(OE({fill:"currentColor",fillRule:"evenodd",height:n,style:OE({flex:"none",lineHeight:1},i),viewBox:"0 0 117 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Dv}),c.jsx("path",{d:"M38.542 5.218h1.151V7.59h-1.49c-1.167 0-2.036.281-2.612.843-.575.563-.863 1.485-.863 2.768v7.773h-2.351V5.271h2.351v2.187c0 .123.062.185.184.185.069 0 .121-.017.157-.053a.58.58 0 00.104-.211c.453-1.44 1.577-2.16 3.371-2.16h-.002zm15.36 2.938c.617 1.098.928 2.42.928 3.966 0 1.545-.309 2.867-.928 3.965-.62 1.098-1.42 1.92-2.404 2.464a6.446 6.446 0 01-3.174.817c-2.23 0-3.797-.896-4.703-2.688-.069-.14-.157-.211-.262-.211-.105 0-.157.052-.157.158v7.352h-2.351V5.271h2.351v2.345c0 .106.052.159.157.159.105 0 .191-.07.262-.211.906-1.793 2.473-2.689 4.703-2.689 1.132 0 2.19.272 3.174.817.984.545 1.785 1.366 2.404 2.464zm-1.424 3.966c0-1.617-.43-2.877-1.292-3.781-.862-.904-1.998-1.357-3.41-1.357-1.413 0-2.548.453-3.41 1.357-.863.905-1.179 2.166-1.179 3.78 0 1.616.316 2.878 1.178 3.782.863.905 2 1.356 3.41 1.356 1.411 0 2.549-.453 3.411-1.356.862-.904 1.292-2.166 1.292-3.781zM15.05 8.177c.618 1.098.928 2.42.928 3.965 0 1.546-.308 2.868-.928 3.966-.619 1.098-1.42 1.919-2.403 2.464a6.448 6.448 0 01-3.175.817c-2.23 0-3.797-.896-4.702-2.688-.07-.14-.158-.212-.262-.212-.105 0-.158.053-.158.159V24H2V5.292h2.351v2.345c0 .106.053.159.158.159.104 0 .19-.07.261-.212.906-1.792 2.473-2.688 4.703-2.688 1.132 0 2.19.272 3.175.817.983.545 1.784 1.366 2.403 2.464h-.002zm-1.423 3.965c0-1.616-.43-2.877-1.293-3.78-.862-.904-1.998-1.357-3.41-1.357-1.412 0-2.548.453-3.41 1.357-.862.905-1.178 2.165-1.178 3.78 0 1.615.316 2.878 1.178 3.781.862.906 1.998 1.357 3.41 1.357 1.412 0 2.548-.453 3.41-1.357.863-.903 1.293-2.166 1.293-3.78zm14.422 2.481h2.482c-.33 1.283-1.006 2.395-2.023 3.334-1.02.94-2.479 1.41-4.378 1.41-1.429 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.521-2.516c-.593-1.089-.889-2.372-.889-3.847 0-1.476.288-2.758.863-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.393 0 2.547.29 3.514.87.968.58 1.69 1.349 2.168 2.305.48.959.719 2.008.719 3.15v1.58H19.427c.086 1.37.544 2.46 1.37 3.268.828.807 1.939 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.601-.466 1.04-1.111 1.32-1.938zm-8.595-3.82h8.204c0-1.194-.305-2.13-.914-2.807-.61-.676-1.568-1.015-2.874-1.015-1.22 0-2.217.33-2.99.988-.775.659-1.25 1.604-1.424 2.832l-.002.002zm37.238 8.17h2.352V0H56.69v18.974-.002zM89.316 3.774h2.747V.81h-2.747v2.966zm9.688 13.156c-.426.043-.684.066-.77.066a.39.39 0 01-.289-.106.395.395 0 01-.104-.29c0-.087.022-.348.065-.778.043-.43.066-1.094.066-1.988V7.279h3.354l-.66-2.008h-2.692v-3.69h-2.352v3.688h-2.557v2.008h2.557v7.214c0 1.512.367 2.636 1.098 3.374.732.737 1.846 1.107 3.345 1.107h1.83v-2.107h-.915c-.889 0-1.547.022-1.974.066h-.002zm13.759-11.662l-3.893 11.498c-.053.141-.135.326-.402.326-.268 0-.35-.185-.402-.326l-3.893-11.498h-2.398l4.508 13.703h1.594a.81.81 0 01.235.026c.053.017.096.06.131.133.07.105.06.264-.026.473l-.731 2.002c-.105.264-.305.396-.6.396-.106 0-.349-.023-.732-.066a13.71 13.71 0 00-1.49-.066h-1.907v2.107h2.508c1.463 0 2.344-.25 3.102-.75.757-.5 1.345-1.383 1.764-2.65L115 5.795v-.526h-2.237v.001zm-31.127 5.113L77.953 5.27h-2.588v.527l4.415 5.93-5.382 6.72v.526h2.64l4.285-5.507 3.998 5.507h2.535v-.526l-4.677-6.324 5.07-6.298v-.553h-2.64l-3.971 5.113-.002-.002zm7.931 8.59h2.351v-13.7h-2.35v13.702-.002zm-15.062-4.349c-.331 1.283-1.006 2.395-2.024 3.334-1.02.94-2.479 1.41-4.377 1.41-1.43 0-2.686-.295-3.775-.884a6.13 6.13 0 01-2.522-2.516c-.593-1.089-.888-2.372-.888-3.847 0-1.476.288-2.758.862-3.847.574-1.089 1.38-1.928 2.417-2.517 1.036-.588 2.25-.883 3.644-.883 1.394 0 2.547.29 3.515.87.967.58 1.689 1.349 2.168 2.305.479.959.718 2.008.718 3.15v1.58H63.401c.086 1.37.544 2.46 1.371 3.268.827.807 1.938 1.213 3.332 1.213 1.132 0 2-.232 2.6-.698.6-.466 1.04-1.111 1.319-1.938h2.482zm-11.078-3.82h8.205c0-1.194-.305-2.13-.915-2.807-.61-.676-1.568-1.015-2.873-1.015-1.22 0-2.217.33-2.991.988-.775.659-1.25 1.604-1.424 2.832l-.002.002z"})]}))});function jw(e){"@babel/helpers - typeof";return jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jw(e)}var Vnt=["type"];function vW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function qnt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?vW(Object(n),!0).forEach(function(i){Gnt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gnt(e,r,n){return r=Knt(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Knt(e){var r=Ynt(e,"string");return jw(r)=="symbol"?r:String(r)}function Ynt(e,r){if(jw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(jw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Xnt(e,r){if(e==null)return{};var n=Znt(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Znt(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Jnt=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=Xnt(e,Vnt),s=n==="color"?mle:hP;return c.jsx(ml,qnt({Icon:s,Text:gle,"aria-label":Dv,spaceMultiple:ynt,textMultiple:gnt},i))}),ey=hP;ey.Color=mle;ey.Text=gle;ey.Combine=Jnt;ey.Avatar=Rnt;ey.colorPrimary=ple;ey.title=Dv;var DS="OpenRouter",Qnt=1,eit=.4,fP="#6566F1",tit=fP,rit="#fff",nit=.75;function Nw(e){"@babel/helpers - typeof";return Nw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Nw(e)}var iit=["size","style"];function xW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function RE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?xW(Object(n),!0).forEach(function(i){sit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function sit(e,r,n){return r=oit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oit(e){var r=ait(e,"string");return Nw(r)=="symbol"?r:String(r)}function ait(e,r){if(Nw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Nw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function lit(e,r){if(e==null)return{};var n=cit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function cit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var pP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=lit(e,iit);return c.jsxs("svg",RE(RE({fill:"currentColor",fillRule:"evenodd",height:n,style:RE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:DS}),c.jsx("path",{d:"M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"})]}))});function Tw(e){"@babel/helpers - typeof";return Tw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Tw(e)}function bW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function uit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?bW(Object(n),!0).forEach(function(i){dit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function dit(e,r,n){return r=hit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function hit(e){var r=fit(e,"string");return Tw(r)=="symbol"?r:String(r)}function fit(e,r){if(Tw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Tw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function pit(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var mit=y.memo(function(e){var r=Object.assign({},(pit(e),e));return c.jsx(pl,uit({Icon:pP,"aria-label":DS,background:tit,color:rit,iconMultiple:nit},r))});function Ew(e){"@babel/helpers - typeof";return Ew=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ew(e)}var git=["size","style"];function _W(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ME(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_W(Object(n),!0).forEach(function(i){yit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yit(e,r,n){return r=vit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function vit(e){var r=xit(e,"string");return Ew(r)=="symbol"?r:String(r)}function xit(e,r){if(Ew(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ew(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function bit(e,r){if(e==null)return{};var n=_it(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _it(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var yle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=bit(e,git);return c.jsxs("svg",ME(ME({fill:"currentColor",fillRule:"evenodd",height:n,style:ME({flex:"none",lineHeight:1},i),viewBox:"0 0 143 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:DS}),c.jsx("path",{d:"M9.623 2c1.46 0 2.763.35 3.91 1.05 1.149.699 2.053 1.7 2.714 3.002.66 1.303.991 2.861.991 4.675 0 1.814-.33 3.372-.991 4.675-.66 1.302-1.565 2.303-2.713 3.003-1.148.7-2.452 1.049-3.91 1.049-1.465 0-2.772-.35-3.92-1.05-1.148-.699-2.052-1.701-2.713-3.007-.66-1.305-.991-2.862-.991-4.67 0-1.814.33-3.372.991-4.675.66-1.302 1.565-2.303 2.713-3.003C6.852 2.35 8.16 2 9.624 2zm0 2.34c-.974 0-1.844.244-2.61.734-.765.489-1.37 1.208-1.813 2.156-.443.949-.664 2.114-.664 3.497s.221 2.548.664 3.497c.444.948 1.048 1.667 1.813 2.156.766.49 1.636.735 2.61.735.97 0 1.838-.245 2.606-.735.768-.489 1.374-1.208 1.817-2.156.443-.949.665-2.114.665-3.497s-.222-2.548-.665-3.497c-.443-.948-1.049-1.667-1.817-2.156-.768-.49-1.637-.735-2.606-.735zm16.32 1.974c1.024 0 1.938.26 2.742.78s1.436 1.269 1.896 2.248c.46.979.69 2.156.69 3.534 0 1.377-.23 2.556-.686 3.538-.457.981-1.085 1.736-1.883 2.264-.799.529-1.71.793-2.734.793-.771 0-1.4-.13-1.887-.39-.488-.26-.869-.564-1.144-.913a6.908 6.908 0 01-.636-.929h-.149V24h-2.47V6.48h2.412v2.065h.207c.143-.265.35-.572.62-.92.27-.349.643-.655 1.123-.917.479-.263 1.112-.394 1.9-.394zm-.528 2.107c-.716 0-1.32.185-1.813.556-.493.37-.866.887-1.12 1.55-.253.665-.38 1.439-.38 2.324 0 .896.13 1.68.389 2.356.259.674.633 1.201 1.123 1.58s1.09.568 1.8.568c.738 0 1.355-.198 1.85-.593.496-.395.872-.933 1.128-1.613.256-.68.384-1.447.384-2.298 0-.84-.125-1.596-.376-2.265-.25-.67-.625-1.197-1.123-1.584-.498-.388-1.12-.581-1.862-.581zm13.387-2.107c.716 0 1.41.119 2.082.356a5.037 5.037 0 011.809 1.12c.534.51.955 1.169 1.263 1.979.309.81.463 1.793.463 2.949v.88l-9.016-.001.002.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.26 1.364.539.313 1.17.469 1.89.469.469 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.281-.271.496-.606.644-1.004l2.338.423a4.247 4.247 0 01-1.004 1.813c-.482.517-1.084.918-1.808 1.203-.725.284-1.549.427-2.474.427-1.25 0-2.325-.27-3.225-.809-.9-.54-1.594-1.3-2.082-2.281-.487-.982-.73-2.134-.73-3.455 0-1.306.243-2.456.73-3.451.488-.996 1.17-1.773 2.049-2.331.878-.559 1.906-.838 3.084-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.593c0-.653-.132-1.232-.397-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.034-.44-1.673-.44zm10.29 3.293v7.566H46.64V6.48h2.37v2.074h.158a3.63 3.63 0 011.375-1.626c.625-.41 1.413-.614 2.366-.614.864 0 1.622.18 2.271.543.65.362 1.154.9 1.512 1.614.358.713.537 1.595.537 2.646v8.105h-2.47v-7.806c0-.924-.24-1.647-.718-2.17-.48-.522-1.137-.784-1.974-.784-.573 0-1.081.125-1.524.374a2.65 2.65 0 00-1.05 1.09c-.255.479-.383 1.055-.383 1.73zm17.122-9.424c1.31 0 2.4.227 3.266.68.868.454 1.516 1.08 1.945 1.88.43.799.645 1.72.645 2.766 0 1.04-.216 1.954-.649 2.742-.432.788-1.082 1.4-1.949 1.837a5.1 5.1 0 01-.501.22l3.743 6.865h-2.907l-3.436-6.43h-3.634v6.43h-2.552V2.232h6.029zm-.273 2.199h-3.204v6.155h3.237c.826 0 1.5-.119 2.02-.357s.901-.583 1.144-1.037c.242-.453.363-.998.363-1.634 0-.641-.122-1.197-.367-1.667-.246-.47-.628-.831-1.148-1.083-.52-.252-1.202-.377-2.045-.377zM79.66 6.314c1.19 0 2.227.273 3.114.821.886.548 1.575 1.316 2.065 2.306s.735 2.146.735 3.468c0 1.316-.245 2.466-.735 3.45-.49.985-1.179 1.751-2.065 2.299-.887.547-1.924.82-3.114.82s-2.227-.273-3.113-.82c-.887-.548-1.575-1.314-2.065-2.298-.49-.985-.735-2.135-.735-3.451 0-1.322.245-2.478.735-3.468.49-.99 1.178-1.758 2.065-2.306.886-.548 1.924-.821 3.113-.821zm.008 2.074c-.776 0-1.419.207-1.928.622-.51.415-.887.963-1.132 1.646a6.602 6.602 0 00-.367 2.244c0 .819.122 1.568.367 2.249.245.68.623 1.225 1.132 1.634.51.41 1.152.614 1.928.614.771 0 1.41-.205 1.917-.614.506-.41.882-.954 1.127-1.634.245-.68.367-1.43.367-2.249 0-.813-.122-1.56-.367-2.244-.245-.683-.62-1.231-1.127-1.646-.507-.415-1.146-.622-1.917-.622zm16.164 5.55V6.48h2.477v12.742h-2.428v-2.207h-.132a3.956 3.956 0 01-1.4 1.697c-.641.45-1.438.676-2.391.676-.815 0-1.535-.181-2.16-.544-.625-.362-1.115-.9-1.47-1.613-.355-.714-.533-1.596-.533-2.647V6.48h2.47v7.806c0 .868.24 1.56.718 2.074.48.514 1.102.771 1.867.771.462 0 .924-.116 1.383-.348.46-.232.843-.584 1.148-1.054.306-.47.456-1.067.45-1.792zm8.58-10.511v3.052h2.602v1.992h-2.602v7.01c0 .48.072.841.215 1.082.144.24.33.404.558.49.228.085.478.128.747.128.199 0 .372-.014.52-.041l.348-.067.446 2.05a4.42 4.42 0 01-.612.17c-.264.057-.594.09-.99.095a4.331 4.331 0 01-1.818-.349 3.12 3.12 0 01-1.362-1.128c-.347-.509-.52-1.148-.52-1.916l-.002-7.525h-1.857V6.48h1.857l.001-3.053h2.47zm9.961 2.887c.716 0 1.41.119 2.081.356a5.037 5.037 0 011.81 1.12c.533.51.954 1.169 1.263 1.979.308.81.462 1.793.462 2.949v.88l-9.016-.001.003.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.259 1.364.54.313 1.17.469 1.891.469.468 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.28-.271.495-.606.644-1.004l2.337.423a4.247 4.247 0 01-1.003 1.813c-.482.517-1.085.918-1.809 1.203-.724.284-1.548.427-2.473.427-1.25 0-2.325-.27-3.226-.809-.9-.54-1.594-1.3-2.08-2.281-.488-.982-.732-2.134-.732-3.455 0-1.306.244-2.456.731-3.451.487-.996 1.17-1.773 2.048-2.331.879-.559 1.907-.838 3.085-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.592c0-.653-.132-1.232-.396-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.035-.44-1.673-.44zm7.821 10.859V6.48h2.387v2.024h.132a3.092 3.092 0 011.227-1.622 3.485 3.485 0 011.994-.593l.396.01.153.006c.212.011.379.025.5.042v2.372c-.1-.027-.275-.059-.529-.095a5.4 5.4 0 00-.76-.054c-.583 0-1.102.123-1.556.37a2.799 2.799 0 00-1.078 1.02 2.79 2.79 0 00-.397 1.48v7.782h-2.469z"})]}))});function Aw(e){"@babel/helpers - typeof";return Aw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aw(e)}var wit=["type","iconProps"];function wW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function SW(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?wW(Object(n),!0).forEach(function(i){Sit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Sit(e,r,n){return r=kit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function kit(e){var r=Cit(e,"string");return Aw(r)=="symbol"?r:String(r)}function Cit(e,r){if(Aw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Aw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function jit(e,r){if(e==null)return{};var n=Nit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Nit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Tit=y.memo(function(e){var r=e.type,n=r===void 0?"mono":r,i=e.iconProps,s=jit(e,wit);return c.jsx(ml,SW({Icon:pP,Text:yle,"aria-label":DS,iconProps:SW({color:n==="color"?fP:void 0},i),spaceMultiple:eit,textMultiple:Qnt},s))}),Iv=pP;Iv.Text=yle;Iv.Combine=Tit;Iv.Avatar=mit;Iv.colorPrimary=fP;Iv.title=DS;var IS="Grok",Eit=.75,Ait=.25,vle="#fff",Oit=vle,Rit="#000",Mit=.65;function Ow(e){"@babel/helpers - typeof";return Ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ow(e)}var Pit=["size","style"];function kW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function PE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?kW(Object(n),!0).forEach(function(i){Lit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Lit(e,r,n){return r=$it(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $it(e){var r=Dit(e,"string");return Ow(r)=="symbol"?r:String(r)}function Dit(e,r){if(Ow(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ow(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Iit(e,r){if(e==null)return{};var n=Bit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Bit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var xle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Iit(e,Pit);return c.jsxs("svg",PE(PE({fill:"currentColor",fillRule:"evenodd",height:n,style:PE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:IS}),c.jsx("path",{d:"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"})]}))});function Rw(e){"@babel/helpers - typeof";return Rw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Rw(e)}function CW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function zit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?CW(Object(n),!0).forEach(function(i){Fit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Fit(e,r,n){return r=Hit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Hit(e){var r=Wit(e,"string");return Rw(r)=="symbol"?r:String(r)}function Wit(e,r){if(Rw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Rw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Uit(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var ble=y.memo(function(e){var r=Object.assign({},(Uit(e),e));return c.jsx(pl,zit({Icon:xle,"aria-label":IS,background:Oit,color:Rit,iconMultiple:Mit},r))});function Mw(e){"@babel/helpers - typeof";return Mw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mw(e)}var Vit=["size","style"];function jW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function LE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?jW(Object(n),!0).forEach(function(i){qit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function qit(e,r,n){return r=Git(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Git(e){var r=Kit(e,"string");return Mw(r)=="symbol"?r:String(r)}function Kit(e,r){if(Mw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Mw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Yit(e,r){if(e==null)return{};var n=Xit(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Xit(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var _le=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Yit(e,Vit);return c.jsxs("svg",LE(LE({fill:"currentColor",fillRule:"evenodd",height:n,style:LE({flex:"none",lineHeight:1},i),viewBox:"0 0 41 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:IS}),c.jsx("path",{d:"M36.867 2h2.577v20h-2.577V2zM23.875 2h2.717l7.759 20H31.55l-2.101-5.574h-8.571L18.777 22h-2.69l7.788-20zm4.79 12.185l-3.53-9.272-3.473 9.272h7.003zM7.35 14.381L2.504 7.518h2.857l3.446 5.126 3.585-5.126h2.605l-4.762 6.835L15.501 22h-2.829l-3.977-5.854L4.689 22H2l5.35-7.619z"})]}))});function Pw(e){"@babel/helpers - typeof";return Pw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pw(e)}function NW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Zit(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NW(Object(n),!0).forEach(function(i){Jit(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Jit(e,r,n){return r=Qit(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Qit(e){var r=est(e,"string");return Pw(r)=="symbol"?r:String(r)}function est(e,r){if(Pw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Pw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function tst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var rst=y.memo(function(e){var r=Object.assign({},(tst(e),e));return c.jsx(ml,Zit({Icon:ble,Text:_le,"aria-label":IS,iconProps:{shape:"square"},spaceMultiple:Ait,textMultiple:Eit},r))}),Bv=xle;Bv.Text=_le;Bv.Combine=rst;Bv.Avatar=ble;Bv.colorPrimary=vle;Bv.title=IS;var BS="MoonshotAI",nst=.75,ist=.4,wle="#16191E",sst=wle,ost="#fff",ast=.75;function Lw(e){"@babel/helpers - typeof";return Lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Lw(e)}var lst=["size","style"];function TW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function $E(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?TW(Object(n),!0).forEach(function(i){cst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function cst(e,r,n){return r=ust(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ust(e){var r=dst(e,"string");return Lw(r)=="symbol"?r:String(r)}function dst(e,r){if(Lw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Lw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hst(e,r){if(e==null)return{};var n=fst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function fst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var mP=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=hst(e,lst);return c.jsxs("svg",$E($E({fill:"currentColor",fillRule:"evenodd",height:n,style:$E({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:BS}),c.jsx("path",{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"})]}))});function $w(e){"@babel/helpers - typeof";return $w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$w(e)}function EW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function pst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?EW(Object(n),!0).forEach(function(i){mst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function mst(e,r,n){return r=gst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function gst(e){var r=yst(e,"string");return $w(r)=="symbol"?r:String(r)}function yst(e,r){if($w(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if($w(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function vst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var xst=y.memo(function(e){var r=Object.assign({},(vst(e),e));return c.jsx(pl,pst({Icon:mP,"aria-label":BS,background:sst,color:ost,iconMultiple:ast},r))});function Dw(e){"@babel/helpers - typeof";return Dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Dw(e)}var bst=["size","style"];function AW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function DE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AW(Object(n),!0).forEach(function(i){_st(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _st(e,r,n){return r=wst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function wst(e){var r=Sst(e,"string");return Dw(r)=="symbol"?r:String(r)}function Sst(e,r){if(Dw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Dw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function kst(e,r){if(e==null)return{};var n=Cst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Cst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Sle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=kst(e,bst);return c.jsxs("svg",DE(DE({fill:"currentColor",fillRule:"evenodd",height:n,style:DE({flex:"none",lineHeight:1},i),viewBox:"0 0 171 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:BS}),c.jsx("path",{d:"M165.484 2H169v19.507h-3.516V2zm-35.707 0v5.26h3.186v3.507h-3.186v10.74h-3.516v-10.74h-2.966V7.26h2.966V2h3.516zm-24.598 11.023v8.498h-3.345v-8.804c.008-2.1-2.109-2.895-3.109-2.895l-.064.001c-1.073.026-3.521.694-3.54 3.863v7.835h-3.468V2.014L95.14 2v6.918c1.228-1.986 3.93-2.243 4.755-2.243.926 0 1.768.155 2.525.465.757.31 1.378.783 1.864 1.42.413.54.665 1.096.757 1.667.092.571.138 1.503.138 2.796zM89.29 9.507l-2.362 2.41c-2.911-2.41-6.647-2.136-7.196-.93-.55 1.205 2.444 1.484 4.734 1.98l.634.146c1.731.408 4.603 1.274 4.52 4.12-.11 3.78-4.23 4.767-6.867 4.767-2.637 0-5.933-1.808-7.636-3.342l2.527-2.63c2.582 2.63 7.142 2.958 7.856 1.534.714-1.425-1.263-1.48-4.834-1.973-3.175-.438-4.837-2.85-4.813-4.13.034-1.843 1.543-4.85 6.31-4.886 3.227-.025 5.425.961 7.127 2.934zm-22.617.386l-.033.001c-1.905.083-3.443 1.453-3.458 3.746v7.867h-3.83V7.185h3.702v2.061l.088-.12c.591-.8 2.07-2.555 4.796-2.523 2.675.032 5.696 1.95 5.696 5.17v9.734H69.69v-8.813c-.01-2.197-2.102-2.824-3.016-2.8zm-33.14-3.29c4.247 0 7.69 3.434 7.69 7.671s-3.443 7.671-7.69 7.671c-4.248 0-7.692-3.434-7.692-7.671s3.444-7.671 7.691-7.671zm0 3.726a3.95 3.95 0 00-3.956 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.956-3.945 3.95 3.95 0 00-3.956-3.945zm16.7-3.726c4.247 0 7.69 3.434 7.69 7.671s-3.443 7.671-7.69 7.671c-4.248 0-7.692-3.434-7.692-7.671s3.444-7.671 7.691-7.671zm0 3.726a3.95 3.95 0 00-3.956 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.956-3.945 3.95 3.95 0 00-3.956-3.945zm64.382-3.726c4.248 0 7.69 3.434 7.69 7.671s-3.442 7.671-7.69 7.671c-4.247 0-7.69-3.434-7.69-7.671s3.443-7.671 7.69-7.671zm0 3.726a3.95 3.95 0 00-3.955 3.945 3.95 3.95 0 003.955 3.945 3.95 3.95 0 003.955-3.945 3.95 3.95 0 00-3.955-3.945zM2 21.616V2l10.987 7.89L23.919 2v19.616h-3.79V9.452l-7.17 5.26-7.169-5.26v12.164H2zM153.344 2l10.492 19.507h-4.138l-1.833-3.288h-5.235l-1.789-3.46-3.632 6.748h-4.358L153.344 2zm0 8.11l-2.478 4.602h5.044l-2.566-4.602z"})]}))});function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Iw(e)}function OW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function jst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OW(Object(n),!0).forEach(function(i){Nst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Nst(e,r,n){return r=Tst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tst(e){var r=Est(e,"string");return Iw(r)=="symbol"?r:String(r)}function Est(e,r){if(Iw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Iw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ast(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Ost=y.memo(function(e){var r=Object.assign({},(Ast(e),e));return c.jsx(ml,jst({Icon:mP,Text:Sle,"aria-label":BS,spaceMultiple:ist,textMultiple:nst},r))}),zv=mP;zv.Text=Sle;zv.Combine=Ost;zv.Avatar=xst;zv.colorPrimary=wle;zv.title=BS;var Fv="Kimi",Rst=.7,Mst=.25,kle="#000",Pst=kle,Lst="#fff",$st=.6;function Bw(e){"@babel/helpers - typeof";return Bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bw(e)}var Dst=["size","style"];function RW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function IE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?RW(Object(n),!0).forEach(function(i){Ist(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ist(e,r,n){return r=Bst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Bst(e){var r=zst(e,"string");return Bw(r)=="symbol"?r:String(r)}function zst(e,r){if(Bw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Bw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Fst(e,r){if(e==null)return{};var n=Hst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Hst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Cle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Fst(e,Dst);return c.jsxs("svg",IE(IE({height:n,style:IE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z",fill:"#1783FF"}),c.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z",fill:"#fff"})]}))});function zw(e){"@babel/helpers - typeof";return zw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},zw(e)}function MW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Wst(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?MW(Object(n),!0).forEach(function(i){Ust(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ust(e,r,n){return r=Vst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vst(e){var r=qst(e,"string");return zw(r)=="symbol"?r:String(r)}function qst(e,r){if(zw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(zw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Gst(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var jle=y.memo(function(e){var r=Object.assign({},(Gst(e),e));return c.jsx(pl,Wst({Icon:Cle,"aria-label":Fv,background:Pst,color:Lst,iconMultiple:$st},r))});function Fw(e){"@babel/helpers - typeof";return Fw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fw(e)}var Kst=["size","style"];function PW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function BE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PW(Object(n),!0).forEach(function(i){Yst(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Yst(e,r,n){return r=Xst(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xst(e){var r=Zst(e,"string");return Fw(r)=="symbol"?r:String(r)}function Zst(e,r){if(Fw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Fw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jst(e,r){if(e==null)return{};var n=Qst(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Qst(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Nle=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=Jst(e,Kst);return c.jsxs("svg",BE(BE({fill:"currentColor",fillRule:"evenodd",height:n,style:BE({flex:"none",lineHeight:1},i),viewBox:"0 0 64 24",xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M24.353 21.58c0 .232.188.42.42.42h2.69a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-2.69a.42.42 0 00-.42.42v19.16zM58.47 21.58c0 .232.188.42.42.42h2.691a.42.42 0 00.419-.42V2.42a.42.42 0 00-.419-.42H58.89a.42.42 0 00-.42.42v19.16zM47.786 2a.42.42 0 00-.408.32L43.4 18.633c-.066.267-.38.267-.444 0L38.976 2.32A.417.417 0 0038.57 2H31.83a.418.418 0 00-.418.42v19.16c0 .232.188.42.42.42h2.988c.231 0 .419-.182.419-.414V5.471c0-.322.378-.389.454-.079l3.974 16.288a.42.42 0 00.407.32h6.208a.42.42 0 00.407-.32L50.66 5.394c.076-.31.455-.243.455.079V21.58c0 .231.187.419.419.419h2.987a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-6.735zM11.55 11.273l8.115-8.565A.42.42 0 0019.36 2h-3.776a.42.42 0 00-.298.124l-9.303 9.39c-.144.146-.357.016-.357-.218V2.42a.42.42 0 00-.42-.42H2.42a.42.42 0 00-.42.42v19.16c0 .232.188.42.42.42h2.786a.42.42 0 00.42-.42v-3.82c0-.085.03-.166.081-.219l2.87-2.931c.07-.07.166-.081.243-.029l7.678 5.816c1.123.778 2.552 1.288 3.861 1.5a.403.403 0 00.464-.404v-3.461c0-.206-.15-.38-.35-.423-.76-.164-1.604-.474-2.244-.918l-6.647-4.953c-.138-.095-.155-.34-.033-.465z"})]}))});function Hw(e){"@babel/helpers - typeof";return Hw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hw(e)}var eot=["iconProps"];function LW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function $W(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LW(Object(n),!0).forEach(function(i){tot(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function tot(e,r,n){return r=rot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function rot(e){var r=not(e,"string");return Hw(r)=="symbol"?r:String(r)}function not(e,r){if(Hw(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Hw(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function iot(e,r){if(e==null)return{};var n=sot(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function sot(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var oot=y.memo(function(e){var r=e.iconProps,n=iot(e,eot);return c.jsx(ml,$W({Icon:jle,Text:Nle,"aria-label":Fv,iconProps:$W({shape:"square"},r),spaceMultiple:Mst,textMultiple:Rst},n))});function Ww(e){"@babel/helpers - typeof";return Ww=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ww(e)}var aot=["size","style"];function DW(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function zE(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?DW(Object(n),!0).forEach(function(i){lot(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function lot(e,r,n){return r=cot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cot(e){var r=uot(e,"string");return Ww(r)=="symbol"?r:String(r)}function uot(e,r){if(Ww(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(Ww(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dot(e,r){if(e==null)return{};var n=hot(e,r),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function hot(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}var fot=y.memo(function(e){var r=e.size,n=r===void 0?"1em":r,i=e.style,s=dot(e,aot);return c.jsxs("svg",zE(zE({fill:"currentColor",fillRule:"evenodd",height:n,style:zE({flex:"none",lineHeight:1},i),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},s),{},{children:[c.jsx("title",{children:Fv}),c.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),c.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]}))}),ty=fot;ty.Color=Cle;ty.Text=Nle;ty.Combine=oot;ty.Avatar=jle;ty.colorPrimary=kle;ty.title=Fv;const Tle=[{label:"OpenAI / Jait",fields:["OPENAI_API_KEY","OPENAI_BASE_URL","OPENAI_MODEL","OPENAI_TRANSCRIBE_MODEL","OPENAI_WEB_SEARCH_MODEL"]},{label:"Ollama",fields:["OLLAMA_URL","OLLAMA_MODEL"]},{label:"Perplexity",fields:["PERPLEXITY_API_KEY","PERPLEXITY_MODEL","PERPLEXITY_OPENROUTER_MODEL"]},{label:"OpenRouter",fields:["OPENROUTER_API_KEY"]},{label:"xAI / Grok",fields:["XAI_API_KEY","GROK_MODEL"]},{label:"Google Gemini",fields:["GEMINI_API_KEY","GEMINI_MODEL"]},{label:"Moonshot / Kimi",fields:["MOONSHOT_API_KEY","KIMI_BASE_URL","KIMI_MODEL"]},{label:"Brave Search",fields:["BRAVE_API_KEY"]},{label:"Speech / Home Assistant",fields:["WHISPER_URL","HA_URL","HA_TOKEN","HA_STT_ENTITY","ELEVENLABS_API_KEY","ELEVENLABS_STT_MODEL","ELEVENLABS_STT_URL","ELEVENLABS_LANGUAGE_CODE"]}],IW=Tle.flatMap(e=>e.fields),pot={OPENAI:es,PERPLEXITY:ey,OPENROUTER:Iv,XAI:Bv,GEMINI:Ah,ELEVENLABS:cK,MOONSHOT:zv,KIMI:ty,GROK:Q0,OLLAMA:J0,HA:oK};function mot(e){const r=e.split("_")[0];return pot[r]??null}function got(e){return e.endsWith("_KEY")||e.endsWith("_URL")}const yot=Ln();function vot({username:e,token:r,apiKeys:n,onSaveApiKeys:i,sttProvider:s,onSttProviderChange:o,jaitBackend:a,onJaitBackendChange:l,onClearArchive:d,onClearArchivedWorkspaces:u,onFetchArchivedWorkspaces:f,onRestoreWorkspace:p,activityEvents:g,updateInfo:v,updateChecking:b,onCheckUpdate:_,onApplyUpdate:S,updateApplying:w,platform:C}){const[j,N]=y.useState(n),[A,E]=y.useState(!1),[R,P]=y.useState(!1),[B,$]=y.useState(!1),[W,I]=y.useState([]),[K,M]=y.useState(!1),[z,L]=y.useState(null),[F,V]=y.useState(null),[Y,H]=y.useState(null),[U,J]=y.useState({}),[q,ee]=y.useState({}),[re,de]=y.useState("general"),[fe,te]=y.useState(""),ie=y.useRef(null),{importedThemes:ge,activeTheme:le}=zQ(),[Qe,Ze]=y.useState(!1),[Ie,ne]=y.useState(null);y.useEffect(()=>{var Oe;C!=="electron"||!((Oe=window.jaitDesktop)!=null&&Oe.getInfo)||window.jaitDesktop.getInfo().then(ye=>{ye.appVersion&&ne(ye.appVersion)})},[C]),y.useEffect(()=>{var Oe;C!=="electron"||!((Oe=window.jaitDesktop)!=null&&Oe.getSetting)||window.jaitDesktop.getSetting("closeOnWindowClose",!1).then(ye=>{Ze(ye===!0)})},[C]),y.useEffect(()=>{N(n)},[n]);const Ne=IW.some(Oe=>(j[Oe]??"")!==(n[Oe]??"")),Ce=y.useCallback(()=>{N(n),V(null),H(null)},[n]);y.useEffect(()=>{if(!r)return;let Oe=!1;return(async()=>{try{const ye=await fetch(`${yot}/auth/settings/env-status`,{headers:{Authorization:`Bearer ${r}`}});if(ye.ok&&!Oe){const St=await ye.json();J(St.env_set)}}catch{}})(),()=>{Oe=!0}},[r]);const we=y.useCallback(Oe=>{ee(ye=>({...ye,[Oe]:!ye[Oe]}))},[]),Be=async()=>{E(!0),H(null),V(null);try{await i(j),V("API keys saved.")}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to save API keys")}finally{E(!1)}},_t=async()=>{P(!0),H(null),V(null);try{const Oe=await d();V(`Cleared ${Oe} archived session(s).`)}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to clear archive")}finally{P(!1)}},mt=async()=>{$(!0),H(null),V(null);try{const Oe=await u();I([]),V(`Cleared ${Oe} archived workspace(s).`)}catch(Oe){H(Oe instanceof Error?Oe.message:"Failed to clear archived workspaces")}finally{$(!1)}},Rt=y.useCallback(async()=>{M(!0);try{const Oe=await f();I(Oe)}finally{M(!1)}},[f]),Jt=async Oe=>{L(Oe);try{await p(Oe)?(I(St=>St.filter(lt=>lt.id!==Oe)),V("Workspace restored.")):H("Failed to restore workspace.")}catch{H("Failed to restore workspace.")}finally{L(null)}},Ot=y.useCallback(async Oe=>{var St;const ye=(St=Oe.target.files)==null?void 0:St[0];if(Oe.target.value="",!!ye){H(null),V(null);try{const lt=FRe(ye.name,await ye.text());V(lt.hasInclude?`Imported theme "${lt.name}". Relative "include" files are not resolved yet.`:`Imported theme "${lt.name}".`)}catch(lt){H(lt instanceof Error?lt.message:"Failed to import theme")}}},[]);function or(Oe){var lt;const ye=!!((lt=j[Oe])!=null&&lt.trim()),St=!!U[Oe];return ye?c.jsx(nn,{variant:"default",className:"text-2xs px-1.5 py-0",children:"user"}):St?c.jsx(nn,{variant:"success",className:"text-2xs px-1.5 py-0",children:".env"}):c.jsx(nn,{variant:"outline",className:"text-2xs px-1.5 py-0 text-muted-foreground",children:"empty"})}const Te=fe.trim().toLowerCase(),Le=(...Oe)=>!Te||Oe.some(ye=>ye==null?void 0:ye.toLowerCase().includes(Te)),Se=Oe=>c.jsx("span",{dangerouslySetInnerHTML:{__html:mnt(Oe,fe)}}),ze=Le("software update version gateway desktop release download install",v==null?void 0:v.currentVersion,v==null?void 0:v.latestVersion,Ie),it=C==="electron"&&Le("desktop tray close window quit minimize app",Ie),ft=C!=="web"&&Le("gateway connection url domain ip server host network",Ln()),st=Le("session archive archived clear delete messages history"),ot=Le("workspace archive archived clear delete workspaces remove"),Dt=Le("jait backend provider openai openrouter model api llm",a),Xe=Le("speech stt input microphone whisper wyoming home assistant transcription gpt openai elevenlabs scribe",s,j.WHISPER_URL,j.HA_URL,j.HA_TOKEN,j.HA_STT_ENTITY,j.OPENAI_TRANSCRIBE_MODEL,j.ELEVENLABS_API_KEY,j.ELEVENLABS_STT_MODEL,j.ELEVENLABS_STT_URL,j.ELEVENLABS_LANGUAGE_CODE),tt=IW.filter(Oe=>Le(Oe,Oe.replaceAll("_"," "),j[Oe])),Et=Le("tools permissions mcp core standard external toggle meta terminal filesystem os agent browser web surfaces scheduler memory voice screen gateway"),nt=Le("activity recent messages terminal sessions feed history"),Zt=Le("extensions plugins store install uninstall enable disable"),Je=Le("skills instructions prompts specialized workflows SKILL.md"),Ge=Le(...kRe(),"import json token colors workbench sidebar tabs"),Tt=c.jsx(Rn,{className:"p-5",children:c.jsxs("p",{className:"text-sm text-muted-foreground",children:["No settings match ",c.jsx("span",{className:"font-medium text-foreground",children:fe}),"."]})});return c.jsxs("div",{className:"mx-auto w-full max-w-5xl space-y-6 p-4 sm:p-6",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Settings"}),c.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Signed in as ",c.jsx("span",{className:"font-medium text-foreground",children:e})]})]}),c.jsxs("div",{className:"relative w-full md:max-w-sm",children:[c.jsx(Vl,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Hn,{value:fe,onChange:Oe=>te(Oe.target.value),placeholder:"Search settings...",className:"pl-9"})]})]}),c.jsxs(V1,{value:re,onValueChange:Oe=>de(Oe),className:"space-y-4",children:[c.jsxs(b0,{className:"flex h-auto w-full flex-wrap justify-start gap-1 rounded-xl bg-muted/70 p-1",children:[c.jsx(Zo,{value:"general",className:"flex-1 sm:flex-none",children:"General"}),c.jsx(Zo,{value:"api",className:"flex-1 sm:flex-none",children:"API"}),c.jsx(Zo,{value:"tools",className:"flex-1 sm:flex-none",children:"Tools"}),c.jsx(Zo,{value:"extensions",className:"flex-1 sm:flex-none",children:"Extensions"}),c.jsx(Zo,{value:"skills",className:"flex-1 sm:flex-none",children:"Skills"}),c.jsx(Zo,{value:"activity",className:"flex-1 sm:flex-none",children:"Activity"})]}),c.jsxs(Jo,{value:"general",className:"space-y-6",children:[ze&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsxs("h2",{className:"flex items-center gap-2 text-base font-medium",children:[c.jsx(rK,{className:"h-4 w-4"}),Se("Software Update")]}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[v?c.jsxs(c.Fragment,{children:["Gateway ",c.jsxs("span",{className:"font-mono font-medium text-foreground",children:["v",v.currentVersion]})]}):"Check for the latest Jait version.",Ie&&c.jsxs(c.Fragment,{children:[" · Desktop app ",c.jsxs("span",{className:"font-mono font-medium text-foreground",children:["v",Ie]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs(_e,{variant:"outline",size:"sm",onClick:_,disabled:b||w,children:[b?c.jsx(sr,{className:"mr-1.5 h-4 w-4 animate-spin"}):null,b?"Checking...":"Check for updates"]}),(v==null?void 0:v.hasUpdate)&&c.jsxs(c.Fragment,{children:[c.jsxs(_e,{size:"sm",onClick:S,disabled:w,children:[w?c.jsx(sr,{className:"mr-1.5 h-4 w-4 animate-spin"}):c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),w?"Updating...":`Update gateway to v${v.latestVersion}`]}),C==="electron"?c.jsxs(_e,{size:"sm",variant:"outline",onClick:async()=>{const Oe=window.jaitDesktop;(await Oe.checkForUpdate()).updateAvailable&&(await Oe.downloadUpdate(),await Oe.installUpdate())},children:[c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),"Update desktop app"]}):C!=="web"&&c.jsx(_e,{size:"sm",variant:"outline",asChild:!0,children:c.jsxs("a",{href:"https://github.com/Widev-e-U/Jait/releases/latest",target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Tm,{className:"mr-1.5 h-4 w-4"}),"Download latest APK"]})})]})]}),v&&!v.hasUpdate&&c.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400",children:[c.jsx(ql,{className:"h-3.5 w-3.5"}),"You're on the latest version."]}),(v==null?void 0:v.hasUpdate)&&c.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-amber-600 dark:text-amber-400",children:[c.jsx(Oa,{className:"h-3.5 w-3.5"}),"Version ",v.latestVersion," is available",C!=="web"?" — download from jait.dev":"","."]})]}),Ge&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Editor theme")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Import a VS Code theme JSON file and apply its Monaco token colors plus a mapped shell palette."})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("input",{ref:ie,type:"file",accept:".json,application/json",className:"hidden",onChange:Oe=>{Ot(Oe)}}),c.jsx(_e,{variant:"outline",size:"sm",onClick:()=>{var Oe;return(Oe=ie.current)==null?void 0:Oe.click()},children:"Import theme JSON"}),c.jsx(_e,{variant:"ghost",size:"sm",disabled:!le,onClick:()=>v5(null),children:"Use built-in theme"})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Imported themes stay local to this device. The quick light/system/dark toggle falls back to the built-in theme set."}),ge.length>0?c.jsx("div",{className:"space-y-2",children:ge.map(Oe=>{const ye=(le==null?void 0:le.id)===Oe.id;return c.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg border px-3 py-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("p",{className:"truncate text-sm font-medium",children:Oe.name}),c.jsx(nn,{variant:ye?"default":"outline",className:"h-5 px-1.5 text-2xs",children:ye?"active":Oe.colorMode})]}),c.jsx("p",{className:"truncate text-xs text-muted-foreground",children:Oe.sourceLabel})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!ye&&c.jsx(_e,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>v5(Oe.id),children:"Apply"}),c.jsx(_e,{variant:"ghost",size:"sm",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:()=>HRe(Oe.id),children:"Remove"})]})]},Oe.id)})}):c.jsx("p",{className:"text-sm text-muted-foreground",children:"No imported themes yet."})]}),it&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Desktop")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Settings specific to the desktop application."})]}),c.jsxs("div",{className:"flex max-w-md items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx(wi,{htmlFor:"close-on-window-close",children:"Quit on window close"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"When off, closing the window minimizes Jait to the system tray."})]}),c.jsx(Kf,{id:"close-on-window-close",checked:Qe,onCheckedChange:Oe=>{var ye;Ze(Oe),(ye=window.jaitDesktop)==null||ye.setSetting("closeOnWindowClose",Oe)}})]})]}),ft&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Gateway connection")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Desktop and mobile clients can connect to a different Jait gateway."})]}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Current gateway: ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:Ln()})]})]}),st&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Session archive")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Permanently remove archived sessions and their messages from your account."})]}),c.jsx("div",{children:c.jsx(_e,{variant:"destructive",onClick:()=>{_t()},disabled:R,children:R?"Clearing...":"Clear archived sessions"})})]}),ot&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Workspace archive")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Restore or permanently remove archived workspaces and their sessions."})]}),c.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[c.jsx(_e,{className:"w-full sm:w-auto",variant:"outline",onClick:()=>{Rt()},disabled:K,children:K?c.jsxs(c.Fragment,{children:[c.jsx(sr,{className:"mr-2 h-3.5 w-3.5 animate-spin"})," Loading..."]}):"Show archived workspaces"}),c.jsx(_e,{className:"w-full sm:w-auto",variant:"destructive",onClick:()=>{mt()},disabled:B,children:B?"Clearing...":"Clear all archived"})]}),W.length>0&&c.jsx("div",{className:"space-y-2",children:W.map(Oe=>c.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-lg border px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(w9,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-medium truncate",children:Oe.title||Oe.rootPath||Oe.id}),Oe.rootPath&&Oe.title&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:Oe.rootPath})]})]}),c.jsxs(_e,{variant:"outline",size:"sm",className:"shrink-0 h-7 text-xs",onClick:()=>{Jt(Oe.id)},disabled:z===Oe.id,children:[z===Oe.id?c.jsx(sr,{className:"mr-1.5 h-3 w-3 animate-spin"}):c.jsx(dge,{className:"mr-1.5 h-3 w-3"}),"Restore"]})]},Oe.id))})]}),Dt&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Jait LLM Backend")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose which API backend the Jait provider uses for model inference."})]}),c.jsxs("div",{className:"max-w-sm",children:[c.jsx(wi,{htmlFor:"jait-backend",className:"mb-1.5 block",children:"Backend provider"}),c.jsxs(D_,{value:a,onValueChange:Oe=>{l(Oe)},children:[c.jsx(O1,{id:"jait-backend",children:c.jsx(I_,{placeholder:"Select backend"})}),c.jsxs(R1,{children:[c.jsx(td,{value:"openai",children:"OpenAI (direct)"}),c.jsx(td,{value:"openrouter",children:"OpenRouter"}),c.jsx(td,{value:"ollama",children:"Ollama (local)"})]})]}),c.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:a==="openrouter"?"Models will be fetched from OpenRouter. Set your OPENROUTER_API_KEY in the API tab.":a==="ollama"?"Models will be fetched from your local Ollama instance. Set OLLAMA_URL in the API tab if not running on localhost:11434.":"Uses your OPENAI_API_KEY and OPENAI_BASE_URL."})]})]}),Xe&&c.jsxs(Rn,{className:"space-y-4 p-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Spracheingabe (Speech-to-Text)")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Wähle aus, wie gesprochene Sprache in Text umgewandelt wird, bevor sie als Nachricht gesendet wird."})]}),c.jsxs("div",{className:"max-w-sm",children:[c.jsx(wi,{htmlFor:"stt-provider",className:"mb-1.5 block",children:"STT-Anbieter"}),c.jsxs(D_,{value:s,onValueChange:Oe=>{o(Oe)},children:[c.jsx(O1,{id:"stt-provider",children:c.jsx(I_,{placeholder:"STT-Anbieter wählen"})}),c.jsxs(R1,{children:[c.jsx(td,{value:"whisper",children:"Faster Whisper (lokal)"}),c.jsx(td,{value:"gpt",children:"GPT (OpenAI)"}),c.jsx(td,{value:"elevenlabs",children:"ElevenLabs Scribe"}),c.jsx(td,{value:"wyoming",children:"Wyoming / Whisper (Home Assistant)"})]})]})]}),s==="whisper"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses a local Faster Whisper server for free, offline transcription. Start the server with ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"python whisper-server/server.py"})," from the gateway package. Optionally set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"WHISPER_URL"})," in API keys below (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"http://localhost:8178"}),")."]})}),s==="wyoming"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Configure your Home Assistant Wyoming/Whisper STT integration. Set these values in the API keys section below: ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_URL"}),", ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_TOKEN"}),", and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"HA_STT_ENTITY"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"stt.faster_whisper"}),")."]})}),s==="gpt"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses OpenAI audio transcription. Set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"OPENAI_API_KEY"})," and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"OPENAI_TRANSCRIBE_MODEL"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"gpt-4o-mini-transcribe"}),")."]})}),s==="elevenlabs"&&c.jsx("div",{className:"max-w-sm space-y-3 border-l-2 border-primary/20 pl-4",children:c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Uses ElevenLabs Speech to Text. Set ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_API_KEY"})," and optionally ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_STT_MODEL"})," (defaults to ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"scribe_v2"}),") and ",c.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-2xs",children:"ELEVENLABS_LANGUAGE_CODE"}),"."]})})]}),!Ge&&!ze&&!it&&!ft&&!st&&!ot&&!Dt&&!Xe&&Tt]}),c.jsx(Jo,{value:"api",className:"space-y-6 pb-20",children:tt.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Values stored here are user-specific and override environment defaults for your account."}),Tle.map(Oe=>{const ye=Oe.fields.filter(lt=>tt.includes(lt));if(ye.length===0)return null;const St=mot(ye[0]);return c.jsx(yS,{defaultOpen:!1,children:c.jsxs(Rn,{className:"p-0 overflow-hidden",children:[c.jsxs(vS,{className:"flex w-full items-center gap-2 px-5 py-3.5 text-left hover:bg-muted/50 transition-colors group",children:[c.jsx(ao,{className:"h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-90"}),St?c.jsx(St,{size:16,className:"text-muted-foreground"}):c.jsx(cK,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-semibold",children:Se(Oe.label)})]}),c.jsx(xS,{children:c.jsx("div",{className:"grid gap-4 px-5 pb-5 md:grid-cols-2",children:ye.map(lt=>{const pt=got(lt),dr=!!q[lt];return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(wi,{htmlFor:`api-${lt}`,className:"font-mono text-xs",children:Se(lt)}),or(lt)]}),c.jsxs("div",{className:"relative",children:[c.jsx(Hn,{id:`api-${lt}`,type:pt&&!dr?"password":"text",value:j[lt]??"",onChange:Nr=>{N(mn=>({...mn,[lt]:Nr.target.value}))},placeholder:U[lt]?"(set via .env)":"(empty)",className:pt?"pr-9":""}),pt&&c.jsx("button",{type:"button",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:()=>we(lt),tabIndex:-1,"aria-label":dr?"Hide value":"Show value",children:dr?c.jsx(fh,{className:"h-4 w-4"}):c.jsx(Ef,{className:"h-4 w-4"})})]})]},lt)})})})]})},Oe.label)}),c.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-30 border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:c.jsxs("div",{className:"mx-auto flex max-w-5xl items-center gap-3 px-4 py-3 sm:px-6",children:[c.jsx(_e,{onClick:()=>{Be()},disabled:A||!Ne,children:A?"Saving...":"Save API settings"}),c.jsx(_e,{variant:"ghost",onClick:Ce,disabled:!Ne,children:"Discard"}),F&&c.jsx("span",{className:"text-sm text-muted-foreground",children:F}),Y&&c.jsx("span",{className:"text-sm text-destructive",children:Y})]})})]}):Tt}),c.jsx(Jo,{value:"tools",className:"space-y-6",children:Et?c.jsx(ont,{token:r}):Tt}),c.jsx(Jo,{value:"extensions",className:"space-y-6",children:Zt?c.jsx(unt,{token:r}):Tt}),c.jsx(Jo,{value:"skills",className:"space-y-6",children:Je?c.jsx(fnt,{token:r}):Tt}),c.jsxs(Jo,{value:"activity",className:"space-y-6",children:[nt&&g&&g.length>0&&c.jsxs(Rn,{className:"p-5 space-y-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-base font-medium",children:Se("Recent activity")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent chat messages and terminal sessions."})]}),c.jsx(pnt,{events:g})]}),nt&&(!g||g.length===0)&&c.jsx(Rn,{className:"p-5",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"No recent activity yet."})}),!nt&&Tt]})]})]})}function xot(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,s,o,a,l=[],d=!0,u=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(i=o.call(n)).done)&&(l.push(i.value),l.length!==r);d=!0);}catch(f){u=!0,s=f}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return l}}function bot(e,r,n){return r=Tot(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function BW(e,r){return Sot(e)||xot(e,r)||Ele(e,r)||jot()}function _ot(e){return wot(e)||kot(e)||Ele(e)||Cot()}function wot(e){if(Array.isArray(e))return zO(e)}function Sot(e){if(Array.isArray(e))return e}function kot(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ele(e,r){if(e){if(typeof e=="string")return zO(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zO(e,r)}}function zO(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Cot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1164
1164
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1165
1165
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Not(e,r){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Tot(e){var r=Not(e,"string");return typeof r=="symbol"?r:String(r)}var Eot=function(r,n){var i=new Set(n);return Object.assign.apply(Object,[{}].concat(_ot(Object.entries(r).filter(function(s){var o=BW(s,1),a=o[0];return!i.has(a)}).map(function(s){var o=BW(s,2),a=o[0],l=o[1];return bot({},a,l)}))))};function FO(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function Aot(e){if(Array.isArray(e))return e}function Oot(e){if(Array.isArray(e))return FO(e)}function Rot(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mot(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,s,o,a,l=[],d=!0,u=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(d=(i=o.call(n)).done)&&(l.push(i.value),l.length!==r);d=!0);}catch(f){u=!0,s=f}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return l}}function Pot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1166
1166
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.