@axiom-lattice/gateway 10.0.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/embed/embed-page-AgentDetailSideApp-5L5GY5TY.js +1 -0
  2. package/dist/embed/embed-page-AgentGovernanceWorkbench-RKNSCQUM.js +1 -0
  3. package/dist/embed/{embed-page-LangfuseDashboard-NPYFMKK3.js → embed-page-LangfuseDashboard-QHWHMJVB.js} +1 -1
  4. package/dist/embed/{embed-page-MessageGraph-JUCEXYLU.js → embed-page-MessageGraph-HDJYCYZV.js} +1 -1
  5. package/dist/embed/{embed-page-ReactChart-2QJ3QRBH.js → embed-page-ReactChart-KJS73V5Q.js} +1 -1
  6. package/dist/embed/embed-page-SkillFlow-ULY3XZ3A.js +1 -0
  7. package/dist/embed/{embed-page-TasksSideApp-SBHVHNVT.js → embed-page-TasksSideApp-X2YZGU7K.js} +1 -1
  8. package/dist/embed/{embed-page-ThreadMaintenancePanel-LCCRUA75.js → embed-page-ThreadMaintenancePanel-N5IFOOFT.js} +1 -1
  9. package/dist/embed/{embed-page-TopologyRuntimeView-ATA23XXF.js → embed-page-TopologyRuntimeView-LZTSYJE5.js} +1 -1
  10. package/dist/embed/embed-page-WorkflowAutomationView-KIKV62O2.js +3 -0
  11. package/dist/embed/{embed-page-chunk-Q7Z7MHOM.js → embed-page-chunk-3FNSGFP2.js} +1 -1
  12. package/dist/embed/embed-page-chunk-3XPHW2C7.js +1 -0
  13. package/dist/embed/{embed-page-chunk-VNRFN74K.js → embed-page-chunk-4BPMGDDV.js} +1 -1
  14. package/dist/embed/{embed-page-chunk-7F5BSMP3.js → embed-page-chunk-54M4265G.js} +1 -1
  15. package/dist/embed/{embed-page-chunk-DJKD2PHO.js → embed-page-chunk-5AWYMAAX.js} +1 -1
  16. package/dist/embed/embed-page-chunk-5HWN5HSA.js +2 -0
  17. package/dist/embed/{embed-page-chunk-RFF7S4H5.js → embed-page-chunk-5QZRLAW2.js} +5 -5
  18. package/dist/embed/{embed-page-chunk-ODTY6SE7.js → embed-page-chunk-BBIV2YA2.js} +1 -1
  19. package/dist/embed/{embed-page-chunk-F7TA3LRH.js → embed-page-chunk-BUFWD6SE.js} +28 -28
  20. package/dist/embed/{embed-page-chunk-HUH33Z2E.js → embed-page-chunk-DI5UAV2I.js} +1 -1
  21. package/dist/embed/embed-page-chunk-FF2HNPMW.js +242 -0
  22. package/dist/embed/{embed-page-chunk-FE6KYRCO.js → embed-page-chunk-HQLSH3FC.js} +1 -1
  23. package/dist/embed/{embed-page-chunk-B2KNZ3EW.js → embed-page-chunk-L7GPZSYD.js} +1 -1
  24. package/dist/embed/embed-page-chunk-MVT6CPWE.js +6986 -0
  25. package/dist/embed/{embed-page-chunk-PTKGTA4B.js → embed-page-chunk-YBP3MD23.js} +1 -1
  26. package/dist/embed/{embed-page-chunk-34RWKVD7.js → embed-page-chunk-Z4Z6VCUZ.js} +1 -1
  27. package/dist/embed/{embed-page-code-highlighter-72YW5HXH.js → embed-page-code-highlighter-4XNLEZAM.js} +1 -1
  28. package/dist/embed/embed-page-en-2S7Q4NKN.js +1 -0
  29. package/dist/embed/embed-page-en-62EWM6GG.js +1 -0
  30. package/dist/embed/embed-page-en-N642QNBS.js +1 -0
  31. package/dist/embed/embed-page-en-TQ2XQQ5G.js +1 -0
  32. package/dist/embed/{embed-page-mermaid-4PZJJXQU.js → embed-page-mermaid-QZJOSGTZ.js} +1 -1
  33. package/dist/embed/embed-page-zh-55JYGLJM.js +1 -0
  34. package/dist/embed/embed-page-zh-7MFXKHQB.js +1 -0
  35. package/dist/embed/embed-page-zh-GX6IEO57.js +1 -0
  36. package/dist/embed/embed-page-zh-HRXFYKH4.js +1 -0
  37. package/dist/embed/embed-page.js +1 -1
  38. package/dist/embed/mcp-app-page.js +32 -32
  39. package/dist/index.js +46 -113
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +49 -114
  42. package/dist/index.mjs.map +1 -1
  43. package/package.json +7 -7
  44. package/dist/embed/embed-page-AgentDetailSideApp-X5HKDN3N.js +0 -1
  45. package/dist/embed/embed-page-AgentGovernanceWorkbench-MFXL7BOW.js +0 -1
  46. package/dist/embed/embed-page-SkillFlow-PFEXQ75Z.js +0 -1
  47. package/dist/embed/embed-page-WorkflowAutomationView-OVGOUVXH.js +0 -3
  48. package/dist/embed/embed-page-chunk-HLBQ5JKL.js +0 -6968
  49. package/dist/embed/embed-page-chunk-LZ4ITV3M.js +0 -242
  50. package/dist/embed/embed-page-chunk-QOPHOXA7.js +0 -3
  51. package/dist/embed/embed-page-chunk-WE6PZS2N.js +0 -1
  52. package/dist/embed/embed-page-en-ISNUZBPO.js +0 -1
  53. package/dist/embed/embed-page-en-KZQZS4JN.js +0 -1
  54. package/dist/embed/embed-page-en-QJRX2NQE.js +0 -1
  55. package/dist/embed/embed-page-en-VHD2WUUG.js +0 -1
  56. package/dist/embed/embed-page-zh-A7DSGF6P.js +0 -1
  57. package/dist/embed/embed-page-zh-HTEHFCSL.js +0 -1
  58. package/dist/embed/embed-page-zh-KSZOJPOV.js +0 -1
  59. package/dist/embed/embed-page-zh-MDJTBW2K.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as P,o as V}from"./embed-page-chunk-5QZRLAW2.js";import{l as _}from"./embed-page-chunk-3FNSGFP2.js";import{a as j}from"./embed-page-chunk-QV7QAJ4N.js";import{Ja as G}from"./embed-page-chunk-L7GPZSYD.js";import{Da as y,Ia as C,Ma as U,_ as R,_a as O,aa as M,bb as L,za as q}from"./embed-page-chunk-BUFWD6SE.js";import{a as D}from"./embed-page-chunk-R5QL57JJ.js";import{f as w}from"./embed-page-chunk-QBTAJ2YI.js";var d=w(D());function W(f){let k=V("__GLOBAL__"),[b,a]=(0,d.useState)(!1),[x,m]=(0,d.useState)(null),S=(0,d.useCallback)(()=>{f?.onUnauthorized?f.onUnauthorized():window.dispatchEvent(new CustomEvent("lattice:unauthorized"))},[f?.onUnauthorized]),s=(0,d.useCallback)(async(i,l,n,u)=>{a(!0),m(null);try{return await k.request(l,{method:i,body:n,headers:u?.headers})}catch(v){throw v instanceof P&&S(),m(v),v}finally{a(!1)}},[k,S]),z=(0,d.useCallback)((i,l)=>s("GET",i,void 0,l),[s]),I=(0,d.useCallback)((i,l,n)=>s("POST",i,l,n),[s]),r=(0,d.useCallback)((i,l,n)=>s("PUT",i,l,n),[s]),t=(0,d.useCallback)((i,l)=>s("DELETE",i,void 0,l),[s]);return{get:z,post:I,put:r,del:t,isLoading:b,error:x}}var T=w(D());var e=w(j()),{TextArea:$}=C,{Text:h}=L,J=({open:f,onCancel:k,onSuccess:b,skill:a})=>{let{message:x}=M.useApp(),[m]=y.useForm(),[S,s]=(0,T.useState)(!1),{post:z,put:I}=W(),{token:r}=O.useToken(),t=_(),i=!!a,l=[{key:"category",value:"global"}],[n,u]=(0,T.useState)(l);(0,T.useEffect)(()=>{f&&a?(m.setFieldsValue({name:a.name,description:a.description,license:a.license||"",compatibility:a.compatibility||"",content:a.content||""}),a.metadata?u(Object.entries(a.metadata).map(([o,c])=>({key:o,value:c}))):u(l)):f&&!a&&(m.resetFields(),u(l))},[f,a]);let v=async()=>{try{let o=await m.validateFields();s(!0);let c=n.length>0?n.reduce((B,F)=>(F.key&&(B[F.key]=F.value),B),{}):void 0,p={id:o.name,name:o.name,description:o.description,license:o.license||void 0,compatibility:o.compatibility||void 0,metadata:c,content:o.content||void 0,subSkills:void 0},g;i?g=await I(`/api/skills/${a.id}`,p):g=await z("/api/skills",p),g.success?(x.success(t(i?"chatConfig.skill.updated":"chatConfig.skill.created")),m.resetFields(),u(l),b?.(),k()):x.error(g.message||t(i?"chatConfig.skill.updateFailed":"chatConfig.skill.createFailed"))}catch(o){if(o.errorFields)return;x.error(o.message||t(i?"chatConfig.skill.updateError":"chatConfig.skill.createError"))}finally{s(!1)}},A=()=>{m.resetFields(),u(l),k()},E=(o,c,p)=>{let g=[...n];g[o]={...g[o],[c]:p},u(g)},H=()=>{u([...n,{key:"",value:""}])};return(0,e.jsx)(U,{title:t(i?"chatConfig.skill.edit.title":"chatConfig.skill.create.title"),open:f,onCancel:A,footer:null,width:520,destroyOnClose:!0,styles:{body:{padding:16}},children:(0,e.jsx)(y,{form:m,layout:"vertical",onFinish:v,autoComplete:"off",children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary},children:t("chatConfig.skill.field.name")}),(0,e.jsx)(y.Item,{name:"name",rules:[{required:!0,message:t("chatConfig.skill.validation.nameRequired")},{pattern:/^[a-z0-9]+(-[a-z0-9]+)*$/,message:t("chatConfig.skill.validation.namePattern")},{min:1,max:64,message:t("chatConfig.skill.validation.nameLength")}],style:{marginBottom:0},children:(0,e.jsx)(C,{placeholder:"e.g., data-analysis",disabled:i})})]}),(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary},children:t("chatConfig.skill.field.description")}),(0,e.jsx)(y.Item,{name:"description",rules:[{required:!0,message:t("chatConfig.skill.validation.descriptionRequired")}],style:{marginBottom:0},children:(0,e.jsx)($,{placeholder:t("chatConfig.skill.placeholder.description"),autoSize:{minRows:2,maxRows:4}})})]}),(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary},children:t("chatConfig.skill.field.license")}),(0,e.jsx)(y.Item,{name:"license",style:{marginBottom:0},children:(0,e.jsx)(C,{placeholder:t("chatConfig.skill.placeholder.license")})})]}),(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary},children:t("chatConfig.skill.field.compatibility")}),(0,e.jsx)(y.Item,{name:"compatibility",style:{marginBottom:0},children:(0,e.jsx)(C,{placeholder:t("chatConfig.skill.placeholder.compatibility")})})]}),(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary,fontWeight:500},children:t("chatConfig.skill.field.metadata")}),(0,e.jsx)(R,{size:"small",icon:(0,e.jsx)(G,{}),onClick:H,children:t("chatConfig.skill.metadata.add")})]}),(0,e.jsxs)(q,{direction:"vertical",size:8,style:{width:"100%"},children:[n.length===0&&(0,e.jsx)(h,{style:{fontSize:11,color:r.colorTextTertiary},children:t("chatConfig.skill.metadata.empty")}),n.map((o,c)=>(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,width:"100%"},children:[(0,e.jsx)(h,{style:{fontSize:11,color:r.colorTextSecondary},children:t("chatConfig.skill.metadata.row",{index:c+1})}),(0,e.jsxs)(q,{style:{width:"100%"},size:8,wrap:!0,children:[(0,e.jsx)(C,{value:o.key,placeholder:t("chatConfig.keyValue.key"),style:{width:140},onChange:p=>E(c,"key",p.target.value)}),(0,e.jsx)(C,{value:o.value,placeholder:t("chatConfig.keyValue.value"),style:{flex:1,minWidth:200},onChange:p=>E(c,"value",p.target.value)})]})]},c))]})]}),(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,e.jsx)(h,{style:{fontSize:12,color:r.colorTextSecondary},children:t("chatConfig.skill.field.content")}),(0,e.jsx)(y.Item,{name:"content",style:{marginBottom:0},children:(0,e.jsx)($,{placeholder:t("chatConfig.skill.placeholder.content"),autoSize:{minRows:4,maxRows:8}})})]}),(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:8,marginTop:8},children:[(0,e.jsx)(R,{onClick:A,children:t("common.cancel")}),(0,e.jsx)(R,{type:"primary",htmlType:"submit",loading:S,children:t(i?"chatConfig.skill.action.save":"chatConfig.skill.action.create")})]})]})})})},oe=J;export{W as a,oe as b};
@@ -1,4 +1,4 @@
1
- import{C as M,E as N,F as S,I as z,J as w}from"./embed-page-chunk-HLBQ5JKL.js";import{g as D}from"./embed-page-chunk-7F5BSMP3.js";import{v as $,w as L}from"./embed-page-chunk-F7ZUYG42.js";import{l as v}from"./embed-page-chunk-Q7Z7MHOM.js";import{a as B}from"./embed-page-chunk-QV7QAJ4N.js";import{Ja as O,Sa as P,ba as C,bb as R}from"./embed-page-chunk-F7TA3LRH.js";import{a as Y}from"./embed-page-chunk-R5QL57JJ.js";import{f as I}from"./embed-page-chunk-QBTAJ2YI.js";var f=I(Y());function q(t,o){if(t.parentId&&t.parentId!==t.id&&o.has(t.parentId))return t.parentId;for(let c of t.dependencies??[])if(c!==t.id&&o.has(c))return c}function A(t,o){let u=o?.hideCompleted??!1?t.filter(e=>!w(e.status)):t,g=new Map(u.map(e=>[e.id,e])),p=new Map;for(let e of u)p.set(e.id,q(e,g));let l=new Set;for(let e of p.keys()){if(l.has(e))continue;let n=new Map,d=e,y=0;for(;d!==void 0&&!l.has(d)&&!n.has(d);)n.set(d,y),y+=1,d=p.get(d);if(d!==void 0&&n.has(d)){let h=n.get(d);for(let[x,s]of n)s>=h&&l.add(x)}}for(let e of l)p.set(e,void 0);let m=new Map;for(let e of u)m.set(e.id,[]);for(let e of u){let n=p.get(e.id);n!==void 0&&m.get(n).push(e.id)}let r=e=>({task:g.get(e),children:(m.get(e)??[]).map(r)});return u.filter(e=>p.get(e.id)===void 0).map(e=>r(e.id))}var i=I(B()),{Text:E}=R,J=16,K=3,Q=D(({css:t,token:o})=>({root:t`
1
+ import{C as M,E as N,F as S,I as z,J as w}from"./embed-page-chunk-MVT6CPWE.js";import{g as D}from"./embed-page-chunk-54M4265G.js";import{v as $,w as L}from"./embed-page-chunk-F7ZUYG42.js";import{l as v}from"./embed-page-chunk-3FNSGFP2.js";import{a as B}from"./embed-page-chunk-QV7QAJ4N.js";import{Ja as O,Sa as P,ba as C,bb as R}from"./embed-page-chunk-BUFWD6SE.js";import{a as Y}from"./embed-page-chunk-R5QL57JJ.js";import{f as I}from"./embed-page-chunk-QBTAJ2YI.js";var f=I(Y());function q(t,o){if(t.parentId&&t.parentId!==t.id&&o.has(t.parentId))return t.parentId;for(let c of t.dependencies??[])if(c!==t.id&&o.has(c))return c}function A(t,o){let u=o?.hideCompleted??!1?t.filter(e=>!w(e.status)):t,g=new Map(u.map(e=>[e.id,e])),p=new Map;for(let e of u)p.set(e.id,q(e,g));let l=new Set;for(let e of p.keys()){if(l.has(e))continue;let n=new Map,d=e,y=0;for(;d!==void 0&&!l.has(d)&&!n.has(d);)n.set(d,y),y+=1,d=p.get(d);if(d!==void 0&&n.has(d)){let h=n.get(d);for(let[x,s]of n)s>=h&&l.add(x)}}for(let e of l)p.set(e,void 0);let m=new Map;for(let e of u)m.set(e.id,[]);for(let e of u){let n=p.get(e.id);n!==void 0&&m.get(n).push(e.id)}let r=e=>({task:g.get(e),children:(m.get(e)??[]).map(r)});return u.filter(e=>p.get(e.id)===void 0).map(e=>r(e.id))}var i=I(B()),{Text:E}=R,J=16,K=3,Q=D(({css:t,token:o})=>({root:t`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  height: 100%;
@@ -1,4 +1,4 @@
1
- import{f as Nr,h as Lr,j as zr,l as we,o as xt,t as yt}from"./embed-page-chunk-RFF7S4H5.js";import{b as jr,l as Ce}from"./embed-page-chunk-Q7Z7MHOM.js";import{a as B}from"./embed-page-chunk-QV7QAJ4N.js";import{La as Mr,M as ht,Ma as Ir,N as ae,Na as Fr,O as We,P as Er,Q as Ie,R as A,U as Rr,V as $r,_a as Fe,b as Pr,bb as gt,j as Ar,o as kr}from"./embed-page-chunk-F7TA3LRH.js";import{a as z}from"./embed-page-chunk-R5QL57JJ.js";import{c as Jt,f as y}from"./embed-page-chunk-QBTAJ2YI.js";var Po=Jt(W=>{"use strict";var Z=typeof Symbol=="function"&&Symbol.for,nr=Z?Symbol.for("react.element"):60103,sr=Z?Symbol.for("react.portal"):60106,Et=Z?Symbol.for("react.fragment"):60107,Rt=Z?Symbol.for("react.strict_mode"):60108,$t=Z?Symbol.for("react.profiler"):60114,Mt=Z?Symbol.for("react.provider"):60109,It=Z?Symbol.for("react.context"):60110,ar=Z?Symbol.for("react.async_mode"):60111,Ft=Z?Symbol.for("react.concurrent_mode"):60111,jt=Z?Symbol.for("react.forward_ref"):60112,Nt=Z?Symbol.for("react.suspense"):60113,ws=Z?Symbol.for("react.suspense_list"):60120,Lt=Z?Symbol.for("react.memo"):60115,zt=Z?Symbol.for("react.lazy"):60116,Ss=Z?Symbol.for("react.block"):60121,Ts=Z?Symbol.for("react.fundamental"):60117,Ps=Z?Symbol.for("react.responder"):60118,As=Z?Symbol.for("react.scope"):60119;function de(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nr:switch(e=e.type,e){case ar:case Ft:case Et:case $t:case Rt:case Nt:return e;default:switch(e=e&&e.$$typeof,e){case It:case jt:case zt:case Lt:case Mt:return e;default:return t}}case sr:return t}}}function To(e){return de(e)===Ft}W.AsyncMode=ar;W.ConcurrentMode=Ft;W.ContextConsumer=It;W.ContextProvider=Mt;W.Element=nr;W.ForwardRef=jt;W.Fragment=Et;W.Lazy=zt;W.Memo=Lt;W.Portal=sr;W.Profiler=$t;W.StrictMode=Rt;W.Suspense=Nt;W.isAsyncMode=function(e){return To(e)||de(e)===ar};W.isConcurrentMode=To;W.isContextConsumer=function(e){return de(e)===It};W.isContextProvider=function(e){return de(e)===Mt};W.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nr};W.isForwardRef=function(e){return de(e)===jt};W.isFragment=function(e){return de(e)===Et};W.isLazy=function(e){return de(e)===zt};W.isMemo=function(e){return de(e)===Lt};W.isPortal=function(e){return de(e)===sr};W.isProfiler=function(e){return de(e)===$t};W.isStrictMode=function(e){return de(e)===Rt};W.isSuspense=function(e){return de(e)===Nt};W.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Et||e===Ft||e===$t||e===Rt||e===Nt||e===ws||typeof e=="object"&&e!==null&&(e.$$typeof===zt||e.$$typeof===Lt||e.$$typeof===Mt||e.$$typeof===It||e.$$typeof===jt||e.$$typeof===Ts||e.$$typeof===Ps||e.$$typeof===As||e.$$typeof===Ss)};W.typeOf=de});var ko=Jt(($i,Ao)=>{"use strict";Ao.exports=Po()});var jo=Jt((Mi,Fo)=>{"use strict";var ir=ko(),ks={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Es={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Rs={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Mo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cr={};cr[ir.ForwardRef]=Rs;cr[ir.Memo]=Mo;function Eo(e){return ir.isMemo(e)?Mo:cr[e.$$typeof]||ks}var $s=Object.defineProperty,Ms=Object.getOwnPropertyNames,Ro=Object.getOwnPropertySymbols,Is=Object.getOwnPropertyDescriptor,Fs=Object.getPrototypeOf,$o=Object.prototype;function Io(e,t,r){if(typeof t!="string"){if($o){var o=Fs(t);o&&o!==$o&&Io(e,o,r)}var n=Ms(t);Ro&&(n=n.concat(Ro(t)));for(var s=Eo(e),a=Eo(t),i=0;i<n.length;++i){var c=n[i];if(!Es[c]&&!(r&&r[c])&&!(a&&a[c])&&!(s&&s[c])){var l=Is(t,c);try{$s(e,c,l)}catch{}}}}return e}Fo.exports=Io});var rs=!1;function os(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ns(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Or=(function(){function e(r){var o=this;this._insertTag=function(n){var s;o.tags.length===0?o.insertionPoint?s=o.insertionPoint.nextSibling:o.prepend?s=o.container.firstChild:s=o.before:s=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(n,s),o.tags.push(n)},this.isSpeedy=r.speedy===void 0?!rs:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ns(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var s=os(n);try{s.insertRule(o,s.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var n;return(n=o.parentNode)==null?void 0:n.removeChild(o)}),this.tags=[],this.ctr=0},e})();var ee="-ms-",nt="-moz-",N="-webkit-",vt="comm",Be="rule",Ue="decl";var Wr="@import";var bt="@keyframes";var Br="@layer";var Ur=Math.abs,je=String.fromCharCode,Dr=Object.assign;function _r(e,t){return K(e,0)^45?(((t<<2^K(e,0))<<2^K(e,1))<<2^K(e,2))<<2^K(e,3):0}function Ct(e){return e.trim()}function Qt(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,r){return e.replace(t,r)}function st(e,t){return e.indexOf(t)}function K(e,t){return e.charCodeAt(t)|0}function Se(e,t,r){return e.slice(t,r)}function oe(e){return e.length}function De(e){return e.length}function _e(e,t){return t.push(e),e}function Zt(e,t){return e.map(t).join("")}var wt=1,Ve=1,Vr=0,ne=0,Y=0,Ge="";function at(e,t,r,o,n,s,a){return{value:e,root:t,parent:r,type:o,props:n,children:s,line:wt,column:Ve,length:a,return:""}}function qe(e,t){return Dr(at("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hr(){return Y}function Gr(){return Y=ne>0?K(Ge,--ne):0,Ve--,Y===10&&(Ve=1,wt--),Y}function se(){return Y=ne<Vr?K(Ge,ne++):0,Ve++,Y===10&&(Ve=1,wt++),Y}function pe(){return K(Ge,ne)}function it(){return ne}function Ke(e,t){return Se(Ge,e,t)}function He(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function St(e){return wt=Ve=1,Vr=oe(Ge=e),ne=0,[]}function Tt(e){return Ge="",e}function Xe(e){return Ct(Ke(ne-1,er(e===91?e+2:e===40?e+1:e)))}function qr(e){for(;(Y=pe())&&Y<33;)se();return He(e)>2||He(Y)>3?"":" "}function Kr(e,t){for(;--t&&se()&&!(Y<48||Y>102||Y>57&&Y<65||Y>70&&Y<97););return Ke(e,it()+(t<6&&pe()==32&&se()==32))}function er(e){for(;se();)switch(Y){case e:return ne;case 34:case 39:e!==34&&e!==39&&er(Y);break;case 40:e===41&&er(e);break;case 92:se();break}return ne}function Xr(e,t){for(;se()&&e+Y!==57;)if(e+Y===84&&pe()===47)break;return"/*"+Ke(t,ne-1)+"*"+je(e===47?e:se())}function Yr(e){for(;!He(pe());)se();return Ke(e,ne)}function Zr(e){return Tt(Pt("",null,null,null,[""],e=St(e),0,[0],e))}function Pt(e,t,r,o,n,s,a,i,c){for(var l=0,p=0,x=a,u=0,w=0,h=0,m=1,d=1,f=1,g=0,T="",j=n,L=s,O=o,v=T;d;)switch(h=g,g=se()){case 40:if(h!=108&&K(v,x-1)==58){st(v+=F(Xe(g),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:v+=Xe(g);break;case 9:case 10:case 13:case 32:v+=qr(h);break;case 92:v+=Kr(it()-1,7);continue;case 47:switch(pe()){case 42:case 47:_e(ss(Xr(se(),it()),t,r),c);break;default:v+="/"}break;case 123*m:i[l++]=oe(v)*f;case 125*m:case 59:case 0:switch(g){case 0:case 125:d=0;case 59+p:f==-1&&(v=F(v,/\f/g,"")),w>0&&oe(v)-x&&_e(w>32?Qr(v+";",o,r,x-1):Qr(F(v," ","")+";",o,r,x-2),c);break;case 59:v+=";";default:if(_e(O=Jr(v,t,r,l,p,n,i,T,j=[],L=[],x),s),g===123)if(p===0)Pt(v,t,O,O,j,s,x,i,L);else switch(u===99&&K(v,3)===110?100:u){case 100:case 108:case 109:case 115:Pt(e,O,O,o&&_e(Jr(e,O,O,0,0,n,i,T,n,j=[],x),L),n,L,x,i,o?j:L);break;default:Pt(v,O,O,O,[""],L,0,i,L)}}l=p=w=0,m=f=1,T=v="",x=a;break;case 58:x=1+oe(v),w=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&Gr()==125)continue}switch(v+=je(g),g*m){case 38:f=p>0?1:(v+="\f",-1);break;case 44:i[l++]=(oe(v)-1)*f,f=1;break;case 64:pe()===45&&(v+=Xe(se())),u=pe(),p=x=oe(T=v+=Yr(it())),g++;break;case 45:h===45&&oe(v)==2&&(m=0)}}return s}function Jr(e,t,r,o,n,s,a,i,c,l,p){for(var x=n-1,u=n===0?s:[""],w=De(u),h=0,m=0,d=0;h<o;++h)for(var f=0,g=Se(e,x+1,x=Ur(m=a[h])),T=e;f<w;++f)(T=Ct(m>0?u[f]+" "+g:F(g,/&\f/g,u[f])))&&(c[d++]=T);return at(e,t,r,n===0?Be:i,c,l,p)}function ss(e,t,r){return at(e,t,r,vt,je(Hr()),Se(e,2,-2),0)}function Qr(e,t,r,o){return at(e,t,r,Ue,Se(e,0,o),Se(e,o+1,-1),o)}function Ne(e,t){for(var r="",o=De(e),n=0;n<o;n++)r+=t(e[n],n,e,t)||"";return r}function eo(e,t,r,o){switch(e.type){case Br:if(e.children.length)break;case Wr:case Ue:return e.return=e.return||e.value;case vt:return"";case bt:return e.return=e.value+"{"+Ne(e.children,o)+"}";case Be:e.value=e.props.join(",")}return oe(r=Ne(e.children,o))?e.return=e.value+"{"+r+"}":""}function to(e){var t=De(e);return function(r,o,n,s){for(var a="",i=0;i<t;i++)a+=e[i](r,o,n,s)||"";return a}}function ro(e){return function(t){t.root||(t=t.return)&&e(t)}}var tr=function(t){var r=new WeakMap;return function(o){if(r.has(o))return r.get(o);var n=t(o);return r.set(o,n),n}};function oo(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var as=function(t,r,o){for(var n=0,s=0;n=s,s=pe(),n===38&&s===12&&(r[o]=1),!He(s);)se();return Ke(t,ne)},is=function(t,r){var o=-1,n=44;do switch(He(n)){case 0:n===38&&pe()===12&&(r[o]=1),t[o]+=as(ne-1,r,o);break;case 2:t[o]+=Xe(n);break;case 4:if(n===44){t[++o]=pe()===58?"&\f":"",r[o]=t[o].length;break}default:t[o]+=je(n)}while(n=se());return t},cs=function(t,r){return Tt(is(St(t),r))},no=new WeakMap,ls=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,o=t.parent,n=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!no.get(o))&&!n){no.set(t,!0);for(var s=[],a=cs(r,s),i=o.props,c=0,l=0;c<a.length;c++)for(var p=0;p<i.length;p++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[p]):i[p]+" "+a[c]}}},ds=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function so(e,t){switch(_r(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+nt+e+ee+e+e;case 6828:case 4268:return N+e+ee+e+e;case 6165:return N+e+ee+"flex-"+e+e;case 5187:return N+e+F(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+ee+"flex-$1$2")+e;case 5443:return N+e+ee+"flex-item-"+F(e,/flex-|-self/,"")+e;case 4675:return N+e+ee+"flex-line-pack"+F(e,/align-content|flex-|-self/,"")+e;case 5548:return N+e+ee+F(e,"shrink","negative")+e;case 5292:return N+e+ee+F(e,"basis","preferred-size")+e;case 6060:return N+"box-"+F(e,"-grow","")+N+e+ee+F(e,"grow","positive")+e;case 4554:return N+F(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return F(F(F(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return F(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return F(F(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4095:case 3583:case 4068:case 2532:return F(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oe(e)-1-t>6)switch(K(e,t+1)){case 109:if(K(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+nt+(K(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~st(e,"stretch")?so(F(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(K(e,t+1)!==115)break;case 6444:switch(K(e,oe(e)-3-(~st(e,"!important")&&10))){case 107:return F(e,":",":"+N)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(K(e,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(K(e,t+11)){case 114:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return N+e+ee+e+e}return e}var us=function(t,r,o,n){if(t.length>-1&&!t.return)switch(t.type){case Ue:t.return=so(t.value,t.length);break;case bt:return Ne([qe(t,{value:F(t.value,"@","@"+N)})],n);case Be:if(t.length)return Zt(t.props,function(s){switch(Qt(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ne([qe(t,{props:[F(s,/:(read-\w+)/,":"+nt+"$1")]})],n);case"::placeholder":return Ne([qe(t,{props:[F(s,/:(plac\w+)/,":"+N+"input-$1")]}),qe(t,{props:[F(s,/:(plac\w+)/,":"+nt+"$1")]}),qe(t,{props:[F(s,/:(plac\w+)/,ee+"input-$1")]})],n)}return""})}},fs=[us],At=function(t){var r=t.key;if(r==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(m){var d=m.getAttribute("data-emotion");d.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=t.stylisPlugins||fs,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var d=m.getAttribute("data-emotion").split(" "),f=1;f<d.length;f++)s[d[f]]=!0;i.push(m)});var c,l=[ls,ds];{var p,x=[eo,ro(function(m){p.insert(m)})],u=to(l.concat(n,x)),w=function(d){return Ne(Zr(d),u)};c=function(d,f,g,T){p=g,w(d?d+"{"+f.styles+"}":f.styles),T&&(h.inserted[f.name]=!0)}}var h={key:r,sheet:new Or({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return h.sheet.hydrate(i),h};function ao(e){for(var t=0,r,o=0,n=e.length;n>=4;++o,n-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var io={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ps=!1,ms=/[A-Z]|^ms/g,hs=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fo=function(t){return t.charCodeAt(1)===45},co=function(t){return t!=null&&typeof t!="boolean"},rr=oo(function(e){return fo(e)?e:e.replace(ms,"-$&").toLowerCase()}),lo=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(hs,function(o,n,s){return xe={name:n,styles:s,next:xe},n})}return io[t]!==1&&!fo(t)&&typeof r=="number"&&r!==0?r+"px":r},gs="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ct(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return xe={name:n.name,styles:n.styles,next:xe},n.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)xe={name:a.name,styles:a.styles,next:xe},a=a.next;var i=s.styles+";";return i}return xs(e,t,r)}case"function":{if(e!==void 0){var c=xe,l=r(e);return xe=c,ct(e,t,l)}break}}var p=r;if(t==null)return p;var x=t[p];return x!==void 0?x:p}function xs(e,t,r){var o="";if(Array.isArray(r))for(var n=0;n<r.length;n++)o+=ct(e,t,r[n])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;t!=null&&t[i]!==void 0?o+=s+"{"+t[i]+"}":co(i)&&(o+=rr(s)+":"+lo(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&ps)throw new Error(gs);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)co(a[c])&&(o+=rr(s)+":"+lo(s,a[c])+";");else{var l=ct(e,t,a);switch(s){case"animation":case"animationName":{o+=rr(s)+":"+l+";";break}default:o+=s+"{"+l+"}"}}}}return o}var uo=/label:\s*([^\s;{]+)\s*(;|$)/g,xe;function ie(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,n="";xe=void 0;var s=e[0];if(s==null||s.raw===void 0)o=!1,n+=ct(r,t,s);else{var a=s;n+=a[0]}for(var i=1;i<e.length;i++)if(n+=ct(r,t,e[i]),o){var c=s;n+=c[i]}uo.lastIndex=0;for(var l="",p;(p=uo.exec(n))!==null;)l+="-"+p[1];var x=ao(n)+l;return{name:x,styles:n,next:xe}}var ys=!0;function Te(e,t,r){var o="";return r.split(" ").forEach(function(n){e[n]!==void 0?t.push(e[n]+";"):n&&(o+=n+" ")}),o}var Ye=function(t,r,o){var n=t.key+"-"+r.name;(o===!1||ys===!1)&&t.registered[n]===void 0&&(t.registered[n]=r.styles)},Je=function(t,r,o){Ye(t,r,o);var n=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+n:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function po(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function mo(e,t,r){var o=[],n=Te(e,o,r);return o.length<2?r:n+t(o)}var Le=function(t){var r=At(t);r.sheet.speedy=function(i){this.isSpeedy=i},r.compat=!0;var o=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered,void 0);return Je(r,x,!1),r.key+"-"+x.name},n=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered),u="animation-"+x.name;return po(r,{name:x.name,styles:"@keyframes "+u+"{"+x.styles+"}"}),u},s=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered);po(r,x)},a=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];return mo(r.registered,o,vs(l))};return{css:o,cx:a,injectGlobal:s,keyframes:n,hydrate:function(c){c.forEach(function(l){r.inserted[l]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:Te.bind(null,r.registered),merge:mo.bind(null,r.registered,o)}},vs=function e(t){for(var r="",o=0;o<t.length;o++){var n=t[o];if(n!=null){var s=void 0;switch(typeof n){case"boolean":break;case"object":{if(Array.isArray(n))s=e(n);else{s="";for(var a in n)n[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=n}s&&(r&&(r+=" "),r+=s)}}return r};var ye=Le({key:"css"}),Xa=ye.flush,Ya=ye.hydrate,Ja=ye.cx,Qa=ye.merge,Za=ye.getRegisteredStyles,ei=ye.injectGlobal,ti=ye.keyframes,ri=ye.css,oi=ye.sheet,ho=ye.cache;var go=(function(){function e(){Rr(this,e),Er(this,"_cacheList",[ho])}return $r(e,[{key:"add",value:function(r){var o=this.getCache(r.key);return o||(this._cacheList.push(r),r)}},{key:"delete",value:function(r){this._cacheList=this._cacheList.filter(function(o){return o.key!==r.key})}},{key:"hasCache",value:function(r){return this._cacheList.some(function(o){return o.key===r.key})}},{key:"getCache",value:function(r){return this._cacheList.find(function(o){return o.key===r})}},{key:"getCacheList",value:function(){return this._cacheList}}]),e})();var xo=typeof document<"u",or=function(t,r){return"".concat(t,"-").concat(r)},yo=function(t,r,o,n){var s=n.hashPriority||"high";Ye(t,r,o);var a=".".concat(or(t.key,r.name)),i=s==="low"?":where(".concat(a,")"):a;if(t.inserted[r.name]===void 0){var c="",l=r;do{var p=t.insert(r===l?i:"",l,t.sheet,!0);!xo&&p!==void 0&&(c+=p),l=l.next}while(l!==void 0);if(!xo&&c.length!==0)return c}};var Qe=function(t){return We(t)==="object"&&"styles"in t&&"name"in t&&"toString"in t},vo=function e(t){for(var r="",o=0;o<t.length;o++){var n=t[o];if(n!==null){var s=void 0;switch(We(n)){case"boolean":break;case"object":{if(Array.isArray(n))s=e(n);else{s="";for(var a in n)n[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=n}s&&(r&&(r+=" "),r+=s)}}return r},bo=function(t,r,o){var n=[],s=Te(t,n,o);return n.length<2?o:s+r(n)};var bs=function(t,r){return function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];var a=ie(n,t.registered,void 0);return yo(t,a,!1,r),or(t.key,a.name)}},Cs=function(t,r){return function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];var a=n.map(function(i){return Qe(i)?r(i):i});return bo(t.registered,r,vo(a))}},kt=function(t,r){var o=bs(t,{hashPriority:r.hashPriority||"high",label:r.label}),n=Cs(t,o);return{css:o,cx:n}};var he=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return ie(r)};var Co="acss";var yr=y(z());var wo=y(z()),So=function(t){return(0,wo.createContext)(t)};var ce=y(z()),Ot=y(z());var lt=y(z()),js=function(t){return t()},No=lt.useInsertionEffect?lt.useInsertionEffect:!1,lr=No||js,dr=No||lt.useLayoutEffect;var Lo=!1,zo=ce.createContext(typeof HTMLElement<"u"?At({key:"css"}):null),Ns=zo.Provider;var Wt=function(t){return(0,Ot.forwardRef)(function(r,o){var n=(0,Ot.useContext)(zo);return t(r,n,o)})},Pe=ce.createContext({});var Ls=function(t,r){if(typeof r=="function"){var o=r(t);return o}return Pr({},t,r)},zs=tr(function(e){return tr(function(t){return Ls(e,t)})}),fr=function(t){var r=ce.useContext(Pe);return t.theme!==r&&(r=zs(r)(t.theme)),ce.createElement(Pe.Provider,{value:r},t.children)};var Bt={}.hasOwnProperty,ur="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Oo=function(t,r){var o={};for(var n in r)Bt.call(r,n)&&(o[n]=r[n]);return o[ur]=t,o},Os=function(t){var r=t.cache,o=t.serialized,n=t.isStringTag;return Ye(r,o,n),lr(function(){return Je(r,o,n)}),null},Ws=Wt(function(e,t,r){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var n=e[ur],s=[o],a="";typeof e.className=="string"?a=Te(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=ie(s,void 0,ce.useContext(Pe));a+=t.key+"-"+i.name;var c={};for(var l in e)Bt.call(e,l)&&l!=="css"&&l!==ur&&!Lo&&(c[l]=e[l]);return c.className=a,r&&(c.ref=r),ce.createElement(ce.Fragment,null,ce.createElement(Os,{cache:t,serialized:i,isStringTag:typeof n=="string"}),ce.createElement(n,c))}),Wo=Ws;var Ae=y(z());var Yi=y(jo()),Bo=function(t,r){var o=arguments;if(r==null||!Bt.call(r,"css"))return Ae.createElement.apply(void 0,o);var n=o.length,s=new Array(n);s[0]=Wo,s[1]=Oo(t,r);for(var a=2;a<n;a++)s[a]=o[a];return Ae.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Bo||(Bo={}));var Uo=Wt(function(e,t){var r=e.styles,o=ie([r],void 0,Ae.useContext(Pe)),n=Ae.useRef();return dr(function(){var s=t.key+"-global",a=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,c=document.querySelector('style[data-emotion="'+s+" "+o.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(i=!0,c.setAttribute("data-emotion",s),a.hydrate([c])),n.current=[a,i],function(){a.flush()}},[t]),dr(function(){var s=n.current,a=s[0],i=s[1];if(i){s[1]=!1;return}if(o.next!==void 0&&Je(t,o.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",o,a,!1)},[t,o.name]),null});var Do=y(z()),_o=y(B()),Vo=function(t){return function(){for(var r=arguments.length,o=new Array(r),n=0;n<r;n++)o[n]=arguments[n];return(0,Do.memo)(function(s){var a=t();return(0,_o.jsx)(Uo,{styles:ie(o,void 0,A(A({},s),{},{theme:a}))})})}};var Ho=function(t){return function(r){var o=t(r);return function(n){var s=o(n),a=s.styles;return a}}};var ke=y(z()),pr=y(B()),Bs=["children","prefix","speedy","getStyleManager","container","nonce","insertionPoint","stylisPlugins","linters"],Go=function(t){return(0,ke.memo)(function(r){var o=r.children,n=r.prefix,s=r.speedy,a=r.getStyleManager,i=r.container,c=r.nonce,l=r.insertionPoint,p=r.stylisPlugins,x=r.linters,u=Ie(r,Bs),w=(0,ke.useContext)(t),h=n??w.sheet.key,m=i??w.sheet.container,d=s??w.sheet.isSpeedy,f=(0,ke.useMemo)(function(){var T=!1,j=Le({speedy:d??T,key:h,container:m,nonce:c,insertionPoint:l,stylisPlugins:p});if(typeof global<"u"){var L=global.__ANTD_STYLE_CACHE_MANAGER_FOR_SSR__;L&&(j.cache=L.add(j.cache))}return j},[h,d,m,c,l,p]);(0,ke.useEffect)(function(){a?.(f)},[f]);var g=(0,pr.jsx)(t.Provider,{value:f,children:o});return Object.keys(u).length||m?(0,pr.jsx)(kr,A(A({linters:x,container:m},u),{},{children:g})):g})};var dt=y(z());var Jo=y(z());var qo=function(t){var r=t.css,o=t.token;return{buttonDefaultHover:r({backgroundColor:o.colorBgContainer,border:"1px solid ".concat(o.colorBorder),cursor:"pointer",":hover":{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},":active":{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive}})}};var Ko=function(t){return Object.fromEntries(Object.entries(t).map(function(r){var o=ae(r,2),n=o[0],s=o[1];return[n,s.styles]}))};var Ze=function(){var t=Fe.useToken(),r=t.token;return r};var Yo=y(z());var Xo=y(z());var Ee=function(t){return typeof window<"u"?matchMedia&&matchMedia("(prefers-color-scheme: ".concat(t,")")):{matches:!1}};var mr,Ut=(0,Xo.createContext)({appearance:"light",setAppearance:function(){},isDarkMode:!1,themeMode:"light",setThemeMode:function(){},browserPrefers:(mr=Ee("dark"))!==null&&mr!==void 0&&mr.matches?"dark":"light"});var Re=function(){return(0,Yo.useContext)(Ut)};var Qo=function(){var t=Ze(),r=Re(),o=r.appearance,n=r.isDarkMode;return(0,Jo.useMemo)(function(){return Ko(qo({token:t,css:he,appearance:o,isDarkMode:n}))},[t,o,n])};var Zo=y(z());var Dt=function(){var t=Ze(),r=Qo();return(0,Zo.useMemo)(function(){return A(A({},t),{},{stylish:r})},[t,r])};var en=function(t){return A(A({},t),{},{mobile:t.xs,tablet:t.md,laptop:t.lg,desktop:t.xxl})};var tn=y(z()),rn=function(){var t=Ze(),r={xs:"@media (max-width: ".concat(t.screenXSMax,"px)"),sm:"@media (max-width: ".concat(t.screenSMMax,"px)"),md:"@media (max-width: ".concat(t.screenMDMax,"px)"),lg:"@media (max-width: ".concat(t.screenLGMax,"px)"),xl:"@media (max-width: ".concat(t.screenXLMax,"px)"),xxl:"@media (min-width: ".concat(t.screenXXLMin,"px)")};return(0,tn.useMemo)(function(){return en(r)},[t])},on=function(t,r){return Object.entries(t).map(function(o){var n=ae(o,2),s=n[0],a=n[1],i=a;return Qe(a)||(i=he(a)),r[s]?"".concat(r[s]," {").concat(i.styles,"}"):""}).join("")};var Us=["stylish","appearance","isDarkMode","prefixCls","iconPrefixCls"],Ds=["prefixCls","iconPrefixCls"],nn=function(t){var r=t.hashPriority,o=t.useTheme,n=t.EmotionContext;return function(s,a){var i=a?.__BABEL_FILE_NAME__,c=!!i;return function(l){var p=o(),x=(0,dt.useContext)(n),u=x.cache,w=kt(u,{hashPriority:a?.hashPriority||r,label:a?.label}),h=w.cx,m=w.css,d=rn(),f=(0,dt.useMemo)(function(){var g;if(s instanceof Function){var T=p.stylish,j=p.appearance,L=p.isDarkMode,O=p.prefixCls,v=p.iconPrefixCls,G=Ie(p,Us),Q=function(_){return on(_,d)};Object.assign(Q,d),g=s({token:G,stylish:T,appearance:j,isDarkMode:L,prefixCls:O,iconPrefixCls:v,cx:h,css:he,responsive:Q},l)}else g=s;return We(g)==="object"&&(Qe(g)?g=m(g):g=Object.fromEntries(Object.entries(g).map(function(ue){var _=ae(ue,2),be=_[0],fe=_[1],tt=c?"".concat(i,"-").concat(be):void 0;return We(fe)==="object"?c?[be,m(fe,"label:".concat(tt))]:[be,m(fe)]:[be,fe]}))),g},[l,p]);return(0,dt.useMemo)(function(){var g=p.prefixCls,T=p.iconPrefixCls,j=Ie(p,Ds);return{styles:f,cx:h,theme:j,prefixCls:g,iconPrefixCls:T}},[f,p])}}};var pt=y(z());var sn=y(B()),hr=function(t){if(t.ThemeProvider)return t.ThemeProvider;var r=t.ThemeContext;return function(o){return(0,sn.jsx)(r.Provider,{value:o.theme,children:o.children})}};var an=fr,_t=Pe;var et=y(z());var cn=y(B()),ln=(0,et.memo)(function(e){var t=e.children,r=e.theme,o=e.prefixCls,n=e.getStaticInstance,s=e.staticInstanceConfig,a=Re(),i=a.appearance,c=a.isDarkMode,l=Mr.useMessage(s?.message),p=ae(l,2),x=p[0],u=p[1],w=Fr.useNotification(s?.notification),h=ae(w,2),m=h[0],d=h[1],f=Ir.useModal(),g=ae(f,2),T=g[0],j=g[1];(0,et.useEffect)(function(){n?.({message:x,modal:T,notification:m})},[]);var L=(0,et.useMemo)(function(){var O=c?Fe.darkAlgorithm:Fe.defaultAlgorithm,v=r;if(typeof r=="function"&&(v=r(i)),!v)return{algorithm:O};var G=v.algorithm?v.algorithm instanceof Array?v.algorithm:[v.algorithm]:[];return A(A({},v),{},{algorithm:v.algorithm?[O].concat(Ar(G)):O})},[r,c]);return(0,cn.jsxs)(ht,{prefixCls:o,theme:L,children:[u,d,j,t]})});ln.displayName="AntdProvider";var dn=ln;var ze=y(z());var fn=y(z());function _s(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,n,s,a,i=[],c=!0,l=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(i.push(o.value),i.length!==t);c=!0);}catch(p){l=!0,n=p}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw n}}return i}}function Vs(e,t){return Hs(e)||_s(e,t)||Gs(e,t)||qs()}function Hs(e){if(Array.isArray(e))return e}function Gs(e,t){if(e){if(typeof e=="string")return un(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return un(e,t)}}function un(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function qs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{f as Nr,h as Lr,j as zr,l as we,o as xt,t as yt}from"./embed-page-chunk-5QZRLAW2.js";import{b as jr,l as Ce}from"./embed-page-chunk-3FNSGFP2.js";import{a as B}from"./embed-page-chunk-QV7QAJ4N.js";import{La as Mr,M as ht,Ma as Ir,N as ae,Na as Fr,O as We,P as Er,Q as Ie,R as A,U as Rr,V as $r,_a as Fe,b as Pr,bb as gt,j as Ar,o as kr}from"./embed-page-chunk-BUFWD6SE.js";import{a as z}from"./embed-page-chunk-R5QL57JJ.js";import{c as Jt,f as y}from"./embed-page-chunk-QBTAJ2YI.js";var Po=Jt(W=>{"use strict";var Z=typeof Symbol=="function"&&Symbol.for,nr=Z?Symbol.for("react.element"):60103,sr=Z?Symbol.for("react.portal"):60106,Et=Z?Symbol.for("react.fragment"):60107,Rt=Z?Symbol.for("react.strict_mode"):60108,$t=Z?Symbol.for("react.profiler"):60114,Mt=Z?Symbol.for("react.provider"):60109,It=Z?Symbol.for("react.context"):60110,ar=Z?Symbol.for("react.async_mode"):60111,Ft=Z?Symbol.for("react.concurrent_mode"):60111,jt=Z?Symbol.for("react.forward_ref"):60112,Nt=Z?Symbol.for("react.suspense"):60113,ws=Z?Symbol.for("react.suspense_list"):60120,Lt=Z?Symbol.for("react.memo"):60115,zt=Z?Symbol.for("react.lazy"):60116,Ss=Z?Symbol.for("react.block"):60121,Ts=Z?Symbol.for("react.fundamental"):60117,Ps=Z?Symbol.for("react.responder"):60118,As=Z?Symbol.for("react.scope"):60119;function de(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nr:switch(e=e.type,e){case ar:case Ft:case Et:case $t:case Rt:case Nt:return e;default:switch(e=e&&e.$$typeof,e){case It:case jt:case zt:case Lt:case Mt:return e;default:return t}}case sr:return t}}}function To(e){return de(e)===Ft}W.AsyncMode=ar;W.ConcurrentMode=Ft;W.ContextConsumer=It;W.ContextProvider=Mt;W.Element=nr;W.ForwardRef=jt;W.Fragment=Et;W.Lazy=zt;W.Memo=Lt;W.Portal=sr;W.Profiler=$t;W.StrictMode=Rt;W.Suspense=Nt;W.isAsyncMode=function(e){return To(e)||de(e)===ar};W.isConcurrentMode=To;W.isContextConsumer=function(e){return de(e)===It};W.isContextProvider=function(e){return de(e)===Mt};W.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nr};W.isForwardRef=function(e){return de(e)===jt};W.isFragment=function(e){return de(e)===Et};W.isLazy=function(e){return de(e)===zt};W.isMemo=function(e){return de(e)===Lt};W.isPortal=function(e){return de(e)===sr};W.isProfiler=function(e){return de(e)===$t};W.isStrictMode=function(e){return de(e)===Rt};W.isSuspense=function(e){return de(e)===Nt};W.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Et||e===Ft||e===$t||e===Rt||e===Nt||e===ws||typeof e=="object"&&e!==null&&(e.$$typeof===zt||e.$$typeof===Lt||e.$$typeof===Mt||e.$$typeof===It||e.$$typeof===jt||e.$$typeof===Ts||e.$$typeof===Ps||e.$$typeof===As||e.$$typeof===Ss)};W.typeOf=de});var ko=Jt(($i,Ao)=>{"use strict";Ao.exports=Po()});var jo=Jt((Mi,Fo)=>{"use strict";var ir=ko(),ks={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Es={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Rs={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Mo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cr={};cr[ir.ForwardRef]=Rs;cr[ir.Memo]=Mo;function Eo(e){return ir.isMemo(e)?Mo:cr[e.$$typeof]||ks}var $s=Object.defineProperty,Ms=Object.getOwnPropertyNames,Ro=Object.getOwnPropertySymbols,Is=Object.getOwnPropertyDescriptor,Fs=Object.getPrototypeOf,$o=Object.prototype;function Io(e,t,r){if(typeof t!="string"){if($o){var o=Fs(t);o&&o!==$o&&Io(e,o,r)}var n=Ms(t);Ro&&(n=n.concat(Ro(t)));for(var s=Eo(e),a=Eo(t),i=0;i<n.length;++i){var c=n[i];if(!Es[c]&&!(r&&r[c])&&!(a&&a[c])&&!(s&&s[c])){var l=Is(t,c);try{$s(e,c,l)}catch{}}}}return e}Fo.exports=Io});var rs=!1;function os(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ns(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Or=(function(){function e(r){var o=this;this._insertTag=function(n){var s;o.tags.length===0?o.insertionPoint?s=o.insertionPoint.nextSibling:o.prepend?s=o.container.firstChild:s=o.before:s=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(n,s),o.tags.push(n)},this.isSpeedy=r.speedy===void 0?!rs:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ns(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var s=os(n);try{s.insertRule(o,s.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var n;return(n=o.parentNode)==null?void 0:n.removeChild(o)}),this.tags=[],this.ctr=0},e})();var ee="-ms-",nt="-moz-",N="-webkit-",vt="comm",Be="rule",Ue="decl";var Wr="@import";var bt="@keyframes";var Br="@layer";var Ur=Math.abs,je=String.fromCharCode,Dr=Object.assign;function _r(e,t){return K(e,0)^45?(((t<<2^K(e,0))<<2^K(e,1))<<2^K(e,2))<<2^K(e,3):0}function Ct(e){return e.trim()}function Qt(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,r){return e.replace(t,r)}function st(e,t){return e.indexOf(t)}function K(e,t){return e.charCodeAt(t)|0}function Se(e,t,r){return e.slice(t,r)}function oe(e){return e.length}function De(e){return e.length}function _e(e,t){return t.push(e),e}function Zt(e,t){return e.map(t).join("")}var wt=1,Ve=1,Vr=0,ne=0,Y=0,Ge="";function at(e,t,r,o,n,s,a){return{value:e,root:t,parent:r,type:o,props:n,children:s,line:wt,column:Ve,length:a,return:""}}function qe(e,t){return Dr(at("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hr(){return Y}function Gr(){return Y=ne>0?K(Ge,--ne):0,Ve--,Y===10&&(Ve=1,wt--),Y}function se(){return Y=ne<Vr?K(Ge,ne++):0,Ve++,Y===10&&(Ve=1,wt++),Y}function pe(){return K(Ge,ne)}function it(){return ne}function Ke(e,t){return Se(Ge,e,t)}function He(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function St(e){return wt=Ve=1,Vr=oe(Ge=e),ne=0,[]}function Tt(e){return Ge="",e}function Xe(e){return Ct(Ke(ne-1,er(e===91?e+2:e===40?e+1:e)))}function qr(e){for(;(Y=pe())&&Y<33;)se();return He(e)>2||He(Y)>3?"":" "}function Kr(e,t){for(;--t&&se()&&!(Y<48||Y>102||Y>57&&Y<65||Y>70&&Y<97););return Ke(e,it()+(t<6&&pe()==32&&se()==32))}function er(e){for(;se();)switch(Y){case e:return ne;case 34:case 39:e!==34&&e!==39&&er(Y);break;case 40:e===41&&er(e);break;case 92:se();break}return ne}function Xr(e,t){for(;se()&&e+Y!==57;)if(e+Y===84&&pe()===47)break;return"/*"+Ke(t,ne-1)+"*"+je(e===47?e:se())}function Yr(e){for(;!He(pe());)se();return Ke(e,ne)}function Zr(e){return Tt(Pt("",null,null,null,[""],e=St(e),0,[0],e))}function Pt(e,t,r,o,n,s,a,i,c){for(var l=0,p=0,x=a,u=0,w=0,h=0,m=1,d=1,f=1,g=0,T="",j=n,L=s,O=o,v=T;d;)switch(h=g,g=se()){case 40:if(h!=108&&K(v,x-1)==58){st(v+=F(Xe(g),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:v+=Xe(g);break;case 9:case 10:case 13:case 32:v+=qr(h);break;case 92:v+=Kr(it()-1,7);continue;case 47:switch(pe()){case 42:case 47:_e(ss(Xr(se(),it()),t,r),c);break;default:v+="/"}break;case 123*m:i[l++]=oe(v)*f;case 125*m:case 59:case 0:switch(g){case 0:case 125:d=0;case 59+p:f==-1&&(v=F(v,/\f/g,"")),w>0&&oe(v)-x&&_e(w>32?Qr(v+";",o,r,x-1):Qr(F(v," ","")+";",o,r,x-2),c);break;case 59:v+=";";default:if(_e(O=Jr(v,t,r,l,p,n,i,T,j=[],L=[],x),s),g===123)if(p===0)Pt(v,t,O,O,j,s,x,i,L);else switch(u===99&&K(v,3)===110?100:u){case 100:case 108:case 109:case 115:Pt(e,O,O,o&&_e(Jr(e,O,O,0,0,n,i,T,n,j=[],x),L),n,L,x,i,o?j:L);break;default:Pt(v,O,O,O,[""],L,0,i,L)}}l=p=w=0,m=f=1,T=v="",x=a;break;case 58:x=1+oe(v),w=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&Gr()==125)continue}switch(v+=je(g),g*m){case 38:f=p>0?1:(v+="\f",-1);break;case 44:i[l++]=(oe(v)-1)*f,f=1;break;case 64:pe()===45&&(v+=Xe(se())),u=pe(),p=x=oe(T=v+=Yr(it())),g++;break;case 45:h===45&&oe(v)==2&&(m=0)}}return s}function Jr(e,t,r,o,n,s,a,i,c,l,p){for(var x=n-1,u=n===0?s:[""],w=De(u),h=0,m=0,d=0;h<o;++h)for(var f=0,g=Se(e,x+1,x=Ur(m=a[h])),T=e;f<w;++f)(T=Ct(m>0?u[f]+" "+g:F(g,/&\f/g,u[f])))&&(c[d++]=T);return at(e,t,r,n===0?Be:i,c,l,p)}function ss(e,t,r){return at(e,t,r,vt,je(Hr()),Se(e,2,-2),0)}function Qr(e,t,r,o){return at(e,t,r,Ue,Se(e,0,o),Se(e,o+1,-1),o)}function Ne(e,t){for(var r="",o=De(e),n=0;n<o;n++)r+=t(e[n],n,e,t)||"";return r}function eo(e,t,r,o){switch(e.type){case Br:if(e.children.length)break;case Wr:case Ue:return e.return=e.return||e.value;case vt:return"";case bt:return e.return=e.value+"{"+Ne(e.children,o)+"}";case Be:e.value=e.props.join(",")}return oe(r=Ne(e.children,o))?e.return=e.value+"{"+r+"}":""}function to(e){var t=De(e);return function(r,o,n,s){for(var a="",i=0;i<t;i++)a+=e[i](r,o,n,s)||"";return a}}function ro(e){return function(t){t.root||(t=t.return)&&e(t)}}var tr=function(t){var r=new WeakMap;return function(o){if(r.has(o))return r.get(o);var n=t(o);return r.set(o,n),n}};function oo(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var as=function(t,r,o){for(var n=0,s=0;n=s,s=pe(),n===38&&s===12&&(r[o]=1),!He(s);)se();return Ke(t,ne)},is=function(t,r){var o=-1,n=44;do switch(He(n)){case 0:n===38&&pe()===12&&(r[o]=1),t[o]+=as(ne-1,r,o);break;case 2:t[o]+=Xe(n);break;case 4:if(n===44){t[++o]=pe()===58?"&\f":"",r[o]=t[o].length;break}default:t[o]+=je(n)}while(n=se());return t},cs=function(t,r){return Tt(is(St(t),r))},no=new WeakMap,ls=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,o=t.parent,n=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!no.get(o))&&!n){no.set(t,!0);for(var s=[],a=cs(r,s),i=o.props,c=0,l=0;c<a.length;c++)for(var p=0;p<i.length;p++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[p]):i[p]+" "+a[c]}}},ds=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function so(e,t){switch(_r(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+nt+e+ee+e+e;case 6828:case 4268:return N+e+ee+e+e;case 6165:return N+e+ee+"flex-"+e+e;case 5187:return N+e+F(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+ee+"flex-$1$2")+e;case 5443:return N+e+ee+"flex-item-"+F(e,/flex-|-self/,"")+e;case 4675:return N+e+ee+"flex-line-pack"+F(e,/align-content|flex-|-self/,"")+e;case 5548:return N+e+ee+F(e,"shrink","negative")+e;case 5292:return N+e+ee+F(e,"basis","preferred-size")+e;case 6060:return N+"box-"+F(e,"-grow","")+N+e+ee+F(e,"grow","positive")+e;case 4554:return N+F(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return F(F(F(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return F(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return F(F(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4095:case 3583:case 4068:case 2532:return F(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oe(e)-1-t>6)switch(K(e,t+1)){case 109:if(K(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+nt+(K(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~st(e,"stretch")?so(F(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(K(e,t+1)!==115)break;case 6444:switch(K(e,oe(e)-3-(~st(e,"!important")&&10))){case 107:return F(e,":",":"+N)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(K(e,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(K(e,t+11)){case 114:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+ee+F(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return N+e+ee+e+e}return e}var us=function(t,r,o,n){if(t.length>-1&&!t.return)switch(t.type){case Ue:t.return=so(t.value,t.length);break;case bt:return Ne([qe(t,{value:F(t.value,"@","@"+N)})],n);case Be:if(t.length)return Zt(t.props,function(s){switch(Qt(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ne([qe(t,{props:[F(s,/:(read-\w+)/,":"+nt+"$1")]})],n);case"::placeholder":return Ne([qe(t,{props:[F(s,/:(plac\w+)/,":"+N+"input-$1")]}),qe(t,{props:[F(s,/:(plac\w+)/,":"+nt+"$1")]}),qe(t,{props:[F(s,/:(plac\w+)/,ee+"input-$1")]})],n)}return""})}},fs=[us],At=function(t){var r=t.key;if(r==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(m){var d=m.getAttribute("data-emotion");d.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=t.stylisPlugins||fs,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var d=m.getAttribute("data-emotion").split(" "),f=1;f<d.length;f++)s[d[f]]=!0;i.push(m)});var c,l=[ls,ds];{var p,x=[eo,ro(function(m){p.insert(m)})],u=to(l.concat(n,x)),w=function(d){return Ne(Zr(d),u)};c=function(d,f,g,T){p=g,w(d?d+"{"+f.styles+"}":f.styles),T&&(h.inserted[f.name]=!0)}}var h={key:r,sheet:new Or({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return h.sheet.hydrate(i),h};function ao(e){for(var t=0,r,o=0,n=e.length;n>=4;++o,n-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var io={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ps=!1,ms=/[A-Z]|^ms/g,hs=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fo=function(t){return t.charCodeAt(1)===45},co=function(t){return t!=null&&typeof t!="boolean"},rr=oo(function(e){return fo(e)?e:e.replace(ms,"-$&").toLowerCase()}),lo=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(hs,function(o,n,s){return xe={name:n,styles:s,next:xe},n})}return io[t]!==1&&!fo(t)&&typeof r=="number"&&r!==0?r+"px":r},gs="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ct(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return xe={name:n.name,styles:n.styles,next:xe},n.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)xe={name:a.name,styles:a.styles,next:xe},a=a.next;var i=s.styles+";";return i}return xs(e,t,r)}case"function":{if(e!==void 0){var c=xe,l=r(e);return xe=c,ct(e,t,l)}break}}var p=r;if(t==null)return p;var x=t[p];return x!==void 0?x:p}function xs(e,t,r){var o="";if(Array.isArray(r))for(var n=0;n<r.length;n++)o+=ct(e,t,r[n])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;t!=null&&t[i]!==void 0?o+=s+"{"+t[i]+"}":co(i)&&(o+=rr(s)+":"+lo(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&ps)throw new Error(gs);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)co(a[c])&&(o+=rr(s)+":"+lo(s,a[c])+";");else{var l=ct(e,t,a);switch(s){case"animation":case"animationName":{o+=rr(s)+":"+l+";";break}default:o+=s+"{"+l+"}"}}}}return o}var uo=/label:\s*([^\s;{]+)\s*(;|$)/g,xe;function ie(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,n="";xe=void 0;var s=e[0];if(s==null||s.raw===void 0)o=!1,n+=ct(r,t,s);else{var a=s;n+=a[0]}for(var i=1;i<e.length;i++)if(n+=ct(r,t,e[i]),o){var c=s;n+=c[i]}uo.lastIndex=0;for(var l="",p;(p=uo.exec(n))!==null;)l+="-"+p[1];var x=ao(n)+l;return{name:x,styles:n,next:xe}}var ys=!0;function Te(e,t,r){var o="";return r.split(" ").forEach(function(n){e[n]!==void 0?t.push(e[n]+";"):n&&(o+=n+" ")}),o}var Ye=function(t,r,o){var n=t.key+"-"+r.name;(o===!1||ys===!1)&&t.registered[n]===void 0&&(t.registered[n]=r.styles)},Je=function(t,r,o){Ye(t,r,o);var n=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+n:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function po(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function mo(e,t,r){var o=[],n=Te(e,o,r);return o.length<2?r:n+t(o)}var Le=function(t){var r=At(t);r.sheet.speedy=function(i){this.isSpeedy=i},r.compat=!0;var o=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered,void 0);return Je(r,x,!1),r.key+"-"+x.name},n=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered),u="animation-"+x.name;return po(r,{name:x.name,styles:"@keyframes "+u+"{"+x.styles+"}"}),u},s=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];var x=ie(l,r.registered);po(r,x)},a=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];return mo(r.registered,o,vs(l))};return{css:o,cx:a,injectGlobal:s,keyframes:n,hydrate:function(c){c.forEach(function(l){r.inserted[l]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:Te.bind(null,r.registered),merge:mo.bind(null,r.registered,o)}},vs=function e(t){for(var r="",o=0;o<t.length;o++){var n=t[o];if(n!=null){var s=void 0;switch(typeof n){case"boolean":break;case"object":{if(Array.isArray(n))s=e(n);else{s="";for(var a in n)n[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=n}s&&(r&&(r+=" "),r+=s)}}return r};var ye=Le({key:"css"}),Xa=ye.flush,Ya=ye.hydrate,Ja=ye.cx,Qa=ye.merge,Za=ye.getRegisteredStyles,ei=ye.injectGlobal,ti=ye.keyframes,ri=ye.css,oi=ye.sheet,ho=ye.cache;var go=(function(){function e(){Rr(this,e),Er(this,"_cacheList",[ho])}return $r(e,[{key:"add",value:function(r){var o=this.getCache(r.key);return o||(this._cacheList.push(r),r)}},{key:"delete",value:function(r){this._cacheList=this._cacheList.filter(function(o){return o.key!==r.key})}},{key:"hasCache",value:function(r){return this._cacheList.some(function(o){return o.key===r.key})}},{key:"getCache",value:function(r){return this._cacheList.find(function(o){return o.key===r})}},{key:"getCacheList",value:function(){return this._cacheList}}]),e})();var xo=typeof document<"u",or=function(t,r){return"".concat(t,"-").concat(r)},yo=function(t,r,o,n){var s=n.hashPriority||"high";Ye(t,r,o);var a=".".concat(or(t.key,r.name)),i=s==="low"?":where(".concat(a,")"):a;if(t.inserted[r.name]===void 0){var c="",l=r;do{var p=t.insert(r===l?i:"",l,t.sheet,!0);!xo&&p!==void 0&&(c+=p),l=l.next}while(l!==void 0);if(!xo&&c.length!==0)return c}};var Qe=function(t){return We(t)==="object"&&"styles"in t&&"name"in t&&"toString"in t},vo=function e(t){for(var r="",o=0;o<t.length;o++){var n=t[o];if(n!==null){var s=void 0;switch(We(n)){case"boolean":break;case"object":{if(Array.isArray(n))s=e(n);else{s="";for(var a in n)n[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=n}s&&(r&&(r+=" "),r+=s)}}return r},bo=function(t,r,o){var n=[],s=Te(t,n,o);return n.length<2?o:s+r(n)};var bs=function(t,r){return function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];var a=ie(n,t.registered,void 0);return yo(t,a,!1,r),or(t.key,a.name)}},Cs=function(t,r){return function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];var a=n.map(function(i){return Qe(i)?r(i):i});return bo(t.registered,r,vo(a))}},kt=function(t,r){var o=bs(t,{hashPriority:r.hashPriority||"high",label:r.label}),n=Cs(t,o);return{css:o,cx:n}};var he=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return ie(r)};var Co="acss";var yr=y(z());var wo=y(z()),So=function(t){return(0,wo.createContext)(t)};var ce=y(z()),Ot=y(z());var lt=y(z()),js=function(t){return t()},No=lt.useInsertionEffect?lt.useInsertionEffect:!1,lr=No||js,dr=No||lt.useLayoutEffect;var Lo=!1,zo=ce.createContext(typeof HTMLElement<"u"?At({key:"css"}):null),Ns=zo.Provider;var Wt=function(t){return(0,Ot.forwardRef)(function(r,o){var n=(0,Ot.useContext)(zo);return t(r,n,o)})},Pe=ce.createContext({});var Ls=function(t,r){if(typeof r=="function"){var o=r(t);return o}return Pr({},t,r)},zs=tr(function(e){return tr(function(t){return Ls(e,t)})}),fr=function(t){var r=ce.useContext(Pe);return t.theme!==r&&(r=zs(r)(t.theme)),ce.createElement(Pe.Provider,{value:r},t.children)};var Bt={}.hasOwnProperty,ur="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Oo=function(t,r){var o={};for(var n in r)Bt.call(r,n)&&(o[n]=r[n]);return o[ur]=t,o},Os=function(t){var r=t.cache,o=t.serialized,n=t.isStringTag;return Ye(r,o,n),lr(function(){return Je(r,o,n)}),null},Ws=Wt(function(e,t,r){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var n=e[ur],s=[o],a="";typeof e.className=="string"?a=Te(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=ie(s,void 0,ce.useContext(Pe));a+=t.key+"-"+i.name;var c={};for(var l in e)Bt.call(e,l)&&l!=="css"&&l!==ur&&!Lo&&(c[l]=e[l]);return c.className=a,r&&(c.ref=r),ce.createElement(ce.Fragment,null,ce.createElement(Os,{cache:t,serialized:i,isStringTag:typeof n=="string"}),ce.createElement(n,c))}),Wo=Ws;var Ae=y(z());var Yi=y(jo()),Bo=function(t,r){var o=arguments;if(r==null||!Bt.call(r,"css"))return Ae.createElement.apply(void 0,o);var n=o.length,s=new Array(n);s[0]=Wo,s[1]=Oo(t,r);for(var a=2;a<n;a++)s[a]=o[a];return Ae.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Bo||(Bo={}));var Uo=Wt(function(e,t){var r=e.styles,o=ie([r],void 0,Ae.useContext(Pe)),n=Ae.useRef();return dr(function(){var s=t.key+"-global",a=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,c=document.querySelector('style[data-emotion="'+s+" "+o.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(i=!0,c.setAttribute("data-emotion",s),a.hydrate([c])),n.current=[a,i],function(){a.flush()}},[t]),dr(function(){var s=n.current,a=s[0],i=s[1];if(i){s[1]=!1;return}if(o.next!==void 0&&Je(t,o.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",o,a,!1)},[t,o.name]),null});var Do=y(z()),_o=y(B()),Vo=function(t){return function(){for(var r=arguments.length,o=new Array(r),n=0;n<r;n++)o[n]=arguments[n];return(0,Do.memo)(function(s){var a=t();return(0,_o.jsx)(Uo,{styles:ie(o,void 0,A(A({},s),{},{theme:a}))})})}};var Ho=function(t){return function(r){var o=t(r);return function(n){var s=o(n),a=s.styles;return a}}};var ke=y(z()),pr=y(B()),Bs=["children","prefix","speedy","getStyleManager","container","nonce","insertionPoint","stylisPlugins","linters"],Go=function(t){return(0,ke.memo)(function(r){var o=r.children,n=r.prefix,s=r.speedy,a=r.getStyleManager,i=r.container,c=r.nonce,l=r.insertionPoint,p=r.stylisPlugins,x=r.linters,u=Ie(r,Bs),w=(0,ke.useContext)(t),h=n??w.sheet.key,m=i??w.sheet.container,d=s??w.sheet.isSpeedy,f=(0,ke.useMemo)(function(){var T=!1,j=Le({speedy:d??T,key:h,container:m,nonce:c,insertionPoint:l,stylisPlugins:p});if(typeof global<"u"){var L=global.__ANTD_STYLE_CACHE_MANAGER_FOR_SSR__;L&&(j.cache=L.add(j.cache))}return j},[h,d,m,c,l,p]);(0,ke.useEffect)(function(){a?.(f)},[f]);var g=(0,pr.jsx)(t.Provider,{value:f,children:o});return Object.keys(u).length||m?(0,pr.jsx)(kr,A(A({linters:x,container:m},u),{},{children:g})):g})};var dt=y(z());var Jo=y(z());var qo=function(t){var r=t.css,o=t.token;return{buttonDefaultHover:r({backgroundColor:o.colorBgContainer,border:"1px solid ".concat(o.colorBorder),cursor:"pointer",":hover":{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},":active":{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive}})}};var Ko=function(t){return Object.fromEntries(Object.entries(t).map(function(r){var o=ae(r,2),n=o[0],s=o[1];return[n,s.styles]}))};var Ze=function(){var t=Fe.useToken(),r=t.token;return r};var Yo=y(z());var Xo=y(z());var Ee=function(t){return typeof window<"u"?matchMedia&&matchMedia("(prefers-color-scheme: ".concat(t,")")):{matches:!1}};var mr,Ut=(0,Xo.createContext)({appearance:"light",setAppearance:function(){},isDarkMode:!1,themeMode:"light",setThemeMode:function(){},browserPrefers:(mr=Ee("dark"))!==null&&mr!==void 0&&mr.matches?"dark":"light"});var Re=function(){return(0,Yo.useContext)(Ut)};var Qo=function(){var t=Ze(),r=Re(),o=r.appearance,n=r.isDarkMode;return(0,Jo.useMemo)(function(){return Ko(qo({token:t,css:he,appearance:o,isDarkMode:n}))},[t,o,n])};var Zo=y(z());var Dt=function(){var t=Ze(),r=Qo();return(0,Zo.useMemo)(function(){return A(A({},t),{},{stylish:r})},[t,r])};var en=function(t){return A(A({},t),{},{mobile:t.xs,tablet:t.md,laptop:t.lg,desktop:t.xxl})};var tn=y(z()),rn=function(){var t=Ze(),r={xs:"@media (max-width: ".concat(t.screenXSMax,"px)"),sm:"@media (max-width: ".concat(t.screenSMMax,"px)"),md:"@media (max-width: ".concat(t.screenMDMax,"px)"),lg:"@media (max-width: ".concat(t.screenLGMax,"px)"),xl:"@media (max-width: ".concat(t.screenXLMax,"px)"),xxl:"@media (min-width: ".concat(t.screenXXLMin,"px)")};return(0,tn.useMemo)(function(){return en(r)},[t])},on=function(t,r){return Object.entries(t).map(function(o){var n=ae(o,2),s=n[0],a=n[1],i=a;return Qe(a)||(i=he(a)),r[s]?"".concat(r[s]," {").concat(i.styles,"}"):""}).join("")};var Us=["stylish","appearance","isDarkMode","prefixCls","iconPrefixCls"],Ds=["prefixCls","iconPrefixCls"],nn=function(t){var r=t.hashPriority,o=t.useTheme,n=t.EmotionContext;return function(s,a){var i=a?.__BABEL_FILE_NAME__,c=!!i;return function(l){var p=o(),x=(0,dt.useContext)(n),u=x.cache,w=kt(u,{hashPriority:a?.hashPriority||r,label:a?.label}),h=w.cx,m=w.css,d=rn(),f=(0,dt.useMemo)(function(){var g;if(s instanceof Function){var T=p.stylish,j=p.appearance,L=p.isDarkMode,O=p.prefixCls,v=p.iconPrefixCls,G=Ie(p,Us),Q=function(_){return on(_,d)};Object.assign(Q,d),g=s({token:G,stylish:T,appearance:j,isDarkMode:L,prefixCls:O,iconPrefixCls:v,cx:h,css:he,responsive:Q},l)}else g=s;return We(g)==="object"&&(Qe(g)?g=m(g):g=Object.fromEntries(Object.entries(g).map(function(ue){var _=ae(ue,2),be=_[0],fe=_[1],tt=c?"".concat(i,"-").concat(be):void 0;return We(fe)==="object"?c?[be,m(fe,"label:".concat(tt))]:[be,m(fe)]:[be,fe]}))),g},[l,p]);return(0,dt.useMemo)(function(){var g=p.prefixCls,T=p.iconPrefixCls,j=Ie(p,Ds);return{styles:f,cx:h,theme:j,prefixCls:g,iconPrefixCls:T}},[f,p])}}};var pt=y(z());var sn=y(B()),hr=function(t){if(t.ThemeProvider)return t.ThemeProvider;var r=t.ThemeContext;return function(o){return(0,sn.jsx)(r.Provider,{value:o.theme,children:o.children})}};var an=fr,_t=Pe;var et=y(z());var cn=y(B()),ln=(0,et.memo)(function(e){var t=e.children,r=e.theme,o=e.prefixCls,n=e.getStaticInstance,s=e.staticInstanceConfig,a=Re(),i=a.appearance,c=a.isDarkMode,l=Mr.useMessage(s?.message),p=ae(l,2),x=p[0],u=p[1],w=Fr.useNotification(s?.notification),h=ae(w,2),m=h[0],d=h[1],f=Ir.useModal(),g=ae(f,2),T=g[0],j=g[1];(0,et.useEffect)(function(){n?.({message:x,modal:T,notification:m})},[]);var L=(0,et.useMemo)(function(){var O=c?Fe.darkAlgorithm:Fe.defaultAlgorithm,v=r;if(typeof r=="function"&&(v=r(i)),!v)return{algorithm:O};var G=v.algorithm?v.algorithm instanceof Array?v.algorithm:[v.algorithm]:[];return A(A({},v),{},{algorithm:v.algorithm?[O].concat(Ar(G)):O})},[r,c]);return(0,cn.jsxs)(ht,{prefixCls:o,theme:L,children:[u,d,j,t]})});ln.displayName="AntdProvider";var dn=ln;var ze=y(z());var fn=y(z());function _s(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,n,s,a,i=[],c=!0,l=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(i.push(o.value),i.length!==t);c=!0);}catch(p){l=!0,n=p}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw n}}return i}}function Vs(e,t){return Hs(e)||_s(e,t)||Gs(e,t)||qs()}function Hs(e){if(Array.isArray(e))return e}function Gs(e,t){if(e){if(typeof e=="string")return un(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return un(e,t)}}function un(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function qs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ks(e,t){var r=t||{},o=r.defaultValue,n=r.value,s=r.onChange,a=r.postState,i=fn.default.useState(function(){return n!==void 0?n:o!==void 0?typeof o=="function"?o():o:typeof e=="function"?e():e}),c=Vs(i,2),l=c[0],p=c[1],x=n!==void 0?n:l;a&&(x=a(x));function u(w){p(w),x!==w&&s&&s(w,x)}return[x,u]}var gr=Ks;var xr=y(z()),Vt=function(t){typeof xr.startTransition=="function"?(0,xr.startTransition)(t):t()};var pn=y(B()),mn=y(B()),$e,Xs=function(t){var r=t.themeMode,o=t.setAppearance,n=t.setBrowserPrefers,s=function(){Vt(function(){Ee("dark").matches?o("dark"):o("light")})},a=function(){Vt(function(){Ee("dark").matches?n("dark"):n("light")})};return(0,ze.useLayoutEffect)(function(){if(r!=="auto"){Vt(function(){o(r)});return}return setTimeout(s,1),$e||($e=Ee("dark")),$e.addEventListener("change",s),function(){$e.removeEventListener("change",s)}},[r]),(0,ze.useLayoutEffect)(function(){return $e||($e=Ee("dark")),$e.addEventListener("change",a),function(){$e.removeEventListener("change",a)}},[]),null},hn=(0,ze.memo)(function(e){var t,r=e.children,o=e.appearance,n=e.defaultAppearance,s=e.onAppearanceChange,a=e.themeMode,i=e.defaultThemeMode,c=e.onThemeModeChange,l=e.useTheme,p=l(),x=p.appearance,u=p.themeMode,w=gr("light",{value:a,defaultValue:i??u,onChange:function(ue){return c?.(ue)}}),h=ae(w,2),m=h[0],d=h[1],f=gr("light",{value:o,defaultValue:n??x,onChange:function(ue){return s?.(ue)}}),g=ae(f,2),T=g[0],j=g[1],L=(0,ze.useState)((t=Ee("dark"))!==null&&t!==void 0&&t.matches?"dark":"light"),O=ae(L,2),v=O[0],G=O[1];return(0,mn.jsxs)(Ut.Provider,{value:{themeMode:m,setThemeMode:d,appearance:T,setAppearance:j,isDarkMode:T==="dark",browserPrefers:v},children:[typeof window<"u"&&(0,pn.jsx)(Xs,{themeMode:m,setAppearance:j,setBrowserPrefers:G}),r]})});hn.displayName="ThemeSwitcher";var gn=hn;var ut=y(z());var xn=y(B()),Ys=["stylish"],Js=function(t){var r=t.children,o=t.customToken,n=t.defaultCustomToken,s=t.customStylish,a=t.prefixCls,i=t.StyledThemeProvider,c=Re(),l=c.appearance,p=c.isDarkMode,x=Dt(),u=x.stylish,w=Ie(x,Ys),h=(0,ut.useMemo)(function(){return n?n instanceof Function?n({token:w,appearance:l,isDarkMode:p}):n:{}},[n,w,l]),m=(0,ut.useMemo)(function(){return o instanceof Function?A(A({},h),o({token:w,appearance:l,isDarkMode:p})):A(A({},h),o)},[h,o,w,l]),d=(0,ut.useMemo)(function(){return s?s({token:A(A({},w),m),stylish:u,appearance:l,isDarkMode:p,css:he}):{}},[s,w,m,u,l]),f=(0,ut.useMemo)(function(){return A(A({},d),u)},[d,u]),g=A(A(A(A({},w),m),{},{stylish:f},c),{},{prefixCls:a});return(0,xn.jsx)(i,{theme:g,children:r})},yn=Js;var ft=y(B()),vn=function(t){var r=t.styledConfig?hr(t.styledConfig):void 0,o=t.StyleEngineContext;return(0,pt.memo)(function(n){var s=n.children,a=n.customToken,i=n.customStylish,c=n.theme,l=n.getStaticInstance,p=n.prefixCls,x=n.staticInstanceConfig,u=n.appearance,w=n.defaultAppearance,h=n.onAppearanceChange,m=n.themeMode,d=n.defaultThemeMode,f=n.onThemeModeChange,g=n.styled,T=(0,pt.useContext)(o),j=T.prefixCls,L=T.StyledThemeContext,O=T.CustomThemeContext,v=(0,pt.useContext)(O),G=g?hr(g):r||an,Q=p||j;return(0,ft.jsx)(o.Provider,{value:{prefixCls:Q,StyledThemeContext:g?.ThemeContext||L||_t,CustomThemeContext:O},children:(0,ft.jsx)(gn,{themeMode:m,defaultThemeMode:d,onThemeModeChange:f,defaultAppearance:w,appearance:u,onAppearanceChange:h,useTheme:t.useTheme,children:(0,ft.jsx)(dn,{prefixCls:Q,staticInstanceConfig:x,theme:c,getStaticInstance:l,children:(0,ft.jsx)(yn,{prefixCls:Q,customToken:a,defaultCustomToken:v,customStylish:i,StyledThemeProvider:G,children:s})})})})})};var Oe=y(z());var bn=function(t){return function(){var r=t.StyleEngineContext,o=(0,Oe.useContext)(r),n=o.StyledThemeContext,s=o.CustomThemeContext,a=o.prefixCls,i=Dt(),c=Re(),l=(0,Oe.useContext)(s),p=(0,Oe.useContext)(n??_t)||{},x=(0,Oe.useContext)(ht.ConfigContext),u=x.iconPrefixCls,w=x.getPrefixCls,h=w(),m=a&&a!=="ant"?a:h,d=(0,Oe.useMemo)(function(){return A(A(A(A({},i),c),l),{},{prefixCls:m,iconPrefixCls:u})},[i,c,l,m,u]);return!p||Object.keys(p).length===0?d:A(A({},p),{},{prefixCls:m,iconPrefixCls:u})}};var Cn=new go;typeof global<"u"&&(global.__ANTD_STYLE_CACHE_MANAGER_FOR_SSR__=Cn);var wn=function(t){var r,o,n,s=A(A({},t),{},{key:(r=t.key)!==null&&r!==void 0?r:"zcss",speedy:(o=t.speedy)!==null&&o!==void 0?o:!1}),a=Le({key:s.key,speedy:s.speedy,container:s.container}),i=So(a),c=Go(i);a.cache=Cn.add(a.cache);var l=(0,yr.createContext)(s.customToken?s.customToken:{}),p=(n=s.styled)===null||n===void 0?void 0:n.ThemeContext,x=(0,yr.createContext)({CustomThemeContext:l,StyledThemeContext:p,prefixCls:s?.prefixCls,iconPrefixCls:s?.iconPrefixCls}),u=bn({StyleEngineContext:x}),w=nn({hashPriority:s.hashPriority,useTheme:u,EmotionContext:i}),h=Vo(u),m=Ho(w),d=vn({styledConfig:s.styled,StyleEngineContext:x,useTheme:u});d.displayName="AntdStyleThemeProvider";var f=kt(a.cache,{hashPriority:s.hashPriority}),g=f.cx,T=a.injectGlobal,j=a.keyframes;return{createStyles:w,createGlobalStyle:h,createStylish:m,css:he,cx:g,keyframes:j,injectGlobal:T,styleManager:a,useTheme:u,StyleProvider:c,ThemeProvider:d}};var ge=wn({key:Co,speedy:!1}),Sn=ge.createStyles,zl=ge.createGlobalStyle,Ol=ge.createStylish,Wl=ge.css,Bl=ge.cx,Ul=ge.keyframes,Dl=ge.injectGlobal,_l=ge.styleManager,Vl=ge.ThemeProvider,Hl=ge.StyleProvider,Gl=ge.useTheme;var C=y(z());var ra=y(z());var Tn={primary:{50:"#f0f4ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},success:"#22c55e",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6",light:{bg:"#fafafa",surface:"rgba(255, 255, 255, 1)",surfaceHover:"#f9fafb",surfaceActive:"#f3f4f6",border:"#e5e7eb",borderHover:"#d1d5db",text:"#111827",textSecondary:"#6b7280",textMuted:"#9ca3af"},dark:{bg:"#0a0a0a",surface:"rgba(23, 23, 23, 0.95)",surfaceHover:"#1f1f1f",surfaceActive:"#262626",border:"#27272a",borderHover:"#3f3f46",text:"#fafafa",textSecondary:"#a1a1aa",textMuted:"#71717a"}},Pn={none:"0",sm:"4px",md:"10px",lg:"16px",xl:"20px",xxl:"28px",xxxl:"32px",full:"9999px"},An={0:"0",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",8:"32px",10:"40px",12:"48px"},kn={none:"none",sm:"0 1px 2px rgba(0, 0, 0, 0.04)",md:"0 2px 8px rgba(0, 0, 0, 0.06)",lg:"0 4px 12px rgba(0, 0, 0, 0.08)",xl:"0 8px 24px rgba(0, 0, 0, 0.1)"},En={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',sizes:{xs:{size:"12px",lineHeight:"16px",weight:400},sm:{size:"14px",lineHeight:"20px",weight:400},base:{size:"16px",lineHeight:"24px",weight:400},lg:{size:"18px",lineHeight:"28px",weight:500},xl:{size:"20px",lineHeight:"28px",weight:600},"2xl":{size:"24px",lineHeight:"32px",weight:600}}},Rn={duration:{fast:"150ms",normal:"250ms",slow:"350ms"},easing:{default:"cubic-bezier(0.4, 0, 0.2, 1)",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"}},I={colors:Tn,radius:Pn,spacing:An,shadows:kn,typography:En,animation:Rn};var mt={token:{colorPrimary:I.colors.primary[500],colorPrimaryHover:I.colors.primary[600],colorPrimaryActive:I.colors.primary[700],colorSuccess:I.colors.success,colorWarning:I.colors.warning,colorError:I.colors.error,colorInfo:I.colors.info,colorText:I.colors.light.text,colorTextSecondary:I.colors.light.textSecondary,colorTextTertiary:I.colors.light.textMuted,colorBgContainer:I.colors.light.surface,colorBgElevated:I.colors.light.surface,colorBgLayout:I.colors.light.bg,colorBorder:I.colors.light.border,colorBorderSecondary:I.colors.light.borderHover,fontFamily:I.typography.fontFamily,fontSize:16,fontSizeSM:14,fontSizeLG:18,lineHeight:1.5,borderRadius:8,borderRadiusLG:12,borderRadiusSM:4,borderRadiusXS:2,boxShadow:I.shadows.md,boxShadowSecondary:I.shadows.lg,boxShadowTertiary:I.shadows.xl,motionDurationFast:I.animation.duration.fast,motionDurationMid:I.animation.duration.normal,motionDurationSlow:I.animation.duration.slow},components:{Card:{borderRadius:12,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.06)"},Button:{borderRadius:8,controlHeight:40,controlHeightLG:44,controlHeightSM:32},Input:{borderRadius:8,controlHeight:40},Modal:{borderRadius:16},Select:{borderRadius:8,controlHeight:40},Tag:{borderRadius:4},Alert:{borderRadius:8},Menu:{borderRadius:8},Dropdown:{borderRadius:8}}},Qs={...mt,token:{...mt.token,colorText:I.colors.dark.text,colorTextSecondary:I.colors.dark.textSecondary,colorTextTertiary:I.colors.dark.textMuted,colorBgContainer:I.colors.dark.surface,colorBgElevated:I.colors.dark.surface,colorBgLayout:I.colors.dark.bg,colorBgMask:"rgba(0, 0, 0, 0.7)",colorBorder:I.colors.dark.border,colorBorderSecondary:I.colors.dark.borderHover},components:{...mt.components,Modal:{...mt.components?.Modal,colorBgElevated:I.colors.dark.surface}}};var{colors:Ql,radius:Zl,spacing:ed,shadows:td,typography:rd,animation:od}=I;var Mn=y(B()),{Text:xd}=gt;var vr=y(B()),{Text:Td}=gt;var Ht=y(z());var In=y(z());var na=y(B());var sa=y(z());var Fn=y(B()),{useToken:Bd}=Fe;var Ud=Sn(({token:e,css:t})=>({surface:t`
3
3
  position: relative;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{b as Xe,c as zt,d as Dt,f as tt,h as nt,k as _n,l as Cn,m as At}from"./embed-page-chunk-S4XZPBRM.js";import{a as Os}from"./embed-page-chunk-QV7QAJ4N.js";import{a as Hs}from"./embed-page-chunk-F7TA3LRH.js";import{a as et}from"./embed-page-chunk-R5QL57JJ.js";import{c as Je,f as Ze}from"./embed-page-chunk-QBTAJ2YI.js";var mo=Je(ho=>{"use strict";var Te=et();function mi(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yi=typeof Object.is=="function"?Object.is:mi,xi=Te.useState,bi=Te.useEffect,wi=Te.useLayoutEffect,Ei=Te.useDebugValue;function Si(e,t){var n=t(),o=xi({inst:{value:n,getSnapshot:t}}),r=o[0].inst,s=o[1];return wi(function(){r.value=n,r.getSnapshot=t,cn(r)&&s({inst:r})},[e,n,t]),bi(function(){return cn(r)&&s({inst:r}),e(function(){cn(r)&&s({inst:r})})},[e]),Ei(n),n}function cn(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yi(e,n)}catch{return!0}}function vi(e,t){return t()}var _i=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vi:Si;ho.useSyncExternalStore=Te.useSyncExternalStore!==void 0?Te.useSyncExternalStore:_i});var xo=Je((tl,yo)=>{"use strict";yo.exports=mo()});var wo=Je(bo=>{"use strict";var bt=et(),Ci=xo();function Ni(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ki=typeof Object.is=="function"?Object.is:Ni,Mi=Ci.useSyncExternalStore,Ii=bt.useRef,Pi=bt.useEffect,zi=bt.useMemo,Di=bt.useDebugValue;bo.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var s=Ii(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=zi(function(){function f(h){if(!l){if(l=!0,g=h,h=o(h),r!==void 0&&i.hasValue){var p=i.value;if(r(p,h))return c=p}return c=h}if(p=c,ki(g,h))return p;var y=o(h);return r!==void 0&&r(p,y)?(g=h,p):(g=h,c=y)}var l=!1,g,c,d=n===void 0?null:n;return[function(){return f(t())},d===null?void 0:function(){return f(d())}]},[t,n,o,r]);var a=Mi(e,s[0],s[1]);return Pi(function(){i.hasValue=!0,i.value=a},[a]),Di(a),a}});var So=Je((ol,Eo)=>{"use strict";Eo.exports=wo()});var ae={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},De=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tt=["Enter"," ","Escape"],Rt={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},ye;(function(e){e.Strict="strict",e.Loose="loose"})(ye||(ye={}));var ge;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ge||(ge={}));var Se;(function(e){e.Partial="partial",e.Full="full"})(Se||(Se={}));var Bt={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},de;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(de||(de={}));var Ie;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ie||(Ie={}));var F;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(F||(F={}));var Nn={[F.Left]:F.Right,[F.Right]:F.Left,[F.Top]:F.Bottom,[F.Bottom]:F.Top};function Vt(e){return e===null?null:e?"valid":"invalid"}var Ft=e=>"id"in e&&"source"in e&&"target"in e,Rn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Yt=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Ge=(e,t=[0,0])=>{let{width:n,height:o}=ue(e),r=e.origin??t,s=n*r[0],i=o*r[1];return{x:e.position.x-s,y:e.position.y-i}},Zt=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,r)=>{let s=typeof r=="string",i=!t.nodeLookup&&!s?r:void 0;t.nodeLookup&&(i=s?t.nodeLookup.get(r):Yt(r)?r:t.nodeLookup.get(r.id));let a=i?st(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return at(o,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ct(n)},Ae=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=at(n,st(r)),o=!0)}),o?ct(n):{x:0,y:0,width:0,height:0}},it=(e,t,[n,o,r]=[0,0,1],s=!1,i=!1)=>{let a={...Oe(t,[n,o,r]),width:t.width/r,height:t.height/r},f=[];for(let l of e.values()){let{measured:g,selectable:c=!0,hidden:d=!1}=l;if(i&&!c||d)continue;let h=g.width??l.width??l.initialWidth??null,p=g.height??l.height??l.initialHeight??null,y=$e(a,_e(l)),m=(h??0)*(p??0),x=s&&y>0;(!l.internals.handleBounds||x||y>=m||l.dragging)&&f.push(l)}return f},Bn=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function Ls(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function Vn({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:s},i){if(e.size===0)return Promise.resolve(!0);let a=Ls(e,i),f=Ae(a),l=qe(f,t,n,i?.minZoom??r,i?.maxZoom??s,i?.padding??.1);return await o.setViewport(l,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)}function Xt({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:s}){let i=n.get(e),a=i.parentId?n.get(i.parentId):void 0,{x:f,y:l}=a?a.internals.positionAbsolute:{x:0,y:0},g=i.origin??o,c=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!a)s?.("005",ae.error005());else{let h=a.measured.width,p=a.measured.height;h&&p&&(c=[[f,l],[f+h,l+p]])}else a&&ze(i.extent)&&(c=[[i.extent[0][0]+f,i.extent[0][1]+l],[i.extent[1][0]+f,i.extent[1][1]+l]]);let d=ze(c)?ve(t,c,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&s?.("015",ae.error015()),{position:{x:d.x-f+(i.measured.width??0)*g[0],y:d.y-l+(i.measured.height??0)*g[1]},positionAbsolute:d}}async function Fn({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){let s=new Set(e.map(d=>d.id)),i=[];for(let d of n){if(d.deletable===!1)continue;let h=s.has(d.id),p=!h&&d.parentId&&i.find(y=>y.id===d.parentId);(h||p)&&i.push(d)}let a=new Set(t.map(d=>d.id)),f=o.filter(d=>d.deletable!==!1),g=Bn(i,f);for(let d of f)a.has(d.id)&&!g.find(p=>p.id===d.id)&&g.push(d);if(!r)return{edges:g,nodes:i};let c=await r({nodes:i,edges:g});return typeof c=="boolean"?c?{edges:g,nodes:i}:{edges:[],nodes:[]}:c}var Pe=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ve=(e={x:0,y:0},t,n)=>({x:Pe(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Pe(e.y,t[0][1],t[1][1]-(n?.height??0))});function Yn(e,t,n){let{width:o,height:r}=ue(n),{x:s,y:i}=n.internals.positionAbsolute;return ve(e,[[s,i],[s+o,i+r]],t)}var kn=(e,t,n)=>e<t?Pe(Math.abs(e-t),1,t)/t:e>n?-Pe(Math.abs(e-n),1,t)/t:0,Zn=(e,t,n=15,o=40)=>{let r=kn(e.x,o,t.width-o)*n,s=kn(e.y,o,t.height-o)*n;return[r,s]},at=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Lt=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),ct=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),_e=(e,t=[0,0])=>{let{x:n,y:o}=Yt(e)?e.internals.positionAbsolute:Ge(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},st=(e,t=[0,0])=>{let{x:n,y:o}=Yt(e)?e.internals.positionAbsolute:Ge(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},Wt=(e,t)=>ct(at(Lt(e),Lt(t))),$e=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},Kt=e=>ce(e.width)&&ce(e.height)&&ce(e.x)&&ce(e.y),ce=e=>!isNaN(e)&&isFinite(e),Gt=(e,t)=>{},He=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Oe=({x:e,y:t},[n,o,r],s=!1,i=[1,1])=>{let a={x:(e-n)/r,y:(t-o)/r};return s?He(a,i):a},Ke=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function ke(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ts(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=ke(e,n),r=ke(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){let o=ke(e.top??e.y??0,n),r=ke(e.bottom??e.y??0,n),s=ke(e.left??e.x??0,t),i=ke(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:s,x:s+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Rs(e,t,n,o,r,s){let{x:i,y:a}=Ke(e,[t,n,o]),{x:f,y:l}=Ke({x:e.x+e.width,y:e.y+e.height},[t,n,o]),g=r-f,c=s-l;return{left:Math.floor(i),top:Math.floor(a),right:Math.floor(g),bottom:Math.floor(c)}}var qe=(e,t,n,o,r,s)=>{let i=Ts(s,t,n),a=(t-i.x)/e.width,f=(n-i.y)/e.height,l=Math.min(a,f),g=Pe(l,o,r),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*g,p=n/2-d*g,y=Rs(e,h,p,g,t,n),m={left:Math.min(y.left-i.left,0),top:Math.min(y.top-i.top,0),right:Math.min(y.right-i.right,0),bottom:Math.min(y.bottom-i.bottom,0)};return{x:h-m.left+m.right,y:p-m.top+m.bottom,zoom:g}},Le=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ze(e){return e!=null&&e!=="parent"}function ue(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function lt(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function qt(e,t={width:0,height:0},n,o,r){let s={...e},i=o.get(n);if(i){let a=i.origin||r;s.x+=i.internals.positionAbsolute.x-(t.width??0)*a[0],s.y+=i.internals.positionAbsolute.y-(t.height??0)*a[1]}return s}function Ut(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Xn(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function Wn(e){return{...Rt,...e||{}}}function We(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){let{x:s,y:i}=le(e),a=Oe({x:s-(r?.left??0),y:i-(r?.top??0)},o),{x:f,y:l}=n?He(a,t):a;return{xSnapped:f,ySnapped:l,...a}}var dt=e=>({width:e.offsetWidth,height:e.offsetHeight}),Qt=e=>e?.getRootNode?.()||window?.document,Bs=["INPUT","SELECT","TEXTAREA"];function jt(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Bs.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Jt=e=>"clientX"in e,le=(e,t)=>{let n=Jt(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},Mn=(e,t,n,o,r)=>{let s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{let a=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...dt(i)}})};function ut({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:s,targetControlX:i,targetControlY:a}){let f=e*.125+r*.375+i*.375+n*.125,l=t*.125+s*.375+a*.375+o*.125,g=Math.abs(f-e),c=Math.abs(l-t);return[f,l,g,c]}function ot(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function In({pos:e,x1:t,y1:n,x2:o,y2:r,c:s}){switch(e){case F.Left:return[t-ot(t-o,s),n];case F.Right:return[t+ot(o-t,s),n];case F.Top:return[t,n-ot(n-r,s)];case F.Bottom:return[t,n+ot(r-n,s)]}}function ft({sourceX:e,sourceY:t,sourcePosition:n=F.Bottom,targetX:o,targetY:r,targetPosition:s=F.Top,curvature:i=.25}){let[a,f]=In({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,g]=In({pos:s,x1:o,y1:r,x2:e,y2:t,c:i}),[c,d,h,p]=ut({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:f,targetControlX:l,targetControlY:g});return[`M${e},${t} C${a},${f} ${l},${g} ${o},${r}`,c,d,h,p]}function en({sourceX:e,sourceY:t,targetX:n,targetY:o}){let r=Math.abs(n-e)/2,s=n<e?n+r:n-r,i=Math.abs(o-t)/2,a=o<t?o+i:o-i;return[s,a,r,i]}function Kn({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:s="basic"}){if(s==="manual")return o;let i=r&&n?o+1e3:o,a=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return i+a}function Gn({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){let s=at(st(e),st(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);let i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return $e(i,ct(s))>0}var Vs=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Fs=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tn=(e,t,n={})=>{if(!e.source||!e.target)return Gt("006",ae.error006()),t;let o=n.getEdgeId||Vs,r;return Ft(e)?r={...e}:r={...e,id:o(e)},Fs(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function gt({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[r,s,i,a]=en({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,s,i,a]}var Pn={[F.Left]:{x:-1,y:0},[F.Right]:{x:1,y:0},[F.Top]:{x:0,y:-1},[F.Bottom]:{x:0,y:1}},Ys=({source:e,sourcePosition:t=F.Bottom,target:n})=>t===F.Left||t===F.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},zn=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zs({source:e,sourcePosition:t=F.Bottom,target:n,targetPosition:o=F.Top,center:r,offset:s,stepPosition:i}){let a=Pn[t],f=Pn[o],l={x:e.x+a.x*s,y:e.y+a.y*s},g={x:n.x+f.x*s,y:n.y+f.y*s},c=Ys({source:l,sourcePosition:t,target:g}),d=c.x!==0?"x":"y",h=c[d],p=[],y,m,x={x:0,y:0},b={x:0,y:0},[,,u,w]=en({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*f[d]===-1){d==="x"?(y=r.x??l.x+(g.x-l.x)*i,m=r.y??(l.y+g.y)/2):(y=r.x??(l.x+g.x)/2,m=r.y??l.y+(g.y-l.y)*i);let S=[{x:y,y:l.y},{x:y,y:g.y}],_=[{x:l.x,y:m},{x:g.x,y:m}];a[d]===h?p=d==="x"?S:_:p=d==="x"?_:S}else{let S=[{x:l.x,y:g.y}],_=[{x:g.x,y:l.y}];if(d==="x"?p=a.x===h?_:S:p=a.y===h?S:_,t===o){let M=Math.abs(e[d]-n[d]);if(M<=s){let A=Math.min(s-1,s-M);a[d]===h?x[d]=(l[d]>e[d]?-1:1)*A:b[d]=(g[d]>n[d]?-1:1)*A}}if(t!==o){let M=d==="x"?"y":"x",A=a[d]===f[M],H=l[M]>g[M],z=l[M]<g[M];(a[d]===1&&(!A&&H||A&&z)||a[d]!==1&&(!A&&z||A&&H))&&(p=d==="x"?S:_)}let I={x:l.x+x.x,y:l.y+x.y},k={x:g.x+b.x,y:g.y+b.y},R=Math.max(Math.abs(I.x-p[0].x),Math.abs(k.x-p[0].x)),C=Math.max(Math.abs(I.y-p[0].y),Math.abs(k.y-p[0].y));R>=C?(y=(I.x+k.x)/2,m=p[0].y):(y=p[0].x,m=(I.y+k.y)/2)}return[[e,{x:l.x+x.x,y:l.y+x.y},...p,{x:g.x+b.x,y:g.y+b.y},n],y,m,u,w]}function Xs(e,t,n,o){let r=Math.min(zn(e,t)/2,zn(t,n)/2,o),{x:s,y:i}=t;if(e.x===s&&s===n.x||e.y===i&&i===n.y)return`L${s} ${i}`;if(e.y===i){let l=e.x<n.x?-1:1,g=e.y<n.y?1:-1;return`L ${s+r*l},${i}Q ${s},${i} ${s},${i+r*g}`}let a=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${i+r*f}Q ${s},${i} ${s+r*a},${i}`}function Ue({sourceX:e,sourceY:t,sourcePosition:n=F.Bottom,targetX:o,targetY:r,targetPosition:s=F.Top,borderRadius:i=5,centerX:a,centerY:f,offset:l=20,stepPosition:g=.5}){let[c,d,h,p,y]=Zs({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:s,center:{x:a,y:f},offset:l,stepPosition:g});return[c.reduce((x,b,u)=>{let w="";return u>0&&u<c.length-1?w=Xs(c[u-1],b,c[u+1],i):w=`${u===0?"M":"L"}${b.x} ${b.y}`,x+=w,x},""),d,h,p,y]}function Dn(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qn(e){let{sourceNode:t,targetNode:n}=e;if(!Dn(t)||!Dn(n))return null;let o=t.internals.handleBounds||An(t.handles),r=n.internals.handleBounds||An(n.handles),s=$n(o?.source??[],e.sourceHandle),i=$n(e.connectionMode===ye.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!s||!i)return e.onError?.("008",ae.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let a=s?.position||F.Bottom,f=i?.position||F.Top,l=xe(t,s,a),g=xe(n,i,f);return{sourceX:l.x,sourceY:l.y,targetX:g.x,targetY:g.y,sourcePosition:a,targetPosition:f}}function An(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function xe(e,t,n=F.Left,o=!1){let r=(t?.x??0)+e.internals.positionAbsolute.x,s=(t?.y??0)+e.internals.positionAbsolute.y,{width:i,height:a}=t??ue(e);if(o)return{x:r+i/2,y:s+a/2};switch(t?.position??n){case F.Top:return{x:r+i/2,y:s};case F.Right:return{x:r+i,y:s+a/2};case F.Bottom:return{x:r+i/2,y:s+a};case F.Left:return{x:r,y:s+a/2}}}function $n(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function pt(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Un(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){let s=new Set;return e.reduce((i,a)=>([a.markerStart||o,a.markerEnd||r].forEach(f=>{if(f&&typeof f=="object"){let l=pt(f,t);s.has(l)||(i.push({id:l,color:f.color||n,...f}),s.add(l))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))}var Qn=1e3,Ws=10,nn={nodeOrigin:[0,0],nodeExtent:De,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ks={...nn,checkEquality:!0};function on(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function jn(e,t,n){let o=on(nn,n);for(let r of e.values())if(r.parentId)sn(r,e,t,o);else{let s=Ge(r,o.nodeOrigin),i=ze(r.extent)?r.extent:o.nodeExtent,a=ve(s,i,ue(r));r.internals.positionAbsolute=a}}function Gs(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let r of e.handles){let s={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(s):r.type==="target"&&o.push(s)}return{source:n,target:o}}function rn(e){return e==="manual"}function ht(e,t,n,o={}){let r=on(Ks,o),s={i:0},i=new Map(t),a=r?.elevateNodesOnSelect&&!rn(r.zIndexMode)?Qn:0,f=e.length>0;t.clear(),n.clear();for(let l of e){let g=i.get(l.id);if(r.checkEquality&&l===g?.internals.userNode)t.set(l.id,g);else{let c=Ge(l,r.nodeOrigin),d=ze(l.extent)?l.extent:r.nodeExtent,h=ve(c,d,ue(l));g={...r.defaults,...l,measured:{width:l.measured?.width,height:l.measured?.height},internals:{positionAbsolute:h,handleBounds:Gs(l,g),z:Jn(l,a,r.zIndexMode),userNode:l}},t.set(l.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(f=!1),l.parentId&&sn(g,t,n,o,s)}return f}function qs(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sn(e,t,n,o,r){let{elevateNodesOnSelect:s,nodeOrigin:i,nodeExtent:a,zIndexMode:f}=on(nn,o),l=e.parentId,g=t.get(l);if(!g){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}qs(e,n),r&&!g.parentId&&g.internals.rootParentIndex===void 0&&f==="auto"&&(g.internals.rootParentIndex=++r.i,g.internals.z=g.internals.z+r.i*Ws),r&&g.internals.rootParentIndex!==void 0&&(r.i=g.internals.rootParentIndex);let c=s&&!rn(f)?Qn:0,{x:d,y:h,z:p}=Us(e,g,i,a,c,f),{positionAbsolute:y}=e.internals,m=d!==y.x||h!==y.y;(m||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:m?{x:d,y:h}:y,z:p}})}function Jn(e,t,n){let o=ce(e.zIndex)?e.zIndex:0;return rn(n)?o:o+(e.selected?t:0)}function Us(e,t,n,o,r,s){let{x:i,y:a}=t.internals.positionAbsolute,f=ue(e),l=Ge(e,n),g=ze(e.extent)?ve(l,e.extent,f):l,c=ve({x:i+g.x,y:a+g.y},o,f);e.extent==="parent"&&(c=Yn(c,f,t));let d=Jn(e,r,s),h=t.internals.z??0;return{x:c.x,y:c.y,z:h>=d?h+1:d}}function mt(e,t,n,o=[0,0]){let r=[],s=new Map;for(let i of e){let a=t.get(i.parentId);if(!a)continue;let f=s.get(i.parentId)?.expandedRect??_e(a),l=Wt(f,i.rect);s.set(i.parentId,{expandedRect:l,parent:a})}return s.size>0&&s.forEach(({expandedRect:i,parent:a},f)=>{let l=a.internals.positionAbsolute,g=ue(a),c=a.origin??o,d=i.x<l.x?Math.round(Math.abs(l.x-i.x)):0,h=i.y<l.y?Math.round(Math.abs(l.y-i.y)):0,p=Math.max(g.width,Math.round(i.width)),y=Math.max(g.height,Math.round(i.height)),m=(p-g.width)*c[0],x=(y-g.height)*c[1];(d>0||h>0||m||x)&&(r.push({id:f,type:"position",position:{x:a.position.x-d+m,y:a.position.y-h+x}}),n.get(f)?.forEach(b=>{e.some(u=>u.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+d,y:b.position.y+h}})})),(g.width<i.width||g.height<i.height||d||h)&&r.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:p+(d?c[0]*d-m:0),height:y+(h?c[1]*h-x:0)}})}),r}function eo(e,t,n,o,r,s,i){let a=o?.querySelector(".xyflow__viewport"),f=!1;if(!a)return{changes:[],updatedInternals:f};let l=[],g=window.getComputedStyle(a),{m22:c}=new window.DOMMatrixReadOnly(g.transform),d=[];for(let h of e.values()){let p=t.get(h.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),f=!0;continue}let y=dt(h.nodeElement),m=p.measured.width!==y.width||p.measured.height!==y.height;if(!!(y.width&&y.height&&(m||!p.internals.handleBounds||h.force))){let b=h.nodeElement.getBoundingClientRect(),u=ze(p.extent)?p.extent:s,{positionAbsolute:w}=p.internals;p.parentId&&p.extent==="parent"?w=Yn(w,y,t.get(p.parentId)):u&&(w=ve(w,u,y));let N={...p,measured:y,internals:{...p.internals,positionAbsolute:w,handleBounds:{source:Mn("source",h.nodeElement,b,c,p.id),target:Mn("target",h.nodeElement,b,c,p.id)}}};t.set(p.id,N),p.parentId&&sn(N,t,n,{nodeOrigin:r,zIndexMode:i}),f=!0,m&&(l.push({id:p.id,type:"dimensions",dimensions:y}),p.expandParent&&p.parentId&&d.push({id:p.id,parentId:p.parentId,rect:_e(N,r)}))}}if(d.length>0){let h=mt(d,t,n,r);l.push(...h)}return{changes:l,updatedInternals:f}}async function to({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,s]],o),a=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(a)}function Hn(e,t,n,o,r,s){let i=r,a=o.get(i)||new Map;o.set(i,a.set(n,t)),i=`${r}-${e}`;let f=o.get(i)||new Map;if(o.set(i,f.set(n,t)),s){i=`${r}-${e}-${s}`;let l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function an(e,t,n){e.clear(),t.clear();for(let o of n){let{source:r,target:s,sourceHandle:i=null,targetHandle:a=null}=o,f={edgeId:o.id,source:r,target:s,sourceHandle:i,targetHandle:a},l=`${r}-${i}--${s}-${a}`,g=`${s}-${a}--${r}-${i}`;Hn("source",f,g,e,r,i),Hn("target",f,l,e,s,a),t.set(o.id,o)}}function no(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:no(n,t):!1}function On(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function Qs(e,t,n,o){let r=new Map;for(let[s,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!no(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){let a=e.get(s);a&&r.set(s,{id:s,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return r}function $t({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let r=[];for(let[i,a]of t){let f=n.get(i)?.internals.userNode;f&&r.push({...f,position:a.position,dragging:o})}if(!e)return[r[0],r];let s=n.get(e)?.internals.userNode;return[s?{...s,position:t.get(e)?.position||s.position,dragging:o}:r[0],r]}function js({dragItems:e,snapGrid:t,x:n,y:o}){let r=e.values().next().value;if(!r)return null;let s={x:n-r.distance.x,y:o-r.distance.y},i=He(s,t);return{x:i.x-s.x,y:i.y-s.y}}function oo({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let s={x:null,y:null},i=0,a=new Map,f=!1,l={x:0,y:0},g=null,c=!1,d=null,h=!1,p=!1,y=null;function m({noDragClassName:b,handleSelector:u,domNode:w,isSelectable:N,nodeId:S,nodeClickDistance:_=0}){d=Xe(w);function I({x:M,y:A}){let{nodeLookup:H,nodeExtent:z,snapGrid:O,snapToGrid:$,nodeOrigin:P,onNodeDrag:D,onSelectionDrag:V,onError:B,updateNodePositions:L}=t();s={x:M,y:A};let Y=!1,X=a.size>1,U=X&&z?Lt(Ae(a)):null,J=X&&$?js({dragItems:a,snapGrid:O,x:M,y:A}):null;for(let[G,T]of a){if(!H.has(G))continue;let Z={x:M-T.distance.x,y:A-T.distance.y};$&&(Z=J?{x:Math.round(Z.x+J.x),y:Math.round(Z.y+J.y)}:He(Z,O));let Q=null;if(X&&z&&!T.extent&&U){let{positionAbsolute:K}=T.internals,ee=K.x-U.x+z[0][0],oe=K.x+T.measured.width-U.x2+z[1][0],te=K.y-U.y+z[0][1],ie=K.y+T.measured.height-U.y2+z[1][1];Q=[[ee,te],[oe,ie]]}let{position:q,positionAbsolute:W}=Xt({nodeId:G,nextPosition:Z,nodeLookup:H,nodeExtent:Q||z,nodeOrigin:P,onError:B});Y=Y||T.position.x!==q.x||T.position.y!==q.y,T.position=q,T.internals.positionAbsolute=W}if(p=p||Y,!!Y&&(L(a,!0),y&&(o||D||!S&&V))){let[G,T]=$t({nodeId:S,dragItems:a,nodeLookup:H});o?.(y,a,G,T),D?.(y,G,T),S||V?.(y,T)}}async function k(){if(!g)return;let{transform:M,panBy:A,autoPanSpeed:H,autoPanOnNodeDrag:z}=t();if(!z){f=!1,cancelAnimationFrame(i);return}let[O,$]=Zn(l,g,H);(O!==0||$!==0)&&(s.x=(s.x??0)-O/M[2],s.y=(s.y??0)-$/M[2],await A({x:O,y:$})&&I(s)),i=requestAnimationFrame(k)}function R(M){let{nodeLookup:A,multiSelectionActive:H,nodesDraggable:z,transform:O,snapGrid:$,snapToGrid:P,selectNodesOnDrag:D,onNodeDragStart:V,onSelectionDragStart:B,unselectNodesAndEdges:L}=t();c=!0,(!D||!N)&&!H&&S&&(A.get(S)?.selected||L()),N&&D&&S&&e?.(S);let Y=We(M.sourceEvent,{transform:O,snapGrid:$,snapToGrid:P,containerBounds:g});if(s=Y,a=Qs(A,z,Y,S),a.size>0&&(n||V||!S&&B)){let[X,U]=$t({nodeId:S,dragItems:a,nodeLookup:A});n?.(M.sourceEvent,a,X,U),V?.(M.sourceEvent,X,U),S||B?.(M.sourceEvent,U)}}let C=Dt().clickDistance(_).on("start",M=>{let{domNode:A,nodeDragThreshold:H,transform:z,snapGrid:O,snapToGrid:$}=t();g=A?.getBoundingClientRect()||null,h=!1,p=!1,y=M.sourceEvent,H===0&&R(M),s=We(M.sourceEvent,{transform:z,snapGrid:O,snapToGrid:$,containerBounds:g}),l=le(M.sourceEvent,g)}).on("drag",M=>{let{autoPanOnNodeDrag:A,transform:H,snapGrid:z,snapToGrid:O,nodeDragThreshold:$,nodeLookup:P}=t(),D=We(M.sourceEvent,{transform:H,snapGrid:z,snapToGrid:O,containerBounds:g});if(y=M.sourceEvent,(M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||S&&!P.has(S))&&(h=!0),!h){if(!f&&A&&c&&(f=!0,k()),!c){let V=le(M.sourceEvent,g),B=V.x-l.x,L=V.y-l.y;Math.sqrt(B*B+L*L)>$&&R(M)}(s.x!==D.xSnapped||s.y!==D.ySnapped)&&a&&c&&(l=le(M.sourceEvent,g),I(D))}}).on("end",M=>{if(!(!c||h)&&(f=!1,c=!1,cancelAnimationFrame(i),a.size>0)){let{nodeLookup:A,updateNodePositions:H,onNodeDragStop:z,onSelectionDragStop:O}=t();if(p&&(H(a,!1),p=!1),r||z||!S&&O){let[$,P]=$t({nodeId:S,dragItems:a,nodeLookup:A,dragging:!1});r?.(M.sourceEvent,a,$,P),z?.(M.sourceEvent,$,P),S||O?.(M.sourceEvent,P)}}}).filter(M=>{let A=M.target;return!M.button&&(!b||!On(A,`.${b}`,w))&&(!u||On(A,u,w))});d.call(C)}function x(){d?.on(".drag",null)}return{update:m,destroy:x}}function Js(e,t,n){let o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let s of t.values())$e(r,_e(s))>0&&o.push(s);return o}var ei=250;function ti(e,t,n,o){let r=[],s=1/0,i=Js(e,n,t+ei);for(let a of i){let f=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(let l of f){if(o.nodeId===l.nodeId&&o.type===l.type&&o.id===l.id)continue;let{x:g,y:c}=xe(a,l,l.position,!0),d=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(c-e.y,2));d>t||(d<s?(r=[{...l,x:g,y:c}],s=d):d===s&&r.push({...l,x:g,y:c}))}}if(!r.length)return null;if(r.length>1){let a=o.type==="source"?"target":"source";return r.find(f=>f.type===a)??r[0]}return r[0]}function ro(e,t,n,o,r,s=!1){let i=o.get(e);if(!i)return null;let a=r==="strict"?i.internals.handleBounds?.[t]:[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]],f=(n?a?.find(l=>l.id===n):a?.[0])??null;return f&&s?{...f,...xe(i,f,f.position,!0)}:f}function so(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function ni(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var io=()=>!0;function oi(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:s,isTarget:i,domNode:a,nodeLookup:f,lib:l,autoPanOnConnect:g,flowId:c,panBy:d,cancelConnection:h,onConnectStart:p,onConnect:y,onConnectEnd:m,isValidConnection:x=io,onReconnectEnd:b,updateConnection:u,getTransform:w,getFromHandle:N,autoPanSpeed:S,dragThreshold:_=1,handleDomNode:I}){let k=Qt(e.target),R=0,C,{x:M,y:A}=le(e),H=so(s,I),z=a?.getBoundingClientRect(),O=!1;if(!z||!H)return;let $=ro(r,H,o,f,t);if(!$)return;let P=le(e,z),D=!1,V=null,B=!1,L=null;function Y(){if(!g||!z)return;let[q,W]=Zn(P,z,S);d({x:q,y:W}),R=requestAnimationFrame(Y)}let X={...$,nodeId:r,type:H,position:$.position},U=f.get(r),G={inProgress:!0,isValid:null,from:xe(U,X,F.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:U,to:P,toHandle:null,toPosition:Nn[X.position],toNode:null,pointer:P};function T(){O=!0,u(G),p?.(e,{nodeId:r,handleId:o,handleType:H})}_===0&&T();function Z(q){if(!O){let{x:ie,y:pe}=le(q),fe=ie-M,Ee=pe-A;if(!(fe*fe+Ee*Ee>_*_))return;T()}if(!N()||!X){Q(q);return}let W=w();P=le(q,z),C=ti(Oe(P,W,!1,[1,1]),n,f,X),D||(Y(),D=!0);let K=ao(q,{handle:C,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:x,doc:k,lib:l,flowId:c,nodeLookup:f});L=K.handleDomNode,V=K.connection,B=ni(!!C,K.isValid);let ee=f.get(r),oe=ee?xe(ee,X,F.Left,!0):G.from,te={...G,from:oe,isValid:B,to:K.toHandle&&B?Ke({x:K.toHandle.x,y:K.toHandle.y},W):P,toHandle:K.toHandle,toPosition:B&&K.toHandle?K.toHandle.position:Nn[X.position],toNode:K.toHandle?f.get(K.toHandle.nodeId):null,pointer:P};u(te),G=te}function Q(q){if(!("touches"in q&&q.touches.length>0)){if(O){(C||L)&&V&&B&&y?.(V);let{inProgress:W,...K}=G,ee={...K,toPosition:G.toHandle?G.toPosition:null};m?.(q,ee),s&&b?.(q,ee)}h(),cancelAnimationFrame(R),D=!1,B=!1,V=null,L=null,k.removeEventListener("mousemove",Z),k.removeEventListener("mouseup",Q),k.removeEventListener("touchmove",Z),k.removeEventListener("touchend",Q)}}k.addEventListener("mousemove",Z),k.addEventListener("mouseup",Q),k.addEventListener("touchmove",Z),k.addEventListener("touchend",Q)}function ao(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:s,doc:i,lib:a,flowId:f,isValidConnection:l=io,nodeLookup:g}){let c=s==="target",d=t?i.querySelector(`.${a}-flow__handle[data-id="${f}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:p}=le(e),y=i.elementFromPoint(h,p),m=y?.classList.contains(`${a}-flow__handle`)?y:d,x={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){let b=so(void 0,m),u=m.getAttribute("data-nodeid"),w=m.getAttribute("data-handleid"),N=m.classList.contains("connectable"),S=m.classList.contains("connectableend");if(!u||!b)return x;let _={source:c?u:o,sourceHandle:c?w:r,target:c?o:u,targetHandle:c?r:w};x.connection=_;let k=N&&S&&(n===ye.Strict?c&&b==="source"||!c&&b==="target":u!==o||w!==r);x.isValid=k&&l(_),x.toHandle=ro(u,b,w,g,n,!0)}return x}var yt={onPointerDown:oi,isValid:ao};function co({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let r=Xe(e);function s({translateExtent:a,width:f,height:l,zoomStep:g=1,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){let p=u=>{if(u.sourceEvent.type!=="wheel"||!t)return;let w=n(),N=u.sourceEvent.ctrlKey&&Le()?10:1,S=-u.sourceEvent.deltaY*(u.sourceEvent.deltaMode===1?.05:u.sourceEvent.deltaMode?1:.002)*g,_=w[2]*Math.pow(2,S*N);t.scaleTo(_)},y=[0,0],m=u=>{(u.sourceEvent.type==="mousedown"||u.sourceEvent.type==="touchstart")&&(y=[u.sourceEvent.clientX??u.sourceEvent.touches[0].clientX,u.sourceEvent.clientY??u.sourceEvent.touches[0].clientY])},x=u=>{let w=n();if(u.sourceEvent.type!=="mousemove"&&u.sourceEvent.type!=="touchmove"||!t)return;let N=[u.sourceEvent.clientX??u.sourceEvent.touches[0].clientX,u.sourceEvent.clientY??u.sourceEvent.touches[0].clientY],S=[N[0]-y[0],N[1]-y[1]];y=N;let _=o()*Math.max(w[2],Math.log(w[2]))*(h?-1:1),I={x:w[0]-S[0]*_,y:w[1]-S[1]*_},k=[[0,0],[f,l]];t.setViewportConstrained({x:I.x,y:I.y,zoom:w[2]},k,a)},b=At().on("start",m).on("zoom",c?x:null).on("zoom.wheel",d?p:null);r.call(b,{})}function i(){r.on("zoom",null)}return{update:s,destroy:i,pointer:zt}}var xt=e=>({x:e.x,y:e.y,zoom:e.k}),Ht=({x:e,y:t,zoom:n})=>_n.translate(e,t).scale(n),Me=(e,t)=>e.target.closest(`.${t}`),lo=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),ri=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ot=(e,t=0,n=ri,o=()=>{})=>{let r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},uo=e=>{let t=e.ctrlKey&&Le()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function si({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:a,onPanZoom:f,onPanZoomEnd:l}){return g=>{if(Me(g,t))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();let c=n.property("__zoom").k||1;if(g.ctrlKey&&i){let m=zt(g),x=uo(g),b=c*Math.pow(2,x);o.scaleTo(n,b,m,g);return}let d=g.deltaMode===1?20:1,h=r===ge.Vertical?0:g.deltaX*d,p=r===ge.Horizontal?0:g.deltaY*d;!Le()&&g.shiftKey&&r!==ge.Vertical&&(h=g.deltaY*d,p=0),o.translateBy(n,-(h/c)*s,-(p/c)*s,{internal:!0});let y=xt(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f?.(g,y),e.panScrollTimeout=setTimeout(()=>{l?.(g,y),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a?.(g,y))}}function ii({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){let s=o.type==="wheel",i=!t&&s&&!o.ctrlKey,a=Me(o,e);if(o.ctrlKey&&s&&a&&o.preventDefault(),i||a)return null;o.preventDefault(),n.call(this,o,r)}}function ai({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let r=xt(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function ci({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return s=>{e.usedRightMouseButton=!!(n&&lo(t,e.mouseButton??0)),s.sourceEvent?.sync||o([s.transform.x,s.transform.y,s.transform.k]),r&&!s.sourceEvent?.internal&&r?.(s.sourceEvent,xt(s.transform))}}function li({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:s}){return i=>{if(!i.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,s&&lo(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){let a=xt(i.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(i.sourceEvent,a)},n?150:0)}}}function di({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:i,noWheelClassName:a,noPanClassName:f,lib:l,connectionInProgress:g}){return c=>{let d=e||t,h=n&&c.ctrlKey,p=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Me(c,`${l}-flow__node`)||Me(c,`${l}-flow__edge`)))return!0;if(!o&&!d&&!r&&!s&&!n||i||g&&!p||Me(c,a)&&p||Me(c,f)&&(!p||r&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&c.type==="touchstart"&&c.touches?.length>1)return c.preventDefault(),!1;if(!d&&!r&&!h&&p||!o&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(o)&&!o.includes(c.button)&&c.type==="mousedown")return!1;let y=Array.isArray(o)&&o.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&y}}function fo({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:f}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=e.getBoundingClientRect(),c=At().scaleExtent([t,n]).translateExtent(o),d=Xe(e).call(c);b({x:r.x,y:r.y,zoom:Pe(r.zoom,t,n)},[[0,0],[g.width,g.height]],o);let h=d.on("wheel.zoom"),p=d.on("dblclick.zoom");c.wheelDelta(uo);function y(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).transform(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function m({noWheelClassName:C,noPanClassName:M,onPaneContextMenu:A,userSelectionActive:H,panOnScroll:z,panOnDrag:O,panOnScrollMode:$,panOnScrollSpeed:P,preventScrolling:D,zoomOnPinch:V,zoomOnScroll:B,zoomOnDoubleClick:L,zoomActivationKeyPressed:Y,lib:X,onTransformChange:U,connectionInProgress:J,paneClickDistance:G,selectionOnDrag:T}){H&&!l.isZoomingOrPanning&&x();let Z=z&&!Y&&!H;c.clickDistance(T?1/0:!ce(G)||G<0?0:G);let Q=Z?si({zoomPanValues:l,noWheelClassName:C,d3Selection:d,d3Zoom:c,panOnScrollMode:$,panOnScrollSpeed:P,zoomOnPinch:V,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:a}):ii({noWheelClassName:C,preventScrolling:D,d3ZoomHandler:h});if(d.on("wheel.zoom",Q,{passive:!1}),!H){let W=ai({zoomPanValues:l,onDraggingChange:f,onPanZoomStart:i});c.on("start",W);let K=ci({zoomPanValues:l,panOnDrag:O,onPaneContextMenu:!!A,onPanZoom:s,onTransformChange:U});c.on("zoom",K);let ee=li({zoomPanValues:l,panOnDrag:O,panOnScroll:z,onPaneContextMenu:A,onPanZoomEnd:a,onDraggingChange:f});c.on("end",ee)}let q=di({zoomActivationKeyPressed:Y,panOnDrag:O,zoomOnScroll:B,panOnScroll:z,zoomOnDoubleClick:L,zoomOnPinch:V,userSelectionActive:H,noPanClassName:M,noWheelClassName:C,lib:X,connectionInProgress:J});c.filter(q),L?d.on("dblclick.zoom",p):d.on("dblclick.zoom",null)}function x(){c.on("zoom",null)}async function b(C,M,A){let H=Ht(C),z=c?.constrain()(H,M,A);return z&&await y(z),new Promise(O=>O(z))}async function u(C,M){let A=Ht(C);return await y(A,M),new Promise(H=>H(A))}function w(C){if(d){let M=Ht(C),A=d.property("__zoom");(A.k!==C.zoom||A.x!==C.x||A.y!==C.y)&&c?.transform(d,M,null,{sync:!0})}}function N(){let C=d?Cn(d.node()):{x:0,y:0,k:1};return{x:C.x,y:C.y,zoom:C.k}}function S(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).scaleTo(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function _(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).scaleBy(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function I(C){c?.scaleExtent(C)}function k(C){c?.translateExtent(C)}function R(C){let M=!ce(C)||C<0?0:C;c?.clickDistance(M)}return{update:m,destroy:x,setViewport:u,setViewportConstrained:b,getViewport:N,scaleTo:S,scaleBy:_,setScaleExtent:I,setTranslateExtent:k,syncViewport:w,setClickDistance:R}}var be;(function(e){e.Line="line",e.Handle="handle"})(be||(be={}));function ui({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:s}){let i=e-t,a=n-o,f=[i>0?1:i<0?-1:0,a>0?1:a<0?-1:0];return i&&r&&(f[0]=f[0]*-1),a&&s&&(f[1]=f[1]*-1),f}function Ln(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function he(e,t){return Math.max(0,t-e)}function me(e,t){return Math.max(0,e-t)}function rt(e,t,n){return Math.max(0,t-e,e-n)}function Tn(e,t){return e?!t:t}function fi(e,t,n,o,r,s,i,a){let{affectsX:f,affectsY:l}=t,{isHorizontal:g,isVertical:c}=t,d=g&&c,{xSnapped:h,ySnapped:p}=n,{minWidth:y,maxWidth:m,minHeight:x,maxHeight:b}=o,{x:u,y:w,width:N,height:S,aspectRatio:_}=e,I=Math.floor(g?h-e.pointerX:0),k=Math.floor(c?p-e.pointerY:0),R=N+(f?-I:I),C=S+(l?-k:k),M=-s[0]*N,A=-s[1]*S,H=rt(R,y,m),z=rt(C,x,b);if(i){let P=0,D=0;f&&I<0?P=he(u+I+M,i[0][0]):!f&&I>0&&(P=me(u+R+M,i[1][0])),l&&k<0?D=he(w+k+A,i[0][1]):!l&&k>0&&(D=me(w+C+A,i[1][1])),H=Math.max(H,P),z=Math.max(z,D)}if(a){let P=0,D=0;f&&I>0?P=me(u+I,a[0][0]):!f&&I<0&&(P=he(u+R,a[1][0])),l&&k>0?D=me(w+k,a[0][1]):!l&&k<0&&(D=he(w+C,a[1][1])),H=Math.max(H,P),z=Math.max(z,D)}if(r){if(g){let P=rt(R/_,x,b)*_;if(H=Math.max(H,P),i){let D=0;!f&&!l||f&&!l&&d?D=me(w+A+R/_,i[1][1])*_:D=he(w+A+(f?I:-I)/_,i[0][1])*_,H=Math.max(H,D)}if(a){let D=0;!f&&!l||f&&!l&&d?D=he(w+R/_,a[1][1])*_:D=me(w+(f?I:-I)/_,a[0][1])*_,H=Math.max(H,D)}}if(c){let P=rt(C*_,y,m)/_;if(z=Math.max(z,P),i){let D=0;!f&&!l||l&&!f&&d?D=me(u+C*_+M,i[1][0])/_:D=he(u+(l?k:-k)*_+M,i[0][0])/_,z=Math.max(z,D)}if(a){let D=0;!f&&!l||l&&!f&&d?D=he(u+C*_,a[1][0])/_:D=me(u+(l?k:-k)*_,a[0][0])/_,z=Math.max(z,D)}}}k=k+(k<0?z:-z),I=I+(I<0?H:-H),r&&(d?R>C*_?k=(Tn(f,l)?-I:I)/_:I=(Tn(f,l)?-k:k)*_:g?(k=I/_,l=f):(I=k*_,f=l));let O=f?u+I:u,$=l?w+k:w;return{width:N+(f?-I:I),height:S+(l?-k:k),x:s[0]*I*(f?-1:1)+O,y:s[1]*k*(l?-1:1)+$}}var go={width:0,height:0,x:0,y:0},gi={...go,pointerX:0,pointerY:0,aspectRatio:1};function pi(e){return[[0,0],[e.measured.width,e.measured.height]]}function hi(e,t,n){let o=t.position.x+e.position.x,r=t.position.y+e.position.y,s=e.measured.width??0,i=e.measured.height??0,a=n[0]*s,f=n[1]*i;return[[o-a,r-f],[o+s-a,r+i-f]]}function po({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){let s=Xe(e),i={controlDirection:Ln("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:l,boundaries:g,keepAspectRatio:c,resizeDirection:d,onResizeStart:h,onResize:p,onResizeEnd:y,shouldResize:m}){let x={...go},b={...gi};i={boundaries:g,resizeDirection:d,keepAspectRatio:c,controlDirection:Ln(l)};let u,w=null,N=[],S,_,I,k=!1,R=Dt().on("start",C=>{let{nodeLookup:M,transform:A,snapGrid:H,snapToGrid:z,nodeOrigin:O,paneDomNode:$}=n();if(u=M.get(t),!u)return;w=$?.getBoundingClientRect()??null;let{xSnapped:P,ySnapped:D}=We(C.sourceEvent,{transform:A,snapGrid:H,snapToGrid:z,containerBounds:w});x={width:u.measured.width??0,height:u.measured.height??0,x:u.position.x??0,y:u.position.y??0},b={...x,pointerX:P,pointerY:D,aspectRatio:x.width/x.height},S=void 0,u.parentId&&(u.extent==="parent"||u.expandParent)&&(S=M.get(u.parentId),_=S&&u.extent==="parent"?pi(S):void 0),N=[],I=void 0;for(let[V,B]of M)if(B.parentId===t&&(N.push({id:V,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){let L=hi(B,u,B.origin??O);I?I=[[Math.min(L[0][0],I[0][0]),Math.min(L[0][1],I[0][1])],[Math.max(L[1][0],I[1][0]),Math.max(L[1][1],I[1][1])]]:I=L}h?.(C,{...x})}).on("drag",C=>{let{transform:M,snapGrid:A,snapToGrid:H,nodeOrigin:z}=n(),O=We(C.sourceEvent,{transform:M,snapGrid:A,snapToGrid:H,containerBounds:w}),$=[];if(!u)return;let{x:P,y:D,width:V,height:B}=x,L={},Y=u.origin??z,{width:X,height:U,x:J,y:G}=fi(b,i.controlDirection,O,i.boundaries,i.keepAspectRatio,Y,_,I),T=X!==V,Z=U!==B,Q=J!==P&&T,q=G!==D&&Z;if(!Q&&!q&&!T&&!Z)return;if((Q||q||Y[0]===1||Y[1]===1)&&(L.x=Q?J:x.x,L.y=q?G:x.y,x.x=L.x,x.y=L.y,N.length>0)){let oe=J-P,te=G-D;for(let ie of N)ie.position={x:ie.position.x-oe+Y[0]*(X-V),y:ie.position.y-te+Y[1]*(U-B)},$.push(ie)}if((T||Z)&&(L.width=T&&(!i.resizeDirection||i.resizeDirection==="horizontal")?X:x.width,L.height=Z&&(!i.resizeDirection||i.resizeDirection==="vertical")?U:x.height,x.width=L.width,x.height=L.height),S&&u.expandParent){let oe=Y[0]*(L.width??0);L.x&&L.x<oe&&(x.x=oe,b.x=b.x-(L.x-oe));let te=Y[1]*(L.height??0);L.y&&L.y<te&&(x.y=te,b.y=b.y-(L.y-te))}let W=ui({width:x.width,prevWidth:V,height:x.height,prevHeight:B,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),K={...x,direction:W};m?.(C,K)!==!1&&(k=!0,p?.(C,K),o(L,$))}).on("end",C=>{k&&(y?.(C,{...x}),r?.({...x}),k=!1)});s.call(R)}function f(){s.on(".drag",null)}return{update:a,destroy:f}}var E=Ze(Os()),v=Ze(et());function se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=se(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var No=Ze(et(),1),ko=Ze(So(),1);var vo=e=>{let t,n=new Set,o=(g,c)=>{let d=typeof g=="function"?g(t):g;if(!Object.is(d,t)){let h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,h))}},r=()=>t,f={setState:o,getState:r,getInitialState:()=>l,subscribe:g=>(n.add(g),()=>n.delete(g)),destroy:()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(o,r,f);return f},_o=e=>e?vo(e):vo;var{useDebugValue:Ai}=No.default,{useSyncExternalStoreWithSelector:$i}=ko.default,Hi=e=>e;function ln(e,t=Hi,n){let o=$i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ai(o),o}var Co=(e,t)=>{let n=_o(e),o=(r,s=t)=>ln(n,r,s);return Object.assign(o,n),o},Mo=(e,t)=>e?Co(e,t):Co;function ne(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var Oi=Ze(Hs()),_t=(0,v.createContext)(null),Li=_t.Provider,jo=ae.error001();function j(e,t){let n=(0,v.useContext)(_t);if(n===null)throw new Error(jo);return ln(n,e,t)}function re(){let e=(0,v.useContext)(_t);if(e===null)throw new Error(jo);return(0,v.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Io={display:"none"},Ti={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jo="react-flow__node-desc",er="react-flow__edge-desc",Ri="react-flow__aria-live",Bi=e=>e.ariaLiveMessage,Vi=e=>e.ariaLabelConfig;function Fi({rfId:e}){let t=j(Bi);return(0,E.jsx)("div",{id:`${Ri}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ti,children:t})}function Yi({rfId:e,disableKeyboardA11y:t}){let n=j(Vi);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{id:`${Jo}-${e}`,style:Io,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,E.jsx)("div",{id:`${er}-${e}`,style:Io,children:n["edge.a11yDescription.default"]}),!t&&(0,E.jsx)(Fi,{rfId:e})]})}var Ct=(0,v.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...r},s)=>{let i=`${e}`.split("-");return(0,E.jsx)("div",{className:se(["react-flow__panel",n,...i]),style:o,ref:s,...r,children:t})});Ct.displayName="Panel";function Zi({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,E.jsx)(Ct,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,E.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var Xi=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},wt=e=>e.id;function Wi(e,t){return ne(e.selectedNodes.map(wt),t.selectedNodes.map(wt))&&ne(e.selectedEdges.map(wt),t.selectedEdges.map(wt))}function Ki({onSelectionChange:e}){let t=re(),{selectedNodes:n,selectedEdges:o}=j(Xi,Wi);return(0,v.useEffect)(()=>{let r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,o,e]),null}var Gi=e=>!!e.onSelectionChangeHandlers;function qi({onSelectionChange:e}){let t=j(Gi);return e||t?(0,E.jsx)(Ki,{onSelectionChange:e}):null}var tr=[0,0],Ui={x:0,y:0,zoom:1},Qi=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Po=[...Qi,"rfId"],ji=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),zo={translateExtent:De,nodeOrigin:tr,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Ji(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:i,reset:a,setDefaultNodesAndEdges:f}=j(ji,ne),l=re();(0,v.useEffect)(()=>(f(e.defaultNodes,e.defaultEdges),()=>{g.current=zo,a()}),[]);let g=(0,v.useRef)(zo);return(0,v.useEffect)(()=>{for(let c of Po){let d=e[c],h=g.current[c];d!==h&&(typeof e[c]>"u"||(c==="nodes"?t(d):c==="edges"?n(d):c==="minZoom"?o(d):c==="maxZoom"?r(d):c==="translateExtent"?s(d):c==="nodeExtent"?i(d):c==="ariaLabelConfig"?l.setState({ariaLabelConfig:Wn(d)}):c==="fitView"?l.setState({fitViewQueued:d}):c==="fitViewOptions"?l.setState({fitViewOptions:d}):l.setState({[c]:d})))}g.current=e},Po.map(c=>e[c])),null}function Do(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ea(e){let[t,n]=(0,v.useState)(e==="system"?null:e);return(0,v.useEffect)(()=>{if(e!=="system"){n(e);return}let o=Do(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Do()?.matches?"dark":"light"}var Ao=typeof document<"u"?document:null;function Qe(e=null,t={target:Ao,actInsideInputWithModifier:!0}){let[n,o]=(0,v.useState)(!1),r=(0,v.useRef)(!1),s=(0,v.useRef)(new Set([])),[i,a]=(0,v.useMemo)(()=>{if(e!==null){let l=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
1
+ import{b as Xe,c as zt,d as Dt,f as tt,h as nt,k as _n,l as Cn,m as At}from"./embed-page-chunk-S4XZPBRM.js";import{a as Os}from"./embed-page-chunk-QV7QAJ4N.js";import{a as Hs}from"./embed-page-chunk-BUFWD6SE.js";import{a as et}from"./embed-page-chunk-R5QL57JJ.js";import{c as Je,f as Ze}from"./embed-page-chunk-QBTAJ2YI.js";var mo=Je(ho=>{"use strict";var Te=et();function mi(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yi=typeof Object.is=="function"?Object.is:mi,xi=Te.useState,bi=Te.useEffect,wi=Te.useLayoutEffect,Ei=Te.useDebugValue;function Si(e,t){var n=t(),o=xi({inst:{value:n,getSnapshot:t}}),r=o[0].inst,s=o[1];return wi(function(){r.value=n,r.getSnapshot=t,cn(r)&&s({inst:r})},[e,n,t]),bi(function(){return cn(r)&&s({inst:r}),e(function(){cn(r)&&s({inst:r})})},[e]),Ei(n),n}function cn(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yi(e,n)}catch{return!0}}function vi(e,t){return t()}var _i=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vi:Si;ho.useSyncExternalStore=Te.useSyncExternalStore!==void 0?Te.useSyncExternalStore:_i});var xo=Je((tl,yo)=>{"use strict";yo.exports=mo()});var wo=Je(bo=>{"use strict";var bt=et(),Ci=xo();function Ni(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ki=typeof Object.is=="function"?Object.is:Ni,Mi=Ci.useSyncExternalStore,Ii=bt.useRef,Pi=bt.useEffect,zi=bt.useMemo,Di=bt.useDebugValue;bo.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var s=Ii(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=zi(function(){function f(h){if(!l){if(l=!0,g=h,h=o(h),r!==void 0&&i.hasValue){var p=i.value;if(r(p,h))return c=p}return c=h}if(p=c,ki(g,h))return p;var y=o(h);return r!==void 0&&r(p,y)?(g=h,p):(g=h,c=y)}var l=!1,g,c,d=n===void 0?null:n;return[function(){return f(t())},d===null?void 0:function(){return f(d())}]},[t,n,o,r]);var a=Mi(e,s[0],s[1]);return Pi(function(){i.hasValue=!0,i.value=a},[a]),Di(a),a}});var So=Je((ol,Eo)=>{"use strict";Eo.exports=wo()});var ae={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},De=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tt=["Enter"," ","Escape"],Rt={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},ye;(function(e){e.Strict="strict",e.Loose="loose"})(ye||(ye={}));var ge;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ge||(ge={}));var Se;(function(e){e.Partial="partial",e.Full="full"})(Se||(Se={}));var Bt={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},de;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(de||(de={}));var Ie;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ie||(Ie={}));var F;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(F||(F={}));var Nn={[F.Left]:F.Right,[F.Right]:F.Left,[F.Top]:F.Bottom,[F.Bottom]:F.Top};function Vt(e){return e===null?null:e?"valid":"invalid"}var Ft=e=>"id"in e&&"source"in e&&"target"in e,Rn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Yt=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Ge=(e,t=[0,0])=>{let{width:n,height:o}=ue(e),r=e.origin??t,s=n*r[0],i=o*r[1];return{x:e.position.x-s,y:e.position.y-i}},Zt=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,r)=>{let s=typeof r=="string",i=!t.nodeLookup&&!s?r:void 0;t.nodeLookup&&(i=s?t.nodeLookup.get(r):Yt(r)?r:t.nodeLookup.get(r.id));let a=i?st(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return at(o,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ct(n)},Ae=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=at(n,st(r)),o=!0)}),o?ct(n):{x:0,y:0,width:0,height:0}},it=(e,t,[n,o,r]=[0,0,1],s=!1,i=!1)=>{let a={...Oe(t,[n,o,r]),width:t.width/r,height:t.height/r},f=[];for(let l of e.values()){let{measured:g,selectable:c=!0,hidden:d=!1}=l;if(i&&!c||d)continue;let h=g.width??l.width??l.initialWidth??null,p=g.height??l.height??l.initialHeight??null,y=$e(a,_e(l)),m=(h??0)*(p??0),x=s&&y>0;(!l.internals.handleBounds||x||y>=m||l.dragging)&&f.push(l)}return f},Bn=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function Ls(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function Vn({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:s},i){if(e.size===0)return Promise.resolve(!0);let a=Ls(e,i),f=Ae(a),l=qe(f,t,n,i?.minZoom??r,i?.maxZoom??s,i?.padding??.1);return await o.setViewport(l,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)}function Xt({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:s}){let i=n.get(e),a=i.parentId?n.get(i.parentId):void 0,{x:f,y:l}=a?a.internals.positionAbsolute:{x:0,y:0},g=i.origin??o,c=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!a)s?.("005",ae.error005());else{let h=a.measured.width,p=a.measured.height;h&&p&&(c=[[f,l],[f+h,l+p]])}else a&&ze(i.extent)&&(c=[[i.extent[0][0]+f,i.extent[0][1]+l],[i.extent[1][0]+f,i.extent[1][1]+l]]);let d=ze(c)?ve(t,c,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&s?.("015",ae.error015()),{position:{x:d.x-f+(i.measured.width??0)*g[0],y:d.y-l+(i.measured.height??0)*g[1]},positionAbsolute:d}}async function Fn({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){let s=new Set(e.map(d=>d.id)),i=[];for(let d of n){if(d.deletable===!1)continue;let h=s.has(d.id),p=!h&&d.parentId&&i.find(y=>y.id===d.parentId);(h||p)&&i.push(d)}let a=new Set(t.map(d=>d.id)),f=o.filter(d=>d.deletable!==!1),g=Bn(i,f);for(let d of f)a.has(d.id)&&!g.find(p=>p.id===d.id)&&g.push(d);if(!r)return{edges:g,nodes:i};let c=await r({nodes:i,edges:g});return typeof c=="boolean"?c?{edges:g,nodes:i}:{edges:[],nodes:[]}:c}var Pe=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ve=(e={x:0,y:0},t,n)=>({x:Pe(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Pe(e.y,t[0][1],t[1][1]-(n?.height??0))});function Yn(e,t,n){let{width:o,height:r}=ue(n),{x:s,y:i}=n.internals.positionAbsolute;return ve(e,[[s,i],[s+o,i+r]],t)}var kn=(e,t,n)=>e<t?Pe(Math.abs(e-t),1,t)/t:e>n?-Pe(Math.abs(e-n),1,t)/t:0,Zn=(e,t,n=15,o=40)=>{let r=kn(e.x,o,t.width-o)*n,s=kn(e.y,o,t.height-o)*n;return[r,s]},at=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Lt=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),ct=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),_e=(e,t=[0,0])=>{let{x:n,y:o}=Yt(e)?e.internals.positionAbsolute:Ge(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},st=(e,t=[0,0])=>{let{x:n,y:o}=Yt(e)?e.internals.positionAbsolute:Ge(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},Wt=(e,t)=>ct(at(Lt(e),Lt(t))),$e=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},Kt=e=>ce(e.width)&&ce(e.height)&&ce(e.x)&&ce(e.y),ce=e=>!isNaN(e)&&isFinite(e),Gt=(e,t)=>{},He=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Oe=({x:e,y:t},[n,o,r],s=!1,i=[1,1])=>{let a={x:(e-n)/r,y:(t-o)/r};return s?He(a,i):a},Ke=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function ke(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ts(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=ke(e,n),r=ke(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){let o=ke(e.top??e.y??0,n),r=ke(e.bottom??e.y??0,n),s=ke(e.left??e.x??0,t),i=ke(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:s,x:s+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Rs(e,t,n,o,r,s){let{x:i,y:a}=Ke(e,[t,n,o]),{x:f,y:l}=Ke({x:e.x+e.width,y:e.y+e.height},[t,n,o]),g=r-f,c=s-l;return{left:Math.floor(i),top:Math.floor(a),right:Math.floor(g),bottom:Math.floor(c)}}var qe=(e,t,n,o,r,s)=>{let i=Ts(s,t,n),a=(t-i.x)/e.width,f=(n-i.y)/e.height,l=Math.min(a,f),g=Pe(l,o,r),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*g,p=n/2-d*g,y=Rs(e,h,p,g,t,n),m={left:Math.min(y.left-i.left,0),top:Math.min(y.top-i.top,0),right:Math.min(y.right-i.right,0),bottom:Math.min(y.bottom-i.bottom,0)};return{x:h-m.left+m.right,y:p-m.top+m.bottom,zoom:g}},Le=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ze(e){return e!=null&&e!=="parent"}function ue(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function lt(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function qt(e,t={width:0,height:0},n,o,r){let s={...e},i=o.get(n);if(i){let a=i.origin||r;s.x+=i.internals.positionAbsolute.x-(t.width??0)*a[0],s.y+=i.internals.positionAbsolute.y-(t.height??0)*a[1]}return s}function Ut(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Xn(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function Wn(e){return{...Rt,...e||{}}}function We(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){let{x:s,y:i}=le(e),a=Oe({x:s-(r?.left??0),y:i-(r?.top??0)},o),{x:f,y:l}=n?He(a,t):a;return{xSnapped:f,ySnapped:l,...a}}var dt=e=>({width:e.offsetWidth,height:e.offsetHeight}),Qt=e=>e?.getRootNode?.()||window?.document,Bs=["INPUT","SELECT","TEXTAREA"];function jt(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Bs.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Jt=e=>"clientX"in e,le=(e,t)=>{let n=Jt(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},Mn=(e,t,n,o,r)=>{let s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{let a=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...dt(i)}})};function ut({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:s,targetControlX:i,targetControlY:a}){let f=e*.125+r*.375+i*.375+n*.125,l=t*.125+s*.375+a*.375+o*.125,g=Math.abs(f-e),c=Math.abs(l-t);return[f,l,g,c]}function ot(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function In({pos:e,x1:t,y1:n,x2:o,y2:r,c:s}){switch(e){case F.Left:return[t-ot(t-o,s),n];case F.Right:return[t+ot(o-t,s),n];case F.Top:return[t,n-ot(n-r,s)];case F.Bottom:return[t,n+ot(r-n,s)]}}function ft({sourceX:e,sourceY:t,sourcePosition:n=F.Bottom,targetX:o,targetY:r,targetPosition:s=F.Top,curvature:i=.25}){let[a,f]=In({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,g]=In({pos:s,x1:o,y1:r,x2:e,y2:t,c:i}),[c,d,h,p]=ut({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:f,targetControlX:l,targetControlY:g});return[`M${e},${t} C${a},${f} ${l},${g} ${o},${r}`,c,d,h,p]}function en({sourceX:e,sourceY:t,targetX:n,targetY:o}){let r=Math.abs(n-e)/2,s=n<e?n+r:n-r,i=Math.abs(o-t)/2,a=o<t?o+i:o-i;return[s,a,r,i]}function Kn({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:s="basic"}){if(s==="manual")return o;let i=r&&n?o+1e3:o,a=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return i+a}function Gn({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){let s=at(st(e),st(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);let i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return $e(i,ct(s))>0}var Vs=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Fs=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tn=(e,t,n={})=>{if(!e.source||!e.target)return Gt("006",ae.error006()),t;let o=n.getEdgeId||Vs,r;return Ft(e)?r={...e}:r={...e,id:o(e)},Fs(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function gt({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[r,s,i,a]=en({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,s,i,a]}var Pn={[F.Left]:{x:-1,y:0},[F.Right]:{x:1,y:0},[F.Top]:{x:0,y:-1},[F.Bottom]:{x:0,y:1}},Ys=({source:e,sourcePosition:t=F.Bottom,target:n})=>t===F.Left||t===F.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},zn=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zs({source:e,sourcePosition:t=F.Bottom,target:n,targetPosition:o=F.Top,center:r,offset:s,stepPosition:i}){let a=Pn[t],f=Pn[o],l={x:e.x+a.x*s,y:e.y+a.y*s},g={x:n.x+f.x*s,y:n.y+f.y*s},c=Ys({source:l,sourcePosition:t,target:g}),d=c.x!==0?"x":"y",h=c[d],p=[],y,m,x={x:0,y:0},b={x:0,y:0},[,,u,w]=en({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*f[d]===-1){d==="x"?(y=r.x??l.x+(g.x-l.x)*i,m=r.y??(l.y+g.y)/2):(y=r.x??(l.x+g.x)/2,m=r.y??l.y+(g.y-l.y)*i);let S=[{x:y,y:l.y},{x:y,y:g.y}],_=[{x:l.x,y:m},{x:g.x,y:m}];a[d]===h?p=d==="x"?S:_:p=d==="x"?_:S}else{let S=[{x:l.x,y:g.y}],_=[{x:g.x,y:l.y}];if(d==="x"?p=a.x===h?_:S:p=a.y===h?S:_,t===o){let M=Math.abs(e[d]-n[d]);if(M<=s){let A=Math.min(s-1,s-M);a[d]===h?x[d]=(l[d]>e[d]?-1:1)*A:b[d]=(g[d]>n[d]?-1:1)*A}}if(t!==o){let M=d==="x"?"y":"x",A=a[d]===f[M],H=l[M]>g[M],z=l[M]<g[M];(a[d]===1&&(!A&&H||A&&z)||a[d]!==1&&(!A&&z||A&&H))&&(p=d==="x"?S:_)}let I={x:l.x+x.x,y:l.y+x.y},k={x:g.x+b.x,y:g.y+b.y},R=Math.max(Math.abs(I.x-p[0].x),Math.abs(k.x-p[0].x)),C=Math.max(Math.abs(I.y-p[0].y),Math.abs(k.y-p[0].y));R>=C?(y=(I.x+k.x)/2,m=p[0].y):(y=p[0].x,m=(I.y+k.y)/2)}return[[e,{x:l.x+x.x,y:l.y+x.y},...p,{x:g.x+b.x,y:g.y+b.y},n],y,m,u,w]}function Xs(e,t,n,o){let r=Math.min(zn(e,t)/2,zn(t,n)/2,o),{x:s,y:i}=t;if(e.x===s&&s===n.x||e.y===i&&i===n.y)return`L${s} ${i}`;if(e.y===i){let l=e.x<n.x?-1:1,g=e.y<n.y?1:-1;return`L ${s+r*l},${i}Q ${s},${i} ${s},${i+r*g}`}let a=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${i+r*f}Q ${s},${i} ${s+r*a},${i}`}function Ue({sourceX:e,sourceY:t,sourcePosition:n=F.Bottom,targetX:o,targetY:r,targetPosition:s=F.Top,borderRadius:i=5,centerX:a,centerY:f,offset:l=20,stepPosition:g=.5}){let[c,d,h,p,y]=Zs({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:s,center:{x:a,y:f},offset:l,stepPosition:g});return[c.reduce((x,b,u)=>{let w="";return u>0&&u<c.length-1?w=Xs(c[u-1],b,c[u+1],i):w=`${u===0?"M":"L"}${b.x} ${b.y}`,x+=w,x},""),d,h,p,y]}function Dn(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qn(e){let{sourceNode:t,targetNode:n}=e;if(!Dn(t)||!Dn(n))return null;let o=t.internals.handleBounds||An(t.handles),r=n.internals.handleBounds||An(n.handles),s=$n(o?.source??[],e.sourceHandle),i=$n(e.connectionMode===ye.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!s||!i)return e.onError?.("008",ae.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let a=s?.position||F.Bottom,f=i?.position||F.Top,l=xe(t,s,a),g=xe(n,i,f);return{sourceX:l.x,sourceY:l.y,targetX:g.x,targetY:g.y,sourcePosition:a,targetPosition:f}}function An(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function xe(e,t,n=F.Left,o=!1){let r=(t?.x??0)+e.internals.positionAbsolute.x,s=(t?.y??0)+e.internals.positionAbsolute.y,{width:i,height:a}=t??ue(e);if(o)return{x:r+i/2,y:s+a/2};switch(t?.position??n){case F.Top:return{x:r+i/2,y:s};case F.Right:return{x:r+i,y:s+a/2};case F.Bottom:return{x:r+i/2,y:s+a};case F.Left:return{x:r,y:s+a/2}}}function $n(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function pt(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Un(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){let s=new Set;return e.reduce((i,a)=>([a.markerStart||o,a.markerEnd||r].forEach(f=>{if(f&&typeof f=="object"){let l=pt(f,t);s.has(l)||(i.push({id:l,color:f.color||n,...f}),s.add(l))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))}var Qn=1e3,Ws=10,nn={nodeOrigin:[0,0],nodeExtent:De,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ks={...nn,checkEquality:!0};function on(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function jn(e,t,n){let o=on(nn,n);for(let r of e.values())if(r.parentId)sn(r,e,t,o);else{let s=Ge(r,o.nodeOrigin),i=ze(r.extent)?r.extent:o.nodeExtent,a=ve(s,i,ue(r));r.internals.positionAbsolute=a}}function Gs(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let r of e.handles){let s={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(s):r.type==="target"&&o.push(s)}return{source:n,target:o}}function rn(e){return e==="manual"}function ht(e,t,n,o={}){let r=on(Ks,o),s={i:0},i=new Map(t),a=r?.elevateNodesOnSelect&&!rn(r.zIndexMode)?Qn:0,f=e.length>0;t.clear(),n.clear();for(let l of e){let g=i.get(l.id);if(r.checkEquality&&l===g?.internals.userNode)t.set(l.id,g);else{let c=Ge(l,r.nodeOrigin),d=ze(l.extent)?l.extent:r.nodeExtent,h=ve(c,d,ue(l));g={...r.defaults,...l,measured:{width:l.measured?.width,height:l.measured?.height},internals:{positionAbsolute:h,handleBounds:Gs(l,g),z:Jn(l,a,r.zIndexMode),userNode:l}},t.set(l.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(f=!1),l.parentId&&sn(g,t,n,o,s)}return f}function qs(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sn(e,t,n,o,r){let{elevateNodesOnSelect:s,nodeOrigin:i,nodeExtent:a,zIndexMode:f}=on(nn,o),l=e.parentId,g=t.get(l);if(!g){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}qs(e,n),r&&!g.parentId&&g.internals.rootParentIndex===void 0&&f==="auto"&&(g.internals.rootParentIndex=++r.i,g.internals.z=g.internals.z+r.i*Ws),r&&g.internals.rootParentIndex!==void 0&&(r.i=g.internals.rootParentIndex);let c=s&&!rn(f)?Qn:0,{x:d,y:h,z:p}=Us(e,g,i,a,c,f),{positionAbsolute:y}=e.internals,m=d!==y.x||h!==y.y;(m||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:m?{x:d,y:h}:y,z:p}})}function Jn(e,t,n){let o=ce(e.zIndex)?e.zIndex:0;return rn(n)?o:o+(e.selected?t:0)}function Us(e,t,n,o,r,s){let{x:i,y:a}=t.internals.positionAbsolute,f=ue(e),l=Ge(e,n),g=ze(e.extent)?ve(l,e.extent,f):l,c=ve({x:i+g.x,y:a+g.y},o,f);e.extent==="parent"&&(c=Yn(c,f,t));let d=Jn(e,r,s),h=t.internals.z??0;return{x:c.x,y:c.y,z:h>=d?h+1:d}}function mt(e,t,n,o=[0,0]){let r=[],s=new Map;for(let i of e){let a=t.get(i.parentId);if(!a)continue;let f=s.get(i.parentId)?.expandedRect??_e(a),l=Wt(f,i.rect);s.set(i.parentId,{expandedRect:l,parent:a})}return s.size>0&&s.forEach(({expandedRect:i,parent:a},f)=>{let l=a.internals.positionAbsolute,g=ue(a),c=a.origin??o,d=i.x<l.x?Math.round(Math.abs(l.x-i.x)):0,h=i.y<l.y?Math.round(Math.abs(l.y-i.y)):0,p=Math.max(g.width,Math.round(i.width)),y=Math.max(g.height,Math.round(i.height)),m=(p-g.width)*c[0],x=(y-g.height)*c[1];(d>0||h>0||m||x)&&(r.push({id:f,type:"position",position:{x:a.position.x-d+m,y:a.position.y-h+x}}),n.get(f)?.forEach(b=>{e.some(u=>u.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+d,y:b.position.y+h}})})),(g.width<i.width||g.height<i.height||d||h)&&r.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:p+(d?c[0]*d-m:0),height:y+(h?c[1]*h-x:0)}})}),r}function eo(e,t,n,o,r,s,i){let a=o?.querySelector(".xyflow__viewport"),f=!1;if(!a)return{changes:[],updatedInternals:f};let l=[],g=window.getComputedStyle(a),{m22:c}=new window.DOMMatrixReadOnly(g.transform),d=[];for(let h of e.values()){let p=t.get(h.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),f=!0;continue}let y=dt(h.nodeElement),m=p.measured.width!==y.width||p.measured.height!==y.height;if(!!(y.width&&y.height&&(m||!p.internals.handleBounds||h.force))){let b=h.nodeElement.getBoundingClientRect(),u=ze(p.extent)?p.extent:s,{positionAbsolute:w}=p.internals;p.parentId&&p.extent==="parent"?w=Yn(w,y,t.get(p.parentId)):u&&(w=ve(w,u,y));let N={...p,measured:y,internals:{...p.internals,positionAbsolute:w,handleBounds:{source:Mn("source",h.nodeElement,b,c,p.id),target:Mn("target",h.nodeElement,b,c,p.id)}}};t.set(p.id,N),p.parentId&&sn(N,t,n,{nodeOrigin:r,zIndexMode:i}),f=!0,m&&(l.push({id:p.id,type:"dimensions",dimensions:y}),p.expandParent&&p.parentId&&d.push({id:p.id,parentId:p.parentId,rect:_e(N,r)}))}}if(d.length>0){let h=mt(d,t,n,r);l.push(...h)}return{changes:l,updatedInternals:f}}async function to({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,s]],o),a=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(a)}function Hn(e,t,n,o,r,s){let i=r,a=o.get(i)||new Map;o.set(i,a.set(n,t)),i=`${r}-${e}`;let f=o.get(i)||new Map;if(o.set(i,f.set(n,t)),s){i=`${r}-${e}-${s}`;let l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function an(e,t,n){e.clear(),t.clear();for(let o of n){let{source:r,target:s,sourceHandle:i=null,targetHandle:a=null}=o,f={edgeId:o.id,source:r,target:s,sourceHandle:i,targetHandle:a},l=`${r}-${i}--${s}-${a}`,g=`${s}-${a}--${r}-${i}`;Hn("source",f,g,e,r,i),Hn("target",f,l,e,s,a),t.set(o.id,o)}}function no(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:no(n,t):!1}function On(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function Qs(e,t,n,o){let r=new Map;for(let[s,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!no(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){let a=e.get(s);a&&r.set(s,{id:s,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return r}function $t({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let r=[];for(let[i,a]of t){let f=n.get(i)?.internals.userNode;f&&r.push({...f,position:a.position,dragging:o})}if(!e)return[r[0],r];let s=n.get(e)?.internals.userNode;return[s?{...s,position:t.get(e)?.position||s.position,dragging:o}:r[0],r]}function js({dragItems:e,snapGrid:t,x:n,y:o}){let r=e.values().next().value;if(!r)return null;let s={x:n-r.distance.x,y:o-r.distance.y},i=He(s,t);return{x:i.x-s.x,y:i.y-s.y}}function oo({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let s={x:null,y:null},i=0,a=new Map,f=!1,l={x:0,y:0},g=null,c=!1,d=null,h=!1,p=!1,y=null;function m({noDragClassName:b,handleSelector:u,domNode:w,isSelectable:N,nodeId:S,nodeClickDistance:_=0}){d=Xe(w);function I({x:M,y:A}){let{nodeLookup:H,nodeExtent:z,snapGrid:O,snapToGrid:$,nodeOrigin:P,onNodeDrag:D,onSelectionDrag:V,onError:B,updateNodePositions:L}=t();s={x:M,y:A};let Y=!1,X=a.size>1,U=X&&z?Lt(Ae(a)):null,J=X&&$?js({dragItems:a,snapGrid:O,x:M,y:A}):null;for(let[G,T]of a){if(!H.has(G))continue;let Z={x:M-T.distance.x,y:A-T.distance.y};$&&(Z=J?{x:Math.round(Z.x+J.x),y:Math.round(Z.y+J.y)}:He(Z,O));let Q=null;if(X&&z&&!T.extent&&U){let{positionAbsolute:K}=T.internals,ee=K.x-U.x+z[0][0],oe=K.x+T.measured.width-U.x2+z[1][0],te=K.y-U.y+z[0][1],ie=K.y+T.measured.height-U.y2+z[1][1];Q=[[ee,te],[oe,ie]]}let{position:q,positionAbsolute:W}=Xt({nodeId:G,nextPosition:Z,nodeLookup:H,nodeExtent:Q||z,nodeOrigin:P,onError:B});Y=Y||T.position.x!==q.x||T.position.y!==q.y,T.position=q,T.internals.positionAbsolute=W}if(p=p||Y,!!Y&&(L(a,!0),y&&(o||D||!S&&V))){let[G,T]=$t({nodeId:S,dragItems:a,nodeLookup:H});o?.(y,a,G,T),D?.(y,G,T),S||V?.(y,T)}}async function k(){if(!g)return;let{transform:M,panBy:A,autoPanSpeed:H,autoPanOnNodeDrag:z}=t();if(!z){f=!1,cancelAnimationFrame(i);return}let[O,$]=Zn(l,g,H);(O!==0||$!==0)&&(s.x=(s.x??0)-O/M[2],s.y=(s.y??0)-$/M[2],await A({x:O,y:$})&&I(s)),i=requestAnimationFrame(k)}function R(M){let{nodeLookup:A,multiSelectionActive:H,nodesDraggable:z,transform:O,snapGrid:$,snapToGrid:P,selectNodesOnDrag:D,onNodeDragStart:V,onSelectionDragStart:B,unselectNodesAndEdges:L}=t();c=!0,(!D||!N)&&!H&&S&&(A.get(S)?.selected||L()),N&&D&&S&&e?.(S);let Y=We(M.sourceEvent,{transform:O,snapGrid:$,snapToGrid:P,containerBounds:g});if(s=Y,a=Qs(A,z,Y,S),a.size>0&&(n||V||!S&&B)){let[X,U]=$t({nodeId:S,dragItems:a,nodeLookup:A});n?.(M.sourceEvent,a,X,U),V?.(M.sourceEvent,X,U),S||B?.(M.sourceEvent,U)}}let C=Dt().clickDistance(_).on("start",M=>{let{domNode:A,nodeDragThreshold:H,transform:z,snapGrid:O,snapToGrid:$}=t();g=A?.getBoundingClientRect()||null,h=!1,p=!1,y=M.sourceEvent,H===0&&R(M),s=We(M.sourceEvent,{transform:z,snapGrid:O,snapToGrid:$,containerBounds:g}),l=le(M.sourceEvent,g)}).on("drag",M=>{let{autoPanOnNodeDrag:A,transform:H,snapGrid:z,snapToGrid:O,nodeDragThreshold:$,nodeLookup:P}=t(),D=We(M.sourceEvent,{transform:H,snapGrid:z,snapToGrid:O,containerBounds:g});if(y=M.sourceEvent,(M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||S&&!P.has(S))&&(h=!0),!h){if(!f&&A&&c&&(f=!0,k()),!c){let V=le(M.sourceEvent,g),B=V.x-l.x,L=V.y-l.y;Math.sqrt(B*B+L*L)>$&&R(M)}(s.x!==D.xSnapped||s.y!==D.ySnapped)&&a&&c&&(l=le(M.sourceEvent,g),I(D))}}).on("end",M=>{if(!(!c||h)&&(f=!1,c=!1,cancelAnimationFrame(i),a.size>0)){let{nodeLookup:A,updateNodePositions:H,onNodeDragStop:z,onSelectionDragStop:O}=t();if(p&&(H(a,!1),p=!1),r||z||!S&&O){let[$,P]=$t({nodeId:S,dragItems:a,nodeLookup:A,dragging:!1});r?.(M.sourceEvent,a,$,P),z?.(M.sourceEvent,$,P),S||O?.(M.sourceEvent,P)}}}).filter(M=>{let A=M.target;return!M.button&&(!b||!On(A,`.${b}`,w))&&(!u||On(A,u,w))});d.call(C)}function x(){d?.on(".drag",null)}return{update:m,destroy:x}}function Js(e,t,n){let o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let s of t.values())$e(r,_e(s))>0&&o.push(s);return o}var ei=250;function ti(e,t,n,o){let r=[],s=1/0,i=Js(e,n,t+ei);for(let a of i){let f=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(let l of f){if(o.nodeId===l.nodeId&&o.type===l.type&&o.id===l.id)continue;let{x:g,y:c}=xe(a,l,l.position,!0),d=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(c-e.y,2));d>t||(d<s?(r=[{...l,x:g,y:c}],s=d):d===s&&r.push({...l,x:g,y:c}))}}if(!r.length)return null;if(r.length>1){let a=o.type==="source"?"target":"source";return r.find(f=>f.type===a)??r[0]}return r[0]}function ro(e,t,n,o,r,s=!1){let i=o.get(e);if(!i)return null;let a=r==="strict"?i.internals.handleBounds?.[t]:[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]],f=(n?a?.find(l=>l.id===n):a?.[0])??null;return f&&s?{...f,...xe(i,f,f.position,!0)}:f}function so(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function ni(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var io=()=>!0;function oi(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:s,isTarget:i,domNode:a,nodeLookup:f,lib:l,autoPanOnConnect:g,flowId:c,panBy:d,cancelConnection:h,onConnectStart:p,onConnect:y,onConnectEnd:m,isValidConnection:x=io,onReconnectEnd:b,updateConnection:u,getTransform:w,getFromHandle:N,autoPanSpeed:S,dragThreshold:_=1,handleDomNode:I}){let k=Qt(e.target),R=0,C,{x:M,y:A}=le(e),H=so(s,I),z=a?.getBoundingClientRect(),O=!1;if(!z||!H)return;let $=ro(r,H,o,f,t);if(!$)return;let P=le(e,z),D=!1,V=null,B=!1,L=null;function Y(){if(!g||!z)return;let[q,W]=Zn(P,z,S);d({x:q,y:W}),R=requestAnimationFrame(Y)}let X={...$,nodeId:r,type:H,position:$.position},U=f.get(r),G={inProgress:!0,isValid:null,from:xe(U,X,F.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:U,to:P,toHandle:null,toPosition:Nn[X.position],toNode:null,pointer:P};function T(){O=!0,u(G),p?.(e,{nodeId:r,handleId:o,handleType:H})}_===0&&T();function Z(q){if(!O){let{x:ie,y:pe}=le(q),fe=ie-M,Ee=pe-A;if(!(fe*fe+Ee*Ee>_*_))return;T()}if(!N()||!X){Q(q);return}let W=w();P=le(q,z),C=ti(Oe(P,W,!1,[1,1]),n,f,X),D||(Y(),D=!0);let K=ao(q,{handle:C,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:x,doc:k,lib:l,flowId:c,nodeLookup:f});L=K.handleDomNode,V=K.connection,B=ni(!!C,K.isValid);let ee=f.get(r),oe=ee?xe(ee,X,F.Left,!0):G.from,te={...G,from:oe,isValid:B,to:K.toHandle&&B?Ke({x:K.toHandle.x,y:K.toHandle.y},W):P,toHandle:K.toHandle,toPosition:B&&K.toHandle?K.toHandle.position:Nn[X.position],toNode:K.toHandle?f.get(K.toHandle.nodeId):null,pointer:P};u(te),G=te}function Q(q){if(!("touches"in q&&q.touches.length>0)){if(O){(C||L)&&V&&B&&y?.(V);let{inProgress:W,...K}=G,ee={...K,toPosition:G.toHandle?G.toPosition:null};m?.(q,ee),s&&b?.(q,ee)}h(),cancelAnimationFrame(R),D=!1,B=!1,V=null,L=null,k.removeEventListener("mousemove",Z),k.removeEventListener("mouseup",Q),k.removeEventListener("touchmove",Z),k.removeEventListener("touchend",Q)}}k.addEventListener("mousemove",Z),k.addEventListener("mouseup",Q),k.addEventListener("touchmove",Z),k.addEventListener("touchend",Q)}function ao(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:s,doc:i,lib:a,flowId:f,isValidConnection:l=io,nodeLookup:g}){let c=s==="target",d=t?i.querySelector(`.${a}-flow__handle[data-id="${f}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:p}=le(e),y=i.elementFromPoint(h,p),m=y?.classList.contains(`${a}-flow__handle`)?y:d,x={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){let b=so(void 0,m),u=m.getAttribute("data-nodeid"),w=m.getAttribute("data-handleid"),N=m.classList.contains("connectable"),S=m.classList.contains("connectableend");if(!u||!b)return x;let _={source:c?u:o,sourceHandle:c?w:r,target:c?o:u,targetHandle:c?r:w};x.connection=_;let k=N&&S&&(n===ye.Strict?c&&b==="source"||!c&&b==="target":u!==o||w!==r);x.isValid=k&&l(_),x.toHandle=ro(u,b,w,g,n,!0)}return x}var yt={onPointerDown:oi,isValid:ao};function co({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let r=Xe(e);function s({translateExtent:a,width:f,height:l,zoomStep:g=1,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){let p=u=>{if(u.sourceEvent.type!=="wheel"||!t)return;let w=n(),N=u.sourceEvent.ctrlKey&&Le()?10:1,S=-u.sourceEvent.deltaY*(u.sourceEvent.deltaMode===1?.05:u.sourceEvent.deltaMode?1:.002)*g,_=w[2]*Math.pow(2,S*N);t.scaleTo(_)},y=[0,0],m=u=>{(u.sourceEvent.type==="mousedown"||u.sourceEvent.type==="touchstart")&&(y=[u.sourceEvent.clientX??u.sourceEvent.touches[0].clientX,u.sourceEvent.clientY??u.sourceEvent.touches[0].clientY])},x=u=>{let w=n();if(u.sourceEvent.type!=="mousemove"&&u.sourceEvent.type!=="touchmove"||!t)return;let N=[u.sourceEvent.clientX??u.sourceEvent.touches[0].clientX,u.sourceEvent.clientY??u.sourceEvent.touches[0].clientY],S=[N[0]-y[0],N[1]-y[1]];y=N;let _=o()*Math.max(w[2],Math.log(w[2]))*(h?-1:1),I={x:w[0]-S[0]*_,y:w[1]-S[1]*_},k=[[0,0],[f,l]];t.setViewportConstrained({x:I.x,y:I.y,zoom:w[2]},k,a)},b=At().on("start",m).on("zoom",c?x:null).on("zoom.wheel",d?p:null);r.call(b,{})}function i(){r.on("zoom",null)}return{update:s,destroy:i,pointer:zt}}var xt=e=>({x:e.x,y:e.y,zoom:e.k}),Ht=({x:e,y:t,zoom:n})=>_n.translate(e,t).scale(n),Me=(e,t)=>e.target.closest(`.${t}`),lo=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),ri=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ot=(e,t=0,n=ri,o=()=>{})=>{let r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},uo=e=>{let t=e.ctrlKey&&Le()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function si({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:a,onPanZoom:f,onPanZoomEnd:l}){return g=>{if(Me(g,t))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();let c=n.property("__zoom").k||1;if(g.ctrlKey&&i){let m=zt(g),x=uo(g),b=c*Math.pow(2,x);o.scaleTo(n,b,m,g);return}let d=g.deltaMode===1?20:1,h=r===ge.Vertical?0:g.deltaX*d,p=r===ge.Horizontal?0:g.deltaY*d;!Le()&&g.shiftKey&&r!==ge.Vertical&&(h=g.deltaY*d,p=0),o.translateBy(n,-(h/c)*s,-(p/c)*s,{internal:!0});let y=xt(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f?.(g,y),e.panScrollTimeout=setTimeout(()=>{l?.(g,y),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a?.(g,y))}}function ii({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){let s=o.type==="wheel",i=!t&&s&&!o.ctrlKey,a=Me(o,e);if(o.ctrlKey&&s&&a&&o.preventDefault(),i||a)return null;o.preventDefault(),n.call(this,o,r)}}function ai({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let r=xt(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function ci({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return s=>{e.usedRightMouseButton=!!(n&&lo(t,e.mouseButton??0)),s.sourceEvent?.sync||o([s.transform.x,s.transform.y,s.transform.k]),r&&!s.sourceEvent?.internal&&r?.(s.sourceEvent,xt(s.transform))}}function li({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:s}){return i=>{if(!i.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,s&&lo(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){let a=xt(i.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(i.sourceEvent,a)},n?150:0)}}}function di({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:i,noWheelClassName:a,noPanClassName:f,lib:l,connectionInProgress:g}){return c=>{let d=e||t,h=n&&c.ctrlKey,p=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Me(c,`${l}-flow__node`)||Me(c,`${l}-flow__edge`)))return!0;if(!o&&!d&&!r&&!s&&!n||i||g&&!p||Me(c,a)&&p||Me(c,f)&&(!p||r&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&c.type==="touchstart"&&c.touches?.length>1)return c.preventDefault(),!1;if(!d&&!r&&!h&&p||!o&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(o)&&!o.includes(c.button)&&c.type==="mousedown")return!1;let y=Array.isArray(o)&&o.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&y}}function fo({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:f}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=e.getBoundingClientRect(),c=At().scaleExtent([t,n]).translateExtent(o),d=Xe(e).call(c);b({x:r.x,y:r.y,zoom:Pe(r.zoom,t,n)},[[0,0],[g.width,g.height]],o);let h=d.on("wheel.zoom"),p=d.on("dblclick.zoom");c.wheelDelta(uo);function y(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).transform(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function m({noWheelClassName:C,noPanClassName:M,onPaneContextMenu:A,userSelectionActive:H,panOnScroll:z,panOnDrag:O,panOnScrollMode:$,panOnScrollSpeed:P,preventScrolling:D,zoomOnPinch:V,zoomOnScroll:B,zoomOnDoubleClick:L,zoomActivationKeyPressed:Y,lib:X,onTransformChange:U,connectionInProgress:J,paneClickDistance:G,selectionOnDrag:T}){H&&!l.isZoomingOrPanning&&x();let Z=z&&!Y&&!H;c.clickDistance(T?1/0:!ce(G)||G<0?0:G);let Q=Z?si({zoomPanValues:l,noWheelClassName:C,d3Selection:d,d3Zoom:c,panOnScrollMode:$,panOnScrollSpeed:P,zoomOnPinch:V,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:a}):ii({noWheelClassName:C,preventScrolling:D,d3ZoomHandler:h});if(d.on("wheel.zoom",Q,{passive:!1}),!H){let W=ai({zoomPanValues:l,onDraggingChange:f,onPanZoomStart:i});c.on("start",W);let K=ci({zoomPanValues:l,panOnDrag:O,onPaneContextMenu:!!A,onPanZoom:s,onTransformChange:U});c.on("zoom",K);let ee=li({zoomPanValues:l,panOnDrag:O,panOnScroll:z,onPaneContextMenu:A,onPanZoomEnd:a,onDraggingChange:f});c.on("end",ee)}let q=di({zoomActivationKeyPressed:Y,panOnDrag:O,zoomOnScroll:B,panOnScroll:z,zoomOnDoubleClick:L,zoomOnPinch:V,userSelectionActive:H,noPanClassName:M,noWheelClassName:C,lib:X,connectionInProgress:J});c.filter(q),L?d.on("dblclick.zoom",p):d.on("dblclick.zoom",null)}function x(){c.on("zoom",null)}async function b(C,M,A){let H=Ht(C),z=c?.constrain()(H,M,A);return z&&await y(z),new Promise(O=>O(z))}async function u(C,M){let A=Ht(C);return await y(A,M),new Promise(H=>H(A))}function w(C){if(d){let M=Ht(C),A=d.property("__zoom");(A.k!==C.zoom||A.x!==C.x||A.y!==C.y)&&c?.transform(d,M,null,{sync:!0})}}function N(){let C=d?Cn(d.node()):{x:0,y:0,k:1};return{x:C.x,y:C.y,zoom:C.k}}function S(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).scaleTo(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function _(C,M){return d?new Promise(A=>{c?.interpolate(M?.interpolate==="linear"?tt:nt).scaleBy(Ot(d,M?.duration,M?.ease,()=>A(!0)),C)}):Promise.resolve(!1)}function I(C){c?.scaleExtent(C)}function k(C){c?.translateExtent(C)}function R(C){let M=!ce(C)||C<0?0:C;c?.clickDistance(M)}return{update:m,destroy:x,setViewport:u,setViewportConstrained:b,getViewport:N,scaleTo:S,scaleBy:_,setScaleExtent:I,setTranslateExtent:k,syncViewport:w,setClickDistance:R}}var be;(function(e){e.Line="line",e.Handle="handle"})(be||(be={}));function ui({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:s}){let i=e-t,a=n-o,f=[i>0?1:i<0?-1:0,a>0?1:a<0?-1:0];return i&&r&&(f[0]=f[0]*-1),a&&s&&(f[1]=f[1]*-1),f}function Ln(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function he(e,t){return Math.max(0,t-e)}function me(e,t){return Math.max(0,e-t)}function rt(e,t,n){return Math.max(0,t-e,e-n)}function Tn(e,t){return e?!t:t}function fi(e,t,n,o,r,s,i,a){let{affectsX:f,affectsY:l}=t,{isHorizontal:g,isVertical:c}=t,d=g&&c,{xSnapped:h,ySnapped:p}=n,{minWidth:y,maxWidth:m,minHeight:x,maxHeight:b}=o,{x:u,y:w,width:N,height:S,aspectRatio:_}=e,I=Math.floor(g?h-e.pointerX:0),k=Math.floor(c?p-e.pointerY:0),R=N+(f?-I:I),C=S+(l?-k:k),M=-s[0]*N,A=-s[1]*S,H=rt(R,y,m),z=rt(C,x,b);if(i){let P=0,D=0;f&&I<0?P=he(u+I+M,i[0][0]):!f&&I>0&&(P=me(u+R+M,i[1][0])),l&&k<0?D=he(w+k+A,i[0][1]):!l&&k>0&&(D=me(w+C+A,i[1][1])),H=Math.max(H,P),z=Math.max(z,D)}if(a){let P=0,D=0;f&&I>0?P=me(u+I,a[0][0]):!f&&I<0&&(P=he(u+R,a[1][0])),l&&k>0?D=me(w+k,a[0][1]):!l&&k<0&&(D=he(w+C,a[1][1])),H=Math.max(H,P),z=Math.max(z,D)}if(r){if(g){let P=rt(R/_,x,b)*_;if(H=Math.max(H,P),i){let D=0;!f&&!l||f&&!l&&d?D=me(w+A+R/_,i[1][1])*_:D=he(w+A+(f?I:-I)/_,i[0][1])*_,H=Math.max(H,D)}if(a){let D=0;!f&&!l||f&&!l&&d?D=he(w+R/_,a[1][1])*_:D=me(w+(f?I:-I)/_,a[0][1])*_,H=Math.max(H,D)}}if(c){let P=rt(C*_,y,m)/_;if(z=Math.max(z,P),i){let D=0;!f&&!l||l&&!f&&d?D=me(u+C*_+M,i[1][0])/_:D=he(u+(l?k:-k)*_+M,i[0][0])/_,z=Math.max(z,D)}if(a){let D=0;!f&&!l||l&&!f&&d?D=he(u+C*_,a[1][0])/_:D=me(u+(l?k:-k)*_,a[0][0])/_,z=Math.max(z,D)}}}k=k+(k<0?z:-z),I=I+(I<0?H:-H),r&&(d?R>C*_?k=(Tn(f,l)?-I:I)/_:I=(Tn(f,l)?-k:k)*_:g?(k=I/_,l=f):(I=k*_,f=l));let O=f?u+I:u,$=l?w+k:w;return{width:N+(f?-I:I),height:S+(l?-k:k),x:s[0]*I*(f?-1:1)+O,y:s[1]*k*(l?-1:1)+$}}var go={width:0,height:0,x:0,y:0},gi={...go,pointerX:0,pointerY:0,aspectRatio:1};function pi(e){return[[0,0],[e.measured.width,e.measured.height]]}function hi(e,t,n){let o=t.position.x+e.position.x,r=t.position.y+e.position.y,s=e.measured.width??0,i=e.measured.height??0,a=n[0]*s,f=n[1]*i;return[[o-a,r-f],[o+s-a,r+i-f]]}function po({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){let s=Xe(e),i={controlDirection:Ln("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:l,boundaries:g,keepAspectRatio:c,resizeDirection:d,onResizeStart:h,onResize:p,onResizeEnd:y,shouldResize:m}){let x={...go},b={...gi};i={boundaries:g,resizeDirection:d,keepAspectRatio:c,controlDirection:Ln(l)};let u,w=null,N=[],S,_,I,k=!1,R=Dt().on("start",C=>{let{nodeLookup:M,transform:A,snapGrid:H,snapToGrid:z,nodeOrigin:O,paneDomNode:$}=n();if(u=M.get(t),!u)return;w=$?.getBoundingClientRect()??null;let{xSnapped:P,ySnapped:D}=We(C.sourceEvent,{transform:A,snapGrid:H,snapToGrid:z,containerBounds:w});x={width:u.measured.width??0,height:u.measured.height??0,x:u.position.x??0,y:u.position.y??0},b={...x,pointerX:P,pointerY:D,aspectRatio:x.width/x.height},S=void 0,u.parentId&&(u.extent==="parent"||u.expandParent)&&(S=M.get(u.parentId),_=S&&u.extent==="parent"?pi(S):void 0),N=[],I=void 0;for(let[V,B]of M)if(B.parentId===t&&(N.push({id:V,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){let L=hi(B,u,B.origin??O);I?I=[[Math.min(L[0][0],I[0][0]),Math.min(L[0][1],I[0][1])],[Math.max(L[1][0],I[1][0]),Math.max(L[1][1],I[1][1])]]:I=L}h?.(C,{...x})}).on("drag",C=>{let{transform:M,snapGrid:A,snapToGrid:H,nodeOrigin:z}=n(),O=We(C.sourceEvent,{transform:M,snapGrid:A,snapToGrid:H,containerBounds:w}),$=[];if(!u)return;let{x:P,y:D,width:V,height:B}=x,L={},Y=u.origin??z,{width:X,height:U,x:J,y:G}=fi(b,i.controlDirection,O,i.boundaries,i.keepAspectRatio,Y,_,I),T=X!==V,Z=U!==B,Q=J!==P&&T,q=G!==D&&Z;if(!Q&&!q&&!T&&!Z)return;if((Q||q||Y[0]===1||Y[1]===1)&&(L.x=Q?J:x.x,L.y=q?G:x.y,x.x=L.x,x.y=L.y,N.length>0)){let oe=J-P,te=G-D;for(let ie of N)ie.position={x:ie.position.x-oe+Y[0]*(X-V),y:ie.position.y-te+Y[1]*(U-B)},$.push(ie)}if((T||Z)&&(L.width=T&&(!i.resizeDirection||i.resizeDirection==="horizontal")?X:x.width,L.height=Z&&(!i.resizeDirection||i.resizeDirection==="vertical")?U:x.height,x.width=L.width,x.height=L.height),S&&u.expandParent){let oe=Y[0]*(L.width??0);L.x&&L.x<oe&&(x.x=oe,b.x=b.x-(L.x-oe));let te=Y[1]*(L.height??0);L.y&&L.y<te&&(x.y=te,b.y=b.y-(L.y-te))}let W=ui({width:x.width,prevWidth:V,height:x.height,prevHeight:B,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),K={...x,direction:W};m?.(C,K)!==!1&&(k=!0,p?.(C,K),o(L,$))}).on("end",C=>{k&&(y?.(C,{...x}),r?.({...x}),k=!1)});s.call(R)}function f(){s.on(".drag",null)}return{update:a,destroy:f}}var E=Ze(Os()),v=Ze(et());function se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=se(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var No=Ze(et(),1),ko=Ze(So(),1);var vo=e=>{let t,n=new Set,o=(g,c)=>{let d=typeof g=="function"?g(t):g;if(!Object.is(d,t)){let h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,h))}},r=()=>t,f={setState:o,getState:r,getInitialState:()=>l,subscribe:g=>(n.add(g),()=>n.delete(g)),destroy:()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(o,r,f);return f},_o=e=>e?vo(e):vo;var{useDebugValue:Ai}=No.default,{useSyncExternalStoreWithSelector:$i}=ko.default,Hi=e=>e;function ln(e,t=Hi,n){let o=$i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ai(o),o}var Co=(e,t)=>{let n=_o(e),o=(r,s=t)=>ln(n,r,s);return Object.assign(o,n),o},Mo=(e,t)=>e?Co(e,t):Co;function ne(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var Oi=Ze(Hs()),_t=(0,v.createContext)(null),Li=_t.Provider,jo=ae.error001();function j(e,t){let n=(0,v.useContext)(_t);if(n===null)throw new Error(jo);return ln(n,e,t)}function re(){let e=(0,v.useContext)(_t);if(e===null)throw new Error(jo);return(0,v.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Io={display:"none"},Ti={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jo="react-flow__node-desc",er="react-flow__edge-desc",Ri="react-flow__aria-live",Bi=e=>e.ariaLiveMessage,Vi=e=>e.ariaLabelConfig;function Fi({rfId:e}){let t=j(Bi);return(0,E.jsx)("div",{id:`${Ri}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ti,children:t})}function Yi({rfId:e,disableKeyboardA11y:t}){let n=j(Vi);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{id:`${Jo}-${e}`,style:Io,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,E.jsx)("div",{id:`${er}-${e}`,style:Io,children:n["edge.a11yDescription.default"]}),!t&&(0,E.jsx)(Fi,{rfId:e})]})}var Ct=(0,v.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...r},s)=>{let i=`${e}`.split("-");return(0,E.jsx)("div",{className:se(["react-flow__panel",n,...i]),style:o,ref:s,...r,children:t})});Ct.displayName="Panel";function Zi({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,E.jsx)(Ct,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,E.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var Xi=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},wt=e=>e.id;function Wi(e,t){return ne(e.selectedNodes.map(wt),t.selectedNodes.map(wt))&&ne(e.selectedEdges.map(wt),t.selectedEdges.map(wt))}function Ki({onSelectionChange:e}){let t=re(),{selectedNodes:n,selectedEdges:o}=j(Xi,Wi);return(0,v.useEffect)(()=>{let r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,o,e]),null}var Gi=e=>!!e.onSelectionChangeHandlers;function qi({onSelectionChange:e}){let t=j(Gi);return e||t?(0,E.jsx)(Ki,{onSelectionChange:e}):null}var tr=[0,0],Ui={x:0,y:0,zoom:1},Qi=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Po=[...Qi,"rfId"],ji=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),zo={translateExtent:De,nodeOrigin:tr,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Ji(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:i,reset:a,setDefaultNodesAndEdges:f}=j(ji,ne),l=re();(0,v.useEffect)(()=>(f(e.defaultNodes,e.defaultEdges),()=>{g.current=zo,a()}),[]);let g=(0,v.useRef)(zo);return(0,v.useEffect)(()=>{for(let c of Po){let d=e[c],h=g.current[c];d!==h&&(typeof e[c]>"u"||(c==="nodes"?t(d):c==="edges"?n(d):c==="minZoom"?o(d):c==="maxZoom"?r(d):c==="translateExtent"?s(d):c==="nodeExtent"?i(d):c==="ariaLabelConfig"?l.setState({ariaLabelConfig:Wn(d)}):c==="fitView"?l.setState({fitViewQueued:d}):c==="fitViewOptions"?l.setState({fitViewOptions:d}):l.setState({[c]:d})))}g.current=e},Po.map(c=>e[c])),null}function Do(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ea(e){let[t,n]=(0,v.useState)(e==="system"?null:e);return(0,v.useEffect)(()=>{if(e!=="system"){n(e);return}let o=Do(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Do()?.matches?"dark":"light"}var Ao=typeof document<"u"?document:null;function Qe(e=null,t={target:Ao,actInsideInputWithModifier:!0}){let[n,o]=(0,v.useState)(!1),r=(0,v.useRef)(!1),s=(0,v.useRef)(new Set([])),[i,a]=(0,v.useMemo)(()=>{if(e!==null){let l=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
2
2
  `).replace(`
3
3
 
4
4
  `,`
@@ -0,0 +1,2 @@
1
+ import{A as T,B as C,a as S,s as P}from"./embed-page-chunk-MVT6CPWE.js";import{o as I}from"./embed-page-chunk-5QZRLAW2.js";import{l as d}from"./embed-page-chunk-3FNSGFP2.js";import{a as p}from"./embed-page-chunk-QV7QAJ4N.js";import{z as x}from"./embed-page-chunk-L7GPZSYD.js";import{W as y,_ as v,bb as b}from"./embed-page-chunk-BUFWD6SE.js";import{a as L}from"./embed-page-chunk-R5QL57JJ.js";import{f as s}from"./embed-page-chunk-QBTAJ2YI.js";var u=s(L());var t=s(p()),{Text:c}=b,H=({workflowContext:e,onClose:l,onToolCompleted:g,initialMessageRequest:n,onInitialMessageSubmitted:m,attemptedInitialMessageRequestIdsRef:o,rawInitialMessage:a,showHeader:A=!0})=>{let r=d(),M=I("agent-architect"),f=e?.id?`${M.tenantId}:${e.id}`:null,R=(0,u.useMemo)(()=>{if(e?.id&&e?.name)return e.type==="agent"?`[Context: You're viewing agent "${e.name}" (assistant: ${e.id})]`:`[Context: You're viewing workflow "${e.name}" (agent: ${e.id})]`},[e]),$=(0,u.useMemo)(()=>{if(!n||!e?.id)return null;if(a)return n;let h=[`Purpose: ${n.content.trim()}`,"",`Workflow "${e.id}" has been created with an empty YAML DSL. Based on the purpose above, load the 'create-workflow' skill, design the workflow using the YAML needs+if DSL, and update it via update_workflow. Make sure to include a descriptive name.`].join(`
2
+ `);return{...n,content:h}},[n?.requestId,n?.content,e?.id,a]);return(0,t.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column",borderLeft:"1px solid #f0f0f0",background:"rgba(255, 255, 255, 0.92)"},children:[A&&(0,t.jsxs)("div",{style:{padding:"12px 12px",borderBottom:"1px solid #f0f0f0",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c,{strong:!0,children:r("chat.copilot.agentBuilder")}),e&&(0,t.jsx)("div",{children:(0,t.jsx)(c,{type:"secondary",style:{fontSize:12},children:r("chat.copilot.viewing",{name:e.name})})})]}),l&&(0,t.jsx)(v,{type:"text",size:"small","aria-label":r("chat.copilot.close"),icon:(0,t.jsx)(x,{}),onClick:l})]}),f?(0,t.jsxs)(S,{threadId:f,assistantId:"agent-architect",options:{streaming:!0},onToolCompleted:g,children:[(0,t.jsx)(T,{request:$,onSubmitted:m,attemptedRequestIdsRef:o}),(0,t.jsx)(C,{showHeader:!1,showEmptyState:!1,showDatabaseSlot:!1,showSkillSlot:!1,showAgentSlot:!1,showMetricsDataSourceSlot:!1,systemContext:R})]}):(0,t.jsxs)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",textAlign:"center",gap:4,padding:"0 8px"},children:[(0,t.jsx)(c,{strong:!0,children:r("chat.copilot.agentBuilder")}),(0,t.jsx)(c,{type:"secondary",children:r("chat.copilot.selectWorkflow")})]})]})};var i=s(p()),_=({project:e,value:l,onChange:g,selectable:n=!0,loading:m})=>{let o=d();return e?(0,i.jsxs)("div",{"data-testid":"training-context-card",style:{display:"flex",alignItems:"center",gap:8},children:[(0,i.jsx)("span",{style:{fontSize:12,color:"rgba(0,0,0,0.45)",flexShrink:0},children:o("governance.learning.projectLabel")}),n?(0,i.jsx)(P,{kinds:["training"],value:l??e.id,onChange:a=>{a&&g?.(a)},style:{minWidth:0}}):(0,i.jsx)("span",{style:{fontSize:12,fontWeight:500},children:e.name})]}):m?null:(0,i.jsx)(y,{type:"warning",showIcon:!0,message:o("governance.learning.noProject"),description:o("governance.learning.noProjectDescription")})};export{_ as a,H as b};