claudekit-cli 3.38.0-dev.5 → 3.38.0-dev.6
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.
|
@@ -18,7 +18,7 @@ var Bx=Object.defineProperty;var Fx=(t,e,n)=>e in t?Bx(t,e,{enumerable:!0,config
|
|
|
18
18
|
*/var um=t=>{throw TypeError(t)},qx=(t,e,n)=>e.has(t)||um("Cannot "+n),tl=(t,e,n)=>(qx(t,e,"read from private field"),n?n.call(t):e.get(t)),Jx=(t,e,n)=>e.has(t)?um("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Md="popstate";function Yx(t={}){function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return Ei("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:on(i)}return Xx(e,n,null,t)}function de(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ee(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Qx(){return Math.random().toString(36).substring(2,10)}function Dd(t,e){return{usr:t.state,key:t.key,idx:e}}function Ei(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Vn(e):e,state:n,key:e&&e.key||r||Qx()}}function on({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Vn(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Xx(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=d();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function d(){return(o.state||{idx:null}).idx}function u(){a="POP";let x=d(),w=x==null?null:x-c;c=x,l&&l({action:a,location:b.location,delta:w})}function f(x,w){a="PUSH";let v=Ei(b.location,x,w);c=d()+1;let S=Dd(v,c),C=b.createHref(v);try{o.pushState(S,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(C)}s&&l&&l({action:a,location:b.location,delta:1})}function p(x,w){a="REPLACE";let v=Ei(b.location,x,w);c=d();let S=Dd(v,c),C=b.createHref(v);o.replaceState(S,"",C),s&&l&&l({action:a,location:b.location,delta:0})}function m(x){return fm(x)}let b={get action(){return a},get location(){return t(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Md,u),l=x,()=>{i.removeEventListener(Md,u),l=null}},createHref(x){return e(i,x)},createURL:m,encodeLocation(x){let w=m(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(x){return o.go(x)}};return b}function fm(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),de(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:on(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var xi,Td=class{constructor(t){if(Jx(this,xi,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(tl(this,xi).has(t))return tl(this,xi).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){tl(this,xi).set(t,e)}};xi=new WeakMap;var Zx=new Set(["lazy","caseSensitive","path","id","index","children"]);function ey(t){return Zx.has(t)}var ty=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function ny(t){return ty.has(t)}function ry(t){return t.index===!0}function Ri(t,e,n=[],r={},i=!1){return t.map((s,o)=>{let a=[...n,String(o)],l=typeof s.id=="string"?s.id:a.join("-");if(de(s.index!==!0||!s.children,"Cannot specify children on an index route"),de(i||!r[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),ry(s)){let c={...s,id:l};return r[l]=Ed(c,e(c)),c}else{let c={...s,id:l,children:void 0};return r[l]=Ed(c,e(c)),s.children&&(c.children=Ri(s.children,e,a,r,i)),c}})}function Ed(t,e){return Object.assign(t,{...e,...typeof e.lazy=="object"&&e.lazy!=null?{lazy:{...t.lazy,...e.lazy}}:{}})}function jn(t,e,n="/"){return yi(t,e,n,!1)}function yi(t,e,n,r){let i=typeof e=="string"?Vn(e):e,s=Rt(i.pathname||"/",n);if(s==null)return null;let o=pm(t);sy(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=gy(s);a=py(o[l],c,r)}return a}function iy(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],loaderData:e[n.id],handle:n.handle}}function pm(t,e=[],n=[],r="",i=!1){let s=(o,a,l=i,c)=>{let d={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&l)return;de(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let u=rn([r,d.relativePath]),f=n.concat(d);o.children&&o.children.length>0&&(de(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),pm(o.children,e,f,u,l)),!(o.path==null&&!o.index)&&e.push({path:u,score:uy(u,o.index),routesMeta:f})};return t.forEach((o,a)=>{if(o.path===""||!o.path?.includes("?"))s(o,a);else for(let l of mm(o.path))s(o,a,!0,l)}),e}function mm(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=mm(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function sy(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:fy(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var oy=/^:[\w-]+$/,ay=3,ly=2,cy=1,hy=10,dy=-2,Rd=t=>t==="*";function uy(t,e){let n=t.split("/"),r=n.length;return n.some(Rd)&&(r+=dy),e&&(r+=ly),n.filter(i=>!Rd(i)).reduce((i,s)=>i+(oy.test(s)?ay:s===""?cy:hy),r)}function fy(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function py(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?e:e.slice(s.length)||"/",u=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:rn([s,u.pathname]),pathnameBase:yy(rn([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=rn([s,u.pathnameBase]))}return o}function ta(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=my(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:u},f)=>{if(d==="*"){let m=a[f]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[f];return u&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function my(t,e=!1,n=!0){Ee(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function gy(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ee(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Rt(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function by({basename:t,pathname:e}){return e==="/"?t:rn([t,e])}var gm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ma=t=>gm.test(t);function xy(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Vn(t):t,s;if(n)if(Ma(n))s=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Ee(!1,`Pathnames cannot have embedded double slashes - normalizing ${o} -> ${n}`)}n.startsWith("/")?s=Ld(n.substring(1),"/"):s=Ld(n,e)}else s=e;return{pathname:s,search:vy(r),hash:wy(i)}}function Ld(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function nl(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bm(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Da(t){let e=bm(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function Ta(t,e,n,r=!1){let i;typeof t=="string"?i=Vn(t):(i={...t},de(!i.pathname||!i.pathname.includes("?"),nl("?","pathname","search",i)),de(!i.pathname||!i.pathname.includes("#"),nl("#","pathname","hash",i)),de(!i.search||!i.search.includes("#"),nl("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let u=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;i.pathname=f.join("/")}a=u>=0?e[u]:"/"}let l=xy(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var rn=t=>t.join("/").replace(/\/\/+/g,"/"),yy=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),vy=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wy=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Bs=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Li(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Fs(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var xm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ym(t,e){let n=t;if(typeof n!="string"||!gm.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(xm)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=Rt(o.pathname,e);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{Ee(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var An=Symbol("Uninstrumented");function ky(t,e){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(i=>i({id:e.id,index:e.index,path:e.path,instrument(s){let o=Object.keys(n);for(let a of o)s[a]&&n[a].push(s[a])}}));let r={};if(typeof e.lazy=="function"&&n.lazy.length>0){let i=wr(n.lazy,e.lazy,()=>{});i&&(r.lazy=i)}if(typeof e.lazy=="object"){let i=e.lazy;["middleware","loader","action"].forEach(s=>{let o=i[s],a=n[`lazy.${s}`];if(typeof o=="function"&&a.length>0){let l=wr(a,o,()=>{});l&&(r.lazy=Object.assign(r.lazy||{},{[s]:l}))}})}return["loader","action"].forEach(i=>{let s=e[i];if(typeof s=="function"&&n[i].length>0){let o=s[An]??s,a=wr(n[i],o,(...l)=>Id(l[0]));a&&(a[An]=o,r[i]=a)}}),e.middleware&&e.middleware.length>0&&n.middleware.length>0&&(r.middleware=e.middleware.map(i=>{let s=i[An]??i,o=wr(n.middleware,s,(...a)=>Id(a[0]));return o?(o[An]=s,o):i})),r}function Sy(t,e){let n={navigate:[],fetch:[]};if(e.forEach(r=>r({instrument(i){let s=Object.keys(i);for(let o of s)i[o]&&n[o].push(i[o])}})),n.navigate.length>0){let r=t.navigate[An]??t.navigate,i=wr(n.navigate,r,(...s)=>{let[o,a]=s;return{to:typeof o=="number"||typeof o=="string"?o:o?on(o):".",...$d(t,a??{})}});i&&(i[An]=r,t.navigate=i)}if(n.fetch.length>0){let r=t.fetch[An]??t.fetch,i=wr(n.fetch,r,(...s)=>{let[o,,a,l]=s;return{href:a??".",fetcherKey:o,...$d(t,l??{})}});i&&(i[An]=r,t.fetch=i)}return t}function wr(t,e,n){return t.length===0?null:async(...r)=>{let i=await vm(t,n(...r),()=>e(...r),t.length-1);if(i.type==="error")throw i.value;return i.value}}async function vm(t,e,n,r){let i=t[r],s;if(i){let o,a=async()=>(o?console.error("You cannot call instrumented handlers more than once"):o=vm(t,e,n,r-1),s=await o,de(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await i(a,e)}catch(l){console.error("An instrumentation function threw an error:",l)}o||await a(),await o}else try{s={type:"success",value:await n()}}catch(o){s={type:"error",value:o}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Id(t){let{request:e,context:n,params:r,unstable_pattern:i}=t;return{request:Cy(e),params:{...r},unstable_pattern:i,context:jy(n)}}function $d(t,e){return{currentUrl:on(t.state.location),..."formMethod"in e?{formMethod:e.formMethod}:{},..."formEncType"in e?{formEncType:e.formEncType}:{},..."formData"in e?{formData:e.formData}:{},..."body"in e?{body:e.body}:{}}}function Cy(t){return{method:t.method,url:t.url,headers:{get:(...e)=>t.headers.get(...e)}}}function jy(t){if(Py(t)){let e={...t};return Object.freeze(e),e}else return{get:e=>t.get(e)}}var Oy=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Py(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||Object.getOwnPropertyNames(e).sort().join("\0")===Oy}var wm=["POST","PUT","PATCH","DELETE"],Ny=new Set(wm),Ay=["GET",...wm],My=new Set(Ay),km=new Set([301,302,303,307,308]),Dy=new Set([307,308]),rl={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ty={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},si={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ey=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Sm="remix-router-transitions",Cm=Symbol("ResetLoaderData");function Ry(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";de(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],i=t.mapRouteProperties||Ey,s=i;if(t.unstable_instrumentations){let j=t.unstable_instrumentations;s=P=>({...i(P),...ky(j.map(D=>D.route).filter(Boolean),P)})}let o={},a=Ri(t.routes,s,void 0,o),l,c=t.basename||"/";c.startsWith("/")||(c=`/${c}`);let d=t.dataStrategy||Fy,u={...t.future},f=null,p=new Set,m=null,b=null,x=null,w=t.hydrationData!=null,v=jn(a,t.history.location,c),S=!1,C=null,k;if(v==null&&!t.patchRoutesOnNavigation){let j=Pt(404,{pathname:t.history.location.pathname}),{matches:P,route:D}=lo(a);k=!0,v=P,C={[D.id]:j}}else if(v&&!t.hydrationData&&ro(v,a,t.history.location.pathname).active&&(v=null),v)if(v.some(j=>j.route.lazy))k=!1;else if(!v.some(j=>fh(j.route)))k=!0;else{let j=t.hydrationData?t.hydrationData.loaderData:null,P=t.hydrationData?t.hydrationData.errors:null;if(P){let D=v.findIndex(B=>P[B.route.id]!==void 0);k=v.slice(0,D+1).every(B=>!dc(B.route,j,P))}else k=v.every(D=>!dc(D.route,j,P))}else{k=!1,v=[];let j=ro(null,a,t.history.location.pathname);j.active&&j.matches&&(S=!0,v=j.matches)}let O,y={historyAction:t.history.action,location:t.history.location,matches:v,initialized:k,navigation:rl,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||C,fetchers:new Map,blockers:new Map},M="POP",A=null,R=!1,N,L=!1,H=new Map,$=null,F=!1,G=!1,ue=new Set,X=new Map,te=0,oe=-1,pe=new Map,Y=new Set,le=new Map,me=new Map,ke=new Set,Qe=new Map,mt,q=null;function Me(){if(f=t.history.listen(({action:j,location:P,delta:D})=>{if(mt){mt(),mt=void 0;return}Ee(Qe.size===0||D!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let B=Sd({currentLocation:y.location,nextLocation:P,historyAction:j});if(B&&D!=null){let V=new Promise(Z=>{mt=Z});t.history.go(D*-1),no(B,{state:"blocked",location:P,proceed(){no(B,{state:"proceeding",proceed:void 0,reset:void 0,location:P}),V.then(()=>t.history.go(D))},reset(){let Z=new Map(y.blockers);Z.set(B,si),Se({blockers:Z})}}),A?.resolve(),A=null;return}return ae(j,P)}),n){r1(e,H);let j=()=>i1(e,H);e.addEventListener("pagehide",j),$=()=>e.removeEventListener("pagehide",j)}return y.initialized||ae("POP",y.location,{initialHydration:!0}),O}function Ce(){f&&f(),$&&$(),p.clear(),N&&N.abort(),y.fetchers.forEach((j,P)=>Xa(P)),y.blockers.forEach((j,P)=>kd(P))}function Ie(j){return p.add(j),()=>p.delete(j)}function Se(j,P={}){j.matches&&(j.matches=j.matches.map(V=>{let Z=o[V.route.id],J=V.route;return J.element!==Z.element||J.errorElement!==Z.errorElement||J.hydrateFallbackElement!==Z.hydrateFallbackElement?{...V,route:Z}:V})),y={...y,...j};let D=[],B=[];y.fetchers.forEach((V,Z)=>{V.state==="idle"&&(ke.has(Z)?D.push(Z):B.push(Z))}),ke.forEach(V=>{!y.fetchers.has(V)&&!X.has(V)&&D.push(V)}),[...p].forEach(V=>V(y,{deletedFetchers:D,newErrors:j.errors??null,viewTransitionOpts:P.viewTransitionOpts,flushSync:P.flushSync===!0})),D.forEach(V=>Xa(V)),B.forEach(V=>y.fetchers.delete(V))}function gt(j,P,{flushSync:D}={}){let B=y.actionData!=null&&y.navigation.formMethod!=null&&Ze(y.navigation.formMethod)&&y.navigation.state==="loading"&&j.state?._isRedirect!==!0,V;P.actionData?Object.keys(P.actionData).length>0?V=P.actionData:V=null:B?V=y.actionData:V=null;let Z=P.loaderData?Gd(y.loaderData,P.loaderData,P.matches||[],P.errors):y.loaderData,J=y.blockers;J.size>0&&(J=new Map(J),J.forEach((se,ne)=>J.set(ne,si)));let Q=F?!1:jd(j,P.matches||y.matches),ee=R===!0||y.navigation.formMethod!=null&&Ze(y.navigation.formMethod)&&j.state?._isRedirect!==!0;l&&(a=l,l=void 0),F||M==="POP"||(M==="PUSH"?t.history.push(j,j.state):M==="REPLACE"&&t.history.replace(j,j.state));let ie;if(M==="POP"){let se=H.get(y.location.pathname);se&&se.has(j.pathname)?ie={currentLocation:y.location,nextLocation:j}:H.has(j.pathname)&&(ie={currentLocation:j,nextLocation:y.location})}else if(L){let se=H.get(y.location.pathname);se?se.add(j.pathname):(se=new Set([j.pathname]),H.set(y.location.pathname,se)),ie={currentLocation:y.location,nextLocation:j}}Se({...P,actionData:V,loaderData:Z,historyAction:M,location:j,initialized:!0,navigation:rl,revalidation:"idle",restoreScrollPosition:Q,preventScrollReset:ee,blockers:J},{viewTransitionOpts:ie,flushSync:D===!0}),M="POP",R=!1,L=!1,F=!1,G=!1,A?.resolve(),A=null,q?.resolve(),q=null}async function I(j,P){if(A?.resolve(),A=null,typeof j=="number"){A||(A=Qd());let ve=A.promise;return t.history.go(j),ve}let D=hc(y.location,y.matches,c,j,P?.fromRouteId,P?.relative),{path:B,submission:V,error:Z}=Bd(!1,D,P),J=y.location,Q=Ei(y.location,B,P&&P.state);Q={...Q,...t.history.encodeLocation(Q)};let ee=P&&P.replace!=null?P.replace:void 0,ie="PUSH";ee===!0?ie="REPLACE":ee===!1||V!=null&&Ze(V.formMethod)&&V.formAction===y.location.pathname+y.location.search&&(ie="REPLACE");let se=P&&"preventScrollReset"in P?P.preventScrollReset===!0:void 0,ne=(P&&P.flushSync)===!0,ye=Sd({currentLocation:J,nextLocation:Q,historyAction:ie});if(ye){no(ye,{state:"blocked",location:Q,proceed(){no(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),I(j,P)},reset(){let ve=new Map(y.blockers);ve.set(ye,si),Se({blockers:ve})}});return}await ae(ie,Q,{submission:V,pendingError:Z,preventScrollReset:se,replace:P&&P.replace,enableViewTransition:P&&P.viewTransition,flushSync:ne,callSiteDefaultShouldRevalidate:P&&P.unstable_defaultShouldRevalidate})}function K(){q||(q=Qd()),Qa(),Se({revalidation:"loading"});let j=q.promise;return y.navigation.state==="submitting"?j:y.navigation.state==="idle"?(ae(y.historyAction,y.location,{startUninterruptedRevalidation:!0}),j):(ae(M||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:L===!0}),j)}async function ae(j,P,D){N&&N.abort(),N=null,M=j,F=(D&&D.startUninterruptedRevalidation)===!0,Rx(y.location,y.matches),R=(D&&D.preventScrollReset)===!0,L=(D&&D.enableViewTransition)===!0;let B=l||a,V=D&&D.overrideNavigation,Z=D?.initialHydration&&y.matches&&y.matches.length>0&&!S?y.matches:jn(B,P,c),J=(D&&D.flushSync)===!0;if(Z&&y.initialized&&!G&&Gy(y.location,P)&&!(D&&D.submission&&Ze(D.submission.formMethod))){gt(P,{matches:Z},{flushSync:J});return}let Q=ro(Z,B,P.pathname);if(Q.active&&Q.matches&&(Z=Q.matches),!Z){let{error:We,notFoundMatches:it,route:je}=Za(P.pathname);gt(P,{matches:it,loaderData:{},errors:{[je.id]:We}},{flushSync:J});return}N=new AbortController;let ee=xr(t.history,P,N.signal,D&&D.submission),ie=t.getContext?await t.getContext():new Td,se;if(D&&D.pendingError)se=[On(Z).route.id,{type:"error",error:D.pendingError}];else if(D&&D.submission&&Ze(D.submission.formMethod)){let We=await De(ee,P,D.submission,Z,ie,Q.active,D&&D.initialHydration===!0,{replace:D.replace,flushSync:J});if(We.shortCircuited)return;if(We.pendingActionResult){let[it,je]=We.pendingActionResult;if(vt(je)&&Li(je.error)&&je.error.status===404){N=null,gt(P,{matches:We.matches,loaderData:{},errors:{[it]:je.error}});return}}Z=We.matches||Z,se=We.pendingActionResult,V=il(P,D.submission),J=!1,Q.active=!1,ee=xr(t.history,ee.url,ee.signal)}let{shortCircuited:ne,matches:ye,loaderData:ve,errors:Ke}=await Ut(ee,P,Z,ie,Q.active,V,D&&D.submission,D&&D.fetcherSubmission,D&&D.replace,D&&D.initialHydration===!0,J,se,D&&D.callSiteDefaultShouldRevalidate);ne||(N=null,gt(P,{matches:ye||Z,...qd(se),loaderData:ve,errors:Ke}))}async function De(j,P,D,B,V,Z,J,Q={}){Qa();let ee=t1(P,D);if(Se({navigation:ee},{flushSync:Q.flushSync===!0}),Z){let ne=await io(B,P.pathname,j.signal);if(ne.type==="aborted")return{shortCircuited:!0};if(ne.type==="error"){if(ne.partialMatches.length===0){let{matches:ve,route:Ke}=lo(a);return{matches:ve,pendingActionResult:[Ke.id,{type:"error",error:ne.error}]}}let ye=On(ne.partialMatches).route.id;return{matches:ne.partialMatches,pendingActionResult:[ye,{type:"error",error:ne.error}]}}else if(ne.matches)B=ne.matches;else{let{notFoundMatches:ye,error:ve,route:Ke}=Za(P.pathname);return{matches:ye,pendingActionResult:[Ke.id,{type:"error",error:ve}]}}}let ie,se=_o(B,P);if(!se.route.action&&!se.route.lazy)ie={type:"error",error:Pt(405,{method:j.method,pathname:P.pathname,routeId:se.route.id})};else{let ne=Pr(s,o,j,B,se,J?[]:r,V),ye=await ni(j,ne,V,null);if(ie=ye[se.route.id],!ie){for(let ve of B)if(ye[ve.route.id]){ie=ye[ve.route.id];break}}if(j.signal.aborted)return{shortCircuited:!0}}if(er(ie)){let ne;return Q&&Q.replace!=null?ne=Q.replace:ne=Wd(ie.response.headers.get("Location"),new URL(j.url),c)===y.location.pathname+y.location.search,await Wn(j,ie,!0,{submission:D,replace:ne}),{shortCircuited:!0}}if(vt(ie)){let ne=On(B,se.route.id);return(Q&&Q.replace)!==!0&&(M="PUSH"),{matches:B,pendingActionResult:[ne.route.id,ie,se.route.id]}}return{matches:B,pendingActionResult:[se.route.id,ie]}}async function Ut(j,P,D,B,V,Z,J,Q,ee,ie,se,ne,ye){let ve=Z||il(P,J),Ke=J||Q||Yd(ve),We=!F&&!ie;if(V){if(We){let Xe=to(ne);Se({navigation:ve,...Xe!==void 0?{actionData:Xe}:{}},{flushSync:se})}let xe=await io(D,P.pathname,j.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:mr,route:Gn}=lo(a);return{matches:mr,loaderData:{},errors:{[Gn.id]:xe.error}}}let Xe=On(xe.partialMatches).route.id;return{matches:xe.partialMatches,loaderData:{},errors:{[Xe]:xe.error}}}else if(xe.matches)D=xe.matches;else{let{error:Xe,notFoundMatches:mr,route:Gn}=Za(P.pathname);return{matches:mr,loaderData:{},errors:{[Gn.id]:Xe}}}}let it=l||a,{dsMatches:je,revalidatingFetchers:jt}=Fd(j,B,s,o,t.history,y,D,Ke,P,ie?[]:r,ie===!0,G,ue,ke,le,Y,it,c,t.patchRoutesOnNavigation!=null,ne,ye);if(oe=++te,!t.dataStrategy&&!je.some(xe=>xe.shouldLoad)&&!je.some(xe=>xe.route.middleware&&xe.route.middleware.length>0)&&jt.length===0){let xe=vd();return gt(P,{matches:D,loaderData:{},errors:ne&&vt(ne[1])?{[ne[0]]:ne[1].error}:null,...qd(ne),...xe?{fetchers:new Map(y.fetchers)}:{}},{flushSync:se}),{shortCircuited:!0}}if(We){let xe={};if(!V){xe.navigation=ve;let Xe=to(ne);Xe!==void 0&&(xe.actionData=Xe)}jt.length>0&&(xe.fetchers=ti(jt)),Se(xe,{flushSync:se})}jt.forEach(xe=>{fn(xe.key),xe.controller&&X.set(xe.key,xe.controller)});let Un=()=>jt.forEach(xe=>fn(xe.key));N&&N.signal.addEventListener("abort",Un);let{loaderResults:ri,fetcherResults:wn}=await bd(je,jt,j,B);if(j.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Un),jt.forEach(xe=>X.delete(xe.key));let Kt=co(ri);if(Kt)return await Wn(j,Kt.result,!0,{replace:ee}),{shortCircuited:!0};if(Kt=co(wn),Kt)return Y.add(Kt.key),await Wn(j,Kt.result,!0,{replace:ee}),{shortCircuited:!0};let{loaderData:el,errors:ii}=Kd(y,D,ri,ne,jt,wn);ie&&y.errors&&(ii={...y.errors,...ii});let Kn=vd(),so=wd(oe),oo=Kn||so||jt.length>0;return{matches:D,loaderData:el,errors:ii,...oo?{fetchers:new Map(y.fetchers)}:{}}}function to(j){if(j&&!vt(j[1]))return{[j[0]]:j[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function ti(j){return j.forEach(P=>{let D=y.fetchers.get(P.key),B=oi(void 0,D?D.data:void 0);y.fetchers.set(P.key,B)}),new Map(y.fetchers)}async function Px(j,P,D,B){fn(j);let V=(B&&B.flushSync)===!0,Z=l||a,J=hc(y.location,y.matches,c,D,P,B?.relative),Q=jn(Z,J,c),ee=ro(Q,Z,J);if(ee.active&&ee.matches&&(Q=ee.matches),!Q){un(j,P,Pt(404,{pathname:J}),{flushSync:V});return}let{path:ie,submission:se,error:ne}=Bd(!0,J,B);if(ne){un(j,P,ne,{flushSync:V});return}let ye=t.getContext?await t.getContext():new Td,ve=(B&&B.preventScrollReset)===!0;if(se&&Ze(se.formMethod)){await Nx(j,P,ie,Q,ye,ee.active,V,ve,se,B&&B.unstable_defaultShouldRevalidate);return}le.set(j,{routeId:P,path:ie}),await Ax(j,P,ie,Q,ye,ee.active,V,ve,se)}async function Nx(j,P,D,B,V,Z,J,Q,ee,ie){Qa(),le.delete(j);let se=y.fetchers.get(j);dn(j,n1(ee,se),{flushSync:J});let ne=new AbortController,ye=xr(t.history,D,ne.signal,ee);if(Z){let Re=await io(B,new URL(ye.url).pathname,ye.signal,j);if(Re.type==="aborted")return;if(Re.type==="error"){un(j,P,Re.error,{flushSync:J});return}else if(Re.matches)B=Re.matches;else{un(j,P,Pt(404,{pathname:D}),{flushSync:J});return}}let ve=_o(B,D);if(!ve.route.action&&!ve.route.lazy){let Re=Pt(405,{method:ee.formMethod,pathname:D,routeId:P});un(j,P,Re,{flushSync:J});return}X.set(j,ne);let Ke=te,We=Pr(s,o,ye,B,ve,r,V),it=await ni(ye,We,V,j),je=it[ve.route.id];if(!je){for(let Re of We)if(it[Re.route.id]){je=it[Re.route.id];break}}if(ye.signal.aborted){X.get(j)===ne&&X.delete(j);return}if(ke.has(j)){if(er(je)||vt(je)){dn(j,pn(void 0));return}}else{if(er(je))if(X.delete(j),oe>Ke){dn(j,pn(void 0));return}else return Y.add(j),dn(j,oi(ee)),Wn(ye,je,!1,{fetcherSubmission:ee,preventScrollReset:Q});if(vt(je)){un(j,P,je.error);return}}let jt=y.navigation.location||y.location,Un=xr(t.history,jt,ne.signal),ri=l||a,wn=y.navigation.state!=="idle"?jn(ri,y.navigation.location,c):y.matches;de(wn,"Didn't find any matches after fetcher action");let Kt=++te;pe.set(j,Kt);let el=oi(ee,je.data);y.fetchers.set(j,el);let{dsMatches:ii,revalidatingFetchers:Kn}=Fd(Un,V,s,o,t.history,y,wn,ee,jt,r,!1,G,ue,ke,le,Y,ri,c,t.patchRoutesOnNavigation!=null,[ve.route.id,je],ie);Kn.filter(Re=>Re.key!==j).forEach(Re=>{let ao=Re.key,Pd=y.fetchers.get(ao),$x=oi(void 0,Pd?Pd.data:void 0);y.fetchers.set(ao,$x),fn(ao),Re.controller&&X.set(ao,Re.controller)}),Se({fetchers:new Map(y.fetchers)});let so=()=>Kn.forEach(Re=>fn(Re.key));ne.signal.addEventListener("abort",so);let{loaderResults:oo,fetcherResults:xe}=await bd(ii,Kn,Un,V);if(ne.signal.aborted)return;if(ne.signal.removeEventListener("abort",so),pe.delete(j),X.delete(j),Kn.forEach(Re=>X.delete(Re.key)),y.fetchers.has(j)){let Re=pn(je.data);y.fetchers.set(j,Re)}let Xe=co(oo);if(Xe)return Wn(Un,Xe.result,!1,{preventScrollReset:Q});if(Xe=co(xe),Xe)return Y.add(Xe.key),Wn(Un,Xe.result,!1,{preventScrollReset:Q});let{loaderData:mr,errors:Gn}=Kd(y,wn,oo,void 0,Kn,xe);wd(Kt),y.navigation.state==="loading"&&Kt>oe?(de(M,"Expected pending action"),N&&N.abort(),gt(y.navigation.location,{matches:wn,loaderData:mr,errors:Gn,fetchers:new Map(y.fetchers)})):(Se({errors:Gn,loaderData:Gd(y.loaderData,mr,wn,Gn),fetchers:new Map(y.fetchers)}),G=!1)}async function Ax(j,P,D,B,V,Z,J,Q,ee){let ie=y.fetchers.get(j);dn(j,oi(ee,ie?ie.data:void 0),{flushSync:J});let se=new AbortController,ne=xr(t.history,D,se.signal);if(Z){let je=await io(B,new URL(ne.url).pathname,ne.signal,j);if(je.type==="aborted")return;if(je.type==="error"){un(j,P,je.error,{flushSync:J});return}else if(je.matches)B=je.matches;else{un(j,P,Pt(404,{pathname:D}),{flushSync:J});return}}let ye=_o(B,D);X.set(j,se);let ve=te,Ke=Pr(s,o,ne,B,ye,r,V),it=(await ni(ne,Ke,V,j))[ye.route.id];if(X.get(j)===se&&X.delete(j),!ne.signal.aborted){if(ke.has(j)){dn(j,pn(void 0));return}if(er(it))if(oe>ve){dn(j,pn(void 0));return}else{Y.add(j),await Wn(ne,it,!1,{preventScrollReset:Q});return}if(vt(it)){un(j,P,it.error);return}dn(j,pn(it.data))}}async function Wn(j,P,D,{submission:B,fetcherSubmission:V,preventScrollReset:Z,replace:J}={}){D||(A?.resolve(),A=null),P.response.headers.has("X-Remix-Revalidate")&&(G=!0);let Q=P.response.headers.get("Location");de(Q,"Expected a Location header on the redirect Response"),Q=Wd(Q,new URL(j.url),c);let ee=Ei(y.location,Q,{_isRedirect:!0});if(n){let Ke=!1;if(P.response.headers.has("X-Remix-Reload-Document"))Ke=!0;else if(Ma(Q)){const We=fm(Q,!0);Ke=We.origin!==e.location.origin||Rt(We.pathname,c)==null}if(Ke){J?e.location.replace(Q):e.location.assign(Q);return}}N=null;let ie=J===!0||P.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:se,formAction:ne,formEncType:ye}=y.navigation;!B&&!V&&se&&ne&&ye&&(B=Yd(y.navigation));let ve=B||V;if(Dy.has(P.response.status)&&ve&&Ze(ve.formMethod))await ae(ie,ee,{submission:{...ve,formAction:Q},preventScrollReset:Z||R,enableViewTransition:D?L:void 0});else{let Ke=il(ee,B);await ae(ie,ee,{overrideNavigation:Ke,fetcherSubmission:V,preventScrollReset:Z||R,enableViewTransition:D?L:void 0})}}async function ni(j,P,D,B){let V,Z={};try{V=await zy(d,j,P,B,D,!1)}catch(J){return P.filter(Q=>Q.shouldLoad).forEach(Q=>{Z[Q.route.id]={type:"error",error:J}}),Z}if(j.signal.aborted)return Z;if(!Ze(j.method))for(let J of P){if(V[J.route.id]?.type==="error")break;!V.hasOwnProperty(J.route.id)&&!y.loaderData.hasOwnProperty(J.route.id)&&(!y.errors||!y.errors.hasOwnProperty(J.route.id))&&J.shouldCallHandler()&&(V[J.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${J.route.id}`)})}for(let[J,Q]of Object.entries(V))if(Qy(Q)){let ee=Q.result;Z[J]={type:"redirect",response:Uy(ee,j,J,P,c)}}else Z[J]=await Wy(Q);return Z}async function bd(j,P,D,B){let V=ni(D,j,B,null),Z=Promise.all(P.map(async ee=>{if(ee.matches&&ee.match&&ee.request&&ee.controller){let se=(await ni(ee.request,ee.matches,B,ee.key))[ee.match.route.id];return{[ee.key]:se}}else return Promise.resolve({[ee.key]:{type:"error",error:Pt(404,{pathname:ee.path})}})})),J=await V,Q=(await Z).reduce((ee,ie)=>Object.assign(ee,ie),{});return{loaderResults:J,fetcherResults:Q}}function Qa(){G=!0,le.forEach((j,P)=>{X.has(P)&&ue.add(P),fn(P)})}function dn(j,P,D={}){y.fetchers.set(j,P),Se({fetchers:new Map(y.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function un(j,P,D,B={}){let V=On(y.matches,P);Xa(j),Se({errors:{[V.route.id]:D},fetchers:new Map(y.fetchers)},{flushSync:(B&&B.flushSync)===!0})}function xd(j){return me.set(j,(me.get(j)||0)+1),ke.has(j)&&ke.delete(j),y.fetchers.get(j)||Ty}function Mx(j,P){fn(j,P?.reason),dn(j,pn(null))}function Xa(j){let P=y.fetchers.get(j);X.has(j)&&!(P&&P.state==="loading"&&pe.has(j))&&fn(j),le.delete(j),pe.delete(j),Y.delete(j),ke.delete(j),ue.delete(j),y.fetchers.delete(j)}function Dx(j){let P=(me.get(j)||0)-1;P<=0?(me.delete(j),ke.add(j)):me.set(j,P),Se({fetchers:new Map(y.fetchers)})}function fn(j,P){let D=X.get(j);D&&(D.abort(P),X.delete(j))}function yd(j){for(let P of j){let D=xd(P),B=pn(D.data);y.fetchers.set(P,B)}}function vd(){let j=[],P=!1;for(let D of Y){let B=y.fetchers.get(D);de(B,`Expected fetcher: ${D}`),B.state==="loading"&&(Y.delete(D),j.push(D),P=!0)}return yd(j),P}function wd(j){let P=[];for(let[D,B]of pe)if(B<j){let V=y.fetchers.get(D);de(V,`Expected fetcher: ${D}`),V.state==="loading"&&(fn(D),pe.delete(D),P.push(D))}return yd(P),P.length>0}function Tx(j,P){let D=y.blockers.get(j)||si;return Qe.get(j)!==P&&Qe.set(j,P),D}function kd(j){y.blockers.delete(j),Qe.delete(j)}function no(j,P){let D=y.blockers.get(j)||si;de(D.state==="unblocked"&&P.state==="blocked"||D.state==="blocked"&&P.state==="blocked"||D.state==="blocked"&&P.state==="proceeding"||D.state==="blocked"&&P.state==="unblocked"||D.state==="proceeding"&&P.state==="unblocked",`Invalid blocker state transition: ${D.state} -> ${P.state}`);let B=new Map(y.blockers);B.set(j,P),Se({blockers:B})}function Sd({currentLocation:j,nextLocation:P,historyAction:D}){if(Qe.size===0)return;Qe.size>1&&Ee(!1,"A router only supports one blocker at a time");let B=Array.from(Qe.entries()),[V,Z]=B[B.length-1],J=y.blockers.get(V);if(!(J&&J.state==="proceeding")&&Z({currentLocation:j,nextLocation:P,historyAction:D}))return V}function Za(j){let P=Pt(404,{pathname:j}),D=l||a,{matches:B,route:V}=lo(D);return{notFoundMatches:B,route:V,error:P}}function Ex(j,P,D){if(m=j,x=P,b=D||null,!w&&y.navigation===rl){w=!0;let B=jd(y.location,y.matches);B!=null&&Se({restoreScrollPosition:B})}return()=>{m=null,x=null,b=null}}function Cd(j,P){return b&&b(j,P.map(B=>iy(B,y.loaderData)))||j.key}function Rx(j,P){if(m&&x){let D=Cd(j,P);m[D]=x()}}function jd(j,P){if(m){let D=Cd(j,P),B=m[D];if(typeof B=="number")return B}return null}function ro(j,P,D){if(t.patchRoutesOnNavigation)if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:yi(P,D,c,!0)}}else return{active:!0,matches:yi(P,D,c,!0)||[]};return{active:!1,matches:null}}async function io(j,P,D,B){if(!t.patchRoutesOnNavigation)return{type:"success",matches:j};let V=j;for(;;){let Z=l==null,J=l||a,Q=o;try{await t.patchRoutesOnNavigation({signal:D,path:P,matches:V,fetcherKey:B,patch:(se,ne)=>{D.aborted||Vd(se,ne,J,Q,s,!1)}})}catch(se){return{type:"error",error:se,partialMatches:V}}finally{Z&&!D.aborted&&(a=[...a])}if(D.aborted)return{type:"aborted"};let ee=jn(J,P,c),ie=null;if(ee){if(Object.keys(ee[0].params).length===0)return{type:"success",matches:ee};if(ie=yi(J,P,c,!0),!(ie&&V.length<ie.length&&Od(V,ie.slice(0,V.length))))return{type:"success",matches:ee}}if(ie||(ie=yi(J,P,c,!0)),!ie||Od(V,ie))return{type:"success",matches:null};V=ie}}function Od(j,P){return j.length===P.length&&j.every((D,B)=>D.route.id===P[B].route.id)}function Lx(j){o={},l=Ri(j,s,void 0,o)}function Ix(j,P,D=!1){let B=l==null;Vd(j,P,l||a,o,s,D),B&&(a=[...a],Se({}))}return O={get basename(){return c},get future(){return u},get state(){return y},get routes(){return a},get window(){return e},initialize:Me,subscribe:Ie,enableScrollRestoration:Ex,navigate:I,fetch:Px,revalidate:K,createHref:j=>t.history.createHref(j),encodeLocation:j=>t.history.encodeLocation(j),getFetcher:xd,resetFetcher:Mx,deleteFetcher:Dx,dispose:Ce,getBlocker:Tx,deleteBlocker:kd,patchRoutes:Ix,_internalFetchControllers:X,_internalSetRoutes:Lx,_internalSetStateDoNotUseOrYouWillBreakYourApp(j){Se(j)}},t.unstable_instrumentations&&(O=Sy(O,t.unstable_instrumentations.map(j=>j.router).filter(Boolean))),O}function Ly(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function hc(t,e,n,r,i,s){let o,a;if(i){o=[];for(let c of e)if(o.push(c),c.route.id===i){a=c;break}}else o=e,a=e[e.length-1];let l=Ta(r||".",Da(o),Rt(t.pathname,n)||t.pathname,s==="path");if(r==null&&(l.search=t.search,l.hash=t.hash),(r==null||r===""||r===".")&&a){let c=mh(l.search);if(a.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!a.route.index&&c){let d=new URLSearchParams(l.search),u=d.getAll("index");d.delete("index"),u.filter(p=>p).forEach(p=>d.append("index",p));let f=d.toString();l.search=f?`?${f}`:""}}return n!=="/"&&(l.pathname=by({basename:n,pathname:l.pathname})),on(l)}function Bd(t,e,n){if(!n||!Ly(n))return{path:e};if(n.formMethod&&!e1(n.formMethod))return{path:e,error:Pt(405,{method:n.formMethod})};let r=()=>({path:e,error:Pt(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),o=Mm(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ze(s))return r();let u=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,[p,m])=>`${f}${p}=${m}
|
|
19
19
|
`,""):String(n.body);return{path:e,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:u}}}else if(n.formEncType==="application/json"){if(!Ze(s))return r();try{let u=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:u,text:void 0}}}catch{return r()}}}de(typeof FormData=="function","FormData is not available in this environment");let a,l;if(n.formData)a=fc(n.formData),l=n.formData;else if(n.body instanceof FormData)a=fc(n.body),l=n.body;else if(n.body instanceof URLSearchParams)a=n.body,l=Ud(a);else if(n.body==null)a=new URLSearchParams,l=new FormData;else try{a=new URLSearchParams(n.body),l=Ud(a)}catch{return r()}let c={formMethod:s,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ze(c.formMethod))return{path:e,submission:c};let d=Vn(e);return t&&d.search&&mh(d.search)&&a.append("index",""),d.search=`?${a}`,{path:on(d),submission:c}}function Fd(t,e,n,r,i,s,o,a,l,c,d,u,f,p,m,b,x,w,v,S,C){let k=S?vt(S[1])?S[1].error:S[1].data:void 0,O=i.createURL(s.location),y=i.createURL(l),M;if(d&&s.errors){let F=Object.keys(s.errors)[0];M=o.findIndex(G=>G.route.id===F)}else if(S&&vt(S[1])){let F=S[0];M=o.findIndex(G=>G.route.id===F)-1}let A=S?S[1].statusCode:void 0,R=A&&A>=400,N={currentUrl:O,currentParams:s.matches[0]?.params||{},nextUrl:y,nextParams:o[0].params,...a,actionResult:k,actionStatus:A},L=Fs(o),H=o.map((F,G)=>{let{route:ue}=F,X=null;if(M!=null&&G>M?X=!1:ue.lazy?X=!0:fh(ue)?d?X=dc(ue,s.loaderData,s.errors):Iy(s.loaderData,s.matches[G],F)&&(X=!0):X=!1,X!==null)return uc(n,r,t,L,F,c,e,X);let te=!1;typeof C=="boolean"?te=C:R?te=!1:(u||O.pathname+O.search===y.pathname+y.search||O.search!==y.search||$y(s.matches[G],F))&&(te=!0);let oe={...N,defaultShouldRevalidate:te},pe=Ci(F,oe);return uc(n,r,t,L,F,c,e,pe,oe,C)}),$=[];return m.forEach((F,G)=>{if(d||!o.some(me=>me.route.id===F.routeId)||p.has(G))return;let ue=s.fetchers.get(G),X=ue&&ue.state!=="idle"&&ue.data===void 0,te=jn(x,F.path,w);if(!te){if(v&&X)return;$.push({key:G,routeId:F.routeId,path:F.path,matches:null,match:null,request:null,controller:null});return}if(b.has(G))return;let oe=_o(te,F.path),pe=new AbortController,Y=xr(i,F.path,pe.signal),le=null;if(f.has(G))f.delete(G),le=Pr(n,r,Y,te,oe,c,e);else if(X)u&&(le=Pr(n,r,Y,te,oe,c,e));else{let me;typeof C=="boolean"?me=C:R?me=!1:me=u;let ke={...N,defaultShouldRevalidate:me};Ci(oe,ke)&&(le=Pr(n,r,Y,te,oe,c,e,ke))}le&&$.push({key:G,routeId:F.routeId,path:F.path,matches:le,match:oe,request:Y,controller:pe})}),{dsMatches:H,revalidatingFetchers:$}}function fh(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function dc(t,e,n){if(t.lazy)return!0;if(!fh(t))return!1;let r=e!=null&&t.id in e,i=n!=null&&n[t.id]!==void 0;return!r&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!i}function Iy(t,e,n){let r=!e||n.route.id!==e.route.id,i=!t.hasOwnProperty(n.route.id);return r||i}function $y(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function Ci(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function Vd(t,e,n,r,i,s){let o;if(t){let c=r[t];de(c,`No route found to patch children into: routeId = ${t}`),c.children||(c.children=[]),o=c.children}else o=n;let a=[],l=[];if(e.forEach(c=>{let d=o.find(u=>jm(c,u));d?l.push({existingRoute:d,newRoute:c}):a.push(c)}),a.length>0){let c=Ri(a,i,[t||"_","patch",String(o?.length||"0")],r);o.push(...c)}if(s&&l.length>0)for(let c=0;c<l.length;c++){let{existingRoute:d,newRoute:u}=l[c],f=d,[p]=Ri([u],i,[],{},!0);Object.assign(f,{element:p.element?p.element:f.element,errorElement:p.errorElement?p.errorElement:f.errorElement,hydrateFallbackElement:p.hydrateFallbackElement?p.hydrateFallbackElement:f.hydrateFallbackElement})}}function jm(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>e.children?.some(i=>jm(n,i))):!1}var zd=new WeakMap,Om=({key:t,route:e,manifest:n,mapRouteProperties:r})=>{let i=n[e.id];if(de(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let s=i.lazy[t];if(!s)return;let o=zd.get(i);o||(o={},zd.set(i,o));let a=o[t];if(a)return a;let l=(async()=>{let c=ey(t),u=i[t]!==void 0&&t!=="hasErrorBoundary";if(c)Ee(!c,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),o[t]=Promise.resolve();else if(u)Ee(!1,`Route "${i.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let f=await s();f!=null&&(Object.assign(i,{[t]:f}),Object.assign(i,r(i)))}typeof i.lazy=="object"&&(i.lazy[t]=void 0,Object.values(i.lazy).every(f=>f===void 0)&&(i.lazy=void 0))})();return o[t]=l,l},_d=new WeakMap;function By(t,e,n,r,i){let s=n[t.id];if(de(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let d=_d.get(s);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let u=(async()=>{de(typeof t.lazy=="function","No lazy route function found");let f=await t.lazy(),p={};for(let m in f){let b=f[m];if(b===void 0)continue;let x=ny(m),v=s[m]!==void 0&&m!=="hasErrorBoundary";x?Ee(!x,"Route property "+m+" is not a supported property to be returned from a lazy route function. This property will be ignored."):v?Ee(!v,`Route "${s.id}" has a static property "${m}" defined but its lazy function is also returning a value for this property. The lazy route property "${m}" will be ignored.`):p[m]=b}Object.assign(s,p),Object.assign(s,{...r(s),lazy:void 0})})();return _d.set(s,u),u.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:u}}let o=Object.keys(t.lazy),a=[],l;for(let d of o){if(i&&i.includes(d))continue;let u=Om({key:d,route:t,manifest:n,mapRouteProperties:r});u&&(a.push(u),d===e&&(l=u))}let c=a.length>0?Promise.all(a).then(()=>{}):void 0;return c?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function Hd(t){let e=t.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(e.map(i=>i.resolve()))).forEach((i,s)=>{n[e[s].route.id]=i}),n}async function Fy(t){return t.matches.some(e=>e.route.middleware)?Pm(t,()=>Hd(t)):Hd(t)}function Pm(t,e){return Vy(t,e,r=>{if(Zy(r))throw r;return r},Jy,n);function n(r,i,s){if(s)return Promise.resolve(Object.assign(s.value,{[i]:{type:"error",result:r}}));{let{matches:o}=t,a=Math.min(Math.max(o.findIndex(c=>c.route.id===i),0),Math.max(o.findIndex(c=>c.shouldCallHandler()),0)),l=On(o,o[a].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:r}})}}}async function Vy(t,e,n,r,i){let{matches:s,request:o,params:a,context:l,unstable_pattern:c}=t,d=s.flatMap(f=>f.route.middleware?f.route.middleware.map(p=>[f.route.id,p]):[]);return await Nm({request:o,params:a,context:l,unstable_pattern:c},d,e,n,r,i)}async function Nm(t,e,n,r,i,s,o=0){let{request:a}=t;if(a.signal.aborted)throw a.signal.reason??new Error(`Request aborted: ${a.method} ${a.url}`);let l=e[o];if(!l)return await n();let[c,d]=l,u,f=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{return u={value:await Nm(t,e,n,r,i,s,o+1)},u.value}catch(p){return u={value:await s(p,c,u)},u.value}};try{let p=await d(t,f),m=p!=null?r(p):void 0;return i(m)?m:u?m??u.value:(u={value:await f()},u.value)}catch(p){return await s(p,c,u)}}function Am(t,e,n,r,i){let s=Om({key:"middleware",route:r.route,manifest:e,mapRouteProperties:t}),o=By(r.route,Ze(n.method)?"action":"loader",e,t,i);return{middleware:s,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function uc(t,e,n,r,i,s,o,a,l=null,c){let d=!1,u=Am(t,e,n,i,s);return{...i,_lazyPromises:u,shouldLoad:a,shouldRevalidateArgs:l,shouldCallHandler(f){return d=!0,l?typeof c=="boolean"?Ci(i,{...l,defaultShouldRevalidate:c}):typeof f=="boolean"?Ci(i,{...l,defaultShouldRevalidate:f}):Ci(i,l):a},resolve(f){let{lazy:p,loader:m,middleware:b}=i.route,x=d||a||f&&!Ze(n.method)&&(p||m),w=b&&b.length>0&&!m&&!p;return x&&(Ze(n.method)||!w)?_y({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:f,scopedContext:o}):Promise.resolve({type:"data",result:void 0})}}}function Pr(t,e,n,r,i,s,o,a=null){return r.map(l=>l.route.id!==i.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:a,shouldCallHandler:()=>!1,_lazyPromises:Am(t,e,n,l,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:uc(t,e,n,Fs(r),l,s,o,!0,a))}async function zy(t,e,n,r,i,s){n.some(c=>c._lazyPromises?.middleware)&&await Promise.all(n.map(c=>c._lazyPromises?.middleware));let o={request:e,unstable_pattern:Fs(n),params:n[0].params,context:i,matches:n},l=await t({...o,fetcherKey:r,runClientMiddleware:c=>{let d=o;return Pm(d,()=>c({...d,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(c=>[c._lazyPromises?.handler,c._lazyPromises?.route]))}catch{}return l}async function _y({request:t,unstable_pattern:e,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:s,scopedContext:o}){let a,l,c=Ze(t.method),d=c?"action":"loader",u=f=>{let p,m=new Promise((w,v)=>p=v);l=()=>p(),t.signal.addEventListener("abort",l);let b=w=>typeof f!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):f({request:t,unstable_pattern:e,params:n.params,context:o},...w!==void 0?[w]:[]),x=(async()=>{try{return{type:"data",result:await(s?s(v=>b(v)):b())}}catch(w){return{type:"error",result:w}}})();return Promise.race([x,m])};try{let f=c?n.route.action:n.route.loader;if(r||i)if(f){let p,[m]=await Promise.all([u(f).catch(b=>{p=b}),r,i]);if(p!==void 0)throw p;a=m}else{await r;let p=c?n.route.action:n.route.loader;if(p)[a]=await Promise.all([u(p),i]);else if(d==="action"){let m=new URL(t.url),b=m.pathname+m.search;throw Pt(405,{method:t.method,pathname:b,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(f)a=await u(f);else{let p=new URL(t.url),m=p.pathname+p.search;throw Pt(404,{pathname:m})}}catch(f){return{type:"error",result:f}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function Hy(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function Wy(t){let{result:e,type:n}=t;if(ph(e)){let r;try{r=await Hy(e)}catch(i){return{type:"error",error:i}}return n==="error"?{type:"error",error:new Bs(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}:{type:"data",data:r,statusCode:e.status,headers:e.headers}}return n==="error"?Jd(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:qy(e),statusCode:Li(e)?e.status:void 0,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:Li(e)?e.status:void 0}:Jd(e)?{type:"data",data:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function Uy(t,e,n,r,i){let s=t.headers.get("Location");if(de(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ma(s)){let o=r.slice(0,r.findIndex(a=>a.route.id===n)+1);s=hc(new URL(e.url),o,i,s),t.headers.set("Location",s)}return t}function Wd(t,e,n){if(Ma(t)){let r=t,i=r.startsWith("//")?new URL(e.protocol+r):new URL(r),s=Rt(i.pathname,n)!=null;if(i.origin===e.origin&&s)return i.pathname+i.search+i.hash}return t}function xr(t,e,n,r){let i=t.createURL(Mm(e)).toString(),s={signal:n};if(r&&Ze(r.formMethod)){let{formMethod:o,formEncType:a}=r;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=fc(r.formData):s.body=r.formData}return new Request(i,s)}function fc(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function Ud(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function Ky(t,e,n,r=!1,i=!1){let s={},o=null,a,l=!1,c={},d=n&&vt(n[1])?n[1].error:void 0;return t.forEach(u=>{if(!(u.route.id in e))return;let f=u.route.id,p=e[f];if(de(!er(p),"Cannot handle redirect results in processLoaderData"),vt(p)){let m=p.error;if(d!==void 0&&(m=d,d=void 0),o=o||{},i)o[f]=m;else{let b=On(t,f);o[b.route.id]==null&&(o[b.route.id]=m)}r||(s[f]=Cm),l||(l=!0,a=Li(p.error)?p.error.status:500),p.headers&&(c[f]=p.headers)}else s[f]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(c[f]=p.headers)}),d!==void 0&&n&&(o={[n[0]]:d},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:c}}function Kd(t,e,n,r,i,s){let{loaderData:o,errors:a}=Ky(e,n,r);return i.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:d,controller:u}=l;if(u&&u.signal.aborted)return;let f=s[c];if(de(f,"Did not find corresponding fetcher result"),vt(f)){let p=On(t.matches,d?.route.id);a&&a[p.route.id]||(a={...a,[p.route.id]:f.error}),t.fetchers.delete(c)}else if(er(f))de(!1,"Unhandled fetcher revalidation redirect");else{let p=pn(f.data);t.fetchers.set(c,p)}}),{loaderData:o,errors:a}}function Gd(t,e,n,r){let i=Object.entries(e).filter(([,s])=>s!==Cm).reduce((s,[o,a])=>(s[o]=a,s),{});for(let s of n){let o=s.route.id;if(!e.hasOwnProperty(o)&&t.hasOwnProperty(o)&&s.route.loader&&(i[o]=t[o]),r&&r.hasOwnProperty(o))break}return i}function qd(t){return t?vt(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function On(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function lo(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Pt(t,{pathname:e,routeId:n,method:r,type:i,message:s}={}){let o="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(o="Bad Request",r&&e&&n?a=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(a="Unable to encode submission body")):t===403?(o="Forbidden",a=`Route "${n}" does not match URL "${e}"`):t===404?(o="Not Found",a=`No route matches URL "${e}"`):t===405&&(o="Method Not Allowed",r&&e&&n?a=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(a=`Invalid request method "${r.toUpperCase()}"`)),new Bs(t||500,o,new Error(a),!0)}function co(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,i]=e[n];if(er(i))return{key:r,result:i}}}function Mm(t){let e=typeof t=="string"?Vn(t):t;return on({...e,hash:""})}function Gy(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function qy(t){return new Bs(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function Jy(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&Yy(n))}function Yy(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function Qy(t){return ph(t.result)&&km.has(t.result.status)}function vt(t){return t.type==="error"}function er(t){return(t&&t.type)==="redirect"}function Jd(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function ph(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Xy(t){return km.has(t)}function Zy(t){return ph(t)&&Xy(t.status)&&t.headers.has("Location")}function e1(t){return My.has(t.toUpperCase())}function Ze(t){return Ny.has(t.toUpperCase())}function mh(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function _o(t,e){let n=typeof e=="string"?Vn(e).search:e.search;if(t[t.length-1].route.index&&mh(n||""))return t[t.length-1];let r=bm(t);return r[r.length-1]}function Yd(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:s,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function il(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function t1(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function oi(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function n1(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function pn(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function r1(t,e){try{let n=t.sessionStorage.getItem(Sm);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function i1(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(Sm,JSON.stringify(n))}catch(r){Ee(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function Qd(){let t,e,n=new Promise((r,i)=>{t=async s=>{r(s);try{await n}catch{}},e=async s=>{i(s);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var dr=g.createContext(null);dr.displayName="DataRouter";var Vs=g.createContext(null);Vs.displayName="DataRouterState";var Dm=g.createContext(!1);function s1(){return g.useContext(Dm)}var gh=g.createContext({isTransitioning:!1});gh.displayName="ViewTransition";var Tm=g.createContext(new Map);Tm.displayName="Fetchers";var o1=g.createContext(null);o1.displayName="Await";var kt=g.createContext(null);kt.displayName="Navigation";var Ea=g.createContext(null);Ea.displayName="Location";var It=g.createContext({outlet:null,matches:[],isDataRoute:!1});It.displayName="Route";var bh=g.createContext(null);bh.displayName="RouteError";var Em="REACT_ROUTER_ERROR",a1="REDIRECT",l1="ROUTE_ERROR_RESPONSE";function c1(t){if(t.startsWith(`${Em}:${a1}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function h1(t){if(t.startsWith(`${Em}:${l1}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new Bs(e.status,e.statusText,e.data)}catch{}}function d1(t,{relative:e}={}){de(Wr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=g.useContext(kt),{hash:i,pathname:s,search:o}=zs(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:rn([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Wr(){return g.useContext(Ea)!=null}function _t(){return de(Wr(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Ea).location}var Rm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Lm(t){g.useContext(kt).static||g.useLayoutEffect(t)}function an(){let{isDataRoute:t}=g.useContext(It);return t?O1():u1()}function u1(){de(Wr(),"useNavigate() may be used only in the context of a <Router> component.");let t=g.useContext(dr),{basename:e,navigator:n}=g.useContext(kt),{matches:r}=g.useContext(It),{pathname:i}=_t(),s=JSON.stringify(Da(r)),o=g.useRef(!1);return Lm(()=>{o.current=!0}),g.useCallback((l,c={})=>{if(Ee(o.current,Rm),!o.current)return;if(typeof l=="number"){n.go(l);return}let d=Ta(l,JSON.parse(s),i,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:rn([e,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[e,n,s,i,t])}var Im=g.createContext(null);function f1(){return g.useContext(Im)}function p1(t){let e=g.useContext(It).outlet;return g.useMemo(()=>e&&g.createElement(Im.Provider,{value:t},e),[e,t])}function $m(){let{matches:t}=g.useContext(It),e=t[t.length-1];return e?e.params:{}}function zs(t,{relative:e}={}){let{matches:n}=g.useContext(It),{pathname:r}=_t(),i=JSON.stringify(Da(n));return g.useMemo(()=>Ta(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function m1(t,e,n,r,i){de(Wr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=g.useContext(kt),{matches:o}=g.useContext(It),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",d=a?a.pathnameBase:"/",u=a&&a.route;{let v=u&&u.path||"";Fm(c,!u||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
20
20
|
|
|
21
|
-
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let f=_t(),p;p=f;let m=p.pathname||"/",b=m;if(d!=="/"){let v=d.replace(/^\//,"").split("/");b="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=jn(t,{pathname:b});return Ee(u||x!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ee(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),v1(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:rn([d,s.encodeLocation?s.encodeLocation(v.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?d:rn([d,s.encodeLocation?s.encodeLocation(v.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),o,n,r,i)}function g1(){let t=j1(),e=Li(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:s},"ErrorBoundary")," or"," ",g.createElement("code",{style:s},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},e),n?g.createElement("pre",{style:i},n):null,o)}var b1=g.createElement(g1,null),Bm=class extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=h1(t.digest);n&&(t=n)}let e=t!==void 0?g.createElement(It.Provider,{value:this.props.routeContext},g.createElement(bh.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?g.createElement(x1,{error:t},e):e}};Bm.contextType=Dm;var sl=new WeakMap;function x1({children:t,error:e}){let{basename:n}=g.useContext(kt);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=c1(e.digest);if(r){let i=sl.get(e);if(i)throw i;let s=ym(r.location,n);if(xm&&!sl.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw sl.set(e,o),o}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function y1({routeContext:t,match:e,children:n}){let r=g.useContext(dr);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),g.createElement(It.Provider,{value:t},n)}function v1(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n?.errors;if(o!=null){let d=s.findIndex(u=>u.route.id&&o?.[u.route.id]!==void 0);de(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,l=-1;if(n)for(let d=0;d<s.length;d++){let u=s[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=d),u.route.id){let{loaderData:f,errors:p}=n,m=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!p||p[u.route.id]===void 0);if(u.route.lazy||m){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(d,u)=>{r(d,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Fs(n.matches),errorInfo:u})}:void 0;return s.reduceRight((d,u,f)=>{let p,m=!1,b=null,x=null;n&&(p=o&&u.route.id?o[u.route.id]:void 0,b=u.route.errorElement||b1,a&&(l<0&&f===0?(Fm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,x=null):l===f&&(m=!0,x=u.route.hydrateFallbackElement||null)));let w=e.concat(s.slice(0,f+1)),v=()=>{let S;return p?S=b:m?S=x:u.route.Component?S=g.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=d,g.createElement(y1,{match:u,routeContext:{outlet:d,matches:w,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?g.createElement(Bm,{location:n.location,revalidation:n.revalidation,component:b,error:p,children:v(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):v()},null)}function xh(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w1(t){let e=g.useContext(dr);return de(e,xh(t)),e}function k1(t){let e=g.useContext(Vs);return de(e,xh(t)),e}function S1(t){let e=g.useContext(It);return de(e,xh(t)),e}function yh(t){let e=S1(t),n=e.matches[e.matches.length-1];return de(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function C1(){return yh("useRouteId")}function j1(){let t=g.useContext(bh),e=k1("useRouteError"),n=yh("useRouteError");return t!==void 0?t:e.errors?.[n]}function O1(){let{router:t}=w1("useNavigate"),e=yh("useNavigate"),n=g.useRef(!1);return Lm(()=>{n.current=!0}),g.useCallback(async(i,s={})=>{Ee(n.current,Rm),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Xd={};function Fm(t,e,n){!e&&!Xd[t]&&(Xd[t]=!0,Ee(!1,n))}var Zd={};function eu(t,e){!t&&!Zd[e]&&(Zd[e]=!0,console.warn(e))}var P1="useOptimistic",tu=Vx[P1],N1=()=>{};function A1(t){return tu?tu(t):[t,N1]}function M1(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ee(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:g.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ee(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:g.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ee(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:g.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var D1=["HydrateFallback","hydrateFallbackElement"],T1=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function E1({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=s1()||r;let[s,o]=g.useState(t.state),[a,l]=A1(s),[c,d]=g.useState(),[u,f]=g.useState({isTransitioning:!1}),[p,m]=g.useState(),[b,x]=g.useState(),[w,v]=g.useState(),S=g.useRef(new Map),C=g.useCallback((M,{deletedFetchers:A,newErrors:R,flushSync:N,viewTransitionOpts:L})=>{R&&n&&Object.values(R).forEach($=>n($,{location:M.location,params:M.matches[0]?.params??{},unstable_pattern:Fs(M.matches)})),M.fetchers.forEach(($,F)=>{$.data!==void 0&&S.current.set(F,$.data)}),A.forEach($=>S.current.delete($)),eu(N===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let H=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(eu(L==null||H,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!L||!H){e&&N?e(()=>o(M)):r===!1?o(M):g.startTransition(()=>{r===!0&&l($=>nu($,M)),o(M)});return}if(e&&N){e(()=>{b&&(p?.resolve(),b.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let $=t.window.document.startViewTransition(()=>{e(()=>o(M))});$.finished.finally(()=>{e(()=>{m(void 0),x(void 0),d(void 0),f({isTransitioning:!1})})}),e(()=>x($));return}b?(p?.resolve(),b.skipTransition(),v({state:M,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(d(M),f({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[t.window,e,b,p,r,l,n]);g.useLayoutEffect(()=>t.subscribe(C),[t,C]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new T1)},[u]),g.useEffect(()=>{if(p&&c&&t.window){let M=c,A=p.promise,R=t.window.document.startViewTransition(async()=>{r===!1?o(M):g.startTransition(()=>{r===!0&&l(N=>nu(N,M)),o(M)}),await A});R.finished.finally(()=>{m(void 0),x(void 0),d(void 0),f({isTransitioning:!1})}),x(R)}},[c,p,t.window,r,l]),g.useEffect(()=>{p&&c&&a.location.key===c.location.key&&p.resolve()},[p,b,a.location,c]),g.useEffect(()=>{!u.isTransitioning&&w&&(d(w.state),f({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),v(void 0))},[u.isTransitioning,w]);let k=g.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:M=>t.navigate(M),push:(M,A,R)=>t.navigate(M,{state:A,preventScrollReset:R?.preventScrollReset}),replace:(M,A,R)=>t.navigate(M,{replace:!0,state:A,preventScrollReset:R?.preventScrollReset})}),[t]),O=t.basename||"/",y=g.useMemo(()=>({router:t,navigator:k,static:!1,basename:O,onError:n}),[t,k,O,n]);return g.createElement(g.Fragment,null,g.createElement(dr.Provider,{value:y},g.createElement(Vs.Provider,{value:a},g.createElement(Tm.Provider,{value:S.current},g.createElement(gh.Provider,{value:u},g.createElement($1,{basename:O,location:a.location,navigationType:a.historyAction,navigator:k,unstable_useTransitions:r},g.createElement(R1,{routes:t.routes,future:t.future,state:a,onError:n})))))),null)}function nu(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var R1=g.memo(L1);function L1({routes:t,future:e,state:n,onError:r}){return m1(t,void 0,n,r,e)}function ol({to:t,replace:e,state:n,relative:r}){de(Wr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=g.useContext(kt);Ee(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=g.useContext(It),{pathname:o}=_t(),a=an(),l=Ta(t,Da(s),o,r==="path"),c=JSON.stringify(l);return g.useEffect(()=>{a(JSON.parse(c),{replace:e,state:n,relative:r})},[a,c,r,e,n]),null}function I1(t){return p1(t.context)}function $1({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){de(!Wr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=Vn(n));let{pathname:c="/",search:d="",hash:u="",state:f=null,key:p="default"}=n,m=g.useMemo(()=>{let b=Rt(c,a);return b==null?null:{location:{pathname:b,search:d,hash:u,state:f,key:p},navigationType:r}},[a,c,d,u,f,p,r]);return Ee(m!=null,`<Router basename="${a}"> is not able to match the URL "${c}${d}${u}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:g.createElement(kt.Provider,{value:l},g.createElement(Ea.Provider,{children:e,value:m}))}var Ho="get",Wo="application/x-www-form-urlencoded";function Ra(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function B1(t){return Ra(t)&&t.tagName.toLowerCase()==="button"}function F1(t){return Ra(t)&&t.tagName.toLowerCase()==="form"}function V1(t){return Ra(t)&&t.tagName.toLowerCase()==="input"}function z1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _1(t,e){return t.button===0&&(!e||e==="_self")&&!z1(t)}function pc(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function H1(t,e){let n=pc(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var ho=null;function W1(){if(ho===null)try{new FormData(document.createElement("form"),0),ho=!1}catch{ho=!0}return ho}var U1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function al(t){return t!=null&&!U1.has(t)?(Ee(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wo}"`),null):t}function K1(t,e){let n,r,i,s,o;if(F1(t)){let a=t.getAttribute("action");r=a?Rt(a,e):null,n=t.getAttribute("method")||Ho,i=al(t.getAttribute("enctype"))||Wo,s=new FormData(t)}else if(B1(t)||V1(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?Rt(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||Ho,i=al(t.getAttribute("formenctype"))||al(a.getAttribute("enctype"))||Wo,s=new FormData(a,t),!W1()){let{name:c,type:d,value:u}=t;if(d==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,u)}}else{if(Ra(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ho,r=null,i=Wo,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vh(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function G1(t,e,n){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname=`_root.${n}`:e&&Rt(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function q1(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J1(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Y1(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await q1(s,n);return o.links?o.links():[]}return[]}));return ev(r.flat(1).filter(J1).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ru(t,e,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{let d=r.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let u=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function Q1(t,e,{includeHydrateFallback:n}={}){return X1(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function X1(t){return[...new Set(t)]}function Z1(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function ev(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(Z1(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function Vm(){let t=g.useContext(dr);return vh(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function tv(){let t=g.useContext(Vs);return vh(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var wh=g.createContext(void 0);wh.displayName="FrameworkContext";function zm(){let t=g.useContext(wh);return vh(t,"You must render this element inside a <HydratedRouter> element"),t}function nv(t,e){let n=g.useContext(wh),[r,i]=g.useState(!1),[s,o]=g.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=e,f=g.useRef(null);g.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let b=w=>{w.forEach(v=>{o(v.isIntersecting)})},x=new IntersectionObserver(b,{threshold:.5});return f.current&&x.observe(f.current),()=>{x.disconnect()}}},[t]),g.useEffect(()=>{if(r){let b=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(b)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,f,{}]:[s,f,{onFocus:ai(a,p),onBlur:ai(l,m),onMouseEnter:ai(c,p),onMouseLeave:ai(d,m),onTouchStart:ai(u,p)}]:[!1,f,{}]}function ai(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function rv({page:t,...e}){let{router:n}=Vm(),r=g.useMemo(()=>jn(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?g.createElement(sv,{page:t,matches:r,...e}):null}function iv(t){let{manifest:e,routeModules:n}=zm(),[r,i]=g.useState([]);return g.useEffect(()=>{let s=!1;return Y1(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function sv({page:t,matches:e,...n}){let r=_t(),{manifest:i,routeModules:s}=zm(),{basename:o}=Vm(),{loaderData:a,matches:l}=tv(),c=g.useMemo(()=>ru(t,e,l,i,r,"data"),[t,e,l,i,r]),d=g.useMemo(()=>ru(t,e,l,i,r,"assets"),[t,e,l,i,r]),u=g.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let m=new Set,b=!1;if(e.forEach(w=>{let v=i.routes[w.route.id];!v||!v.hasLoader||(!c.some(S=>S.route.id===w.route.id)&&w.route.id in a&&s[w.route.id]?.shouldRevalidate||v.hasClientLoader?b=!0:m.add(w.route.id))}),m.size===0)return[];let x=G1(t,o,"data");return b&&m.size>0&&x.searchParams.set("_routes",e.filter(w=>m.has(w.route.id)).map(w=>w.route.id).join(",")),[x.pathname+x.search]},[o,a,r,i,c,e,t,s]),f=g.useMemo(()=>Q1(d,i),[d,i]),p=iv(d);return g.createElement(g.Fragment,null,u.map(m=>g.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),f.map(m=>g.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),p.map(({key:m,link:b})=>g.createElement("link",{key:m,nonce:n.nonce,...b})))}function ov(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var av=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{av&&(window.__reactRouterVersion="7.11.0")}catch{}function lv(t,e){return Ry({basename:e?.basename,getContext:e?.getContext,future:e?.future,history:Yx({window:e?.window}),hydrationData:cv(),routes:t,mapRouteProperties:M1,hydrationRouteProperties:D1,dataStrategy:e?.dataStrategy,patchRoutesOnNavigation:e?.patchRoutesOnNavigation,window:e?.window,unstable_instrumentations:e?.unstable_instrumentations}).initialize()}function cv(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:hv(t.errors)}),t}function hv(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Bs(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}var _m=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hm=g.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f,...p},m){let{basename:b,unstable_useTransitions:x}=g.useContext(kt),w=typeof c=="string"&&_m.test(c),v=ym(c,b);c=v.to;let S=d1(c,{relative:i}),[C,k,O]=nv(r,p),y=pv(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u,unstable_defaultShouldRevalidate:f,unstable_useTransitions:x});function M(R){e&&e(R),R.defaultPrevented||y(R)}let A=g.createElement("a",{...p,...O,href:v.absoluteURL||S,onClick:v.isExternal||s?e:M,ref:ov(m,k),target:l,"data-discover":!w&&n==="render"?"true":void 0});return C&&!w?g.createElement(g.Fragment,null,A,g.createElement(rv,{page:S})):A});Hm.displayName="Link";var dv=g.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},d){let u=zs(o,{relative:c.relative}),f=_t(),p=g.useContext(Vs),{navigator:m,basename:b}=g.useContext(kt),x=p!=null&&vv(u)&&a===!0,w=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=f.pathname,S=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&b&&(S=Rt(S,b)||S);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=v===w||!i&&v.startsWith(w)&&v.charAt(C)==="/",O=S!=null&&(S===w||!i&&S.startsWith(w)&&S.charAt(w.length)==="/"),y={isActive:k,isPending:O,isTransitioning:x},M=k?e:void 0,A;typeof r=="function"?A=r(y):A=[r,k?"active":null,O?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(y):s;return g.createElement(Hm,{...c,"aria-current":M,className:A,ref:d,style:R,to:o,viewTransition:a},typeof l=="function"?l(y):l)});dv.displayName="NavLink";var uv=g.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Ho,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:b}=g.useContext(kt),x=xv(),w=yv(a,{relative:c}),v=o.toLowerCase()==="get"?"get":"post",S=typeof a=="string"&&_m.test(a),C=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let O=k.nativeEvent.submitter,y=O?.getAttribute("formmethod")||o,M=()=>x(O||k.currentTarget,{fetcherKey:e,method:y,navigate:n,replace:i,state:s,relative:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f});b&&n!==!1?g.startTransition(()=>M()):M()};return g.createElement("form",{ref:m,method:v,action:w,onSubmit:r?l:C,...p,"data-discover":!S&&t==="render"?"true":void 0})});uv.displayName="Form";function fv(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wm(t){let e=g.useContext(dr);return de(e,fv(t)),e}function pv(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=an(),d=_t(),u=zs(t,{relative:s});return g.useCallback(f=>{if(_1(f,e)){f.preventDefault();let p=n!==void 0?n:on(d)===on(u),m=()=>c(t,{replace:p,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?g.startTransition(()=>m()):m()}},[d,c,u,n,r,e,t,i,s,o,a,l])}function mv(t){Ee(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=g.useRef(pc(t)),n=g.useRef(!1),r=_t(),i=g.useMemo(()=>H1(r.search,n.current?null:e.current),[r.search]),s=an(),o=g.useCallback((a,l)=>{const c=pc(typeof a=="function"?a(new URLSearchParams(i)):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}var gv=0,bv=()=>`__${String(++gv)}__`;function xv(){let{router:t}=Wm("useSubmit"),{basename:e}=g.useContext(kt),n=C1(),r=t.fetch,i=t.navigate;return g.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:d,body:u}=K1(s,e);if(o.navigate===!1){let f=o.fetcherKey||bv();await r(f,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:u,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:u,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function yv(t,{relative:e}={}){let{basename:n}=g.useContext(kt),r=g.useContext(It);de(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...zs(t||".",{relative:e})},o=_t();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(u=>u).forEach(u=>a.append("index",u));let d=a.toString();s.search=d?`?${d}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:rn([n,s.pathname])),on(s)}function vv(t,{relative:e}={}){let n=g.useContext(gh);de(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Wm("useViewTransitionState"),i=zs(t,{relative:e});if(!n.isTransitioning)return!1;let s=Rt(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Rt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ta(i.pathname,o)!=null||ta(i.pathname,s)!=null}function wv(t){return g.createElement(E1,{flushSync:cm.flushSync,...t})}const kv={en:{loading:"Loading...",error:"Error",selectProject:"Select a project to view dashboard",controlCenter:"Control Center",settings:"Settings",sync:"Sync",offline:"Offline",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode",settingsSection:"Settings",configEditor:"Config Editor",projects:"Projects",addProject:"Add Project",global:"Global",skills:"Skills",health:"Health",collapse:"Collapse",expand:"Expand",installing:"Installing...",manage:"Manage",uninstall:"Uninstall",installGlobally:"Install Globally",installGloballyDesc:"Available to all projects instead of current project only",selectAtLeastOneAgent:"Please select at least one agent",installationFailed:"Installation failed",allSkills:"All Skills",refresh:"Refresh",browseAndManageSkills:"Browse and manage skills for your agents",detected:"Detected",notDetected:"Not detected",sessions:"sessions",noSessions:"No sessions",terminal:"Terminal",terminalSub:"Open bash at path",editor:"Editor",editorSub:"Open in VS Code",useGlobalFallback:"Use global fallback",openAtPath:"Open at project path",openAppOnly:"Open app only",actionOptionsLoadFailed:"Could not load editor/terminal options",launch:"Launch",launchSub:"Start Claude Code",config:"Config",configSub:"Manage project settings",recentSessions:"Recent Sessions",viewAllHistory:"View All History",showLess:"Show Less",actionFailed:"Action failed",loadingSessions:"Loading sessions...",noSessionsFound:"No sessions found",configuration:"Claude Settings",activeKit:"Active Kit",aiModel:"Model",hooks:"Hooks",active:"active",mcpServers:"MCP Servers",connected:"connected",editProjectConfig:"Edit Project Config",globalSettings:"(Global)",globalSkills:"Global Skills",loadingSkills:"Loading skills...",noDescription:"No description",browseSkillsMarketplace:"Browse Skills Marketplace",backToDashboard:"Back to Dashboard",educationalConfigEditor:"Educational Config Editor",discard:"Discard",saveChanges:"Save Changes",mergedView:"Merged View",localConfig:"Local (.ck.json)",globalConfig:"Global",syntaxValid:"Syntax Valid",configurationHelp:"Configuration Help",field:"Field",type:"Type",default:"Default",description:"Description",validValues:"Valid Values",systemEffect:"System Effect",exampleUsage:"Example Usage",knowledgeBase:"Knowledge Base",clickToSeeHelp:"Click on any configuration field to see detailed documentation and usage examples.",extractedFrom:"Extracted from ClaudeKit v2.x Specification",resetToDefault:"Reset",saving:"Saving...",saved:"Saved",confirmReset:"Reset to Default?",confirmResetMessage:"All changes will be lost and replaced with default values.",confirm:"Confirm",saveFailed:"Save failed",configTab:"Config",systemTab:"System",formTab:"Form",jsonTab:"JSON",readOnly:"Read-only",installedKit:"Installed Kit",kitVersion:"Kit Version",installedOn:"Installed On",noKitInstalled:"No kit installed",components:"Components",agents:"Agents",commands:"Commands",workflows:"Workflows",kitSkills:"Skills",fileOwnership:"File Ownership",ownershipCk:"kit-managed",ownershipUser:"user-owned",ownershipModified:"modified",componentInventory:"Component Inventory",installedHooks:"Installed Hooks",installedMcpServers:"MCP Servers",lastChecked:"Last update check",staleIndicator:"Stale",skippedVersion:"Skipped",filesModifiedFromDefaults:"files modified from kit defaults",cliCard:"ClaudeKit CLI",checkForUpdates:"Check for Updates",checking:"Checking...",upToDate:"Up to date",updateAvailable:"Update available",updateNow:"Update Now",updating:"Updating...",updateSuccess:"Update Complete!",updateFailed:"Update Failed",closeModal:"Close",showDetails:"Show Details",hideDetails:"Hide Details",environment:"Environment",claudeConfigPath:"Claude config",nodeVersion:"Node",bunVersion:"Bun",osVersion:"OS",channelStable:"Stable",channelBeta:"Beta",betaBadge:"Beta",latestVersion:"Latest",selectVersion:"Select version",loadingVersions:"Loading versions...",prereleaseLabel:"Pre",currentVersionLabel:"Current",checkAll:"Check All",checkingAll:"Checking...",updateAll:"Update All",updatesAvailable:"{count} updates available",allUpToDate:"All up to date",systemControlTower:"System Control Tower",systemOverviewTitle:"Update & Runtime Overview",systemOverviewDesc:"Track CLI and kit health, then run upgrades from one place.",installedComponentsHeading:"Installed Components",updateReadiness:"Update Readiness",checkedComponents:"Checked",activeChannel:"Channel",readyToScan:"Ready to scan",noTrackedFiles:"No tracked files detected",kitsLabel:"Kits",componentFilterAll:"All",componentFilterUpdates:"Updates",componentFilterUpdatesCount:"Updates ({count})",componentFilterUpToDate:"Up to date",componentFilterUpToDateCount:"Up to date ({count})",componentFilterCli:"CLI",componentFilterKits:"Kits",noComponentsMatchFilter:"No components match the current filter.",runCheckAllForFilter:"Run Check All to populate this filter.",noUpdatesFound:"No updates found. Checked components are up to date.",noUpToDateYet:"No components are up to date yet.",configWorkspaceHint:"Edit configuration or manage system updates from one workspace.",settingsJsonHeading:"Claude Settings JSON",settingsJsonMissing:"No settings file found at ~/.claude/settings.json.",settingsJsonLoadFailed:"Failed to load ~/.claude/settings.json.",settingsBackupSaved:"Backup saved",hookDiagnosticsTitle:"Hook Diagnostics",hookDiagnosticsDesc:"Inspect recent hook activity and failures without opening JSONL files manually.",hookDiagnosticsPathPending:"Resolving log path...",hookDiagnosticsScopeGlobal:"Global hooks",hookDiagnosticsEntries:"Entries",hookDiagnosticsCrashes:"Crashes",hookDiagnosticsWarnings:"Warnings",hookDiagnosticsBlocks:"Blocks",hookDiagnosticsLastEvent:"Last event",hookDiagnosticsLoading:"Loading hook diagnostics...",hookDiagnosticsLoadFailed:"Failed to load hook diagnostics",hookDiagnosticsMissing:"No hook log file found for this scope yet.",hookDiagnosticsEmpty:"Hook log is present but contains no readable entries.",hookDiagnosticsParseErrorsNotice:"Skipped {count} malformed log line(s) while loading diagnostics.",hookDiagnosticsTruncatedNotice:"Showing a bounded recent window to keep diagnostics responsive on large logs.",hookDiagnosticsToolLabel:"tool",hookDiagnosticsTargetLabel:"target",hookDiagnosticsUnknown:"Unknown",addProjectTitle:"Add Project",addProjectDescription:"Add a new ClaudeKit project to the control center",projectPath:"Project Path",pathPlaceholder:"/path/to/project",alias:"Alias",aliasOptional:"(optional)",aliasPlaceholder:"my-project",aliasDescription:"Custom display name for the project",pathRequired:"Path is required",failedToAdd:"Failed to add project",cancel:"Cancel",adding:"Adding...",somethingWentWrong:"Something went wrong",reloadApp:"Reload App",serverNotRunning:"Server Not Running",startServerMessage:"The Config UI requires the backend server to be running.",runThisCommand:"Run this command",tryAgain:"Try Again",projectConfig:"Project Config",inheritedFromGlobal:"Inherited from Global",localOverride:"Local Override",viewGlobalConfig:"This field inherits from global config. View",onboardingTitle:"Welcome to ClaudeKit",onboardingSubtitle:"Choose your kit and get started in minutes",kitEngineerName:"ClaudeKit Engineer",kitEngineerTagline:"AI-powered coding with skills, hooks, and multi-agent workflows",kitMarketingName:"ClaudeKit Marketing",kitMarketingTagline:"Content automation: campaigns, social media, analytics",featureAgents:"AI Agents",featureAgentsDesc:"Specialized agents for different tasks",featureHooks:"Lifecycle Hooks",featureHooksDesc:"Customize Claude's behavior at key moments",featureSkills:"Skills Library",featureSkillsDesc:"Pre-built capabilities you can activate",featureMultiAgent:"Multi-Agent Workflows",featureMultiAgentDesc:"Coordinate multiple agents for complex tasks",featureContent:"Content Generation",featureContentDesc:"Automated content creation and optimization",featureSocial:"Social Media Tools",featureSocialDesc:"Scheduling, analytics, and engagement automation",stepChooseKit:"Choose Kit",stepConfigure:"Configure",stepInstall:"Install",back:"Back",next:"Next",install:"Install",installSuccess:"Installation Complete!",installSuccessDesc:"{kit} is ready to use",getStarted:"Get Started",goToDashboard:"Go to Dashboard",kitConfig:"Kit Config",kitConfigSubtitle:"Configure ClaudeKit Engineer settings",scopeGlobal:"Global",scopeProject:"Project",sectionGeneral:"General",sectionPaths:"Paths",sectionPrivacy:"Privacy & Trust",sectionProject:"Project Detection",sectionIntegrations:"Integrations",sectionHooks:"Hooks",sectionAdvanced:"Advanced",fieldCodingLevel:"Coding Level",fieldCodingLevelDesc:"Your coding experience level (-1=auto, 0=beginner, 1=intermediate, 2=advanced, 3=expert, 4=tech-lead, 5=god-mode)",fieldStatusline:"Statusline Mode",fieldStatuslineDesc:"How much info to show in the status line",fieldStatuslineColors:"Statusline Colors",fieldStatuslineColorsDesc:"Enable ANSI color output in the statusline",fieldThinkingLanguage:"Thinking Language",fieldThinkingLanguageDesc:"Language for Claude's internal reasoning (null=English)",fieldResponseLanguage:"Response Language",fieldResponseLanguageDesc:"Language for Claude's responses (null=match user)",fieldDocsPath:"Docs Directory",fieldDocsPathDesc:"Path to documentation directory",fieldPlansPath:"Plans Directory",fieldPlansPathDesc:"Path to plans directory",fieldPrivacyBlock:"Privacy Block",fieldPrivacyBlockDesc:"Block access to sensitive files (.env, credentials)",fieldTrustEnabled:"Trust Mode",fieldTrustEnabledDesc:"Enable auto-approval for tool calls",fieldTrustPassphrase:"Trust Passphrase",fieldTrustPassphraseDesc:"Passphrase to enable trust mode",fieldProjectType:"Project Type",fieldProjectTypeDesc:"Override auto-detected project type",fieldPackageManager:"Package Manager",fieldPackageManagerDesc:"Override auto-detected package manager",fieldFramework:"Framework",fieldFrameworkDesc:"Override auto-detected framework",fieldGeminiModel:"Gemini Model",fieldGeminiModelDesc:"Gemini model for CLI commands",fieldResearchUseGemini:"Use Gemini for Research",fieldResearchUseGeminiDesc:"Use Gemini CLI instead of WebSearch",fieldDocsMaxLoc:"Max Lines per Doc",fieldDocsMaxLocDesc:"Maximum lines of code per documentation file",fieldPlanNamingFormat:"Plan Naming Format",fieldPlanNamingFormatDesc:"Format for plan directory names",fieldPlanDateFormat:"Plan Date Format",fieldPlanDateFormatDesc:"Date format for plan names (moment.js)",fieldPlanValidationMode:"Validation Mode",fieldPlanValidationModeDesc:"How to validate plans before implementation",fieldPlanMinQuestions:"Min Questions",fieldPlanMinQuestionsDesc:"Minimum validation questions",fieldPlanMaxQuestions:"Max Questions",fieldPlanMaxQuestionsDesc:"Maximum validation questions",fieldAssertions:"Assertions",fieldAssertionsDesc:"Code assertions and rules to enforce",fieldHookSessionInit:"Session Init",fieldHookSessionInitDesc:"Project detection and environment setup",fieldHookSubagentInit:"Subagent Init",fieldHookSubagentInitDesc:"Inject context to subagents",fieldHookDescriptiveName:"Descriptive Name",fieldHookDescriptiveNameDesc:"Enforce kebab-case descriptive file naming for scripts",fieldHookDevRulesReminder:"Dev Rules Reminder",fieldHookDevRulesReminderDesc:"Inject development rules context",fieldHookUsageContextAwareness:"Usage Context Awareness",fieldHookUsageContextAwarenessDesc:"Usage limits awareness",fieldHookContextTracking:"Context Tracking",fieldHookContextTrackingDesc:"Context window tracking (% used, token counts)",fieldHookScoutBlock:"Scout Block",fieldHookScoutBlockDesc:"Block heavy directories from exploration",fieldHookPrivacyBlock:"Privacy Block Hook",fieldHookPrivacyBlockDesc:"Block sensitive files from reading",fieldHookPostEditSimplify:"Post-Edit Simplify",fieldHookPostEditSimplifyDesc:"Simplify reminder after edits",sectionUpdatePipeline:"Update Pipeline",fieldAutoInitAfterUpdate:"Auto Init After Update",fieldAutoInitAfterUpdateDesc:"Automatically run ck init after ck update when kit has new version",fieldAutoMigrateAfterInit:"Auto Migrate After Init",fieldAutoMigrateAfterInitDesc:"Automatically run ck migrate after ck init for detected providers",fieldMigrateProviders:"Migrate Providers",fieldMigrateProvidersDesc:"Which providers to auto-migrate. Use 'auto' to scan filesystem or a comma-separated list.",skillsPageTitle:"Skills Management",skillsPageDesc:"Install ClaudeKit skills to your coding agents",availableSkills:"Available Skills",installedSkills:"Installed Skills",noSkillsFound:"No skills found",installSkill:"Install",uninstallSkill:"Uninstall",manageSkill:"Manage",syncRegistry:"Sync",installSkillTitle:"Install Skill",selectAgents:"Select target agents",installLocation:"Installation location",globalInstall:"Global",projectInstall:"Project",confirmInstall:"Install to selected agents",installingSkill:"Installing...",skillInstallSuccess:"Skill installed successfully",skillInstallFailed:"Installation failed",agentClaudeCode:"Claude Code",agentCursor:"Cursor",agentCodex:"Codex",agentOpencode:"OpenCode",agentGoose:"Goose",agentGeminiCli:"Gemini CLI",agentAntigravity:"Antigravity",agentGithubCopilot:"GitHub Copilot",agentAmp:"Amp",agentKilo:"Kilo",agentRoo:"Roo",agentWindsurf:"Windsurf",agentCline:"Cline",agentOpenhands:"OpenHands",installed:"Installed",notInstalled:"Not installed",allAgents:"All Agents",filterByAgent:"Filter by agent",skillsTitle:"Skills",skillsSubtitle:"Browse, install, and manage skills for your coding agents",availableCount:"Available",installedCount:"Installed",agentsCount:"Agents",searchSkills:"Search skills...",searchShortcut:"/",sortAZ:"A-Z",sortCategory:"Category",sortInstalledFirst:"Installed first",listView:"List view",gridView:"Grid view",categoryAll:"All",categoryAI:"AI",categoryUIUX:"UI/UX",categoryBackend:"Backend",categorySecurity:"Security",categoryDevOps:"DevOps",categoryDatabase:"Database",categoryDevelopment:"Development",categoryResearch:"Research",categoryGeneral:"General",categoryCore:"Core",categoryDocumentation:"Documentation",categoryTooling:"Tooling",categoryMedia:"Media",categoryFrameworks:"Frameworks",skillsCountLabel:"{count} skills",installToAll:"Install to All Detected",scopeLabel:"Installation Scope",agentInstalled:"Installed",agentNotInstalled:"Not installed",skillSource:"Source location",skillSourceBadge:"Source",detailPanelClose:"Close",versionLabel:"v{version}",installAllToAllAgents:"Install All to All Agents",bulkInstallFailed:"Bulk install failed",noAgentsDetected:"No agents detected",kitBadgeEngineer:"Engineer",kitBadgeMarketing:"Marketing",customizedBadge:"Customized",installedVersionLabel:"Installed Version",installedAtLabel:"Installed At",sourceTimestampLabel:"Source Date",kitLabel:"Kit",skillMetadata:"Skill Info",migrate:"Migrate",migrateTitle:"Migrate",migrateSubtitle:"Migrate your Claude Code stack to other providers",migrateDetectedProviders:"Detected",migrateSelectedProviders:"Selected",migrateDiscovering:"Discovering migration sources...",migrateRefresh:"Refresh Discovery",migrateRun:"Run Migration",migrateRunning:"Migrating...",migrateSourceSummary:"Source Summary",migratePresetCodex:"Codex",migratePresetAntigravity:"Antigravity",migratePresetCore:"Codex + Antigravity + Droid",migratePresetDetected:"All Detected",migrateScope:"Scope",migrateScopeProject:"Project",migrateScopeGlobal:"Global",migrateTypes:"Portable Types",migrateTypeAgents:"Subagents",migrateTypeCommands:"Commands",migrateTypeSkills:"Skills",migrateTypeConfig:"Config",migrateTypeRules:"Rules",migrateTypeHooks:"Hooks",migrateSearchProviders:"Search providers...",migrateSelectVisible:"Select Visible",migrateClearSelection:"Clear Selection",migrateProvidersHeading:"Target Providers",migrateProvidersCountSuffix:"providers",migrateNoProvidersMatch:"No providers match current filters.",migrateSelectButton:"Select",migrateSelectedButton:"Selected",migrateSelectProviderAction:"Select Provider",migrateUnselectProvider:"Unselect Provider",migrateCapabilitiesLabel:"types",migrateCapabilitiesSection:"Capability Matrix",migrateSupported:"Supported",migrateUnsupportedShort:"Unsupported",migrateIncludedEnabled:"Enabled",migrateIncludedDisabled:"Disabled",migrateLatestTarget:"Latest Target",migrateNoResultForProvider:"No migration result for this provider yet.",migrateActionSummaryTitle:"Ready to Migrate",migrateGlobalOnlyCommandsShort:"Commands global-only",migrateNoProviders:"No providers available.",migrateUnsupported:"Will be skipped (unsupported)",migrateGlobalForced:"Codex commands are global-only. Scope will be forced to global.",migrateResults:"Migration Results",migrateInstalled:"Installed",migrateSkipped:"Skipped",migrateFailed:"Failed",migrateProvider:"Provider",migrateStatus:"Status",migratePath:"Path",migrateError:"Error",migrateStatusInstalled:"Installed",migrateStatusSkipped:"Skipped",migrateStatusFailed:"Failed",migrateNoResults:"No migration results yet.",migrateDetectFailed:"Failed to discover migration data",migrateExecuteFailed:"Migration execution failed",migrateSelectProvider:"Select at least one provider",migrateNoTypesEnabled:"Enable at least one portable type",migrateDetectedTag:"Detected",migrateNotDetectedTag:"Not detected",migrateFilterRecommended:"Recommended",migrateActionInstall:"Install",migrateActionUpdate:"Update",migrateActionSkip:"Skip",migrateActionConflict:"Conflict",migrateActionDelete:"Delete",migrateUnchanged:"unchanged",migrateConflictSectionTitle:"Conflicts",migrateConflictUseCK:"Use CK",migrateConflictKeepMine:"Keep Mine",migrateConflictSmartMerge:"Smart Merge",migrateConflictShowDiff:"Show Diff",migrateConflictHideDiff:"Hide Diff",migrateConflictResolved:"Resolved",migrateConflictManual:"Manual",migrateConflictOverwriteAll:"Overwrite All",migrateConflictKeepAll:"Keep All",migrateSummaryTitle:"Migration Complete",migrateSummaryNewMigration:"New Migration",migrateType:"Type",migrateItem:"Item",migrateReconciling:"Analyzing changes...",migrateReviewPlan:"Review Plan",migrateExecutePlan:"Execute Migration",migrateExecuting:"Executing migration...",migrateResolveConflicts:"Resolve all conflicts before executing",migrateSummarySubtitle:"items migrated",migrateSummarySearchPlaceholder:"Search items...",migrateSummaryFilterAll:"All",migrateSummaryCollapseAll:"Collapse all",migrateSummaryExpandAll:"Expand all",migrateSummaryNoResults:"No items match your search",migrateSummaryProviders:"Providers",migrateTypeUnknown:"Other",kanbanTitle:"Plan Kanban",kanbanNoFile:"No plan file specified. Use ?file= parameter.",kanbanNoPhases:"No phases detected in this plan",kanbanError400:"Invalid request — missing file parameter",kanbanError403:"Access denied — file is outside the project directory",kanbanError404:"Plan file not found",kanbanComplete:"complete",kanbanStatus_pending:"Pending","kanbanStatus_in-progress":"In Progress",kanbanStatus_completed:"Completed",kanbanPhases:"phases",kanbanProgress:"Progress",kanbanLoadError:"Failed to load plan data",developmentFeature:"Development",betaFeature:"Beta",experimentalFeature:"Experimental",sectionModelTaxonomy:"Model Taxonomy",taxonomyDescription:"Customize model mappings for portable migration to other coding agents.",taxonomyTierHeavy:"Heavy (opus)",taxonomyTierBalanced:"Balanced (sonnet)",taxonomyTierLight:"Light (haiku)",taxonomyModel:"Model",taxonomyEffort:"Effort",taxonomyResetProvider:"Reset",taxonomyTier:"Tier"},vi:{loading:"Đang tải...",error:"Lỗi",selectProject:"Chọn dự án để xem bảng điều khiển",controlCenter:"Trung tâm điều khiển",settings:"Cài đặt",sync:"Đồng bộ",offline:"Ngoại tuyến",switchToLight:"Chuyển sang chế độ sáng",switchToDark:"Chuyển sang chế độ tối",settingsSection:"Cài đặt",configEditor:"Trình chỉnh sửa cấu hình",projects:"Dự án",addProject:"Thêm dự án",global:"Toàn cục",skills:"Kỹ năng",health:"Sức khỏe",collapse:"Thu gọn",expand:"Mở rộng",installing:"Đang cài đặt...",manage:"Quản lý",uninstall:"Gỡ cài đặt",installGlobally:"Cài đặt toàn cục",installGloballyDesc:"Khả dụng cho tất cả dự án thay vì chỉ dự án hiện tại",selectAtLeastOneAgent:"Vui lòng chọn ít nhất một agent",installationFailed:"Cài đặt thất bại",allSkills:"Tất cả kỹ năng",refresh:"Làm mới",browseAndManageSkills:"Duyệt và quản lý kỹ năng cho agents của bạn",detected:"Đã phát hiện",notDetected:"Chưa phát hiện",sessions:"phiên",noSessions:"Không có phiên",terminal:"Terminal",terminalSub:"Mở bash tại đường dẫn",editor:"Trình soạn thảo",editorSub:"Mở trong VS Code",useGlobalFallback:"Dùng fallback global",openAtPath:"Mở tại đường dẫn dự án",openAppOnly:"Chỉ mở ứng dụng",actionOptionsLoadFailed:"Không thể tải tùy chọn editor/terminal",launch:"Khởi chạy",launchSub:"Bắt đầu Claude Code",config:"Cấu hình",configSub:"Quản lý cài đặt dự án",recentSessions:"Phiên gần đây",viewAllHistory:"Xem tất cả lịch sử",showLess:"Thu gọn",actionFailed:"Thao tác thất bại",loadingSessions:"Đang tải phiên...",noSessionsFound:"Không tìm thấy phiên nào",configuration:"Cài đặt Claude",activeKit:"Kit hoạt động",aiModel:"Mô hình",hooks:"Hooks",active:"hoạt động",mcpServers:"Máy chủ MCP",connected:"kết nối",editProjectConfig:"Chỉnh sửa cấu hình dự án",globalSettings:"(Toàn cục)",globalSkills:"Kỹ năng toàn cục",loadingSkills:"Đang tải kỹ năng...",noDescription:"Không có mô tả",browseSkillsMarketplace:"Duyệt Skills Marketplace",backToDashboard:"Quay lại bảng điều khiển",educationalConfigEditor:"Trình chỉnh sửa cấu hình hướng dẫn",discard:"Hủy bỏ",saveChanges:"Lưu thay đổi",mergedView:"Chế độ gộp",localConfig:"Cục bộ (.ck.json)",globalConfig:"Toàn cục",syntaxValid:"Cú pháp hợp lệ",configurationHelp:"Hướng dẫn cấu hình",field:"Trường",type:"Kiểu",default:"Mặc định",description:"Mô tả",validValues:"Giá trị hợp lệ",systemEffect:"Hiệu ứng hệ thống",exampleUsage:"Ví dụ sử dụng",knowledgeBase:"Cơ sở kiến thức",clickToSeeHelp:"Nhấp vào bất kỳ trường cấu hình nào để xem tài liệu chi tiết và ví dụ sử dụng.",extractedFrom:"Trích xuất từ ClaudeKit v2.x Specification",resetToDefault:"Đặt lại",saving:"Đang lưu...",saved:"Đã lưu",confirmReset:"Đặt lại về mặc định?",confirmResetMessage:"Tất cả thay đổi sẽ bị mất và được thay thế bằng giá trị mặc định.",confirm:"Xác nhận",saveFailed:"Lưu thất bại",configTab:"Cấu hình",systemTab:"Hệ thống",formTab:"Biểu mẫu",jsonTab:"JSON",readOnly:"Chỉ đọc",installedKit:"Kit đã cài",kitVersion:"Phiên bản Kit",installedOn:"Cài đặt vào",noKitInstalled:"Chưa cài kit",components:"Thành phần",agents:"Agents",commands:"Commands",workflows:"Workflows",kitSkills:"Skills",fileOwnership:"Quyền sở hữu tệp",ownershipCk:"do kit quản lý",ownershipUser:"do người dùng",ownershipModified:"đã chỉnh sửa",componentInventory:"Thành phần đã cài",installedHooks:"Hooks đã cài",installedMcpServers:"MCP Servers",lastChecked:"Kiểm tra cập nhật",staleIndicator:"Cũ",skippedVersion:"Đã bỏ qua",filesModifiedFromDefaults:"tệp đã sửa so với mặc định",cliCard:"ClaudeKit CLI",checkForUpdates:"Kiểm tra cập nhật",checking:"Đang kiểm tra...",upToDate:"Đã cập nhật",updateAvailable:"Có bản cập nhật",updateNow:"Cập nhật ngay",updating:"Đang cập nhật...",updateSuccess:"Cập nhật hoàn tất!",updateFailed:"Cập nhật thất bại",closeModal:"Đóng",showDetails:"Xem chi tiết",hideDetails:"Ẩn chi tiết",environment:"Môi trường",claudeConfigPath:"Cấu hình Claude",nodeVersion:"Node",bunVersion:"Bun",osVersion:"Hệ điều hành",channelStable:"Ổn định",channelBeta:"Beta",betaBadge:"Beta",latestVersion:"Mới nhất",selectVersion:"Chọn phiên bản",loadingVersions:"Đang tải...",prereleaseLabel:"Thử nghiệm",currentVersionLabel:"Hiện tại",checkAll:"Kiểm tra tất cả",checkingAll:"Đang kiểm tra...",updateAll:"Cập nhật tất cả",updatesAvailable:"{count} bản cập nhật",allUpToDate:"Tất cả đã cập nhật",systemControlTower:"Trung tâm hệ thống",systemOverviewTitle:"Tổng quan cập nhật & môi trường",systemOverviewDesc:"Theo dõi CLI và kit, rồi nâng cấp từ một nơi.",installedComponentsHeading:"Thành phần đã cài",updateReadiness:"Mức sẵn sàng cập nhật",checkedComponents:"Đã kiểm tra",activeChannel:"Kênh",readyToScan:"Sẵn sàng kiểm tra",noTrackedFiles:"Không phát hiện tệp theo dõi",kitsLabel:"Kit",componentFilterAll:"Tất cả",componentFilterUpdates:"Bản cập nhật",componentFilterUpdatesCount:"Bản cập nhật ({count})",componentFilterUpToDate:"Đã cập nhật",componentFilterUpToDateCount:"Đã cập nhật ({count})",componentFilterCli:"CLI",componentFilterKits:"Kit",noComponentsMatchFilter:"Không có thành phần phù hợp bộ lọc hiện tại.",runCheckAllForFilter:"Hãy chạy Kiểm tra tất cả để nạp dữ liệu cho bộ lọc này.",noUpdatesFound:"Không có bản cập nhật. Các thành phần đã kiểm tra đều mới nhất.",noUpToDateYet:"Chưa có thành phần nào ở trạng thái đã cập nhật.",configWorkspaceHint:"Chỉnh sửa cấu hình hoặc quản lý cập nhật hệ thống trong một màn hình.",settingsJsonHeading:"JSON Cài đặt Claude",settingsJsonMissing:"Không tìm thấy tệp ~/.claude/settings.json.",settingsJsonLoadFailed:"Không thể tải ~/.claude/settings.json.",settingsBackupSaved:"Đã lưu bản sao lưu",hookDiagnosticsTitle:"Chẩn đoán Hook",hookDiagnosticsDesc:"Xem hoạt động hook gần đây và lỗi mà không cần mở tệp JSONL thủ công.",hookDiagnosticsPathPending:"Đang xác định đường dẫn log...",hookDiagnosticsScopeGlobal:"Hook toàn cục",hookDiagnosticsEntries:"Bản ghi",hookDiagnosticsCrashes:"Sự cố",hookDiagnosticsWarnings:"Cảnh báo",hookDiagnosticsBlocks:"Chặn",hookDiagnosticsLastEvent:"Sự kiện cuối",hookDiagnosticsLoading:"Đang tải chẩn đoán hook...",hookDiagnosticsLoadFailed:"Không thể tải chẩn đoán hook",hookDiagnosticsMissing:"Chưa tìm thấy tệp log hook cho phạm vi này.",hookDiagnosticsEmpty:"Tệp log hook có tồn tại nhưng không có bản ghi đọc được.",hookDiagnosticsParseErrorsNotice:"Đã bỏ qua {count} dòng log bị lỗi khi tải chẩn đoán.",hookDiagnosticsTruncatedNotice:"Đang hiển thị cửa sổ bản ghi gần đây để giữ giao diện phản hồi tốt với log lớn.",hookDiagnosticsToolLabel:"công cụ",hookDiagnosticsTargetLabel:"mục tiêu",hookDiagnosticsUnknown:"Không rõ",addProjectTitle:"Thêm dự án",addProjectDescription:"Thêm dự án ClaudeKit mới vào trung tâm điều khiển",projectPath:"Đường dẫn dự án",pathPlaceholder:"/đường/dẫn/dự/án",alias:"Bí danh",aliasOptional:"(tùy chọn)",aliasPlaceholder:"dự-án-của-tôi",aliasDescription:"Tên hiển thị tùy chỉnh cho dự án",pathRequired:"Đường dẫn bắt buộc",failedToAdd:"Không thể thêm dự án",cancel:"Hủy",adding:"Đang thêm...",somethingWentWrong:"Đã xảy ra lỗi",reloadApp:"Tải lại ứng dụng",serverNotRunning:"Máy chủ không chạy",startServerMessage:"Config UI yêu cầu máy chủ backend đang chạy.",runThisCommand:"Chạy lệnh này",tryAgain:"Thử lại",projectConfig:"Cấu hình dự án",inheritedFromGlobal:"Kế thừa từ toàn cục",localOverride:"Ghi đè cục bộ",viewGlobalConfig:"Trường này kế thừa từ cấu hình toàn cục. Xem",onboardingTitle:"Chào mừng đến ClaudeKit",onboardingSubtitle:"Chọn kit của bạn và bắt đầu trong vài phút",kitEngineerName:"ClaudeKit Engineer",kitEngineerTagline:"Lập trình AI với skills, hooks và multi-agent",kitMarketingName:"ClaudeKit Marketing",kitMarketingTagline:"Tự động hóa nội dung: chiến dịch, mạng xã hội, phân tích",featureAgents:"AI Agents",featureAgentsDesc:"Các agent chuyên biệt cho từng tác vụ",featureHooks:"Lifecycle Hooks",featureHooksDesc:"Tùy chỉnh hành vi của Claude tại các thời điểm quan trọng",featureSkills:"Thư viện Skills",featureSkillsDesc:"Các khả năng có sẵn bạn có thể kích hoạt",featureMultiAgent:"Multi-Agent Workflows",featureMultiAgentDesc:"Phối hợp nhiều agent cho các tác vụ phức tạp",featureContent:"Tạo nội dung",featureContentDesc:"Tự động tạo và tối ưu nội dung",featureSocial:"Công cụ mạng xã hội",featureSocialDesc:"Lên lịch, phân tích và tự động tương tác",stepChooseKit:"Chọn Kit",stepConfigure:"Cấu hình",stepInstall:"Cài đặt",back:"Quay lại",next:"Tiếp theo",install:"Cài đặt",installSuccess:"Cài đặt hoàn tất!",installSuccessDesc:"{kit} đã sẵn sàng sử dụng",getStarted:"Bắt đầu",goToDashboard:"Đi đến Dashboard",kitConfig:"Cấu hình Kit",kitConfigSubtitle:"Cấu hình ClaudeKit Engineer",scopeGlobal:"Toàn cục",scopeProject:"Dự án",sectionGeneral:"Cài đặt chung",sectionPaths:"Đường dẫn",sectionPrivacy:"Bảo mật & Tin cậy",sectionProject:"Phát hiện dự án",sectionIntegrations:"Tích hợp",sectionHooks:"Hooks",sectionAdvanced:"Nâng cao",fieldCodingLevel:"Cấp độ lập trình",fieldCodingLevelDesc:"Cấp độ kinh nghiệm (-1=tự động, 0=mới bắt đầu, 1=trung cấp, 2=nâng cao, 3=chuyên gia, 4=tech-lead, 5=thần)",fieldStatusline:"Chế độ thanh trạng thái",fieldStatuslineDesc:"Lượng thông tin hiển thị trên thanh trạng thái",fieldStatuslineColors:"Màu thanh trạng thái",fieldStatuslineColorsDesc:"Bật màu ANSI trong thanh trạng thái",fieldThinkingLanguage:"Ngôn ngữ suy nghĩ",fieldThinkingLanguageDesc:"Ngôn ngữ cho suy luận nội bộ của Claude (null=Tiếng Anh)",fieldResponseLanguage:"Ngôn ngữ phản hồi",fieldResponseLanguageDesc:"Ngôn ngữ cho phản hồi của Claude (null=theo người dùng)",fieldDocsPath:"Thư mục tài liệu",fieldDocsPathDesc:"Đường dẫn đến thư mục tài liệu",fieldPlansPath:"Thư mục kế hoạch",fieldPlansPathDesc:"Đường dẫn đến thư mục kế hoạch",fieldPrivacyBlock:"Chặn quyền riêng tư",fieldPrivacyBlockDesc:"Chặn truy cập file nhạy cảm (.env, credentials)",fieldTrustEnabled:"Chế độ tin cậy",fieldTrustEnabledDesc:"Tự động phê duyệt các tool calls",fieldTrustPassphrase:"Mật khẩu tin cậy",fieldTrustPassphraseDesc:"Mật khẩu để bật chế độ tin cậy",fieldProjectType:"Loại dự án",fieldProjectTypeDesc:"Ghi đè loại dự án tự động phát hiện",fieldPackageManager:"Trình quản lý gói",fieldPackageManagerDesc:"Ghi đè trình quản lý gói tự động phát hiện",fieldFramework:"Framework",fieldFrameworkDesc:"Ghi đè framework tự động phát hiện",fieldGeminiModel:"Mô hình Gemini",fieldGeminiModelDesc:"Mô hình Gemini cho các lệnh CLI",fieldResearchUseGemini:"Dùng Gemini cho nghiên cứu",fieldResearchUseGeminiDesc:"Dùng Gemini CLI thay vì WebSearch",fieldDocsMaxLoc:"Số dòng tối đa/tài liệu",fieldDocsMaxLocDesc:"Số dòng code tối đa cho mỗi file tài liệu",fieldPlanNamingFormat:"Định dạng tên kế hoạch",fieldPlanNamingFormatDesc:"Định dạng cho tên thư mục kế hoạch",fieldPlanDateFormat:"Định dạng ngày kế hoạch",fieldPlanDateFormatDesc:"Định dạng ngày cho tên kế hoạch (moment.js)",fieldPlanValidationMode:"Chế độ xác thực",fieldPlanValidationModeDesc:"Cách xác thực kế hoạch trước khi triển khai",fieldPlanMinQuestions:"Số câu hỏi tối thiểu",fieldPlanMinQuestionsDesc:"Số câu hỏi xác thực tối thiểu",fieldPlanMaxQuestions:"Số câu hỏi tối đa",fieldPlanMaxQuestionsDesc:"Số câu hỏi xác thực tối đa",fieldAssertions:"Assertions",fieldAssertionsDesc:"Các assertions và quy tắc cần thực thi",fieldHookSessionInit:"Khởi tạo phiên",fieldHookSessionInitDesc:"Phát hiện dự án và thiết lập môi trường",fieldHookSubagentInit:"Khởi tạo subagent",fieldHookSubagentInitDesc:"Inject context vào subagents",fieldHookDescriptiveName:"Tên mô tả",fieldHookDescriptiveNameDesc:"Bắt buộc đặt tên file dạng kebab-case mô tả cho scripts",fieldHookDevRulesReminder:"Nhắc nhở quy tắc dev",fieldHookDevRulesReminderDesc:"Inject context quy tắc phát triển",fieldHookUsageContextAwareness:"Nhận thức ngữ cảnh sử dụng",fieldHookUsageContextAwarenessDesc:"Nhận thức giới hạn sử dụng",fieldHookContextTracking:"Theo dõi ngữ cảnh",fieldHookContextTrackingDesc:"Theo dõi cửa sổ ngữ cảnh (% đã dùng, số token)",fieldHookScoutBlock:"Chặn Scout",fieldHookScoutBlockDesc:"Chặn thư mục nặng khỏi việc khám phá",fieldHookPrivacyBlock:"Hook chặn quyền riêng tư",fieldHookPrivacyBlockDesc:"Chặn đọc file nhạy cảm",fieldHookPostEditSimplify:"Đơn giản sau chỉnh sửa",fieldHookPostEditSimplifyDesc:"Nhắc đơn giản sau khi chỉnh sửa",sectionUpdatePipeline:"Pipeline Cập nhật",fieldAutoInitAfterUpdate:"Tự động Init sau Update",fieldAutoInitAfterUpdateDesc:"Tự động chạy ck init sau ck update khi kit có phiên bản mới",fieldAutoMigrateAfterInit:"Tự động Migrate sau Init",fieldAutoMigrateAfterInitDesc:"Tự động chạy ck migrate sau ck init cho các provider đã cài",fieldMigrateProviders:"Provider Migrate",fieldMigrateProvidersDesc:"Provider nào tự động migrate. Dùng 'auto' để quét hệ thống hoặc danh sách phân cách bằng dấu phẩy.",skillsPageTitle:"Quản lý Kỹ năng",skillsPageDesc:"Cài đặt kỹ năng ClaudeKit cho các agent lập trình",availableSkills:"Kỹ năng có sẵn",installedSkills:"Kỹ năng đã cài",noSkillsFound:"Không tìm thấy kỹ năng",installSkill:"Cài đặt",uninstallSkill:"Gỡ cài đặt",manageSkill:"Quản lý",syncRegistry:"Đồng bộ",installSkillTitle:"Cài đặt Kỹ năng",selectAgents:"Chọn agent đích",installLocation:"Vị trí cài đặt",globalInstall:"Toàn cục",projectInstall:"Dự án",confirmInstall:"Cài đặt cho các agent đã chọn",installingSkill:"Đang cài đặt...",skillInstallSuccess:"Cài đặt kỹ năng thành công",skillInstallFailed:"Cài đặt thất bại",agentClaudeCode:"Claude Code",agentCursor:"Cursor",agentCodex:"Codex",agentOpencode:"OpenCode",agentGoose:"Goose",agentGeminiCli:"Gemini CLI",agentAntigravity:"Antigravity",agentGithubCopilot:"GitHub Copilot",agentAmp:"Amp",agentKilo:"Kilo",agentRoo:"Roo",agentWindsurf:"Windsurf",agentCline:"Cline",agentOpenhands:"OpenHands",installed:"Đã cài",notInstalled:"Chưa cài",allAgents:"Tất cả Agent",filterByAgent:"Lọc theo agent",skillsTitle:"Kỹ năng",skillsSubtitle:"Duyệt, cài đặt và quản lý kỹ năng cho coding agents",availableCount:"Có sẵn",installedCount:"Đã cài",agentsCount:"Agents",searchSkills:"Tìm kiếm kỹ năng...",searchShortcut:"/",sortAZ:"A-Z",sortCategory:"Danh mục",sortInstalledFirst:"Đã cài trước",listView:"Dạng danh sách",gridView:"Dạng lưới",categoryAll:"Tất cả",categoryAI:"AI",categoryUIUX:"UI/UX",categoryBackend:"Backend",categorySecurity:"Bảo mật",categoryDevOps:"DevOps",categoryDatabase:"Cơ sở dữ liệu",categoryDevelopment:"Phát triển",categoryResearch:"Nghiên cứu",categoryGeneral:"Tổng quát",categoryCore:"Cốt lõi",categoryDocumentation:"Tài liệu",categoryTooling:"Công cụ",categoryMedia:"Phương tiện",categoryFrameworks:"Framework",skillsCountLabel:"{count} kỹ năng",installToAll:"Cài cho tất cả đã phát hiện",scopeLabel:"Phạm vi cài đặt",agentInstalled:"Đã cài",agentNotInstalled:"Chưa cài",skillSource:"Vị trí nguồn",skillSourceBadge:"Nguồn",detailPanelClose:"Đóng",versionLabel:"v{version}",installAllToAllAgents:"Cài tất cả cho tất cả Agent",bulkInstallFailed:"Cài hàng loạt thất bại",noAgentsDetected:"Không phát hiện agent nào",kitBadgeEngineer:"Engineer",kitBadgeMarketing:"Marketing",customizedBadge:"Đã tùy chỉnh",installedVersionLabel:"Phiên bản cài đặt",installedAtLabel:"Cài đặt lúc",sourceTimestampLabel:"Ngày nguồn",kitLabel:"Kit",skillMetadata:"Thông tin Skill",migrate:"Di trú",migrateTitle:"Di trú",migrateSubtitle:"Chuyển toàn bộ stack Claude Code sang provider khác",migrateDetectedProviders:"Đã phát hiện",migrateSelectedProviders:"Đã chọn",migrateDiscovering:"Đang quét nguồn di trú...",migrateRefresh:"Làm mới quét",migrateRun:"Chạy di trú",migrateRunning:"Đang di trú...",migrateSourceSummary:"Tổng quan nguồn",migratePresetCodex:"Codex",migratePresetAntigravity:"Antigravity",migratePresetCore:"Codex + Antigravity + Droid",migratePresetDetected:"Tất cả đã phát hiện",migrateScope:"Phạm vi",migrateScopeProject:"Dự án",migrateScopeGlobal:"Toàn cục",migrateTypes:"Loại di trú",migrateTypeAgents:"Subagents",migrateTypeCommands:"Commands",migrateTypeSkills:"Skills",migrateTypeConfig:"Config",migrateTypeRules:"Rules",migrateTypeHooks:"Hooks",migrateSearchProviders:"Tìm provider...",migrateSelectVisible:"Chọn phần đang hiện",migrateClearSelection:"Bỏ chọn tất cả",migrateProvidersHeading:"Provider đích",migrateProvidersCountSuffix:"provider",migrateNoProvidersMatch:"Không có provider khớp bộ lọc hiện tại.",migrateSelectButton:"Chọn",migrateSelectedButton:"Đã chọn",migrateSelectProviderAction:"Chọn provider",migrateUnselectProvider:"Bỏ chọn provider",migrateCapabilitiesLabel:"loại",migrateCapabilitiesSection:"Ma trận khả năng",migrateSupported:"Hỗ trợ",migrateUnsupportedShort:"Không hỗ trợ",migrateIncludedEnabled:"Đang bật",migrateIncludedDisabled:"Đang tắt",migrateLatestTarget:"Đích gần nhất",migrateNoResultForProvider:"Chưa có kết quả di trú cho provider này.",migrateActionSummaryTitle:"Sẵn sàng di trú",migrateGlobalOnlyCommandsShort:"Commands chỉ global",migrateNoProviders:"Không có provider khả dụng.",migrateUnsupported:"Sẽ bỏ qua (không hỗ trợ)",migrateGlobalForced:"Lệnh Codex chỉ hỗ trợ global. Phạm vi sẽ tự chuyển global.",migrateResults:"Kết quả di trú",migrateInstalled:"Đã cài",migrateSkipped:"Đã bỏ qua",migrateFailed:"Lỗi",migrateProvider:"Provider",migrateStatus:"Trạng thái",migratePath:"Đường dẫn",migrateError:"Lỗi",migrateStatusInstalled:"Đã cài",migrateStatusSkipped:"Đã bỏ qua",migrateStatusFailed:"Lỗi",migrateNoResults:"Chưa có kết quả di trú.",migrateDetectFailed:"Không thể quét dữ liệu di trú",migrateExecuteFailed:"Chạy di trú thất bại",migrateSelectProvider:"Vui lòng chọn ít nhất một provider",migrateNoTypesEnabled:"Bật ít nhất một loại di trú",migrateDetectedTag:"Đã phát hiện",migrateNotDetectedTag:"Chưa phát hiện",migrateFilterRecommended:"Đề xuất",migrateActionInstall:"Cài",migrateActionUpdate:"Cập nhật",migrateActionSkip:"Bỏ qua",migrateActionConflict:"Xung đột",migrateActionDelete:"Xóa",migrateUnchanged:"chưa thay đổi",migrateConflictSectionTitle:"Xung đột",migrateConflictUseCK:"Dùng CK",migrateConflictKeepMine:"Giữ của tôi",migrateConflictSmartMerge:"Merge thông minh",migrateConflictShowDiff:"Hiện diff",migrateConflictHideDiff:"Ẩn diff",migrateConflictResolved:"Đã giải quyết",migrateConflictManual:"Thủ công",migrateConflictOverwriteAll:"Ghi đè tất cả",migrateConflictKeepAll:"Giữ tất cả",migrateSummaryTitle:"Di trú hoàn tất",migrateSummaryNewMigration:"Di trú mới",migrateType:"Loại",migrateItem:"Mục",migrateReconciling:"Đang phân tích thay đổi...",migrateReviewPlan:"Xem kế hoạch",migrateExecutePlan:"Thực hiện di trú",migrateExecuting:"Đang thực hiện di trú...",migrateResolveConflicts:"Giải quyết xung đột trước khi thực hiện",migrateSummarySubtitle:"mục đã di trú",migrateSummarySearchPlaceholder:"Tìm kiếm...",migrateSummaryFilterAll:"Tất cả",migrateSummaryCollapseAll:"Thu gọn",migrateSummaryExpandAll:"Mở rộng",migrateSummaryNoResults:"Không tìm thấy mục nào",migrateSummaryProviders:"Provider",migrateTypeUnknown:"Khác",kanbanTitle:"Bảng Kanban Kế hoạch",kanbanNoFile:"Chưa chọn file kế hoạch. Dùng tham số ?file=.",kanbanNoPhases:"Không phát hiện giai đoạn nào trong kế hoạch này",kanbanError400:"Yêu cầu không hợp lệ — thiếu tham số file",kanbanError403:"Truy cập bị từ chối — file nằm ngoài thư mục dự án",kanbanError404:"Không tìm thấy file kế hoạch",kanbanComplete:"hoàn thành",kanbanStatus_pending:"Chờ xử lý","kanbanStatus_in-progress":"Đang thực hiện",kanbanStatus_completed:"Hoàn thành",kanbanPhases:"giai đoạn",kanbanProgress:"Tiến độ",kanbanLoadError:"Không thể tải dữ liệu kế hoạch",developmentFeature:"Đang phát triển",betaFeature:"Beta",experimentalFeature:"Thử nghiệm",sectionModelTaxonomy:"Phân loại mô hình",taxonomyDescription:"Tuỳ chỉnh ánh xạ mô hình cho migration portable sang coding agent khác.",taxonomyTierHeavy:"Nặng (opus)",taxonomyTierBalanced:"Cân bằng (sonnet)",taxonomyTierLight:"Nhẹ (haiku)",taxonomyModel:"Mô hình",taxonomyEffort:"Mức nỗ lực",taxonomyResetProvider:"Đặt lại",taxonomyTier:"Cấp độ"}},kh=g.createContext(null),Um="ck-dashboard-lang";function Sv(){const t=localStorage.getItem(Um);return t==="en"||t==="vi"?t:navigator.language.startsWith("vi")?"vi":"en"}function Cv({children:t}){const[e,n]=g.useState(Sv),r=g.useCallback(o=>{localStorage.setItem(Um,o),n(o)},[]),i=g.useCallback(o=>kv[e][o],[e]),s=g.useMemo(()=>({lang:e,setLang:r,t:i}),[e,r,i]);return h.jsx(kh.Provider,{value:s,children:t})}function he(){const t=g.useContext(kh);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}class jv extends g.Component{constructor(){super(...arguments);Nd(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("App error:",n,r.componentStack)}render(){if(this.state.hasError){const n=this.state.error?.name==="ServerUnavailableError";return h.jsx(kh.Consumer,{children:r=>h.jsx("div",{className:"flex h-screen items-center justify-center bg-dash-bg",children:h.jsx("div",{className:"text-center space-y-4 max-w-md px-6",children:n?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-orange-500/10 border border-orange-500/30 flex items-center justify-center text-3xl",children:"🔌"}),h.jsx("h1",{className:"text-2xl font-bold text-orange-500",children:r?.t("serverNotRunning")??"Server Not Running"}),h.jsx("p",{className:"text-dash-text-secondary",children:r?.t("startServerMessage")??"The Config UI requires the backend server to be running."}),h.jsxs("div",{className:"bg-dash-surface border border-dash-border rounded-lg p-4",children:[h.jsx("p",{className:"text-xs text-dash-text-muted uppercase tracking-widest mb-2 font-bold",children:r?.t("runThisCommand")??"Run this command"}),h.jsx("code",{className:"block text-sm text-dash-accent font-mono bg-dash-bg px-3 py-2 rounded border border-dash-border",children:"ck config"})]}),h.jsx("button",{onClick:()=>window.location.reload(),className:"px-6 py-2 bg-dash-accent text-dash-bg rounded-lg font-bold hover:bg-dash-accent-hover transition-colors",children:r?.t("tryAgain")??"Try Again"})]}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"text-2xl font-bold text-red-500",children:r?.t("somethingWentWrong")??"Something went wrong"}),h.jsx("p",{className:"text-dash-text-muted",children:this.state.error?.message}),h.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-dash-accent text-white rounded-md hover:opacity-90",children:r?.t("reloadApp")??"Reload App"})]})})})})}return this.props.children}}const tr=({direction:t="horizontal",isDragging:e=!1,onMouseDown:n})=>{const r=t==="horizontal";return h.jsx("div",{onMouseDown:n,className:`
|
|
21
|
+
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let f=_t(),p;p=f;let m=p.pathname||"/",b=m;if(d!=="/"){let v=d.replace(/^\//,"").split("/");b="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=jn(t,{pathname:b});return Ee(u||x!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ee(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),v1(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:rn([d,s.encodeLocation?s.encodeLocation(v.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?d:rn([d,s.encodeLocation?s.encodeLocation(v.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),o,n,r,i)}function g1(){let t=j1(),e=Li(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:s},"ErrorBoundary")," or"," ",g.createElement("code",{style:s},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},e),n?g.createElement("pre",{style:i},n):null,o)}var b1=g.createElement(g1,null),Bm=class extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=h1(t.digest);n&&(t=n)}let e=t!==void 0?g.createElement(It.Provider,{value:this.props.routeContext},g.createElement(bh.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?g.createElement(x1,{error:t},e):e}};Bm.contextType=Dm;var sl=new WeakMap;function x1({children:t,error:e}){let{basename:n}=g.useContext(kt);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=c1(e.digest);if(r){let i=sl.get(e);if(i)throw i;let s=ym(r.location,n);if(xm&&!sl.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw sl.set(e,o),o}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function y1({routeContext:t,match:e,children:n}){let r=g.useContext(dr);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),g.createElement(It.Provider,{value:t},n)}function v1(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n?.errors;if(o!=null){let d=s.findIndex(u=>u.route.id&&o?.[u.route.id]!==void 0);de(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,l=-1;if(n)for(let d=0;d<s.length;d++){let u=s[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=d),u.route.id){let{loaderData:f,errors:p}=n,m=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!p||p[u.route.id]===void 0);if(u.route.lazy||m){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(d,u)=>{r(d,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Fs(n.matches),errorInfo:u})}:void 0;return s.reduceRight((d,u,f)=>{let p,m=!1,b=null,x=null;n&&(p=o&&u.route.id?o[u.route.id]:void 0,b=u.route.errorElement||b1,a&&(l<0&&f===0?(Fm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,x=null):l===f&&(m=!0,x=u.route.hydrateFallbackElement||null)));let w=e.concat(s.slice(0,f+1)),v=()=>{let S;return p?S=b:m?S=x:u.route.Component?S=g.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=d,g.createElement(y1,{match:u,routeContext:{outlet:d,matches:w,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?g.createElement(Bm,{location:n.location,revalidation:n.revalidation,component:b,error:p,children:v(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):v()},null)}function xh(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w1(t){let e=g.useContext(dr);return de(e,xh(t)),e}function k1(t){let e=g.useContext(Vs);return de(e,xh(t)),e}function S1(t){let e=g.useContext(It);return de(e,xh(t)),e}function yh(t){let e=S1(t),n=e.matches[e.matches.length-1];return de(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function C1(){return yh("useRouteId")}function j1(){let t=g.useContext(bh),e=k1("useRouteError"),n=yh("useRouteError");return t!==void 0?t:e.errors?.[n]}function O1(){let{router:t}=w1("useNavigate"),e=yh("useNavigate"),n=g.useRef(!1);return Lm(()=>{n.current=!0}),g.useCallback(async(i,s={})=>{Ee(n.current,Rm),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Xd={};function Fm(t,e,n){!e&&!Xd[t]&&(Xd[t]=!0,Ee(!1,n))}var Zd={};function eu(t,e){!t&&!Zd[e]&&(Zd[e]=!0,console.warn(e))}var P1="useOptimistic",tu=Vx[P1],N1=()=>{};function A1(t){return tu?tu(t):[t,N1]}function M1(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ee(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:g.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ee(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:g.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ee(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:g.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var D1=["HydrateFallback","hydrateFallbackElement"],T1=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function E1({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=s1()||r;let[s,o]=g.useState(t.state),[a,l]=A1(s),[c,d]=g.useState(),[u,f]=g.useState({isTransitioning:!1}),[p,m]=g.useState(),[b,x]=g.useState(),[w,v]=g.useState(),S=g.useRef(new Map),C=g.useCallback((M,{deletedFetchers:A,newErrors:R,flushSync:N,viewTransitionOpts:L})=>{R&&n&&Object.values(R).forEach($=>n($,{location:M.location,params:M.matches[0]?.params??{},unstable_pattern:Fs(M.matches)})),M.fetchers.forEach(($,F)=>{$.data!==void 0&&S.current.set(F,$.data)}),A.forEach($=>S.current.delete($)),eu(N===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let H=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(eu(L==null||H,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!L||!H){e&&N?e(()=>o(M)):r===!1?o(M):g.startTransition(()=>{r===!0&&l($=>nu($,M)),o(M)});return}if(e&&N){e(()=>{b&&(p?.resolve(),b.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let $=t.window.document.startViewTransition(()=>{e(()=>o(M))});$.finished.finally(()=>{e(()=>{m(void 0),x(void 0),d(void 0),f({isTransitioning:!1})})}),e(()=>x($));return}b?(p?.resolve(),b.skipTransition(),v({state:M,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(d(M),f({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[t.window,e,b,p,r,l,n]);g.useLayoutEffect(()=>t.subscribe(C),[t,C]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new T1)},[u]),g.useEffect(()=>{if(p&&c&&t.window){let M=c,A=p.promise,R=t.window.document.startViewTransition(async()=>{r===!1?o(M):g.startTransition(()=>{r===!0&&l(N=>nu(N,M)),o(M)}),await A});R.finished.finally(()=>{m(void 0),x(void 0),d(void 0),f({isTransitioning:!1})}),x(R)}},[c,p,t.window,r,l]),g.useEffect(()=>{p&&c&&a.location.key===c.location.key&&p.resolve()},[p,b,a.location,c]),g.useEffect(()=>{!u.isTransitioning&&w&&(d(w.state),f({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),v(void 0))},[u.isTransitioning,w]);let k=g.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:M=>t.navigate(M),push:(M,A,R)=>t.navigate(M,{state:A,preventScrollReset:R?.preventScrollReset}),replace:(M,A,R)=>t.navigate(M,{replace:!0,state:A,preventScrollReset:R?.preventScrollReset})}),[t]),O=t.basename||"/",y=g.useMemo(()=>({router:t,navigator:k,static:!1,basename:O,onError:n}),[t,k,O,n]);return g.createElement(g.Fragment,null,g.createElement(dr.Provider,{value:y},g.createElement(Vs.Provider,{value:a},g.createElement(Tm.Provider,{value:S.current},g.createElement(gh.Provider,{value:u},g.createElement($1,{basename:O,location:a.location,navigationType:a.historyAction,navigator:k,unstable_useTransitions:r},g.createElement(R1,{routes:t.routes,future:t.future,state:a,onError:n})))))),null)}function nu(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var R1=g.memo(L1);function L1({routes:t,future:e,state:n,onError:r}){return m1(t,void 0,n,r,e)}function ol({to:t,replace:e,state:n,relative:r}){de(Wr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=g.useContext(kt);Ee(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=g.useContext(It),{pathname:o}=_t(),a=an(),l=Ta(t,Da(s),o,r==="path"),c=JSON.stringify(l);return g.useEffect(()=>{a(JSON.parse(c),{replace:e,state:n,relative:r})},[a,c,r,e,n]),null}function I1(t){return p1(t.context)}function $1({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){de(!Wr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=Vn(n));let{pathname:c="/",search:d="",hash:u="",state:f=null,key:p="default"}=n,m=g.useMemo(()=>{let b=Rt(c,a);return b==null?null:{location:{pathname:b,search:d,hash:u,state:f,key:p},navigationType:r}},[a,c,d,u,f,p,r]);return Ee(m!=null,`<Router basename="${a}"> is not able to match the URL "${c}${d}${u}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:g.createElement(kt.Provider,{value:l},g.createElement(Ea.Provider,{children:e,value:m}))}var Ho="get",Wo="application/x-www-form-urlencoded";function Ra(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function B1(t){return Ra(t)&&t.tagName.toLowerCase()==="button"}function F1(t){return Ra(t)&&t.tagName.toLowerCase()==="form"}function V1(t){return Ra(t)&&t.tagName.toLowerCase()==="input"}function z1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _1(t,e){return t.button===0&&(!e||e==="_self")&&!z1(t)}function pc(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function H1(t,e){let n=pc(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var ho=null;function W1(){if(ho===null)try{new FormData(document.createElement("form"),0),ho=!1}catch{ho=!0}return ho}var U1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function al(t){return t!=null&&!U1.has(t)?(Ee(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wo}"`),null):t}function K1(t,e){let n,r,i,s,o;if(F1(t)){let a=t.getAttribute("action");r=a?Rt(a,e):null,n=t.getAttribute("method")||Ho,i=al(t.getAttribute("enctype"))||Wo,s=new FormData(t)}else if(B1(t)||V1(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?Rt(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||Ho,i=al(t.getAttribute("formenctype"))||al(a.getAttribute("enctype"))||Wo,s=new FormData(a,t),!W1()){let{name:c,type:d,value:u}=t;if(d==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,u)}}else{if(Ra(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ho,r=null,i=Wo,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vh(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function G1(t,e,n){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname=`_root.${n}`:e&&Rt(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function q1(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J1(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Y1(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await q1(s,n);return o.links?o.links():[]}return[]}));return ev(r.flat(1).filter(J1).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ru(t,e,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{let d=r.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let u=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function Q1(t,e,{includeHydrateFallback:n}={}){return X1(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function X1(t){return[...new Set(t)]}function Z1(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function ev(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(Z1(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function Vm(){let t=g.useContext(dr);return vh(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function tv(){let t=g.useContext(Vs);return vh(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var wh=g.createContext(void 0);wh.displayName="FrameworkContext";function zm(){let t=g.useContext(wh);return vh(t,"You must render this element inside a <HydratedRouter> element"),t}function nv(t,e){let n=g.useContext(wh),[r,i]=g.useState(!1),[s,o]=g.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=e,f=g.useRef(null);g.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let b=w=>{w.forEach(v=>{o(v.isIntersecting)})},x=new IntersectionObserver(b,{threshold:.5});return f.current&&x.observe(f.current),()=>{x.disconnect()}}},[t]),g.useEffect(()=>{if(r){let b=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(b)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,f,{}]:[s,f,{onFocus:ai(a,p),onBlur:ai(l,m),onMouseEnter:ai(c,p),onMouseLeave:ai(d,m),onTouchStart:ai(u,p)}]:[!1,f,{}]}function ai(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function rv({page:t,...e}){let{router:n}=Vm(),r=g.useMemo(()=>jn(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?g.createElement(sv,{page:t,matches:r,...e}):null}function iv(t){let{manifest:e,routeModules:n}=zm(),[r,i]=g.useState([]);return g.useEffect(()=>{let s=!1;return Y1(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function sv({page:t,matches:e,...n}){let r=_t(),{manifest:i,routeModules:s}=zm(),{basename:o}=Vm(),{loaderData:a,matches:l}=tv(),c=g.useMemo(()=>ru(t,e,l,i,r,"data"),[t,e,l,i,r]),d=g.useMemo(()=>ru(t,e,l,i,r,"assets"),[t,e,l,i,r]),u=g.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let m=new Set,b=!1;if(e.forEach(w=>{let v=i.routes[w.route.id];!v||!v.hasLoader||(!c.some(S=>S.route.id===w.route.id)&&w.route.id in a&&s[w.route.id]?.shouldRevalidate||v.hasClientLoader?b=!0:m.add(w.route.id))}),m.size===0)return[];let x=G1(t,o,"data");return b&&m.size>0&&x.searchParams.set("_routes",e.filter(w=>m.has(w.route.id)).map(w=>w.route.id).join(",")),[x.pathname+x.search]},[o,a,r,i,c,e,t,s]),f=g.useMemo(()=>Q1(d,i),[d,i]),p=iv(d);return g.createElement(g.Fragment,null,u.map(m=>g.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),f.map(m=>g.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),p.map(({key:m,link:b})=>g.createElement("link",{key:m,nonce:n.nonce,...b})))}function ov(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var av=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{av&&(window.__reactRouterVersion="7.11.0")}catch{}function lv(t,e){return Ry({basename:e?.basename,getContext:e?.getContext,future:e?.future,history:Yx({window:e?.window}),hydrationData:cv(),routes:t,mapRouteProperties:M1,hydrationRouteProperties:D1,dataStrategy:e?.dataStrategy,patchRoutesOnNavigation:e?.patchRoutesOnNavigation,window:e?.window,unstable_instrumentations:e?.unstable_instrumentations}).initialize()}function cv(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:hv(t.errors)}),t}function hv(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Bs(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}var _m=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hm=g.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f,...p},m){let{basename:b,unstable_useTransitions:x}=g.useContext(kt),w=typeof c=="string"&&_m.test(c),v=ym(c,b);c=v.to;let S=d1(c,{relative:i}),[C,k,O]=nv(r,p),y=pv(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u,unstable_defaultShouldRevalidate:f,unstable_useTransitions:x});function M(R){e&&e(R),R.defaultPrevented||y(R)}let A=g.createElement("a",{...p,...O,href:v.absoluteURL||S,onClick:v.isExternal||s?e:M,ref:ov(m,k),target:l,"data-discover":!w&&n==="render"?"true":void 0});return C&&!w?g.createElement(g.Fragment,null,A,g.createElement(rv,{page:S})):A});Hm.displayName="Link";var dv=g.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},d){let u=zs(o,{relative:c.relative}),f=_t(),p=g.useContext(Vs),{navigator:m,basename:b}=g.useContext(kt),x=p!=null&&vv(u)&&a===!0,w=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=f.pathname,S=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&b&&(S=Rt(S,b)||S);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=v===w||!i&&v.startsWith(w)&&v.charAt(C)==="/",O=S!=null&&(S===w||!i&&S.startsWith(w)&&S.charAt(w.length)==="/"),y={isActive:k,isPending:O,isTransitioning:x},M=k?e:void 0,A;typeof r=="function"?A=r(y):A=[r,k?"active":null,O?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(y):s;return g.createElement(Hm,{...c,"aria-current":M,className:A,ref:d,style:R,to:o,viewTransition:a},typeof l=="function"?l(y):l)});dv.displayName="NavLink";var uv=g.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Ho,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:b}=g.useContext(kt),x=xv(),w=yv(a,{relative:c}),v=o.toLowerCase()==="get"?"get":"post",S=typeof a=="string"&&_m.test(a),C=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let O=k.nativeEvent.submitter,y=O?.getAttribute("formmethod")||o,M=()=>x(O||k.currentTarget,{fetcherKey:e,method:y,navigate:n,replace:i,state:s,relative:c,preventScrollReset:d,viewTransition:u,unstable_defaultShouldRevalidate:f});b&&n!==!1?g.startTransition(()=>M()):M()};return g.createElement("form",{ref:m,method:v,action:w,onSubmit:r?l:C,...p,"data-discover":!S&&t==="render"?"true":void 0})});uv.displayName="Form";function fv(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wm(t){let e=g.useContext(dr);return de(e,fv(t)),e}function pv(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=an(),d=_t(),u=zs(t,{relative:s});return g.useCallback(f=>{if(_1(f,e)){f.preventDefault();let p=n!==void 0?n:on(d)===on(u),m=()=>c(t,{replace:p,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?g.startTransition(()=>m()):m()}},[d,c,u,n,r,e,t,i,s,o,a,l])}function mv(t){Ee(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=g.useRef(pc(t)),n=g.useRef(!1),r=_t(),i=g.useMemo(()=>H1(r.search,n.current?null:e.current),[r.search]),s=an(),o=g.useCallback((a,l)=>{const c=pc(typeof a=="function"?a(new URLSearchParams(i)):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}var gv=0,bv=()=>`__${String(++gv)}__`;function xv(){let{router:t}=Wm("useSubmit"),{basename:e}=g.useContext(kt),n=C1(),r=t.fetch,i=t.navigate;return g.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:d,body:u}=K1(s,e);if(o.navigate===!1){let f=o.fetcherKey||bv();await r(f,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:u,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:u,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function yv(t,{relative:e}={}){let{basename:n}=g.useContext(kt),r=g.useContext(It);de(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...zs(t||".",{relative:e})},o=_t();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(u=>u).forEach(u=>a.append("index",u));let d=a.toString();s.search=d?`?${d}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:rn([n,s.pathname])),on(s)}function vv(t,{relative:e}={}){let n=g.useContext(gh);de(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Wm("useViewTransitionState"),i=zs(t,{relative:e});if(!n.isTransitioning)return!1;let s=Rt(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Rt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ta(i.pathname,o)!=null||ta(i.pathname,s)!=null}function wv(t){return g.createElement(E1,{flushSync:cm.flushSync,...t})}const kv={en:{loading:"Loading...",error:"Error",selectProject:"Select a project to view dashboard",controlCenter:"Control Center",settings:"Settings",sync:"Sync",offline:"Offline",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode",settingsSection:"Settings",configEditor:"Config Editor",projects:"Projects",addProject:"Add Project",global:"Global",skills:"Skills",health:"Health",collapse:"Collapse",expand:"Expand",installing:"Installing...",manage:"Manage",uninstall:"Uninstall",installGlobally:"Install Globally",installGloballyDesc:"Available to all projects instead of current project only",selectAtLeastOneAgent:"Please select at least one agent",installationFailed:"Installation failed",allSkills:"All Skills",refresh:"Refresh",browseAndManageSkills:"Browse and manage skills for your agents",detected:"Detected",notDetected:"Not detected",sessions:"sessions",noSessions:"No sessions",terminal:"Terminal",terminalSub:"Open bash at path",editor:"Editor",editorSub:"Open in VS Code",useGlobalFallback:"Use global fallback",openAtPath:"Open at project path",openAppOnly:"Open app only",actionOptionsLoadFailed:"Could not load editor/terminal options",launch:"Launch",launchSub:"Start Claude Code",config:"Config",configSub:"Manage project settings",recentSessions:"Recent Sessions",viewAllHistory:"View All History",showLess:"Show Less",actionFailed:"Action failed",loadingSessions:"Loading sessions...",noSessionsFound:"No sessions found",configuration:"Claude Settings",activeKit:"Active Kit",aiModel:"Model",hooks:"Hooks",active:"active",mcpServers:"MCP Servers",connected:"connected",editProjectConfig:"Edit Project Config",globalSettings:"(Global)",globalSkills:"Global Skills",loadingSkills:"Loading skills...",noDescription:"No description",browseSkillsMarketplace:"Browse Skills Marketplace",backToDashboard:"Back to Dashboard",educationalConfigEditor:"Educational Config Editor",discard:"Discard",saveChanges:"Save Changes",mergedView:"Merged View",localConfig:"Local (.ck.json)",globalConfig:"Global",syntaxValid:"Syntax Valid",configurationHelp:"Configuration Help",field:"Field",type:"Type",default:"Default",description:"Description",validValues:"Valid Values",systemEffect:"System Effect",exampleUsage:"Example Usage",knowledgeBase:"Knowledge Base",clickToSeeHelp:"Click on any configuration field to see detailed documentation and usage examples.",extractedFrom:"Extracted from ClaudeKit v2.x Specification",resetToDefault:"Reset",saving:"Saving...",saved:"Saved",confirmReset:"Reset to Default?",confirmResetMessage:"All changes will be lost and replaced with default values.",confirm:"Confirm",saveFailed:"Save failed",configTab:"Config",systemTab:"System",formTab:"Form",jsonTab:"JSON",readOnly:"Read-only",installedKit:"Installed Kit",kitVersion:"Kit Version",installedOn:"Installed On",noKitInstalled:"No kit installed",components:"Components",agents:"Agents",commands:"Commands",workflows:"Workflows",kitSkills:"Skills",fileOwnership:"File Ownership",ownershipCk:"kit-managed",ownershipUser:"user-owned",ownershipModified:"modified",componentInventory:"Component Inventory",installedHooks:"Installed Hooks",installedMcpServers:"MCP Servers",lastChecked:"Last update check",staleIndicator:"Stale",skippedVersion:"Skipped",filesModifiedFromDefaults:"files modified from kit defaults",cliCard:"ClaudeKit CLI",checkForUpdates:"Check for Updates",checking:"Checking...",upToDate:"Up to date",updateAvailable:"Update available",updateNow:"Update Now",updating:"Updating...",updateSuccess:"Update Complete!",updateFailed:"Update Failed",closeModal:"Close",showDetails:"Show Details",hideDetails:"Hide Details",environment:"Environment",claudeConfigPath:"Claude config",nodeVersion:"Node",bunVersion:"Bun",osVersion:"OS",channelStable:"Stable",channelBeta:"Beta",betaBadge:"Beta",latestVersion:"Latest",selectVersion:"Select version",loadingVersions:"Loading versions...",prereleaseLabel:"Pre",currentVersionLabel:"Current",checkAll:"Check All",checkingAll:"Checking...",updateAll:"Update All",updatesAvailable:"{count} updates available",allUpToDate:"All up to date",systemControlTower:"System Control Tower",systemOverviewTitle:"Update & Runtime Overview",systemOverviewDesc:"Track CLI and kit health, then run upgrades from one place.",installedComponentsHeading:"Installed Components",updateReadiness:"Update Readiness",checkedComponents:"Checked",activeChannel:"Channel",readyToScan:"Ready to scan",noTrackedFiles:"No tracked files detected",kitsLabel:"Kits",componentFilterAll:"All",componentFilterUpdates:"Updates",componentFilterUpdatesCount:"Updates ({count})",componentFilterUpToDate:"Up to date",componentFilterUpToDateCount:"Up to date ({count})",componentFilterCli:"CLI",componentFilterKits:"Kits",noComponentsMatchFilter:"No components match the current filter.",runCheckAllForFilter:"Run Check All to populate this filter.",noUpdatesFound:"No updates found. Checked components are up to date.",noUpToDateYet:"No components are up to date yet.",configWorkspaceHint:"Edit configuration or manage system updates from one workspace.",settingsJsonHeading:"Claude Settings JSON",settingsJsonMissing:"No settings file found at ~/.claude/settings.json.",settingsJsonLoadFailed:"Failed to load ~/.claude/settings.json.",settingsBackupSaved:"Backup saved",hookDiagnosticsTitle:"Hook Diagnostics",hookDiagnosticsDesc:"Inspect recent hook activity and failures without opening JSONL files manually.",hookDiagnosticsPathPending:"Resolving log path...",hookDiagnosticsScopeGlobal:"Global hooks",hookDiagnosticsEntries:"Entries",hookDiagnosticsCrashes:"Crashes",hookDiagnosticsWarnings:"Warnings",hookDiagnosticsBlocks:"Blocks",hookDiagnosticsLastEvent:"Last event",hookDiagnosticsLoading:"Loading hook diagnostics...",hookDiagnosticsLoadFailed:"Failed to load hook diagnostics",hookDiagnosticsMissing:"No hook log file found for this scope yet.",hookDiagnosticsEmpty:"Hook log is present but contains no readable entries.",hookDiagnosticsParseErrorsNotice:"Skipped {count} malformed log line(s) while loading diagnostics.",hookDiagnosticsTruncatedNotice:"Showing a bounded recent window to keep diagnostics responsive on large logs.",hookDiagnosticsToolLabel:"tool",hookDiagnosticsTargetLabel:"target",hookDiagnosticsUnknown:"Unknown",addProjectTitle:"Add Project",addProjectDescription:"Add a new ClaudeKit project to the control center",projectPath:"Project Path",pathPlaceholder:"/path/to/project",alias:"Alias",aliasOptional:"(optional)",aliasPlaceholder:"my-project",aliasDescription:"Custom display name for the project",pathRequired:"Path is required",failedToAdd:"Failed to add project",cancel:"Cancel",adding:"Adding...",somethingWentWrong:"Something went wrong",reloadApp:"Reload App",serverNotRunning:"Server Not Running",startServerMessage:"The Config UI requires the backend server to be running.",runThisCommand:"Run this command",tryAgain:"Try Again",projectConfig:"Project Config",inheritedFromGlobal:"Inherited from Global",localOverride:"Local Override",viewGlobalConfig:"This field inherits from global config. View",onboardingTitle:"Welcome to ClaudeKit",onboardingSubtitle:"Choose your kit and get started in minutes",kitEngineerName:"ClaudeKit Engineer",kitEngineerTagline:"AI-powered coding with skills, hooks, and multi-agent workflows",kitMarketingName:"ClaudeKit Marketing",kitMarketingTagline:"Content automation: campaigns, social media, analytics",featureAgents:"AI Agents",featureAgentsDesc:"Specialized agents for different tasks",featureHooks:"Lifecycle Hooks",featureHooksDesc:"Customize Claude's behavior at key moments",featureSkills:"Skills Library",featureSkillsDesc:"Pre-built capabilities you can activate",featureMultiAgent:"Multi-Agent Workflows",featureMultiAgentDesc:"Coordinate multiple agents for complex tasks",featureContent:"Content Generation",featureContentDesc:"Automated content creation and optimization",featureSocial:"Social Media Tools",featureSocialDesc:"Scheduling, analytics, and engagement automation",stepChooseKit:"Choose Kit",stepConfigure:"Configure",stepInstall:"Install",back:"Back",next:"Next",install:"Install",installSuccess:"Installation Complete!",installSuccessDesc:"{kit} is ready to use",getStarted:"Get Started",goToDashboard:"Go to Dashboard",kitConfig:"Kit Config",kitConfigSubtitle:"Configure ClaudeKit Engineer settings",scopeGlobal:"Global",scopeProject:"Project",sectionGeneral:"General",sectionPaths:"Paths",sectionPrivacy:"Privacy & Trust",sectionProject:"Project Detection",sectionIntegrations:"Integrations",sectionHooks:"Hooks",sectionAdvanced:"Advanced",fieldCodingLevel:"Coding Level",fieldCodingLevelDesc:"Your coding experience level (-1=auto, 0=beginner, 1=intermediate, 2=advanced, 3=expert, 4=tech-lead, 5=god-mode)",fieldStatusline:"Statusline Mode",fieldStatuslineDesc:"How much info to show in the status line",fieldStatuslineColors:"Statusline Colors",fieldStatuslineColorsDesc:"Enable ANSI color output in the statusline",fieldThinkingLanguage:"Thinking Language",fieldThinkingLanguageDesc:"Language for Claude's internal reasoning (null=English)",fieldResponseLanguage:"Response Language",fieldResponseLanguageDesc:"Language for Claude's responses (null=match user)",fieldDocsPath:"Docs Directory",fieldDocsPathDesc:"Path to documentation directory",fieldPlansPath:"Plans Directory",fieldPlansPathDesc:"Path to plans directory",fieldPrivacyBlock:"Privacy Block",fieldPrivacyBlockDesc:"Block access to sensitive files (.env, credentials)",fieldTrustEnabled:"Trust Mode",fieldTrustEnabledDesc:"Enable auto-approval for tool calls",fieldTrustPassphrase:"Trust Passphrase",fieldTrustPassphraseDesc:"Passphrase to enable trust mode",fieldProjectType:"Project Type",fieldProjectTypeDesc:"Override auto-detected project type",fieldPackageManager:"Package Manager",fieldPackageManagerDesc:"Override auto-detected package manager",fieldFramework:"Framework",fieldFrameworkDesc:"Override auto-detected framework",fieldGeminiModel:"Gemini Model",fieldGeminiModelDesc:"Gemini model for CLI commands",fieldResearchUseGemini:"Use Gemini for Research",fieldResearchUseGeminiDesc:"Use Gemini CLI instead of WebSearch",fieldDocsMaxLoc:"Max Lines per Doc",fieldDocsMaxLocDesc:"Maximum lines of code per documentation file",fieldPlanNamingFormat:"Plan Naming Format",fieldPlanNamingFormatDesc:"Format for plan directory names",fieldPlanDateFormat:"Plan Date Format",fieldPlanDateFormatDesc:"Date format for plan names (moment.js)",fieldPlanValidationMode:"Validation Mode",fieldPlanValidationModeDesc:"How to validate plans before implementation",fieldPlanMinQuestions:"Min Questions",fieldPlanMinQuestionsDesc:"Minimum validation questions",fieldPlanMaxQuestions:"Max Questions",fieldPlanMaxQuestionsDesc:"Maximum validation questions",fieldAssertions:"Assertions",fieldAssertionsDesc:"Code assertions and rules to enforce",fieldHookSessionInit:"Session Init",fieldHookSessionInitDesc:"Project detection and environment setup",fieldHookSubagentInit:"Subagent Init",fieldHookSubagentInitDesc:"Inject context to subagents",fieldHookDescriptiveName:"Descriptive Name",fieldHookDescriptiveNameDesc:"Enforce kebab-case descriptive file naming for scripts",fieldHookDevRulesReminder:"Dev Rules Reminder",fieldHookDevRulesReminderDesc:"Inject development rules context",fieldHookUsageContextAwareness:"Usage Context Awareness",fieldHookUsageContextAwarenessDesc:"Usage limits awareness",fieldHookContextTracking:"Context Tracking",fieldHookContextTrackingDesc:"Context window tracking (% used, token counts)",fieldHookScoutBlock:"Scout Block",fieldHookScoutBlockDesc:"Block heavy directories from exploration",fieldHookPrivacyBlock:"Privacy Block Hook",fieldHookPrivacyBlockDesc:"Block sensitive files from reading",fieldHookPostEditSimplify:"Post-Edit Simplify",fieldHookPostEditSimplifyDesc:"Simplify reminder after edits",sectionUpdatePipeline:"Update Pipeline",fieldAutoInitAfterUpdate:"Auto Init After Update",fieldAutoInitAfterUpdateDesc:"Automatically run ck init after ck update when kit has new version",fieldAutoMigrateAfterUpdate:"Auto Migrate After Update",fieldAutoMigrateAfterUpdateDesc:"Automatically run ck migrate after ck update (independent of init)",fieldMigrateProviders:"Migrate Providers",fieldMigrateProvidersDesc:"Which providers to auto-migrate. Use 'auto' to scan filesystem or a comma-separated list.",skillsPageTitle:"Skills Management",skillsPageDesc:"Install ClaudeKit skills to your coding agents",availableSkills:"Available Skills",installedSkills:"Installed Skills",noSkillsFound:"No skills found",installSkill:"Install",uninstallSkill:"Uninstall",manageSkill:"Manage",syncRegistry:"Sync",installSkillTitle:"Install Skill",selectAgents:"Select target agents",installLocation:"Installation location",globalInstall:"Global",projectInstall:"Project",confirmInstall:"Install to selected agents",installingSkill:"Installing...",skillInstallSuccess:"Skill installed successfully",skillInstallFailed:"Installation failed",agentClaudeCode:"Claude Code",agentCursor:"Cursor",agentCodex:"Codex",agentOpencode:"OpenCode",agentGoose:"Goose",agentGeminiCli:"Gemini CLI",agentAntigravity:"Antigravity",agentGithubCopilot:"GitHub Copilot",agentAmp:"Amp",agentKilo:"Kilo",agentRoo:"Roo",agentWindsurf:"Windsurf",agentCline:"Cline",agentOpenhands:"OpenHands",installed:"Installed",notInstalled:"Not installed",allAgents:"All Agents",filterByAgent:"Filter by agent",skillsTitle:"Skills",skillsSubtitle:"Browse, install, and manage skills for your coding agents",availableCount:"Available",installedCount:"Installed",agentsCount:"Agents",searchSkills:"Search skills...",searchShortcut:"/",sortAZ:"A-Z",sortCategory:"Category",sortInstalledFirst:"Installed first",listView:"List view",gridView:"Grid view",categoryAll:"All",categoryAI:"AI",categoryUIUX:"UI/UX",categoryBackend:"Backend",categorySecurity:"Security",categoryDevOps:"DevOps",categoryDatabase:"Database",categoryDevelopment:"Development",categoryResearch:"Research",categoryGeneral:"General",categoryCore:"Core",categoryDocumentation:"Documentation",categoryTooling:"Tooling",categoryMedia:"Media",categoryFrameworks:"Frameworks",skillsCountLabel:"{count} skills",installToAll:"Install to All Detected",scopeLabel:"Installation Scope",agentInstalled:"Installed",agentNotInstalled:"Not installed",skillSource:"Source location",skillSourceBadge:"Source",detailPanelClose:"Close",versionLabel:"v{version}",installAllToAllAgents:"Install All to All Agents",bulkInstallFailed:"Bulk install failed",noAgentsDetected:"No agents detected",kitBadgeEngineer:"Engineer",kitBadgeMarketing:"Marketing",customizedBadge:"Customized",installedVersionLabel:"Installed Version",installedAtLabel:"Installed At",sourceTimestampLabel:"Source Date",kitLabel:"Kit",skillMetadata:"Skill Info",migrate:"Migrate",migrateTitle:"Migrate",migrateSubtitle:"Migrate your Claude Code stack to other providers",migrateDetectedProviders:"Detected",migrateSelectedProviders:"Selected",migrateDiscovering:"Discovering migration sources...",migrateRefresh:"Refresh Discovery",migrateRun:"Run Migration",migrateRunning:"Migrating...",migrateSourceSummary:"Source Summary",migratePresetCodex:"Codex",migratePresetAntigravity:"Antigravity",migratePresetCore:"Codex + Antigravity + Droid",migratePresetDetected:"All Detected",migrateScope:"Scope",migrateScopeProject:"Project",migrateScopeGlobal:"Global",migrateTypes:"Portable Types",migrateTypeAgents:"Subagents",migrateTypeCommands:"Commands",migrateTypeSkills:"Skills",migrateTypeConfig:"Config",migrateTypeRules:"Rules",migrateTypeHooks:"Hooks",migrateSearchProviders:"Search providers...",migrateSelectVisible:"Select Visible",migrateClearSelection:"Clear Selection",migrateProvidersHeading:"Target Providers",migrateProvidersCountSuffix:"providers",migrateNoProvidersMatch:"No providers match current filters.",migrateSelectButton:"Select",migrateSelectedButton:"Selected",migrateSelectProviderAction:"Select Provider",migrateUnselectProvider:"Unselect Provider",migrateCapabilitiesLabel:"types",migrateCapabilitiesSection:"Capability Matrix",migrateSupported:"Supported",migrateUnsupportedShort:"Unsupported",migrateIncludedEnabled:"Enabled",migrateIncludedDisabled:"Disabled",migrateLatestTarget:"Latest Target",migrateNoResultForProvider:"No migration result for this provider yet.",migrateActionSummaryTitle:"Ready to Migrate",migrateGlobalOnlyCommandsShort:"Commands global-only",migrateNoProviders:"No providers available.",migrateUnsupported:"Will be skipped (unsupported)",migrateGlobalForced:"Codex commands are global-only. Scope will be forced to global.",migrateResults:"Migration Results",migrateInstalled:"Installed",migrateSkipped:"Skipped",migrateFailed:"Failed",migrateProvider:"Provider",migrateStatus:"Status",migratePath:"Path",migrateError:"Error",migrateStatusInstalled:"Installed",migrateStatusSkipped:"Skipped",migrateStatusFailed:"Failed",migrateNoResults:"No migration results yet.",migrateDetectFailed:"Failed to discover migration data",migrateExecuteFailed:"Migration execution failed",migrateSelectProvider:"Select at least one provider",migrateNoTypesEnabled:"Enable at least one portable type",migrateDetectedTag:"Detected",migrateNotDetectedTag:"Not detected",migrateFilterRecommended:"Recommended",migrateActionInstall:"Install",migrateActionUpdate:"Update",migrateActionSkip:"Skip",migrateActionConflict:"Conflict",migrateActionDelete:"Delete",migrateUnchanged:"unchanged",migrateConflictSectionTitle:"Conflicts",migrateConflictUseCK:"Use CK",migrateConflictKeepMine:"Keep Mine",migrateConflictSmartMerge:"Smart Merge",migrateConflictShowDiff:"Show Diff",migrateConflictHideDiff:"Hide Diff",migrateConflictResolved:"Resolved",migrateConflictManual:"Manual",migrateConflictOverwriteAll:"Overwrite All",migrateConflictKeepAll:"Keep All",migrateSummaryTitle:"Migration Complete",migrateSummaryNewMigration:"New Migration",migrateType:"Type",migrateItem:"Item",migrateReconciling:"Analyzing changes...",migrateReviewPlan:"Review Plan",migrateExecutePlan:"Execute Migration",migrateExecuting:"Executing migration...",migrateResolveConflicts:"Resolve all conflicts before executing",migrateSummarySubtitle:"items migrated",migrateSummarySearchPlaceholder:"Search items...",migrateSummaryFilterAll:"All",migrateSummaryCollapseAll:"Collapse all",migrateSummaryExpandAll:"Expand all",migrateSummaryNoResults:"No items match your search",migrateSummaryProviders:"Providers",migrateTypeUnknown:"Other",kanbanTitle:"Plan Kanban",kanbanNoFile:"No plan file specified. Use ?file= parameter.",kanbanNoPhases:"No phases detected in this plan",kanbanError400:"Invalid request — missing file parameter",kanbanError403:"Access denied — file is outside the project directory",kanbanError404:"Plan file not found",kanbanComplete:"complete",kanbanStatus_pending:"Pending","kanbanStatus_in-progress":"In Progress",kanbanStatus_completed:"Completed",kanbanPhases:"phases",kanbanProgress:"Progress",kanbanLoadError:"Failed to load plan data",developmentFeature:"Development",betaFeature:"Beta",experimentalFeature:"Experimental",sectionModelTaxonomy:"Model Taxonomy",taxonomyDescription:"Customize model mappings for portable migration to other coding agents.",taxonomyTierHeavy:"Heavy (opus)",taxonomyTierBalanced:"Balanced (sonnet)",taxonomyTierLight:"Light (haiku)",taxonomyModel:"Model",taxonomyEffort:"Effort",taxonomyResetProvider:"Reset",taxonomyTier:"Tier"},vi:{loading:"Đang tải...",error:"Lỗi",selectProject:"Chọn dự án để xem bảng điều khiển",controlCenter:"Trung tâm điều khiển",settings:"Cài đặt",sync:"Đồng bộ",offline:"Ngoại tuyến",switchToLight:"Chuyển sang chế độ sáng",switchToDark:"Chuyển sang chế độ tối",settingsSection:"Cài đặt",configEditor:"Trình chỉnh sửa cấu hình",projects:"Dự án",addProject:"Thêm dự án",global:"Toàn cục",skills:"Kỹ năng",health:"Sức khỏe",collapse:"Thu gọn",expand:"Mở rộng",installing:"Đang cài đặt...",manage:"Quản lý",uninstall:"Gỡ cài đặt",installGlobally:"Cài đặt toàn cục",installGloballyDesc:"Khả dụng cho tất cả dự án thay vì chỉ dự án hiện tại",selectAtLeastOneAgent:"Vui lòng chọn ít nhất một agent",installationFailed:"Cài đặt thất bại",allSkills:"Tất cả kỹ năng",refresh:"Làm mới",browseAndManageSkills:"Duyệt và quản lý kỹ năng cho agents của bạn",detected:"Đã phát hiện",notDetected:"Chưa phát hiện",sessions:"phiên",noSessions:"Không có phiên",terminal:"Terminal",terminalSub:"Mở bash tại đường dẫn",editor:"Trình soạn thảo",editorSub:"Mở trong VS Code",useGlobalFallback:"Dùng fallback global",openAtPath:"Mở tại đường dẫn dự án",openAppOnly:"Chỉ mở ứng dụng",actionOptionsLoadFailed:"Không thể tải tùy chọn editor/terminal",launch:"Khởi chạy",launchSub:"Bắt đầu Claude Code",config:"Cấu hình",configSub:"Quản lý cài đặt dự án",recentSessions:"Phiên gần đây",viewAllHistory:"Xem tất cả lịch sử",showLess:"Thu gọn",actionFailed:"Thao tác thất bại",loadingSessions:"Đang tải phiên...",noSessionsFound:"Không tìm thấy phiên nào",configuration:"Cài đặt Claude",activeKit:"Kit hoạt động",aiModel:"Mô hình",hooks:"Hooks",active:"hoạt động",mcpServers:"Máy chủ MCP",connected:"kết nối",editProjectConfig:"Chỉnh sửa cấu hình dự án",globalSettings:"(Toàn cục)",globalSkills:"Kỹ năng toàn cục",loadingSkills:"Đang tải kỹ năng...",noDescription:"Không có mô tả",browseSkillsMarketplace:"Duyệt Skills Marketplace",backToDashboard:"Quay lại bảng điều khiển",educationalConfigEditor:"Trình chỉnh sửa cấu hình hướng dẫn",discard:"Hủy bỏ",saveChanges:"Lưu thay đổi",mergedView:"Chế độ gộp",localConfig:"Cục bộ (.ck.json)",globalConfig:"Toàn cục",syntaxValid:"Cú pháp hợp lệ",configurationHelp:"Hướng dẫn cấu hình",field:"Trường",type:"Kiểu",default:"Mặc định",description:"Mô tả",validValues:"Giá trị hợp lệ",systemEffect:"Hiệu ứng hệ thống",exampleUsage:"Ví dụ sử dụng",knowledgeBase:"Cơ sở kiến thức",clickToSeeHelp:"Nhấp vào bất kỳ trường cấu hình nào để xem tài liệu chi tiết và ví dụ sử dụng.",extractedFrom:"Trích xuất từ ClaudeKit v2.x Specification",resetToDefault:"Đặt lại",saving:"Đang lưu...",saved:"Đã lưu",confirmReset:"Đặt lại về mặc định?",confirmResetMessage:"Tất cả thay đổi sẽ bị mất và được thay thế bằng giá trị mặc định.",confirm:"Xác nhận",saveFailed:"Lưu thất bại",configTab:"Cấu hình",systemTab:"Hệ thống",formTab:"Biểu mẫu",jsonTab:"JSON",readOnly:"Chỉ đọc",installedKit:"Kit đã cài",kitVersion:"Phiên bản Kit",installedOn:"Cài đặt vào",noKitInstalled:"Chưa cài kit",components:"Thành phần",agents:"Agents",commands:"Commands",workflows:"Workflows",kitSkills:"Skills",fileOwnership:"Quyền sở hữu tệp",ownershipCk:"do kit quản lý",ownershipUser:"do người dùng",ownershipModified:"đã chỉnh sửa",componentInventory:"Thành phần đã cài",installedHooks:"Hooks đã cài",installedMcpServers:"MCP Servers",lastChecked:"Kiểm tra cập nhật",staleIndicator:"Cũ",skippedVersion:"Đã bỏ qua",filesModifiedFromDefaults:"tệp đã sửa so với mặc định",cliCard:"ClaudeKit CLI",checkForUpdates:"Kiểm tra cập nhật",checking:"Đang kiểm tra...",upToDate:"Đã cập nhật",updateAvailable:"Có bản cập nhật",updateNow:"Cập nhật ngay",updating:"Đang cập nhật...",updateSuccess:"Cập nhật hoàn tất!",updateFailed:"Cập nhật thất bại",closeModal:"Đóng",showDetails:"Xem chi tiết",hideDetails:"Ẩn chi tiết",environment:"Môi trường",claudeConfigPath:"Cấu hình Claude",nodeVersion:"Node",bunVersion:"Bun",osVersion:"Hệ điều hành",channelStable:"Ổn định",channelBeta:"Beta",betaBadge:"Beta",latestVersion:"Mới nhất",selectVersion:"Chọn phiên bản",loadingVersions:"Đang tải...",prereleaseLabel:"Thử nghiệm",currentVersionLabel:"Hiện tại",checkAll:"Kiểm tra tất cả",checkingAll:"Đang kiểm tra...",updateAll:"Cập nhật tất cả",updatesAvailable:"{count} bản cập nhật",allUpToDate:"Tất cả đã cập nhật",systemControlTower:"Trung tâm hệ thống",systemOverviewTitle:"Tổng quan cập nhật & môi trường",systemOverviewDesc:"Theo dõi CLI và kit, rồi nâng cấp từ một nơi.",installedComponentsHeading:"Thành phần đã cài",updateReadiness:"Mức sẵn sàng cập nhật",checkedComponents:"Đã kiểm tra",activeChannel:"Kênh",readyToScan:"Sẵn sàng kiểm tra",noTrackedFiles:"Không phát hiện tệp theo dõi",kitsLabel:"Kit",componentFilterAll:"Tất cả",componentFilterUpdates:"Bản cập nhật",componentFilterUpdatesCount:"Bản cập nhật ({count})",componentFilterUpToDate:"Đã cập nhật",componentFilterUpToDateCount:"Đã cập nhật ({count})",componentFilterCli:"CLI",componentFilterKits:"Kit",noComponentsMatchFilter:"Không có thành phần phù hợp bộ lọc hiện tại.",runCheckAllForFilter:"Hãy chạy Kiểm tra tất cả để nạp dữ liệu cho bộ lọc này.",noUpdatesFound:"Không có bản cập nhật. Các thành phần đã kiểm tra đều mới nhất.",noUpToDateYet:"Chưa có thành phần nào ở trạng thái đã cập nhật.",configWorkspaceHint:"Chỉnh sửa cấu hình hoặc quản lý cập nhật hệ thống trong một màn hình.",settingsJsonHeading:"JSON Cài đặt Claude",settingsJsonMissing:"Không tìm thấy tệp ~/.claude/settings.json.",settingsJsonLoadFailed:"Không thể tải ~/.claude/settings.json.",settingsBackupSaved:"Đã lưu bản sao lưu",hookDiagnosticsTitle:"Chẩn đoán Hook",hookDiagnosticsDesc:"Xem hoạt động hook gần đây và lỗi mà không cần mở tệp JSONL thủ công.",hookDiagnosticsPathPending:"Đang xác định đường dẫn log...",hookDiagnosticsScopeGlobal:"Hook toàn cục",hookDiagnosticsEntries:"Bản ghi",hookDiagnosticsCrashes:"Sự cố",hookDiagnosticsWarnings:"Cảnh báo",hookDiagnosticsBlocks:"Chặn",hookDiagnosticsLastEvent:"Sự kiện cuối",hookDiagnosticsLoading:"Đang tải chẩn đoán hook...",hookDiagnosticsLoadFailed:"Không thể tải chẩn đoán hook",hookDiagnosticsMissing:"Chưa tìm thấy tệp log hook cho phạm vi này.",hookDiagnosticsEmpty:"Tệp log hook có tồn tại nhưng không có bản ghi đọc được.",hookDiagnosticsParseErrorsNotice:"Đã bỏ qua {count} dòng log bị lỗi khi tải chẩn đoán.",hookDiagnosticsTruncatedNotice:"Đang hiển thị cửa sổ bản ghi gần đây để giữ giao diện phản hồi tốt với log lớn.",hookDiagnosticsToolLabel:"công cụ",hookDiagnosticsTargetLabel:"mục tiêu",hookDiagnosticsUnknown:"Không rõ",addProjectTitle:"Thêm dự án",addProjectDescription:"Thêm dự án ClaudeKit mới vào trung tâm điều khiển",projectPath:"Đường dẫn dự án",pathPlaceholder:"/đường/dẫn/dự/án",alias:"Bí danh",aliasOptional:"(tùy chọn)",aliasPlaceholder:"dự-án-của-tôi",aliasDescription:"Tên hiển thị tùy chỉnh cho dự án",pathRequired:"Đường dẫn bắt buộc",failedToAdd:"Không thể thêm dự án",cancel:"Hủy",adding:"Đang thêm...",somethingWentWrong:"Đã xảy ra lỗi",reloadApp:"Tải lại ứng dụng",serverNotRunning:"Máy chủ không chạy",startServerMessage:"Config UI yêu cầu máy chủ backend đang chạy.",runThisCommand:"Chạy lệnh này",tryAgain:"Thử lại",projectConfig:"Cấu hình dự án",inheritedFromGlobal:"Kế thừa từ toàn cục",localOverride:"Ghi đè cục bộ",viewGlobalConfig:"Trường này kế thừa từ cấu hình toàn cục. Xem",onboardingTitle:"Chào mừng đến ClaudeKit",onboardingSubtitle:"Chọn kit của bạn và bắt đầu trong vài phút",kitEngineerName:"ClaudeKit Engineer",kitEngineerTagline:"Lập trình AI với skills, hooks và multi-agent",kitMarketingName:"ClaudeKit Marketing",kitMarketingTagline:"Tự động hóa nội dung: chiến dịch, mạng xã hội, phân tích",featureAgents:"AI Agents",featureAgentsDesc:"Các agent chuyên biệt cho từng tác vụ",featureHooks:"Lifecycle Hooks",featureHooksDesc:"Tùy chỉnh hành vi của Claude tại các thời điểm quan trọng",featureSkills:"Thư viện Skills",featureSkillsDesc:"Các khả năng có sẵn bạn có thể kích hoạt",featureMultiAgent:"Multi-Agent Workflows",featureMultiAgentDesc:"Phối hợp nhiều agent cho các tác vụ phức tạp",featureContent:"Tạo nội dung",featureContentDesc:"Tự động tạo và tối ưu nội dung",featureSocial:"Công cụ mạng xã hội",featureSocialDesc:"Lên lịch, phân tích và tự động tương tác",stepChooseKit:"Chọn Kit",stepConfigure:"Cấu hình",stepInstall:"Cài đặt",back:"Quay lại",next:"Tiếp theo",install:"Cài đặt",installSuccess:"Cài đặt hoàn tất!",installSuccessDesc:"{kit} đã sẵn sàng sử dụng",getStarted:"Bắt đầu",goToDashboard:"Đi đến Dashboard",kitConfig:"Cấu hình Kit",kitConfigSubtitle:"Cấu hình ClaudeKit Engineer",scopeGlobal:"Toàn cục",scopeProject:"Dự án",sectionGeneral:"Cài đặt chung",sectionPaths:"Đường dẫn",sectionPrivacy:"Bảo mật & Tin cậy",sectionProject:"Phát hiện dự án",sectionIntegrations:"Tích hợp",sectionHooks:"Hooks",sectionAdvanced:"Nâng cao",fieldCodingLevel:"Cấp độ lập trình",fieldCodingLevelDesc:"Cấp độ kinh nghiệm (-1=tự động, 0=mới bắt đầu, 1=trung cấp, 2=nâng cao, 3=chuyên gia, 4=tech-lead, 5=thần)",fieldStatusline:"Chế độ thanh trạng thái",fieldStatuslineDesc:"Lượng thông tin hiển thị trên thanh trạng thái",fieldStatuslineColors:"Màu thanh trạng thái",fieldStatuslineColorsDesc:"Bật màu ANSI trong thanh trạng thái",fieldThinkingLanguage:"Ngôn ngữ suy nghĩ",fieldThinkingLanguageDesc:"Ngôn ngữ cho suy luận nội bộ của Claude (null=Tiếng Anh)",fieldResponseLanguage:"Ngôn ngữ phản hồi",fieldResponseLanguageDesc:"Ngôn ngữ cho phản hồi của Claude (null=theo người dùng)",fieldDocsPath:"Thư mục tài liệu",fieldDocsPathDesc:"Đường dẫn đến thư mục tài liệu",fieldPlansPath:"Thư mục kế hoạch",fieldPlansPathDesc:"Đường dẫn đến thư mục kế hoạch",fieldPrivacyBlock:"Chặn quyền riêng tư",fieldPrivacyBlockDesc:"Chặn truy cập file nhạy cảm (.env, credentials)",fieldTrustEnabled:"Chế độ tin cậy",fieldTrustEnabledDesc:"Tự động phê duyệt các tool calls",fieldTrustPassphrase:"Mật khẩu tin cậy",fieldTrustPassphraseDesc:"Mật khẩu để bật chế độ tin cậy",fieldProjectType:"Loại dự án",fieldProjectTypeDesc:"Ghi đè loại dự án tự động phát hiện",fieldPackageManager:"Trình quản lý gói",fieldPackageManagerDesc:"Ghi đè trình quản lý gói tự động phát hiện",fieldFramework:"Framework",fieldFrameworkDesc:"Ghi đè framework tự động phát hiện",fieldGeminiModel:"Mô hình Gemini",fieldGeminiModelDesc:"Mô hình Gemini cho các lệnh CLI",fieldResearchUseGemini:"Dùng Gemini cho nghiên cứu",fieldResearchUseGeminiDesc:"Dùng Gemini CLI thay vì WebSearch",fieldDocsMaxLoc:"Số dòng tối đa/tài liệu",fieldDocsMaxLocDesc:"Số dòng code tối đa cho mỗi file tài liệu",fieldPlanNamingFormat:"Định dạng tên kế hoạch",fieldPlanNamingFormatDesc:"Định dạng cho tên thư mục kế hoạch",fieldPlanDateFormat:"Định dạng ngày kế hoạch",fieldPlanDateFormatDesc:"Định dạng ngày cho tên kế hoạch (moment.js)",fieldPlanValidationMode:"Chế độ xác thực",fieldPlanValidationModeDesc:"Cách xác thực kế hoạch trước khi triển khai",fieldPlanMinQuestions:"Số câu hỏi tối thiểu",fieldPlanMinQuestionsDesc:"Số câu hỏi xác thực tối thiểu",fieldPlanMaxQuestions:"Số câu hỏi tối đa",fieldPlanMaxQuestionsDesc:"Số câu hỏi xác thực tối đa",fieldAssertions:"Assertions",fieldAssertionsDesc:"Các assertions và quy tắc cần thực thi",fieldHookSessionInit:"Khởi tạo phiên",fieldHookSessionInitDesc:"Phát hiện dự án và thiết lập môi trường",fieldHookSubagentInit:"Khởi tạo subagent",fieldHookSubagentInitDesc:"Inject context vào subagents",fieldHookDescriptiveName:"Tên mô tả",fieldHookDescriptiveNameDesc:"Bắt buộc đặt tên file dạng kebab-case mô tả cho scripts",fieldHookDevRulesReminder:"Nhắc nhở quy tắc dev",fieldHookDevRulesReminderDesc:"Inject context quy tắc phát triển",fieldHookUsageContextAwareness:"Nhận thức ngữ cảnh sử dụng",fieldHookUsageContextAwarenessDesc:"Nhận thức giới hạn sử dụng",fieldHookContextTracking:"Theo dõi ngữ cảnh",fieldHookContextTrackingDesc:"Theo dõi cửa sổ ngữ cảnh (% đã dùng, số token)",fieldHookScoutBlock:"Chặn Scout",fieldHookScoutBlockDesc:"Chặn thư mục nặng khỏi việc khám phá",fieldHookPrivacyBlock:"Hook chặn quyền riêng tư",fieldHookPrivacyBlockDesc:"Chặn đọc file nhạy cảm",fieldHookPostEditSimplify:"Đơn giản sau chỉnh sửa",fieldHookPostEditSimplifyDesc:"Nhắc đơn giản sau khi chỉnh sửa",sectionUpdatePipeline:"Pipeline Cập nhật",fieldAutoInitAfterUpdate:"Tự động Init sau Update",fieldAutoInitAfterUpdateDesc:"Tự động chạy ck init sau ck update khi kit có phiên bản mới",fieldAutoMigrateAfterUpdate:"Tự động Migrate sau Update",fieldAutoMigrateAfterUpdateDesc:"Tự động chạy ck migrate sau ck update (độc lập với init)",fieldMigrateProviders:"Provider Migrate",fieldMigrateProvidersDesc:"Provider nào tự động migrate. Dùng 'auto' để quét hệ thống hoặc danh sách phân cách bằng dấu phẩy.",skillsPageTitle:"Quản lý Kỹ năng",skillsPageDesc:"Cài đặt kỹ năng ClaudeKit cho các agent lập trình",availableSkills:"Kỹ năng có sẵn",installedSkills:"Kỹ năng đã cài",noSkillsFound:"Không tìm thấy kỹ năng",installSkill:"Cài đặt",uninstallSkill:"Gỡ cài đặt",manageSkill:"Quản lý",syncRegistry:"Đồng bộ",installSkillTitle:"Cài đặt Kỹ năng",selectAgents:"Chọn agent đích",installLocation:"Vị trí cài đặt",globalInstall:"Toàn cục",projectInstall:"Dự án",confirmInstall:"Cài đặt cho các agent đã chọn",installingSkill:"Đang cài đặt...",skillInstallSuccess:"Cài đặt kỹ năng thành công",skillInstallFailed:"Cài đặt thất bại",agentClaudeCode:"Claude Code",agentCursor:"Cursor",agentCodex:"Codex",agentOpencode:"OpenCode",agentGoose:"Goose",agentGeminiCli:"Gemini CLI",agentAntigravity:"Antigravity",agentGithubCopilot:"GitHub Copilot",agentAmp:"Amp",agentKilo:"Kilo",agentRoo:"Roo",agentWindsurf:"Windsurf",agentCline:"Cline",agentOpenhands:"OpenHands",installed:"Đã cài",notInstalled:"Chưa cài",allAgents:"Tất cả Agent",filterByAgent:"Lọc theo agent",skillsTitle:"Kỹ năng",skillsSubtitle:"Duyệt, cài đặt và quản lý kỹ năng cho coding agents",availableCount:"Có sẵn",installedCount:"Đã cài",agentsCount:"Agents",searchSkills:"Tìm kiếm kỹ năng...",searchShortcut:"/",sortAZ:"A-Z",sortCategory:"Danh mục",sortInstalledFirst:"Đã cài trước",listView:"Dạng danh sách",gridView:"Dạng lưới",categoryAll:"Tất cả",categoryAI:"AI",categoryUIUX:"UI/UX",categoryBackend:"Backend",categorySecurity:"Bảo mật",categoryDevOps:"DevOps",categoryDatabase:"Cơ sở dữ liệu",categoryDevelopment:"Phát triển",categoryResearch:"Nghiên cứu",categoryGeneral:"Tổng quát",categoryCore:"Cốt lõi",categoryDocumentation:"Tài liệu",categoryTooling:"Công cụ",categoryMedia:"Phương tiện",categoryFrameworks:"Framework",skillsCountLabel:"{count} kỹ năng",installToAll:"Cài cho tất cả đã phát hiện",scopeLabel:"Phạm vi cài đặt",agentInstalled:"Đã cài",agentNotInstalled:"Chưa cài",skillSource:"Vị trí nguồn",skillSourceBadge:"Nguồn",detailPanelClose:"Đóng",versionLabel:"v{version}",installAllToAllAgents:"Cài tất cả cho tất cả Agent",bulkInstallFailed:"Cài hàng loạt thất bại",noAgentsDetected:"Không phát hiện agent nào",kitBadgeEngineer:"Engineer",kitBadgeMarketing:"Marketing",customizedBadge:"Đã tùy chỉnh",installedVersionLabel:"Phiên bản cài đặt",installedAtLabel:"Cài đặt lúc",sourceTimestampLabel:"Ngày nguồn",kitLabel:"Kit",skillMetadata:"Thông tin Skill",migrate:"Di trú",migrateTitle:"Di trú",migrateSubtitle:"Chuyển toàn bộ stack Claude Code sang provider khác",migrateDetectedProviders:"Đã phát hiện",migrateSelectedProviders:"Đã chọn",migrateDiscovering:"Đang quét nguồn di trú...",migrateRefresh:"Làm mới quét",migrateRun:"Chạy di trú",migrateRunning:"Đang di trú...",migrateSourceSummary:"Tổng quan nguồn",migratePresetCodex:"Codex",migratePresetAntigravity:"Antigravity",migratePresetCore:"Codex + Antigravity + Droid",migratePresetDetected:"Tất cả đã phát hiện",migrateScope:"Phạm vi",migrateScopeProject:"Dự án",migrateScopeGlobal:"Toàn cục",migrateTypes:"Loại di trú",migrateTypeAgents:"Subagents",migrateTypeCommands:"Commands",migrateTypeSkills:"Skills",migrateTypeConfig:"Config",migrateTypeRules:"Rules",migrateTypeHooks:"Hooks",migrateSearchProviders:"Tìm provider...",migrateSelectVisible:"Chọn phần đang hiện",migrateClearSelection:"Bỏ chọn tất cả",migrateProvidersHeading:"Provider đích",migrateProvidersCountSuffix:"provider",migrateNoProvidersMatch:"Không có provider khớp bộ lọc hiện tại.",migrateSelectButton:"Chọn",migrateSelectedButton:"Đã chọn",migrateSelectProviderAction:"Chọn provider",migrateUnselectProvider:"Bỏ chọn provider",migrateCapabilitiesLabel:"loại",migrateCapabilitiesSection:"Ma trận khả năng",migrateSupported:"Hỗ trợ",migrateUnsupportedShort:"Không hỗ trợ",migrateIncludedEnabled:"Đang bật",migrateIncludedDisabled:"Đang tắt",migrateLatestTarget:"Đích gần nhất",migrateNoResultForProvider:"Chưa có kết quả di trú cho provider này.",migrateActionSummaryTitle:"Sẵn sàng di trú",migrateGlobalOnlyCommandsShort:"Commands chỉ global",migrateNoProviders:"Không có provider khả dụng.",migrateUnsupported:"Sẽ bỏ qua (không hỗ trợ)",migrateGlobalForced:"Lệnh Codex chỉ hỗ trợ global. Phạm vi sẽ tự chuyển global.",migrateResults:"Kết quả di trú",migrateInstalled:"Đã cài",migrateSkipped:"Đã bỏ qua",migrateFailed:"Lỗi",migrateProvider:"Provider",migrateStatus:"Trạng thái",migratePath:"Đường dẫn",migrateError:"Lỗi",migrateStatusInstalled:"Đã cài",migrateStatusSkipped:"Đã bỏ qua",migrateStatusFailed:"Lỗi",migrateNoResults:"Chưa có kết quả di trú.",migrateDetectFailed:"Không thể quét dữ liệu di trú",migrateExecuteFailed:"Chạy di trú thất bại",migrateSelectProvider:"Vui lòng chọn ít nhất một provider",migrateNoTypesEnabled:"Bật ít nhất một loại di trú",migrateDetectedTag:"Đã phát hiện",migrateNotDetectedTag:"Chưa phát hiện",migrateFilterRecommended:"Đề xuất",migrateActionInstall:"Cài",migrateActionUpdate:"Cập nhật",migrateActionSkip:"Bỏ qua",migrateActionConflict:"Xung đột",migrateActionDelete:"Xóa",migrateUnchanged:"chưa thay đổi",migrateConflictSectionTitle:"Xung đột",migrateConflictUseCK:"Dùng CK",migrateConflictKeepMine:"Giữ của tôi",migrateConflictSmartMerge:"Merge thông minh",migrateConflictShowDiff:"Hiện diff",migrateConflictHideDiff:"Ẩn diff",migrateConflictResolved:"Đã giải quyết",migrateConflictManual:"Thủ công",migrateConflictOverwriteAll:"Ghi đè tất cả",migrateConflictKeepAll:"Giữ tất cả",migrateSummaryTitle:"Di trú hoàn tất",migrateSummaryNewMigration:"Di trú mới",migrateType:"Loại",migrateItem:"Mục",migrateReconciling:"Đang phân tích thay đổi...",migrateReviewPlan:"Xem kế hoạch",migrateExecutePlan:"Thực hiện di trú",migrateExecuting:"Đang thực hiện di trú...",migrateResolveConflicts:"Giải quyết xung đột trước khi thực hiện",migrateSummarySubtitle:"mục đã di trú",migrateSummarySearchPlaceholder:"Tìm kiếm...",migrateSummaryFilterAll:"Tất cả",migrateSummaryCollapseAll:"Thu gọn",migrateSummaryExpandAll:"Mở rộng",migrateSummaryNoResults:"Không tìm thấy mục nào",migrateSummaryProviders:"Provider",migrateTypeUnknown:"Khác",kanbanTitle:"Bảng Kanban Kế hoạch",kanbanNoFile:"Chưa chọn file kế hoạch. Dùng tham số ?file=.",kanbanNoPhases:"Không phát hiện giai đoạn nào trong kế hoạch này",kanbanError400:"Yêu cầu không hợp lệ — thiếu tham số file",kanbanError403:"Truy cập bị từ chối — file nằm ngoài thư mục dự án",kanbanError404:"Không tìm thấy file kế hoạch",kanbanComplete:"hoàn thành",kanbanStatus_pending:"Chờ xử lý","kanbanStatus_in-progress":"Đang thực hiện",kanbanStatus_completed:"Hoàn thành",kanbanPhases:"giai đoạn",kanbanProgress:"Tiến độ",kanbanLoadError:"Không thể tải dữ liệu kế hoạch",developmentFeature:"Đang phát triển",betaFeature:"Beta",experimentalFeature:"Thử nghiệm",sectionModelTaxonomy:"Phân loại mô hình",taxonomyDescription:"Tuỳ chỉnh ánh xạ mô hình cho migration portable sang coding agent khác.",taxonomyTierHeavy:"Nặng (opus)",taxonomyTierBalanced:"Cân bằng (sonnet)",taxonomyTierLight:"Nhẹ (haiku)",taxonomyModel:"Mô hình",taxonomyEffort:"Mức nỗ lực",taxonomyResetProvider:"Đặt lại",taxonomyTier:"Cấp độ"}},kh=g.createContext(null),Um="ck-dashboard-lang";function Sv(){const t=localStorage.getItem(Um);return t==="en"||t==="vi"?t:navigator.language.startsWith("vi")?"vi":"en"}function Cv({children:t}){const[e,n]=g.useState(Sv),r=g.useCallback(o=>{localStorage.setItem(Um,o),n(o)},[]),i=g.useCallback(o=>kv[e][o],[e]),s=g.useMemo(()=>({lang:e,setLang:r,t:i}),[e,r,i]);return h.jsx(kh.Provider,{value:s,children:t})}function he(){const t=g.useContext(kh);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}class jv extends g.Component{constructor(){super(...arguments);Nd(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("App error:",n,r.componentStack)}render(){if(this.state.hasError){const n=this.state.error?.name==="ServerUnavailableError";return h.jsx(kh.Consumer,{children:r=>h.jsx("div",{className:"flex h-screen items-center justify-center bg-dash-bg",children:h.jsx("div",{className:"text-center space-y-4 max-w-md px-6",children:n?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-orange-500/10 border border-orange-500/30 flex items-center justify-center text-3xl",children:"🔌"}),h.jsx("h1",{className:"text-2xl font-bold text-orange-500",children:r?.t("serverNotRunning")??"Server Not Running"}),h.jsx("p",{className:"text-dash-text-secondary",children:r?.t("startServerMessage")??"The Config UI requires the backend server to be running."}),h.jsxs("div",{className:"bg-dash-surface border border-dash-border rounded-lg p-4",children:[h.jsx("p",{className:"text-xs text-dash-text-muted uppercase tracking-widest mb-2 font-bold",children:r?.t("runThisCommand")??"Run this command"}),h.jsx("code",{className:"block text-sm text-dash-accent font-mono bg-dash-bg px-3 py-2 rounded border border-dash-border",children:"ck config"})]}),h.jsx("button",{onClick:()=>window.location.reload(),className:"px-6 py-2 bg-dash-accent text-dash-bg rounded-lg font-bold hover:bg-dash-accent-hover transition-colors",children:r?.t("tryAgain")??"Try Again"})]}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"text-2xl font-bold text-red-500",children:r?.t("somethingWentWrong")??"Something went wrong"}),h.jsx("p",{className:"text-dash-text-muted",children:this.state.error?.message}),h.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-dash-accent text-white rounded-md hover:opacity-90",children:r?.t("reloadApp")??"Reload App"})]})})})})}return this.props.children}}const tr=({direction:t="horizontal",isDragging:e=!1,onMouseDown:n})=>{const r=t==="horizontal";return h.jsx("div",{onMouseDown:n,className:`
|
|
22
22
|
group flex items-center justify-center shrink-0
|
|
23
23
|
${r?"w-2 cursor-col-resize":"h-2 cursor-row-resize"}
|
|
24
24
|
${e?"bg-dash-accent/20":"hover:bg-dash-surface-hover/50"}
|
|
@@ -172,19 +172,19 @@ Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}
|
|
|
172
172
|
}`},"updatePipeline.autoInitAfterUpdate":{path:"updatePipeline.autoInitAfterUpdate",type:"boolean",default:"false",description:"Automatically runs `ck init` after `ck update` when the installed kit content has a newer version.",descriptionVi:"Tự động chạy `ck init` sau `ck update` khi nội dung kit đã cài có phiên bản mới hơn.",effect:"Power users can reduce the update flow to one command. This setting is read from global config for update runs.",effectVi:"Người dùng nâng cao có thể rút gọn quy trình cập nhật còn một lệnh. Thiết lập này được đọc từ global config trong lúc update.",example:`{
|
|
173
173
|
"updatePipeline": {
|
|
174
174
|
"autoInitAfterUpdate": true,
|
|
175
|
-
"
|
|
175
|
+
"autoMigrateAfterUpdate": true,
|
|
176
176
|
"migrateProviders": ["codex"]
|
|
177
177
|
}
|
|
178
|
-
}`},"updatePipeline.
|
|
178
|
+
}`},"updatePipeline.autoMigrateAfterUpdate":{path:"updatePipeline.autoMigrateAfterUpdate",type:"boolean",default:"false",description:"Automatically runs `ck migrate` as an independent step after `ck update` for detected or configured providers.",descriptionVi:"Tự động chạy `ck migrate` như bước độc lập sau `ck update` cho các provider được phát hiện hoặc đã cấu hình.",effect:"Runs independently of kit init — even if kit is already at latest, providers can still be synced.",effectVi:"Chạy độc lập với kit init — ngay cả khi kit đã ở phiên bản mới nhất, provider vẫn có thể được đồng bộ.",example:`{
|
|
179
179
|
"updatePipeline": {
|
|
180
180
|
"autoInitAfterUpdate": true,
|
|
181
|
-
"
|
|
181
|
+
"autoMigrateAfterUpdate": true,
|
|
182
182
|
"migrateProviders": ["codex"]
|
|
183
183
|
}
|
|
184
|
-
}`},"updatePipeline.migrateProviders":{path:"updatePipeline.migrateProviders",type:'"auto" | string[]',default:'"auto"',validValues:["auto"],description:'Choose which providers are auto-migrated
|
|
184
|
+
}`},"updatePipeline.migrateProviders":{path:"updatePipeline.migrateProviders",type:'"auto" | string[]',default:'"auto"',validValues:["auto"],description:'Choose which providers are auto-migrated. Use `auto` to scan the filesystem, enter a comma-separated list such as `codex, cursor`, or paste a JSON array like `["codex"]` and the form will normalize it.',descriptionVi:'Chọn provider nào sẽ được auto-migrate. Dùng `auto` để quét hệ thống tệp, nhập danh sách phân tách bằng dấu phẩy như `codex, cursor`, hoặc dán JSON array như `["codex"]` và form sẽ tự chuẩn hóa.',effect:"`auto` targets every detected provider. A specific list limits the auto-migrate step to those providers only.",effectVi:"`auto` nhắm đến mọi provider được phát hiện. Danh sách cụ thể sẽ giới hạn bước auto-migrate chỉ còn các provider đó.",example:`{
|
|
185
185
|
"updatePipeline": {
|
|
186
186
|
"autoInitAfterUpdate": true,
|
|
187
|
-
"
|
|
187
|
+
"autoMigrateAfterUpdate": true,
|
|
188
188
|
"migrateProviders": ["codex"]
|
|
189
189
|
}
|
|
190
190
|
}`},statusline:{path:"statusline",type:"string",default:'"full"',validValues:["full","compact","minimal","none"],description:"Controls how much information is displayed in the Claude Code status line during operations.",descriptionVi:"Điều khiển lượng thông tin hiển thị trong dòng trạng thái Claude Code trong khi thao tác.",effect:"'full' shows all details (tokens, model, cost). 'compact' shows summary. 'minimal' shows only critical info. 'none' hides status line.",effectVi:"'full' hiển thị tất cả chi tiết (token, model, chi phí). 'compact' hiển thị tóm tắt. 'minimal' chỉ hiển thị thông tin quan trọng. 'none' ẩn dòng trạng thái.",example:`{
|
|
@@ -238,6 +238,6 @@ Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}
|
|
|
238
238
|
bg-transparent border border-amber-500/30 rounded px-2 py-1
|
|
239
239
|
focus:outline-none focus:ring-2 focus:ring-amber-500/50
|
|
240
240
|
cursor-pointer appearance-none`,title:s("selectVersion"),children:o.map(p=>{const m=p.version===r,b=p.version===n,x=`v${p.version.replace(/^v/,"")}${m?` (${s("latestVersion")})`:""}${p.isPrerelease?` [${s("prereleaseLabel")}]`:""}${b?` - ${s("currentVersionLabel")}`:""}`;return h.jsx("option",{value:p.version,disabled:b,children:x},p.version)})})},nj=({version:t,installedAt:e,channel:n="stable",externalStatus:r,externalLatestVersion:i,onStatusChange:s,disabled:o})=>{const{t:a}=he(),[l,c]=g.useState("idle"),[d,u]=g.useState(null),[f,p]=g.useState(!1),[m,b]=g.useState(null),x=r??l,w=i??d,v=async()=>{const C=O=>{s||c(O)},k=O=>{s||u(O)};C("checking"),s&&s("checking",null);try{const y=await(await fetch(`/api/system/check-updates?target=cli&channel=${n}`)).json();y.updateAvailable?(C("update-available"),k(y.latest),s&&s("update-available",y.latest)):(C("up-to-date"),s&&s("up-to-date",null))}catch{C("idle"),s&&s("idle",null)}},S=async()=>{window.location.reload()};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dash-panel p-5 transition-colors hover:border-dash-accent/30",children:h.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx(Gb,{status:x,ariaLabel:a(x==="up-to-date"?"upToDate":x==="update-available"?"updateAvailable":"checking")}),h.jsx("h3",{className:"text-base font-semibold text-dash-text",children:a("cliCard")}),n==="beta"&&h.jsx("span",{className:"px-2 py-0.5 text-[11px] font-semibold bg-amber-500/15 text-amber-500 rounded border border-amber-500/20",children:a("betaBadge")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-dash-text-secondary",children:[h.jsxs("span",{className:"px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70 mono",children:[a("currentVersionLabel"),": v",t.replace(/^v/,"")]}),e&&h.jsx("span",{className:"px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70 text-dash-text-muted",children:new Date(e).toLocaleDateString()})]}),x==="update-available"&&w&&h.jsxs("div",{className:"inline-flex items-center rounded-md border border-amber-500/25 bg-amber-500/10 px-2.5 py-1 text-xs text-amber-500 font-medium",children:["v",t.replace(/^v/,"")," ","->"," v",w.replace(/^v/,"")]})]}),h.jsx(rj,{status:x,currentVersion:t,latestVersion:w,onCheck:v,onUpdate:()=>p(!0),onVersionSelect:b,disabled:o})]})}),h.jsx(ad,{isOpen:f,onClose:()=>p(!1),target:"cli",targetVersion:m??w??void 0,onComplete:S})]})},rj=({status:t,currentVersion:e,latestVersion:n,onCheck:r,onUpdate:i,onVersionSelect:s,disabled:o})=>{const{t:a}=he();return t==="checking"?h.jsxs("span",{className:"text-xs text-dash-text-muted flex items-center gap-1.5 px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70",children:[h.jsx("span",{className:"w-3 h-3 border-2 border-dash-text-muted border-t-transparent rounded-full animate-spin"}),a("checking")]}):t==="up-to-date"?h.jsx("span",{className:"px-2.5 py-1 text-xs rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-500 font-semibold",children:a("upToDate")}):t==="update-available"&&n?h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(qb,{target:"cli",currentVersion:e,latestVersion:n,onVersionSelect:l=>{s(l),i()}})}):h.jsx("button",{type:"button",onClick:r,disabled:o,className:"dash-focus-ring px-3 py-2 rounded-lg text-xs font-semibold border border-dash-border bg-dash-surface text-dash-accent hover:text-dash-accent-hover hover:bg-dash-surface-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a("checkForUpdates")})},ij=({configPath:t,nodeVersion:e,bunVersion:n,os:r})=>{const{t:i}=he();return h.jsxs("div",{className:"dash-panel p-5",children:[h.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-dash-text mb-3",children:i("environment")}),h.jsxs("div",{className:"grid grid-cols-1 gap-2 text-sm md:grid-cols-2",children:[h.jsx(Io,{label:i("claudeConfigPath"),value:t,mono:!0}),h.jsx(Io,{label:i("osVersion"),value:r}),h.jsx(Io,{label:i("nodeVersion"),value:e,mono:!0}),n&&h.jsx(Io,{label:i("bunVersion"),value:n,mono:!0})]})]})},Io=({label:t,value:e,mono:n})=>h.jsxs("div",{className:"rounded-lg border border-dash-border bg-dash-bg/70 p-2.5",children:[h.jsx("p",{className:"text-dash-text-muted text-[11px] uppercase tracking-wide mb-1",children:t}),h.jsx("p",{className:`text-dash-text-secondary break-all ${n?"mono text-xs":"text-sm"}`,children:e})]}),sj={ok:"bg-emerald-500/10 text-emerald-500 border-emerald-500/20",skip:"bg-slate-500/10 text-slate-300 border-slate-500/20",warn:"bg-amber-500/10 text-amber-400 border-amber-500/20",block:"bg-orange-500/10 text-orange-400 border-orange-500/20",error:"bg-red-500/10 text-red-400 border-red-500/20",crash:"bg-red-500/10 text-red-400 border-red-500/20"};function cp(t,e){if(!t)return e;try{return new Intl.DateTimeFormat(void 0,{month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(t))}catch{return t}}const oj=()=>{const{t}=he(),[e,n]=g.useState([]),[r,i]=g.useState("global"),[s,o]=g.useState(null),[a,l]=g.useState(!0),[c,d]=g.useState(null),u=g.useRef(0),f=g.useRef(null),p=g.useCallback(async v=>{u.current+=1;const S=u.current;f.current?.abort();const C=new AbortController;f.current=C,l(!0),d(null);try{const k=await Lv(v==="global"?{scope:"global",limit:40,signal:C.signal}:{scope:"project",projectId:v,limit:40,signal:C.signal});if(S!==u.current)return;o(k)}catch(k){if(C.signal.aborted||S!==u.current)return;o(null),d(k instanceof Error?k.message:t("hookDiagnosticsLoadFailed"))}finally{S===u.current&&(l(!1),f.current=null)}},[t]);g.useEffect(()=>{let v=!1;return Ch().then(S=>{v||n(S.map(C=>({id:C.id,name:C.name})))}).catch(()=>{v||n([])}),()=>{v=!0}},[]),g.useEffect(()=>{p(r)},[p,r]),g.useEffect(()=>()=>{f.current?.abort()},[]);const m=s?.summary,b=m?.statusCounts??{},x=s?.entries??[],w=g.useMemo(()=>[{label:t("hookDiagnosticsEntries"),value:String(m?.total??0)},{label:t("hookDiagnosticsCrashes"),value:String(b.crash??0)},{label:t("hookDiagnosticsWarnings"),value:String(b.warn??0)},{label:t("hookDiagnosticsBlocks"),value:String(b.block??0)}],[m?.total,b.block,b.crash,b.warn,t]);return h.jsxs("section",{className:"dash-panel p-4 space-y-4",children:[h.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[h.jsxs("div",{className:"space-y-1 min-w-0",children:[h.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-dash-text",children:t("hookDiagnosticsTitle")}),h.jsx("p",{className:"text-xs text-dash-text-secondary",children:t("hookDiagnosticsDesc")}),h.jsx("p",{className:"mono text-[11px] text-dash-text-muted break-all",children:s?.path??t("hookDiagnosticsPathPending")})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("select",{value:r,onChange:v=>i(v.target.value),className:"rounded-lg border border-dash-border bg-dash-bg px-3 py-2 text-xs text-dash-text",children:[h.jsx("option",{value:"global",children:t("hookDiagnosticsScopeGlobal")}),e.map(v=>h.jsx("option",{value:v.id,children:v.name},v.id))]}),h.jsx("button",{type:"button",onClick:()=>void p(r),className:"rounded-lg border border-dash-border bg-dash-surface px-3 py-2 text-xs font-semibold text-dash-text-secondary hover:bg-dash-surface-hover",children:t("refresh")})]})]}),h.jsx("div",{className:"grid grid-cols-2 gap-3 xl:grid-cols-4",children:w.map(v=>h.jsxs("div",{className:"rounded-lg border border-dash-border bg-dash-bg/60 px-3 py-2",children:[h.jsx("p",{className:"text-[11px] uppercase tracking-wide text-dash-text-muted",children:v.label}),h.jsx("p",{className:"mono mt-1 text-lg font-semibold text-dash-text",children:v.value})]},v.label))}),m?.lastEventAt&&h.jsxs("p",{className:"text-xs text-dash-text-muted",children:[t("hookDiagnosticsLastEvent"),":"," ",cp(m.lastEventAt,t("hookDiagnosticsUnknown"))]}),m&&(m.parseErrors>0||m.truncated)&&h.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-200",children:[m.parseErrors>0&&h.jsx("p",{children:t("hookDiagnosticsParseErrorsNotice").replace("{count}",String(m.parseErrors))}),m.truncated&&h.jsx("p",{children:t("hookDiagnosticsTruncatedNotice")})]}),a&&h.jsx("p",{className:"text-sm text-dash-text-muted",children:t("hookDiagnosticsLoading")}),c&&h.jsx("p",{className:"text-sm text-red-400",children:c}),!a&&!c&&s&&!s.exists&&h.jsx("p",{className:"text-sm text-dash-text-muted",children:t("hookDiagnosticsMissing")}),!a&&!c&&s?.exists&&h.jsx("div",{className:"space-y-2",children:x.length===0?h.jsx("p",{className:"text-sm text-dash-text-muted",children:t("hookDiagnosticsEmpty")}):x.map((v,S)=>h.jsxs("div",{className:"rounded-lg border border-dash-border bg-dash-bg/70 px-3 py-3",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("span",{className:"mono text-[11px] text-dash-text-muted",children:cp(v.ts,t("hookDiagnosticsUnknown"))}),h.jsx("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase ${sj[v.status]??"bg-dash-surface text-dash-text border-dash-border"}`,children:v.status}),h.jsx("span",{className:"text-sm font-medium text-dash-text",children:v.hook}),v.event&&h.jsx("span",{className:"text-xs text-dash-text-muted",children:v.event}),v.tool&&h.jsxs("span",{className:"text-xs text-dash-text-muted",children:[t("hookDiagnosticsToolLabel"),": ",v.tool]})]}),(v.note||v.target||v.error)&&h.jsxs("div",{className:"mt-2 space-y-1 text-xs text-dash-text-secondary",children:[v.note&&h.jsx("p",{children:v.note}),v.target&&h.jsxs("p",{className:"mono",children:[t("hookDiagnosticsTargetLabel"),": ",v.target]}),v.error&&h.jsx("p",{className:"text-red-400",children:v.error})]})]},`${v.ts}-${v.hook}-${S}`))})]})};function aj(t){let e=0,n=0,r=0;for(const i of t)i.ownership==="ck"?e++:i.ownership==="user"?n++:i.ownership==="ck-modified"&&r++;return{ck:e,user:n,modified:r}}function lj(t){const e={skills:0,commands:0,rules:0,hooks:0,settings:0,other:0};for(const n of t){const r=n.path;r.startsWith("skills/")?e.skills++:r.startsWith("commands/")?e.commands++:r.startsWith("rules/")?e.rules++:r.startsWith("hooks/")||r==="hooks.json"?e.hooks++:r.startsWith("settings/")||r==="settings.json"?e.settings++:e.other++}return e}const cj=({kitName:t,kit:e,channel:n="stable",externalStatus:r,externalLatestVersion:i,onStatusChange:s,disabled:o})=>{const{t:a}=he(),[l,c]=g.useState("idle"),[d,u]=g.useState(null),[f,p]=g.useState(!1),[m,b]=g.useState(null),x=r??l,w=i??d,v=e.files??[],S=aj(v),C=lj(v),k=async()=>{const y=A=>{s||c(A)},M=A=>{s||u(A)};y("checking"),s&&s("checking",null);try{const R=await(await fetch(`/api/system/check-updates?target=kit&kit=${t}&channel=${n}`)).json();R.updateAvailable?(y("update-available"),M(R.latest),s&&s("update-available",R.latest)):(y("up-to-date"),s&&s("up-to-date",null))}catch{y("idle"),s&&s("idle",null)}},O=async()=>{window.location.reload()};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dash-panel p-5 space-y-4 transition-colors hover:border-dash-accent/30",children:[h.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx(Gb,{status:x,ariaLabel:a(x==="up-to-date"?"upToDate":x==="update-available"?"updateAvailable":"checking")}),h.jsxs("h3",{className:"text-base font-semibold text-dash-text capitalize",children:[t," Kit"]}),n==="beta"&&h.jsx("span",{className:"px-2 py-0.5 text-[11px] font-semibold bg-amber-500/15 text-amber-500 rounded border border-amber-500/20",children:a("betaBadge")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-dash-text-secondary",children:[h.jsxs("span",{className:"px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70 mono",children:[a("currentVersionLabel"),": v",(e.version??"?").replace(/^v/,"")]}),e.installedAt&&h.jsx("span",{className:"px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70 text-dash-text-muted",children:new Date(e.installedAt).toLocaleDateString()}),h.jsxs("span",{className:"px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70 mono",children:[a("components"),": ",v.length]})]}),x==="update-available"&&w&&h.jsxs("div",{className:"inline-flex items-center rounded-md border border-amber-500/25 bg-amber-500/10 px-2.5 py-1 text-xs text-amber-500 font-medium",children:["v",(e.version??"?").replace(/^v/,"")," ","->"," v",w.replace(/^v/,"")]})]}),h.jsx(hj,{status:x,currentVersion:e.version??"0.0.0",latestVersion:w,kitName:t,onCheck:k,onUpdate:()=>p(!0),onVersionSelect:b,disabled:o})]}),v.length>0&&h.jsx("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2 xl:grid-cols-3",children:Object.entries(C).filter(([,y])=>y>0).map(([y,M])=>h.jsxs("div",{className:"flex items-center justify-between px-2.5 py-2 bg-dash-bg/70 border border-dash-border rounded-lg text-xs",children:[h.jsx("span",{className:"text-dash-text-secondary capitalize",children:y}),h.jsx("span",{className:"font-bold mono text-dash-text",children:M})]},y))}),v.length>0&&h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-dash-text-muted",children:[h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-dash-border bg-dash-bg/70",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500 shrink-0"}),S.ck," ",a("ownershipCk")]}),S.user>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-dash-border bg-dash-bg/70",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-500 shrink-0"}),S.user," ",a("ownershipUser")]}),S.modified>0&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-dash-border bg-dash-bg/70",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-500 shrink-0"}),S.modified," ",a("ownershipModified")]})]}),v.length===0&&h.jsx("p",{className:"text-xs text-dash-text-muted",children:a("noTrackedFiles")})]}),h.jsx(ad,{isOpen:f,onClose:()=>p(!1),target:"kit",kitName:t,targetVersion:m??w??void 0,onComplete:O})]})},hj=({status:t,currentVersion:e,latestVersion:n,kitName:r,onCheck:i,onUpdate:s,onVersionSelect:o,disabled:a})=>{const{t:l}=he();return t==="checking"?h.jsxs("span",{className:"text-xs text-dash-text-muted flex items-center gap-1.5 px-2 py-1 rounded-md border border-dash-border bg-dash-bg/70",children:[h.jsx("span",{className:"w-3 h-3 border-2 border-dash-text-muted border-t-transparent rounded-full animate-spin"}),l("checking")]}):t==="up-to-date"?h.jsx("span",{className:"px-2.5 py-1 text-xs rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-500 font-semibold",children:l("upToDate")}):t==="update-available"&&n?h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(qb,{target:"kit",kitName:r,currentVersion:e,latestVersion:n,onVersionSelect:c=>{o(c),s()}})}):h.jsx("button",{type:"button",onClick:i,disabled:a,className:"dash-focus-ring px-3 py-2 rounded-lg text-xs font-semibold border border-dash-border bg-dash-surface text-dash-accent hover:text-dash-accent-hover hover:bg-dash-surface-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l("checkForUpdates")})},hp="claudekit-update-channel",dp="claudekit-system-filter",dj=t=>/-(alpha|beta|rc|dev|next)/.test(t),uj=t=>t==="all"||t==="updates"||t==="up-to-date"||t==="cli"||t==="kits"?t:"all",up=t=>t==="update-available"?0:t==="checking"?1:t==="idle"?2:3,fj=({metadata:t})=>{const{t:e}=he(),[n,r]=g.useState(null),[i,s]=g.useState([]),[o,a]=g.useState(!1),[l,c]=g.useState(!1),[d,u]=g.useState(!1),[f,p]=g.useState("stable"),[m,b]=g.useState(()=>uj(localStorage.getItem(dp))),x=g.useRef(!1),w=g.useRef(0),v=g.useMemo(()=>!t.kits||typeof t.kits!="object"?[]:Object.entries(t.kits),[t.kits]),S=v.length>0,C=t.name,k=t.version,O=t.installedAt,y=v.length>0||C;g.useEffect(()=>{if(!n)return;const q=[];if(q.push({id:"cli",type:"cli",status:"idle",currentVersion:n.cliVersion,latestVersion:null}),S&&v.length>0)for(const[Me,Ce]of v){const Ie=Ce;q.push({id:Me,type:"kit",status:"idle",currentVersion:Ie.version??"?",latestVersion:null})}else C&&q.push({id:C,type:"kit",status:"idle",currentVersion:k??"?",latestVersion:null});s(q)},[n,S,v,C,k]),g.useEffect(()=>{fetch("/api/system/info").then(q=>q.json()).then(r).catch(()=>r(null))},[]),g.useEffect(()=>{const q=localStorage.getItem(hp);q==="stable"||q==="beta"?p(q):n?.cliVersion&&p(dj(n.cliVersion)?"beta":"stable")},[n?.cliVersion]);const M=q=>{p(q),localStorage.setItem(hp,q)};g.useEffect(()=>{localStorage.setItem(dp,m)},[m]);const A=(q,Me,Ce)=>{s(Ie=>Ie.map(Se=>Se.id===q?{...Se,status:Me,latestVersion:Ce}:Se))},R=g.useCallback(async()=>{if(i.length===0)return;const q=w.current+1;w.current=q,a(!0),s(Me=>Me.map(Ce=>Ce.status==="checking"&&Ce.latestVersion===null?Ce:{...Ce,status:"checking",latestVersion:null}));try{const Me=i.map(async Ie=>{try{const Se=Ie.type==="cli"?`target=cli&channel=${f}`:`target=kit&kit=${Ie.id}&channel=${f}`,I=await(await fetch(`/api/system/check-updates?${Se}`)).json();return{id:Ie.id,status:I.updateAvailable?"update-available":"up-to-date",latestVersion:I.latest}}catch{return{id:Ie.id,status:"idle",latestVersion:null}}}),Ce=await Promise.all(Me);if(w.current!==q)return;s(Ie=>Ie.map(Se=>{const gt=Ce.find(I=>I.id===Se.id);return gt?{...Se,status:gt.status,latestVersion:gt.latestVersion}:Se}))}finally{w.current===q&&a(!1)}},[f,i]),N=q=>{b(q),(q==="updates"||q==="up-to-date")&&!o&&!l&&i.length>0&&i.every(Ce=>Ce.status==="idle")&&(x.current=!0,R())},L=()=>{u(!0)},H=()=>{window.location.reload()},$=i.filter(q=>q.status==="update-available").length,F=i.filter(q=>q.status==="up-to-date").length,G=i.filter(q=>q.status==="up-to-date"||q.status==="update-available").length,ue=i.some(q=>q.status==="checking"),X=S&&v.length>0?v.length:C?1:0,te=i.find(q=>q.id==="cli")?.status??"idle",oe=g.useMemo(()=>S&&v.length>0?v.map(([q,Me])=>({id:q,kitName:q,kit:Me})):C?[{id:C,kitName:C,kit:{version:k,installedAt:O}}]:[],[S,v,C,k,O]),pe=g.useMemo(()=>{const Me=[...oe.map(Ce=>({...Ce,status:i.find(Ie=>Ie.id===Ce.id)?.status??"idle"}))].sort((Ce,Ie)=>{const Se=up(Ce.status)-up(Ie.status);return Se!==0?Se:Ce.kitName.localeCompare(Ie.kitName)});return m==="updates"?Me.filter(Ce=>Ce.status==="update-available"):m==="up-to-date"?Me.filter(Ce=>Ce.status==="up-to-date"):m==="cli"?[]:Me},[oe,i,m]),Y=m==="all"||m==="cli"||m==="updates"&&te==="update-available"||m==="up-to-date"&&te==="up-to-date",le=(Y?1:0)+pe.length;g.useEffect(()=>{if(!(!(m==="updates"||m==="up-to-date")||x.current)&&!(o||l||i.length===0)){if(!i.every(Me=>Me.status==="idle")){x.current=!0;return}x.current=!0,R()}},[R,o,l,i,m]);const me=g.useMemo(()=>le!==0?"":(m==="updates"||m==="up-to-date")&&ue?e("checkingAll"):(m==="updates"||m==="up-to-date")&&G===0?e("runCheckAllForFilter"):m==="updates"&&G>0&&$===0?e("noUpdatesFound"):m==="up-to-date"&&G>0&&F===0?e("noUpToDateYet"):e("noComponentsMatchFilter"),[le,m,ue,G,$,F,e]),ke=!y&&m!=="cli",Qe=e("componentFilterUpdatesCount").replace("{count}",$.toString()),mt=e("componentFilterUpToDateCount").replace("{count}",F.toString());return h.jsxs("div",{className:"relative",children:[h.jsxs("div",{className:"pointer-events-none absolute inset-0 -z-10 overflow-hidden",children:[h.jsx("div",{className:"absolute -top-20 -right-8 h-56 w-56 rounded-full bg-dash-accent/10 blur-3xl"}),h.jsx("div",{className:"absolute -bottom-24 -left-10 h-64 w-64 rounded-full bg-dash-accent/5 blur-3xl"})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsx("section",{className:"dash-panel dash-sticky-glass p-4 md:p-5 sticky top-0 z-10",children:h.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("p",{className:"mono text-[10px] uppercase tracking-[0.16em] text-dash-text-muted",children:e("systemControlTower")}),h.jsx("h2",{className:"text-xl md:text-2xl font-semibold text-dash-text",children:e("systemOverviewTitle")}),h.jsx("p",{className:"text-sm text-dash-text-secondary max-w-2xl",children:e("systemOverviewDesc")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(ej,{value:f,onChange:M,disabled:o||l}),i.length>0&&h.jsx(ZC,{components:i,isChecking:o,isUpdating:l,onCheckAll:R,onUpdateAll:L})]})]})}),h.jsxs("section",{className:"grid grid-cols-2 gap-3 xl:grid-cols-5",children:[h.jsx(pi,{label:e("components"),value:i.length.toString()}),h.jsx(pi,{label:e("kitsLabel"),value:X.toString()}),h.jsx(pi,{label:e("updateAvailable"),value:$.toString(),tone:"accent"}),h.jsx(pi,{label:e("upToDate"),value:F.toString(),tone:"success"}),h.jsx(pi,{label:e("checkedComponents"),value:G.toString()})]}),h.jsxs("section",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_320px]",children:[h.jsxs("div",{className:"space-y-3 min-w-0",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-1",children:[h.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-dash-text",children:e("installedComponentsHeading")}),h.jsxs("fieldset",{className:"flex items-center gap-2",children:[h.jsx("legend",{className:"sr-only",children:e("installedComponentsHeading")}),h.jsx(mi,{label:e("componentFilterAll"),value:m,activeValue:"all",onClick:()=>N("all")}),h.jsx(mi,{label:Qe,value:m,activeValue:"updates",onClick:()=>N("updates")}),h.jsx(mi,{label:mt,value:m,activeValue:"up-to-date",onClick:()=>N("up-to-date")}),h.jsx(mi,{label:e("componentFilterCli"),value:m,activeValue:"cli",onClick:()=>N("cli")}),h.jsx(mi,{label:e("componentFilterKits"),value:m,activeValue:"kits",onClick:()=>N("kits")})]})]}),Y&&h.jsx(nj,{version:n?.cliVersion??"...",installedAt:void 0,externalStatus:i.find(q=>q.id==="cli")?.status,externalLatestVersion:i.find(q=>q.id==="cli")?.latestVersion??null,onStatusChange:(q,Me)=>A("cli",q,Me),disabled:o||l,channel:f}),pe.map(q=>{const Me=i.find(Ce=>Ce.id===q.id);return h.jsx(cj,{kitName:q.kitName,kit:q.kit,externalStatus:Me?.status,externalLatestVersion:Me?.latestVersion??null,onStatusChange:(Ce,Ie)=>A(q.id,Ce,Ie),disabled:o||l,channel:f},q.id)}),ke&&h.jsx("div",{className:"dash-panel-muted p-6 text-center opacity-80",children:h.jsx("p",{className:"text-sm text-dash-text-secondary",children:e("noKitInstalled")})}),!ke&&le===0&&h.jsx("div",{className:"dash-panel-muted p-6 text-center opacity-80",children:h.jsx("p",{className:"text-sm text-dash-text-secondary",children:me})})]}),h.jsxs("aside",{className:"space-y-3 xl:sticky xl:top-20 self-start",children:[h.jsxs("div",{className:"dash-panel p-4 space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-dash-text",children:e("updateReadiness")}),h.jsxs("div",{className:"space-y-2",children:[h.jsx($o,{label:e("updateAvailable"),value:$.toString(),tone:$>0?"accent":"default"}),h.jsx($o,{label:e("upToDate"),value:F.toString(),tone:"success"}),h.jsx($o,{label:e("checkedComponents"),value:G.toString()}),h.jsx($o,{label:e("activeChannel"),value:e(f==="beta"?"channelBeta":"channelStable")})]})]}),n&&h.jsx(ij,{configPath:n.configPath,nodeVersion:n.nodeVersion,bunVersion:n.bunVersion,os:n.os}),h.jsx(oj,{})]})]})]}),h.jsx(ad,{isOpen:d,onClose:()=>u(!1),target:"cli",mode:"batch",components:i.filter(q=>q.status==="update-available").map(q=>({id:q.id,name:q.id==="cli"?"CLI":`${q.id} Kit`})),onComplete:H})]})},pi=({label:t,value:e,tone:n="default"})=>{const r=n==="accent"?"text-dash-accent":n==="success"?"text-emerald-500":"text-dash-text";return h.jsxs("div",{className:"dash-panel p-3",children:[h.jsx("p",{className:"text-[11px] uppercase tracking-wide text-dash-text-muted",children:t}),h.jsx("p",{className:`mt-1 mono text-xl font-semibold ${r}`,children:e})]})},$o=({label:t,value:e,tone:n="default"})=>{const r=n==="accent"?"text-dash-accent":n==="success"?"text-emerald-500":"text-dash-text-secondary";return h.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-dash-border bg-dash-bg/70 px-3 py-2",children:[h.jsx("span",{className:"text-xs text-dash-text-muted",children:t}),h.jsx("span",{className:`mono text-xs font-semibold ${r}`,children:e})]})},mi=({label:t,value:e,activeValue:n,onClick:r})=>{const i=e===n;return h.jsx("button",{type:"button",onClick:r,"aria-pressed":i,className:`dash-focus-ring px-2.5 py-1.5 rounded-lg text-[11px] font-semibold border transition-colors ${i?"border-dash-accent/30 bg-dash-accent-subtle text-dash-accent":"border-dash-border bg-dash-surface text-dash-text-muted hover:text-dash-text hover:bg-dash-surface-hover"}`,children:t})},Vl="~/.claude/settings.json",Bo="{}",pj=()=>{const{t}=he(),[e,n]=g.useState(!0),[r,i]=g.useState(Vl),[s,o]=g.useState(Bo),[a,l]=g.useState(Bo),[c,d]=g.useState(0),[u,f]=g.useState(!1),[p,m]=g.useState(!1),[b,x]=g.useState("idle"),[w,v]=g.useState(null),[S,C]=g.useState(null);g.useEffect(()=>{let A=!1;return(async()=>{n(!0),m(!1);try{const N=await Ev();if(A)return;const L=JSON.stringify(N.settings??{},null,2);i(N.path||Vl),f(!!N.exists),o(L),l(L),v(null)}catch{if(A)return;m(!0),f(!1),i(Vl),o(Bo),l(Bo)}finally{A||n(!1)}})(),()=>{A=!0}},[]);const k=A=>{l(A),C(null);try{JSON.parse(A),v(null)}catch(R){v(R instanceof Error?R.message:"Invalid JSON")}},O=()=>{l(s),v(null),C(null),x("idle")},y=async()=>{if(!(e||w)){x("saving"),C(null);try{const A=JSON.parse(a),R=JSON.stringify(A,null,2),N=await Rv(A);o(R),l(R),f(!0),x("saved"),C(N.backupPath?`${t("settingsBackupSaved")}: ${N.backupPath}`:t("saved")),setTimeout(()=>x("idle"),2e3)}catch(A){x("error"),C(A instanceof Error?A.message:t("saveFailed")),setTimeout(()=>x("idle"),3e3)}}},M=a!==s;return h.jsxs("section",{className:"h-full min-h-0 flex flex-col rounded-xl border border-dash-border bg-dash-surface p-3 shadow-sm",children:[h.jsxs("div",{className:"mb-2 flex items-end justify-between gap-3 px-1",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-dash-text",children:t("settingsJsonHeading")}),h.jsx("p",{className:"mono text-[11px] text-dash-text-muted truncate",children:r})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{type:"button",onClick:O,disabled:e||!M||b==="saving",className:"px-3 py-1.5 rounded-lg bg-dash-surface text-xs font-bold text-dash-text-secondary hover:bg-dash-surface-hover transition-colors border border-dash-border disabled:opacity-50 disabled:cursor-not-allowed",children:t("discard")}),h.jsx("button",{type:"button",onClick:y,disabled:e||b==="saving"||!!w||!M,className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all tracking-widest uppercase disabled:opacity-50 disabled:cursor-not-allowed ${b==="saved"?"bg-green-500 text-white shadow-lg shadow-green-500/20":b==="error"?"bg-red-500 text-white":"bg-dash-accent text-dash-bg hover:bg-dash-accent-hover shadow-lg shadow-dash-accent/20"}`,children:t(b==="saving"?"saving":b==="saved"?"saved":b==="error"?"saveFailed":"saveChanges")})]})]}),h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(od,{width:100,isLoading:e,jsonText:a,cursorLine:c,syntaxError:w,onChange:k,onCursorLineChange:d})}),S&&h.jsx("p",{className:`mt-2 px-1 text-xs ${b==="error"?"text-red-500":"text-dash-text-muted"}`,children:S}),!e&&!p&&!u&&h.jsx("p",{className:"mt-2 px-1 text-xs text-dash-text-muted",children:t("settingsJsonMissing")}),!e&&p&&h.jsx("p",{className:"mt-2 px-1 text-xs text-red-500",children:t("settingsJsonLoadFailed")})]})},mj=(t,e)=>{const[n,r]=g.useState(null);return g.useEffect(()=>{const i=t.split(`
|
|
241
|
-
`),s=[];let o=null;for(let a=0;a<=Math.min(e,i.length-1);a++){const l=i[a].trim(),c=l.match(/"([^"]+)"\s*:\s*{/);if(c){s.push(c[1]),a===e&&(o=s.join("."));continue}if(l==="}"||l==="},"){s.pop();continue}const d=l.match(/"([^"]+)"\s*:/);if(d){const u=d[1];if(a===e){o=s.length>0?`${s.join(".")}.${u}`:u;break}}}r(o)},[t,e]),n};function Jb(t){const{scope:e,fetchConfig:n,fetchSchema:r,saveConfig:i,onReset:s}=t,[o,a]=g.useState("{}"),[l,c]=g.useState(0),[d,u]=g.useState(null),[f,p]=g.useState(null),[m,b]=g.useState({}),[x,w]=g.useState({}),[v,S]=g.useState({}),[C,k]=g.useState(!0),[O,y]=g.useState("idle"),[M,A]=g.useState(!1),[R,N]=g.useState(null),[L,H]=g.useState(null),$=mj(o,l),F=qv(L,$),G=g.useMemo(()=>Gv(F,f),[F,f]);g.useEffect(()=>{(async()=>{try{const[le,me]=await Promise.all([n(),r()]),ke=le.local??le.config;b(ke),w(le.global??{}),S(le.sources),p(me),a(JSON.stringify(ke,null,2))}catch(le){console.error("Failed to load config data:",le)}finally{k(!1)}})()},[n,r]),g.useEffect(()=>{try{JSON.parse(o),u(null)}catch(Y){u(Y instanceof Error?Y.message:"Invalid JSON")}},[o]),g.useEffect(()=>{if(R==="json")try{const Y=JSON.parse(o);b(Y)}catch{}},[o,R]);const ue=g.useCallback(Y=>{H(null),N("json"),a(Y)},[]),X=g.useCallback(()=>{H(null)},[]),te=g.useCallback((Y,le)=>{H(Y),N("form"),b(me=>{const ke=Uv(me,Y,le);return a(JSON.stringify(ke,null,2)),ke}),S(me=>({...me,[Y]:e}))},[e]),oe=g.useCallback(async()=>{if(!d){y("saving");try{const Y=JSON.parse(o);await i(Y),b(Y),y("saved"),setTimeout(()=>y("idle"),2e3)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},[o,d,i]),pe=g.useCallback(async()=>{if(A(!1),s){k(!0);try{const Y=await s(),le=Y.local??Y.config;b(le),S(Y.sources),a(JSON.stringify(le,null,2))}catch(Y){console.error("Failed to reset:",Y)}finally{k(!1)}}else{const Y={};b(Y),a(JSON.stringify(Y,null,2))}},[s]);return{jsonText:o,config:m,globalConfig:x,sources:v,schema:f,isLoading:C,saveStatus:O,syntaxError:d,cursorLine:l,showResetConfirm:M,activeFieldPath:F,fieldDoc:G,handleJsonChange:ue,handleJsonEditorFocus:X,handleFormChange:te,handleSave:oe,handleReset:pe,setCursorLine:c,setFocusedFieldPath:H,setShowResetConfirm:A}}function hh({storageKey:t,defaultSizes:e,minSizes:n}){const[r,i]=g.useState(()=>{if(typeof window>"u")return e;const c=localStorage.getItem(t);if(c)try{const d=JSON.parse(c);if(Array.isArray(d)&&d.length===e.length){const u=d.reduce((f,p)=>f+p,0);if(Math.abs(u-100)<1)return d}}catch{}return e}),[s,o]=g.useState(!1);g.useEffect(()=>{localStorage.setItem(t,JSON.stringify(r))},[r,t]);const a=g.useCallback((c,d)=>{d.preventDefault(),o(!0);const u=d.target.parentElement;if(!u)return;const p=u.getBoundingClientRect().width,m=d.clientX,b=[...r],x=v=>{const C=(v.clientX-m)/p*100,k=[...b],O=c,y=c+1;let M=b[O]+C,A=b[y]-C;M<n[O]&&(M=n[O],A=b[O]+b[y]-M),A<n[y]&&(A=n[y],M=b[O]+b[y]-A),k[O]=M,k[y]=A,i(k)},w=()=>{o(!1),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[r,n]),l=g.useCallback(()=>{i(e)},[e]);return{sizes:r,isDragging:s,startDrag:a,reset:l}}const Ya="/api";async function fp(t){const e=`${Ya}/ck-config`,n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch ck-config: ${n.status}`);return n.json()}async function pp(t,e){const n=new URLSearchParams({scope:t});e&&n.set("projectId",e);const r=await fetch(`${Ya}/ck-config?${n}`);if(!r.ok)throw new Error(`Failed to fetch ck-config: ${r.status}`);return r.json()}async function Yb(t){const e=await fetch(`${Ya}/ck-config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json().catch(()=>({error:"Unknown error"}));throw new Error(n.error||`Failed to save ck-config: ${e.status}`)}return e.json()}async function Qb(){const t=await fetch(`${Ya}/ck-config/schema`);if(!t.ok)throw new Error(`Failed to fetch schema: ${t.status}`);return t.json()}const gj=.58,gi=280,dh=240,bj=80;function xj(t,e,n){return Math.min(Math.max(t,e),n)}function yj(t,e){if(typeof window>"u")return e;const n=localStorage.getItem(t);if(!n)return e;const r=Number.parseFloat(n);if(Number.isNaN(r))return e;if(r>0&&r<1)return r;if(r>=1){const i=Math.max(window.innerHeight-220,r+dh);return Math.min(.75,Math.max(.35,r/i))}return e}function vj(t,e,n,r){const[i,s]=g.useState(()=>typeof window>"u"?e:yj(t,e)),[o,a]=g.useState(!1),l=g.useCallback(c=>{c.preventDefault(),a(!0);const d=c.target.closest("[data-vresize-container]");if(!d)return;const u=p=>{const m=d.getBoundingClientRect(),b=m.height||1,x=(p.clientY-m.top)/b,w=n/b,v=Math.max(w,1-r/b);s(Math.max(w,Math.min(v,x)))},f=()=>{a(!1),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",u),document.addEventListener("mouseup",f),document.body.style.cursor="row-resize",document.body.style.userSelect="none"},[r,n]);return g.useEffect(()=>{localStorage.setItem(t,String(i))},[t,i]),{topRatio:i,isDragging:o,startDrag:l}}function wj(){const[t,e]=g.useState(null),[n,r]=g.useState(0),i=g.useCallback(s=>{e(s)},[]);return g.useEffect(()=>{if(!t)return;const s=()=>{r(t.getBoundingClientRect().height)};if(s(),typeof ResizeObserver>"u")return;const o=new ResizeObserver(()=>{s()});return o.observe(t),()=>o.disconnect()},[t]),{ref:i,height:n}}const kj=()=>{const{t}=he(),e=an(),[n,r]=g.useState("config"),[i,s]=g.useState({}),[o,a]=g.useState(gi),[l,c]=g.useState(!1),{sizes:d,isDragging:u,startDrag:f}=hh({storageKey:"claudekit-global-config-panels",defaultSizes:[35,40,25],minSizes:[20,25,15]}),{sizes:p,isDragging:m,startDrag:b}=hh({storageKey:"claudekit-global-system-panels",defaultSizes:[70,30],minSizes:[45,20]}),x=vj("claudekit-form-taxonomy-px",gj,gi,dh),{ref:w,height:v}=wj(),S=g.useCallback(async()=>{const[$,F]=await Promise.all([fp(),Bv()]);return s(F),$},[]),C=g.useCallback(async $=>{await Yb({scope:"global",config:$})},[]),k=g.useCallback(async()=>await fp(),[]),O=Jb({scope:"global",fetchConfig:S,fetchSchema:Qb,saveConfig:C,onReset:k}),y=g.useMemo(()=>[{id:"general",title:t("sectionGeneral"),fields:[{path:"codingLevel",label:t("fieldCodingLevel"),description:t("fieldCodingLevelDesc")},{path:"statusline",label:t("fieldStatusline"),description:t("fieldStatuslineDesc")},{path:"statuslineColors",label:t("fieldStatuslineColors"),description:t("fieldStatuslineColorsDesc")},{path:"locale.thinkingLanguage",label:t("fieldThinkingLanguage"),description:t("fieldThinkingLanguageDesc")},{path:"locale.responseLanguage",label:t("fieldResponseLanguage"),description:t("fieldResponseLanguageDesc")}]},{id:"paths",title:t("sectionPaths"),fields:[{path:"paths.docs",label:t("fieldDocsPath"),description:t("fieldDocsPathDesc")},{path:"paths.plans",label:t("fieldPlansPath"),description:t("fieldPlansPathDesc")}]},{id:"privacy",title:t("sectionPrivacy"),defaultCollapsed:!0,fields:[{path:"privacyBlock",label:t("fieldPrivacyBlock"),description:t("fieldPrivacyBlockDesc")},{path:"trust.enabled",label:t("fieldTrustEnabled"),description:t("fieldTrustEnabledDesc")},{path:"trust.passphrase",label:t("fieldTrustPassphrase"),description:t("fieldTrustPassphraseDesc")}]},{id:"project",title:t("sectionProject"),defaultCollapsed:!0,fields:[{path:"project.type",label:t("fieldProjectType"),description:t("fieldProjectTypeDesc")},{path:"project.packageManager",label:t("fieldPackageManager"),description:t("fieldPackageManagerDesc")},{path:"project.framework",label:t("fieldFramework"),description:t("fieldFrameworkDesc")}]},{id:"integrations",title:t("sectionIntegrations"),defaultCollapsed:!0,fields:[{path:"gemini.model",label:t("fieldGeminiModel"),description:t("fieldGeminiModelDesc")},{path:"skills.research.useGemini",label:t("fieldResearchUseGemini"),description:t("fieldResearchUseGeminiDesc")}]},{id:"hooks",title:t("sectionHooks"),defaultCollapsed:!0,fields:[{path:"hooks.session-init",label:t("fieldHookSessionInit"),description:t("fieldHookSessionInitDesc")},{path:"hooks.subagent-init",label:t("fieldHookSubagentInit"),description:t("fieldHookSubagentInitDesc")},{path:"hooks.descriptive-name",label:t("fieldHookDescriptiveName"),description:t("fieldHookDescriptiveNameDesc")},{path:"hooks.dev-rules-reminder",label:t("fieldHookDevRulesReminder"),description:t("fieldHookDevRulesReminderDesc")},{path:"hooks.usage-context-awareness",label:t("fieldHookUsageContextAwareness"),description:t("fieldHookUsageContextAwarenessDesc")},{path:"hooks.context-tracking",label:t("fieldHookContextTracking"),description:t("fieldHookContextTrackingDesc")},{path:"hooks.scout-block",label:t("fieldHookScoutBlock"),description:t("fieldHookScoutBlockDesc")},{path:"hooks.privacy-block",label:t("fieldHookPrivacyBlock"),description:t("fieldHookPrivacyBlockDesc")},{path:"hooks.post-edit-simplify-reminder",label:t("fieldHookPostEditSimplify"),description:t("fieldHookPostEditSimplifyDesc")}]},{id:"updatePipeline",title:t("sectionUpdatePipeline"),defaultCollapsed:!0,fields:[{path:"updatePipeline.autoInitAfterUpdate",label:t("fieldAutoInitAfterUpdate"),description:t("fieldAutoInitAfterUpdateDesc")},{path:"updatePipeline.autoMigrateAfterInit",label:t("fieldAutoMigrateAfterInit"),description:t("fieldAutoMigrateAfterInitDesc")},{path:"updatePipeline.migrateProviders",label:t("fieldMigrateProviders"),description:t("fieldMigrateProvidersDesc")}]},{id:"advanced",title:t("sectionAdvanced"),defaultCollapsed:!0,fields:[{path:"docs.maxLoc",label:t("fieldDocsMaxLoc"),description:t("fieldDocsMaxLocDesc")},{path:"plan.namingFormat",label:t("fieldPlanNamingFormat"),description:t("fieldPlanNamingFormatDesc")},{path:"plan.dateFormat",label:t("fieldPlanDateFormat"),description:t("fieldPlanDateFormatDesc")},{path:"plan.validation.mode",label:t("fieldPlanValidationMode"),description:t("fieldPlanValidationModeDesc")},{path:"plan.validation.minQuestions",label:t("fieldPlanMinQuestions"),description:t("fieldPlanMinQuestionsDesc")},{path:"plan.validation.maxQuestions",label:t("fieldPlanMaxQuestions"),description:t("fieldPlanMaxQuestionsDesc")},{path:"assertions",label:t("fieldAssertions"),description:t("fieldAssertionsDesc")}]}],[t]),M=g.useMemo(()=>{if(v<=0)return null;const $=Math.max(gi,v-dh);return xj(x.topRatio*v,gi,$)},[x.topRatio,v]),A=g.useMemo(()=>l||M===null?null:Math.min(M,o),[o,l,M]),R=g.useMemo(()=>{if(!l||v<=0)return null;const $=Math.max(gi,v-bj);return Math.min(o,$)},[o,l,v]),N=l?R:A,L=!O.isLoading&&!l&&A!==null,H=O.showResetConfirm?h.jsxs("div",{className:"flex items-center gap-2 bg-red-500/10 border border-red-500/30 rounded-lg px-2 py-1 animate-in fade-in duration-200",children:[h.jsx("span",{className:"text-xs text-red-500 font-medium",children:t("confirmReset")}),h.jsx("button",{type:"button",onClick:O.handleReset,className:"px-2 py-0.5 rounded bg-red-500 text-white text-xs font-bold hover:bg-red-600 transition-colors",children:t("confirm")}),h.jsx("button",{type:"button",onClick:()=>O.setShowResetConfirm(!1),className:"px-2 py-0.5 rounded bg-dash-surface text-dash-text-secondary text-xs font-bold hover:bg-dash-surface-hover transition-colors border border-dash-border",children:t("cancel")})]}):h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",onClick:()=>O.setShowResetConfirm(!0),className:"px-3 py-1.5 rounded-lg bg-dash-surface text-xs font-bold text-dash-text-secondary hover:bg-dash-surface-hover transition-colors border border-dash-border",children:t("resetToDefault")}),h.jsx("button",{type:"button",onClick:O.handleSave,disabled:!!O.syntaxError||O.saveStatus==="saving",className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all tracking-widest uppercase ${O.syntaxError?"bg-dash-surface text-dash-text-muted cursor-not-allowed border border-dash-border":O.saveStatus==="saved"?"bg-green-500 text-white shadow-lg shadow-green-500/20":O.saveStatus==="error"?"bg-red-500 text-white":"bg-dash-accent text-dash-bg hover:bg-dash-accent-hover shadow-lg shadow-dash-accent/20"}`,children:O.saveStatus==="saving"?t("saving"):O.saveStatus==="saved"?t("saved"):O.saveStatus==="error"?t("saveFailed"):t("saveChanges")})]});return h.jsxs("div",{className:"animate-in fade-in duration-300 w-full h-full flex flex-col transition-colors",children:[h.jsx(Gm,{title:t("globalConfig"),filePath:"~/.claude/.ck.json",onBack:()=>e(-1),onSave:O.handleSave,onReset:O.handleReset,saveStatus:O.saveStatus,syntaxError:O.syntaxError,showResetConfirm:O.showResetConfirm,setShowResetConfirm:O.setShowResetConfirm,showActions:!1,showFilePath:!1}),h.jsxs("div",{className:"mb-3 shrink-0 flex items-center justify-between gap-3",children:[h.jsxs("div",{role:"tablist","aria-label":t("globalConfig"),className:"inline-flex items-center rounded-xl border border-dash-border bg-dash-surface p-1 shadow-sm",children:[h.jsx("button",{role:"tab","aria-selected":n==="config",onClick:()=>r("config"),className:`dash-focus-ring px-4 py-2 rounded-lg text-sm font-semibold transition-colors ${n==="config"?"bg-dash-accent-subtle text-dash-accent":"text-dash-text-muted hover:text-dash-text hover:bg-dash-surface-hover"}`,children:t("configTab")}),h.jsx("button",{role:"tab","aria-selected":n==="metadata",onClick:()=>r("metadata"),className:`dash-focus-ring px-4 py-2 rounded-lg text-sm font-semibold transition-colors ${n==="metadata"?"bg-dash-accent-subtle text-dash-accent":"text-dash-text-muted hover:text-dash-text hover:bg-dash-surface-hover"}`,children:t("systemTab")})]}),h.jsx("p",{className:"hidden lg:block text-xs text-dash-text-muted",children:t("configWorkspaceHint")})]}),h.jsxs("div",{className:"flex-1 flex min-h-0",children:[n==="config"&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:w,"data-vresize-container":!0,style:{width:`${d[0]}%`},className:"flex flex-col min-w-0 min-h-0 h-full",children:[h.jsx("div",{style:N!==null?{height:`${N}px`}:void 0,className:`min-h-0 ${N!==null?"shrink-0":"flex-1"}`,children:h.jsx(Qm,{width:100,isLoading:O.isLoading,schema:O.schema,config:O.config,sources:O.sources,sections:y,onChange:O.handleFormChange,onFieldFocus:O.setFocusedFieldPath,onNaturalHeightChange:a})}),!O.isLoading&&h.jsxs(h.Fragment,{children:[l&&N!==null&&h.jsx("div",{className:"flex-1"}),L&&h.jsx(tr,{direction:"vertical",isDragging:x.isDragging,onMouseDown:x.startDrag}),h.jsx("div",{className:l?"shrink-0":"flex-1 min-h-0 overflow-hidden",children:h.jsx(XC,{config:O.config,onChange:O.handleFormChange,isCollapsed:l,onCollapsedChange:c})})]})]}),h.jsx(tr,{direction:"horizontal",isDragging:u,onMouseDown:$=>f(0,$)}),h.jsx(od,{width:d[1],isLoading:O.isLoading,jsonText:O.jsonText,cursorLine:O.cursorLine,syntaxError:O.syntaxError,onChange:O.handleJsonChange,onEditorFocus:O.handleJsonEditorFocus,onCursorLineChange:O.setCursorLine,headerPath:"~/.claude/.ck.json",headerActions:H}),h.jsx(tr,{direction:"horizontal",isDragging:u,onMouseDown:$=>f(1,$)}),h.jsx(Kb,{width:d[2],fieldDoc:O.fieldDoc,activeFieldPath:O.activeFieldPath})]}),n==="metadata"&&h.jsxs("div",{className:"flex-1 min-h-0 flex",children:[h.jsx("div",{style:{width:`${p[0]}%`},className:"min-w-0 h-full overflow-auto pr-1",children:O.isLoading?h.jsx("div",{className:"dash-panel h-full flex items-center justify-center",children:h.jsx("div",{className:"animate-pulse text-dash-text-muted text-sm",children:t("loading")})}):h.jsx(fj,{metadata:i})}),h.jsx(tr,{direction:"horizontal",isDragging:m,onMouseDown:$=>b(0,$)}),h.jsx("div",{style:{width:`${p[1]}%`},className:"min-w-0 h-full overflow-hidden",children:h.jsx(pj,{})})]})]})]})};function Sj({phase:t}){const e=t.status==="completed"?"border-green-500":t.status==="in-progress"?"border-blue-500":"border-amber-400";return h.jsx("div",{className:`rounded border-l-4 ${e} bg-white dark:bg-gray-800 p-3 shadow-sm`,children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-xs font-mono text-gray-400 dark:text-gray-500",children:t.phaseId}),h.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-gray-100",children:t.name})]})})}function zl({title:t,phases:e,borderColor:n}){return h.jsxs("div",{className:"flex flex-1 flex-col gap-3 min-w-0","aria-label":`${t} phases`,children:[h.jsxs("div",{className:`rounded-t border-t-2 ${n} bg-gray-50 dark:bg-gray-900 px-3 py-2`,children:[h.jsx("span",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:t}),h.jsx("span",{className:"ml-2 text-xs text-gray-400",children:e.length})]}),h.jsx("div",{className:"flex flex-col gap-2 px-1",children:e.map((r,i)=>h.jsx(Sj,{phase:r},`${r.phaseId}-${i}`))})]})}function Cj({completed:t,total:e}){const{t:n}=he(),r=e===0?0:Math.round(t/e*100);return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"flex justify-between text-xs text-gray-500 dark:text-gray-400",children:[h.jsx("span",{children:n("kanbanProgress")}),h.jsxs("span",{children:[t,"/",e," ",n("kanbanPhases")," — ",r,"% ",n("kanbanComplete")]})]}),h.jsx("div",{className:"h-2 w-full rounded bg-gray-200 dark:bg-gray-700",children:h.jsx("div",{className:"h-2 rounded bg-green-500 transition-all",style:{width:`${r}%`}})})]})}function jj(){const{t}=he(),[e]=mv(),n=e.get("file")??"",[r,i]=g.useState([]),[s,o]=g.useState(!1),[a,l]=g.useState(null);if(g.useEffect(()=>{n&&(o(!0),l(null),i([]),fetch(`/api/plan/parse?file=${encodeURIComponent(n)}`).then(p=>{if(!p.ok){const m={400:"kanbanError400",403:"kanbanError403",404:"kanbanError404"};throw new Error(m[p.status]??`error:HTTP:${p.status}`)}return p.json()}).then(p=>i(p.phases)).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>o(!1)))},[n]),!n)return h.jsx("div",{className:"flex h-full items-center justify-center text-gray-400 dark:text-gray-500",children:t("kanbanNoFile")});let c=[],d=[],u=[],f=null;try{c=r.filter(p=>p.status==="pending"),d=r.filter(p=>p.status==="in-progress"),u=r.filter(p=>p.status==="completed")}catch(p){f=p instanceof Error?p.message:String(p)}return f?h.jsx("div",{className:"flex h-full items-center justify-center text-red-500 dark:text-red-400",children:t("kanbanLoadError")}):h.jsxs("div",{className:"flex h-full flex-col gap-4 p-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("kanbanTitle")}),h.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500 truncate max-w-xs",title:n,children:n.replaceAll("\\","/")})]}),r.length>0&&h.jsx(Cj,{completed:u.length,total:r.length}),s&&h.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400",children:t("loading")}),a&&h.jsxs("div",{className:"rounded border border-red-300 bg-red-50 dark:bg-red-900/20 p-4 text-red-600 dark:text-red-400",children:[t("error"),":"," ",a in{kanbanError400:"",kanbanError403:"",kanbanError404:""}?t(a):a]}),!s&&!a&&r.length===0&&h.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400 dark:text-gray-500",children:t("kanbanNoPhases")}),!s&&!a&&r.length>0&&h.jsxs("section",{"aria-label":t("kanbanTitle"),className:"flex flex-1 flex-col gap-4 overflow-auto md:flex-row",children:[h.jsx(zl,{title:t("kanbanStatus_pending"),phases:c,borderColor:"border-amber-400"}),h.jsx(zl,{title:t("kanbanStatus_in-progress"),phases:d,borderColor:"border-blue-500"}),h.jsx(zl,{title:t("kanbanStatus_completed"),phases:u,borderColor:"border-green-500"})]})]})}const mp=[{key:"agent",labelKey:"migrateTypeAgents",badgeClass:"border-dash-accent/30 text-dash-accent"},{key:"command",labelKey:"migrateTypeCommands",badgeClass:"border-yellow-500/30 text-yellow-400"},{key:"skill",labelKey:"migrateTypeSkills",badgeClass:"border-purple-500/30 text-purple-400"},{key:"config",labelKey:"migrateTypeConfig",badgeClass:"border-teal-500/30 text-teal-400"},{key:"rules",labelKey:"migrateTypeRules",badgeClass:"border-rose-500/30 text-rose-400"},{key:"hooks",labelKey:"migrateTypeHooks",badgeClass:"border-cyan-500/30 text-cyan-400"}],Oj=new Set([8203,8204,8205,8288,65279,8232,8233,8234,8235,8236,8237,8238,8294,8295,8296,8297]);function Pj(t){return t===9||t===10||t===13?!0:t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159||Oj.has(t)}function Xn(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Pj(r)||(e+=n))}return e}function gp(t){if(!t)return"-";const e=t.replace(/\\/g,"/"),n=e.match(/.*\/(\.[^/]+\/)/);if(n?.[1]){const i=(n.index??0)+n[0].length-n[1].length;return e.slice(i)}const r=e.split("/");return r.length>3?`.../${r.slice(-3).join("/")}`:e}function Or(t){return t.success?t.skipped?"skipped":"installed":"failed"}function Nj(t){const e={installed:0,skipped:0,failed:0};for(const n of t){const r=Or(n);r==="installed"?e.installed+=1:r==="skipped"?e.skipped+=1:e.failed+=1}return e}function Xb(t){switch(t){case"agent":case"command":case"skill":case"config":case"rules":case"hooks":case"unknown":return t;default:return"unknown"}}function Aj(t,e){switch(t){case"failed":return{label:e("migrateStatusFailed"),className:"border-red-500/30 bg-red-500/10 text-red-400"};case"skipped":return{label:e("migrateStatusSkipped"),className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"};default:return{label:e("migrateStatusInstalled"),className:"border-green-500/30 bg-green-500/10 text-green-400"}}}function Mj(t){const e=new Map;for(const n of t){const r=Xb(n.portableType),i=e.get(r)||[];i.push(n),e.set(r,i)}return e}function Dj(t){return[Xb(t.portableType),t.provider,t.providerDisplayName,t.itemName,t.path,t.success,t.skipped,t.overwritten,t.error,t.skipReason].map(n=>n===void 0?"":String(n)).join("|")}function Tj(t){if(t.length===0)return!0;const e=t[0].provider;return t.every(n=>n.provider===e)}const Lr=({label:t,count:e,className:n})=>e<=0?null:h.jsxs("span",{className:`inline-flex items-center gap-1 rounded-md border px-2.5 py-1 text-xs ${n}`,children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx("span",{children:t})]}),bp=({labelKey:t,badgeClass:e,items:n,isExpanded:r,onToggle:i,singleProvider:s})=>{const{t:o}=he(),a=n.filter(f=>Or(f)==="installed").length,l=n.filter(f=>Or(f)==="skipped").length,c=n.filter(f=>Or(f)==="failed").length,d=s?"md:grid-cols-[minmax(0,1.5fr)_minmax(0,1.35fr)_auto_minmax(0,1fr)]":"md:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)_minmax(0,1.2fr)_auto_minmax(0,1fr)]",u=new Map;return h.jsxs("div",{className:"rounded-xl border border-dash-border bg-dash-surface overflow-hidden",children:[h.jsxs("button",{type:"button",onClick:i,className:"w-full flex flex-wrap items-center gap-2 px-4 py-3 text-left hover:bg-dash-surface-hover transition-colors",children:[h.jsx("svg",{className:`w-3.5 h-3.5 text-dash-text-muted transition-transform ${r?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:h.jsx("path",{d:"M9 5l7 7-7 7"})}),h.jsx("p",{className:"text-sm font-semibold text-dash-text",children:o(t)}),h.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-semibold ${e}`,children:n.length}),h.jsx("span",{className:"hidden sm:block flex-1"}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px]",children:[h.jsx(Lr,{label:o("migrateStatusInstalled"),count:a,className:"border-green-500/30 bg-green-500/10 text-green-400"}),h.jsx(Lr,{label:o("migrateStatusSkipped"),count:l,className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"}),h.jsx(Lr,{label:o("migrateStatusFailed"),count:c,className:"border-red-500/30 bg-red-500/10 text-red-400"})]})]}),r&&h.jsxs("div",{className:"border-t border-dash-border/80",children:[h.jsxs("div",{className:`hidden md:grid ${d} items-center gap-3 px-4 py-2 border-b border-dash-border/70 text-[10px] font-semibold uppercase tracking-wide text-dash-text-muted`,children:[h.jsx("p",{children:o("migrateItem")}),!s&&h.jsx("p",{children:o("migrateProvider")}),h.jsx("p",{children:o("migratePath")}),h.jsx("p",{children:o("migrateStatus")}),h.jsx("p",{children:o("migrateError")})]}),h.jsx("div",{className:"divide-y divide-dash-border/70",children:n.map(f=>{const p=Dj(f),m=u.get(p)??0;u.set(p,m+1);const b=m===0?p:`${p}#${m}`,x=Or(f),w=Aj(x,o),v=Xn(f.itemName||gp(f.path)),S=Xn(f.providerDisplayName||f.provider||""),C=Xn(f.path||""),k=Xn(gp(f.path)),O=Xn(f.error||f.skipReason||"");return h.jsxs("div",{className:`grid gap-1.5 ${d} items-start px-4 py-2.5 hover:bg-dash-bg/60 transition-colors`,children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"text-xs font-semibold text-dash-text truncate",title:v,children:v}),h.jsxs("div",{className:"mt-0.5 space-y-0.5 md:hidden",children:[!s&&h.jsx("p",{className:"text-[11px] text-dash-text-secondary truncate",children:S}),h.jsx("p",{className:"font-mono text-[11px] text-dash-text-muted truncate",title:C,children:k}),O&&h.jsx("p",{className:"text-[11px] text-red-400/80 line-clamp-2",title:O,children:O})]})]}),!s&&h.jsx("p",{className:"hidden md:block text-[11px] text-dash-text-secondary truncate",children:S}),h.jsx("p",{className:"hidden md:block font-mono text-[11px] text-dash-text-muted truncate",title:C,children:k}),h.jsx("span",{className:`inline-flex w-fit items-center rounded-full border px-2 py-0.5 text-[11px] font-medium ${w.className}`,children:w.label}),h.jsx("p",{className:`hidden md:block text-[11px] truncate ${O?"text-red-400/80":"text-dash-text-muted"}`,title:O,children:O||"-"})]},b)})})]})]})},Ej=({results:t,onReset:e})=>{const{t:n}=he(),[r,i]=g.useState(""),s=g.useDeferredValue(r),[o,a]=g.useState("all"),[l,c]=g.useState(()=>new Set(mp.map(C=>C.key))),d=g.useMemo(()=>{const C=s.trim().toLowerCase();return t.results.filter(k=>{if(o!=="all"&&Or(k)!==o)return!1;if(!C)return!0;const O=(k.itemName||"").toLowerCase(),y=(k.path||"").toLowerCase(),M=(k.providerDisplayName||k.provider||"").toLowerCase();return O.includes(C)||y.includes(C)||M.includes(C)})},[t.results,s,o]),u=g.useMemo(()=>Tj(d),[d]),f=g.useMemo(()=>{if(!u||d.length===0)return"";const C=Array.from(new Set(d.map(k=>k.providerDisplayName?.trim()||"").filter(k=>k.length>0)));return C.length===1?C[0]:d[0]?.provider||""},[d,u]),p=g.useMemo(()=>Mj(d),[d]),m=g.useMemo(()=>Nj(t.results),[t.results]),b=g.useMemo(()=>[...p.keys()],[p]),x=m.installed+m.skipped+m.failed,w=b.length>0&&b.every(C=>l.has(C)),v=C=>{c(k=>{const O=new Set(k);return O.has(C)?O.delete(C):O.add(C),O})},S=()=>{if(w){c(new Set);return}c(new Set(b))};return h.jsxs("div",{className:"dash-panel p-4 md:p-5 space-y-4",children:[h.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[h.jsxs("div",{children:[h.jsxs("h2",{className:"text-base font-semibold text-dash-text",children:[n("migrateSummaryTitle"),u&&f&&h.jsxs("span",{className:"text-dash-text-muted font-normal",children:[" ","· ",Xn(f)]})]}),h.jsxs("p",{className:"text-xs text-dash-text-muted mt-1",children:[x," ",n("migrateSummarySubtitle")]})]}),h.jsx("button",{type:"button",onClick:e,className:"dash-focus-ring px-4 py-2 text-sm font-semibold rounded-md bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:n("migrateSummaryNewMigration")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[h.jsx(Lr,{label:n("migrateStatusInstalled"),count:m.installed,className:"border-green-500/30 bg-green-500/10 text-green-400"}),h.jsx(Lr,{label:n("migrateStatusSkipped"),count:m.skipped,className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"}),h.jsx(Lr,{label:n("migrateStatusFailed"),count:m.failed,className:"border-red-500/30 bg-red-500/10 text-red-400"})]}),t.warnings.length>0&&h.jsx("div",{className:"space-y-2",children:t.warnings.map((C,k)=>h.jsx("div",{className:"px-3 py-2 border border-yellow-500/30 bg-yellow-500/10 rounded-md text-xs text-yellow-400",children:Xn(C)},k))}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("div",{className:"relative",children:[h.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 stroke-dash-text-muted",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"11",cy:"11",r:"8"}),h.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),h.jsx("input",{type:"text",value:r,onChange:C=>i(C.target.value),placeholder:n("migrateSummarySearchPlaceholder"),className:"dash-focus-ring w-full pl-9 pr-3 py-2 bg-dash-bg border border-dash-border rounded-lg text-dash-text text-sm focus:border-dash-accent transition-colors"})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[["all","installed","skipped","failed"].map(C=>{const k=C==="all"?"migrateSummaryFilterAll":C==="installed"?"migrateStatusInstalled":C==="skipped"?"migrateStatusSkipped":"migrateStatusFailed";return h.jsx("button",{type:"button",onClick:()=>a(C),className:`dash-focus-ring px-3 py-1 text-xs font-medium rounded-full border transition-colors ${o===C?"bg-dash-accent/10 border-dash-accent text-dash-accent":"border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover hover:text-dash-text"}`,children:n(k)},C)}),h.jsx("button",{type:"button",onClick:S,className:"dash-focus-ring ml-1 px-3 py-1 text-xs font-medium rounded-md border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:n(w?"migrateSummaryCollapseAll":"migrateSummaryExpandAll")})]})]}),d.length===0?h.jsx("div",{className:"text-center py-8 text-sm text-dash-text-muted",children:n("migrateSummaryNoResults")}):h.jsxs("div",{className:"space-y-2.5",children:[mp.map(C=>{const k=p.get(C.key);return!k||k.length===0?null:h.jsx(bp,{labelKey:C.labelKey,badgeClass:C.badgeClass,items:k,isExpanded:l.has(C.key),onToggle:()=>v(C.key),singleProvider:u},C.key)}),(()=>{const C=p.get("unknown");return!C||C.length===0?null:h.jsx(bp,{labelKey:"migrateTypeUnknown",badgeClass:"border-dash-border text-dash-text-muted",items:C,isExpanded:l.has("unknown"),onToggle:()=>v("unknown"),singleProvider:u})})()]})]})},Rj=500;function Lj(t){return t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159}function Ij(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Lj(r)||(e+=n))}return e}const $j=({diff:t,className:e=""})=>{const n=t.split(`
|
|
241
|
+
`),s=[];let o=null;for(let a=0;a<=Math.min(e,i.length-1);a++){const l=i[a].trim(),c=l.match(/"([^"]+)"\s*:\s*{/);if(c){s.push(c[1]),a===e&&(o=s.join("."));continue}if(l==="}"||l==="},"){s.pop();continue}const d=l.match(/"([^"]+)"\s*:/);if(d){const u=d[1];if(a===e){o=s.length>0?`${s.join(".")}.${u}`:u;break}}}r(o)},[t,e]),n};function Jb(t){const{scope:e,fetchConfig:n,fetchSchema:r,saveConfig:i,onReset:s}=t,[o,a]=g.useState("{}"),[l,c]=g.useState(0),[d,u]=g.useState(null),[f,p]=g.useState(null),[m,b]=g.useState({}),[x,w]=g.useState({}),[v,S]=g.useState({}),[C,k]=g.useState(!0),[O,y]=g.useState("idle"),[M,A]=g.useState(!1),[R,N]=g.useState(null),[L,H]=g.useState(null),$=mj(o,l),F=qv(L,$),G=g.useMemo(()=>Gv(F,f),[F,f]);g.useEffect(()=>{(async()=>{try{const[le,me]=await Promise.all([n(),r()]),ke=le.local??le.config;b(ke),w(le.global??{}),S(le.sources),p(me),a(JSON.stringify(ke,null,2))}catch(le){console.error("Failed to load config data:",le)}finally{k(!1)}})()},[n,r]),g.useEffect(()=>{try{JSON.parse(o),u(null)}catch(Y){u(Y instanceof Error?Y.message:"Invalid JSON")}},[o]),g.useEffect(()=>{if(R==="json")try{const Y=JSON.parse(o);b(Y)}catch{}},[o,R]);const ue=g.useCallback(Y=>{H(null),N("json"),a(Y)},[]),X=g.useCallback(()=>{H(null)},[]),te=g.useCallback((Y,le)=>{H(Y),N("form"),b(me=>{const ke=Uv(me,Y,le);return a(JSON.stringify(ke,null,2)),ke}),S(me=>({...me,[Y]:e}))},[e]),oe=g.useCallback(async()=>{if(!d){y("saving");try{const Y=JSON.parse(o);await i(Y),b(Y),y("saved"),setTimeout(()=>y("idle"),2e3)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},[o,d,i]),pe=g.useCallback(async()=>{if(A(!1),s){k(!0);try{const Y=await s(),le=Y.local??Y.config;b(le),S(Y.sources),a(JSON.stringify(le,null,2))}catch(Y){console.error("Failed to reset:",Y)}finally{k(!1)}}else{const Y={};b(Y),a(JSON.stringify(Y,null,2))}},[s]);return{jsonText:o,config:m,globalConfig:x,sources:v,schema:f,isLoading:C,saveStatus:O,syntaxError:d,cursorLine:l,showResetConfirm:M,activeFieldPath:F,fieldDoc:G,handleJsonChange:ue,handleJsonEditorFocus:X,handleFormChange:te,handleSave:oe,handleReset:pe,setCursorLine:c,setFocusedFieldPath:H,setShowResetConfirm:A}}function hh({storageKey:t,defaultSizes:e,minSizes:n}){const[r,i]=g.useState(()=>{if(typeof window>"u")return e;const c=localStorage.getItem(t);if(c)try{const d=JSON.parse(c);if(Array.isArray(d)&&d.length===e.length){const u=d.reduce((f,p)=>f+p,0);if(Math.abs(u-100)<1)return d}}catch{}return e}),[s,o]=g.useState(!1);g.useEffect(()=>{localStorage.setItem(t,JSON.stringify(r))},[r,t]);const a=g.useCallback((c,d)=>{d.preventDefault(),o(!0);const u=d.target.parentElement;if(!u)return;const p=u.getBoundingClientRect().width,m=d.clientX,b=[...r],x=v=>{const C=(v.clientX-m)/p*100,k=[...b],O=c,y=c+1;let M=b[O]+C,A=b[y]-C;M<n[O]&&(M=n[O],A=b[O]+b[y]-M),A<n[y]&&(A=n[y],M=b[O]+b[y]-A),k[O]=M,k[y]=A,i(k)},w=()=>{o(!1),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[r,n]),l=g.useCallback(()=>{i(e)},[e]);return{sizes:r,isDragging:s,startDrag:a,reset:l}}const Ya="/api";async function fp(t){const e=`${Ya}/ck-config`,n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch ck-config: ${n.status}`);return n.json()}async function pp(t,e){const n=new URLSearchParams({scope:t});e&&n.set("projectId",e);const r=await fetch(`${Ya}/ck-config?${n}`);if(!r.ok)throw new Error(`Failed to fetch ck-config: ${r.status}`);return r.json()}async function Yb(t){const e=await fetch(`${Ya}/ck-config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json().catch(()=>({error:"Unknown error"}));throw new Error(n.error||`Failed to save ck-config: ${e.status}`)}return e.json()}async function Qb(){const t=await fetch(`${Ya}/ck-config/schema`);if(!t.ok)throw new Error(`Failed to fetch schema: ${t.status}`);return t.json()}const gj=.58,gi=280,dh=240,bj=80;function xj(t,e,n){return Math.min(Math.max(t,e),n)}function yj(t,e){if(typeof window>"u")return e;const n=localStorage.getItem(t);if(!n)return e;const r=Number.parseFloat(n);if(Number.isNaN(r))return e;if(r>0&&r<1)return r;if(r>=1){const i=Math.max(window.innerHeight-220,r+dh);return Math.min(.75,Math.max(.35,r/i))}return e}function vj(t,e,n,r){const[i,s]=g.useState(()=>typeof window>"u"?e:yj(t,e)),[o,a]=g.useState(!1),l=g.useCallback(c=>{c.preventDefault(),a(!0);const d=c.target.closest("[data-vresize-container]");if(!d)return;const u=p=>{const m=d.getBoundingClientRect(),b=m.height||1,x=(p.clientY-m.top)/b,w=n/b,v=Math.max(w,1-r/b);s(Math.max(w,Math.min(v,x)))},f=()=>{a(!1),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",u),document.addEventListener("mouseup",f),document.body.style.cursor="row-resize",document.body.style.userSelect="none"},[r,n]);return g.useEffect(()=>{localStorage.setItem(t,String(i))},[t,i]),{topRatio:i,isDragging:o,startDrag:l}}function wj(){const[t,e]=g.useState(null),[n,r]=g.useState(0),i=g.useCallback(s=>{e(s)},[]);return g.useEffect(()=>{if(!t)return;const s=()=>{r(t.getBoundingClientRect().height)};if(s(),typeof ResizeObserver>"u")return;const o=new ResizeObserver(()=>{s()});return o.observe(t),()=>o.disconnect()},[t]),{ref:i,height:n}}const kj=()=>{const{t}=he(),e=an(),[n,r]=g.useState("config"),[i,s]=g.useState({}),[o,a]=g.useState(gi),[l,c]=g.useState(!1),{sizes:d,isDragging:u,startDrag:f}=hh({storageKey:"claudekit-global-config-panels",defaultSizes:[35,40,25],minSizes:[20,25,15]}),{sizes:p,isDragging:m,startDrag:b}=hh({storageKey:"claudekit-global-system-panels",defaultSizes:[70,30],minSizes:[45,20]}),x=vj("claudekit-form-taxonomy-px",gj,gi,dh),{ref:w,height:v}=wj(),S=g.useCallback(async()=>{const[$,F]=await Promise.all([fp(),Bv()]);return s(F),$},[]),C=g.useCallback(async $=>{await Yb({scope:"global",config:$})},[]),k=g.useCallback(async()=>await fp(),[]),O=Jb({scope:"global",fetchConfig:S,fetchSchema:Qb,saveConfig:C,onReset:k}),y=g.useMemo(()=>[{id:"general",title:t("sectionGeneral"),fields:[{path:"codingLevel",label:t("fieldCodingLevel"),description:t("fieldCodingLevelDesc")},{path:"statusline",label:t("fieldStatusline"),description:t("fieldStatuslineDesc")},{path:"statuslineColors",label:t("fieldStatuslineColors"),description:t("fieldStatuslineColorsDesc")},{path:"locale.thinkingLanguage",label:t("fieldThinkingLanguage"),description:t("fieldThinkingLanguageDesc")},{path:"locale.responseLanguage",label:t("fieldResponseLanguage"),description:t("fieldResponseLanguageDesc")}]},{id:"paths",title:t("sectionPaths"),fields:[{path:"paths.docs",label:t("fieldDocsPath"),description:t("fieldDocsPathDesc")},{path:"paths.plans",label:t("fieldPlansPath"),description:t("fieldPlansPathDesc")}]},{id:"privacy",title:t("sectionPrivacy"),defaultCollapsed:!0,fields:[{path:"privacyBlock",label:t("fieldPrivacyBlock"),description:t("fieldPrivacyBlockDesc")},{path:"trust.enabled",label:t("fieldTrustEnabled"),description:t("fieldTrustEnabledDesc")},{path:"trust.passphrase",label:t("fieldTrustPassphrase"),description:t("fieldTrustPassphraseDesc")}]},{id:"project",title:t("sectionProject"),defaultCollapsed:!0,fields:[{path:"project.type",label:t("fieldProjectType"),description:t("fieldProjectTypeDesc")},{path:"project.packageManager",label:t("fieldPackageManager"),description:t("fieldPackageManagerDesc")},{path:"project.framework",label:t("fieldFramework"),description:t("fieldFrameworkDesc")}]},{id:"integrations",title:t("sectionIntegrations"),defaultCollapsed:!0,fields:[{path:"gemini.model",label:t("fieldGeminiModel"),description:t("fieldGeminiModelDesc")},{path:"skills.research.useGemini",label:t("fieldResearchUseGemini"),description:t("fieldResearchUseGeminiDesc")}]},{id:"hooks",title:t("sectionHooks"),defaultCollapsed:!0,fields:[{path:"hooks.session-init",label:t("fieldHookSessionInit"),description:t("fieldHookSessionInitDesc")},{path:"hooks.subagent-init",label:t("fieldHookSubagentInit"),description:t("fieldHookSubagentInitDesc")},{path:"hooks.descriptive-name",label:t("fieldHookDescriptiveName"),description:t("fieldHookDescriptiveNameDesc")},{path:"hooks.dev-rules-reminder",label:t("fieldHookDevRulesReminder"),description:t("fieldHookDevRulesReminderDesc")},{path:"hooks.usage-context-awareness",label:t("fieldHookUsageContextAwareness"),description:t("fieldHookUsageContextAwarenessDesc")},{path:"hooks.context-tracking",label:t("fieldHookContextTracking"),description:t("fieldHookContextTrackingDesc")},{path:"hooks.scout-block",label:t("fieldHookScoutBlock"),description:t("fieldHookScoutBlockDesc")},{path:"hooks.privacy-block",label:t("fieldHookPrivacyBlock"),description:t("fieldHookPrivacyBlockDesc")},{path:"hooks.post-edit-simplify-reminder",label:t("fieldHookPostEditSimplify"),description:t("fieldHookPostEditSimplifyDesc")}]},{id:"updatePipeline",title:t("sectionUpdatePipeline"),defaultCollapsed:!0,fields:[{path:"updatePipeline.autoInitAfterUpdate",label:t("fieldAutoInitAfterUpdate"),description:t("fieldAutoInitAfterUpdateDesc")},{path:"updatePipeline.autoMigrateAfterUpdate",label:t("fieldAutoMigrateAfterUpdate"),description:t("fieldAutoMigrateAfterUpdateDesc")},{path:"updatePipeline.migrateProviders",label:t("fieldMigrateProviders"),description:t("fieldMigrateProvidersDesc")}]},{id:"advanced",title:t("sectionAdvanced"),defaultCollapsed:!0,fields:[{path:"docs.maxLoc",label:t("fieldDocsMaxLoc"),description:t("fieldDocsMaxLocDesc")},{path:"plan.namingFormat",label:t("fieldPlanNamingFormat"),description:t("fieldPlanNamingFormatDesc")},{path:"plan.dateFormat",label:t("fieldPlanDateFormat"),description:t("fieldPlanDateFormatDesc")},{path:"plan.validation.mode",label:t("fieldPlanValidationMode"),description:t("fieldPlanValidationModeDesc")},{path:"plan.validation.minQuestions",label:t("fieldPlanMinQuestions"),description:t("fieldPlanMinQuestionsDesc")},{path:"plan.validation.maxQuestions",label:t("fieldPlanMaxQuestions"),description:t("fieldPlanMaxQuestionsDesc")},{path:"assertions",label:t("fieldAssertions"),description:t("fieldAssertionsDesc")}]}],[t]),M=g.useMemo(()=>{if(v<=0)return null;const $=Math.max(gi,v-dh);return xj(x.topRatio*v,gi,$)},[x.topRatio,v]),A=g.useMemo(()=>l||M===null?null:Math.min(M,o),[o,l,M]),R=g.useMemo(()=>{if(!l||v<=0)return null;const $=Math.max(gi,v-bj);return Math.min(o,$)},[o,l,v]),N=l?R:A,L=!O.isLoading&&!l&&A!==null,H=O.showResetConfirm?h.jsxs("div",{className:"flex items-center gap-2 bg-red-500/10 border border-red-500/30 rounded-lg px-2 py-1 animate-in fade-in duration-200",children:[h.jsx("span",{className:"text-xs text-red-500 font-medium",children:t("confirmReset")}),h.jsx("button",{type:"button",onClick:O.handleReset,className:"px-2 py-0.5 rounded bg-red-500 text-white text-xs font-bold hover:bg-red-600 transition-colors",children:t("confirm")}),h.jsx("button",{type:"button",onClick:()=>O.setShowResetConfirm(!1),className:"px-2 py-0.5 rounded bg-dash-surface text-dash-text-secondary text-xs font-bold hover:bg-dash-surface-hover transition-colors border border-dash-border",children:t("cancel")})]}):h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",onClick:()=>O.setShowResetConfirm(!0),className:"px-3 py-1.5 rounded-lg bg-dash-surface text-xs font-bold text-dash-text-secondary hover:bg-dash-surface-hover transition-colors border border-dash-border",children:t("resetToDefault")}),h.jsx("button",{type:"button",onClick:O.handleSave,disabled:!!O.syntaxError||O.saveStatus==="saving",className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all tracking-widest uppercase ${O.syntaxError?"bg-dash-surface text-dash-text-muted cursor-not-allowed border border-dash-border":O.saveStatus==="saved"?"bg-green-500 text-white shadow-lg shadow-green-500/20":O.saveStatus==="error"?"bg-red-500 text-white":"bg-dash-accent text-dash-bg hover:bg-dash-accent-hover shadow-lg shadow-dash-accent/20"}`,children:O.saveStatus==="saving"?t("saving"):O.saveStatus==="saved"?t("saved"):O.saveStatus==="error"?t("saveFailed"):t("saveChanges")})]});return h.jsxs("div",{className:"animate-in fade-in duration-300 w-full h-full flex flex-col transition-colors",children:[h.jsx(Gm,{title:t("globalConfig"),filePath:"~/.claude/.ck.json",onBack:()=>e(-1),onSave:O.handleSave,onReset:O.handleReset,saveStatus:O.saveStatus,syntaxError:O.syntaxError,showResetConfirm:O.showResetConfirm,setShowResetConfirm:O.setShowResetConfirm,showActions:!1,showFilePath:!1}),h.jsxs("div",{className:"mb-3 shrink-0 flex items-center justify-between gap-3",children:[h.jsxs("div",{role:"tablist","aria-label":t("globalConfig"),className:"inline-flex items-center rounded-xl border border-dash-border bg-dash-surface p-1 shadow-sm",children:[h.jsx("button",{role:"tab","aria-selected":n==="config",onClick:()=>r("config"),className:`dash-focus-ring px-4 py-2 rounded-lg text-sm font-semibold transition-colors ${n==="config"?"bg-dash-accent-subtle text-dash-accent":"text-dash-text-muted hover:text-dash-text hover:bg-dash-surface-hover"}`,children:t("configTab")}),h.jsx("button",{role:"tab","aria-selected":n==="metadata",onClick:()=>r("metadata"),className:`dash-focus-ring px-4 py-2 rounded-lg text-sm font-semibold transition-colors ${n==="metadata"?"bg-dash-accent-subtle text-dash-accent":"text-dash-text-muted hover:text-dash-text hover:bg-dash-surface-hover"}`,children:t("systemTab")})]}),h.jsx("p",{className:"hidden lg:block text-xs text-dash-text-muted",children:t("configWorkspaceHint")})]}),h.jsxs("div",{className:"flex-1 flex min-h-0",children:[n==="config"&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:w,"data-vresize-container":!0,style:{width:`${d[0]}%`},className:"flex flex-col min-w-0 min-h-0 h-full",children:[h.jsx("div",{style:N!==null?{height:`${N}px`}:void 0,className:`min-h-0 ${N!==null?"shrink-0":"flex-1"}`,children:h.jsx(Qm,{width:100,isLoading:O.isLoading,schema:O.schema,config:O.config,sources:O.sources,sections:y,onChange:O.handleFormChange,onFieldFocus:O.setFocusedFieldPath,onNaturalHeightChange:a})}),!O.isLoading&&h.jsxs(h.Fragment,{children:[l&&N!==null&&h.jsx("div",{className:"flex-1"}),L&&h.jsx(tr,{direction:"vertical",isDragging:x.isDragging,onMouseDown:x.startDrag}),h.jsx("div",{className:l?"shrink-0":"flex-1 min-h-0 overflow-hidden",children:h.jsx(XC,{config:O.config,onChange:O.handleFormChange,isCollapsed:l,onCollapsedChange:c})})]})]}),h.jsx(tr,{direction:"horizontal",isDragging:u,onMouseDown:$=>f(0,$)}),h.jsx(od,{width:d[1],isLoading:O.isLoading,jsonText:O.jsonText,cursorLine:O.cursorLine,syntaxError:O.syntaxError,onChange:O.handleJsonChange,onEditorFocus:O.handleJsonEditorFocus,onCursorLineChange:O.setCursorLine,headerPath:"~/.claude/.ck.json",headerActions:H}),h.jsx(tr,{direction:"horizontal",isDragging:u,onMouseDown:$=>f(1,$)}),h.jsx(Kb,{width:d[2],fieldDoc:O.fieldDoc,activeFieldPath:O.activeFieldPath})]}),n==="metadata"&&h.jsxs("div",{className:"flex-1 min-h-0 flex",children:[h.jsx("div",{style:{width:`${p[0]}%`},className:"min-w-0 h-full overflow-auto pr-1",children:O.isLoading?h.jsx("div",{className:"dash-panel h-full flex items-center justify-center",children:h.jsx("div",{className:"animate-pulse text-dash-text-muted text-sm",children:t("loading")})}):h.jsx(fj,{metadata:i})}),h.jsx(tr,{direction:"horizontal",isDragging:m,onMouseDown:$=>b(0,$)}),h.jsx("div",{style:{width:`${p[1]}%`},className:"min-w-0 h-full overflow-hidden",children:h.jsx(pj,{})})]})]})]})};function Sj({phase:t}){const e=t.status==="completed"?"border-green-500":t.status==="in-progress"?"border-blue-500":"border-amber-400";return h.jsx("div",{className:`rounded border-l-4 ${e} bg-white dark:bg-gray-800 p-3 shadow-sm`,children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-xs font-mono text-gray-400 dark:text-gray-500",children:t.phaseId}),h.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-gray-100",children:t.name})]})})}function zl({title:t,phases:e,borderColor:n}){return h.jsxs("div",{className:"flex flex-1 flex-col gap-3 min-w-0","aria-label":`${t} phases`,children:[h.jsxs("div",{className:`rounded-t border-t-2 ${n} bg-gray-50 dark:bg-gray-900 px-3 py-2`,children:[h.jsx("span",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:t}),h.jsx("span",{className:"ml-2 text-xs text-gray-400",children:e.length})]}),h.jsx("div",{className:"flex flex-col gap-2 px-1",children:e.map((r,i)=>h.jsx(Sj,{phase:r},`${r.phaseId}-${i}`))})]})}function Cj({completed:t,total:e}){const{t:n}=he(),r=e===0?0:Math.round(t/e*100);return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"flex justify-between text-xs text-gray-500 dark:text-gray-400",children:[h.jsx("span",{children:n("kanbanProgress")}),h.jsxs("span",{children:[t,"/",e," ",n("kanbanPhases")," — ",r,"% ",n("kanbanComplete")]})]}),h.jsx("div",{className:"h-2 w-full rounded bg-gray-200 dark:bg-gray-700",children:h.jsx("div",{className:"h-2 rounded bg-green-500 transition-all",style:{width:`${r}%`}})})]})}function jj(){const{t}=he(),[e]=mv(),n=e.get("file")??"",[r,i]=g.useState([]),[s,o]=g.useState(!1),[a,l]=g.useState(null);if(g.useEffect(()=>{n&&(o(!0),l(null),i([]),fetch(`/api/plan/parse?file=${encodeURIComponent(n)}`).then(p=>{if(!p.ok){const m={400:"kanbanError400",403:"kanbanError403",404:"kanbanError404"};throw new Error(m[p.status]??`error:HTTP:${p.status}`)}return p.json()}).then(p=>i(p.phases)).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>o(!1)))},[n]),!n)return h.jsx("div",{className:"flex h-full items-center justify-center text-gray-400 dark:text-gray-500",children:t("kanbanNoFile")});let c=[],d=[],u=[],f=null;try{c=r.filter(p=>p.status==="pending"),d=r.filter(p=>p.status==="in-progress"),u=r.filter(p=>p.status==="completed")}catch(p){f=p instanceof Error?p.message:String(p)}return f?h.jsx("div",{className:"flex h-full items-center justify-center text-red-500 dark:text-red-400",children:t("kanbanLoadError")}):h.jsxs("div",{className:"flex h-full flex-col gap-4 p-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("kanbanTitle")}),h.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500 truncate max-w-xs",title:n,children:n.replaceAll("\\","/")})]}),r.length>0&&h.jsx(Cj,{completed:u.length,total:r.length}),s&&h.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400",children:t("loading")}),a&&h.jsxs("div",{className:"rounded border border-red-300 bg-red-50 dark:bg-red-900/20 p-4 text-red-600 dark:text-red-400",children:[t("error"),":"," ",a in{kanbanError400:"",kanbanError403:"",kanbanError404:""}?t(a):a]}),!s&&!a&&r.length===0&&h.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400 dark:text-gray-500",children:t("kanbanNoPhases")}),!s&&!a&&r.length>0&&h.jsxs("section",{"aria-label":t("kanbanTitle"),className:"flex flex-1 flex-col gap-4 overflow-auto md:flex-row",children:[h.jsx(zl,{title:t("kanbanStatus_pending"),phases:c,borderColor:"border-amber-400"}),h.jsx(zl,{title:t("kanbanStatus_in-progress"),phases:d,borderColor:"border-blue-500"}),h.jsx(zl,{title:t("kanbanStatus_completed"),phases:u,borderColor:"border-green-500"})]})]})}const mp=[{key:"agent",labelKey:"migrateTypeAgents",badgeClass:"border-dash-accent/30 text-dash-accent"},{key:"command",labelKey:"migrateTypeCommands",badgeClass:"border-yellow-500/30 text-yellow-400"},{key:"skill",labelKey:"migrateTypeSkills",badgeClass:"border-purple-500/30 text-purple-400"},{key:"config",labelKey:"migrateTypeConfig",badgeClass:"border-teal-500/30 text-teal-400"},{key:"rules",labelKey:"migrateTypeRules",badgeClass:"border-rose-500/30 text-rose-400"},{key:"hooks",labelKey:"migrateTypeHooks",badgeClass:"border-cyan-500/30 text-cyan-400"}],Oj=new Set([8203,8204,8205,8288,65279,8232,8233,8234,8235,8236,8237,8238,8294,8295,8296,8297]);function Pj(t){return t===9||t===10||t===13?!0:t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159||Oj.has(t)}function Xn(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Pj(r)||(e+=n))}return e}function gp(t){if(!t)return"-";const e=t.replace(/\\/g,"/"),n=e.match(/.*\/(\.[^/]+\/)/);if(n?.[1]){const i=(n.index??0)+n[0].length-n[1].length;return e.slice(i)}const r=e.split("/");return r.length>3?`.../${r.slice(-3).join("/")}`:e}function Or(t){return t.success?t.skipped?"skipped":"installed":"failed"}function Nj(t){const e={installed:0,skipped:0,failed:0};for(const n of t){const r=Or(n);r==="installed"?e.installed+=1:r==="skipped"?e.skipped+=1:e.failed+=1}return e}function Xb(t){switch(t){case"agent":case"command":case"skill":case"config":case"rules":case"hooks":case"unknown":return t;default:return"unknown"}}function Aj(t,e){switch(t){case"failed":return{label:e("migrateStatusFailed"),className:"border-red-500/30 bg-red-500/10 text-red-400"};case"skipped":return{label:e("migrateStatusSkipped"),className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"};default:return{label:e("migrateStatusInstalled"),className:"border-green-500/30 bg-green-500/10 text-green-400"}}}function Mj(t){const e=new Map;for(const n of t){const r=Xb(n.portableType),i=e.get(r)||[];i.push(n),e.set(r,i)}return e}function Dj(t){return[Xb(t.portableType),t.provider,t.providerDisplayName,t.itemName,t.path,t.success,t.skipped,t.overwritten,t.error,t.skipReason].map(n=>n===void 0?"":String(n)).join("|")}function Tj(t){if(t.length===0)return!0;const e=t[0].provider;return t.every(n=>n.provider===e)}const Lr=({label:t,count:e,className:n})=>e<=0?null:h.jsxs("span",{className:`inline-flex items-center gap-1 rounded-md border px-2.5 py-1 text-xs ${n}`,children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx("span",{children:t})]}),bp=({labelKey:t,badgeClass:e,items:n,isExpanded:r,onToggle:i,singleProvider:s})=>{const{t:o}=he(),a=n.filter(f=>Or(f)==="installed").length,l=n.filter(f=>Or(f)==="skipped").length,c=n.filter(f=>Or(f)==="failed").length,d=s?"md:grid-cols-[minmax(0,1.5fr)_minmax(0,1.35fr)_auto_minmax(0,1fr)]":"md:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)_minmax(0,1.2fr)_auto_minmax(0,1fr)]",u=new Map;return h.jsxs("div",{className:"rounded-xl border border-dash-border bg-dash-surface overflow-hidden",children:[h.jsxs("button",{type:"button",onClick:i,className:"w-full flex flex-wrap items-center gap-2 px-4 py-3 text-left hover:bg-dash-surface-hover transition-colors",children:[h.jsx("svg",{className:`w-3.5 h-3.5 text-dash-text-muted transition-transform ${r?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:h.jsx("path",{d:"M9 5l7 7-7 7"})}),h.jsx("p",{className:"text-sm font-semibold text-dash-text",children:o(t)}),h.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-semibold ${e}`,children:n.length}),h.jsx("span",{className:"hidden sm:block flex-1"}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px]",children:[h.jsx(Lr,{label:o("migrateStatusInstalled"),count:a,className:"border-green-500/30 bg-green-500/10 text-green-400"}),h.jsx(Lr,{label:o("migrateStatusSkipped"),count:l,className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"}),h.jsx(Lr,{label:o("migrateStatusFailed"),count:c,className:"border-red-500/30 bg-red-500/10 text-red-400"})]})]}),r&&h.jsxs("div",{className:"border-t border-dash-border/80",children:[h.jsxs("div",{className:`hidden md:grid ${d} items-center gap-3 px-4 py-2 border-b border-dash-border/70 text-[10px] font-semibold uppercase tracking-wide text-dash-text-muted`,children:[h.jsx("p",{children:o("migrateItem")}),!s&&h.jsx("p",{children:o("migrateProvider")}),h.jsx("p",{children:o("migratePath")}),h.jsx("p",{children:o("migrateStatus")}),h.jsx("p",{children:o("migrateError")})]}),h.jsx("div",{className:"divide-y divide-dash-border/70",children:n.map(f=>{const p=Dj(f),m=u.get(p)??0;u.set(p,m+1);const b=m===0?p:`${p}#${m}`,x=Or(f),w=Aj(x,o),v=Xn(f.itemName||gp(f.path)),S=Xn(f.providerDisplayName||f.provider||""),C=Xn(f.path||""),k=Xn(gp(f.path)),O=Xn(f.error||f.skipReason||"");return h.jsxs("div",{className:`grid gap-1.5 ${d} items-start px-4 py-2.5 hover:bg-dash-bg/60 transition-colors`,children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"text-xs font-semibold text-dash-text truncate",title:v,children:v}),h.jsxs("div",{className:"mt-0.5 space-y-0.5 md:hidden",children:[!s&&h.jsx("p",{className:"text-[11px] text-dash-text-secondary truncate",children:S}),h.jsx("p",{className:"font-mono text-[11px] text-dash-text-muted truncate",title:C,children:k}),O&&h.jsx("p",{className:"text-[11px] text-red-400/80 line-clamp-2",title:O,children:O})]})]}),!s&&h.jsx("p",{className:"hidden md:block text-[11px] text-dash-text-secondary truncate",children:S}),h.jsx("p",{className:"hidden md:block font-mono text-[11px] text-dash-text-muted truncate",title:C,children:k}),h.jsx("span",{className:`inline-flex w-fit items-center rounded-full border px-2 py-0.5 text-[11px] font-medium ${w.className}`,children:w.label}),h.jsx("p",{className:`hidden md:block text-[11px] truncate ${O?"text-red-400/80":"text-dash-text-muted"}`,title:O,children:O||"-"})]},b)})})]})]})},Ej=({results:t,onReset:e})=>{const{t:n}=he(),[r,i]=g.useState(""),s=g.useDeferredValue(r),[o,a]=g.useState("all"),[l,c]=g.useState(()=>new Set(mp.map(C=>C.key))),d=g.useMemo(()=>{const C=s.trim().toLowerCase();return t.results.filter(k=>{if(o!=="all"&&Or(k)!==o)return!1;if(!C)return!0;const O=(k.itemName||"").toLowerCase(),y=(k.path||"").toLowerCase(),M=(k.providerDisplayName||k.provider||"").toLowerCase();return O.includes(C)||y.includes(C)||M.includes(C)})},[t.results,s,o]),u=g.useMemo(()=>Tj(d),[d]),f=g.useMemo(()=>{if(!u||d.length===0)return"";const C=Array.from(new Set(d.map(k=>k.providerDisplayName?.trim()||"").filter(k=>k.length>0)));return C.length===1?C[0]:d[0]?.provider||""},[d,u]),p=g.useMemo(()=>Mj(d),[d]),m=g.useMemo(()=>Nj(t.results),[t.results]),b=g.useMemo(()=>[...p.keys()],[p]),x=m.installed+m.skipped+m.failed,w=b.length>0&&b.every(C=>l.has(C)),v=C=>{c(k=>{const O=new Set(k);return O.has(C)?O.delete(C):O.add(C),O})},S=()=>{if(w){c(new Set);return}c(new Set(b))};return h.jsxs("div",{className:"dash-panel p-4 md:p-5 space-y-4",children:[h.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[h.jsxs("div",{children:[h.jsxs("h2",{className:"text-base font-semibold text-dash-text",children:[n("migrateSummaryTitle"),u&&f&&h.jsxs("span",{className:"text-dash-text-muted font-normal",children:[" ","· ",Xn(f)]})]}),h.jsxs("p",{className:"text-xs text-dash-text-muted mt-1",children:[x," ",n("migrateSummarySubtitle")]})]}),h.jsx("button",{type:"button",onClick:e,className:"dash-focus-ring px-4 py-2 text-sm font-semibold rounded-md bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:n("migrateSummaryNewMigration")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[h.jsx(Lr,{label:n("migrateStatusInstalled"),count:m.installed,className:"border-green-500/30 bg-green-500/10 text-green-400"}),h.jsx(Lr,{label:n("migrateStatusSkipped"),count:m.skipped,className:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"}),h.jsx(Lr,{label:n("migrateStatusFailed"),count:m.failed,className:"border-red-500/30 bg-red-500/10 text-red-400"})]}),t.warnings.length>0&&h.jsx("div",{className:"space-y-2",children:t.warnings.map((C,k)=>h.jsx("div",{className:"px-3 py-2 border border-yellow-500/30 bg-yellow-500/10 rounded-md text-xs text-yellow-400",children:Xn(C)},k))}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("div",{className:"relative",children:[h.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 stroke-dash-text-muted",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"11",cy:"11",r:"8"}),h.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),h.jsx("input",{type:"text",value:r,onChange:C=>i(C.target.value),placeholder:n("migrateSummarySearchPlaceholder"),className:"dash-focus-ring w-full pl-9 pr-3 py-2 bg-dash-bg border border-dash-border rounded-lg text-dash-text text-sm focus:border-dash-accent transition-colors"})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[["all","installed","skipped","failed"].map(C=>{const k=C==="all"?"migrateSummaryFilterAll":C==="installed"?"migrateStatusInstalled":C==="skipped"?"migrateStatusSkipped":"migrateStatusFailed";return h.jsx("button",{type:"button",onClick:()=>a(C),className:`dash-focus-ring px-3 py-1 text-xs font-medium rounded-full border transition-colors ${o===C?"bg-dash-accent/10 border-dash-accent text-dash-accent":"border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover hover:text-dash-text"}`,children:n(k)},C)}),h.jsx("button",{type:"button",onClick:S,className:"dash-focus-ring ml-1 px-3 py-1 text-xs font-medium rounded-md border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:n(w?"migrateSummaryCollapseAll":"migrateSummaryExpandAll")})]})]}),d.length===0?h.jsx("div",{className:"text-center py-8 text-sm text-dash-text-muted",children:n("migrateSummaryNoResults")}):h.jsxs("div",{className:"space-y-2.5",children:[mp.map(C=>{const k=p.get(C.key);return!k||k.length===0?null:h.jsx(bp,{labelKey:C.labelKey,badgeClass:C.badgeClass,items:k,isExpanded:l.has(C.key),onToggle:()=>v(C.key),singleProvider:u},C.key)}),(()=>{const C=p.get("unknown");return!C||C.length===0?null:h.jsx(bp,{labelKey:"migrateTypeUnknown",badgeClass:"border-dash-border text-dash-text-muted",items:C,isExpanded:l.has("unknown"),onToggle:()=>v("unknown"),singleProvider:u})})()]})]})},Rj=500;function Lj(t){return t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159}function Ij(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Lj(r)||(e+=n))}return e}const $j=({diff:t,className:e=""})=>{const n=t.split(`
|
|
242
242
|
`),r=n.slice(0,Rj),i=n.length-r.length;return h.jsxs("pre",{className:`text-xs font-mono overflow-x-auto p-3 rounded bg-dash-bg border border-dash-border ${e}`,children:[r.map((s,o)=>{const a=Ij(s);let l="text-dash-text";return a.startsWith("+")?l="text-green-400 bg-green-500/10":a.startsWith("-")?l="text-red-400 bg-red-500/10":a.startsWith("@@")&&(l="text-blue-400"),h.jsx("div",{className:l,children:a},`${o}:${a.slice(0,24)}`)}),i>0&&h.jsxs("div",{className:"text-dash-text-muted",children:["... truncated ",i," additional line(s)"]})]})};function Bj(t){return t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159}function bi(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Bj(r)||(e+=n))}return e}const Fj=({action:t,resolution:e,onResolve:n})=>{const{t:r}=he(),[i,s]=g.useState(!1),o=t.ownedSections&&t.ownedSections.length>0;return h.jsxs("div",{className:"border border-dash-border rounded-lg p-4 mb-3 bg-dash-surface",children:[h.jsxs("div",{className:"flex justify-between items-start gap-4",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"font-mono text-sm text-dash-text truncate",children:[bi(t.provider),"/",bi(t.type),"/",bi(t.item)]}),h.jsx("p",{className:"text-xs text-dash-text-muted mt-1",children:bi(t.reason)}),t.targetPath&&h.jsx("p",{className:"text-xs text-dash-text-secondary mt-1 font-mono truncate",children:bi(t.targetPath)})]}),h.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[h.jsx("button",{type:"button",onClick:()=>n({type:"overwrite"}),className:`dash-focus-ring px-3 py-1.5 text-xs font-semibold rounded-md transition-colors ${e?.type==="overwrite"?"bg-dash-accent text-white":"bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover"}`,children:r("migrateConflictUseCK")}),h.jsx("button",{type:"button",onClick:()=>n({type:"keep"}),className:`dash-focus-ring px-3 py-1.5 text-xs font-semibold rounded-md transition-colors ${e?.type==="keep"?"bg-dash-accent text-white":"bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover"}`,children:r("migrateConflictKeepMine")}),o&&h.jsx("button",{type:"button",onClick:()=>n({type:"smart-merge"}),className:`dash-focus-ring px-3 py-1.5 text-xs font-semibold rounded-md transition-colors ${e?.type==="smart-merge"?"bg-dash-accent text-white":"bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover"}`,children:r("migrateConflictSmartMerge")}),t.diff&&h.jsx("button",{type:"button",onClick:()=>s(!i),className:"dash-focus-ring px-3 py-1.5 text-xs font-medium rounded-md border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:r(i?"migrateConflictHideDiff":"migrateConflictShowDiff")})]})]}),i&&t.diff&&h.jsx($j,{diff:t.diff,className:"mt-3"}),e&&h.jsxs("div",{className:"mt-2 text-xs text-green-400 flex items-center gap-1.5",children:[h.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 20 20",children:h.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),h.jsxs("span",{children:[r("migrateConflictResolved"),": ",Vj(e.type,r)]})]})]})};function Vj(t,e){switch(t){case"overwrite":return e("migrateConflictUseCK");case"keep":return e("migrateConflictKeepMine");case"smart-merge":return e("migrateConflictSmartMerge");case"resolved":return e("migrateConflictManual");default:return String(t)}}const zj=[{key:"install",labelKey:"migrateActionInstall",activeClass:"border-green-400 text-green-400",badgeClass:"bg-green-500/10 border-green-500/30 text-green-400"},{key:"update",labelKey:"migrateActionUpdate",activeClass:"border-yellow-400 text-yellow-400",badgeClass:"bg-yellow-500/10 border-yellow-500/30 text-yellow-400"},{key:"conflict",labelKey:"migrateActionConflict",activeClass:"border-red-400 text-red-400",badgeClass:"bg-red-500/10 border-red-500/30 text-red-400"},{key:"delete",labelKey:"migrateActionDelete",activeClass:"border-dash-text-secondary text-dash-text-secondary",badgeClass:"bg-dash-bg border-dash-border text-dash-text-secondary"},{key:"skip",labelKey:"migrateActionSkip",activeClass:"border-dash-text-muted text-dash-text-muted",badgeClass:"bg-dash-bg border-dash-border text-dash-text-muted"}],xp=["agent","command","skill","config","rules","hooks"],_j={agent:"migrateTypeAgents",command:"migrateTypeCommands",skill:"migrateTypeSkills",config:"migrateTypeConfig",rules:"migrateTypeRules",hooks:"migrateTypeHooks"},Hj={agent:"border-dash-accent/30 text-dash-accent",command:"border-yellow-500/30 text-yellow-400",skill:"border-purple-500/30 text-purple-400",config:"border-teal-500/30 text-teal-400",rules:"border-rose-500/30 text-rose-400",hooks:"border-cyan-500/30 text-cyan-400"},gr=200;function Wj(t){return t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159}function Fo(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(Wj(r)||(e+=n))}return e}function Uj(t){const e={install:[],update:[],skip:[],conflict:[],delete:[]};for(const n of t)e[n.action].push(n);return e}function Kj(t){const e=new Map;for(const n of t){const r=e.get(n.type)||[];r.push(n),e.set(n.type,r)}return e}const Gj=({plan:t,resolutions:e,onResolve:n,actionKey:r})=>{const{t:i}=he(),s=g.useMemo(()=>Uj(t.actions),[t.actions]),o=g.useMemo(()=>zj.filter(f=>s[f.key].length>0),[s]),[a,l]=g.useState(()=>s.conflict.length>0?"conflict":s.install.length>0?"install":o[0]?.key??"install");g.useEffect(()=>{s[a]?.length===0&&o.length>0&&l(o[0].key)},[s,a,o]);const c=g.useMemo(()=>s[a]??[],[s,a]),d=g.useMemo(()=>Kj(c),[c]),u=f=>{for(const p of s.conflict)n(p,{type:f})};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[t.summary.install>0&&h.jsxs("div",{className:"px-2.5 py-1 rounded-md bg-green-500/10 border border-green-500/30 text-green-400",children:[t.summary.install," ",i("migrateActionInstall")]}),t.summary.update>0&&h.jsxs("div",{className:"px-2.5 py-1 rounded-md bg-yellow-500/10 border border-yellow-500/30 text-yellow-400",children:[t.summary.update," ",i("migrateActionUpdate")]}),t.summary.skip>0&&h.jsxs("div",{className:"px-2.5 py-1 rounded-md bg-dash-bg border border-dash-border text-dash-text-muted",children:[t.summary.skip," ",i("migrateActionSkip")]}),t.summary.conflict>0&&h.jsxs("div",{className:"px-2.5 py-1 rounded-md bg-red-500/10 border border-red-500/30 text-red-400",children:[t.summary.conflict," ",i("migrateActionConflict")]}),t.summary.delete>0&&h.jsxs("div",{className:"px-2.5 py-1 rounded-md bg-dash-bg border border-dash-border text-dash-text-secondary",children:[t.summary.delete," ",i("migrateActionDelete")]})]}),o.length>1&&h.jsx("div",{className:"flex gap-1 border-b border-dash-border",children:o.map(f=>{const p=a===f.key;return h.jsxs("button",{type:"button",onClick:()=>l(f.key),className:`px-3 py-2 text-xs font-medium border-b-2 transition-colors ${p?f.activeClass:"border-transparent text-dash-text-muted hover:text-dash-text-secondary"}`,children:[i(f.labelKey)," ",h.jsx("span",{className:`ml-1 px-1.5 py-0.5 rounded text-[10px] border ${f.badgeClass}`,children:s[f.key].length})]},f.key)})}),a==="conflict"&&s.conflict.length>0&&h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsxs("h3",{className:"text-sm font-semibold text-red-400",children:[i("migrateConflictSectionTitle")," (",s.conflict.length,")"]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{type:"button",onClick:()=>u("overwrite"),className:"dash-focus-ring px-3 py-1 text-xs font-medium rounded-md bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:i("migrateConflictOverwriteAll")}),h.jsx("button",{type:"button",onClick:()=>u("keep"),className:"dash-focus-ring px-3 py-1 text-xs font-medium rounded-md bg-dash-bg border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:i("migrateConflictKeepAll")})]})]}),a==="conflict"?xp.map(f=>{const p=d.get(f);return!p||p.length===0?null:h.jsxs(yp,{type:f,count:p.length,children:[p.slice(0,gr).map(m=>h.jsx(Fj,{action:m,resolution:e.get(r(m))||null,onResolve:b=>n(m,b)},r(m))),p.length>gr&&h.jsxs("div",{className:"text-xs text-dash-text-muted",children:["... ",p.length-gr," more"]})]},`${a}:${f}`)}):xp.map(f=>{const p=d.get(f);return!p||p.length===0?null:h.jsxs(yp,{type:f,count:p.length,defaultExpanded:a!=="skip",children:[p.slice(0,gr).map(m=>h.jsx(qj,{action:m},`${m.provider}:${m.type}:${m.item}:${m.global}:${m.action}`)),p.length>gr&&h.jsxs("div",{className:"text-xs text-dash-text-muted",children:["... ",p.length-gr," more"]})]},`${a}:${f}`)})]})},yp=({type:t,count:e,defaultExpanded:n=!0,children:r})=>{const{t:i}=he(),[s,o]=g.useState(n),a=Hj[t],l=i(_j[t]);return h.jsxs("div",{className:"border border-dash-border rounded-lg bg-dash-surface",children:[h.jsxs("button",{type:"button","aria-expanded":s,onClick:()=>o(!s),className:"w-full px-4 py-2.5 flex items-center justify-between text-left hover:bg-dash-surface-hover transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h4",{className:"text-sm font-semibold text-dash-text",children:l}),h.jsx("span",{className:`px-2 py-0.5 text-xs rounded-md border ${a}`,children:e})]}),h.jsx("svg",{"aria-hidden":"true",className:`w-4 h-4 text-dash-text-muted transition-transform ${s?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&h.jsx("div",{className:"px-4 pt-1 pb-4 space-y-2",children:r})]})},qj=({action:t})=>h.jsxs("div",{className:"px-3 py-2 bg-dash-bg rounded-md border border-dash-border",children:[h.jsxs("div",{className:"font-mono text-xs text-dash-text",children:[Fo(t.provider),"/",Fo(t.item)]}),h.jsx("div",{className:"text-xs text-dash-text-muted mt-1",children:Fo(t.reason)}),t.targetPath&&h.jsx("div",{className:"text-xs text-dash-text-secondary mt-0.5 font-mono truncate",children:Fo(t.targetPath)})]});var Jj=function(e){return typeof window<"u"?matchMedia&&matchMedia("(prefers-color-scheme: ".concat(e,")")):{matches:!1}},_l,Yj=g.createContext({appearance:"light",setAppearance:function(){},isDarkMode:!1,themeMode:"light",setThemeMode:function(){},browserPrefers:(_l=Jj("dark"))!==null&&_l!==void 0&&_l.matches?"dark":"light"}),Qj=function(){return g.useContext(Yj)};const Zb=(t,e)=>{if(e)return"row";switch(t){case"horizontal":return"row";case"horizontal-reverse":return"row-reverse";case"vertical":default:return"column";case"vertical-reverse":return"column-reverse"}},Xj=t=>{if(t)return["space-between","space-around","space-evenly"].includes(t)},Zj=(t,e)=>Zb(t,e)==="row",br=t=>typeof t=="number"?`${t}px`:t,eO=({visible:t,flex:e,gap:n,direction:r,horizontal:i,align:s,justify:o,distribution:a,height:l,width:c,padding:d,paddingInline:u,paddingBlock:f,prefixCls:p,as:m="div",className:b,style:x,children:w,wrap:v,ref:S,...C})=>{const k=o||a,y=Zj(r,i)&&!c&&Xj(k)?"100%":br(c),M={...e!==void 0?{"--lobe-flex":String(e)}:{},...r||i?{"--lobe-flex-direction":Zb(r,i)}:{},...v!==void 0?{"--lobe-flex-wrap":v}:{},...k!==void 0?{"--lobe-flex-justify":k}:{},...s!==void 0?{"--lobe-flex-align":s}:{},...y!==void 0?{"--lobe-flex-width":y}:{},...l!==void 0?{"--lobe-flex-height":br(l)}:{},...d!==void 0?{"--lobe-flex-padding":br(d)}:{},...u!==void 0?{"--lobe-flex-padding-inline":br(u)}:{},...f!==void 0?{"--lobe-flex-padding-block":br(f)}:{},...n!==void 0?{"--lobe-flex-gap":br(n)}:{},...x},A="lobe-flex",R=[A,t===!1?`${A}--hidden`:void 0,p?`${p}-flex`:void 0,b].filter(Boolean).join(" ");return h.jsx(m,{ref:S,...C,className:R,style:M,children:w})};var ex=g.memo(eO);const tO=({children:t,ref:e,...n})=>h.jsx(ex,{...n,align:"center",justify:"center",ref:e,children:t});var nO=tO;const rO=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function iO(t){return Array.from(t.match(rO)??[])}function sO(t){return iO(t).map(n=>n.toLowerCase()).join("-")}g.createContext(null);var oO=function(e,n){if(n){if(e&&n==="#000")return"0 0 0 1px rgba(255,255,255,0.1) inset";if(!e&&n==="#fff")return"0 0 0 1px rgba(0,0,0,0.05) inset"}};function ns(t){"@babel/helpers - typeof";return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ns(t)}var aO=["shape","color","background","size","style","iconMultiple","Icon","iconStyle","iconClassName"];function vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vp(Object(n),!0).forEach(function(r){lO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lO(t,e,n){return e=cO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cO(t){var e=hO(t,"string");return ns(e)=="symbol"?e:String(e)}function hO(t,e){if(ns(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dO(t,e){if(t==null)return{};var n=uO(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function uO(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var _n=g.memo(function(t){var e=t.shape,n=e===void 0?"circle":e,r=t.color,i=r===void 0?"#fff":r,s=t.background,o=t.size,a=t.style,l=t.iconMultiple,c=l===void 0?.75:l,d=t.Icon,u=t.iconStyle,f=t.iconClassName,p=dO(t,aO),m=Qj(),b=m.isDarkMode;return h.jsx(nO,Vo(Vo({flex:"none",style:Vo({background:s,borderRadius:n==="circle"?"50%":Math.floor(o*.1),boxShadow:oO(b,s),color:i,height:o,width:o},a)},p),{},{children:d&&h.jsx(d,{className:f,color:i,size:o,style:Vo({transform:"scale(".concat(c,")")},u)})}))});function rs(t){"@babel/helpers - typeof";return rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rs(t)}var fO=["Icon","style","Text","color","size","spaceMultiple","textMultiple","extra","extraStyle","showText","showLogo","extraClassName","iconProps","inverse"];function wp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wp(Object(n),!0).forEach(function(r){pO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pO(t,e,n){return e=mO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mO(t){var e=gO(t,"string");return rs(e)=="symbol"?e:String(e)}function gO(t,e){if(rs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bO(t,e){if(t==null)return{};var n=xO(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function xO(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Hn=g.memo(function(t){var e=t.Icon,n=t.style,r=t.Text,i=t.color,s=t.size,o=s===void 0?24:s,a=t.spaceMultiple,l=a===void 0?1:a,c=t.textMultiple,d=c===void 0?1:c,u=t.extra,f=t.extraStyle,p=t.showText,m=p===void 0?!0:p,b=t.showLogo,x=b===void 0?!0:b,w=t.extraClassName,v=t.iconProps,S=t.inverse,C=bO(t,fO),k=e&&x&&h.jsx(e,kn(kn({size:o},v),{},{style:kn(S?{marginLeft:o*l}:{marginRight:o*l},v?.style)})),O=m&&r&&h.jsx(r,{size:o*d});return h.jsxs(ex,kn(kn({align:"center",flex:"none",horizontal:!0,justify:"flex-start",style:kn({color:i},n)},C),{},{children:[S?h.jsxs(h.Fragment,{children:[O,k]}):h.jsxs(h.Fragment,{children:[k,O]}),u&&h.jsx("span",{className:w,style:kn({fontSize:o*d*.95,lineHeight:1},f),children:u})]}))}),yO=function(e,n){return g.useMemo(function(){var r=Array.from({length:n},function(i,s){var o="lobe-icons-".concat(sO(e),"-fill-").concat(s);return{fill:"url(#".concat(o,")"),id:o}});return r},[e,n])},Jr="Claude",vO=.8,wO=.1,tx="#D97757",kO=tx,SO="#fff",CO=.75;function is(t){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},is(t)}var jO=["size","style"];function kp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kp(Object(n),!0).forEach(function(r){OO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function OO(t,e,n){return e=PO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function PO(t){var e=NO(t,"string");return is(e)=="symbol"?e:String(e)}function NO(t,e){if(is(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(is(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function AO(t,e){if(t==null)return{};var n=MO(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function MO(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var ld=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=AO(t,jO);return h.jsxs("svg",Hl(Hl({fill:"currentColor",fillRule:"evenodd",height:n,style:Hl({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Jr}),h.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]}))});function ss(t){"@babel/helpers - typeof";return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ss(t)}function Sp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function DO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sp(Object(n),!0).forEach(function(r){TO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function TO(t,e,n){return e=EO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function EO(t){var e=RO(t,"string");return ss(e)=="symbol"?e:String(e)}function RO(t,e){if(ss(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ss(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LO(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var IO=g.memo(function(t){var e=Object.assign({},(LO(t),t));return h.jsx(_n,DO({Icon:ld,"aria-label":Jr,background:kO,color:SO,iconMultiple:CO},e))});function os(t){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},os(t)}var $O=["size","style"];function Cp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cp(Object(n),!0).forEach(function(r){BO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function BO(t,e,n){return e=FO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FO(t){var e=VO(t,"string");return os(e)=="symbol"?e:String(e)}function VO(t,e){if(os(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(os(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zO(t,e){if(t==null)return{};var n=_O(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function _O(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var nx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=zO(t,$O);return h.jsxs("svg",Wl(Wl({height:n,style:Wl({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Jr}),h.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z",fill:"#D97757",fillRule:"nonzero"})]}))});function as(t){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},as(t)}var HO=["size","style"];function jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ul(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jp(Object(n),!0).forEach(function(r){WO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function WO(t,e,n){return e=UO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UO(t){var e=KO(t,"string");return as(e)=="symbol"?e:String(e)}function KO(t,e){if(as(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(as(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function GO(t,e){if(t==null)return{};var n=qO(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qO(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var rx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=GO(t,HO);return h.jsxs("svg",Ul(Ul({fill:"currentColor",fillRule:"nonzero",height:n,style:Ul({flex:"none",lineHeight:1},r),viewBox:"0 0 97 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Jr}),h.jsx("path",{d:"M13.623 20.222c-3.417 0-5.753-1.901-6.855-4.827a12.992 12.992 0 01-.838-4.772c0-4.907 2.206-8.315 7.08-8.315 3.275 0 5.297 1.425 6.448 4.826h1.402l-.19-4.69C18.709 1.18 16.258.543 13.276.543c-4.2 0-7.775 1.874-9.763 5.254a11.357 11.357 0 00-1.511 5.872c0 3.753 1.777 7.08 5.113 8.926a11.95 11.95 0 005.943 1.398c3.254 0 5.835-.617 8.122-1.697l.593-5.172h-1.43c-.858 2.362-1.88 3.78-3.574 4.534-.831.373-1.88.564-3.146.564zm14.74-17.914L28.499 0h-.967L23.23 1.29v.699l1.907.882v16.142c0 1.1-.565 1.344-2.043 1.528v1.18h7.319v-1.18c-1.484-.184-2.042-.428-2.042-1.528V2.315l-.007-.007zm29.104 19.685h.565l4.95-.937v-1.208l-.695-.054c-1.157-.109-1.457-.346-1.457-1.29V9.897l.137-2.763h-.783l-4.678.672v1.181l.457.082c1.266.183 1.64.536 1.64 1.419v7.67c-1.212.937-2.369 1.527-3.744 1.527-1.525 0-2.471-.774-2.471-2.58V9.905l.136-2.763h-.804l-4.684.672v1.181l.484.082c1.266.183 1.64.536 1.64 1.418v7.08c0 3 1.703 4.426 4.412 4.426 2.07 0 3.765-1.1 5.038-2.627L57.474 22l-.007-.007zm-13.602-9.55c0-3.836-2.043-5.309-5.733-5.309-3.254 0-5.616 1.344-5.616 3.57 0 .666.238 1.175.721 1.528l2.478-.326c-.109-.746-.163-1.201-.163-1.391 0-1.263.674-1.901 2.042-1.901 2.022 0 3.044 1.419 3.044 3.7v.746l-5.106 1.527c-1.702.462-2.67.863-3.316 1.8a3.386 3.386 0 00-.476 1.9c0 2.172 1.497 3.706 4.057 3.706 1.852 0 3.493-.835 4.922-2.416.51 1.581 1.294 2.416 2.69 2.416 1.13 0 2.15-.455 3.063-1.344l-.272-.937a4.363 4.363 0 01-1.178.163c-.783 0-1.157-.617-1.157-1.826v-5.607zm-6.536 7.378c-1.396 0-2.26-.808-2.26-2.226 0-.964.456-1.528 1.43-1.854l4.139-1.31v3.965c-1.321.997-2.097 1.425-3.31 1.425zm43.095 1.235v-1.208l-.701-.054c-1.158-.109-1.45-.346-1.45-1.29V2.308L78.409 0h-.974l-4.302 1.29v.699l1.906.882V8.18a6.024 6.024 0 00-3.656-1.046c-4.276 0-7.612 3.245-7.612 8.098 0 3.998 2.397 6.761 6.346 6.761 2.042 0 3.819-.99 4.922-2.525l-.136 2.525h.571l4.95-.937zm-8.96-12.313c2.043 0 3.575 1.181 3.575 3.353v6.11a4.91 4.91 0 01-3.547 1.425c-2.928 0-4.412-2.308-4.412-5.39 0-3.462 1.695-5.498 4.385-5.498zm19.424 3.055c-.381-1.792-1.484-2.81-3.016-2.81-2.288 0-3.874 1.717-3.874 4.18 0 3.646 1.934 6.008 5.059 6.008a5.858 5.858 0 005.03-2.953l.913.245c-.408 3.163-3.281 5.525-6.808 5.525-4.14 0-6.992-3.054-6.992-7.399 0-4.378 3.098-7.46 7.237-7.46 3.09 0 5.27 1.853 5.97 5.07l-10.783 3.3V14.05l7.264-2.247v-.006z"})]}))});function ls(t){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(t)}var JO=["type"];function Op(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function YO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Op(Object(n),!0).forEach(function(r){QO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Op(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function QO(t,e,n){return e=XO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XO(t){var e=ZO(t,"string");return ls(e)=="symbol"?e:String(e)}function ZO(t,e){if(ls(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ls(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e6(t,e){if(t==null)return{};var n=t6(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function t6(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var n6=g.memo(function(t){var e=t.type,n=e===void 0?"mono":e,r=e6(t,JO),i=n==="color"?nx:ld;return h.jsx(Hn,YO({Icon:i,Text:rx,"aria-label":Jr,spaceMultiple:wO,textMultiple:vO},r))}),fr=ld;fr.Color=nx;fr.Text=rx;fr.Combine=n6;fr.Avatar=IO;fr.colorPrimary=tx;fr.title=Jr;var Js="OpenAI",r6=.75,i6=.1,ix="#000",sx="#19C37D",ox="#AB68FF",ax="#F86AA4",cd="#F9C322",lx="#0099FF",cx="#0000FE",s6=ix,o6="#fff",a6=.75;function cs(t){"@babel/helpers - typeof";return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(t)}var l6=["size","style"];function Pp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pp(Object(n),!0).forEach(function(r){c6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function c6(t,e,n){return e=h6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h6(t){var e=d6(t,"string");return cs(e)=="symbol"?e:String(e)}function d6(t,e){if(cs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(cs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function u6(t,e){if(t==null)return{};var n=f6(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function f6(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var hd=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=u6(t,l6);return h.jsxs("svg",Kl(Kl({fill:"currentColor",fillRule:"evenodd",height:n,style:Kl({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Js}),h.jsx("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})]}))}),hr="Gemini",p6=.8,m6=.2,hx="#fff",g6=hx,b6="#fff",x6=.8;function hs(t){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hs(t)}var y6=["size","style"];function Np(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Np(Object(n),!0).forEach(function(r){v6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v6(t,e,n){return e=w6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w6(t){var e=k6(t,"string");return hs(e)=="symbol"?e:String(e)}function k6(t,e){if(hs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(hs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function S6(t,e){return P6(t)||O6(t,e)||j6(t,e)||C6()}function C6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
243
243
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j6(t,e){if(t){if(typeof t=="string")return Ap(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ap(t,e)}}function Ap(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O6(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function P6(t){if(Array.isArray(t))return t}function N6(t,e){if(t==null)return{};var n=A6(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function A6(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var dd=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=N6(t,y6),s=yO(hr,3),o=S6(s,3),a=o[0],l=o[1],c=o[2];return h.jsxs("svg",Gl(Gl({height:n,style:Gl({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:hr}),h.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),h.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:a.fill}),h.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:l.fill}),h.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:c.fill}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:a.id,x1:"7",x2:"11",y1:"15.5",y2:"12",children:[h.jsx("stop",{stopColor:"#08B962"}),h.jsx("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})]}),h.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:l.id,x1:"8",x2:"11.5",y1:"5.5",y2:"11",children:[h.jsx("stop",{stopColor:"#F94543"}),h.jsx("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})]}),h.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:c.id,x1:"3.5",x2:"17.5",y1:"13.5",y2:"12",children:[h.jsx("stop",{stopColor:"#FABC12"}),h.jsx("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"})]})]})]}))});function ds(t){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ds(t)}function Mp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function M6(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mp(Object(n),!0).forEach(function(r){D6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function D6(t,e,n){return e=T6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T6(t){var e=E6(t,"string");return ds(e)=="symbol"?e:String(e)}function E6(t,e){if(ds(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function R6(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var L6=g.memo(function(t){var e=Object.assign({},(R6(t),t));return h.jsx(_n,M6({Icon:dd,"aria-label":hr,background:g6,color:b6,iconMultiple:x6},e))});function us(t){"@babel/helpers - typeof";return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(t)}var I6=["size","style"];function Dp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ql(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dp(Object(n),!0).forEach(function(r){$6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $6(t,e,n){return e=B6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B6(t){var e=F6(t,"string");return us(e)=="symbol"?e:String(e)}function F6(t,e){if(us(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(us(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V6(t,e){if(t==null)return{};var n=z6(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function z6(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var dx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=V6(t,I6);return h.jsxs("svg",ql(ql({fill:"currentColor",fillRule:"evenodd",height:n,style:ql({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:hr}),h.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})]}))});function fs(t){"@babel/helpers - typeof";return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fs(t)}var _6=["size","style"];function Tp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tp(Object(n),!0).forEach(function(r){H6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function H6(t,e,n){return e=W6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W6(t){var e=U6(t,"string");return fs(e)=="symbol"?e:String(e)}function U6(t,e){if(fs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(fs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function K6(t,e){if(t==null)return{};var n=G6(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function G6(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var ux=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=K6(t,_6);return h.jsxs("svg",Jl(Jl({fill:"currentColor",fillRule:"evenodd",height:n,style:Jl({flex:"none",lineHeight:1},r),viewBox:"0 0 98 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:hr}),h.jsx("path",{d:"M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z"})]}))});function ps(t){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ps(t)}var q6=["type"];function Ep(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function J6(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ep(Object(n),!0).forEach(function(r){Y6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y6(t,e,n){return e=Q6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q6(t){var e=X6(t,"string");return ps(e)=="symbol"?e:String(e)}function X6(t,e){if(ps(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ps(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Z6(t,e){if(t==null)return{};var n=eP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function eP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var tP=g.memo(function(t){var e=t.type,n=e===void 0?"mono":e,r=Z6(t,q6),i=n==="color"?dd:dx;return h.jsx(Hn,J6({Icon:i,Text:ux,"aria-label":hr,spaceMultiple:m6,textMultiple:p6},r))}),pr=dx;pr.Color=dd;pr.Text=ux;pr.Combine=tP;pr.Avatar=L6;pr.colorPrimary=hx;pr.title=hr;function ms(t){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(t)}var nP=["type"];function Rp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rp(Object(n),!0).forEach(function(r){iP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iP(t,e,n){return e=sP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sP(t){var e=oP(t,"string");return ms(e)=="symbol"?e:String(e)}function oP(t,e){if(ms(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ms(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aP(t,e){if(t==null)return{};var n=lP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var cP=g.memo(function(t){var e=t.type,n=e===void 0?"normal":e,r=aP(t,nP),i=g.useMemo(function(){switch(n){case"gpt3":return sx;case"gpt4":return ox;case"gpt5":return ax;case"o3":case"o1":return cd;case"oss":return lx;case"platform":return cx;default:return s6}},[n]);return h.jsx(_n,rP({Icon:hd,"aria-label":Js,background:i,color:o6,iconMultiple:a6},r))});function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}var hP=["size","style"];function Lp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Yl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lp(Object(n),!0).forEach(function(r){dP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dP(t,e,n){return e=uP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uP(t){var e=fP(t,"string");return gs(e)=="symbol"?e:String(e)}function fP(t,e){if(gs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pP(t,e){if(t==null)return{};var n=mP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var fx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=pP(t,hP);return h.jsxs("svg",Yl(Yl({fill:"currentColor",fillRule:"evenodd",height:n,style:Yl({flex:"none",lineHeight:1},r),viewBox:"0 0 84 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Js}),h.jsx("path",{d:"M2 10.955c0 5.276 3.376 8.955 8.054 8.955 4.678 0 8.054-3.679 8.054-8.955S14.732 2 10.054 2C5.423 2 2.068 5.606 2 10.797L2 10.955zm13.021 0c0 3.775-2.05 6.22-4.967 6.22-2.918 0-4.968-2.445-4.968-6.22 0-3.776 2.05-6.22 4.968-6.22 2.917 0 4.967 2.444 4.967 6.22zm11.778 8.955c3.545 0 5.57-3.001 5.57-6.607 0-3.607-2.025-6.608-5.57-6.608-1.64 0-2.845.654-3.64 1.598V6.937h-2.894V24h2.893v-5.688c.796.944 2.002 1.598 3.641 1.598zm-3.713-6.97c0-2.397 1.35-3.703 3.135-3.703 2.097 0 3.23 1.645 3.23 4.066 0 2.42-1.133 4.066-3.23 4.066-1.785 0-3.135-1.332-3.135-3.68v-.75zM40.2 19.91c2.532 0 4.533-1.331 5.425-3.558l-2.483-.944c-.386 1.307-1.52 2.033-2.942 2.033-1.857 0-3.159-1.331-3.376-3.51h8.874v-.967c0-3.485-1.953-6.269-5.619-6.269-3.665 0-6.028 2.88-6.028 6.608 0 3.92 2.532 6.607 6.15 6.607zm-.145-10.77c1.833 0 2.701 1.21 2.725 2.614H36.97c.434-1.719 1.591-2.614 3.086-2.614zm7.814 10.504h2.894v-7.455c0-1.815 1.326-2.783 2.628-2.783 1.591 0 2.218 1.137 2.218 2.71v7.528h2.894V11.27c0-2.735-1.592-4.575-4.244-4.575-1.64 0-2.773.75-3.496 1.598V6.937h-2.894v12.707zM66.978 2.266l-6.56 17.378h3.063l1.471-3.97h7.475l1.495 3.97h3.11L70.475 2.266h-3.496zm1.687 3.437l2.75 7.26h-5.45l2.7-7.26zM82 2.317h-3.086v17.377H82V2.317z"})]}))});function bs(t){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bs(t)}var gP=["extraStyle"];function Ip(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $p(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ip(Object(n),!0).forEach(function(r){bP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bP(t,e,n){return e=xP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xP(t){var e=yP(t,"string");return bs(e)=="symbol"?e:String(e)}function yP(t,e){if(bs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vP(t,e){if(t==null)return{};var n=wP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function wP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var kP=g.memo(function(t){var e=t.extraStyle,n=vP(t,gP);return h.jsx(Hn,$p({Icon:hd,Text:fx,"aria-label":Js,extraStyle:$p({fontWeight:600},e),spaceMultiple:i6,textMultiple:r6},n))}),Ct=hd;Ct.Text=fx;Ct.Combine=kP;Ct.Avatar=cP;Ct.colorPrimary=ix;Ct.colorGpt3=sx;Ct.colorGpt4=ox;Ct.colorGpt5=ax;Ct.colorO1=cd;Ct.colorO3=cd;Ct.colorOss=lx;Ct.colorPlatform=cx;Ct.title=Js;var Ys="GithubCopilot",SP=.75,CP=.3,px="#000",jP=px,OP="#fff",PP=.75;function xs(t){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xs(t)}var NP=["size","style"];function Bp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ql(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bp(Object(n),!0).forEach(function(r){AP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function AP(t,e,n){return e=MP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MP(t){var e=DP(t,"string");return xs(e)=="symbol"?e:String(e)}function DP(t,e){if(xs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(xs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function TP(t,e){if(t==null)return{};var n=EP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function EP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var ud=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=TP(t,NP);return h.jsxs("svg",Ql(Ql({fill:"currentColor",fillRule:"evenodd",height:n,style:Ql({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Ys}),h.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})]}))});function ys(t){"@babel/helpers - typeof";return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ys(t)}function Fp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function RP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fp(Object(n),!0).forEach(function(r){LP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function LP(t,e,n){return e=IP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IP(t){var e=$P(t,"string");return ys(e)=="symbol"?e:String(e)}function $P(t,e){if(ys(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BP(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var FP=g.memo(function(t){var e=Object.assign({},(BP(t),t));return h.jsx(_n,RP({Icon:ud,"aria-label":Ys,background:jP,color:OP,iconMultiple:PP},e))});function vs(t){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vs(t)}var VP=["size","style"];function Vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vp(Object(n),!0).forEach(function(r){zP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zP(t,e,n){return e=_P(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _P(t){var e=HP(t,"string");return vs(e)=="symbol"?e:String(e)}function HP(t,e){if(vs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(vs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WP(t,e){if(t==null)return{};var n=UP(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function UP(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var mx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=WP(t,VP);return h.jsxs("svg",Xl(Xl({fill:"currentColor",fillRule:"evenodd",height:n,style:Xl({flex:"none",lineHeight:1},r),viewBox:"0 0 154 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Ys}),h.jsx("path",{d:"M2 11.875c0 5.256 3.013 8.506 8.19 8.506 4.76 0 8.027-2.72 8.027-7.722v-1.545h-7.982v2.928h4.095c-.161 1.96-1.68 3.25-4.049 3.25-2.6 0-4.347-1.498-4.347-4.334V10.7c0-2.582 1.518-4.31 4.186-4.31 1.91 0 3.267.922 3.68 2.374h3.865c-.437-3.366-3.427-5.625-7.499-5.625C5.29 3.138 2 6.366 2 11.875zm17.308-5.44h3.496V3h-3.496v3.435zm0 13.715h3.496V7.795h-3.496V20.15zm10.544-9.52h2.438V7.795h-2.438V3.922h-3.496v3.873H24.17v2.835h2.186v6.8c0 1.637.69 2.72 2.76 2.72h3.174v-2.766h-2.438V10.63zm3.994 9.52h3.727v-7.076h7.568v7.076h3.726V3.346h-3.726v6.777h-7.568V3.346h-3.727V20.15zM62.385 7.795h-3.497v6.523c0 1.868-1.012 3.205-2.668 3.205-1.38 0-2.162-.83-2.162-2.56V7.796h-3.52v7.722c0 2.95 1.357 4.864 4.118 4.864 1.955 0 3.29-.945 4.002-2.49h.207l.46 2.26h3.06V7.794zm1.698 12.355h3.06l.436-2.213h.207c.713 1.591 2.3 2.444 4.072 2.444 3.174 0 5.015-2.374 5.015-6.385 0-4.057-1.887-6.432-5.084-6.432-1.978 0-3.428 1.014-4.003 2.49h-.207V3h-3.496v17.15zm3.496-5.624v-1.06c0-1.845 1.173-3.043 2.99-3.043 1.657 0 2.738.853 2.738 2.581v1.983c0 1.521-.874 2.559-2.714 2.559-1.864 0-3.014-1.222-3.014-3.02zm21.8 5.855c4.21 0 7.177-2.351 7.683-6.063h-3.151c-.46 2.098-2.186 3.389-4.486 3.389-2.852 0-4.67-1.867-4.67-4.518v-2.743c0-2.882 1.887-4.634 4.716-4.634 2.53 0 4.072 1.36 4.44 3.366h3.151c-.368-3.665-3.243-6.063-7.499-6.063-5.038 0-7.982 3.274-7.982 8.668 0 5.348 2.898 8.598 7.798 8.598zm8.533-6.34c0 3.92 2.346 6.34 5.98 6.34 3.796 0 6.004-2.536 6.004-6.34 0-4.056-2.484-6.338-6.003-6.338-3.635 0-5.981 2.397-5.981 6.339zm2.898.992V13.12c0-1.89 1.22-3.066 3.083-3.066 1.817 0 3.082 1.152 3.082 3.066v1.913c0 1.96-1.288 2.997-3.082 2.997-1.749 0-3.083-1.015-3.083-2.997zM111.018 24h2.853v-6.132h.184c.667 1.453 2.116 2.398 4.186 2.398 3.083 0 4.992-2.26 4.992-6.293 0-3.942-1.863-6.27-4.992-6.27-1.863 0-3.427.852-4.186 2.397h-.184l-.345-2.167h-2.508V24zm6.211-6.063c-2.024 0-3.358-1.314-3.358-3.342v-1.222c0-2.005 1.31-3.342 3.381-3.342 2.002 0 3.037 1.152 3.037 2.881v2.144c0 1.815-1.16 2.849-2.973 2.88l-.087.001zm7.1-11.733h2.83V3.115h-2.83v3.09zm0 13.946h2.83V7.933h-2.83V20.15zm4.338 0h2.83V3.115h-2.83V20.15zm9.927-12.447c3.52 0 6.004 2.282 6.004 6.339 0 3.803-2.208 6.339-6.004 6.339-3.634 0-5.98-2.42-5.98-6.34 0-3.941 2.346-6.338 5.98-6.338zm10.922-3.689v3.919H152v2.328h-2.484v7.607H152v2.282h-2.99c-1.749 0-2.324-.922-2.324-2.282v-7.607h-2.185V7.933h2.185V4.014h2.83zm-10.922 6.04c-1.863 0-3.082 1.175-3.082 3.066v1.913c0 1.982 1.334 2.997 3.082 2.997 1.795 0 3.083-1.038 3.083-2.997V13.12c0-1.914-1.265-3.066-3.083-3.066z"})]}))});function ws(t){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ws(t)}function zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function KP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zp(Object(n),!0).forEach(function(r){GP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function GP(t,e,n){return e=qP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qP(t){var e=JP(t,"string");return ws(e)=="symbol"?e:String(e)}function JP(t,e){if(ws(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ws(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function YP(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var QP=g.memo(function(t){var e=Object.assign({},(YP(t),t));return h.jsx(Hn,KP({Icon:ud,Text:mx,"aria-label":Ys,spaceMultiple:CP,textMultiple:SP},e))}),Yr=ud;Yr.Text=mx;Yr.Combine=QP;Yr.Avatar=FP;Yr.colorPrimary=px;Yr.title=Ys;var Qs="Cline",XP=.7,ZP=.2,gx="#323B43",e7=gx,t7="#fff",n7=.6;function ks(t){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ks(t)}var r7=["size","style"];function _p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_p(Object(n),!0).forEach(function(r){i7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function i7(t,e,n){return e=s7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s7(t){var e=o7(t,"string");return ks(e)=="symbol"?e:String(e)}function o7(t,e){if(ks(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ks(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function a7(t,e){if(t==null)return{};var n=l7(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function l7(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var fd=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=a7(t,r7);return h.jsxs("svg",Zl(Zl({fill:"currentColor",fillRule:"evenodd",height:n,style:Zl({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Qs}),h.jsx("path",{d:"M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z"}),h.jsx("path",{d:"M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z"})]}))});function Ss(t){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(t)}function Hp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function c7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hp(Object(n),!0).forEach(function(r){h7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function h7(t,e,n){return e=d7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d7(t){var e=u7(t,"string");return Ss(e)=="symbol"?e:String(e)}function u7(t,e){if(Ss(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ss(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function f7(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var p7=g.memo(function(t){var e=Object.assign({},(f7(t),t));return h.jsx(_n,c7({Icon:fd,"aria-label":Qs,background:e7,color:t7,iconMultiple:n7},e))});function Cs(t){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(t)}var m7=["size","style"];function Wp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ec(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wp(Object(n),!0).forEach(function(r){g7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function g7(t,e,n){return e=b7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b7(t){var e=x7(t,"string");return Cs(e)=="symbol"?e:String(e)}function x7(t,e){if(Cs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Cs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function y7(t,e){if(t==null)return{};var n=v7(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function v7(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var bx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=y7(t,m7);return h.jsxs("svg",ec(ec({fill:"currentColor",fillRule:"evenodd",height:n,style:ec({flex:"none",lineHeight:1},r),viewBox:"0 0 88 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Qs}),h.jsx("path",{d:"M79.558 21.986c-1.13 0-2.167-.189-3.108-.565a7.128 7.128 0 01-2.403-1.569 6.933 6.933 0 01-1.554-2.331 7.876 7.876 0 01-.537-2.925v-.58c0-1.196.189-2.279.566-3.25.376-.97.894-1.798 1.554-2.486a6.84 6.84 0 012.289-1.582 7.005 7.005 0 012.797-.566c1.103 0 2.078.189 2.925.566.848.367 1.56.88 2.134 1.54.575.668 1.008 1.464 1.3 2.388.292.923.438 1.93.438 3.023v1.456H75.362v.07c.103.67.263 1.23.48 1.682.217.452.513.857.89 1.215.377.377.82.669 1.328.876.518.207 1.084.31 1.696.31.838 0 1.62-.16 2.346-.48a4.71 4.71 0 001.794-1.398l1.808 1.752c-.508.734-1.29 1.394-2.345 1.978-1.046.584-2.313.876-3.8.876zm-.41-13.113c-.48 0-.927.09-1.342.269-.405.17-.768.414-1.088.735-.32.33-.589.725-.805 1.187a6.25 6.25 0 00-.48 1.568h7.191v-.226c0-.443-.08-.88-.24-1.314a3.545 3.545 0 00-.678-1.159 3.004 3.004 0 00-1.074-.763c-.424-.198-.919-.297-1.484-.297zM55.043 21.703V6.415h3.052l.212 2.176c.207-.292.433-.56.678-.805.255-.255.523-.48.806-.679a5.555 5.555 0 013.179-.975 6.5 6.5 0 012.148.34 4.11 4.11 0 011.667 1.073c.461.49.82 1.117 1.074 1.88.254.753.381 1.667.381 2.74v9.538h-3.377v-9.48c0-.632-.07-1.16-.212-1.583-.141-.424-.348-.763-.621-1.018a2.3 2.3 0 00-.99-.537 4.736 4.736 0 00-1.328-.17c-.414 0-.8.057-1.158.17a3.421 3.421 0 00-1.611 1.004 4.282 4.282 0 00-.523.706v10.908h-3.377zM38.44 6.415h8.111v12.49h4.493v2.798H38.441v-2.797h4.705v-9.68H38.44V6.416zm4.395-3.956c0-.274.047-.523.141-.75a1.69 1.69 0 01.41-.607c.17-.16.372-.282.607-.367.245-.094.519-.141.82-.141.509 0 .918.131 1.23.395.32.254.503.584.55.99.066.414-.004.776-.212 1.087-.207.302-.508.504-.904.608a1.48 1.48 0 01-.706.353c-.273.057-.575.033-.905-.07a1.396 1.396 0 01-.777-.552 1.758 1.758 0 01-.254-.946zM20.934 0h8.238v18.906h4.634v2.797H20.934v-2.797h4.832V2.812h-4.832V0zM16.71 15.373c-.095.999-.33 1.908-.707 2.727a6.672 6.672 0 01-1.484 2.077 6.542 6.542 0 01-2.218 1.357c-.848.31-1.79.466-2.826.466-.848 0-1.63-.113-2.346-.339a6.467 6.467 0 01-1.893-.99 6.55 6.55 0 01-1.413-1.426 9.438 9.438 0 01-1.003-1.851c-.274-.66-.48-1.375-.622-2.148A14.34 14.34 0 012 12.83v-2.812c0-.8.066-1.573.198-2.317.132-.744.33-1.446.593-2.106A8.284 8.284 0 013.88 3.603a7.296 7.296 0 011.555-1.54 6.953 6.953 0 011.836-.904A7.256 7.256 0 019.49.834c1.083 0 2.049.16 2.896.48.858.32 1.588.773 2.19 1.357a6.337 6.337 0 011.442 2.147c.358.839.588 1.771.692 2.798h-3.391a6.568 6.568 0 00-.353-1.653c-.17-.5-.405-.923-.707-1.272a2.977 2.977 0 00-1.144-.791c-.453-.188-.994-.283-1.625-.283-.443 0-.843.062-1.201.184-.349.122-.66.297-.933.523a3.385 3.385 0 00-.947 1.074 7.033 7.033 0 00-.607 1.455c-.123.471-.217.975-.283 1.512a15.25 15.25 0 00-.084 1.625v2.84c0 .688.037 1.333.113 1.936.084.602.212 1.154.381 1.653.132.414.297.791.495 1.13.207.34.452.631.734.876.292.264.627.466 1.004.608.386.132.824.198 1.314.198.584 0 1.102-.085 1.554-.255.452-.17.838-.419 1.159-.749.31-.32.56-.72.748-1.2.189-.481.311-1.032.368-1.654h3.405z"})]}))});function js(t){"@babel/helpers - typeof";return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},js(t)}function Up(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function w7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Up(Object(n),!0).forEach(function(r){k7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function k7(t,e,n){return e=S7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S7(t){var e=C7(t,"string");return js(e)=="symbol"?e:String(e)}function C7(t,e){if(js(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function j7(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var O7=g.memo(function(t){var e=Object.assign({},(j7(t),t));return h.jsx(Hn,w7({Icon:fd,Text:bx,"aria-label":Qs,iconProps:{shape:"square"},spaceMultiple:ZP,textMultiple:XP},e))}),Qr=fd;Qr.Text=bx;Qr.Combine=O7;Qr.Avatar=p7;Qr.colorPrimary=gx;Qr.title=Qs;var Xs="Cursor",P7=.7,N7=.1,xx="#000",A7=xx,M7="#fff",D7=.6;function Os(t){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Os(t)}var T7=["size","style"];function Kp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kp(Object(n),!0).forEach(function(r){E7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function E7(t,e,n){return e=R7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R7(t){var e=L7(t,"string");return Os(e)=="symbol"?e:String(e)}function L7(t,e){if(Os(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Os(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function I7(t,e){if(t==null)return{};var n=$7(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $7(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var pd=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=I7(t,T7);return h.jsxs("svg",tc(tc({fill:"currentColor",fillRule:"evenodd",height:n,style:tc({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Xs}),h.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})]}))});function Ps(t){"@babel/helpers - typeof";return Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ps(t)}function Gp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function B7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gp(Object(n),!0).forEach(function(r){F7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function F7(t,e,n){return e=V7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function V7(t){var e=z7(t,"string");return Ps(e)=="symbol"?e:String(e)}function z7(t,e){if(Ps(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ps(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _7(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var H7=g.memo(function(t){var e=Object.assign({},(_7(t),t));return h.jsx(_n,B7({Icon:pd,"aria-label":Xs,background:A7,color:M7,iconMultiple:D7},e))});function Ns(t){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ns(t)}var W7=["size","style"];function qp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qp(Object(n),!0).forEach(function(r){U7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U7(t,e,n){return e=K7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K7(t){var e=G7(t,"string");return Ns(e)=="symbol"?e:String(e)}function G7(t,e){if(Ns(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q7(t,e){if(t==null)return{};var n=J7(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function J7(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var yx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=q7(t,W7);return h.jsxs("svg",nc(nc({fill:"currentColor",fillRule:"evenodd",height:n,style:nc({flex:"none",lineHeight:1},r),viewBox:"0 0 123 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Xs}),h.jsx("path",{d:"M11.995 2.33h6.516v3.582h-6.295C8.82 5.912 6.169 7.868 6.169 12c0 4.133 2.65 6.089 6.047 6.089h6.295v3.581H11.72C6.03 21.67 2 18.336 2 12c0-6.337 4.307-9.67 9.995-9.67zm9.829 0h4.03V14.15c0 2.947 1.354 4.325 4.53 4.325 3.175 0 4.528-1.377 4.528-4.325V2.33h4.03v12.644c0 4.297-2.733 7.025-8.559 7.025-5.826 0-8.56-2.755-8.56-7.052V2.33zm38.185 5.483c0 2.149-1.243 3.801-2.9 4.518v.055c1.74.248 2.624 1.488 2.65 3.169l.084 6.115h-4.031l-.083-5.454c-.027-1.212-.745-1.956-2.181-1.956h-6.71v7.41h-4.03V2.33h11.127c3.644 0 6.074 1.846 6.074 5.483zm-4.059.55c0-1.652-.883-2.561-2.54-2.561H46.84v5.123h6.626c1.518 0 2.485-.909 2.485-2.562zm19.3 7.66c0-1.378-.884-1.957-2.209-2.067l-4.473-.413c-3.866-.358-5.881-1.873-5.881-5.537 0-3.664 2.485-5.675 6.046-5.675h9.885V5.8h-9.609c-1.38 0-2.263.717-2.263 2.094 0 1.378.91 2.039 2.291 2.15l4.556.385c3.452.303 5.715 1.874 5.715 5.565 0 3.691-2.402 5.675-5.798 5.675H63.184V18.2h9.94c1.297 0 2.126-.882 2.126-2.177zM91.097 2c6.074 0 9.912 3.884 9.912 9.972C101.01 18.061 97.006 22 90.932 22s-9.912-3.94-9.912-10.028C81.02 5.884 85.024 2 91.098 2zm5.743 10c0-4.077-2.374-6.474-5.826-6.474-3.451 0-5.826 2.397-5.826 6.474s2.375 6.473 5.826 6.473c3.452 0 5.826-2.396 5.826-6.473zM121 7.813c0 2.149-1.242 3.801-2.899 4.518v.055c1.739.248 2.623 1.488 2.65 3.169l.083 6.115h-4.031l-.083-5.454c-.027-1.212-.745-1.956-2.181-1.956h-6.709v7.41h-4.031V2.33h11.127c3.645 0 6.074 1.846 6.074 5.483zm-4.059.55c0-1.652-.883-2.561-2.54-2.561h-6.571v5.123h6.626c1.518 0 2.485-.909 2.485-2.562z"})]}))});function As(t){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},As(t)}function Jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Y7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jp(Object(n),!0).forEach(function(r){Q7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Q7(t,e,n){return e=X7(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X7(t){var e=Z7(t,"string");return As(e)=="symbol"?e:String(e)}function Z7(t,e){if(As(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(As(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e8(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var t8=g.memo(function(t){var e=Object.assign({},(e8(t),t));return h.jsx(Hn,Y7({Icon:pd,Text:yx,"aria-label":Xs,spaceMultiple:N7,textMultiple:P7},e))}),Xr=pd;Xr.Text=yx;Xr.Combine=t8;Xr.Avatar=H7;Xr.colorPrimary=xx;Xr.title=Xs;var Zs="Goose",n8=.7,r8=.2,vx="#fff",i8=vx,s8="#000",o8=.65;function Ms(t){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ms(t)}var a8=["size","style"];function Yp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yp(Object(n),!0).forEach(function(r){l8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function l8(t,e,n){return e=c8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c8(t){var e=h8(t,"string");return Ms(e)=="symbol"?e:String(e)}function h8(t,e){if(Ms(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ms(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function d8(t,e){if(t==null)return{};var n=u8(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function u8(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var md=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=d8(t,a8);return h.jsxs("svg",rc(rc({fill:"currentColor",fillRule:"evenodd",height:n,style:rc({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Zs}),h.jsx("path",{d:"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"})]}))});function Ds(t){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ds(t)}function Qp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function f8(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qp(Object(n),!0).forEach(function(r){p8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function p8(t,e,n){return e=m8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m8(t){var e=g8(t,"string");return Ds(e)=="symbol"?e:String(e)}function g8(t,e){if(Ds(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function b8(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var x8=g.memo(function(t){var e=Object.assign({},(b8(t),t));return h.jsx(_n,f8({Icon:md,"aria-label":Zs,background:i8,color:s8,iconMultiple:o8},e))});function Ts(t){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(t)}var y8=["size","style"];function Xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xp(Object(n),!0).forEach(function(r){v8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v8(t,e,n){return e=w8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w8(t){var e=k8(t,"string");return Ts(e)=="symbol"?e:String(e)}function k8(t,e){if(Ts(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ts(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function S8(t,e){if(t==null)return{};var n=C8(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function C8(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var wx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=S8(t,y8);return h.jsxs("svg",ic(ic({fill:"currentColor",fillRule:"evenodd",height:n,style:ic({flex:"none",lineHeight:1},r),viewBox:"0 0 87 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:Zs}),h.jsx("path",{d:"M17.122 16.607c0 4.696-3.219 7.393-7.774 7.393-3.674 0-6.255-1.546-7.257-4.637l3.401-1.21c.486 1.786 1.852 2.907 3.856 2.907 2.46 0 4.13-1.211 4.13-4.12v-1.122c-.85 1.121-2.46 2-4.494 2C4.61 17.818 2 14.273 2 9.909 2 5.546 4.611 2 8.984 2c2.004 0 3.644.879 4.494 2V2.303h3.644v14.303zm-3.583-6.85c0-2.908-1.58-4.575-3.857-4.575-2.52 0-4.008 1.757-4.008 4.727 0 2.94 1.488 4.727 4.008 4.727 2.278 0 3.857-1.666 3.857-4.515v-.363zM35.546 10.273c0 4.94-3.188 8.273-7.683 8.273-4.494 0-7.682-3.334-7.682-8.273C20.181 5.333 23.37 2 27.863 2c4.495 0 7.683 3.333 7.683 8.273zm-11.69 0c0 3.242 1.548 5.212 4.007 5.212 2.46 0 4.009-1.97 4.009-5.212 0-3.243-1.549-5.212-4.009-5.212-2.46 0-4.008 1.97-4.008 5.212zM52.957 10.273c0 4.94-3.188 8.273-7.682 8.273s-7.682-3.334-7.682-8.273C37.593 5.333 40.78 2 45.275 2s7.682 3.333 7.682 8.273zm-11.69 0c0 3.242 1.548 5.212 4.008 5.212s4.008-1.97 4.008-5.212c0-3.243-1.549-5.212-4.008-5.212-2.46 0-4.008 1.97-4.008 5.212zM54.336 15.182L57.069 13c.941 1.546 2.763 2.576 4.615 2.576 1.549 0 2.976-.546 2.976-1.97 0-1.364-1.336-1.515-3.856-2.03-2.52-.515-5.405-1.152-5.405-4.546 0-2.909 2.55-5.03 6.224-5.03 2.794 0 5.284 1.242 6.438 3L65.6 7.212c-.91-1.424-2.429-2.242-4.19-2.242-1.488 0-2.46.666-2.46 1.727 0 1.152 1.154 1.364 3.158 1.788 2.703.576 6.104 1.151 6.104 4.788 0 3.211-2.946 5.273-6.56 5.273-2.945 0-5.89-1.182-7.317-3.364zM77.965 18.546c-4.555 0-7.743-3.364-7.743-8.273 0-4.667 3.157-8.273 7.59-8.273 4.616 0 7.076 3.485 7.076 7.849v1.212H73.713c.274 2.727 1.913 4.394 4.252 4.394 1.791 0 3.218-.91 3.704-2.546l3.128 1.182c-1.124 2.787-3.644 4.455-6.832 4.455zm-.183-13.485c-1.882 0-3.34 1.12-3.886 3.272h7.318c-.03-1.757-1.124-3.272-3.432-3.272z"})]}))});function Es(t){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Es(t)}function Zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function j8(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zp(Object(n),!0).forEach(function(r){O8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function O8(t,e,n){return e=P8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P8(t){var e=N8(t,"string");return Es(e)=="symbol"?e:String(e)}function N8(t,e){if(Es(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Es(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function A8(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var M8=g.memo(function(t){var e=Object.assign({},(A8(t),t));return h.jsx(Hn,j8({Icon:md,Text:wx,"aria-label":Zs,iconProps:{shape:"square"},spaceMultiple:r8,textMultiple:n8},e))}),Zr=md;Zr.Text=wx;Zr.Combine=M8;Zr.Avatar=x8;Zr.colorPrimary=vx;Zr.title=Zs;var eo="Windsurf",D8=.7,T8=.2,kx="#fff",E8=kx,R8="#000",L8=.75;function Rs(t){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rs(t)}var I8=["size","style"];function em(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?em(Object(n),!0).forEach(function(r){$8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $8(t,e,n){return e=B8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B8(t){var e=F8(t,"string");return Rs(e)=="symbol"?e:String(e)}function F8(t,e){if(Rs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V8(t,e){if(t==null)return{};var n=z8(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function z8(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var gd=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=V8(t,I8);return h.jsxs("svg",sc(sc({fill:"currentColor",fillRule:"evenodd",height:n,style:sc({flex:"none",lineHeight:1},r),viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:eo}),h.jsx("path",{clipRule:"evenodd",d:"M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"})]}))});function Ls(t){"@babel/helpers - typeof";return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ls(t)}function tm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _8(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tm(Object(n),!0).forEach(function(r){H8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function H8(t,e,n){return e=W8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W8(t){var e=U8(t,"string");return Ls(e)=="symbol"?e:String(e)}function U8(t,e){if(Ls(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ls(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function K8(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var G8=g.memo(function(t){var e=Object.assign({},(K8(t),t));return h.jsx(_n,_8({Icon:gd,"aria-label":eo,background:E8,color:R8,iconMultiple:L8},e))});function Is(t){"@babel/helpers - typeof";return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Is(t)}var q8=["size","style"];function nm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nm(Object(n),!0).forEach(function(r){J8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function J8(t,e,n){return e=Y8(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y8(t){var e=Q8(t,"string");return Is(e)=="symbol"?e:String(e)}function Q8(t,e){if(Is(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Is(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function X8(t,e){if(t==null)return{};var n=Z8(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Z8(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Sx=g.memo(function(t){var e=t.size,n=e===void 0?"1em":e,r=t.style,i=X8(t,q8);return h.jsxs("svg",oc(oc({fill:"currentColor",fillRule:"evenodd",height:n,style:oc({flex:"none",lineHeight:1},r),viewBox:"0 0 111 24",xmlns:"http://www.w3.org/2000/svg"},i),{},{children:[h.jsx("title",{children:eo}),h.jsx("path",{clipRule:"evenodd",d:"M33.412 7.182h-1.715a.316.316 0 00-.315.316v13.79c0 .174.14.316.315.316h1.715a.316.316 0 00.316-.317V7.498a.316.316 0 00-.316-.316zm-1.772-5.18h1.828c.174 0 .315.141.315.316V4.57a.316.316 0 01-.315.316H31.64a.316.316 0 01-.315-.316V2.318c0-.175.141-.317.315-.317zM43.676 6.79c-1.927 0-3.324.671-4.218 1.653a.457.457 0 01-.782-.322v-.623a.316.316 0 00-.316-.316h-1.686a.316.316 0 00-.316.316v13.79c0 .174.142.316.316.316h1.687a.316.316 0 00.316-.317v-8.729c0-3.025.587-3.697 3.8-3.697s3.742.533 3.742 3.557v8.868c0 .175.142.317.316.317h1.715a.316.316 0 00.316-.317v-9.513c0-3.445-1.956-4.986-4.889-4.986v.003h-.001zm17.518 1.849a.457.457 0 00.782-.322V2.319c0-.175.142-.316.316-.316h1.687c.174 0 .316.141.316.316v18.97a.316.316 0 01-.316.316h-1.687a.316.316 0 01-.316-.316v-.819c.017-.418-.489-.62-.782-.322-.81 1.008-2.374 1.848-4.47 1.848-3.685 0-6.088-2.632-6.088-7.533 0-5.18 2.68-7.673 6.172-7.673 2.095 0 3.604.84 4.386 1.849zm-8.018 5.767c0 4.733.587 5.434 4.414 5.434 3.8 0 4.386-.701 4.386-5.434 0-4.733-.559-5.461-4.386-5.461s-4.414.728-4.414 5.461zm20.924-.894l-2.763-.476c-2.04-.364-2.404-.98-2.404-2.045.028-1.457.587-2.184 3.296-2.184 2.538 0 3.35.752 3.525 2.376.017.16.152.284.313.284h1.677c.18 0 .326-.151.316-.333-.163-2.788-2.709-4.346-5.746-4.346-3.408 0-5.67 1.82-5.67 4.426 0 2.38 1.844 3.417 4.05 3.837l3.046.56c1.676.31 2.235.87 2.235 1.933 0 1.709-.587 2.437-3.464 2.437s-3.673-.832-3.858-2.518a.315.315 0 00-.313-.282h-1.687a.318.318 0 00-.317.325c.08 3.004 2.797 4.493 6.034 4.493 3.52 0 5.949-1.82 5.949-4.566 0-2.408-1.845-3.501-4.219-3.921zm12.21 6.414c3.128 0 3.715-.672 3.715-3.697V7.502c0-.174.141-.316.316-.316h1.714c.175 0 .316.142.316.316v13.79a.316.316 0 01-.316.316h-1.714a.316.316 0 01-.316-.317v-.6c-.007-.429-.45-.642-.755-.343-.892.98-2.289 1.652-4.161 1.652-2.877 0-4.833-1.54-4.833-4.986V7.501c0-.175.142-.317.316-.317h1.715c.174 0 .316.142.316.317v8.868c0 3.024.558 3.557 3.687 3.557zm19.782-12.744v-1.85c0-.727.588-1.316 1.314-1.316h1.276a.316.316 0 00.315-.317V2.317a.316.316 0 00-.315-.317h-.885c-2.514 0-4.051 1.4-4.051 3.81v1.372h-1.859c-1.647.002-2.94.229-3.803 1.26-.317.302-.755.076-.755-.36V7.5a.316.316 0 00-.315-.317h-1.715a.316.316 0 00-.316.317v13.789c0 .174.141.316.316.316h1.715a.316.316 0 00.315-.316v-8.645c0-2.857.727-3.528 3.855-3.528h2.562V21.29c0 .175.141.317.316.317h1.715a.316.316 0 00.315-.317V9.116h2.593a.316.316 0 00.315-.317V7.501a.316.316 0 00-.315-.317h-2.593v-.002zM21.834 18.008a.561.561 0 001.091.005l3.933-15.772A.318.318 0 0127.166 2h1.963c.21 0 .363.199.31.403l-4.947 18.972a.305.305 0 01-.295.228h-3.502a.31.31 0 01-.3-.234L16.285 5.5a.56.56 0 00-.543-.42h-.036a.562.562 0 00-.542.42l-4.11 15.87a.31.31 0 01-.299.234H7.253a.304.304 0 01-.295-.228L2.011 2.403A.321.321 0 012.32 2h1.963c.145 0 .272.1.308.241l3.932 15.772a.56.56 0 001.09-.005l3.78-15.764A.316.316 0 0113.7 2h4.047c.146 0 .273.1.307.244l3.779 15.764z"})]}))});function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}function rm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rm(Object(n),!0).forEach(function(r){tN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tN(t,e,n){return e=nN(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nN(t){var e=rN(t,"string");return $s(e)=="symbol"?e:String(e)}function rN(t,e){if($s(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if($s(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function iN(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var sN=g.memo(function(t){var e=Object.assign({},(iN(t),t));return h.jsx(Hn,eN({Icon:gd,Text:Sx,"aria-label":eo,iconProps:{shape:"square"},spaceMultiple:T8,textMultiple:D8},e))}),ei=gd;ei.Text=Sx;ei.Combine=sN;ei.Avatar=G8;ei.colorPrimary=kx;ei.title=eo;const oN={"claude-code":fr.Avatar,cursor:Xr.Avatar,codex:Ct.Avatar,"gemini-cli":pr.Avatar,goose:Zr.Avatar,"github-copilot":Yr.Avatar,windsurf:ei.Avatar,cline:Qr.Avatar},aN={antigravity:"/agents/antigravity.png",droid:"/agents/droid.png",opencode:"/agents/opencode.svg",amp:"/agents/amp.png",kilo:"/agents/kilo.png",roo:"/agents/roo.png",openhands:"/agents/openhands.png"};function lN(t){return t.split(/\s+/).map(e=>e[0]).join("").toUpperCase().slice(0,2)}const Cx=({agentName:t,displayName:e,size:n=20})=>{const r=oN[t];if(r)return h.jsx(r,{size:n});const i=aN[t];return i?h.jsx("img",{src:i,alt:e,className:"rounded object-contain",style:{width:n,height:n}}):h.jsx("div",{className:"flex items-center justify-center rounded bg-dash-surface-hover text-dash-text-muted font-semibold",style:{width:n,height:n,fontSize:n*.45},children:lN(e)})};function ac(t){return JSON.stringify([t.provider,t.type,t.item,t.global])}function cN(t){if(typeof t=="string"){const e=t.trim();return e.length>0?e:null}if(typeof t=="object"&&t!==null){const e=t;for(const n of["message","error","detail","details","reason"]){const r=e[n];if(typeof r=="string"&&r.trim().length>0)return r.trim()}}return null}async function im(t,e){const r=(await t.text().catch(()=>"")).trim();if(!r)return e;try{const i=JSON.parse(r);return cN(i)||e}catch{return r}}function hN(){const[t,e]=g.useState("idle"),[n,r]=g.useState(null),[i,s]=g.useState(new Map),[o,a]=g.useState(null),[l,c]=g.useState(null),d=g.useRef(0),u=g.useRef(0),f=g.useRef(null),p=g.useRef(null),m=g.useCallback(async S=>{e("reconciling"),c(null),a(null),d.current+=1;const C=d.current;f.current?.abort();const k=new AbortController;f.current=k;try{const O=new URLSearchParams({providers:S.providers.join(","),global:String(S.global),agents:String(S.include.agents??!0),commands:String(S.include.commands??!0),skills:String(S.include.skills??!0),config:String(S.include.config??!0),rules:String(S.include.rules??!0),hooks:String(S.include.hooks??!0)});S.source&&O.set("source",S.source);const y=await fetch(`/api/migrate/reconcile?${O.toString()}`,{signal:k.signal});if(!y.ok){const A=await im(y,"Failed to reconcile migration plan");throw new Error(A)}const M=await y.json();if(C!==d.current)return;r(M.plan),s(new Map),e("reviewing")}catch(O){if(k.signal.aborted||O instanceof DOMException&&O.name==="AbortError"||C!==d.current)return;c(O instanceof Error?O.message:"Failed to reconcile"),e("error")}},[]),b=g.useCallback((S,C)=>{s(k=>{const O=new Map(k);return O.set(ac(S),C),O})},[]),x=g.useCallback(async()=>{if(!n)return c("No plan to execute"),e("error"),!1;e("executing"),c(null),u.current+=1;const S=u.current;p.current?.abort();const C=new AbortController;p.current=C;try{const k=Object.fromEntries(i.entries()),O=await fetch("/api/migrate/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:n,resolutions:k}),signal:C.signal});if(S!==u.current)return!1;if(!O.ok){const M=await im(O,"Failed to execute migration");if(O.status===501)return c(M||"Plan execution is not available in this server build"),e("reviewing"),!1;throw new Error(M)}const y=await O.json();return S!==u.current?!1:(a({results:y.results,counts:y.counts,warnings:y.warnings??[],discovery:y.discovery}),e("complete"),!0)}catch(k){return C.signal.aborted||k instanceof DOMException&&k.name==="AbortError"||S!==u.current||(c(k instanceof Error?k.message:"Failed to execute migration"),e("error")),!1}},[n,i]),w=g.useCallback(()=>{f.current?.abort(),p.current?.abort(),e("idle"),r(null),s(new Map),a(null),c(null)},[]),v=g.useMemo(()=>n?n.actions.filter(S=>S.action==="conflict").every(S=>i.has(ac(S))):!0,[n,i]);return{phase:t,plan:n,resolutions:i,results:o,error:l,reconcile:m,resolve:b,execute:x,reset:w,allConflictsResolved:v,actionKey:ac}}const dN={agents:!0,commands:!0,skills:!0,config:!0,rules:!0,hooks:!0},Nt=["agents","commands","skills","config","rules","hooks"],Zn={agents:"migrateTypeAgents",commands:"migrateTypeCommands",skills:"migrateTypeSkills",config:"migrateTypeConfig",rules:"migrateTypeRules",hooks:"migrateTypeHooks"},sm={detected:"#D4A574","not-detected":"#8B9DC3"},lt=({label:t,value:e,tone:n="default"})=>{const r=n==="accent"?"text-dash-accent":n==="success"?"text-green-400":"text-dash-text";return h.jsxs("div",{className:"rounded-lg border border-dash-border bg-dash-bg/70 px-3 py-2.5",children:[h.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-dash-text-muted",children:t}),h.jsx("p",{className:`mt-1 text-lg font-semibold ${r}`,children:e})]})};function om(t,e){return t.success?t.skipped?{label:e("migrateStatusSkipped"),className:"text-yellow-400"}:{label:e("migrateStatusInstalled"),className:"text-green-400"}:{label:e("migrateStatusFailed"),className:"text-red-400"}}const uN=new Set([8203,8204,8205,8288,65279,8232,8233,8234,8235,8236,8237,8238,8294,8295,8296,8297]);function fN(t){return t===9||t===10||t===13?!0:t>=0&&t<=8||t>=11&&t<=31||t>=127&&t<=159||uN.has(t)}function am(t){let e="";for(const n of t){const r=n.codePointAt(0);r!==void 0&&(fN(r)||(e+=n))}return e}const pN=({provider:t,include:e,isSelected:n,cardClickToggles:r,onToggleSelect:i,onOpenDetails:s,t:o})=>{const a=Nt.filter(c=>t.capabilities[c]).length,l=Nt.some(c=>e[c]&&!t.capabilities[c]);return h.jsxs("div",{className:`relative rounded-xl border px-4 py-3 cursor-pointer transition-all ${n?"bg-dash-accent-subtle border-dash-accent/30 shadow-sm shadow-dash-accent/10":l?"bg-dash-surface border-yellow-500/25 hover:bg-dash-surface-hover hover:border-yellow-500/40":"bg-dash-surface border-dash-border hover:bg-dash-surface-hover hover:border-dash-accent/25"}`,children:[h.jsx("button",{type:"button",onClick:()=>r?i(t.name):s(t.name),"aria-label":r?`${t.displayName} deselect`:`${t.displayName} details`,className:"absolute inset-0 z-10 rounded-xl dash-focus-ring"}),h.jsxs("div",{className:"relative flex flex-col gap-3 lg:grid lg:grid-cols-[minmax(0,1.25fr)_140px_minmax(0,220px)_auto] lg:items-center lg:gap-4",children:[h.jsxs("div",{className:"min-w-0 space-y-1.5",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(Cx,{agentName:t.name,displayName:t.displayName,size:18}),h.jsx("span",{className:"text-sm font-semibold text-dash-text truncate",children:t.displayName}),t.recommended&&h.jsx("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded border border-dash-accent/30 text-dash-accent",children:o("migrateFilterRecommended")}),t.commandsGlobalOnly&&h.jsx("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded border border-yellow-500/30 text-yellow-400",children:o("migrateGlobalOnlyCommandsShort")})]}),h.jsxs("div",{className:"text-xs text-dash-text-muted truncate",children:[t.name," · ",a,"/",Nt.length," ",o("migrateCapabilitiesLabel")]})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] lg:flex-col lg:items-start lg:gap-1",children:[h.jsx("span",{className:t.detected?"text-dash-accent":"text-dash-text-muted",children:t.detected?o("migrateDetectedTag"):o("migrateNotDetectedTag")}),h.jsx("span",{className:"text-dash-text-muted",children:t.recommended?o("migrateFilterRecommended"):"-"})]}),h.jsx("div",{className:"flex flex-wrap gap-1",children:Nt.map(c=>{const d=t.capabilities[c],u=e[c];return h.jsx("span",{className:`text-[10px] uppercase px-1.5 py-0.5 rounded border ${d&&u?"border-dash-accent/45 text-dash-accent":d?"border-dash-border text-dash-text-secondary":"border-dash-border text-dash-text-muted opacity-60"}`,children:o(Zn[c])},c)})}),h.jsx("div",{className:"relative z-20 flex justify-start lg:justify-end",children:h.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),i(t.name)},className:`dash-focus-ring px-4 py-1.5 text-xs font-semibold rounded-md transition-colors ${n?"bg-transparent text-dash-text-secondary border border-dash-border hover:bg-dash-surface-hover":"bg-dash-accent text-white hover:bg-dash-accent/90"}`,children:o(n?"migrateSelectedButton":"migrateSelectButton")})})]})]})},mN=({provider:t,include:e,isSelected:n,latestResult:r,onToggleSelect:i,onClose:s,t:o})=>{const a=g.useRef(null),l=g.useRef(null),c=g.useCallback(()=>{const f=l.current;l.current=null,f&&document.contains(f)&&f.focus()},[]),d=g.useCallback(()=>{s(),c()},[s,c]),u=g.useCallback(()=>{const f=a.current;if(f?.open){f.close();return}s(),c()},[s,c]);return g.useEffect(()=>{const f=a.current;if(f){if(!f.open){l.current=document.activeElement instanceof HTMLElement?document.activeElement:null;try{f.showModal()}catch{c(),s()}}return()=>{if(f.open){f.close();return}c()}}},[s,c]),h.jsx("dialog",{ref:a,"aria-label":t.displayName,onClose:d,onCancel:f=>{f.preventDefault(),u()},onClick:f=>{f.target===f.currentTarget&&u()},className:"fixed inset-0 z-50 m-0 h-full max-h-none w-full max-w-none overflow-hidden border-0 bg-transparent p-0 backdrop:bg-black/50",children:h.jsxs("div",{className:"ml-auto h-full w-full sm:w-[460px] bg-dash-surface border-l border-dash-border shadow-2xl flex flex-col animate-slide-in",children:[h.jsx("div",{className:"px-6 py-5 border-b border-dash-border",children:h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx(Cx,{agentName:t.name,displayName:t.displayName,size:22}),h.jsx("h2",{className:"text-xl font-bold text-dash-text truncate",children:t.displayName})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mt-2",children:[h.jsx("span",{className:"text-[11px] text-dash-text-muted font-mono",children:t.name}),h.jsx("span",{className:`text-[10px] uppercase tracking-wide px-2 py-0.5 rounded border ${t.detected?"border-dash-accent/30 text-dash-accent":"border-dash-border text-dash-text-muted"}`,children:t.detected?o("migrateDetectedTag"):o("migrateNotDetectedTag")}),t.recommended&&h.jsx("span",{className:"text-[10px] uppercase tracking-wide px-2 py-0.5 rounded border border-dash-accent/30 text-dash-accent",children:o("migrateFilterRecommended")})]})]}),h.jsx("button",{type:"button",onClick:u,"aria-label":o("detailPanelClose"),className:"w-8 h-8 flex items-center justify-center rounded-md text-dash-text-muted hover:bg-dash-surface-hover hover:text-dash-text transition-colors",children:h.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[h.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18",strokeWidth:2}),h.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18",strokeWidth:2})]})})]})}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5 space-y-6",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-wide text-dash-text-muted mb-2.5",children:o("migrateCapabilitiesSection")}),h.jsx("div",{className:"space-y-1.5",children:Nt.map(f=>{const p=t.capabilities[f],m=e[f];return h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-dash-bg rounded-md",children:[h.jsx("span",{className:"text-sm text-dash-text",children:o(Zn[f])}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:`text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded border ${m?"border-dash-accent/35 text-dash-accent":"border-dash-border text-dash-text-muted"}`,children:o(m?"migrateIncludedEnabled":"migrateIncludedDisabled")}),h.jsx("span",{className:`text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded border ${p?"border-green-500/35 text-green-400":"border-red-500/30 text-red-400"}`,children:o(p?"migrateSupported":"migrateUnsupportedShort")})]})]},f)})})]}),t.commandsGlobalOnly&&e.commands&&h.jsx("div",{className:"px-3 py-2 border border-yellow-500/30 bg-yellow-500/10 rounded text-xs text-yellow-400",children:o("migrateGlobalForced")}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-wide text-dash-text-muted mb-2.5",children:o("migrateLatestTarget")}),r?h.jsxs("div",{className:"px-3 py-2 bg-dash-bg rounded-md border border-dash-border space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-xs text-dash-text-muted",children:o("migrateStatus")}),h.jsx("span",{className:`text-xs font-semibold ${om(r,o).className}`,children:om(r,o).label})]}),h.jsx("p",{className:"text-xs font-mono text-dash-text break-all",children:am(r.path||"-")}),(r.error||r.skipReason)&&h.jsx("p",{className:"text-xs text-red-400 break-words",children:am(r.error||r.skipReason||"-")})]}):h.jsx("p",{className:"text-sm text-dash-text-muted",children:o("migrateNoResultForProvider")})]})]}),h.jsxs("div",{className:"px-6 py-4 border-t border-dash-border flex items-center justify-between gap-2",children:[h.jsx("button",{type:"button",onClick:()=>i(t.name),className:`px-4 py-2 text-sm font-semibold rounded-md transition-colors ${n?"bg-transparent text-dash-text-secondary border border-dash-border hover:bg-dash-surface-hover":"bg-dash-accent text-white hover:bg-dash-accent/90"}`,children:o(n?"migrateUnselectProvider":"migrateSelectProviderAction")}),h.jsx("button",{type:"button",onClick:u,"aria-label":o("detailPanelClose"),className:"px-4 py-2 text-sm font-medium rounded-md border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:o("detailPanelClose")})]})]})})},gN=()=>{const{t}=he(),e=hN(),[n,r]=g.useState([]),[i,s]=g.useState(null),[o,a]=g.useState([]),[l,c]=g.useState(dN),[d,u]=g.useState(!0),[f,p]=g.useState(!0),[m,b]=g.useState(!1),[x,w]=g.useState(null),[v,S]=g.useState(""),C=g.useDeferredValue(v),[k,O]=g.useState("all"),[y,M]=g.useState(null),A=g.useRef(0),R=g.useCallback(async(I=!1)=>{A.current+=1;const K=A.current;try{I?b(!0):p(!0),w(null);const[ae,De]=await Promise.all([Fv(),su()]);if(K!==A.current)return;r(ae.providers),s(De),a(Ut=>{if(Ut.length===0)return[];const to=ae.providers.map(ti=>ti.name);return Ut.filter(ti=>to.includes(ti))})}catch(ae){if(K!==A.current)return;w(ae instanceof Error?ae.message:t("migrateDetectFailed"))}finally{K===A.current&&(p(!1),b(!1))}},[t]);g.useEffect(()=>{R()},[R]);const N=g.useMemo(()=>{const I=new Map;for(const K of n)I.set(K.name,K);return I},[n]),L=g.useMemo(()=>y&&N.get(y)||null,[y,N]);g.useEffect(()=>{y&&!N.has(y)&&M(null)},[y,N]);const H=g.useCallback(()=>{M(null)},[]),$=g.useMemo(()=>new Set(o),[o]),F=g.useMemo(()=>n.filter(I=>I.detected).length,[n]),G=o.length,ue=g.useMemo(()=>n.filter(I=>I.recommended).length,[n]),X=g.useMemo(()=>Nt.filter(I=>l[I]).length,[l]),te=g.useMemo(()=>{const I=[];l.commands&&o.includes("codex")&&!d&&N.get("codex")?.commandsGlobalOnly&&I.push(t("migrateGlobalForced"));for(const K of Nt){if(!l[K])continue;const ae=o.filter(De=>!N.get(De)?.capabilities[K]).map(De=>N.get(De)?.displayName||De);ae.length>0&&I.push(`${t("migrateUnsupported")}: ${t(Zn[K])} -> ${ae.join(", ")}`)}return I},[l,d,N,o,t]),oe=g.useCallback(I=>{if(I==="codex"){a(["codex"]);return}if(I==="antigravity"){a(["antigravity"]);return}if(I==="core"){const ae=["codex","antigravity","droid"].filter(De=>n.some(Ut=>Ut.name===De));a(ae);return}const K=n.filter(ae=>ae.detected).map(ae=>ae.name);a(K)},[n]),pe=g.useCallback(I=>{a(K=>K.includes(I)?K.filter(ae=>ae!==I):[...K,I])},[]),Y=g.useCallback(I=>{c(K=>({...K,[I]:!K[I]}))},[]),le=g.useMemo(()=>{const I=[...n];return I.sort((K,ae)=>{const De=$.has(K.name),Ut=$.has(ae.name);return De!==Ut?De?-1:1:K.detected!==ae.detected?K.detected?-1:1:K.recommended!==ae.recommended?K.recommended?-1:1:K.displayName.localeCompare(ae.displayName)}),I},[n,$]),me=g.useMemo(()=>{const I=C.trim().toLowerCase();return le.filter(K=>{if(k==="selected"&&!$.has(K.name)||k==="detected"&&!K.detected||k==="recommended"&&!K.recommended||k==="not-detected"&&K.detected)return!1;if(!I)return!0;const ae=Nt.filter(De=>K.capabilities[De]).map(De=>t(Zn[De]).toLowerCase());return K.displayName.toLowerCase().includes(I)||K.name.toLowerCase().includes(I)||ae.some(De=>De.includes(I))})},[C,k,$,le,t]),ke=g.useMemo(()=>{const I=me.filter(De=>De.detected),K=me.filter(De=>!De.detected),ae=[];return I.length>0&&ae.push({key:"detected",label:t("migrateDetectedTag"),providers:I}),K.length>0&&ae.push({key:"not-detected",label:t("migrateNotDetectedTag"),providers:K}),ae},[me,t]),Qe=g.useMemo(()=>({all:n.length,selected:G,detected:n.filter(I=>I.detected).length,recommended:n.filter(I=>I.recommended).length,"not-detected":n.filter(I=>!I.detected).length}),[n,G]),mt=g.useMemo(()=>me.map(I=>I.name),[me]),q=g.useCallback(()=>{a(I=>{const K=new Set(I);for(const ae of mt)K.add(ae);return Array.from(K)})},[mt]),Me=g.useCallback(()=>{a([])},[]),Ce=g.useCallback(async()=>{if(o.length===0){w(t("migrateSelectProvider"));return}if(X===0){w(t("migrateNoTypesEnabled"));return}await e.reconcile({providers:o,global:d,include:l})},[X,l,d,o,t,e]),Ie=g.useCallback(async()=>{if(w(null),!!await e.execute())try{const K=await su();s(K)}catch(K){console.error("Failed to refresh discovery:",K)}},[e]),Se=g.useMemo(()=>{const I=new Map;if(!e.results)return I;for(const K of e.results.results)I.set(K.provider,K);return I},[e.results]);g.useEffect(()=>{const I=K=>{const ae=K.target,De=!!(ae&&(ae instanceof HTMLInputElement||ae instanceof HTMLTextAreaElement||ae.isContentEditable||ae.closest('[contenteditable="true"], [role="textbox"]'))),Ut=K.metaKey||K.ctrlKey||K.altKey;K.key==="/"&&!De&&!Ut&&(K.preventDefault(),document.getElementById("migrate-search")?.focus())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[]);const gt=e.phase==="idle"&&o.length>0&&X>0;return f?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"w-8 h-8 border-4 border-dash-accent border-t-transparent rounded-full animate-spin mx-auto mb-3"}),h.jsx("p",{className:"text-dash-text-muted",children:t("migrateDiscovering")})]})}):h.jsxs("div",{className:"relative h-full overflow-hidden",children:[h.jsxs("div",{className:"pointer-events-none absolute inset-0 -z-10 overflow-hidden",children:[h.jsx("div",{className:"absolute -top-24 -right-8 h-64 w-64 rounded-full bg-dash-accent/10 blur-3xl"}),h.jsx("div",{className:"absolute -bottom-28 -left-10 h-72 w-72 rounded-full bg-dash-accent/5 blur-3xl"})]}),h.jsxs("div",{className:"h-full overflow-y-auto space-y-4 pb-8",children:[h.jsx("section",{className:"dash-panel dash-sticky-glass sticky top-0 z-20 px-4 py-4 md:px-6 md:py-5",children:h.jsxs("div",{className:"flex flex-col gap-4 xl:flex-row xl:items-end xl:justify-between",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("p",{className:"mono text-[10px] uppercase tracking-[0.16em] text-dash-text-muted",children:t("migrate")}),h.jsx("h1",{className:"text-xl md:text-2xl font-semibold text-dash-text",children:t("migrateTitle")}),h.jsx("p",{className:"text-sm text-dash-text-secondary max-w-3xl",children:t("migrateSubtitle")})]}),e.phase==="complete"&&e.results?h.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[h.jsx(lt,{label:t("migrateInstalled"),value:e.results.counts.installed,tone:"success"}),h.jsx(lt,{label:t("migrateSkipped"),value:e.results.counts.skipped}),h.jsx(lt,{label:t("migrateFailed"),value:e.results.counts.failed})]}):h.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[h.jsx(lt,{label:t("migrateTypeAgents"),value:i?.counts.agents??0}),h.jsx(lt,{label:t("migrateDetectedProviders"),value:F,tone:"success"}),h.jsx(lt,{label:t("migrateSelectedProviders"),value:G,tone:"accent"}),h.jsx(lt,{label:t("migrateTypes"),value:X})]})]})}),x&&h.jsx("div",{className:"px-4 py-3 border border-red-500/30 bg-red-500/10 rounded-lg text-sm text-red-400",children:x}),h.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.55fr)_minmax(0,340px)]",children:[h.jsxs("section",{className:"order-2 xl:order-1 space-y-4",children:[e.phase==="reviewing"&&e.plan&&h.jsxs("div",{className:"dash-panel flex flex-col max-h-[calc(100vh-200px)]",children:[h.jsxs("div",{className:"flex items-center justify-between p-5 pb-4",children:[h.jsx("h2",{className:"text-lg font-semibold text-dash-text",children:t("migrateReviewPlan")}),h.jsx("button",{type:"button",onClick:()=>e.reset(),className:"dash-focus-ring px-3 py-1.5 text-xs font-medium rounded-md border border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover",children:t("cancel")})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-5 pb-4",children:[h.jsx(Gj,{plan:e.plan,resolutions:e.resolutions,onResolve:e.resolve,actionKey:e.actionKey}),e.error&&h.jsx("div",{className:"mt-4 px-3 py-2 border border-red-500/30 bg-red-500/10 rounded text-xs text-red-400",children:e.error})]}),h.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dash-border bg-dash-surface rounded-b-xl",children:[e.plan.hasConflicts&&!e.allConflictsResolved&&h.jsx("p",{className:"text-xs text-yellow-400",children:t("migrateResolveConflicts")}),h.jsx("button",{type:"button",onClick:Ie,disabled:e.plan.hasConflicts&&!e.allConflictsResolved,className:"dash-focus-ring px-4 py-2 bg-dash-accent text-white rounded-md text-sm font-semibold hover:bg-dash-accent/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:t("migrateExecutePlan")})]})]}),e.phase==="complete"&&e.results&&h.jsx(Ej,{results:e.results,onReset:e.reset}),e.phase==="error"&&e.error&&h.jsxs("div",{className:"dash-panel p-5",children:[h.jsx("div",{className:"px-4 py-3 border border-red-500/30 bg-red-500/10 rounded-lg text-sm text-red-400",children:e.error}),h.jsx("button",{type:"button",onClick:e.reset,className:"mt-4 dash-focus-ring px-4 py-2 bg-dash-bg border border-dash-border rounded-md text-sm text-dash-text-secondary hover:bg-dash-surface-hover",children:t("tryAgain")})]}),(e.phase==="reconciling"||e.phase==="executing")&&h.jsx("div",{className:"dash-panel p-5",children:h.jsx("div",{className:"flex items-center justify-center py-8",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"w-8 h-8 border-4 border-dash-accent border-t-transparent rounded-full animate-spin mx-auto mb-3"}),h.jsx("p",{className:"text-dash-text-muted",children:e.phase==="reconciling"?t("migrateReconciling"):t("migrateExecuting")})]})})}),e.phase==="idle"&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dash-panel p-4 md:p-5 space-y-4",children:[h.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center",children:[h.jsxs("div",{className:"relative flex-1",children:[h.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 stroke-dash-text-muted",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"11",cy:"11",r:"8"}),h.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),h.jsx("input",{id:"migrate-search",type:"text",value:v,onChange:I=>S(I.target.value),placeholder:t("migrateSearchProviders"),className:"dash-focus-ring w-full pl-9 pr-12 py-2 bg-dash-bg border border-dash-border rounded-lg text-dash-text text-sm focus:border-dash-accent transition-colors"}),h.jsx("span",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-[11px] text-dash-text-muted bg-dash-surface-hover border border-dash-border px-1.5 py-0.5 rounded",children:t("searchShortcut")})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("button",{type:"button",onClick:()=>R(!0),disabled:m,className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover disabled:opacity-50 whitespace-nowrap",children:t(m?"checking":"migrateRefresh")}),h.jsx("button",{type:"button",onClick:q,disabled:mt.length===0,className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover disabled:opacity-50 whitespace-nowrap",children:t("migrateSelectVisible")}),h.jsx("button",{type:"button",onClick:Me,disabled:G===0,className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover disabled:opacity-50 whitespace-nowrap",children:t("migrateClearSelection")})]})]}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:[{key:"all",label:t("categoryAll")},{key:"selected",label:t("migrateSelectedProviders")},{key:"detected",label:t("migrateDetectedProviders")},{key:"recommended",label:t("migrateFilterRecommended")},{key:"not-detected",label:t("migrateNotDetectedTag")}].map(I=>h.jsxs("button",{type:"button",onClick:()=>O(I.key),className:`dash-focus-ring px-3 py-1 text-xs font-medium rounded-full border transition-all whitespace-nowrap ${k===I.key?"bg-dash-accent/10 border-dash-accent text-dash-accent":"border-dash-border text-dash-text-secondary hover:bg-dash-surface-hover hover:text-dash-text"}`,children:[I.label,h.jsx("span",{className:"opacity-60 ml-1 text-[10px]",children:Qe[I.key]})]},I.key))}),h.jsxs("div",{children:[h.jsx("p",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wide text-dash-text-muted",children:t("migrateTypes")}),h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:Nt.map(I=>h.jsx("button",{type:"button",onClick:()=>Y(I),className:`dash-focus-ring px-2.5 py-1 text-[11px] uppercase tracking-wide rounded-md border transition-colors ${l[I]?"border-dash-accent/45 text-dash-accent bg-dash-accent/5":"border-dash-border text-dash-text-muted hover:bg-dash-surface-hover"}`,children:t(Zn[I])},I))})]})]}),h.jsxs("div",{className:"dash-panel p-4 md:p-5",children:[h.jsx("h2",{className:"text-sm font-semibold text-dash-text mb-4",children:t("migrateSourceSummary")}),h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-6 gap-3",children:Nt.map(I=>h.jsxs("div",{className:"px-3 py-2 bg-dash-bg border border-dash-border rounded-md text-center",children:[h.jsx("p",{className:"text-[11px] uppercase tracking-wide text-dash-text-muted",children:t(Zn[I])}),h.jsx("p",{className:"text-lg font-semibold text-dash-text",children:i?.counts[I]??0})]},I))})]}),h.jsxs("div",{className:"dash-panel p-4 md:p-5",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsx("h2",{className:"text-sm font-semibold text-dash-text",children:t("migrateProvidersHeading")}),h.jsxs("p",{className:"text-xs text-dash-text-muted",children:[me.length," ",t("migrateProvidersCountSuffix")]})]}),n.length===0?h.jsx("div",{className:"text-sm text-dash-text-muted",children:t("migrateNoProviders")}):me.length===0?h.jsx("div",{className:"text-sm text-dash-text-muted",children:t("migrateNoProvidersMatch")}):h.jsx("div",{className:"space-y-5",children:ke.map(I=>h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[h.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:sm[I.key]}}),h.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:sm[I.key]},children:I.label}),h.jsxs("span",{className:"text-[11px] text-dash-text-muted ml-auto",children:[I.providers.length," ",t("migrateProvidersCountSuffix")]}),h.jsx("div",{className:"flex-1 h-px bg-dash-border ml-3"})]}),h.jsx("div",{className:"space-y-2",children:I.providers.map(K=>h.jsx(pN,{provider:K,include:l,isSelected:$.has(K.name),cardClickToggles:k==="selected",onToggleSelect:pe,onOpenDetails:M,t},K.name))})]},I.key))})]})]})]}),h.jsx("aside",{className:"order-1 xl:order-2 space-y-4 self-start xl:sticky xl:top-[84px]",children:e.phase==="complete"&&e.results?h.jsxs("div",{className:"dash-panel p-4 md:p-5 space-y-4",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-dash-text",children:t("migrateSummaryTitle")}),h.jsxs("p",{className:"text-xs text-dash-text-muted mt-1",children:[e.results.counts.installed+e.results.counts.skipped+e.results.counts.failed," ",t("migrateSummarySubtitle")]})]}),h.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[h.jsx(lt,{label:t("migrateInstalled"),value:e.results.counts.installed,tone:"success"}),h.jsx(lt,{label:t("migrateSkipped"),value:e.results.counts.skipped}),h.jsx(lt,{label:t("migrateFailed"),value:e.results.counts.failed})]}),e.results.discovery&&h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-dash-text-muted",children:t("migrateTypes")}),Nt.map(I=>{const K=e.results?.discovery?.[I]??0;return K===0?null:h.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-dash-bg rounded-md text-xs",children:[h.jsx("span",{className:"text-dash-text-secondary",children:t(Zn[I])}),h.jsx("span",{className:"font-semibold text-dash-text",children:K})]},I)})]}),o.length>0&&h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-dash-text-muted",children:t("migrateSummaryProviders")}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(I=>{const K=N.get(I);return h.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded border border-dash-accent/30 text-dash-accent",children:K?.displayName||I},I)})})]}),h.jsx("div",{className:"text-[10px] px-3 py-1.5 bg-dash-bg rounded-md text-dash-text-muted",children:t(d?"migrateScopeGlobal":"migrateScopeProject")}),h.jsx("button",{type:"button",onClick:e.reset,className:"dash-focus-ring w-full px-4 py-2.5 bg-dash-accent text-white rounded-md text-sm font-semibold hover:bg-dash-accent/90 transition-colors",children:t("migrateSummaryNewMigration")})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dash-panel p-4 md:p-5 space-y-4",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold text-dash-text",children:t("migrateActionSummaryTitle")}),h.jsxs("p",{className:"text-xs text-dash-text-muted mt-1",children:[G," ",t("migrateProvidersCountSuffix")," ·"," ",X,"/",Nt.length," ",t("migrateTypes")]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsx(lt,{label:t("migrateSelectedProviders"),value:G,tone:"accent"}),h.jsx(lt,{label:t("migrateDetectedProviders"),value:F}),h.jsx(lt,{label:t("migrateTypes"),value:X}),h.jsx(lt,{label:t("migrateFilterRecommended"),value:ue,tone:"success"})]}),h.jsxs("div",{className:"inline-flex w-full rounded-md border border-dash-border overflow-hidden",children:[h.jsx("button",{type:"button",onClick:()=>u(!1),className:`dash-focus-ring flex-1 px-3 py-2 text-sm ${d?"bg-dash-bg text-dash-text-secondary":"bg-dash-accent-subtle text-dash-accent"}`,children:t("migrateScopeProject")}),h.jsx("button",{type:"button",onClick:()=>u(!0),className:`dash-focus-ring flex-1 px-3 py-2 text-sm border-l border-dash-border ${d?"bg-dash-accent-subtle text-dash-accent":"bg-dash-bg text-dash-text-secondary"}`,children:t("migrateScopeGlobal")})]}),h.jsx("button",{type:"button",onClick:Ce,disabled:!gt,className:"dash-focus-ring w-full px-4 py-2.5 bg-dash-accent text-white rounded-md text-sm font-semibold hover:bg-dash-accent/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:e.phase==="reconciling"?t("migrateRunning"):t("migrateRun")}),te.length>0&&h.jsx("div",{className:"space-y-2",children:te.map((I,K)=>h.jsx("p",{className:"text-xs px-3 py-2 border border-yellow-500/30 bg-yellow-500/10 rounded text-yellow-400",children:I},`${I}-${K}`))})]}),h.jsxs("div",{className:"dash-panel-muted p-4",children:[h.jsx("p",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-dash-text-muted",children:t("migrateSelectProviderAction")}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsx("button",{type:"button",onClick:()=>oe("codex"),className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover",children:t("migratePresetCodex")}),h.jsx("button",{type:"button",onClick:()=>oe("antigravity"),className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover",children:t("migratePresetAntigravity")}),h.jsx("button",{type:"button",onClick:()=>oe("core"),className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover",children:t("migratePresetCore")}),h.jsx("button",{type:"button",onClick:()=>oe("detected"),className:"dash-focus-ring px-3 py-1.5 bg-dash-bg border border-dash-border rounded-md text-xs text-dash-text-secondary hover:bg-dash-surface-hover",children:t("migratePresetDetected")})]})]})]})})]})]}),L&&h.jsx(mN,{provider:L,include:l,isSelected:$.has(L.name),latestResult:Se.get(L.name)||null,onToggleSelect:pe,onClose:H,t})]})},bN=({featureId:t,name:e,description:n,included:r})=>{const{t:i}=he();return h.jsxs("div",{"data-testid":`feature-card-${t}`,className:`p-4 rounded-lg border transition-all ${r?"border-[var(--dash-accent)] bg-[var(--dash-surface)] shadow-sm":"border-[var(--dash-border)] bg-[var(--dash-bg)] opacity-50"}`,children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r?h.jsx("svg",{className:"w-5 h-5 text-[var(--dash-accent)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):h.jsx("svg",{className:"w-5 h-5 text-[var(--dash-text-muted)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),h.jsx("h4",{className:"font-medium text-[var(--dash-text)]",children:i(e)})]}),h.jsx("p",{className:"text-sm text-[var(--dash-text-muted)] leading-relaxed",children:i(n)})]})},xN=({selectedKit:t,onKitSelect:e,onInstall:n,installing:r})=>{const{t:i}=he(),[s,o]=g.useState(1);return h.jsxs("div",{className:"space-y-6","data-testid":"install-wizard",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx(lc,{number:1,active:s===1,label:i("stepChooseKit")}),h.jsx("div",{className:"flex-1 h-px bg-[var(--dash-border)]"}),h.jsx(lc,{number:2,active:s===2,label:i("stepConfigure")}),h.jsx("div",{className:"flex-1 h-px bg-[var(--dash-border)]"}),h.jsx(lc,{number:3,active:s===3,label:i("stepInstall")})]}),h.jsxs("div",{className:"min-h-[200px]",children:[s===1&&h.jsx(yN,{onSelect:e,selected:t}),s===2&&t&&h.jsx(vN,{kit:t}),s===3&&h.jsx(wN,{installing:r})]}),h.jsxs("div",{className:"flex justify-between pt-4 border-t border-[var(--dash-border)]",children:[s>1?h.jsx("button",{onClick:()=>o(a=>a-1),className:"px-4 py-2 text-sm font-medium text-[var(--dash-text)] bg-[var(--dash-surface)] border border-[var(--dash-border)] rounded-lg hover:bg-[var(--dash-surface-hover)] transition-colors","data-testid":"wizard-back",children:i("back")}):h.jsx("div",{}),s<3&&t&&h.jsx("button",{onClick:()=>o(a=>a+1),className:"px-4 py-2 text-sm font-medium text-white bg-[var(--dash-accent)] rounded-lg hover:opacity-90 transition-opacity","data-testid":"wizard-next",children:i("next")}),s===3&&h.jsx("button",{onClick:n,disabled:r,className:"px-4 py-2 text-sm font-medium text-white bg-[var(--dash-accent)] rounded-lg hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"wizard-install",children:i("install")})]})]})},lc=({number:t,active:e,label:n})=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold transition-colors ${e?"bg-[var(--dash-accent)] text-white":"bg-[var(--dash-surface)] text-[var(--dash-text-muted)] border border-[var(--dash-border)]"}`,children:t}),h.jsx("span",{className:`text-sm font-medium ${e?"text-[var(--dash-text)]":"text-[var(--dash-text-muted)]"}`,children:n})]}),yN=({onSelect:t,selected:e})=>{const{t:n}=he();return h.jsxs("div",{className:"space-y-4",children:[h.jsx("p",{className:"text-[var(--dash-text-muted)]",children:e?`Selected: ${e===Qt.ENGINEER?n("kitEngineerName"):n("kitMarketingName")}`:"Please select a kit above"}),e&&h.jsxs("button",{type:"button",onClick:()=>t(e===Qt.ENGINEER?Qt.MARKETING:Qt.ENGINEER),className:"text-sm text-[var(--dash-accent)] hover:underline",children:["Switch to ",e===Qt.ENGINEER?n("kitMarketingName"):n("kitEngineerName")]})]})},vN=()=>h.jsx("div",{className:"text-[var(--dash-text-muted)]",children:"Configuration preview placeholder"}),wN=({installing:t})=>h.jsx("div",{className:"text-[var(--dash-text-muted)]",children:t?"Installing...":"Ready to install"}),kN=({kit:t,onGetStarted:e})=>{const{t:n}=he(),r=an(),i=t===Qt.ENGINEER?"kitEngineerName":t===Qt.MARKETING?"kitMarketingName":"kitEngineerName";return h.jsxs("div",{className:"text-center py-12 space-y-6","data-testid":"success-screen",children:[h.jsx("div",{className:"w-16 h-16 mx-auto bg-green-100 rounded-full flex items-center justify-center",children:h.jsx("svg",{className:"w-10 h-10 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),h.jsx("h2",{className:"text-2xl font-bold text-[var(--dash-text)]",children:n("installSuccess")}),h.jsx("p",{className:"text-[var(--dash-text-muted)] max-w-md mx-auto",children:n("installSuccessDesc").replace("{kit}",n(i))}),h.jsxs("div",{className:"flex gap-4 justify-center pt-4",children:[h.jsx("button",{onClick:e,className:"px-6 py-2.5 text-sm font-medium text-white bg-[var(--dash-accent)] rounded-lg hover:opacity-90 transition-opacity","data-testid":"get-started-btn",children:n("getStarted")}),h.jsx("button",{onClick:()=>r("/"),className:"px-6 py-2.5 text-sm font-medium text-[var(--dash-text)] bg-[var(--dash-surface)] border border-[var(--dash-border)] rounded-lg hover:bg-[var(--dash-surface-hover)] transition-colors","data-testid":"dashboard-btn",children:n("goToDashboard")})]})]})},SN=[{id:"agents",name:"featureAgents",description:"featureAgentsDesc",engineer:!0,marketing:!0},{id:"hooks",name:"featureHooks",description:"featureHooksDesc",engineer:!0,marketing:!0},{id:"skills",name:"featureSkills",description:"featureSkillsDesc",engineer:!0,marketing:!0},{id:"multiagent",name:"featureMultiAgent",description:"featureMultiAgentDesc",engineer:!0,marketing:!1},{id:"content",name:"featureContent",description:"featureContentDesc",engineer:!1,marketing:!0},{id:"social",name:"featureSocial",description:"featureSocialDesc",engineer:!1,marketing:!0}],jx={engineer:{id:"engineer",name:"kitEngineerName",tagline:"kitEngineerTagline",primaryColor:"text-blue-500",features:["agents","hooks","skills","multiagent"]},marketing:{id:"marketing",name:"kitMarketingName",tagline:"kitMarketingTagline",primaryColor:"text-purple-500",features:["agents","hooks","skills","content","social"]}};function CN(t){const e=jx[t];return e?SN.filter(n=>e.features.includes(n.id)):(console.warn(`Unknown kit type: ${t}`),[])}const jN=({kit:t,selected:e,onSelect:n,features:r})=>{const{t:i}=he();return h.jsxs("button",{type:"button",onClick:n,className:`p-6 rounded-lg border-2 text-left transition-all w-full ${e?"border-[var(--dash-accent)] bg-[var(--dash-surface)] shadow-md":"border-[var(--dash-border)] hover:border-[var(--dash-accent)]/50"}`,children:[h.jsx("h3",{className:`text-xl font-bold ${t.primaryColor}`,children:i(t.name)}),h.jsx("p",{className:"text-[var(--dash-text-muted)] mt-1",children:i(t.tagline)}),h.jsx("div",{className:"mt-4 space-y-2",children:r.slice(0,3).map(s=>h.jsx(bN,{featureId:s.id,name:s.name,description:s.description,included:!0},s.id))})]})},ON=()=>{const{t}=he(),e=an(),[n,r]=g.useState(null),[i,s]=g.useState(!1),[o,a]=g.useState(!1),[l,c]=g.useState(null),d=async()=>{if(n){s(!0),c(null);try{const f=await fetch("/api/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kit:n})});if(!f.ok)throw new Error(`Installation failed: ${f.statusText}`);a(!0)}catch(f){const p=f instanceof Error?f.message:"Unknown error occurred";c(p),console.error("Install failed:",f)}finally{s(!1)}}};if(o&&n)return h.jsx(kN,{kit:n,onGetStarted:()=>e("/")});const u=f=>f==="engineer"?Qt.ENGINEER:Qt.MARKETING;return h.jsxs("div",{className:"max-w-4xl mx-auto py-8 px-4",children:[h.jsxs("header",{className:"text-center mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold text-[var(--dash-text)]",children:t("onboardingTitle")}),h.jsx("p",{className:"mt-2 text-[var(--dash-text-muted)]",children:t("onboardingSubtitle")})]}),h.jsx("section",{className:"grid md:grid-cols-2 gap-6 mb-8",children:Object.values(jx).map(f=>{const p=u(f.id);return h.jsx(jN,{kit:f,selected:n===p,onSelect:()=>r(p),features:CN(f.id)},f.id)})}),l&&h.jsxs("div",{className:"mb-6 p-4 rounded-lg bg-red-100 border border-red-300 text-red-800",children:[h.jsx("p",{className:"font-medium",children:"Installation Error"}),h.jsx("p",{className:"text-sm mt-1",children:l}),h.jsx("button",{type:"button",onClick:()=>c(null),className:"mt-2 text-sm underline hover:no-underline",children:"Dismiss"})]}),n&&h.jsx(xN,{selectedKit:n,onKitSelect:r,onInstall:d,installing:i})]})},PN=()=>{const{t}=he(),e=an(),{projectId:n}=$m(),[r,i]=g.useState(null),{sizes:s,isDragging:o,startDrag:a}=hh({storageKey:"claudekit-project-config-panels",defaultSizes:[35,40,25],minSizes:[20,25,15]}),l=g.useCallback(async()=>{if(!n)throw new Error("No project ID");const[b,x,w]=await Promise.all([pp("project",n),pp("global"),Ch()]),v=w.find(S=>S.id===n);return v&&i(v.path),{...b,global:x.config??{}}},[n]),c=g.useCallback(async b=>{n&&await Yb({scope:"project",projectId:n,config:b})},[n]),d=Jb({scope:"project",fetchConfig:l,fetchSchema:Qb,saveConfig:c}),u=g.useCallback(b=>{const x=mc(d.config,b),w=mc(d.globalConfig,b);return x!==void 0&&w!==void 0&&x!==w},[d.config,d.globalConfig]),f=g.useMemo(()=>[{id:"paths",title:t("sectionPaths"),fields:[{path:"paths.docs",label:t("fieldDocsPath"),description:t("fieldDocsPathDesc")},{path:"paths.plans",label:t("fieldPlansPath"),description:t("fieldPlansPathDesc")}]},{id:"project",title:t("sectionProject"),fields:[{path:"project.type",label:t("fieldProjectType"),description:t("fieldProjectTypeDesc")},{path:"project.packageManager",label:t("fieldPackageManager"),description:t("fieldPackageManagerDesc")},{path:"project.framework",label:t("fieldFramework"),description:t("fieldFrameworkDesc")}]},{id:"privacy",title:t("sectionPrivacy"),defaultCollapsed:!0,fields:[{path:"privacyBlock",label:t("fieldPrivacyBlock"),description:t("fieldPrivacyBlockDesc")}]},{id:"advanced",title:t("sectionAdvanced"),defaultCollapsed:!0,fields:[{path:"docs.maxLoc",label:t("fieldDocsMaxLoc"),description:t("fieldDocsMaxLocDesc")},{path:"plan.namingFormat",label:t("fieldPlanNamingFormat"),description:t("fieldPlanNamingFormatDesc")}]}],[t]),p=d.activeFieldPath&&u(d.activeFieldPath)?h.jsx("span",{className:"text-[9px] bg-orange-500/10 text-orange-500 px-1.5 py-0.5 rounded font-bold border border-orange-500/30",children:t("localOverride")}):null,m=d.fieldDoc?h.jsxs("section",{className:"bg-blue-500/5 p-3 rounded-lg border border-blue-500/20",children:[h.jsx("h4",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-widest mb-1",children:t("inheritedFromGlobal")}),h.jsxs("p",{className:"text-[12px] text-dash-text-secondary leading-normal",children:[t("viewGlobalConfig")," ",h.jsx("button",{onClick:()=>e("/config/global"),className:"text-dash-accent hover:underline font-medium",children:t("globalConfig")})]})]}):null;return h.jsxs("div",{className:"animate-in fade-in duration-300 w-full h-full flex flex-col transition-colors",children:[h.jsx(Gm,{title:t("projectConfig"),filePath:r?`${r}/.claude/.ck.json`:".claude/.ck.json",onBack:()=>e(`/project/${n}`),onSave:d.handleSave,onReset:d.handleReset,saveStatus:d.saveStatus,syntaxError:d.syntaxError,showResetConfirm:d.showResetConfirm,setShowResetConfirm:d.setShowResetConfirm}),h.jsxs("div",{className:"flex-1 flex min-h-0",children:[h.jsx(Qm,{width:s[0],isLoading:d.isLoading,schema:d.schema,config:d.config,sources:d.sources,sections:f,onChange:d.handleFormChange,onFieldFocus:d.setFocusedFieldPath}),h.jsx(tr,{direction:"horizontal",isDragging:o,onMouseDown:b=>a(0,b)}),h.jsx(od,{width:s[1],isLoading:d.isLoading,jsonText:d.jsonText,cursorLine:d.cursorLine,syntaxError:d.syntaxError,onChange:d.handleJsonChange,onEditorFocus:d.handleJsonEditorFocus,onCursorLineChange:d.setCursorLine}),h.jsx(tr,{direction:"horizontal",isDragging:o,onMouseDown:b=>a(1,b)}),h.jsx(Kb,{width:s[2],fieldDoc:d.fieldDoc,activeFieldPath:d.activeFieldPath,overrideBadge:p,extraContent:m})]})]})},Ot="__global__",NN=({project:t})=>{const{t:e}=he(),n=an(),{skills:r,loading:i}=Vv(),{sessions:s,loading:o}=zv(t.id),[a,l]=g.useState(null),[c,d]=g.useState(!0),[u,f]=g.useState(null),[p,m]=g.useState(Ot),[b,x]=g.useState(Ot),w=async(N,L)=>{try{await Tv(N,t.path,L,t.id)}catch(H){alert(`${e("actionFailed")}: ${H instanceof Error?H.message:N}`)}},v=g.useCallback(()=>{const N=new AbortController;return d(!0),f(null),Dv(t.id,N.signal).then(L=>{l(L),m(L.preferences.project.terminalApp||Ot),x(L.preferences.project.editorApp||Ot)}).catch(L=>{L instanceof DOMException&&L.name==="AbortError"||(l(null),m(Ot),x(Ot),f(e("actionOptionsLoadFailed")))}).finally(()=>{N.signal.aborted||d(!1)}),N},[t.id,e]);g.useEffect(()=>{const N=v();return()=>{N.abort()}},[v]);const S=r.filter(N=>t.skills.includes(N.id)),C=a?.terminals||[],k=a?.editors||[],O=C.find(N=>N.id===a?.defaults.terminalApp)?.label||a?.defaults.terminalApp,y=k.find(N=>N.id===a?.defaults.editorApp)?.label||a?.defaults.editorApp,M=g.useMemo(()=>C.find(N=>p===Ot?N.id===a?.defaults.terminalApp:N.id===p),[C,p,a?.defaults.terminalApp]),A=g.useMemo(()=>k.find(N=>b===Ot?N.id===a?.defaults.editorApp:N.id===b),[k,b,a?.defaults.editorApp]),R=async(N,L)=>{if(!t.id.startsWith("discovered-"))try{await Km(t.id,{preferences:{[N]:L===Ot?null:L}})}catch(H){const $=H instanceof Error?H.message:"Failed to save preference";alert(`${e("actionFailed")}: ${$}`)}};return h.jsxs("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-500 transition-colors flex flex-col h-full",children:[h.jsx("section",{className:"mb-6 shrink-0",children:h.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-4",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[h.jsx("h1",{className:"text-3xl font-bold tracking-tight text-dash-text",children:t.name}),h.jsx(AN,{status:t.health}),h.jsx(YC,{variant:"beta"})]}),h.jsxs("p",{className:"text-dash-text-secondary mono text-sm flex items-center gap-2 italic",children:[h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),t.path]})]}),h.jsx("div",{className:"flex items-center gap-3",children:h.jsx("span",{className:"text-[10px] text-dash-text-muted font-bold uppercase tracking-widest bg-dash-surface border border-dash-border px-2 py-1 rounded",children:s.length>0?`${s.length} ${e("sessions")}`:e("noSessions")})})]})}),h.jsxs("section",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6 shrink-0",children:[u?h.jsxs("div",{className:"col-span-2 md:col-span-4 rounded-lg border border-orange-500/30 bg-orange-500/5 px-3 py-2 text-xs text-orange-700 dark:text-orange-300 flex items-center justify-between gap-3",children:[h.jsx("span",{children:u}),h.jsx("button",{onClick:()=>void v(),className:"rounded border border-orange-500/40 px-2 py-1 font-semibold hover:bg-orange-500/10 transition-colors",children:e("tryAgain")})]}):null,h.jsx(lm,{icon:"📟",label:e("terminal"),sub:M?`${M.openMode==="open-app"?e("openAppOnly"):e("openAtPath")} • ${M.label}`:e("terminalSub"),onClick:()=>w("terminal",p===Ot?void 0:p),disabled:c||!M&&C.length>0,options:C,value:p,fallbackLabel:a?`${e("useGlobalFallback")} (${O})`:e("useGlobalFallback"),onChange:async N=>{m(N),await R("terminalApp",N)}}),h.jsx(lm,{icon:"💻",label:e("editor"),sub:A?`${A.openMode==="open-app"?e("openAppOnly"):e("openAtPath")} • ${A.label}`:e("editorSub"),onClick:()=>w("editor",b===Ot?void 0:b),disabled:c||!A&&k.length>0,options:k,value:b,fallbackLabel:a?`${e("useGlobalFallback")} (${y})`:e("useGlobalFallback"),onChange:async N=>{x(N),await R("editorApp",N)}}),h.jsx(uh,{icon:"🤖",label:e("launch"),sub:e("launchSub"),highlight:!0,onClick:()=>w("launch")}),h.jsx(uh,{icon:"⚙️",label:e("config"),sub:e("configSub"),onClick:()=>n(`/config/project/${t.id}`)})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 flex-1 min-h-0",children:[h.jsx("div",{className:"lg:col-span-2 flex flex-col gap-6 min-h-0",children:h.jsxs("div",{className:"bg-dash-surface border border-dash-border rounded-xl overflow-hidden shadow-sm flex-1 flex flex-col min-h-0",children:[h.jsx("div",{className:"px-4 py-3 border-b border-dash-border flex items-center justify-between bg-dash-surface-hover/50 shrink-0",children:h.jsx("h3",{className:"text-sm font-bold text-dash-text-secondary uppercase tracking-widest",children:e("recentSessions")})}),h.jsx("div",{className:"divide-y divide-dash-border overflow-y-auto flex-1",children:o?h.jsx("div",{className:"p-4 text-center text-dash-text-muted animate-pulse",children:e("loadingSessions")}):s.length===0?h.jsx("div",{className:"p-4 text-center text-dash-text-muted",children:e("noSessionsFound")}):s.map(N=>h.jsxs("div",{className:"p-4 hover:bg-dash-surface-hover transition-colors group cursor-pointer",children:[h.jsxs("div",{className:"flex items-center justify-between mb-1",children:[h.jsx("span",{className:"text-xs font-bold text-dash-accent",children:N.timestamp}),h.jsx("span",{className:"text-[10px] text-dash-text-muted font-medium group-hover:text-dash-text-secondary transition-colors",children:N.duration})]}),h.jsx("p",{className:"text-sm text-dash-text-secondary leading-relaxed truncate",children:N.summary})]},N.id))})]})}),h.jsxs("div",{className:"flex flex-col gap-6 min-h-0",children:[h.jsxs("div",{className:"bg-dash-surface border border-dash-border rounded-xl p-6 shadow-sm shrink-0",children:[h.jsxs("h3",{className:"text-sm font-bold text-dash-text-secondary uppercase tracking-widest mb-4 flex items-center gap-2",children:[e("configuration"),h.jsx("span",{className:"text-[10px] font-normal text-dash-text-muted normal-case",children:e("globalSettings")})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsx(zo,{label:e("activeKit"),value:t.kitType}),h.jsx(zo,{label:e("aiModel"),value:t.model}),h.jsx(zo,{label:e("hooks"),value:`${t.activeHooks} ${e("active")}`}),h.jsx(zo,{label:e("mcpServers"),value:`${t.mcpServers} ${e("connected")}`})]}),h.jsx("button",{onClick:()=>n(`/config/project/${t.id}`),className:"w-full mt-6 py-2 rounded-lg bg-dash-bg text-xs font-bold text-dash-text-secondary hover:bg-dash-surface-hover transition-colors border border-dash-border",children:e("editProjectConfig")})]}),h.jsxs("div",{className:"bg-dash-surface border border-dash-border rounded-xl shadow-sm flex flex-col flex-1 min-h-0",children:[h.jsx("div",{className:"p-4 pb-2 border-b border-dash-border shrink-0",children:h.jsxs("h3",{className:"text-sm font-bold text-dash-text-secondary uppercase tracking-widest flex items-center justify-between",children:[e("globalSkills"),h.jsx("span",{className:"text-[10px] bg-dash-accent-subtle text-dash-accent px-1.5 py-0.5 rounded-full",children:i?"...":r.length})]})}),h.jsx("div",{className:"overflow-y-auto flex-1 px-4 py-2 space-y-2",children:i?h.jsx("div",{className:"text-center text-dash-text-muted animate-pulse py-4",children:e("loadingSkills")}):(S.length>0?S:r).map(N=>h.jsxs("div",{className:"flex flex-col gap-0.5 border-l-2 border-dash-accent/20 pl-3 py-1",children:[h.jsx("span",{className:"text-sm font-semibold text-dash-text",children:N.name}),h.jsx("p",{className:"text-[10px] text-dash-text-muted leading-tight line-clamp-1",children:N.description||e("noDescription")})]},N.id))}),h.jsx("div",{className:"p-4 pt-2 border-t border-dash-border shrink-0",children:h.jsxs("a",{href:"https://kits.vibery.app/",target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-dash-text-muted hover:text-dash-accent transition-colors text-center block",children:[e("browseSkillsMarketplace")," →"]})})]})]})]})]})},AN=({status:t})=>{const e={[Pn.HEALTHY]:"bg-dash-accent-subtle text-dash-accent border-dash-accent/20",[Pn.WARNING]:"bg-orange-500/10 text-orange-600 border-orange-500/20",[Pn.ERROR]:"bg-red-500/10 text-red-600 border-red-500/20",[Pn.LOADING]:"bg-dash-border/20 text-dash-text-muted border-dash-border",[Pn.UNKNOWN]:"bg-dash-border/20 text-dash-text-muted border-dash-border"};return h.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-bold border uppercase tracking-widest ${e[t]}`,children:t})},lm=({icon:t,label:e,sub:n,disabled:r,options:i,value:s,fallbackLabel:o,onClick:a,onChange:l})=>h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(uh,{icon:t,label:e,sub:n,onClick:a,disabled:r}),h.jsxs("select",{value:s,onChange:c=>void l(c.target.value),className:"w-full rounded-md border border-dash-border bg-dash-surface px-2 py-1 text-xs text-dash-text-secondary",children:[h.jsx("option",{value:Ot,children:o}),i.map(c=>h.jsx("option",{value:c.id,disabled:!c.available,children:`${c.label} • ${c.detected?"Detected":"Not detected"}`},c.id))]})]}),uh=({icon:t,label:e,sub:n,highlight:r,onClick:i,disabled:s})=>h.jsxs("button",{onClick:i,disabled:s,className:`p-4 rounded-xl border flex flex-col gap-1 transition-all group ${r?"bg-dash-accent-subtle border-dash-accent/30 hover:bg-dash-accent-glow hover:border-dash-accent/50 shadow-sm shadow-dash-accent/5":"bg-dash-surface border-dash-border hover:bg-dash-surface-hover hover:border-dash-text-muted shadow-sm"} ${s?"opacity-50 cursor-not-allowed":""}`,children:[h.jsx("span",{className:"text-2xl mb-1 group-hover:scale-110 transition-transform",children:t}),h.jsx("span",{className:"text-sm font-bold text-dash-text",children:e}),h.jsx("span",{className:"text-[10px] text-dash-text-muted font-medium truncate italic",children:n})]}),zo=({label:t,value:e})=>h.jsxs("div",{className:"flex items-center justify-between text-xs py-1.5 border-b border-dash-border/50 last:border-0",children:[h.jsx("span",{className:"text-dash-text-muted font-medium",children:t}),h.jsx("span",{className:"text-dash-text font-bold mono uppercase text-[10px] tracking-tight",children:e})]}),MN=()=>{const{t}=he(),{project:e}=f1();return e?h.jsx(NN,{project:e}):h.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4 opacity-50",children:[h.jsx("div",{className:"w-16 h-16 rounded-full bg-dash-surface border border-dash-border flex items-center justify-center",children:h.jsx("span",{className:"text-2xl text-dash-text-muted",children:"📂"})}),h.jsx("p",{className:"text-lg text-dash-text-secondary font-bold",children:t("selectProject")})]})},DN=lv([{path:"/",element:h.jsx(Wv,{}),children:[{index:!0,element:h.jsx(ol,{to:"/config/global",replace:!0})},{path:"config/global",element:h.jsx(kj,{})},{path:"config/project/:projectId",element:h.jsx(PN,{})},{path:"project/:projectId",element:h.jsx(MN,{})},{path:"onboarding",element:h.jsx(ON,{})},{path:"migrate",element:h.jsx(gN,{})},{path:"kanban",element:h.jsx(jj,{})},{path:"skills",element:h.jsx(ol,{to:"/migrate",replace:!0})},{path:"*",element:h.jsx(ol,{to:"/",replace:!0})}]}]),Ox=document.getElementById("root");if(!Ox)throw document.body.innerHTML='<div style="padding:20px;color:red;">Fatal: Root element not found</div>',new Error("Root element #root not found");cc.createRoot(Ox).render(h.jsx(zx.StrictMode,{children:h.jsx(Cv,{children:h.jsx(jv,{children:h.jsx(wv,{router:DN})})})}));
|