@theclearsky/react-blender-nodes 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +186 -0
- package/dist/index.d.ts +501 -0
- package/dist/react-blender-nodes.css +1 -0
- package/dist/react-blender-nodes.es.js +11527 -0
- package/dist/react-blender-nodes.es.js.map +1 -0
- package/dist/react-blender-nodes.umd.js +107 -0
- package/dist/react-blender-nodes.umd.js.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
(function(se,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(se=typeof globalThis<"u"?globalThis:se||self,k(se["react-blender-nodes"]={},se.React))})(this,function(se,k){"use strict";function Al(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const pe=Al(k);function Pl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},_t={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Nr;function Il(){if(Nr)return _t;Nr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var i=null;if(s!==void 0&&(i=""+s),r.key!==void 0&&(i=""+r.key),"key"in r){s={};for(var a in r)a!=="key"&&(s[a]=r[a])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:i,ref:r!==void 0?r:null,props:s}}return _t.Fragment=t,_t.jsx=n,_t.jsxs=n,_t}var Et={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var kr;function Ol(){return kr||(kr=1,process.env.NODE_ENV!=="production"&&function(){function e(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===R?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case m:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case T:return"Activity"}if(typeof E=="object")switch(typeof E.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case p:return"Portal";case g:return(E.displayName||"Context")+".Provider";case C:return(E._context.displayName||"Context")+".Consumer";case y:var D=E.render;return E=E.displayName,E||(E=D.displayName||D.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case I:return D=E.displayName||null,D!==null?D:e(E.type)||"Memo";case S:D=E._payload,E=E._init;try{return e(E(D))}catch{}}return null}function t(E){return""+E}function n(E){try{t(E);var D=!1}catch{D=!0}if(D){D=console;var j=D.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return j.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(E)}}function o(E){if(E===m)return"<>";if(typeof E=="object"&&E!==null&&E.$$typeof===S)return"<...>";try{var D=e(E);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function r(){var E=L.A;return E===null?null:E.getOwner()}function s(){return Error("react-stack-top-frame")}function i(E){if(z.call(E,"key")){var D=Object.getOwnPropertyDescriptor(E,"key").get;if(D&&D.isReactWarning)return!1}return E.key!==void 0}function a(E,D){function j(){P||(P=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}j.isReactWarning=!0,Object.defineProperty(E,"key",{get:j,configurable:!0})}function l(){var E=e(this.type);return M[E]||(M[E]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),E=this.props.ref,E!==void 0?E:null}function c(E,D,j,B,F,Z,K,Y){return j=Z.ref,E={$$typeof:f,type:E,key:D,props:Z,_owner:F},(j!==void 0?j:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:l}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(E,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(E,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function d(E,D,j,B,F,Z,K,Y){var V=D.children;if(V!==void 0)if(B)if(H(V)){for(B=0;B<V.length;B++)h(V[B]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(V);if(z.call(D,"key")){V=e(E);var W=Object.keys(D).filter(function(oe){return oe!=="key"});B=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",$[V+B]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,B,V,W,V),$[V+B]=!0)}if(V=null,j!==void 0&&(n(j),V=""+j),i(D)&&(n(D.key),V=""+D.key),"key"in D){j={};for(var J in D)J!=="key"&&(j[J]=D[J])}else j=D;return V&&a(j,typeof E=="function"?E.displayName||E.name||"Unknown":E),c(E,V,Z,F,r(),j,K,Y)}function h(E){typeof E=="object"&&E!==null&&E.$$typeof===f&&E._store&&(E._store.validated=1)}var u=k,f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),L=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,H=Array.isArray,b=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(E){return E()}};var P,M={},A=u.react_stack_bottom_frame.bind(u,s)(),O=b(o(s)),$={};Et.Fragment=m,Et.jsx=function(E,D,j,B,F){var Z=1e4>L.recentlyCreatedOwnerStacks++;return d(E,D,j,!1,B,F,Z?Error("react-stack-top-frame"):A,Z?b(o(E)):O)},Et.jsxs=function(E,D,j,B,F){var Z=1e4>L.recentlyCreatedOwnerStacks++;return d(E,D,j,!0,B,F,Z?Error("react-stack-top-frame"):A,Z?b(o(E)):O)}}()),Et}var Mr;function Dl(){return Mr||(Mr=1,process.env.NODE_ENV==="production"?nn.exports=Il():nn.exports=Ol()),nn.exports}var v=Dl();function Ar(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tl(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Ar(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Ar(e[r],null)}}}}function zl(e){const t=Ll(e),n=pe.forwardRef((o,r)=>{const{children:s,...i}=o,a=pe.Children.toArray(s),l=a.find(Hl);if(l){const c=l.props.children,d=a.map(h=>h===l?pe.Children.count(c)>1?pe.Children.only(null):pe.isValidElement(c)?c.props.children:null:h);return v.jsx(t,{...i,ref:r,children:pe.isValidElement(c)?pe.cloneElement(c,void 0,d):null})}return v.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var $l=zl("Slot");function Ll(e){const t=pe.forwardRef((n,o)=>{const{children:r,...s}=n;if(pe.isValidElement(r)){const i=Vl(r),a=Rl(s,r.props);return r.type!==pe.Fragment&&(a.ref=o?Tl(o,i):i),pe.cloneElement(r,a)}return pe.Children.count(r)>1?pe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jl=Symbol("radix.slottable");function Hl(e){return pe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jl}function Rl(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Vl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pr(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Pr(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Ir(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Pr(e))&&(o&&(o+=" "),o+=t);return o}const Or=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dr=Ir,Bl=(e,t)=>n=>{var o;if(t?.variants==null)return Dr(e,n?.class,n?.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(c=>{const d=n?.[c],h=s?.[c];if(d===null)return null;const u=Or(d)||Or(h);return r[c][u]}),a=n&&Object.entries(n).reduce((c,d)=>{let[h,u]=d;return u===void 0||(c[h]=u),c},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((c,d)=>{let{class:h,className:u,...f}=d;return Object.entries(f).every(p=>{let[m,x]=p;return Array.isArray(x)?x.includes({...s,...a}[m]):{...s,...a}[m]===x})?[...c,h,u]:c},[]);return Dr(e,i,l,n?.class,n?.className)},ao="-",Fl=e=>{const t=Wl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const a=i.split(ao);return a[0]===""&&a.length!==1&&a.shift(),Tr(a,t)||Yl(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&o[i]?[...l,...o[i]]:l}}},Tr=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Tr(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(ao);return t.validators.find(({validator:i})=>i(s))?.classGroupId},zr=/^\[(.+)\]$/,Yl=e=>{if(zr.test(e)){const t=zr.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Wl=e=>{const{theme:t,classGroups:n}=e,o={nextPart:new Map,validators:[]};for(const r in n)lo(n[r],o,r,t);return o},lo=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:$r(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(Gl(r)){lo(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,i])=>{lo(i,$r(t,s),n,o)})})},$r=(e,t)=>{let n=e;return t.split(ao).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},Gl=e=>e.isThemeGetter,Xl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=o.get(s))!==void 0)return r(s,i),i},set(s,i){n.has(s)?n.set(s,i):r(s,i)}}},co="!",uo=":",Zl=uo.length,Ul=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=r=>{const s=[];let i=0,a=0,l=0,c;for(let p=0;p<r.length;p++){let m=r[p];if(i===0&&a===0){if(m===uo){s.push(r.slice(l,p)),l=p+Zl;continue}if(m==="/"){c=p;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const d=s.length===0?r:r.substring(l),h=ql(d),u=h!==d,f=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:f}};if(t){const r=t+uo,s=o;o=i=>i.startsWith(r)?s(i.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const r=o;o=s=>n({className:s,parseClassName:r})}return o},ql=e=>e.endsWith(co)?e.substring(0,e.length-1):e.startsWith(co)?e.substring(1):e,Kl=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const r=[];let s=[];return o.forEach(i=>{i[0]==="["||t[i]?(r.push(...s.sort(),i),s=[]):s.push(i)}),r.push(...s.sort()),r}},Ql=e=>({cache:Xl(e.cacheSize),parseClassName:Ul(e),sortModifiers:Kl(e),...Fl(e)}),Jl=/\s+/,ec=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=t,i=[],a=e.trim().split(Jl);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:h,modifiers:u,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(d);if(h){l=d+(l.length>0?" "+l:l);continue}let x=!!m,w=o(x?p.substring(0,m):p);if(!w){if(!x){l=d+(l.length>0?" "+l:l);continue}if(w=o(p),!w){l=d+(l.length>0?" "+l:l);continue}x=!1}const C=s(u).join(":"),g=f?C+co:C,y=g+w;if(i.includes(y))continue;i.push(y);const N=r(w,x);for(let _=0;_<N.length;++_){const I=N[_];i.push(g+I)}l=d+(l.length>0?" "+l:l)}return l};function tc(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Lr(t))&&(o&&(o+=" "),o+=n);return o}const Lr=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Lr(e[o]))&&(n&&(n+=" "),n+=t);return n};function nc(e,...t){let n,o,r,s=i;function i(l){const c=t.reduce((d,h)=>h(d),e());return n=Ql(c),o=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const c=o(l);if(c)return c;const d=ec(l,n);return r(l,d),d}return function(){return s(tc.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oc=/^\d+\/\d+$/,rc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ic=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ac=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,et=e=>oc.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),ze=e=>!!e&&Number.isInteger(Number(e)),fo=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Pe=e=>rc.test(e),cc=()=>!0,uc=e=>sc.test(e)&&!ic.test(e),Rr=()=>!1,dc=e=>ac.test(e),fc=e=>lc.test(e),hc=e=>!G(e)&&!X(e),pc=e=>tt(e,Wr,Rr),G=e=>jr.test(e),Ve=e=>tt(e,Gr,uc),ho=e=>tt(e,wc,ee),Vr=e=>tt(e,Fr,Rr),gc=e=>tt(e,Yr,fc),on=e=>tt(e,Xr,dc),X=e=>Hr.test(e),St=e=>nt(e,Gr),mc=e=>nt(e,bc),Br=e=>nt(e,Fr),yc=e=>nt(e,Wr),xc=e=>nt(e,Yr),rn=e=>nt(e,Xr,!0),tt=(e,t,n)=>{const o=jr.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},nt=(e,t,n=!1)=>{const o=Hr.exec(e);return o?o[1]?t(o[1]):n:!1},Fr=e=>e==="position"||e==="percentage",Yr=e=>e==="image"||e==="url",Wr=e=>e==="length"||e==="size"||e==="bg-size",Gr=e=>e==="length",wc=e=>e==="number",bc=e=>e==="family-name",Xr=e=>e==="shadow",vc=nc(()=>{const e=de("color"),t=de("font"),n=de("text"),o=de("font-weight"),r=de("tracking"),s=de("leading"),i=de("breakpoint"),a=de("container"),l=de("spacing"),c=de("radius"),d=de("shadow"),h=de("inset-shadow"),u=de("text-shadow"),f=de("drop-shadow"),p=de("blur"),m=de("perspective"),x=de("aspect"),w=de("ease"),C=de("animate"),g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...y(),X,G],_=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],S=()=>[X,G,l],T=()=>[et,"full","auto",...S()],R=()=>[ze,"none","subgrid",X,G],L=()=>["auto",{span:["full",ze,X,G]},ze,X,G],z=()=>[ze,"auto",X,G],H=()=>["auto","min","max","fr",X,G],b=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...S()],A=()=>[et,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],O=()=>[e,X,G],$=()=>[...y(),Br,Vr,{position:[X,G]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",yc,pc,{size:[X,G]}],j=()=>[fo,St,Ve],B=()=>["","none","full",c,X,G],F=()=>["",ee,St,Ve],Z=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[ee,fo,Br,Vr],V=()=>["","none",p,X,G],W=()=>["none",ee,X,G],J=()=>["none",ee,X,G],oe=()=>[ee,X,G],q=()=>[et,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[cc],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[hc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",ee],text:[Pe],"text-shadow":[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",et,G,X,x]}],container:["container"],columns:[{columns:[ee,G,X,a]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[ze,"auto",X,G]}],basis:[{basis:[et,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,et,"auto","initial","none",G]}],grow:[{grow:["",ee,X,G]}],shrink:[{shrink:["",ee,X,G]}],order:[{order:[ze,"first","last","none",X,G]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...b(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...b()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":b()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[a,"screen",...A()]}],"min-w":[{"min-w":[a,"screen","none",...A()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,St,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,X,ho]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fo,G]}],"font-family":[{font:[mc,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,X,G]}],"line-clamp":[{"line-clamp":[ee,"none",X,ho]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",X,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",X,Ve]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ee,"auto",X,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ze,X,G],radial:["",X,G],conic:[ze,X,G]},xc,gc]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,X,G]}],"outline-w":[{outline:["",ee,St,Ve]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,rn,on]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",h,rn,on]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ee,Ve]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",u,rn,on]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ee,X,G]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[X,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,G]}],filter:[{filter:["","none",X,G]}],blur:[{blur:V()}],brightness:[{brightness:[ee,X,G]}],contrast:[{contrast:[ee,X,G]}],"drop-shadow":[{"drop-shadow":["","none",f,rn,on]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ee,X,G]}],"hue-rotate":[{"hue-rotate":[ee,X,G]}],invert:[{invert:["",ee,X,G]}],saturate:[{saturate:[ee,X,G]}],sepia:[{sepia:["",ee,X,G]}],"backdrop-filter":[{"backdrop-filter":["","none",X,G]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[ee,X,G]}],"backdrop-contrast":[{"backdrop-contrast":[ee,X,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,X,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,X,G]}],"backdrop-invert":[{"backdrop-invert":["",ee,X,G]}],"backdrop-opacity":[{"backdrop-opacity":[ee,X,G]}],"backdrop-saturate":[{"backdrop-saturate":[ee,X,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,X,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",X,G]}],ease:[{ease:["linear","initial",w,X,G]}],delay:[{delay:[ee,X,G]}],animate:[{animate:["none",C,X,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,X,G]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[X,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X,G]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ee,St,Ve,ho]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function re(...e){return vc(Ir(e))}const _c=Bl("inline-flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-[27px] leading-[27px] font-main whitespace-nowrap text-primary-white disabled:cursor-not-allowed outline-none focus-visible:outline-none border",{variants:{color:{dark:"bg-secondary-black border-secondary-dark-gray",lightNonPriority:"bg-primary-gray border-transparent",lightPriority:"bg-primary-gray border-transparent",lightParentGroupBasedHover:"bg-primary-gray border-transparent"},applyHoverStyles:{true:"",false:""}},defaultVariants:{color:"dark",applyHoverStyles:!0},compoundVariants:[{color:"dark",applyHoverStyles:!0,className:"hover:bg-primary-dark-gray"},{color:"lightNonPriority",applyHoverStyles:!0,className:"hover:bg-secondary-light-gray-as-transparent-overlay-over-primary-gray"},{color:"lightPriority",applyHoverStyles:!0,className:"hover:bg-primary-light-gray-as-transparent-overlay-over-primary-gray"},{color:"lightParentGroupBasedHover",applyHoverStyles:!0,className:"hover:bg-primary-light-gray-as-transparent-overlay-over-primary-gray group-hover/lightParentGroupBasedHover:bg-secondary-light-gray-as-transparent-overlay-over-primary-gray"}]}),ot=k.forwardRef(({className:e,color:t,asChild:n=!1,applyHoverStyles:o,...r},s)=>{const i=n?$l:"button";return v.jsx(i,{ref:s,"data-slot":"button",className:re(_c({color:t,className:e,applyHoverStyles:o})),...r})});ot.displayName="Button";function po(e,t){const n=t?.inputs instanceof Array?t?.inputs:[],o=t?.outputs instanceof Array?t?.outputs:[];return n.flatMap(i=>"inputs"in i?i.inputs:[i]).concat(o).find(i=>i?.id===e)}function Ec(e,t,n){return t.map(o=>o.id===e?{...o,value:n}:o)}function Sc(e,t,n){return"inputs"in t?{...t,inputs:Ec(e,t.inputs,n)}:t.id===e?{...t,value:n}:t}function Zr(e,t,n){return{...t,inputs:(t.inputs||[]).map(r=>Sc(e,r,n))}}function go(e,t,n,o=!1,r=!1){if(t>n){const s=t;t=n,n=s}return(o?e>=t:e>t)&&(r?e<=n:e<n)}function sn(e,t,n=!1,o=!1){return go(e.x,t.left,t.right,n)&&go(e.y,t.top,t.bottom,o)}function Ur(e){const t=e.startsWith("-"),n=e.replaceAll(/[^0-9\.]/g,""),o=n.indexOf(".");let r=0;if(o===-1)r=Number(n);else{const s=n.substring(0,o).replaceAll(/[^0-9]/g,""),i=n.substring(o+1).replaceAll(/[^0-9]/g,"");r=+(s+"."+i)}return t&&(r=-r),r}function mo(e,t){return e.toFixed(t).replace(/[0]+$/,"")}function ue(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=ue(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Cc={value:()=>{}};function an(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new ln(n)}function ln(e){this._=e}function Nc(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}ln.prototype=an.prototype={constructor:ln,on:function(e,t){var n=this._,o=Nc(e+"",n),r,s=-1,i=o.length;if(arguments.length<2){for(;++s<i;)if((r=(e=o[s]).type)&&(r=kc(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<i;)if(r=(e=o[s]).type)n[r]=qr(n[r],e.name,t);else if(t==null)for(r in n)n[r]=qr(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ln(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,s;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],o=0,r=s.length;o<r;++o)s[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,s=o.length;r<s;++r)o[r].value.apply(t,n)}};function kc(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function qr(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=Cc,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var yo="http://www.w3.org/1999/xhtml";const Kr={svg:"http://www.w3.org/2000/svg",xhtml:yo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function cn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Kr.hasOwnProperty(t)?{space:Kr[t],local:e}:e}function Mc(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===yo&&t.documentElement.namespaceURI===yo?t.createElement(e):t.createElementNS(n,e)}}function Ac(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qr(e){var t=cn(e);return(t.local?Ac:Mc)(t)}function Pc(){}function xo(e){return e==null?Pc:function(){return this.querySelector(e)}}function Ic(e){typeof e!="function"&&(e=xo(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var s=t[r],i=s.length,a=o[r]=new Array(i),l,c,d=0;d<i;++d)(l=s[d])&&(c=e.call(l,l.__data__,d,s))&&("__data__"in l&&(c.__data__=l.__data__),a[d]=c);return new xe(o,this._parents)}function Oc(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Dc(){return[]}function Jr(e){return e==null?Dc:function(){return this.querySelectorAll(e)}}function Tc(e){return function(){return Oc(e.apply(this,arguments))}}function zc(e){typeof e=="function"?e=Tc(e):e=Jr(e);for(var t=this._groups,n=t.length,o=[],r=[],s=0;s<n;++s)for(var i=t[s],a=i.length,l,c=0;c<a;++c)(l=i[c])&&(o.push(e.call(l,l.__data__,c,i)),r.push(l));return new xe(o,r)}function es(e){return function(){return this.matches(e)}}function ts(e){return function(t){return t.matches(e)}}var $c=Array.prototype.find;function Lc(e){return function(){return $c.call(this.children,e)}}function jc(){return this.firstElementChild}function Hc(e){return this.select(e==null?jc:Lc(typeof e=="function"?e:ts(e)))}var Rc=Array.prototype.filter;function Vc(){return Array.from(this.children)}function Bc(e){return function(){return Rc.call(this.children,e)}}function Fc(e){return this.selectAll(e==null?Vc:Bc(typeof e=="function"?e:ts(e)))}function Yc(e){typeof e!="function"&&(e=es(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var s=t[r],i=s.length,a=o[r]=[],l,c=0;c<i;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new xe(o,this._parents)}function ns(e){return new Array(e.length)}function Wc(){return new xe(this._enter||this._groups.map(ns),this._parents)}function un(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}un.prototype={constructor:un,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Gc(e){return function(){return e}}function Xc(e,t,n,o,r,s){for(var i=0,a,l=t.length,c=s.length;i<c;++i)(a=t[i])?(a.__data__=s[i],o[i]=a):n[i]=new un(e,s[i]);for(;i<l;++i)(a=t[i])&&(r[i]=a)}function Zc(e,t,n,o,r,s,i){var a,l,c=new Map,d=t.length,h=s.length,u=new Array(d),f;for(a=0;a<d;++a)(l=t[a])&&(u[a]=f=i.call(l,l.__data__,a,t)+"",c.has(f)?r[a]=l:c.set(f,l));for(a=0;a<h;++a)f=i.call(e,s[a],a,s)+"",(l=c.get(f))?(o[a]=l,l.__data__=s[a],c.delete(f)):n[a]=new un(e,s[a]);for(a=0;a<d;++a)(l=t[a])&&c.get(u[a])===l&&(r[a]=l)}function Uc(e){return e.__data__}function qc(e,t){if(!arguments.length)return Array.from(this,Uc);var n=t?Zc:Xc,o=this._parents,r=this._groups;typeof e!="function"&&(e=Gc(e));for(var s=r.length,i=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=o[c],h=r[c],u=h.length,f=Kc(e.call(d,d&&d.__data__,c,o)),p=f.length,m=a[c]=new Array(p),x=i[c]=new Array(p),w=l[c]=new Array(u);n(d,h,m,x,w,f,t);for(var C=0,g=0,y,N;C<p;++C)if(y=m[C]){for(C>=g&&(g=C+1);!(N=x[g])&&++g<p;);y._next=N||null}}return i=new xe(i,o),i._enter=a,i._exit=l,i}function Kc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Qc(){return new xe(this._exit||this._groups.map(ns),this._parents)}function Jc(e,t,n){var o=this.enter(),r=this,s=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?s.remove():n(s),o&&r?o.merge(r).order():r}function eu(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,s=o.length,i=Math.min(r,s),a=new Array(r),l=0;l<i;++l)for(var c=n[l],d=o[l],h=c.length,u=a[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||d[p])&&(u[p]=f);for(;l<r;++l)a[l]=n[l];return new xe(a,this._parents)}function tu(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,s=o[r],i;--r>=0;)(i=o[r])&&(s&&i.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(i,s),s=i);return this}function nu(e){e||(e=ou);function t(h,u){return h&&u?e(h.__data__,u.__data__):!h-!u}for(var n=this._groups,o=n.length,r=new Array(o),s=0;s<o;++s){for(var i=n[s],a=i.length,l=r[s]=new Array(a),c,d=0;d<a;++d)(c=i[d])&&(l[d]=c);l.sort(t)}return new xe(r,this._parents).order()}function ou(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ru(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function su(){return Array.from(this)}function iu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,s=o.length;r<s;++r){var i=o[r];if(i)return i}return null}function au(){let e=0;for(const t of this)++e;return e}function lu(){return!this.node()}function cu(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],s=0,i=r.length,a;s<i;++s)(a=r[s])&&e.call(a,a.__data__,s,r);return this}function uu(e){return function(){this.removeAttribute(e)}}function du(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fu(e,t){return function(){this.setAttribute(e,t)}}function hu(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function pu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function gu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function mu(e,t){var n=cn(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?du:uu:typeof t=="function"?n.local?gu:pu:n.local?hu:fu)(n,t))}function os(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function yu(e){return function(){this.style.removeProperty(e)}}function xu(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wu(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function bu(e,t,n){return arguments.length>1?this.each((t==null?yu:typeof t=="function"?wu:xu)(e,t,n??"")):rt(this.node(),e)}function rt(e,t){return e.style.getPropertyValue(t)||os(e).getComputedStyle(e,null).getPropertyValue(t)}function vu(e){return function(){delete this[e]}}function _u(e,t){return function(){this[e]=t}}function Eu(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Su(e,t){return arguments.length>1?this.each((t==null?vu:typeof t=="function"?Eu:_u)(e,t)):this.node()[e]}function rs(e){return e.trim().split(/^|\s+/)}function wo(e){return e.classList||new ss(e)}function ss(e){this._node=e,this._names=rs(e.getAttribute("class")||"")}ss.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function is(e,t){for(var n=wo(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function as(e,t){for(var n=wo(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Cu(e){return function(){is(this,e)}}function Nu(e){return function(){as(this,e)}}function ku(e,t){return function(){(t.apply(this,arguments)?is:as)(this,e)}}function Mu(e,t){var n=rs(e+"");if(arguments.length<2){for(var o=wo(this.node()),r=-1,s=n.length;++r<s;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?ku:t?Cu:Nu)(n,t))}function Au(){this.textContent=""}function Pu(e){return function(){this.textContent=e}}function Iu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ou(e){return arguments.length?this.each(e==null?Au:(typeof e=="function"?Iu:Pu)(e)):this.node().textContent}function Du(){this.innerHTML=""}function Tu(e){return function(){this.innerHTML=e}}function zu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function $u(e){return arguments.length?this.each(e==null?Du:(typeof e=="function"?zu:Tu)(e)):this.node().innerHTML}function Lu(){this.nextSibling&&this.parentNode.appendChild(this)}function ju(){return this.each(Lu)}function Hu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ru(){return this.each(Hu)}function Vu(e){var t=typeof e=="function"?e:Qr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bu(){return null}function Fu(e,t){var n=typeof e=="function"?e:Qr(e),o=t==null?Bu:typeof t=="function"?t:xo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Yu(){var e=this.parentNode;e&&e.removeChild(this)}function Wu(){return this.each(Yu)}function Gu(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zu(e){return this.select(e?Xu:Gu)}function Uu(e){return arguments.length?this.property("__data__",e):this.node().__data__}function qu(e){return function(t){e.call(this,t,this.__data__)}}function Ku(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Qu(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,s;n<r;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++o]=s;++o?t.length=o:delete this.__on}}}function Ju(e,t,n){return function(){var o=this.__on,r,s=qu(t);if(o){for(var i=0,a=o.length;i<a;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=t;return}}this.addEventListener(e.type,s,n),r={type:e.type,name:e.name,value:t,listener:s,options:n},o?o.push(r):this.__on=[r]}}function ed(e,t,n){var o=Ku(e+""),r,s=o.length,i;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,d;l<c;++l)for(r=0,d=a[l];r<s;++r)if((i=o[r]).type===d.type&&i.name===d.name)return d.value}return}for(a=t?Ju:Qu,r=0;r<s;++r)this.each(a(o[r],t,n));return this}function ls(e,t,n){var o=os(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function td(e,t){return function(){return ls(this,e,t)}}function nd(e,t){return function(){return ls(this,e,t.apply(this,arguments))}}function od(e,t){return this.each((typeof t=="function"?nd:td)(e,t))}function*rd(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,s=o.length,i;r<s;++r)(i=o[r])&&(yield i)}var cs=[null];function xe(e,t){this._groups=e,this._parents=t}function Ct(){return new xe([[document.documentElement]],cs)}function sd(){return this}xe.prototype=Ct.prototype={constructor:xe,select:Ic,selectAll:zc,selectChild:Hc,selectChildren:Fc,filter:Yc,data:qc,enter:Wc,exit:Qc,join:Jc,merge:eu,selection:sd,order:tu,sort:nu,call:ru,nodes:su,node:iu,size:au,empty:lu,each:cu,attr:mu,style:bu,property:Su,classed:Mu,text:Ou,html:$u,raise:ju,lower:Ru,append:Vu,insert:Fu,remove:Wu,clone:Zu,datum:Uu,on:ed,dispatch:od,[Symbol.iterator]:rd};function we(e){return typeof e=="string"?new xe([[document.querySelector(e)]],[document.documentElement]):new xe([[e]],cs)}function id(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ve(e,t){if(e=id(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const ad={passive:!1},Nt={capture:!0,passive:!1};function bo(e){e.stopImmediatePropagation()}function st(e){e.preventDefault(),e.stopImmediatePropagation()}function us(e){var t=e.document.documentElement,n=we(e).on("dragstart.drag",st,Nt);"onselectstart"in t?n.on("selectstart.drag",st,Nt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ds(e,t){var n=e.document.documentElement,o=we(e).on("dragstart.drag",null);t&&(o.on("click.drag",st,Nt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const dn=e=>()=>e;function vo(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:s,x:i,y:a,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}vo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ld(e){return!e.ctrlKey&&!e.button}function cd(){return this.parentNode}function ud(e,t){return t??{x:e.x,y:e.y}}function dd(){return navigator.maxTouchPoints||"ontouchstart"in this}function fs(){var e=ld,t=cd,n=ud,o=dd,r={},s=an("start","drag","end"),i=0,a,l,c,d,h=0;function u(y){y.on("mousedown.drag",f).filter(o).on("touchstart.drag",x).on("touchmove.drag",w,ad).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(y,N){if(!(d||!e.call(this,y,N))){var _=g(this,t.call(this,y,N),y,N,"mouse");_&&(we(y.view).on("mousemove.drag",p,Nt).on("mouseup.drag",m,Nt),us(y.view),bo(y),c=!1,a=y.clientX,l=y.clientY,_("start",y))}}function p(y){if(st(y),!c){var N=y.clientX-a,_=y.clientY-l;c=N*N+_*_>h}r.mouse("drag",y)}function m(y){we(y.view).on("mousemove.drag mouseup.drag",null),ds(y.view,c),st(y),r.mouse("end",y)}function x(y,N){if(e.call(this,y,N)){var _=y.changedTouches,I=t.call(this,y,N),S=_.length,T,R;for(T=0;T<S;++T)(R=g(this,I,y,N,_[T].identifier,_[T]))&&(bo(y),R("start",y,_[T]))}}function w(y){var N=y.changedTouches,_=N.length,I,S;for(I=0;I<_;++I)(S=r[N[I].identifier])&&(st(y),S("drag",y,N[I]))}function C(y){var N=y.changedTouches,_=N.length,I,S;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),I=0;I<_;++I)(S=r[N[I].identifier])&&(bo(y),S("end",y,N[I]))}function g(y,N,_,I,S,T){var R=s.copy(),L=ve(T||_,N),z,H,b;if((b=n.call(y,new vo("beforestart",{sourceEvent:_,target:u,identifier:S,active:i,x:L[0],y:L[1],dx:0,dy:0,dispatch:R}),I))!=null)return z=b.x-L[0]||0,H=b.y-L[1]||0,function P(M,A,O){var $=L,E;switch(M){case"start":r[S]=P,E=i++;break;case"end":delete r[S],--i;case"drag":L=ve(O||A,N),E=i;break}R.call(M,y,new vo(M,{sourceEvent:A,subject:b,target:u,identifier:S,active:E,x:L[0]+z,y:L[1]+H,dx:L[0]-$[0],dy:L[1]-$[1],dispatch:R}),I)}}return u.filter=function(y){return arguments.length?(e=typeof y=="function"?y:dn(!!y),u):e},u.container=function(y){return arguments.length?(t=typeof y=="function"?y:dn(y),u):t},u.subject=function(y){return arguments.length?(n=typeof y=="function"?y:dn(y),u):n},u.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:dn(!!y),u):o},u.on=function(){var y=s.on.apply(s,arguments);return y===s?u:y},u.clickDistance=function(y){return arguments.length?(h=(y=+y)*y,u):Math.sqrt(h)},u}function _o(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hs(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function kt(){}var Mt=.7,fn=1/Mt,it="\\s*([+-]?\\d+)\\s*",At="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fd=/^#([0-9a-f]{3,8})$/,hd=new RegExp(`^rgb\\(${it},${it},${it}\\)$`),pd=new RegExp(`^rgb\\(${Ne},${Ne},${Ne}\\)$`),gd=new RegExp(`^rgba\\(${it},${it},${it},${At}\\)$`),md=new RegExp(`^rgba\\(${Ne},${Ne},${Ne},${At}\\)$`),yd=new RegExp(`^hsl\\(${At},${Ne},${Ne}\\)$`),xd=new RegExp(`^hsla\\(${At},${Ne},${Ne},${At}\\)$`),ps={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_o(kt,Be,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gs,formatHex:gs,formatHex8:wd,formatHsl:bd,formatRgb:ms,toString:ms});function gs(){return this.rgb().formatHex()}function wd(){return this.rgb().formatHex8()}function bd(){return vs(this).formatHsl()}function ms(){return this.rgb().formatRgb()}function Be(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=fd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ys(t):n===3?new ge(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=hd.exec(e))?new ge(t[1],t[2],t[3],1):(t=pd.exec(e))?new ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gd.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=md.exec(e))?hn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yd.exec(e))?bs(t[1],t[2]/100,t[3]/100,1):(t=xd.exec(e))?bs(t[1],t[2]/100,t[3]/100,t[4]):ps.hasOwnProperty(e)?ys(ps[e]):e==="transparent"?new ge(NaN,NaN,NaN,0):null}function ys(e){return new ge(e>>16&255,e>>8&255,e&255,1)}function hn(e,t,n,o){return o<=0&&(e=t=n=NaN),new ge(e,t,n,o)}function vd(e){return e instanceof kt||(e=Be(e)),e?(e=e.rgb(),new ge(e.r,e.g,e.b,e.opacity)):new ge}function Eo(e,t,n,o){return arguments.length===1?vd(e):new ge(e,t,n,o??1)}function ge(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}_o(ge,Eo,hs(kt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new ge(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new ge(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ge(Fe(this.r),Fe(this.g),Fe(this.b),pn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xs,formatHex:xs,formatHex8:_d,formatRgb:ws,toString:ws}));function xs(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}`}function _d(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}${Ye((isNaN(this.opacity)?1:this.opacity)*255)}`}function ws(){const e=pn(this.opacity);return`${e===1?"rgb(":"rgba("}${Fe(this.r)}, ${Fe(this.g)}, ${Fe(this.b)}${e===1?")":`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ye(e){return e=Fe(e),(e<16?"0":"")+e.toString(16)}function bs(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _e(e,t,n,o)}function vs(e){if(e instanceof _e)return new _e(e.h,e.s,e.l,e.opacity);if(e instanceof kt||(e=Be(e)),!e)return new _e;if(e instanceof _e)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),s=Math.max(t,n,o),i=NaN,a=s-r,l=(s+r)/2;return a?(t===s?i=(n-o)/a+(n<o)*6:n===s?i=(o-t)/a+2:i=(t-n)/a+4,a/=l<.5?s+r:2-s-r,i*=60):a=l>0&&l<1?0:i,new _e(i,a,l,e.opacity)}function Ed(e,t,n,o){return arguments.length===1?vs(e):new _e(e,t,n,o??1)}function _e(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}_o(_e,Ed,hs(kt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new _e(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new _e(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ge(So(e>=240?e-240:e+120,r,o),So(e,r,o),So(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new _e(_s(this.h),gn(this.s),gn(this.l),pn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pn(this.opacity);return`${e===1?"hsl(":"hsla("}${_s(this.h)}, ${gn(this.s)*100}%, ${gn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _s(e){return e=(e||0)%360,e<0?e+360:e}function gn(e){return Math.max(0,Math.min(1,e||0))}function So(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Co=e=>()=>e;function Sd(e,t){return function(n){return e+n*t}}function Cd(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Nd(e){return(e=+e)==1?Es:function(t,n){return n-t?Cd(t,n,e):Co(isNaN(t)?n:t)}}function Es(e,t){var n=t-e;return n?Sd(e,n):Co(isNaN(e)?t:e)}const mn=function e(t){var n=Nd(t);function o(r,s){var i=n((r=Eo(r)).r,(s=Eo(s)).r),a=n(r.g,s.g),l=n(r.b,s.b),c=Es(r.opacity,s.opacity);return function(d){return r.r=i(d),r.g=a(d),r.b=l(d),r.opacity=c(d),r+""}}return o.gamma=e,o}(1);function kd(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(s){for(r=0;r<n;++r)o[r]=e[r]*(1-s)+t[r]*s;return o}}function Md(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ad(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),s=new Array(n),i;for(i=0;i<o;++i)r[i]=Pt(e[i],t[i]);for(;i<n;++i)s[i]=t[i];return function(a){for(i=0;i<o;++i)s[i]=r[i](a);return s}}function Pd(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function ke(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Id(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Pt(e[r],t[r]):o[r]=t[r];return function(s){for(r in n)o[r]=n[r](s);return o}}var No=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ko=new RegExp(No.source,"g");function Od(e){return function(){return e}}function Dd(e){return function(t){return e(t)+""}}function Ss(e,t){var n=No.lastIndex=ko.lastIndex=0,o,r,s,i=-1,a=[],l=[];for(e=e+"",t=t+"";(o=No.exec(e))&&(r=ko.exec(t));)(s=r.index)>n&&(s=t.slice(n,s),a[i]?a[i]+=s:a[++i]=s),(o=o[0])===(r=r[0])?a[i]?a[i]+=r:a[++i]=r:(a[++i]=null,l.push({i,x:ke(o,r)})),n=ko.lastIndex;return n<t.length&&(s=t.slice(n),a[i]?a[i]+=s:a[++i]=s),a.length<2?l[0]?Dd(l[0].x):Od(t):(t=l.length,function(c){for(var d=0,h;d<t;++d)a[(h=l[d]).i]=h.x(c);return a.join("")})}function Pt(e,t){var n=typeof t,o;return t==null||n==="boolean"?Co(t):(n==="number"?ke:n==="string"?(o=Be(t))?(t=o,mn):Ss:t instanceof Be?mn:t instanceof Date?Pd:Md(t)?kd:Array.isArray(t)?Ad:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Id:ke)(e,t)}var Cs=180/Math.PI,Mo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ns(e,t,n,o,r,s){var i,a,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,l/=a),e*o<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:r,translateY:s,rotate:Math.atan2(t,e)*Cs,skewX:Math.atan(l)*Cs,scaleX:i,scaleY:a}}var yn;function Td(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Mo:Ns(t.a,t.b,t.c,t.d,t.e,t.f)}function zd(e){return e==null||(yn||(yn=document.createElementNS("http://www.w3.org/2000/svg","g")),yn.setAttribute("transform",e),!(e=yn.transform.baseVal.consolidate()))?Mo:(e=e.matrix,Ns(e.a,e.b,e.c,e.d,e.e,e.f))}function ks(e,t,n,o){function r(c){return c.length?c.pop()+" ":""}function s(c,d,h,u,f,p){if(c!==h||d!==u){var m=f.push("translate(",null,t,null,n);p.push({i:m-4,x:ke(c,h)},{i:m-2,x:ke(d,u)})}else(h||u)&&f.push("translate("+h+t+u+n)}function i(c,d,h,u){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),u.push({i:h.push(r(h)+"rotate(",null,o)-2,x:ke(c,d)})):d&&h.push(r(h)+"rotate("+d+o)}function a(c,d,h,u){c!==d?u.push({i:h.push(r(h)+"skewX(",null,o)-2,x:ke(c,d)}):d&&h.push(r(h)+"skewX("+d+o)}function l(c,d,h,u,f,p){if(c!==h||d!==u){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:ke(c,h)},{i:m-2,x:ke(d,u)})}else(h!==1||u!==1)&&f.push(r(f)+"scale("+h+","+u+")")}return function(c,d){var h=[],u=[];return c=e(c),d=e(d),s(c.translateX,c.translateY,d.translateX,d.translateY,h,u),i(c.rotate,d.rotate,h,u),a(c.skewX,d.skewX,h,u),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,h,u),c=d=null,function(f){for(var p=-1,m=u.length,x;++p<m;)h[(x=u[p]).i]=x.x(f);return h.join("")}}}var $d=ks(Td,"px, ","px)","deg)"),Ld=ks(zd,", ",")",")"),jd=1e-12;function Ms(e){return((e=Math.exp(e))+1/e)/2}function Hd(e){return((e=Math.exp(e))-1/e)/2}function Rd(e){return((e=Math.exp(2*e))-1)/(e+1)}const xn=function e(t,n,o){function r(s,i){var a=s[0],l=s[1],c=s[2],d=i[0],h=i[1],u=i[2],f=d-a,p=h-l,m=f*f+p*p,x,w;if(m<jd)w=Math.log(u/c)/t,x=function(I){return[a+I*f,l+I*p,c*Math.exp(t*I*w)]};else{var C=Math.sqrt(m),g=(u*u-c*c+o*m)/(2*c*n*C),y=(u*u-c*c-o*m)/(2*u*n*C),N=Math.log(Math.sqrt(g*g+1)-g),_=Math.log(Math.sqrt(y*y+1)-y);w=(_-N)/t,x=function(I){var S=I*w,T=Ms(N),R=c/(n*C)*(T*Rd(t*S+N)-Hd(N));return[a+R*f,l+R*p,c*T/Ms(t*S+N)]}}return x.duration=w*1e3*t/Math.SQRT2,x}return r.rho=function(s){var i=Math.max(.001,+s),a=i*i,l=a*a;return e(i,a,l)},r}(Math.SQRT2,2,4);var at=0,It=0,Ot=0,As=1e3,wn,Dt,bn=0,We=0,vn=0,Tt=typeof performance=="object"&&performance.now?performance:Date,Ps=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ao(){return We||(Ps(Vd),We=Tt.now()+vn)}function Vd(){We=0}function _n(){this._call=this._time=this._next=null}_n.prototype=Is.prototype={constructor:_n,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ao():+n)+(t==null?0:+t),!this._next&&Dt!==this&&(Dt?Dt._next=this:wn=this,Dt=this),this._call=e,this._time=n,Po()},stop:function(){this._call&&(this._call=null,this._time=1/0,Po())}};function Is(e,t,n){var o=new _n;return o.restart(e,t,n),o}function Bd(){Ao(),++at;for(var e=wn,t;e;)(t=We-e._time)>=0&&e._call.call(void 0,t),e=e._next;--at}function Os(){We=(bn=Tt.now())+vn,at=It=0;try{Bd()}finally{at=0,Yd(),We=0}}function Fd(){var e=Tt.now(),t=e-bn;t>As&&(vn-=t,bn=e)}function Yd(){for(var e,t=wn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:wn=n);Dt=e,Po(o)}function Po(e){if(!at){It&&(It=clearTimeout(It));var t=e-We;t>24?(e<1/0&&(It=setTimeout(Os,e-Tt.now()-vn)),Ot&&(Ot=clearInterval(Ot))):(Ot||(bn=Tt.now(),Ot=setInterval(Fd,As)),at=1,Ps(Os))}}function Ds(e,t,n){var o=new _n;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Wd=an("start","end","cancel","interrupt"),Gd=[],Ts=0,zs=1,Io=2,En=3,$s=4,Oo=5,Sn=6;function Cn(e,t,n,o,r,s){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;Xd(e,n,{name:t,index:o,group:r,on:Wd,tween:Gd,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ts})}function Do(e,t){var n=Ee(e,t);if(n.state>Ts)throw new Error("too late; already scheduled");return n}function Me(e,t){var n=Ee(e,t);if(n.state>En)throw new Error("too late; already running");return n}function Ee(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Xd(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Is(s,0,n.time);function s(c){n.state=zs,n.timer.restart(i,n.delay,n.time),n.delay<=c&&i(c-n.delay)}function i(c){var d,h,u,f;if(n.state!==zs)return l();for(d in o)if(f=o[d],f.name===n.name){if(f.state===En)return Ds(i);f.state===$s?(f.state=Sn,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[d]):+d<t&&(f.state=Sn,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[d])}if(Ds(function(){n.state===En&&(n.state=$s,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Io,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Io){for(n.state=En,r=new Array(u=n.tween.length),d=0,h=-1;d<u;++d)(f=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function a(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Oo,1),h=-1,u=r.length;++h<u;)r[h].call(e,d);n.state===Oo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Sn,n.timer.stop(),delete o[t];for(var c in o)return;delete e.__transition}}function Nn(e,t){var n=e.__transition,o,r,s=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((o=n[i]).name!==t){s=!1;continue}r=o.state>Io&&o.state<Oo,o.state=Sn,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[i]}s&&delete e.__transition}}function Zd(e){return this.each(function(){Nn(this,e)})}function Ud(e,t){var n,o;return function(){var r=Me(this,e),s=r.tween;if(s!==n){o=n=s;for(var i=0,a=o.length;i<a;++i)if(o[i].name===t){o=o.slice(),o.splice(i,1);break}}r.tween=o}}function qd(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var s=Me(this,e),i=s.tween;if(i!==o){r=(o=i).slice();for(var a={name:t,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===t){r[l]=a;break}l===c&&r.push(a)}s.tween=r}}function Kd(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ee(this.node(),n).tween,r=0,s=o.length,i;r<s;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((t==null?Ud:qd)(n,e,t))}function To(e,t,n){var o=e._id;return e.each(function(){var r=Me(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Ee(r,o).value[t]}}function Ls(e,t){var n;return(typeof t=="number"?ke:t instanceof Be?mn:(n=Be(t))?(t=n,mn):Ss)(e,t)}function Qd(e){return function(){this.removeAttribute(e)}}function Jd(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ef(e,t,n){var o,r=n+"",s;return function(){var i=this.getAttribute(e);return i===r?null:i===o?s:s=t(o=i,n)}}function tf(e,t,n){var o,r=n+"",s;return function(){var i=this.getAttributeNS(e.space,e.local);return i===r?null:i===o?s:s=t(o=i,n)}}function nf(e,t,n){var o,r,s;return function(){var i,a=n(this),l;return a==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=a+"",i===l?null:i===o&&l===r?s:(r=l,s=t(o=i,a)))}}function of(e,t,n){var o,r,s;return function(){var i,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=a+"",i===l?null:i===o&&l===r?s:(r=l,s=t(o=i,a)))}}function rf(e,t){var n=cn(e),o=n==="transform"?Ld:Ls;return this.attrTween(e,typeof t=="function"?(n.local?of:nf)(n,o,To(this,"attr."+e,t)):t==null?(n.local?Jd:Qd)(n):(n.local?tf:ef)(n,o,t))}function sf(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function af(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function lf(e,t){var n,o;function r(){var s=t.apply(this,arguments);return s!==o&&(n=(o=s)&&af(e,s)),n}return r._value=t,r}function cf(e,t){var n,o;function r(){var s=t.apply(this,arguments);return s!==o&&(n=(o=s)&&sf(e,s)),n}return r._value=t,r}function uf(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=cn(e);return this.tween(n,(o.local?lf:cf)(o,t))}function df(e,t){return function(){Do(this,e).delay=+t.apply(this,arguments)}}function ff(e,t){return t=+t,function(){Do(this,e).delay=t}}function hf(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?df:ff)(t,e)):Ee(this.node(),t).delay}function pf(e,t){return function(){Me(this,e).duration=+t.apply(this,arguments)}}function gf(e,t){return t=+t,function(){Me(this,e).duration=t}}function mf(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pf:gf)(t,e)):Ee(this.node(),t).duration}function yf(e,t){if(typeof t!="function")throw new Error;return function(){Me(this,e).ease=t}}function xf(e){var t=this._id;return arguments.length?this.each(yf(t,e)):Ee(this.node(),t).ease}function wf(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Me(this,e).ease=n}}function bf(e){if(typeof e!="function")throw new Error;return this.each(wf(this._id,e))}function vf(e){typeof e!="function"&&(e=es(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var s=t[r],i=s.length,a=o[r]=[],l,c=0;c<i;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new Ie(o,this._parents,this._name,this._id)}function _f(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,s=Math.min(o,r),i=new Array(o),a=0;a<s;++a)for(var l=t[a],c=n[a],d=l.length,h=i[a]=new Array(d),u,f=0;f<d;++f)(u=l[f]||c[f])&&(h[f]=u);for(;a<o;++a)i[a]=t[a];return new Ie(i,this._parents,this._name,this._id)}function Ef(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Sf(e,t,n){var o,r,s=Ef(t)?Do:Me;return function(){var i=s(this,e),a=i.on;a!==o&&(r=(o=a).copy()).on(t,n),i.on=r}}function Cf(e,t){var n=this._id;return arguments.length<2?Ee(this.node(),n).on.on(e):this.each(Sf(n,e,t))}function Nf(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function kf(){return this.on("end.remove",Nf(this._id))}function Mf(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xo(e));for(var o=this._groups,r=o.length,s=new Array(r),i=0;i<r;++i)for(var a=o[i],l=a.length,c=s[i]=new Array(l),d,h,u=0;u<l;++u)(d=a[u])&&(h=e.call(d,d.__data__,u,a))&&("__data__"in d&&(h.__data__=d.__data__),c[u]=h,Cn(c[u],t,n,u,c,Ee(d,n)));return new Ie(s,this._parents,t,n)}function Af(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jr(e));for(var o=this._groups,r=o.length,s=[],i=[],a=0;a<r;++a)for(var l=o[a],c=l.length,d,h=0;h<c;++h)if(d=l[h]){for(var u=e.call(d,d.__data__,h,l),f,p=Ee(d,n),m=0,x=u.length;m<x;++m)(f=u[m])&&Cn(f,t,n,m,u,p);s.push(u),i.push(d)}return new Ie(s,i,t,n)}var Pf=Ct.prototype.constructor;function If(){return new Pf(this._groups,this._parents)}function Of(e,t){var n,o,r;return function(){var s=rt(this,e),i=(this.style.removeProperty(e),rt(this,e));return s===i?null:s===n&&i===o?r:r=t(n=s,o=i)}}function js(e){return function(){this.style.removeProperty(e)}}function Df(e,t,n){var o,r=n+"",s;return function(){var i=rt(this,e);return i===r?null:i===o?s:s=t(o=i,n)}}function Tf(e,t,n){var o,r,s;return function(){var i=rt(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),rt(this,e))),i===l?null:i===o&&l===r?s:(r=l,s=t(o=i,a))}}function zf(e,t){var n,o,r,s="style."+t,i="end."+s,a;return function(){var l=Me(this,e),c=l.on,d=l.value[s]==null?a||(a=js(t)):void 0;(c!==n||r!==d)&&(o=(n=c).copy()).on(i,r=d),l.on=o}}function $f(e,t,n){var o=(e+="")=="transform"?$d:Ls;return t==null?this.styleTween(e,Of(e,o)).on("end.style."+e,js(e)):typeof t=="function"?this.styleTween(e,Tf(e,o,To(this,"style."+e,t))).each(zf(this._id,e)):this.styleTween(e,Df(e,o,t),n).on("end.style."+e,null)}function Lf(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function jf(e,t,n){var o,r;function s(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&Lf(e,i,n)),o}return s._value=t,s}function Hf(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,jf(e,t,n??""))}function Rf(e){return function(){this.textContent=e}}function Vf(e){return function(){var t=e(this);this.textContent=t??""}}function Bf(e){return this.tween("text",typeof e=="function"?Vf(To(this,"text",e)):Rf(e==null?"":e+""))}function Ff(e){return function(t){this.textContent=e.call(this,t)}}function Yf(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ff(r)),t}return o._value=e,o}function Wf(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Yf(e))}function Gf(){for(var e=this._name,t=this._id,n=Hs(),o=this._groups,r=o.length,s=0;s<r;++s)for(var i=o[s],a=i.length,l,c=0;c<a;++c)if(l=i[c]){var d=Ee(l,t);Cn(l,e,n,c,i,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ie(o,this._parents,e,n)}function Xf(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(s,i){var a={value:i},l={value:function(){--r===0&&s()}};n.each(function(){var c=Me(this,o),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),r===0&&s()})}var Zf=0;function Ie(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Hs(){return++Zf}var Oe=Ct.prototype;Ie.prototype={constructor:Ie,select:Mf,selectAll:Af,selectChild:Oe.selectChild,selectChildren:Oe.selectChildren,filter:vf,merge:_f,selection:If,transition:Gf,call:Oe.call,nodes:Oe.nodes,node:Oe.node,size:Oe.size,empty:Oe.empty,each:Oe.each,on:Cf,attr:rf,attrTween:uf,style:$f,styleTween:Hf,text:Bf,textTween:Wf,remove:kf,tween:Kd,delay:hf,duration:mf,ease:xf,easeVarying:bf,end:Xf,[Symbol.iterator]:Oe[Symbol.iterator]};function Uf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var qf={time:null,delay:0,duration:250,ease:Uf};function Kf(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Qf(e){var t,n;e instanceof Ie?(t=e._id,e=e._name):(t=Hs(),(n=qf).time=Ao(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,s=0;s<r;++s)for(var i=o[s],a=i.length,l,c=0;c<a;++c)(l=i[c])&&Cn(l,e,t,c,i,n||Kf(l,t));return new Ie(o,this._parents,e,t)}Ct.prototype.interrupt=Zd,Ct.prototype.transition=Qf;const kn=e=>()=>e;function Jf(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function De(e,t,n){this.k=e,this.x=t,this.y=n}De.prototype={constructor:De,scale:function(e){return e===1?this:new De(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new De(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mn=new De(1,0,0);Rs.prototype=De.prototype;function Rs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Mn;return e.__zoom}function zo(e){e.stopImmediatePropagation()}function zt(e){e.preventDefault(),e.stopImmediatePropagation()}function eh(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function th(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Vs(){return this.__zoom||Mn}function nh(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function oh(){return navigator.maxTouchPoints||"ontouchstart"in this}function rh(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i))}function Bs(){var e=eh,t=th,n=rh,o=nh,r=oh,s=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],a=250,l=xn,c=an("start","zoom","end"),d,h,u,f=500,p=150,m=0,x=10;function w(b){b.property("__zoom",Vs).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",R).filter(r).on("touchstart.zoom",L).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(b,P,M,A){var O=b.selection?b.selection():b;O.property("__zoom",Vs),b!==O?N(b,P,M,A):O.interrupt().each(function(){_(this,arguments).event(A).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},w.scaleBy=function(b,P,M,A){w.scaleTo(b,function(){var O=this.__zoom.k,$=typeof P=="function"?P.apply(this,arguments):P;return O*$},M,A)},w.scaleTo=function(b,P,M,A){w.transform(b,function(){var O=t.apply(this,arguments),$=this.__zoom,E=M==null?y(O):typeof M=="function"?M.apply(this,arguments):M,D=$.invert(E),j=typeof P=="function"?P.apply(this,arguments):P;return n(g(C($,j),E,D),O,i)},M,A)},w.translateBy=function(b,P,M,A){w.transform(b,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),i)},null,A)},w.translateTo=function(b,P,M,A,O){w.transform(b,function(){var $=t.apply(this,arguments),E=this.__zoom,D=A==null?y($):typeof A=="function"?A.apply(this,arguments):A;return n(Mn.translate(D[0],D[1]).scale(E.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof M=="function"?-M.apply(this,arguments):-M),$,i)},A,O)};function C(b,P){return P=Math.max(s[0],Math.min(s[1],P)),P===b.k?b:new De(P,b.x,b.y)}function g(b,P,M){var A=P[0]-M[0]*b.k,O=P[1]-M[1]*b.k;return A===b.x&&O===b.y?b:new De(b.k,A,O)}function y(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function N(b,P,M,A){b.on("start.zoom",function(){_(this,arguments).event(A).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(A).end()}).tween("zoom",function(){var O=this,$=arguments,E=_(O,$).event(A),D=t.apply(O,$),j=M==null?y(D):typeof M=="function"?M.apply(O,$):M,B=Math.max(D[1][0]-D[0][0],D[1][1]-D[0][1]),F=O.__zoom,Z=typeof P=="function"?P.apply(O,$):P,K=l(F.invert(j).concat(B/F.k),Z.invert(j).concat(B/Z.k));return function(Y){if(Y===1)Y=Z;else{var V=K(Y),W=B/V[2];Y=new De(W,j[0]-V[0]*W,j[1]-V[1]*W)}E.zoom(null,Y)}})}function _(b,P,M){return!M&&b.__zooming||new I(b,P)}function I(b,P){this.that=b,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,P),this.taps=0}I.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,P){return this.mouse&&b!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var P=we(this.that).datum();c.call(b,this.that,new Jf(b,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:c}),P)}};function S(b,...P){if(!e.apply(this,arguments))return;var M=_(this,P).event(b),A=this.__zoom,O=Math.max(s[0],Math.min(s[1],A.k*Math.pow(2,o.apply(this,arguments)))),$=ve(b);if(M.wheel)(M.mouse[0][0]!==$[0]||M.mouse[0][1]!==$[1])&&(M.mouse[1]=A.invert(M.mouse[0]=$)),clearTimeout(M.wheel);else{if(A.k===O)return;M.mouse=[$,A.invert($)],Nn(this),M.start()}zt(b),M.wheel=setTimeout(E,p),M.zoom("mouse",n(g(C(A,O),M.mouse[0],M.mouse[1]),M.extent,i));function E(){M.wheel=null,M.end()}}function T(b,...P){if(u||!e.apply(this,arguments))return;var M=b.currentTarget,A=_(this,P,!0).event(b),O=we(b.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",B,!0),$=ve(b,M),E=b.clientX,D=b.clientY;us(b.view),zo(b),A.mouse=[$,this.__zoom.invert($)],Nn(this),A.start();function j(F){if(zt(F),!A.moved){var Z=F.clientX-E,K=F.clientY-D;A.moved=Z*Z+K*K>m}A.event(F).zoom("mouse",n(g(A.that.__zoom,A.mouse[0]=ve(F,M),A.mouse[1]),A.extent,i))}function B(F){O.on("mousemove.zoom mouseup.zoom",null),ds(F.view,A.moved),zt(F),A.event(F).end()}}function R(b,...P){if(e.apply(this,arguments)){var M=this.__zoom,A=ve(b.changedTouches?b.changedTouches[0]:b,this),O=M.invert(A),$=M.k*(b.shiftKey?.5:2),E=n(g(C(M,$),A,O),t.apply(this,P),i);zt(b),a>0?we(this).transition().duration(a).call(N,E,A,b):we(this).call(w.transform,E,A,b)}}function L(b,...P){if(e.apply(this,arguments)){var M=b.touches,A=M.length,O=_(this,P,b.changedTouches.length===A).event(b),$,E,D,j;for(zo(b),E=0;E<A;++E)D=M[E],j=ve(D,this),j=[j,this.__zoom.invert(j),D.identifier],O.touch0?!O.touch1&&O.touch0[2]!==j[2]&&(O.touch1=j,O.taps=0):(O.touch0=j,$=!0,O.taps=1+!!d);d&&(d=clearTimeout(d)),$&&(O.taps<2&&(h=j[0],d=setTimeout(function(){d=null},f)),Nn(this),O.start())}}function z(b,...P){if(this.__zooming){var M=_(this,P).event(b),A=b.changedTouches,O=A.length,$,E,D,j;for(zt(b),$=0;$<O;++$)E=A[$],D=ve(E,this),M.touch0&&M.touch0[2]===E.identifier?M.touch0[0]=D:M.touch1&&M.touch1[2]===E.identifier&&(M.touch1[0]=D);if(E=M.that.__zoom,M.touch1){var B=M.touch0[0],F=M.touch0[1],Z=M.touch1[0],K=M.touch1[1],Y=(Y=Z[0]-B[0])*Y+(Y=Z[1]-B[1])*Y,V=(V=K[0]-F[0])*V+(V=K[1]-F[1])*V;E=C(E,Math.sqrt(Y/V)),D=[(B[0]+Z[0])/2,(B[1]+Z[1])/2],j=[(F[0]+K[0])/2,(F[1]+K[1])/2]}else if(M.touch0)D=M.touch0[0],j=M.touch0[1];else return;M.zoom("touch",n(g(E,D,j),M.extent,i))}}function H(b,...P){if(this.__zooming){var M=_(this,P).event(b),A=b.changedTouches,O=A.length,$,E;for(zo(b),u&&clearTimeout(u),u=setTimeout(function(){u=null},f),$=0;$<O;++$)E=A[$],M.touch0&&M.touch0[2]===E.identifier?delete M.touch0:M.touch1&&M.touch1[2]===E.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(E=ve(E,this),Math.hypot(h[0]-E[0],h[1]-E[1])<x)){var D=we(this).on("dblclick.zoom");D&&D.apply(this,arguments)}}}return w.wheelDelta=function(b){return arguments.length?(o=typeof b=="function"?b:kn(+b),w):o},w.filter=function(b){return arguments.length?(e=typeof b=="function"?b:kn(!!b),w):e},w.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:kn(!!b),w):r},w.extent=function(b){return arguments.length?(t=typeof b=="function"?b:kn([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),w):t},w.scaleExtent=function(b){return arguments.length?(s[0]=+b[0],s[1]=+b[1],w):[s[0],s[1]]},w.translateExtent=function(b){return arguments.length?(i[0][0]=+b[0][0],i[1][0]=+b[1][0],i[0][1]=+b[0][1],i[1][1]=+b[1][1],w):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},w.constrain=function(b){return arguments.length?(n=b,w):n},w.duration=function(b){return arguments.length?(a=+b,w):a},w.interpolate=function(b){return arguments.length?(l=b,w):l},w.on=function(){var b=c.on.apply(c,arguments);return b===c?w:b},w.clickDistance=function(b){return arguments.length?(m=(b=+b)*b,w):Math.sqrt(m)},w.tapDistance=function(b){return arguments.length?(x=+b,w):x},w}const me={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."},$t=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fs=["Enter"," ","Escape"],Ys={"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"};var lt;(function(e){e.Strict="strict",e.Loose="loose"})(lt||(lt={}));var Ge;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ge||(Ge={}));var ct;(function(e){e.Partial="partial",e.Full="full"})(ct||(ct={}));const Ws={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var $e;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($e||($e={}));var An;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(An||(An={}));var U;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(U||(U={}));const Gs={[U.Left]:U.Right,[U.Right]:U.Left,[U.Top]:U.Bottom,[U.Bottom]:U.Top};function sh(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0}function Xs(e,t,n){if(!n)return;const o=[];e.forEach((r,s)=>{t?.has(s)||o.push(r)}),o.length&&n(o)}function Zs(e){return e===null?null:e?"valid":"invalid"}const Us=e=>"id"in e&&"source"in e&&"target"in e,ih=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$o=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lt=(e,t=[0,0])=>{const{width:n,height:o}=Te(e),r=e.origin??t,s=n*r[0],i=o*r[1];return{x:e.position.x-s,y:e.position.y-i}},ah=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const s=typeof r=="string";let i=!t.nodeLookup&&!s?r:void 0;t.nodeLookup&&(i=s?t.nodeLookup.get(r):$o(r)?r:t.nodeLookup.get(r.id));const a=i?On(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Pn(o,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return In(n)},jt=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(o=>{if(t.filter===void 0||t.filter(o)){const r=On(o);n=Pn(n,r)}}),In(n)},Lo=(e,t,[n,o,r]=[0,0,1],s=!1,i=!1)=>{const a={...Vt(t,[n,o,r]),width:t.width/r,height:t.height/r},l=[];for(const c of e.values()){const{measured:d,selectable:h=!0,hidden:u=!1}=c;if(i&&!h||u)continue;const f=d.width??c.width??c.initialWidth??null,p=d.height??c.height??c.initialHeight??null,m=Ht(a,dt(c)),x=(f??0)*(p??0),w=s&&m>0;(!c.internals.handleBounds||w||m>=x||c.dragging)&&l.push(c)}return l},lh=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function ch(e,t){const 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 uh({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:s},i){if(e.size===0)return Promise.resolve(!0);const a=ch(e,i),l=jt(a),c=Ho(l,t,n,i?.minZoom??r,i?.maxZoom??s,i?.padding??.1);return await o.setViewport(c,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)}function qs({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:s}){const i=n.get(e),a=i.parentId?n.get(i.parentId):void 0,{x:l,y:c}=a?a.internals.positionAbsolute:{x:0,y:0},d=i.origin??o;let h=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!a)s?.("005",me.error005());else{const f=a.measured.width,p=a.measured.height;f&&p&&(h=[[l,c],[l+f,c+p]])}else a&&ht(i.extent)&&(h=[[i.extent[0][0]+l,i.extent[0][1]+c],[i.extent[1][0]+l,i.extent[1][1]+c]]);const u=ht(h)?Xe(t,h,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&s?.("015",me.error015()),{position:{x:u.x-l+(i.measured.width??0)*d[0],y:u.y-c+(i.measured.height??0)*d[1]},positionAbsolute:u}}async function dh({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const s=new Set(e.map(u=>u.id)),i=[];for(const u of n){if(u.deletable===!1)continue;const f=s.has(u.id),p=!f&&u.parentId&&i.find(m=>m.id===u.parentId);(f||p)&&i.push(u)}const a=new Set(t.map(u=>u.id)),l=o.filter(u=>u.deletable!==!1),d=lh(i,l);for(const u of l)a.has(u.id)&&!d.find(p=>p.id===u.id)&&d.push(u);if(!r)return{edges:d,nodes:i};const h=await r({nodes:i,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:i}:{edges:[],nodes:[]}:h}const ut=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Xe=(e={x:0,y:0},t,n)=>({x:ut(e.x,t[0][0],t[1][0]-(n?.width??0)),y:ut(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ks(e,t,n){const{width:o,height:r}=Te(n),{x:s,y:i}=n.internals.positionAbsolute;return Xe(e,[[s,i],[s+o,i+r]],t)}const Qs=(e,t,n)=>e<t?ut(Math.abs(e-t),1,t)/t:e>n?-ut(Math.abs(e-n),1,t)/t:0,Js=(e,t,n=15,o=40)=>{const r=Qs(e.x,o,t.width-o)*n,s=Qs(e.y,o,t.height-o)*n;return[r,s]},Pn=(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)}),jo=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),In=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),dt=(e,t=[0,0])=>{const{x:n,y:o}=$o(e)?e.internals.positionAbsolute:Lt(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}},On=(e,t=[0,0])=>{const{x:n,y:o}=$o(e)?e.internals.positionAbsolute:Lt(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)}},ei=(e,t)=>In(Pn(jo(e),jo(t))),Ht=(e,t)=>{const 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)},ti=e=>Se(e.width)&&Se(e.height)&&Se(e.x)&&Se(e.y),Se=e=>!isNaN(e)&&isFinite(e),ni=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Rt=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Vt=({x:e,y:t},[n,o,r],s=!1,i=[1,1])=>{const a={x:(e-n)/r,y:(t-o)/r};return s?Rt(a,i):a},Dn=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function ft(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const 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 fh(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=ft(e,n),r=ft(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=ft(e.top??e.y??0,n),r=ft(e.bottom??e.y??0,n),s=ft(e.left??e.x??0,t),i=ft(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 hh(e,t,n,o,r,s){const{x:i,y:a}=Dn(e,[t,n,o]),{x:l,y:c}=Dn({x:e.x+e.width,y:e.y+e.height},[t,n,o]),d=r-l,h=s-c;return{left:Math.floor(i),top:Math.floor(a),right:Math.floor(d),bottom:Math.floor(h)}}const Ho=(e,t,n,o,r,s)=>{const i=fh(s,t,n),a=(t-i.x)/e.width,l=(n-i.y)/e.height,c=Math.min(a,l),d=ut(c,o,r),h=e.x+e.width/2,u=e.y+e.height/2,f=t/2-h*d,p=n/2-u*d,m=hh(e,f,p,d,t,n),x={left:Math.min(m.left-i.left,0),top:Math.min(m.top-i.top,0),right:Math.min(m.right-i.right,0),bottom:Math.min(m.bottom-i.bottom,0)};return{x:f-x.left+x.right,y:p-x.top+x.bottom,zoom:d}},Bt=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ht(e){return e!=null&&e!=="parent"}function Te(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function oi(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function ri(e,t={width:0,height:0},n,o,r){const s={...e},i=o.get(n);if(i){const 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 si(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function ph(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function gh(e){return{...Ys,...e||{}}}function Ft(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:s,y:i}=Ae(e),a=Vt({x:s-(r?.left??0),y:i-(r?.top??0)},o),{x:l,y:c}=n?Rt(a,t):a;return{xSnapped:l,ySnapped:c,...a}}const Ro=e=>({width:e.offsetWidth,height:e.offsetHeight}),ii=e=>e?.getRootNode?.()||window?.document,mh=["INPUT","SELECT","TEXTAREA"];function ai(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:mh.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const li=e=>"clientX"in e,Ae=(e,t)=>{const n=li(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)}},ci=(e,t,n,o,r)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{const 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,...Ro(i)}})};function ui({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:s,targetControlX:i,targetControlY:a}){const l=e*.125+r*.375+i*.375+n*.125,c=t*.125+s*.375+a*.375+o*.125,d=Math.abs(l-e),h=Math.abs(c-t);return[l,c,d,h]}function Tn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function di({pos:e,x1:t,y1:n,x2:o,y2:r,c:s}){switch(e){case U.Left:return[t-Tn(t-o,s),n];case U.Right:return[t+Tn(o-t,s),n];case U.Top:return[t,n-Tn(n-r,s)];case U.Bottom:return[t,n+Tn(r-n,s)]}}function zn({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:o,targetY:r,targetPosition:s=U.Top,curvature:i=.25}){const[a,l]=di({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[c,d]=di({pos:s,x1:o,y1:r,x2:e,y2:t,c:i}),[h,u,f,p]=ui({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${a},${l} ${c},${d} ${o},${r}`,h,u,f,p]}function fi({sourceX:e,sourceY:t,targetX:n,targetY:o}){const 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 yh({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o,elevateOnSelect:r=!1}){if(o!==void 0)return o;const s=r&&n?1e3:0,i=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return s+i}function xh({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const s=Pn(On(e),On(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return Ht(i,In(s))>0}const wh=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,bh=(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)),hi=(e,t)=>{if(!e.source||!e.target)return ni("006",me.error006()),t;let n;return Us(e)?n={...e}:n={...e,id:wh(e)},bh(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function pi({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,s,i,a]=fi({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,s,i,a]}const gi={[U.Left]:{x:-1,y:0},[U.Right]:{x:1,y:0},[U.Top]:{x:0,y:-1},[U.Bottom]:{x:0,y:1}},vh=({source:e,sourcePosition:t=U.Bottom,target:n})=>t===U.Left||t===U.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},mi=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function _h({source:e,sourcePosition:t=U.Bottom,target:n,targetPosition:o=U.Top,center:r,offset:s,stepPosition:i}){const a=gi[t],l=gi[o],c={x:e.x+a.x*s,y:e.y+a.y*s},d={x:n.x+l.x*s,y:n.y+l.y*s},h=vh({source:c,sourcePosition:t,target:d}),u=h.x!==0?"x":"y",f=h[u];let p=[],m,x;const w={x:0,y:0},C={x:0,y:0},[,,g,y]=fi({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[u]*l[u]===-1){u==="x"?(m=r.x??c.x+(d.x-c.x)*i,x=r.y??(c.y+d.y)/2):(m=r.x??(c.x+d.x)/2,x=r.y??c.y+(d.y-c.y)*i);const _=[{x:m,y:c.y},{x:m,y:d.y}],I=[{x:c.x,y:x},{x:d.x,y:x}];a[u]===f?p=u==="x"?_:I:p=u==="x"?I:_}else{const _=[{x:c.x,y:d.y}],I=[{x:d.x,y:c.y}];if(u==="x"?p=a.x===f?I:_:p=a.y===f?_:I,t===o){const z=Math.abs(e[u]-n[u]);if(z<=s){const H=Math.min(s-1,s-z);a[u]===f?w[u]=(c[u]>e[u]?-1:1)*H:C[u]=(d[u]>n[u]?-1:1)*H}}if(t!==o){const z=u==="x"?"y":"x",H=a[u]===l[z],b=c[z]>d[z],P=c[z]<d[z];(a[u]===1&&(!H&&b||H&&P)||a[u]!==1&&(!H&&P||H&&b))&&(p=u==="x"?_:I)}const S={x:c.x+w.x,y:c.y+w.y},T={x:d.x+C.x,y:d.y+C.y},R=Math.max(Math.abs(S.x-p[0].x),Math.abs(T.x-p[0].x)),L=Math.max(Math.abs(S.y-p[0].y),Math.abs(T.y-p[0].y));R>=L?(m=(S.x+T.x)/2,x=p[0].y):(m=p[0].x,x=(S.y+T.y)/2)}return[[e,{x:c.x+w.x,y:c.y+w.y},...p,{x:d.x+C.x,y:d.y+C.y},n],m,x,g,y]}function Eh(e,t,n,o){const r=Math.min(mi(e,t)/2,mi(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){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+r*c},${i}Q ${s},${i} ${s},${i+r*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${i+r*l}Q ${s},${i} ${s+r*a},${i}`}function Vo({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:o,targetY:r,targetPosition:s=U.Top,borderRadius:i=5,centerX:a,centerY:l,offset:c=20,stepPosition:d=.5}){const[h,u,f,p,m]=_h({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:s,center:{x:a,y:l},offset:c,stepPosition:d});return[h.reduce((w,C,g)=>{let y="";return g>0&&g<h.length-1?y=Eh(h[g-1],C,h[g+1],i):y=`${g===0?"M":"L"}${C.x} ${C.y}`,w+=y,w},""),u,f,p,m]}function yi(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Sh(e){const{sourceNode:t,targetNode:n}=e;if(!yi(t)||!yi(n))return null;const o=t.internals.handleBounds||xi(t.handles),r=n.internals.handleBounds||xi(n.handles),s=wi(o?.source??[],e.sourceHandle),i=wi(e.connectionMode===lt.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!s||!i)return e.onError?.("008",me.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=s?.position||U.Bottom,l=i?.position||U.Top,c=Yt(t,s,a),d=Yt(n,i,l);return{sourceX:c.x,sourceY:c.y,targetX:d.x,targetY:d.y,sourcePosition:a,targetPosition:l}}function xi(e){if(!e)return null;const t=[],n=[];for(const 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 Yt(e,t,n=U.Left,o=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,s=(t?.y??0)+e.internals.positionAbsolute.y,{width:i,height:a}=t??Te(e);if(o)return{x:r+i/2,y:s+a/2};switch(t?.position??n){case U.Top:return{x:r+i/2,y:s};case U.Right:return{x:r+i,y:s+a/2};case U.Bottom:return{x:r+i/2,y:s+a};case U.Left:return{x:r,y:s+a/2}}}function wi(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Bo(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Ch(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const s=new Set;return e.reduce((i,a)=>([a.markerStart||o,a.markerEnd||r].forEach(l=>{if(l&&typeof l=="object"){const c=Bo(l,t);s.has(c)||(i.push({id:c,color:l.color||n,...l}),s.add(c))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))}const Fo={nodeOrigin:[0,0],nodeExtent:$t,elevateNodesOnSelect:!0,defaults:{}},Nh={...Fo,checkEquality:!0};function Yo(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function kh(e,t,n){const o=Yo(Fo,n);for(const r of e.values())if(r.parentId)Go(r,e,t,o);else{const s=Lt(r,o.nodeOrigin),i=ht(r.extent)?r.extent:o.nodeExtent,a=Xe(s,i,Te(r));r.internals.positionAbsolute=a}}function Wo(e,t,n,o){const r=Yo(Nh,o);let s=e.length>0;const i=new Map(t),a=r?.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const l of e){let c=i.get(l.id);if(r.checkEquality&&l===c?.internals.userNode)t.set(l.id,c);else{const d=Lt(l,r.nodeOrigin),h=ht(l.extent)?l.extent:r.nodeExtent,u=Xe(d,h,Te(l));c={...r.defaults,...l,measured:{width:l.measured?.width,height:l.measured?.height},internals:{positionAbsolute:u,handleBounds:l.measured?c?.internals.handleBounds:void 0,z:bi(l,a),userNode:l}},t.set(l.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),l.parentId&&Go(c,t,n,o)}return s}function Mh(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Go(e,t,n,o){const{elevateNodesOnSelect:r,nodeOrigin:s,nodeExtent:i}=Yo(Fo,o),a=e.parentId,l=t.get(a);if(!l){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Mh(e,n);const c=r?1e3:0,{x:d,y:h,z:u}=Ah(e,l,s,i,c),{positionAbsolute:f}=e.internals,p=d!==f.x||h!==f.y;(p||u!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:p?{x:d,y:h}:f,z:u}})}function bi(e,t){return(Se(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function Ah(e,t,n,o,r){const{x:s,y:i}=t.internals.positionAbsolute,a=Te(e),l=Lt(e,n),c=ht(e.extent)?Xe(l,e.extent,a):l;let d=Xe({x:s+c.x,y:i+c.y},o,a);e.extent==="parent"&&(d=Ks(d,a,t));const h=bi(e,r),u=t.internals.z??0;return{x:d.x,y:d.y,z:u>=h?u+1:h}}function Xo(e,t,n,o=[0,0]){const r=[],s=new Map;for(const i of e){const a=t.get(i.parentId);if(!a)continue;const l=s.get(i.parentId)?.expandedRect??dt(a),c=ei(l,i.rect);s.set(i.parentId,{expandedRect:c,parent:a})}return s.size>0&&s.forEach(({expandedRect:i,parent:a},l)=>{const c=a.internals.positionAbsolute,d=Te(a),h=a.origin??o,u=i.x<c.x?Math.round(Math.abs(c.x-i.x)):0,f=i.y<c.y?Math.round(Math.abs(c.y-i.y)):0,p=Math.max(d.width,Math.round(i.width)),m=Math.max(d.height,Math.round(i.height)),x=(p-d.width)*h[0],w=(m-d.height)*h[1];(u>0||f>0||x||w)&&(r.push({id:l,type:"position",position:{x:a.position.x-u+x,y:a.position.y-f+w}}),n.get(l)?.forEach(C=>{e.some(g=>g.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+u,y:C.position.y+f}})})),(d.width<i.width||d.height<i.height||u||f)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:p+(u?h[0]*u-x:0),height:m+(f?h[1]*f-w:0)}})}),r}function Ph(e,t,n,o,r,s){const i=o?.querySelector(".xyflow__viewport");let a=!1;if(!i)return{changes:[],updatedInternals:a};const l=[],c=window.getComputedStyle(i),{m22:d}=new window.DOMMatrixReadOnly(c.transform),h=[];for(const u of e.values()){const f=t.get(u.id);if(!f)continue;if(f.hidden){t.set(f.id,{...f,internals:{...f.internals,handleBounds:void 0}}),a=!0;continue}const p=Ro(u.nodeElement),m=f.measured.width!==p.width||f.measured.height!==p.height;if(!!(p.width&&p.height&&(m||!f.internals.handleBounds||u.force))){const w=u.nodeElement.getBoundingClientRect(),C=ht(f.extent)?f.extent:s;let{positionAbsolute:g}=f.internals;f.parentId&&f.extent==="parent"?g=Ks(g,p,t.get(f.parentId)):C&&(g=Xe(g,C,p));const y={...f,measured:p,internals:{...f.internals,positionAbsolute:g,handleBounds:{source:ci("source",u.nodeElement,w,d,f.id),target:ci("target",u.nodeElement,w,d,f.id)}}};t.set(f.id,y),f.parentId&&Go(y,t,n,{nodeOrigin:r}),a=!0,m&&(l.push({id:f.id,type:"dimensions",dimensions:p}),f.expandParent&&f.parentId&&h.push({id:f.id,parentId:f.parentId,rect:dt(y,r)}))}}if(h.length>0){const u=Xo(h,t,n,r);l.push(...u)}return{changes:l,updatedInternals:a}}async function Ih({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const 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 vi(e,t,n,o,r,s){let i=r;const a=o.get(i)||new Map;o.set(i,a.set(n,t)),i=`${r}-${e}`;const l=o.get(i)||new Map;if(o.set(i,l.set(n,t)),s){i=`${r}-${e}-${s}`;const c=o.get(i)||new Map;o.set(i,c.set(n,t))}}function _i(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:s,sourceHandle:i=null,targetHandle:a=null}=o,l={edgeId:o.id,source:r,target:s,sourceHandle:i,targetHandle:a},c=`${r}-${i}--${s}-${a}`,d=`${s}-${a}--${r}-${i}`;vi("source",l,d,e,r,i),vi("target",l,c,e,s,a),t.set(o.id,o)}}function Oh(e,t){if(e===null||t===null)return!1;const n=Array.isArray(e)?e:[e],o=Array.isArray(t)?t:[t];if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++)if(n[r].id!==o[r].id||n[r].type!==o[r].type||!Object.is(n[r].data,o[r].data))return!1;return!0}function Ei(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ei(n,t):!1}function Si(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 Dh(e,t,n,o){const r=new Map;for(const[s,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!Ei(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const 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 Zo({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){const r=[];for(const[i,a]of t){const l=n.get(i)?.internals.userNode;l&&r.push({...l,position:a.position,dragging:o})}if(!e)return[r[0],r];const s=n.get(e)?.internals.userNode;return[s?{...s,position:t.get(e)?.position||s.position,dragging:o}:r[0],r]}function Th({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const s={x:n-r.distance.x,y:o-r.distance.y},i=Rt(s,t);return{x:i.x-s.x,y:i.y-s.y}}function zh({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let s={x:null,y:null},i=0,a=new Map,l=!1,c={x:0,y:0},d=null,h=!1,u=null,f=!1,p=!1,m=null;function x({noDragClassName:C,handleSelector:g,domNode:y,isSelectable:N,nodeId:_,nodeClickDistance:I=0}){u=we(y);function S({x:z,y:H}){const{nodeLookup:b,nodeExtent:P,snapGrid:M,snapToGrid:A,nodeOrigin:O,onNodeDrag:$,onSelectionDrag:E,onError:D,updateNodePositions:j}=t();s={x:z,y:H};let B=!1;const F=a.size>1,Z=F&&P?jo(jt(a)):null,K=F&&A?Th({dragItems:a,snapGrid:M,x:z,y:H}):null;for(const[Y,V]of a){if(!b.has(Y))continue;let W={x:z-V.distance.x,y:H-V.distance.y};A&&(W=K?{x:Math.round(W.x+K.x),y:Math.round(W.y+K.y)}:Rt(W,M));let J=null;if(F&&P&&!V.extent&&Z){const{positionAbsolute:te}=V.internals,Q=te.x-Z.x+P[0][0],le=te.x+V.measured.width-Z.x2+P[1][0],he=te.y-Z.y+P[0][1],Ce=te.y+V.measured.height-Z.y2+P[1][1];J=[[Q,he],[le,Ce]]}const{position:oe,positionAbsolute:q}=qs({nodeId:Y,nextPosition:W,nodeLookup:b,nodeExtent:J||P,nodeOrigin:O,onError:D});B=B||V.position.x!==oe.x||V.position.y!==oe.y,V.position=oe,V.internals.positionAbsolute=q}if(p=p||B,!!B&&(j(a,!0),m&&(o||$||!_&&E))){const[Y,V]=Zo({nodeId:_,dragItems:a,nodeLookup:b});o?.(m,a,Y,V),$?.(m,Y,V),_||E?.(m,V)}}async function T(){if(!d)return;const{transform:z,panBy:H,autoPanSpeed:b,autoPanOnNodeDrag:P}=t();if(!P){l=!1,cancelAnimationFrame(i);return}const[M,A]=Js(c,d,b);(M!==0||A!==0)&&(s.x=(s.x??0)-M/z[2],s.y=(s.y??0)-A/z[2],await H({x:M,y:A})&&S(s)),i=requestAnimationFrame(T)}function R(z){const{nodeLookup:H,multiSelectionActive:b,nodesDraggable:P,transform:M,snapGrid:A,snapToGrid:O,selectNodesOnDrag:$,onNodeDragStart:E,onSelectionDragStart:D,unselectNodesAndEdges:j}=t();h=!0,(!$||!N)&&!b&&_&&(H.get(_)?.selected||j()),N&&$&&_&&e?.(_);const B=Ft(z.sourceEvent,{transform:M,snapGrid:A,snapToGrid:O,containerBounds:d});if(s=B,a=Dh(H,P,B,_),a.size>0&&(n||E||!_&&D)){const[F,Z]=Zo({nodeId:_,dragItems:a,nodeLookup:H});n?.(z.sourceEvent,a,F,Z),E?.(z.sourceEvent,F,Z),_||D?.(z.sourceEvent,Z)}}const L=fs().clickDistance(I).on("start",z=>{const{domNode:H,nodeDragThreshold:b,transform:P,snapGrid:M,snapToGrid:A}=t();d=H?.getBoundingClientRect()||null,f=!1,p=!1,m=z.sourceEvent,b===0&&R(z),s=Ft(z.sourceEvent,{transform:P,snapGrid:M,snapToGrid:A,containerBounds:d}),c=Ae(z.sourceEvent,d)}).on("drag",z=>{const{autoPanOnNodeDrag:H,transform:b,snapGrid:P,snapToGrid:M,nodeDragThreshold:A,nodeLookup:O}=t(),$=Ft(z.sourceEvent,{transform:b,snapGrid:P,snapToGrid:M,containerBounds:d});if(m=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!O.has(_))&&(f=!0),!f){if(!l&&H&&h&&(l=!0,T()),!h){const E=$.xSnapped-(s.x??0),D=$.ySnapped-(s.y??0);Math.sqrt(E*E+D*D)>A&&R(z)}(s.x!==$.xSnapped||s.y!==$.ySnapped)&&a&&h&&(c=Ae(z.sourceEvent,d),S($))}}).on("end",z=>{if(!(!h||f)&&(l=!1,h=!1,cancelAnimationFrame(i),a.size>0)){const{nodeLookup:H,updateNodePositions:b,onNodeDragStop:P,onSelectionDragStop:M}=t();if(p&&(b(a,!1),p=!1),r||P||!_&&M){const[A,O]=Zo({nodeId:_,dragItems:a,nodeLookup:H,dragging:!1});r?.(z.sourceEvent,a,A,O),P?.(z.sourceEvent,A,O),_||M?.(z.sourceEvent,O)}}}).filter(z=>{const H=z.target;return!z.button&&(!C||!Si(H,`.${C}`,y))&&(!g||Si(H,g,y))});u.call(L)}function w(){u?.on(".drag",null)}return{update:x,destroy:w}}function $h(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())Ht(r,dt(s))>0&&o.push(s);return o}const Lh=250;function jh(e,t,n,o){let r=[],s=1/0;const i=$h(e,n,t+Lh);for(const a of i){const l=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const c of l){if(o.nodeId===c.nodeId&&o.type===c.type&&o.id===c.id)continue;const{x:d,y:h}=Yt(a,c,c.position,!0),u=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));u>t||(u<s?(r=[{...c,x:d,y:h}],s=u):u===s&&r.push({...c,x:d,y:h}))}}if(!r.length)return null;if(r.length>1){const a=o.type==="source"?"target":"source";return r.find(l=>l.type===a)??r[0]}return r[0]}function Ci(e,t,n,o,r,s=!1){const i=o.get(e);if(!i)return null;const a=r==="strict"?i.internals.handleBounds?.[t]:[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]],l=(n?a?.find(c=>c.id===n):a?.[0])??null;return l&&s?{...l,...Yt(i,l,l.position,!0)}:l}function Ni(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Hh(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const ki=()=>!0;function Rh(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:s,isTarget:i,domNode:a,nodeLookup:l,lib:c,autoPanOnConnect:d,flowId:h,panBy:u,cancelConnection:f,onConnectStart:p,onConnect:m,onConnectEnd:x,isValidConnection:w=ki,onReconnectEnd:C,updateConnection:g,getTransform:y,getFromHandle:N,autoPanSpeed:_,dragThreshold:I=1,handleDomNode:S}){const T=ii(e.target);let R=0,L;const{x:z,y:H}=Ae(e),b=Ni(s,S),P=a?.getBoundingClientRect();let M=!1;if(!P||!b)return;const A=Ci(r,b,o,l,t);if(!A)return;let O=Ae(e,P),$=!1,E=null,D=!1,j=null;function B(){if(!d||!P)return;const[oe,q]=Js(O,P,_);u({x:oe,y:q}),R=requestAnimationFrame(B)}const F={...A,nodeId:r,type:b,position:A.position},Z=l.get(r);let Y={inProgress:!0,isValid:null,from:Yt(Z,F,U.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:Z,to:O,toHandle:null,toPosition:Gs[F.position],toNode:null};function V(){M=!0,g(Y),p?.(e,{nodeId:r,handleId:o,handleType:b})}I===0&&V();function W(oe){if(!M){const{x:le,y:he}=Ae(oe),Ce=le-z,bt=he-H;if(!(Ce*Ce+bt*bt>I*I))return;V()}if(!N()||!F){J(oe);return}const q=y();O=Ae(oe,P),L=jh(Vt(O,q,!1,[1,1]),n,l,F),$||(B(),$=!0);const te=Mi(oe,{handle:L,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:w,doc:T,lib:c,flowId:h,nodeLookup:l});j=te.handleDomNode,E=te.connection,D=Hh(!!L,te.isValid);const Q={...Y,isValid:D,to:te.toHandle&&D?Dn({x:te.toHandle.x,y:te.toHandle.y},q):O,toHandle:te.toHandle,toPosition:D&&te.toHandle?te.toHandle.position:Gs[F.position],toNode:te.toHandle?l.get(te.toHandle.nodeId):null};D&&L&&Y.toHandle&&Q.toHandle&&Y.toHandle.type===Q.toHandle.type&&Y.toHandle.nodeId===Q.toHandle.nodeId&&Y.toHandle.id===Q.toHandle.id&&Y.to.x===Q.to.x&&Y.to.y===Q.to.y||(g(Q),Y=Q)}function J(oe){if(M){(L||j)&&E&&D&&m?.(E);const{inProgress:q,...te}=Y,Q={...te,toPosition:Y.toHandle?Y.toPosition:null};x?.(oe,Q),s&&C?.(oe,Q)}f(),cancelAnimationFrame(R),$=!1,D=!1,E=null,j=null,T.removeEventListener("mousemove",W),T.removeEventListener("mouseup",J),T.removeEventListener("touchmove",W),T.removeEventListener("touchend",J)}T.addEventListener("mousemove",W),T.addEventListener("mouseup",J),T.addEventListener("touchmove",W),T.addEventListener("touchend",J)}function Mi(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:s,doc:i,lib:a,flowId:l,isValidConnection:c=ki,nodeLookup:d}){const h=s==="target",u=t?i.querySelector(`.${a}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:f,y:p}=Ae(e),m=i.elementFromPoint(f,p),x=m?.classList.contains(`${a}-flow__handle`)?m:u,w={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const C=Ni(void 0,x),g=x.getAttribute("data-nodeid"),y=x.getAttribute("data-handleid"),N=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!g||!C)return w;const I={source:h?g:o,sourceHandle:h?y:r,target:h?o:g,targetHandle:h?r:y};w.connection=I;const T=N&&_&&(n===lt.Strict?h&&C==="source"||!h&&C==="target":g!==o||y!==r);w.isValid=T&&c(I),w.toHandle=Ci(g,C,y,d,n,!0)}return w}const Uo={onPointerDown:Rh,isValid:Mi};function Vh({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=we(e);function s({translateExtent:a,width:l,height:c,zoomStep:d=1,pannable:h=!0,zoomable:u=!0,inversePan:f=!1}){const p=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const y=n(),N=g.sourceEvent.ctrlKey&&Bt()?10:1,_=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*d,I=y[2]*Math.pow(2,_*N);t.scaleTo(I)};let m=[0,0];const x=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(m=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},w=g=>{const y=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const N=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],_=[N[0]-m[0],N[1]-m[1]];m=N;const I=o()*Math.max(y[2],Math.log(y[2]))*(f?-1:1),S={x:y[0]-_[0]*I,y:y[1]-_[1]*I},T=[[0,0],[l,c]];t.setViewportConstrained({x:S.x,y:S.y,zoom:y[2]},T,a)},C=Bs().on("start",x).on("zoom",h?w:null).on("zoom.wheel",u?p:null);r.call(C,{})}function i(){r.on("zoom",null)}return{update:s,destroy:i,pointer:ve}}const Bh=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,$n=e=>({x:e.x,y:e.y,zoom:e.k}),qo=({x:e,y:t,zoom:n})=>Mn.translate(e,t).scale(n),pt=(e,t)=>e.target.closest(`.${t}`),Ai=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Fh=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ko=(e,t=0,n=Fh,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},Pi=e=>{const t=e.ctrlKey&&Bt()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Yh({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}){return d=>{if(pt(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&i){const x=ve(d),w=Pi(d),C=h*Math.pow(2,w);o.scaleTo(n,C,x,d);return}const u=d.deltaMode===1?20:1;let f=r===Ge.Vertical?0:d.deltaX*u,p=r===Ge.Horizontal?0:d.deltaY*u;!Bt()&&d.shiftKey&&r!==Ge.Vertical&&(f=d.deltaY*u,p=0),o.translateBy(n,-(f/h)*s,-(p/h)*s,{internal:!0});const m=$n(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a?.(d,m)),e.isPanScrolling&&(l?.(d,m),e.panScrollTimeout=setTimeout(()=>{c?.(d,m),e.isPanScrolling=!1},150))}}function Wh({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const s=o.type==="wheel",i=!t&&s&&!o.ctrlKey,a=pt(o,e);if(o.ctrlKey&&s&&a&&o.preventDefault(),i||a)return null;o.preventDefault(),n.call(this,o,r)}}function Gh({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=$n(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 Xh({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return s=>{e.usedRightMouseButton=!!(n&&Ai(t,e.mouseButton??0)),s.sourceEvent?.sync||o([s.transform.x,s.transform.y,s.transform.k]),r&&!s.sourceEvent?.internal&&r?.(s.sourceEvent,$n(s.transform))}}function Zh({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:s}){return i=>{if(!i.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,s&&Ai(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r&&Bh(e.prevViewport,i.transform))){const a=$n(i.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(i.sourceEvent,a)},n?150:0)}}}function Uh({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:i,noWheelClassName:a,noPanClassName:l,lib:c}){return d=>{const h=e||t,u=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&(pt(d,`${c}-flow__node`)||pt(d,`${c}-flow__edge`)))return!0;if(!o&&!h&&!r&&!s&&!n||i||pt(d,a)&&d.type==="wheel"||pt(d,l)&&(d.type!=="wheel"||r&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!h&&!r&&!u&&d.type==="wheel"||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;const f=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&f}}function qh({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:o,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),u=Bs().clickDistance(!Se(o)||o<0?0:o).scaleExtent([t,n]).translateExtent(r),f=we(e).call(u);g({x:s.x,y:s.y,zoom:ut(s.zoom,t,n)},[[0,0],[h.width,h.height]],r);const p=f.on("wheel.zoom"),m=f.on("dblclick.zoom");u.wheelDelta(Pi);function x(z,H){return f?new Promise(b=>{u?.interpolate(H?.interpolate==="linear"?Pt:xn).transform(Ko(f,H?.duration,H?.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function w({noWheelClassName:z,noPanClassName:H,onPaneContextMenu:b,userSelectionActive:P,panOnScroll:M,panOnDrag:A,panOnScrollMode:O,panOnScrollSpeed:$,preventScrolling:E,zoomOnPinch:D,zoomOnScroll:j,zoomOnDoubleClick:B,zoomActivationKeyPressed:F,lib:Z,onTransformChange:K}){P&&!d.isZoomingOrPanning&&C();const V=M&&!F&&!P?Yh({zoomPanValues:d,noWheelClassName:z,d3Selection:f,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:$,zoomOnPinch:D,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:l}):Wh({noWheelClassName:z,preventScrolling:E,d3ZoomHandler:p});if(f.on("wheel.zoom",V,{passive:!1}),!P){const J=Gh({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:a});u.on("start",J);const oe=Xh({zoomPanValues:d,panOnDrag:A,onPaneContextMenu:!!b,onPanZoom:i,onTransformChange:K});u.on("zoom",oe);const q=Zh({zoomPanValues:d,panOnDrag:A,panOnScroll:M,onPaneContextMenu:b,onPanZoomEnd:l,onDraggingChange:c});u.on("end",q)}const W=Uh({zoomActivationKeyPressed:F,panOnDrag:A,zoomOnScroll:j,panOnScroll:M,zoomOnDoubleClick:B,zoomOnPinch:D,userSelectionActive:P,noPanClassName:H,noWheelClassName:z,lib:Z});u.filter(W),B?f.on("dblclick.zoom",m):f.on("dblclick.zoom",null)}function C(){u.on("zoom",null)}async function g(z,H,b){const P=qo(z),M=u?.constrain()(P,H,b);return M&&await x(M),new Promise(A=>A(M))}async function y(z,H){const b=qo(z);return await x(b,H),new Promise(P=>P(b))}function N(z){if(f){const H=qo(z),b=f.property("__zoom");(b.k!==z.zoom||b.x!==z.x||b.y!==z.y)&&u?.transform(f,H,null,{sync:!0})}}function _(){const z=f?Rs(f.node()):{x:0,y:0,k:1};return{x:z.x,y:z.y,zoom:z.k}}function I(z,H){return f?new Promise(b=>{u?.interpolate(H?.interpolate==="linear"?Pt:xn).scaleTo(Ko(f,H?.duration,H?.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function S(z,H){return f?new Promise(b=>{u?.interpolate(H?.interpolate==="linear"?Pt:xn).scaleBy(Ko(f,H?.duration,H?.ease,()=>b(!0)),z)}):Promise.resolve(!1)}function T(z){u?.scaleExtent(z)}function R(z){u?.translateExtent(z)}function L(z){const H=!Se(z)||z<0?0:z;u?.clickDistance(H)}return{update:w,destroy:C,setViewport:y,setViewportConstrained:g,getViewport:_,scaleTo:I,scaleBy:S,setScaleExtent:T,setTranslateExtent:R,syncViewport:N,setClickDistance:L}}var Ze;(function(e){e.Line="line",e.Handle="handle"})(Ze||(Ze={}));function Kh({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:s}){const i=e-t,a=n-o,l=[i>0?1:i<0?-1:0,a>0?1:a<0?-1:0];return i&&r&&(l[0]=l[0]*-1),a&&s&&(l[1]=l[1]*-1),l}function Qh(e){const 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 Le(e,t){return Math.max(0,t-e)}function je(e,t){return Math.max(0,e-t)}function Ln(e,t,n){return Math.max(0,t-e,e-n)}function Ii(e,t){return e?!t:t}function Jh(e,t,n,o,r,s,i,a){let{affectsX:l,affectsY:c}=t;const{isHorizontal:d,isVertical:h}=t,u=d&&h,{xSnapped:f,ySnapped:p}=n,{minWidth:m,maxWidth:x,minHeight:w,maxHeight:C}=o,{x:g,y,width:N,height:_,aspectRatio:I}=e;let S=Math.floor(d?f-e.pointerX:0),T=Math.floor(h?p-e.pointerY:0);const R=N+(l?-S:S),L=_+(c?-T:T),z=-s[0]*N,H=-s[1]*_;let b=Ln(R,m,x),P=Ln(L,w,C);if(i){let O=0,$=0;l&&S<0?O=Le(g+S+z,i[0][0]):!l&&S>0&&(O=je(g+R+z,i[1][0])),c&&T<0?$=Le(y+T+H,i[0][1]):!c&&T>0&&($=je(y+L+H,i[1][1])),b=Math.max(b,O),P=Math.max(P,$)}if(a){let O=0,$=0;l&&S>0?O=je(g+S,a[0][0]):!l&&S<0&&(O=Le(g+R,a[1][0])),c&&T>0?$=je(y+T,a[0][1]):!c&&T<0&&($=Le(y+L,a[1][1])),b=Math.max(b,O),P=Math.max(P,$)}if(r){if(d){const O=Ln(R/I,w,C)*I;if(b=Math.max(b,O),i){let $=0;!l&&!c||l&&!c&&u?$=je(y+H+R/I,i[1][1])*I:$=Le(y+H+(l?S:-S)/I,i[0][1])*I,b=Math.max(b,$)}if(a){let $=0;!l&&!c||l&&!c&&u?$=Le(y+R/I,a[1][1])*I:$=je(y+(l?S:-S)/I,a[0][1])*I,b=Math.max(b,$)}}if(h){const O=Ln(L*I,m,x)/I;if(P=Math.max(P,O),i){let $=0;!l&&!c||c&&!l&&u?$=je(g+L*I+z,i[1][0])/I:$=Le(g+(c?T:-T)*I+z,i[0][0])/I,P=Math.max(P,$)}if(a){let $=0;!l&&!c||c&&!l&&u?$=Le(g+L*I,a[1][0])/I:$=je(g+(c?T:-T)*I,a[0][0])/I,P=Math.max(P,$)}}}T=T+(T<0?P:-P),S=S+(S<0?b:-b),r&&(u?R>L*I?T=(Ii(l,c)?-S:S)/I:S=(Ii(l,c)?-T:T)*I:d?(T=S/I,c=l):(S=T*I,l=c));const M=l?g+S:g,A=c?y+T:y;return{width:N+(l?-S:S),height:_+(c?-T:T),x:s[0]*S*(l?-1:1)+M,y:s[1]*T*(c?-1:1)+A}}const Oi={width:0,height:0,x:0,y:0},ep={...Oi,pointerX:0,pointerY:0,aspectRatio:1};function tp(e){return[[0,0],[e.measured.width,e.measured.height]]}function np(e,t,n){const 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,l=n[1]*i;return[[o-a,r-l],[o+s-a,r+i-l]]}function op({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const s=we(e);function i({controlPosition:l,boundaries:c,keepAspectRatio:d,resizeDirection:h,onResizeStart:u,onResize:f,onResizeEnd:p,shouldResize:m}){let x={...Oi},w={...ep};const C=Qh(l);let g,y=null,N=[],_,I,S;const T=fs().on("start",R=>{const{nodeLookup:L,transform:z,snapGrid:H,snapToGrid:b,nodeOrigin:P,paneDomNode:M}=n();if(g=L.get(t),!g)return;y=M?.getBoundingClientRect()??null;const{xSnapped:A,ySnapped:O}=Ft(R.sourceEvent,{transform:z,snapGrid:H,snapToGrid:b,containerBounds:y});x={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},w={...x,pointerX:A,pointerY:O,aspectRatio:x.width/x.height},_=void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(_=L.get(g.parentId),I=_&&g.extent==="parent"?tp(_):void 0),N=[],S=void 0;for(const[$,E]of L)if(E.parentId===t&&(N.push({id:$,position:{...E.position},extent:E.extent}),E.extent==="parent"||E.expandParent)){const D=np(E,g,E.origin??P);S?S=[[Math.min(D[0][0],S[0][0]),Math.min(D[0][1],S[0][1])],[Math.max(D[1][0],S[1][0]),Math.max(D[1][1],S[1][1])]]:S=D}u?.(R,{...x})}).on("drag",R=>{const{transform:L,snapGrid:z,snapToGrid:H,nodeOrigin:b}=n(),P=Ft(R.sourceEvent,{transform:L,snapGrid:z,snapToGrid:H,containerBounds:y}),M=[];if(!g)return;const{x:A,y:O,width:$,height:E}=x,D={},j=g.origin??b,{width:B,height:F,x:Z,y:K}=Jh(w,C,P,c,d,j,I,S),Y=B!==$,V=F!==E,W=Z!==A&&Y,J=K!==O&&V;if(!W&&!J&&!Y&&!V)return;if((W||J||j[0]===1||j[1]===1)&&(D.x=W?Z:x.x,D.y=J?K:x.y,x.x=D.x,x.y=D.y,N.length>0)){const Q=Z-A,le=K-O;for(const he of N)he.position={x:he.position.x-Q+j[0]*(B-$),y:he.position.y-le+j[1]*(F-E)},M.push(he)}if((Y||V)&&(D.width=Y&&(!h||h==="horizontal")?B:x.width,D.height=V&&(!h||h==="vertical")?F:x.height,x.width=D.width,x.height=D.height),_&&g.expandParent){const Q=j[0]*(D.width??0);D.x&&D.x<Q&&(x.x=Q,w.x=w.x-(D.x-Q));const le=j[1]*(D.height??0);D.y&&D.y<le&&(x.y=le,w.y=w.y-(D.y-le))}const oe=Kh({width:x.width,prevWidth:$,height:x.height,prevHeight:E,affectsX:C.affectsX,affectsY:C.affectsY}),q={...x,direction:oe};m?.(R,q)!==!1&&(f?.(R,q),o(D,M))}).on("end",R=>{p?.(R,{...x}),r?.({...x})});s.call(T)}function a(){s.on(".drag",null)}return{update:i,destroy:a}}var jn={exports:{}},Qo={},Hn={exports:{}},Jo={};/**
|
|
23
|
+
* @license React
|
|
24
|
+
* use-sync-external-store-shim.production.js
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/var Di;function rp(){if(Di)return Jo;Di=1;var e=k;function t(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(h,u){var f=u(),p=o({inst:{value:f,getSnapshot:u}}),m=p[0].inst,x=p[1];return s(function(){m.value=f,m.getSnapshot=u,l(m)&&x({inst:m})},[h,f,u]),r(function(){return l(m)&&x({inst:m}),h(function(){l(m)&&x({inst:m})})},[h]),i(f),f}function l(h){var u=h.getSnapshot;h=h.value;try{var f=u();return!n(h,f)}catch{return!0}}function c(h,u){return u()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Jo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Jo}var er={};/**
|
|
31
|
+
* @license React
|
|
32
|
+
* use-sync-external-store-shim.development.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/var Ti;function sp(){return Ti||(Ti=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!h){var x=p();s(m,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}x=i({inst:{value:m,getSnapshot:p}});var w=x[0].inst,C=x[1];return l(function(){w.value=m,w.getSnapshot=p,n(w)&&C({inst:w})},[f,m,p]),a(function(){return n(w)&&C({inst:w}),f(function(){n(w)&&C({inst:w})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function o(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=k,s=typeof Object.is=="function"?Object.is:e,i=r.useState,a=r.useEffect,l=r.useLayoutEffect,c=r.useDebugValue,d=!1,h=!1,u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;er.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),er}var zi;function $i(){return zi||(zi=1,process.env.NODE_ENV==="production"?Hn.exports=rp():Hn.exports=sp()),Hn.exports}/**
|
|
39
|
+
* @license React
|
|
40
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/var Li;function ip(){if(Li)return Qo;Li=1;var e=k,t=$i();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Qo.useSyncExternalStoreWithSelector=function(c,d,h,u,f){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function w(_){if(!C){if(C=!0,g=_,_=u(_),f!==void 0&&m.hasValue){var I=m.value;if(f(I,_))return y=I}return y=_}if(I=y,o(g,_))return I;var S=u(_);return f!==void 0&&f(I,S)?(g=_,I):(g=_,y=S)}var C=!1,g,y,N=h===void 0?null:h;return[function(){return w(d())},N===null?void 0:function(){return w(N())}]},[d,h,u,f]);var x=r(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=x},[x]),l(x),x},Qo}var tr={};/**
|
|
47
|
+
* @license React
|
|
48
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
49
|
+
*
|
|
50
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the MIT license found in the
|
|
53
|
+
* LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/var ji;function ap(){return ji||(ji=1,process.env.NODE_ENV!=="production"&&function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=$i(),o=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;tr.useSyncExternalStoreWithSelector=function(c,d,h,u,f){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function w(_){if(!C){if(C=!0,g=_,_=u(_),f!==void 0&&m.hasValue){var I=m.value;if(f(I,_))return y=I}return y=_}if(I=y,o(g,_))return I;var S=u(_);return f!==void 0&&f(I,S)?(g=_,I):(g=_,y=S)}var C=!1,g,y,N=h===void 0?null:h;return[function(){return w(d())},N===null?void 0:function(){return w(N())}]},[d,h,u,f]);var x=r(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=x},[x]),l(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),tr}var Hi;function lp(){return Hi||(Hi=1,process.env.NODE_ENV==="production"?jn.exports=ip():jn.exports=ap()),jn.exports}var cp=lp();const up=Pl(cp),dp={},Ri=e=>{let t;const n=new Set,o=(d,h)=>{const u=typeof d=="function"?d(t):d;if(!Object.is(u,t)){const f=t;t=h??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(p=>p(t,f))}},r=()=>t,l={setState:o,getState:r,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(dp?"production":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()}},c=t=e(o,r,l);return l},fp=e=>e?Ri(e):Ri,{useDebugValue:hp}=k,{useSyncExternalStoreWithSelector:pp}=up,gp=e=>e;function Vi(e,t=gp,n){const o=pp(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return hp(o),o}const Bi=(e,t)=>{const n=fp(e),o=(r,s=t)=>Vi(n,r,s);return Object.assign(o,n),o},mp=(e,t)=>e?Bi(e,t):Bi;function ce(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(const[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(const o of e)if(!t.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}const Rn=k.createContext(null),yp=Rn.Provider,Fi=me.error001();function ne(e,t){const n=k.useContext(Rn);if(n===null)throw new Error(Fi);return Vi(n,e,t)}function ie(){const e=k.useContext(Rn);if(e===null)throw new Error(Fi);return k.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Yi={display:"none"},xp={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Wi="react-flow__node-desc",Gi="react-flow__edge-desc",wp="react-flow__aria-live",bp=e=>e.ariaLiveMessage,vp=e=>e.ariaLabelConfig;function _p({rfId:e}){const t=ne(bp);return v.jsx("div",{id:`${wp}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:xp,children:t})}function Ep({rfId:e,disableKeyboardA11y:t}){const n=ne(vp);return v.jsxs(v.Fragment,{children:[v.jsx("div",{id:`${Wi}-${e}`,style:Yi,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),v.jsx("div",{id:`${Gi}-${e}`,style:Yi,children:n["edge.a11yDescription.default"]}),!t&&v.jsx(_p,{rfId:e})]})}const Vn=k.forwardRef(({position:e="top-left",children:t,className:n,style:o,...r},s)=>{const i=`${e}`.split("-");return v.jsx("div",{className:ue(["react-flow__panel",n,...i]),style:o,ref:s,...r,children:t})});Vn.displayName="Panel";function Sp({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:v.jsx(Vn,{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:v.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Cp=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Bn=e=>e.id;function Np(e,t){return ce(e.selectedNodes.map(Bn),t.selectedNodes.map(Bn))&&ce(e.selectedEdges.map(Bn),t.selectedEdges.map(Bn))}function kp({onSelectionChange:e}){const t=ie(),{selectedNodes:n,selectedEdges:o}=ne(Cp,Np);return k.useEffect(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,o,e]),null}const Mp=e=>!!e.onSelectionChangeHandlers;function Ap({onSelectionChange:e}){const t=ne(Mp);return e||t?v.jsx(kp,{onSelectionChange:e}):null}const Xi=[0,0],Pp={x:0,y:0,zoom:1},Zi=[...["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","paneClickDistance","ariaLabelConfig"],"rfId"],Ip=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,setPaneClickDistance:e.setPaneClickDistance}),Ui={translateExtent:$t,nodeOrigin:Xi,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Op(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:i,reset:a,setDefaultNodesAndEdges:l,setPaneClickDistance:c}=ne(Ip,ce),d=ie();k.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{h.current=Ui,a()}),[]);const h=k.useRef(Ui);return k.useEffect(()=>{for(const u of Zi){const f=e[u],p=h.current[u];f!==p&&(typeof e[u]>"u"||(u==="nodes"?t(f):u==="edges"?n(f):u==="minZoom"?o(f):u==="maxZoom"?r(f):u==="translateExtent"?s(f):u==="nodeExtent"?i(f):u==="paneClickDistance"?c(f):u==="ariaLabelConfig"?d.setState({ariaLabelConfig:gh(f)}):u==="fitView"?d.setState({fitViewQueued:f}):u==="fitViewOptions"?d.setState({fitViewOptions:f}):d.setState({[u]:f})))}h.current=e},Zi.map(u=>e[u])),null}function qi(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Dp(e){const[t,n]=k.useState(e==="system"?null:e);return k.useEffect(()=>{if(e!=="system"){n(e);return}const o=qi(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:qi()?.matches?"dark":"light"}const Ki=typeof document<"u"?document:null;function Wt(e=null,t={target:Ki,actInsideInputWithModifier:!0}){const[n,o]=k.useState(!1),r=k.useRef(!1),s=k.useRef(new Set([])),[i,a]=k.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
|
|
55
|
+
`).replace(`
|
|
56
|
+
|
|
57
|
+
`,`
|
|
58
|
+
+`).split(`
|
|
59
|
+
`)),d=c.reduce((h,u)=>h.concat(...u),[]);return[c,d]}return[[],[]]},[e]);return k.useEffect(()=>{const l=t?.target??Ki,c=t?.actInsideInputWithModifier??!0;if(e!==null){const d=f=>{if(r.current=f.ctrlKey||f.metaKey||f.shiftKey||f.altKey,(!r.current||r.current&&!c)&&ai(f))return!1;const m=Ji(f.code,a);if(s.current.add(f[m]),Qi(i,s.current,!1)){const x=f.composedPath?.()?.[0]||f.target,w=x?.nodeName==="BUTTON"||x?.nodeName==="A";t.preventDefault!==!1&&(r.current||!w)&&f.preventDefault(),o(!0)}},h=f=>{const p=Ji(f.code,a);Qi(i,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(f[p]),f.key==="Meta"&&s.current.clear(),r.current=!1},u=()=>{s.current.clear(),o(!1)};return l?.addEventListener("keydown",d),l?.addEventListener("keyup",h),window.addEventListener("blur",u),window.addEventListener("contextmenu",u),()=>{l?.removeEventListener("keydown",d),l?.removeEventListener("keyup",h),window.removeEventListener("blur",u),window.removeEventListener("contextmenu",u)}}},[e,o]),n}function Qi(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function Ji(e,t){return t.includes(e)?"code":"key"}const Tp=()=>{const e=ie();return k.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,s],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??s},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:s,maxZoom:i,panZoom:a}=e.getState(),l=Ho(t,o,r,s,i,n?.padding??.1);return a?(await a.setViewport(l,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:s,domNode:i}=e.getState();if(!i)return t;const{x:a,y:l}=i.getBoundingClientRect(),c={x:t.x-a,y:t.y-l},d=n.snapGrid??r,h=n.snapToGrid??s;return Vt(c,o,h,d)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:s}=o.getBoundingClientRect(),i=Dn(t,n);return{x:i.x+r,y:i.y+s}}}),[])};function ea(e,t){const n=[],o=new Map,r=[];for(const s of e)if(s.type==="add"){r.push(s);continue}else if(s.type==="remove"||s.type==="replace")o.set(s.id,[s]);else{const i=o.get(s.id);i?i.push(s):o.set(s.id,[s])}for(const s of t){const i=o.get(s.id);if(!i){n.push(s);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const a={...s};for(const l of i)zp(l,a);n.push(a)}return r.length&&r.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function zp(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ta(e,t){return ea(e,t)}function na(e,t){return ea(e,t)}function Ue(e,t){return{id:e,type:"select",selected:t}}function gt(e,t=new Set,n=!1){const o=[];for(const[r,s]of e){const i=t.has(r);!(s.selected===void 0&&!i)&&s.selected!==i&&(n&&(s.selected=i),o.push(Ue(s.id,i)))}return o}function oa({items:e=[],lookup:t}){const n=[],o=new Map(e.map(r=>[r.id,r]));for(const[r,s]of e.entries()){const i=t.get(s.id),a=i?.internals?.userNode??i;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:r})}for(const[r]of t)o.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function ra(e){return{id:e.id,type:"remove"}}const sa=e=>ih(e),$p=e=>Us(e);function ia(e){return k.forwardRef(e)}const Lp=typeof window<"u"?k.useLayoutEffect:k.useEffect;function aa(e){const[t,n]=k.useState(BigInt(0)),[o]=k.useState(()=>jp(()=>n(r=>r+BigInt(1))));return Lp(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function jp(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const la=k.createContext(null);function Hp({children:e}){const t=ie(),n=k.useCallback(a=>{const{nodes:l=[],setNodes:c,hasDefaultNodes:d,onNodesChange:h,nodeLookup:u,fitViewQueued:f}=t.getState();let p=l;for(const x of a)p=typeof x=="function"?x(p):x;const m=oa({items:p,lookup:u});d&&c(p),m.length>0?h?.(m):f&&window.requestAnimationFrame(()=>{const{fitViewQueued:x,nodes:w,setNodes:C}=t.getState();x&&C(w)})},[]),o=aa(n),r=k.useCallback(a=>{const{edges:l=[],setEdges:c,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:u}=t.getState();let f=l;for(const p of a)f=typeof p=="function"?p(f):p;d?c(f):h&&h(oa({items:f,lookup:u}))},[]),s=aa(r),i=k.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return v.jsx(la.Provider,{value:i,children:e})}function Rp(){const e=k.useContext(la);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Vp=e=>!!e.panZoom;function mt(){const e=Tp(),t=ie(),n=Rp(),o=ne(Vp),r=k.useMemo(()=>{const s=h=>t.getState().nodeLookup.get(h),i=h=>{n.nodeQueue.push(h)},a=h=>{n.edgeQueue.push(h)},l=h=>{const{nodeLookup:u,nodeOrigin:f}=t.getState(),p=sa(h)?h:u.get(h.id),m=p.parentId?ri(p.position,p.measured,p.parentId,u,f):p.position,x={...p,position:m,width:p.measured?.width??p.width,height:p.measured?.height??p.height};return dt(x)},c=(h,u,f={replace:!1})=>{i(p=>p.map(m=>{if(m.id===h){const x=typeof u=="function"?u(m):u;return f.replace&&sa(x)?x:{...m,...x}}return m}))},d=(h,u,f={replace:!1})=>{a(p=>p.map(m=>{if(m.id===h){const x=typeof u=="function"?u(m):u;return f.replace&&$p(x)?x:{...m,...x}}return m}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>s(h)?.internals.userNode,getInternalNode:s,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(u=>({...u}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:i,setEdges:a,addNodes:h=>{const u=Array.isArray(h)?h:[h];n.nodeQueue.push(f=>[...f,...u])},addEdges:h=>{const u=Array.isArray(h)?h:[h];n.edgeQueue.push(f=>[...f,...u])},toObject:()=>{const{nodes:h=[],edges:u=[],transform:f}=t.getState(),[p,m,x]=f;return{nodes:h.map(w=>({...w})),edges:u.map(w=>({...w})),viewport:{x:p,y:m,zoom:x}}},deleteElements:async({nodes:h=[],edges:u=[]})=>{const{nodes:f,edges:p,onNodesDelete:m,onEdgesDelete:x,triggerNodeChanges:w,triggerEdgeChanges:C,onDelete:g,onBeforeDelete:y}=t.getState(),{nodes:N,edges:_}=await dh({nodesToRemove:h,edgesToRemove:u,nodes:f,edges:p,onBeforeDelete:y}),I=_.length>0,S=N.length>0;if(I){const T=_.map(ra);x?.(_),C(T)}if(S){const T=N.map(ra);m?.(N),w(T)}return(S||I)&&g?.({nodes:N,edges:_}),{deletedNodes:N,deletedEdges:_}},getIntersectingNodes:(h,u=!0,f)=>{const p=ti(h),m=p?h:l(h),x=f!==void 0;return m?(f||t.getState().nodes).filter(w=>{const C=t.getState().nodeLookup.get(w.id);if(C&&!p&&(w.id===h.id||!C.internals.positionAbsolute))return!1;const g=dt(x?w:C),y=Ht(g,m);return u&&y>0||y>=g.width*g.height||y>=m.width*m.height}):[]},isNodeIntersecting:(h,u,f=!0)=>{const m=ti(h)?h:l(h);if(!m)return!1;const x=Ht(m,u);return f&&x>0||x>=m.width*m.height},updateNode:c,updateNodeData:(h,u,f={replace:!1})=>{c(h,p=>{const m=typeof u=="function"?u(p):u;return f.replace?{...p,data:m}:{...p,data:{...p.data,...m}}},f)},updateEdge:d,updateEdgeData:(h,u,f={replace:!1})=>{d(h,p=>{const m=typeof u=="function"?u(p):u;return f.replace?{...p,data:m}:{...p,data:{...p.data,...m}}},f)},getNodesBounds:h=>{const{nodeLookup:u,nodeOrigin:f}=t.getState();return ah(h,{nodeLookup:u,nodeOrigin:f})},getHandleConnections:({type:h,id:u,nodeId:f})=>Array.from(t.getState().connectionLookup.get(`${f}-${h}${u?`-${u}`:""}`)?.values()??[]),getNodeConnections:({type:h,handleId:u,nodeId:f})=>Array.from(t.getState().connectionLookup.get(`${f}${h?u?`-${h}-${u}`:`-${h}`:""}`)?.values()??[]),fitView:async h=>{const u=t.getState().fitViewResolver??ph();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:u}),n.nodeQueue.push(f=>[...f]),u.promise}}},[]);return k.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const ca=e=>e.selected,Bp=typeof window<"u"?window:void 0;function Fp({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ie(),{deleteElements:o}=mt(),r=Wt(e,{actInsideInputWithModifier:!1}),s=Wt(t,{target:Bp});k.useEffect(()=>{if(r){const{edges:i,nodes:a}=n.getState();o({nodes:a.filter(ca),edges:i.filter(ca)}),n.setState({nodesSelectionActive:!1})}},[r]),k.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function Yp(e){const t=ie();k.useEffect(()=>{const n=()=>{if(!e.current)return!1;const o=Ro(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",me.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const Fn={position:"absolute",width:"100%",height:"100%",top:0,left:0},Wp=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function Gp({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:s=Ge.Free,zoomOnDoubleClick:i=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:c,minZoom:d,maxZoom:h,zoomActivationKeyCode:u,preventScrolling:f=!0,children:p,noWheelClassName:m,noPanClassName:x,onViewportChange:w,isControlledViewport:C,paneClickDistance:g}){const y=ie(),N=k.useRef(null),{userSelectionActive:_,lib:I}=ne(Wp,ce),S=Wt(u),T=k.useRef();Yp(N);const R=k.useCallback(L=>{w?.({x:L[0],y:L[1],zoom:L[2]}),C||y.setState({transform:L})},[w,C]);return k.useEffect(()=>{if(N.current){T.current=qh({domNode:N.current,minZoom:d,maxZoom:h,translateExtent:c,viewport:l,paneClickDistance:g,onDraggingChange:b=>y.setState({paneDragging:b}),onPanZoomStart:(b,P)=>{const{onViewportChangeStart:M,onMoveStart:A}=y.getState();A?.(b,P),M?.(P)},onPanZoom:(b,P)=>{const{onViewportChange:M,onMove:A}=y.getState();A?.(b,P),M?.(P)},onPanZoomEnd:(b,P)=>{const{onViewportChangeEnd:M,onMoveEnd:A}=y.getState();A?.(b,P),M?.(P)}});const{x:L,y:z,zoom:H}=T.current.getViewport();return y.setState({panZoom:T.current,transform:[L,z,H],domNode:N.current.closest(".react-flow")}),()=>{T.current?.destroy()}}},[]),k.useEffect(()=>{T.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:s,zoomOnDoubleClick:i,panOnDrag:a,zoomActivationKeyPressed:S,preventScrolling:f,noPanClassName:x,userSelectionActive:_,noWheelClassName:m,lib:I,onTransformChange:R})},[e,t,n,o,r,s,i,a,S,f,x,_,m,I,R]),v.jsx("div",{className:"react-flow__renderer",ref:N,style:Fn,children:p})}const Xp=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Zp(){const{userSelectionActive:e,userSelectionRect:t}=ne(Xp,ce);return e&&t?v.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const nr=(e,t)=>n=>{n.target===t.current&&e?.(n)},Up=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function qp({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ct.Full,panOnDrag:o,selectionOnDrag:r,onSelectionStart:s,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:l,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:h,onPaneMouseLeave:u,children:f}){const p=ie(),{userSelectionActive:m,elementsSelectable:x,dragging:w,connectionInProgress:C}=ne(Up,ce),g=x&&(e||m),y=k.useRef(null),N=k.useRef(),_=k.useRef(new Set),I=k.useRef(new Set),S=k.useRef(!1),T=k.useRef(!1),R=A=>{if(S.current||C){S.current=!1;return}a?.(A),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},L=A=>{if(Array.isArray(o)&&o?.includes(2)){A.preventDefault();return}l?.(A)},z=c?A=>c(A):void 0,H=A=>{const{resetSelectedElements:O,domNode:$}=p.getState();if(N.current=$?.getBoundingClientRect(),!x||!e||A.button!==0||A.target!==y.current||!N.current)return;A.target?.setPointerCapture?.(A.pointerId),T.current=!0,S.current=!1;const{x:E,y:D}=Ae(A.nativeEvent,N.current);O(),p.setState({userSelectionRect:{width:0,height:0,startX:E,startY:D,x:E,y:D}}),s?.(A)},b=A=>{const{userSelectionRect:O,transform:$,nodeLookup:E,edgeLookup:D,connectionLookup:j,triggerNodeChanges:B,triggerEdgeChanges:F,defaultEdgeOptions:Z}=p.getState();if(!N.current||!O)return;S.current=!0;const{x:K,y:Y}=Ae(A.nativeEvent,N.current),{startX:V,startY:W}=O,J={startX:V,startY:W,x:K<V?K:V,y:Y<W?Y:W,width:Math.abs(K-V),height:Math.abs(Y-W)},oe=_.current,q=I.current;_.current=new Set(Lo(E,J,$,n===ct.Partial,!0).map(Q=>Q.id)),I.current=new Set;const te=Z?.selectable??!0;for(const Q of _.current){const le=j.get(Q);if(le)for(const{edgeId:he}of le.values()){const Ce=D.get(he);Ce&&(Ce.selectable??te)&&I.current.add(he)}}if(!si(oe,_.current)){const Q=gt(E,_.current,!0);B(Q)}if(!si(q,I.current)){const Q=gt(D,I.current);F(Q)}p.setState({userSelectionRect:J,userSelectionActive:!0,nodesSelectionActive:!1})},P=A=>{if(A.button!==0||!T.current)return;A.target?.releasePointerCapture?.(A.pointerId);const{userSelectionRect:O}=p.getState();!m&&O&&A.target===y.current&&R?.(A),p.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:_.current.size>0}),i?.(A),(t||r)&&(S.current=!1),T.current=!1},M=o===!0||Array.isArray(o)&&o.includes(0);return v.jsxs("div",{className:ue(["react-flow__pane",{draggable:M,dragging:w,selection:e}]),onClick:g?void 0:nr(R,y),onContextMenu:nr(L,y),onWheel:nr(z,y),onPointerEnter:g?void 0:d,onPointerDown:g?H:h,onPointerMove:g?b:h,onPointerUp:g?P:void 0,onPointerLeave:u,ref:y,style:Fn,children:[f,v.jsx(Zp,{})]})}function or({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:s,multiSelectionActive:i,nodeLookup:a,onError:l}=t.getState(),c=a.get(e);if(!c){l?.("012",me.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&i)&&(s({nodes:[c],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function ua({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:s,nodeClickDistance:i}){const a=ie(),[l,c]=k.useState(!1),d=k.useRef();return k.useEffect(()=>{d.current=zh({getStoreItems:()=>a.getState(),onNodeMouseDown:h=>{or({id:h,store:a,nodeRef:e})},onDragStart:()=>{c(!0)},onDragStop:()=>{c(!1)}})},[]),k.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:s,nodeId:r,nodeClickDistance:i}),()=>{d.current?.destroy()}},[n,o,t,s,e,r]),l}const Kp=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function da(){const e=ie();return k.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:s,nodesDraggable:i,onError:a,updateNodePositions:l,nodeLookup:c,nodeOrigin:d}=e.getState(),h=new Map,u=Kp(i),f=r?s[0]:5,p=r?s[1]:5,m=n.direction.x*f*n.factor,x=n.direction.y*p*n.factor;for(const[,w]of c){if(!u(w))continue;let C={x:w.internals.positionAbsolute.x+m,y:w.internals.positionAbsolute.y+x};r&&(C=Rt(C,s));const{position:g,positionAbsolute:y}=qs({nodeId:w.id,nextPosition:C,nodeLookup:c,nodeExtent:o,nodeOrigin:d,onError:a});w.position=g,w.internals.positionAbsolute=y,h.set(w.id,w)}l(h)},[])}const rr=k.createContext(null),Qp=rr.Provider;rr.Consumer;const Yn=()=>k.useContext(rr),Jp=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),eg=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:s,connection:i}=o,{fromHandle:a,toHandle:l,isValid:c}=i,d=l?.nodeId===e&&l?.id===t&&l?.type===n;return{connectingFrom:a?.nodeId===e&&a?.id===t&&a?.type===n,connectingTo:d,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:s===lt.Strict?a?.type!==n:e!==a?.nodeId||t!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!r,valid:d&&c}};function tg({type:e="source",position:t=U.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:s=!0,id:i,onConnect:a,children:l,className:c,onMouseDown:d,onTouchStart:h,...u},f){const p=i||null,m=e==="target",x=ie(),w=Yn(),{connectOnClick:C,noPanClassName:g,rfId:y}=ne(Jp,ce),{connectingFrom:N,connectingTo:_,clickConnecting:I,isPossibleEndHandle:S,connectionInProcess:T,clickConnectionInProcess:R,valid:L}=ne(eg(w,p,e),ce);w||x.getState().onError?.("010",me.error010());const z=P=>{const{defaultEdgeOptions:M,onConnect:A,hasDefaultEdges:O}=x.getState(),$={...M,...P};if(O){const{edges:E,setEdges:D}=x.getState();D(hi($,E))}A?.($),a?.($)},H=P=>{if(!w)return;const M=li(P.nativeEvent);if(r&&(M&&P.button===0||!M)){const A=x.getState();Uo.onPointerDown(P.nativeEvent,{handleDomNode:P.currentTarget,autoPanOnConnect:A.autoPanOnConnect,connectionMode:A.connectionMode,connectionRadius:A.connectionRadius,domNode:A.domNode,nodeLookup:A.nodeLookup,lib:A.lib,isTarget:m,handleId:p,nodeId:w,flowId:A.rfId,panBy:A.panBy,cancelConnection:A.cancelConnection,onConnectStart:A.onConnectStart,onConnectEnd:A.onConnectEnd,updateConnection:A.updateConnection,onConnect:z,isValidConnection:n||A.isValidConnection,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:A.autoPanSpeed,dragThreshold:A.connectionDragThreshold})}M?d?.(P):h?.(P)},b=P=>{const{onClickConnectStart:M,onClickConnectEnd:A,connectionClickStartHandle:O,connectionMode:$,isValidConnection:E,lib:D,rfId:j,nodeLookup:B,connection:F}=x.getState();if(!w||!O&&!r)return;if(!O){M?.(P.nativeEvent,{nodeId:w,handleId:p,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:w,type:e,id:p}});return}const Z=ii(P.target),K=n||E,{connection:Y,isValid:V}=Uo.isValid(P.nativeEvent,{handle:{nodeId:w,id:p,type:e},connectionMode:$,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:K,flowId:j,doc:Z,lib:D,nodeLookup:B});V&&Y&&z(Y);const W=structuredClone(F);delete W.inProgress,W.toPosition=W.toHandle?W.toHandle.position:null,A?.(P,W),x.setState({connectionClickStartHandle:null})};return v.jsx("div",{"data-handleid":p,"data-nodeid":w,"data-handlepos":t,"data-id":`${y}-${w}-${p}-${e}`,className:ue(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",g,c,{source:!m,target:m,connectable:o,connectablestart:r,connectableend:s,clickconnecting:I,connectingfrom:N,connectingto:_,valid:L,connectionindicator:o&&(!T||S)&&(T||R?s:r)}]),onMouseDown:H,onTouchStart:H,onClick:C?b:void 0,ref:f,...u,children:l})}const Gt=k.memo(ia(tg));function ng({data:e,isConnectable:t,sourcePosition:n=U.Bottom}){return v.jsxs(v.Fragment,{children:[e?.label,v.jsx(Gt,{type:"source",position:n,isConnectable:t})]})}function og({data:e,isConnectable:t,targetPosition:n=U.Top,sourcePosition:o=U.Bottom}){return v.jsxs(v.Fragment,{children:[v.jsx(Gt,{type:"target",position:n,isConnectable:t}),e?.label,v.jsx(Gt,{type:"source",position:o,isConnectable:t})]})}function rg(){return null}function sg({data:e,isConnectable:t,targetPosition:n=U.Top}){return v.jsxs(v.Fragment,{children:[v.jsx(Gt,{type:"target",position:n,isConnectable:t}),e?.label]})}const Wn={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},fa={input:ng,default:og,output:sg,group:rg};function ig(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const ag=e=>{const{width:t,height:n,x:o,y:r}=jt(e.nodeLookup,{filter:s=>!!s.selected});return{width:Se(t)?t:null,height:Se(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function lg({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=ie(),{width:r,height:s,transformString:i,userSelectionActive:a}=ne(ag,ce),l=da(),c=k.useRef(null);if(k.useEffect(()=>{n||c.current?.focus({preventScroll:!0})},[n]),ua({nodeRef:c}),a||!r||!s)return null;const d=e?u=>{const f=o.getState().nodes.filter(p=>p.selected);e(u,f)}:void 0,h=u=>{Object.prototype.hasOwnProperty.call(Wn,u.key)&&(u.preventDefault(),l({direction:Wn[u.key],factor:u.shiftKey?4:1}))};return v.jsx("div",{className:ue(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:v.jsx("div",{ref:c,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:r,height:s}})})}const ha=typeof window<"u"?window:void 0,cg=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function pa({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:i,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:c,selectionOnDrag:d,selectionMode:h,onSelectionStart:u,onSelectionEnd:f,multiSelectionKeyCode:p,panActivationKeyCode:m,zoomActivationKeyCode:x,elementsSelectable:w,zoomOnScroll:C,zoomOnPinch:g,panOnScroll:y,panOnScrollSpeed:N,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:S,defaultViewport:T,translateExtent:R,minZoom:L,maxZoom:z,preventScrolling:H,onSelectionContextMenu:b,noWheelClassName:P,noPanClassName:M,disableKeyboardA11y:A,onViewportChange:O,isControlledViewport:$}){const{nodesSelectionActive:E,userSelectionActive:D}=ne(cg),j=Wt(c,{target:ha}),B=Wt(m,{target:ha}),F=B||S,Z=B||y,K=d&&F!==!0,Y=j||D||K;return Fp({deleteKeyCode:l,multiSelectionKeyCode:p}),v.jsx(Gp,{onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:C,zoomOnPinch:g,panOnScroll:Z,panOnScrollSpeed:N,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:!j&&F,defaultViewport:T,translateExtent:R,minZoom:L,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:H,noWheelClassName:P,noPanClassName:M,onViewportChange:O,isControlledViewport:$,paneClickDistance:a,children:v.jsxs(qp,{onSelectionStart:u,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:i,panOnDrag:F,isSelecting:!!Y,selectionMode:h,selectionKeyPressed:j,selectionOnDrag:K,children:[e,E&&v.jsx(lg,{onSelectionContextMenu:b,noPanClassName:M,disableKeyboardA11y:A})]})})}pa.displayName="FlowRenderer";const ug=k.memo(pa),dg=e=>t=>e?Lo(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function fg(e){return ne(k.useCallback(dg(e),[e]),ce)}const hg=e=>e.updateNodeInternals;function pg(){const e=ne(hg),[t]=k.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const s=r.target.getAttribute("data-id");o.set(s,{id:s,nodeElement:r.target,force:!0})}),e(o)}));return k.useEffect(()=>()=>{t?.disconnect()},[t]),t}function gg({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=ie(),s=k.useRef(null),i=k.useRef(null),a=k.useRef(e.sourcePosition),l=k.useRef(e.targetPosition),c=k.useRef(t),d=n&&!!e.internals.handleBounds;return k.useEffect(()=>{s.current&&!e.hidden&&(!d||i.current!==s.current)&&(i.current&&o?.unobserve(i.current),o?.observe(s.current),i.current=s.current)},[d,e.hidden]),k.useEffect(()=>()=>{i.current&&(o?.unobserve(i.current),i.current=null)},[]),k.useEffect(()=>{if(s.current){const h=c.current!==t,u=a.current!==e.sourcePosition,f=l.current!==e.targetPosition;(h||u||f)&&(c.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function mg({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:s,onDoubleClick:i,nodesDraggable:a,elementsSelectable:l,nodesConnectable:c,nodesFocusable:d,resizeObserver:h,noDragClassName:u,noPanClassName:f,disableKeyboardA11y:p,rfId:m,nodeTypes:x,nodeClickDistance:w,onError:C}){const{node:g,internals:y,isParent:N}=ne(V=>{const W=V.nodeLookup.get(e),J=V.parentLookup.has(e);return{node:W,internals:W.internals,isParent:J}},ce);let _=g.type||"default",I=x?.[_]||fa[_];I===void 0&&(C?.("003",me.error003(_)),_="default",I=x?.default||fa.default);const S=!!(g.draggable||a&&typeof g.draggable>"u"),T=!!(g.selectable||l&&typeof g.selectable>"u"),R=!!(g.connectable||c&&typeof g.connectable>"u"),L=!!(g.focusable||d&&typeof g.focusable>"u"),z=ie(),H=oi(g),b=gg({node:g,nodeType:_,hasDimensions:H,resizeObserver:h}),P=ua({nodeRef:b,disabled:g.hidden||!S,noDragClassName:u,handleSelector:g.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:w}),M=da();if(g.hidden)return null;const A=Te(g),O=ig(g),$=T||S||t||n||o||r,E=n?V=>n(V,{...y.userNode}):void 0,D=o?V=>o(V,{...y.userNode}):void 0,j=r?V=>r(V,{...y.userNode}):void 0,B=s?V=>s(V,{...y.userNode}):void 0,F=i?V=>i(V,{...y.userNode}):void 0,Z=V=>{const{selectNodesOnDrag:W,nodeDragThreshold:J}=z.getState();T&&(!W||!S||J>0)&&or({id:e,store:z,nodeRef:b}),t&&t(V,{...y.userNode})},K=V=>{if(!(ai(V.nativeEvent)||p)){if(Fs.includes(V.key)&&T){const W=V.key==="Escape";or({id:e,store:z,unselect:W,nodeRef:b})}else if(S&&g.selected&&Object.prototype.hasOwnProperty.call(Wn,V.key)){V.preventDefault();const{ariaLabelConfig:W}=z.getState();z.setState({ariaLiveMessage:W["node.a11yDescription.ariaLiveMessage"]({direction:V.key.replace("Arrow","").toLowerCase(),x:~~y.positionAbsolute.x,y:~~y.positionAbsolute.y})}),M({direction:Wn[V.key],factor:V.shiftKey?4:1})}}},Y=()=>{if(p||!b.current?.matches(":focus-visible"))return;const{transform:V,width:W,height:J,autoPanOnNodeFocus:oe,setCenter:q}=z.getState();if(!oe)return;Lo(new Map([[e,g]]),{x:0,y:0,width:W,height:J},V,!0).length>0||q(g.position.x+A.width/2,g.position.y+A.height/2,{zoom:V[2]})};return v.jsx("div",{className:ue(["react-flow__node",`react-flow__node-${_}`,{[f]:S},g.className,{selected:g.selected,selectable:T,parent:N,draggable:S,dragging:P}]),ref:b,style:{zIndex:y.z,transform:`translate(${y.positionAbsolute.x}px,${y.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:H?"visible":"hidden",...g.style,...O},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:E,onMouseMove:D,onMouseLeave:j,onContextMenu:B,onClick:Z,onDoubleClick:F,onKeyDown:L?K:void 0,tabIndex:L?0:void 0,onFocus:L?Y:void 0,role:g.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${Wi}-${m}`,"aria-label":g.ariaLabel,...g.domAttributes,children:v.jsx(Qp,{value:e,children:v.jsx(I,{id:e,data:g.data,type:_,positionAbsoluteX:y.positionAbsolute.x,positionAbsoluteY:y.positionAbsolute.y,selected:g.selected??!1,selectable:T,draggable:S,deletable:g.deletable??!0,isConnectable:R,sourcePosition:g.sourcePosition,targetPosition:g.targetPosition,dragging:P,dragHandle:g.dragHandle,zIndex:y.z,parentId:g.parentId,...A})})})}const yg=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function ga(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:s}=ne(yg,ce),i=fg(e.onlyRenderVisibleElements),a=pg();return v.jsx("div",{className:"react-flow__nodes",style:Fn,children:i.map(l=>v.jsx(mg,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:s},l))})}ga.displayName="NodeRenderer";const xg=k.memo(ga);function wg(e){return ne(k.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const s=n.nodeLookup.get(r.source),i=n.nodeLookup.get(r.target);s&&i&&xh({sourceNode:s,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),ce)}const bg=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return v.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},vg=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return v.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},ma={[An.Arrow]:bg,[An.ArrowClosed]:vg};function _g(e){const t=ie();return k.useMemo(()=>Object.prototype.hasOwnProperty.call(ma,e)?ma[e]:(t.getState().onError?.("009",me.error009(e)),null),[e])}const Eg=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:s="strokeWidth",strokeWidth:i,orient:a="auto-start-reverse"})=>{const l=_g(t);return l?v.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:a,refX:"0",refY:"0",children:v.jsx(l,{color:n,strokeWidth:i})}):null},ya=({defaultColor:e,rfId:t})=>{const n=ne(s=>s.edges),o=ne(s=>s.defaultEdgeOptions),r=k.useMemo(()=>Ch(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?v.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:v.jsx("defs",{children:r.map(s=>v.jsx(Eg,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};ya.displayName="MarkerDefinitions";var Sg=k.memo(ya);function xa({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:s,labelBgPadding:i=[2,4],labelBgBorderRadius:a=2,children:l,className:c,...d}){const[h,u]=k.useState({x:1,y:0,width:0,height:0}),f=ue(["react-flow__edge-textwrapper",c]),p=k.useRef(null);return k.useEffect(()=>{if(p.current){const m=p.current.getBBox();u({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?v.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:f,visibility:h.width?"visible":"hidden",...d,children:[r&&v.jsx("rect",{width:h.width+2*i[0],x:-i[0],y:-i[1],height:h.height+2*i[1],className:"react-flow__edge-textbg",style:s,rx:a,ry:a}),v.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:p,style:o,children:n}),l]}):null}xa.displayName="EdgeText";const Cg=k.memo(xa);function yt({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:s,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:c=20,...d}){return v.jsxs(v.Fragment,{children:[v.jsx("path",{...d,d:e,fill:"none",className:ue(["react-flow__edge-path",d.className])}),c?v.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}):null,o&&Se(t)&&Se(n)?v.jsx(Cg,{x:t,y:n,label:o,labelStyle:r,labelShowBg:s,labelBgStyle:i,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function wa({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===U.Left||e===U.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function ba({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:o,targetY:r,targetPosition:s=U.Top}){const[i,a]=wa({pos:n,x1:e,y1:t,x2:o,y2:r}),[l,c]=wa({pos:s,x1:o,y1:r,x2:e,y2:t}),[d,h,u,f]=ui({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:c});return[`M${e},${t} C${i},${a} ${l},${c} ${o},${r}`,d,h,u,f]}function va(e){return k.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:s,sourcePosition:i,targetPosition:a,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:h,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:w})=>{const[C,g,y]=ba({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:s,targetPosition:a}),N=e.isInternal?void 0:t;return v.jsx(yt,{id:N,path:C,labelX:g,labelY:y,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:h,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:w})})}const Ng=va({isInternal:!1}),_a=va({isInternal:!0});Ng.displayName="SimpleBezierEdge",_a.displayName="SimpleBezierEdgeInternal";function Ea(e){return k.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:s,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:u,sourcePosition:f=U.Bottom,targetPosition:p=U.Top,markerEnd:m,markerStart:x,pathOptions:w,interactionWidth:C})=>{const[g,y,N]=Vo({sourceX:n,sourceY:o,sourcePosition:f,targetX:r,targetY:s,targetPosition:p,borderRadius:w?.borderRadius,offset:w?.offset,stepPosition:w?.stepPosition}),_=e.isInternal?void 0:t;return v.jsx(yt,{id:_,path:g,labelX:y,labelY:N,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:u,markerEnd:m,markerStart:x,interactionWidth:C})})}const Sa=Ea({isInternal:!1}),Ca=Ea({isInternal:!0});Sa.displayName="SmoothStepEdge",Ca.displayName="SmoothStepEdgeInternal";function Na(e){return k.memo(({id:t,...n})=>{const o=e.isInternal?void 0:t;return v.jsx(Sa,{...n,id:o,pathOptions:k.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const kg=Na({isInternal:!1}),ka=Na({isInternal:!0});kg.displayName="StepEdge",ka.displayName="StepEdgeInternal";function Ma(e){return k.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:s,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:u,markerEnd:f,markerStart:p,interactionWidth:m})=>{const[x,w,C]=pi({sourceX:n,sourceY:o,targetX:r,targetY:s}),g=e.isInternal?void 0:t;return v.jsx(yt,{id:g,path:x,labelX:w,labelY:C,label:i,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:u,markerEnd:f,markerStart:p,interactionWidth:m})})}const Mg=Ma({isInternal:!1}),Aa=Ma({isInternal:!0});Mg.displayName="StraightEdge",Aa.displayName="StraightEdgeInternal";function Pa(e){return k.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:s,sourcePosition:i=U.Bottom,targetPosition:a=U.Top,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:h,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,pathOptions:w,interactionWidth:C})=>{const[g,y,N]=zn({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:s,targetPosition:a,curvature:w?.curvature}),_=e.isInternal?void 0:t;return v.jsx(yt,{id:_,path:g,labelX:y,labelY:N,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:h,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:C})})}const Ag=Pa({isInternal:!1}),Ia=Pa({isInternal:!0});Ag.displayName="BezierEdge",Ia.displayName="BezierEdgeInternal";const Oa={default:Ia,straight:Aa,step:ka,smoothstep:Ca,simplebezier:_a},Da={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Pg=(e,t,n)=>n===U.Left?e-t:n===U.Right?e+t:e,Ig=(e,t,n)=>n===U.Top?e-t:n===U.Bottom?e+t:e,Ta="react-flow__edgeupdater";function za({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:s,onMouseOut:i,type:a}){return v.jsx("circle",{onMouseDown:r,onMouseEnter:s,onMouseOut:i,className:ue([Ta,`${Ta}-${a}`]),cx:Pg(t,o,e),cy:Ig(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function Og({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:l,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,setReconnecting:u,setUpdateHover:f}){const p=ie(),m=(y,N)=>{if(y.button!==0)return;const{autoPanOnConnect:_,domNode:I,isValidConnection:S,connectionMode:T,connectionRadius:R,lib:L,onConnectStart:z,onConnectEnd:H,cancelConnection:b,nodeLookup:P,rfId:M,panBy:A,updateConnection:O}=p.getState(),$=N.type==="target",E=(B,F)=>{u(!1),h?.(B,n,N.type,F)},D=B=>c?.(n,B),j=(B,F)=>{u(!0),d?.(y,n,N.type),z?.(B,F)};Uo.onPointerDown(y.nativeEvent,{autoPanOnConnect:_,connectionMode:T,connectionRadius:R,domNode:I,handleId:N.id,nodeId:N.nodeId,nodeLookup:P,isTarget:$,edgeUpdaterType:N.type,lib:L,flowId:M,cancelConnection:b,panBy:A,isValidConnection:S,onConnect:D,onConnectStart:j,onConnectEnd:H,onReconnectEnd:E,updateConnection:O,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:y.currentTarget})},x=y=>m(y,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=y=>m(y,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>f(!0),g=()=>f(!1);return v.jsxs(v.Fragment,{children:[(e===!0||e==="source")&&v.jsx(za,{position:a,centerX:o,centerY:r,radius:t,onMouseDown:x,onMouseEnter:C,onMouseOut:g,type:"source"}),(e===!0||e==="target")&&v.jsx(za,{position:l,centerX:s,centerY:i,radius:t,onMouseDown:w,onMouseEnter:C,onMouseOut:g,type:"target"})]})}function Dg({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:s,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,reconnectRadius:d,onReconnect:h,onReconnectStart:u,onReconnectEnd:f,rfId:p,edgeTypes:m,noPanClassName:x,onError:w,disableKeyboardA11y:C}){let g=ne(q=>q.edgeLookup.get(e));const y=ne(q=>q.defaultEdgeOptions);g=y?{...y,...g}:g;let N=g.type||"default",_=m?.[N]||Oa[N];_===void 0&&(w?.("011",me.error011(N)),N="default",_=m?.default||Oa.default);const I=!!(g.focusable||t&&typeof g.focusable>"u"),S=typeof h<"u"&&(g.reconnectable||n&&typeof g.reconnectable>"u"),T=!!(g.selectable||o&&typeof g.selectable>"u"),R=k.useRef(null),[L,z]=k.useState(!1),[H,b]=k.useState(!1),P=ie(),{zIndex:M,sourceX:A,sourceY:O,targetX:$,targetY:E,sourcePosition:D,targetPosition:j}=ne(k.useCallback(q=>{const te=q.nodeLookup.get(g.source),Q=q.nodeLookup.get(g.target);if(!te||!Q)return{zIndex:g.zIndex,...Da};const le=Sh({id:e,sourceNode:te,targetNode:Q,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:q.connectionMode,onError:w});return{zIndex:yh({selected:g.selected,zIndex:g.zIndex,sourceNode:te,targetNode:Q,elevateOnSelect:q.elevateEdgesOnSelect}),...le||Da}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex]),ce),B=k.useMemo(()=>g.markerStart?`url('#${Bo(g.markerStart,p)}')`:void 0,[g.markerStart,p]),F=k.useMemo(()=>g.markerEnd?`url('#${Bo(g.markerEnd,p)}')`:void 0,[g.markerEnd,p]);if(g.hidden||A===null||O===null||$===null||E===null)return null;const Z=q=>{const{addSelectedEdges:te,unselectNodesAndEdges:Q,multiSelectionActive:le}=P.getState();T&&(P.setState({nodesSelectionActive:!1}),g.selected&&le?(Q({nodes:[],edges:[g]}),R.current?.blur()):te([e])),r&&r(q,g)},K=s?q=>{s(q,{...g})}:void 0,Y=i?q=>{i(q,{...g})}:void 0,V=a?q=>{a(q,{...g})}:void 0,W=l?q=>{l(q,{...g})}:void 0,J=c?q=>{c(q,{...g})}:void 0,oe=q=>{if(!C&&Fs.includes(q.key)&&T){const{unselectNodesAndEdges:te,addSelectedEdges:Q}=P.getState();q.key==="Escape"?(R.current?.blur(),te({edges:[g]})):Q([e])}};return v.jsx("svg",{style:{zIndex:M},children:v.jsxs("g",{className:ue(["react-flow__edge",`react-flow__edge-${N}`,g.className,x,{selected:g.selected,animated:g.animated,inactive:!T&&!r,updating:L,selectable:T}]),onClick:Z,onDoubleClick:K,onContextMenu:Y,onMouseEnter:V,onMouseMove:W,onMouseLeave:J,onKeyDown:I?oe:void 0,tabIndex:I?0:void 0,role:g.ariaRole??(I?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":g.ariaLabel===null?void 0:g.ariaLabel||`Edge from ${g.source} to ${g.target}`,"aria-describedby":I?`${Gi}-${p}`:void 0,ref:R,...g.domAttributes,children:[!H&&v.jsx(_,{id:e,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:T,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:A,sourceY:O,targetX:$,targetY:E,sourcePosition:D,targetPosition:j,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:B,markerEnd:F,pathOptions:"pathOptions"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),S&&v.jsx(Og,{edge:g,isReconnectable:S,reconnectRadius:d,onReconnect:h,onReconnectStart:u,onReconnectEnd:f,sourceX:A,sourceY:O,targetX:$,targetY:E,sourcePosition:D,targetPosition:j,setUpdateHover:z,setReconnecting:b})]})})}const Tg=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function $a({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:s,onEdgeContextMenu:i,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:d,reconnectRadius:h,onEdgeDoubleClick:u,onReconnectStart:f,onReconnectEnd:p,disableKeyboardA11y:m}){const{edgesFocusable:x,edgesReconnectable:w,elementsSelectable:C,onError:g}=ne(Tg,ce),y=wg(t);return v.jsxs("div",{className:"react-flow__edges",children:[v.jsx(Sg,{defaultColor:e,rfId:n}),y.map(N=>v.jsx(Dg,{id:N,edgesFocusable:x,edgesReconnectable:w,elementsSelectable:C,noPanClassName:r,onReconnect:s,onContextMenu:i,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,onClick:d,reconnectRadius:h,onDoubleClick:u,onReconnectStart:f,onReconnectEnd:p,rfId:n,onError:g,edgeTypes:o,disableKeyboardA11y:m},N))]})}$a.displayName="EdgeRenderer";const zg=k.memo($a),$g=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Lg({children:e}){const t=ne($g);return v.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function jg(e){const t=mt(),n=k.useRef(!1);k.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Hg=e=>e.panZoom?.syncViewport;function Rg(e){const t=ne(Hg),n=ie();return k.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Vg(e){return e.connection.inProgress?{...e.connection,to:Vt(e.connection.to,e.transform)}:{...e.connection}}function Bg(e){return Vg}function La(e){const t=Bg();return ne(t,ce)}const Fg=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Yg({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:s,height:i,isValid:a,inProgress:l}=ne(Fg,ce);return!(s&&r&&l)?null:v.jsx("svg",{style:e,width:s,height:i,className:"react-flow__connectionline react-flow__container",children:v.jsx("g",{className:ue(["react-flow__connection",Zs(a)]),children:v.jsx(ja,{style:t,type:n,CustomComponent:o,isValid:a})})})}const ja=({style:e,type:t=$e.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:s,fromNode:i,fromHandle:a,fromPosition:l,to:c,toNode:d,toHandle:h,toPosition:u}=La();if(!r)return;if(n)return v.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:a,fromX:s.x,fromY:s.y,toX:c.x,toY:c.y,fromPosition:l,toPosition:u,connectionStatus:Zs(o),toNode:d,toHandle:h});let f="";const p={sourceX:s.x,sourceY:s.y,sourcePosition:l,targetX:c.x,targetY:c.y,targetPosition:u};switch(t){case $e.Bezier:[f]=zn(p);break;case $e.SimpleBezier:[f]=ba(p);break;case $e.Step:[f]=Vo({...p,borderRadius:0});break;case $e.SmoothStep:[f]=Vo(p);break;default:[f]=pi(p)}return v.jsx("path",{d:f,fill:"none",className:"react-flow__connection-path",style:e})};ja.displayName="ConnectionLine";const Wg={};function Ha(e=Wg){const t=k.useRef(e),n=ie();k.useEffect(()=>{if(process.env.NODE_ENV==="development"){const o=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of o)if(t.current[r]!==e[r]){n.getState().onError?.("002",me.error002());break}t.current=e}},[e])}function Gg(){const e=ie(),t=k.useRef(!1);k.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",me.error013("react")),t.current=!0}},[])}function Ra({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:s,onEdgeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:d,onSelectionContextMenu:h,onSelectionStart:u,onSelectionEnd:f,connectionLineType:p,connectionLineStyle:m,connectionLineComponent:x,connectionLineContainerStyle:w,selectionKeyCode:C,selectionOnDrag:g,selectionMode:y,multiSelectionKeyCode:N,panActivationKeyCode:_,zoomActivationKeyCode:I,deleteKeyCode:S,onlyRenderVisibleElements:T,elementsSelectable:R,defaultViewport:L,translateExtent:z,minZoom:H,maxZoom:b,preventScrolling:P,defaultMarkerColor:M,zoomOnScroll:A,zoomOnPinch:O,panOnScroll:$,panOnScrollSpeed:E,panOnScrollMode:D,zoomOnDoubleClick:j,panOnDrag:B,onPaneClick:F,onPaneMouseEnter:Z,onPaneMouseMove:K,onPaneMouseLeave:Y,onPaneScroll:V,onPaneContextMenu:W,paneClickDistance:J,nodeClickDistance:oe,onEdgeContextMenu:q,onEdgeMouseEnter:te,onEdgeMouseMove:Q,onEdgeMouseLeave:le,reconnectRadius:he,onReconnect:Ce,onReconnectStart:bt,onReconnectEnd:oo,noDragClassName:ro,noWheelClassName:so,noPanClassName:Jt,disableKeyboardA11y:en,nodeExtent:Er,rfId:io,viewport:vt,onViewportChange:tn}){return Ha(e),Ha(t),Gg(),jg(n),Rg(vt),v.jsx(ug,{onPaneClick:F,onPaneMouseEnter:Z,onPaneMouseMove:K,onPaneMouseLeave:Y,onPaneContextMenu:W,onPaneScroll:V,paneClickDistance:J,deleteKeyCode:S,selectionKeyCode:C,selectionOnDrag:g,selectionMode:y,onSelectionStart:u,onSelectionEnd:f,multiSelectionKeyCode:N,panActivationKeyCode:_,zoomActivationKeyCode:I,elementsSelectable:R,zoomOnScroll:A,zoomOnPinch:O,zoomOnDoubleClick:j,panOnScroll:$,panOnScrollSpeed:E,panOnScrollMode:D,panOnDrag:B,defaultViewport:L,translateExtent:z,minZoom:H,maxZoom:b,onSelectionContextMenu:h,preventScrolling:P,noDragClassName:ro,noWheelClassName:so,noPanClassName:Jt,disableKeyboardA11y:en,onViewportChange:tn,isControlledViewport:!!vt,children:v.jsxs(Lg,{children:[v.jsx(zg,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:i,onReconnect:Ce,onReconnectStart:bt,onReconnectEnd:oo,onlyRenderVisibleElements:T,onEdgeContextMenu:q,onEdgeMouseEnter:te,onEdgeMouseMove:Q,onEdgeMouseLeave:le,reconnectRadius:he,defaultMarkerColor:M,noPanClassName:Jt,disableKeyboardA11y:en,rfId:io}),v.jsx(Yg,{style:m,type:p,component:x,containerStyle:w}),v.jsx("div",{className:"react-flow__edgelabel-renderer"}),v.jsx(xg,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:d,nodeClickDistance:oe,onlyRenderVisibleElements:T,noPanClassName:Jt,noDragClassName:ro,disableKeyboardA11y:en,nodeExtent:Er,rfId:io}),v.jsx("div",{className:"react-flow__viewport-portal"})]})})}Ra.displayName="GraphView";const Xg=k.memo(Ra),Va=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:s,fitView:i,fitViewOptions:a,minZoom:l=.5,maxZoom:c=2,nodeOrigin:d,nodeExtent:h}={})=>{const u=new Map,f=new Map,p=new Map,m=new Map,x=o??t??[],w=n??e??[],C=d??[0,0],g=h??$t;_i(p,m,x);const y=Wo(w,u,f,{nodeOrigin:C,nodeExtent:g,elevateNodesOnSelect:!1});let N=[0,0,1];if(i&&r&&s){const _=jt(u,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:I,y:S,zoom:T}=Ho(_,r,s,l,c,a?.padding??.1);N=[I,S,T]}return{rfId:"1",width:0,height:0,transform:N,nodes:w,nodesInitialized:y,nodeLookup:u,parentLookup:f,edges:x,edgeLookup:m,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:l,maxZoom:c,translateExtent:$t,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:lt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:C,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:a,fitViewResolver:null,connection:{...Ws},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ni,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Ys}},Zg=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:s,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:h})=>mp((u,f)=>{async function p(){const{nodeLookup:m,panZoom:x,fitViewOptions:w,fitViewResolver:C,width:g,height:y,minZoom:N,maxZoom:_}=f();x&&(await uh({nodes:m,width:g,height:y,panZoom:x,minZoom:N,maxZoom:_},w),C?.resolve(!0),u({fitViewResolver:null}))}return{...Va({nodes:e,edges:t,width:r,height:s,fitView:i,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:h,defaultNodes:n,defaultEdges:o}),setNodes:m=>{const{nodeLookup:x,parentLookup:w,nodeOrigin:C,elevateNodesOnSelect:g,fitViewQueued:y}=f(),N=Wo(m,x,w,{nodeOrigin:C,nodeExtent:h,elevateNodesOnSelect:g,checkEquality:!0});y&&N?(p(),u({nodes:m,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0})):u({nodes:m,nodesInitialized:N})},setEdges:m=>{const{connectionLookup:x,edgeLookup:w}=f();_i(x,w,m),u({edges:m})},setDefaultNodesAndEdges:(m,x)=>{if(m){const{setNodes:w}=f();w(m),u({hasDefaultNodes:!0})}if(x){const{setEdges:w}=f();w(x),u({hasDefaultEdges:!0})}},updateNodeInternals:m=>{const{triggerNodeChanges:x,nodeLookup:w,parentLookup:C,domNode:g,nodeOrigin:y,nodeExtent:N,debug:_,fitViewQueued:I}=f(),{changes:S,updatedInternals:T}=Ph(m,w,C,g,y,N);T&&(kh(w,C,{nodeOrigin:y,nodeExtent:N}),I?(p(),u({fitViewQueued:!1,fitViewOptions:void 0})):u({}),S?.length>0&&(_&&console.log("React Flow: trigger node changes",S),x?.(S)))},updateNodePositions:(m,x=!1)=>{const w=[],C=[],{nodeLookup:g,triggerNodeChanges:y}=f();for(const[N,_]of m){const I=g.get(N),S=!!(I?.expandParent&&I?.parentId&&_?.position),T={id:N,type:"position",position:S?{x:Math.max(0,_.position.x),y:Math.max(0,_.position.y)}:_.position,dragging:x};S&&I.parentId&&w.push({id:N,parentId:I.parentId,rect:{..._.internals.positionAbsolute,width:_.measured.width??0,height:_.measured.height??0}}),C.push(T)}if(w.length>0){const{parentLookup:N,nodeOrigin:_}=f(),I=Xo(w,g,N,_);C.push(...I)}y(C)},triggerNodeChanges:m=>{const{onNodesChange:x,setNodes:w,nodes:C,hasDefaultNodes:g,debug:y}=f();if(m?.length){if(g){const N=ta(m,C);w(N)}y&&console.log("React Flow: trigger node changes",m),x?.(m)}},triggerEdgeChanges:m=>{const{onEdgesChange:x,setEdges:w,edges:C,hasDefaultEdges:g,debug:y}=f();if(m?.length){if(g){const N=na(m,C);w(N)}y&&console.log("React Flow: trigger edge changes",m),x?.(m)}},addSelectedNodes:m=>{const{multiSelectionActive:x,edgeLookup:w,nodeLookup:C,triggerNodeChanges:g,triggerEdgeChanges:y}=f();if(x){const N=m.map(_=>Ue(_,!0));g(N);return}g(gt(C,new Set([...m]),!0)),y(gt(w))},addSelectedEdges:m=>{const{multiSelectionActive:x,edgeLookup:w,nodeLookup:C,triggerNodeChanges:g,triggerEdgeChanges:y}=f();if(x){const N=m.map(_=>Ue(_,!0));y(N);return}y(gt(w,new Set([...m]))),g(gt(C,new Set,!0))},unselectNodesAndEdges:({nodes:m,edges:x}={})=>{const{edges:w,nodes:C,nodeLookup:g,triggerNodeChanges:y,triggerEdgeChanges:N}=f(),_=m||C,I=x||w,S=_.map(R=>{const L=g.get(R.id);return L&&(L.selected=!1),Ue(R.id,!1)}),T=I.map(R=>Ue(R.id,!1));y(S),N(T)},setMinZoom:m=>{const{panZoom:x,maxZoom:w}=f();x?.setScaleExtent([m,w]),u({minZoom:m})},setMaxZoom:m=>{const{panZoom:x,minZoom:w}=f();x?.setScaleExtent([w,m]),u({maxZoom:m})},setTranslateExtent:m=>{f().panZoom?.setTranslateExtent(m),u({translateExtent:m})},setPaneClickDistance:m=>{f().panZoom?.setClickDistance(m)},resetSelectedElements:()=>{const{edges:m,nodes:x,triggerNodeChanges:w,triggerEdgeChanges:C,elementsSelectable:g}=f();if(!g)return;const y=x.reduce((_,I)=>I.selected?[..._,Ue(I.id,!1)]:_,[]),N=m.reduce((_,I)=>I.selected?[..._,Ue(I.id,!1)]:_,[]);w(y),C(N)},setNodeExtent:m=>{const{nodes:x,nodeLookup:w,parentLookup:C,nodeOrigin:g,elevateNodesOnSelect:y,nodeExtent:N}=f();m[0][0]===N[0][0]&&m[0][1]===N[0][1]&&m[1][0]===N[1][0]&&m[1][1]===N[1][1]||(Wo(x,w,C,{nodeOrigin:g,nodeExtent:m,elevateNodesOnSelect:y,checkEquality:!1}),u({nodeExtent:m}))},panBy:m=>{const{transform:x,width:w,height:C,panZoom:g,translateExtent:y}=f();return Ih({delta:m,panZoom:g,transform:x,translateExtent:y,width:w,height:C})},setCenter:async(m,x,w)=>{const{width:C,height:g,maxZoom:y,panZoom:N}=f();if(!N)return Promise.resolve(!1);const _=typeof w?.zoom<"u"?w.zoom:y;return await N.setViewport({x:C/2-m*_,y:g/2-x*_,zoom:_},{duration:w?.duration,ease:w?.ease,interpolate:w?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{u({connection:{...Ws}})},updateConnection:m=>{u({connection:m})},reset:()=>u({...Va()})}},Object.is);function Ba({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:s,initialMinZoom:i,initialMaxZoom:a,initialFitViewOptions:l,fitView:c,nodeOrigin:d,nodeExtent:h,children:u}){const[f]=k.useState(()=>Zg({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:s,fitView:c,minZoom:i,maxZoom:a,fitViewOptions:l,nodeOrigin:d,nodeExtent:h}));return v.jsx(yp,{value:f,children:v.jsx(Hp,{children:u})})}function Ug({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:h,nodeExtent:u}){return k.useContext(Rn)?v.jsx(v.Fragment,{children:e}):v.jsx(Ba,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:s,initialHeight:i,fitView:a,initialFitViewOptions:l,initialMinZoom:c,initialMaxZoom:d,nodeOrigin:h,nodeExtent:u,children:e})}const qg={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Kg({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:s,edgeTypes:i,onNodeClick:a,onEdgeClick:l,onInit:c,onMove:d,onMoveStart:h,onMoveEnd:u,onConnect:f,onConnectStart:p,onConnectEnd:m,onClickConnectStart:x,onClickConnectEnd:w,onNodeMouseEnter:C,onNodeMouseMove:g,onNodeMouseLeave:y,onNodeContextMenu:N,onNodeDoubleClick:_,onNodeDragStart:I,onNodeDrag:S,onNodeDragStop:T,onNodesDelete:R,onEdgesDelete:L,onDelete:z,onSelectionChange:H,onSelectionDragStart:b,onSelectionDrag:P,onSelectionDragStop:M,onSelectionContextMenu:A,onSelectionStart:O,onSelectionEnd:$,onBeforeDelete:E,connectionMode:D,connectionLineType:j=$e.Bezier,connectionLineStyle:B,connectionLineComponent:F,connectionLineContainerStyle:Z,deleteKeyCode:K="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:V=!1,selectionMode:W=ct.Full,panActivationKeyCode:J="Space",multiSelectionKeyCode:oe=Bt()?"Meta":"Control",zoomActivationKeyCode:q=Bt()?"Meta":"Control",snapToGrid:te,snapGrid:Q,onlyRenderVisibleElements:le=!1,selectNodesOnDrag:he,nodesDraggable:Ce,autoPanOnNodeFocus:bt,nodesConnectable:oo,nodesFocusable:ro,nodeOrigin:so=Xi,edgesFocusable:Jt,edgesReconnectable:en,elementsSelectable:Er=!0,defaultViewport:io=Pp,minZoom:vt=.5,maxZoom:tn=2,translateExtent:bl=$t,preventScrolling:sy=!0,nodeExtent:Sr,defaultMarkerColor:iy="#b1b1b7",zoomOnScroll:ay=!0,zoomOnPinch:ly=!0,panOnScroll:cy=!1,panOnScrollSpeed:uy=.5,panOnScrollMode:dy=Ge.Free,zoomOnDoubleClick:fy=!0,panOnDrag:hy=!0,onPaneClick:py,onPaneMouseEnter:gy,onPaneMouseMove:my,onPaneMouseLeave:yy,onPaneScroll:xy,onPaneContextMenu:wy,paneClickDistance:vl=0,nodeClickDistance:by=0,children:vy,onReconnect:_y,onReconnectStart:Ey,onReconnectEnd:Sy,onEdgeContextMenu:Cy,onEdgeDoubleClick:Ny,onEdgeMouseEnter:ky,onEdgeMouseMove:My,onEdgeMouseLeave:Ay,reconnectRadius:Py=10,onNodesChange:Iy,onEdgesChange:Oy,noDragClassName:Dy="nodrag",noWheelClassName:Ty="nowheel",noPanClassName:_l="nopan",fitView:El,fitViewOptions:Sl,connectOnClick:zy,attributionPosition:$y,proOptions:Ly,defaultEdgeOptions:jy,elevateNodesOnSelect:Hy,elevateEdgesOnSelect:Ry,disableKeyboardA11y:Cl=!1,autoPanOnConnect:Vy,autoPanOnNodeDrag:By,autoPanSpeed:Fy,connectionRadius:Yy,isValidConnection:Wy,onError:Gy,style:Xy,id:Nl,nodeDragThreshold:Zy,connectionDragThreshold:Uy,viewport:qy,onViewportChange:Ky,width:Qy,height:Jy,colorMode:e0="light",debug:t0,onScroll:kl,ariaLabelConfig:n0,...o0},r0){const Cr=Nl||"1",s0=Dp(e0),i0=k.useCallback(Ml=>{Ml.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),kl?.(Ml)},[kl]);return v.jsx("div",{"data-testid":"rf__wrapper",...o0,onScroll:i0,style:{...Xy,...qg},ref:r0,className:ue(["react-flow",r,s0]),id:Nl,role:"application",children:v.jsxs(Ug,{nodes:e,edges:t,width:Qy,height:Jy,fitView:El,fitViewOptions:Sl,minZoom:vt,maxZoom:tn,nodeOrigin:so,nodeExtent:Sr,children:[v.jsx(Xg,{onInit:c,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:C,onNodeMouseMove:g,onNodeMouseLeave:y,onNodeContextMenu:N,onNodeDoubleClick:_,nodeTypes:s,edgeTypes:i,connectionLineType:j,connectionLineStyle:B,connectionLineComponent:F,connectionLineContainerStyle:Z,selectionKeyCode:Y,selectionOnDrag:V,selectionMode:W,deleteKeyCode:K,multiSelectionKeyCode:oe,panActivationKeyCode:J,zoomActivationKeyCode:q,onlyRenderVisibleElements:le,defaultViewport:io,translateExtent:bl,minZoom:vt,maxZoom:tn,preventScrolling:sy,zoomOnScroll:ay,zoomOnPinch:ly,zoomOnDoubleClick:fy,panOnScroll:cy,panOnScrollSpeed:uy,panOnScrollMode:dy,panOnDrag:hy,onPaneClick:py,onPaneMouseEnter:gy,onPaneMouseMove:my,onPaneMouseLeave:yy,onPaneScroll:xy,onPaneContextMenu:wy,paneClickDistance:vl,nodeClickDistance:by,onSelectionContextMenu:A,onSelectionStart:O,onSelectionEnd:$,onReconnect:_y,onReconnectStart:Ey,onReconnectEnd:Sy,onEdgeContextMenu:Cy,onEdgeDoubleClick:Ny,onEdgeMouseEnter:ky,onEdgeMouseMove:My,onEdgeMouseLeave:Ay,reconnectRadius:Py,defaultMarkerColor:iy,noDragClassName:Dy,noWheelClassName:Ty,noPanClassName:_l,rfId:Cr,disableKeyboardA11y:Cl,nodeExtent:Sr,viewport:qy,onViewportChange:Ky}),v.jsx(Op,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:f,onConnectStart:p,onConnectEnd:m,onClickConnectStart:x,onClickConnectEnd:w,nodesDraggable:Ce,autoPanOnNodeFocus:bt,nodesConnectable:oo,nodesFocusable:ro,edgesFocusable:Jt,edgesReconnectable:en,elementsSelectable:Er,elevateNodesOnSelect:Hy,elevateEdgesOnSelect:Ry,minZoom:vt,maxZoom:tn,nodeExtent:Sr,onNodesChange:Iy,onEdgesChange:Oy,snapToGrid:te,snapGrid:Q,connectionMode:D,translateExtent:bl,connectOnClick:zy,defaultEdgeOptions:jy,fitView:El,fitViewOptions:Sl,onNodesDelete:R,onEdgesDelete:L,onDelete:z,onNodeDragStart:I,onNodeDrag:S,onNodeDragStop:T,onSelectionDrag:P,onSelectionDragStart:b,onSelectionDragStop:M,onMove:d,onMoveStart:h,onMoveEnd:u,noPanClassName:_l,nodeOrigin:so,rfId:Cr,autoPanOnConnect:Vy,autoPanOnNodeDrag:By,autoPanSpeed:Fy,onError:Gy,connectionRadius:Yy,isValidConnection:Wy,selectNodesOnDrag:he,nodeDragThreshold:Zy,connectionDragThreshold:Uy,onBeforeDelete:E,paneClickDistance:vl,debug:t0,ariaLabelConfig:n0}),v.jsx(Ap,{onSelectionChange:H}),vy,v.jsx(Sp,{proOptions:Ly,position:$y}),v.jsx(Ep,{rfId:Cr,disableKeyboardA11y:Cl})]})})}var Qg=ia(Kg);function Jg({onStart:e,onChange:t,onEnd:n}){const o=ie();k.useEffect(()=>{o.setState({onViewportChangeStart:e})},[e]),k.useEffect(()=>{o.setState({onViewportChange:t})},[t]),k.useEffect(()=>{o.setState({onViewportChangeEnd:n})},[n])}const em=me.error014();function tm({id:e,handleType:t,handleId:n,onConnect:o,onDisconnect:r}={}){const s=Yn(),i=e??s;if(!i)throw new Error(em);const a=k.useRef(null),l=ne(c=>c.connectionLookup.get(`${i}${t?n?`-${t}-${n}`:`-${t}`:""}`),sh);return k.useEffect(()=>{if(a.current&&a.current!==l){const c=l??new Map;Xs(a.current,c,r),Xs(c,a.current,o)}a.current=l??new Map},[l,o,r]),k.useMemo(()=>Array.from(l?.values()??[]),[l])}function sr(e){return ne(k.useCallback(n=>{const o=[],r=Array.isArray(e),s=r?e:[e];for(const i of s){const a=n.nodeLookup.get(i);a&&o.push({id:a.id,type:a.type,data:a.data})}return r?o:o[0]??null},[e]),Oh)}function nm({dimensions:e,lineWidth:t,variant:n,className:o}){return v.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ue(["react-flow__background-pattern",n,o])})}function om({radius:e,className:t}){return v.jsx("circle",{cx:e,cy:e,r:e,className:ue(["react-flow__background-pattern","dots",t])})}var He;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(He||(He={}));const rm={[He.Dots]:1,[He.Lines]:1,[He.Cross]:6},sm=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Fa({id:e,variant:t=He.Dots,gap:n=20,size:o,lineWidth:r=1,offset:s=0,color:i,bgColor:a,style:l,className:c,patternClassName:d}){const h=k.useRef(null),{transform:u,patternId:f}=ne(sm,ce),p=o||rm[t],m=t===He.Dots,x=t===He.Cross,w=Array.isArray(n)?n:[n,n],C=[w[0]*u[2]||1,w[1]*u[2]||1],g=p*u[2],y=Array.isArray(s)?s:[s,s],N=x?[g,g]:C,_=[y[0]*u[2]||1+N[0]/2,y[1]*u[2]||1+N[1]/2],I=`${f}${e||""}`;return v.jsxs("svg",{className:ue(["react-flow__background",c]),style:{...l,...Fn,"--xy-background-color-props":a,"--xy-background-pattern-color-props":i},ref:h,"data-testid":"rf__background",children:[v.jsx("pattern",{id:I,x:u[0]%C[0],y:u[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:m?v.jsx(om,{radius:g/2,className:d}):v.jsx(nm,{dimensions:N,lineWidth:r,variant:t,className:d})}),v.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}Fa.displayName="Background";const im=k.memo(Fa);function am(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:v.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function lm(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:v.jsx("path",{d:"M0 0h32v4.2H0z"})})}function cm(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:v.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function um(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function dm(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Gn({children:e,className:t,...n}){return v.jsx("button",{type:"button",className:ue(["react-flow__controls-button",t]),...n,children:e})}const fm=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Ya({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:s,onZoomOut:i,onFitView:a,onInteractiveChange:l,className:c,children:d,position:h="bottom-left",orientation:u="vertical","aria-label":f}){const p=ie(),{isInteractive:m,minZoomReached:x,maxZoomReached:w,ariaLabelConfig:C}=ne(fm,ce),{zoomIn:g,zoomOut:y,fitView:N}=mt(),_=()=>{g(),s?.()},I=()=>{y(),i?.()},S=()=>{N(r),a?.()},T=()=>{p.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),l?.(!m)},R=u==="horizontal"?"horizontal":"vertical";return v.jsxs(Vn,{className:ue(["react-flow__controls",R,c]),position:h,style:e,"data-testid":"rf__controls","aria-label":f??C["controls.ariaLabel"],children:[t&&v.jsxs(v.Fragment,{children:[v.jsx(Gn,{onClick:_,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:w,children:v.jsx(am,{})}),v.jsx(Gn,{onClick:I,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:x,children:v.jsx(lm,{})})]}),n&&v.jsx(Gn,{className:"react-flow__controls-fitview",onClick:S,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:v.jsx(cm,{})}),o&&v.jsx(Gn,{className:"react-flow__controls-interactive",onClick:T,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:m?v.jsx(dm,{}):v.jsx(um,{})}),d]})}Ya.displayName="Controls";const hm=k.memo(Ya);function pm({id:e,x:t,y:n,width:o,height:r,style:s,color:i,strokeColor:a,strokeWidth:l,className:c,borderRadius:d,shapeRendering:h,selected:u,onClick:f}){const{background:p,backgroundColor:m}=s||{},x=i||p||m;return v.jsx("rect",{className:ue(["react-flow__minimap-node",{selected:u},c]),x:t,y:n,rx:d,ry:d,width:o,height:r,style:{fill:x,stroke:a,strokeWidth:l},shapeRendering:h,onClick:f?w=>f(w,e):void 0})}const gm=k.memo(pm),mm=e=>e.nodes.map(t=>t.id),ir=e=>e instanceof Function?e:()=>e;function ym({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:s=gm,onClick:i}){const a=ne(mm,ce),l=ir(t),c=ir(e),d=ir(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return v.jsx(v.Fragment,{children:a.map(u=>v.jsx(wm,{id:u,nodeColorFunc:l,nodeStrokeColorFunc:c,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:s,onClick:i,shapeRendering:h},u))})}function xm({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:s,shapeRendering:i,NodeComponent:a,onClick:l}){const{node:c,x:d,y:h,width:u,height:f}=ne(p=>{const{internals:m}=p.nodeLookup.get(e),x=m.userNode,{x:w,y:C}=m.positionAbsolute,{width:g,height:y}=Te(x);return{node:x,x:w,y:C,width:g,height:y}},ce);return!c||c.hidden||!oi(c)?null:v.jsx(a,{x:d,y:h,width:u,height:f,style:c.style,selected:!!c.selected,className:o(c),color:t(c),borderRadius:r,strokeColor:n(c),strokeWidth:s,shapeRendering:i,onClick:l,id:c.id})}const wm=k.memo(xm);var bm=k.memo(ym);const vm=200,_m=150,Em=e=>!e.hidden,Sm=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?ei(jt(e.nodeLookup,{filter:Em}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Cm="react-flow__minimap-desc";function Wa({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:s=5,nodeStrokeWidth:i,nodeComponent:a,bgColor:l,maskColor:c,maskStrokeColor:d,maskStrokeWidth:h,position:u="bottom-right",onClick:f,onNodeClick:p,pannable:m=!1,zoomable:x=!1,ariaLabel:w,inversePan:C,zoomStep:g=1,offsetScale:y=5}){const N=ie(),_=k.useRef(null),{boundingRect:I,viewBB:S,rfId:T,panZoom:R,translateExtent:L,flowWidth:z,flowHeight:H,ariaLabelConfig:b}=ne(Sm,ce),P=e?.width??vm,M=e?.height??_m,A=I.width/P,O=I.height/M,$=Math.max(A,O),E=$*P,D=$*M,j=y*$,B=I.x-(E-I.width)/2-j,F=I.y-(D-I.height)/2-j,Z=E+j*2,K=D+j*2,Y=`${Cm}-${T}`,V=k.useRef(0),W=k.useRef();V.current=$,k.useEffect(()=>{if(_.current&&R)return W.current=Vh({domNode:_.current,panZoom:R,getTransform:()=>N.getState().transform,getViewScale:()=>V.current}),()=>{W.current?.destroy()}},[R]),k.useEffect(()=>{W.current?.update({translateExtent:L,width:z,height:H,inversePan:C,pannable:m,zoomStep:g,zoomable:x})},[m,x,C,g,L,z,H]);const J=f?te=>{const[Q,le]=W.current?.pointer(te)||[0,0];f(te,{x:Q,y:le})}:void 0,oe=p?k.useCallback((te,Q)=>{const le=N.getState().nodeLookup.get(Q).internals.userNode;p(te,le)},[]):void 0,q=w??b["minimap.ariaLabel"];return v.jsx(Vn,{position:u,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*$:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:ue(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:v.jsxs("svg",{width:P,height:M,viewBox:`${B} ${F} ${Z} ${K}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:_,onClick:J,children:[q&&v.jsx("title",{id:Y,children:q}),v.jsx(bm,{onClick:oe,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:r,nodeStrokeWidth:i,nodeComponent:a}),v.jsx("path",{className:"react-flow__minimap-mask",d:`M${B-j},${F-j}h${Z+j*2}v${K+j*2}h${-Z-j*2}z
|
|
60
|
+
M${S.x},${S.y}h${S.width}v${S.height}h${-S.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Wa.displayName="MiniMap";const Nm=k.memo(Wa),km=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Mm={[Ze.Line]:"right",[Ze.Handle]:"bottom-right"};function Am({nodeId:e,position:t,variant:n=Ze.Handle,className:o,style:r=void 0,children:s,color:i,minWidth:a=10,minHeight:l=10,maxWidth:c=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:u,autoScale:f=!0,shouldResize:p,onResizeStart:m,onResize:x,onResizeEnd:w}){const C=Yn(),g=typeof e=="string"?e:C,y=ie(),N=k.useRef(null),_=n===Ze.Handle,I=ne(k.useCallback(km(_&&f),[_,f]),ce),S=k.useRef(null),T=t??Mm[n];k.useEffect(()=>{if(!(!N.current||!g))return S.current||(S.current=op({domNode:N.current,nodeId:g,getStoreItems:()=>{const{nodeLookup:L,transform:z,snapGrid:H,snapToGrid:b,nodeOrigin:P,domNode:M}=y.getState();return{nodeLookup:L,transform:z,snapGrid:H,snapToGrid:b,nodeOrigin:P,paneDomNode:M}},onChange:(L,z)=>{const{triggerNodeChanges:H,nodeLookup:b,parentLookup:P,nodeOrigin:M}=y.getState(),A=[],O={x:L.x,y:L.y},$=b.get(g);if($&&$.expandParent&&$.parentId){const E=$.origin??M,D=L.width??$.measured.width??0,j=L.height??$.measured.height??0,B={id:$.id,parentId:$.parentId,rect:{width:D,height:j,...ri({x:L.x??$.position.x,y:L.y??$.position.y},{width:D,height:j},$.parentId,b,E)}},F=Xo([B],b,P,M);A.push(...F),O.x=L.x?Math.max(E[0]*D,L.x):void 0,O.y=L.y?Math.max(E[1]*j,L.y):void 0}if(O.x!==void 0&&O.y!==void 0){const E={id:g,type:"position",position:{...O}};A.push(E)}if(L.width!==void 0&&L.height!==void 0){const D={id:g,type:"dimensions",resizing:!0,setAttributes:u?u==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};A.push(D)}for(const E of z){const D={...E,type:"position"};A.push(D)}H(A)},onEnd:({width:L,height:z})=>{const H={id:g,type:"dimensions",resizing:!1,dimensions:{width:L,height:z}};y.getState().triggerNodeChanges([H])}})),S.current.update({controlPosition:T,boundaries:{minWidth:a,minHeight:l,maxWidth:c,maxHeight:d},keepAspectRatio:h,resizeDirection:u,onResizeStart:m,onResize:x,onResizeEnd:w,shouldResize:p}),()=>{S.current?.destroy()}},[T,a,l,c,d,h,m,x,w,p]);const R=T.split("-");return v.jsx("div",{className:ue(["react-flow__resize-control","nodrag",...R,n,o]),ref:N,style:{...r,scale:I,...i&&{[_?"backgroundColor":"borderColor"]:i}},children:s})}const Ga=k.memo(Am),ar=k.forwardRef(({id:e,sourceX:t,sourceY:n,targetX:o,targetY:r,sourcePosition:s,targetPosition:i,...a},l)=>{const[c]=zn({sourceX:t,sourceY:n,sourcePosition:s,targetX:o,targetY:r,targetPosition:i}),d=ie(),{flowToScreenPosition:h}=mt(),[u,f]=k.useState({viewportXDebounced:0,viewportYDebounced:0,viewportZoomDebounced:0});Jg({onEnd:S=>{f({viewportXDebounced:S.x,viewportYDebounced:S.y,viewportZoomDebounced:S.zoom})}});const p=k.useMemo(()=>{const{domNode:S}=d.getState(),T=S?.getBoundingClientRect();if(!T)return!1;const R=h({x:t,y:n}),L=h({x:o,y:r});return sn(R,T)||sn(L,T)},[t,n,o,r,u.viewportXDebounced,u.viewportYDebounced,u.viewportZoomDebounced]),m=sr(a.source||""),x=k.useMemo(()=>!a.source||!m?void 0:po(a.sourceHandleId||"",m?.data)?.handleColor??"#A1A1A1",[a.source,m]),w=sr(a.target||""),C=k.useMemo(()=>!a.target||!w?void 0:po(a.targetHandleId||"",w?.data)?.handleColor??"#A1A1A1",[a.target,w]),{label:g,labelStyle:y,markerStart:N,markerEnd:_,interactionWidth:I}=a;return v.jsxs(v.Fragment,{children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:`linear-gradient-edge-${e}`,x1:t,y1:n,x2:o,y2:r,gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{stopColor:x,offset:"0"}),v.jsx("stop",{stopColor:C,offset:"1"})]})}),v.jsx(yt,{id:e,path:c,label:g,labelStyle:y,markerEnd:_,markerStart:N,interactionWidth:I,className:re("!stroke-7 in-[g.selected]:brightness-150",!p&&"opacity-25"),style:{stroke:`url(#${`linear-gradient-edge-${e}`})`},focusable:!0})]})});ar.displayName="ConfigurableEdge";function Xa(e,t,n=!0,o=!1){const r=e!==null?"current"in e?e.current:e:null,s=k.useCallback(i=>{if(!r)return;let a=!0;if(n&&!r.contains(i.target))a=!1;else if(o){const l="clientX"in i?{x:i.clientX,y:i.clientY}:{x:i.touches[0].clientX,y:i.touches[0].clientY},c=r.getBoundingClientRect();sn(l,c)||(a=!1)}a||t()},[r,t,n,o]);k.useEffect(()=>(document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}),[r,s])}const Xt=k.forwardRef(({placeholder:e="Input",className:t,...n},o)=>{const r=k.useMemo(()=>n.allowOnlyNumbers&&n.value!==void 0?mo(n.value,n.numberOfDecimals??5):n.value?.toString(),[n.value,n.allowOnlyNumbers,n.numberOfDecimals]),[s,i]=k.useState(r??""),[a,l]=k.useState(null),c=n.value??s,[d,h]=k.useState(c.toString());function u(p){n.allowOnlyNumbers&&/[^0-9\.\-]/.test(p)||h(p)}function f(){if(n.allowOnlyNumbers){const p=Ur(d||c.toString()),m=mo(p,n.numberOfDecimals??5);i(m),n.onChange?.(p),h(m)}else i(d),n.onChange?.(d),h(d)}return Xa(a,()=>f()),v.jsx("input",{type:"text",className:re("h-[44px] rounded-md text-primary-white bg-primary-black font-main px-4 text-[27px] leading-[27px] outline-none focus-visible:!outline-none border-secondary-dark-gray border w-max min-w-0 placeholder:text-[#6B6B6B]",t),placeholder:e,size:5,ref:p=>{l(p),typeof o=="function"?o(p):o&&(o.current=p)},value:d,onChange:p=>u(p.target.value),onKeyDown:p=>{p.key==="Enter"&&f()},onMouseMove:p=>{p.preventDefault(),p.stopPropagation()},onBlur:p=>{p.preventDefault(),p.stopPropagation(),f()}})});Xt.displayName="Input";function Za({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:o,lineClassName:r,lineStyle:s,color:i,minWidth:a=10,minHeight:l=10,maxWidth:c=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,autoScale:u=!0,shouldResize:f,onResizeStart:p,onResize:m,onResizeEnd:x,linePosition:w=["left","right"],handlePosition:C=[],resizeDirection:g="horizontal"}){return t?v.jsxs(v.Fragment,{children:[w.map(y=>v.jsx(Ga,{className:re("!border-none",y==="left"||y==="right"?"!w-4":"!h-4",r),style:s,nodeId:e,position:y,variant:Ze.Line,color:i,minWidth:a,minHeight:l,maxWidth:c,maxHeight:d,onResizeStart:p,keepAspectRatio:h,autoScale:u,shouldResize:f,onResize:m,onResizeEnd:x,resizeDirection:g},y)),C.map(y=>v.jsx(Ga,{className:n,style:o,nodeId:e,position:y,color:i,minWidth:a,minHeight:l,maxWidth:c,maxHeight:d,onResizeStart:p,keepAspectRatio:h,autoScale:u,shouldResize:f,onResize:m,onResizeEnd:x,resizeDirection:g},y))]}):null}function Ua({onMove:e,onClick:t,clickThreshold:n=2,enabled:o=!0,preventDefaultAndStopPropagation:r=!0}={}){const[s,i]=k.useState(!1),[a,l]=k.useState(null),c=k.useRef(null),d=k.useRef(null),h=k.useCallback(u=>{l(u)},[]);return k.useEffect(()=>{if(!a||!o)return;const u=f=>{r&&(f.preventDefault(),f.stopPropagation()),c.current={x:f.clientX,y:f.clientY},d.current={width:a.clientWidth,height:a.clientHeight},i(!0);const p=x=>{r&&(x.preventDefault(),x.stopPropagation()),document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",m),i(!1),c.current&&Math.sqrt((x.clientX-c.current.x)**2+(x.clientY-c.current.y)**2)<n&&t?.()},m=x=>{r&&(x.preventDefault(),x.stopPropagation());const w=x.movementX,C=x.movementY,g=d.current?.width||1,y=d.current?.height||1,N=w/g,_=C/y;e?.(w,C,N,_,g,y)};document.addEventListener("mouseup",p),document.addEventListener("mousemove",m)};return a.addEventListener("mousedown",u),()=>{a.removeEventListener("mousedown",u)}},[a,o,e,t,n,r]),{isDragging:s,dragRef:h}}/**
|
|
61
|
+
* @license lucide-react v0.542.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const Pm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Im=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),qa=e=>{const t=Im(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ka=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),Om=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.542.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var Dm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.542.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Tm=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...a},l)=>k.createElement("svg",{ref:l,...Dm,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Ka("lucide",r),...!s&&!Om(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,d])=>k.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
76
|
+
* @license lucide-react v0.542.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Zt=(e,t)=>{const n=k.forwardRef(({className:o,...r},s)=>k.createElement(Tm,{ref:s,iconNode:t,className:Ka(`lucide-${Pm(qa(e))}`,`lucide-${e}`,o),...r}));return n.displayName=qa(e),n};/**
|
|
81
|
+
* @license lucide-react v0.542.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const zm=Zt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
86
|
+
* @license lucide-react v0.542.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const $m=Zt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
91
|
+
* @license lucide-react v0.542.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Qa=Zt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
96
|
+
* @license lucide-react v0.542.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Lm=Zt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
101
|
+
* @license lucide-react v0.542.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const jm=Zt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Xn=k.forwardRef(({name:e="Input",value:t,onChange:n=()=>{},className:o,min:r,max:s,step:i},a)=>{const[l,c]=k.useState(t??0),[d,h]=k.useState(!1),u=k.useRef(0),f=k.useRef(0),p=t??l,m=k.useRef(0);k.useEffect(()=>{m.current=Math.abs(i??parseFloat(s===void 0||r===void 0?(p||1).toString():(s-r).toString()))},[p,i,s,r]);const{isDragging:x,dragRef:w}=Ua({onMove:(R,L,z,H,b)=>{const P=R/(b+60);u.current+=P,Math.abs(u.current)>.05&&Date.now()-f.current>50&&(f.current=Date.now(),C(m.current*u.current),u.current=0)},onClick:N,clickThreshold:2});function C(R){c(L=>{let z=L+R;return r!==void 0&&z<=r?z=r:s!==void 0&&z>=s&&(z=s),n(z),z})}function g(R=.1){C(m.current*R)}function y(R=.1){C(-m.current*R)}function N(){h(!0)}function _(R){C(R-p),h(!1)}const I=x,S=r!==void 0&&s!==void 0&&p!==void 0&&s!==r?(p-r)/(s-r)*100:-1,T=S!==-1?`linear-gradient(90deg,#4772b3 ${S}%, #545454 ${S}%)`:"";return d?v.jsx(Xt,{className:"w-full",placeholder:e,value:p,allowOnlyNumbers:!0,onChange:R=>_(R),ref:a}):v.jsxs("div",{className:re("flex items-center gap-0 group/lightParentGroupBasedHover w-max rounded-md bg-primary-gray",o),style:T!==""?{background:T}:{},ref:a,children:[v.jsx(ot,{color:"lightParentGroupBasedHover",className:"h-[44px] rounded-r-none w-[30px] p-0 shrink-0 bg-transparent",onClick:()=>y(.1),"aria-label":`Decrement ${e}`,applyHoverStyles:!I,children:v.jsx($m,{})}),v.jsxs(ot,{color:"lightParentGroupBasedHover",className:"h-[44px] rounded-none pl-1.5 pr-0 flex-1 justify-between grid grid-cols-[repeat(2,auto)] bg-transparent",applyHoverStyles:!I,ref:w,children:[v.jsx("span",{className:"truncate text-left",children:e}),v.jsx("span",{className:"truncate",children:p.toFixed(4)})]}),v.jsx(ot,{color:"lightParentGroupBasedHover",className:"h-[44px] rounded-l-none w-[30px] p-0 shrink-0 bg-transparent",onClick:()=>g(.1),"aria-label":`Increment ${e}`,applyHoverStyles:!I,children:v.jsx(Qa,{})})]})});Xn.displayName="SliderNumberInput";const Ja=({subItems:e,onItemClick:t,className:n})=>{const[o,r]=k.useState(null),s=i=>{i.onClick&&i.onClick(),t&&t(i)};return v.jsx("ul",{className:re("min-w-48 bg-[#181818] border border-none rounded-md shadow-lg py-1",n),children:e.map((i,a)=>v.jsxs("li",{className:"relative",children:[i.separator&&a>0&&v.jsx("div",{className:"border-t border-gray-600 m-0"}),v.jsxs("div",{className:re("flex items-center justify-between gap-2 px-3 py-1.25 hover:bg-[#3F3F3F] cursor-pointer","transition-colors duration-150"),onClick:()=>s(i),onMouseEnter:()=>r(i.id),onMouseLeave:()=>r(null),children:[v.jsxs("div",{className:"flex items-center gap-2",children:[i.icon&&v.jsx("span",{className:"text-primary-white w-3 h-3 flex items-center justify-center",children:i.icon}),v.jsx("span",{className:"text-sm leading-3.5 text-primary-white font-main",children:i.label})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[i.shortcut&&v.jsx("span",{className:"text-sm leading-3.5 text-gray-400 font-mono",children:i.shortcut}),i.subItems&&i.subItems.length>0&&v.jsx(Qa,{className:"w-3 h-3 text-gray-400"})]})]}),i.subItems&&i.subItems.length>0&&o===i.id&&v.jsx("div",{className:"absolute left-full top-0 z-50",onMouseEnter:()=>r(i.id),onMouseLeave:()=>r(null),children:v.jsx(Ja,{subItems:i.subItems,onItemClick:t,className:"ml-1"})})]},i.id))})},el=({subItems:e,className:t,onItemClick:n})=>v.jsx("div",{className:re("relative",t),children:v.jsx(Ja,{subItems:e,onItemClick:n})});function tl({typeOfNodes:e,dispatch:t,setContextMenu:n,contextMenuPosition:o}){const r=Object.keys(e);if(r.length===0)return[];const s=r.map(i=>({id:`add-${i}`,label:e[i].name,onClick:()=>{t({type:"ADD_NODE",payload:{type:i,position:o}}),n({isOpen:!1,position:{x:0,y:0}})}}));return[{id:"add-node",label:"Add Node",icon:k.createElement(jm,{className:"w-4 h-4"}),subItems:s}]}const ae=["circle","square","rectangle","list","grid","diamond","trapezium","hexagon","star","cross","zigzag","sparkle","parallelogram"],fe={[ae[0]]:ae[0],[ae[1]]:ae[1],[ae[2]]:ae[2],[ae[3]]:ae[3],[ae[4]]:ae[4],[ae[5]]:ae[5],[ae[6]]:ae[6],[ae[7]]:ae[7],[ae[8]]:ae[8],[ae[9]]:ae[9],[ae[10]]:ae[10],[ae[11]]:ae[11],[ae[12]]:ae[12]},Zn=(e,t,n,o="black",r=2)=>v.jsxs("div",{className:re("relative",n),children:[v.jsx("div",{className:"absolute",style:{top:-r,left:-r,right:-r,bottom:-r,backgroundColor:o,clipPath:e}}),v.jsx("div",{className:"absolute inset-0",style:{backgroundColor:t,clipPath:e}})]}),nl=(e=fe.circle,t="#A1A1A1",n)=>{const o="border-2 border-black",r="border-1 border-black",s={backgroundColor:t};switch(e){case fe.circle:return v.jsx("div",{className:re("w-6 h-6 rounded-full",o,n),style:s});case fe.square:return v.jsx("div",{className:re("w-6 h-6",o,n),style:s});case fe.rectangle:return v.jsx("div",{className:re("w-4 h-8",o,n),style:s});case fe.list:return v.jsx("div",{className:re("w-6 h-6 flex flex-col justify-center gap-0.5",n),children:[0,1,2].map(i=>v.jsx("div",{className:re("w-full h-2",r),style:s},i))});case fe.grid:return v.jsx("div",{className:re("w-6 h-6 grid grid-cols-2 gap-0.5",n),children:[0,1,2,3].map(i=>v.jsx("div",{className:re("w-full h-full",r),style:s},i))});case fe.diamond:return v.jsx("div",{className:re("w-6 h-6 rotate-45",o,n),style:s});case fe.trapezium:return Zn("polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",t,re("w-6 h-6",n));case fe.hexagon:return Zn("polygon(-50% 50%,50% 100%,150% 50%,50% 0)",t,re("w-5 h-6",n));case fe.star:return Zn("polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)",t,re("w-6 h-6",n));case fe.cross:return v.jsxs("div",{className:re("w-6 h-6 relative",n),children:[v.jsx("div",{className:re("absolute top-1/2 left-0 w-full h-2 -translate-y-1/2",r),style:s}),v.jsx("div",{className:re("absolute left-1/2 top-0 w-2 h-full -translate-x-1/2",r),style:s})]});case fe.zigzag:return v.jsx("div",{className:re("w-6 h-6",n),style:{...s,"--a":"90deg","--s":"24px","--b":"4px",width:"calc(var(--b) + var(--s)/(2*tan(var(--a)/2)))",minHeight:"24px","--_g":"100% var(--s) repeat-y conic-gradient(from calc(90deg - var(--a)/2) at left, #0000, #000 1deg calc(var(--a) - 1deg), #0000 var(--a))",mask:"var(--b) 50%/var(--_g) exclude, 0 50%/var(--_g)",border:"2px solid black"}});case fe.sparkle:return v.jsx("div",{className:re("w-6 h-6",n),style:{...s,mask:"radial-gradient(#0000 71%, #000 72%) 10000% 10000%/99.5% 99.5%",border:"2px solid black"}});case fe.parallelogram:return Zn("polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%)",t,re("w-6 h-6",n));default:return v.jsx("div",{className:re("w-6 h-6 rounded-full",o,n),style:s})}},Un=k.forwardRef(({type:e,position:t,id:n,color:o,shape:r=fe.circle,isCurrentlyInsideReactFlow:s=!1,className:i,...a},l)=>s?v.jsx(Gt,{type:e,position:t,id:n,className:re("!w-6 !h-6 !border-none !bg-transparent !pointer-events-auto",i),style:{backgroundColor:"transparent"},...a,ref:l,children:v.jsx("div",{className:"pointer-events-none",children:nl(r,o||"#A1A1A1",i)})}):v.jsx("div",{className:re("absolute",t===U.Right&&"right-0 top-1/2 -translate-y-1/2 translate-x-1/2",t===U.Left&&"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"),...a,ref:l,children:nl(r,o||"#A1A1A1",i)}));Un.displayName="ContextAwareHandle";const ol=({input:e})=>{const t=mt(),n=Yn();return e.type==="string"?v.jsx(Xt,{placeholder:e.name,value:e.value,onChange:o=>{e.onChange?.(o),t.setNodes(r=>r.map(s=>s.id===n?{...s,data:Zr(e.id,s.data,o)}:s))},allowOnlyNumbers:!1,className:"w-full"}):v.jsx(Xn,{name:e.name,value:e.value,onChange:o=>{e.onChange?.(o),t.setNodes(r=>r.map(s=>s.id===n?{...s,data:Zr(e.id,s.data,o)}:s))},className:"w-full"})},rl=({input:e,isCurrentlyInsideReactFlow:t})=>t?v.jsx(ol,{input:e}):e.type==="string"?v.jsx(Xt,{placeholder:e.name,value:e.value,onChange:e.onChange,allowOnlyNumbers:!1,className:"w-full"}):v.jsx(Xn,{name:e.name,value:e.value,onChange:e.onChange,className:"w-full"}),lr=k.forwardRef(({input:e,isCurrentlyInsideReactFlow:t,hide:n=!1},o)=>{const r=t?tm({handleId:e.id}):[],s=t&&r.some(a=>a.targetHandle===e.id),i=e.allowInput&&!s;return v.jsxs("div",{ref:o,className:re("text-primary-white text-[27px] leading-[27px] font-main relative px-6 flex flex-row py-3",n&&"h-0 overflow-hidden py-0",i&&"py-1"),children:[v.jsx(Un,{type:"target",position:U.Left,id:e.id,color:e.handleColor,shape:e.handleShape,isCurrentlyInsideReactFlow:t}),v.jsxs("div",{className:"flex-1 flex items-center gap-3",children:[!i&&v.jsx("div",{className:"truncate",children:e.name}),i&&v.jsx("div",{className:"flex-1 w-full",children:v.jsx(rl,{input:e,isCurrentlyInsideReactFlow:t})})]})]},e.id)});lr.displayName="RenderInput";const sl=k.forwardRef(({output:e,isCurrentlyInsideReactFlow:t},n)=>v.jsxs("div",{ref:n,className:"text-primary-white text-[27px] leading-[27px] font-main relative px-6 flex flex-row justify-end py-3",children:[v.jsx("div",{className:"truncate text-right",children:e.name}),v.jsx(Un,{type:"source",position:U.Right,id:e.id,color:e.handleColor,shape:e.handleShape,isCurrentlyInsideReactFlow:t})]},e.id));sl.displayName="RenderOutput";const il=k.forwardRef(({panel:e,isCurrentlyInsideReactFlow:t,isOpen:n,onToggle:o},r)=>v.jsxs("div",{ref:r,className:"flex flex-col",children:[v.jsxs(ot,{onClick:s=>{s.stopPropagation(),s.preventDefault(),o()},className:"bg-transparent border-none hover:bg-primary-gray rounded-none justify-start",children:[n?v.jsx(Lm,{className:"w-6 h-6 flex-shrink-0 mr-2"}):v.jsx(zm,{className:"w-6 h-6 flex-shrink-0 mr-2"}),v.jsx("span",{className:"truncate",children:e.name})]}),v.jsx("div",{className:re("flex flex-col bg-[#272727]",!n&&"h-0 overflow-hidden"),children:e.inputs.map(s=>v.jsx(lr,{input:s,isCurrentlyInsideReactFlow:t,hide:!n},s.id))})]},e.id));il.displayName="RenderInputPanel";const cr=k.forwardRef(({name:e="Node",headerColor:t="#79461D",inputs:n=[],outputs:o=[],isCurrentlyInsideReactFlow:r=!1,className:s,nodeResizerProps:i={},...a},l)=>{const[c,d]=k.useState(new Set),h=u=>{d(f=>{const p=new Set(f);return p.has(u)?p.delete(u):p.add(u),p})};return v.jsxs("div",{tabIndex:0,className:re("flex flex-col gap-0 rounded-md w-max border-[1.5px] border-transparent focus:border-white",s),...a,ref:l,children:[v.jsx("div",{className:`text-primary-white text-left text-[27px] leading-[27px] font-main \\
|
|
106
|
+
py-2 px-4 transition-all rounded-t-md truncate`,style:{backgroundColor:t},children:e}),v.jsxs("div",{className:"min-h-[50px] rounded-b-md bg-primary-dark-gray",children:[r&&v.jsx(Za,{...i}),v.jsx("div",{className:"flex flex-col py-4",children:o.map(u=>v.jsx(sl,{output:u,isCurrentlyInsideReactFlow:r},u.id))}),v.jsx("div",{className:"flex flex-col py-4",children:n.map(u=>{if("inputs"in u){const f=c.has(u.id);return v.jsx(il,{panel:u,isCurrentlyInsideReactFlow:r,isOpen:f,onToggle:()=>h(u.id)},u.id)}else return v.jsx(lr,{input:u,isCurrentlyInsideReactFlow:r},u.id)})})]})]})});cr.displayName="ConfigurableNode";const ur=k.forwardRef(({data:e={}},t)=>v.jsx(cr,{isCurrentlyInsideReactFlow:!0,className:"w-full",...e,ref:t}));ur.displayName="ConfigurableNodeReactFlowWrapper";const al=({fromX:e,fromY:t,toX:n,toY:o,fromPosition:r,toPosition:s})=>{const{fromHandle:i}=La(),a=sr(i?.nodeId||""),l=k.useMemo(()=>!i?.id||!a?.data?void 0:po(i?.id,a?.data)?.handleColor??"#A1A1A1",[i?.id,a?.data]),[c]=zn({sourceX:e,sourceY:t,sourcePosition:r,targetX:n,targetY:o,targetPosition:s});return v.jsx(yt,{path:c,className:"!stroke-7 in-[g.selected]:brightness-150",style:{stroke:l||"#A1A1A1"},focusable:!0})};al.displayName="ConfigurableConnection";var ll=Symbol.for("immer-nothing"),cl=Symbol.for("immer-draftable"),be=Symbol.for("immer-state"),Hm=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ye(e,...t){if(process.env.NODE_ENV!=="production"){const n=Hm[e],o=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xt=Object.getPrototypeOf;function wt(e){return!!e&&!!e[be]}function qe(e){return e?ul(e)||Array.isArray(e)||!!e[cl]||!!e.constructor?.[cl]||Ut(e)||Qn(e):!1}var Rm=Object.prototype.constructor.toString();function ul(e){if(!e||typeof e!="object")return!1;const t=xt(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Rm}function qn(e,t){Kn(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function Kn(e){const t=e[be];return t?t.type_:Array.isArray(e)?1:Ut(e)?2:Qn(e)?3:0}function dr(e,t){return Kn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function dl(e,t,n){const o=Kn(e);o===2?e.set(t,n):o===3?e.add(n):e[t]=n}function Vm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ut(e){return e instanceof Map}function Qn(e){return e instanceof Set}function Ke(e){return e.copy_||e.base_}function fr(e,t){if(Ut(e))return new Map(e);if(Qn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ul(e);if(t===!0||t==="class_only"&&!n){const o=Object.getOwnPropertyDescriptors(e);delete o[be];let r=Reflect.ownKeys(o);for(let s=0;s<r.length;s++){const i=r[s],a=o[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(o[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(xt(e),o)}else{const o=xt(e);if(o!==null&&n)return{...e};const r=Object.create(o);return Object.assign(r,e)}}function hr(e,t=!1){return eo(e)||wt(e)||!qe(e)||(Kn(e)>1&&Object.defineProperties(e,{set:{value:Jn},add:{value:Jn},clear:{value:Jn},delete:{value:Jn}}),Object.freeze(e),t&&Object.values(e).forEach(n=>hr(n,!0))),e}function Jn(){ye(2)}function eo(e){return Object.isFrozen(e)}var Bm={};function Qe(e){const t=Bm[e];return t||ye(0,e),t}var qt;function fl(){return qt}function Fm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hl(e,t){t&&(Qe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pr(e){gr(e),e.drafts_.forEach(Ym),e.drafts_=null}function gr(e){e===qt&&(qt=e.parent_)}function pl(e){return qt=Fm(qt,e)}function Ym(e){const t=e[be];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gl(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[be].modified_&&(pr(t),ye(4)),qe(e)&&(e=to(t,e),t.parent_||no(t,e)),t.patches_&&Qe("Patches").generateReplacementPatches_(n[be].base_,e,t.patches_,t.inversePatches_)):e=to(t,n,[]),pr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ll?e:void 0}function to(e,t,n){if(eo(t))return t;const o=t[be];if(!o)return qn(t,(r,s)=>ml(e,o,t,r,s,n)),t;if(o.scope_!==e)return t;if(!o.modified_)return no(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const r=o.copy_;let s=r,i=!1;o.type_===3&&(s=new Set(r),r.clear(),i=!0),qn(s,(a,l)=>ml(e,o,r,a,l,n,i)),no(e,r,!1),n&&e.patches_&&Qe("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function ml(e,t,n,o,r,s,i){if(process.env.NODE_ENV!=="production"&&r===n&&ye(5),wt(r)){const a=s&&t&&t.type_!==3&&!dr(t.assigned_,o)?s.concat(o):void 0,l=to(e,r,a);if(dl(n,o,l),wt(l))e.canAutoFreeze_=!1;else return}else i&&n.add(r);if(qe(r)&&!eo(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;to(e,r),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&(Ut(n)?n.has(o):Object.prototype.propertyIsEnumerable.call(n,o))&&no(e,r)}}function no(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hr(t,n)}function Wm(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:fl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,s=mr;n&&(r=[o],s=Kt);const{revoke:i,proxy:a}=Proxy.revocable(r,s);return o.draft_=a,o.revoke_=i,a}var mr={get(e,t){if(t===be)return e;const n=Ke(e);if(!dr(n,t))return Gm(e,n,t);const o=n[t];return e.finalized_||!qe(o)?o:o===yr(e.base_,t)?(wr(e),e.copy_[t]=br(o,e)):o},has(e,t){return t in Ke(e)},ownKeys(e){return Reflect.ownKeys(Ke(e))},set(e,t,n){const o=yl(Ke(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const r=yr(Ke(e),t),s=r?.[be];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Vm(n,r)&&(n!==void 0||dr(e.base_,t)))return!0;wr(e),xr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return yr(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,wr(e),xr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ke(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:n[t]}},defineProperty(){ye(11)},getPrototypeOf(e){return xt(e.base_)},setPrototypeOf(){ye(12)}},Kt={};qn(mr,(e,t)=>{Kt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Kt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ye(13),Kt.set.call(this,e,t,void 0)},Kt.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ye(14),mr.set.call(this,e[0],t,n,e[0])};function yr(e,t){const n=e[be];return(n?Ke(n):e)[t]}function Gm(e,t,n){const o=yl(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function yl(e,t){if(!(t in e))return;let n=xt(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=xt(n)}}function xr(e){e.modified_||(e.modified_=!0,e.parent_&&xr(e.parent_))}function wr(e){e.copy_||(e.copy_=fr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xm=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,o)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(l=s,...c){return i.produce(l,d=>n.call(this,d,...c))}}typeof n!="function"&&ye(6),o!==void 0&&typeof o!="function"&&ye(7);let r;if(qe(t)){const s=pl(this),i=br(t,void 0);let a=!0;try{r=n(i),a=!1}finally{a?pr(s):gr(s)}return hl(s,o),gl(r,s)}else if(!t||typeof t!="object"){if(r=n(t),r===void 0&&(r=t),r===ll&&(r=void 0),this.autoFreeze_&&hr(r,!0),o){const s=[],i=[];Qe("Patches").generateReplacementPatches_(t,r,s,i),o(s,i)}return r}else ye(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,l=>t(l,...a));let o,r;return[this.produce(t,n,(i,a)=>{o=i,r=a}),o,r]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){qe(e)||ye(8),wt(e)&&(e=Zm(e));const t=pl(this),n=br(e,void 0);return n[be].isManual_=!0,gr(t),n}finishDraft(e,t){const n=e&&e[be];(!n||!n.isManual_)&&ye(9);const{scope_:o}=n;return hl(o,t),gl(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}n>-1&&(t=t.slice(n+1));const o=Qe("Patches").applyPatches_;return wt(e)?o(e,t):this.produce(e,r=>o(r,t))}};function br(e,t){const n=Ut(e)?Qe("MapSet").proxyMap_(e,t):Qn(e)?Qe("MapSet").proxySet_(e,t):Wm(e,t);return(t?t.scope_:fl()).drafts_.push(n),n}function Zm(e){return wt(e)||ye(10,e),xl(e)}function xl(e){if(!qe(e)||eo(e))return e;const t=e[be];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=fr(e,t.scope_.immer_.useStrictShallowCopy_)}else n=fr(e,!0);return qn(n,(o,r)=>{dl(n,o,xl(r))}),t&&(t.finalized_=!1),n}var Um=new Xm,qm=Um.produce;function Qt(e){const t=[];for(let o=0;o<Math.floor(e/8);o++)t.push(Math.random().toString(36).substring(2,10));return t.push(Math.random().toString(36).substring(2,e%8+2)),t.join("")}const vr=20;function _r(e,t){const n=t[e.dataType];return n.underlyingType==="number"?{id:Qt(vr),name:e.name,handleColor:n.color,allowInput:e.allowInput,type:"number"}:{id:Qt(vr),name:e.name,handleColor:n.color,allowInput:e.allowInput,type:"string"}}function Km(e,t){const n=Qt(vr),o=e.inputs.map(r=>_r(r,t));return{id:n,name:e.name,inputs:o}}function Qm(e,t,n,o,r){const s=n[t],i=s.inputs.map(l=>"inputs"in l?Km(l,e):_r(l,e)),a=s.outputs.map(l=>_r(l,e));return{id:o,position:r,sourcePosition:U.Right,targetPosition:U.Left,type:"configurableNode",width:400,data:{name:s.name,headerColor:s.headerColor,inputs:i,outputs:a}}}const wl=20,Re=["ADD_NODE","UPDATE_NODE_BY_REACT_FLOW","UPDATE_EDGES_BY_REACT_FLOW","ADD_EDGE_BY_REACT_FLOW","UPDATE_INPUT_VALUE"],Je={[Re[0]]:Re[0],[Re[1]]:Re[1],[Re[2]]:Re[2],[Re[3]]:Re[3]};function Jm(e,t){return qm(e,o=>{switch(t.type){case Je.ADD_NODE:const r=t.payload.type,s=Qt(wl),i=t.payload.position,a=Qm(o.dataTypes,r,o.typeOfNodes,s,i);o.nodes.push(a);break;case Je.UPDATE_NODE_BY_REACT_FLOW:const l=t.payload.changes;o.nodes=ta(l,o.nodes);break;case Je.UPDATE_EDGES_BY_REACT_FLOW:const c=t.payload.changes;o.edges=na(c,o.edges);break;case Je.ADD_EDGE_BY_REACT_FLOW:const h={...t.payload.edge,type:"configurableEdge",id:Qt(wl)};o.edges=hi(h,o.edges);break}})}const ey={configurableNode:ur},ty={configurableEdge:ar};function ny(e){const[t,n]=k.useReducer(Jm,e);return{state:t,dispatch:n}}function oy({state:e,dispatch:t}){const[n,o]=k.useState({isOpen:!1,position:{x:0,y:0}}),{screenToFlowPosition:r}=mt(),s=tl({typeOfNodes:e.typeOfNodes,dispatch:t,setContextMenu:o,contextMenuPosition:r(n.position)}),i=k.useCallback(l=>{l.preventDefault(),o({isOpen:!0,position:{x:l.clientX,y:l.clientY}})},[]),a=k.useCallback(()=>{o({isOpen:!1,position:{x:0,y:0}})},[]);return v.jsxs("div",{style:{width:"100%",height:"100%"},children:[v.jsxs(Qg,{nodes:e.nodes,edges:e.edges,onNodesChange:l=>t({type:Je.UPDATE_NODE_BY_REACT_FLOW,payload:{changes:l}}),onEdgesChange:l=>t({type:Je.UPDATE_EDGES_BY_REACT_FLOW,payload:{changes:l}}),onConnect:l=>t({type:Je.ADD_EDGE_BY_REACT_FLOW,payload:{edge:l}}),fitView:!0,fitViewOptions:{maxZoom:.5,minZoom:.1},maxZoom:1,minZoom:.1,proOptions:{hideAttribution:!0},colorMode:"dark",selectNodesOnDrag:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectionMode:ct.Partial,nodeTypes:ey,edgeTypes:ty,deleteKeyCode:["Backspace","Delete","x"],connectionLineComponent:al,onContextMenu:i,onClick:a,children:[v.jsx(hm,{}),v.jsx(im,{}),v.jsx(Nm,{pannable:!0})]}),n.isOpen&&v.jsx("div",{style:{position:"absolute",top:n.position.y,left:n.position.x,zIndex:10},onClick:l=>l.stopPropagation(),children:v.jsx(el,{subItems:s})})]})}function ry({state:e,dispatch:t}){return v.jsx(Ba,{children:v.jsx(oy,{state:e,dispatch:t})})}se.Button=ot,se.ConfigurableEdge=ar,se.ConfigurableNode=cr,se.ConfigurableNodeReactFlowWrapper=ur,se.ContextAwareHandle=Un,se.ContextAwareInput=rl,se.ContextMenu=el,se.FullGraph=ry,se.Input=Xt,se.NodeResizerWithMoreControls=Za,se.ReactFlowAwareInput=ol,se.SliderNumberInput=Xn,se.cn=re,se.convertStringToNumber=Ur,se.createNodeContextMenu=tl,se.handleShapesMap=fe,se.isCoordinateInBox=sn,se.isNumberInRange=go,se.sanitizeNumberToShowAsText=mo,se.useClickedOutside=Xa,se.useDrag=Ua,se.useFullGraph=ny,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
107
|
+
//# sourceMappingURL=react-blender-nodes.umd.js.map
|