@winspan/claude-forge 1.23.1 → 1.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/daemon/handlers/pre-tool-use-handler.d.ts.map +1 -1
- package/dist/daemon/handlers/pre-tool-use-handler.js +5 -0
- package/dist/daemon/handlers/pre-tool-use-handler.js.map +1 -1
- package/dist/daemon/server.d.ts +5 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js.map +1 -1
- package/dist/hooks/pre-tool-use.sh +12 -2
- package/dist/web-static/assets/{index-tfUH4-Oc.js → index-B78dZJAZ.js} +2 -2
- package/dist/web-static/index.html +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
16
16
|
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
17
17
|
`),r=t===-1?-1:n.indexOf(`
|
|
18
18
|
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
19
|
-
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=No(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&ss.assertOptions(n,{silentJSONParsing:cs.transitional(cs.boolean),forcedJSONParsing:cs.transitional(cs.boolean),clarifyTimeoutError:cs.transitional(cs.boolean),legacyInterceptorReqResOrdering:cs.transitional(cs.boolean)},!1),r!=null&&(V.isFunction(r)?t.paramsSerializer={serialize:r}:ss.assertOptions(r,{encode:cs.function,serialize:cs.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),ss.assertOptions(t,{baseUrl:cs.spelling(`baseURL`),withXsrfToken:cs.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&V.merge(i.common,i[t.method]);i&&V.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=go.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Ba;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ns.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=ns.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=No(this.defaults,e),Ra(jo(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};V.forEach([`delete`,`get`,`head`,`options`],function(e){ls.prototype[e]=function(t,n){return this.request(No(n||{},{method:e,url:t,data:(n||{}).data}))}}),V.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(No(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}ls.prototype[e]=t(),ls.prototype[e+`Form`]=t(!0)});var us=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new yo(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function ds(e){return function(t){return e.apply(null,t)}}function fs(e){return V.isObject(e)&&e.isAxiosError===!0}var ps={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ps).forEach(([e,t])=>{ps[t]=e});function ms(e){let t=new ls(e),n=_i(ls.prototype.request,t);return V.extend(n,ls.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ms(No(e,t))},n}var hs=ms(to);hs.Axios=ls,hs.CanceledError=yo,hs.CancelToken=us,hs.isCancel=vo,hs.VERSION=rs,hs.toFormData=Na,hs.AxiosError=H,hs.Cancel=hs.CanceledError,hs.all=function(e){return Promise.all(e)},hs.spread=ds,hs.isAxiosError=fs,hs.mergeConfig=No,hs.AxiosHeaders=go,hs.formToJSON=e=>Qa(V.isHTMLForm(e)?new FormData(e):e),hs.getAdapter=es.getAdapter,hs.HttpStatusCode=ps,hs.default=hs;var gs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_s=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),vs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ys=e=>{let t=vs(e);return t.charAt(0).toUpperCase()+t.slice(1)},bs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},xs=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ss=(0,z.createContext)({}),Cs=()=>(0,z.useContext)(Ss),ws=(0,z.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Cs()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,z.createElement)(`svg`,{ref:c,...bs,width:t??l??bs.width,height:t??l??bs.height,stroke:e??f,strokeWidth:m,className:gs(`lucide`,p,i),...!a&&!xs(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,z.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),U=(e,t)=>{let n=(0,z.forwardRef)(({className:n,...r},i)=>(0,z.createElement)(ws,{ref:i,iconNode:t,className:gs(`lucide-${_s(ys(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ys(e),n},Ts=U(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Es=U(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ds=U(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Os=U(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ks=U(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),As=U(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),js=U(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ms=U(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Ns=U(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Ps=U(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Fs=U(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Is=U(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ls=U(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Rs=U(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),zs=U(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Bs=U(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Vs=U(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Hs=U(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Us=U(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ws=U(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Gs=U(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ks=U(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),qs=U(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Js=U(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ys=U(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Xs=U(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Zs=U(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),Qs=U(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),$s=U(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ec=U(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),tc=U(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),nc=U(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),rc=U(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ic=U(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ac=U(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),oc=U(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),sc=U(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),cc=U(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),lc=U(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),uc=U(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),dc=U(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),fc=U(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),pc=U(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),mc=U(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),hc=U(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),gc=U(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),_c=U(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),vc=U(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),yc=U(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),bc=U(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),xc=U(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Sc=U(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Cc=U(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),wc=U(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Tc=U(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ec=U(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Dc=U(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Oc=U(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),kc=U(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ac=U(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),jc=u(y(),1),Mc=u(_(),1),Nc=(0,z.createContext)({toast:()=>{}}),Pc=()=>{};function Fc(e,t=`error`){Pc(e,t)}function Ic({children:e}){let[t,n]=(0,z.useState)([]),r={current:0},i=(0,z.useCallback)((e,t=`error`)=>{let i=++r.current;n(n=>[...n,{id:i,type:t,message:e}]),setTimeout(()=>n(e=>e.filter(e=>e.id!==i)),4e3)},[]);(0,z.useEffect)(()=>{Pc=i},[i]);let a={success:zs,error:Bs,warning:Tc},o={success:`bg-green-50 border-green-200 text-green-800`,error:`bg-red-50 border-red-200 text-red-800`,warning:`bg-yellow-50 border-yellow-200 text-yellow-800`},s={success:`text-green-500`,error:`text-red-500`,warning:`text-yellow-500`};return(0,B.jsxs)(Nc.Provider,{value:{toast:i},children:[e,(0,Mc.createPortal)((0,B.jsx)(`div`,{className:`fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 max-w-sm`,children:t.map(e=>{let t=a[e.type];return(0,B.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-3 rounded-lg border shadow-lg text-sm ${o[e.type]}`,children:[(0,B.jsx)(t,{className:`h-4 w-4 mt-0.5 flex-shrink-0 ${s[e.type]}`}),(0,B.jsx)(`span`,{className:`flex-1`,children:e.message}),(0,B.jsx)(`button`,{onClick:()=>n(t=>t.filter(t=>t.id!==e.id)),children:(0,B.jsx)(kc,{className:`h-3.5 w-3.5 opacity-60 hover:opacity-100`})})]},e.id)})}),document.body)]})}var W=hs.create({baseURL:`/api`,timeout:3e4});W.interceptors.response.use(e=>e,e=>(Fc(e.response?.data?.error||e.response?.data?.message||e.message||`请求失败`,`error`),Promise.reject(e)));var Lc=()=>W.get(`/health`),Rc=()=>W.get(`/config`),zc=e=>W.put(`/config`,e),Bc=()=>W.get(`/config/history`),Vc=e=>W.get(`/sessions`,{params:e}),Hc=e=>W.get(`/sessions/${e}`),Uc=e=>W.delete(`/sessions/${e}`),Wc=e=>W.delete(`/sessions`,{data:{ids:e}}),Gc=e=>W.get(`/events`,{params:e}),Kc=e=>W.get(`/events/stats`,{params:{project_path:e}}),qc=e=>W.get(`/pipelines`,{params:e}),Jc=e=>W.get(`/pipelines/${e}`),Yc=e=>W.get(`/quality/history`,{params:e}),Xc=e=>W.get(`/quality/unresolved`,{params:{project_path:e}}),Zc=()=>W.get(`/stats/roi`),Qc=()=>W.get(`/stats/overview`),$c=(e,t)=>W.get(`/knowledge/search`,{params:{q:e,project_path:t}}),el=e=>W.get(`/knowledge/overview`,{params:{project_path:e}}),tl=(e,t)=>W.get(`/knowledge/neighbors`,{params:{node_id:e,project_path:t}}),nl=e=>W.get(`/knowledge/graph`,{params:{project_path:e}}),rl=e=>W.post(`/knowledge/nodes`,e),il=(e,t)=>W.put(`/knowledge/nodes/${e}`,t),al=e=>W.delete(`/knowledge/nodes/${e}`),ol=e=>W.post(`/pipelines/${e}/close`),sl=e=>W.post(`/pipelines/batch-close`,{ids:e}),cl=()=>W.post(`/pipelines/close-expired`),ll=()=>W.get(`/pipelines/active`),ul=(e,t)=>W.post(`/pipelines/tasks/${e}/status`,{status:t}),dl=e=>W.post(`/pipelines/${e}/resume`),fl=e=>W.get(`/projects`,{params:e}),pl=e=>W.get(`/projects/${e}`),ml=e=>W.delete(`/projects/${e}`),hl=e=>W.get(`/convention/${e}`),gl=(e,t,n,r)=>W.put(`/convention/${e}/${t}`,{name:n,content:r}),_l=(e,t)=>W.delete(`/convention/${e}/${t}`),vl=(e,t)=>W.post(`/convention/${e}/evolve`,{id:t}),yl=e=>W.post(`/convention/init`,{path:e},{timeout:18e4}),bl=e=>W.get(`/claudemd/${e}`),xl=(e,t)=>W.put(`/claudemd/${e}`,{content:t}),Sl=e=>W.get(`/claudemd/${e}/profile`),Cl=e=>W.get(`/claudemd/${e}/modules`),wl=e=>W.post(`/claudemd/${e}/distill`,void 0,{timeout:18e4}),Tl=e=>W.post(`/claudemd/${e}/init`,void 0,{timeout:18e4}),El=e=>W.post(`/quality/${e}/resolve`),Dl=e=>W.post(`/quality/${e}/dismiss`),Ol=()=>W.post(`/quality/resolve-all`),kl=e=>W.post(`/quality/${e}/auto-fix`,{},{timeout:6e4}),Al=()=>W.get(`/daemon/status`),jl=()=>W.post(`/daemon/restart`),Ml=()=>W.get(`/daemon/diagnose`),Nl=()=>W.post(`/daemon/repair`),Pl=()=>W.post(`/config/backup`),Fl=()=>W.get(`/config/backups`),Il=e=>W.post(`/events/purge`,{retentionDays:e}),Ll=e=>W.get(`/stats/api-usage`,{params:{days:e}});function Rl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function zl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rl(e))&&(r&&(r+=` `),r+=t);return r}var Bl=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vl=(e,t)=>({classGroupId:e,validator:t}),Hl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ul=`-`,Wl=[],Gl=`arbitrary..`,Kl=e=>{let t=Yl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Jl(e);let n=e.split(Ul);return ql(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Bl(i,t):t:i||Wl}return n[e]||Wl}}},ql=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ql(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ul):e.slice(t).join(Ul),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Jl=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Gl+r:void 0})(),Yl=e=>{let{theme:t,classGroups:n}=e;return Xl(n,t)},Xl=(e,t)=>{let n=Hl();for(let r in e){let i=e[r];Zl(i,n,r,t)}return n},Zl=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ql(i,t,n,r)}},Ql=(e,t,n,r)=>{if(typeof e==`string`){$l(e,t,n);return}if(typeof e==`function`){eu(e,t,n,r);return}tu(e,t,n,r)},$l=(e,t,n)=>{let r=e===``?t:nu(t,e);r.classGroupId=n},eu=(e,t,n,r)=>{if(ru(e)){Zl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vl(n,e))},tu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Zl(o,nu(t,a),n,r)}},nu=(e,t)=>{let n=e,r=t.split(Ul),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Hl(),n.nextPart.set(t,i)),n=i}return n},ru=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,iu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},au=`!`,ou=`:`,su=[],cu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ou){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(au)?(c=s.slice(0,-1),l=!0):s.startsWith(au)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cu(t,l,c,u)};if(t){let e=t+ou,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cu(su,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},uu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},du=e=>({cache:iu(e.cacheSize),parseClassName:lu(e),sortModifiers:uu(e),...Kl(e)}),fu=/\s+/,pu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(fu),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+au:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},mu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=hu(n))&&(i&&(i+=` `),i+=r);return i},hu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=hu(e[r]))&&(n&&(n+=` `),n+=t);return n},gu=(e,...t)=>{let n,r,i,a,o=o=>(n=du(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=pu(e,n);return i(e,a),a};return a=o,(...e)=>a(mu(...e))},_u=[],vu=e=>{let t=t=>t[e]||_u;return t.isThemeGetter=!0,t},yu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Su=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Du=e=>xu.test(e),Ou=e=>!!e&&!Number.isNaN(Number(e)),ku=e=>!!e&&Number.isInteger(Number(e)),Au=e=>e.endsWith(`%`)&&Ou(e.slice(0,-1)),ju=e=>Su.test(e),Mu=()=>!0,Nu=e=>Cu.test(e)&&!wu.test(e),Pu=()=>!1,Fu=e=>Tu.test(e),Iu=e=>Eu.test(e),Lu=e=>!G(e)&&!K(e),Ru=e=>$u(e,rd,Pu),G=e=>yu.test(e),zu=e=>$u(e,id,Nu),Bu=e=>$u(e,ad,Ou),Vu=e=>$u(e,sd,Mu),Hu=e=>$u(e,od,Pu),Uu=e=>$u(e,td,Pu),Wu=e=>$u(e,nd,Iu),Gu=e=>$u(e,cd,Fu),K=e=>bu.test(e),Ku=e=>ed(e,id),qu=e=>ed(e,od),Ju=e=>ed(e,td),Yu=e=>ed(e,rd),Xu=e=>ed(e,nd),Zu=e=>ed(e,cd,!0),Qu=e=>ed(e,sd,!0),$u=(e,t,n)=>{let r=yu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ed=(e,t,n=!1)=>{let r=bu.exec(e);return r?r[1]?t(r[1]):n:!1},td=e=>e===`position`||e===`percentage`,nd=e=>e===`image`||e===`url`,rd=e=>e===`length`||e===`size`||e===`bg-size`,id=e=>e===`length`,ad=e=>e===`number`,od=e=>e===`family-name`,sd=e=>e===`number`||e===`weight`,cd=e=>e===`shadow`,ld=gu(()=>{let e=vu(`color`),t=vu(`font`),n=vu(`text`),r=vu(`font-weight`),i=vu(`tracking`),a=vu(`leading`),o=vu(`breakpoint`),s=vu(`container`),c=vu(`spacing`),l=vu(`radius`),u=vu(`shadow`),d=vu(`inset-shadow`),f=vu(`text-shadow`),p=vu(`drop-shadow`),m=vu(`blur`),h=vu(`perspective`),g=vu(`aspect`),_=vu(`ease`),v=vu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[Du,`full`,`auto`,...w()],E=()=>[ku,`none`,`subgrid`,K,G],D=()=>[`auto`,{span:[`full`,ku,K,G]},ku,K,G],O=()=>[ku,`auto`,K,G],k=()=>[`auto`,`min`,`max`,`fr`,K,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Du,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[Du,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[Du,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,K,G],I=()=>[...b(),Ju,Uu,{position:[K,G]}],L=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Yu,Ru,{size:[K,G]}],ne=()=>[Au,Ku,zu],re=()=>[``,`none`,`full`,l,K,G],R=()=>[``,Ou,Ku,zu],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[Ou,Au,Ju,Uu],se=()=>[``,`none`,m,K,G],ce=()=>[`none`,Ou,K,G],le=()=>[`none`,Ou,K,G],ue=()=>[Ou,K,G],de=()=>[Du,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ju],breakpoint:[ju],color:[Mu],container:[ju],"drop-shadow":[ju],ease:[`in`,`out`,`in-out`],font:[Lu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ju],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ju],shadow:[ju],spacing:[`px`,Ou],text:[ju],"text-shadow":[ju],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Du,G,K,g]}],container:[`container`],columns:[{columns:[Ou,G,K,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ku,`auto`,K,G]}],basis:[{basis:[Du,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ou,Du,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,Ou,K,G]}],shrink:[{shrink:[``,Ou,K,G]}],order:[{order:[ku,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ku,zu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Qu,Vu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Au,G]}],"font-family":[{font:[qu,Hu,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,K,G]}],"line-clamp":[{"line-clamp":[Ou,`none`,K,Bu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ou,`from-font`,`auto`,K,zu]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ou,`auto`,K,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ku,K,G],radial:[``,K,G],conic:[ku,K,G]},Xu,Wu]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ou,K,G]}],"outline-w":[{outline:[``,Ou,Ku,zu]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Zu,Gu]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Zu,Gu]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ou,zu]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Zu,Gu]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ou,K,G]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Ou]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ou]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:se()}],brightness:[{brightness:[Ou,K,G]}],contrast:[{contrast:[Ou,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Zu,Gu]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Ou,K,G]}],"hue-rotate":[{"hue-rotate":[Ou,K,G]}],invert:[{invert:[``,Ou,K,G]}],saturate:[{saturate:[Ou,K,G]}],sepia:[{sepia:[``,Ou,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Ou,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[Ou,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ou,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ou,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,Ou,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[Ou,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[Ou,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ou,K,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ou,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[Ou,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,K,G]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Ou,Ku,zu,Bu]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function ud(...e){return ld(zl(e))}function dd(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60),i=Math.floor(r/24);return i>0?`${i}天${r%24}小时`:r>0?`${r}小时${n%60}分钟`:n>0?`${n}分钟${t%60}秒`:`${t}秒`}function fd(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function pd(e){let t={active:`text-green-600 bg-green-50`,completed:`text-blue-600 bg-blue-50`,failed:`text-red-600 bg-red-50`,interrupted:`text-yellow-600 bg-yellow-50`,pending:`text-gray-600 bg-gray-50`};return t[e]||t.pending}function md(e){return e?e.endsWith(`Z`)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e+`Z`):new Date}var hd=[{path:`/dashboard`,label:`仪表盘`,icon:ic},{path:`/projects`,label:`项目管理`,icon:$s},{path:`/sessions`,label:`会话管理`,icon:Ts},{path:`/events`,label:`事件流`,icon:Ms},{path:`/pipelines`,label:`流水线`,icon:tc},{path:`/quality`,label:`质量门禁`,icon:yc},{path:`/knowledge`,label:`知识图谱`,icon:js},{path:`/analytics`,label:`数据分析`,icon:Ns},{path:`/config`,label:`系统配置`,icon:vc}];function gd({children:e}){let[t,n]=(0,z.useState)(()=>localStorage.getItem(`sidebar-collapsed`)===`true`),r=jn();(0,z.useEffect)(()=>{localStorage.setItem(`sidebar-collapsed`,String(t))},[t]);let{data:i}=ct({queryKey:[`health`],queryFn:()=>Lc().then(e=>e.data),refetchInterval:15e3}),a=hd.find(e=>r.pathname.startsWith(e.path));return(0,B.jsxs)(`div`,{className:`flex min-h-screen bg-gray-50`,children:[(0,B.jsxs)(`aside`,{className:ud(`fixed top-0 left-0 bottom-0 z-50 flex flex-col transition-all duration-300`,`bg-gradient-to-b from-slate-900 to-slate-800`,t?`w-16`:`w-60`),children:[(0,B.jsxs)(`div`,{className:ud(`flex items-center border-b border-white/10 h-16`,t?`justify-center px-2`:`justify-between px-5`),children:[!t&&(0,B.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-purple-600`,children:(0,B.jsx)(Ac,{className:`h-5 w-5 text-white`})}),(0,B.jsx)(`span`,{className:`text-white font-bold text-lg tracking-tight`,children:`Forge`})]}),(0,B.jsx)(`button`,{onClick:()=>n(!t),className:`p-1.5 rounded-lg text-white/60 hover:text-white hover:bg-white/10 transition-colors`,children:t?(0,B.jsx)(oc,{className:`h-5 w-5`}):(0,B.jsx)(Is,{className:`h-5 w-5`})})]}),(0,B.jsx)(`nav`,{className:`flex-1 py-4 space-y-1 px-2`,children:hd.map(e=>(0,B.jsxs)(ei,{to:e.path,className:({isActive:e})=>ud(`flex items-center gap-3 rounded-lg transition-all duration-200`,t?`justify-center p-3`:`px-3 py-2.5`,e?`bg-blue-600/20 text-blue-400`:`text-white/60 hover:text-white hover:bg-white/5`),children:[(0,B.jsx)(e.icon,{className:`h-5 w-5 flex-shrink-0`}),!t&&(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:e.label})]},e.path))}),(0,B.jsx)(`div`,{className:ud(`border-t border-white/10 py-4`,t?`px-2`:`px-5`),children:(0,B.jsxs)(`div`,{className:ud(`flex items-center gap-2`,t?`justify-center`:``),children:[(0,B.jsx)(`div`,{className:ud(`w-2 h-2 rounded-full`,i?.status===`ok`?`bg-green-400 animate-pulse`:`bg-red-400`)}),!t&&(0,B.jsx)(`span`,{className:`text-xs text-white/40`,children:i?.status===`ok`?`Daemon 运行中`:`连接断开`})]})})]}),(0,B.jsxs)(`main`,{className:ud(`flex-1 transition-all duration-300`,t?`ml-16`:`ml-60`),children:[(0,B.jsxs)(`header`,{className:`sticky top-0 z-40 bg-white/80 backdrop-blur-md border-b border-gray-200/50 h-16 flex items-center justify-between px-8`,children:[(0,B.jsx)(`h1`,{className:`text-xl font-semibold text-gray-900`,children:a?.label||`Claude Forge`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsxs)(`button`,{className:`hidden sm:flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors`,onClick:()=>{let e=new KeyboardEvent(`keydown`,{key:`k`,metaKey:!0});window.dispatchEvent(e)},children:[(0,B.jsx)(Ws,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{children:`命令面板`}),(0,B.jsx)(`kbd`,{className:`px-2 py-0.5 text-xs bg-gray-100 rounded border border-gray-200`,children:`⌘K`})]}),(0,B.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`v`,`1.23.1`]}),(0,B.jsxs)(`div`,{className:ud(`flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-semibold`,i?.status===`ok`?`bg-green-50 text-green-700 border border-green-200`:`bg-red-50 text-red-700 border border-red-200`),children:[(0,B.jsx)(`div`,{className:ud(`w-1.5 h-1.5 rounded-full`,i?.status===`ok`?`bg-green-500`:`bg-red-500`)}),i?.status===`ok`?`在线`:`离线`]})]})]}),(0,B.jsx)(`div`,{className:`p-8`,children:e})]})]})}var _d=(0,z.createContext)({});function vd(e){let t=(0,z.useRef)(null);return t.current===null&&(t.current=e()),t.current}var yd=typeof window<`u`?z.useLayoutEffect:z.useEffect,bd=(0,z.createContext)(null);function xd(e,t){e.indexOf(t)===-1&&e.push(t)}function Sd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Cd=(e,t,n)=>n>t?t:n<e?e:n,wd={},Td=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ed(e){return typeof e==`object`&&!!e}var Dd=e=>/^0[^.\s]+$/u.test(e);function Od(e){let t;return()=>(t===void 0&&(t=e()),t)}var kd=e=>e,Ad=(e,t)=>n=>t(e(n)),jd=(...e)=>e.reduce(Ad),Md=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Nd=class{constructor(){this.subscriptions=[]}add(e){return xd(this.subscriptions,e),()=>Sd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Pd=e=>e*1e3,Fd=e=>e/1e3;function Id(e,t){return t?1e3/t*e:0}var Ld=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Rd=1e-7,zd=12;function Bd(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ld(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Rd&&++s<zd);return o}function Vd(e,t,n,r){if(e===t&&n===r)return kd;let i=t=>Bd(t,0,1,e,n);return e=>e===0||e===1?e:Ld(i(e),t,r)}var Hd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ud=e=>t=>1-e(1-t),Wd=Vd(.33,1.53,.69,.99),Gd=Ud(Wd),Kd=Hd(Gd),qd=e=>e>=1?1:(e*=2)<1?.5*Gd(e):.5*(2-2**(-10*(e-1))),Jd=e=>1-Math.sin(Math.acos(e)),Yd=Ud(Jd),Xd=Hd(Jd),Zd=Vd(.42,0,1,1),Qd=Vd(0,0,.58,1),$d=Vd(.42,0,.58,1),ef=e=>Array.isArray(e)&&typeof e[0]!=`number`,tf=e=>Array.isArray(e)&&typeof e[0]==`number`,nf={linear:kd,easeIn:Zd,easeInOut:$d,easeOut:Qd,circIn:Jd,circInOut:Xd,circOut:Yd,backIn:Gd,backInOut:Kd,backOut:Wd,anticipate:qd},rf=e=>typeof e==`string`,af=e=>{if(tf(e)){e.length;let[t,n,r,i]=e;return Vd(t,n,r,i)}else if(rf(e))return nf[e],`${e}`,nf[e];return e},of=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],sf={value:null,addProjectionMetrics:null};function cf(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&sf.value&&sf.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var lf=40;function uf(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=of.reduce((e,n)=>(e[n]=cf(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=wd.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,lf),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:of.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<of.length;t++)o[of[t]].cancel(e)},state:i,steps:o}}var{schedule:df,cancel:ff,state:pf,steps:mf}=uf(typeof requestAnimationFrame<`u`?requestAnimationFrame:kd,!0),hf;function gf(){hf=void 0}var _f={now:()=>(hf===void 0&&_f.set(pf.isProcessing||wd.useManualTiming?pf.timestamp:performance.now()),hf),set:e=>{hf=e,queueMicrotask(gf)}},vf={layout:0,mainThread:0,waapi:0},yf=e=>t=>typeof t==`string`&&t.startsWith(e),bf=yf(`--`),xf=yf(`var(--`),Sf=e=>xf(e)?Cf.test(e.split(`/*`)[0].trim()):!1,Cf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wf(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Tf={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ef={...Tf,transform:e=>Cd(0,1,e)},Df={...Tf,default:1},Of=e=>Math.round(e*1e5)/1e5,kf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Af(e){return e==null}var jf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mf=(e,t)=>n=>!!(typeof n==`string`&&jf.test(n)&&n.startsWith(e)||t&&!Af(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(kf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Pf=e=>Cd(0,255,e),Ff={...Tf,transform:e=>Math.round(Pf(e))},If={test:Mf(`rgb`,`red`),parse:Nf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ff.transform(e)+`, `+Ff.transform(t)+`, `+Ff.transform(n)+`, `+Of(Ef.transform(r))+`)`};function Lf(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Rf={test:Mf(`#`),parse:Lf,transform:If.transform},zf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bf=zf(`deg`),Vf=zf(`%`),q=zf(`px`),Hf=zf(`vh`),Uf=zf(`vw`),Wf={...Vf,parse:e=>Vf.parse(e)/100,transform:e=>Vf.transform(e*100)},Gf={test:Mf(`hsl`,`hue`),parse:Nf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Vf.transform(Of(t))+`, `+Vf.transform(Of(n))+`, `+Of(Ef.transform(r))+`)`},Kf={test:e=>If.test(e)||Rf.test(e)||Gf.test(e),parse:e=>If.test(e)?If.parse(e):Gf.test(e)?Gf.parse(e):Rf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?If.transform(e):Gf.transform(e),getAnimatableNone:e=>{let t=Kf.parse(e);return t.alpha=0,Kf.transform(t)}},qf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jf(e){return isNaN(e)&&typeof e==`string`&&(e.match(kf)?.length||0)+(e.match(qf)?.length||0)>0}var Yf=`number`,Xf=`color`,Zf=`var`,Qf=`var(`,$f="${}",ep=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tp(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ep,e=>(Kf.test(e)?(r.color.push(a),i.push(Xf),n.push(Kf.parse(e))):e.startsWith(Qf)?(r.var.push(a),i.push(Zf),n.push(e)):(r.number.push(a),i.push(Yf),n.push(parseFloat(e))),++a,$f)).split($f),indexes:r,types:i}}function np(e){return tp(e).values}function rp({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Yf?i+=Of(r[a]):e===Xf?i+=Kf.transform(r[a]):i+=r[a]}return i}}function ip(e){return rp(tp(e))}var ap=e=>typeof e==`number`?0:Kf.test(e)?Kf.getAnimatableNone(e):e,op=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ap(e);function sp(e){let t=tp(e);return rp(t)(t.values.map((e,n)=>op(e,t.split[n])))}var cp={test:Jf,parse:np,createTransformer:ip,getAnimatableNone:sp};function lp(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function up({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=lp(s,r,e+1/3),a=lp(s,r,e),o=lp(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function dp(e,t){return n=>n>0?t:e}var fp=(e,t,n)=>e+(t-e)*n,pp=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},mp=[Rf,If,Gf],hp=e=>mp.find(t=>t.test(e));function gp(e){let t=hp(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Gf&&(n=up(n)),n}var _p=(e,t)=>{let n=gp(e),r=gp(t);if(!n||!r)return dp(e,t);let i={...n};return e=>(i.red=pp(n.red,r.red,e),i.green=pp(n.green,r.green,e),i.blue=pp(n.blue,r.blue,e),i.alpha=fp(n.alpha,r.alpha,e),If.transform(i))},vp=new Set([`none`,`hidden`]);function yp(e,t){return vp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bp(e,t){return n=>fp(e,t,n)}function xp(e){return typeof e==`number`?bp:typeof e==`string`?Sf(e)?dp:Kf.test(e)?_p:Tp:Array.isArray(e)?Sp:typeof e==`object`?Kf.test(e)?_p:Cp:dp}function Sp(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>xp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Cp(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function wp(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Tp=(e,t)=>{let n=cp.createTransformer(t),r=tp(e),i=tp(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?vp.has(e)&&!i.values.length||vp.has(t)&&!r.values.length?yp(e,t):jd(Sp(wp(r,i),i.values),n):(`${e}${t}`,dp(e,t))};function Ep(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?fp(e,t,n):xp(e)(e,t)}var Dp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>df.update(t,e),stop:()=>ff(t),now:()=>pf.isProcessing?pf.timestamp:_f.now()}},Op=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},kp=2e4;function Ap(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function jp(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Ap(r),kp);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Fd(i)}}var Mp={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Np(e,t){return e*Math.sqrt(1-t*t)}var Pp=12;function Fp(e,t,n){let r=n;for(let n=1;n<Pp;n++)r-=e(r)/t(r);return r}var Ip=.001;function Lp({duration:e=Mp.duration,bounce:t=Mp.bounce,velocity:n=Mp.velocity,mass:r=Mp.mass}){let i,a;Mp.maxDuration;let o=1-t;o=Cd(Mp.minDamping,Mp.maxDamping,o),e=Cd(Mp.minDuration,Mp.maxDuration,Fd(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Np(t,o),c=Math.exp(-i);return Ip-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Np(t**2,o);return(-i(t)+Ip>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ip+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Fp(i,a,s);if(e=Pd(e),isNaN(c))return{stiffness:Mp.stiffness,damping:Mp.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Rp=[`duration`,`bounce`],zp=[`stiffness`,`damping`,`mass`];function Bp(e,t){return t.some(t=>e[t]!==void 0)}function Vp(e){let t={velocity:Mp.velocity,stiffness:Mp.stiffness,damping:Mp.damping,mass:Mp.mass,isResolvedFromDuration:!1,...e};if(!Bp(e,zp)&&Bp(e,Rp))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Cd(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Mp.mass,stiffness:i,damping:a}}else{let n=Lp({...e,velocity:0});t={...t,...n,mass:Mp.mass},t.isResolvedFromDuration=!0}return t}function Hp(e=Mp.visualDuration,t=Mp.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Vp({...n,velocity:-Fd(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Fd(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Mp.restSpeed.granular:Mp.restSpeed.default,i||=v?Mp.restDelta.granular:Mp.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Np(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>Pd(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=Pd(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=Pd(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Ap(T),kp),t=Op(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Hp.applyToOptions=e=>{let t=jp(e,100,Hp);return e.ease=t.ease,e.duration=Pd(t.duration),e.type=`keyframes`,e};var Up=5;function Wp(e,t,n){let r=Math.max(t-Up,0);return Id(n-e(r),t-r)}function Gp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Hp({keyframes:[f.value,m(f.value)],velocity:Wp(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function eee(e,t,n){let r=[],i=n||wd.mix||Ep,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=jd(Array.isArray(t)?t[n]||kd:t,a)),r.push(a)}return r}function tee(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=eee(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Md(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Cd(e[0],e[a-1],t)):l}function Kp(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Md(0,t,r);e.push(fp(n,1,i))}}function qp(e){let t=[0];return Kp(t,e.length-1),t}function Jp(e,t){return e.map(e=>e*t)}function Yp(e,t){return e.map(()=>t||$d).splice(0,e.length-1)}function Xp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ef(r)?r.map(af):af(r),a={done:!1,value:t[0]},o=tee(Jp(n&&n.length===t.length?n:qp(t),e),t,{ease:Array.isArray(i)?i:Yp(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var nee=e=>e!==null;function Zp(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(nee),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Qp={decay:Gp,inertia:Gp,tween:Xp,keyframes:Xp,spring:Hp};function $p(e){typeof e.type==`string`&&(e.type=Qp[e.type])}var em=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},tm=e=>e/100,nm=class extends em{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==_f.now()&&this.tick(_f.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},vf.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;$p(e);let{type:t=Xp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xp;s!==Xp&&typeof o[0]!=`number`&&(this.mixKeyframes=jd(tm,Ep(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ap(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Cd(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Gp&&(b.value=Zp(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Fd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Fd(e)}get time(){return Fd(this.currentTime)}set time(e){e=Pd(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Wp(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(_f.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Fd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Dp,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(_f.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,vf.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function rm(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var im=e=>e*180/Math.PI,am=e=>om(im(Math.atan2(e[1],e[0]))),ree={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:am,rotateZ:am,skewX:e=>im(Math.atan(e[1])),skewY:e=>im(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},om=e=>(e%=360,e<0&&(e+=360),e),sm=am,cm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),um={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cm,scaleY:lm,scale:e=>(cm(e)+lm(e))/2,rotateX:e=>om(im(Math.atan2(e[6],e[5]))),rotateY:e=>om(im(Math.atan2(-e[2],e[0]))),rotateZ:sm,rotate:sm,skewX:e=>im(Math.atan(e[4])),skewY:e=>im(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dm(e){return+!!e.includes(`scale`)}function fm(e,t){if(!e||e===`none`)return dm(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=um,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ree,i=t}if(!i)return dm(t);let a=r[t],o=i[1].split(`,`).map(mm);return typeof a==`function`?a(o):o[a]}var pm=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return fm(n,t)};function mm(e){return parseFloat(e.trim())}var hm=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],gm=new Set(hm),_m=e=>e===Tf||e===q,vm=new Set([`x`,`y`,`z`]),ym=hm.filter(e=>!vm.has(e));function bm(e){let t=[];return ym.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var xm={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fm(t,`x`),y:(e,{transform:t})=>fm(t,`y`)};xm.translateX=xm.x,xm.translateY=xm.y;var Sm=new Set,Cm=!1,wm=!1,Tm=!1;function Em(){if(wm){let e=Array.from(Sm).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=bm(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}wm=!1,Cm=!1,Sm.forEach(e=>e.complete(Tm)),Sm.clear()}function Dm(){Sm.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wm=!0)})}function Om(){Tm=!0,Dm(),Em(),Tm=!1}var km=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Sm.add(this),Cm||(Cm=!0,df.read(Dm),df.resolveKeyframes(Em))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}rm(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Sm.delete(this)}cancel(){this.state===`scheduled`&&(Sm.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Am=e=>e.startsWith(`--`);function jm(e,t,n){Am(t)?e.style.setProperty(t,n):e.style[t]=n}var Mm={};function Nm(e,t){let n=Od(e);return()=>Mm[t]??n()}var Pm=Nm(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Fm=Nm(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Im=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lm={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Im([0,.65,.55,1]),circOut:Im([.55,0,1,.45]),backIn:Im([.31,.01,.66,-.59]),backOut:Im([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e==`function`?Fm()?Op(e,t):`ease-out`:tf(e)?Im(e):Array.isArray(e)?e.map(e=>Rm(e,t)||Lm.easeOut):Lm[e]}function zm(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Rm(s,i);Array.isArray(d)&&(u.easing=d),sf.value&&vf.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return sf.value&&p.finished.finally(()=>{vf.waapi--}),p}function Bm(e){return typeof e==`function`&&`applyToOptions`in e}function Vm({type:e,...t}){return Bm(e)&&Fm()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Hm=class extends em{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Vm(e);this.animation=zm(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Zp(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jm(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Fd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Fd(e)}get time(){return Fd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pd(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Pm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),kd):r(this)}},Um={anticipate:qd,backInOut:Kd,circInOut:Xd};function Wm(e){return e in Um}function iee(e){typeof e.ease==`string`&&Wm(e.ease)&&(e.ease=Um[e.ease])}var Gm=10,aee=class extends Hm{constructor(e){iee(e),$p(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new nm({...a,autoplay:!1}),s=Math.max(Gm,_f.now()-this.startTime),c=Cd(0,Gm,s-Gm),l=o.sample(s).value,{name:u}=this.options;i&&u&&jm(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Km=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(cp.test(e)||e===`0`)&&!e.startsWith(`url(`));function oee(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function see(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Km(i,t),s=Km(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:oee(e)||(n===`spring`||Bm(n))&&r}function qm(e){e.duration=0,e.type=`keyframes`}var Jm=new Set([`opacity`,`clipPath`,`filter`,`transform`]),cee=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lee(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&cee.test(e[t]))return!0;return!1}var uee=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Ym=Od(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Xm(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Ym()&&n&&(Jm.has(n)||uee.has(n)&&lee(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Zm=40,Qm=class extends em{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_f.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||km)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=_f.now();let u=!0;see(e,i,a,o)||(u=!1,(wd.instantAnimations||!s)&&l?.(Zp(e,n,t)),e[0]=e[e.length-1],qm(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Zm?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Xm(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new aee({...d,element:p})}catch{m=new nm(d)}else m=new nm(d);m.finished.then(()=>{this.notifyFinished()}).catch(kd),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Om()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function $m(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var eh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function th(e){let t=eh.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function nh(e,t,n=1){`${e}`;let[r,i]=th(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Td(e)?parseFloat(e):e}return Sf(i)?nh(i,t,n+1):i}var rh={type:`spring`,stiffness:500,damping:25,restSpeed:10},ih=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ah={type:`keyframes`,duration:.8},oh={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},sh=(e,{keyframes:t})=>t.length>2?ah:gm.has(e)?e.startsWith(`scale`)?ih(t[1]):rh:oh;function ch(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function lh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:ch(n,e)}var uh=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function dh(e){for(let t in e)if(!uh.has(t))return!0;return!1}var fh=(e,t,n,r={},i,a)=>o=>{let s=lh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Pd(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};dh(s)||Object.assign(u,sh(e,u)),u.duration&&=Pd(u.duration),u.repeatDelay&&=Pd(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(qm(u),u.delay===0&&(d=!0)),(wd.instantAnimations||wd.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,qm(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Zp(u.keyframes,s);if(e!==void 0){df.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new nm(u):new Qm(u)};function ph(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function mh(e,t,n,r){if(typeof t==`function`){let[i,a]=ph(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ph(r);t=t(n===void 0?e.custom:n,i,a)}return t}function hh(e,t,n){let r=e.getProps();return mh(r,t,n===void 0?r.custom:n,e)}var gh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...hm]),_h=30,vh=e=>!isNaN(parseFloat(e)),yh={current:void 0},bh=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=_f.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=_f.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=vh(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Nd);let n=this.events[e].add(t);return e===`change`?()=>{n(),df.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return yh.current&&yh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=_f.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>_h)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,_h);return Id(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function xh(e,t){return new bh(e,t)}var Sh=e=>Array.isArray(e);function Ch(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xh(n))}function wh(e){return Sh(e)?e[e.length-1]||0:e}function Th(e,t){let{transitionEnd:n={},transition:r={},...i}=hh(e,t)||{};i={...i,...n};for(let t in i)Ch(e,t,wh(i[t]))}var Eh=e=>!!(e&&e.getVelocity);function Dh(e){return!!(Eh(e)&&e.add)}function Oh(e,t){let n=e.getValue(`willChange`);if(Dh(n))return n.add(t);if(!n&&wd.WillChange){let n=new wd.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function kh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ah=`data-`+kh(`framerAppearId`);function jh(e){return e.props[Ah]}function Mh({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?ch(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Mh(d,t))continue;let o={delay:n,...lh(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){df.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=jh(e);if(n){let e=window.MotionHandoffAnimation(n,t,df);e!==null&&(o.startTime=e,f=!0)}}Oh(e,t);let p=l??e.shouldReduceMotion;r.start(fh(t,r,i,p&&gh.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>df.update(()=>{o&&Th(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Ph(e,t,n={}){let r=hh(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Nh(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Fh(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Fh(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Ph(c,t,{...o,delay:n+(typeof r==`function`?0:r)+$m(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Ih(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Ph(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Ph(e,t,n);else{let i=typeof t==`function`?hh(e,t,n.custom):t;r=Promise.all(Nh(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var dee={test:e=>e===`auto`,parse:e=>e},Lh=e=>t=>t.test(e),Rh=[Tf,q,Vf,Bf,Uf,Hf,dee],zh=e=>Rh.find(Lh(e));function fee(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Dd(e)}var pee=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function mee(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(kf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!pee.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var hee=/\b([a-z-]*)\(.*?\)/gu,Bh={...cp,getAnimatableNone:e=>{let t=e.match(hee);return t?t.map(mee).join(` `):e}},Vh={...cp,getAnimatableNone:e=>{let t=cp.parse(e);return cp.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Hh={...Tf,transform:Math.round},Uh={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,rotate:Bf,rotateX:Bf,rotateY:Bf,rotateZ:Bf,scale:Df,scaleX:Df,scaleY:Df,scaleZ:Df,skew:Bf,skewX:Bf,skewY:Bf,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ef,originX:Wf,originY:Wf,originZ:q,zIndex:Hh,fillOpacity:Ef,strokeOpacity:Ef,numOctaves:Hh},gee={...Uh,color:Kf,backgroundColor:Kf,outlineColor:Kf,fill:Kf,stroke:Kf,borderColor:Kf,borderTopColor:Kf,borderRightColor:Kf,borderBottomColor:Kf,borderLeftColor:Kf,filter:Bh,WebkitFilter:Bh,mask:Vh,WebkitMask:Vh},Wh=e=>gee[e],_ee=new Set([Bh,Vh]);function Gh(e,t){let n=Wh(e);return _ee.has(n)||(n=cp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var vee=new Set([`auto`,`none`,`0`]);function yee(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!vee.has(t)&&tp(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Gh(n,i)}var bee=class extends km{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Sf(r))){let i=nh(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!gh.has(n)||e.length!==2)return;let[r,i]=e,a=zh(r),o=zh(i);if(wf(r)!==wf(i)&&xm[n]){this.needsMeasurement=!0;return}if(a!==o)if(_m(a)&&_m(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else xm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||fee(e[t]))&&n.push(t);n.length&&yee(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xm[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=xm[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Kh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var qh=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Jh(e){return Ed(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Yh,cancel:xee}=uf(queueMicrotask,!1),Xh={x:!1,y:!1};function Zh(){return Xh.x||Xh.y}function Qh(e){return e===`x`||e===`y`?Xh[e]?null:(Xh[e]=!0,()=>{Xh[e]=!1}):Xh.x||Xh.y?null:(Xh.x=Xh.y=!0,()=>{Xh.x=Xh.y=!1})}function $h(e,t){let n=Kh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function eg(e){return!(e.pointerType===`touch`||Zh())}function tg(e,t,n={}){let[r,i,a]=$h(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!eg(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ng=(e,t)=>t?e===t?!0:ng(e,t.parentElement):!1,rg=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ig=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ag(e){return ig.has(e.tagName)||e.isContentEditable===!0}var og=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function sg(e){return og.has(e.tagName)||e.isContentEditable===!0}var cg=new WeakSet;function lg(e){return t=>{t.key===`Enter`&&e(t)}}function ug(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var dg=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=lg(()=>{if(cg.has(n))return;ug(n,`down`);let e=lg(()=>{ug(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ug(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function fg(e){return rg(e)&&!Zh()}var pg=new WeakSet;function mg(e,t,n={}){let[r,i,a]=$h(e,n),o=e=>{let r=e.currentTarget;if(!fg(e)||pg.has(e))return;cg.add(r),n.stopPropagation&&pg.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),cg.has(r)&&cg.delete(r),fg(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ng(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Jh(e)&&(e.addEventListener(`focus`,e=>dg(e,i)),!ag(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function hg(e){return Ed(e)&&`ownerSVGElement`in e}var gg=new WeakMap,_g,vg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:hg(r)&&`getBBox`in r?r.getBBox()[t]:r[n],yg=vg(`inline`,`width`,`offsetWidth`),bg=vg(`block`,`height`,`offsetHeight`);function xg({target:e,borderBoxSize:t}){gg.get(e)?.forEach(n=>{n(e,{get width(){return yg(e,t)},get height(){return bg(e,t)}})})}function Sg(e){e.forEach(xg)}function Cg(){typeof ResizeObserver>`u`||(_g=new ResizeObserver(Sg))}function wg(e,t){_g||Cg();let n=Kh(e);return n.forEach(e=>{let n=gg.get(e);n||(n=new Set,gg.set(e,n)),n.add(t),_g?.observe(e)}),()=>{n.forEach(e=>{let n=gg.get(e);n?.delete(t),n?.size||_g?.unobserve(e)})}}var Tg=new Set,Eg;function Dg(){Eg=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tg.forEach(t=>t(e))},window.addEventListener(`resize`,Eg)}function Og(e){return Tg.add(e),Eg||Dg(),()=>{Tg.delete(e),!Tg.size&&typeof Eg==`function`&&(window.removeEventListener(`resize`,Eg),Eg=void 0)}}function kg(e,t){return typeof e==`function`?Og(e):wg(e,t)}function Ag(e){return hg(e)&&e.tagName===`svg`}var jg=[...Rh,Kf,cp],Mg=e=>jg.find(Lh(e)),Ng=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pg=()=>({x:Ng(),y:Ng()}),Fg=()=>({min:0,max:0}),Ig=()=>({x:Fg(),y:Fg()}),Lg=new WeakMap;function Rg(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function zg(e){return typeof e==`string`||Array.isArray(e)}var Bg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Vg=[`initial`,...Bg];function Hg(e){return Rg(e.animate)||Vg.some(t=>zg(e[t]))}function Ug(e){return!!(Hg(e)||e.variants)}function Wg(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Eh(i))e.addValue(r,i);else if(Eh(a))e.addValue(r,xh(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,xh(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Gg={current:null},Kg={current:!1},qg=typeof window<`u`;function Jg(){if(Kg.current=!0,qg)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Gg.current=e.matches;e.addEventListener(`change`,t),t()}else Gg.current=!1}var Yg=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Xg={};function Zg(e){Xg=e}function Qg(){return Xg}var $g=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=km,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=_f.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,df.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Hg(t),this.isVariantNode=Ug(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Eh(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Lg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Kg.current||Jg(),this.shouldReduceMotion=Gg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ff(this.notifyUpdate),ff(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Jm.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Hm({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Pd(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=gm.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&df.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Xg){let t=Xg[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ig()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Yg.length;t++){let n=Yg[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Wg(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=xh(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Td(n)||Dd(n))?n=parseFloat(n):!Mg(n)&&cp.test(t)&&(n=Gh(e,t)),this.setBaseTarget(e,Eh(n)?n.get():n)),Eh(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=mh(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Eh(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Nd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Yh.render(this.render)}},e_=class extends $g{constructor(){super(...arguments),this.KeyframeResolver=bee}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Eh(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},t_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function n_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function r_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function i_(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function a_(e){return e===void 0||e===1}function o_({scale:e,scaleX:t,scaleY:n}){return!a_(e)||!a_(t)||!a_(n)}function s_(e){return o_(e)||c_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function c_(e){return l_(e.x)||l_(e.y)}function l_(e){return e&&e!==`0%`}function u_(e,t,n){return n+t*(e-n)}function d_(e,t,n,r,i){return i!==void 0&&(e=u_(e,i,r)),u_(e,n,r)+t}function f_(e,t=0,n=1,r,i){e.min=d_(e.min,t,n,r,i),e.max=d_(e.max,t,n,r,i)}function p_(e,{x:t,y:n}){f_(e.x,t.translate,t.scale,t.originPoint),f_(e.y,n.translate,n.scale,n.originPoint)}var m_=.999999999999,h_=1.0000000000001;function See(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(g_(e.x,-a.scroll.offset.x),g_(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,p_(e,o)),r&&s_(a.latestValues)&&y_(e,a.latestValues,a.layout?.layoutBox))}t.x<h_&&t.x>m_&&(t.x=1),t.y<h_&&t.y>m_&&(t.y=1)}function g_(e,t){e.min+=t,e.max+=t}function __(e,t,n,r,i=.5){f_(e,t,n,fp(e.min,e.max,i),r)}function v_(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function y_(e,t,n){let r=n??e;__(e.x,v_(t.x,r.x),t.scaleX,t.scale,t.originX),__(e.y,v_(t.y,r.y),t.scaleY,t.scale,t.originY)}function b_(e,t){return n_(i_(e.getBoundingClientRect(),t))}function Cee(e,t,n){let r=b_(e,n),{scroll:i}=t;return i&&(g_(r.x,i.offset.x),g_(r.y,i.offset.y)),r}var wee={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Tee=hm.length;function Eee(e,t,n){let r=``,i=!0;for(let a=0;a<Tee;a++){let o=hm[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=qh(s,Uh[o]);if(!c){i=!1;let t=wee[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function x_(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(gm.has(e)){o=!0;continue}else if(bf(e)){i[e]=n;continue}else{let t=qh(n,Uh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Eee(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function S_(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function C_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var w_={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(q.test(e))e=parseFloat(e);else return e;return`${C_(e,t.target.x)}% ${C_(e,t.target.y)}%`}},Dee={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=cp.parse(e);if(i.length>5)return r;let a=cp.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=fp(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},T_={borderRadius:{...w_,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:w_,borderTopRightRadius:w_,borderBottomLeftRadius:w_,borderBottomRightRadius:w_,boxShadow:Dee};function E_(e,{layout:t,layoutId:n}){return gm.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!T_[e]||e===`opacity`)}function D_(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Eh(r[t])||i&&Eh(i[t])||E_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Oee(e){return window.getComputedStyle(e)}var kee=class extends e_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=S_}readValueFromInstance(e,t){if(gm.has(t))return this.projection?.isProjecting?dm(t):pm(e,t);{let n=Oee(e),r=(bf(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return b_(e,t)}build(e,t,n){x_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return D_(e,t,n)}},Aee={offset:`stroke-dashoffset`,array:`stroke-dasharray`},jee={offset:`strokeDashoffset`,array:`strokeDasharray`};function Mee(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Aee:jee;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Nee=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function O_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(x_(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Nee)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Mee(d,i,a,o,!1)}var k_=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),A_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Pee(e,t,n,r){S_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(k_.has(n)?n:kh(n),t.attrs[n])}function j_(e,t,n){let r=D_(e,t,n);for(let n in e)if(Eh(e[n])||Eh(t[n])){let t=hm.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var M_=class extends e_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Ig}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(gm.has(t)){let e=Wh(t);return e&&e.default||0}return t=k_.has(t)?t:kh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return j_(e,t,n)}build(e,t,n){O_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Pee(e,t,n,r)}mount(e){this.isSVGTag=A_(e.tagName),super.mount(e)}},N_=Vg.length;function P_(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&P_(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<N_;n++){let r=Vg[n],i=e.props[r];(zg(i)||i===!1)&&(t[r]=i)}return t}function F_(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var I_=[...Bg].reverse(),L_=Bg.length;function R_(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Ih(e,t,n)))}function z_(e){let t=R_(e),n=H_(),r=!0,i=!1,a=t=>(n,r)=>{let i=hh(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=P_(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<L_;t++){let p=I_[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=zg(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Rg(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=B_(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Sh(t)&&Sh(n)?!F_(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=hh(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=$m(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=hh(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=H_(),i=!0}}}function B_(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!F_(t,e):!1}function V_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function H_(){return{animate:V_(!0),whileInView:V_(),whileHover:V_(),whileTap:V_(),whileDrag:V_(),whileFocus:V_(),exit:V_()}}function U_(e,t){e.min=t.min,e.max=t.max}function W_(e,t){U_(e.x,t.x),U_(e.y,t.y)}function G_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var K_=1e-4,q_=1-K_,J_=1+K_,Y_=.01,X_=0-Y_,Z_=0+Y_;function Q_(e){return e.max-e.min}function $_(e,t,n){return Math.abs(e-t)<=n}function ev(e,t,n,r=.5){e.origin=r,e.originPoint=fp(t.min,t.max,e.origin),e.scale=Q_(n)/Q_(t),e.translate=fp(n.min,n.max,e.origin)-e.originPoint,(e.scale>=q_&&e.scale<=J_||isNaN(e.scale))&&(e.scale=1),(e.translate>=X_&&e.translate<=Z_||isNaN(e.translate))&&(e.translate=0)}function tv(e,t,n,r){ev(e.x,t.x,n.x,r?r.originX:void 0),ev(e.y,t.y,n.y,r?r.originY:void 0)}function nv(e,t,n,r=0){e.min=(r?fp(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q_(t)}function rv(e,t,n,r){nv(e.x,t.x,n.x,r?.x),nv(e.y,t.y,n.y,r?.y)}function iv(e,t,n,r=0){let i=r?fp(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q_(t)}function av(e,t,n,r){iv(e.x,t.x,n.x,r?.x),iv(e.y,t.y,n.y,r?.y)}function ov(e,t,n,r,i){return e-=t,e=u_(e,1/n,r),i!==void 0&&(e=u_(e,1/i,r)),e}function sv(e,t=0,n=1,r=.5,i,a=e,o=e){if(Vf.test(t)&&(t=parseFloat(t),t=fp(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=fp(a.min,a.max,r);e===a&&(s-=t),e.min=ov(e.min,t,n,s,i),e.max=ov(e.max,t,n,s,i)}function cv(e,t,[n,r,i],a,o){sv(e,t[n],t[r],t[i],t.scale,a,o)}var lv=[`x`,`scaleX`,`originX`],uv=[`y`,`scaleY`,`originY`];function dv(e,t,n,r){cv(e.x,t,lv,n?n.x:void 0,r?r.x:void 0),cv(e.y,t,uv,n?n.y:void 0,r?r.y:void 0)}function fv(e){return e.translate===0&&e.scale===1}function pv(e){return fv(e.x)&&fv(e.y)}function mv(e,t){return e.min===t.min&&e.max===t.max}function hv(e,t){return mv(e.x,t.x)&&mv(e.y,t.y)}function gv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _v(e,t){return gv(e.x,t.x)&&gv(e.y,t.y)}function vv(e){return Q_(e.x)/Q_(e.y)}function yv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function bv(e){return[e(`x`),e(`y`)]}function xv(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Sv=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Cv=Sv.length,wv=e=>typeof e==`string`?parseFloat(e):e,Tv=e=>typeof e==`number`||q.test(e);function Ev(e,t,n,r,i,a){i?(e.opacity=fp(0,n.opacity??1,Ov(r)),e.opacityExit=fp(t.opacity??1,0,kv(r))):a&&(e.opacity=fp(t.opacity??1,n.opacity??1,r));for(let i=0;i<Cv;i++){let a=Sv[i],o=Dv(t,a),s=Dv(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Tv(o)===Tv(s)?(e[a]=Math.max(fp(wv(o),wv(s),r),0),(Vf.test(s)||Vf.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=fp(t.rotate||0,n.rotate||0,r))}function Dv(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ov=Av(0,.5,Yd),kv=Av(.5,.95,kd);function Av(e,t,n){return r=>r<e?0:r>t?1:n(Md(e,t,r))}function jv(e,t,n){let r=Eh(e)?e:xh(e);return r.start(fh(``,r,t,n)),r.animation}function Mv(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Nv=(e,t)=>e.depth-t.depth,Pv=class{constructor(){this.children=[],this.isDirty=!1}add(e){xd(this.children,e),this.isDirty=!0}remove(e){Sd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nv),this.isDirty=!1,this.children.forEach(e)}};function Fv(e,t){let n=_f.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ff(r),e(a-t))};return df.setup(r,!0),()=>ff(r)}function Iv(e){return Eh(e)?e.get():e}var Lv=class{constructor(){this.members=[]}add(e){xd(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Sd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Sd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Rv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},zv={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bv=[``,`X`,`Y`,`Z`],Vv=1e3,Hv=0;function Uv(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Wv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=jh(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,df,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Wv(r)}function Gv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Hv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,sf.value&&(zv.nodes=zv.calculatedTargetDeltas=zv.calculatedProjections=0),this.nodes.forEach(Jv),this.nodes.forEach(ry),this.nodes.forEach(iy),this.nodes.forEach(Yv),sf.addProjectionMetrics&&sf.addProjectionMetrics(zv)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Nd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=hg(t)&&!Ag(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;df.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Fv(i,250),Rv.hasAnimatedSinceResize&&(Rv.hasAnimatedSinceResize=!1,this.nodes.forEach(ny)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||dy,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!_v(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...lh(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||ny(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ff(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ay),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Qv),this.nodes.forEach(Zv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($v);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ey),this.nodes.forEach(ty),this.nodes.forEach(Kv),this.nodes.forEach(qv)):this.nodes.forEach($v),this.clearAllSnapshots();let e=_f.now();pf.delta=Cd(0,1e3/60,e-pf.timestamp),pf.timestamp=e,pf.isProcessing=!0,mf.update.process(pf),mf.preRender.process(pf),mf.render.process(pf),pf.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xv),this.sharedNodes.forEach(oy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,df.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){df.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q_(this.snapshot.measuredBox.x)&&!Q_(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Ig(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pv(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||s_(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),hy(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Ig();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_y))){let{scroll:e}=this.root;e&&(g_(t.x,e.offset.x),g_(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Ig();if(W_(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&W_(t,e),g_(t.x,i.offset.x),g_(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Ig();W_(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(g_(r.x,-n.scroll.offset.x),g_(r.y,-n.scroll.offset.y)),s_(n.latestValues)&&y_(r,n.latestValues,n.layout?.layoutBox)}return s_(this.latestValues)&&y_(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Ig();W_(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!s_(n.latestValues))continue;let r;n.instance&&(o_(n.latestValues)&&n.updateSnapshot(),r=Ig(),W_(r,n.measurePageBox())),dv(t,n.latestValues,n.snapshot?.layoutBox,r)}return s_(this.latestValues)&&dv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pf.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=pf.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ig(),this.targetWithTransforms=Ig()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):W_(this.target,this.layout.layoutBox),p_(this.target,this.targetDelta)):W_(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),sf.value&&zv.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||o_(this.parent.latestValues)||c_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ig(),this.relativeTargetOrigin=Ig(),av(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),W_(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===pf.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;W_(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;See(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Ig());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(G_(this.prevProjectionDelta.x,this.projectionDelta.x),G_(this.prevProjectionDelta.y,this.projectionDelta.y)),tv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!yv(this.projectionDelta.x,this.prevProjectionDelta.x)||!yv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),sf.value&&zv.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pg(),this.projectionDelta=Pg(),this.projectionDeltaWithTransform=Pg()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Pg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Ig(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(uy));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;sy(a.x,e.x,n),sy(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(av(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ly(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&hv(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Ig(),W_(d,this.relativeTarget)),s&&(this.animationValues=i,Ev(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(ff(this.pendingAnimation),void 0),this.pendingAnimation=df.update(()=>{Rv.hasAnimatedSinceResize=!0,vf.layout++,this.motionValue||=xh(0),this.motionValue.jump(0,!1),this.currentAnimation=jv(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{vf.layout--},onComplete:()=>{vf.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&gy(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Ig();let t=Q_(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q_(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}W_(t,n),y_(t,i),tv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Lv),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Uv(`z`,e,r,this.animationValues);for(let t=0;t<Bv.length;t++)Uv(`rotate${Bv[t]}`,e,r,this.animationValues),Uv(`skew${Bv[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Iv(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Iv(t?.pointerEvents)||``),this.hasProjected&&!s_(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=xv(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in T_){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=T_[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Iv(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Zv),this.root.sharedNodes.clear()}}}function Kv(e){e.updateLayout()}function qv(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)bv(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q_(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;U_(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else gy(i,t.layoutBox,n)&&bv(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q_(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Pg();tv(o,n,t.layoutBox);let s=Pg();a?tv(s,e.applyTransform(r,!0),t.measuredBox):tv(s,n,t.layoutBox);let c=!pv(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Ig();av(s,t.layoutBox,i.layoutBox,o);let c=Ig();av(c,n,a.layoutBox,o),_v(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Jv(e){sf.value&&zv.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Yv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xv(e){e.clearSnapshot()}function Zv(e){e.clearMeasurements()}function Qv(e){e.isLayoutDirty=!0,e.updateLayout()}function $v(e){e.isLayoutDirty=!1}function ey(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ty(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ny(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ry(e){e.resolveTargetDelta()}function iy(e){e.calcProjection()}function ay(e){e.resetSkewAndRotation()}function oy(e){e.removeLeadSnapshot()}function sy(e,t,n){e.translate=fp(t.translate,0,n),e.scale=fp(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cy(e,t,n,r){e.min=fp(t.min,n.min,r),e.max=fp(t.max,n.max,r)}function ly(e,t,n,r){cy(e.x,t.x,n.x,r),cy(e.y,t.y,n.y,r)}function uy(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var dy={duration:.45,ease:[.4,0,.1,1]},fy=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),py=fy(`applewebkit/`)&&!fy(`chrome/`)?Math.round:kd;function my(e){e.min=py(e.min),e.max=py(e.max)}function hy(e){my(e.x),my(e.y)}function gy(e,t,n){return e===`position`||e===`preserve-aspect`&&!$_(vv(t),vv(n),.2)}function _y(e){return e!==e.root&&e.scroll?.wasRoot}var vy=Gv({attachResizeListener:(e,t)=>Mv(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),yy={current:void 0},by=Gv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!yy.current){let e=new vy({});e.mount(window),e.setOptions({layoutScroll:!0}),yy.current=e}return yy.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),xy=(0,z.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Sy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Cy(...e){return t=>{let n=!1,r=e.map(e=>{let r=Sy(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Sy(e[t],null)}}}}function wy(...e){return z.useCallback(Cy(...e),e)}var Ty=class extends z.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Jh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Jh(e)&&e.offsetWidth||0,r=Jh(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Ey({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,z.useId)(),s=(0,z.useRef)(null),c=(0,z.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,z.useContext)(xy),u=wy(s,e.props?.ref??e?.ref);return(0,z.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
19
|
+
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=No(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&ss.assertOptions(n,{silentJSONParsing:cs.transitional(cs.boolean),forcedJSONParsing:cs.transitional(cs.boolean),clarifyTimeoutError:cs.transitional(cs.boolean),legacyInterceptorReqResOrdering:cs.transitional(cs.boolean)},!1),r!=null&&(V.isFunction(r)?t.paramsSerializer={serialize:r}:ss.assertOptions(r,{encode:cs.function,serialize:cs.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),ss.assertOptions(t,{baseUrl:cs.spelling(`baseURL`),withXsrfToken:cs.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&V.merge(i.common,i[t.method]);i&&V.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=go.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Ba;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ns.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=ns.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=No(this.defaults,e),Ra(jo(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};V.forEach([`delete`,`get`,`head`,`options`],function(e){ls.prototype[e]=function(t,n){return this.request(No(n||{},{method:e,url:t,data:(n||{}).data}))}}),V.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(No(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}ls.prototype[e]=t(),ls.prototype[e+`Form`]=t(!0)});var us=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new yo(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function ds(e){return function(t){return e.apply(null,t)}}function fs(e){return V.isObject(e)&&e.isAxiosError===!0}var ps={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ps).forEach(([e,t])=>{ps[t]=e});function ms(e){let t=new ls(e),n=_i(ls.prototype.request,t);return V.extend(n,ls.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ms(No(e,t))},n}var hs=ms(to);hs.Axios=ls,hs.CanceledError=yo,hs.CancelToken=us,hs.isCancel=vo,hs.VERSION=rs,hs.toFormData=Na,hs.AxiosError=H,hs.Cancel=hs.CanceledError,hs.all=function(e){return Promise.all(e)},hs.spread=ds,hs.isAxiosError=fs,hs.mergeConfig=No,hs.AxiosHeaders=go,hs.formToJSON=e=>Qa(V.isHTMLForm(e)?new FormData(e):e),hs.getAdapter=es.getAdapter,hs.HttpStatusCode=ps,hs.default=hs;var gs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_s=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),vs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ys=e=>{let t=vs(e);return t.charAt(0).toUpperCase()+t.slice(1)},bs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},xs=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ss=(0,z.createContext)({}),Cs=()=>(0,z.useContext)(Ss),ws=(0,z.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Cs()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,z.createElement)(`svg`,{ref:c,...bs,width:t??l??bs.width,height:t??l??bs.height,stroke:e??f,strokeWidth:m,className:gs(`lucide`,p,i),...!a&&!xs(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,z.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),U=(e,t)=>{let n=(0,z.forwardRef)(({className:n,...r},i)=>(0,z.createElement)(ws,{ref:i,iconNode:t,className:gs(`lucide-${_s(ys(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ys(e),n},Ts=U(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Es=U(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ds=U(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Os=U(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ks=U(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),As=U(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),js=U(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ms=U(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Ns=U(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Ps=U(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Fs=U(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Is=U(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ls=U(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Rs=U(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),zs=U(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Bs=U(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Vs=U(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Hs=U(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Us=U(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ws=U(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Gs=U(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ks=U(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),qs=U(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Js=U(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ys=U(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Xs=U(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Zs=U(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),Qs=U(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),$s=U(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ec=U(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),tc=U(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),nc=U(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),rc=U(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ic=U(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ac=U(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),oc=U(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),sc=U(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),cc=U(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),lc=U(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),uc=U(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),dc=U(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),fc=U(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),pc=U(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),mc=U(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),hc=U(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),gc=U(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),_c=U(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),vc=U(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),yc=U(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),bc=U(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),xc=U(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Sc=U(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Cc=U(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),wc=U(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Tc=U(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ec=U(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Dc=U(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Oc=U(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),kc=U(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ac=U(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),jc=u(y(),1),Mc=u(_(),1),Nc=(0,z.createContext)({toast:()=>{}}),Pc=()=>{};function Fc(e,t=`error`){Pc(e,t)}function Ic({children:e}){let[t,n]=(0,z.useState)([]),r={current:0},i=(0,z.useCallback)((e,t=`error`)=>{let i=++r.current;n(n=>[...n,{id:i,type:t,message:e}]),setTimeout(()=>n(e=>e.filter(e=>e.id!==i)),4e3)},[]);(0,z.useEffect)(()=>{Pc=i},[i]);let a={success:zs,error:Bs,warning:Tc},o={success:`bg-green-50 border-green-200 text-green-800`,error:`bg-red-50 border-red-200 text-red-800`,warning:`bg-yellow-50 border-yellow-200 text-yellow-800`},s={success:`text-green-500`,error:`text-red-500`,warning:`text-yellow-500`};return(0,B.jsxs)(Nc.Provider,{value:{toast:i},children:[e,(0,Mc.createPortal)((0,B.jsx)(`div`,{className:`fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 max-w-sm`,children:t.map(e=>{let t=a[e.type];return(0,B.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-3 rounded-lg border shadow-lg text-sm ${o[e.type]}`,children:[(0,B.jsx)(t,{className:`h-4 w-4 mt-0.5 flex-shrink-0 ${s[e.type]}`}),(0,B.jsx)(`span`,{className:`flex-1`,children:e.message}),(0,B.jsx)(`button`,{onClick:()=>n(t=>t.filter(t=>t.id!==e.id)),children:(0,B.jsx)(kc,{className:`h-3.5 w-3.5 opacity-60 hover:opacity-100`})})]},e.id)})}),document.body)]})}var W=hs.create({baseURL:`/api`,timeout:3e4});W.interceptors.response.use(e=>e,e=>(Fc(e.response?.data?.error||e.response?.data?.message||e.message||`请求失败`,`error`),Promise.reject(e)));var Lc=()=>W.get(`/health`),Rc=()=>W.get(`/config`),zc=e=>W.put(`/config`,e),Bc=()=>W.get(`/config/history`),Vc=e=>W.get(`/sessions`,{params:e}),Hc=e=>W.get(`/sessions/${e}`),Uc=e=>W.delete(`/sessions/${e}`),Wc=e=>W.delete(`/sessions`,{data:{ids:e}}),Gc=e=>W.get(`/events`,{params:e}),Kc=e=>W.get(`/events/stats`,{params:{project_path:e}}),qc=e=>W.get(`/pipelines`,{params:e}),Jc=e=>W.get(`/pipelines/${e}`),Yc=e=>W.get(`/quality/history`,{params:e}),Xc=e=>W.get(`/quality/unresolved`,{params:{project_path:e}}),Zc=()=>W.get(`/stats/roi`),Qc=()=>W.get(`/stats/overview`),$c=(e,t)=>W.get(`/knowledge/search`,{params:{q:e,project_path:t}}),el=e=>W.get(`/knowledge/overview`,{params:{project_path:e}}),tl=(e,t)=>W.get(`/knowledge/neighbors`,{params:{node_id:e,project_path:t}}),nl=e=>W.get(`/knowledge/graph`,{params:{project_path:e}}),rl=e=>W.post(`/knowledge/nodes`,e),il=(e,t)=>W.put(`/knowledge/nodes/${e}`,t),al=e=>W.delete(`/knowledge/nodes/${e}`),ol=e=>W.post(`/pipelines/${e}/close`),sl=e=>W.post(`/pipelines/batch-close`,{ids:e}),cl=()=>W.post(`/pipelines/close-expired`),ll=()=>W.get(`/pipelines/active`),ul=(e,t)=>W.post(`/pipelines/tasks/${e}/status`,{status:t}),dl=e=>W.post(`/pipelines/${e}/resume`),fl=e=>W.get(`/projects`,{params:e}),pl=e=>W.get(`/projects/${e}`),ml=e=>W.delete(`/projects/${e}`),hl=e=>W.get(`/convention/${e}`),gl=(e,t,n,r)=>W.put(`/convention/${e}/${t}`,{name:n,content:r}),_l=(e,t)=>W.delete(`/convention/${e}/${t}`),vl=(e,t)=>W.post(`/convention/${e}/evolve`,{id:t}),yl=e=>W.post(`/convention/init`,{path:e},{timeout:18e4}),bl=e=>W.get(`/claudemd/${e}`),xl=(e,t)=>W.put(`/claudemd/${e}`,{content:t}),Sl=e=>W.get(`/claudemd/${e}/profile`),Cl=e=>W.get(`/claudemd/${e}/modules`),wl=e=>W.post(`/claudemd/${e}/distill`,void 0,{timeout:18e4}),Tl=e=>W.post(`/claudemd/${e}/init`,void 0,{timeout:18e4}),El=e=>W.post(`/quality/${e}/resolve`),Dl=e=>W.post(`/quality/${e}/dismiss`),Ol=()=>W.post(`/quality/resolve-all`),kl=e=>W.post(`/quality/${e}/auto-fix`,{},{timeout:6e4}),Al=()=>W.get(`/daemon/status`),jl=()=>W.post(`/daemon/restart`),Ml=()=>W.get(`/daemon/diagnose`),Nl=()=>W.post(`/daemon/repair`),Pl=()=>W.post(`/config/backup`),Fl=()=>W.get(`/config/backups`),Il=e=>W.post(`/events/purge`,{retentionDays:e}),Ll=e=>W.get(`/stats/api-usage`,{params:{days:e}});function Rl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function zl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rl(e))&&(r&&(r+=` `),r+=t);return r}var Bl=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vl=(e,t)=>({classGroupId:e,validator:t}),Hl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ul=`-`,Wl=[],Gl=`arbitrary..`,Kl=e=>{let t=Yl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Jl(e);let n=e.split(Ul);return ql(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Bl(i,t):t:i||Wl}return n[e]||Wl}}},ql=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ql(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ul):e.slice(t).join(Ul),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Jl=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Gl+r:void 0})(),Yl=e=>{let{theme:t,classGroups:n}=e;return Xl(n,t)},Xl=(e,t)=>{let n=Hl();for(let r in e){let i=e[r];Zl(i,n,r,t)}return n},Zl=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ql(i,t,n,r)}},Ql=(e,t,n,r)=>{if(typeof e==`string`){$l(e,t,n);return}if(typeof e==`function`){eu(e,t,n,r);return}tu(e,t,n,r)},$l=(e,t,n)=>{let r=e===``?t:nu(t,e);r.classGroupId=n},eu=(e,t,n,r)=>{if(ru(e)){Zl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vl(n,e))},tu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Zl(o,nu(t,a),n,r)}},nu=(e,t)=>{let n=e,r=t.split(Ul),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Hl(),n.nextPart.set(t,i)),n=i}return n},ru=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,iu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},au=`!`,ou=`:`,su=[],cu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ou){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(au)?(c=s.slice(0,-1),l=!0):s.startsWith(au)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cu(t,l,c,u)};if(t){let e=t+ou,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cu(su,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},uu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},du=e=>({cache:iu(e.cacheSize),parseClassName:lu(e),sortModifiers:uu(e),...Kl(e)}),fu=/\s+/,pu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(fu),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+au:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},mu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=hu(n))&&(i&&(i+=` `),i+=r);return i},hu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=hu(e[r]))&&(n&&(n+=` `),n+=t);return n},gu=(e,...t)=>{let n,r,i,a,o=o=>(n=du(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=pu(e,n);return i(e,a),a};return a=o,(...e)=>a(mu(...e))},_u=[],vu=e=>{let t=t=>t[e]||_u;return t.isThemeGetter=!0,t},yu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Su=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Du=e=>xu.test(e),Ou=e=>!!e&&!Number.isNaN(Number(e)),ku=e=>!!e&&Number.isInteger(Number(e)),Au=e=>e.endsWith(`%`)&&Ou(e.slice(0,-1)),ju=e=>Su.test(e),Mu=()=>!0,Nu=e=>Cu.test(e)&&!wu.test(e),Pu=()=>!1,Fu=e=>Tu.test(e),Iu=e=>Eu.test(e),Lu=e=>!G(e)&&!K(e),Ru=e=>$u(e,rd,Pu),G=e=>yu.test(e),zu=e=>$u(e,id,Nu),Bu=e=>$u(e,ad,Ou),Vu=e=>$u(e,sd,Mu),Hu=e=>$u(e,od,Pu),Uu=e=>$u(e,td,Pu),Wu=e=>$u(e,nd,Iu),Gu=e=>$u(e,cd,Fu),K=e=>bu.test(e),Ku=e=>ed(e,id),qu=e=>ed(e,od),Ju=e=>ed(e,td),Yu=e=>ed(e,rd),Xu=e=>ed(e,nd),Zu=e=>ed(e,cd,!0),Qu=e=>ed(e,sd,!0),$u=(e,t,n)=>{let r=yu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ed=(e,t,n=!1)=>{let r=bu.exec(e);return r?r[1]?t(r[1]):n:!1},td=e=>e===`position`||e===`percentage`,nd=e=>e===`image`||e===`url`,rd=e=>e===`length`||e===`size`||e===`bg-size`,id=e=>e===`length`,ad=e=>e===`number`,od=e=>e===`family-name`,sd=e=>e===`number`||e===`weight`,cd=e=>e===`shadow`,ld=gu(()=>{let e=vu(`color`),t=vu(`font`),n=vu(`text`),r=vu(`font-weight`),i=vu(`tracking`),a=vu(`leading`),o=vu(`breakpoint`),s=vu(`container`),c=vu(`spacing`),l=vu(`radius`),u=vu(`shadow`),d=vu(`inset-shadow`),f=vu(`text-shadow`),p=vu(`drop-shadow`),m=vu(`blur`),h=vu(`perspective`),g=vu(`aspect`),_=vu(`ease`),v=vu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[Du,`full`,`auto`,...w()],E=()=>[ku,`none`,`subgrid`,K,G],D=()=>[`auto`,{span:[`full`,ku,K,G]},ku,K,G],O=()=>[ku,`auto`,K,G],k=()=>[`auto`,`min`,`max`,`fr`,K,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Du,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[Du,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[Du,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,K,G],I=()=>[...b(),Ju,Uu,{position:[K,G]}],L=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Yu,Ru,{size:[K,G]}],ne=()=>[Au,Ku,zu],re=()=>[``,`none`,`full`,l,K,G],R=()=>[``,Ou,Ku,zu],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[Ou,Au,Ju,Uu],se=()=>[``,`none`,m,K,G],ce=()=>[`none`,Ou,K,G],le=()=>[`none`,Ou,K,G],ue=()=>[Ou,K,G],de=()=>[Du,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ju],breakpoint:[ju],color:[Mu],container:[ju],"drop-shadow":[ju],ease:[`in`,`out`,`in-out`],font:[Lu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ju],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ju],shadow:[ju],spacing:[`px`,Ou],text:[ju],"text-shadow":[ju],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Du,G,K,g]}],container:[`container`],columns:[{columns:[Ou,G,K,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ku,`auto`,K,G]}],basis:[{basis:[Du,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ou,Du,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,Ou,K,G]}],shrink:[{shrink:[``,Ou,K,G]}],order:[{order:[ku,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ku,zu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Qu,Vu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Au,G]}],"font-family":[{font:[qu,Hu,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,K,G]}],"line-clamp":[{"line-clamp":[Ou,`none`,K,Bu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ou,`from-font`,`auto`,K,zu]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ou,`auto`,K,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ku,K,G],radial:[``,K,G],conic:[ku,K,G]},Xu,Wu]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ou,K,G]}],"outline-w":[{outline:[``,Ou,Ku,zu]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Zu,Gu]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Zu,Gu]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ou,zu]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Zu,Gu]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ou,K,G]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Ou]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ou]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:se()}],brightness:[{brightness:[Ou,K,G]}],contrast:[{contrast:[Ou,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Zu,Gu]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Ou,K,G]}],"hue-rotate":[{"hue-rotate":[Ou,K,G]}],invert:[{invert:[``,Ou,K,G]}],saturate:[{saturate:[Ou,K,G]}],sepia:[{sepia:[``,Ou,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Ou,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[Ou,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ou,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ou,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,Ou,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[Ou,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[Ou,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ou,K,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ou,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[Ou,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,K,G]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Ou,Ku,zu,Bu]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function ud(...e){return ld(zl(e))}function dd(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60),i=Math.floor(r/24);return i>0?`${i}天${r%24}小时`:r>0?`${r}小时${n%60}分钟`:n>0?`${n}分钟${t%60}秒`:`${t}秒`}function fd(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function pd(e){let t={active:`text-green-600 bg-green-50`,completed:`text-blue-600 bg-blue-50`,failed:`text-red-600 bg-red-50`,interrupted:`text-yellow-600 bg-yellow-50`,pending:`text-gray-600 bg-gray-50`};return t[e]||t.pending}function md(e){return e?e.endsWith(`Z`)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e+`Z`):new Date}var hd=[{path:`/dashboard`,label:`仪表盘`,icon:ic},{path:`/projects`,label:`项目管理`,icon:$s},{path:`/sessions`,label:`会话管理`,icon:Ts},{path:`/events`,label:`事件流`,icon:Ms},{path:`/pipelines`,label:`流水线`,icon:tc},{path:`/quality`,label:`质量门禁`,icon:yc},{path:`/knowledge`,label:`知识图谱`,icon:js},{path:`/analytics`,label:`数据分析`,icon:Ns},{path:`/config`,label:`系统配置`,icon:vc}];function gd({children:e}){let[t,n]=(0,z.useState)(()=>localStorage.getItem(`sidebar-collapsed`)===`true`),r=jn();(0,z.useEffect)(()=>{localStorage.setItem(`sidebar-collapsed`,String(t))},[t]);let{data:i}=ct({queryKey:[`health`],queryFn:()=>Lc().then(e=>e.data),refetchInterval:15e3}),a=hd.find(e=>r.pathname.startsWith(e.path));return(0,B.jsxs)(`div`,{className:`flex min-h-screen bg-gray-50`,children:[(0,B.jsxs)(`aside`,{className:ud(`fixed top-0 left-0 bottom-0 z-50 flex flex-col transition-all duration-300`,`bg-gradient-to-b from-slate-900 to-slate-800`,t?`w-16`:`w-60`),children:[(0,B.jsxs)(`div`,{className:ud(`flex items-center border-b border-white/10 h-16`,t?`justify-center px-2`:`justify-between px-5`),children:[!t&&(0,B.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-purple-600`,children:(0,B.jsx)(Ac,{className:`h-5 w-5 text-white`})}),(0,B.jsx)(`span`,{className:`text-white font-bold text-lg tracking-tight`,children:`Forge`})]}),(0,B.jsx)(`button`,{onClick:()=>n(!t),className:`p-1.5 rounded-lg text-white/60 hover:text-white hover:bg-white/10 transition-colors`,children:t?(0,B.jsx)(oc,{className:`h-5 w-5`}):(0,B.jsx)(Is,{className:`h-5 w-5`})})]}),(0,B.jsx)(`nav`,{className:`flex-1 py-4 space-y-1 px-2`,children:hd.map(e=>(0,B.jsxs)(ei,{to:e.path,className:({isActive:e})=>ud(`flex items-center gap-3 rounded-lg transition-all duration-200`,t?`justify-center p-3`:`px-3 py-2.5`,e?`bg-blue-600/20 text-blue-400`:`text-white/60 hover:text-white hover:bg-white/5`),children:[(0,B.jsx)(e.icon,{className:`h-5 w-5 flex-shrink-0`}),!t&&(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:e.label})]},e.path))}),(0,B.jsx)(`div`,{className:ud(`border-t border-white/10 py-4`,t?`px-2`:`px-5`),children:(0,B.jsxs)(`div`,{className:ud(`flex items-center gap-2`,t?`justify-center`:``),children:[(0,B.jsx)(`div`,{className:ud(`w-2 h-2 rounded-full`,i?.status===`ok`?`bg-green-400 animate-pulse`:`bg-red-400`)}),!t&&(0,B.jsx)(`span`,{className:`text-xs text-white/40`,children:i?.status===`ok`?`Daemon 运行中`:`连接断开`})]})})]}),(0,B.jsxs)(`main`,{className:ud(`flex-1 transition-all duration-300`,t?`ml-16`:`ml-60`),children:[(0,B.jsxs)(`header`,{className:`sticky top-0 z-40 bg-white/80 backdrop-blur-md border-b border-gray-200/50 h-16 flex items-center justify-between px-8`,children:[(0,B.jsx)(`h1`,{className:`text-xl font-semibold text-gray-900`,children:a?.label||`Claude Forge`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsxs)(`button`,{className:`hidden sm:flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors`,onClick:()=>{let e=new KeyboardEvent(`keydown`,{key:`k`,metaKey:!0});window.dispatchEvent(e)},children:[(0,B.jsx)(Ws,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{children:`命令面板`}),(0,B.jsx)(`kbd`,{className:`px-2 py-0.5 text-xs bg-gray-100 rounded border border-gray-200`,children:`⌘K`})]}),(0,B.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`v`,`1.23.3`]}),(0,B.jsxs)(`div`,{className:ud(`flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-semibold`,i?.status===`ok`?`bg-green-50 text-green-700 border border-green-200`:`bg-red-50 text-red-700 border border-red-200`),children:[(0,B.jsx)(`div`,{className:ud(`w-1.5 h-1.5 rounded-full`,i?.status===`ok`?`bg-green-500`:`bg-red-500`)}),i?.status===`ok`?`在线`:`离线`]})]})]}),(0,B.jsx)(`div`,{className:`p-8`,children:e})]})]})}var _d=(0,z.createContext)({});function vd(e){let t=(0,z.useRef)(null);return t.current===null&&(t.current=e()),t.current}var yd=typeof window<`u`?z.useLayoutEffect:z.useEffect,bd=(0,z.createContext)(null);function xd(e,t){e.indexOf(t)===-1&&e.push(t)}function Sd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Cd=(e,t,n)=>n>t?t:n<e?e:n,wd={},Td=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ed(e){return typeof e==`object`&&!!e}var Dd=e=>/^0[^.\s]+$/u.test(e);function Od(e){let t;return()=>(t===void 0&&(t=e()),t)}var kd=e=>e,Ad=(e,t)=>n=>t(e(n)),jd=(...e)=>e.reduce(Ad),Md=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Nd=class{constructor(){this.subscriptions=[]}add(e){return xd(this.subscriptions,e),()=>Sd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Pd=e=>e*1e3,Fd=e=>e/1e3;function Id(e,t){return t?1e3/t*e:0}var Ld=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Rd=1e-7,zd=12;function Bd(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ld(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Rd&&++s<zd);return o}function Vd(e,t,n,r){if(e===t&&n===r)return kd;let i=t=>Bd(t,0,1,e,n);return e=>e===0||e===1?e:Ld(i(e),t,r)}var Hd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ud=e=>t=>1-e(1-t),Wd=Vd(.33,1.53,.69,.99),Gd=Ud(Wd),Kd=Hd(Gd),qd=e=>e>=1?1:(e*=2)<1?.5*Gd(e):.5*(2-2**(-10*(e-1))),Jd=e=>1-Math.sin(Math.acos(e)),Yd=Ud(Jd),Xd=Hd(Jd),Zd=Vd(.42,0,1,1),Qd=Vd(0,0,.58,1),$d=Vd(.42,0,.58,1),ef=e=>Array.isArray(e)&&typeof e[0]!=`number`,tf=e=>Array.isArray(e)&&typeof e[0]==`number`,nf={linear:kd,easeIn:Zd,easeInOut:$d,easeOut:Qd,circIn:Jd,circInOut:Xd,circOut:Yd,backIn:Gd,backInOut:Kd,backOut:Wd,anticipate:qd},rf=e=>typeof e==`string`,af=e=>{if(tf(e)){e.length;let[t,n,r,i]=e;return Vd(t,n,r,i)}else if(rf(e))return nf[e],`${e}`,nf[e];return e},of=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],sf={value:null,addProjectionMetrics:null};function cf(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&sf.value&&sf.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var lf=40;function uf(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=of.reduce((e,n)=>(e[n]=cf(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=wd.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,lf),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:of.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<of.length;t++)o[of[t]].cancel(e)},state:i,steps:o}}var{schedule:df,cancel:ff,state:pf,steps:mf}=uf(typeof requestAnimationFrame<`u`?requestAnimationFrame:kd,!0),hf;function gf(){hf=void 0}var _f={now:()=>(hf===void 0&&_f.set(pf.isProcessing||wd.useManualTiming?pf.timestamp:performance.now()),hf),set:e=>{hf=e,queueMicrotask(gf)}},vf={layout:0,mainThread:0,waapi:0},yf=e=>t=>typeof t==`string`&&t.startsWith(e),bf=yf(`--`),xf=yf(`var(--`),Sf=e=>xf(e)?Cf.test(e.split(`/*`)[0].trim()):!1,Cf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wf(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Tf={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ef={...Tf,transform:e=>Cd(0,1,e)},Df={...Tf,default:1},Of=e=>Math.round(e*1e5)/1e5,kf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Af(e){return e==null}var jf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mf=(e,t)=>n=>!!(typeof n==`string`&&jf.test(n)&&n.startsWith(e)||t&&!Af(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(kf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Pf=e=>Cd(0,255,e),Ff={...Tf,transform:e=>Math.round(Pf(e))},If={test:Mf(`rgb`,`red`),parse:Nf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ff.transform(e)+`, `+Ff.transform(t)+`, `+Ff.transform(n)+`, `+Of(Ef.transform(r))+`)`};function Lf(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Rf={test:Mf(`#`),parse:Lf,transform:If.transform},zf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bf=zf(`deg`),Vf=zf(`%`),q=zf(`px`),Hf=zf(`vh`),Uf=zf(`vw`),Wf={...Vf,parse:e=>Vf.parse(e)/100,transform:e=>Vf.transform(e*100)},Gf={test:Mf(`hsl`,`hue`),parse:Nf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Vf.transform(Of(t))+`, `+Vf.transform(Of(n))+`, `+Of(Ef.transform(r))+`)`},Kf={test:e=>If.test(e)||Rf.test(e)||Gf.test(e),parse:e=>If.test(e)?If.parse(e):Gf.test(e)?Gf.parse(e):Rf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?If.transform(e):Gf.transform(e),getAnimatableNone:e=>{let t=Kf.parse(e);return t.alpha=0,Kf.transform(t)}},qf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jf(e){return isNaN(e)&&typeof e==`string`&&(e.match(kf)?.length||0)+(e.match(qf)?.length||0)>0}var Yf=`number`,Xf=`color`,Zf=`var`,Qf=`var(`,$f="${}",ep=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tp(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ep,e=>(Kf.test(e)?(r.color.push(a),i.push(Xf),n.push(Kf.parse(e))):e.startsWith(Qf)?(r.var.push(a),i.push(Zf),n.push(e)):(r.number.push(a),i.push(Yf),n.push(parseFloat(e))),++a,$f)).split($f),indexes:r,types:i}}function np(e){return tp(e).values}function rp({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Yf?i+=Of(r[a]):e===Xf?i+=Kf.transform(r[a]):i+=r[a]}return i}}function ip(e){return rp(tp(e))}var ap=e=>typeof e==`number`?0:Kf.test(e)?Kf.getAnimatableNone(e):e,op=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ap(e);function sp(e){let t=tp(e);return rp(t)(t.values.map((e,n)=>op(e,t.split[n])))}var cp={test:Jf,parse:np,createTransformer:ip,getAnimatableNone:sp};function lp(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function up({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=lp(s,r,e+1/3),a=lp(s,r,e),o=lp(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function dp(e,t){return n=>n>0?t:e}var fp=(e,t,n)=>e+(t-e)*n,pp=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},mp=[Rf,If,Gf],hp=e=>mp.find(t=>t.test(e));function gp(e){let t=hp(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Gf&&(n=up(n)),n}var _p=(e,t)=>{let n=gp(e),r=gp(t);if(!n||!r)return dp(e,t);let i={...n};return e=>(i.red=pp(n.red,r.red,e),i.green=pp(n.green,r.green,e),i.blue=pp(n.blue,r.blue,e),i.alpha=fp(n.alpha,r.alpha,e),If.transform(i))},vp=new Set([`none`,`hidden`]);function yp(e,t){return vp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bp(e,t){return n=>fp(e,t,n)}function xp(e){return typeof e==`number`?bp:typeof e==`string`?Sf(e)?dp:Kf.test(e)?_p:Tp:Array.isArray(e)?Sp:typeof e==`object`?Kf.test(e)?_p:Cp:dp}function Sp(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>xp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Cp(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function wp(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Tp=(e,t)=>{let n=cp.createTransformer(t),r=tp(e),i=tp(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?vp.has(e)&&!i.values.length||vp.has(t)&&!r.values.length?yp(e,t):jd(Sp(wp(r,i),i.values),n):(`${e}${t}`,dp(e,t))};function Ep(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?fp(e,t,n):xp(e)(e,t)}var Dp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>df.update(t,e),stop:()=>ff(t),now:()=>pf.isProcessing?pf.timestamp:_f.now()}},Op=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},kp=2e4;function Ap(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function jp(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Ap(r),kp);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Fd(i)}}var Mp={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Np(e,t){return e*Math.sqrt(1-t*t)}var Pp=12;function Fp(e,t,n){let r=n;for(let n=1;n<Pp;n++)r-=e(r)/t(r);return r}var Ip=.001;function Lp({duration:e=Mp.duration,bounce:t=Mp.bounce,velocity:n=Mp.velocity,mass:r=Mp.mass}){let i,a;Mp.maxDuration;let o=1-t;o=Cd(Mp.minDamping,Mp.maxDamping,o),e=Cd(Mp.minDuration,Mp.maxDuration,Fd(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Np(t,o),c=Math.exp(-i);return Ip-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Np(t**2,o);return(-i(t)+Ip>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ip+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Fp(i,a,s);if(e=Pd(e),isNaN(c))return{stiffness:Mp.stiffness,damping:Mp.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Rp=[`duration`,`bounce`],zp=[`stiffness`,`damping`,`mass`];function Bp(e,t){return t.some(t=>e[t]!==void 0)}function Vp(e){let t={velocity:Mp.velocity,stiffness:Mp.stiffness,damping:Mp.damping,mass:Mp.mass,isResolvedFromDuration:!1,...e};if(!Bp(e,zp)&&Bp(e,Rp))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Cd(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Mp.mass,stiffness:i,damping:a}}else{let n=Lp({...e,velocity:0});t={...t,...n,mass:Mp.mass},t.isResolvedFromDuration=!0}return t}function Hp(e=Mp.visualDuration,t=Mp.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Vp({...n,velocity:-Fd(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Fd(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Mp.restSpeed.granular:Mp.restSpeed.default,i||=v?Mp.restDelta.granular:Mp.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Np(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>Pd(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=Pd(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=Pd(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Ap(T),kp),t=Op(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Hp.applyToOptions=e=>{let t=jp(e,100,Hp);return e.ease=t.ease,e.duration=Pd(t.duration),e.type=`keyframes`,e};var Up=5;function Wp(e,t,n){let r=Math.max(t-Up,0);return Id(n-e(r),t-r)}function Gp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Hp({keyframes:[f.value,m(f.value)],velocity:Wp(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function eee(e,t,n){let r=[],i=n||wd.mix||Ep,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=jd(Array.isArray(t)?t[n]||kd:t,a)),r.push(a)}return r}function tee(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=eee(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Md(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Cd(e[0],e[a-1],t)):l}function Kp(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Md(0,t,r);e.push(fp(n,1,i))}}function qp(e){let t=[0];return Kp(t,e.length-1),t}function Jp(e,t){return e.map(e=>e*t)}function Yp(e,t){return e.map(()=>t||$d).splice(0,e.length-1)}function Xp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ef(r)?r.map(af):af(r),a={done:!1,value:t[0]},o=tee(Jp(n&&n.length===t.length?n:qp(t),e),t,{ease:Array.isArray(i)?i:Yp(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var nee=e=>e!==null;function Zp(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(nee),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Qp={decay:Gp,inertia:Gp,tween:Xp,keyframes:Xp,spring:Hp};function $p(e){typeof e.type==`string`&&(e.type=Qp[e.type])}var em=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},tm=e=>e/100,nm=class extends em{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==_f.now()&&this.tick(_f.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},vf.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;$p(e);let{type:t=Xp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xp;s!==Xp&&typeof o[0]!=`number`&&(this.mixKeyframes=jd(tm,Ep(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ap(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Cd(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Gp&&(b.value=Zp(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Fd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Fd(e)}get time(){return Fd(this.currentTime)}set time(e){e=Pd(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Wp(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(_f.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Fd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Dp,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(_f.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,vf.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function rm(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var im=e=>e*180/Math.PI,am=e=>om(im(Math.atan2(e[1],e[0]))),ree={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:am,rotateZ:am,skewX:e=>im(Math.atan(e[1])),skewY:e=>im(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},om=e=>(e%=360,e<0&&(e+=360),e),sm=am,cm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),um={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cm,scaleY:lm,scale:e=>(cm(e)+lm(e))/2,rotateX:e=>om(im(Math.atan2(e[6],e[5]))),rotateY:e=>om(im(Math.atan2(-e[2],e[0]))),rotateZ:sm,rotate:sm,skewX:e=>im(Math.atan(e[4])),skewY:e=>im(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dm(e){return+!!e.includes(`scale`)}function fm(e,t){if(!e||e===`none`)return dm(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=um,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ree,i=t}if(!i)return dm(t);let a=r[t],o=i[1].split(`,`).map(mm);return typeof a==`function`?a(o):o[a]}var pm=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return fm(n,t)};function mm(e){return parseFloat(e.trim())}var hm=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],gm=new Set(hm),_m=e=>e===Tf||e===q,vm=new Set([`x`,`y`,`z`]),ym=hm.filter(e=>!vm.has(e));function bm(e){let t=[];return ym.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var xm={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fm(t,`x`),y:(e,{transform:t})=>fm(t,`y`)};xm.translateX=xm.x,xm.translateY=xm.y;var Sm=new Set,Cm=!1,wm=!1,Tm=!1;function Em(){if(wm){let e=Array.from(Sm).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=bm(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}wm=!1,Cm=!1,Sm.forEach(e=>e.complete(Tm)),Sm.clear()}function Dm(){Sm.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wm=!0)})}function Om(){Tm=!0,Dm(),Em(),Tm=!1}var km=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Sm.add(this),Cm||(Cm=!0,df.read(Dm),df.resolveKeyframes(Em))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}rm(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Sm.delete(this)}cancel(){this.state===`scheduled`&&(Sm.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Am=e=>e.startsWith(`--`);function jm(e,t,n){Am(t)?e.style.setProperty(t,n):e.style[t]=n}var Mm={};function Nm(e,t){let n=Od(e);return()=>Mm[t]??n()}var Pm=Nm(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Fm=Nm(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Im=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lm={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Im([0,.65,.55,1]),circOut:Im([.55,0,1,.45]),backIn:Im([.31,.01,.66,-.59]),backOut:Im([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e==`function`?Fm()?Op(e,t):`ease-out`:tf(e)?Im(e):Array.isArray(e)?e.map(e=>Rm(e,t)||Lm.easeOut):Lm[e]}function zm(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Rm(s,i);Array.isArray(d)&&(u.easing=d),sf.value&&vf.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return sf.value&&p.finished.finally(()=>{vf.waapi--}),p}function Bm(e){return typeof e==`function`&&`applyToOptions`in e}function Vm({type:e,...t}){return Bm(e)&&Fm()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Hm=class extends em{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Vm(e);this.animation=zm(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Zp(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jm(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Fd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Fd(e)}get time(){return Fd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pd(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Pm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),kd):r(this)}},Um={anticipate:qd,backInOut:Kd,circInOut:Xd};function Wm(e){return e in Um}function iee(e){typeof e.ease==`string`&&Wm(e.ease)&&(e.ease=Um[e.ease])}var Gm=10,aee=class extends Hm{constructor(e){iee(e),$p(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new nm({...a,autoplay:!1}),s=Math.max(Gm,_f.now()-this.startTime),c=Cd(0,Gm,s-Gm),l=o.sample(s).value,{name:u}=this.options;i&&u&&jm(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Km=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(cp.test(e)||e===`0`)&&!e.startsWith(`url(`));function oee(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function see(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Km(i,t),s=Km(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:oee(e)||(n===`spring`||Bm(n))&&r}function qm(e){e.duration=0,e.type=`keyframes`}var Jm=new Set([`opacity`,`clipPath`,`filter`,`transform`]),cee=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lee(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&cee.test(e[t]))return!0;return!1}var uee=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Ym=Od(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Xm(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Ym()&&n&&(Jm.has(n)||uee.has(n)&&lee(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Zm=40,Qm=class extends em{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_f.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||km)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=_f.now();let u=!0;see(e,i,a,o)||(u=!1,(wd.instantAnimations||!s)&&l?.(Zp(e,n,t)),e[0]=e[e.length-1],qm(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Zm?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Xm(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new aee({...d,element:p})}catch{m=new nm(d)}else m=new nm(d);m.finished.then(()=>{this.notifyFinished()}).catch(kd),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Om()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function $m(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var eh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function th(e){let t=eh.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function nh(e,t,n=1){`${e}`;let[r,i]=th(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Td(e)?parseFloat(e):e}return Sf(i)?nh(i,t,n+1):i}var rh={type:`spring`,stiffness:500,damping:25,restSpeed:10},ih=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ah={type:`keyframes`,duration:.8},oh={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},sh=(e,{keyframes:t})=>t.length>2?ah:gm.has(e)?e.startsWith(`scale`)?ih(t[1]):rh:oh;function ch(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function lh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:ch(n,e)}var uh=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function dh(e){for(let t in e)if(!uh.has(t))return!0;return!1}var fh=(e,t,n,r={},i,a)=>o=>{let s=lh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Pd(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};dh(s)||Object.assign(u,sh(e,u)),u.duration&&=Pd(u.duration),u.repeatDelay&&=Pd(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(qm(u),u.delay===0&&(d=!0)),(wd.instantAnimations||wd.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,qm(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Zp(u.keyframes,s);if(e!==void 0){df.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new nm(u):new Qm(u)};function ph(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function mh(e,t,n,r){if(typeof t==`function`){let[i,a]=ph(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ph(r);t=t(n===void 0?e.custom:n,i,a)}return t}function hh(e,t,n){let r=e.getProps();return mh(r,t,n===void 0?r.custom:n,e)}var gh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...hm]),_h=30,vh=e=>!isNaN(parseFloat(e)),yh={current:void 0},bh=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=_f.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=_f.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=vh(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Nd);let n=this.events[e].add(t);return e===`change`?()=>{n(),df.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return yh.current&&yh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=_f.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>_h)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,_h);return Id(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function xh(e,t){return new bh(e,t)}var Sh=e=>Array.isArray(e);function Ch(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xh(n))}function wh(e){return Sh(e)?e[e.length-1]||0:e}function Th(e,t){let{transitionEnd:n={},transition:r={},...i}=hh(e,t)||{};i={...i,...n};for(let t in i)Ch(e,t,wh(i[t]))}var Eh=e=>!!(e&&e.getVelocity);function Dh(e){return!!(Eh(e)&&e.add)}function Oh(e,t){let n=e.getValue(`willChange`);if(Dh(n))return n.add(t);if(!n&&wd.WillChange){let n=new wd.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function kh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ah=`data-`+kh(`framerAppearId`);function jh(e){return e.props[Ah]}function Mh({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?ch(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Mh(d,t))continue;let o={delay:n,...lh(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){df.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=jh(e);if(n){let e=window.MotionHandoffAnimation(n,t,df);e!==null&&(o.startTime=e,f=!0)}}Oh(e,t);let p=l??e.shouldReduceMotion;r.start(fh(t,r,i,p&&gh.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>df.update(()=>{o&&Th(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Ph(e,t,n={}){let r=hh(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Nh(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Fh(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Fh(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Ph(c,t,{...o,delay:n+(typeof r==`function`?0:r)+$m(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Ih(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Ph(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Ph(e,t,n);else{let i=typeof t==`function`?hh(e,t,n.custom):t;r=Promise.all(Nh(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var dee={test:e=>e===`auto`,parse:e=>e},Lh=e=>t=>t.test(e),Rh=[Tf,q,Vf,Bf,Uf,Hf,dee],zh=e=>Rh.find(Lh(e));function fee(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Dd(e)}var pee=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function mee(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(kf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!pee.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var hee=/\b([a-z-]*)\(.*?\)/gu,Bh={...cp,getAnimatableNone:e=>{let t=e.match(hee);return t?t.map(mee).join(` `):e}},Vh={...cp,getAnimatableNone:e=>{let t=cp.parse(e);return cp.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Hh={...Tf,transform:Math.round},Uh={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,rotate:Bf,rotateX:Bf,rotateY:Bf,rotateZ:Bf,scale:Df,scaleX:Df,scaleY:Df,scaleZ:Df,skew:Bf,skewX:Bf,skewY:Bf,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ef,originX:Wf,originY:Wf,originZ:q,zIndex:Hh,fillOpacity:Ef,strokeOpacity:Ef,numOctaves:Hh},gee={...Uh,color:Kf,backgroundColor:Kf,outlineColor:Kf,fill:Kf,stroke:Kf,borderColor:Kf,borderTopColor:Kf,borderRightColor:Kf,borderBottomColor:Kf,borderLeftColor:Kf,filter:Bh,WebkitFilter:Bh,mask:Vh,WebkitMask:Vh},Wh=e=>gee[e],_ee=new Set([Bh,Vh]);function Gh(e,t){let n=Wh(e);return _ee.has(n)||(n=cp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var vee=new Set([`auto`,`none`,`0`]);function yee(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!vee.has(t)&&tp(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Gh(n,i)}var bee=class extends km{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Sf(r))){let i=nh(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!gh.has(n)||e.length!==2)return;let[r,i]=e,a=zh(r),o=zh(i);if(wf(r)!==wf(i)&&xm[n]){this.needsMeasurement=!0;return}if(a!==o)if(_m(a)&&_m(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else xm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||fee(e[t]))&&n.push(t);n.length&&yee(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xm[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=xm[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Kh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var qh=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Jh(e){return Ed(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Yh,cancel:xee}=uf(queueMicrotask,!1),Xh={x:!1,y:!1};function Zh(){return Xh.x||Xh.y}function Qh(e){return e===`x`||e===`y`?Xh[e]?null:(Xh[e]=!0,()=>{Xh[e]=!1}):Xh.x||Xh.y?null:(Xh.x=Xh.y=!0,()=>{Xh.x=Xh.y=!1})}function $h(e,t){let n=Kh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function eg(e){return!(e.pointerType===`touch`||Zh())}function tg(e,t,n={}){let[r,i,a]=$h(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!eg(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ng=(e,t)=>t?e===t?!0:ng(e,t.parentElement):!1,rg=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ig=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ag(e){return ig.has(e.tagName)||e.isContentEditable===!0}var og=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function sg(e){return og.has(e.tagName)||e.isContentEditable===!0}var cg=new WeakSet;function lg(e){return t=>{t.key===`Enter`&&e(t)}}function ug(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var dg=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=lg(()=>{if(cg.has(n))return;ug(n,`down`);let e=lg(()=>{ug(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ug(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function fg(e){return rg(e)&&!Zh()}var pg=new WeakSet;function mg(e,t,n={}){let[r,i,a]=$h(e,n),o=e=>{let r=e.currentTarget;if(!fg(e)||pg.has(e))return;cg.add(r),n.stopPropagation&&pg.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),cg.has(r)&&cg.delete(r),fg(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ng(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Jh(e)&&(e.addEventListener(`focus`,e=>dg(e,i)),!ag(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function hg(e){return Ed(e)&&`ownerSVGElement`in e}var gg=new WeakMap,_g,vg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:hg(r)&&`getBBox`in r?r.getBBox()[t]:r[n],yg=vg(`inline`,`width`,`offsetWidth`),bg=vg(`block`,`height`,`offsetHeight`);function xg({target:e,borderBoxSize:t}){gg.get(e)?.forEach(n=>{n(e,{get width(){return yg(e,t)},get height(){return bg(e,t)}})})}function Sg(e){e.forEach(xg)}function Cg(){typeof ResizeObserver>`u`||(_g=new ResizeObserver(Sg))}function wg(e,t){_g||Cg();let n=Kh(e);return n.forEach(e=>{let n=gg.get(e);n||(n=new Set,gg.set(e,n)),n.add(t),_g?.observe(e)}),()=>{n.forEach(e=>{let n=gg.get(e);n?.delete(t),n?.size||_g?.unobserve(e)})}}var Tg=new Set,Eg;function Dg(){Eg=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tg.forEach(t=>t(e))},window.addEventListener(`resize`,Eg)}function Og(e){return Tg.add(e),Eg||Dg(),()=>{Tg.delete(e),!Tg.size&&typeof Eg==`function`&&(window.removeEventListener(`resize`,Eg),Eg=void 0)}}function kg(e,t){return typeof e==`function`?Og(e):wg(e,t)}function Ag(e){return hg(e)&&e.tagName===`svg`}var jg=[...Rh,Kf,cp],Mg=e=>jg.find(Lh(e)),Ng=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pg=()=>({x:Ng(),y:Ng()}),Fg=()=>({min:0,max:0}),Ig=()=>({x:Fg(),y:Fg()}),Lg=new WeakMap;function Rg(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function zg(e){return typeof e==`string`||Array.isArray(e)}var Bg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Vg=[`initial`,...Bg];function Hg(e){return Rg(e.animate)||Vg.some(t=>zg(e[t]))}function Ug(e){return!!(Hg(e)||e.variants)}function Wg(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Eh(i))e.addValue(r,i);else if(Eh(a))e.addValue(r,xh(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,xh(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Gg={current:null},Kg={current:!1},qg=typeof window<`u`;function Jg(){if(Kg.current=!0,qg)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Gg.current=e.matches;e.addEventListener(`change`,t),t()}else Gg.current=!1}var Yg=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Xg={};function Zg(e){Xg=e}function Qg(){return Xg}var $g=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=km,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=_f.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,df.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Hg(t),this.isVariantNode=Ug(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Eh(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Lg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Kg.current||Jg(),this.shouldReduceMotion=Gg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ff(this.notifyUpdate),ff(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Jm.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Hm({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Pd(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=gm.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&df.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Xg){let t=Xg[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ig()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Yg.length;t++){let n=Yg[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Wg(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=xh(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Td(n)||Dd(n))?n=parseFloat(n):!Mg(n)&&cp.test(t)&&(n=Gh(e,t)),this.setBaseTarget(e,Eh(n)?n.get():n)),Eh(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=mh(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Eh(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Nd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Yh.render(this.render)}},e_=class extends $g{constructor(){super(...arguments),this.KeyframeResolver=bee}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Eh(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},t_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function n_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function r_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function i_(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function a_(e){return e===void 0||e===1}function o_({scale:e,scaleX:t,scaleY:n}){return!a_(e)||!a_(t)||!a_(n)}function s_(e){return o_(e)||c_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function c_(e){return l_(e.x)||l_(e.y)}function l_(e){return e&&e!==`0%`}function u_(e,t,n){return n+t*(e-n)}function d_(e,t,n,r,i){return i!==void 0&&(e=u_(e,i,r)),u_(e,n,r)+t}function f_(e,t=0,n=1,r,i){e.min=d_(e.min,t,n,r,i),e.max=d_(e.max,t,n,r,i)}function p_(e,{x:t,y:n}){f_(e.x,t.translate,t.scale,t.originPoint),f_(e.y,n.translate,n.scale,n.originPoint)}var m_=.999999999999,h_=1.0000000000001;function See(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(g_(e.x,-a.scroll.offset.x),g_(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,p_(e,o)),r&&s_(a.latestValues)&&y_(e,a.latestValues,a.layout?.layoutBox))}t.x<h_&&t.x>m_&&(t.x=1),t.y<h_&&t.y>m_&&(t.y=1)}function g_(e,t){e.min+=t,e.max+=t}function __(e,t,n,r,i=.5){f_(e,t,n,fp(e.min,e.max,i),r)}function v_(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function y_(e,t,n){let r=n??e;__(e.x,v_(t.x,r.x),t.scaleX,t.scale,t.originX),__(e.y,v_(t.y,r.y),t.scaleY,t.scale,t.originY)}function b_(e,t){return n_(i_(e.getBoundingClientRect(),t))}function Cee(e,t,n){let r=b_(e,n),{scroll:i}=t;return i&&(g_(r.x,i.offset.x),g_(r.y,i.offset.y)),r}var wee={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Tee=hm.length;function Eee(e,t,n){let r=``,i=!0;for(let a=0;a<Tee;a++){let o=hm[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=qh(s,Uh[o]);if(!c){i=!1;let t=wee[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function x_(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(gm.has(e)){o=!0;continue}else if(bf(e)){i[e]=n;continue}else{let t=qh(n,Uh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Eee(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function S_(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function C_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var w_={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(q.test(e))e=parseFloat(e);else return e;return`${C_(e,t.target.x)}% ${C_(e,t.target.y)}%`}},Dee={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=cp.parse(e);if(i.length>5)return r;let a=cp.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=fp(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},T_={borderRadius:{...w_,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:w_,borderTopRightRadius:w_,borderBottomLeftRadius:w_,borderBottomRightRadius:w_,boxShadow:Dee};function E_(e,{layout:t,layoutId:n}){return gm.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!T_[e]||e===`opacity`)}function D_(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Eh(r[t])||i&&Eh(i[t])||E_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Oee(e){return window.getComputedStyle(e)}var kee=class extends e_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=S_}readValueFromInstance(e,t){if(gm.has(t))return this.projection?.isProjecting?dm(t):pm(e,t);{let n=Oee(e),r=(bf(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return b_(e,t)}build(e,t,n){x_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return D_(e,t,n)}},Aee={offset:`stroke-dashoffset`,array:`stroke-dasharray`},jee={offset:`strokeDashoffset`,array:`strokeDasharray`};function Mee(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Aee:jee;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Nee=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function O_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(x_(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Nee)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Mee(d,i,a,o,!1)}var k_=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),A_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Pee(e,t,n,r){S_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(k_.has(n)?n:kh(n),t.attrs[n])}function j_(e,t,n){let r=D_(e,t,n);for(let n in e)if(Eh(e[n])||Eh(t[n])){let t=hm.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var M_=class extends e_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Ig}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(gm.has(t)){let e=Wh(t);return e&&e.default||0}return t=k_.has(t)?t:kh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return j_(e,t,n)}build(e,t,n){O_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Pee(e,t,n,r)}mount(e){this.isSVGTag=A_(e.tagName),super.mount(e)}},N_=Vg.length;function P_(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&P_(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<N_;n++){let r=Vg[n],i=e.props[r];(zg(i)||i===!1)&&(t[r]=i)}return t}function F_(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var I_=[...Bg].reverse(),L_=Bg.length;function R_(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Ih(e,t,n)))}function z_(e){let t=R_(e),n=H_(),r=!0,i=!1,a=t=>(n,r)=>{let i=hh(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=P_(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<L_;t++){let p=I_[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=zg(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Rg(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=B_(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Sh(t)&&Sh(n)?!F_(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=hh(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=$m(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=hh(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=H_(),i=!0}}}function B_(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!F_(t,e):!1}function V_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function H_(){return{animate:V_(!0),whileInView:V_(),whileHover:V_(),whileTap:V_(),whileDrag:V_(),whileFocus:V_(),exit:V_()}}function U_(e,t){e.min=t.min,e.max=t.max}function W_(e,t){U_(e.x,t.x),U_(e.y,t.y)}function G_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var K_=1e-4,q_=1-K_,J_=1+K_,Y_=.01,X_=0-Y_,Z_=0+Y_;function Q_(e){return e.max-e.min}function $_(e,t,n){return Math.abs(e-t)<=n}function ev(e,t,n,r=.5){e.origin=r,e.originPoint=fp(t.min,t.max,e.origin),e.scale=Q_(n)/Q_(t),e.translate=fp(n.min,n.max,e.origin)-e.originPoint,(e.scale>=q_&&e.scale<=J_||isNaN(e.scale))&&(e.scale=1),(e.translate>=X_&&e.translate<=Z_||isNaN(e.translate))&&(e.translate=0)}function tv(e,t,n,r){ev(e.x,t.x,n.x,r?r.originX:void 0),ev(e.y,t.y,n.y,r?r.originY:void 0)}function nv(e,t,n,r=0){e.min=(r?fp(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q_(t)}function rv(e,t,n,r){nv(e.x,t.x,n.x,r?.x),nv(e.y,t.y,n.y,r?.y)}function iv(e,t,n,r=0){let i=r?fp(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q_(t)}function av(e,t,n,r){iv(e.x,t.x,n.x,r?.x),iv(e.y,t.y,n.y,r?.y)}function ov(e,t,n,r,i){return e-=t,e=u_(e,1/n,r),i!==void 0&&(e=u_(e,1/i,r)),e}function sv(e,t=0,n=1,r=.5,i,a=e,o=e){if(Vf.test(t)&&(t=parseFloat(t),t=fp(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=fp(a.min,a.max,r);e===a&&(s-=t),e.min=ov(e.min,t,n,s,i),e.max=ov(e.max,t,n,s,i)}function cv(e,t,[n,r,i],a,o){sv(e,t[n],t[r],t[i],t.scale,a,o)}var lv=[`x`,`scaleX`,`originX`],uv=[`y`,`scaleY`,`originY`];function dv(e,t,n,r){cv(e.x,t,lv,n?n.x:void 0,r?r.x:void 0),cv(e.y,t,uv,n?n.y:void 0,r?r.y:void 0)}function fv(e){return e.translate===0&&e.scale===1}function pv(e){return fv(e.x)&&fv(e.y)}function mv(e,t){return e.min===t.min&&e.max===t.max}function hv(e,t){return mv(e.x,t.x)&&mv(e.y,t.y)}function gv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _v(e,t){return gv(e.x,t.x)&&gv(e.y,t.y)}function vv(e){return Q_(e.x)/Q_(e.y)}function yv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function bv(e){return[e(`x`),e(`y`)]}function xv(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Sv=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Cv=Sv.length,wv=e=>typeof e==`string`?parseFloat(e):e,Tv=e=>typeof e==`number`||q.test(e);function Ev(e,t,n,r,i,a){i?(e.opacity=fp(0,n.opacity??1,Ov(r)),e.opacityExit=fp(t.opacity??1,0,kv(r))):a&&(e.opacity=fp(t.opacity??1,n.opacity??1,r));for(let i=0;i<Cv;i++){let a=Sv[i],o=Dv(t,a),s=Dv(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Tv(o)===Tv(s)?(e[a]=Math.max(fp(wv(o),wv(s),r),0),(Vf.test(s)||Vf.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=fp(t.rotate||0,n.rotate||0,r))}function Dv(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ov=Av(0,.5,Yd),kv=Av(.5,.95,kd);function Av(e,t,n){return r=>r<e?0:r>t?1:n(Md(e,t,r))}function jv(e,t,n){let r=Eh(e)?e:xh(e);return r.start(fh(``,r,t,n)),r.animation}function Mv(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Nv=(e,t)=>e.depth-t.depth,Pv=class{constructor(){this.children=[],this.isDirty=!1}add(e){xd(this.children,e),this.isDirty=!0}remove(e){Sd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nv),this.isDirty=!1,this.children.forEach(e)}};function Fv(e,t){let n=_f.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ff(r),e(a-t))};return df.setup(r,!0),()=>ff(r)}function Iv(e){return Eh(e)?e.get():e}var Lv=class{constructor(){this.members=[]}add(e){xd(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Sd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Sd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Rv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},zv={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bv=[``,`X`,`Y`,`Z`],Vv=1e3,Hv=0;function Uv(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Wv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=jh(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,df,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Wv(r)}function Gv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Hv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,sf.value&&(zv.nodes=zv.calculatedTargetDeltas=zv.calculatedProjections=0),this.nodes.forEach(Jv),this.nodes.forEach(ry),this.nodes.forEach(iy),this.nodes.forEach(Yv),sf.addProjectionMetrics&&sf.addProjectionMetrics(zv)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Nd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=hg(t)&&!Ag(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;df.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Fv(i,250),Rv.hasAnimatedSinceResize&&(Rv.hasAnimatedSinceResize=!1,this.nodes.forEach(ny)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||dy,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!_v(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...lh(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||ny(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ff(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ay),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Qv),this.nodes.forEach(Zv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($v);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ey),this.nodes.forEach(ty),this.nodes.forEach(Kv),this.nodes.forEach(qv)):this.nodes.forEach($v),this.clearAllSnapshots();let e=_f.now();pf.delta=Cd(0,1e3/60,e-pf.timestamp),pf.timestamp=e,pf.isProcessing=!0,mf.update.process(pf),mf.preRender.process(pf),mf.render.process(pf),pf.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xv),this.sharedNodes.forEach(oy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,df.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){df.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q_(this.snapshot.measuredBox.x)&&!Q_(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Ig(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pv(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||s_(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),hy(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Ig();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_y))){let{scroll:e}=this.root;e&&(g_(t.x,e.offset.x),g_(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Ig();if(W_(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&W_(t,e),g_(t.x,i.offset.x),g_(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Ig();W_(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(g_(r.x,-n.scroll.offset.x),g_(r.y,-n.scroll.offset.y)),s_(n.latestValues)&&y_(r,n.latestValues,n.layout?.layoutBox)}return s_(this.latestValues)&&y_(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Ig();W_(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!s_(n.latestValues))continue;let r;n.instance&&(o_(n.latestValues)&&n.updateSnapshot(),r=Ig(),W_(r,n.measurePageBox())),dv(t,n.latestValues,n.snapshot?.layoutBox,r)}return s_(this.latestValues)&&dv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pf.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=pf.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ig(),this.targetWithTransforms=Ig()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):W_(this.target,this.layout.layoutBox),p_(this.target,this.targetDelta)):W_(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),sf.value&&zv.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||o_(this.parent.latestValues)||c_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ig(),this.relativeTargetOrigin=Ig(),av(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),W_(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===pf.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;W_(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;See(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Ig());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(G_(this.prevProjectionDelta.x,this.projectionDelta.x),G_(this.prevProjectionDelta.y,this.projectionDelta.y)),tv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!yv(this.projectionDelta.x,this.prevProjectionDelta.x)||!yv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),sf.value&&zv.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pg(),this.projectionDelta=Pg(),this.projectionDeltaWithTransform=Pg()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Pg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Ig(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(uy));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;sy(a.x,e.x,n),sy(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(av(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ly(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&hv(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Ig(),W_(d,this.relativeTarget)),s&&(this.animationValues=i,Ev(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(ff(this.pendingAnimation),void 0),this.pendingAnimation=df.update(()=>{Rv.hasAnimatedSinceResize=!0,vf.layout++,this.motionValue||=xh(0),this.motionValue.jump(0,!1),this.currentAnimation=jv(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{vf.layout--},onComplete:()=>{vf.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&gy(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Ig();let t=Q_(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q_(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}W_(t,n),y_(t,i),tv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Lv),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Uv(`z`,e,r,this.animationValues);for(let t=0;t<Bv.length;t++)Uv(`rotate${Bv[t]}`,e,r,this.animationValues),Uv(`skew${Bv[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Iv(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Iv(t?.pointerEvents)||``),this.hasProjected&&!s_(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=xv(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in T_){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=T_[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Iv(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Zv),this.root.sharedNodes.clear()}}}function Kv(e){e.updateLayout()}function qv(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)bv(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q_(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;U_(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else gy(i,t.layoutBox,n)&&bv(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q_(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Pg();tv(o,n,t.layoutBox);let s=Pg();a?tv(s,e.applyTransform(r,!0),t.measuredBox):tv(s,n,t.layoutBox);let c=!pv(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Ig();av(s,t.layoutBox,i.layoutBox,o);let c=Ig();av(c,n,a.layoutBox,o),_v(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Jv(e){sf.value&&zv.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Yv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xv(e){e.clearSnapshot()}function Zv(e){e.clearMeasurements()}function Qv(e){e.isLayoutDirty=!0,e.updateLayout()}function $v(e){e.isLayoutDirty=!1}function ey(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ty(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ny(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ry(e){e.resolveTargetDelta()}function iy(e){e.calcProjection()}function ay(e){e.resetSkewAndRotation()}function oy(e){e.removeLeadSnapshot()}function sy(e,t,n){e.translate=fp(t.translate,0,n),e.scale=fp(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cy(e,t,n,r){e.min=fp(t.min,n.min,r),e.max=fp(t.max,n.max,r)}function ly(e,t,n,r){cy(e.x,t.x,n.x,r),cy(e.y,t.y,n.y,r)}function uy(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var dy={duration:.45,ease:[.4,0,.1,1]},fy=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),py=fy(`applewebkit/`)&&!fy(`chrome/`)?Math.round:kd;function my(e){e.min=py(e.min),e.max=py(e.max)}function hy(e){my(e.x),my(e.y)}function gy(e,t,n){return e===`position`||e===`preserve-aspect`&&!$_(vv(t),vv(n),.2)}function _y(e){return e!==e.root&&e.scroll?.wasRoot}var vy=Gv({attachResizeListener:(e,t)=>Mv(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),yy={current:void 0},by=Gv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!yy.current){let e=new vy({});e.mount(window),e.setOptions({layoutScroll:!0}),yy.current=e}return yy.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),xy=(0,z.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Sy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Cy(...e){return t=>{let n=!1,r=e.map(e=>{let r=Sy(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Sy(e[t],null)}}}}function wy(...e){return z.useCallback(Cy(...e),e)}var Ty=class extends z.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Jh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Jh(e)&&e.offsetWidth||0,r=Jh(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Ey({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,z.useId)(),s=(0,z.useRef)(null),c=(0,z.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,z.useContext)(xy),u=wy(s,e.props?.ref??e?.ref);return(0,z.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
20
20
|
[data-motion-pop-id="${o}"] {
|
|
21
21
|
position: absolute !important;
|
|
22
22
|
width: ${e}px !important;
|
|
@@ -70,5 +70,5 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
70
70
|
`,`
|
|
71
71
|
+`).split(`
|
|
72
72
|
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,z.useEffect)(()=>{let n=t?.target??V7,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&D5(e))return!1;let n=W7(e.code,s);if(a.current.add(e[n]),U7(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=W7(e.code,s);U7(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function U7(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function W7(e,t){return t.includes(e)?`code`:`key`}var Ase=()=>{let e=A7();return(0,z.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=_5(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return m5(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=h5(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function G7(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)jse(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function jse(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing);break}}function K7(e,t){return G7(e,t)}function q7(e,t){return G7(e,t)}function J7(e,t){return{id:e,type:`select`,selected:t}}function Y7(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);!(a.selected===void 0&&!e)&&a.selected!==e&&(n&&(a.selected=e),r.push(J7(a.id,e)))}return r}function X7({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function Z7(e){return{id:e.id,type:`remove`}}var Q7=e=>uoe(e),Mse=e=>q8(e);function $7(e){return(0,z.forwardRef)(e)}function e9(e){let[t,n]=(0,z.useState)(BigInt(0)),[r]=(0,z.useState)(()=>Nse(()=>n(e=>e+BigInt(1))));return I7(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function Nse(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var t9=(0,z.createContext)(null);function Pse({children:e}){let t=A7(),n=e9((0,z.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=X7({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=e9((0,z.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(X7({items:s,lookup:o}))},[])),i=(0,z.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,B.jsx)(t9.Provider,{value:i,children:e})}function Fse(){let e=(0,z.useContext)(t9);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var Ise=e=>!!e.panZoom;function n9(){let e=Ase(),t=A7(),n=Fse(),r=k7(Ise),i=(0,z.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=Q7(e)?e:n.get(e.id),a=i.parentId?S5(i.position,i.measured,i.parentId,n,r):i.position;return s5({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Q7(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Mse(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await hoe({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(Z7);o?.(f),c(e)}if(m){let e=d.map(Z7);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=d5(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=s5(s?r:a),l=u5(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=d5(e)?e:a(e);if(!r)return!1;let i=u5(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return doe(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??yoe();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,z.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var r9=e=>e.selected,Lse=typeof window<`u`?window:void 0;function Rse({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=A7(),{deleteElements:r}=n9(),i=H7(e,{actInsideInputWithModifier:!1}),a=H7(t,{target:Lse});(0,z.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(r9),edges:e.filter(r9)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,z.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function zse(e){let t=A7();(0,z.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=T5(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,F8.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var i9={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Bse=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Vse({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=B8.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:l,minZoom:u,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:p=!0,children:m,noWheelClassName:h,noPanClassName:g,onViewportChange:_,isControlledViewport:v,paneClickDistance:y,selectionOnDrag:b}){let x=A7(),S=(0,z.useRef)(null),{userSelectionActive:C,lib:w,connectionInProgress:T}=k7(Bse,T7),E=H7(f),D=(0,z.useRef)();zse(S);let O=(0,z.useCallback)(e=>{_?.({x:e[0],y:e[1],zoom:e[2]}),v||x.setState({transform:e})},[_,v]);return(0,z.useEffect)(()=>{if(S.current){D.current=nse({domNode:S.current,minZoom:u,maxZoom:d,translateExtent:l,viewport:c,onDraggingChange:e=>x.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=x.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=x.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=x.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=D.current.getViewport();return x.setState({panZoom:D.current,transform:[e,t,n],domNode:S.current.closest(`.react-flow`)}),()=>{D.current?.destroy()}}},[]),(0,z.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:E,preventScrolling:p,noPanClassName:g,userSelectionActive:C,noWheelClassName:h,lib:w,onTransformChange:O,connectionInProgress:T,selectionOnDrag:b,paneClickDistance:y})},[e,t,n,r,i,a,o,s,E,p,g,C,h,w,O,T,b,y]),(0,B.jsx)(`div`,{className:`react-flow__renderer`,ref:S,style:i9,children:m})}var Hse=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Use(){let{userSelectionActive:e,userSelectionRect:t}=k7(Hse,T7);return e&&t?(0,B.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var a9=(e,t)=>n=>{n.target===t.current&&e?.(n)},Wse=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Gse({isSelecting:e,selectionKeyPressed:t,selectionMode:n=V8.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:p,children:m}){let h=A7(),{userSelectionActive:g,elementsSelectable:_,dragging:v,connectionInProgress:y}=k7(Wse,T7),b=_&&(e||g),x=(0,z.useRef)(null),S=(0,z.useRef)(),C=(0,z.useRef)(new Set),w=(0,z.useRef)(new Set),T=(0,z.useRef)(!1),E=e=>{if(T.current||y){T.current=!1;return}c?.(e),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},D=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}l?.(e)},O=u?e=>u(e):void 0;return(0,B.jsxs)(`div`,{className:U4([`react-flow__pane`,{draggable:r===!0||Array.isArray(r)&&r.includes(0),dragging:v,selection:e}]),onClick:b?void 0:a9(E,x),onContextMenu:a9(D,x),onWheel:a9(O,x),onPointerEnter:b?void 0:d,onPointerMove:b?e=>{let{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:c,connectionLookup:l,triggerNodeChanges:u,triggerEdgeChanges:d,defaultEdgeOptions:f,resetSelectedElements:p}=h.getState();if(!S.current||!r)return;let{x:m,y:g}=k5(e.nativeEvent,S.current),{startX:_,startY:v}=r;if(!T.current){let n=t?0:i;if(Math.hypot(m-_,g-v)<=n)return;p(),o?.(e)}T.current=!0;let y={startX:_,startY:v,x:m<_?m:_,y:g<v?g:v,width:Math.abs(m-_),height:Math.abs(g-v)},b=C.current,x=w.current;C.current=new Set(Z8(s,y,a,n===V8.Partial,!0).map(e=>e.id)),w.current=new Set;let E=f?.selectable??!0;for(let e of C.current){let t=l.get(e);if(t)for(let{edgeId:e}of t.values()){let t=c.get(e);t&&(t.selectable??E)&&w.current.add(e)}}C5(b,C.current)||u(Y7(s,C.current,!0)),C5(x,w.current)||d(Y7(c,w.current)),h.setState({userSelectionRect:y,userSelectionActive:!0,nodesSelectionActive:!1})}:f,onPointerUp:b?e=>{e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!g&&e.target===x.current&&h.getState().userSelectionRect&&E?.(e),h.setState({userSelectionActive:!1,userSelectionRect:null}),T.current&&(s?.(e),h.setState({nodesSelectionActive:C.current.size>0})))}:void 0,onPointerDownCapture:b?n=>{let{domNode:r}=h.getState();if(S.current=r?.getBoundingClientRect(),!S.current)return;let i=n.target===x.current;if(!i&&n.target.closest(`.nokey`)||!e||!(a&&i||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),T.current=!1;let{x:o,y:s}=k5(n.nativeEvent,S.current);h.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:b?e=>{T.current&&=(e.stopPropagation(),!1)}:void 0,onPointerLeave:p,ref:x,style:i9,children:[m,(0,B.jsx)(Use,{})]})}function o9({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,F8.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function s9({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=A7(),[c,l]=(0,z.useState)(!1),u=(0,z.useRef)();return(0,z.useEffect)(()=>{u.current=Hoe({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{o9({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),(0,z.useEffect)(()=>{if(!(t||!e.current||!u.current))return u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{u.current?.destroy()}},[n,r,t,a,e,i,o]),c}var Kse=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function c9(){let e=A7();return(0,z.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Kse(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=p5(t,i));let{position:a,positionAbsolute:s}=Q8({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var l9=(0,z.createContext)(null),qse=l9.Provider;l9.Consumer;var u9=()=>(0,z.useContext)(l9),Jse=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Yse=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o,u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===z8.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function Xse({type:e=`source`,position:t=$.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=A7(),_=u9(),{connectOnClick:v,noPanClassName:y,rfId:b}=k7(Jse,T7),{connectingFrom:x,connectingTo:S,clickConnecting:C,isPossibleEndHandle:w,connectionInProcess:T,clickConnectionInProcess:E,valid:D}=k7(Yse(_,m,e),T7);_||g.getState().onError?.(`010`,F8.error010());let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=g.getState();t(Eoe(i,e))}n?.(i),s?.(i)},k=e=>{if(!_)return;let t=O5(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();c7.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,B.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:U4([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:C,connectingfrom:x,connectingto:S,valid:D,connectionindicator:r&&(!T||w)&&(T||E?a:i)}]),onMouseDown:k,onTouchStart:k,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=E5(t.target),h=n||c,{connection:v,isValid:y}=c7.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&O(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var d9=(0,z.memo)($7(Xse));function Zse({data:e,isConnectable:t,sourcePosition:n=$.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(d9,{type:`source`,position:n,isConnectable:t})]})}function Qse({data:e,isConnectable:t,targetPosition:n=$.Top,sourcePosition:r=$.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(d9,{type:`target`,position:n,isConnectable:t}),e?.label,(0,B.jsx)(d9,{type:`source`,position:r,isConnectable:t})]})}function $se(){return null}function ece({data:e,isConnectable:t,targetPosition:n=$.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(d9,{type:`target`,position:n,isConnectable:t}),e?.label]})}var f9={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},p9={input:Zse,default:Qse,output:ece,group:$se};function tce(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var nce=e=>{let{width:t,height:n,x:r,y:i}=X8(e.nodeLookup,{filter:e=>!!e.selected});return{width:f5(t)?t:null,height:f5(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function rce({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=A7(),{width:i,height:a,transformString:o,userSelectionActive:s}=k7(nce,T7),c=c9(),l=(0,z.useRef)(null);(0,z.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(s9({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,B.jsx)(`div`,{className:U4([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,B.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(f9,e.key)&&(e.preventDefault(),c({direction:f9[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var m9=typeof window<`u`?window:void 0,ice=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function h9({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:w,defaultViewport:T,translateExtent:E,minZoom:D,maxZoom:O,preventScrolling:k,onSelectionContextMenu:A,noWheelClassName:j,noPanClassName:M,disableKeyboardA11y:N,onViewportChange:ee,isControlledViewport:P}){let{nodesSelectionActive:F,userSelectionActive:I}=k7(ice,T7),L=H7(l,{target:m9}),te=H7(h,{target:m9}),ne=te||w,re=te||b,R=u&&ne!==!0,ie=L||I||R;return Rse({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,B.jsx)(Vse,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:re,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:!L&&ne,defaultViewport:T,translateExtent:E,minZoom:D,maxZoom:O,zoomActivationKeyCode:g,preventScrolling:k,noWheelClassName:j,noPanClassName:M,onViewportChange:ee,isControlledViewport:P,paneClickDistance:s,selectionOnDrag:R,children:(0,B.jsxs)(Gse,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:ne,isSelecting:!!ie,selectionMode:d,selectionKeyPressed:L,paneClickDistance:s,selectionOnDrag:R,children:[e,F&&(0,B.jsx)(rce,{onSelectionContextMenu:A,noPanClassName:M,disableKeyboardA11y:N})]})})}h9.displayName=`FlowRenderer`;var ace=(0,z.memo)(h9),oce=e=>t=>e?Z8(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function sce(e){return k7((0,z.useCallback)(oce(e),[e]),T7)}var cce=e=>e.updateNodeInternals;function lce(){let e=k7(cce),[t]=(0,z.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,z.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function uce({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=A7(),a=(0,z.useRef)(null),o=(0,z.useRef)(null),s=(0,z.useRef)(e.sourcePosition),c=(0,z.useRef)(e.targetPosition),l=(0,z.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,z.useEffect)(()=>{a.current&&!e.hidden&&(!u||o.current!==a.current)&&(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,z.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,z.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function dce({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:x}=k7(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},T7),S=y.type||`default`,C=g?.[S]||p9[S];C===void 0&&(v?.(`003`,F8.error003(S)),S=`default`,C=g?.default||p9.default);let w=!!(y.draggable||s&&y.draggable===void 0),T=!!(y.selectable||c&&y.selectable===void 0),E=!!(y.connectable||l&&y.connectable===void 0),D=!!(y.focusable||u&&y.focusable===void 0),O=A7(),k=x5(y),A=uce({node:y,nodeType:S,hasDimensions:k,resizeObserver:d}),j=s9({nodeRef:A,disabled:y.hidden||!w,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:_}),M=c9();if(y.hidden)return null;let N=b5(y),ee=tce(y),P=T||w||t||n||r||i,F=n?e=>n(e,{...b.userNode}):void 0,I=r?e=>r(e,{...b.userNode}):void 0,L=i?e=>i(e,{...b.userNode}):void 0,te=a?e=>a(e,{...b.userNode}):void 0,ne=o?e=>o(e,{...b.userNode}):void 0,re=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();T&&(!r||!w||i>0)&&o9({id:e,store:O,nodeRef:A}),t&&t(n,{...b.userNode})},R=t=>{if(!(D5(t.nativeEvent)||m)){if(L8.includes(t.key)&&T)o9({id:e,store:O,unselect:t.key===`Escape`,nodeRef:A});else if(w&&y.selected&&Object.prototype.hasOwnProperty.call(f9,t.key)){t.preventDefault();let{ariaLabelConfig:e}=O.getState();O.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),M({direction:f9[t.key],factor:t.shiftKey?4:1})}}},ie=()=>{if(m||!A.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();i&&(Z8(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+N.width/2,y.position.y+N.height/2,{zoom:t[2]}))};return(0,B.jsx)(`div`,{className:U4([`react-flow__node`,`react-flow__node-${S}`,{[p]:w},y.className,{selected:y.selected,selectable:T,parent:x,draggable:w,dragging:j}]),ref:A,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:P?`all`:`none`,visibility:k?`visible`:`hidden`,...y.style,...ee},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:I,onMouseLeave:L,onContextMenu:te,onClick:re,onDoubleClick:ne,onKeyDown:D?R:void 0,tabIndex:D?0:void 0,onFocus:D?ie:void 0,role:y.ariaRole??(D?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${M7}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,B.jsx)(qse,{value:e,children:(0,B.jsx)(C,{id:e,data:y.data,type:S,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:T,draggable:w,deletable:y.deletable??!0,isConnectable:E,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:j,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...N})})})}var fce=(0,z.memo)(dce),pce=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function g9(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=k7(pce,T7),o=sce(e.onlyRenderVisibleElements),s=lce();return(0,B.jsx)(`div`,{className:`react-flow__nodes`,style:i9,children:o.map(o=>(0,B.jsx)(fce,{id:o,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},o))})}g9.displayName=`NodeRenderer`;var mce=(0,z.memo)(g9);function hce(e){return k7((0,z.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&Coe({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),T7)}var gce=({color:e=`none`,strokeWidth:t=1})=>(0,B.jsx)(`polyline`,{className:`arrow`,style:{strokeWidth:t,...e&&{stroke:e}},strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`}),_ce=({color:e=`none`,strokeWidth:t=1})=>(0,B.jsx)(`polyline`,{className:`arrowclosed`,style:{strokeWidth:t,...e&&{stroke:e,fill:e}},strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`}),_9={[W8.Arrow]:gce,[W8.ArrowClosed]:_ce};function vce(e){let t=A7();return(0,z.useMemo)(()=>Object.prototype.hasOwnProperty.call(_9,e)?_9[e]:(t.getState().onError?.(`009`,F8.error009(e)),null),[e])}var yce=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=vce(t);return c?(0,B.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,B.jsx)(c,{color:n,strokeWidth:o})}):null},v9=({defaultColor:e,rfId:t})=>{let n=k7(e=>e.edges),r=k7(e=>e.defaultEdgeOptions),i=(0,z.useMemo)(()=>joe(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,B.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,B.jsx)(`defs`,{children:i.map(e=>(0,B.jsx)(yce,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};v9.displayName=`MarkerDefinitions`;var bce=(0,z.memo)(v9);function y9({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,z.useState)({x:1,y:0,width:0,height:0}),p=U4([`react-flow__edge-textwrapper`,l]),m=(0,z.useRef)(null);return(0,z.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,B.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,B.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,B.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}y9.displayName=`EdgeText`;var xce=(0,z.memo)(y9);function b9({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{...u,d:e,fill:`none`,className:U4([`react-flow__edge-path`,u.className])}),l?(0,B.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&f5(t)&&f5(n)?(0,B.jsx)(xce,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function x9({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===$.Left||e===$.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function S9({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top}){let[o,s]=x9({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=x9({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=j5({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function C9(e){return(0,z.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=S9({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s});return(0,B.jsx)(b9,{id:e.isInternal?void 0:t,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var Sce=C9({isInternal:!1}),w9=C9({isInternal:!0});Sce.displayName=`SimpleBezierEdge`,w9.displayName=`SimpleBezierEdgeInternal`;function T9(e){return(0,z.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=$.Bottom,targetPosition:m=$.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=z5({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition});return(0,B.jsx)(b9,{id:e.isInternal?void 0:t,path:y,labelX:b,labelY:x,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var E9=T9({isInternal:!1}),D9=T9({isInternal:!0});E9.displayName=`SmoothStepEdge`,D9.displayName=`SmoothStepEdgeInternal`;function O9(e){return(0,z.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,B.jsx)(E9,{...n,id:r,pathOptions:(0,z.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var Cce=O9({isInternal:!1}),k9=O9({isInternal:!0});Cce.displayName=`StepEdge`,k9.displayName=`StepEdgeInternal`;function A9(e){return(0,z.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=I5({sourceX:n,sourceY:r,targetX:i,targetY:a});return(0,B.jsx)(b9,{id:e.isInternal?void 0:t,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var wce=A9({isInternal:!1}),j9=A9({isInternal:!0});wce.displayName=`StraightEdge`,j9.displayName=`StraightEdgeInternal`;function M9(e){return(0,z.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=$.Bottom,targetPosition:s=$.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=P5({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature});return(0,B.jsx)(b9,{id:e.isInternal?void 0:t,path:y,labelX:b,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var Tce=M9({isInternal:!1}),N9=M9({isInternal:!0});Tce.displayName=`BezierEdge`,N9.displayName=`BezierEdgeInternal`;var P9={default:N9,straight:j9,step:k9,smoothstep:D9,simplebezier:w9},F9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Ece=(e,t,n)=>n===$.Left?e-t:n===$.Right?e+t:e,Dce=(e,t,n)=>n===$.Top?e-t:n===$.Bottom?e+t:e,I9=`react-flow__edgeupdater`;function L9({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,B.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:U4([I9,`${I9}-${s}`]),cx:Ece(t,r,e),cy:Dce(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function Oce({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=A7(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;c7.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e===`source`)&&(0,B.jsx)(L9,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,B.jsx)(L9,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function kce({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:v}){let y=k7(t=>t.edgeLookup.get(e)),b=k7(e=>e.defaultEdgeOptions);y=b?{...b,...y}:y;let x=y.type||`default`,S=h?.[x]||P9[x];S===void 0&&(_?.(`011`,F8.error011(x)),x=`default`,S=h?.default||P9.default);let C=!!(y.focusable||t&&y.focusable===void 0),w=d!==void 0&&(y.reconnectable||n&&y.reconnectable===void 0),T=!!(y.selectable||r&&y.selectable===void 0),E=(0,z.useRef)(null),[D,O]=(0,z.useState)(!1),[k,A]=(0,z.useState)(!1),j=A7(),{zIndex:M,sourceX:N,sourceY:ee,targetX:P,targetY:F,sourcePosition:I,targetPosition:L}=k7((0,z.useCallback)(t=>{let n=t.nodeLookup.get(y.source),r=t.nodeLookup.get(y.target);if(!n||!r)return{zIndex:y.zIndex,...F9};let i=Aoe({id:e,sourceNode:n,targetNode:r,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:t.connectionMode,onError:_});return{zIndex:Soe({selected:y.selected,zIndex:y.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...i||F9}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),T7),te=(0,z.useMemo)(()=>y.markerStart?`url('#${W5(y.markerStart,m)}')`:void 0,[y.markerStart,m]),ne=(0,z.useMemo)(()=>y.markerEnd?`url('#${W5(y.markerEnd,m)}')`:void 0,[y.markerEnd,m]);if(y.hidden||N===null||ee===null||P===null||F===null)return null;let re=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=j.getState();T&&(j.setState({nodesSelectionActive:!1}),y.selected&&a?(r({nodes:[],edges:[y]}),E.current?.blur()):n([e])),i&&i(t,y)},R=a?e=>{a(e,{...y})}:void 0,ie=o?e=>{o(e,{...y})}:void 0,ae=s?e=>{s(e,{...y})}:void 0,oe=c?e=>{c(e,{...y})}:void 0,se=l?e=>{l(e,{...y})}:void 0;return(0,B.jsx)(`svg`,{style:{zIndex:M},children:(0,B.jsxs)(`g`,{className:U4([`react-flow__edge`,`react-flow__edge-${x}`,y.className,g,{selected:y.selected,animated:y.animated,inactive:!T&&!i,updating:D,selectable:T}]),onClick:re,onDoubleClick:R,onContextMenu:ie,onMouseEnter:ae,onMouseMove:oe,onMouseLeave:se,onKeyDown:C?t=>{if(!v&&L8.includes(t.key)&&T){let{unselectNodesAndEdges:n,addSelectedEdges:r}=j.getState();t.key===`Escape`?(E.current?.blur(),n({edges:[y]})):r([e])}}:void 0,tabIndex:C?0:void 0,role:y.ariaRole??(C?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":C?`${N7}-${m}`:void 0,ref:E,...y.domAttributes,children:[!k&&(0,B.jsx)(S,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:T,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:N,sourceY:ee,targetX:P,targetY:F,sourcePosition:I,targetPosition:L,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:te,markerEnd:ne,pathOptions:`pathOptions`in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),w&&(0,B.jsx)(Oce,{edge:y,isReconnectable:w,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:N,sourceY:ee,targetX:P,targetY:F,sourcePosition:I,targetPosition:L,setUpdateHover:O,setReconnecting:A})]})})}var Ace=(0,z.memo)(kce),jce=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function R9({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=k7(jce,T7),b=hce(t);return(0,B.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,B.jsx)(bce,{defaultColor:e,rfId:n}),b.map(e=>(0,B.jsx)(Ace,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}R9.displayName=`EdgeRenderer`;var Mce=(0,z.memo)(R9),Nce=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Pce({children:e}){return(0,B.jsx)(`div`,{className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:k7(Nce)},children:e})}function Fce(e){let t=n9(),n=(0,z.useRef)(!1);(0,z.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var Ice=e=>e.panZoom?.syncViewport;function Lce(e){let t=k7(Ice),n=A7();return(0,z.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function z9(e){return e.connection.inProgress?{...e.connection,to:m5(e.connection.to,e.transform)}:{...e.connection}}function Rce(e){return e?t=>e(z9(t)):z9}function zce(e){return k7(Rce(e),T7)}var Bce=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Vce({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=k7(Bce,T7);return a&&i&&c?(0,B.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,B.jsx)(`g`,{className:U4([`react-flow__connection`,K8(s)]),children:(0,B.jsx)(B9,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var B9=({style:e,type:t=U8.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=zce();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:K8(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case U8.Bezier:[m]=P5(h);break;case U8.SimpleBezier:[m]=S9(h);break;case U8.Step:[m]=z5({...h,borderRadius:0});break;case U8.SmoothStep:[m]=z5(h);break;default:[m]=I5(h)}return(0,B.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};B9.displayName=`ConnectionLine`;var Hce={};function V9(e=Hce){(0,z.useRef)(e),A7(),(0,z.useEffect)(()=>{},[e])}function Uce(){A7(),(0,z.useRef)(!1),(0,z.useEffect)(()=>{},[])}function H9({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,deleteKeyCode:w,onlyRenderVisibleElements:T,elementsSelectable:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,defaultMarkerColor:M,zoomOnScroll:N,zoomOnPinch:ee,panOnScroll:P,panOnScrollSpeed:F,panOnScrollMode:I,zoomOnDoubleClick:L,panOnDrag:te,onPaneClick:ne,onPaneMouseEnter:re,onPaneMouseMove:R,onPaneMouseLeave:ie,onPaneScroll:ae,onPaneContextMenu:oe,paneClickDistance:se,nodeClickDistance:ce,onEdgeContextMenu:le,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:fe,reconnectRadius:pe,onReconnect:me,onReconnectStart:he,onReconnectEnd:ge,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,disableKeyboardA11y:be,nodeExtent:xe,rfId:Se,viewport:Ce,onViewportChange:we}){return V9(e),V9(t),Uce(),Fce(n),Lce(Ce),(0,B.jsx)(ace,{onPaneClick:ne,onPaneMouseEnter:re,onPaneMouseMove:R,onPaneMouseLeave:ie,onPaneContextMenu:oe,onPaneScroll:ae,paneClickDistance:se,deleteKeyCode:w,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:N,zoomOnPinch:ee,zoomOnDoubleClick:L,panOnScroll:P,panOnScrollSpeed:F,panOnScrollMode:I,panOnDrag:te,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,onSelectionContextMenu:d,preventScrolling:j,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,disableKeyboardA11y:be,onViewportChange:we,isControlledViewport:!!Ce,children:(0,B.jsxs)(Pce,{children:[(0,B.jsx)(Mce,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:me,onReconnectStart:he,onReconnectEnd:ge,onlyRenderVisibleElements:T,onEdgeContextMenu:le,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:fe,reconnectRadius:pe,defaultMarkerColor:M,noPanClassName:ye,disableKeyboardA11y:be,rfId:Se}),(0,B.jsx)(Vce,{style:h,type:m,component:g,containerStyle:_}),(0,B.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,B.jsx)(mce,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:ce,onlyRenderVisibleElements:T,noPanClassName:ye,noDragClassName:_e,disableKeyboardA11y:be,nodeExtent:xe,rfId:Se}),(0,B.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}H9.displayName=`GraphView`;var Wce=(0,z.memo)(H9),U9=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??I8;e7(h,g,_);let{nodesInitialized:x}=Y5(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=_5(X8(p,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:I8,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:z8.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...H8},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:goe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:R8,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Gce=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>pse((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await moe({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...U9({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:i,fitViewQueued:a,zIndexMode:o,nodesSelectionActive:s}=m(),{nodesInitialized:c,hasSelectedNodes:l}=Y5(e,t,n,{nodeOrigin:r,nodeExtent:d,elevateNodesOnSelect:i,checkEquality:!0,zIndexMode:o}),u=s&&l;a&&c?(h(),p({nodes:e,nodesInitialized:c,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:u})):p({nodes:e,nodesInitialized:c,nodesSelectionActive:u})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();e7(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=Roe(e,n,r,i,a,o,l);d&&(Poe(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=H5(e,o.fromHandle,$.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=Q5(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(K7(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(q7(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){i(e.map(e=>J7(e,!0)));return}i(Y7(r,new Set([...e]),!0)),a(Y7(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>J7(e,!0)));return}a(Y7(n,new Set([...e]))),i(Y7(r,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(J7(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(J7(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,J7(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,J7(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();e[0][0]===o[0][0]&&e[0][1]===o[0][1]&&e[1][0]===o[1][0]&&e[1][1]===o[1][1]||(Y5(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return zoe({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return Promise.resolve(!1);let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...H8}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...U9()})}},Object.is);function Kce({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,z.useState)(()=>Gce({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(D7,{value:m,children:(0,B.jsx)(Pse,{children:p})})}function qce({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,z.useContext)(E7)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(Kce,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var Jce={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function Yce({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,onNodeDragStart:C,onNodeDrag:w,onNodeDragStop:T,onNodesDelete:E,onEdgesDelete:D,onDelete:O,onSelectionChange:k,onSelectionDragStart:A,onSelectionDrag:j,onSelectionDragStop:M,onSelectionContextMenu:N,onSelectionStart:ee,onSelectionEnd:P,onBeforeDelete:F,connectionMode:I,connectionLineType:L=U8.Bezier,connectionLineStyle:te,connectionLineComponent:ne,connectionLineContainerStyle:re,deleteKeyCode:R=`Backspace`,selectionKeyCode:ie=`Shift`,selectionOnDrag:ae=!1,selectionMode:oe=V8.Full,panActivationKeyCode:se=`Space`,multiSelectionKeyCode:ce=v5()?`Meta`:`Control`,zoomActivationKeyCode:le=v5()?`Meta`:`Control`,snapToGrid:ue,snapGrid:de,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:pe,nodesDraggable:me,autoPanOnNodeFocus:he,nodesConnectable:ge,nodesFocusable:_e,nodeOrigin:ve=L7,edgesFocusable:ye,edgesReconnectable:be,elementsSelectable:xe=!0,defaultViewport:Se=Ese,minZoom:Ce=.5,maxZoom:we=2,translateExtent:Te=I8,preventScrolling:Ee=!0,nodeExtent:De,defaultMarkerColor:Oe=`#b1b1b7`,zoomOnScroll:ke=!0,zoomOnPinch:Ae=!0,panOnScroll:je=!1,panOnScrollSpeed:Me=.5,panOnScrollMode:Ne=B8.Free,zoomOnDoubleClick:Pe=!0,panOnDrag:Fe=!0,onPaneClick:Ie,onPaneMouseEnter:Le,onPaneMouseMove:Re,onPaneMouseLeave:ze,onPaneScroll:Be,onPaneContextMenu:Ve,paneClickDistance:He=1,nodeClickDistance:Ue=0,children:We,onReconnect:Ge,onReconnectStart:Ke,onReconnectEnd:qe,onEdgeContextMenu:Je,onEdgeDoubleClick:Ye,onEdgeMouseEnter:Xe,onEdgeMouseMove:Ze,onEdgeMouseLeave:Qe,reconnectRadius:$e=10,onNodesChange:et,onEdgesChange:tt,noDragClassName:nt=`nodrag`,noWheelClassName:rt=`nowheel`,noPanClassName:it=`nopan`,fitView:at,fitViewOptions:ot,connectOnClick:st,attributionPosition:ct,proOptions:lt,defaultEdgeOptions:ut,elevateNodesOnSelect:dt=!0,elevateEdgesOnSelect:ft=!1,disableKeyboardA11y:pt=!1,autoPanOnConnect:mt,autoPanOnNodeDrag:ht,autoPanSpeed:gt,connectionRadius:_t,isValidConnection:vt,onError:yt,style:bt,id:xt,nodeDragThreshold:St,connectionDragThreshold:Ct,viewport:wt,onViewportChange:Tt,width:Et,height:Dt,colorMode:Ot=`light`,debug:kt,onScroll:At,ariaLabelConfig:jt,zIndexMode:Mt=`basic`,...Nt},Pt){let Ft=xt||`1`,It=kse(Ot),Lt=(0,z.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),At?.(e)},[At]);return(0,B.jsx)(`div`,{"data-testid":`rf__wrapper`,...Nt,onScroll:Lt,style:{...bt,...Jce},ref:Pt,className:U4([`react-flow`,i,It]),id:xt,role:`application`,children:(0,B.jsxs)(qce,{nodes:e,edges:t,width:Et,height:Dt,fitView:at,fitViewOptions:ot,minZoom:Ce,maxZoom:we,nodeOrigin:ve,nodeExtent:De,zIndexMode:Mt,children:[(0,B.jsx)(Ose,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:me,autoPanOnNodeFocus:he,nodesConnectable:ge,nodesFocusable:_e,edgesFocusable:ye,edgesReconnectable:be,elementsSelectable:xe,elevateNodesOnSelect:dt,elevateEdgesOnSelect:ft,minZoom:Ce,maxZoom:we,nodeExtent:De,onNodesChange:et,onEdgesChange:tt,snapToGrid:ue,snapGrid:de,connectionMode:I,translateExtent:Te,connectOnClick:st,defaultEdgeOptions:ut,fitView:at,fitViewOptions:ot,onNodesDelete:E,onEdgesDelete:D,onDelete:O,onNodeDragStart:C,onNodeDrag:w,onNodeDragStop:T,onSelectionDrag:j,onSelectionDragStart:A,onSelectionDragStop:M,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:it,nodeOrigin:ve,rfId:Ft,autoPanOnConnect:mt,autoPanOnNodeDrag:ht,autoPanSpeed:gt,onError:yt,connectionRadius:_t,isValidConnection:vt,selectNodesOnDrag:pe,nodeDragThreshold:St,connectionDragThreshold:Ct,onBeforeDelete:F,debug:kt,ariaLabelConfig:jt,zIndexMode:Mt}),(0,B.jsx)(Wce,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:b,onNodeContextMenu:x,onNodeDoubleClick:S,nodeTypes:a,edgeTypes:o,connectionLineType:L,connectionLineStyle:te,connectionLineComponent:ne,connectionLineContainerStyle:re,selectionKeyCode:ie,selectionOnDrag:ae,selectionMode:oe,deleteKeyCode:R,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:le,onlyRenderVisibleElements:fe,defaultViewport:Se,translateExtent:Te,minZoom:Ce,maxZoom:we,preventScrolling:Ee,zoomOnScroll:ke,zoomOnPinch:Ae,zoomOnDoubleClick:Pe,panOnScroll:je,panOnScrollSpeed:Me,panOnScrollMode:Ne,panOnDrag:Fe,onPaneClick:Ie,onPaneMouseEnter:Le,onPaneMouseMove:Re,onPaneMouseLeave:ze,onPaneScroll:Be,onPaneContextMenu:Ve,paneClickDistance:He,nodeClickDistance:Ue,onSelectionContextMenu:N,onSelectionStart:ee,onSelectionEnd:P,onReconnect:Ge,onReconnectStart:Ke,onReconnectEnd:qe,onEdgeContextMenu:Je,onEdgeDoubleClick:Ye,onEdgeMouseEnter:Xe,onEdgeMouseMove:Ze,onEdgeMouseLeave:Qe,reconnectRadius:$e,defaultMarkerColor:Oe,noDragClassName:nt,noWheelClassName:rt,noPanClassName:it,rfId:Ft,disableKeyboardA11y:pt,nodeExtent:De,viewport:wt,onViewportChange:Tt}),(0,B.jsx)(Tse,{onSelectionChange:k}),We,(0,B.jsx)(bse,{proOptions:lt,position:ct}),(0,B.jsx)(yse,{rfId:Ft,disableKeyboardA11y:pt})]})})}var Xce=$7(Yce);function Zce(e){let[t,n]=(0,z.useState)(e);return[t,n,(0,z.useCallback)(e=>n(t=>K7(e,t)),[])]}function Qce(e){let[t,n]=(0,z.useState)(e);return[t,n,(0,z.useCallback)(e=>n(t=>q7(e,t)),[])]}F8.error014();function $ce({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,B.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:U4([`react-flow__background-pattern`,n,r])})}function ele({radius:e,className:t}){return(0,B.jsx)(`circle`,{cx:e,cy:e,r:e,className:U4([`react-flow__background-pattern`,`dots`,t])})}var W9;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(W9||={});var tle={[W9.Dots]:1,[W9.Lines]:1,[W9.Cross]:6},nle=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function G9({id:e,variant:t=W9.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,z.useRef)(null),{transform:f,patternId:p}=k7(nle,T7),m=r||tle[t],h=t===W9.Dots,g=t===W9.Cross,_=Array.isArray(n)?n:[n,n],v=[_[0]*f[2]||1,_[1]*f[2]||1],y=m*f[2],b=Array.isArray(a)?a:[a,a],x=g?[y,y]:v,S=[b[0]*f[2]||1+x[0]/2,b[1]*f[2]||1+x[1]/2],C=`${p}${e||``}`;return(0,B.jsxs)(`svg`,{className:U4([`react-flow__background`,l]),style:{...c,...i9,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,B.jsx)(`pattern`,{id:C,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?(0,B.jsx)(ele,{radius:y/2,className:u}):(0,B.jsx)($ce,{dimensions:x,lineWidth:i,variant:t,className:u})}),(0,B.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${C})`})]})}G9.displayName=`Background`;var rle=(0,z.memo)(G9);function ile(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,B.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function ale(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,B.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function ole(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,B.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function sle(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,B.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function cle(){return(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,B.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function K9({children:e,className:t,...n}){return(0,B.jsx)(`button`,{type:`button`,className:U4([`react-flow__controls-button`,t]),...n,children:e})}var lle=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function q9({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=A7(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=k7(lle,T7),{zoomIn:y,zoomOut:b,fitView:x}=n9();return(0,B.jsxs)(P7,{className:U4([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(K9,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,B.jsx)(ile,{})}),(0,B.jsx)(K9,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,B.jsx)(ale,{})})]}),n&&(0,B.jsx)(K9,{className:`react-flow__controls-fitview`,onClick:()=>{x(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,B.jsx)(ole,{})}),r&&(0,B.jsx)(K9,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,B.jsx)(cle,{}):(0,B.jsx)(sle,{})}),u]})}q9.displayName=`Controls`;var ule=(0,z.memo)(q9);function dle({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,B.jsx)(`rect`,{className:U4([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var fle=(0,z.memo)(dle),ple=e=>e.nodes.map(e=>e.id),J9=e=>e instanceof Function?e:()=>e;function mle({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=fle,onClick:o}){let s=k7(ple,T7),c=J9(t),l=J9(e),u=J9(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,B.jsx)(B.Fragment,{children:s.map(e=>(0,B.jsx)(gle,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function hle({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=k7(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=b5(r);return{node:r,x:i,y:a,width:o,height:s}},T7);return!l||l.hidden||!x5(l)?null:(0,B.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var gle=(0,z.memo)(hle),_le=(0,z.memo)(mle),vle=200,yle=150,ble=e=>!e.hidden,xle=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?l5(X8(e.nodeLookup,{filter:ble}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Sle=`react-flow__minimap-desc`;function Y9({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:v,zoomStep:y=1,offsetScale:b=5}){let x=A7(),S=(0,z.useRef)(null),{boundingRect:C,viewBB:w,rfId:T,panZoom:E,translateExtent:D,flowWidth:O,flowHeight:k,ariaLabelConfig:A}=k7(xle,T7),j=e?.width??vle,M=e?.height??yle,N=C.width/j,ee=C.height/M,P=Math.max(N,ee),F=P*j,I=P*M,L=b*P,te=C.x-(F-C.width)/2-L,ne=C.y-(I-C.height)/2-L,re=F+L*2,R=I+L*2,ie=`${Sle}-${T}`,ae=(0,z.useRef)(0),oe=(0,z.useRef)();ae.current=P,(0,z.useEffect)(()=>{if(S.current&&E)return oe.current=Joe({domNode:S.current,panZoom:E,getTransform:()=>x.getState().transform,getViewScale:()=>ae.current}),()=>{oe.current?.destroy()}},[E]),(0,z.useEffect)(()=>{oe.current?.update({translateExtent:D,width:O,height:k,inversePan:v,pannable:h,zoomStep:y,zoomable:g})},[h,g,v,y,D,O,k]);let se=p?e=>{let[t,n]=oe.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,ce=m?(0,z.useCallback)((e,t)=>{let n=x.getState().nodeLookup.get(t).internals.userNode;m(e,n)},[]):void 0,le=_??A[`minimap.ariaLabel`];return(0,B.jsx)(P7,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*P:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:U4([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,B.jsxs)(`svg`,{width:j,height:M,viewBox:`${te} ${ne} ${re} ${R}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":ie,ref:S,onClick:se,children:[le&&(0,B.jsx)(`title`,{id:ie,children:le}),(0,B.jsx)(_le,{onClick:ce,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,B.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${te-L},${ne-L}h${re+L*2}v${R+L*2}h${-re-L*2}z
|
|
73
|
-
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}Y9.displayName=`MiniMap`;var Cle=(0,z.memo)(Y9),wle=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Tle={[h7.Line]:`right`,[h7.Handle]:`bottom-right`};function Ele({nodeId:e,position:t,variant:n=h7.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let v=u9(),y=typeof e==`string`?e:v,b=A7(),x=(0,z.useRef)(null),S=n===h7.Handle,C=k7((0,z.useCallback)(wle(S&&p),[S,p]),T7),w=(0,z.useRef)(null),T=t??Tle[n];return(0,z.useEffect)(()=>{if(!(!x.current||!y))return w.current||=cse({domNode:x.current,nodeId:y,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=b.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=b.getState(),o=[],s={x:e.x,y:e.y},c=r.get(y);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Q5([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...S5({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:y,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:y,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:y,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};b.getState().triggerNodeChanges([n])}}),w.current.update({controlPosition:T,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{w.current?.destroy()}},[T,s,c,l,u,d,h,g,_,m]),(0,B.jsx)(`div`,{className:U4([`react-flow__resize-control`,`nodrag`,...T.split(`-`),n,r]),ref:x,style:{...i,scale:C,...o&&{[S?`backgroundColor`:`borderColor`]:o}},children:a})}(0,z.memo)(Ele);var X9={requirement:`#3b82f6`,decision:`#8b5cf6`,code_change:`#10b981`,outcome:`#f59e0b`};function Dle({nodes:e,edges:t,onNodeClick:n}){let r=(0,z.useMemo)(()=>e.map((e,t)=>({id:e.id,type:`default`,data:{label:(0,B.jsxs)(`div`,{className:`text-xs`,children:[(0,B.jsx)(`div`,{className:`font-semibold truncate max-w-[120px]`,children:e.title}),(0,B.jsx)(`div`,{className:`text-gray-500 text-[10px]`,children:e.node_type})]})},position:{x:t%5*200+Math.sin(t)*30,y:Math.floor(t/5)*150+Math.cos(t)*20},style:{background:X9[e.node_type]||`#6b7280`,color:`#fff`,border:`none`,borderRadius:`8px`,padding:`8px 12px`,minWidth:`140px`}})),[e]),i=(0,z.useMemo)(()=>t.map(e=>({id:e.id,source:e.from_node_id,target:e.to_node_id,label:e.edge_type,labelStyle:{fontSize:10,fill:`#6b7280`},style:{stroke:`#d1d5db`,strokeWidth:Math.max(1,e.weight)},markerEnd:{type:W8.ArrowClosed,color:`#d1d5db`}})),[t]),[a,,o]=Zce(r),[s,,c]=Qce(i),l=(0,z.useCallback)((e,t)=>{n?.(t.id)},[n]);return e.length===0?(0,B.jsx)(`div`,{className:`flex items-center justify-center h-full text-gray-400 text-sm`,children:`暂无知识节点`}):(0,B.jsxs)(Xce,{nodes:a,edges:s,onNodesChange:o,onEdgesChange:c,onNodeClick:l,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[(0,B.jsx)(rle,{color:`#f3f4f6`,gap:20}),(0,B.jsx)(ule,{}),(0,B.jsx)(Cle,{nodeColor:t=>X9[e.find(e=>e.id===t.id)?.node_type||``]||`#6b7280`,style:{background:`#f9fafb`}})]})}var Z9={requirement:Qs,decision:ac,code_change:Us,outcome:zs},Q9={requirement:`#3b82f6`,decision:`#8b5cf6`,code_change:`#10b981`,outcome:`#f59e0b`},$9=[`#3b82f6`,`#8b5cf6`,`#10b981`,`#f59e0b`,`#ef4444`,`#06b6d4`];function Ole(){let e=qe(),[t,n]=(0,z.useState)(``),[r,i]=(0,z.useState)(``),[a,o]=(0,z.useState)(null),[s,c]=(0,z.useState)(1),[l,u]=(0,z.useState)(20),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(!1),[h,g]=(0,z.useState)(null),[_,v]=(0,z.useState)(``),[y,b]=(0,z.useState)(`list`),[x,S]=(0,z.useState)({open:!1,title:``,description:``,onConfirm:()=>{}}),{data:C}=ct({queryKey:[`knowledge-overview`],queryFn:()=>el().then(e=>e.data)}),{data:w}=ct({queryKey:[`knowledge-search`,t],queryFn:()=>$c(t).then(e=>e.data),enabled:t.length>0}),{data:T}=ct({queryKey:[`knowledge-all`],queryFn:()=>$c(``).then(e=>e.data)}),{data:E}=ct({queryKey:[`knowledge-neighbors`,a],queryFn:()=>tl(a).then(e=>e.data),enabled:!!a}),{data:D}=ct({queryKey:[`knowledge-graph`,_],queryFn:()=>nl(_||void 0).then(e=>e.data),enabled:y===`graph`}),O=lt({mutationFn:rl,onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),e.invalidateQueries({queryKey:[`knowledge-overview`]}),f(!1)}}),k=lt({mutationFn:({id:e,data:t})=>il(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),m(!1),g(null)}}),A=lt({mutationFn:al,onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),e.invalidateQueries({queryKey:[`knowledge-overview`]}),o(null)}}),j=(t?w?.items:T?.items)?.filter(e=>(!r||e.node_type===r)&&(!_||e.project_path===_)),M=Array.from(new Set(T?.items.map(e=>e.node_type)||[])),N=Array.from(new Set(T?.items.map(e=>e.project_path||``).filter(Boolean)||[])),ee=C?.byType?Object.entries(C.byType).map(([e,t])=>({name:e,value:t})):[],P=Math.ceil((j?.length||0)/l),F=j?.slice((s-1)*l,s*l),I=e=>{e.preventDefault();let t=new FormData(e.currentTarget);O.mutate({title:t.get(`title`),content:t.get(`content`),node_type:t.get(`node_type`),project_path:t.get(`project_path`),tags:t.get(`tags`)})},L=e=>{if(e.preventDefault(),!h)return;let t=new FormData(e.currentTarget);k.mutate({id:h.id,data:{title:t.get(`title`),content:t.get(`content`),tags:t.get(`tags`)}})},te=e=>{S({open:!0,title:`删除知识节点`,description:`确认删除此知识节点?关联的边也会被删除。`,onConfirm:()=>{A.mutate(e),S(e=>({...e,open:!1}))}})};return(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsxs)(`div`,{className:`relative flex-1`,children:[(0,B.jsx)(_c,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,B.jsx)(`input`,{type:`text`,placeholder:`搜索知识节点(需求、决策、代码变更、结果)...`,value:t,onChange:e=>{n(e.target.value),c(1)},className:`w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 text-lg`})]}),(0,B.jsxs)(`select`,{value:r,onChange:e=>{i(e.target.value),c(1)},className:`px-3 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:``,children:`全部类型`}),M.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]}),(0,B.jsxs)(`select`,{value:_,onChange:e=>{v(e.target.value),c(1)},className:`px-3 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:``,children:`全部项目`}),N.map(e=>(0,B.jsx)(`option`,{value:e,children:e.split(`/`).pop()},e))]}),(0,B.jsx)(J,{variant:`primary`,size:`sm`,icon:fc,onClick:()=>f(!0),children:`创建节点`}),(0,B.jsxs)(`div`,{className:`flex border border-gray-200 rounded-lg overflow-hidden`,children:[(0,B.jsx)(`button`,{onClick:()=>b(`list`),className:`px-3 py-2 text-sm transition-colors ${y===`list`?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`}`,children:`列表`}),(0,B.jsxs)(`button`,{onClick:()=>b(`graph`),className:`px-3 py-2 text-sm transition-colors flex items-center gap-1 ${y===`graph`?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`}`,children:[(0,B.jsx)(cc,{className:`h-4 w-4`}),`图谱`]})]})]})}),(0,B.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,B.jsx)(Y,{title:`知识图谱概览`,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mb-4`,children:[(0,B.jsxs)(`div`,{className:`text-center p-4 bg-blue-50 rounded-xl`,children:[(0,B.jsx)(js,{className:`h-8 w-8 text-blue-500 mx-auto mb-2`}),(0,B.jsx)(`div`,{className:`text-3xl font-bold text-blue-600`,children:C?.totalNodes||0}),(0,B.jsx)(`div`,{className:`text-sm text-gray-600`,children:`知识节点`})]}),(0,B.jsxs)(`div`,{className:`text-center p-4 bg-purple-50 rounded-xl`,children:[(0,B.jsx)(tc,{className:`h-8 w-8 text-purple-500 mx-auto mb-2`}),(0,B.jsx)(`div`,{className:`text-3xl font-bold text-purple-600`,children:ee.length}),(0,B.jsx)(`div`,{className:`text-sm text-gray-600`,children:`节点类型`})]})]})}),(0,B.jsx)(Y,{title:`节点类型分布`,children:ee.length>0?(0,B.jsx)(RO,{width:`100%`,height:200,children:(0,B.jsxs)(z0,{children:[(0,B.jsx)(pJ,{data:ee,cx:`50%`,cy:`50%`,innerRadius:50,outerRadius:80,dataKey:`value`,label:({name:e,percent:t})=>`${e} ${(t*100).toFixed(0)}%`,children:ee.map((e,t)=>(0,B.jsx)(gW,{fill:$9[t%$9.length]},t))}),(0,B.jsx)(hW,{})]})}):(0,B.jsx)(`div`,{className:`flex items-center justify-center h-48 text-gray-400`,children:`暂无数据`})})]}),y===`graph`&&(0,B.jsx)(Y,{title:`知识图谱`,children:(0,B.jsx)(`div`,{className:`h-[600px] border border-gray-200 rounded-lg overflow-hidden`,children:D?(0,B.jsx)(Dle,{nodes:D.nodes,edges:D.edges,onNodeClick:o}):(0,B.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,B.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600`})})})}),y===`list`&&(0,B.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6`,children:[(0,B.jsx)(`div`,{className:`lg:col-span-2`,children:(0,B.jsxs)(Y,{title:`知识节点 (${j?.length||0})`,action:j&&j.length>0?(0,B.jsx)(J,{variant:`secondary`,size:`sm`,icon:qs,onClick:()=>{if(!j||j.length===0)return;let e=[`ID`,`标题`,`类型`,`内容`,`标签`,`项目路径`],t=j.map(e=>[e.id,e.title,e.node_type,e.content,e.tags||``,e.project_path||``]);n4(`knowledge-nodes-${Y2(new Date,`yyyyMMdd-HHmmss`)}.csv`,e,t)},children:`导出 CSV`}):void 0,children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[F?.map((e,t)=>{let n=Z9[e.node_type]||js,r=Q9[e.node_type]||`#6b7280`;return(0,B.jsx)(zb.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:t*.03},className:`p-4 rounded-lg border cursor-pointer transition-all group ${a===e.id?`border-blue-300 bg-blue-50 shadow-sm`:`border-gray-100 hover:border-gray-200 hover:bg-gray-50`}`,onClick:()=>o(e.id),children:(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(`div`,{className:`p-2 rounded-lg`,style:{backgroundColor:`${r}15`},children:(0,B.jsx)(n,{className:`h-5 w-5`,style:{color:r}})}),(0,B.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-gray-900 truncate`,children:e.title}),(0,B.jsx)(Vb,{size:`sm`,variant:e.node_type===`outcome`?`success`:e.node_type===`decision`?`info`:`default`,children:e.node_type})]}),(0,B.jsx)(`p`,{className:`text-sm text-gray-600 mt-1 line-clamp-2`,children:e.content}),e.tags&&e.tags.trim()&&(0,B.jsx)(`div`,{className:`flex gap-1 mt-2`,children:e.tags.split(`,`).filter(e=>e.trim()).slice(0,3).map(e=>(0,B.jsx)(`span`,{className:`text-xs px-2 py-0.5 bg-gray-100 rounded-full text-gray-600`,children:e.trim()},e))})]}),(0,B.jsxs)(`div`,{className:`flex gap-1 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity`,children:[(0,B.jsx)(`button`,{onClick:t=>{t.stopPropagation(),g({id:e.id,title:e.title,content:e.content,tags:e.tags||``}),m(!0)},className:`p-1.5 rounded hover:bg-gray-200 text-gray-400 hover:text-gray-600`,children:(0,B.jsx)(bc,{className:`h-3.5 w-3.5`})}),(0,B.jsx)(`button`,{onClick:t=>{t.stopPropagation(),te(e.id)},className:`p-1.5 rounded hover:bg-red-100 text-gray-400 hover:text-red-600`,children:(0,B.jsx)(Cc,{className:`h-3.5 w-3.5`})})]})]})},e.id)}),(!F||F.length===0)&&(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-400`,children:[(0,B.jsx)(js,{className:`h-12 w-12 mb-4`}),(0,B.jsx)(`p`,{children:`暂无知识节点`}),(0,B.jsx)(`p`,{className:`text-sm mt-1`,children:`使用 Claude Code 进行开发后,知识会自动沉淀`})]})]}),j&&j.length>0&&(0,B.jsx)(`div`,{className:`mt-4`,children:(0,B.jsx)(t4,{currentPage:s,totalPages:P,onPageChange:c,pageSize:l,onPageSizeChange:e=>{u(e),c(1)},totalItems:j.length})})]})}),(0,B.jsx)(`div`,{children:(0,B.jsx)(Y,{title:`节点详情`,children:a&&j?(()=>{let e=j.find(e=>e.id===a);if(!e)return(0,B.jsx)(`div`,{className:`text-gray-400 text-center py-8`,children:`节点未找到`});let t=Z9[e.node_type]||js,n=Q9[e.node_type]||`#6b7280`;return(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`p-3 rounded-xl`,style:{backgroundColor:`${n}15`},children:(0,B.jsx)(t,{className:`h-6 w-6`,style:{color:n}})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`font-bold text-gray-900`,children:e.title}),(0,B.jsx)(Vb,{size:`sm`,children:e.node_type})]})]}),(0,B.jsx)(`div`,{className:`p-3 bg-gray-50 rounded-lg text-sm text-gray-700 whitespace-pre-wrap`,children:e.content}),e.tags&&e.tags.trim()&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-xs font-semibold text-gray-500 mb-2`,children:`标签`}),(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.tags.split(`,`).filter(e=>e.trim()).map(e=>(0,B.jsx)(`span`,{className:`text-xs px-2 py-1 bg-blue-50 text-blue-600 rounded-full`,children:e.trim()},e))})]}),E&&E.items.length>0&&(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`div`,{className:`text-xs font-semibold text-gray-500 mb-2`,children:[`关联节点 (`,E.total,`)`]}),(0,B.jsx)(`div`,{className:`space-y-2`,children:E.items.map((e,t)=>(0,B.jsxs)(`div`,{className:`p-2 bg-gray-50 rounded-lg text-sm cursor-pointer hover:bg-gray-100`,onClick:()=>o(e.id),children:[(0,B.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,B.jsxs)(`div`,{className:`text-xs text-gray-500`,children:[e.edge_type,` · `,e.node_type]})]},t))})]})]})})():(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-400`,children:[(0,B.jsx)(_c,{className:`h-8 w-8 mb-3`}),(0,B.jsx)(`p`,{className:`text-sm`,children:`点击左侧节点查看详情`})]})})})]}),d&&(0,B.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>f(!1),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl p-6 w-full max-w-2xl max-h-[90vh] overflow-y-auto`,onClick:e=>e.stopPropagation(),children:[(0,B.jsx)(`h3`,{className:`text-xl font-bold mb-4`,children:`创建知识节点`}),(0,B.jsxs)(`form`,{onSubmit:I,className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标题 *`}),(0,B.jsx)(`input`,{type:`text`,name:`title`,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`内容 *`}),(0,B.jsx)(`textarea`,{name:`content`,required:!0,rows:6,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`类型 *`}),(0,B.jsxs)(`select`,{name:`node_type`,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:`requirement`,children:`需求 (requirement)`}),(0,B.jsx)(`option`,{value:`decision`,children:`决策 (decision)`}),(0,B.jsx)(`option`,{value:`code_change`,children:`代码变更 (code_change)`}),(0,B.jsx)(`option`,{value:`outcome`,children:`结果 (outcome)`})]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`项目路径 *`}),(0,B.jsx)(`input`,{type:`text`,name:`project_path`,required:!0,placeholder:`/path/to/project`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,name:`tags`,placeholder:`tag1, tag2, tag3`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end pt-2`,children:[(0,B.jsx)(J,{type:`button`,variant:`secondary`,onClick:()=>f(!1),children:`取消`}),(0,B.jsx)(J,{type:`submit`,variant:`primary`,loading:O.isPending,children:`创建`})]})]})]})}),p&&h&&(0,B.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>m(!1),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl p-6 w-full max-w-2xl max-h-[90vh] overflow-y-auto`,onClick:e=>e.stopPropagation(),children:[(0,B.jsx)(`h3`,{className:`text-xl font-bold mb-4`,children:`编辑知识节点`}),(0,B.jsxs)(`form`,{onSubmit:L,className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标题`}),(0,B.jsx)(`input`,{type:`text`,name:`title`,defaultValue:h.title,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`内容`}),(0,B.jsx)(`textarea`,{name:`content`,defaultValue:h.content,required:!0,rows:6,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,name:`tags`,defaultValue:h.tags,placeholder:`tag1, tag2, tag3`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end pt-2`,children:[(0,B.jsx)(J,{type:`button`,variant:`secondary`,onClick:()=>m(!1),children:`取消`}),(0,B.jsx)(J,{type:`submit`,variant:`primary`,loading:k.isPending,children:`保存`})]})]})]})}),(0,B.jsx)(Q2,{open:x.open,title:x.title,description:x.description,variant:`danger`,onConfirm:x.onConfirm,onCancel:()=>S({...x,open:!1})})]})}function kle(){let e=Pn(),t=qe(),[n,r]=(0,z.useState)(``),[i,a]=(0,z.useState)(1),[o,s]=(0,z.useState)(12),[c,l]=(0,z.useState)(`lastActivity`),[u,d]=(0,z.useState)(!1),[f,p]=(0,z.useState)(!1),[m,h]=(0,z.useState)(null),[g,_]=(0,z.useState)(``),[v,y]=(0,z.useState)(``),{data:b}=ct({queryKey:[`project-meta-all`],queryFn:()=>W.get(`/api/projects/meta/all`).then(e=>e.data),staleTime:3e4}),x=b||{},S=lt({mutationFn:({projectPath:e,meta:t})=>W.put(`/api/projects/${encodeURIComponent(e)}/meta`,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`project-meta-all`]})}}),C=(e,t)=>{t.stopPropagation();let n=x[e]||{notes:``,tags:[],archived:!1};_(n.notes),y(n.tags.join(`, `)),h(e)},w=()=>{if(!m)return;let e=x[m]||{notes:``,tags:[],archived:!1};S.mutate({projectPath:m,meta:{notes:g.trim(),tags:v.split(`,`).map(e=>e.trim()).filter(Boolean),archived:e.archived}}),h(null)},T=(e,t)=>{t.stopPropagation();let n=x[e]||{notes:``,tags:[],archived:!1};S.mutate({projectPath:e,meta:{...n,archived:!n.archived}})},{data:E,isLoading:D}=ct({queryKey:[`projects`],queryFn:()=>fl({limit:1e3}).then(e=>e.data),refetchInterval:3e4});if(D)return(0,B.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,B.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600`})});let O=E?.items||[],k=e=>{c===e?d(e=>!e):(l(e),d(!1)),a(1)},A=O.filter(e=>{if(x[e.projectPath]?.archived&&!f)return!1;if(!n)return!0;let t=n.toLowerCase();return e.projectName.toLowerCase().includes(t)||e.projectPath.toLowerCase().includes(t)}).sort((e,t)=>{let n=0;return c===`name`?n=e.projectName.localeCompare(t.projectName):c===`lastActivity`?n=(e.lastActivity||``).localeCompare(t.lastActivity||``):c===`sessionCount`?n=e.sessionCount-t.sessionCount:c===`totalEvents`&&(n=e.totalEvents-t.totalEvents),u?n:-n}),j=Math.ceil(A.length/o),M=A.slice((i-1)*o,i*o);return(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`项目管理`}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`查看所有被 Forge 管理的项目`})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsxs)(Vb,{variant:`info`,children:[A.length,` 个项目`]}),(0,B.jsxs)(`button`,{onClick:()=>p(!f),className:ud(`flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg transition-colors`,f?`bg-blue-50 text-blue-600`:`text-gray-600 hover:bg-gray-50`),children:[(0,B.jsx)(Es,{className:`h-4 w-4`}),f?`隐藏归档`:`显示归档`]}),(0,B.jsxs)(`button`,{onClick:()=>{let e=[`项目名称`,`项目路径`,`会话数`,`Pipeline 数`,`质量问题数`,`总事件数`,`最近活动`],t=A.map(e=>[e.projectName,e.projectPath,e.sessionCount,e.pipelineCount,e.qualityIssueCount,e.totalEvents,e.lastActivity||``]);n4(`projects-${new Date().toISOString().slice(0,10)}.csv`,e,t)},className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:bg-gray-50 rounded-lg transition-colors`,children:[(0,B.jsx)(qs,{className:`h-4 w-4`}),`导出 CSV`]})]})]}),(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex gap-3 items-center`,children:[(0,B.jsxs)(`div`,{className:`relative flex-1`,children:[(0,B.jsx)(_c,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,B.jsx)(`input`,{type:`text`,placeholder:`搜索项目名称或路径...`,value:n,onChange:e=>{r(e.target.value),a(1)},className:`w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,B.jsx)(`span`,{className:`text-gray-500`,children:`排序:`}),[{key:`name`,label:`名称`},{key:`lastActivity`,label:`活动时间`},{key:`sessionCount`,label:`会话数`},{key:`totalEvents`,label:`事件数`}].map(({key:e,label:t})=>(0,B.jsxs)(`button`,{onClick:()=>k(e),className:ud(`px-3 py-1.5 rounded-lg transition-colors flex items-center gap-1`,c===e?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`),children:[t,c===e&&(0,B.jsx)(ks,{className:ud(`h-3 w-3`,u&&`rotate-180`)})]},e))]})]})}),(0,B.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:M.map((t,n)=>{let r=t.projectPath,i=x[r]||{notes:``,tags:[],archived:!1};return(0,B.jsx)(zb.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:n*.03},children:(0,B.jsx)(Y,{className:ud(`!p-0 overflow-hidden cursor-pointer hover:shadow-md transition-shadow h-full flex flex-col`,i.archived&&`opacity-60`),onClick:()=>e(`/projects/${encodeURIComponent(r)}`),children:(0,B.jsxs)(`div`,{className:`p-4 flex-1 flex flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-3 mb-3`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-blue-50 flex-shrink-0`,children:(0,B.jsx)($s,{className:`h-5 w-5 text-blue-600`})}),(0,B.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(`h3`,{className:`font-semibold text-gray-900 truncate`,children:t.projectName}),i.archived&&(0,B.jsx)(Es,{className:`h-3.5 w-3.5 text-gray-400 flex-shrink-0`})]}),(0,B.jsx)(`p`,{className:`text-xs text-gray-500 truncate`,children:r}),i.tags.length>0&&(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1`,children:i.tags.map(e=>(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-blue-50 text-blue-600 text-xs rounded`,children:[(0,B.jsx)(xc,{className:`h-2.5 w-2.5`}),e]},e))}),i.notes&&(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mt-1 truncate`,children:i.notes})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1 flex-shrink-0`,children:[(0,B.jsx)(`button`,{onClick:e=>T(r,e),className:`p-1 text-gray-400 hover:text-gray-600 rounded`,title:i.archived?`取消归档`:`归档`,children:(0,B.jsx)(Es,{className:`h-3.5 w-3.5`})}),(0,B.jsx)(`button`,{onClick:e=>C(r,e),className:`p-1 text-gray-400 hover:text-gray-600 rounded`,title:`项目设置`,children:(0,B.jsx)(vc,{className:`h-3.5 w-3.5`})})]})]}),(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-sm flex-1`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(Ts,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.sessionCount,` 会话`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(tc,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.pipelineCount,` Pipeline`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(yc,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.qualityIssueCount,` 质量`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(js,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.totalEvents,` 事件`]})]})]}),t.lastActivity&&(0,B.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-gray-400 mt-3 pt-3 border-t border-gray-100`,children:[(0,B.jsx)(Hs,{className:`h-3 w-3 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[`最近活动:`,Y2(md(t.lastActivity),`MM-dd HH:mm`)]})]})]})})},r)})}),A.length===0&&(0,B.jsxs)(`div`,{className:`text-center py-12`,children:[(0,B.jsx)($s,{className:`h-12 w-12 text-gray-300 mx-auto mb-3`}),(0,B.jsx)(`p`,{className:`text-gray-500`,children:`暂无项目`}),(0,B.jsx)(`p`,{className:`text-sm text-gray-400 mt-1`,children:`在任意目录使用 Claude Code 后,项目将自动出现在这里`})]}),A.length>0&&(0,B.jsx)(t4,{currentPage:i,totalPages:j,onPageChange:a,pageSize:o,onPageSizeChange:e=>{s(e),a(1)},totalItems:A.length}),m&&(0,B.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,onClick:()=>h(null),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl shadow-xl w-full max-w-md p-6`,onClick:e=>e.stopPropagation(),children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,B.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`项目设置`}),(0,B.jsx)(`button`,{onClick:()=>h(null),className:`text-gray-400 hover:text-gray-600`,children:(0,B.jsx)(kc,{className:`h-5 w-5`})})]}),(0,B.jsx)(`p`,{className:`text-xs text-gray-500 mb-4 truncate`,children:m}),(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`前端, 工具, 实验...`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`备注`}),(0,B.jsx)(`textarea`,{value:g,onChange:e=>_(e.target.value),rows:3,placeholder:`项目说明、注意事项...`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none`})]})]}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2 mt-5`,children:[(0,B.jsx)(`button`,{onClick:()=>h(null),className:`px-4 py-2 text-sm text-gray-600 hover:bg-gray-50 rounded-lg`,children:`取消`}),(0,B.jsx)(`button`,{onClick:w,className:`px-4 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700`,children:`保存`})]})]})})]})}function Ale(){let{encodedPath:e}=In(),t=Pn(),n=qe(),[r,i]=(0,z.useState)(`sessions`),[a,o]=(0,z.useState)(!1),[s,c]=(0,z.useState)(null),[l,u]=(0,z.useState)(null),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(``),[h,g]=(0,z.useState)(new Set),[_,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(null),[x,S]=(0,z.useState)(null),[C,w]=(0,z.useState)(null),[T,E]=(0,z.useState)(null),[D,O]=(0,z.useState)(!1),[k,A]=(0,z.useState)(null),[j,M]=(0,z.useState)(1),[N,ee]=(0,z.useState)(20),{data:P,isLoading:F}=ct({queryKey:[`project`,e],queryFn:()=>pl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e}),{data:I}=ct({queryKey:[`conventions`,e],queryFn:()=>hl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`convention`}),{data:L}=ct({queryKey:[`claudemd`,e],queryFn:()=>bl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`claudemd`}),{data:te}=ct({queryKey:[`claudemd-modules`,e],queryFn:()=>Cl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`claudemd`}),ne=lt({mutationFn:()=>ml(encodeURIComponent(decodeURIComponent(e))),onSuccess:()=>{n.invalidateQueries({queryKey:[`projects`]}),t(`/projects`)}}),re=lt({mutationFn:({id:t,name:n,content:r})=>gl(encodeURIComponent(decodeURIComponent(e)),t,n,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`conventions`,e]}),c(null),u(null)}}),R=lt({mutationFn:t=>_l(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:()=>{n.invalidateQueries({queryKey:[`conventions`,e]})}}),ie=lt({mutationFn:t=>xl(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:()=>{n.invalidateQueries({queryKey:[`claudemd`,e]}),f(!1)}}),ae=lt({mutationFn:()=>wl(encodeURIComponent(decodeURIComponent(e))),onSuccess:t=>{n.invalidateQueries({queryKey:[`claudemd`,e]}),b({success:!0,message:t.data.distilled?`蒸馏完成,压缩 ${t.data.reduction}%(${t.data.before} → ${t.data.after} 字符):${t.data.summary}`:t.data.message??`无需蒸馏`})},onError:e=>{b({success:!1,message:e.message})}}),[oe,se]=(0,z.useState)(null),[ce,le]=(0,z.useState)(null),[ue,de]=(0,z.useState)(!1),[fe,pe]=(0,z.useState)(!1),[me,he]=(0,z.useState)(null),[ge,_e]=(0,z.useState)(!1),[ve,ye]=(0,z.useState)(null),be=async()=>{de(!0),le(null);try{le((await Sl(encodeURIComponent(decodeURIComponent(e)))).data.profile)}catch(e){le({error:String(e)})}finally{de(!1)}},xe=async()=>{pe(!0),he(null);try{let t=await Tl(encodeURIComponent(decodeURIComponent(e)));he({success:t.data.success,message:t.data.message,claudeMdGenerated:t.data.claudeMdGenerated}),le(t.data.profile),n.invalidateQueries({queryKey:[`claudemd`,e]}),n.invalidateQueries({queryKey:[`project`,e]})}catch(e){he({success:!1,message:String(e)})}finally{pe(!1)}},Se=async()=>{_e(!0),ye(null);try{let t=await yl(encodeURIComponent(decodeURIComponent(e)));ye({success:t.data.success,message:t.data.message}),t.data.skipped||(n.invalidateQueries({queryKey:[`conventions`,e]}),n.invalidateQueries({queryKey:[`claudemd`,e]}))}catch(e){ye({success:!1,message:String(e)})}finally{_e(!1)}},Ce=lt({mutationFn:t=>vl(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:t=>{n.invalidateQueries({queryKey:[`conventions`,e]}),se({evolved:t.data.evolved,message:t.data.message,changes:t.data.changes??t.data.results?.flatMap(e=>e.changes),count:t.data.count})}}),we=async t=>{S(t),w(null),E({step:`init`,message:`连接中...`});try{let r=await fetch(`/api/quality/${t}/auto-fix`,{method:`POST`});if(!r.body)throw Error(`响应无数据流`);let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:t,value:r}=await i.read();if(t)break;o+=a.decode(r,{stream:!0});let s=o.split(`
|
|
73
|
+
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}Y9.displayName=`MiniMap`;var Cle=(0,z.memo)(Y9),wle=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Tle={[h7.Line]:`right`,[h7.Handle]:`bottom-right`};function Ele({nodeId:e,position:t,variant:n=h7.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let v=u9(),y=typeof e==`string`?e:v,b=A7(),x=(0,z.useRef)(null),S=n===h7.Handle,C=k7((0,z.useCallback)(wle(S&&p),[S,p]),T7),w=(0,z.useRef)(null),T=t??Tle[n];return(0,z.useEffect)(()=>{if(!(!x.current||!y))return w.current||=cse({domNode:x.current,nodeId:y,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=b.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=b.getState(),o=[],s={x:e.x,y:e.y},c=r.get(y);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Q5([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...S5({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:y,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:y,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:y,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};b.getState().triggerNodeChanges([n])}}),w.current.update({controlPosition:T,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{w.current?.destroy()}},[T,s,c,l,u,d,h,g,_,m]),(0,B.jsx)(`div`,{className:U4([`react-flow__resize-control`,`nodrag`,...T.split(`-`),n,r]),ref:x,style:{...i,scale:C,...o&&{[S?`backgroundColor`:`borderColor`]:o}},children:a})}(0,z.memo)(Ele);var X9={requirement:`#3b82f6`,decision:`#8b5cf6`,code_change:`#10b981`,outcome:`#f59e0b`};function Dle({nodes:e,edges:t,onNodeClick:n}){let r=(0,z.useMemo)(()=>e.map((e,t)=>({id:e.id,type:`default`,data:{label:(0,B.jsxs)(`div`,{className:`text-xs`,children:[(0,B.jsx)(`div`,{className:`font-semibold truncate max-w-[120px]`,children:e.title}),(0,B.jsx)(`div`,{className:`text-gray-500 text-[10px]`,children:e.node_type})]})},position:{x:t%5*200+Math.sin(t)*30,y:Math.floor(t/5)*150+Math.cos(t)*20},style:{background:X9[e.node_type]||`#6b7280`,color:`#fff`,border:`none`,borderRadius:`8px`,padding:`8px 12px`,minWidth:`140px`}})),[e]),i=(0,z.useMemo)(()=>t.map(e=>({id:e.id,source:e.from_node_id,target:e.to_node_id,label:e.edge_type,labelStyle:{fontSize:10,fill:`#6b7280`},style:{stroke:`#d1d5db`,strokeWidth:Math.max(1,e.weight)},markerEnd:{type:W8.ArrowClosed,color:`#d1d5db`}})),[t]),[a,,o]=Zce(r),[s,,c]=Qce(i),l=(0,z.useCallback)((e,t)=>{n?.(t.id)},[n]);return e.length===0?(0,B.jsx)(`div`,{className:`flex items-center justify-center h-full text-gray-400 text-sm`,children:`暂无知识节点`}):(0,B.jsxs)(Xce,{nodes:a,edges:s,onNodesChange:o,onEdgesChange:c,onNodeClick:l,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[(0,B.jsx)(rle,{color:`#f3f4f6`,gap:20}),(0,B.jsx)(ule,{}),(0,B.jsx)(Cle,{nodeColor:t=>X9[e.find(e=>e.id===t.id)?.node_type||``]||`#6b7280`,style:{background:`#f9fafb`}})]})}var Z9={requirement:Qs,decision:ac,code_change:Us,outcome:zs},Q9={requirement:`#3b82f6`,decision:`#8b5cf6`,code_change:`#10b981`,outcome:`#f59e0b`},$9=[`#3b82f6`,`#8b5cf6`,`#10b981`,`#f59e0b`,`#ef4444`,`#06b6d4`];function Ole(){let e=qe(),[t,n]=(0,z.useState)(``),[r,i]=(0,z.useState)(``),[a,o]=(0,z.useState)(null),[s,c]=(0,z.useState)(1),[l,u]=(0,z.useState)(20),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(!1),[h,g]=(0,z.useState)(null),[_,v]=(0,z.useState)(``),[y,b]=(0,z.useState)(`list`),[x,S]=(0,z.useState)({open:!1,title:``,description:``,onConfirm:()=>{}}),{data:C}=ct({queryKey:[`knowledge-overview`],queryFn:()=>el().then(e=>e.data)}),{data:w}=ct({queryKey:[`knowledge-search`,t],queryFn:()=>$c(t).then(e=>e.data),enabled:t.length>0}),{data:T}=ct({queryKey:[`knowledge-all`],queryFn:()=>$c(``).then(e=>e.data)}),{data:E}=ct({queryKey:[`knowledge-neighbors`,a],queryFn:()=>tl(a).then(e=>e.data),enabled:!!a}),{data:D}=ct({queryKey:[`knowledge-graph`,_],queryFn:()=>nl(_||void 0).then(e=>e.data),enabled:y===`graph`}),O=lt({mutationFn:rl,onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),e.invalidateQueries({queryKey:[`knowledge-overview`]}),f(!1)}}),k=lt({mutationFn:({id:e,data:t})=>il(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),m(!1),g(null)}}),A=lt({mutationFn:al,onSuccess:()=>{e.invalidateQueries({queryKey:[`knowledge-all`]}),e.invalidateQueries({queryKey:[`knowledge-overview`]}),o(null)}}),j=(t?w?.items:T?.items)?.filter(e=>(!r||e.node_type===r)&&(!_||e.project_path===_)),M=Array.from(new Set(T?.items.map(e=>e.node_type)||[])),N=Array.from(new Set(T?.items.map(e=>e.project_path||``).filter(Boolean)||[])),ee=C?.byType?Object.entries(C.byType).map(([e,t])=>({name:e,value:t})):[],P=Math.ceil((j?.length||0)/l),F=j?.slice((s-1)*l,s*l),I=e=>{e.preventDefault();let t=new FormData(e.currentTarget);O.mutate({title:t.get(`title`),content:t.get(`content`),node_type:t.get(`node_type`),project_path:t.get(`project_path`),tags:t.get(`tags`)})},L=e=>{if(e.preventDefault(),!h)return;let t=new FormData(e.currentTarget);k.mutate({id:h.id,data:{title:t.get(`title`),content:t.get(`content`),tags:t.get(`tags`)}})},te=e=>{S({open:!0,title:`删除知识节点`,description:`确认删除此知识节点?关联的边也会被删除。`,onConfirm:()=>{A.mutate(e),S(e=>({...e,open:!1}))}})};return(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsxs)(`div`,{className:`relative flex-1`,children:[(0,B.jsx)(_c,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,B.jsx)(`input`,{type:`text`,placeholder:`搜索知识节点(需求、决策、代码变更、结果)...`,value:t,onChange:e=>{n(e.target.value),c(1)},className:`w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 text-lg`})]}),(0,B.jsxs)(`select`,{value:r,onChange:e=>{i(e.target.value),c(1)},className:`px-3 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:``,children:`全部类型`}),M.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]}),(0,B.jsxs)(`select`,{value:_,onChange:e=>{v(e.target.value),c(1)},className:`px-3 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:``,children:`全部项目`}),N.map(e=>(0,B.jsx)(`option`,{value:e,children:e.split(`/`).pop()},e))]}),(0,B.jsx)(J,{variant:`primary`,size:`sm`,icon:fc,onClick:()=>f(!0),children:`创建节点`}),(0,B.jsxs)(`div`,{className:`flex border border-gray-200 rounded-lg overflow-hidden`,children:[(0,B.jsx)(`button`,{onClick:()=>b(`list`),className:`px-3 py-2 text-sm transition-colors ${y===`list`?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`}`,children:`列表`}),(0,B.jsxs)(`button`,{onClick:()=>b(`graph`),className:`px-3 py-2 text-sm transition-colors flex items-center gap-1 ${y===`graph`?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`}`,children:[(0,B.jsx)(cc,{className:`h-4 w-4`}),`图谱`]})]})]})}),(0,B.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,B.jsx)(Y,{title:`知识图谱概览`,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mb-4`,children:[(0,B.jsxs)(`div`,{className:`text-center p-4 bg-blue-50 rounded-xl`,children:[(0,B.jsx)(js,{className:`h-8 w-8 text-blue-500 mx-auto mb-2`}),(0,B.jsx)(`div`,{className:`text-3xl font-bold text-blue-600`,children:C?.totalNodes||0}),(0,B.jsx)(`div`,{className:`text-sm text-gray-600`,children:`知识节点`})]}),(0,B.jsxs)(`div`,{className:`text-center p-4 bg-purple-50 rounded-xl`,children:[(0,B.jsx)(tc,{className:`h-8 w-8 text-purple-500 mx-auto mb-2`}),(0,B.jsx)(`div`,{className:`text-3xl font-bold text-purple-600`,children:ee.length}),(0,B.jsx)(`div`,{className:`text-sm text-gray-600`,children:`节点类型`})]})]})}),(0,B.jsx)(Y,{title:`节点类型分布`,children:ee.length>0?(0,B.jsx)(RO,{width:`100%`,height:200,children:(0,B.jsxs)(z0,{children:[(0,B.jsx)(pJ,{data:ee,cx:`50%`,cy:`50%`,innerRadius:50,outerRadius:80,dataKey:`value`,label:({name:e,percent:t})=>`${e} ${(t*100).toFixed(0)}%`,children:ee.map((e,t)=>(0,B.jsx)(gW,{fill:$9[t%$9.length]},t))}),(0,B.jsx)(hW,{})]})}):(0,B.jsx)(`div`,{className:`flex items-center justify-center h-48 text-gray-400`,children:`暂无数据`})})]}),y===`graph`&&(0,B.jsx)(Y,{title:`知识图谱`,children:(0,B.jsx)(`div`,{className:`h-[600px] border border-gray-200 rounded-lg overflow-hidden`,children:D?(0,B.jsx)(Dle,{nodes:D.nodes,edges:D.edges,onNodeClick:o}):(0,B.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,B.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600`})})})}),y===`list`&&(0,B.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6`,children:[(0,B.jsx)(`div`,{className:`lg:col-span-2`,children:(0,B.jsxs)(Y,{title:`知识节点 (${j?.length||0})`,action:j&&j.length>0?(0,B.jsx)(J,{variant:`secondary`,size:`sm`,icon:qs,onClick:()=>{if(!j||j.length===0)return;let e=[`ID`,`标题`,`类型`,`内容`,`标签`,`项目路径`],t=j.map(e=>[e.id,e.title,e.node_type,e.content,e.tags||``,e.project_path||``]);n4(`knowledge-nodes-${Y2(new Date,`yyyyMMdd-HHmmss`)}.csv`,e,t)},children:`导出 CSV`}):void 0,children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[F?.map((e,t)=>{let n=Z9[e.node_type]||js,r=Q9[e.node_type]||`#6b7280`;return(0,B.jsx)(zb.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:t*.03},className:`p-4 rounded-lg border cursor-pointer transition-all group ${a===e.id?`border-blue-300 bg-blue-50 shadow-sm`:`border-gray-100 hover:border-gray-200 hover:bg-gray-50`}`,onClick:()=>o(e.id),children:(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(`div`,{className:`p-2 rounded-lg`,style:{backgroundColor:`${r}15`},children:(0,B.jsx)(n,{className:`h-5 w-5`,style:{color:r}})}),(0,B.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-gray-900 truncate`,children:e.title}),(0,B.jsx)(Vb,{size:`sm`,variant:e.node_type===`outcome`?`success`:e.node_type===`decision`?`info`:`default`,children:e.node_type})]}),(0,B.jsx)(`p`,{className:`text-sm text-gray-600 mt-1 line-clamp-2`,children:e.content}),e.tags&&e.tags.trim()&&(0,B.jsx)(`div`,{className:`flex gap-1 mt-2`,children:e.tags.split(`,`).filter(e=>e.trim()).slice(0,3).map(e=>(0,B.jsx)(`span`,{className:`text-xs px-2 py-0.5 bg-gray-100 rounded-full text-gray-600`,children:e.trim()},e))})]}),(0,B.jsxs)(`div`,{className:`flex gap-1 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity`,children:[(0,B.jsx)(`button`,{onClick:t=>{t.stopPropagation(),g({id:e.id,title:e.title,content:e.content,tags:e.tags||``}),m(!0)},className:`p-1.5 rounded hover:bg-gray-200 text-gray-400 hover:text-gray-600`,children:(0,B.jsx)(bc,{className:`h-3.5 w-3.5`})}),(0,B.jsx)(`button`,{onClick:t=>{t.stopPropagation(),te(e.id)},className:`p-1.5 rounded hover:bg-red-100 text-gray-400 hover:text-red-600`,children:(0,B.jsx)(Cc,{className:`h-3.5 w-3.5`})})]})]})},e.id)}),(!F||F.length===0)&&(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-400`,children:[(0,B.jsx)(js,{className:`h-12 w-12 mb-4`}),(0,B.jsx)(`p`,{children:`暂无知识节点`}),(0,B.jsx)(`p`,{className:`text-sm mt-1`,children:`使用 Claude Code 进行开发后,知识会自动沉淀`})]})]}),j&&j.length>0&&(0,B.jsx)(`div`,{className:`mt-4`,children:(0,B.jsx)(t4,{currentPage:s,totalPages:P,onPageChange:c,pageSize:l,onPageSizeChange:e=>{u(e),c(1)},totalItems:j.length})})]})}),(0,B.jsx)(`div`,{children:(0,B.jsx)(Y,{title:`节点详情`,children:a&&j?(()=>{let e=j.find(e=>e.id===a);if(!e)return(0,B.jsx)(`div`,{className:`text-gray-400 text-center py-8`,children:`节点未找到`});let t=Z9[e.node_type]||js,n=Q9[e.node_type]||`#6b7280`;return(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`p-3 rounded-xl`,style:{backgroundColor:`${n}15`},children:(0,B.jsx)(t,{className:`h-6 w-6`,style:{color:n}})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`font-bold text-gray-900`,children:e.title}),(0,B.jsx)(Vb,{size:`sm`,children:e.node_type})]})]}),(0,B.jsx)(`div`,{className:`p-3 bg-gray-50 rounded-lg text-sm text-gray-700 whitespace-pre-wrap`,children:e.content}),e.tags&&e.tags.trim()&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-xs font-semibold text-gray-500 mb-2`,children:`标签`}),(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.tags.split(`,`).filter(e=>e.trim()).map(e=>(0,B.jsx)(`span`,{className:`text-xs px-2 py-1 bg-blue-50 text-blue-600 rounded-full`,children:e.trim()},e))})]}),E&&E.items.length>0&&(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`div`,{className:`text-xs font-semibold text-gray-500 mb-2`,children:[`关联节点 (`,E.total,`)`]}),(0,B.jsx)(`div`,{className:`space-y-2`,children:E.items.map((e,t)=>(0,B.jsxs)(`div`,{className:`p-2 bg-gray-50 rounded-lg text-sm cursor-pointer hover:bg-gray-100`,onClick:()=>o(e.id),children:[(0,B.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,B.jsxs)(`div`,{className:`text-xs text-gray-500`,children:[e.edge_type,` · `,e.node_type]})]},t))})]})]})})():(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-400`,children:[(0,B.jsx)(_c,{className:`h-8 w-8 mb-3`}),(0,B.jsx)(`p`,{className:`text-sm`,children:`点击左侧节点查看详情`})]})})})]}),d&&(0,B.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>f(!1),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl p-6 w-full max-w-2xl max-h-[90vh] overflow-y-auto`,onClick:e=>e.stopPropagation(),children:[(0,B.jsx)(`h3`,{className:`text-xl font-bold mb-4`,children:`创建知识节点`}),(0,B.jsxs)(`form`,{onSubmit:I,className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标题 *`}),(0,B.jsx)(`input`,{type:`text`,name:`title`,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`内容 *`}),(0,B.jsx)(`textarea`,{name:`content`,required:!0,rows:6,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`类型 *`}),(0,B.jsxs)(`select`,{name:`node_type`,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,B.jsx)(`option`,{value:`requirement`,children:`需求 (requirement)`}),(0,B.jsx)(`option`,{value:`decision`,children:`决策 (decision)`}),(0,B.jsx)(`option`,{value:`code_change`,children:`代码变更 (code_change)`}),(0,B.jsx)(`option`,{value:`outcome`,children:`结果 (outcome)`})]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`项目路径 *`}),(0,B.jsx)(`input`,{type:`text`,name:`project_path`,required:!0,placeholder:`/path/to/project`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,name:`tags`,placeholder:`tag1, tag2, tag3`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end pt-2`,children:[(0,B.jsx)(J,{type:`button`,variant:`secondary`,onClick:()=>f(!1),children:`取消`}),(0,B.jsx)(J,{type:`submit`,variant:`primary`,loading:O.isPending,children:`创建`})]})]})]})}),p&&h&&(0,B.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>m(!1),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl p-6 w-full max-w-2xl max-h-[90vh] overflow-y-auto`,onClick:e=>e.stopPropagation(),children:[(0,B.jsx)(`h3`,{className:`text-xl font-bold mb-4`,children:`编辑知识节点`}),(0,B.jsxs)(`form`,{onSubmit:L,className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标题`}),(0,B.jsx)(`input`,{type:`text`,name:`title`,defaultValue:h.title,required:!0,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`内容`}),(0,B.jsx)(`textarea`,{name:`content`,defaultValue:h.content,required:!0,rows:6,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,name:`tags`,defaultValue:h.tags,placeholder:`tag1, tag2, tag3`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end pt-2`,children:[(0,B.jsx)(J,{type:`button`,variant:`secondary`,onClick:()=>m(!1),children:`取消`}),(0,B.jsx)(J,{type:`submit`,variant:`primary`,loading:k.isPending,children:`保存`})]})]})]})}),(0,B.jsx)(Q2,{open:x.open,title:x.title,description:x.description,variant:`danger`,onConfirm:x.onConfirm,onCancel:()=>S({...x,open:!1})})]})}function kle(){let e=Pn(),t=qe(),[n,r]=(0,z.useState)(``),[i,a]=(0,z.useState)(1),[o,s]=(0,z.useState)(12),[c,l]=(0,z.useState)(`lastActivity`),[u,d]=(0,z.useState)(!1),[f,p]=(0,z.useState)(!1),[m,h]=(0,z.useState)(null),[g,_]=(0,z.useState)(``),[v,y]=(0,z.useState)(``),{data:b}=ct({queryKey:[`project-meta-all`],queryFn:()=>W.get(`/projects/meta/all`).then(e=>e.data),staleTime:3e4}),x=b||{},S=lt({mutationFn:({projectPath:e,meta:t})=>W.put(`/projects/${encodeURIComponent(e)}/meta`,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`project-meta-all`]})}}),C=(e,t)=>{t.stopPropagation();let n=x[e]||{notes:``,tags:[],archived:!1};_(n.notes),y(n.tags.join(`, `)),h(e)},w=()=>{if(!m)return;let e=x[m]||{notes:``,tags:[],archived:!1};S.mutate({projectPath:m,meta:{notes:g.trim(),tags:v.split(`,`).map(e=>e.trim()).filter(Boolean),archived:e.archived}}),h(null)},T=(e,t)=>{t.stopPropagation();let n=x[e]||{notes:``,tags:[],archived:!1};S.mutate({projectPath:e,meta:{...n,archived:!n.archived}})},{data:E,isLoading:D}=ct({queryKey:[`projects`],queryFn:()=>fl({limit:1e3}).then(e=>e.data),refetchInterval:3e4});if(D)return(0,B.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,B.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600`})});let O=E?.items||[],k=e=>{c===e?d(e=>!e):(l(e),d(!1)),a(1)},A=O.filter(e=>{if(x[e.projectPath]?.archived&&!f)return!1;if(!n)return!0;let t=n.toLowerCase();return e.projectName.toLowerCase().includes(t)||e.projectPath.toLowerCase().includes(t)}).sort((e,t)=>{let n=0;return c===`name`?n=e.projectName.localeCompare(t.projectName):c===`lastActivity`?n=(e.lastActivity||``).localeCompare(t.lastActivity||``):c===`sessionCount`?n=e.sessionCount-t.sessionCount:c===`totalEvents`&&(n=e.totalEvents-t.totalEvents),u?n:-n}),j=Math.ceil(A.length/o),M=A.slice((i-1)*o,i*o);return(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`项目管理`}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`查看所有被 Forge 管理的项目`})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsxs)(Vb,{variant:`info`,children:[A.length,` 个项目`]}),(0,B.jsxs)(`button`,{onClick:()=>p(!f),className:ud(`flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg transition-colors`,f?`bg-blue-50 text-blue-600`:`text-gray-600 hover:bg-gray-50`),children:[(0,B.jsx)(Es,{className:`h-4 w-4`}),f?`隐藏归档`:`显示归档`]}),(0,B.jsxs)(`button`,{onClick:()=>{let e=[`项目名称`,`项目路径`,`会话数`,`Pipeline 数`,`质量问题数`,`总事件数`,`最近活动`],t=A.map(e=>[e.projectName,e.projectPath,e.sessionCount,e.pipelineCount,e.qualityIssueCount,e.totalEvents,e.lastActivity||``]);n4(`projects-${new Date().toISOString().slice(0,10)}.csv`,e,t)},className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:bg-gray-50 rounded-lg transition-colors`,children:[(0,B.jsx)(qs,{className:`h-4 w-4`}),`导出 CSV`]})]})]}),(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex gap-3 items-center`,children:[(0,B.jsxs)(`div`,{className:`relative flex-1`,children:[(0,B.jsx)(_c,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,B.jsx)(`input`,{type:`text`,placeholder:`搜索项目名称或路径...`,value:n,onChange:e=>{r(e.target.value),a(1)},className:`w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,B.jsx)(`span`,{className:`text-gray-500`,children:`排序:`}),[{key:`name`,label:`名称`},{key:`lastActivity`,label:`活动时间`},{key:`sessionCount`,label:`会话数`},{key:`totalEvents`,label:`事件数`}].map(({key:e,label:t})=>(0,B.jsxs)(`button`,{onClick:()=>k(e),className:ud(`px-3 py-1.5 rounded-lg transition-colors flex items-center gap-1`,c===e?`bg-blue-50 text-blue-700 font-medium`:`text-gray-600 hover:bg-gray-50`),children:[t,c===e&&(0,B.jsx)(ks,{className:ud(`h-3 w-3`,u&&`rotate-180`)})]},e))]})]})}),(0,B.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:M.map((t,n)=>{let r=t.projectPath,i=x[r]||{notes:``,tags:[],archived:!1};return(0,B.jsx)(zb.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:n*.03},children:(0,B.jsx)(Y,{className:ud(`!p-0 overflow-hidden cursor-pointer hover:shadow-md transition-shadow h-full flex flex-col`,i.archived&&`opacity-60`),onClick:()=>e(`/projects/${encodeURIComponent(r)}`),children:(0,B.jsxs)(`div`,{className:`p-4 flex-1 flex flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-3 mb-3`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-blue-50 flex-shrink-0`,children:(0,B.jsx)($s,{className:`h-5 w-5 text-blue-600`})}),(0,B.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(`h3`,{className:`font-semibold text-gray-900 truncate`,children:t.projectName}),i.archived&&(0,B.jsx)(Es,{className:`h-3.5 w-3.5 text-gray-400 flex-shrink-0`})]}),(0,B.jsx)(`p`,{className:`text-xs text-gray-500 truncate`,children:r}),i.tags.length>0&&(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1`,children:i.tags.map(e=>(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-blue-50 text-blue-600 text-xs rounded`,children:[(0,B.jsx)(xc,{className:`h-2.5 w-2.5`}),e]},e))}),i.notes&&(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mt-1 truncate`,children:i.notes})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1 flex-shrink-0`,children:[(0,B.jsx)(`button`,{onClick:e=>T(r,e),className:`p-1 text-gray-400 hover:text-gray-600 rounded`,title:i.archived?`取消归档`:`归档`,children:(0,B.jsx)(Es,{className:`h-3.5 w-3.5`})}),(0,B.jsx)(`button`,{onClick:e=>C(r,e),className:`p-1 text-gray-400 hover:text-gray-600 rounded`,title:`项目设置`,children:(0,B.jsx)(vc,{className:`h-3.5 w-3.5`})})]})]}),(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-sm flex-1`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(Ts,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.sessionCount,` 会话`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(tc,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.pipelineCount,` Pipeline`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(yc,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.qualityIssueCount,` 质量`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-600`,children:[(0,B.jsx)(js,{className:`h-4 w-4 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[t.totalEvents,` 事件`]})]})]}),t.lastActivity&&(0,B.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-gray-400 mt-3 pt-3 border-t border-gray-100`,children:[(0,B.jsx)(Hs,{className:`h-3 w-3 flex-shrink-0`}),(0,B.jsxs)(`span`,{children:[`最近活动:`,Y2(md(t.lastActivity),`MM-dd HH:mm`)]})]})]})})},r)})}),A.length===0&&(0,B.jsxs)(`div`,{className:`text-center py-12`,children:[(0,B.jsx)($s,{className:`h-12 w-12 text-gray-300 mx-auto mb-3`}),(0,B.jsx)(`p`,{className:`text-gray-500`,children:`暂无项目`}),(0,B.jsx)(`p`,{className:`text-sm text-gray-400 mt-1`,children:`在任意目录使用 Claude Code 后,项目将自动出现在这里`})]}),A.length>0&&(0,B.jsx)(t4,{currentPage:i,totalPages:j,onPageChange:a,pageSize:o,onPageSizeChange:e=>{s(e),a(1)},totalItems:A.length}),m&&(0,B.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,onClick:()=>h(null),children:(0,B.jsxs)(`div`,{className:`bg-white rounded-xl shadow-xl w-full max-w-md p-6`,onClick:e=>e.stopPropagation(),children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,B.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`项目设置`}),(0,B.jsx)(`button`,{onClick:()=>h(null),className:`text-gray-400 hover:text-gray-600`,children:(0,B.jsx)(kc,{className:`h-5 w-5`})})]}),(0,B.jsx)(`p`,{className:`text-xs text-gray-500 mb-4 truncate`,children:m}),(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`标签(逗号分隔)`}),(0,B.jsx)(`input`,{type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`前端, 工具, 实验...`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`备注`}),(0,B.jsx)(`textarea`,{value:g,onChange:e=>_(e.target.value),rows:3,placeholder:`项目说明、注意事项...`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none`})]})]}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2 mt-5`,children:[(0,B.jsx)(`button`,{onClick:()=>h(null),className:`px-4 py-2 text-sm text-gray-600 hover:bg-gray-50 rounded-lg`,children:`取消`}),(0,B.jsx)(`button`,{onClick:w,className:`px-4 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700`,children:`保存`})]})]})})]})}function Ale(){let{encodedPath:e}=In(),t=Pn(),n=qe(),[r,i]=(0,z.useState)(`sessions`),[a,o]=(0,z.useState)(!1),[s,c]=(0,z.useState)(null),[l,u]=(0,z.useState)(null),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(``),[h,g]=(0,z.useState)(new Set),[_,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(null),[x,S]=(0,z.useState)(null),[C,w]=(0,z.useState)(null),[T,E]=(0,z.useState)(null),[D,O]=(0,z.useState)(!1),[k,A]=(0,z.useState)(null),[j,M]=(0,z.useState)(1),[N,ee]=(0,z.useState)(20),{data:P,isLoading:F}=ct({queryKey:[`project`,e],queryFn:()=>pl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e}),{data:I}=ct({queryKey:[`conventions`,e],queryFn:()=>hl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`convention`}),{data:L}=ct({queryKey:[`claudemd`,e],queryFn:()=>bl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`claudemd`}),{data:te}=ct({queryKey:[`claudemd-modules`,e],queryFn:()=>Cl(encodeURIComponent(decodeURIComponent(e))).then(e=>e.data),enabled:!!e&&r===`claudemd`}),ne=lt({mutationFn:()=>ml(encodeURIComponent(decodeURIComponent(e))),onSuccess:()=>{n.invalidateQueries({queryKey:[`projects`]}),t(`/projects`)}}),re=lt({mutationFn:({id:t,name:n,content:r})=>gl(encodeURIComponent(decodeURIComponent(e)),t,n,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`conventions`,e]}),c(null),u(null)}}),R=lt({mutationFn:t=>_l(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:()=>{n.invalidateQueries({queryKey:[`conventions`,e]})}}),ie=lt({mutationFn:t=>xl(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:()=>{n.invalidateQueries({queryKey:[`claudemd`,e]}),f(!1)}}),ae=lt({mutationFn:()=>wl(encodeURIComponent(decodeURIComponent(e))),onSuccess:t=>{n.invalidateQueries({queryKey:[`claudemd`,e]}),b({success:!0,message:t.data.distilled?`蒸馏完成,压缩 ${t.data.reduction}%(${t.data.before} → ${t.data.after} 字符):${t.data.summary}`:t.data.message??`无需蒸馏`})},onError:e=>{b({success:!1,message:e.message})}}),[oe,se]=(0,z.useState)(null),[ce,le]=(0,z.useState)(null),[ue,de]=(0,z.useState)(!1),[fe,pe]=(0,z.useState)(!1),[me,he]=(0,z.useState)(null),[ge,_e]=(0,z.useState)(!1),[ve,ye]=(0,z.useState)(null),be=async()=>{de(!0),le(null);try{le((await Sl(encodeURIComponent(decodeURIComponent(e)))).data.profile)}catch(e){le({error:String(e)})}finally{de(!1)}},xe=async()=>{pe(!0),he(null);try{let t=await Tl(encodeURIComponent(decodeURIComponent(e)));he({success:t.data.success,message:t.data.message,claudeMdGenerated:t.data.claudeMdGenerated}),le(t.data.profile),n.invalidateQueries({queryKey:[`claudemd`,e]}),n.invalidateQueries({queryKey:[`project`,e]})}catch(e){he({success:!1,message:String(e)})}finally{pe(!1)}},Se=async()=>{_e(!0),ye(null);try{let t=await yl(encodeURIComponent(decodeURIComponent(e)));ye({success:t.data.success,message:t.data.message}),t.data.skipped||(n.invalidateQueries({queryKey:[`conventions`,e]}),n.invalidateQueries({queryKey:[`claudemd`,e]}))}catch(e){ye({success:!1,message:String(e)})}finally{_e(!1)}},Ce=lt({mutationFn:t=>vl(encodeURIComponent(decodeURIComponent(e)),t),onSuccess:t=>{n.invalidateQueries({queryKey:[`conventions`,e]}),se({evolved:t.data.evolved,message:t.data.message,changes:t.data.changes??t.data.results?.flatMap(e=>e.changes),count:t.data.count})}}),we=async t=>{S(t),w(null),E({step:`init`,message:`连接中...`});try{let r=await fetch(`/api/quality/${t}/auto-fix`,{method:`POST`});if(!r.body)throw Error(`响应无数据流`);let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:t,value:r}=await i.read();if(t)break;o+=a.decode(r,{stream:!0});let s=o.split(`
|
|
74
74
|
`);o=s.pop()??``;for(let t of s){if(!t.startsWith(`data: `))continue;let r=t.slice(6).trim();if(r)try{let t=JSON.parse(r);if(t.step===`error`){w({success:!1,message:t.message}),E(null),S(null);return}else if(t.step===`complete`){t.needsFix?w({success:!0,message:`需要修复:${t.reason}`,needsFix:!0,suggestion:t.fixSuggestion}):(w({success:!0,message:`无需修复:${t.reason}`,needsFix:!1}),n.invalidateQueries({queryKey:[`project`,e]})),E(null),S(null);return}else E({step:t.step,message:t.message})}catch(e){console.error(`解析 SSE 消息失败:`,e)}}}}catch(e){w({success:!1,message:String(e)}),E(null),S(null)}};return F||!P?(0,B.jsx)(`div`,{className:`flex items-center justify-center h-96`,children:(0,B.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600`})}):(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(a4,{items:[{label:`项目列表`,path:`/projects`},{label:P.projectName}]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:Ds,onClick:()=>t(`/projects`),children:`返回`}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-blue-50`,children:(0,B.jsx)($s,{className:`h-5 w-5 text-blue-600`})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h2`,{className:`text-xl font-bold text-gray-900`,children:P.projectName}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:P.projectPath})]})]})]}),(0,B.jsx)(J,{variant:`danger`,size:`sm`,icon:Cc,onClick:()=>o(!0),children:`删除项目`})]}),a&&(0,B.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,children:(0,B.jsxs)(Y,{className:`max-w-md`,children:[(0,B.jsx)(`h3`,{className:`text-lg font-bold text-gray-900 mb-2`,children:`确认删除项目`}),(0,B.jsxs)(`p`,{className:`text-sm text-gray-600 mb-4`,children:[`此操作将删除项目 `,(0,B.jsx)(`strong`,{children:P.projectName}),` 的所有数据(会话、Pipeline、事件、质量记录、知识节点等),且无法恢复。`]}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,onClick:()=>o(!1),children:`取消`}),(0,B.jsx)(J,{variant:`danger`,size:`sm`,onClick:()=>{ne.mutate(),o(!1)},children:`确认删除`})]})]})}),(0,B.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-5 gap-4`,children:[(0,B.jsx)(Y,{className:`!p-4 cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>i(`sessions`),children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(Ts,{className:`h-8 w-8 text-blue-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:P.sessions.total}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`会话`})]})]})}),(0,B.jsx)(Y,{className:`!p-4 cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>i(`pipelines`),children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(tc,{className:`h-8 w-8 text-green-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:P.pipelines.total}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Pipeline`})]})]})}),(0,B.jsx)(Y,{className:`!p-4 cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>i(`api`),children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(Sc,{className:`h-8 w-8 text-purple-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:P.events.total}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`事件`})]})]})}),(0,B.jsx)(Y,{className:`!p-4 cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>i(`quality`),children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(yc,{className:`h-8 w-8 text-orange-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:P.quality.total}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`质量`})]})]})}),(0,B.jsx)(Y,{className:`!p-4 cursor-pointer hover:shadow-md transition-shadow`,onClick:()=>i(`knowledge`),children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(js,{className:`h-8 w-8 text-pink-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:P.knowledge.total}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`知识`})]})]})})]}),(0,B.jsx)(`div`,{className:`flex gap-1 bg-gray-100 p-1 rounded-lg w-fit flex-wrap`,children:[{key:`sessions`,label:`会话`},{key:`pipelines`,label:`Pipeline`},{key:`quality`,label:`质量问题`},{key:`knowledge`,label:`知识文档`},{key:`rules`,label:`规则管理`},{key:`api`,label:`API 用量`},{key:`convention`,label:`自定义规范`},{key:`claudemd`,label:`CLAUDE.md`},{key:`environment`,label:`环境初始化`}].map(e=>(0,B.jsx)(`button`,{onClick:()=>i(e.key),className:`px-4 py-2 rounded-md text-sm font-medium transition-colors ${r===e.key?`bg-white text-gray-900 shadow-sm`:`text-gray-600 hover:text-gray-900`}`,children:e.label},e.key))}),r===`sessions`&&(0,B.jsxs)(Y,{children:[(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsxs)(`table`,{className:`w-full`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{className:`text-left text-sm text-gray-600`,children:[(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`会话 ID`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`首条对话`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`状态`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`开始时间`})]})}),(0,B.jsx)(`tbody`,{className:`text-sm`,children:(()=>{let n=P.sessions.items;return Math.ceil(n.length/N),(0,B.jsxs)(B.Fragment,{children:[n.slice((j-1)*N,j*N).map(n=>(0,B.jsxs)(`tr`,{onClick:()=>t(`/sessions/${n.session_id}`,{state:{from:`/projects/${e}`}}),className:`border-t border-gray-50 hover:bg-blue-50 cursor-pointer transition-colors`,children:[(0,B.jsx)(`td`,{className:`py-3 font-mono text-xs`,children:n.session_id.slice(0,12)}),(0,B.jsx)(`td`,{className:`py-3 text-gray-700 max-w-md truncate`,title:n.first_requirement,children:n.first_requirement?n.first_requirement:`(无对话记录)`}),(0,B.jsx)(`td`,{className:`py-3`,children:(0,B.jsx)(Vb,{size:`sm`,className:pd(n.status),children:n.status})}),(0,B.jsx)(`td`,{className:`py-3 text-gray-500`,children:Y2(md(n.start_time),`MM-dd HH:mm`)})]},n.session_id)),n.length===0&&(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:4,className:`py-8 text-center text-gray-400`,children:`暂无会话记录`})})]})})()})]})}),(()=>{let e=P.sessions.items,t=Math.ceil(e.length/N);return e.length>N?(0,B.jsx)(`div`,{className:`mt-4`,children:(0,B.jsx)(t4,{currentPage:j,totalPages:t,onPageChange:M,pageSize:N,onPageSizeChange:e=>{ee(e),M(1)},totalItems:e.length})}):null})()]}),r===`pipelines`&&(0,B.jsx)(Y,{children:(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsxs)(`table`,{className:`w-full`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{className:`text-left text-sm text-gray-600`,children:[(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`需求`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`阶段`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`时间`})]})}),(0,B.jsx)(`tbody`,{className:`text-sm`,children:P.pipelines.items.map(n=>(0,B.jsxs)(`tr`,{onClick:()=>t(`/pipelines/${n.id}`,{state:{from:`/projects/${e}`}}),className:`border-t border-gray-50 hover:bg-blue-50 cursor-pointer transition-colors`,children:[(0,B.jsx)(`td`,{className:`py-3 max-w-xs truncate`,children:n.requirement}),(0,B.jsx)(`td`,{className:`py-3`,children:(0,B.jsx)(Vb,{size:`sm`,children:n.phase})}),(0,B.jsx)(`td`,{className:`py-3 text-gray-500`,children:Y2(md(n.updated_at),`MM-dd HH:mm`)})]},n.id))})]})})}),r===`quality`&&(0,B.jsxs)(Y,{children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,B.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`共 `,P.quality.total,` 个质量问题`]}),P.quality.items.some(e=>!e.resolved)&&(0,B.jsx)(J,{size:`sm`,icon:Ac,onClick:async()=>{O(!0),A(null);try{let t=await fetch(`/api/quality/auto-fix-all`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({project_path:P?.projectPath})}),r=await t.json();t.ok?(A({success:!0,message:r.message,total:r.total,fixed:r.fixed,skipped:r.skipped,results:r.results}),n.invalidateQueries({queryKey:[`project`,e]})):A({success:!1,message:r.error||`批量修复失败`})}catch(e){A({success:!1,message:String(e)})}finally{O(!1)}},disabled:D,children:D?`批量修复中...`:`一键修复所有`})]}),(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsxs)(`table`,{className:`w-full`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{className:`text-left text-sm text-gray-600`,children:[(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`问题`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`级别`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`状态`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`时间`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`操作`})]})}),(0,B.jsx)(`tbody`,{className:`text-sm`,children:P.quality.items.map(e=>(0,B.jsxs)(`tr`,{className:`border-t border-gray-50 hover:bg-blue-50 transition-colors`,children:[(0,B.jsx)(`td`,{className:`py-3 max-w-xs truncate`,children:e.message}),(0,B.jsx)(`td`,{className:`py-3`,children:(0,B.jsx)(Vb,{size:`sm`,variant:e.level===`error`?`danger`:`warning`,children:e.level})}),(0,B.jsx)(`td`,{className:`py-3`,children:(0,B.jsx)(Vb,{size:`sm`,variant:e.resolved?`success`:`default`,children:e.resolved?`已解决`:`未解决`})}),(0,B.jsx)(`td`,{className:`py-3 text-gray-500`,children:Y2(md(e.created_at),`MM-dd HH:mm`)}),(0,B.jsx)(`td`,{className:`py-3`,children:!e.resolved&&(0,B.jsx)(`button`,{onClick:t=>{t.stopPropagation(),we(e.id)},disabled:x===e.id,className:`px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed`,children:x===e.id?(0,B.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(mc,{className:`h-3 w-3 animate-spin`}),T?.message||`分析中...`]}):`修复`})})]},e.id))})]})}),T&&(0,B.jsx)(`div`,{className:`mt-4 p-4 rounded-lg bg-blue-50 border border-blue-200`,children:(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(mc,{className:`h-4 w-4 text-blue-600 animate-spin`}),(0,B.jsx)(`p`,{className:`text-sm text-blue-800 font-medium`,children:T.message})]})}),k&&(0,B.jsxs)(`div`,{className:`mt-4 p-4 rounded-lg ${k.success?`bg-green-50 border border-green-200`:`bg-red-50 border border-red-200`}`,children:[(0,B.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium ${k.success?`text-green-800`:`text-red-800`}`,children:k.message}),(0,B.jsx)(`button`,{onClick:()=>A(null),className:`text-gray-400 hover:text-gray-600`,children:(0,B.jsx)(kc,{className:`h-4 w-4`})})]}),k.results&&k.results.length>0&&(0,B.jsx)(`div`,{className:`mt-3 space-y-2`,children:k.results.filter(e=>e.needsFix).map(e=>(0,B.jsxs)(`div`,{className:`p-3 bg-white rounded border border-gray-200`,children:[(0,B.jsxs)(`p`,{className:`text-xs font-medium text-gray-700 mb-1`,children:[`问题 #`,e.id]}),(0,B.jsx)(`p`,{className:`text-xs text-gray-600`,children:e.message}),(0,B.jsxs)(`p`,{className:`text-xs text-orange-600 mt-1`,children:[`需要手动处理:`,e.reason]})]},e.id))})]}),C&&(0,B.jsxs)(`div`,{className:`mt-4 p-4 rounded-lg ${C.success?`bg-green-50 border border-green-200`:`bg-red-50 border border-red-200`}`,children:[(0,B.jsx)(`p`,{className:`text-sm ${C.success?`text-green-800`:`text-red-800`}`,children:C.message}),C.needsFix&&C.suggestion&&(0,B.jsxs)(`div`,{className:`mt-2 p-3 bg-white rounded border border-gray-200`,children:[(0,B.jsx)(`p`,{className:`text-xs font-medium text-gray-700 mb-1`,children:`修复建议:`}),(0,B.jsx)(`pre`,{className:`text-xs text-gray-600 whitespace-pre-wrap`,children:C.suggestion})]}),(0,B.jsx)(`button`,{onClick:()=>w(null),className:`mt-2 text-xs text-gray-600 hover:text-gray-800`,children:`关闭`})]})]}),r===`knowledge`&&(0,B.jsx)(Y,{children:(0,B.jsx)(`div`,{className:`space-y-3`,children:P.knowledge.items.map(e=>(0,B.jsx)(`div`,{className:`p-4 border border-gray-100 rounded-lg hover:bg-blue-50 cursor-pointer transition-colors`,children:(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(Qs,{className:`h-5 w-5 text-blue-500 flex-shrink-0 mt-0.5`}),(0,B.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,B.jsx)(`h4`,{className:`font-medium text-gray-900 mb-1`,children:e.title}),(0,B.jsxs)(`p`,{className:`text-sm text-gray-600 line-clamp-2`,children:[e.content?.substring(0,150),`...`]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3 mt-2 text-xs text-gray-400`,children:[(0,B.jsx)(Vb,{size:`sm`,children:e.node_type}),(0,B.jsxs)(`span`,{children:[`更新于 `,Y2(md(e.updated_at),`MM-dd HH:mm`)]})]})]})]})},e.id))})}),r===`rules`&&(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(Y,{title:`意图识别规则`,children:(0,B.jsx)(`div`,{className:`space-y-2`,children:P.rules.intentRules.slice(0,10).map(e=>(0,B.jsx)(`div`,{className:`flex items-center justify-between p-3 border border-gray-100 rounded-lg`,children:(0,B.jsxs)(`div`,{className:`flex-1`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Vb,{size:`sm`,children:e.rule_type}),(0,B.jsx)(`code`,{className:`text-xs text-gray-600`,children:e.pattern})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3 mt-1 text-xs text-gray-400`,children:[(0,B.jsxs)(`span`,{children:[`命中 `,e.hit_count,` 次`]}),(0,B.jsxs)(`span`,{children:[`置信度 `,(e.confidence*100).toFixed(0),`%`]})]})]})},e.id))})}),(0,B.jsx)(Y,{title:`任务模式`,children:(0,B.jsx)(`div`,{className:`space-y-2`,children:P.rules.taskPatterns.slice(0,10).map(e=>(0,B.jsxs)(`div`,{className:`p-3 border border-gray-100 rounded-lg`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,B.jsx)(Vb,{size:`sm`,children:e.task_type}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-gray-500`,children:[(0,B.jsx)(wc,{className:`h-3 w-3`}),(0,B.jsxs)(`span`,{children:[`效果 `,(e.effectiveness_score*100).toFixed(0),`%`]})]})]}),(0,B.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:e.failure_pattern}),(0,B.jsxs)(`p`,{className:`text-xs text-gray-500`,children:[`策略:`,e.prevention_strategy]})]},e.id))})})]}),r===`api`&&(0,B.jsx)(Y,{children:(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsxs)(`table`,{className:`w-full`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{className:`text-left text-sm text-gray-600`,children:[(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`提供商`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`模型`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`调用次数`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`Prompt Tokens`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`Completion Tokens`}),(0,B.jsx)(`th`,{className:`pb-3 font-medium`,children:`总 Tokens`})]})}),(0,B.jsx)(`tbody`,{className:`text-sm`,children:P.apiUsage.map((e,t)=>(0,B.jsxs)(`tr`,{className:`border-t border-gray-50`,children:[(0,B.jsx)(`td`,{className:`py-3`,children:(0,B.jsx)(Vb,{size:`sm`,children:e.provider})}),(0,B.jsx)(`td`,{className:`py-3 text-gray-600`,children:e.model}),(0,B.jsx)(`td`,{className:`py-3 text-gray-900`,children:e.call_count.toLocaleString()}),(0,B.jsx)(`td`,{className:`py-3 text-gray-600`,children:e.total_prompt_tokens.toLocaleString()}),(0,B.jsx)(`td`,{className:`py-3 text-gray-600`,children:e.total_completion_tokens.toLocaleString()}),(0,B.jsx)(`td`,{className:`py-3 font-medium text-gray-900`,children:e.total_tokens.toLocaleString()})]},t))})]})})}),r===`convention`&&(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`管理写入项目 CLAUDE.md 的自定义规范约束块`}),(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(J,{size:`sm`,icon:Ac,variant:`secondary`,onClick:()=>{se(null),Ce.mutate(void 0)},disabled:Ce.isPending,children:Ce.isPending?`进化中...`:`全部进化`}),(0,B.jsx)(J,{size:`sm`,icon:fc,onClick:()=>u({id:`rule-${Date.now()}`,name:``,content:``}),children:`新增规范`})]})]}),oe&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-sm font-medium text-gray-900 mb-1`,children:oe.evolved?`进化完成${oe.count===void 0?``:`(${oe.count} 个规范)`}`:oe.message??`无需优化`}),oe.changes&&oe.changes.length>0&&(0,B.jsx)(`ul`,{className:`text-xs text-gray-600 space-y-0.5`,children:oe.changes.map((e,t)=>(0,B.jsxs)(`li`,{children:[`• `,e]},t))})]}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>se(null)})]})}),l&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`space-y-3`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(`input`,{className:`flex-1 px-3 py-1.5 text-sm border border-gray-200 rounded-md`,placeholder:`规范 ID(英文,如 code-style)`,value:l.id,onChange:e=>u({...l,id:e.target.value})}),(0,B.jsx)(`input`,{className:`flex-1 px-3 py-1.5 text-sm border border-gray-200 rounded-md`,placeholder:`规范名称`,value:l.name,onChange:e=>u({...l,name:e.target.value})})]}),(0,B.jsx)(`textarea`,{className:`w-full px-3 py-2 text-sm border border-gray-200 rounded-md font-mono h-40 resize-y`,placeholder:`规范内容(Markdown 格式)`,value:l.content,onChange:e=>u({...l,content:e.target.value})}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>u(null),children:`取消`}),(0,B.jsx)(J,{size:`sm`,icon:Ps,onClick:()=>re.mutate(l),disabled:!l.id||!l.name||!l.content,children:`保存`})]})]})}),I?.items.map(e=>(0,B.jsx)(Y,{children:s?.id===e.id?(0,B.jsxs)(`div`,{className:`space-y-3`,children:[(0,B.jsx)(`input`,{className:`w-full px-3 py-1.5 text-sm border border-gray-200 rounded-md`,value:s.name,onChange:e=>c({...s,name:e.target.value})}),(0,B.jsx)(`textarea`,{className:`w-full px-3 py-2 text-sm border border-gray-200 rounded-md font-mono h-48 resize-y`,value:s.content,onChange:e=>c({...s,content:e.target.value})}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>c(null),children:`取消`}),(0,B.jsx)(J,{size:`sm`,icon:Ps,onClick:()=>re.mutate(s),children:`保存`})]})]}):(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Vb,{size:`sm`,children:e.id}),(0,B.jsx)(`span`,{className:`font-medium text-gray-900`,children:e.name})]}),(0,B.jsxs)(`div`,{className:`flex gap-1`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:Ac,onClick:()=>{se(null),Ce.mutate(e.id)},title:`AI 进化`}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:uc,onClick:()=>c(e)}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:Cc,onClick:()=>R.mutate(e.id)})]})]}),(0,B.jsx)(`pre`,{className:`text-xs text-gray-600 bg-gray-50 p-3 rounded-md overflow-auto whitespace-pre-wrap ${h.has(e.id)?``:`max-h-32`}`,children:e.content}),e.content.length>300&&(0,B.jsx)(`button`,{className:`mt-1 text-xs text-blue-500 hover:text-blue-700`,onClick:()=>g(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n}),children:h.has(e.id)?`收起`:`展开全部(${e.content.length} 字符)`})]})},e.id)),I?.items.length===0&&(0,B.jsxs)(`div`,{className:`text-center py-12 text-gray-400`,children:[(0,B.jsx)(Qs,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,B.jsx)(`p`,{children:`暂无自定义规范,点击"新增规范"添加`})]})]}),r===`claudemd`&&(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(Qs,{className:`h-5 w-5 text-blue-500`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:`CLAUDE.md`}),(0,B.jsx)(`p`,{className:`text-xs text-gray-500`,children:L?.exists?`${(L.size/1024).toFixed(1)} KB · ${L.hasAutoSection?`含自动区块`:`纯用户内容`}`:`文件不存在`})]})]}),(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:mc,onClick:()=>n.invalidateQueries({queryKey:[`claudemd`,e]}),children:`刷新`}),L?.exists&&(0,B.jsx)(J,{variant:`secondary`,size:`sm`,icon:Ac,onClick:()=>{b(null),ae.mutate()},disabled:ae.isPending,title:`AI 蒸馏:压缩冗余内容,保留核心规范`,children:ae.isPending?`蒸馏中...`:`蒸馏`}),L?.exists&&!d&&(0,B.jsx)(J,{size:`sm`,icon:uc,onClick:()=>{m(L.content||``),f(!0)},children:`编辑`})]})]})}),y&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,B.jsx)(`p`,{className:`text-sm ${y.success?`text-gray-900`:`text-red-600`}`,children:y.message}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>b(null)})]})}),d&&(0,B.jsxs)(Y,{children:[(0,B.jsx)(`textarea`,{className:`w-full px-3 py-2 text-sm border border-gray-200 rounded-md font-mono h-96 resize-y`,value:p,onChange:e=>m(e.target.value)}),(0,B.jsxs)(`div`,{className:`flex gap-2 justify-end mt-3`,children:[(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>f(!1),children:`取消`}),(0,B.jsx)(J,{size:`sm`,icon:Ps,onClick:()=>ie.mutate(p),children:`保存`})]})]}),!d&&L?.exists&&(0,B.jsx)(Y,{title:`内容预览`,children:(0,B.jsx)(`pre`,{className:`text-xs text-gray-700 bg-gray-50 p-4 rounded-md overflow-auto max-h-96 whitespace-pre-wrap font-mono`,children:L.content})}),(0,B.jsx)(Y,{title:`子模块 (${te?.total??0})`,children:te?.items.length===0?(0,B.jsx)(`p`,{className:`text-sm text-gray-400`,children:`未检测到子模块`}):(0,B.jsx)(`div`,{className:`space-y-2`,children:te?.items.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center justify-between p-3 border border-gray-100 rounded-lg`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)($s,{className:`h-4 w-4 text-gray-400`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-sm font-medium text-gray-900`,children:e.name}),(0,B.jsx)(`p`,{className:`text-xs text-gray-400`,children:e.relativePath})]})]}),(0,B.jsx)(Vb,{size:`sm`,variant:e.hasClaudeMd?`success`:`default`,children:e.hasClaudeMd?`已有 CLAUDE.md`:`未生成`})]},e.path))})})]}),r===`environment`&&(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`font-medium text-gray-900 mb-1`,children:`环境检测 & 项目初始化`}),(0,B.jsx)(`p`,{className:`text-sm text-gray-500`,children:`检测项目技术栈、创建 .claude-forge 目录、自动生成 CLAUDE.md(如不存在)`})]}),(0,B.jsxs)(`div`,{className:`flex gap-2 flex-shrink-0`,children:[(0,B.jsx)(J,{variant:`secondary`,size:`sm`,icon:vc,onClick:be,disabled:ue,children:ue?`检测中...`:`环境检测`}),(0,B.jsx)(J,{size:`sm`,icon:Ac,onClick:xe,disabled:fe,children:fe?`初始化中...`:`一键初始化`}),(0,B.jsx)(J,{size:`sm`,icon:Qs,onClick:Se,disabled:ge,children:ge?`生成中...`:`初始化规范`})]})]})}),me&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-2`,children:[me.success?(0,B.jsx)(Ps,{className:`h-4 w-4 text-green-500 mt-0.5 flex-shrink-0`}):(0,B.jsx)(kc,{className:`h-4 w-4 text-red-500 mt-0.5 flex-shrink-0`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-sm font-medium ${me.success?`text-gray-900`:`text-red-600`}`,children:me.message}),me.claudeMdGenerated&&(0,B.jsx)(`p`,{className:`text-xs text-green-600 mt-0.5`,children:`CLAUDE.md 已自动生成`})]})]}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>he(null)})]})}),ve&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-2`,children:[ve.success?(0,B.jsx)(Ps,{className:`h-4 w-4 text-green-500 mt-0.5 flex-shrink-0`}):(0,B.jsx)(kc,{className:`h-4 w-4 text-red-500 mt-0.5 flex-shrink-0`}),(0,B.jsx)(`p`,{className:ud(`text-sm font-medium`,ve.success?`text-gray-900`:`text-red-600`),children:ve.message})]}),(0,B.jsx)(J,{variant:`ghost`,size:`sm`,icon:kc,onClick:()=>ye(null)})]})}),ce&&!(`error`in ce)&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Y,{title:`技术栈`,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 text-sm`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`项目名称`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.projectName})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`包管理器`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.packageManager||`未检测到`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`测试框架`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.testFramework||`未检测到`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`构建工具`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.buildTool||`未检测到`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`Linter`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.linter||`未检测到`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-gray-400 mb-1`,children:`Formatter`}),(0,B.jsx)(`p`,{className:`font-medium text-gray-900`,children:ce.formatter||`未检测到`})]})]})}),ce.languages.length>0&&(0,B.jsx)(Y,{title:`检测到的语言`,children:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ce.languages.map((e,t)=>(0,B.jsxs)(Vb,{size:`sm`,children:[e.name,e.version?` ${e.version}`:``]},t))})}),ce.frameworks.length>0&&(0,B.jsx)(Y,{title:`检测到的框架`,children:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ce.frameworks.map((e,t)=>(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1 bg-blue-50 rounded-md`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium text-blue-700`,children:e.name}),(0,B.jsx)(`span`,{className:`text-xs text-blue-400`,children:e.category})]},t))})}),Object.keys(ce.scripts).length>0&&(0,B.jsx)(Y,{title:`常用脚本`,children:(0,B.jsx)(`div`,{className:`space-y-1`,children:Object.entries(ce.scripts).map(([e,t])=>(0,B.jsxs)(`div`,{className:`flex items-start gap-3 text-sm py-1 border-b border-gray-50 last:border-0`,children:[(0,B.jsx)(`span`,{className:`font-mono text-blue-600 flex-shrink-0 w-24`,children:e}),(0,B.jsx)(`span`,{className:`text-gray-600 font-mono text-xs break-all`,children:t})]},e))})}),ce.keyDirectories.length>0&&(0,B.jsx)(Y,{title:`关键目录`,children:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ce.keyDirectories.map((e,t)=>(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1 bg-gray-50 rounded-md`,children:[(0,B.jsx)($s,{className:`h-3.5 w-3.5 text-gray-400`}),(0,B.jsx)(`span`,{className:`text-sm text-gray-700 font-mono`,children:e})]},t))})})]}),ce&&`error`in ce&&(0,B.jsx)(Y,{children:(0,B.jsxs)(`p`,{className:`text-sm text-red-600`,children:[`检测失败:`,ce.error]})})]})]})}function jle(){return(0,B.jsx)(Tte,{children:(0,B.jsxs)(Ic,{children:[(0,B.jsx)(wte,{}),(0,B.jsx)(gd,{children:(0,B.jsxs)(lr,{children:[(0,B.jsx)(sr,{path:`/`,element:(0,B.jsx)(or,{to:`/dashboard`,replace:!0})}),(0,B.jsx)(sr,{path:`/dashboard`,element:(0,B.jsx)(e4,{})}),(0,B.jsx)(sr,{path:`/sessions`,element:(0,B.jsx)(i4,{})}),(0,B.jsx)(sr,{path:`/sessions/:id`,element:(0,B.jsx)(o4,{})}),(0,B.jsx)(sr,{path:`/events`,element:(0,B.jsx)(k4,{})}),(0,B.jsx)(sr,{path:`/pipelines`,element:(0,B.jsx)(j4,{})}),(0,B.jsx)(sr,{path:`/pipelines/:id`,element:(0,B.jsx)(F4,{})}),(0,B.jsx)(sr,{path:`/projects`,element:(0,B.jsx)(kle,{})}),(0,B.jsx)(sr,{path:`/projects/:encodedPath`,element:(0,B.jsx)(Ale,{})}),(0,B.jsx)(sr,{path:`/quality`,element:(0,B.jsx)(I4,{})}),(0,B.jsx)(sr,{path:`/analytics`,element:(0,B.jsx)(H4,{})}),(0,B.jsx)(sr,{path:`/knowledge`,element:(0,B.jsx)(Ole,{})}),(0,B.jsx)(sr,{path:`/config`,element:(0,B.jsx)(R4,{})})]})})]})})}var Mle=new Ue({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4}}});jc.createRoot(document.getElementById(`root`)).render((0,B.jsx)(z.StrictMode,{children:(0,B.jsx)(Je,{client:Mle,children:(0,B.jsx)(Xr,{children:(0,B.jsx)(jle,{})})})}));
|