localcloud-studio 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +75 -2
- package/dist/assets/index-BnJT_hp1.js +1716 -0
- package/dist/assets/index-BzLvsZEk.css +1 -0
- package/dist/index.html +16 -0
- package/dist-server/cli.cjs +59054 -0
- package/package.json +71 -4
|
@@ -0,0 +1,1716 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function M0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $0={exports:{}},Hc={};/**
|
|
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 D2=Symbol.for("react.transitional.element"),z2=Symbol.for("react.fragment");function O0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var l in t)l!=="key"&&(n[l]=t[l])}else n=t;return t=n.ref,{$$typeof:D2,type:e,key:a,ref:t!==void 0?t:null,props:n}}Hc.Fragment=z2;Hc.jsx=O0;Hc.jsxs=O0;$0.exports=Hc;var c=$0.exports,D0={exports:{}},ae={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.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 pp=Symbol.for("react.transitional.element"),R2=Symbol.for("react.portal"),H2=Symbol.for("react.fragment"),B2=Symbol.for("react.strict_mode"),L2=Symbol.for("react.profiler"),V2=Symbol.for("react.consumer"),U2=Symbol.for("react.context"),I2=Symbol.for("react.forward_ref"),q2=Symbol.for("react.suspense"),G2=Symbol.for("react.memo"),z0=Symbol.for("react.lazy"),Y2=Symbol.for("react.activity"),P2=Symbol.for("react.view_transition"),oh=Symbol.iterator;function X2(e){return e===null||typeof e!="object"?null:(e=oh&&e[oh]||e["@@iterator"],typeof e=="function"?e:null)}var R0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H0=Object.assign,B0={};function Gs(e,t,n){this.props=e,this.context=t,this.refs=B0,this.updater=n||R0}Gs.prototype.isReactComponent={};Gs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function L0(){}L0.prototype=Gs.prototype;function mp(e,t,n){this.props=e,this.context=t,this.refs=B0,this.updater=n||R0}var hp=mp.prototype=new L0;hp.constructor=mp;H0(hp,Gs.prototype);hp.isPureReactComponent=!0;var ch=Array.isArray;function Md(){}var ke={H:null,A:null,T:null,S:null},V0=Object.prototype.hasOwnProperty;function gp(e,t,n){var a=n.ref;return{$$typeof:pp,type:e,key:t,ref:a!==void 0?a:null,props:n}}function Z2(e,t){return gp(e.type,t,e.props)}function yp(e){return typeof e=="object"&&e!==null&&e.$$typeof===pp}function Q2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var uh=/\/+/g;function Cu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q2(""+e.key):t.toString(36)}function K2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Md,Md):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Yl(e,t,n,a,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case pp:case R2:i=!0;break;case z0:return i=e._init,Yl(i(e._payload),t,n,a,l)}}if(i)return l=l(e),i=a===""?"."+Cu(e,0):a,ch(l)?(n="",i!=null&&(n=i.replace(uh,"$&/")+"/"),Yl(l,t,n,"",function(u){return u})):l!=null&&(yp(l)&&(l=Z2(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(uh,"$&/")+"/")+i)),t.push(l)),1;i=0;var r=a===""?".":a+":";if(ch(e))for(var o=0;o<e.length;o++)a=e[o],s=r+Cu(a,o),i+=Yl(a,t,n,s,l);else if(o=X2(e),typeof o=="function")for(e=o.call(e),o=0;!(a=e.next()).done;)a=a.value,s=r+Cu(a,o++),i+=Yl(a,t,n,s,l);else if(s==="object"){if(typeof e.then=="function")return Yl(K2(e),t,n,a,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return i}function Dr(e,t,n){if(e==null)return e;var a=[],l=0;return Yl(e,a,"","",function(s){return t.call(n,s,l++)}),a}function F2(e){if(e._status===-1){var t=e._result,n=t();n.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a,n.status===void 0&&(n.status="fulfilled",n.value=a))},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a,n.status===void 0&&(n.status="rejected",n.reason=a))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var dh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function U0(e){var t=ke.T,n={};n.types=t!==null?t.types:null,ke.T=n;try{var a=e(),l=ke.S;l!==null&&l(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(Md,dh)}catch(s){dh(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),ke.T=t}}function I0(e){var t=ke.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else U0(I0.bind(null,e))}var J2={map:Dr,forEach:function(e,t,n){Dr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Dr(e,function(){t++}),t},toArray:function(e){return Dr(e,function(t){return t})||[]},only:function(e){if(!yp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Activity=Y2;ae.Children=J2;ae.Component=Gs;ae.Fragment=H2;ae.Profiler=L2;ae.PureComponent=mp;ae.StrictMode=B2;ae.Suspense=q2;ae.ViewTransition=P2;ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ke;ae.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ke.H.useMemoCache(e)}};ae.addTransitionType=I0;ae.cache=function(e){return function(){return e.apply(null,arguments)}};ae.cacheSignal=function(){return null};ae.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=H0({},e.props),l=e.key;if(t!=null)for(s in t.key!==void 0&&(l=""+t.key),t)!V0.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var i=Array(s),r=0;r<s;r++)i[r]=arguments[r+2];a.children=i}return gp(e.type,l,a)};ae.createContext=function(e){return e={$$typeof:U2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:V2,_context:e},e};ae.createElement=function(e,t,n){var a,l={},s=null;if(t!=null)for(a in t.key!==void 0&&(s=""+t.key),t)V0.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(l[a]=t[a]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var r=Array(i),o=0;o<i;o++)r[o]=arguments[o+2];l.children=r}if(e&&e.defaultProps)for(a in i=e.defaultProps,i)l[a]===void 0&&(l[a]=i[a]);return gp(e,s,l)};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:I2,render:e}};ae.isValidElement=yp;ae.lazy=function(e){return{$$typeof:z0,_payload:{_status:-1,_result:e},_init:F2}};ae.memo=function(e,t){return{$$typeof:G2,type:e,compare:t===void 0?null:t}};ae.startTransition=U0;ae.unstable_useCacheRefresh=function(){return ke.H.useCacheRefresh()};ae.use=function(e){return ke.H.use(e)};ae.useActionState=function(e,t,n){return ke.H.useActionState(e,t,n)};ae.useCallback=function(e,t){return ke.H.useCallback(e,t)};ae.useContext=function(e){return ke.H.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e,t){return ke.H.useDeferredValue(e,t)};ae.useEffect=function(e,t){return ke.H.useEffect(e,t)};ae.useEffectEvent=function(e){return ke.H.useEffectEvent(e)};ae.useId=function(){return ke.H.useId()};ae.useImperativeHandle=function(e,t,n){return ke.H.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return ke.H.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return ke.H.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return ke.H.useMemo(e,t)};ae.useOptimistic=function(e,t){return ke.H.useOptimistic(e,t)};ae.useReducer=function(e,t,n){return ke.H.useReducer(e,t,n)};ae.useRef=function(e){return ke.H.useRef(e)};ae.useState=function(e){return ke.H.useState(e)};ae.useSyncExternalStore=function(e,t,n){return ke.H.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return ke.H.useTransition()};ae.version="19.3.1";D0.exports=ae;var R=D0.exports;const ho=M0(R);var q0={exports:{}},Bc={},G0={exports:{}},Y0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(j,z){var D=j.length;j.push(z);e:for(;0<D;){var C=D-1>>>1,E=j[C];if(0<l(E,z))j[C]=z,j[D]=E,D=C;else break e}}function n(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var z=j[0],D=j.pop();if(D!==z){j[0]=D;e:for(var C=0,E=j.length,$=E>>>1;C<$;){var L=2*(C+1)-1,P=j[L],G=L+1,K=j[G];if(0>l(P,D))G<E&&0>l(K,P)?(j[C]=K,j[G]=D,C=G):(j[C]=P,j[L]=D,C=L);else if(G<E&&0>l(K,D))j[C]=K,j[G]=D,C=G;else break e}}return z}function l(j,z){var D=j.sortIndex-z.sortIndex;return D!==0?D:j.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,r=i.now();e.unstable_now=function(){return i.now()-r}}var o=[],u=[],d=1,f=null,p=3,h=!1,y=!1,b=!1,x=!1,m=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function v(j){for(var z=n(u);z!==null;){if(z.callback===null)a(u);else if(z.startTime<=j)a(u),z.sortIndex=z.expirationTime,t(o,z);else break;z=n(u)}}function w(j){if(b=!1,v(j),!y)if(n(o)!==null)y=!0,N||(N=!0,V());else{var z=n(u);z!==null&&M(w,z.startTime-j)}}var N=!1,S=-1,A=5,k=-1;function H(){return x?!0:!(e.unstable_now()-k<A)}function O(){if(x=!1,N){var j=e.unstable_now();k=j;var z=!0;try{e:{y=!1,b&&(b=!1,_(S),S=-1),h=!0;var D=p;try{t:{for(v(j),f=n(o);f!==null&&!(f.expirationTime>j&&H());){var C=f.callback;if(typeof C=="function"){f.callback=null,p=f.priorityLevel;var E=C(f.expirationTime<=j);if(j=e.unstable_now(),typeof E=="function"){f.callback=E,v(j),z=!0;break t}f===n(o)&&a(o),v(j)}else a(o);f=n(o)}if(f!==null)z=!0;else{var $=n(u);$!==null&&M(w,$.startTime-j),z=!1}}break e}finally{f=null,p=D,h=!1}z=void 0}}finally{z?V():N=!1}}}var V;if(typeof g=="function")V=function(){g(O)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,T=U.port2;U.port1.onmessage=O,V=function(){T.postMessage(null)}}else V=function(){m(O,0)};function M(j,z){S=m(function(){j(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(j){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var D=p;p=z;try{return j()}finally{p=D}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(j,z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=p;p=j;try{return z()}finally{p=D}},e.unstable_scheduleCallback=function(j,z,D){var C=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?C+D:C):D=C,j){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=D+E,j={id:d++,callback:z,priorityLevel:j,startTime:D,expirationTime:E,sortIndex:-1},D>C?(j.sortIndex=D,t(u,j),n(o)===null&&j===n(u)&&(b?(_(S),S=-1):b=!0,M(w,D-C))):(j.sortIndex=E,t(o,j),y||h||(y=!0,N||(N=!0,V()))),j},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(j){var z=p;return function(){var D=p;p=z;try{return j.apply(this,arguments)}finally{p=D}}}})(Y0);G0.exports=Y0;var W2=G0.exports,P0={exports:{}},pt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var eS=R;function X0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function oa(){}var yt={d:{f:oa,r:function(){throw Error(X0(522))},D:oa,C:oa,L:oa,m:oa,X:oa,S:oa,M:oa},p:0,findDOMNode:null},tS=Symbol.for("react.portal"),nS=Symbol.for("react.recoverable"),fh=Symbol.for("react.optimistic_key");function aS(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tS,key:a==null?null:a===fh?fh:""+a,children:e,containerInfo:t,implementation:n}}var xi=eS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Lc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=yt;pt.browser=function(e){return{$$typeof:nS,_reason:e}};pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(X0(299));return aS(e,t,null,n)};pt.flushSync=function(e){var t=xi.T,n=yt.p;try{if(xi.T=null,yt.p=2,e)return e()}finally{xi.T=t,yt.p=n,yt.d.f()}};pt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,yt.d.C(e,t))};pt.prefetchDNS=function(e){typeof e=="string"&&yt.d.D(e)};pt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Lc(n,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:l,fetchPriority:s}):n==="script"&&yt.d.X(e,{crossOrigin:a,integrity:l,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};pt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Lc(t.as,t.crossOrigin);yt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&yt.d.M(e)};pt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=Lc(n,t.crossOrigin);yt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};pt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Lc(t.as,t.crossOrigin);yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else yt.d.m(e)};pt.requestFormReset=function(e){yt.d.r(e)};pt.unstable_batchedUpdates=function(e,t){return e(t)};pt.useFormState=function(e,t,n){return xi.H.useFormState(e,t,n)};pt.useFormStatus=function(){return xi.H.useHostTransitionStatus()};pt.version="19.3.1";function Z0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Z0)}catch(e){console.error(e)}}Z0(),P0.exports=pt;var lS=P0.exports;/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Qe=W2,Q0=R,sS=lS;function q(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function K0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function pr(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function F0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function J0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ph(e){if(pr(e)!==e)throw Error(q(188))}function iS(e){var t=e.alternate;if(!t){if(t=pr(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var s=l.alternate;if(s===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===s.child){for(s=l.child;s;){if(s===n)return ph(l),e;if(s===a)return ph(l),t;s=s.sibling}throw Error(q(188))}if(n.return!==a.return)n=l,a=s;else{for(var i=!1,r=l.child;r;){if(r===n){i=!0,n=l,a=s;break}if(r===a){i=!0,a=l,n=s;break}r=r.sibling}if(!i){for(r=s.child;r;){if(r===n){i=!0,n=s,a=l;break}if(r===a){i=!0,a=s,n=l;break}r=r.sibling}if(!i)throw Error(q(189))}}if(n.alternate!==a)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function W0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=W0(e),t!==null)return t;e=e.sibling}return null}function Ct(e,t,n,a,l,s){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,a,l,s)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Ct(e.child,t,n,a,l,s))return!0;e=e.sibling}return!1}function Ol(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function mh(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function ev(e){var t=[null,null],n=Ol(e);return n===null||tv(t,e,n.child,{foundSelf:!1}),t}function tv(e,t,n,a){for(;n!==null;){if(n===t)a.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(a.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&tv(e,t,n.child,a))return!0;n=n.sibling}return!1}function Ze(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(q(559))}}var Ql=null,$d=null;function rS(e,t,n){return e===n?!0:e===t?(Ql=e,!0):!1}function oS(e,t,n){return e===n?($d=e,!1):e===t?($d!==null&&(Ql=e),!0):!1}function hh(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Od(e,t,n){for(var a=0,l=e;l;l=n(l))a++;l=0;for(var s=t;s;s=n(s))l++;for(;0<a-l;)e=n(e),a--;for(;0<l-a;)t=n(t),l--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Ce=Object.assign,cS=Symbol.for("react.element"),zr=Symbol.for("react.transitional.element"),pi=Symbol.for("react.portal"),Kl=Symbol.for("react.fragment"),nv=Symbol.for("react.strict_mode"),Dd=Symbol.for("react.profiler"),av=Symbol.for("react.consumer"),Nn=Symbol.for("react.context"),vp=Symbol.for("react.forward_ref"),zd=Symbol.for("react.suspense"),Rd=Symbol.for("react.suspense_list"),_p=Symbol.for("react.memo"),ya=Symbol.for("react.lazy"),Hd=Symbol.for("react.activity"),uS=Symbol.for("react.legacy_hidden"),dS=Symbol.for("react.memo_cache_sentinel"),Bd=Symbol.for("react.view_transition"),fS=Symbol.for("react.recoverable"),gh=Symbol.iterator;function ni(e){return e===null||typeof e!="object"?null:(e=gh&&e[gh]||e["@@iterator"],typeof e=="function"?e:null)}var pS=Symbol.for("react.client.reference");function Ld(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pS?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kl:return"Fragment";case Dd:return"Profiler";case nv:return"StrictMode";case zd:return"Suspense";case Rd:return"SuspenseList";case Hd:return"Activity";case Bd:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case pi:return"Portal";case Nn:return e.displayName||"Context";case av:return(e._context.displayName||"Context")+".Consumer";case vp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _p:return t=e.displayName||null,t!==null?t:Ld(e.type)||"Memo";case ya:t=e._payload,e=e._init;try{return Ld(e(t))}catch{}}return null}var mi=Array.isArray,ne=Q0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=sS.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ul={pending:!1,data:null,method:null,action:null},Vd=[],Fl=-1;function On(e){return{current:e}}function st(e){0>Fl||(e.current=Vd[Fl],Vd[Fl]=null,Fl--)}function je(e,t){Fl++,Vd[Fl]=e.current,e.current=t}var An=On(null),Bi=On(null),ka=On(null),Yo=On(null);function Po(e,t){switch(je(ka,t),je(Bi,e),je(An,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kg(t),e=Eb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}st(An),je(An,e)}function Ss(){st(An),st(Bi),st(ka)}function Ud(e){var t=e.memoizedState;t!==null&&(Os._currentValue=t.memoizedState,je(Yo,e)),t=An.current;var n=Eb(t,e.type);t!==n&&(je(Bi,e),je(An,n))}function Xo(e){Bi.current===e&&(st(An),st(Bi)),Yo.current===e&&(st(Yo),Os._currentValue=ul)}var Tu,yh;function ha(e){if(Tu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Tu=t&&t[1]||"",yh=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Tu+e+yh}var Au=!1;function ku(e,t){if(!e||Au)return"";Au=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(y){var p=y}Reflect.construct(e,[],f)}else{try{f.call()}catch(y){p=y}f=!1;try{var h=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),f=!0,new e}finally{f&&(h!==void 0?Object.defineProperty(e.prototype,"props",h):delete e.prototype.props)}}}else{try{throw Error()}catch(y){p=y}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(y){if(y&&p&&typeof y.stack=="string")return[y.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),i=s[0],r=s[1];if(i&&r){var o=i.split(`
|
|
44
|
+
`),u=r.split(`
|
|
45
|
+
`);for(l=a=0;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;for(;l<u.length&&!u[l].includes("DetermineComponentFrameRoot");)l++;if(a===o.length||l===u.length)for(a=o.length-1,l=u.length-1;1<=a&&0<=l&&o[a]!==u[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==u[l]){if(a!==1||l!==1)do if(a--,l--,0>l||o[a]!==u[l]){var d=`
|
|
46
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=a&&0<=l);break}}}finally{Au=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ha(n):""}function mS(e,t){switch(e.tag){case 26:case 27:case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return e.child!==t&&t!==null?ha("Suspense Fallback"):ha("Suspense");case 19:return ha("SuspenseList");case 0:case 15:return ku(e.type,!1);case 11:return ku(e.type.render,!1);case 1:return ku(e.type,!0);case 31:return ha("Activity");case 30:return ha("ViewTransition");default:return""}}function vh(e){try{var t="",n=null;do t+=mS(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var Id=Object.prototype.hasOwnProperty,bp=Qe.unstable_scheduleCallback,ju=Qe.unstable_cancelCallback,hS=Qe.unstable_shouldYield,gS=Qe.unstable_requestPaint,Dt=Qe.unstable_now,yS=Qe.unstable_getCurrentPriorityLevel,lv=Qe.unstable_ImmediatePriority,sv=Qe.unstable_UserBlockingPriority,Zo=Qe.unstable_NormalPriority,vS=Qe.unstable_LowPriority,iv=Qe.unstable_IdlePriority,_S=Qe.log,bS=Qe.unstable_setDisableYieldValue,mr=null,zt=null;function Sa(e){if(typeof _S=="function"&&bS(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(mr,e)}catch{}}var Rt=Math.clz32?Math.clz32:SS,xS=Math.log,wS=Math.LN2;function SS(e){return e>>>=0,e===0?32:31-(xS(e)/wS|0)|0}var Rr=256,Hr=262144,Br=4194304;function nl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Vc(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,s=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var r=a&134217727;return r!==0?(a=r&~s,a!==0?l=nl(a):(i&=r,i!==0?l=nl(i):n||(n=r&~e,n!==0&&(l=nl(n))))):(r=a&~s,r!==0?l=nl(r):i!==0?l=nl(i):n||(n=a&~e,n!==0&&(l=nl(n)))),l===0?0:t!==0&&t!==l&&!(t&s)&&(s=l&-l,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:l}function hr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rv(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Rt(n),l=1<<a;t|=e[a],n&=~l}return t}function NS(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ov(){var e=Br;return Br<<=1,!(Br&62914560)&&(Br=4194304),e}function Mu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ES(e,t,n,a,l,s){var i=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,o=e.expirationTimes,u=e.hiddenUpdates;for(n=i&~n;0<n;){var d=31-Rt(n),f=1<<d;r[d]=0,o[d]=-1;var p=u[d];if(p!==null)for(u[d]=null,d=0;d<p.length;d++){var h=p[d];h!==null&&(h.lane&=-536870913)}n&=~f}a!==0&&cv(e,a,0),s!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=s&~(i&~t))}function cv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function uv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Rt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function dv(e,t){var n=t&-t;return n=n&42?1:xp(n),n&(e.suspendedLanes|t)?0:n}function xp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function wp(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function fv(){var e=ve.p;return e!==0?e:(e=window.event,e===void 0?32:Pb(e.type))}function _h(e,t){var n=ve.p;try{return ve.p=e,t()}finally{ve.p=n}}var sa=Math.random().toString(36).slice(2),at="__reactFiber$"+sa,Tt="__reactProps$"+sa,Ys="__reactContainer$"+sa,bh="__reactEvents$"+sa,CS="__reactListeners$"+sa,TS="__reactHandles$"+sa,xh="__reactResources$"+sa,yr="__reactMarker$"+sa,Qo="__reactLoad$"+sa;function Uc(e){delete e[at],delete e[Tt],delete e[CS],delete e[TS]}function rl(e){var t;if(t=e[at])return t;for(var n=e.parentNode;n;){if(t=n[Ys]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hg(e);e!==null;){if(n=e[at])return n;e=Hg(e)}return t}e=n,n=e.parentNode}return null}function Ps(e){if(e=e[at]||e[Ys]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function hi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(q(33))}function os(e){var t=e[xh];return t||(t=e[xh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[yr]=!0}function pv(e){e[Qo]=void 0}var mv=new Set,hv={};function Dl(e,t){Ns(e,t),Ns(e+"Capture",t)}function Ns(e,t){for(hv[e]=t,e=0;e<t.length;e++)mv.add(t[e])}var AS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wh={},Sh={};function kS(e){return Id.call(Sh,e)?!0:Id.call(wh,e)?!1:AS.test(e)?Sh[e]=!0:(wh[e]=!0,!1)}var ge=!1;function Nh(){var e=ge;return ge=!1,e}function go(e,t,n){if(kS(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Lr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function Ln(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,a)}}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jS(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){n=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qd(e){if(!e._valueTracker){var t=gv(e)?"checked":"value";e._valueTracker=jS(e,t,""+e[t])}}function yv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=gv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}var MS=/[\n"\\]/g;function Pt(e){return e.replace(MS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gd(e,t,n,a,l,s,i,r){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?i==="number"&&e.value==t?$u(e,kt(e.value)):$u(e,kt(t)):n!=null?$u(e,kt(n)):a!=null&&e.removeAttribute("value"),l==null&&s!=null&&(e.defaultChecked=!!s),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+kt(r):e.removeAttribute("name")}function vv(e,t,n,a,l,s,i,r){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){qd(e);return}n=n!=null?""+kt(n):"",t=t!=null?""+kt(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=r?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),qd(e)}function $u(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function cs(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+kt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function _v(e,t,n){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+kt(n):""}function bv(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(q(92));if(mi(a)){if(1<a.length)throw Error(q(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=kt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qd(e)}function Es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $S=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Eh(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||$S.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xv(e,t,n){if(t!=null&&typeof t!="object")throw Error(q(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",ge=!0);for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&(Eh(e,l,a),ge=!0)}else for(var s in t)t.hasOwnProperty(s)&&Eh(e,s,t[s])}function Sp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var OS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),DS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yo(e){return DS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function En(){}var Yd=null;function Np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,us=null;function Ch(e){var t=Ps(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Pt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Tt]||null;if(!l)throw Error(q(90));Gd(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&yv(a)}break e;case"textarea":_v(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&cs(e,!!n.multiple,t,!1)}}}var Ou=!1;function wv(e,t,n){if(Ou)return e(t,n);Ou=!0;try{var a=e(t);return a}finally{if(Ou=!1,(Jl!==null||us!==null)&&(tu(),Jl&&(t=Jl,e=us,us=Jl=null,Ch(t),e)))for(t=0;t<e.length;t++)Ch(e[t])}}function Li(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Tt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pd=!1;if(Fn)try{var ai={};Object.defineProperty(ai,"passive",{get:function(){Pd=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{Pd=!1}var Na=null,Ep=null,vo=null;function Sv(){if(vo)return vo;var e,t=Ep,n=t.length,a,l="value"in Na?Na.value:Na.textContent,s=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(a=1;a<=i&&t[n-a]===l[s-a];a++);return vo=l.slice(e,1<a?1-a:void 0)}function _o(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vr(){return!0}function Th(){return!1}function vt(e){function t(n,a,l,s,i){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(s):s[r]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Vr:Th,this.isPropagationStopped=Th,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vr)},persist:function(){},isPersistent:Vr}),t}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ic=vt(Xa),vr=Ce({},Xa,{view:0,detail:0}),zS=vt(vr),Du,zu,li,qc=Ce({},vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==li&&(li&&e.type==="mousemove"?(Du=e.screenX-li.screenX,zu=e.screenY-li.screenY):zu=Du=0,li=e),Du)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),Ah=vt(qc),RS=Ce({},qc,{dataTransfer:0}),HS=vt(RS),BS=Ce({},vr,{relatedTarget:0}),Ru=vt(BS),LS=Ce({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),VS=vt(LS),US=Ce({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IS=vt(US),qS=Ce({},Xa,{data:0}),kh=vt(qS),GS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},PS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=PS[e])?!!t[e]:!1}function Cp(){return XS}var ZS=Ce({},vr,{key:function(e){if(e.key){var t=GS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_o(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cp,charCode:function(e){return e.type==="keypress"?_o(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_o(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),QS=vt(ZS),KS=Ce({},qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jh=vt(KS),FS=Ce({},Xa,{submitter:0}),JS=vt(FS),WS=Ce({},vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cp}),eN=vt(WS),tN=Ce({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),nN=vt(tN),aN=Ce({},qc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lN=vt(aN),sN=Ce({},Xa,{newState:0,oldState:0,source:0}),iN=vt(sN),rN=[9,13,27,32],Tp=Fn&&"CompositionEvent"in window,wi=null;Fn&&"documentMode"in document&&(wi=document.documentMode);var oN=Fn&&"TextEvent"in window&&!wi,Nv=Fn&&(!Tp||wi&&8<wi&&11>=wi),Mh=" ",$h=!1;function Ev(e,t){switch(e){case"keyup":return rN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wl=!1;function cN(e,t){switch(e){case"compositionend":return Cv(t);case"keypress":return t.which!==32?null:($h=!0,Mh);case"textInput":return e=t.data,e===Mh&&$h?null:e;default:return null}}function uN(e,t){if(Wl)return e==="compositionend"||!Tp&&Ev(e,t)?(e=Sv(),vo=Ep=Na=null,Wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nv&&t.locale!=="ko"?null:t.data;default:return null}}var dN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Oh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dN[e.type]:t==="textarea"}function Tv(e,t,n,a){Jl?us?us.push(a):us=[a]:Jl=a,t=yc(t,"onChange"),0<t.length&&(n=new Ic("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Si=null,Vi=null;function fN(e){wb(e,0)}function Gc(e){var t=hi(e);if(yv(t))return e}function Dh(e,t){if(e==="change")return t}var Av=!1;if(Fn){var Hu;if(Fn){var Bu="oninput"in document;if(!Bu){var zh=document.createElement("div");zh.setAttribute("oninput","return;"),Bu=typeof zh.oninput=="function"}Hu=Bu}else Hu=!1;Av=Hu&&(!document.documentMode||9<document.documentMode)}function Rh(){Si&&(Si.detachEvent("onpropertychange",kv),Vi=Si=null)}function kv(e){if(e.propertyName==="value"&&Gc(Vi)){var t=[];Tv(t,Vi,e,Np(e)),wv(fN,t)}}function pN(e,t,n){e==="focusin"?(Rh(),Si=t,Vi=n,Si.attachEvent("onpropertychange",kv)):e==="focusout"&&Rh()}function mN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gc(Vi)}function hN(e,t){if(e==="click")return Gc(t)}function gN(e,t){if(e==="input"||e==="change")return Gc(t)}function yN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:yN;function Ui(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Id.call(t,l)||!Bt(e[l],t[l]))return!1}return!0}function Xd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bh(e,t){var n=Hh(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hh(n)}}function jv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xd(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xd(e.document)}return t}function Ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var vN=Fn&&"documentMode"in document&&11>=document.documentMode,es=null,Zd=null,Ni=null,Qd=!1;function Lh(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qd||es==null||es!==Xd(a)||(a=es,"selectionStart"in a&&Ap(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ni&&Ui(Ni,a)||(Ni=a,a=yc(Zd,"onSelect"),0<a.length&&(t=new Ic("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=es)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ts={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},Lu={},$v={};Fn&&($v=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function zl(e){if(Lu[e])return Lu[e];if(!ts[e])return e;var t=ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $v)return Lu[e]=t[n];return e}var Ov=zl("animationend"),Dv=zl("animationiteration"),zv=zl("animationstart"),_N=zl("transitionrun"),bN=zl("transitionstart"),xN=zl("transitioncancel"),Rv=zl("transitionend"),Hv=new Map,Kd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Kd.push("scrollEnd");function un(e,t){Hv.set(e,t),Dl(t,[e])}var wN=0;function Jn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=on.identifierPrefix;var n=wN++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Vh(e){if(e==null||typeof e=="string")return e;var t=null,n=ys;if(n!==null)for(var a=0;a<n.length;a++){var l=e[n[a]];if(l!=null){if(l==="none")return"none";t=t==null?l:t+(" "+l)}}return t??e.default}function ia(e,t){return e=Vh(e),t=Vh(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Ko=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},qt=[],ns=0,kp=0;function Yc(){for(var e=ns,t=kp=ns=0;t<e;){var n=qt[t];qt[t++]=null;var a=qt[t];qt[t++]=null;var l=qt[t];qt[t++]=null;var s=qt[t];if(qt[t++]=null,a!==null&&l!==null){var i=a.pending;i===null?l.next=l:(l.next=i.next,i.next=l),a.pending=l}s!==0&&Bv(n,l,s)}}function Pc(e,t,n,a){qt[ns++]=e,qt[ns++]=t,qt[ns++]=n,qt[ns++]=a,kp|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function jp(e,t,n,a){return Pc(e,t,n,a),Fo(e)}function Rl(e,t){return Pc(e,null,null,t),Fo(e)}function Bv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,s=e.return;s!==null;)s.childLanes|=n,a=s.alternate,a!==null&&(a.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(l=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,l&&t!==null&&(l=31-Rt(n),e=s.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),s):null}function Fo(e){if(50<Di)throw Di=0,ko=null,Error(q(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var as={};function SN(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,n,a){return new SN(e,t,n,a)}function Mp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var n=e.alternate;return n===null?(n=wt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Lv(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bo(e,t,n,a,l,s){var i=0;if(a=e,typeof a=="function")Mp(a)&&(i=1);else if(typeof a=="string")i=FE(e,n,An.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case Hd:return e=wt(31,n,t,l),e.elementType=Hd,e.lanes=s,e;case Kl:return dl(n.children,l,s,t);case nv:i=8,l|=24;break;case Dd:return e=wt(12,n,t,l|2),e.elementType=Dd,e.lanes=s,e;case zd:return e=wt(13,n,t,l),e.elementType=zd,e.lanes=s,e;case Rd:return e=wt(19,n,t,l),e.elementType=Rd,e.lanes=s,e;case uS:case Bd:return e=l|32,e=wt(30,n,t,e),e.elementType=Bd,e.lanes=s,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Nn:i=10;break e;case av:i=9;break e;case vp:i=11;break e;case _p:i=14;break e;case ya:i=16,a=null;break e}i=29,n=Error(q(130,e===null?"null":typeof e,"")),a=null}return t=wt(i,n,t,l),t.elementType=e,t.type=a,t.lanes=s,t}function dl(e,t,n,a){return e=wt(7,e,a,t),e.lanes=n,e}function Vu(e,t,n){return e=wt(6,e,null,t),e.lanes=n,e}function Vv(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function Uu(e,t,n){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uh=new WeakMap;function Xt(e,t){if(typeof e=="object"&&e!==null){var n=Uh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:vh(t)},Uh.set(e,t),t)}return{value:e,source:t,stack:vh(t)}}var ls=[],ss=0,Jo=null,Ii=0,Gt=[],Yt=0,Va=null,Cn=1,Tn="";function qn(e,t){ls[ss++]=Ii,ls[ss++]=Jo,Jo=e,Ii=t}function Uv(e,t,n){Gt[Yt++]=Cn,Gt[Yt++]=Tn,Gt[Yt++]=Va,Va=e;var a=Cn;e=Tn;var l=32-Rt(a)-1;a&=~(1<<l),n+=1;var s=32-Rt(t)+l;if(30<s){var i=l-l%5;s=(a&(1<<i)-1).toString(32),a>>=i,l-=i,Cn=1<<32-Rt(t)+l|n<<l|a,Tn=s+e}else Cn=1<<s|n<<l|a,Tn=e}function Xc(e){e.return!==null&&(qn(e,1),Uv(e,1,0))}function $p(e){for(;e===Jo;)Jo=ls[--ss],ls[ss]=null,Ii=ls[--ss],ls[ss]=null;for(;e===Va;)Va=Gt[--Yt],Gt[Yt]=null,Tn=Gt[--Yt],Gt[Yt]=null,Cn=Gt[--Yt],Gt[Yt]=null}function Iv(e,t){Gt[Yt++]=Cn,Gt[Yt++]=Tn,Gt[Yt++]=Va,Cn=t.id,Tn=t.overflow,Va=e}var et=null,Ae=null,ce=!1,ja=null,Zt=!1,Fd=Error(q(519));function Ua(e){var t=Error(q(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qi(Xt(t,e)),Fd}function Ih(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[at]=e,t[Tt]=a,n){case"dialog":ue("cancel",t),ue("close",t);break;case"iframe":case"object":case"embed":ue("load",t);break;case"video":case"audio":for(n=0;n<Xi.length;n++)ue(Xi[n],t);break;case"source":ue("error",t);break;case"img":case"image":case"link":ue("error",t),ue("load",t);break;case"details":ue("toggle",t);break;case"input":ue("invalid",t),vv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ue("invalid",t);break;case"textarea":ue("invalid",t),bv(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Nb(t.textContent,n)?(a.popover!=null&&(ue("beforetoggle",t),ue("toggle",t)),a.onScroll!=null&&ue("scroll",t),a.onScrollEnd!=null&&ue("scrollend",t),a.onClick!=null&&(t.onclick=En),t=!0):t=!1,t||Ua(e,!0)}function Wo(e){for(et=e.return;et;)switch(et.tag){case 5:case 31:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:et=et.return}}function Ll(e){if(e!==et)return!1;if(!ce)return Wo(e),ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Rf(e.type,e.memoizedProps)),n=!n),n&&Ae&&Ua(e),Wo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Ae=Rg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Ae=Rg(e)}else t===27?(t=Ae,Za(e.type)?(e=Vf,Vf=null,Ae=e):Ae=t):Ae=et?Qt(e.stateNode.nextSibling):null;return!0}function vl(){Ae=et=null,ce=!1}function Iu(){var e=ja;return e!==null&&(bt===null?bt=e:bt.push.apply(bt,e),ja=null),e}function qi(e){ja===null?ja=[e]:ja.push(e)}var Jd=On(null),Hl=null,Yn=null;function Ea(e,t,n){je(Jd,t._currentValue),t._currentValue=n}function Qn(e){e._currentValue=Jd.current,st(Jd)}function xo(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Wd(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){var i=l.child;s=s.firstContext;e:for(;s!==null;){var r=s;s=l;for(var o=0;o<t.length;o++)if(r.context===t[o]){s.lanes|=n,r=s.alternate,r!==null&&(r.lanes|=n),xo(s.return,n,e),a||(i=null);break e}s=r.next}}else if(l.tag===18){if(i=l.return,i===null)throw Error(q(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),xo(i,n,e),i=null}else l.tag===13&&l.memoizedState!==null&&l.memoizedState.dehydrated===null?(l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),xo(l.return,n,e),i=l.child,i=i!==null?i.sibling:null):i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===e){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}}function _l(e,t,n,a){e=null;for(var l=t,s=!1;l!==null;){if(!s){if(l.flags&524288)s=!0;else if(l.flags&262144)break}if(l.tag===10){var i=l.alternate;if(i===null)throw Error(q(387));if(i=i.memoizedProps,i!==null){var r=l.type;Bt(l.pendingProps.value,i.value)||(e!==null?e.push(r):e=[r])}}else if(l===Yo.current){if(i=l.alternate,i===null)throw Error(q(387));i.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Os):e=[Os])}l=l.return}return e!==null&&Wd(t,e,n,a),t.flags|=262144,e!==null}function ec(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bl(e){Hl=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return qv(Hl,e)}function Ur(e,t){return Hl===null&&bl(e),qv(e,t)}function qv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yn===null){if(e===null)throw Error(q(308));Yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yn=Yn.next=t;return n}var NN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},EN=Qe.unstable_scheduleCallback,CN=Qe.unstable_NormalPriority,qe={$$typeof:Nn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Op(){return{controller:new NN,data:new Map,refCount:0}}function _r(e){e.refCount--,e.refCount===0&&EN(CN,function(){e.controller.abort()})}function qh(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];n.indexOf(a)===-1&&n.push(a)}}}var gi=null;function TN(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ei=null,ef=0,xl=0,ds=null;function AN(e,t){if(Ei===null){var n=Ei=[];ef=0,xl=rm(),ds={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ef++,t.then(Gh,Gh),t}function Gh(){if(--ef===0&&(gi=null,Ei!==null)){ds!==null&&(ds.status="fulfilled");var e=Ei;Ei=null,xl=0,ds=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function kN(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var Yh=ne.S;ne.S=function(e,t){if(rb=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&AN(e,t),gi!==null)for(var n=js;n!==null;)qh(n,gi),n=n.next;if(n=e.types,n!==null){for(var a=js;a!==null;)qh(a,n),a=a.next;if(xl!==0){a=gi,a===null&&(a=gi=[]);for(var l=0;l<n.length;l++){var s=n[l];a.indexOf(s)===-1&&a.push(s)}}}Yh!==null&&Yh(e,t)};var fl=On(null);function Dp(){var e=fl.current;return e!==null?e:Ee.pooledCache}function wo(e,t){t===null?je(fl,fl.current):je(fl,t.pool)}function Gv(){var e=Dp();return e===null?null:{parent:qe._currentValue,pool:e}}var Xs=Error(q(460)),zp=Error(q(474)),Zc=Error(q(542)),tc={then:function(){}};function Ph(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(En,En),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zh(e),e===void 0&&!("reason"in t)?Error(q(600)):e;default:if(typeof t.status=="string")t.then(En,En);else{if(e=Ee,e!==null&&100<e.shellSuspendCounter)throw Error(q(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zh(e),e}throw pl=t,Xs}}function al(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(pl=n,Xs):n}}var pl=null;function Xh(){if(pl===null)throw Error(q(459));var e=pl;return pl=null,e}function Zh(e){if(e===Xs||e===Zc)throw Error(q(483))}var fs=null,Gi=0;function Ir(e){var t=Gi;return Gi+=1,fs===null&&(fs=[]),Yv(fs,e,t)}function ca(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function qr(e,t){throw t.$$typeof===cS?Error(q(525)):(e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pv(e){function t(m,_){if(e){var g=m.deletions;g===null?(m.deletions=[_],m.flags|=16):g.push(_)}}function n(m,_){if(!e)return null;for(;_!==null;)t(m,_),_=_.sibling;return null}function a(m){for(var _=new Map;m!==null;)m.key===null?_.set(m.index,m):_.set(m.key,m),m=m.sibling;return _}function l(m,_){return m=Zn(m,_),m.index=0,m.sibling=null,m}function s(m,_,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<_?(m.flags|=2,_):g):(m.flags|=134217730,_)):(m.flags|=1048576,_)}function i(m){return e&&m.alternate===null&&(m.flags|=134217730),m}function r(m,_,g,v){return _===null||_.tag!==6?(_=Vu(g,m.mode,v),_.return=m,_):(_=l(_,g),_.return=m,_)}function o(m,_,g,v){var w=g.type;return w===Kl?(m=d(m,_,g.props.children,v,g.key),ca(m,g),m):_!==null&&(_.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ya&&al(w)===_.type)?(_=l(_,g.props),ca(_,g),_.return=m,_):(_=bo(g.type,g.key,g.props,null,m.mode,v),ca(_,g),_.return=m,_)}function u(m,_,g,v){return _===null||_.tag!==4||_.stateNode.containerInfo!==g.containerInfo||_.stateNode.implementation!==g.implementation?(_=Uu(g,m.mode,v),_.return=m,_):(_=l(_,g.children||[]),_.return=m,_)}function d(m,_,g,v,w){return _===null||_.tag!==7?(_=dl(g,m.mode,v,w),_.return=m,_):(_=l(_,g),_.return=m,_)}function f(m,_,g){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Vu(""+_,m.mode,g),_.return=m,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case zr:return g=bo(_.type,_.key,_.props,null,m.mode,g),ca(g,_),g.return=m,g;case pi:return _=Uu(_,m.mode,g),_.return=m,_;case ya:return _=al(_),f(m,_,g)}if(mi(_)||ni(_))return _=dl(_,m.mode,g,null),_.return=m,_;if(typeof _.then=="function")return f(m,Ir(_),g);if(_.$$typeof===Nn)return f(m,Ur(m,_),g);qr(m,_)}return null}function p(m,_,g,v){var w=_!==null?_.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return w!==null?null:r(m,_,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case zr:return g.key===w?o(m,_,g,v):null;case pi:return g.key===w?u(m,_,g,v):null;case ya:return g=al(g),p(m,_,g,v)}if(mi(g)||ni(g))return w!==null?null:d(m,_,g,v,null);if(typeof g.then=="function")return p(m,_,Ir(g),v);if(g.$$typeof===Nn)return p(m,_,Ur(m,g),v);qr(m,g)}return null}function h(m,_,g,v,w){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return m=m.get(g)||null,r(_,m,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case zr:return m=m.get(v.key===null?g:v.key)||null,o(_,m,v,w);case pi:return m=m.get(v.key===null?g:v.key)||null,u(_,m,v,w);case ya:return v=al(v),h(m,_,g,v,w)}if(mi(v)||ni(v))return m=m.get(g)||null,d(_,m,v,w,null);if(typeof v.then=="function")return h(m,_,g,Ir(v),w);if(v.$$typeof===Nn)return h(m,_,g,Ur(_,v),w);qr(_,v)}return null}function y(m,_,g,v){for(var w=null,N=null,S=_,A=_=0,k=null;S!==null&&A<g.length;A++){S.index>A?(k=S,S=null):k=S.sibling;var H=p(m,S,g[A],v);if(H===null){S===null&&(S=k);break}e&&S&&H.alternate===null&&t(m,S),_=s(H,_,A),N===null?w=H:N.sibling=H,N=H,S=k}if(A===g.length)return n(m,S),ce&&qn(m,A),w;if(S===null){for(;A<g.length;A++)S=f(m,g[A],v),S!==null&&(_=s(S,_,A),N===null?w=S:N.sibling=S,N=S);return ce&&qn(m,A),w}for(S=a(S);A<g.length;A++)k=h(S,m,A,g[A],v),k!==null&&(e&&(H=k.alternate,H!==null&&S.delete(H.key===null?A:H.key)),_=s(k,_,A),N===null?w=k:N.sibling=k,N=k);return e&&S.forEach(function(O){return t(m,O)}),ce&&qn(m,A),w}function b(m,_,g,v){if(g==null)throw Error(q(151));for(var w=null,N=null,S=_,A=_=0,k=null,H=g.next();S!==null&&!H.done;A++,H=g.next()){S.index>A?(k=S,S=null):k=S.sibling;var O=p(m,S,H.value,v);if(O===null){S===null&&(S=k);break}e&&S&&O.alternate===null&&t(m,S),_=s(O,_,A),N===null?w=O:N.sibling=O,N=O,S=k}if(H.done)return n(m,S),ce&&qn(m,A),w;if(S===null){for(;!H.done;A++,H=g.next())H=f(m,H.value,v),H!==null&&(_=s(H,_,A),N===null?w=H:N.sibling=H,N=H);return ce&&qn(m,A),w}for(S=a(S);!H.done;A++,H=g.next())H=h(S,m,A,H.value,v),H!==null&&(e&&(k=H.alternate,k!==null&&S.delete(k.key===null?A:k.key)),_=s(H,_,A),N===null?w=H:N.sibling=H,N=H);return e&&S.forEach(function(V){return t(m,V)}),ce&&qn(m,A),w}function x(m,_,g,v){if(typeof g=="object"&&g!==null&&g.type===Kl&&g.key===null&&g.props.ref===void 0&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case zr:e:{for(var w=g.key;_!==null;){if(_.key===w){if(w=g.type,w===Kl){if(_.tag===7){n(m,_.sibling),v=l(_,g.props.children),ca(v,g),v.return=m,m=v;break e}}else if(_.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ya&&al(w)===_.type){n(m,_.sibling),v=l(_,g.props),ca(v,g),v.return=m,m=v;break e}n(m,_);break}else t(m,_);_=_.sibling}g.type===Kl?(v=dl(g.props.children,m.mode,v,g.key),ca(v,g),v.return=m,m=v):(v=bo(g.type,g.key,g.props,null,m.mode,v),ca(v,g),v.return=m,m=v)}return i(m);case pi:e:{for(w=g.key;_!==null;){if(_.key===w)if(_.tag===4&&_.stateNode.containerInfo===g.containerInfo&&_.stateNode.implementation===g.implementation){n(m,_.sibling),v=l(_,g.children||[]),v.return=m,m=v;break e}else{n(m,_);break}else t(m,_);_=_.sibling}v=Uu(g,m.mode,v),v.return=m,m=v}return i(m);case ya:return g=al(g),x(m,_,g,v)}if(mi(g))return y(m,_,g,v);if(ni(g)){if(w=ni(g),typeof w!="function")throw Error(q(150));return g=w.call(g),b(m,_,g,v)}if(typeof g.then=="function")return x(m,_,Ir(g),v);if(g.$$typeof===Nn)return x(m,_,Ur(m,g),v);qr(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,_!==null&&_.tag===6?(n(m,_.sibling),v=l(_,g),v.return=m,m=v):(n(m,_),v=Vu(g,m.mode,v),v.return=m,m=v),i(m)):n(m,_)}return function(m,_,g,v){try{Gi=0;var w=x(m,_,g,v);return fs=null,w}catch(S){if(S===Xs||S===Zc)throw S;var N=wt(29,S,null,m.mode);return N.lanes=v,N.return=m,N}finally{}}}var wl=Pv(!0),Xv=Pv(!1),va=!1;function Rp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ma(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $a(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,ye&2){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Fo(e),Bv(e,null,n),t}return Pc(e,a,t,n),Fo(e)}function Ci(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,uv(e,n)}}function qu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?l=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?l=s=t:s=s.next=t}else l=s=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var nf=!1;function Ti(){if(nf){var e=ds;if(e!==null)throw e}}function Ai(e,t,n,a){nf=!1;var l=e.updateQueue;va=!1;var s=l.firstBaseUpdate,i=l.lastBaseUpdate,r=l.shared.pending;if(r!==null){l.shared.pending=null;var o=r,u=o.next;o.next=null,i===null?s=u:i.next=u,i=o;var d=e.alternate;d!==null&&(d=d.updateQueue,r=d.lastBaseUpdate,r!==i&&(r===null?d.firstBaseUpdate=u:r.next=u,d.lastBaseUpdate=o))}if(s!==null){var f=l.baseState;i=0,d=u=o=null,r=s;do{var p=r.lane&-536870913,h=p!==r.lane;if(h?(fe&p)===p:(a&p)===p){p!==0&&p===xl&&(nf=!0),d!==null&&(d=d.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var y=e,b=r;p=t;var x=n;switch(b.tag){case 1:if(y=b.payload,typeof y=="function"){f=y.call(x,f,p);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,p=typeof y=="function"?y.call(x,f,p):y,p==null)break e;f=Ce({},f,p);break e;case 2:va=!0}}p=r.callback,p!==null&&(e.flags|=64,h&&(e.flags|=8192),h=l.callbacks,h===null?l.callbacks=[p]:h.push(p))}else h={lane:p,tag:r.tag,payload:r.payload,callback:r.callback,next:null},d===null?(u=d=h,o=f):d=d.next=h,i|=p;if(r=r.next,r===null){if(r=l.shared.pending,r===null)break;h=r,r=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);d===null&&(o=f),l.baseState=o,l.firstBaseUpdate=u,l.lastBaseUpdate=d,s===null&&(l.shared.lanes=0),Ga|=i,e.lanes=i,e.memoizedState=f}}function Zv(e,t){if(typeof e!="function")throw Error(q(191,e));e.call(t)}function Qv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Zv(n[e],t)}var Ia=On(null),nc=On(0);function Qh(e,t){e=na,je(nc,e),je(Ia,t),na=e|t.baseLanes}function af(){je(nc,na),je(Ia,Ia.current)}function Hp(){na=nc.current,st(Ia),st(nc)}var ot=On(null),ft=null;function Oa(e){var t=e.alternate;je(it,it.current&1),je(ot,e),ft===null&&(t===null||Ia.current!==null||t.memoizedState!==null)&&(ft=e)}function lf(e){je(it,it.current),je(ot,e),ft===null&&(ft=e)}function Kv(e){e.tag===22?(je(it,it.current),je(ot,e),ft===null&&(ft=e)):Da()}function Da(){je(it,it.current),je(ot,ot.current)}function jt(e){st(ot),ft===e&&(ft=null),st(it)}var it=On(0);function Yi(e,t){je(ot,ot.current),je(it,t)}function Bp(e){st(it),st(ot),ft===e&&(ft=null)}function ac(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Lf(n)||dm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,ie=null,Se=null,Ie=null,lc=!1,ps=!1,Sl=!1,sc=0,Pi=0,ms=null,jN=0;function He(){throw Error(q(321))}function Lp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Vp(e,t,n,a,l,s){return Wn=s,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ne.H=e===null||e.memoizedState===null?T_:A_,Sl=!1,s=n(a,l),Sl=!1,ps&&(s=Jv(t,n,a,l)),Fv(e),s}function Fv(e){ne.H=ic;var t=Se!==null&&Se.next!==null;if(Wn=0,Ie=Se=ie=null,lc=!1,Pi=0,ms=null,t)throw Error(q(300));e===null||Ye||(e=e.dependencies,e!==null&&ec(e)&&(Ye=!0))}function Jv(e,t,n,a){ie=e;var l=0;do{if(ps&&(ms=null),Pi=0,ps=!1,25<=l)throw Error(q(301));if(l+=1,Ie=Se=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}ne.H=BN,s=t(n,a)}while(ps);return s}function MN(){var e=ne.H,t=e.useState()[0];return t=typeof t.then=="function"?br(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(ie.flags|=1024),t}function Up(){var e=sc!==0;return sc=0,e}function Ip(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function qp(e){if(lc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lc=!1}Wn=0,Ie=Se=ie=null,ps=!1,Pi=sc=0,ms=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ie.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Ve(){if(Se===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ie===null?ie.memoizedState:Ie.next;if(t!==null)Ie=t,Se=e;else{if(e===null)throw ie.alternate===null?Error(q(467)):Error(q(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ie===null?ie.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Qc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function br(e){var t=Pi;return Pi+=1,ms===null&&(ms=[]),e=Yv(ms,e,t),t=ie,(Ie===null?t.memoizedState:Ie.next)===null&&(t=t.alternate,ne.H=t===null||t.memoizedState===null?T_:A_),e}function Kc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return br(e);if(e.$$typeof===fS)return;if(e.$$typeof===Nn)return lt(e)}throw Error(q(438,String(e)))}function Gp(e){var t=null,n=ie.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ie.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Qc(),ie.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=dS;return t.index++,n}function ea(e,t){return typeof t=="function"?t(e):t}function So(e){var t=Ve();return Yp(t,Se,e)}function Yp(e,t,n){var a=e.queue;if(a===null)throw Error(q(311));a.lastRenderedReducer=n;var l=e.baseQueue,s=a.pending;if(s!==null){if(l!==null){var i=l.next;l.next=s.next,s.next=i}t.baseQueue=l=s,a.pending=null}if(s=e.baseState,l===null)e.memoizedState=s;else{t=l.next;var r=i=null,o=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(fe&f)===f:(Wn&f)===f){var p=u.revertLane;if(p===0)o!==null&&(o=o.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===xl&&(d=!0);else if((Wn&p)===p){u=u.next,p===xl&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},o===null?(r=o=f,i=s):o=o.next=f,ie.lanes|=p,Ga|=p;f=u.action,Sl&&n(s,f),s=u.hasEagerState?u.eagerState:n(s,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},o===null?(r=o=p,i=s):o=o.next=p,ie.lanes|=f,Ga|=f;u=u.next}while(u!==null&&u!==t);if(o===null?i=s:o.next=r,!Bt(s,e.memoizedState)&&(Ye=!0,d&&(n=ds,n!==null)))throw n;e.memoizedState=s,e.baseState=i,e.baseQueue=o,a.lastRenderedState=s}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Gu(e){var t=Ve(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,s=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do s=e(s,i.action),i=i.next;while(i!==l);Bt(s,t.memoizedState)||(Ye=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function Wv(e,t,n){var a=ie,l=Ve(),s=ce;if(s){if(n===void 0)throw Error(q(407));n=n()}else n=t();var i=!Bt((Se||l).memoizedState,n);if(i&&(l.memoizedState=n,Ye=!0),l=l.queue,Pp(n_.bind(null,a,l,e),[e]),e=l.getSnapshot!==t||i||Ie!==null&&(Ie.memoizedState.tag&1)!==0,Cs(e?9:8,{destroy:void 0},t_.bind(null,a,l,n,t),null),e){if(a.flags|=2048,Ee===null)throw Error(q(349));s||Wn&127||e_(a,t,n)}return n}function e_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ie.updateQueue,t===null?(t=Qc(),ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function t_(e,t,n,a){t.value=n,t.getSnapshot=a,a_(t)&&l_(e)}function n_(e,t,n){return n(function(){a_(t)&&l_(e)})}function a_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function l_(e){var t=Rl(e,2);t!==null&&Nt(t,e,2)}function sf(e){var t=gt();if(typeof e=="function"){var n=e;if(e=n(),Sl){Sa(!0);try{n()}finally{Sa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function s_(e,t,n,a){return e.baseState=n,Yp(e,Se,typeof a=="function"?a:ea)}function $N(e,t,n,a,l){if(Jc(e))throw Error(q(485));if(e=t.action,e!==null){var s={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){s.listeners.push(i)}};ne.T!==null?n(!0):s.isTransition=!1,a(s),n=t.pending,n===null?(s.next=t.pending=s,i_(t,s)):(s.next=n.next,t.pending=n.next=s)}}function i_(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var s=ne.T,i={};i.types=s!==null?s.types:null,ne.T=i;try{var r=n(l,a),o=ne.S;o!==null&&o(i,r),Kh(e,t,r)}catch(u){rf(e,t,u)}finally{s!==null&&i.types!==null&&(s.types=i.types),ne.T=s}}else try{s=n(l,a),Kh(e,t,s)}catch(u){rf(e,t,u)}}function Kh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Fh(e,t,a)},function(a){return rf(e,t,a)}):Fh(e,t,n)}function Fh(e,t,n){t.status="fulfilled",t.value=n,r_(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,i_(e,n)))}function rf(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,r_(t),t=t.next;while(t!==a)}e.action=null}function r_(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function o_(e,t){return t}function Jh(e,t){if(ce){var n=Ee.formState;if(n!==null){e:{var a=ie;if(ce){if(Ae){t:{for(var l=Ae,s=Zt;l.nodeType!==8;){if(!s){l=null;break t}if(l=Qt(l.nextSibling),l===null){l=null;break t}}s=l.data,l=s==="F!"||s==="F"?l:null}if(l){Ae=Qt(l.nextSibling),a=l.data==="F!";break e}}Ua(a)}a=!1}a&&(t=n[0])}}return n=gt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o_,lastRenderedState:t},n.queue=a,n=N_.bind(null,ie,a),a.dispatch=n,a=sf(!1),s=Kp.bind(null,ie,!1,a.queue),a=gt(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=$N.bind(null,ie,l,s,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Wh(e){var t=Ve();return c_(t,Se,e)}function c_(e,t,n){if(t=Yp(e,t,o_)[0],e=So(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=br(t)}catch(i){throw i===Xs?Zc:i}else a=t;t=Ve();var l=t.queue,s=l.dispatch;return n!==t.memoizedState&&(ie.flags|=2048,Cs(9,{destroy:void 0},ON.bind(null,l,n),null)),[a,s,e]}function ON(e,t){e.action=t}function eg(e){var t=Ve(),n=Se;if(n!==null)return c_(t,n,e);Ve(),t=t.memoizedState,n=Ve();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Cs(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ie.updateQueue,t===null&&(t=Qc(),ie.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function u_(){return Ve().memoizedState}function No(e,t,n,a){var l=gt();ie.flags|=e,l.memoizedState=Cs(1|t,{destroy:void 0},n,a===void 0?null:a)}function Fc(e,t,n,a){var l=Ve();a=a===void 0?null:a;var s=l.memoizedState.inst;Se!==null&&a!==null&&Lp(a,Se.memoizedState.deps)?l.memoizedState=Cs(t,s,n,a):(ie.flags|=e,l.memoizedState=Cs(1|t,s,n,a))}function tg(e,t){No(8390656,8,e,t)}function Pp(e,t){Fc(2048,8,e,t)}function DN(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=Qc(),ie.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function d_(e){var t=Ve().memoizedState;return DN({ref:t,nextImpl:e}),function(){if(ye&2)throw Error(q(440));return t.impl.apply(void 0,arguments)}}function f_(e,t){return Fc(4,2,e,t)}function p_(e,t){return Fc(4,4,e,t)}function m_(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function h_(e,t,n){n=n!=null?n.concat([e]):null,Fc(4,4,m_.bind(null,t,e),n)}function Xp(){}function g_(e,t){var n=Ve();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Lp(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function y_(e,t){var n=Ve();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Lp(t,a[1]))return a[0];if(a=e(),Sl){Sa(!0);try{e()}finally{Sa(!1)}}return n.memoizedState=[a,t],a}function Zp(e,t,n){return n===void 0||Wn&1073741824&&!(fe&261930)?e.memoizedState=t:(e.memoizedState=n,e=cb(),ie.lanes|=e,Ga|=e,n)}function v_(e,t,n,a){return Bt(n,t)?n:Ia.current!==null?(e=Zp(e,n,a),Bt(e,t)||(Ye=!0),e):!(Wn&106)||Wn&1073741824&&!(fe&261930)?(Ye=!0,e.memoizedState=n):(e=cb(),ie.lanes|=e,Ga|=e,t)}function __(e,t,n,a,l){var s=ve.p;ve.p=s!==0&&8>s?s:8;var i=ne.T,r={};r.types=i!==null?i.types:null,ne.T=r,Kp(e,!1,t,n);try{var o=l(),u=ne.S;if(u!==null&&u(r,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var d=kN(o,a);ki(e,t,d,Ht(e))}else ki(e,t,a,Ht(e))}catch(f){ki(e,t,{then:function(){},status:"rejected",reason:f},Ht())}finally{ve.p=s,i!==null&&r.types!==null&&(i.types=r.types),ne.T=i}}function zN(){}function of(e,t,n,a){if(e.tag!==5)throw Error(q(476));var l=b_(e).queue;__(e,l,t,ul,n===null?zN:function(){return x_(e),n(a)})}function b_(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ul,baseState:ul,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:ul},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function x_(e){var t=b_(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},Ht())}function Qp(){return lt(Os)}function w_(){return Ve().memoizedState}function S_(){return Ve().memoizedState}function RN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ht();e=Ma(n);var a=$a(t,e,n);a!==null&&(Nt(a,t,n),Ci(a,t,n)),t={cache:Op()},e.payload=t;return}t=t.return}}function HN(e,t,n){var a=Ht();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Jc(e)?E_(t,n):(n=jp(e,t,n,a),n!==null&&(Nt(n,e,a),C_(n,t,a)))}function N_(e,t,n){var a=Ht();ki(e,t,n,a)}function ki(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jc(e))E_(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,r=s(i,n);if(l.hasEagerState=!0,l.eagerState=r,Bt(r,i))return Pc(e,t,l,0),Ee===null&&Yc(),!1}catch{}finally{}if(n=jp(e,t,l,a),n!==null)return Nt(n,e,a),C_(n,t,a),!0}return!1}function Kp(e,t,n,a){if(a={lane:2,revertLane:rm(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Jc(e)){if(t)throw Error(q(479))}else t=jp(e,n,a,2),t!==null&&Nt(t,e,2)}function Jc(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function E_(e,t){ps=lc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function C_(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,uv(e,n)}}var ic={readContext:lt,use:Kc,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He,useEffectEvent:He},T_={readContext:lt,use:Kc,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:tg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,No(4194308,4,m_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var n=gt();t=t===void 0?null:t;var a=e();if(Sl){Sa(!0);try{e()}finally{Sa(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=gt();if(n!==void 0){var l=n(t);if(Sl){Sa(!0);try{n(t)}finally{Sa(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=HN.bind(null,ie,e),[a.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=sf(e);var t=e.queue,n=N_.bind(null,ie,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xp,useDeferredValue:function(e,t){var n=gt();return Zp(n,e,t)},useTransition:function(){var e=sf(!1);return e=__.bind(null,ie,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ie,l=gt();if(ce){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),Ee===null)throw Error(q(349));fe&127||e_(a,t,n)}l.memoizedState=n;var s={value:n,getSnapshot:t};return l.queue=s,tg(n_.bind(null,a,s,e),[e]),a.flags|=2048,Cs(9,{destroy:void 0},t_.bind(null,a,s,n,t),null),n},useId:function(){var e=gt(),t=Ee.identifierPrefix;if(ce){var n=Tn,a=Cn;n=(a&~(1<<32-Rt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=sc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=jN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qp,useFormState:Jh,useActionState:Jh,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kp.bind(null,ie,!0,n),n.dispatch=t,[e,t]},useMemoCache:Gp,useCacheRefresh:function(){return gt().memoizedState=RN.bind(null,ie)},useEffectEvent:function(e){var t=gt(),n={impl:e};return t.memoizedState=n,function(){if(ye&2)throw Error(q(440));return n.impl.apply(void 0,arguments)}}},A_={readContext:lt,use:Kc,useCallback:g_,useContext:lt,useEffect:Pp,useImperativeHandle:h_,useInsertionEffect:f_,useLayoutEffect:p_,useMemo:y_,useReducer:So,useRef:u_,useState:function(){return So(ea)},useDebugValue:Xp,useDeferredValue:function(e,t){var n=Ve();return v_(n,Se.memoizedState,e,t)},useTransition:function(){var e=So(ea)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:br(e),t]},useSyncExternalStore:Wv,useId:w_,useHostTransitionStatus:Qp,useFormState:Wh,useActionState:Wh,useOptimistic:function(e,t){var n=Ve();return s_(n,Se,e,t)},useMemoCache:Gp,useCacheRefresh:S_,useEffectEvent:d_},BN={readContext:lt,use:Kc,useCallback:g_,useContext:lt,useEffect:Pp,useImperativeHandle:h_,useInsertionEffect:f_,useLayoutEffect:p_,useMemo:y_,useReducer:Gu,useRef:u_,useState:function(){return Gu(ea)},useDebugValue:Xp,useDeferredValue:function(e,t){var n=Ve();return Se===null?Zp(n,e,t):v_(n,Se.memoizedState,e,t)},useTransition:function(){var e=Gu(ea)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:br(e),t]},useSyncExternalStore:Wv,useId:w_,useHostTransitionStatus:Qp,useFormState:eg,useActionState:eg,useOptimistic:function(e,t){var n=Ve();return Se!==null?s_(n,Se,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Gp,useCacheRefresh:S_,useEffectEvent:d_};function Yu(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ht(),l=Ma(a);l.payload=t,n!=null&&(l.callback=n),t=$a(e,l,a),t!==null&&(Nt(t,e,a),Ci(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ht(),l=Ma(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=$a(e,l,a),t!==null&&(Nt(t,e,a),Ci(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ht(),a=Ma(n);a.tag=2,t!=null&&(a.callback=t),t=$a(e,a,n),t!==null&&(Nt(t,e,n),Ci(t,e,n))}};function ng(e,t,n,a,l,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,i):t.prototype&&t.prototype.isPureReactComponent?!Ui(n,a)||!Ui(l,s):!0}function ag(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&cf.enqueueReplaceState(t,t.state,null)}function Nl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Ce({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function k_(e){Ko(e)}function j_(e){console.error(e)}function M_(e){Ko(e)}function rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function lg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function uf(e,t,n){return n=Ma(n),n.tag=3,n.payload={element:null},n.callback=function(){rc(e,t)},n}function $_(e){return e=Ma(e),e.tag=3,e}function O_(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var s=a.value;e.payload=function(){return l(s)},e.callback=function(){lg(t,n,a)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){lg(t,n,a),typeof l!="function"&&(za===null?za=new Set([this]):za.add(this));var r=a.stack;this.componentDidCatch(a.value,{componentStack:r!==null?r:""})})}function LN(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&_l(t,n,l,!0),n=ot.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ft===null?hc():n.alternate===null&&Be===0&&(Be=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===tc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Ju(e,a,l)),!1;case 22:return n.flags|=65536,a===tc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Ju(e,a,l)),!1}throw Error(q(435,n.tag))}return Ju(e,a,l),hc(),!1}if(ce)return t=ot.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Fd&&(e=Error(q(422),{cause:a}),qi(Xt(e,n)))):(a!==Fd&&(t=Error(q(423),{cause:a}),qi(Xt(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Xt(a,n),l=uf(e.stateNode,a,l),qu(e,l),Be!==4&&(Be=2)),!1;var s=Error(q(520),{cause:a});if(s=Xt(s,n),Oi===null?Oi=[s]:Oi.push(s),Be!==4&&(Be=2),t===null)return!0;a=Xt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=uf(n.stateNode,a,e),qu(n,e),!1;case 1:if(t=n.type,s=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(za===null||!za.has(s))))return n.flags|=65536,l&=-l,n.lanes|=l,l=$_(l),O_(l,e,n,a),qu(n,l),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fp=Error(q(461)),Ye=!1;function Xe(e,t,n,a){t.child=e===null?Xv(t,null,n,a):wl(t,e.child,n,a)}function sg(e,t,n,a,l){n=n.render;var s=t.ref;if("ref"in a){var i={};for(var r in a)r!=="ref"&&(i[r]=a[r])}else i=a;return bl(t),a=Vp(e,t,n,i,s,l),r=Up(),e!==null&&!Ye?(Ip(e,t,l),ta(e,t,l)):(ce&&r&&Xc(t),t.flags|=1,Xe(e,t,a,l),t.child)}function ig(e,t,n,a,l){if(e===null){var s=n.type;return typeof s=="function"&&!Mp(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,D_(e,t,s,a,l)):(e=bo(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Wp(e,l)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ui,n(i,a)&&e.ref===t.ref)return ta(e,t,l)}return t.flags|=1,e=Zn(s,a),e.ref=t.ref,e.return=t,t.child=e}function D_(e,t,n,a,l){if(e!==null){var s=e.memoizedProps;if(Ui(s,a)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=a=s,Wp(e,l))e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,ta(e,t,l)}return df(e,t,n,a,l)}function z_(e,t,n,a){var l=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(s=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~s}else a=0,t.child=null;return rg(e,t,s,n,a)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wo(t,s!==null?s.cachePool:null),s!==null?Qh(t,s):af(),Kv(t);else return a=t.lanes=536870912,rg(e,t,s!==null?s.baseLanes|n:n,n,a)}else s!==null?(wo(t,s.cachePool),Qh(t,s),Da(),t.memoizedState=null):(e!==null&&wo(t,null),af(),Da());return Xe(e,t,l,n),t.child}function ji(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rg(e,t,n,a,l){var s=Dp();return s=s===null?null:{parent:qe._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&wo(t,null),af(),Kv(t),e!==null&&_l(e,t,a,!0),t.childLanes=l,null}function Eo(e,t){return t=Wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function og(e,t,n){return wl(t,e.child,null,n),e=Eo(t,t.pendingProps),e.flags|=2,jt(t),t.memoizedState=null,e}function VN(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(a.mode==="hidden")return e=Eo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},ji(null,e);if(lf(t),(e=Ae)?(e=Db(e,Zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:Cn,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},n=Vv(e),n.return=t,t.child=n,et=t,Ae=null)):e=null,e===null)throw Ua(t);return t.lanes=536870912,null}return Eo(t,a)}var s=e.memoizedState;if(s!==null){var i=s.dehydrated;if(lf(t),l)if(t.flags&256)t.flags&=-257,t=og(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(q(558));else if(Ye||_l(e,t,n,!1),l=(n&e.childLanes)!==0,Ye||l){if(Ia.current===null){if(a=Ee,a!==null&&(i=dv(a,n),i!==0&&i!==s.retryLane))throw s.retryLane=i,Rl(e,i),Nt(a,e,i),Fp;hc()}t=og(e,t,n)}else e=s.treeContext,Ae=Qt(i.nextSibling),et=t,ce=!0,ja=null,Zt=!1,e!==null&&Iv(t,e),t=Eo(t,a),t.flags|=134221824;return t}return e=Zn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Pl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(q(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function df(e,t,n,a,l){return bl(t),n=Vp(e,t,n,a,void 0,l),a=Up(),e!==null&&!Ye?(Ip(e,t,l),ta(e,t,l)):(ce&&a&&Xc(t),t.flags|=1,Xe(e,t,n,l),t.child)}function cg(e,t,n,a,l,s){return bl(t),t.updateQueue=null,n=Jv(t,a,n,l),Fv(e),a=Up(),e!==null&&!Ye?(Ip(e,t,s),ta(e,t,s)):(ce&&a&&Xc(t),t.flags|=1,Xe(e,t,n,s),t.child)}function ug(e,t,n,a,l){if(bl(t),t.stateNode===null){var s=as,i=n.contextType;typeof i=="object"&&i!==null&&(s=lt(i)),s=new n(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=cf,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Rp(t),i=n.contextType,s.context=typeof i=="object"&&i!==null?lt(i):as,s.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(Yu(t,n,i,a),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(i=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),i!==s.state&&cf.enqueueReplaceState(s,s.state,null),Ai(t,a,s,l),Ti(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var r=t.memoizedProps,o=Nl(n,r);s.props=o;var u=s.context,d=n.contextType;i=as,typeof d=="object"&&d!==null&&(i=lt(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r||u!==i)&&ag(t,s,a,i),va=!1;var p=t.memoizedState;s.state=p,Ai(t,a,s,l),Ti(),u=t.memoizedState,r||p!==u||va?(typeof f=="function"&&(Yu(t,n,f,a),u=t.memoizedState),(o=va||ng(t,n,o,a,p,u,i))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),s.props=a,s.state=u,s.context=i,a=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,tf(e,t),i=t.memoizedProps,d=Nl(n,i),s.props=d,f=t.pendingProps,p=s.context,u=n.contextType,o=as,typeof u=="object"&&u!==null&&(o=lt(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==f||p!==o)&&ag(t,s,a,o),va=!1,p=t.memoizedState,s.state=p,Ai(t,a,s,l),Ti();var h=t.memoizedState;i!==f||p!==h||va||e!==null&&e.dependencies!==null&&ec(e.dependencies)?(typeof r=="function"&&(Yu(t,n,r,a),h=t.memoizedState),(d=va||ng(t,n,d,a,p,h,o)||e!==null&&e.dependencies!==null&&ec(e.dependencies))?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,h,o),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,h,o)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=h),s.props=a,s.state=h,s.context=o,a=d):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Pl(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=wl(t,e.child,null,l),t.child=wl(t,null,n,l)):Xe(e,t,n,l),t.memoizedState=s.state,e=t.child):e=ta(e,t,l),e}function dg(e,t,n,a){return vl(),t.flags|=256,Xe(e,t,n,a),t.child}var ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pf(e){return{baseLanes:e,cachePool:Gv()}}function mf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ot),e}function R_(e,t,n){var a=t.pendingProps,l=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),i&&(l=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(l?Oa(t):Da(),(e=Ae)?(e=Db(e,Zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:Cn,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},n=Vv(e),n.return=t,t.child=n,et=t,Ae=null)):e=null,e===null)throw Ua(t);return dm(e)?t.lanes=32:t.lanes=536870912,null}return s=a.children,a=a.fallback,l?(Da(),l=t.mode,s=Wc({mode:"hidden",children:s},l),a=dl(a,l,n,null),s.return=t,a.return=t,s.sibling=a,t.child=s,a=t.child,a.memoizedState=pf(n),a.childLanes=mf(e,i,n),t.memoizedState=ff,ji(null,a)):(Oa(t),Jp(t,s))}var r=e.memoizedState;if(r!==null){var o=r.dehydrated;if(o!==null)return UN(e,t,s,i,a,o,r,n)}return l?(Da(),l=a.fallback,s=t.mode,r=e.child,o=r.sibling,a=Zn(r,{mode:"hidden",children:a.children}),a.subtreeFlags=r.subtreeFlags&1206910976,o!==null?l=Zn(o,l):(l=dl(l,s,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,ji(null,a),a=t.child,l=e.child.memoizedState,l===null?l=pf(n):(s=l.cachePool,s!==null?(r=qe._currentValue,s=s.parent!==r?{parent:r,pool:r}:s):s=Gv(),l={baseLanes:l.baseLanes|n,cachePool:s}),a.memoizedState=l,a.childLanes=mf(e,i,n),t.memoizedState=ff,ji(e.child,a)):(Oa(t),n=e.child,e=n.sibling,n=Zn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Jp(e,t){return t=Wc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Wc(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function Gr(e,t,n){return wl(t,e.child,null,n),e=Jp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UN(e,t,n,a,l,s,i,r){if(n)return t.flags&256?(Oa(t),t.flags&=-257,Gr(e,t,r)):t.memoizedState!==null?(Da(),t.child=e.child,t.flags|=128,null):(Da(),s=l.fallback,i=t.mode,l=Wc({mode:"visible",children:l.children},i),s=dl(s,i,r,null),s.flags|=2,l.return=t,s.return=t,l.sibling=s,t.child=l,wl(t,e.child,null,r),l=t.child,l.memoizedState=pf(r),l.childLanes=mf(e,a,r),t.memoizedState=ff,ji(null,l));if(Oa(t),dm(s)){if(a=s.nextSibling&&s.nextSibling.dataset,a)var o=a.dgst;return a=o,a!==""&&(l=Error(q(419)),l.stack="",l.digest=a,qi({value:l,source:null,stack:null})),Gr(e,t,r)}if(Ye||_l(e,t,r,!1),a=(r&e.childLanes)!==0,Ye||a){if(Ia.current!==null)return Gr(e,t,r);if(a=Ee,a!==null&&(l=dv(a,r),l!==0&&l!==i.retryLane))throw i.retryLane=l,Rl(e,l),Nt(a,e,l),Fp;return Lf(s)||hc(),Gr(e,t,r)}return Lf(s)?(t.flags|=192,t.child=e.child,null):(e=i.treeContext,Ae=Qt(s.nextSibling),et=t,ce=!0,ja=null,Zt=!1,e!==null&&Iv(t,e),t=Jp(t,l.children),t.flags|=134221824,t)}function fg(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),xo(e.return,t,n)}function pg(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&ac(n)===null&&(t=e),e=e.sibling}return t}function Yr(e,t,n,a,l,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=l,i.treeForkCount=s)}function Pu(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function hf(e,t,n){var a=t.pendingProps,l=a.revealOrder,s=a.tail;a=a.children;var i=it.current;if(t.flags&128)return Yi(t,i),null;var r=(i&2)!==0;if(r?(i=i&1|2,t.flags|=128):i&=1,Yi(t,i),l==="backwards"&&e!==null?(Pu(e),Xe(e,t,a,n),Pu(e)):Xe(e,t,a,n),a=ce?Ii:0,!r&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fg(e,n,t);else if(e.tag===19)fg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"backwards":n=pg(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null,Pu(t)),Yr(t,!0,l,null,s,a);break;case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ac(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Yr(t,!0,n,null,s,a);break;case"together":Yr(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:n=pg(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Yr(t,!1,l,n,s,a)}return t.child}function mg(e,t,n){var a=t.pendingProps;return Ea(t,t.type,a.value),Xe(e,t,a.children,n),t.child}function ta(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ga|=t.lanes,!(n&t.childLanes))if(e!==null){if(_l(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=Zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wp(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&ec(e)))}function IN(e,t,n){switch(t.tag){case 3:Po(t,t.stateNode.containerInfo),Ea(t,qe,e.memoizedState.cache),vl();break;case 27:case 5:Ud(t);break;case 4:Po(t,t.stateNode.containerInfo);break;case 10:Ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lf(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Oa(t),t.flags|=128,null;a=_l(e,t,n,!1);var l=t.child.childLanes;return a||n&l?R_(e,t,n):(Oa(t),e=ta(e,t,n),e!==null?e.sibling:null)}Oa(t);break;case 19:if(t.flags&128)return hf(e,t,n);if(l=(e.flags&128)!==0,a=(n&t.childLanes)!==0,a||(_l(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return hf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Yi(t,it.current),a)break;return null;case 22:return t.lanes=0,z_(e,t,n,t.pendingProps);case 24:Ea(t,qe,e.memoizedState.cache)}return ta(e,t,n)}function H_(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!Wp(e,n)&&!(t.flags&128))return Ye=!1,IN(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,ce&&t.flags&1048576&&Uv(t,Ii,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=al(t.elementType),t.type=e,typeof e=="function")Mp(e)?(a=Nl(e,a),t.tag=1,t=ug(null,t,e,a,n)):(t.tag=0,t=df(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===vp){t.tag=11,t=sg(null,t,e,a,n);break e}else if(l===_p){t.tag=14,t=ig(null,t,e,a,n);break e}else if(l===Nn){t.tag=10,t.type=e,t=mg(null,t,n);break e}}throw t=Ld(e)||e,Error(q(306,t,""))}}return t;case 0:return df(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Nl(a,t.pendingProps),ug(e,t,a,l,n);case 3:e:{if(Po(t,t.stateNode.containerInfo),e===null)throw Error(q(387));a=t.pendingProps;var s=t.memoizedState;l=s.element,tf(e,t),Ai(t,a,null,n);var i=t.memoizedState;if(a=i.cache,Ea(t,qe,a),a!==s.cache&&Wd(t,[qe],n,!0),Ti(),a=i.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=dg(e,t,a,n);break e}else if(a!==l){l=Xt(Error(q(424)),t),qi(l),t=dg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ae=Qt(e.firstChild),et=t,ce=!0,ja=null,Zt=!0,n=Xv(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(vl(),a===l){t=ta(e,t,n);break e}Xe(e,t,a,n)}t=t.child}return t;case 26:return Pl(e,t),e===null?(n=Lg(t.type,null,t.pendingProps,null))?t.memoizedState=n:ce||(t.stateNode=Cb(t.type,t.pendingProps,ka.current,t)):t.memoizedState=Lg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ud(t),e===null&&ce&&(a=t.stateNode=zb(t.type,t.pendingProps,ka.current),et=t,Zt=!0,l=Ae,Za(t.type)?(Vf=l,Ae=Qt(a.firstChild)):Ae=l),Xe(e,t,t.pendingProps.children,n),Pl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((l=a=Ae)&&(a=RE(a,t.type,t.pendingProps,Zt),a!==null?(t.stateNode=a,et=t,Ae=Qt(a.firstChild),Zt=!1,l=!0):l=!1),l||Ua(t)),Ud(t),l=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Rf(l,s)?a=null:i!==null&&Rf(l,i)&&(t.flags|=32),t.memoizedState!==null&&(l=Vp(e,t,MN,null,null,n),Os._currentValue=l),Pl(e,t),Xe(e,t,a,n),t.child;case 6:return e===null&&ce&&((e=n=Ae)&&(n=HE(n,t.pendingProps,Zt),n!==null?(t.stateNode=n,et=t,Ae=null,e=!0):e=!1),e||Ua(t)),null;case 13:return R_(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=wl(t,null,a,n):Xe(e,t,a,n),t.child;case 11:return sg(e,t,t.type,t.pendingProps,n);case 7:return a=t.pendingProps,Pl(e,t),Xe(e,t,a,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:return mg(e,t,n);case 9:return l=t.type._context,a=t.pendingProps.children,bl(t),l=lt(l),a=a(l),t.flags|=1,Xe(e,t,a,n),t.child;case 14:return ig(e,t,t.type,t.pendingProps,n);case 15:return D_(e,t,t.type,t.pendingProps,n);case 19:return hf(e,t,n);case 31:return VN(e,t,n);case 22:return z_(e,t,n,t.pendingProps);case 24:return bl(t),a=lt(qe),e===null?(l=Dp(),l===null&&(l=Ee,s=Op(),l.pooledCache=s,s.refCount++,s!==null&&(l.pooledCacheLanes|=n),l=s),t.memoizedState={parent:a,cache:l},Rp(t),Ea(t,qe,l)):(e.lanes&n&&(tf(e,t),Ai(t,null,null,n),Ti()),l=e.memoizedState,s=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ea(t,qe,a)):(a=s.cache,Ea(t,qe,a),a!==l.cache&&Wd(t,[qe],n,!0))),Xe(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:ce&&Xc(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Pl(e,t),Xe(e,t,a.children,n),t.child;case 29:throw t.pendingProps}throw Error(q(156,t.tag))}function Vn(e){e.flags|=4}function Xu(e,t,n,a,l){var s;if((s=(e.mode&32)!==0)&&(s=n===null?Ig(t,a):Ig(t,a)&&(a.src!==n.src||a.srcSet!==n.srcSet)),s){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(fb())e.flags|=8192;else throw pl=tc,zp}else e.flags&=-16777217}function hg(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Lb(t))if(fb())e.flags|=8192;else throw pl=tc,zp}function Pr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ov():536870912,e.lanes|=t,Ts|=t)}function si(e,t){if(!ce)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Te(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&1206910976,a|=l.flags&1206910976,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function qN(e,t,n){var a=t.pendingProps;switch($p(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Te(t),null;case 1:return Te(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(qe),Ss(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ll(t)?Vn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Iu())),Te(t),null;case 26:var l=t.type,s=t.memoizedState;return e===null?(Vn(t),s!==null?(Te(t),hg(t,s)):(Te(t),Xu(t,l,null,a,n))):s?s!==e.memoizedState?(Vn(t),Te(t),hg(t,s)):(Te(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Vn(t),Te(t),Xu(t,l,e,a,n)),null;case 27:if(Xo(t),n=ka.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Vn(t);else{if(!a){if(t.stateNode===null)throw Error(q(166));return Te(t),t.subtreeFlags&=-33554433,null}e=An.current,Ll(t)?Ih(t):(e=zb(l,a,n),t.stateNode=e,Vn(t))}return Te(t),t.subtreeFlags&=-33554433,null;case 5:if(Xo(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Vn(t);else{if(!a){if(t.stateNode===null)throw Error(q(166));return Te(t),t.subtreeFlags&=-33554433,null}if(s=An.current,Ll(t))Ih(t);else{var i=Qi(ka.current);switch(s){case 1:s=i.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:s=i.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":s=i.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":s=i.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":s=i.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?i.createElement(l,{is:a.is}):i.createElement(l)}}s[at]=t,s[Tt]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)s.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=s;e:switch(rt(s,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Vn(t)}}return Te(t),t.subtreeFlags&=-33554433,Xu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Vn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(q(166));if(e=ka.current,Ll(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=et,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Nb(e.nodeValue,n)),e||Ua(t,!0)}else e=Qi(e).createTextNode(a),e[at]=t,t.stateNode=e}return Te(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ll(t),n!==null){if(e===null){if(!a)throw Error(q(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(557));e[at]=t}else vl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Te(t),e=!1}else n=Iu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if(t.flags&128)throw Error(q(558))}return Te(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ll(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(q(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(q(317));l[at]=t}else vl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Te(t),l=!1}else l=Iu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),t.flags&128?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pr(t,t.updateQueue),Te(t),null);case 4:return Ss(),e===null&&om(t.stateNode.containerInfo),t.flags|=67108864,Te(t),null;case 10:return Qn(t.type),Te(t),null;case 19:if(Bp(t),a=t.memoizedState,a===null)return Te(t),null;if(l=(t.flags&128)!==0,s=a.rendering,s===null)if(l)si(a,!1);else{if(Be!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ac(e),s!==null){for(t.flags|=128,si(a,!1),e=s.updateQueue,t.updateQueue=e,Pr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Lv(n,e),n=n.sibling;return Yi(t,it.current&1|2),ce&&qn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Dt()>pc&&(t.flags|=128,l=!0,si(a,!1),t.lanes=4194304)}else{if(!l)if(e=ac(s),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Pr(t,e),si(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!s.alternate&&!ce)return Te(t),null}else 2*Dt()-a.renderingStartTime>pc&&n!==536870912&&(t.flags|=128,l=!0,si(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}if(a.tail!==null){e=a.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Dt(),e.sibling=null,s=it.current,s=l?s&1|2:s&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!n||ce?Yi(t,s):(n=s,je(ot,t),je(it,n),ft===null&&(ft=t)),ce&&qn(t,a.treeForkCount),e}return Te(t),null;case 22:case 23:return jt(t),Hp(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Te(t),t.subtreeFlags&6&&(t.flags|=8192)):Te(t),n=t.updateQueue,n!==null&&Pr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&st(fl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qn(qe),Te(t),null;case 25:return null;case 30:return t.flags|=33554432,Te(t),null}throw Error(q(156,t.tag))}function GN(e,t){switch($p(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(qe),Ss(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xo(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(q(340));vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bp(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ss(),null;case 10:return Qn(t.type),null;case 22:case 23:return jt(t),Hp(),e!==null&&st(fl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(qe),null;case 25:return null;default:return null}}function B_(e,t){switch($p(t),t.tag){case 3:Qn(qe),Ss();break;case 26:case 27:case 5:Xo(t);break;case 4:Ss();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:Bp(t);break;case 10:Qn(t.type);break;case 22:case 23:jt(t),Hp(),e!==null&&st(fl);break;case 24:Qn(qe)}}function xr(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var s=n.create,i=n.inst;a=s(),i.destroy=a}n=n.next}while(n!==l)}}catch(r){we(t,t.return,r)}}function qa(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){var i=a.inst,r=i.destroy;if(r!==void 0){i.destroy=void 0,l=t;var o=n,u=r;try{u()}catch(d){we(l,o,d)}}}a=a.next}while(a!==s)}}catch(d){we(t,t.return,d)}}function L_(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qv(t,n)}catch(a){we(e,e.return,a)}}}function V_(e,t,n){n.props=Nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){we(e,t,a)}}function _n(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var l=e.stateNode,s=Jn(e.memoizedProps,l);(l.ref===null||l.ref.name!==s)&&(l.ref=kb(s)),a=l.ref;break;case 7:if(e.stateNode===null){var i=new Vt(e);Ct(e.child,!1,DE,i,void 0,void 0),e.stateNode=i}a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){we(e,t,r)}}function nt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){we(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){we(e,t,l)}else n.current=null}function oc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)Ob(e.stateNode,t[n])}function gg(e){for(var t=e.return;t!==null&&(tm(t)&&Ob(e.stateNode,t.stateNode),!em(t));)t=t.return}function Mi(e){for(var t=e.return;t!==null&&(tm(t)&&zE(e.stateNode,t.stateNode),!em(t));)t=t.return}function em(e){return e.tag===5||e.tag===3||e.tag===27}function tm(e){return e&&e.tag===7&&e.stateNode!==null}function gf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){we(e,e.return,l)}}function Zu(e,t,n){try{var a=e.stateNode;gE(a,e.type,n,t),a[Tt]=t}catch(l){we(e,e.return,l)}}function U_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function Qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||U_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Za(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yf(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(l,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(l),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=En)),oc(e,a),ge=!0;else if(l!==4&&(l===27&&(oc(e,a),a=null,Za(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(yf(e,t,n,a),e=e.sibling;e!==null;)yf(e,t,n,a),e=e.sibling}function cc(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?n.insertBefore(l,t):n.appendChild(l),oc(e,a),ge=!0;else if(l!==4&&(l===27&&(oc(e,a),a=null,Za(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(cc(e,t,n,a),e=e.sibling;e!==null;)cc(e,t,n,a),e=e.sibling}function I_(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);rt(t,a,n),t[at]=e,t[Tt]=n}catch(s){we(e,e.return,s)}}var uc=!1,Mt=null;function yg(e){(e.tag===30||e.subtreeFlags&33554432)&&(uc=!0)}var wn=null;function vg(){var e=wn;return wn=null,e}var xt=0;function Zs(e,t,n,a,l){return xt=0,q_(e.child,t,n,a,l)}function q_(e,t,n,a,l){for(var s=!1;e!==null;){if(e.tag===5){var i=e.stateNode;if(a!==null){var r=Hf(i);a.push(r),r.view&&(s=!0)}else s||Hf(i).view&&(s=!0);uc=!0,Tb(i,xt===0?t:t+"_"+xt,n),xt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&l||q_(e.child,t,n,a,l)&&(s=!0));e=e.sibling}return s}function $n(e,t){for(;e!==null;)e.tag===5?Ab(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||$n(e.child,t)),e=e.sibling}function Co(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Co(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(q(544));var n=t.name;t=ia(t.default,t.share),t!=="none"&&(Zs(e,n,t,null,!1)||$n(e.child,!1))}e=e.sibling}}function vf(e,t){if(e.tag===30){var n=e.stateNode,a=e.memoizedProps,l=Jn(a,n),s=ia(a.default,n.paired?a.share:a.enter);s!=="none"?Zs(e,l,s,null,!1)?(Co(e),n.paired||t||As(e,a.onEnter)):$n(e.child,!1):Co(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)vf(e,t),e=e.sibling;else Co(e)}function _f(e){if(Mt!==null&&Mt.size!==0){var t=Mt;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,a=n.name;if(a!=null&&a!=="auto"){var l=t.get(a);if(l!==void 0){var s=ia(n.default,n.share);if(s!=="none"&&(Zs(e,a,s,null,!1)?(s=e.stateNode,l.paired=s,s.paired=l,As(e,n.onShare)):$n(e.child,!1)),t.delete(a),t.size===0)break}}}_f(e)}e=e.sibling}}}function bf(e){if(e.tag===30){var t=e.memoizedProps,n=Jn(t,e.stateNode),a=Mt!==null?Mt.get(n):void 0,l=ia(t.default,a!==void 0?t.share:t.exit);l!=="none"&&(Zs(e,n,l,null,!1)?a!==void 0?(l=e.stateNode,a.paired=l,l.paired=a,Mt.delete(n),As(e,t.onShare)):As(e,t.onExit):$n(e.child,!1)),Mt!==null&&_f(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)bf(e),e=e.sibling;else Mt!==null&&_f(e)}function G_(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Jn(t,e.stateNode);t=ia(t.default,t.update),e.flags&=-5,t!=="none"&&Zs(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&G_(e);e=e.sibling}}function xf(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,$n(e.child,!1))}xf(e)}e=e.sibling}}function To(e){if(e.tag===30)e.stateNode.paired=null,$n(e.child,!1),xf(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)To(e),e=e.sibling;else xf(e)}function Y_(e){for(e=e.child;e!==null;)e.tag===30?$n(e.child,!1):e.subtreeFlags&33554432&&Y_(e),e=e.sibling}function nm(e,t,n,a,l,s,i){for(var r=!1;t!==null;){if(t.tag===5){var o=t.stateNode;if(s!==null&&xt<s.length){var u=s[xt],d=Hf(o);(u.view||d.view)&&(r=!0);var f;if(f=(e.flags&4)===0)if(d.clip)f=!0;else{f=u.rect;var p=d.rect;f=f.y!==p.y||f.x!==p.x||f.height!==p.height||f.width!==p.width}f&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tb(o,xt===0?n:n+"_"+xt,l),r&&e.flags&4||(wn===null&&(wn=[]),wn.push(o,xt===0?a:a+"_"+xt,t.memoizedProps)),xt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&i?e.flags|=t.flags&32:nm(e,t.child,n,a,l,s,i)&&(r=!0));t=t.sibling}return r}function P_(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,a=e.stateNode,l=Jn(n,a),s=ia(n.default,n.update),i;i=e.memoizedState,e.memoizedState=null,a=e;var r=e.child;xt=0,l=nm(a,r,l,l,s,i,!1),e.flags&4&&l&&As(e,n.onUpdate)}else e.subtreeFlags&33554432&&P_(e);e=e.sibling}}var Ke=!1,_e=!1,hn=!1,Ku=!1,_g=typeof WeakSet=="function"?WeakSet:Set,Fe=null,gn=!1,yi=!1,dc=!1,wf=!1;function YN(e,t,n){if(e=e.containerInfo,Df=Ds,e=Mv(e),Ap(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var s=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var r=0,o=-1,u=-1,d=0,f=0,p=e,h=null;t:for(;;){for(var y;p!==a||s!==0&&p.nodeType!==3||(o=r+s),p!==i||l!==0&&p.nodeType!==3||(u=r+l),p.nodeType===3&&(r+=p.nodeValue.length),(y=p.firstChild)!==null;)h=p,p=y;for(;;){if(p===e)break t;if(h===a&&++d===s&&(o=r),h===i&&++f===l&&(u=r),(y=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=y}a=o===-1||u===-1?null:{start:o,end:u}}else a=null}a=a||{start:0,end:0}}else a=null;for(zf={focusedElem:e,selectionRange:a},Ds=!1,n=(n&335544064)===n,Fe=t,t=n?9270:1024;Fe!==null;){if(e=Fe,n&&(a=e.deletions,a!==null))for(s=0;s<a.length;s++)n&&bf(a[s]);if(e.alternate===null&&e.flags&2)n&&yg(e),Xr(n);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&n&&bf(a),Xr(n);continue}else if(a!==null&&a.memoizedState!==null){n&&yg(e),Xr(n);continue}}a=e.child,e.subtreeFlags&t&&a!==null?(a.return=e,Fe=a):(n&&G_(e),Xr(n))}}Mt=null}function Xr(e){for(;Fe!==null;){var t=Fe,n=e,a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(l&1024&&a!==null){n=void 0,l=a.memoizedProps,a=a.memoizedState;var s=t.stateNode;try{var i=Nl(t.type,l);n=s.getSnapshotBeforeUpdate(i,a),s.__reactInternalSnapshotBeforeUpdate=n}catch(r){we(t,t.return,r)}}break;case 3:if(l&1024){if(a=t.stateNode.containerInfo,n=a.nodeType,n===9)Bf(a);else if(n===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Bf(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&a!==null&&(n=Jn(a.memoizedProps,a.stateNode),l=t.memoizedProps,l=ia(l.default,l.update),l!=="none"&&Zs(a,n,l,a.memoizedState=[],!0));break;default:if(l&1024)throw Error(q(163))}if(a=t.sibling,a!==null){a.return=t.return,Fe=a;break}Fe=t.return}}function X_(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:yn(e,n),a&4&&xr(5,n);break;case 1:if(yn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(i){we(n,n.return,i)}else{var l=Nl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){we(n,n.return,i)}}a&64&&L_(n),a&512&&_n(n,n.return);break;case 3:if(yn(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qv(e,t)}catch(i){we(n,n.return,i)}}break;case 27:t===null&&a&4&&I_(n);case 26:case 5:yn(e,n),t===null&&a&4&&gf(n),a&512&&_n(n,n.return);break;case 12:yn(e,n);break;case 31:yn(e,n),a&4&&F_(e,n);break;case 13:yn(e,n),a&4&&J_(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=aE.bind(null,n),BE(e,n))));break;case 22:if(a=n.memoizedState!==null||Ke,!a){var s=t!==null&&t.memoizedState!==null||_e;t=Ke,l=_e,Ke=a,(_e=s)&&!l?(a=2,n.subtreeFlags&8772&&(a|=1),en(e,n,a)):yn(e,n),Ke=t,_e=l}break;case 30:yn(e,n),a&512&&_n(n,n.return);break;case 7:a&512&&_n(n,n.return);default:yn(e,n)}}function Sf(e,t){for(e=e.child;e!==null;)Z_(e,t),e=e.sibling}function Z_(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var a=n.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var l=e.stateNode,s=e.memoizedProps.style,i=s!=null&&s.hasOwnProperty("display")?s.display:null;l.style.display=i==null||typeof i=="boolean"?"":(""+i).trim()}}catch(o){we(e,e.return,o)}Nf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,ge=!0}catch(o){we(e,e.return,o)}break;case 18:try{var r=e.stateNode;t?Og(r,!0):Og(e.stateNode,!1)}catch(o){we(e,e.return,o)}break;case 22:case 23:e.memoizedState===null&&Sf(e,t);break;default:Sf(e,t)}}function Nf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,a=t;switch(n.tag){case 4:Z_(n,a);break e;case 22:n.memoizedState===null&&Nf(n,a);break e;default:Nf(n,a)}}e=e.sibling}}function Q_(e){var t=e.alternate;t!==null&&(e.alternate=null,Q_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Uc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Oe=null,_t=!1;function Wt(e,t,n){for(n=n.child;n!==null;)K_(e,t,n),n=n.sibling}function K_(e,t,n){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(mr,n)}catch{}switch(n.tag){case 26:_e||nt(n,t),Wt(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!_e&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:_e||nt(n,t),Mi(n);var a=Oe,l=_t;Za(n.type)&&(Oe=n.stateNode,_t=!1),Wt(e,t,n),Rb(n.stateNode,n.type,n.memoizedProps),Oe=a,_t=l;break;case 5:_e||nt(n,t),Mi(n);case 6:if(n.tag===6&&Mi(n),a=Oe,l=_t,Oe=null,Wt(e,t,n),Oe=a,_t=l,Oe!==null)if(_t)try{(Oe.nodeType===9?Oe.body:Oe.nodeName==="HTML"?Oe.ownerDocument.body:Oe).removeChild(n.stateNode),ge=!0}catch(s){we(n,t,s)}else try{Oe.removeChild(n.stateNode),ge=!0}catch(s){we(n,t,s)}break;case 18:Oe!==null&&(_t?(e=Oe,$g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),zs(e)):$g(Oe,n.stateNode));break;case 4:a=Oe,l=_t,Oe=n.stateNode.containerInfo,_t=!0,Wt(e,t,n),Oe=a,_t=l;break;case 0:case 11:case 14:case 15:qa(2,n,t),_e||qa(4,n,t),Wt(e,t,n);break;case 1:_e||(nt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&V_(n,t,a)),Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:_e=(a=_e)||n.memoizedState!==null,Wt(e,t,n),_e=a;break;case 30:nt(n,t),Wt(e,t,n);break;case 7:_e||nt(n,t),Wt(e,t,n);break;default:Wt(e,t,n)}}function F_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zs(e)}catch(n){we(t,t.return,n)}}}function J_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zs(e)}catch(n){we(t,t.return,n)}}function PN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _g),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _g),t;default:throw Error(q(435,e.tag))}}function Zr(e,t){var n=PN(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=lE.bind(null,e,a);a.then(l,l)}})}function mt(e,t,n){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,r=t,o=r;e:for(;o!==null;){switch(o.tag){case 27:if(Za(o.type)){Oe=o.stateNode,_t=!1;break e}break;case 5:Oe=o.stateNode,_t=!1;break e;case 3:case 4:Oe=o.stateNode.containerInfo,_t=!0;break e}o=o.return}if(Oe===null)throw Error(q(160));K_(i,r,s),Oe=null,_t=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)W_(t,e,n),t=t.sibling}var tn=null;function W_(e,t,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(l&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var s=0;s<a.length;s++){var i=a[s];i.ref.impl=i.nextImpl}mt(t,e,n),ht(e),l&4&&(qa(3,e,e.return),xr(3,e),qa(5,e,e.return));break;case 1:mt(t,e,n),ht(e),l&512&&(_e||a===null||nt(a,a.return)),l&64&&Ke&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(s=tn,mt(t,e,n),ht(e),l&512&&(_e||a===null||nt(a,a.return)),l&4)if(l=a!==null?a.memoizedState:null,n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null)if(Ke)e.stateNode=Cb(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,l=s.ownerDocument||s;t:switch(t){case"title":a=l.getElementsByTagName("title")[0],(!a||a[yr]||a[at]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=l.createElement(t),l.head.insertBefore(a,l.querySelector("head > title"))),rt(a,t,n),a[at]=e,We(a),t=a;break e;case"link":if(s=Ug("link","href",l).get(t+(n.href||""))){for(i=0;i<s.length;i++)if(a=s[i],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(i,1);break t}}a=l.createElement(t),rt(a,t,n),l.head.appendChild(a);break;case"meta":if(s=Ug("meta","content",l).get(t+(n.content||""))){for(i=0;i<s.length;i++)if(a=s[i],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(i,1);break t}}a=l.createElement(t),rt(a,t,n),l.head.appendChild(a);break;default:throw Error(q(468,t))}a[at]=e,We(a),t=a}e.stateNode=t}else Ke||Uf(s,e.type,e.stateNode);else e.stateNode=Vg(s,n,e.memoizedProps);else l!==n?(l===null?(t=a.stateNode,t===null||_e||t.parentNode.removeChild(t)):l.count--,n===null?Ke||Uf(s,e.type,e.stateNode):Vg(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Zu(e,e.memoizedProps,a.memoizedProps);break;case 27:mt(t,e,n),ht(e),l&512&&(_e||a===null||nt(a,a.return)),a!==null&&l&4&&Zu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(s=hn,hn=!1,mt(t,e,n),hn=s,ht(e),l&512&&(_e||a===null||nt(a,a.return)),e.flags&32){t=e.stateNode;try{Es(t,""),ge=!0}catch(d){we(e,e.return,d)}}l&4&&e.stateNode!=null&&(t=e.memoizedProps,Zu(e,t,a!==null?a.memoizedProps:t)),l&1024&&(Ku=!0);break;case 6:if(mt(t,e,n),ht(e),l&4){if(e.stateNode===null)throw Error(q(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,ge=!0}catch(d){we(e,e.return,d)}}break;case 3:if(ge=!1,Mo=null,s=tn,tn=Ki(t.containerInfo),mt(t,e,n),tn=s,ht(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{zs(t.containerInfo)}catch(d){we(e,e.return,d)}Ku&&(Ku=!1,eb(e)),ge=!1;break;case 4:l=hn,hn=Ke,a=Nh(),s=tn,tn=Ki(e.stateNode.containerInfo),mt(t,e,n),ht(e),tn=s,ge&&yi&&(dc=!0),ge=a,hn=l;break;case 12:mt(t,e,n),ht(e);break;case 31:mt(t,e,n),ht(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zr(e,t)));break;case 13:mt(t,e,n),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(eu=Dt()),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zr(e,t)));break;case 22:s=e.memoizedState!==null,i=a!==null&&a.memoizedState!==null;var r=Ke,o=_e,u=hn;Ke=r||s,hn=u||s,_e=o||i,mt(t,e,n),_e=o,hn=u,Ke=r,ht(e),l&8192&&(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,!s||a===null||i||Ke||_e||(t=i||_e,n=Ke,a=_e,Ke=s||Ke,_e=t,ga(e,2),Ke=n,_e=a),!s&&hn||Sf(e,s)),l&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Zr(e,n))));break;case 19:mt(t,e,n),ht(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Zr(e,t)));break;case 30:l&512&&(_e||a===null||nt(a,a.return)),l=Nh(),s=yi,i=(n&335544064)===n,r=e.memoizedProps,yi=i&&ia(r.default,r.update)!=="none",mt(t,e,n),ht(e),i&&a!==null&&ge&&(e.flags|=4),yi=s,ge=l;break;case 21:break;case 7:l&512&&(_e||a===null||nt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:mt(t,e,n),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(U_(a)){n=a;break}a=a.return}a=null;for(var l=e.return;l!==null;){if(tm(l)){var s=l.stateNode;a===null?a=[s]:a.push(s)}if(em(l))break;l=l.return}var i=a;if(n==null)throw Error(q(160));switch(n.tag){case 27:var r=n.stateNode,o=Qu(e);cc(e,o,r,i);break;case 5:var u=n.stateNode;n.flags&32&&(Es(u,""),n.flags&=-33);var d=Qu(e);cc(e,d,u,i);break;case 3:case 4:var f=n.stateNode.containerInfo,p=Qu(e);yf(e,p,f,i);break;default:throw Error(q(161))}}catch(h){we(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;eb(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ds=!0,t.reset(),Ds=!1),e=e.sibling}}function Vl(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)tb(t,e),t=t.sibling;else P_(t)}function tb(e,t){var n=e.alternate;if(n===null)vf(e,!1);else switch(e.tag){case 3:if(wf=gn=!1,vg(),Vl(t,e),!gn&&!dc){if(e=wn,e!==null)for(var a=0;a<e.length;a+=3){n=e[a];var l=e[a+1];Ab(n,e[a+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+l+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),wf=!0}wn=null;break;case 5:Vl(t,e);break;case 4:a=gn,gn=!1,Vl(t,e),gn&&(dc=!0),gn=a;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?vf(e,!1):Vl(t,e));break;case 30:a=gn,l=vg(),gn=!1,Vl(t,e),gn&&(e.flags|=4);var s=e.memoizedProps,i=e.stateNode;t=Jn(s,i),i=Jn(n.memoizedProps,i);var r=ia(s.default,s.update);r==="none"?t=!1:(s=n.memoizedState,n.memoizedState=null,n=e.child,xt=0,t=nm(e,n,t,i,r,s,!0),xt!==(s===null?0:s.length)&&(e.flags|=32)),e.flags&4&&t?(As(e,e.memoizedProps.onUpdate),wn=l):l!==null&&(l.push.apply(l,wn),wn=l),gn=e.flags&32?!0:a;break;default:Vl(t,e)}}function yn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)X_(e,t.alternate,t),t=t.sibling}function ga(e,t){for(e=e.child;e!==null;){var n=e,a=t;switch(n.tag){case 0:case 11:case 14:case 15:qa(4,n,n.return),ga(n,a);break;case 1:nt(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&V_(n,n.return,l),ga(n,a);break;case 27:a&2&&Rb(n.stateNode,n.type,n.memoizedProps);case 5:nt(n,n.return),n.tag!==5&&n.tag!==27||Mi(n),ga(n,a);break;case 6:Mi(n);break;case 26:nt(n,n.return),l=n.stateNode,n.memoizedState!==null||l===null||_e||l.parentNode.removeChild(l),ga(n,a);break;case 22:n.memoizedState===null&&ga(n,a);break;case 30:nt(n,n.return),ga(n,a);break;case 7:nt(n,n.return);default:ga(n,a)}e=e.sibling}}function en(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var a=t.alternate,l=e,s=t,i=s.flags,r=(n&1)!==0;switch(s.tag){case 0:case 11:case 15:en(l,s,n),xr(4,s);break;case 1:if(en(l,s,n),a=s,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(d){we(a,a.return,d)}if(a=s,l=a.updateQueue,l!==null){var o=a.stateNode;try{var u=l.shared.hiddenCallbacks;if(u!==null)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)Zv(u[l],o)}catch(d){we(a,a.return,d)}}r&&i&64&&L_(s),_n(s,s.return);break;case 27:n&2&&I_(s);case 5:s.tag!==5&&s.tag!==27||gg(s),en(l,s,n),r&&a===null&&i&4&&gf(s),_n(s,s.return);break;case 6:gg(s);break;case 26:o=s.stateNode,s.memoizedState!==null||o===null||Ke||Uf(Ki(o.ownerDocument),s.type,o),en(l,s,n),r&&a===null&&i&4&&gf(s),_n(s,s.return);break;case 12:en(l,s,n);break;case 31:en(l,s,n),r&&i&4&&F_(l,s);break;case 13:en(l,s,n),r&&i&4&&J_(l,s);break;case 22:s.memoizedState===null&&en(l,s,n),_n(s,s.return);break;case 30:en(l,s,n),_n(s,s.return);break;case 7:_n(s,s.return);default:en(l,s,n)}t=t.sibling}}function am(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&_r(n))}function lm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e))}function It(e,t,n,a){var l=(n&335544064)===n;if(t.subtreeFlags&(l?10262:10256))for(t=t.child;t!==null;)nb(e,t,n,a),t=t.sibling;else l&&Y_(t)}function nb(e,t,n,a){var l=(n&335544064)===n;l&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&To(t);var s=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,n,a),s&2048&&xr(9,t);break;case 1:It(e,t,n,a);break;case 3:It(e,t,n,a),l&&wf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),s&2048&&(s=null,t.alternate!==null&&(s=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==s&&(t.refCount++,s!=null&&_r(s)));break;case 12:if(s&2048){It(e,t,n,a),s=t.stateNode;try{var i=t.memoizedProps,r=i.id,o=i.onPostCommit;typeof o=="function"&&o(r,t.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(u){we(t,t.return,u)}}else It(e,t,n,a);break;case 31:It(e,t,n,a);break;case 13:It(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?(l&&r!==null&&r.memoizedState===null&&To(r),i._visibility&2?It(e,t,n,a):$i(e,t)):(l&&r!==null&&r.memoizedState!==null&&To(t),i._visibility&2?It(e,t,n,a):(i._visibility|=2,Xl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1))),s&2048&&am(r,t);break;case 24:It(e,t,n,a),s&2048&&lm(t.alternate,t);break;case 30:l&&(s=t.alternate,s!==null&&($n(s.child,!0),$n(t.child,!0))),It(e,t,n,a);break;default:It(e,t,n,a)}}function Xl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,i=t,r=n,o=a,u=i.flags;switch(i.tag){case 0:case 11:case 15:Xl(s,i,r,o,l),xr(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?Xl(s,i,r,o,l):$i(s,i):(d._visibility|=2,Xl(s,i,r,o,l)),l&&u&2048&&am(i.alternate,i);break;case 24:Xl(s,i,r,o,l),l&&u&2048&&lm(i.alternate,i);break;default:Xl(s,i,r,o,l)}t=t.sibling}}function $i(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:$i(n,a),l&2048&&am(a.alternate,a);break;case 24:$i(n,a),l&2048&&lm(a.alternate,a);break;default:$i(n,a)}t=t.sibling}}var ll=8192;function el(e,t,n){if(e.subtreeFlags&ll)for(e=e.child;e!==null;)ab(e,t,n),e=e.sibling}function ab(e,t,n){switch(e.tag){case 26:el(e,t,n),e.flags&ll&&(e.memoizedState!==null?JE(n,tn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&qg(n,e)));break;case 5:el(e,t,n),e.flags&ll&&(e=e.stateNode,(t&335544128)===t&&qg(n,e));break;case 3:case 4:var a=tn;tn=Ki(e.stateNode.containerInfo),el(e,t,n),tn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ll,ll=16777216,el(e,t,n),ll=a):el(e,t,n));break;case 30:if(e.flags&ll&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var l=e.stateNode;l.paired=null,Mt===null&&(Mt=new Map),Mt.set(a,l)}el(e,t,n);break;default:el(e,t,n)}}function lb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ii(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Fe=a,ib(a,e)}lb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sb(e),e=e.sibling}function sb(e){switch(e.tag){case 0:case 11:case 15:ii(e),e.flags&2048&&qa(9,e,e.return);break;case 3:ii(e);break;case 12:ii(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ao(e)):ii(e);break;default:ii(e)}}function Ao(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Fe=a,ib(a,e)}lb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qa(8,t,t.return),Ao(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ao(t));break;default:Ao(t)}e=e.sibling}}function ib(e,t){for(;Fe!==null;){var n=Fe;switch(n.tag){case 0:case 11:case 15:qa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:_r(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Fe=a;else e:for(n=e;Fe!==null;){a=Fe;var l=a.sibling,s=a.return;if(Q_(a),a===n){Fe=null;break e}if(l!==null){l.return=s,Fe=l;break e}Fe=s}}}var XN={getCacheForType:function(e){var t=lt(qe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return lt(qe).controller.signal}},ZN=typeof WeakMap=="function"?WeakMap:Map,ye=0,Ee=null,de=null,fe=0,be=0,At=null,Ca=!1,Qs=!1,sm=!1,na=0,Be=0,Ga=0,ml=0,fc=0,Ot=0,Ts=0,Oi=null,bt=null,Ef=!1,eu=0,rb=0,pc=1/0,mc=null,za=null,ze=0,on=null,El=null,kn=0,Cf=0,Tf=null,ob=null,hs=null,gs=null,ys=null,Di=0,ko=null;function Ht(){return ye&2&&fe!==0?fe&-fe:ne.T!==null?rm():fv()}function cb(){if(Ot===0)if(!(fe&536870912)||ce){var e=Hr;Hr<<=1,!(Hr&3932160)&&(Hr=262144),Ot=e}else Ot=536870912;return e=ot.current,e!==null&&(e.flags|=32),Ot}function As(e,t){if(t!=null){var n=e.stateNode,a=n.ref;a===null&&(a=n.ref=kb(Jn(e.memoizedProps,n))),gs===null&&(gs=[]),gs.push(t.bind(null,a))}}function Nt(e,t,n){(e===Ee&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(ks(e,0),Ta(e,fe,Ot,!1)),gr(e,n),(!(ye&2)||e!==Ee)&&(e===Ee&&(!(ye&2)&&(ml|=n),Be===4&&Ta(e,fe,Ot,!1)),Dn(e))}function ub(e,t,n){if(ye&6)throw Error(q(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||hr(e,t),l=a?FN(e,t):Fu(e,t,!0),s=a;do{if(l===0){Qs&&!a&&Ta(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!QN(n)){l=Fu(e,t,!1),s=!1;continue}if(l===2){if(s=t,e.errorRecoveryDisabledLanes&s)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var r=e;l=Oi;var o=r.current.memoizedState.isDehydrated;if(o&&(ks(r,i).flags|=256),i=Fu(r,i,!1),i!==2&&i!==6){if(sm&&!o){r.errorRecoveryDisabledLanes|=s,ml|=s,l=4;break e}s=bt,bt=l,s!==null&&(bt===null?bt=s:bt.push.apply(bt,s))}l=i}if(s=!1,l!==2)continue}}if(l===1){ks(e,0),Ta(e,t,0,!0);break}e:{switch(a=e,s=l,s){case 0:case 1:throw Error(q(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ta(a,t,Ot,!Ca);break e;case 2:bt=null;break;case 3:case 5:break;default:throw Error(q(329))}if((t&62914560)===t&&(l=eu+300-Dt(),10<l)){if(Ta(a,t,Ot,!Ca),Vc(a,0,!0)!==0)break e;kn=t,a.timeoutHandle=cm(bg.bind(null,a,n,bt,mc,Ef,t,Ot,ml,Ts,Ca,s,"Throttled",-0,0),l);break e}bg(a,n,bt,mc,Ef,t,Ot,ml,Ts,Ca,s,null,-0,0)}}break}while(!0);Dn(e)}function bg(e,t,n,a,l,s,i,r,o,u,d,f,p,h){e.timeoutHandle=-1;var y=t.subtreeFlags,b=(s&335544064)===s;if(f=null,(b||y&8192||(y&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},Mt=null,ab(t,s,f),b&&(y=f,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(y.count++,y.waitingForViewTransition=!0,y=Fi.bind(y),b.finished.then(y,y))),y=(s&62914560)===s?eu-Dt():(s&4194048)===s?rb-Dt():0,y=WE(f,y),y!==null)){kn=s,e.cancelPendingCommit=y(wg.bind(null,e,t,s,n,a,l,i,r,o,u,d,f,null,p,h)),Ta(e,s,i,!u);return}wg(e,t,s,n,a,l,i,r,o,u,d,f)}function QN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],s=l.getSnapshot;l=l.value;try{if(!Bt(s(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ta(e,t,n,a){t=rv(e,t),t&=~fc,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var s=31-Rt(l),i=1<<s;a[s]=-1,l&=~i}n!==0&&cv(e,n,t)}function tu(){return ye&6?!0:(wr(0),!1)}function im(){if(de!==null){if(be===0)var e=de.return;else e=de,Yn=Hl=null,qp(e),fs=null,Gi=0,e=de;for(;e!==null;)B_(e.alternate,e),e=e.return;de=null}}function ks(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_E(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),kn=0,im(),Ee=e,de=n=Zn(e.current,null),fe=t,be=0,At=null,Ca=!1,Qs=hr(e,t),sm=!1,Ts=Ot=fc=ml=Ga=Be=0,bt=Oi=null,Ef=!1,na=rv(e,t),Yc(),n}function db(e,t){ie=null,ne.H=ic,t===Xs||t===Zc?(t=Xh(),be=3):t===zp?(t=Xh(),be=4):be=t===Fp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,At=t,de===null&&(Be=1,rc(e,Xt(t,e.current)))}function fb(){var e=ot.current;return e===null?!0:(fe&4194048)===fe?ft===null:(fe&62914560)===fe||fe&536870912?e===ft:!1}function pb(){var e=ne.H;return ne.H=ic,e===null?ic:e}function mb(){var e=ne.A;return ne.A=XN,e}function hc(){Be=4,Ca||(fe&4194048)!==fe&&ot.current!==null||(Qs=!0),!(Ga&134217727)&&!(ml&134217727)||Ee===null||Ta(Ee,fe,Ot,!1)}function Fu(e,t,n){var a=ye;ye|=2;var l=pb(),s=mb();(Ee!==e||fe!==t)&&(mc=null,ks(e,t)),t=!1;var i=Be;e:do try{if(be!==0&&de!==null){var r=de,o=At;switch(be){case 8:im(),i=6;break e;case 3:case 2:case 9:case 6:ot.current===null&&(t=!0);var u=be;if(be=0,At=null,is(e,r,o,u),n&&Qs){i=0;break e}break;default:u=be,be=0,At=null,is(e,r,o,u)}}KN(),i=Be;break}catch(d){db(e,d)}while(!0);return t&&e.shellSuspendCounter++,Yn=Hl=null,ye=a,ne.H=l,ne.A=s,de===null&&(Ee=null,fe=0,Yc()),i}function KN(){for(;de!==null;)hb(de)}function FN(e,t){var n=ye;ye|=2;var a=pb(),l=mb();Ee!==e||fe!==t?(mc=null,pc=Dt()+500,ks(e,t)):Qs=hr(e,t);e:do try{if(be!==0&&de!==null){t=de;var s=At;t:switch(be){case 1:be=0,At=null,is(e,t,s,1);break;case 2:case 9:if(Ph(s)){be=0,At=null,xg(t);break}t=function(){be!==2&&be!==9||Ee!==e||(be=7),Dn(e)},s.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:Ph(s)?(be=0,At=null,xg(t)):(be=0,At=null,is(e,t,s,7));break;case 5:var i=null;switch(de.tag){case 26:i=de.memoizedState;case 5:case 27:var r=de;if(i?Lb(i):r.stateNode.complete){be=0,At=null;var o=r.sibling;if(o!==null)de=o;else{var u=r.return;u!==null?(de=u,nu(u)):de=null}break t}}be=0,At=null,is(e,t,s,5);break;case 6:be=0,At=null,is(e,t,s,6);break;case 8:im(),Be=6;break e;default:throw Error(q(462))}}JN();break}catch(d){db(e,d)}while(!0);return Yn=Hl=null,ne.H=a,ne.A=l,ye=n,de!==null?0:(Ee=null,fe=0,Yc(),Be)}function JN(){for(;de!==null&&!hS();)hb(de)}function hb(e){var t=H_(e.alternate,e,na);e.memoizedProps=e.pendingProps,t===null?nu(e):de=t}function xg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=cg(n,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=cg(n,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:qp(t);var a=t;a===et&&(ce?(Wo(a),a.tag===5&&a.stateNode!=null&&(Ae=a.stateNode)):(Wo(a),ce=!0));default:B_(n,t),t=de=Lv(t,na),t=H_(n,t,na)}e.memoizedProps=e.pendingProps,t===null?nu(e):de=t}function is(e,t,n,a){Yn=Hl=null,qp(t),fs=null,Gi=0;var l=t.return;try{if(LN(e,l,t,n,fe)){Be=1,rc(e,Xt(n,e.current)),de=null;return}}catch(s){if(l!==null)throw de=l,s;Be=1,rc(e,Xt(n,e.current)),de=null;return}t.flags&32768?(ce||a===1?e=!0:Qs||fe&536870912?e=!1:(Ca=e=!0,(a===2||a===9||a===3||a===6)&&(a=ot.current,a!==null&&a.tag===13&&(a.flags|=16384))),gb(t,e)):nu(t)}function nu(e){var t=e;do{if(t.flags&32768){gb(t,Ca);return}e=t.return;var n=qN(t.alternate,t,na);if(n!==null){de=n;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Be===0&&(Be=5)}function gb(e,t){do{var n=GN(e.alternate,e);if(n!==null){n.flags&=32767,de=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=n}while(e!==null);Be=6,de=null}function wg(e,t,n,a,l,s,i,r,o,u,d,f){e.cancelPendingCommit=null;do au();while(ze!==0);if(ye&6)throw Error(q(327));if(t!==null){if(t===e.current)throw Error(q(177));e===Ee&&(de=Ee=null,fe=0),El=t,on=e,kn=n,Tf=l,ob=a,WN(e,t,n,i,r,o,f)}}function WN(e,t,n,a,l,s,i){var r=t.lanes|t.childLanes;if(Cf=r,r|=kp,ES(e,n,r,a,l,s),gs=null,(n&335544064)===n?(ys=TN(e),a=10262):(ys=null,a=10256),t.subtreeFlags&a||t.flags&a?(e.callbackNode=null,e.callbackPriority=0,sE(Zo,function(){return Mf(),null})):(e.callbackNode=null,e.callbackPriority=0),uc=!1,a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=ne.T,ne.T=null,l=ve.p,ve.p=2,s=ye,ye|=4;try{YN(e,t,n)}finally{ye=s,ve.p=l,ne.T=a}}ze=1,uc?hs=EE(i,e.containerInfo,ys,Af,kf,tE,jf,Mf,eE):(Af(),kf(),jf())}function eE(e){if(ze!==0){var t=on.onRecoverableError;t(e,{componentStack:null})}}function tE(){ze===3&&(ze=0,tb(El,on),ze=4)}function Af(){if(ze===1){ze=0;var e=on,t=El,n=kn,a=(t.flags&13878)!==0;if(t.subtreeFlags&13878||a){a=ne.T,ne.T=null;var l=ve.p;ve.p=2;var s=ye;ye|=4;try{yi=dc=!1,W_(t,e,n),n=zf;var i=Mv(e.containerInfo),r=n.focusedElem,o=n.selectionRange;if(i!==r&&r&&r.ownerDocument&&jv(r.ownerDocument.documentElement,r)){if(o!==null&&Ap(r)){var u=o.start,d=o.end;if(d===void 0&&(d=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(d,r.value.length);else{var f=r.ownerDocument||document,p=f&&f.defaultView||window;if(p.getSelection){var h=p.getSelection(),y=r.textContent.length,b=Math.min(o.start,y),x=o.end===void 0?b:Math.min(o.end,y);!h.extend&&b>x&&(i=x,x=b,b=i);var m=Bh(r,b),_=Bh(r,x);if(m&&_&&(h.rangeCount!==1||h.anchorNode!==m.node||h.anchorOffset!==m.offset||h.focusNode!==_.node||h.focusOffset!==_.offset)){var g=f.createRange();g.setStart(m.node,m.offset),h.removeAllRanges(),b>x?(h.addRange(g),h.extend(_.node,_.offset)):(g.setEnd(_.node,_.offset),h.addRange(g))}}}}for(f=[],h=r;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<f.length;r++){var v=f[r];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}Ds=!!Df,zf=Df=null}finally{ye=s,ve.p=l,ne.T=a}}e.current=t,ze=2}}function kf(){if(ze===2){ze=0;var e=on,t=El,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ne.T,ne.T=null;var a=ve.p;ve.p=2;var l=ye;ye|=4;try{X_(e,t.alternate,t)}finally{ye=l,ve.p=a,ne.T=n}}ze=3}}function jf(){if(ze===4||ze===3){ze=0;var e=hs;hs=null,gS();var t=on,n=El,a=kn,l=ob,s=(a&335544064)===a?10262:10256;if(n.subtreeFlags&s||n.flags&s?ze=5:(ze=0,El=on=null,yb(t,t.pendingLanes)),s=t.pendingLanes,s===0&&(za=null),wp(a),n=n.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(mr,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=ne.T,s=ve.p,ve.p=2,ne.T=null;try{for(var i=t.onRecoverableError,r=0;r<l.length;r++){var o=l[r];i(o.value,{componentStack:o.stack})}}finally{ne.T=n,ve.p=s}}if(l=gs,i=ys,ys=null,l!==null&&(gs=null,i===null&&(i=[]),e!==null))for(o=0;o<l.length;o++)n=(0,l[o])(i),n!==void 0&&e.finished.finally(n);kn&3&&au(),Dn(t),s=t.pendingLanes,a&261930&&s&42?t===ko?Di++:(Di=0,ko=t):(Di=0,ko=null),wr(0)}}function yb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_r(t)))}function au(){return hs!==null&&(hs.skipTransition(),hs=null),Af(),kf(),jf(),Mf()}function Mf(){if(ze!==5)return!1;var e=on,t=Cf;Cf=0;var n=wp(kn),a=ne.T,l=ve.p;try{ve.p=32>n?32:n,ne.T=null,n=Tf,Tf=null;var s=on,i=kn;if(ze=0,El=on=null,kn=0,ye&6)throw Error(q(331));var r=ye;if(ye|=4,sb(s.current),nb(s,s.current,i,n),ye=r,wr(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(mr,s)}catch{}return!0}finally{ve.p=l,ne.T=a,yb(e,t)}}function Sg(e,t,n){t=Xt(n,t),t=uf(e.stateNode,t,2),e=$a(e,t,2),e!==null&&(gr(e,2),Dn(e))}function we(e,t,n){if(e.tag===3)Sg(e,e,n);else for(;t!==null;){if(t.tag===3){Sg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(za===null||!za.has(a))){e=Xt(n,e),n=$_(2),a=$a(t,n,2),a!==null&&(O_(n,a,t,e),gr(a,2),Dn(a));break}}t=t.return}}function Ju(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new ZN;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(sm=!0,l.add(n),e=nE.bind(null,e,t,n),t.then(e,e))}function nE(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ee===e&&(fe&n)===n&&(Be===4||Be===3&&(fe&62914560)===fe&&300>Dt()-eu?ye&2?fc|=n:ks(e,0):fc|=n,Ts===fe&&(Ts=0)),Dn(e)}function vb(e,t){t===0&&(t=ov()),e=Rl(e,t),e!==null&&(gr(e,t),Dn(e))}function aE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vb(e,n)}function lE(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(q(314))}a!==null&&a.delete(t),vb(e,n)}function sE(e,t){return bp(e,t)}var js=null,Zl=null,$f=!1,gc=!1,Wu=!1,Aa=0;function Dn(e){e!==Zl&&e.next===null&&(Zl===null?js=Zl=e:Zl=Zl.next=e),gc=!0,$f||($f=!0,rE())}function wr(e,t){if(!Wu&&gc){Wu=!0;do for(var n=!1,a=js;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var s=0;else{var i=a.suspendedLanes,r=a.pingedLanes;s=(1<<31-Rt(42|e)+1)-1,s&=l&~(i&~r),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,Ng(a,s))}else s=fe,s=Vc(a,a===Ee?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(s&3)||hr(a,s)||(n=!0,Ng(a,s));a=a.next}while(n);Wu=!1}}function iE(){_b()}function _b(){gc=$f=!1;var e=0;Aa!==0&&vE()&&(e=Aa);for(var t=Dt(),n=null,a=js;a!==null;){var l=a.next,s=bb(a,t);s===0?(a.next=null,n===null?js=l:n.next=l,l===null&&(Zl=n)):(n=a,(e!==0||s&3)&&(gc=!0)),a=l}ze!==0&&ze!==5||wr(e),Aa!==0&&(Aa=0)}function bb(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var i=31-Rt(s),r=1<<i,o=l[i];o===-1?(!(r&n)||r&a)&&(l[i]=NS(r,t)):o<=t&&(e.expiredLanes|=r),s&=~r}if(t=Ee,n=fe,n=Vc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ju(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||hr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&ju(a),wp(n)){case 2:case 8:n=sv;break;case 32:n=Zo;break;case 268435456:n=iv;break;default:n=Zo}return a=xb.bind(null,e),n=bp(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&ju(a),e.callbackPriority=2,e.callbackNode=null,2}function xb(e,t){if(ze!==0&&ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(au()&&e.callbackNode!==n)return null;var a=fe;return a=Vc(e,e===Ee?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(ub(e,a,t),bb(e,Dt()),e.callbackNode!=null&&e.callbackNode===n?xb.bind(null,e):null)}function Ng(e,t){if(au())return null;ub(e,t,!0)}function rE(){bE(function(){ye&6?bp(lv,iE):_b()})}function rm(){if(Aa===0){var e=xl;e===0&&(e=Rr,Rr<<=1,!(Rr&261888)&&(Rr=256)),Aa=e}return Aa}function Eg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yo(e)}function oE(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var s=Eg((l[Tt]||null).action),i=a.submitter;i&&(t=(t=i[Tt]||null)?Eg(t.formAction):i.getAttribute("formAction"),t!==null&&(s=t,i=null));var r=new Ic("action","action",null,a,l);e.push({event:r,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Aa!==0){var o=new FormData(l,i);of(n,{pending:!0,data:o,method:l.method,action:s},null,o)}}else typeof s=="function"&&(r.preventDefault(),o=new FormData(l,i),of(n,{pending:!0,data:o,method:l.method,action:s},s,o))},currentTarget:l}]})}}for(var ed=0;ed<Kd.length;ed++){var td=Kd[ed],cE=td.toLowerCase(),uE=td[0].toUpperCase()+td.slice(1);un(cE,"on"+uE)}un(Ov,"onAnimationEnd");un(Dv,"onAnimationIteration");un(zv,"onAnimationStart");un("dblclick","onDoubleClick");un("focusin","onFocus");un("focusout","onBlur");un(_N,"onTransitionRun");un(bN,"onTransitionStart");un(xN,"onTransitionCancel");un(Rv,"onTransitionEnd");Ns("onMouseEnter",["mouseout","mouseover"]);Ns("onMouseLeave",["mouseout","mouseover"]);Ns("onPointerEnter",["pointerout","pointerover"]);Ns("onPointerLeave",["pointerout","pointerover"]);Dl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xi));function wb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var i=a.length-1;0<=i;i--){var r=a[i],o=r.instance,u=r.currentTarget;if(r=r.listener,o!==s&&l.isPropagationStopped())break e;s=r,l.currentTarget=u;try{s(l)}catch(d){Ko(d)}l.currentTarget=null,s=o}else for(i=0;i<a.length;i++){if(r=a[i],o=r.instance,u=r.currentTarget,r=r.listener,o!==s&&l.isPropagationStopped())break e;s=r,l.currentTarget=u;try{s(l)}catch(d){Ko(d)}l.currentTarget=null,s=o}}}}function ue(e,t){var n=t[bh];n===void 0&&(n=t[bh]=new Set);var a=e+"__bubble";n.has(a)||(Sb(t,e,2,!1),n.add(a))}function nd(e,t,n){var a=0;t&&(a|=4),Sb(n,e,a,t)}var Qr="_reactListening"+Math.random().toString(36).slice(2);function om(e){if(!e[Qr]){e[Qr]=!0,mv.forEach(function(n){n!=="selectionchange"&&(dE.has(n)||nd(n,!1,e),nd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qr]||(t[Qr]=!0,nd("selectionchange",!1,t))}}function Sb(e,t,n,a){switch(Pb(t)){case 2:var l=aC;break;case 8:l=lC;break;default:l=hm}n=l.bind(null,t,n,e),l=void 0,!Pd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function ad(e,t,n,a,l){var s=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var r=a.stateNode.containerInfo;if(r===l)break;if(i===4)for(i=a.return;i!==null;){var o=i.tag;if((o===3||o===4)&&i.stateNode.containerInfo===l)return;i=i.return}for(;r!==null;){if(i=rl(r),i===null)return;if(o=i.tag,o===5||o===6||o===26||o===27){a=s=i;continue e}r=r.parentNode}}a=a.return}wv(function(){var u=s,d=Np(n),f=[];e:{var p=Hv.get(e);if(p!==void 0){var h=Ic,y=e;switch(e){case"keypress":if(_o(n)===0)break e;case"keydown":case"keyup":h=QS;break;case"focusin":y="focus",h=Ru;break;case"focusout":y="blur",h=Ru;break;case"beforeblur":case"afterblur":h=Ru;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=eN;break;case Ov:case Dv:case zv:h=VS;break;case Rv:h=nN;break;case"scroll":case"scrollend":h=zS;break;case"wheel":h=lN;break;case"copy":case"cut":case"paste":h=IS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=jh;break;case"submit":h=JS;break;case"toggle":case"beforetoggle":h=iN}var b=(t&4)!==0,x=!b&&(e==="scroll"||e==="scrollend"),m=b?p!==null?p+"Capture":null:p;b=[];for(var _=u,g;_!==null;){var v=_;if(g=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||g===null||m===null||(v=Li(_,m),v!=null&&b.push(Zi(_,v,g))),x)break;_=_.return}0<b.length&&(p=new h(p,y,null,n,d),f.push({event:p,listeners:b}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Yd&&(y=n.relatedTarget||n.fromElement)&&(rl(y)||y[Ys]))break e;(p||h)&&(y=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?rl(h):null,h!==null&&(x=pr(h),b=h.tag,h!==x||b!==5&&b!==27&&b!==6)&&(h=null)):(p=null,h=u),p!==h&&(b=Ah,v="onMouseLeave",m="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(b=jh,v="onPointerLeave",m="onPointerEnter",_="pointer"),x=p==null?y:hi(p),g=h==null?y:hi(h),y=new b(v,_+"leave",p,n,d),y.target=x,y.relatedTarget=g,v=null,rl(d)===u&&(b=new b(m,_+"enter",h,n,d),b.target=g,b.relatedTarget=x,v=b),x=v,b=p&&h?Od(p,h,fE):null,p!==null&&Cg(f,y,p,b,!1),h!==null&&x!==null&&Cg(f,x,h,b,!0)))}e:{if(p=u?hi(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var w=Dh;else if(Oh(p))if(Av)w=gN;else{w=mN;var N=pN}else h=p.nodeName,!h||h.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?u&&Sp(u.elementType)&&(w=Dh):w=hN;if(w&&(w=w(e,u))){Tv(f,w,n,d);break e}N&&N(e,p,u)}switch(N=u?hi(u):window,e){case"focusin":(Oh(N)||N.contentEditable==="true")&&(es=N,Zd=u,Ni=null);break;case"focusout":Ni=Zd=es=null;break;case"mousedown":Qd=!0;break;case"contextmenu":case"mouseup":case"dragend":Qd=!1,Lh(f,n,d);break;case"selectionchange":if(vN)break;case"keydown":case"keyup":Lh(f,n,d)}var S;if(Tp)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Wl?Ev(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Nv&&n.locale!=="ko"&&(Wl||A!=="onCompositionStart"?A==="onCompositionEnd"&&Wl&&(S=Sv()):(Na=d,Ep="value"in Na?Na.value:Na.textContent,Wl=!0)),N=yc(u,A),0<N.length&&(A=new kh(A,e,null,n,d),f.push({event:A,listeners:N}),S?A.data=S:(S=Cv(n),S!==null&&(A.data=S)))),(S=oN?cN(e,n):uN(e,n))&&(A=yc(u,"onBeforeInput"),0<A.length&&(N=new kh("onBeforeInput","beforeinput",null,n,d),f.push({event:N,listeners:A}),N.data=S)),oE(f,e,u,n,d)}wb(f,t)})}function Zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yc(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,s=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||s===null||(l=Li(e,n),l!=null&&a.unshift(Zi(e,l,s)),l=Li(e,t),l!=null&&a.push(Zi(e,l,s))),e.tag===3)return a;e=e.return}return[]}function fE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cg(e,t,n,a,l){for(var s=t._reactName,i=[];n!==null&&n!==a;){var r=n,o=r.alternate,u=r.stateNode;if(r=r.tag,o!==null&&o===a)break;r!==5&&r!==26&&r!==27||u===null||(o=u,l?(u=Li(n,s),u!=null&&i.unshift(Zi(n,u,o))):l||(u=Li(n,s),u!=null&&i.push(Zi(n,u,o)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var pE=/\r\n?/g,mE=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(pE,`
|
|
49
|
+
`).replace(mE,"")}function Nb(e,t){return t=Tg(t),Tg(e)===t}function xe(e,t,n,a,l,s){switch(n){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||Es(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&Es(e,""+a);else return;break;case"className":Lr(e,"class",a);break;case"tabIndex":Lr(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Lr(e,n,a);break;case"style":xv(e,a,s);return;case"data":if(t!=="object"){Lr(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=yo(a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&xe(e,t,"name",l.name,l,null),xe(e,t,"formEncType",l.formEncType,l,null),xe(e,t,"formMethod",l.formMethod,l,null),xe(e,t,"formTarget",l.formTarget,l,null)):(xe(e,t,"encType",l.encType,l,null),xe(e,t,"method",l.method,l,null),xe(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=yo(a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=En);return;case"onScroll":a!=null&&ue("scroll",e);return;case"onScrollEnd":a!=null&&ue("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(q(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(q(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=yo(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":ue("beforetoggle",e),ue("toggle",e),go(e,"popover",a);break;case"xlinkActuate":Ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ln(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ln(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ln(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ln(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":go(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=OS.get(n)||n,go(e,n,a);else return}ge=!0}function Of(e,t,n,a,l,s){switch(n){case"style":xv(e,a,s);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(q(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(q(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof a=="string")Es(e,a);else if(typeof a=="number"||typeof a=="bigint")Es(e,""+a);else return;break;case"onScroll":a!=null&&ue("scroll",e);return;case"onScrollEnd":a!=null&&ue("scrollend",e);return;case"onClick":a!=null&&(e.onclick=En);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!hv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),s=n.slice(2,l?n.length-7:void 0),t=e[Tt]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(s,t,l),typeof a=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(s,a,l);break e}ge=!0,n in e?e[n]=a:a===!0?e.setAttribute(n,""):go(e,n,a)}return}ge=!0}function rt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ue("error",e),ue("load",e);var a=!1,l=!1,s;for(s in n)if(n.hasOwnProperty(s)){var i=n[s];if(i!=null)switch(s){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:xe(e,t,s,i,n,null)}}l&&xe(e,t,"srcSet",n.srcSet,n,null),a&&xe(e,t,"src",n.src,n,null);return;case"input":ue("invalid",e);var r=s=i=l=null,o=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(d!=null)switch(a){case"name":l=d;break;case"type":i=d;break;case"checked":o=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":r=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(q(137,t));break;default:xe(e,t,a,d,n,null)}}vv(e,s,r,o,u,i,l,!1);return;case"select":ue("invalid",e),a=i=s=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":s=r;break;case"defaultValue":i=r;break;case"multiple":a=r;default:xe(e,t,l,r,n,null)}t=s,n=i,e.multiple=!!a,t!=null?cs(e,!!a,t,!1):n!=null&&cs(e,!!a,n,!0);return;case"textarea":ue("invalid",e),s=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"children":s=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(q(91));break;default:xe(e,t,i,r,n,null)}bv(e,a,l,s);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:xe(e,t,o,a,n,null)}return;case"dialog":ue("beforetoggle",e),ue("toggle",e),ue("cancel",e),ue("close",e);break;case"iframe":case"object":ue("load",e);break;case"video":case"audio":for(a=0;a<Xi.length;a++)ue(Xi[a],e);break;case"image":ue("error",e),ue("load",e);break;case"details":ue("toggle",e);break;case"embed":case"source":case"link":ue("error",e),ue("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:xe(e,t,u,a,n,null)}return;default:if(Sp(t)){for(d in n)n.hasOwnProperty(d)&&(a=n[d],a!==void 0&&Of(e,t,d,a,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(a=n[r],a!=null&&xe(e,t,r,a,n,null))}var hE={};function gE(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,s=null,i=null,r=null,o=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":o=f;default:a.hasOwnProperty(h)||xe(e,t,h,null,a,f)}}for(var p in a){var h=a[p];if(f=n[p],a.hasOwnProperty(p)&&(h!=null||f!=null))switch(p){case"type":h!==f&&(ge=!0),s=h;break;case"name":h!==f&&(ge=!0),l=h;break;case"checked":h!==f&&(ge=!0),u=h;break;case"defaultChecked":h!==f&&(ge=!0),d=h;break;case"value":h!==f&&(ge=!0),i=h;break;case"defaultValue":h!==f&&(ge=!0),r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(q(137,t));break;default:h!==f&&xe(e,t,p,h,a,f)}}Gd(e,i,r,o,u,d,s,l);return;case"select":h=i=r=p=null;for(s in n)if(o=n[s],n.hasOwnProperty(s)&&o!=null)switch(s){case"value":break;case"multiple":h=o;default:a.hasOwnProperty(s)||xe(e,t,s,null,a,o)}for(l in a)if(s=a[l],o=n[l],a.hasOwnProperty(l)&&(s!=null||o!=null))switch(l){case"value":s!==o&&(ge=!0),p=s;break;case"defaultValue":s!==o&&(ge=!0),r=s;break;case"multiple":s!==o&&(ge=!0),i=s;default:s!==o&&xe(e,t,l,s,a,o)}t=r,n=i,a=h,p!=null?cs(e,!!n,p,!1):!!a!=!!n&&(t!=null?cs(e,!!n,t,!0):cs(e,!!n,n?[]:"",!1));return;case"textarea":h=p=null;for(r in n)if(l=n[r],n.hasOwnProperty(r)&&l!=null&&!a.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:xe(e,t,r,null,a,l)}for(i in a)if(l=a[i],s=n[i],a.hasOwnProperty(i)&&(l!=null||s!=null))switch(i){case"value":l!==s&&(ge=!0),p=l;break;case"defaultValue":l!==s&&(ge=!0),h=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(q(91));break;default:l!==s&&xe(e,t,i,l,a,s)}_v(e,p,h);return;case"option":for(var y in n)if(p=n[y],n.hasOwnProperty(y)&&p!=null&&!a.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:xe(e,t,y,null,a,p)}for(o in a)if(p=a[o],h=n[o],a.hasOwnProperty(o)&&p!==h&&(p!=null||h!=null))switch(o){case"selected":p!==h&&(ge=!0),e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:xe(e,t,o,p,a,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)p=n[b],n.hasOwnProperty(b)&&p!=null&&!a.hasOwnProperty(b)&&xe(e,t,b,null,a,p);for(u in a)if(p=a[u],h=n[u],a.hasOwnProperty(u)&&p!==h&&(p!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(q(137,t));break;default:xe(e,t,u,p,a,h)}return;default:if(Sp(t)){for(var x in n)p=n[x],n.hasOwnProperty(x)&&p!==void 0&&!a.hasOwnProperty(x)&&Of(e,t,x,void 0,a,p);for(d in a)p=a[d],h=n[d],!a.hasOwnProperty(d)||p===h||p===void 0&&h===void 0||Of(e,t,d,p,a,h);return}}for(var m in n)p=n[m],n.hasOwnProperty(m)&&p!=null&&!a.hasOwnProperty(m)&&xe(e,t,m,null,a,p);for(f in a)p=a[f],h=n[f],!a.hasOwnProperty(f)||p===h||p==null&&h==null||xe(e,t,f,p,a,h)}function Ag(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],s=l.transferSize,i=l.initiatorType,r=l.duration;if(s&&r&&Ag(i)){for(i=0,r=l.responseEnd,a+=1;a<n.length;a++){var o=n[a],u=o.startTime;if(u>r)break;var d=o.transferSize,f=o.initiatorType;d&&Ag(f)&&(o=o.responseEnd,i+=d*(o<r?1:(r-u)/(o-u)))}if(--a,t+=8*(s+i)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Df=null,zf=null;function Qi(e){return e.nodeType===9?e:e.ownerDocument}function kg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Eb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Cb(e,t,n,a){return n=Qi(n).createElement(e),n[at]=a,n[Tt]=t,rt(n,e,t),We(n),n}function Rf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ld=null;function vE(){var e=window.event;return e&&e.type==="popstate"?e===ld?!1:(ld=e,!0):(ld=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,_E=typeof clearTimeout=="function"?clearTimeout:void 0,jg=typeof Promise=="function"?Promise:void 0,Mg=typeof requestAnimationFrame=="function"?requestAnimationFrame:cm,bE=typeof queueMicrotask=="function"?queueMicrotask:typeof jg<"u"?function(e){return jg.resolve(null).then(e).catch(xE)}:cm;function xE(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function $g(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),zs(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")id(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,id(n);for(var s=n.firstChild;s;){var i=s.nextSibling,r=s.nodeName;s[yr]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=i}}else n==="body"&&id(e.ownerDocument.body);n=l}while(n);zs(t)}function Og(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Tb(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var l=a=0;l<t.length;l++){var s=t[l];0<s.width&&0<s.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function Ab(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function wE(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Hf(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return wE(t,n,e)}function SE(e){return e.documentElement.clientHeight}function NE(e){this.addEventListener("load",e),this.addEventListener("error",e)}function EE(e,t,n,a,l,s,i,r,o){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var p=u.defaultView,h=p.navigation&&p.navigation.transition,y=u.fonts.status;a();var b=[];if(y==="loaded"&&(SE(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),y=b.length,e!==null)for(var x=e.suspenseyImages,m=0,_=0;_<x.length;_++){var g=x[_];if(!g.complete){var v=g.getBoundingClientRect();if(0<v.bottom&&0<v.right&&v.top<p.innerHeight&&v.left<p.innerWidth){if(m+=Vb(g),m>$o){b.length=y;break}g=new Promise(NE.bind(g)),b.push(g)}}}if(0<b.length)return p=Promise.race([Promise.all(b),new Promise(function(w){return setTimeout(w,500)})]).then(l,l),(h?Promise.allSettled([h.finished,p]):p).then(s,s);if(l(),h)return h.finished.then(s,s);s()},types:n});u.__reactViewTransition=d;var f=[];return d.ready.then(function(){for(var p=u.documentElement.getAnimations({subtree:!0}),h=0;h<p.length;h++){var y=p[h],b=y.effect,x=b.pseudoElement;if(x!=null&&x.startsWith("::view-transition")){f.push(y),y=b.getKeyframes();for(var m=x=void 0,_=!0,g=0;g<y.length;g++){var v=y[g],w=v.width;if(x===void 0)x=w;else if(x!==w){_=!1;break}if(w=v.height,m===void 0)m=w;else if(m!==w){_=!1;break}delete v.width,delete v.height,v.transform==="none"&&delete v.transform}_&&x!==void 0&&m!==void 0&&(b.setKeyframes(y),_=getComputedStyle(b.target,b.pseudoElement),_.width!==x||_.height!==m)&&(_=y[0],_.width=x,_.height=m,_=y[y.length-1],_.width=x,_.height=m,b.setKeyframes(y))}}i()},function(p){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof p=="object"&&p!==null)switch(p.name){case"InvalidStateError":(p.message==="View transition was skipped because document visibility state is hidden."||p.message==="Skipping view transition because document visibility state has become hidden."||p.message==="Skipping view transition because viewport size changed."||p.message==="Transition was aborted because of invalid state")&&(p=null)}p!==null&&o(p)}finally{a(),l(),i()}}),d.finished.finally(function(){for(var p=0;p<f.length;p++)f[p].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),r()}),d}catch{return a(),l(),i(),null}}function ol(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ol.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Ce({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};ol.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),a=[],l=0;l<n.length;l++){var s=n[l].effect;s!==null&&s.target===e&&s.pseudoElement===t&&a.push(n[l])}return a};ol.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function kb(e){return{name:e,group:new ol("group",e),imagePair:new ol("image-pair",e),old:new ol("old",e),new:new ol("new",e)}}function Vt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Vt.prototype.addEventListener=function(e,t,n){var a=null,l=null;if(!(n!=null&&typeof n!="boolean"&&(a=n.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var s=this._eventListeners;if(jb(s,e,t,n)===-1){var i=this,r=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(r=function(o){i.removeEventListener(e,t,n),typeof t=="function"?t.call(this,o):t.handleEvent(o)}),a!==null&&(l=i.removeEventListener.bind(i,e,t,n),a.addEventListener("abort",l,{once:!0}),l=a.removeEventListener.bind(a,"abort",l)),a=Ms(n),s.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:r,cleanup:l}),Ct(this._fragmentFiber.child,!1,CE,e,r,a)}this._eventListeners=s}};function CE(e,t,n,a){return Ze(e).addEventListener(t,n,a),!1}Vt.prototype.removeEventListener=function(e,t,n){var a=this._eventListeners;if(a!==null&&(t=jb(a,e,t,n),t!==-1)){var l=a[t];n=l.attachedListener;var s=l.cleanup;l=Ms(l.optionsOrUseCapture),Ct(this._fragmentFiber.child,!1,TE,e,n,l),a.splice(t,1),s!==null&&s()}};function TE(e,t,n,a){return Ze(e).removeEventListener(t,n,a),!1}function Ms(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Dg(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function jb(e,t,n,a){if(e.length===0)return-1;a=Dg(a);for(var l=0;l<e.length;l++){var s=e[l];if(s.type===t&&s.listener===n&&Dg(s.optionsOrUseCapture)===a)return l}return-1}Vt.prototype.dispatchEvent=function(e){var t=Ol(this._fragmentFiber);if(t===null)return!0;t=Ze(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var l=0;l<n.length;l++){var s=n[l];a.addEventListener(s.type,s.attachedListener,Ms(s.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),n)for(l=0;l<n.length;l++)s=n[l],a.removeEventListener(s.type,s.attachedListener,Ms(s.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)};Vt.prototype.focus=function(e){Ct(this._fragmentFiber.child,!0,Mb,e,void 0,void 0)};function Mb(e,t){return e.tag===6?!1:(e=Ze(e),LE(e,t))}Vt.prototype.focusLast=function(e){var t=[];Ct(this._fragmentFiber.child,!0,um,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Mb(t[n],e);n--);};function um(e,t){return t.push(e),!1}Vt.prototype.blur=function(){var e=Ol(this._fragmentFiber);e!==null&&(e=Ze(e),e=Qi(e).activeElement,e!==null&&Ct(this._fragmentFiber.child,!1,AE,e,void 0,void 0))};function AE(e,t){return e.tag===6?!1:(e=Ze(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Vt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Ct(this._fragmentFiber.child,!1,kE,e,void 0,void 0)};function kE(e,t){return e.tag===6||(e=Ze(e),t.observe(e)),!1}Vt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Ct(this._fragmentFiber.child,!1,jE,e,void 0,void 0);for(var n=t=0;n<ln.length;n++){var a=ln[n];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):ln[t++]=a}ln.length=t}};function jE(e,t){return e.tag===6||(e=Ze(e),t.unobserve(e)),!1}var ln=[],sd=!1;function ME(e,t,n){ln.push({fragmentInstance:e,observer:t,instance:n}),sd||(sd=!0,VE(function(){sd=!1;var a=ln;ln=[];for(var l=0;l<a.length;l++){var s=a[l];s.observer.unobserve(s.instance)}}))}Vt.prototype.getClientRects=function(){var e=[];return Ct(this._fragmentFiber.child,!1,$E,e,void 0,void 0),e};function $E(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=Ze(e),t.push.apply(t,e.getClientRects());return!1}Vt.prototype.getRootNode=function(e){var t=Ol(this._fragmentFiber);return t===null?this:Ze(t).getRootNode(e)};Vt.prototype.compareDocumentPosition=function(e){var t=Ol(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];Ct(this._fragmentFiber.child,!1,um,n,void 0,void 0);var a=Ze(t);if(n.length===0){if(n=a,mh(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var l=a=n.compareDocumentPosition(e);return n===e?l=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=ev(t)[1],n===null?l=Node.DOCUMENT_POSITION_PRECEDING:(e=Ze(n).compareDocumentPosition(e),l=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),l|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=Ze(n[0]),l=Ze(n[n.length-1]);var s=mh(this._fragmentFiber)?t.parentElement:a;if(s==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=s.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,s=s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY;var i=t.compareDocumentPosition(e),r=l.compareDocumentPosition(e),o=i&Node.DOCUMENT_POSITION_CONTAINED_BY||r&Node.DOCUMENT_POSITION_CONTAINED_BY;return r=a&&s&&i&Node.DOCUMENT_POSITION_FOLLOWING&&r&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||s&&l===e||o||r?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!s&&l===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:i,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||OE(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function OE(e,t,n,a,l){var s=rl(l);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!s)e:{for(;s!==null;){if(s.tag===7&&(s===t||s.alternate===t)){n=!0;break e}s=s.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(s===null)return s=l.ownerDocument,l===s||l===s.documentElement||l===s.body;e:{for(s=t,t=Ol(t);s!==null;){if(!(s.tag!==5&&s.tag!==3&&s.tag!==27||s!==t&&s.alternate!==t)){s=!0;break e}s=s.return}s=!1}return s}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!s)&&!(t=s===n)&&(t=Od(n,s,hh),t===null?t=!1:(Ct(t,!0,rS,s,n),s=Ql,Ql=null,t=s!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!s)&&!(t=s===a)&&(t=Od(a,s,hh),t===null?t=!1:(Ct(t,!0,oS,s,a),s=Ql,$d=Ql=null,t=s!==null)),t):!1}function zg(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Vt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(q(566));var t=[];Ct(this._fragmentFiber.child,!1,um,t,void 0,void 0);var n=e!==!1;if(t.length===0){var a=ev(this._fragmentFiber);if(a=n?a[1]||a[0]||Ol(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=Ze(a),zg(e,n);return}if(a=Ze(a),a.nodeType!==9){if(a.nodeType===11){n="host"in a?a.host:null,n!==null&&n.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=n?t.length-1:0;a!==(n?-1:t.length);){var l=t[a];l.tag===6?(l=Ze(l),zg(l,n)):Ze(l).scrollIntoView(e),a+=n?-1:1}};function DE(e,t){return e=Ze(e),$b(e,t),!1}function $b(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Ob(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.addEventListener(l.type,l.attachedListener,Ms(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){for(var i=0,r=0;r<ln.length;r++){var o=ln[r];(o.fragmentInstance!==t||o.observer!==s||o.instance!==e)&&(ln[i++]=o)}ln.length=i,s.observe(e)}),$b(e,t))}function zE(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.removeEventListener(l.type,l.attachedListener,Ms(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){typeof s.rootMargin=="string"?ME(t,s,e):s.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Bf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Bf(n),Uc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function RE(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[yr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function HE(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qt(e.nextSibling),e===null))return null;return e}function Db(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function Lf(e){return e.data==="$?"||e.data==="$~"}function dm(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function BE(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Vf=null;function Rg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Hg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function LE(e,t){function n(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return a}function VE(e){Mg(function(){Mg(function(t){return e(t)})})}function zb(e,t,n){switch(t=Qi(n),e){case"html":if(e=t.documentElement,!e)throw Error(q(452));return e;case"head":if(e=t.head,!e)throw Error(q(453));return e;case"body":if(e=t.body,!e)throw Error(q(454));return e;default:throw Error(q(451))}}function Rb(e,t,n){for(var a in n){var l=n[a];n.hasOwnProperty(a)&&l!=null&&xe(e,t,a,null,hE,l)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===En&&(e.onclick=null),Uc(e)}function id(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Uc(e)}var Kt=new Map,Bg=new Set;function Ki(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ra=ve.d;ve.d={f:UE,r:IE,D:qE,C:GE,L:YE,m:PE,X:ZE,S:XE,M:QE};function UE(){var e=ra.f(),t=tu();return e||t}function IE(e){var t=Ps(e);t!==null&&t.tag===5&&t.type==="form"?x_(t):ra.r(e)}var Ks=typeof document>"u"?null:document;function Hb(e,t,n){var a=Ks;if(a&&typeof t=="string"&&t){var l=Pt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Bg.has(l)||(Bg.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),rt(t,"link",e),We(t),a.head.appendChild(t)))}}function qE(e){ra.D(e),Hb("dns-prefetch",e,null)}function GE(e,t){ra.C(e,t),Hb("preconnect",e,t)}function YE(e,t,n){ra.L(e,t,n);var a=Ks;if(a&&e&&t){var l='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Pt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Pt(n.imageSizes)+'"]')):l+='[href="'+Pt(e)+'"]';var s=l;switch(t){case"style":s=$s(e);break;case"script":s=Fs(e)}if(!(Kt.has(s)||(e=Ce({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Kt.set(s,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Sr(s))||t==="script"&&a.querySelector(Nr(s))))){var i=a.createElement("link");rt(i,"link",e),t==="style"&&(i[Qo]=!0,i.onload=i.onerror=function(){pv(i)}),We(i),a.head.appendChild(i)}}}function PE(e,t){ra.m(e,t);var n=Ks;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Pt(a)+'"][href="'+Pt(e)+'"]',s=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Fs(e)}if(!Kt.has(s)&&(e=Ce({rel:"modulepreload",href:e},t),Kt.set(s,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Nr(s)))return}a=n.createElement("link"),rt(a,"link",e),We(a),n.head.appendChild(a)}}}function XE(e,t,n){ra.S(e,t,n);var a=Ks;if(a&&e){var l=os(a).hoistableStyles,s=$s(e);t=t||"default";var i=l.get(s);if(!i){var r={loading:0,preload:null};if(i=a.querySelector(Sr(s)))r.loading=5;else{e=Ce({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Kt.get(s))&&fm(e,n);var o=i=a.createElement("link");We(o),rt(o,"link",e),o._p=new Promise(function(u,d){o.onload=u,o.onerror=d}),o.addEventListener("load",function(){r.loading|=1}),o.addEventListener("error",function(){r.loading|=2}),r.loading|=4,jo(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:r},l.set(s,i)}}}function ZE(e,t){ra.X(e,t);var n=Ks;if(n&&e){var a=os(n).hoistableScripts,l=Fs(e),s=a.get(l);s||(s=n.querySelector(Nr(l)),s||(e=Ce({src:e,async:!0},t),(t=Kt.get(l))&&pm(e,t),s=n.createElement("script"),We(s),rt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(l,s))}}function QE(e,t){ra.M(e,t);var n=Ks;if(n&&e){var a=os(n).hoistableScripts,l=Fs(e),s=a.get(l);s||(s=n.querySelector(Nr(l)),s||(e=Ce({src:e,async:!0,type:"module"},t),(t=Kt.get(l))&&pm(e,t),s=n.createElement("script"),We(s),rt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(l,s))}}function Lg(e,t,n,a){var l=(l=ka.current)?Ki(l):null;if(!l)throw Error(q(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=$s(n.href),t=os(l).hoistableStyles,a=t.get(n),a||(a={type:"style",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=$s(n.href);var s=os(l).hoistableStyles,i=s.get(e);if(i||(l=l.ownerDocument||l,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,i),(s=l.querySelector(Sr(e)))?s._p||(i.instance=s,i.state.loading=5):(s=Kt.get(e),s||(s={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Kt.set(e,s)),KE(l,e,s,i.state))),t&&a===null)throw Error(q(528,""));return i}if(t&&a!==null)throw Error(q(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Fs(n),t=os(l).hoistableScripts,a=t.get(n),a||(a={type:"script",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(q(444,e))}}function $s(e){return'href="'+Pt(e)+'"'}function Sr(e){return'link[rel="stylesheet"]['+e+"]"}function Bb(e){return Ce({},e,{"data-precedence":e.precedence,precedence:null})}function KE(e,t,n,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Qo]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[Qo]=!0,t.onload=t.onerror=pv.bind(null,t),rt(t,"link",n),We(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Fs(e){return'[src="'+Pt(e)+'"]'}function Nr(e){return"script[async]"+e}function Vg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Pt(n.href)+'"]');if(a)return t.instance=a,We(a),a;var l=Ce({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),We(a),rt(a,"style",l),jo(a,n.precedence,e),t.instance=a;case"stylesheet":l=$s(n.href);var s=e.querySelector(Sr(l));if(s)return t.state.loading|=4,t.instance=s,We(s),s;a=Bb(n),(l=Kt.get(l))&&fm(a,l),s=(e.ownerDocument||e).createElement("link"),We(s);var i=s;return i._p=new Promise(function(r,o){i.onload=r,i.onerror=o}),rt(s,"link",a),t.state.loading|=4,jo(s,n.precedence,e),t.instance=s;case"script":return s=Fs(n.src),(l=e.querySelector(Nr(s)))?(t.instance=l,We(l),l):(a=n,(l=Kt.get(s))&&(a=Ce({},n),pm(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),We(l),rt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(q(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,jo(a,n.precedence,e));return t.instance}function jo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,s=l,i=0;i<a.length;i++){var r=a[i];if(r.dataset.precedence===t)s=r;else if(s!==l)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function fm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mo=null;function Ug(e,t,n){if(Mo===null){var a=new Map,l=Mo=new Map;l.set(n,a)}else l=Mo,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var s=n[l];if(!(s[yr]||s[at]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var i=s.getAttribute(t)||"";i=e+i;var r=a.get(i);r?r.push(s):a.set(i,[s])}}return a}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function FE(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ig(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Lb(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function Vb(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function qg(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Vb(t),e.suspenseyImages.push(t)),e=eC.bind(e),t.decode().then(e,e))}function JE(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var l=$s(a.href),s=t.querySelector(Sr(l));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fi.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,We(s);return}s=t.ownerDocument||t,a=Bb(a),(l=Kt.get(l))&&fm(a,l),s=s.createElement("link"),We(s);var i=s;i._p=new Promise(function(r,o){i.onload=r,i.onerror=o}),rt(s,"link",a),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Fi.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var $o=0;function WE(e,t){return e.stylesheets&&e.count===0&&Oo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&$o===0&&($o=62500*yE());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>$o?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function Ub(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Oo(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Fi(){this.count--,Ub(this)}function eC(){this.imgCount--,Ub(this)}var vc=null;function Oo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vc=new Map,t.forEach(tC,e),vc=null,Fi.call(e))}function tC(e,t){if(!(t.state.loading&4)){var n=vc.get(e);if(n)var a=n.get(null);else{n=new Map,vc.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<l.length;s++){var i=l[s];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(n.set(i.dataset.precedence,i),a=i)}a&&n.set(null,a)}l=t.instance,i=l.getAttribute("data-precedence"),s=n.get(i)||a,s===a&&n.set(null,l),n.set(i,l),this.count++,a=Fi.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),s?s.parentNode.insertBefore(l,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Os={$$typeof:Nn,Provider:null,Consumer:null,_currentValue:ul,_currentValue2:ul,_threadCount:0};function nC(e,t,n,a,l,s,i,r,o){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.hiddenUpdates=Mu(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=s,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.transitionTypes=null,this.incompleteTransitions=new Map}function Ib(e,t,n,a,l,s,i,r,o,u,d,f){return e=new nC(e,t,n,i,o,u,d,f,r),t=1,s===!0&&(t|=24),s=wt(3,null,null,t),e.current=s,s.stateNode=e,t=Op(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:n,cache:t},Rp(s),e}function qb(e){return e?(e=as,e):as}function Gb(e,t,n,a,l,s){l=qb(l),a.context===null?a.context=l:a.pendingContext=l,a=Ma(t),a.payload={element:n},s=s===void 0?null:s,s!==null&&(a.callback=s),n=$a(e,a,t),n!==null&&(Nt(n,e,t),Ci(n,e,t))}function Gg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mm(e,t){Gg(e,t),(e=e.alternate)&&Gg(e,t)}function Yb(e){if(e.tag===13||e.tag===31){var t=Rl(e,67108864);t!==null&&Nt(t,e,67108864),mm(e,67108864)}}function Yg(e){if(e.tag===13||e.tag===31){var t=Ht();t=xp(t);var n=Rl(e,t);n!==null&&Nt(n,e,t),mm(e,t)}}var Ds=!0;function aC(e,t,n,a){var l=ne.T;ne.T=null;var s=ve.p;try{ve.p=2,hm(e,t,n,a)}finally{ve.p=s,ne.T=l}}function lC(e,t,n,a){var l=ne.T;ne.T=null;var s=ve.p;try{ve.p=8,hm(e,t,n,a)}finally{ve.p=s,ne.T=l}}function hm(e,t,n,a){if(Ds){var l=If(a);if(l===null)ad(e,t,a,_c,n),Pg(e,a);else if(iC(l,e,t,n,a))a.stopPropagation();else if(Pg(e,a),t&4&&-1<sC.indexOf(e)){for(;l!==null;){var s=Ps(l);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var i=nl(s.pendingLanes);if(i!==0){var r=s;for(r.pendingLanes|=2,r.entangledLanes|=2;i;){var o=1<<31-Rt(i);r.entanglements[1]|=o,i&=~o}Dn(s),!(ye&6)&&(pc=Dt()+500,wr(0))}}break;case 31:case 13:r=Rl(s,2),r!==null&&Nt(r,s,2),tu(),mm(s,2)}if(s=If(a),s===null&&ad(e,t,a,_c,n),s===l)break;l=s}l!==null&&a.stopPropagation()}else ad(e,t,a,null,n)}}function If(e){return e=Np(e),gm(e)}var _c=null;function gm(e){if(_c=null,e=rl(e),e!==null){var t=pr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=F0(t),e!==null)return e;e=null}else if(n===31){if(e=J0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _c=e,null}function Pb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yS()){case lv:return 2;case sv:return 8;case Zo:case vS:return 32;case iv:return 268435456;default:return 32}default:return 32}}var qf=!1,Ra=null,Ha=null,Ba=null,Ji=new Map,Wi=new Map,ba=[],sC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Pg(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":Ji.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(t.pointerId)}}function ri(e,t,n,a,l,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:s,targetContainers:[l]},t!==null&&(t=Ps(t),t!==null&&Yb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function iC(e,t,n,a,l){switch(t){case"focusin":return Ra=ri(Ra,e,t,n,a,l),!0;case"dragenter":return Ha=ri(Ha,e,t,n,a,l),!0;case"mouseover":return Ba=ri(Ba,e,t,n,a,l),!0;case"pointerover":var s=l.pointerId;return Ji.set(s,ri(Ji.get(s)||null,e,t,n,a,l)),!0;case"gotpointercapture":return s=l.pointerId,Wi.set(s,ri(Wi.get(s)||null,e,t,n,a,l)),!0}return!1}function Xb(e){var t=rl(e.target);if(t!==null){var n=pr(t);if(n!==null){if(t=n.tag,t===13){if(t=F0(n),t!==null){e.blockedOn=t,_h(e.priority,function(){Yg(n)});return}}else if(t===31){if(t=J0(n),t!==null){e.blockedOn=t,_h(e.priority,function(){Yg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Do(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=If(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Yd=a,n.target.dispatchEvent(a),Yd=null}else return t=Ps(n),t!==null&&Yb(t),e.blockedOn=n,!1;t.shift()}return!0}function Xg(e,t,n){Do(e)&&n.delete(t)}function rC(){qf=!1,Ra!==null&&Do(Ra)&&(Ra=null),Ha!==null&&Do(Ha)&&(Ha=null),Ba!==null&&Do(Ba)&&(Ba=null),Ji.forEach(Xg),Wi.forEach(Xg)}function Kr(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,rC)))}var Fr=null;function Zg(e){Fr!==e&&(Fr=e,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,function(){Fr===e&&(Fr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(gm(a||n)===null)continue;break}var s=Ps(n);s!==null&&(e.splice(t,3),t-=3,of(s,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function zs(e){function t(o){return Kr(o,e)}Ra!==null&&Kr(Ra,e),Ha!==null&&Kr(Ha,e),Ba!==null&&Kr(Ba,e),Ji.forEach(t),Wi.forEach(t);for(var n=0;n<ba.length;n++){var a=ba[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ba.length&&(n=ba[0],n.blockedOn===null);)Xb(n),n.blockedOn===null&&ba.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],s=n[a+1],i=l[Tt]||null;if(typeof s=="function")i||Zg(n);else if(i){var r=null;if(s&&s.hasAttribute("formAction")){if(l=s,i=s[Tt]||null)r=i.formAction;else if(gm(l)!==null)continue}else r=i.action;typeof r=="function"?n[a+1]=r:(n.splice(a,3),a-=3),Zg(n)}}}function Zb(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(i){return l=i})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function ym(e){this._internalRoot=e}lu.prototype.render=ym.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));var n=t.current,a=Ht();Gb(n,a,e,t,null,null)};lu.prototype.unmount=ym.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gb(e.current,2,null,e,null,null),tu(),t[Ys]=null}};function lu(e){this._internalRoot=e}lu.prototype.unstable_scheduleHydration=function(e){if(e){var t=fv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ba.length&&t!==0&&t<ba[n].priority;n++);ba.splice(n,0,e),n===0&&Xb(e)}};var Qg=Q0.version;if(Qg!=="19.3.1")throw Error(q(527,Qg,"19.3.1"));ve.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=iS(t),e=e!==null?W0(e):null,e=e===null?null:e.stateNode,e};var oC={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ne,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{mr=Jr.inject(oC),zt=Jr}catch{}}Bc.createRoot=function(e,t){if(!K0(e))throw Error(q(299));var n=!1,a="",l=k_,s=j_,i=M_;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ib(e,1,!1,null,null,n,a,null,l,s,i,Zb),e[Ys]=t.current,om(e),new ym(t)};Bc.hydrateRoot=function(e,t,n){if(!K0(e))throw Error(q(299));var a=!1,l="",s=k_,i=j_,r=M_,o=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(i=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(o=n.formState)),t=Ib(e,1,!0,t,n??null,a,l,o,s,i,r,Zb),t.context=qb(null),n=t.current,a=Ht(),a=xp(a),l=Ma(a),l.callback=null,$a(n,l,a),n=a,t.current.lanes=n,gr(t,n),Dn(t),e[Ys]=t.current,om(e),new lu(t)};Bc.version="19.3.1";function Qb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qb)}catch(e){console.error(e)}}Qb(),q0.exports=Bc;var cC=q0.exports;const Kg=e=>{let t;const n=new Set,a=(u,d)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},l=()=>t,r={setState:a,getState:l,getInitialState:()=>o,subscribe:u=>(n.add(u),()=>n.delete(u))},o=t=e(a,l,r);return r},uC=e=>e?Kg(e):Kg,dC=e=>e;function fC(e,t=dC){const n=ho.useSyncExternalStore(e.subscribe,ho.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return ho.useDebugValue(n),n}const pC=e=>{const t=uC(e),n=a=>fC(t,a);return Object.assign(n,t),n},mC=e=>pC;function hC(e,t){let n;try{n=e()}catch{return}return{getItem:l=>{var s;const i=o=>o===null?null:JSON.parse(o,void 0),r=(s=n.getItem(l))!=null?s:null;return vm(r)?r.then(i):i(r)},setItem:(l,s)=>n.setItem(l,JSON.stringify(s,void 0)),removeItem:l=>n.removeItem(l)}}const vm=e=>typeof(e==null?void 0:e.then)=="function",gC=e=>({then(t){return t?_m(t)(e):this}}),_m=e=>t=>{try{const n=e(t);return vm(n)?n:gC(n)}catch(n){return{then(a,l){return l?_m(l)(n):this}}}},yC=(e,t)=>(n,a,l)=>{let s={storage:hC(()=>window.localStorage),partialize:x=>x,version:0,merge:(x,m)=>({...m,...x}),...t},i=!1,r=0;const o=new Set,u=new Set;let d=s.storage;if(!d)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...x)},a,l);const f=()=>{const x=s.partialize({...a()});return d.setItem(s.name,{state:x,version:s.version})},p=l.setState;l.setState=(...x)=>(p(...x),f());const h=e((...x)=>(n(...x),f()),a,l);l.getInitialState=()=>h;let y;const b=()=>{var x,m;if(!d)return;const _=++r;i=!1,o.forEach(v=>{var w;return v((w=a())!=null?w:h)});const g=((m=s.onRehydrateStorage)==null?void 0:m.call(s,(x=a())!=null?x:h))||void 0;return _m(d.getItem.bind(d))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate){const w=s.migrate(v.state,v.version);return vm(w)?w.then(N=>[!0,N]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var w;if(_!==r)return;const[N,S]=v;if(y=s.merge(S,(w=a())!=null?w:h),n(y,!0),N)return f()}).then(()=>{_===r&&(g==null||g(a(),void 0),y=a(),i=!0,u.forEach(v=>v(y)))}).then(()=>{},v=>{_===r&&(g==null||g(void 0,v))})};return l.persist={setOptions:x=>{s={...s,...x},x.storage&&(d=x.storage)},clearStorage:()=>{++r,d==null||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>{try{return Promise.resolve(b())}catch(x){return Promise.reject(x)}},hasHydrated:()=>i,onHydrate:x=>(o.add(x),()=>{o.delete(x)}),onFinishHydration:x=>(u.add(x),()=>{u.delete(x)})},s.skipHydration||b(),y||h},vC=yC;function Pe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,a;n<e.length;n++)(a=Pe(e[n]))!==""&&(t+=(t&&" ")+a);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var _C={value:()=>{}};function su(){for(var e=0,t=arguments.length,n={},a;e<t;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new zo(n)}function zo(e){this._=e}function bC(e,t){return e.trim().split(/^|\s+/).map(function(n){var a="",l=n.indexOf(".");if(l>=0&&(a=n.slice(l+1),n=n.slice(0,l)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}zo.prototype=su.prototype={constructor:zo,on:function(e,t){var n=this._,a=bC(e+"",n),l,s=-1,i=a.length;if(arguments.length<2){for(;++s<i;)if((l=(e=a[s]).type)&&(l=xC(n[l],e.name)))return l;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<i;)if(l=(e=a[s]).type)n[l]=Fg(n[l],e.name,t);else if(t==null)for(l in n)n[l]=Fg(n[l],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new zo(e)},call:function(e,t){if((l=arguments.length-2)>0)for(var n=new Array(l),a=0,l,s;a<l;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],a=0,l=s.length;a<l;++a)s[a].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],l=0,s=a.length;l<s;++l)a[l].value.apply(t,n)}};function xC(e,t){for(var n=0,a=e.length,l;n<a;++n)if((l=e[n]).name===t)return l.value}function Fg(e,t,n){for(var a=0,l=e.length;a<l;++a)if(e[a].name===t){e[a]=_C,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:t,value:n}),e}var Gf="http://www.w3.org/1999/xhtml",Jg={svg:"http://www.w3.org/2000/svg",xhtml:Gf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function iu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Jg.hasOwnProperty(t)?{space:Jg[t],local:e}:e}function wC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gf&&t.documentElement.namespaceURI===Gf?t.createElement(e):t.createElementNS(n,e)}}function SC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Kb(e){var t=iu(e);return(t.local?SC:wC)(t)}function NC(){}function bm(e){return e==null?NC:function(){return this.querySelector(e)}}function EC(e){typeof e!="function"&&(e=bm(e));for(var t=this._groups,n=t.length,a=new Array(n),l=0;l<n;++l)for(var s=t[l],i=s.length,r=a[l]=new Array(i),o,u,d=0;d<i;++d)(o=s[d])&&(u=e.call(o,o.__data__,d,s))&&("__data__"in o&&(u.__data__=o.__data__),r[d]=u);return new Lt(a,this._parents)}function CC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function TC(){return[]}function Fb(e){return e==null?TC:function(){return this.querySelectorAll(e)}}function AC(e){return function(){return CC(e.apply(this,arguments))}}function kC(e){typeof e=="function"?e=AC(e):e=Fb(e);for(var t=this._groups,n=t.length,a=[],l=[],s=0;s<n;++s)for(var i=t[s],r=i.length,o,u=0;u<r;++u)(o=i[u])&&(a.push(e.call(o,o.__data__,u,i)),l.push(o));return new Lt(a,l)}function Jb(e){return function(){return this.matches(e)}}function Wb(e){return function(t){return t.matches(e)}}var jC=Array.prototype.find;function MC(e){return function(){return jC.call(this.children,e)}}function $C(){return this.firstElementChild}function OC(e){return this.select(e==null?$C:MC(typeof e=="function"?e:Wb(e)))}var DC=Array.prototype.filter;function zC(){return Array.from(this.children)}function RC(e){return function(){return DC.call(this.children,e)}}function HC(e){return this.selectAll(e==null?zC:RC(typeof e=="function"?e:Wb(e)))}function BC(e){typeof e!="function"&&(e=Jb(e));for(var t=this._groups,n=t.length,a=new Array(n),l=0;l<n;++l)for(var s=t[l],i=s.length,r=a[l]=[],o,u=0;u<i;++u)(o=s[u])&&e.call(o,o.__data__,u,s)&&r.push(o);return new Lt(a,this._parents)}function ex(e){return new Array(e.length)}function LC(){return new Lt(this._enter||this._groups.map(ex),this._parents)}function bc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bc.prototype={constructor:bc,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 VC(e){return function(){return e}}function UC(e,t,n,a,l,s){for(var i=0,r,o=t.length,u=s.length;i<u;++i)(r=t[i])?(r.__data__=s[i],a[i]=r):n[i]=new bc(e,s[i]);for(;i<o;++i)(r=t[i])&&(l[i]=r)}function IC(e,t,n,a,l,s,i){var r,o,u=new Map,d=t.length,f=s.length,p=new Array(d),h;for(r=0;r<d;++r)(o=t[r])&&(p[r]=h=i.call(o,o.__data__,r,t)+"",u.has(h)?l[r]=o:u.set(h,o));for(r=0;r<f;++r)h=i.call(e,s[r],r,s)+"",(o=u.get(h))?(a[r]=o,o.__data__=s[r],u.delete(h)):n[r]=new bc(e,s[r]);for(r=0;r<d;++r)(o=t[r])&&u.get(p[r])===o&&(l[r]=o)}function qC(e){return e.__data__}function GC(e,t){if(!arguments.length)return Array.from(this,qC);var n=t?IC:UC,a=this._parents,l=this._groups;typeof e!="function"&&(e=VC(e));for(var s=l.length,i=new Array(s),r=new Array(s),o=new Array(s),u=0;u<s;++u){var d=a[u],f=l[u],p=f.length,h=YC(e.call(d,d&&d.__data__,u,a)),y=h.length,b=r[u]=new Array(y),x=i[u]=new Array(y),m=o[u]=new Array(p);n(d,f,b,x,m,h,t);for(var _=0,g=0,v,w;_<y;++_)if(v=b[_]){for(_>=g&&(g=_+1);!(w=x[g])&&++g<y;);v._next=w||null}}return i=new Lt(i,a),i._enter=r,i._exit=o,i}function YC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PC(){return new Lt(this._exit||this._groups.map(ex),this._parents)}function XC(e,t,n){var a=this.enter(),l=this,s=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(l=t(l),l&&(l=l.selection())),n==null?s.remove():n(s),a&&l?a.merge(l).order():l}function ZC(e){for(var t=e.selection?e.selection():e,n=this._groups,a=t._groups,l=n.length,s=a.length,i=Math.min(l,s),r=new Array(l),o=0;o<i;++o)for(var u=n[o],d=a[o],f=u.length,p=r[o]=new Array(f),h,y=0;y<f;++y)(h=u[y]||d[y])&&(p[y]=h);for(;o<l;++o)r[o]=n[o];return new Lt(r,this._parents)}function QC(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var a=e[t],l=a.length-1,s=a[l],i;--l>=0;)(i=a[l])&&(s&&i.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(i,s),s=i);return this}function KC(e){e||(e=FC);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,a=n.length,l=new Array(a),s=0;s<a;++s){for(var i=n[s],r=i.length,o=l[s]=new Array(r),u,d=0;d<r;++d)(u=i[d])&&(o[d]=u);o.sort(t)}return new Lt(l,this._parents).order()}function FC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function JC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function WC(){return Array.from(this)}function e3(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],l=0,s=a.length;l<s;++l){var i=a[l];if(i)return i}return null}function t3(){let e=0;for(const t of this)++e;return e}function n3(){return!this.node()}function a3(e){for(var t=this._groups,n=0,a=t.length;n<a;++n)for(var l=t[n],s=0,i=l.length,r;s<i;++s)(r=l[s])&&e.call(r,r.__data__,s,l);return this}function l3(e){return function(){this.removeAttribute(e)}}function s3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function i3(e,t){return function(){this.setAttribute(e,t)}}function r3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function o3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function c3(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 u3(e,t){var n=iu(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((t==null?n.local?s3:l3:typeof t=="function"?n.local?c3:o3:n.local?r3:i3)(n,t))}function tx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function d3(e){return function(){this.style.removeProperty(e)}}function f3(e,t,n){return function(){this.style.setProperty(e,t,n)}}function p3(e,t,n){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function m3(e,t,n){return arguments.length>1?this.each((t==null?d3:typeof t=="function"?p3:f3)(e,t,n??"")):Rs(this.node(),e)}function Rs(e,t){return e.style.getPropertyValue(t)||tx(e).getComputedStyle(e,null).getPropertyValue(t)}function h3(e){return function(){delete this[e]}}function g3(e,t){return function(){this[e]=t}}function y3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function v3(e,t){return arguments.length>1?this.each((t==null?h3:typeof t=="function"?y3:g3)(e,t)):this.node()[e]}function nx(e){return e.trim().split(/^|\s+/)}function xm(e){return e.classList||new ax(e)}function ax(e){this._node=e,this._names=nx(e.getAttribute("class")||"")}ax.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 lx(e,t){for(var n=xm(e),a=-1,l=t.length;++a<l;)n.add(t[a])}function sx(e,t){for(var n=xm(e),a=-1,l=t.length;++a<l;)n.remove(t[a])}function _3(e){return function(){lx(this,e)}}function b3(e){return function(){sx(this,e)}}function x3(e,t){return function(){(t.apply(this,arguments)?lx:sx)(this,e)}}function w3(e,t){var n=nx(e+"");if(arguments.length<2){for(var a=xm(this.node()),l=-1,s=n.length;++l<s;)if(!a.contains(n[l]))return!1;return!0}return this.each((typeof t=="function"?x3:t?_3:b3)(n,t))}function S3(){this.textContent=""}function N3(e){return function(){this.textContent=e}}function E3(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function C3(e){return arguments.length?this.each(e==null?S3:(typeof e=="function"?E3:N3)(e)):this.node().textContent}function T3(){this.innerHTML=""}function A3(e){return function(){this.innerHTML=e}}function k3(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function j3(e){return arguments.length?this.each(e==null?T3:(typeof e=="function"?k3:A3)(e)):this.node().innerHTML}function M3(){this.nextSibling&&this.parentNode.appendChild(this)}function $3(){return this.each(M3)}function O3(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function D3(){return this.each(O3)}function z3(e){var t=typeof e=="function"?e:Kb(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function R3(){return null}function H3(e,t){var n=typeof e=="function"?e:Kb(e),a=t==null?R3:typeof t=="function"?t:bm(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function B3(){var e=this.parentNode;e&&e.removeChild(this)}function L3(){return this.each(B3)}function V3(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function U3(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I3(e){return this.select(e?U3:V3)}function q3(e){return arguments.length?this.property("__data__",e):this.node().__data__}function G3(e){return function(t){e.call(this,t,this.__data__)}}function Y3(e){return e.trim().split(/^|\s+/).map(function(t){var n="",a=t.indexOf(".");return a>=0&&(n=t.slice(a+1),t=t.slice(0,a)),{type:t,name:n}})}function P3(e){return function(){var t=this.__on;if(t){for(var n=0,a=-1,l=t.length,s;n<l;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++a]=s;++a?t.length=a:delete this.__on}}}function X3(e,t,n){return function(){var a=this.__on,l,s=G3(t);if(a){for(var i=0,r=a.length;i<r;++i)if((l=a[i]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.options),this.addEventListener(l.type,l.listener=s,l.options=n),l.value=t;return}}this.addEventListener(e.type,s,n),l={type:e.type,name:e.name,value:t,listener:s,options:n},a?a.push(l):this.__on=[l]}}function Z3(e,t,n){var a=Y3(e+""),l,s=a.length,i;if(arguments.length<2){var r=this.node().__on;if(r){for(var o=0,u=r.length,d;o<u;++o)for(l=0,d=r[o];l<s;++l)if((i=a[l]).type===d.type&&i.name===d.name)return d.value}return}for(r=t?X3:P3,l=0;l<s;++l)this.each(r(a[l],t,n));return this}function ix(e,t,n){var a=tx(e),l=a.CustomEvent;typeof l=="function"?l=new l(t,n):(l=a.document.createEvent("Event"),n?(l.initEvent(t,n.bubbles,n.cancelable),l.detail=n.detail):l.initEvent(t,!1,!1)),e.dispatchEvent(l)}function Q3(e,t){return function(){return ix(this,e,t)}}function K3(e,t){return function(){return ix(this,e,t.apply(this,arguments))}}function F3(e,t){return this.each((typeof t=="function"?K3:Q3)(e,t))}function*J3(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],l=0,s=a.length,i;l<s;++l)(i=a[l])&&(yield i)}var rx=[null];function Lt(e,t){this._groups=e,this._parents=t}function Er(){return new Lt([[document.documentElement]],rx)}function W3(){return this}Lt.prototype=Er.prototype={constructor:Lt,select:EC,selectAll:kC,selectChild:OC,selectChildren:HC,filter:BC,data:GC,enter:LC,exit:PC,join:XC,merge:ZC,selection:W3,order:QC,sort:KC,call:JC,nodes:WC,node:e3,size:t3,empty:n3,each:a3,attr:u3,style:m3,property:v3,classed:w3,text:C3,html:j3,raise:$3,lower:D3,append:z3,insert:H3,remove:L3,clone:I3,datum:q3,on:Z3,dispatch:F3,[Symbol.iterator]:J3};function $t(e){return typeof e=="string"?new Lt([[document.querySelector(e)]],[document.documentElement]):new Lt([[e]],rx)}var e5=0;function Wg(){this._="@"+(++e5).toString(36)}Wg.prototype={constructor:Wg,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function t5(e){let t;for(;t=e.sourceEvent;)e=t;return e}function nn(e,t){if(e=t5(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}if(t.getBoundingClientRect){var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}}return[e.pageX,e.pageY]}const n5={passive:!1},er={capture:!0,passive:!1};function rd(e){e.stopImmediatePropagation()}function vs(e){e.preventDefault(),e.stopImmediatePropagation()}function ox(e){var t=e.document.documentElement,n=$t(e).on("dragstart.drag",vs,er);"onselectstart"in t?n.on("selectstart.drag",vs,er):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function cx(e,t){var n=e.document.documentElement,a=$t(e).on("dragstart.drag",null);t&&(a.on("click.drag",vs,er),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Wr=e=>()=>e;function Yf(e,{sourceEvent:t,subject:n,target:a,identifier:l,active:s,x:i,y:r,dx:o,dy:u,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:a,enumerable:!0,configurable:!0},identifier:{value:l,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:o,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Yf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function a5(e){return!e.ctrlKey&&!e.button}function l5(){return this.parentNode}function s5(e,t){return t??{x:e.x,y:e.y}}function i5(){return navigator.maxTouchPoints||"ontouchstart"in this}function ux(){var e=a5,t=l5,n=s5,a=i5,l={},s=su("start","drag","end"),i=0,r,o,u,d,f=0;function p(v){v.on("mousedown.drag",h).filter(a).on("touchstart.drag",x).on("touchmove.drag",m,n5).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,w){if(!(d||!e.call(this,v,w))){var N=g(this,t.call(this,v,w),v,w,"mouse");N&&($t(v.view).on("mousemove.drag",y,er).on("mouseup.drag",b,er),ox(v.view),rd(v),u=!1,r=v.clientX,o=v.clientY,N("start",v))}}function y(v){if(vs(v),!u){var w=v.clientX-r,N=v.clientY-o;u=w*w+N*N>f}l.mouse("drag",v)}function b(v){$t(v.view).on("mousemove.drag mouseup.drag",null),cx(v.view,u),vs(v),l.mouse("end",v)}function x(v,w){if(e.call(this,v,w)){var N=v.changedTouches,S=t.call(this,v,w),A=N.length,k,H;for(k=0;k<A;++k)(H=g(this,S,v,w,N[k].identifier,N[k]))&&(rd(v),H("start",v,N[k]))}}function m(v){var w=v.changedTouches,N=w.length,S,A;for(S=0;S<N;++S)(A=l[w[S].identifier])&&(vs(v),A("drag",v,w[S]))}function _(v){var w=v.changedTouches,N=w.length,S,A;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),S=0;S<N;++S)(A=l[w[S].identifier])&&(rd(v),A("end",v,w[S]))}function g(v,w,N,S,A,k){var H=s.copy(),O=nn(k||N,w),V,U,T;if((T=n.call(v,new Yf("beforestart",{sourceEvent:N,target:p,identifier:A,active:i,x:O[0],y:O[1],dx:0,dy:0,dispatch:H}),S))!=null)return V=T.x-O[0]||0,U=T.y-O[1]||0,function M(j,z,D){var C=O,E;switch(j){case"start":l[A]=M,E=i++;break;case"end":delete l[A],--i;case"drag":O=nn(D||z,w),E=i;break}H.call(j,v,new Yf(j,{sourceEvent:z,subject:T,target:p,identifier:A,active:E,x:O[0]+V,y:O[1]+U,dx:O[0]-C[0],dy:O[1]-C[1],dispatch:H}),S)}}return p.filter=function(v){return arguments.length?(e=typeof v=="function"?v:Wr(!!v),p):e},p.container=function(v){return arguments.length?(t=typeof v=="function"?v:Wr(v),p):t},p.subject=function(v){return arguments.length?(n=typeof v=="function"?v:Wr(v),p):n},p.touchable=function(v){return arguments.length?(a=typeof v=="function"?v:Wr(!!v),p):a},p.on=function(){var v=s.on.apply(s,arguments);return v===s?p:v},p.clickDistance=function(v){return arguments.length?(f=(v=+v)*v,p):Math.sqrt(f)},p}function Js(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cr(e,t){var n=Object.create(e.prototype);for(var a in t)n[a]=t[a];return n}function Qa(){}var Cl=.7,Hs=1/Cl,_s="\\s*([+-]?\\d+)\\s*",tr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r5=/^#([0-9a-f]{3,8})$/,o5=new RegExp(`^rgb\\(${_s},${_s},${_s}\\)$`),c5=new RegExp(`^rgb\\(${jn},${jn},${jn}\\)$`),u5=new RegExp(`^rgba\\(${_s},${_s},${_s},${tr}\\)$`),d5=new RegExp(`^rgba\\(${jn},${jn},${jn},${tr}\\)$`),f5=new RegExp(`^hsl\\(${tr},${jn},${jn}\\)$`),p5=new RegExp(`^hsla\\(${tr},${jn},${jn},${tr}\\)$`),ey={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};Js(Qa,Tl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ty,formatHex:ty,formatHex8:m5,formatHsl:h5,formatRgb:ny,toString:ny});function ty(){return this.rgb().formatHex()}function m5(){return this.rgb().formatHex8()}function h5(){return dx(this).formatHsl()}function ny(){return this.rgb().formatRgb()}function Tl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=r5.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ay(t):n===3?new tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?eo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?eo(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=o5.exec(e))?new tt(t[1],t[2],t[3],1):(t=c5.exec(e))?new tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=u5.exec(e))?eo(t[1],t[2],t[3],t[4]):(t=d5.exec(e))?eo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=f5.exec(e))?iy(t[1],t[2]/100,t[3]/100,1):(t=p5.exec(e))?iy(t[1],t[2]/100,t[3]/100,t[4]):ey.hasOwnProperty(e)?ay(ey[e]):e==="transparent"?new tt(NaN,NaN,NaN,0):null}function ay(e){return new tt(e>>16&255,e>>8&255,e&255,1)}function eo(e,t,n,a){return a<=0&&(e=t=n=NaN),new tt(e,t,n,a)}function wm(e){return e instanceof Qa||(e=Tl(e)),e?(e=e.rgb(),new tt(e.r,e.g,e.b,e.opacity)):new tt}function Pf(e,t,n,a){return arguments.length===1?wm(e):new tt(e,t,n,a??1)}function tt(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}Js(tt,Pf,Cr(Qa,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cl:Math.pow(Cl,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tt(hl(this.r),hl(this.g),hl(this.b),xc(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:ly,formatHex:ly,formatHex8:g5,formatRgb:sy,toString:sy}));function ly(){return`#${cl(this.r)}${cl(this.g)}${cl(this.b)}`}function g5(){return`#${cl(this.r)}${cl(this.g)}${cl(this.b)}${cl((isNaN(this.opacity)?1:this.opacity)*255)}`}function sy(){const e=xc(this.opacity);return`${e===1?"rgb(":"rgba("}${hl(this.r)}, ${hl(this.g)}, ${hl(this.b)}${e===1?")":`, ${e})`}`}function xc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cl(e){return e=hl(e),(e<16?"0":"")+e.toString(16)}function iy(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,n,a)}function dx(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Qa||(e=Tl(e)),!e)return new an;if(e instanceof an)return e;e=e.rgb();var t=e.r/255,n=e.g/255,a=e.b/255,l=Math.min(t,n,a),s=Math.max(t,n,a),i=NaN,r=s-l,o=(s+l)/2;return r?(t===s?i=(n-a)/r+(n<a)*6:n===s?i=(a-t)/r+2:i=(t-n)/r+4,r/=o<.5?s+l:2-s-l,i*=60):r=o>0&&o<1?0:i,new an(i,r,o,e.opacity)}function y5(e,t,n,a){return arguments.length===1?dx(e):new an(e,t,n,a??1)}function an(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}Js(an,y5,Cr(Qa,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cl:Math.pow(Cl,e),new an(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,a=n+(n<.5?n:1-n)*t,l=2*n-a;return new tt(od(e>=240?e-240:e+120,l,a),od(e,l,a),od(e<120?e+240:e-120,l,a),this.opacity)},clamp(){return new an(ry(this.h),to(this.s),to(this.l),xc(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=xc(this.opacity);return`${e===1?"hsl(":"hsla("}${ry(this.h)}, ${to(this.s)*100}%, ${to(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ry(e){return e=(e||0)%360,e<0?e+360:e}function to(e){return Math.max(0,Math.min(1,e||0))}function od(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 fx=Math.PI/180,px=180/Math.PI,wc=18,mx=.96422,hx=1,gx=.82521,yx=4/29,bs=6/29,vx=3*bs*bs,v5=bs*bs*bs;function _x(e){if(e instanceof Mn)return new Mn(e.l,e.a,e.b,e.opacity);if(e instanceof Pn)return bx(e);e instanceof tt||(e=wm(e));var t=fd(e.r),n=fd(e.g),a=fd(e.b),l=cd((.2225045*t+.7168786*n+.0606169*a)/hx),s,i;return t===n&&n===a?s=i=l:(s=cd((.4360747*t+.3850649*n+.1430804*a)/mx),i=cd((.0139322*t+.0971045*n+.7141733*a)/gx)),new Mn(116*l-16,500*(s-l),200*(l-i),e.opacity)}function _5(e,t,n,a){return arguments.length===1?_x(e):new Mn(e,t,n,a??1)}function Mn(e,t,n,a){this.l=+e,this.a=+t,this.b=+n,this.opacity=+a}Js(Mn,_5,Cr(Qa,{brighter(e){return new Mn(this.l+wc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Mn(this.l-wc*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=mx*ud(t),e=hx*ud(e),n=gx*ud(n),new tt(dd(3.1338561*t-1.6168667*e-.4906146*n),dd(-.9787684*t+1.9161415*e+.033454*n),dd(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function cd(e){return e>v5?Math.pow(e,1/3):e/vx+yx}function ud(e){return e>bs?e*e*e:vx*(e-yx)}function dd(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fd(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function b5(e){if(e instanceof Pn)return new Pn(e.h,e.c,e.l,e.opacity);if(e instanceof Mn||(e=_x(e)),e.a===0&&e.b===0)return new Pn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*px;return new Pn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function x5(e,t,n,a){return arguments.length===1?b5(e):new Pn(e,t,n,a??1)}function Pn(e,t,n,a){this.h=+e,this.c=+t,this.l=+n,this.opacity=+a}function bx(e){if(isNaN(e.h))return new Mn(e.l,0,0,e.opacity);var t=e.h*fx;return new Mn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Js(Pn,x5,Cr(Qa,{brighter(e){return new Pn(this.h,this.c,this.l+wc*(e??1),this.opacity)},darker(e){return new Pn(this.h,this.c,this.l-wc*(e??1),this.opacity)},rgb(){return bx(this).rgb()}}));var xx=-.14861,Sm=1.78277,Nm=-.29227,ru=-.90649,nr=1.97294,oy=nr*ru,cy=nr*Sm,uy=Sm*Nm-ru*xx;function w5(e){if(e instanceof gl)return new gl(e.h,e.s,e.l,e.opacity);e instanceof tt||(e=wm(e));var t=e.r/255,n=e.g/255,a=e.b/255,l=(uy*a+oy*t-cy*n)/(uy+oy-cy),s=a-l,i=(nr*(n-l)-Nm*s)/ru,r=Math.sqrt(i*i+s*s)/(nr*l*(1-l)),o=r?Math.atan2(i,s)*px-120:NaN;return new gl(o<0?o+360:o,r,l,e.opacity)}function Xf(e,t,n,a){return arguments.length===1?w5(e):new gl(e,t,n,a??1)}function gl(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}Js(gl,Xf,Cr(Qa,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new gl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cl:Math.pow(Cl,e),new gl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*fx,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),a=Math.cos(e),l=Math.sin(e);return new tt(255*(t+n*(xx*a+Sm*l)),255*(t+n*(Nm*a+ru*l)),255*(t+n*(nr*a)),this.opacity)}}));var ou=e=>()=>e;function wx(e,t){return function(n){return e+n*t}}function S5(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}function N5(e,t){var n=t-e;return n?wx(e,n>180||n<-180?n-360*Math.round(n/360):n):ou(isNaN(e)?t:e)}function E5(e){return(e=+e)==1?xs:function(t,n){return n-t?S5(t,n,e):ou(isNaN(t)?n:t)}}function xs(e,t){var n=t-e;return n?wx(e,n):ou(isNaN(e)?t:e)}var Sc=function e(t){var n=E5(t);function a(l,s){var i=n((l=Pf(l)).r,(s=Pf(s)).r),r=n(l.g,s.g),o=n(l.b,s.b),u=xs(l.opacity,s.opacity);return function(d){return l.r=i(d),l.g=r(d),l.b=o(d),l.opacity=u(d),l+""}}return a.gamma=e,a}(1);function C5(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,a=t.slice(),l;return function(s){for(l=0;l<n;++l)a[l]=e[l]*(1-s)+t[l]*s;return a}}function T5(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A5(e,t){var n=t?t.length:0,a=e?Math.min(n,e.length):0,l=new Array(a),s=new Array(n),i;for(i=0;i<a;++i)l[i]=zi(e[i],t[i]);for(;i<n;++i)s[i]=t[i];return function(r){for(i=0;i<a;++i)s[i]=l[i](r);return s}}function k5(e,t){var n=new Date;return e=+e,t=+t,function(a){return n.setTime(e*(1-a)+t*a),n}}function bn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function j5(e,t){var n={},a={},l;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(l in t)l in e?n[l]=zi(e[l],t[l]):a[l]=t[l];return function(s){for(l in n)a[l]=n[l](s);return a}}var Zf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pd=new RegExp(Zf.source,"g");function M5(e){return function(){return e}}function $5(e){return function(t){return e(t)+""}}function Sx(e,t){var n=Zf.lastIndex=pd.lastIndex=0,a,l,s,i=-1,r=[],o=[];for(e=e+"",t=t+"";(a=Zf.exec(e))&&(l=pd.exec(t));)(s=l.index)>n&&(s=t.slice(n,s),r[i]?r[i]+=s:r[++i]=s),(a=a[0])===(l=l[0])?r[i]?r[i]+=l:r[++i]=l:(r[++i]=null,o.push({i,x:bn(a,l)})),n=pd.lastIndex;return n<t.length&&(s=t.slice(n),r[i]?r[i]+=s:r[++i]=s),r.length<2?o[0]?$5(o[0].x):M5(t):(t=o.length,function(u){for(var d=0,f;d<t;++d)r[(f=o[d]).i]=f.x(u);return r.join("")})}function zi(e,t){var n=typeof t,a;return t==null||n==="boolean"?ou(t):(n==="number"?bn:n==="string"?(a=Tl(t))?(t=a,Sc):Sx:t instanceof Tl?Sc:t instanceof Date?k5:T5(t)?C5:Array.isArray(t)?A5:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?j5:bn)(e,t)}var dy=180/Math.PI,Qf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nx(e,t,n,a,l,s){var i,r,o;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(o=e*n+t*a)&&(n-=e*o,a-=t*o),(r=Math.sqrt(n*n+a*a))&&(n/=r,a/=r,o/=r),e*a<t*n&&(e=-e,t=-t,o=-o,i=-i),{translateX:l,translateY:s,rotate:Math.atan2(t,e)*dy,skewX:Math.atan(o)*dy,scaleX:i,scaleY:r}}var no;function O5(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qf:Nx(t.a,t.b,t.c,t.d,t.e,t.f)}function D5(e){return e==null||(no||(no=document.createElementNS("http://www.w3.org/2000/svg","g")),no.setAttribute("transform",e),!(e=no.transform.baseVal.consolidate()))?Qf:(e=e.matrix,Nx(e.a,e.b,e.c,e.d,e.e,e.f))}function Ex(e,t,n,a){function l(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,h,y){if(u!==f||d!==p){var b=h.push("translate(",null,t,null,n);y.push({i:b-4,x:bn(u,f)},{i:b-2,x:bn(d,p)})}else(f||p)&&h.push("translate("+f+t+p+n)}function i(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(l(f)+"rotate(",null,a)-2,x:bn(u,d)})):d&&f.push(l(f)+"rotate("+d+a)}function r(u,d,f,p){u!==d?p.push({i:f.push(l(f)+"skewX(",null,a)-2,x:bn(u,d)}):d&&f.push(l(f)+"skewX("+d+a)}function o(u,d,f,p,h,y){if(u!==f||d!==p){var b=h.push(l(h)+"scale(",null,",",null,")");y.push({i:b-4,x:bn(u,f)},{i:b-2,x:bn(d,p)})}else(f!==1||p!==1)&&h.push(l(h)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),i(u.rotate,d.rotate,f,p),r(u.skewX,d.skewX,f,p),o(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(h){for(var y=-1,b=p.length,x;++y<b;)f[(x=p[y]).i]=x.x(h);return f.join("")}}}var z5=Ex(O5,"px, ","px)","deg)"),R5=Ex(D5,", ",")",")"),H5=1e-12;function fy(e){return((e=Math.exp(e))+1/e)/2}function B5(e){return((e=Math.exp(e))-1/e)/2}function L5(e){return((e=Math.exp(2*e))-1)/(e+1)}var Ro=function e(t,n,a){function l(s,i){var r=s[0],o=s[1],u=s[2],d=i[0],f=i[1],p=i[2],h=d-r,y=f-o,b=h*h+y*y,x,m;if(b<H5)m=Math.log(p/u)/t,x=function(S){return[r+S*h,o+S*y,u*Math.exp(t*S*m)]};else{var _=Math.sqrt(b),g=(p*p-u*u+a*b)/(2*u*n*_),v=(p*p-u*u-a*b)/(2*p*n*_),w=Math.log(Math.sqrt(g*g+1)-g),N=Math.log(Math.sqrt(v*v+1)-v);m=(N-w)/t,x=function(S){var A=S*m,k=fy(w),H=u/(n*_)*(k*L5(t*A+w)-B5(w));return[r+H*h,o+H*y,u*k/fy(t*A+w)]}}return x.duration=Math.abs(m)*1e3*t/Math.SQRT2,x}return l.rho=function(s){var i=Math.max(.001,+s),r=i*i,o=r*r;return e(i,r,o)},l}(Math.SQRT2,2,4);function Cx(e){return function t(n){n=+n;function a(l,s){var i=e((l=Xf(l)).h,(s=Xf(s)).h),r=xs(l.s,s.s),o=xs(l.l,s.l),u=xs(l.opacity,s.opacity);return function(d){return l.h=i(d),l.s=r(d),l.l=o(Math.pow(d,n)),l.opacity=u(d),l+""}}return a.gamma=t,a}(1)}Cx(N5);Cx(xs);var Bs=0,vi=0,oi=0,Tx=1e3,Nc,_i,Ec=0,Al=0,cu=0,ar=typeof performance=="object"&&performance.now?performance:Date,Ax=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Em(){return Al||(Ax(V5),Al=ar.now()+cu)}function V5(){Al=0}function Cc(){this._call=this._time=this._next=null}Cc.prototype=kx.prototype={constructor:Cc,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Em():+n)+(t==null?0:+t),!this._next&&_i!==this&&(_i?_i._next=this:Nc=this,_i=this),this._call=e,this._time=n,Kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kf())}};function kx(e,t,n){var a=new Cc;return a.restart(e,t,n),a}function U5(){Em(),++Bs;for(var e=Nc,t;e;)(t=Al-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Bs}function py(){Al=(Ec=ar.now())+cu,Bs=vi=0;try{U5()}finally{Bs=0,q5(),Al=0}}function I5(){var e=ar.now(),t=e-Ec;t>Tx&&(cu-=t,Ec=e)}function q5(){for(var e,t=Nc,n,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Nc=n);_i=e,Kf(a)}function Kf(e){if(!Bs){vi&&(vi=clearTimeout(vi));var t=e-Al;t>24?(e<1/0&&(vi=setTimeout(py,Math.ceil(e-ar.now()-cu)+1)),oi&&(oi=clearInterval(oi))):(oi||(Ec=ar.now(),oi=setInterval(I5,Tx)),Bs=1,Ax(py))}}function my(e,t,n){var a=new Cc;return t=t==null?0:+t,a.restart(l=>{a.stop(),e(l+t)},t,n),a}function G5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Cm=3;(function e(t){t=+t;function n(a){return Math.pow(a,t)}return n.exponent=e,n})(Cm);(function e(t){t=+t;function n(a){return 1-Math.pow(1-a,t)}return n.exponent=e,n})(Cm);(function e(t){t=+t;function n(a){return((a*=2)<=1?Math.pow(a,t):2-Math.pow(2-a,t))/2}return n.exponent=e,n})(Cm);function Tc(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var Tm=1.70158;(function e(t){t=+t;function n(a){return(a=+a)*a*(t*(a-1)+a)}return n.overshoot=e,n})(Tm);(function e(t){t=+t;function n(a){return--a*a*((a+1)*t+a)+1}return n.overshoot=e,n})(Tm);(function e(t){t=+t;function n(a){return((a*=2)<1?a*a*((t+1)*a-t):(a-=2)*a*((t+1)*a+t)+2)/2}return n.overshoot=e,n})(Tm);var Ls=2*Math.PI,Am=1,km=.3;(function e(t,n){var a=Math.asin(1/(t=Math.max(1,t)))*(n/=Ls);function l(s){return t*Tc(- --s)*Math.sin((a-s)/n)}return l.amplitude=function(s){return e(s,n*Ls)},l.period=function(s){return e(t,s)},l})(Am,km);(function e(t,n){var a=Math.asin(1/(t=Math.max(1,t)))*(n/=Ls);function l(s){return 1-t*Tc(s=+s)*Math.sin((s+a)/n)}return l.amplitude=function(s){return e(s,n*Ls)},l.period=function(s){return e(t,s)},l})(Am,km);(function e(t,n){var a=Math.asin(1/(t=Math.max(1,t)))*(n/=Ls);function l(s){return((s=s*2-1)<0?t*Tc(-s)*Math.sin((a-s)/n):2-t*Tc(s)*Math.sin((a+s)/n))/2}return l.amplitude=function(s){return e(s,n*Ls)},l.period=function(s){return e(t,s)},l})(Am,km);var Y5=su("start","end","cancel","interrupt"),P5=[],jx=0,hy=1,Ff=2,Ho=3,gy=4,Jf=5,Bo=6;function uu(e,t,n,a,l,s){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;X5(e,n,{name:t,index:a,group:l,on:Y5,tween:P5,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:jx})}function jm(e,t){var n=dn(e,t);if(n.state>jx)throw new Error("too late; already scheduled");return n}function zn(e,t){var n=dn(e,t);if(n.state>Ho)throw new Error("too late; already running");return n}function dn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function X5(e,t,n){var a=e.__transition,l;a[t]=n,n.timer=kx(s,0,n.time);function s(u){n.state=hy,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var d,f,p,h;if(n.state!==hy)return o();for(d in a)if(h=a[d],h.name===n.name){if(h.state===Ho)return my(i);h.state===gy?(h.state=Bo,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete a[d]):+d<t&&(h.state=Bo,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete a[d])}if(my(function(){n.state===Ho&&(n.state=gy,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=Ff,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ff){for(n.state=Ho,l=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(h=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(l[++f]=h);l.length=f+1}}function r(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(o),n.state=Jf,1),f=-1,p=l.length;++f<p;)l[f].call(e,d);n.state===Jf&&(n.on.call("end",e,e.__data__,n.index,n.group),o())}function o(){n.state=Bo,n.timer.stop(),delete a[t];for(var u in a)return;delete e.__transition}}function Lo(e,t){var n=e.__transition,a,l,s=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((a=n[i]).name!==t){s=!1;continue}l=a.state>Ff&&a.state<Jf,a.state=Bo,a.timer.stop(),a.on.call(l?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[i]}s&&delete e.__transition}}function Z5(e){return this.each(function(){Lo(this,e)})}function Q5(e,t){var n,a;return function(){var l=zn(this,e),s=l.tween;if(s!==n){a=n=s;for(var i=0,r=a.length;i<r;++i)if(a[i].name===t){a=a.slice(),a.splice(i,1);break}}l.tween=a}}function K5(e,t,n){var a,l;if(typeof n!="function")throw new Error;return function(){var s=zn(this,e),i=s.tween;if(i!==a){l=(a=i).slice();for(var r={name:t,value:n},o=0,u=l.length;o<u;++o)if(l[o].name===t){l[o]=r;break}o===u&&l.push(r)}s.tween=l}}function F5(e,t){var n=this._id;if(e+="",arguments.length<2){for(var a=dn(this.node(),n).tween,l=0,s=a.length,i;l<s;++l)if((i=a[l]).name===e)return i.value;return null}return this.each((t==null?Q5:K5)(n,e,t))}function Mm(e,t,n){var a=e._id;return e.each(function(){var l=zn(this,a);(l.value||(l.value={}))[t]=n.apply(this,arguments)}),function(l){return dn(l,a).value[t]}}function Mx(e,t){var n;return(typeof t=="number"?bn:t instanceof Tl?Sc:(n=Tl(t))?(t=n,Sc):Sx)(e,t)}function J5(e){return function(){this.removeAttribute(e)}}function W5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eT(e,t,n){var a,l=n+"",s;return function(){var i=this.getAttribute(e);return i===l?null:i===a?s:s=t(a=i,n)}}function tT(e,t,n){var a,l=n+"",s;return function(){var i=this.getAttributeNS(e.space,e.local);return i===l?null:i===a?s:s=t(a=i,n)}}function nT(e,t,n){var a,l,s;return function(){var i,r=n(this),o;return r==null?void this.removeAttribute(e):(i=this.getAttribute(e),o=r+"",i===o?null:i===a&&o===l?s:(l=o,s=t(a=i,r)))}}function aT(e,t,n){var a,l,s;return function(){var i,r=n(this),o;return r==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),o=r+"",i===o?null:i===a&&o===l?s:(l=o,s=t(a=i,r)))}}function lT(e,t){var n=iu(e),a=n==="transform"?R5:Mx;return this.attrTween(e,typeof t=="function"?(n.local?aT:nT)(n,a,Mm(this,"attr."+e,t)):t==null?(n.local?W5:J5)(n):(n.local?tT:eT)(n,a,t))}function sT(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function iT(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function rT(e,t){var n,a;function l(){var s=t.apply(this,arguments);return s!==a&&(n=(a=s)&&iT(e,s)),n}return l._value=t,l}function oT(e,t){var n,a;function l(){var s=t.apply(this,arguments);return s!==a&&(n=(a=s)&&sT(e,s)),n}return l._value=t,l}function cT(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 a=iu(e);return this.tween(n,(a.local?rT:oT)(a,t))}function uT(e,t){return function(){jm(this,e).delay=+t.apply(this,arguments)}}function dT(e,t){return t=+t,function(){jm(this,e).delay=t}}function fT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?uT:dT)(t,e)):dn(this.node(),t).delay}function pT(e,t){return function(){zn(this,e).duration=+t.apply(this,arguments)}}function mT(e,t){return t=+t,function(){zn(this,e).duration=t}}function hT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pT:mT)(t,e)):dn(this.node(),t).duration}function gT(e,t){if(typeof t!="function")throw new Error;return function(){zn(this,e).ease=t}}function yT(e){var t=this._id;return arguments.length?this.each(gT(t,e)):dn(this.node(),t).ease}function vT(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;zn(this,e).ease=n}}function _T(e){if(typeof e!="function")throw new Error;return this.each(vT(this._id,e))}function bT(e){typeof e!="function"&&(e=Jb(e));for(var t=this._groups,n=t.length,a=new Array(n),l=0;l<n;++l)for(var s=t[l],i=s.length,r=a[l]=[],o,u=0;u<i;++u)(o=s[u])&&e.call(o,o.__data__,u,s)&&r.push(o);return new aa(a,this._parents,this._name,this._id)}function xT(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,a=t.length,l=n.length,s=Math.min(a,l),i=new Array(a),r=0;r<s;++r)for(var o=t[r],u=n[r],d=o.length,f=i[r]=new Array(d),p,h=0;h<d;++h)(p=o[h]||u[h])&&(f[h]=p);for(;r<a;++r)i[r]=t[r];return new aa(i,this._parents,this._name,this._id)}function wT(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 ST(e,t,n){var a,l,s=wT(t)?jm:zn;return function(){var i=s(this,e),r=i.on;r!==a&&(l=(a=r).copy()).on(t,n),i.on=l}}function NT(e,t){var n=this._id;return arguments.length<2?dn(this.node(),n).on.on(e):this.each(ST(n,e,t))}function ET(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function CT(){return this.on("end.remove",ET(this._id))}function TT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bm(e));for(var a=this._groups,l=a.length,s=new Array(l),i=0;i<l;++i)for(var r=a[i],o=r.length,u=s[i]=new Array(o),d,f,p=0;p<o;++p)(d=r[p])&&(f=e.call(d,d.__data__,p,r))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,uu(u[p],t,n,p,u,dn(d,n)));return new aa(s,this._parents,t,n)}function AT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fb(e));for(var a=this._groups,l=a.length,s=[],i=[],r=0;r<l;++r)for(var o=a[r],u=o.length,d,f=0;f<u;++f)if(d=o[f]){for(var p=e.call(d,d.__data__,f,o),h,y=dn(d,n),b=0,x=p.length;b<x;++b)(h=p[b])&&uu(h,t,n,b,p,y);s.push(p),i.push(d)}return new aa(s,i,t,n)}var kT=Er.prototype.constructor;function jT(){return new kT(this._groups,this._parents)}function MT(e,t){var n,a,l;return function(){var s=Rs(this,e),i=(this.style.removeProperty(e),Rs(this,e));return s===i?null:s===n&&i===a?l:l=t(n=s,a=i)}}function $x(e){return function(){this.style.removeProperty(e)}}function $T(e,t,n){var a,l=n+"",s;return function(){var i=Rs(this,e);return i===l?null:i===a?s:s=t(a=i,n)}}function OT(e,t,n){var a,l,s;return function(){var i=Rs(this,e),r=n(this),o=r+"";return r==null&&(o=r=(this.style.removeProperty(e),Rs(this,e))),i===o?null:i===a&&o===l?s:(l=o,s=t(a=i,r))}}function DT(e,t){var n,a,l,s="style."+t,i="end."+s,r;return function(){var o=zn(this,e),u=o.on,d=o.value[s]==null?r||(r=$x(t)):void 0;(u!==n||l!==d)&&(a=(n=u).copy()).on(i,l=d),o.on=a}}function zT(e,t,n){var a=(e+="")=="transform"?z5:Mx;return t==null?this.styleTween(e,MT(e,a)).on("end.style."+e,$x(e)):typeof t=="function"?this.styleTween(e,OT(e,a,Mm(this,"style."+e,t))).each(DT(this._id,e)):this.styleTween(e,$T(e,a,t),n).on("end.style."+e,null)}function RT(e,t,n){return function(a){this.style.setProperty(e,t.call(this,a),n)}}function HT(e,t,n){var a,l;function s(){var i=t.apply(this,arguments);return i!==l&&(a=(l=i)&&RT(e,i,n)),a}return s._value=t,s}function BT(e,t,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,HT(e,t,n??""))}function LT(e){return function(){this.textContent=e}}function VT(e){return function(){var t=e(this);this.textContent=t??""}}function UT(e){return this.tween("text",typeof e=="function"?VT(Mm(this,"text",e)):LT(e==null?"":e+""))}function IT(e){return function(t){this.textContent=e.call(this,t)}}function qT(e){var t,n;function a(){var l=e.apply(this,arguments);return l!==n&&(t=(n=l)&&IT(l)),t}return a._value=e,a}function GT(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,qT(e))}function YT(){for(var e=this._name,t=this._id,n=Ox(),a=this._groups,l=a.length,s=0;s<l;++s)for(var i=a[s],r=i.length,o,u=0;u<r;++u)if(o=i[u]){var d=dn(o,t);uu(o,e,n,u,i,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new aa(a,this._parents,e,n)}function PT(){var e,t,n=this,a=n._id,l=n.size();return new Promise(function(s,i){var r={value:i},o={value:function(){--l===0&&s()}};n.each(function(){var u=zn(this,a),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(o)),u.on=t}),l===0&&s()})}var XT=0;function aa(e,t,n,a){this._groups=e,this._parents=t,this._name=n,this._id=a}function Ox(){return++XT}var Un=Er.prototype;aa.prototype={constructor:aa,select:TT,selectAll:AT,selectChild:Un.selectChild,selectChildren:Un.selectChildren,filter:bT,merge:xT,selection:jT,transition:YT,call:Un.call,nodes:Un.nodes,node:Un.node,size:Un.size,empty:Un.empty,each:Un.each,on:NT,attr:lT,attrTween:cT,style:zT,styleTween:BT,text:UT,textTween:GT,remove:CT,tween:F5,delay:fT,duration:hT,ease:yT,easeVarying:_T,end:PT,[Symbol.iterator]:Un[Symbol.iterator]};var ZT={time:null,delay:0,duration:250,ease:G5};function QT(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 KT(e){var t,n;e instanceof aa?(t=e._id,e=e._name):(t=Ox(),(n=ZT).time=Em(),e=e==null?null:e+"");for(var a=this._groups,l=a.length,s=0;s<l;++s)for(var i=a[s],r=i.length,o,u=0;u<r;++u)(o=i[u])&&uu(o,e,t,u,i,n||QT(o,t));return new aa(a,this._parents,e,t)}Er.prototype.interrupt=Z5;Er.prototype.transition=KT;var ao=e=>()=>e;function FT(e,{sourceEvent:t,target:n,transform:a,dispatch:l}){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:a,enumerable:!0,configurable:!0},_:{value:l}})}function Xn(e,t,n){this.k=e,this.x=t,this.y=n}Xn.prototype={constructor:Xn,scale:function(e){return e===1?this:new Xn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xn(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 du=new Xn(1,0,0);Dx.prototype=Xn.prototype;function Dx(e){for(;!e.__zoom;)if(!(e=e.parentNode))return du;return e.__zoom}function md(e){e.stopImmediatePropagation()}function ci(e){e.preventDefault(),e.stopImmediatePropagation()}function JT(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function WT(){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 yy(){return this.__zoom||du}function e4(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function t4(){return navigator.maxTouchPoints||"ontouchstart"in this}function n4(e,t,n){var a=e.invertX(t[0][0])-n[0][0],l=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(l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l),i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i))}function zx(){var e=JT,t=WT,n=n4,a=e4,l=t4,s=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],r=250,o=Ro,u=su("start","zoom","end"),d,f,p,h=500,y=150,b=0,x=10;function m(T){T.property("__zoom",yy).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",H).filter(l).on("touchstart.zoom",O).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(T,M,j,z){var D=T.selection?T.selection():T;D.property("__zoom",yy),T!==D?w(T,M,j,z):D.interrupt().each(function(){N(this,arguments).event(z).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},m.scaleBy=function(T,M,j,z){m.scaleTo(T,function(){var D=this.__zoom.k,C=typeof M=="function"?M.apply(this,arguments):M;return D*C},j,z)},m.scaleTo=function(T,M,j,z){m.transform(T,function(){var D=t.apply(this,arguments),C=this.__zoom,E=j==null?v(D):typeof j=="function"?j.apply(this,arguments):j,$=C.invert(E),L=typeof M=="function"?M.apply(this,arguments):M;return n(g(_(C,L),E,$),D,i)},j,z)},m.translateBy=function(T,M,j,z){m.transform(T,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),i)},null,z)},m.translateTo=function(T,M,j,z,D){m.transform(T,function(){var C=t.apply(this,arguments),E=this.__zoom,$=z==null?v(C):typeof z=="function"?z.apply(this,arguments):z;return n(du.translate($[0],$[1]).scale(E.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof j=="function"?-j.apply(this,arguments):-j),C,i)},z,D)};function _(T,M){return M=Math.max(s[0],Math.min(s[1],M)),M===T.k?T:new Xn(M,T.x,T.y)}function g(T,M,j){var z=M[0]-j[0]*T.k,D=M[1]-j[1]*T.k;return z===T.x&&D===T.y?T:new Xn(T.k,z,D)}function v(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function w(T,M,j,z){T.on("start.zoom",function(){N(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(z).end()}).tween("zoom",function(){var D=this,C=arguments,E=N(D,C).event(z),$=t.apply(D,C),L=j==null?v($):typeof j=="function"?j.apply(D,C):j,P=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),G=D.__zoom,K=typeof M=="function"?M.apply(D,C):M,le=o(G.invert(L).concat(P/G.k),K.invert(L).concat(P/K.k));return function(Y){if(Y===1)Y=K;else{var I=le(Y),X=P/I[2];Y=new Xn(X,L[0]-I[0]*X,L[1]-I[1]*X)}E.zoom(null,Y)}})}function N(T,M,j){return!j&&T.__zooming||new S(T,M)}function S(T,M){this.that=T,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,M),this.taps=0}S.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,M){return this.mouse&&T!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var M=$t(this.that).datum();u.call(T,this.that,new FT(T,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:u}),M)}};function A(T,...M){if(!e.apply(this,arguments))return;var j=N(this,M).event(T),z=this.__zoom,D=Math.max(s[0],Math.min(s[1],z.k*Math.pow(2,a.apply(this,arguments)))),C=nn(T);if(j.wheel)(j.mouse[0][0]!==C[0]||j.mouse[0][1]!==C[1])&&(j.mouse[1]=z.invert(j.mouse[0]=C)),clearTimeout(j.wheel);else{if(z.k===D)return;j.mouse=[C,z.invert(C)],Lo(this),j.start()}ci(T),j.wheel=setTimeout(E,y),j.zoom("mouse",n(g(_(z,D),j.mouse[0],j.mouse[1]),j.extent,i));function E(){j.wheel=null,j.end()}}function k(T,...M){if(p||!e.apply(this,arguments))return;var j=T.currentTarget,z=N(this,M,!0).event(T),D=$t(T.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",P,!0),C=nn(T,j),E=T.clientX,$=T.clientY;ox(T.view),md(T),z.mouse=[C,this.__zoom.invert(C)],Lo(this),z.start();function L(G){if(ci(G),!z.moved){var K=G.clientX-E,le=G.clientY-$;z.moved=K*K+le*le>b}z.event(G).zoom("mouse",n(g(z.that.__zoom,z.mouse[0]=nn(G,j),z.mouse[1]),z.extent,i))}function P(G){D.on("mousemove.zoom mouseup.zoom",null),cx(G.view,z.moved),ci(G),z.event(G).end()}}function H(T,...M){if(e.apply(this,arguments)){var j=this.__zoom,z=nn(T.changedTouches?T.changedTouches[0]:T,this),D=j.invert(z),C=j.k*(T.shiftKey?.5:2),E=n(g(_(j,C),z,D),t.apply(this,M),i);ci(T),r>0?$t(this).transition().duration(r).call(w,E,z,T):$t(this).call(m.transform,E,z,T)}}function O(T,...M){if(e.apply(this,arguments)){var j=T.touches,z=j.length,D=N(this,M,T.changedTouches.length===z).event(T),C,E,$,L;for(md(T),E=0;E<z;++E)$=j[E],L=nn($,this),L=[L,this.__zoom.invert(L),$.identifier],D.touch0?!D.touch1&&D.touch0[2]!==L[2]&&(D.touch1=L,D.taps=0):(D.touch0=L,C=!0,D.taps=1+!!d);d&&(d=clearTimeout(d)),C&&(D.taps<2&&(f=L[0],d=setTimeout(function(){d=null},h)),Lo(this),D.start())}}function V(T,...M){if(this.__zooming){var j=N(this,M).event(T),z=T.changedTouches,D=z.length,C,E,$,L;for(ci(T),C=0;C<D;++C)E=z[C],$=nn(E,this),j.touch0&&j.touch0[2]===E.identifier?j.touch0[0]=$:j.touch1&&j.touch1[2]===E.identifier&&(j.touch1[0]=$);if(E=j.that.__zoom,j.touch1){var P=j.touch0[0],G=j.touch0[1],K=j.touch1[0],le=j.touch1[1],Y=(Y=K[0]-P[0])*Y+(Y=K[1]-P[1])*Y,I=(I=le[0]-G[0])*I+(I=le[1]-G[1])*I;E=_(E,Math.sqrt(Y/I)),$=[(P[0]+K[0])/2,(P[1]+K[1])/2],L=[(G[0]+le[0])/2,(G[1]+le[1])/2]}else if(j.touch0)$=j.touch0[0],L=j.touch0[1];else return;j.zoom("touch",n(g(E,$,L),j.extent,i))}}function U(T,...M){if(this.__zooming){var j=N(this,M).event(T),z=T.changedTouches,D=z.length,C,E;for(md(T),p&&clearTimeout(p),p=setTimeout(function(){p=null},h),C=0;C<D;++C)E=z[C],j.touch0&&j.touch0[2]===E.identifier?delete j.touch0:j.touch1&&j.touch1[2]===E.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(E=nn(E,this),Math.hypot(f[0]-E[0],f[1]-E[1])<x)){var $=$t(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return m.wheelDelta=function(T){return arguments.length?(a=typeof T=="function"?T:ao(+T),m):a},m.filter=function(T){return arguments.length?(e=typeof T=="function"?T:ao(!!T),m):e},m.touchable=function(T){return arguments.length?(l=typeof T=="function"?T:ao(!!T),m):l},m.extent=function(T){return arguments.length?(t=typeof T=="function"?T:ao([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),m):t},m.scaleExtent=function(T){return arguments.length?(s[0]=+T[0],s[1]=+T[1],m):[s[0],s[1]]},m.translateExtent=function(T){return arguments.length?(i[0][0]=+T[0][0],i[1][0]=+T[1][0],i[0][1]=+T[0][1],i[1][1]=+T[1][1],m):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},m.constrain=function(T){return arguments.length?(n=T,m):n},m.duration=function(T){return arguments.length?(r=+T,m):r},m.interpolate=function(T){return arguments.length?(o=T,m):o},m.on=function(){var T=u.on.apply(u,arguments);return T===u?m:T},m.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,m):Math.sqrt(b)},m.tapDistance=function(T){return arguments.length?(x=+T,m):x},m}const cn={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.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 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:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:a}", 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.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},lr=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Rx=["Enter"," ","Escape"],Hx={"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 Vs;(function(e){e.Strict="strict",e.Loose="loose"})(Vs||(Vs={}));var yl;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(yl||(yl={}));var sr;(function(e){e.Partial="partial",e.Full="full"})(sr||(sr={}));const Bx={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var xa;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xa||(xa={}));var Ac;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ac||(Ac={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));const vy={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top},Lx=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,a4=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$m=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Tr=(e,t=[0,0])=>{const{width:n,height:a}=fn(e),l=e.origin??t,s=n*l[0],i=a*l[1];return{x:e.position.x-s,y:e.position.y-i}},l4=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1;const a=e.reduce((l,s)=>{const i=typeof s=="string";let r=!t.nodeLookup&&!i?s:void 0;return t.nodeLookup&&(r=i?t.nodeLookup.get(s):$m(s)?s:t.nodeLookup.get(s.id)),r?(n=!0,fu(l,kc(r,t.nodeOrigin))):l},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?pu(a):{x:0,y:0,width:0,height:0}},Ar=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(l=>{(t.filter===void 0||t.filter(l))&&(n=fu(n,kc(l)),a=!0)}),a?pu(n):{x:0,y:0,width:0,height:0}},Om=(e,t,[n,a,l]=[0,0,1],s=!1,i=!1)=>{const r=(t.x-n)/l,o=(t.y-a)/l,u=t.width/l,d=t.height/l,f=[];for(const p of e.values()){const{measured:h,selectable:y=!0,hidden:b=!1}=p;if(i&&!y||b)continue;const x=h.width??p.width??p.initialWidth??0,m=h.height??p.height??p.initialHeight??0,{x:_,y:g}=p.internals.positionAbsolute,v=qx(r,o,u,d,_,g,x,m),w=x*m,N=s&&v>0;(!p.internals.handleBounds||N||v>=w||p.dragging)&&f.push(p)}return f},s4=(e,t)=>{const n=new Set;return e.forEach(a=>{n.add(a.id)}),t.filter(a=>n.has(a.source)||n.has(a.target))};function i4(e,t){const n=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(l=>l.id)):null;return e.forEach(l=>{let s;if(t!=null&&t.includeHiddenNodes){const{width:i,height:r}=fn(l);s=i>0&&r>0}else s=!!(l.measured.width&&l.measured.height&&!l.hidden);s&&(!a||a.has(l.id))&&n.set(l.id,l)}),n}async function r4({nodes:e,width:t,height:n,panZoom:a,minZoom:l,maxZoom:s},i){if(e.size===0)return!0;const r=i4(e,i),o=Ar(r),u=zm(o,t,n,(i==null?void 0:i.minZoom)??l,(i==null?void 0:i.maxZoom)??s,(i==null?void 0:i.padding)??.1);return await a.setViewport(u,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),!0}function Vx({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:a=[0,0],nodeExtent:l,onError:s}){const i=n.get(e),r=i.parentId?n.get(i.parentId):void 0,{x:o,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},d=i.origin??a;let f=i.extent||l;if(i.extent==="parent"&&!i.expandParent)if(!r)s==null||s("005",cn.error005());else{const{width:h,height:y}=fn(r);h&&y&&(f=[[o,u],[o+h,u+y]])}else r&&jl(i.extent)&&(f=[[i.extent[0][0]+o,i.extent[0][1]+u],[i.extent[1][0]+o,i.extent[1][1]+u]]);const p=jl(f)?kl(t,f,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(s==null||s("015",cn.error015())),{position:{x:p.x-o+(i.measured.width??0)*d[0],y:p.y-u+(i.measured.height??0)*d[1]},positionAbsolute:p}}async function o4({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:a,onBeforeDelete:l}){const s=new Set(e.map(p=>p.id)),i=[];for(const p of n){if(p.deletable===!1)continue;const h=s.has(p.id),y=!h&&p.parentId&&i.find(b=>b.id===p.parentId);(h||y)&&i.push(p)}const r=new Set(t.map(p=>p.id)),o=a.filter(p=>p.deletable!==!1),d=s4(i,o);for(const p of o)r.has(p.id)&&!d.find(y=>y.id===p.id)&&d.push(p);if(!l)return{edges:d,nodes:i};const f=await l({nodes:i,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:i}:{edges:[],nodes:[]}:f}const Us=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),kl=(e={x:0,y:0},t,n)=>({x:Us(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Us(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Ux(e,t,n){const{width:a,height:l}=fn(n),{x:s,y:i}=n.internals.positionAbsolute;return kl(e,[[s,i],[s+a,i+l]],t)}const _y=(e,t,n)=>e<t?Us(Math.abs(e-t),1,t)/t:e>n?-Us(Math.abs(e-n),1,t)/t:0,Dm=(e,t,n=15,a=40)=>{const l=_y(e.x,a,t.width-a)*n,s=_y(e.y,a,t.height-a)*n;return[l,s]},fu=(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)}),Wf=({x:e,y:t,width:n,height:a})=>({x:e,y:t,x2:e+n,y2:t+a}),pu=({x:e,y:t,x2:n,y2:a})=>({x:e,y:t,width:n-e,height:a-t}),ir=(e,t=[0,0])=>{var l,s;const{x:n,y:a}=$m(e)?e.internals.positionAbsolute:Tr(e,t);return{x:n,y:a,width:((l=e.measured)==null?void 0:l.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},kc=(e,t=[0,0])=>{var l,s;const{x:n,y:a}=$m(e)?e.internals.positionAbsolute:Tr(e,t);return{x:n,y:a,x2:n+(((l=e.measured)==null?void 0:l.width)??e.width??e.initialWidth??0),y2:a+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},Ix=(e,t)=>pu(fu(Wf(e),Wf(t))),qx=(e,t,n,a,l,s,i,r)=>{const o=Math.max(0,Math.min(e+n,l+i)-Math.max(e,l)),u=Math.max(0,Math.min(t+a,s+r)-Math.max(t,s));return Math.ceil(o*u)},jc=(e,t)=>qx(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),by=e=>sn(e.width)&&sn(e.height)&&sn(e.x)&&sn(e.y),sn=e=>!isNaN(e)&&isFinite(e),Gx=(e,t)=>(n,a)=>{},kr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),jr=({x:e,y:t},[n,a,l],s=!1,i=[1,1])=>{const r={x:(e-n)/l,y:(t-a)/l};return s?kr(r,i):r},Is=({x:e,y:t},[n,a,l])=>({x:e*l+n,y:t*l+a});function Ul(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(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function c4(e,t,n){if(typeof e=="string"||typeof e=="number"){const a=Ul(e,n),l=Ul(e,t);return{top:a,right:l,bottom:a,left:l,x:l*2,y:a*2}}if(typeof e=="object"){const a=Ul(e.top??e.y??0,n),l=Ul(e.bottom??e.y??0,n),s=Ul(e.left??e.x??0,t),i=Ul(e.right??e.x??0,t);return{top:a,right:i,bottom:l,left:s,x:s+i,y:a+l}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function u4(e,t,n,a,l,s){const{x:i,y:r}=Is(e,[t,n,a]),{x:o,y:u}=Is({x:e.x+e.width,y:e.y+e.height},[t,n,a]),d=l-o,f=s-u;return{left:Math.floor(i),top:Math.floor(r),right:Math.floor(d),bottom:Math.floor(f)}}const zm=(e,t,n,a,l,s)=>{const i=c4(s,t,n),r=(t-i.x)/e.width,o=(n-i.y)/e.height,u=Math.min(r,o),d=Us(u,a,l),f=e.x+e.width/2,p=e.y+e.height/2,h=t/2-f*d,y=n/2-p*d,b=u4(e,h,y,d,t,n),x={left:Math.min(b.left-i.left,0),top:Math.min(b.top-i.top,0),right:Math.min(b.right-i.right,0),bottom:Math.min(b.bottom-i.bottom,0)};return{x:h-x.left+x.right,y:y-x.top+x.bottom,zoom:d}},rr=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function jl(e){return e!=null&&e!=="parent"}function fn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Yx(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Px(e,t={width:0,height:0},n,a,l){const s={...e},i=a.get(n);if(i){const r=i.origin||l;s.x+=i.internals.positionAbsolute.x-(t.width??0)*r[0],s.y+=i.internals.positionAbsolute.y-(t.height??0)*r[1]}return s}function xy(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function d4(){let e,t;return{promise:new Promise((a,l)=>{e=a,t=l}),resolve:e,reject:t}}function f4(e){return{...Hx,...e||{}}}function Xx(e){return e===null?null:e?"valid":"invalid"}function Ri(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:a,containerBounds:l}){const{x:s,y:i}=rn(e),r=jr({x:s-((l==null?void 0:l.left)??0),y:i-((l==null?void 0:l.top)??0)},a),{x:o,y:u}=n?kr(r,t):r;return{xSnapped:o,ySnapped:u,...r}}const Rm=e=>({width:e.offsetWidth,height:e.offsetHeight}),Zx=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},p4=["INPUT","SELECT","TEXTAREA"];function Qx(e){var a,l;const t=((l=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:l[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:p4.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Kx=e=>"clientX"in e,rn=(e,t)=>{var s,i;const n=Kx(e),a=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,l=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:l-((t==null?void 0:t.top)??0)}},wy=(e,t,n,a,l)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{const r=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:l,position:i.getAttribute("data-handlepos"),x:(r.left-n.left)/a,y:(r.top-n.top)/a,...Rm(i)}})};function Fx({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:l,sourceControlY:s,targetControlX:i,targetControlY:r}){const o=e*.125+l*.375+i*.375+n*.125,u=t*.125+s*.375+r*.375+a*.125,d=Math.abs(o-e),f=Math.abs(u-t);return[o,u,d,f]}function lo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Sy({pos:e,x1:t,y1:n,x2:a,y2:l,c:s}){switch(e){case W.Left:return[t-lo(t-a,s),n];case W.Right:return[t+lo(a-t,s),n];case W.Top:return[t,n-lo(n-l,s)];case W.Bottom:return[t,n+lo(l-n,s)]}}function Jx({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:a,targetY:l,targetPosition:s=W.Top,curvature:i=.25}){const[r,o]=Sy({pos:n,x1:e,y1:t,x2:a,y2:l,c:i}),[u,d]=Sy({pos:s,x1:a,y1:l,x2:e,y2:t,c:i}),[f,p,h,y]=Fx({sourceX:e,sourceY:t,targetX:a,targetY:l,sourceControlX:r,sourceControlY:o,targetControlX:u,targetControlY:d});return[`M${e},${t} C${r},${o} ${u},${d} ${a},${l}`,f,p,h,y]}function Wx({sourceX:e,sourceY:t,targetX:n,targetY:a}){const l=Math.abs(n-e)/2,s=n<e?n+l:n-l,i=Math.abs(a-t)/2,r=a<t?a+i:a-i;return[s,r,l,i]}function m4({sourceNode:e,targetNode:t,selected:n=!1,zIndex:a=0,elevateOnSelect:l=!1,zIndexMode:s="basic"}){if(s==="manual")return a;const i=l&&n?a+1e3:a,r=Math.max(e.parentId||l&&e.selected?e.internals.z:0,t.parentId||l&&t.selected?t.internals.z:0);return i+r}function h4({sourceNode:e,targetNode:t,width:n,height:a,transform:l}){const s=fu(kc(e),kc(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const i={x:-l[0]/l[2],y:-l[1]/l[2],width:n/l[2],height:a/l[2]};return jc(i,pu(s))>0}const g4=({source:e,sourceHandle:t,target:n,targetHandle:a})=>`xy-edge__${e}${t||""}-${n}${a||""}`,y4=(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)),v4=(e,t,n={})=>{var s;if(!e.source||!e.target)return(s=n.onError)==null||s.call(n,"006",cn.error006()),t;const a=n.getEdgeId||g4;let l;return Lx(e)?l={...e}:l={...e,id:a(e)},y4(l,t)?t:(l.sourceHandle===null&&delete l.sourceHandle,l.targetHandle===null&&delete l.targetHandle,t.concat(l))};function e1({sourceX:e,sourceY:t,targetX:n,targetY:a}){const[l,s,i,r]=Wx({sourceX:e,sourceY:t,targetX:n,targetY:a});return[`M ${e},${t}L ${n},${a}`,l,s,i,r]}const Ny={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},_4=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.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},Ey=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),b4=(e,t,n)=>e.x===t.x&&t.x===n.x&&(t.y-e.y)*(n.y-t.y)>=0||e.y===t.y&&t.y===n.y&&(t.x-e.x)*(n.x-t.x)>=0;function x4({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:a=W.Top,center:l,offset:s,stepPosition:i}){const r=Ny[t],o=Ny[a],u={x:e.x+r.x*s,y:e.y+r.y*s},d={x:n.x+o.x*s,y:n.y+o.y*s},f=_4({source:u,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",h=f[p];let y=[],b,x;const m={x:0,y:0},_={x:0,y:0},[,,g,v]=Wx({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[p]*o[p]===-1){p==="x"?(b=l.x??u.x+(d.x-u.x)*i,x=l.y??(u.y+d.y)/2):(b=l.x??(u.x+d.x)/2,x=l.y??u.y+(d.y-u.y)*i);const A=[{x:b,y:u.y},{x:b,y:d.y}],k=[{x:u.x,y:x},{x:d.x,y:x}];r[p]===h?y=p==="x"?A:k:y=p==="x"?k:A}else{const A=[{x:u.x,y:d.y}],k=[{x:d.x,y:u.y}];if(p==="x"?y=r.x===h?k:A:y=r.y===h?A:k,t===a){const T=Math.abs(e[p]-n[p]);if(T<=s){const M=Math.min(s-1,s-T);r[p]===h?m[p]=(u[p]>e[p]?-1:1)*M:_[p]=(d[p]>n[p]?-1:1)*M}}if(t!==a){const T=p==="x"?"y":"x",M=r[p]===o[T],j=u[T]>d[T],z=u[T]<d[T];(r[p]===1&&(!M&&j||M&&z)||r[p]!==1&&(!M&&z||M&&j))&&(y=p==="x"?A:k)}const H={x:u.x+m.x,y:u.y+m.y},O={x:d.x+_.x,y:d.y+_.y},V=Math.max(Math.abs(H.x-y[0].x),Math.abs(O.x-y[0].x)),U=Math.max(Math.abs(H.y-y[0].y),Math.abs(O.y-y[0].y));V>=U?(b=(H.x+O.x)/2,x=y[0].y):(b=y[0].x,x=(H.y+O.y)/2)}const w={x:u.x+m.x,y:u.y+m.y},N={x:d.x+_.x,y:d.y+_.y},S=[];for(const A of[e,w,...y,N,n]){const[k,H]=S.slice(-2);H&&b4(k,H,A)&&S.pop(),S.push(A)}return[S,b,x,g,v]}function w4(e,t,n,a){const l=Math.min(Ey(e,t)/2,Ey(t,n)/2,a),{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 u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+l*u},${i}Q ${s},${i} ${s},${i+l*d}`}const r=e.x<n.x?1:-1,o=e.y<n.y?-1:1;return`L ${s},${i+l*o}Q ${s},${i} ${s+l*r},${i}`}function ep({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:a,targetY:l,targetPosition:s=W.Top,borderRadius:i=5,centerX:r,centerY:o,offset:u=20,stepPosition:d=.5}){const[f,p,h,y,b]=x4({source:{x:e,y:t},sourcePosition:n,target:{x:a,y:l},targetPosition:s,center:{x:r,y:o},offset:u,stepPosition:d});let x=`M${f[0].x} ${f[0].y}`;for(let m=1;m<f.length-1;m++)x+=w4(f[m-1],f[m],f[m+1],i);return x+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[x,p,h,y,b]}function Cy(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function S4(e){var f;const{sourceNode:t,targetNode:n}=e;if(!Cy(t)||!Cy(n))return null;const a=t.internals.handleBounds||Ty(t.handles),l=n.internals.handleBounds||Ty(n.handles),s=Ay((a==null?void 0:a.source)??[],e.sourceHandle),i=Ay(e.connectionMode===Vs.Strict?(l==null?void 0:l.target)??[]:((l==null?void 0:l.target)??[]).concat((l==null?void 0:l.source)??[]),e.targetHandle);if(!s||!i)return(f=e.onError)==null||f.call(e,"008",cn.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const r=(s==null?void 0:s.position)||W.Bottom,o=(i==null?void 0:i.position)||W.Top,u=Ml(t,s,r),d=Ml(n,i,o);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:r,targetPosition:o}}function Ty(e){if(!e)return null;const t=[],n=[];for(const a of e)a.width=a.width??1,a.height=a.height??1,a.type==="source"?t.push(a):a.type==="target"&&n.push(a);return{source:t,target:n}}function Ml(e,t,n=W.Left,a=!1){const l=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:r}=t??fn(e);if(a)return{x:l+i/2,y:s+r/2};switch((t==null?void 0:t.position)??n){case W.Top:return{x:l+i/2,y:s};case W.Right:return{x:l+i,y:s+r/2};case W.Bottom:return{x:l+i/2,y:s+r};case W.Left:return{x:l,y:s+r/2}}}function Ay(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function tp(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function N4(e,{id:t,defaultColor:n,defaultMarkerStart:a,defaultMarkerEnd:l}){const s=new Set;return e.reduce((i,r)=>([r.markerStart||a,r.markerEnd||l].forEach(o=>{if(o&&typeof o=="object"){const u=tp(o,t);s.has(u)||(i.push({id:u,color:o.color||n,...o}),s.add(u))}}),i),[]).sort((i,r)=>i.id.localeCompare(r.id))}const t1=1e3,E4=10,Hm={nodeOrigin:[0,0],nodeExtent:lr,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},C4={...Hm,checkEquality:!0};function Bm(e,t){const n={...e};for(const a in t)t[a]!==void 0&&(n[a]=t[a]);return n}function T4(e,t,n){const a=Bm(Hm,n);for(const l of e.values())if(l.parentId)Vm(l,e,t,a);else{const s=Tr(l,a.nodeOrigin),i=jl(l.extent)?l.extent:a.nodeExtent,r=kl(s,i,fn(l));l.internals.positionAbsolute=r}}function A4(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],a=[];for(const l of e.handles){const s={id:l.id,width:l.width??1,height:l.height??1,nodeId:e.id,x:l.x,y:l.y,position:l.position,type:l.type};l.type==="source"?n.push(s):l.type==="target"&&a.push(s)}return{source:n,target:a}}function Lm(e){return e==="manual"}function np(e,t,n,a={}){var d,f;const l=Bm(C4,a),s={i:0},i=new Map(t),r=l!=null&&l.elevateNodesOnSelect&&!Lm(l.zIndexMode)?t1:0;let o=e.length>0,u=!1;t.clear(),n.clear();for(const p of e){let h=i.get(p.id);if(l.checkEquality&&p===(h==null?void 0:h.internals.userNode))t.set(p.id,h);else{const y=Tr(p,l.nodeOrigin),b=jl(p.extent)?p.extent:l.nodeExtent,x=kl(y,b,fn(p));h={...l.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:x,handleBounds:A4(p,h),z:n1(p,r,l.zIndexMode),userNode:p}},t.set(p.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(o=!1),p.parentId&&Vm(h,t,n,a,s),u||(u=p.selected??!1)}return{nodesInitialized:o,hasSelectedNodes:u}}function k4(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 Vm(e,t,n,a,l){const{elevateNodesOnSelect:s,nodeOrigin:i,nodeExtent:r,zIndexMode:o}=Bm(Hm,a),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}k4(e,n),l&&!d.parentId&&d.internals.rootParentIndex===void 0&&o==="auto"&&(d.internals.rootParentIndex=++l.i,d.internals.z=d.internals.z+l.i*E4),l&&d.internals.rootParentIndex!==void 0&&(l.i=d.internals.rootParentIndex);const f=s&&!Lm(o)?t1:0,{x:p,y:h,z:y}=j4(e,d,i,r,f,o),{positionAbsolute:b}=e.internals,x=p!==b.x||h!==b.y;(x||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:p,y:h}:b,z:y}})}function n1(e,t,n){const a=sn(e.zIndex)?e.zIndex:0;return Lm(n)?a:a+(e.selected?t:0)}function j4(e,t,n,a,l,s){const{x:i,y:r}=t.internals.positionAbsolute,o=fn(e),u=Tr(e,n),d=jl(e.extent)?kl(u,e.extent,o):u;let f=kl({x:i+d.x,y:r+d.y},a,o);e.extent==="parent"&&(f=Ux(f,o,t));const p=n1(e,l,s),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=p?h+1:p}}function Um(e,t,n,a=[0,0]){var i;const l=[],s=new Map;for(const r of e){const o=t.get(r.parentId);if(!o)continue;const u=((i=s.get(r.parentId))==null?void 0:i.expandedRect)??ir(o),d=Ix(u,r.rect);s.set(r.parentId,{expandedRect:d,parent:o})}return s.size>0&&s.forEach(({expandedRect:r,parent:o},u)=>{var g;const d=o.internals.positionAbsolute,f=fn(o),p=o.origin??a,h=r.x<d.x?Math.round(Math.abs(d.x-r.x)):0,y=r.y<d.y?Math.round(Math.abs(d.y-r.y)):0,b=Math.max(f.width,Math.round(r.width)),x=Math.max(f.height,Math.round(r.height)),m=(b-f.width)*p[0],_=(x-f.height)*p[1];(h>0||y>0||m||_)&&(l.push({id:u,type:"position",position:{x:o.position.x-h+m,y:o.position.y-y+_}}),(g=n.get(u))==null||g.forEach(v=>{e.some(w=>w.id===v.id)||l.push({id:v.id,type:"position",position:{x:v.position.x+h,y:v.position.y+y}})})),(f.width<r.width||f.height<r.height||h||y)&&l.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:b+(h?p[0]*h-m:0),height:x+(y?p[1]*y-_:0)}})}),l}function M4(e,t,n,a,l,s,i){const r=a==null?void 0:a.querySelector(".xyflow__viewport");let o=!1;if(!r)return{changes:[],updatedInternals:o};const u=[],d=window.getComputedStyle(r),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const h of e.values()){const y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),o=!0;continue}const b=Rm(h.nodeElement),x=y.measured.width!==b.width||y.measured.height!==b.height;if(!!(b.width&&b.height&&(x||!y.internals.handleBounds||h.force))){const _=h.nodeElement.getBoundingClientRect(),g=jl(y.extent)?y.extent:s;let{positionAbsolute:v}=y.internals;if(y.parentId&&y.extent==="parent"){const N=t.get(y.parentId);N&&(v=Ux(v,b,N))}else g&&(v=kl(v,g,b));const w={...y,measured:b,internals:{...y.internals,positionAbsolute:v,handleBounds:{source:wy("source",h.nodeElement,_,f,y.id),target:wy("target",h.nodeElement,_,f,y.id)}}};t.set(y.id,w),y.parentId&&Vm(w,t,n,{nodeOrigin:l,zIndexMode:i}),o=!0,x&&(u.push({id:y.id,type:"dimensions",dimensions:b}),y.expandParent&&y.parentId&&p.push({id:y.id,parentId:y.parentId,rect:ir(w,l)}))}}if(p.length>0){const h=Um(p,t,n,l);u.push(...h)}return{changes:u,updatedInternals:o}}async function $4({delta:e,panZoom:t,transform:n,translateExtent:a,width:l,height:s}){if(!t||!e.x&&!e.y)return!1;const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[l,s]],a);return!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2])}function ky(e,t,n,a,l,s){let i=l;const r=a.get(i)||new Map;a.set(i,r.set(n,t)),i=`${l}-${e}`;const o=a.get(i)||new Map;if(a.set(i,o.set(n,t)),s){i=`${l}-${e}-${s}`;const u=a.get(i)||new Map;a.set(i,u.set(n,t))}}function a1(e,t,n){e.clear(),t.clear();for(const a of n){const{source:l,target:s,sourceHandle:i=null,targetHandle:r=null}=a,o={edgeId:a.id,source:l,target:s,sourceHandle:i,targetHandle:r},u=`${l}-${i}--${s}-${r}`,d=`${s}-${r}--${l}-${i}`;ky("source",o,d,e,l,i),ky("target",o,u,e,s,r),t.set(a.id,a)}}function l1(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:l1(n,t):!1}function jy(e,t,n){var l;let a=e;do{if((l=a==null?void 0:a.matches)!=null&&l.call(a,t))return!0;if(a===n)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function O4(e,t,n,a,l){const s=new Map;for(const[i,r]of e)if((l?r.id===a:r.selected||r.id===a)&&(l||!r.parentId||!l1(r,e))&&(r.draggable||t&&typeof r.draggable>"u")){const u=e.get(i);u&&s.set(i,{id:i,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return s}function hd({nodeId:e,dragItems:t,nodeLookup:n,dragging:a=!0}){var i,r,o;const l=[];for(const[u,d]of t){const f=(i=n.get(u))==null?void 0:i.internals.userNode;f&&l.push({...f,position:d.position,dragging:a})}if(!e)return[l[0],l];const s=(r=n.get(e))==null?void 0:r.internals.userNode;return[s?{...s,position:((o=t.get(e))==null?void 0:o.position)||s.position,dragging:a}:l[0],l]}function D4({dragItems:e,snapGrid:t,x:n,y:a}){const l=e.values().next().value;if(!l)return null;const s={x:n-l.distance.x,y:a-l.distance.y},i=kr(s,t);return{x:i.x-s.x,y:i.y-s.y}}function z4({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:a,onDragStop:l}){let s={x:null,y:null},i=0,r=new Map,o=!1,u={x:0,y:0},d=null,f=!1,p=null,h=!1,y=!1,b=null;function x({noDragClassName:_,handleSelector:g,domNode:v,isSelectable:w,nodeId:N,nodeClickDistance:S=0}){p=$t(v);function A({x:V,y:U}){const{nodeLookup:T,nodeExtent:M,snapGrid:j,snapToGrid:z,nodeOrigin:D,onNodeDrag:C,onSelectionDrag:E,onError:$,updateNodePositions:L}=t();s={x:V,y:U};let P=!1;const G=r.size>1,K=G&&M?Wf(Ar(r)):null,le=G&&z?D4({dragItems:r,snapGrid:j,x:V,y:U}):null;for(const[Y,I]of r){if(!T.has(Y))continue;let X={x:V-I.distance.x,y:U-I.distance.y};z&&(X=le?{x:Math.round(X.x+le.x),y:Math.round(X.y+le.y)}:kr(X,j));let te=null;if(G&&M&&!I.extent&&K){const{positionAbsolute:ee}=I.internals,se=ee.x-K.x+M[0][0],oe=ee.x+I.measured.width-K.x2+M[1][0],pe=ee.y-K.y+M[0][1],Ne=ee.y+I.measured.height-K.y2+M[1][1];te=[[se,pe],[oe,Ne]]}const{position:F,positionAbsolute:J}=Vx({nodeId:Y,nextPosition:X,nodeLookup:T,nodeExtent:te||M,nodeOrigin:D,onError:$});P=P||I.position.x!==F.x||I.position.y!==F.y,I.position=F,I.internals.positionAbsolute=J}if(y=y||P,!!P&&(L(r,!0),b&&(a||C||!N&&E))){const[Y,I]=hd({nodeId:N,dragItems:r,nodeLookup:T});a==null||a(b,r,Y,I),C==null||C(b,Y,I),N||E==null||E(b,I)}}async function k(){if(!d)return;const{transform:V,panBy:U,autoPanSpeed:T,autoPanOnNodeDrag:M}=t();if(!M){o=!1,cancelAnimationFrame(i);return}const[j,z]=Dm(u,d,T);(j!==0||z!==0)&&(s.x=(s.x??0)-j/V[2],s.y=(s.y??0)-z/V[2],await U({x:j,y:z})&&A(s)),i=requestAnimationFrame(k)}function H(V){var K,le;const{nodeLookup:U,multiSelectionActive:T,nodesDraggable:M,transform:j,snapGrid:z,snapToGrid:D,selectNodesOnDrag:C,onNodeDragStart:E,onSelectionDragStart:$,unselectNodesAndEdges:L}=t();f=!0;const P=!!N&&!T&&!((K=U.get(N))!=null&&K.selected);(!C||!w)&&!T&&N&&((le=U.get(N))!=null&&le.selected||L()),w&&C&&N&&(e==null||e(N));const G=Ri(V.sourceEvent,{transform:j,snapGrid:z,snapToGrid:D,containerBounds:d});if(s=G,r=O4(U,M,G,N,P),r.size>0&&(n||E||!N&&$)){const[Y,I]=hd({nodeId:N,dragItems:r,nodeLookup:U});n==null||n(V.sourceEvent,r,Y,I),E==null||E(V.sourceEvent,Y,I),N||$==null||$(V.sourceEvent,I)}}const O=ux().clickDistance(S).on("start",V=>{const{domNode:U,nodeDragThreshold:T,transform:M,snapGrid:j,snapToGrid:z}=t();d=(U==null?void 0:U.getBoundingClientRect())||null,h=!1,y=!1,b=V.sourceEvent,T===0&&H(V),s=Ri(V.sourceEvent,{transform:M,snapGrid:j,snapToGrid:z,containerBounds:d}),u=rn(V.sourceEvent,d)}).on("drag",V=>{const{autoPanOnNodeDrag:U,transform:T,snapGrid:M,snapToGrid:j,nodeDragThreshold:z,nodeLookup:D}=t(),C=Ri(V.sourceEvent,{transform:T,snapGrid:M,snapToGrid:j,containerBounds:d});if(b=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||N&&!D.has(N))&&(h=!0),!h){if(!o&&U&&f&&(o=!0,k()),!f){const E=rn(V.sourceEvent,d),$=E.x-u.x,L=E.y-u.y;Math.sqrt($*$+L*L)>z&&H(V)}(s.x!==C.xSnapped||s.y!==C.ySnapped)&&r&&f&&(u=rn(V.sourceEvent,d),A(C))}}).on("end",V=>{if(!f||h){h&&r.size>0&&t().updateNodePositions(r,!1);return}if(o=!1,f=!1,cancelAnimationFrame(i),r.size>0){const{nodeLookup:U,updateNodePositions:T,onNodeDragStop:M,onSelectionDragStop:j}=t();if(y&&(T(r,!1),y=!1),l||M||!N&&j){const[z,D]=hd({nodeId:N,dragItems:r,nodeLookup:U,dragging:!1});l==null||l(V.sourceEvent,r,z,D),M==null||M(V.sourceEvent,z,D),N||j==null||j(V.sourceEvent,D)}}}).filter(V=>{const U=V.target;return!V.button&&(!_||!jy(U,`.${_}`,v))&&(!g||jy(U,g,v))});p.call(O)}function m(){p==null||p.on(".drag",null)}return{update:x,destroy:m}}function R4(e,t,n){const a=[],l={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())jc(l,ir(s))>0&&a.push(s);return a}const H4=250;function B4(e,t,n,a){var r,o;let l=[],s=1/0;const i=R4(e,n,t+H4);for(const u of i){const d=[...((r=u.internals.handleBounds)==null?void 0:r.source)??[],...((o=u.internals.handleBounds)==null?void 0:o.target)??[]];for(const f of d){if(a.nodeId===f.nodeId&&a.type===f.type&&a.id===f.id)continue;const{x:p,y:h}=Ml(u,f,f.position,!0),y=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(h-e.y,2));y>t||(y<s?(l=[{...f,x:p,y:h}],s=y):y===s&&l.push({...f,x:p,y:h}))}}if(!l.length)return null;if(l.length>1){const u=a.type==="source"?"target":"source";return l.find(d=>d.type===u)??l[0]}return l[0]}function s1(e,t,n,a,l,s=!1){var u,d,f;const i=a.get(e);if(!i)return null;const r=l==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((d=i.internals.handleBounds)==null?void 0:d.source)??[],...((f=i.internals.handleBounds)==null?void 0:f.target)??[]],o=(n?r==null?void 0:r.find(p=>p.id===n):r==null?void 0:r[0])??null;return o&&s?{...o,...Ml(i,o,o.position,!0)}:o}function i1(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function L4(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const r1=()=>!0;function V4(e,{connectionMode:t,connectionRadius:n,handleId:a,nodeId:l,edgeUpdaterType:s,isTarget:i,domNode:r,nodeLookup:o,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:h,onConnectStart:y,onConnect:b,onConnectEnd:x,isValidConnection:m=r1,onReconnectEnd:_,updateConnection:g,getTransform:v,getFromHandle:w,autoPanSpeed:N,dragThreshold:S=1,handleDomNode:A}){const k=Zx(e.target);let H=0,O;const{x:V,y:U}=rn(e),T=i1(s,A),M=r==null?void 0:r.getBoundingClientRect();let j=!1;if(!M||!T)return;const z=s1(l,T,a,o,t);if(!z)return;let D=rn(e,M),C=!1,E=null,$=!1,L=null;function P(){if(!d||!M)return;const[F,J]=Dm(D,M,N);p({x:F,y:J}),H=requestAnimationFrame(P)}const G={...z,nodeId:l,type:T,position:z.position},K=o.get(l);let Y={inProgress:!0,isValid:null,from:Ml(K,G,W.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:K,to:D,toHandle:null,toPosition:vy[G.position],toNode:null,pointer:D};function I(){j=!0,g(Y),y==null||y(e,{nodeId:l,handleId:a,handleType:T})}S===0&&I();function X(F){if(!j){const{x:Ne,y:Ut}=rn(F),pn=Ne-V,mn=Ut-U;if(!(pn*pn+mn*mn>S*S))return;I()}if(!w()||!G){te(F);return}const J=v();D=rn(F,M),O=B4(jr(D,J,!1,[1,1]),n,o,G),C||(P(),C=!0);const ee=o1(F,{handle:O,connectionMode:t,fromNodeId:l,fromHandleId:a,fromType:i?"target":"source",isValidConnection:m,doc:k,lib:u,flowId:f,nodeLookup:o});L=ee.handleDomNode,E=ee.connection,$=L4(!!O,ee.isValid);const se=o.get(l),oe=se?Ml(se,G,W.Left,!0):Y.from,pe={...Y,from:oe,isValid:$,to:ee.toHandle&&$?Is({x:ee.toHandle.x,y:ee.toHandle.y},J):D,toHandle:ee.toHandle,toPosition:$&&ee.toHandle?ee.toHandle.position:vy[G.position],toNode:ee.toHandle?o.get(ee.toHandle.nodeId):null,pointer:D};g(pe),Y=pe}function te(F){if(!("touches"in F&&F.touches.length>0)){if(j){(O||L)&&E&&$&&(b==null||b(E));const{inProgress:J,...ee}=Y,se={...ee,toPosition:Y.toHandle?Y.toPosition:null};x==null||x(F,se),s&&(_==null||_(F,se))}h(),cancelAnimationFrame(H),C=!1,$=!1,E=null,L=null,k.removeEventListener("mousemove",X),k.removeEventListener("mouseup",te),k.removeEventListener("touchmove",X),k.removeEventListener("touchend",te)}}k.addEventListener("mousemove",X),k.addEventListener("mouseup",te),k.addEventListener("touchmove",X),k.addEventListener("touchend",te)}function o1(e,{handle:t,connectionMode:n,fromNodeId:a,fromHandleId:l,fromType:s,doc:i,lib:r,flowId:o,isValidConnection:u=r1,nodeLookup:d}){const f=s==="target",p=t?i.querySelector(`.${r}-flow__handle[data-id="${o}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y}=rn(e),b=i.elementFromPoint(h,y),x=b!=null&&b.classList.contains(`${r}-flow__handle`)?b:p,m={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const _=i1(void 0,x),g=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),w=x.classList.contains("connectable"),N=x.classList.contains("connectableend");if(!g||!_)return m;const S={source:f?g:a,sourceHandle:f?v:l,target:f?a:g,targetHandle:f?l:v};m.connection=S;const k=w&&N&&(n===Vs.Strict?f&&_==="source"||!f&&_==="target":g!==a||v!==l);m.isValid=k&&u(S),m.toHandle=s1(g,_,v,d,n,!0)}return m}const ap={onPointerDown:V4,isValid:o1};function U4({domNode:e,panZoom:t,getTransform:n,getViewScale:a}){const l=$t(e);function s({translateExtent:r,width:o,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:h=!1}){const y=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const v=n(),w=g.sourceEvent.ctrlKey&&rr()?10:1,N=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*d,S=v[2]*Math.pow(2,N*w);t.scaleTo(S)};let b=[0,0];const x=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(b=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},m=g=>{const v=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const w=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],N=[w[0]-b[0],w[1]-b[1]];b=w;const S=a()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),A={x:v[0]-N[0]*S,y:v[1]-N[1]*S},k=[[0,0],[o,u]];t.setViewportConstrained({x:A.x,y:A.y,zoom:v[2]},k,r)},_=zx().on("start",x).on("zoom",f?m:null).on("zoom.wheel",p?y:null);l.call(_,{})}function i(){l.on("zoom",null)}return{update:s,destroy:i,pointer:nn}}const mu=e=>({x:e.x,y:e.y,zoom:e.k}),gd=({x:e,y:t,zoom:n})=>du.translate(e,t).scale(n),_a=(e,t)=>e.target.closest(`.${t}`),c1=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),I4=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,yd=(e,t=0,n=I4,a=()=>{})=>{const l=typeof t=="number"&&t>0;return l||a(),l?e.transition().duration(t).ease(n).on("end",a):e},u1=e=>{const t=e.ctrlKey&&rr()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function q4({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:a,panOnScrollMode:l,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:r,onPanZoom:o,onPanZoomEnd:u}){return d=>{if(_a(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&i){const x=nn(d),m=u1(d),_=f*Math.pow(2,m);a.scaleTo(n,_,x,d);return}const p=d.deltaMode===1?20:1;let h=l===yl.Vertical?0:d.deltaX*p,y=l===yl.Horizontal?0:d.deltaY*p;!rr()&&d.shiftKey&&l!==yl.Vertical&&(h=d.deltaY*p,y=0),a.translateBy(n,-(h/f)*s,-(y/f)*s,{internal:!0});const b=mu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?o==null||o(d,b):(e.isPanScrolling=!0,r==null||r(d,b)),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,b),e.isPanScrolling=!1},150)}}function G4({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(a,l){const s=a.type==="wheel",i=!t&&s&&!a.ctrlKey,r=_a(a,e);if(a.ctrlKey&&s&&r&&a.preventDefault(),i||r)return null;a.preventDefault(),n.call(this,a,l)}}function Y4({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return a=>{var s,i,r;if((s=a.sourceEvent)!=null&&s.internal)return;const l=mu(a.transform);e.mouseButton=((i=a.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=l,((r=a.sourceEvent)==null?void 0:r.type)==="mousedown"&&t(!0),n&&(n==null||n(a.sourceEvent,l))}}function P4({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:a,onPanZoom:l}){return s=>{var i,r;e.usedRightMouseButton=!!(n&&c1(t,e.mouseButton??0)),(i=s.sourceEvent)!=null&&i.sync||a([s.transform.x,s.transform.y,s.transform.k]),l&&!((r=s.sourceEvent)!=null&&r.internal)&&(l==null||l(s.sourceEvent,mu(s.transform)))}}function X4({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:a,onPanZoomEnd:l,onPaneContextMenu:s}){return i=>{var r;if(!((r=i.sourceEvent)!=null&&r.internal)&&(e.isZoomingOrPanning=!1,s&&c1(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,a(!1),l)){const o=mu(i.transform);e.prevViewport=o,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{l==null||l(i.sourceEvent,o)},n?150:0)}}}function Z4({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:a,panOnDrag:l,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:r,noWheelClassName:o,noPanClassName:u,lib:d,connectionInProgress:f}){return p=>{var m;const h=t||n,y=a&&p.ctrlKey,b=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(_a(p,`${d}-flow__node`)||_a(p,`${d}-flow__edge`)||_a(p,`${d}-flow__selection`)||_a(p,`${d}-flow__nodesselection`)))return!0;if(!l&&!h&&!s&&!i&&!a||r||f&&!b||_a(p,o)&&b||_a(p,u)&&(!b||s&&b&&!t)||!a&&p.ctrlKey&&b)return!1;if(!a&&p.type==="touchstart"&&((m=p.touches)==null?void 0:m.length)>1)return p.preventDefault(),!1;if(!h&&!s&&!y&&b||!l&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(l)&&!l.includes(p.button)&&p.type==="mousedown")return!1;const x=Array.isArray(l)&&l.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||b||e)&&x}}function Q4({domNode:e,minZoom:t,maxZoom:n,translateExtent:a,viewport:l,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:r,onDraggingChange:o}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect();let f=[[0,0],[d.width,d.height]];const p=typeof ResizeObserver<"u"?new ResizeObserver(U=>{const T=U[0];T!=null&&T.contentRect&&(f=[[0,0],[T.contentRect.width,T.contentRect.height]])}):null;p==null||p.observe(e);const h=zx().extent(()=>f).scaleExtent([t,n]).translateExtent(a),y=$t(e).call(h);v({x:l.x,y:l.y,zoom:Us(l.zoom,t,n)},[[0,0],[d.width,d.height]],a);const b=y.on("wheel.zoom"),x=y.on("dblclick.zoom");h.wheelDelta(u1);async function m(U,T){return y?new Promise(M=>{h==null||h.interpolate((T==null?void 0:T.interpolate)==="linear"?zi:Ro).transform(yd(y,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>M(!0)),U)}):!1}function _({noWheelClassName:U,noPanClassName:T,onPaneContextMenu:M,userSelectionActive:j,panOnScroll:z,panOnDrag:D,panOnScrollMode:C,panOnScrollSpeed:E,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:P,zoomOnDoubleClick:G,panActivationKeyPressed:K=!1,zoomActivationKeyPressed:le,lib:Y,onTransformChange:I,connectionInProgress:X,paneClickDistance:te,selectionOnDrag:F}){j&&!u.isZoomingOrPanning&&h.on("zoom",null);const J=z&&!le&&!j;h.clickDistance(F?1/0:!sn(te)||te<0?0:te);const ee=J?q4({zoomPanValues:u,noWheelClassName:U,d3Selection:y,d3Zoom:h,panOnScrollMode:C,panOnScrollSpeed:E,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:r}):G4({noWheelClassName:U,preventScrolling:$,d3ZoomHandler:b});y.on("wheel.zoom",ee,{passive:!1});const se=Y4({zoomPanValues:u,onDraggingChange:o,onPanZoomStart:i});h.on("start",se);const oe=P4({zoomPanValues:u,panOnDrag:D,onPaneContextMenu:!!M,onPanZoom:s,onTransformChange:I});h.on("zoom",oe);const pe=X4({zoomPanValues:u,panOnDrag:D,panOnScroll:z,onPaneContextMenu:M,onPanZoomEnd:r,onDraggingChange:o});h.on("end",pe);const Ne=Z4({panActivationKeyPressed:K,zoomActivationKeyPressed:le,panOnDrag:D,zoomOnScroll:P,panOnScroll:z,zoomOnDoubleClick:G,zoomOnPinch:L,userSelectionActive:j,noPanClassName:T,noWheelClassName:U,lib:Y,connectionInProgress:X});h.filter(Ne),G?y.on("dblclick.zoom",x):y.on("dblclick.zoom",null)}function g(){h.on("zoom",null),p==null||p.disconnect()}async function v(U,T,M){const j=gd(U),z=h==null?void 0:h.constrain()(j,T,M);return z&&await m(z),z}async function w(U,T){const M=gd(U);return await m(M,T),M}function N(U){if(y){const T=gd(U),M=y.property("__zoom");(M.k!==U.zoom||M.x!==U.x||M.y!==U.y)&&(h==null||h.transform(y,T,null,{sync:!0}))}}function S(){const U=y?Dx(y.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}async function A(U,T){return y?new Promise(M=>{h==null||h.interpolate((T==null?void 0:T.interpolate)==="linear"?zi:Ro).scaleTo(yd(y,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>M(!0)),U)}):!1}async function k(U,T){return y?new Promise(M=>{h==null||h.interpolate((T==null?void 0:T.interpolate)==="linear"?zi:Ro).scaleBy(yd(y,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>M(!0)),U)}):!1}function H(U){h==null||h.scaleExtent(U)}function O(U){h==null||h.translateExtent(U)}function V(U){const T=!sn(U)||U<0?0:U;h==null||h.clickDistance(T)}return{update:_,destroy:g,setViewport:w,setViewportConstrained:v,getViewport:S,scaleTo:A,scaleBy:k,setScaleExtent:H,setTranslateExtent:O,syncViewport:N,setClickDistance:V}}var $l;(function(e){e.Line="line",e.Handle="handle"})($l||($l={}));const K4=["top-left","top-right","bottom-left","bottom-right"],F4=["top","right","bottom","left"];function J4({width:e,prevWidth:t,height:n,prevHeight:a,affectsX:l,affectsY:s}){const i=e-t,r=n-a,o=[i>0?1:i<0?-1:0,r>0?1:r<0?-1:0];return i&&l&&(o[0]=o[0]*-1),r&&s&&(o[1]=o[1]*-1),o}function My(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),a=e.includes("left"),l=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:a,affectsY:l}}function ua(e,t){return Math.max(0,t-e)}function da(e,t){return Math.max(0,e-t)}function so(e,t,n){return Math.max(0,t-e,e-n)}function $y(e,t){return e?!t:t}function W4(e,t,n,a,l,s,i,r){let{affectsX:o,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:h,ySnapped:y}=n,{minWidth:b,maxWidth:x,minHeight:m,maxHeight:_}=a,{x:g,y:v,width:w,height:N,aspectRatio:S}=e;let A=Math.floor(d?h-e.pointerX:0),k=Math.floor(f?y-e.pointerY:0);const H=w+(o?-A:A),O=N+(u?-k:k),V=-s[0]*w,U=-s[1]*N;let T=so(H,b,x),M=so(O,m,_);if(i){let D=0,C=0;o&&A<0?D=ua(g+A+V,i[0][0]):!o&&A>0&&(D=da(g+H+V,i[1][0])),u&&k<0?C=ua(v+k+U,i[0][1]):!u&&k>0&&(C=da(v+O+U,i[1][1])),T=Math.max(T,D),M=Math.max(M,C)}if(r){let D=0,C=0;o&&A>0?D=da(g+A,r[0][0]):!o&&A<0&&(D=ua(g+H,r[1][0])),u&&k>0?C=da(v+k,r[0][1]):!u&&k<0&&(C=ua(v+O,r[1][1])),T=Math.max(T,D),M=Math.max(M,C)}if(l){if(d){const D=so(H/S,m,_)*S;if(T=Math.max(T,D),i){let C=0;!o&&!u||o&&!u&&p?C=da(v+U+H/S,i[1][1])*S:C=ua(v+U+(o?A:-A)/S,i[0][1])*S,T=Math.max(T,C)}if(r){let C=0;!o&&!u||o&&!u&&p?C=ua(v+H/S,r[1][1])*S:C=da(v+(o?A:-A)/S,r[0][1])*S,T=Math.max(T,C)}}if(f){const D=so(O*S,b,x)/S;if(M=Math.max(M,D),i){let C=0;!o&&!u||u&&!o&&p?C=da(g+O*S+V,i[1][0])/S:C=ua(g+(u?k:-k)*S+V,i[0][0])/S,M=Math.max(M,C)}if(r){let C=0;!o&&!u||u&&!o&&p?C=ua(g+O*S,r[1][0])/S:C=da(g+(u?k:-k)*S,r[0][0])/S,M=Math.max(M,C)}}}k=k+(k<0?M:-M),A=A+(A<0?T:-T),l&&(p?H>O*S?k=($y(o,u)?-A:A)/S:A=($y(o,u)?-k:k)*S:d?(k=A/S,u=o):(A=k*S,o=u));const j=o?g+A:g,z=u?v+k:v;return{width:w+(o?-A:A),height:N+(u?-k:k),x:s[0]*A*(o?-1:1)+j,y:s[1]*k*(u?-1:1)+z}}const d1={width:0,height:0,x:0,y:0},eA={...d1,pointerX:0,pointerY:0,aspectRatio:1};function tA(e,t,n){const a=t.position.x+e.position.x,l=t.position.y+e.position.y,s=e.measured.width??0,i=e.measured.height??0,r=n[0]*s,o=n[1]*i;return[[a-r,l-o],[a+s-r,l+i-o]]}function nA({domNode:e,nodeId:t,getStoreItems:n,onChange:a,onEnd:l}){const s=$t(e);let i={controlDirection:My("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:h,onResize:y,onResizeEnd:b,shouldResize:x}){let m={...d1},_={...eA};i={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:My(u)};let g,v=null,w=[],N,S,A;const k=ux().on("start",H=>{const{nodeLookup:O,transform:V,snapGrid:U,snapToGrid:T,nodeOrigin:M,paneDomNode:j}=n();if(g=O.get(t),!g)return;v=(j==null?void 0:j.getBoundingClientRect())??null;const{xSnapped:z,ySnapped:D}=Ri(H.sourceEvent,{transform:V,snapGrid:U,snapToGrid:T,containerBounds:v});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},_={...m,pointerX:z,pointerY:D,aspectRatio:m.width/m.height},N=void 0,S=jl(g.extent)?g.extent:void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(N=O.get(g.parentId)),N&&g.extent==="parent"&&(S=[[0,0],[N.measured.width,N.measured.height]]),w=[],A=void 0;for(const[C,E]of O)if(E.parentId===t&&(w.push({id:C,position:{...E.position},extent:E.extent}),E.extent==="parent"||E.expandParent)){const $=tA(E,g,E.origin??M);A?A=[[Math.min($[0][0],A[0][0]),Math.min($[0][1],A[0][1])],[Math.max($[1][0],A[1][0]),Math.max($[1][1],A[1][1])]]:A=$}h==null||h(H,{...m})}).on("drag",H=>{const{transform:O,snapGrid:V,snapToGrid:U,nodeOrigin:T}=n(),M=Ri(H.sourceEvent,{transform:O,snapGrid:V,snapToGrid:U,containerBounds:v}),j=[];if(!g)return;const{x:z,y:D,width:C,height:E}=m,$={},L=g.origin??T,{width:P,height:G,x:K,y:le}=W4(_,i.controlDirection,M,i.boundaries,i.keepAspectRatio,L,S,A),Y=P!==C,I=G!==E,X=K!==z&&Y,te=le!==D&&I;if(!X&&!te&&!Y&&!I)return;const F={prevValues:{...m},startX:_.x,startY:_.y,childNodes:w.map(oe=>({...oe,position:{...oe.position}}))};if((X||te||L[0]===1||L[1]===1)&&($.x=X?K:m.x,$.y=te?le:m.y,m.x=$.x,m.y=$.y,w.length>0)){const oe=K-z,pe=le-D;for(const Ne of w)Ne.position={x:Ne.position.x-oe+L[0]*(P-C),y:Ne.position.y-pe+L[1]*(G-E)},j.push(Ne)}if((Y||I)&&($.width=Y&&(!i.resizeDirection||i.resizeDirection==="horizontal")?P:m.width,$.height=I&&(!i.resizeDirection||i.resizeDirection==="vertical")?G:m.height,m.width=$.width,m.height=$.height),N&&g.expandParent){const oe=L[0]*($.width??0);$.x&&$.x<oe&&(m.x=oe,_.x=_.x-($.x-oe));const pe=L[1]*($.height??0);$.y&&$.y<pe&&(m.y=pe,_.y=_.y-($.y-pe))}const J=J4({width:m.width,prevWidth:C,height:m.height,prevHeight:E,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),ee={...m,direction:J};if((x==null?void 0:x(H,ee))===!1){m=F.prevValues,_.x=F.startX,_.y=F.startY,w.forEach((oe,pe)=>{oe.position=F.childNodes[pe].position});return}y==null||y(H,ee),a($,j)}).on("end",H=>{b==null||b(H,{...m}),l==null||l({...m})});s.call(k)}function o(){s.on(".drag",null)}return{update:r,destroy:o}}var f1={exports:{}},p1={},m1={exports:{}},h1={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var qs=R;function aA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lA=typeof Object.is=="function"?Object.is:aA,sA=qs.useState,iA=qs.useEffect,rA=qs.useLayoutEffect,oA=qs.useDebugValue;function cA(e,t){var n=t(),a=sA({inst:{value:n,getSnapshot:t}}),l=a[0].inst,s=a[1];return rA(function(){l.value=n,l.getSnapshot=t,vd(l)&&s({inst:l})},[e,n,t]),iA(function(){return vd(l)&&s({inst:l}),e(function(){vd(l)&&s({inst:l})})},[e]),oA(n),n}function vd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lA(e,n)}catch{return!0}}function uA(e,t){return t()}var dA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?uA:cA;h1.useSyncExternalStore=qs.useSyncExternalStore!==void 0?qs.useSyncExternalStore:dA;m1.exports=h1;var fA=m1.exports;/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var hu=R,pA=fA;function mA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hA=typeof Object.is=="function"?Object.is:mA,gA=pA.useSyncExternalStore,yA=hu.useRef,vA=hu.useEffect,_A=hu.useMemo,bA=hu.useDebugValue;p1.useSyncExternalStoreWithSelector=function(e,t,n,a,l){var s=yA(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=_A(function(){function o(h){if(!u){if(u=!0,d=h,h=a(h),l!==void 0&&i.hasValue){var y=i.value;if(l(y,h))return f=y}return f=h}if(y=f,hA(d,h))return y;var b=a(h);return l!==void 0&&l(y,b)?(d=h,y):(d=h,f=b)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return o(t())},p===null?void 0:function(){return o(p())}]},[t,n,a,l]);var r=gA(e,s[0],s[1]);return vA(function(){i.hasValue=!0,i.value=r},[r]),bA(r),r};f1.exports=p1;var xA=f1.exports;const wA=M0(xA),SA={},Oy=e=>{let t;const n=new Set,a=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const h=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,h))}},l=()=>t,o={setState:a,getState:l,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(SA?"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()}},u=t=e(a,l,o);return o},NA=e=>e?Oy(e):Oy,{useDebugValue:EA}=ho,{useSyncExternalStoreWithSelector:CA}=wA,TA=e=>e;function g1(e,t=TA,n){const a=CA(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return EA(a),a}const Dy=(e,t)=>{const n=NA(e),a=(l,s=t)=>g1(n,l,s);return Object.assign(a,n),a},AA=(e,t)=>e?Dy(e,t):Dy;function Re(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[a,l]of e)if(!Object.is(l,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}const gu=R.createContext(null),kA=gu.Provider,y1=cn.error001("react");function he(e,t){const n=R.useContext(gu);if(n===null)throw new Error(y1);return g1(n,e,t)}function $e(){const e=R.useContext(gu);if(e===null)throw new Error(y1);return R.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const zy={display:"none"},jA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},v1="react-flow__node-desc",_1="react-flow__edge-desc",MA="react-flow__aria-live",$A=e=>e.ariaLiveMessage,OA=e=>e.ariaLabelConfig;function DA({rfId:e}){const t=he($A);return c.jsx("div",{id:`${MA}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:jA,children:t})}function zA({rfId:e,disableKeyboardA11y:t}){const n=he(OA);return c.jsxs(c.Fragment,{children:[c.jsx("div",{id:`${v1}-${e}`,style:zy,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),c.jsx("div",{id:`${_1}-${e}`,style:zy,children:n["edge.a11yDescription.default"]}),!t&&c.jsx(DA,{rfId:e})]})}const yu=R.forwardRef(({position:e="top-left",children:t,className:n,style:a,...l},s)=>{const i=`${e}`.split("-");return c.jsx("div",{className:Pe(["react-flow__panel",n,...i]),style:a,ref:s,...l,children:t})});yu.displayName="Panel";const Ry="https://reactflow.dev?utm_source=attribution";function RA({proOptions:e,position:t="bottom-right"}){return R.useEffect(()=>{},[]),e!=null&&e.hideAttribution?null:c.jsx(yu,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Ry}`,children:c.jsx("a",{href:Ry,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const HA=e=>{const t=[],n=[];for(const[,a]of e.nodeLookup)a.selected&&t.push(a.internals.userNode);for(const[,a]of e.edgeLookup)a.selected&&n.push(a);return{selectedNodes:t,selectedEdges:n}},io=e=>e.id;function BA(e,t){return Re(e.selectedNodes.map(io),t.selectedNodes.map(io))&&Re(e.selectedEdges.map(io),t.selectedEdges.map(io))}function LA({onSelectionChange:e}){const t=$e(),{selectedNodes:n,selectedEdges:a}=he(HA,BA);return R.useEffect(()=>{const l={nodes:n,edges:a};e==null||e(l),t.getState().onSelectionChangeHandlers.forEach(s=>s(l))},[n,a,e]),null}const VA=e=>!!e.onSelectionChangeHandlers;function UA({onSelectionChange:e}){const t=he(VA);return e||t?c.jsx(LA,{onSelectionChange:e}):null}const b1=[0,0],IA={x:0,y:0,zoom:1},qA=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Hy=[...qA,"rfId"],GA=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}),By={translateExtent:lr,nodeOrigin:b1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function YA(e){const{setNodes:t,setEdges:n,setMinZoom:a,setMaxZoom:l,setTranslateExtent:s,setNodeExtent:i,reset:r,setDefaultNodesAndEdges:o}=he(GA,Re),u=$e();R.useEffect(()=>(o(e.defaultNodes,e.defaultEdges),()=>{d.current=By,r()}),[]);const d=R.useRef(By);return R.useEffect(()=>{for(const f of Hy){const p=e[f],h=d.current[f];p!==h&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?a(p):f==="maxZoom"?l(p):f==="translateExtent"?s(p):f==="nodeExtent"?i(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:f4(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},Hy.map(f=>e[f])),null}function Ly(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function PA(e){var a;const[t,n]=R.useState(e==="system"?null:e);return R.useEffect(()=>{if(e!=="system"){n(e);return}const l=Ly(),s=()=>n(l!=null&&l.matches?"dark":"light");return s(),l==null||l.addEventListener("change",s),()=>{l==null||l.removeEventListener("change",s)}},[e]),t!==null?t:(a=Ly())!=null&&a.matches?"dark":"light"}const Vy=typeof document<"u"?document:null;function or(e=null,t={target:Vy,actInsideInputWithModifier:!0}){const[n,a]=R.useState(!1),l=R.useRef(!1),s=R.useRef(new Set([])),[i,r]=R.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace(/\+/g,`
|
|
66
|
+
`).replace(`
|
|
67
|
+
|
|
68
|
+
`,`
|
|
69
|
+
+`).split(`
|
|
70
|
+
`)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return R.useEffect(()=>{const o=(t==null?void 0:t.target)??Vy,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=h=>{var x,m;if(l.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!l.current||l.current&&!u)&&Qx(h))return!1;const b=Iy(h.code,r);if(s.current.add(h[b]),Uy(i,s.current,!1)){const _=((m=(x=h.composedPath)==null?void 0:x.call(h))==null?void 0:m[0])||h.target,g=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";t.preventDefault!==!1&&(l.current||!g)&&h.preventDefault(),a(!0)}},f=h=>{const y=Iy(h.code,r);Uy(i,s.current,!0)?(a(!1),s.current.clear()):s.current.delete(h[y]),h.key==="Meta"&&s.current.clear(),l.current=!1},p=()=>{s.current.clear(),a(!1)};return o==null||o.addEventListener("keydown",d),o==null||o.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{o==null||o.removeEventListener("keydown",d),o==null||o.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,a]),n}function Uy(e,t,n){return e.filter(a=>n||a.length===t.size).some(a=>a.every(l=>t.has(l)))}function Iy(e,t){return t.includes(e)?"code":"key"}const XA=()=>{const e=$e();return R.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:a}=e.getState();return a?a.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[a,l,s],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??a,y:t.y??l,zoom:t.zoom??s},n),!0):!1},getViewport:()=>{const[t,n,a]=e.getState().transform;return{x:t,y:n,zoom:a}},setCenter:async(t,n,a)=>e.getState().setCenter(t,n,a),fitBounds:async(t,n)=>{const{width:a,height:l,minZoom:s,maxZoom:i,panZoom:r}=e.getState(),o=zm(t,a,l,s,i,(n==null?void 0:n.padding)??.1);return r?(await r.setViewport(o,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:a,snapGrid:l,snapToGrid:s,domNode:i}=e.getState();if(!i)return t;const{x:r,y:o}=i.getBoundingClientRect(),u={x:t.x-r,y:t.y-o},d=n.snapGrid??l,f=n.snapToGrid??s;return jr(u,a,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:a}=e.getState();if(!a)return t;const{x:l,y:s}=a.getBoundingClientRect(),i=Is(t,n);return{x:i.x+l,y:i.y+s}}}),[])};function x1(e,t){const n=[],a=new Map,l=[];for(const s of e)if(s.type==="add"){l.push(s);continue}else if(s.type==="remove"||s.type==="replace")a.set(s.id,[s]);else{const i=a.get(s.id);i?i.push(s):a.set(s.id,[s])}for(const s of t){const i=a.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 r={...s};for(const o of i)ZA(o,r);n.push(r)}return l.length&&l.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function ZA(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={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function w1(e,t){return x1(e,t)}function S1(e,t){return x1(e,t)}function sl(e,t){return{id:e,type:"select",selected:t}}function rs(e,t=new Set){const n=[];for(const[a,l]of e){const s=t.has(a);!(l.selected===void 0&&!s)&&l.selected!==s&&n.push(sl(l.id,s))}return n}function qy({items:e=[],lookup:t}){var l;const n=[],a=new Map(e.map(s=>[s.id,s]));for(const[s,i]of e.entries()){const r=t.get(i.id),o=((l=r==null?void 0:r.internals)==null?void 0:l.userNode)??r;o!==void 0&&o!==i&&n.push({id:i.id,item:i,type:"replace"}),o===void 0&&n.push({item:i,type:"add",index:s})}for(const[s]of t)a.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function Gy(e){return{id:e.id,type:"remove"}}const QA=Gx();function N1(e,t,n={}){return v4(e,t,{...n,onError:n.onError??QA})}const Yy=e=>a4(e),KA=e=>Lx(e);function E1(e){return R.forwardRef(e)}const C1=typeof window<"u"?R.useLayoutEffect:R.useEffect;function Py(e){const[t,n]=R.useState(BigInt(0)),[a]=R.useState(()=>FA(()=>n(l=>l+BigInt(1))));return C1(()=>{const l=a.get();l.length&&(e(l),a.reset())},[t]),a}function FA(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const T1=R.createContext(null);function JA({children:e}){const t=$e(),n=R.useCallback(r=>{const{nodes:o=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState();let b=o;for(const m of r)b=typeof m=="function"?m(b):m;let x=qy({items:b,lookup:p});for(const m of y.values())x=m(x);d&&u(b),x.length>0?f==null||f(x):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:_,setNodes:g}=t.getState();m&&g(_)})},[]),a=Py(n),l=R.useCallback(r=>{const{edges:o=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let h=o;for(const y of r)h=typeof y=="function"?y(h):y;d?u(h):f&&f(qy({items:h,lookup:p}))},[]),s=Py(l),i=R.useMemo(()=>({nodeQueue:a,edgeQueue:s}),[]);return c.jsx(T1.Provider,{value:i,children:e})}function WA(){const e=R.useContext(T1);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ek=e=>!!e.panZoom;function Im(){const e=XA(),t=$e(),n=WA(),a=he(ek),l=R.useMemo(()=>{const s=f=>t.getState().nodeLookup.get(f),i=f=>{n.nodeQueue.push(f)},r=f=>{n.edgeQueue.push(f)},o=f=>{var m,_;const{nodeLookup:p,nodeOrigin:h}=t.getState(),y=Yy(f)?f:p.get(f.id),b=y.parentId?Px(y.position,y.measured,y.parentId,p,h):y.position,x={...y,position:b,width:((m=y.measured)==null?void 0:m.width)??y.width,height:((_=y.measured)==null?void 0:_.height)??y.height};return ir(x,y.parentId?void 0:h)},u=(f,p,h={replace:!1})=>{i(y=>y.map(b=>{if(b.id===f){const x=typeof p=="function"?p(b):p;return h.replace&&Yy(x)?x:{...b,...x}}return b}))},d=(f,p,h={replace:!1})=>{r(y=>y.map(b=>{if(b.id===f){const x=typeof p=="function"?p(b):p;return h.replace&&KA(x)?x:{...b,...x}}return b}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=s(f))==null?void 0:p.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:i,setEdges:r,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:h}=t.getState(),[y,b,x]=h;return{nodes:f.map(m=>({...m})),edges:p.map(m=>({...m})),viewport:{x:y,y:b,zoom:x}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:h,edges:y,onNodesDelete:b,onEdgesDelete:x,triggerNodeChanges:m,triggerEdgeChanges:_,onDelete:g,onBeforeDelete:v}=t.getState(),{nodes:w,edges:N}=await o4({nodesToRemove:f,edgesToRemove:p,nodes:h,edges:y,onBeforeDelete:v}),S=N.length>0,A=w.length>0;if(S){const k=N.map(Gy);x==null||x(N),_(k)}if(A){const k=w.map(Gy);b==null||b(w),m(k)}return(A||S)&&(g==null||g({nodes:w,edges:N})),{deletedNodes:w,deletedEdges:N}},getIntersectingNodes:(f,p=!0,h)=>{const y=by(f),b=y?f:o(f),x=h!==void 0;if(!b)return[];const{nodeOrigin:m}=t.getState();return(h||t.getState().nodes).filter(_=>{const g=t.getState().nodeLookup.get(_.id);if(g&&!y&&(_.id===f.id||!g.internals.positionAbsolute))return!1;const v=ir(x?_:g,m),w=jc(v,b);return p&&w>0||w>=v.width*v.height||w>=b.width*b.height})},isNodeIntersecting:(f,p,h=!0)=>{const b=by(f)?f:o(f);if(!b)return!1;const x=jc(b,p);return h&&x>0||x>=p.width*p.height||x>=b.width*b.height},updateNode:u,updateNodeData:(f,p,h={replace:!1})=>{u(f,y=>{const b=typeof p=="function"?p(y):p;return h.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},h)},updateEdge:d,updateEdgeData:(f,p,h={replace:!1})=>{d(f,y=>{const b=typeof p=="function"?p(y):p;return h.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},h)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:h}=t.getState();return l4(f,{nodeLookup:p,nodeOrigin:h})},getHandleConnections:({type:f,id:p,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}-${f}${p?`-${p}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:y.values())??[])},fitView:async f=>{const p=t.getState().fitViewResolver??d4();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(h=>[...h]),p.promise}}},[]);return R.useMemo(()=>({...l,...e,viewportInitialized:a}),[a])}const Xy=e=>e.selected,tk=typeof window<"u"?window:void 0;function nk({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=$e(),{deleteElements:a}=Im(),l=or(e,{actInsideInputWithModifier:!1}),s=or(t,{target:tk});R.useEffect(()=>{if(l){const{edges:i,nodes:r}=n.getState();a({nodes:r.filter(Xy),edges:i.filter(Xy)}),n.setState({nodesSelectionActive:!1})}},[l]),R.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function ak(e){const t=$e();R.useEffect(()=>{const n=()=>{var l,s,i,r;if(!e.current||!(((s=(l=e.current).checkVisibility)==null?void 0:s.call(l))??!0))return!1;const a=Rm(e.current);(a.height===0||a.width===0)&&((r=(i=t.getState()).onError)==null||r.call(i,"004",cn.error004())),t.setState({width:a.width||500,height:a.height||500})};if(e.current){n(),window.addEventListener("resize",n);const a=new ResizeObserver(()=>n());return a.observe(e.current),()=>{window.removeEventListener("resize",n),a.disconnect()}}},[])}const vu={position:"absolute",width:"100%",height:"100%",top:0,left:0},lk=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function sk({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:a=!1,panActivationKeyPressed:l,panOnScrollSpeed:s=.5,panOnScrollMode:i=yl.Free,zoomOnDoubleClick:r=!0,panOnDrag:o=!0,defaultViewport:u,translateExtent:d,minZoom:f,maxZoom:p,zoomActivationKeyCode:h,preventScrolling:y=!0,children:b,noWheelClassName:x,noPanClassName:m,onViewportChange:_,isControlledViewport:g,paneClickDistance:v,selectionOnDrag:w}){const N=$e(),S=R.useRef(null),{userSelectionActive:A,lib:k,connectionInProgress:H}=he(lk,Re),O=or(h),V=R.useRef();ak(S);const U=R.useCallback(T=>{_==null||_({x:T[0],y:T[1],zoom:T[2]}),g||N.setState({transform:T})},[_,g]);return R.useEffect(()=>{if(S.current){V.current=Q4({domNode:S.current,minZoom:f,maxZoom:p,translateExtent:d,viewport:u,onDraggingChange:z=>N.setState(D=>D.paneDragging===z?D:{paneDragging:z}),onPanZoomStart:(z,D)=>{const{onViewportChangeStart:C,onMoveStart:E}=N.getState();E==null||E(z,D),C==null||C(D)},onPanZoom:(z,D)=>{const{onViewportChange:C,onMove:E}=N.getState();E==null||E(z,D),C==null||C(D)},onPanZoomEnd:(z,D)=>{const{onViewportChangeEnd:C,onMoveEnd:E}=N.getState();E==null||E(z,D),C==null||C(D)}});const{x:T,y:M,zoom:j}=V.current.getViewport();return N.setState({panZoom:V.current,transform:[T,M,j],domNode:S.current.closest(".react-flow")}),()=>{var z;(z=V.current)==null||z.destroy()}}},[]),R.useEffect(()=>{var T;(T=V.current)==null||T.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:a,panActivationKeyPressed:l,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:r,panOnDrag:o,zoomActivationKeyPressed:O,preventScrolling:y,noPanClassName:m,userSelectionActive:A,noWheelClassName:x,lib:k,onTransformChange:U,connectionInProgress:H,selectionOnDrag:w,paneClickDistance:v})},[e,t,n,a,l,s,i,r,o,O,y,m,A,x,k,U,H,w,v]),c.jsx("div",{className:"react-flow__renderer",ref:S,style:vu,children:b})}const ik=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function rk(){const{userSelectionActive:e,userSelectionRect:t}=he(ik,Re);return e&&t?c.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 _d=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},ok=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function ck({isSelecting:e,selectionKeyPressed:t,selectionMode:n=sr.Full,panOnDrag:a,autoPanOnSelection:l,paneClickDistance:s,selectionOnDrag:i,onSelectionStart:r,onSelectionEnd:o,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:h,onPaneMouseLeave:y,children:b}){const x=R.useRef(0),m=$e(),{userSelectionActive:_,elementsSelectable:g,dragging:v,panBy:w,autoPanSpeed:N}=he(ok,Re),S=g&&(e||_),A=R.useRef(null),k=R.useRef(),H=R.useRef(new Set),O=R.useRef(new Set),V=R.useRef(!1),U=R.useRef(!1),T=R.useRef({x:0,y:0}),M=R.useRef(!1),j=I=>{if(U.current||V.current||m.getState().connection.inProgress){U.current=!1,V.current=!1;return}const{connectionClickStartHandle:X,connection:te,onClickConnectEnd:F,resetSelectedElements:J}=m.getState();if(X){const ee=structuredClone(te);delete ee.inProgress,ee.toPosition=ee.toHandle?ee.toHandle.position:null,F==null||F(I.nativeEvent,ee),m.setState({connectionClickStartHandle:null})}u==null||u(I),J(),m.setState({nodesSelectionActive:!1})},z=I=>{if(Array.isArray(a)&&(a!=null&&a.includes(2))){I.preventDefault();return}d==null||d(I)},D=f?I=>f(I):void 0,C=I=>{U.current&&(I.stopPropagation(),U.current=!1)},E=I=>{var Ne,Ut;if(I.pointerType==="touch"&&a!==!1&&!t)return;const{domNode:X,transform:te}=m.getState();if(k.current=X==null?void 0:X.getBoundingClientRect(),!k.current)return;const F=I.target===A.current;if(!F&&!!I.target.closest(".nokey")||!e||!(i&&F||t)||I.button!==0||!I.isPrimary)return;(Ut=(Ne=I.target)==null?void 0:Ne.setPointerCapture)==null||Ut.call(Ne,I.pointerId),U.current=!1;const{x:se,y:oe}=rn(I.nativeEvent,k.current),pe=jr({x:se,y:oe},te);m.setState({userSelectionRect:{width:0,height:0,startX:pe.x,startY:pe.y,x:se,y:oe}}),F||(I.stopPropagation(),I.preventDefault())};function $(I,X){const{userSelectionRect:te}=m.getState();if(!te)return;const{transform:F,nodeLookup:J,edgeLookup:ee,connectionLookup:se,triggerNodeChanges:oe,triggerEdgeChanges:pe,defaultEdgeOptions:Ne}=m.getState(),Ut={x:te.startX,y:te.startY},{x:pn,y:mn}=Is(Ut,F),Rn={startX:Ut.x,startY:Ut.y,x:I<pn?I:pn,y:X<mn?X:mn,width:Math.abs(I-pn),height:Math.abs(X-mn)},ti=H.current,Ka=O.current;H.current=new Set(Om(J,Rn,F,n===sr.Partial,!0).map(Jt=>Jt.id)),O.current=new Set;const Fa=(Ne==null?void 0:Ne.selectable)??!0;for(const Jt of H.current){const Hn=se.get(Jt);if(Hn)for(const{edgeId:Bn}of Hn.values()){const Ja=ee.get(Bn);Ja&&(Ja.selectable??Fa)&&O.current.add(Bn)}}if(!xy(ti,H.current)){const Jt=rs(J,H.current);oe(Jt)}if(!xy(Ka,O.current)){const Jt=rs(ee,O.current);pe(Jt)}m.setState({userSelectionRect:Rn,userSelectionActive:!0,nodesSelectionActive:!1})}function L(){if(!l||!k.current)return;const[I,X]=Dm(T.current,k.current,N);w({x:I,y:X}).then(te=>{if(!U.current||!te){x.current=requestAnimationFrame(L);return}const{x:F,y:J}=T.current;$(F,J),x.current=requestAnimationFrame(L)})}const P=()=>{cancelAnimationFrame(x.current),x.current=0,M.current=!1};R.useEffect(()=>()=>P(),[]);const G=I=>{const{userSelectionRect:X,transform:te,resetSelectedElements:F}=m.getState();if(!k.current||!X)return;const{x:J,y:ee}=rn(I.nativeEvent,k.current);T.current={x:J,y:ee};const se=Is({x:X.startX,y:X.startY},te);if(!U.current){const oe=t?0:s;if(Math.hypot(J-se.x,ee-se.y)<=oe)return;F(),r==null||r(I)}U.current=!0,M.current||(L(),M.current=!0),$(J,ee)},K=I=>{var X,te;if(!S){I.target===A.current&&m.getState().connection.inProgress&&(V.current=!0);return}I.button===0&&((te=(X=I.target)==null?void 0:X.releasePointerCapture)==null||te.call(X,I.pointerId),!_&&I.target===A.current&&m.getState().userSelectionRect&&(j==null||j(I)),m.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(o==null||o(I),m.setState({nodesSelectionActive:H.current.size>0})),P())},le=I=>{var X,te;(te=(X=I.target)==null?void 0:X.releasePointerCapture)==null||te.call(X,I.pointerId),P()},Y=a===!0||Array.isArray(a)&&a.includes(0);return c.jsxs("div",{className:Pe(["react-flow__pane",{draggable:Y,dragging:v,selection:e}]),onClick:S?void 0:_d(j,A),onContextMenu:_d(z,A),onWheel:_d(D,A),onPointerEnter:S?void 0:p,onPointerMove:S?G:h,onPointerUp:K,onPointerCancel:S?le:void 0,onPointerDownCapture:S?E:void 0,onClickCapture:S?C:void 0,onPointerLeave:y,ref:A,style:vu,children:[b,c.jsx(rk,{})]})}function lp({id:e,store:t,unselect:n=!1,nodeRef:a}){const{addSelectedNodes:l,unselectNodesAndEdges:s,multiSelectionActive:i,nodeLookup:r,onError:o}=t.getState(),u=r.get(e);if(!u){o==null||o("012",cn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=a==null?void 0:a.current)==null?void 0:d.blur()})):l([e])}function A1({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:a,nodeId:l,isSelectable:s,nodeClickDistance:i}){const r=$e(),[o,u]=R.useState(!1),d=R.useRef();return R.useEffect(()=>{if(!t)return d.current=z4({getStoreItems:()=>r.getState(),onNodeMouseDown:f=>{lp({id:f,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}}),()=>{var f;(f=d.current)==null||f.destroy(),d.current=void 0}},[t,r,e]),R.useEffect(()=>{t||!e.current||!d.current||d.current.update({noDragClassName:n,handleSelector:a,domNode:e.current,isSelectable:s,nodeId:l,nodeClickDistance:i})},[n,a,t,s,e,l,i]),o}const uk=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function k1(){const e=$e();return R.useCallback(n=>{const{nodeExtent:a,snapToGrid:l,snapGrid:s,nodesDraggable:i,onError:r,updateNodePositions:o,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=uk(i),h=l?s[0]:5,y=l?s[1]:5,b=n.direction.x*h*n.factor,x=n.direction.y*y*n.factor;for(const[,m]of u){if(!p(m))continue;let _={x:m.internals.positionAbsolute.x+b,y:m.internals.positionAbsolute.y+x};l&&(_=kr(_,s));const{position:g,positionAbsolute:v}=Vx({nodeId:m.id,nextPosition:_,nodeLookup:u,nodeExtent:a,nodeOrigin:d,onError:r});m.position=g,m.internals.positionAbsolute=v,f.set(m.id,m)}o(f)},[])}const qm=R.createContext(null),dk=qm.Provider;qm.Consumer;const j1=()=>R.useContext(qm),fk=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),M1=R.createContext(null);function pk({children:e}){const t=he(fk,Re);return c.jsx(M1.Provider,{value:t,children:e})}function mk(){const e=R.useContext(M1);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const hk={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},gk=(e,t,n)=>a=>{const{connectionClickStartHandle:l,connectionMode:s,connection:i}=a,{fromHandle:r,toHandle:o,isValid:u}=i;if(!r&&!l)return hk;const d=(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n;return{connectingFrom:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,connectingTo:d,clickConnecting:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,isPossibleEndHandle:s===Vs.Strict?(r==null?void 0:r.type)!==n:e!==(r==null?void 0:r.nodeId)||t!==(r==null?void 0:r.id),connectionInProcess:!!r,clickConnectionInProcess:!!l,valid:d&&u}};function yk({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:a=!0,isConnectableStart:l=!0,isConnectableEnd:s=!0,id:i,onConnect:r,children:o,className:u,onMouseDown:d,onTouchStart:f,...p},h){var M,j;const y=i||null,b=e==="target",x=$e(),m=j1(),{connectOnClick:_,noPanClassName:g,rfId:v}=mk(),{connectingFrom:w,connectingTo:N,clickConnecting:S,isPossibleEndHandle:A,connectionInProcess:k,clickConnectionInProcess:H,valid:O}=he(gk(m,y,e),Re);m||(j=(M=x.getState()).onError)==null||j.call(M,"010",cn.error010());const V=z=>{const{defaultEdgeOptions:D,onConnect:C,hasDefaultEdges:E}=x.getState(),$={...D,...z};if(E){const{edges:L,setEdges:P,onError:G}=x.getState();P(N1($,L,{onError:G}))}C==null||C($),r==null||r($)},U=z=>{if(!m)return;const D=Kx(z.nativeEvent);if(l&&(D&&z.button===0||!D)){const C=x.getState();ap.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:C.autoPanOnConnect,connectionMode:C.connectionMode,connectionRadius:C.connectionRadius,domNode:C.domNode,nodeLookup:C.nodeLookup,lib:C.lib,isTarget:b,handleId:y,nodeId:m,flowId:C.rfId,panBy:C.panBy,cancelConnection:C.cancelConnection,onConnectStart:C.onConnectStart,onConnectEnd:(...E)=>{var $,L;return(L=($=x.getState()).onConnectEnd)==null?void 0:L.call($,...E)},updateConnection:C.updateConnection,onConnect:V,isValidConnection:n||((...E)=>{var $,L;return((L=($=x.getState()).isValidConnection)==null?void 0:L.call($,...E))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:C.autoPanSpeed,dragThreshold:C.connectionDragThreshold})}D?d==null||d(z):f==null||f(z)},T=z=>{const{onClickConnectStart:D,onClickConnectEnd:C,connectionClickStartHandle:E,connectionMode:$,isValidConnection:L,lib:P,rfId:G,nodeLookup:K,connection:le}=x.getState();if(!m||!E&&!l)return;if(!E){D==null||D(z.nativeEvent,{nodeId:m,handleId:y,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:m,type:e,id:y}});return}const Y=Zx(z.target),I=n||L,{connection:X,isValid:te}=ap.isValid(z.nativeEvent,{handle:{nodeId:m,id:y,type:e},connectionMode:$,fromNodeId:E.nodeId,fromHandleId:E.id||null,fromType:E.type,isValidConnection:I,flowId:G,doc:Y,lib:P,nodeLookup:K});te&&X&&V(X);const F=structuredClone(le);delete F.inProgress,F.toPosition=F.toHandle?F.toHandle.position:null,C==null||C(z,F),x.setState({connectionClickStartHandle:null})};return c.jsx("div",{"data-handleid":y,"data-nodeid":m,"data-handlepos":t,"data-id":`${v}-${m}-${y}-${e}`,className:Pe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",g,u,{source:!b,target:b,connectable:a,connectablestart:l,connectableend:s,clickconnecting:S,connectingfrom:w,connectingto:N,valid:O,connectionindicator:a&&(!k||A)&&(k||H?s:l)}]),onMouseDown:U,onTouchStart:U,onClick:_?T:void 0,ref:h,...p,children:o})}const Ya=R.memo(E1(yk));function vk({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return c.jsxs(c.Fragment,{children:[e==null?void 0:e.label,c.jsx(Ya,{type:"source",position:n,isConnectable:t})]})}function _k({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:a=W.Bottom}){return c.jsxs(c.Fragment,{children:[c.jsx(Ya,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,c.jsx(Ya,{type:"source",position:a,isConnectable:t})]})}function bk(){return null}function xk({data:e,isConnectable:t,targetPosition:n=W.Top}){return c.jsxs(c.Fragment,{children:[c.jsx(Ya,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Mc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Zy={input:vk,default:_k,output:xk,group:bk};function wk(e){var t,n,a,l;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((a=e.style)==null?void 0:a.width),height:e.height??((l=e.style)==null?void 0:l.height)}}const Sk=e=>{const{width:t,height:n,x:a,y:l}=Ar(e.nodeLookup,{filter:s=>!!s.selected});return{width:sn(t)?t:null,height:sn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${a}px,${l}px)`}};function Nk({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const a=$e(),{width:l,height:s,transformString:i,userSelectionActive:r}=he(Sk,Re),o=k1(),u=R.useRef(null);R.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const d=!r&&l!==null&&s!==null;if(A1({nodeRef:u,disabled:!d}),!d)return null;const f=e?h=>{const y=a.getState().nodes.filter(b=>b.selected);e(h,y)}:void 0,p=h=>{Object.prototype.hasOwnProperty.call(Mc,h.key)&&(h.preventDefault(),o({direction:Mc[h.key],factor:h.shiftKey?4:1}))};return c.jsx("div",{className:Pe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:c.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:l,height:s}})})}const Qy=typeof window<"u"?window:void 0,Ek=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function $1({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:a,onPaneMouseLeave:l,onPaneContextMenu:s,onPaneScroll:i,paneClickDistance:r,deleteKeyCode:o,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:b,zoomActivationKeyCode:x,elementsSelectable:m,zoomOnScroll:_,zoomOnPinch:g,panOnScroll:v,panOnScrollSpeed:w,panOnScrollMode:N,zoomOnDoubleClick:S,panOnDrag:A,autoPanOnSelection:k,defaultViewport:H,translateExtent:O,minZoom:V,maxZoom:U,preventScrolling:T,onSelectionContextMenu:M,noWheelClassName:j,noPanClassName:z,disableKeyboardA11y:D,onViewportChange:C,isControlledViewport:E}){const{nodesSelectionActive:$,userSelectionActive:L}=he(Ek,Re),P=or(u,{target:Qy}),G=or(b,{target:Qy}),K=G||A,le=G||v,Y=d&&K!==!0,I=P||L||Y;return nk({deleteKeyCode:o,multiSelectionKeyCode:y}),c.jsx(sk,{onPaneContextMenu:s,elementsSelectable:m,zoomOnScroll:_,zoomOnPinch:g,panOnScroll:le,panActivationKeyPressed:G,panOnScrollSpeed:w,panOnScrollMode:N,zoomOnDoubleClick:S,panOnDrag:!P&&K,defaultViewport:H,translateExtent:O,minZoom:V,maxZoom:U,zoomActivationKeyCode:x,preventScrolling:T,noWheelClassName:j,noPanClassName:z,onViewportChange:C,isControlledViewport:E,paneClickDistance:r,selectionOnDrag:Y,children:c.jsxs(ck,{onSelectionStart:p,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:a,onPaneMouseLeave:l,onPaneContextMenu:s,onPaneScroll:i,panOnDrag:K,autoPanOnSelection:k,isSelecting:!!I,selectionMode:f,selectionKeyPressed:P,paneClickDistance:r,selectionOnDrag:Y,children:[e,$&&c.jsx(Nk,{onSelectionContextMenu:M,noPanClassName:z,disableKeyboardA11y:D})]})})}$1.displayName="FlowRenderer";const Ck=R.memo($1),Tk=e=>t=>e?Om(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 Ak(e){return he(R.useCallback(Tk(e),[e]),Re)}const kk=e=>e.updateNodeInternals;function jk(){const e=he(kk),[t]=R.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const a=new Map;n.forEach(l=>{const s=l.target.getAttribute("data-id");a.set(s,{id:s,nodeElement:l.target,force:!0})}),e(a)}));return R.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Mk({node:e,nodeType:t,hasDimensions:n,resizeObserver:a}){const l=$e(),s=R.useRef(null),i=R.useRef(null),r=R.useRef(e.sourcePosition),o=R.useRef(e.targetPosition),u=R.useRef(t),d=n&&!!e.internals.handleBounds;return R.useEffect(()=>{s.current&&!e.hidden&&(!d||i.current!==s.current)&&(i.current&&(a==null||a.unobserve(i.current)),a==null||a.observe(s.current),i.current=s.current)},[d,e.hidden]),R.useEffect(()=>()=>{i.current&&(a==null||a.unobserve(i.current),i.current=null)},[]),R.useEffect(()=>{if(s.current){const f=u.current!==t,p=r.current!==e.sourcePosition,h=o.current!==e.targetPosition;(f||p||h)&&(u.current=t,r.current=e.sourcePosition,o.current=e.targetPosition,l.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function $k({id:e,onClick:t,onMouseEnter:n,onMouseMove:a,onMouseLeave:l,onContextMenu:s,onDoubleClick:i,nodesDraggable:r,elementsSelectable:o,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:h,disableKeyboardA11y:y,rfId:b,nodeTypes:x,nodeClickDistance:m,onError:_}){const{node:g,internals:v,isParent:w}=he(I=>{const X=I.nodeLookup.get(e),te=I.parentLookup.has(e);return{node:X,internals:X.internals,isParent:te}},Re);let N=g.type||"default",S=(x==null?void 0:x[N])||Zy[N];S===void 0&&(_==null||_("003",cn.error003(N)),N="default",S=(x==null?void 0:x.default)||Zy.default);const A=!!(g.draggable||r&&typeof g.draggable>"u"),k=!!(g.selectable||o&&typeof g.selectable>"u"),H=!!(g.connectable||u&&typeof g.connectable>"u"),O=!!(g.focusable||d&&typeof g.focusable>"u"),V=$e(),U=Yx(g),T=Mk({node:g,nodeType:N,hasDimensions:U,resizeObserver:f}),M=A1({nodeRef:T,disabled:g.hidden||!A,noDragClassName:p,handleSelector:g.dragHandle,nodeId:e,isSelectable:k,nodeClickDistance:m}),j=k1();if(g.hidden)return null;const z=fn(g),D=wk(g),C=k||A||t||n||a||l,E=n?I=>n(I,{...v.userNode}):void 0,$=a?I=>a(I,{...v.userNode}):void 0,L=l?I=>l(I,{...v.userNode}):void 0,P=s?I=>s(I,{...v.userNode}):void 0,G=i?I=>i(I,{...v.userNode}):void 0,K=I=>{const{selectNodesOnDrag:X,nodeDragThreshold:te}=V.getState();k&&(!X||!A||te>0)&&lp({id:e,store:V,nodeRef:T}),t&&t(I,{...v.userNode})},le=I=>{if(!(Qx(I.nativeEvent)||y)){if(Rx.includes(I.key)&&k){const X=I.key==="Escape";lp({id:e,store:V,unselect:X,nodeRef:T})}else if(A&&g.selected&&Object.prototype.hasOwnProperty.call(Mc,I.key)){I.preventDefault();const{ariaLabelConfig:X}=V.getState();V.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:I.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),j({direction:Mc[I.key],factor:I.shiftKey?4:1})}}},Y=()=>{var se;if(y||!((se=T.current)!=null&&se.matches(":focus-visible")))return;const{transform:I,width:X,height:te,autoPanOnNodeFocus:F,setCenter:J}=V.getState();if(!F)return;Om(new Map([[e,g]]),{x:0,y:0,width:X,height:te},I,!0).length>0||J(g.position.x+z.width/2,g.position.y+z.height/2,{zoom:I[2]})};return c.jsx("div",{className:Pe(["react-flow__node",`react-flow__node-${N}`,{[h]:A},g.className,{selected:g.selected,selectable:k,parent:w,draggable:A,dragging:M}]),ref:T,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:C?"all":"none",visibility:U?"visible":"hidden",...g.style,...D},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:E,onMouseMove:$,onMouseLeave:L,onContextMenu:P,onClick:K,onDoubleClick:G,onKeyDown:O?le:void 0,tabIndex:O?0:void 0,onFocus:O?Y:void 0,role:g.ariaRole??(O?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${v1}-${b}`,"aria-label":g.ariaLabel,...g.domAttributes,children:c.jsx(dk,{value:e,children:c.jsx(S,{id:e,data:g.data,type:N,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:g.selected??!1,selectable:k,draggable:A,deletable:g.deletable??!0,isConnectable:H,sourcePosition:g.sourcePosition,targetPosition:g.targetPosition,dragging:M,dragHandle:g.dragHandle,zIndex:v.z,parentId:g.parentId,...z})})})}var Ok=R.memo($k);const Dk=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function O1(e){const{nodesConnectable:t,nodesFocusable:n,elementsSelectable:a,onError:l}=he(Dk,Re),s=Ak(e.onlyRenderVisibleElements),i=jk();return c.jsx("div",{className:"react-flow__nodes",style:vu,children:s.map(r=>c.jsx(Ok,{id:r,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:i,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:l},r))})}O1.displayName="NodeRenderer";const zk=R.memo(O1);function Rk(e){return he(R.useCallback(n=>{if(!e)return n.edges.map(l=>l.id);const a=[];if(n.width&&n.height)for(const l of n.edges){const s=n.nodeLookup.get(l.source),i=n.nodeLookup.get(l.target);s&&i&&h4({sourceNode:s,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&a.push(l.id)}return a},[e]),Re)}const Hk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return c.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Bk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return c.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Ky={[Ac.Arrow]:Hk,[Ac.ArrowClosed]:Bk};function Lk(e){const t=$e();return R.useMemo(()=>{var l,s;return Object.prototype.hasOwnProperty.call(Ky,e)?Ky[e]:((s=(l=t.getState()).onError)==null||s.call(l,"009",cn.error009(e)),null)},[e])}const Vk=({id:e,type:t,color:n,width:a=12.5,height:l=12.5,markerUnits:s="strokeWidth",strokeWidth:i,orient:r="auto-start-reverse"})=>{const o=Lk(t);return o?c.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${a}`,markerHeight:`${l}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:r,refX:"0",refY:"0",children:c.jsx(o,{color:n,strokeWidth:i})}):null},D1=({defaultColor:e,rfId:t})=>{const n=he(s=>s.edges),a=he(s=>s.defaultEdgeOptions),l=R.useMemo(()=>N4(n,{id:t,defaultColor:e,defaultMarkerStart:a==null?void 0:a.markerStart,defaultMarkerEnd:a==null?void 0:a.markerEnd}),[n,a,t,e]);return l.length?c.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:c.jsx("defs",{children:l.map(s=>c.jsx(Vk,{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};D1.displayName="MarkerDefinitions";var Uk=R.memo(D1);function z1({x:e,y:t,label:n,labelStyle:a,labelShowBg:l=!0,labelBgStyle:s,labelBgPadding:i=[2,4],labelBgBorderRadius:r=2,children:o,className:u,...d}){const[f,p]=R.useState({x:1,y:0,width:0,height:0}),h=Pe(["react-flow__edge-textwrapper",u]),y=R.useRef(null);return R.useEffect(()=>{if(y.current){const b=y.current.getBBox();p({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?c.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...d,children:[l&&c.jsx("rect",{width:f.width+2*i[0],x:-i[0],y:-i[1],height:f.height+2*i[1],className:"react-flow__edge-textbg",style:s,rx:r,ry:r}),c.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:y,style:a,children:n}),o]}):null}z1.displayName="EdgeText";const Ik=R.memo(z1);function _u({path:e,labelX:t,labelY:n,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:i,labelBgPadding:r,labelBgBorderRadius:o,interactionWidth:u=20,...d}){return c.jsxs(c.Fragment,{children:[c.jsx("path",{...d,d:e,fill:"none",className:Pe(["react-flow__edge-path",d.className])}),u?c.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,a&&sn(t)&&sn(n)?c.jsx(Ik,{x:t,y:n,label:a,labelStyle:l,labelShowBg:s,labelBgStyle:i,labelBgPadding:r,labelBgBorderRadius:o}):null]})}function Fy({pos:e,x1:t,y1:n,x2:a,y2:l}){return e===W.Left||e===W.Right?[.5*(t+a),n]:[t,.5*(n+l)]}function R1({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:a,targetY:l,targetPosition:s=W.Top}){const[i,r]=Fy({pos:n,x1:e,y1:t,x2:a,y2:l}),[o,u]=Fy({pos:s,x1:a,y1:l,x2:e,y2:t}),[d,f,p,h]=Fx({sourceX:e,sourceY:t,targetX:a,targetY:l,sourceControlX:i,sourceControlY:r,targetControlX:o,targetControlY:u});return[`M${e},${t} C${i},${r} ${o},${u} ${a},${l}`,d,f,p,h]}function H1(e){return R.memo(({id:t,sourceX:n,sourceY:a,targetX:l,targetY:s,sourcePosition:i,targetPosition:r,label:o,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,interactionWidth:m})=>{const[_,g,v]=R1({sourceX:n,sourceY:a,sourcePosition:i,targetX:l,targetY:s,targetPosition:r}),w=e.isInternal?void 0:t;return c.jsx(_u,{id:w,path:_,labelX:g,labelY:v,label:o,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,interactionWidth:m})})}const qk=H1({isInternal:!1}),B1=H1({isInternal:!0});qk.displayName="SimpleBezierEdge";B1.displayName="SimpleBezierEdgeInternal";function L1(e){return R.memo(({id:t,sourceX:n,sourceY:a,targetX:l,targetY:s,label:i,labelStyle:r,labelShowBg:o,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:h=W.Bottom,targetPosition:y=W.Top,markerEnd:b,markerStart:x,pathOptions:m,interactionWidth:_})=>{const[g,v,w]=ep({sourceX:n,sourceY:a,sourcePosition:h,targetX:l,targetY:s,targetPosition:y,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),N=e.isInternal?void 0:t;return c.jsx(_u,{id:N,path:g,labelX:v,labelY:w,label:i,labelStyle:r,labelShowBg:o,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:b,markerStart:x,interactionWidth:_})})}const V1=L1({isInternal:!1}),U1=L1({isInternal:!0});V1.displayName="SmoothStepEdge";U1.displayName="SmoothStepEdgeInternal";function I1(e){return R.memo(({id:t,...n})=>{var l;const a=e.isInternal?void 0:t;return c.jsx(V1,{...n,id:a,pathOptions:R.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(l=n.pathOptions)==null?void 0:l.offset])})})}const Gk=I1({isInternal:!1}),q1=I1({isInternal:!0});Gk.displayName="StepEdge";q1.displayName="StepEdgeInternal";function G1(e){return R.memo(({id:t,sourceX:n,sourceY:a,targetX:l,targetY:s,label:i,labelStyle:r,labelShowBg:o,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:y,interactionWidth:b})=>{const[x,m,_]=e1({sourceX:n,sourceY:a,targetX:l,targetY:s}),g=e.isInternal?void 0:t;return c.jsx(_u,{id:g,path:x,labelX:m,labelY:_,label:i,labelStyle:r,labelShowBg:o,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:y,interactionWidth:b})})}const Yk=G1({isInternal:!1}),Y1=G1({isInternal:!0});Yk.displayName="StraightEdge";Y1.displayName="StraightEdgeInternal";function P1(e){return R.memo(({id:t,sourceX:n,sourceY:a,targetX:l,targetY:s,sourcePosition:i=W.Bottom,targetPosition:r=W.Top,label:o,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,pathOptions:m,interactionWidth:_})=>{const[g,v,w]=Jx({sourceX:n,sourceY:a,sourcePosition:i,targetX:l,targetY:s,targetPosition:r,curvature:m==null?void 0:m.curvature}),N=e.isInternal?void 0:t;return c.jsx(_u,{id:N,path:g,labelX:v,labelY:w,label:o,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,interactionWidth:_})})}const Pk=P1({isInternal:!1}),X1=P1({isInternal:!0});Pk.displayName="BezierEdge";X1.displayName="BezierEdgeInternal";const Jy={default:X1,straight:Y1,step:q1,smoothstep:U1,simplebezier:B1},Wy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Xk=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,Zk=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,e0="react-flow__edgeupdater";function t0({position:e,centerX:t,centerY:n,radius:a=10,onMouseDown:l,onMouseEnter:s,onMouseOut:i,type:r}){return c.jsx("circle",{onMouseDown:l,onMouseEnter:s,onMouseOut:i,className:Pe([e0,`${e0}-${r}`]),cx:Xk(t,a,e),cy:Zk(n,a,e),r:a,stroke:"transparent",fill:"transparent"})}function Qk({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:a,sourceY:l,targetX:s,targetY:i,sourcePosition:r,targetPosition:o,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:h}){const y=$e(),b=(v,w)=>{if(v.button!==0)return;const{autoPanOnConnect:N,domNode:S,connectionMode:A,connectionRadius:k,lib:H,onConnectStart:O,cancelConnection:V,nodeLookup:U,rfId:T,panBy:M,updateConnection:j}=y.getState(),z=w.type==="target",D=($,L)=>{p(!1),f==null||f($,n,w.type,L)},C=$=>u==null?void 0:u(n,$),E=($,L)=>{p(!0),d==null||d(v,n,w.type),O==null||O($,L)};ap.onPointerDown(v.nativeEvent,{autoPanOnConnect:N,connectionMode:A,connectionRadius:k,domNode:S,handleId:w.id,nodeId:w.nodeId,nodeLookup:U,isTarget:z,edgeUpdaterType:w.type,lib:H,flowId:T,cancelConnection:V,panBy:M,isValidConnection:(...$)=>{var L,P;return((P=(L=y.getState()).isValidConnection)==null?void 0:P.call(L,...$))??!0},onConnect:C,onConnectStart:E,onConnectEnd:(...$)=>{var L,P;return(P=(L=y.getState()).onConnectEnd)==null?void 0:P.call(L,...$)},onReconnectEnd:D,updateConnection:j,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>b(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),m=v=>b(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>h(!0),g=()=>h(!1);return c.jsxs(c.Fragment,{children:[(e===!0||e==="source")&&c.jsx(t0,{position:r,centerX:a,centerY:l,radius:t,onMouseDown:x,onMouseEnter:_,onMouseOut:g,type:"source"}),(e===!0||e==="target")&&c.jsx(t0,{position:o,centerX:s,centerY:i,radius:t,onMouseDown:m,onMouseEnter:_,onMouseOut:g,type:"target"})]})}function Kk({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:a,onClick:l,onDoubleClick:s,onContextMenu:i,onMouseEnter:r,onMouseMove:o,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,rfId:y,edgeTypes:b,noPanClassName:x,onError:m,disableKeyboardA11y:_}){let g=he(J=>J.edgeLookup.get(e));const v=he(J=>J.defaultEdgeOptions);g=v?{...v,...g}:g;let w=g.type||"default",N=(b==null?void 0:b[w])||Jy[w];N===void 0&&(m==null||m("011",cn.error011(w)),w="default",N=(b==null?void 0:b.default)||Jy.default);const S=!!(g.focusable||t&&typeof g.focusable>"u"),A=typeof f<"u"&&(g.reconnectable||n&&typeof g.reconnectable>"u"),k=!!(g.selectable||a&&typeof g.selectable>"u"),H=R.useRef(null),[O,V]=R.useState(!1),[U,T]=R.useState(!1),M=$e(),{zIndex:j=g.zIndex,sourceX:z,sourceY:D,targetX:C,targetY:E,sourcePosition:$,targetPosition:L}=he(R.useCallback(J=>{const ee=J.nodeLookup.get(g.source),se=J.nodeLookup.get(g.target);if(!ee||!se)return Wy;const oe=S4({id:e,sourceNode:ee,targetNode:se,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:J.connectionMode,onError:m}),pe=m4({selected:g.selected,zIndex:g.zIndex,sourceNode:ee,targetNode:se,elevateOnSelect:J.elevateEdgesOnSelect,zIndexMode:J.zIndexMode});return{...oe||Wy,zIndex:pe}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex,m]),Re),P=R.useMemo(()=>g.markerStart?`url('#${tp(g.markerStart,y)}')`:void 0,[g.markerStart,y]),G=R.useMemo(()=>g.markerEnd?`url('#${tp(g.markerEnd,y)}')`:void 0,[g.markerEnd,y]);if(g.hidden||z===null||D===null||C===null||E===null)return null;const K=J=>{var pe;const{addSelectedEdges:ee,unselectNodesAndEdges:se,multiSelectionActive:oe}=M.getState();k&&(M.setState({nodesSelectionActive:!1}),g.selected&&oe?(se({nodes:[],edges:[g]}),(pe=H.current)==null||pe.blur()):ee([e])),l&&l(J,g)},le=s?J=>{s(J,{...g})}:void 0,Y=i?J=>{i(J,{...g})}:void 0,I=r?J=>{r(J,{...g})}:void 0,X=o?J=>{o(J,{...g})}:void 0,te=u?J=>{u(J,{...g})}:void 0,F=J=>{var ee;if(!_&&Rx.includes(J.key)&&k){const{unselectNodesAndEdges:se,addSelectedEdges:oe}=M.getState();J.key==="Escape"?((ee=H.current)==null||ee.blur(),se({edges:[g]})):oe([e])}};return c.jsx("svg",{style:{zIndex:j},children:c.jsxs("g",{className:Pe(["react-flow__edge",`react-flow__edge-${w}`,g.className,x,{selected:g.selected,animated:g.animated,inactive:!k&&!l,updating:O,selectable:k}]),onClick:K,onDoubleClick:le,onContextMenu:Y,onMouseEnter:I,onMouseMove:X,onMouseLeave:te,onKeyDown:S?F:void 0,tabIndex:S?0:void 0,role:g.ariaRole??(S?"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":S?`${_1}-${y}`:void 0,ref:H,...g.domAttributes,children:[!U&&c.jsx(N,{id:e,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:k,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:z,sourceY:D,targetX:C,targetY:E,sourcePosition:$,targetPosition:L,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:P,markerEnd:G,pathOptions:"pathOptions"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),A&&c.jsx(Qk,{edge:g,isReconnectable:A,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,sourceX:z,sourceY:D,targetX:C,targetY:E,sourcePosition:$,targetPosition:L,setUpdateHover:V,setReconnecting:T})]})})}var Fk=R.memo(Kk);const Jk=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Z1({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:a,noPanClassName:l,onReconnect:s,onEdgeContextMenu:i,onEdgeMouseEnter:r,onEdgeMouseMove:o,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:b}){const{edgesFocusable:x,edgesReconnectable:m,elementsSelectable:_,onError:g}=he(Jk,Re),v=Rk(t);return c.jsxs("div",{className:"react-flow__edges",children:[c.jsx(Uk,{defaultColor:e,rfId:n}),v.map(w=>c.jsx(Fk,{id:w,edgesFocusable:x,edgesReconnectable:m,elementsSelectable:_,noPanClassName:l,onReconnect:s,onContextMenu:i,onMouseEnter:r,onMouseMove:o,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:g,edgeTypes:a,disableKeyboardA11y:b},w))]})}Z1.displayName="EdgeRenderer";const Wk=R.memo(Z1),n0=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function ej({children:e}){const t=$e(),n=R.useRef(null),[a]=R.useState(()=>t.getState().transform);return C1(()=>{let l=null;const s=()=>{const i=t.getState().transform;l&&i[0]===l[0]&&i[1]===l[1]&&i[2]===l[2]||(l=i,n.current&&(n.current.style.transform=n0(i)))};return s(),t.subscribe(s)},[t]),c.jsx("div",{ref:n,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n0(a)},children:e})}function tj(e){const t=Im(),n=R.useRef(!1);R.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const nj=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function aj(e){const t=he(nj),n=$e();return R.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function lj(e){return e.connection.inProgress?{...e.connection,to:jr(e.connection.to,e.transform)}:{...e.connection}}function sj(e){return lj}function ij(e){const t=sj();return he(t,Re)}const rj=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function oj({containerStyle:e,style:t,type:n,component:a}){const{nodesConnectable:l,width:s,height:i,isValid:r,inProgress:o}=he(rj,Re);return!(s&&l&&o)?null:c.jsx("svg",{style:e,width:s,height:i,className:"react-flow__connectionline react-flow__container",children:c.jsx("g",{className:Pe(["react-flow__connection",Xx(r)]),children:c.jsx(Q1,{style:t,type:n,CustomComponent:a,isValid:r})})})}const Q1=({style:e,type:t=xa.Bezier,CustomComponent:n,isValid:a})=>{const{inProgress:l,from:s,fromNode:i,fromHandle:r,fromPosition:o,to:u,toNode:d,toHandle:f,toPosition:p,pointer:h}=ij();if(!l)return;if(n)return c.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:r,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:o,toPosition:p,connectionStatus:Xx(a),toNode:d,toHandle:f,pointer:h});let y="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:o,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case xa.Bezier:[y]=Jx(b);break;case xa.SimpleBezier:[y]=R1(b);break;case xa.Step:[y]=ep({...b,borderRadius:0});break;case xa.SmoothStep:[y]=ep(b);break;default:[y]=e1(b)}return c.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Q1.displayName="ConnectionLine";const cj={};function a0(e=cj){R.useRef(e),$e(),R.useEffect(()=>{},[e])}function uj(){$e(),R.useRef(!1),R.useEffect(()=>{},[])}function K1({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:a,onEdgeClick:l,onNodeDoubleClick:s,onEdgeDoubleClick:i,onNodeMouseEnter:r,onNodeMouseMove:o,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:b,connectionLineComponent:x,connectionLineContainerStyle:m,selectionKeyCode:_,selectionOnDrag:g,selectionMode:v,multiSelectionKeyCode:w,panActivationKeyCode:N,zoomActivationKeyCode:S,deleteKeyCode:A,onlyRenderVisibleElements:k,elementsSelectable:H,defaultViewport:O,translateExtent:V,minZoom:U,maxZoom:T,preventScrolling:M,defaultMarkerColor:j,zoomOnScroll:z,zoomOnPinch:D,panOnScroll:C,panOnScrollSpeed:E,panOnScrollMode:$,zoomOnDoubleClick:L,panOnDrag:P,autoPanOnSelection:G,onPaneClick:K,onPaneMouseEnter:le,onPaneMouseMove:Y,onPaneMouseLeave:I,onPaneScroll:X,onPaneContextMenu:te,paneClickDistance:F,nodeClickDistance:J,onEdgeContextMenu:ee,onEdgeMouseEnter:se,onEdgeMouseMove:oe,onEdgeMouseLeave:pe,reconnectRadius:Ne,onReconnect:Ut,onReconnectStart:pn,onReconnectEnd:mn,noDragClassName:Rn,noWheelClassName:ti,noPanClassName:Ka,disableKeyboardA11y:Fa,nodeExtent:Jt,rfId:Hn,viewport:Bn,onViewportChange:Ja,nodesDraggable:Su}){return a0(e),a0(t),uj(),tj(n),aj(Bn),c.jsx(Ck,{onPaneClick:K,onPaneMouseEnter:le,onPaneMouseMove:Y,onPaneMouseLeave:I,onPaneContextMenu:te,onPaneScroll:X,paneClickDistance:F,deleteKeyCode:A,selectionKeyCode:_,selectionOnDrag:g,selectionMode:v,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:w,panActivationKeyCode:N,zoomActivationKeyCode:S,elementsSelectable:H,zoomOnScroll:z,zoomOnPinch:D,zoomOnDoubleClick:L,panOnScroll:C,panOnScrollSpeed:E,panOnScrollMode:$,panOnDrag:P,autoPanOnSelection:G,defaultViewport:O,translateExtent:V,minZoom:U,maxZoom:T,onSelectionContextMenu:f,preventScrolling:M,noDragClassName:Rn,noWheelClassName:ti,noPanClassName:Ka,disableKeyboardA11y:Fa,onViewportChange:Ja,isControlledViewport:!!Bn,children:c.jsxs(ej,{children:[c.jsx(Wk,{edgeTypes:t,onEdgeClick:l,onEdgeDoubleClick:i,onReconnect:Ut,onReconnectStart:pn,onReconnectEnd:mn,onlyRenderVisibleElements:k,onEdgeContextMenu:ee,onEdgeMouseEnter:se,onEdgeMouseMove:oe,onEdgeMouseLeave:pe,reconnectRadius:Ne,defaultMarkerColor:j,noPanClassName:Ka,disableKeyboardA11y:Fa,rfId:Hn}),c.jsx(oj,{style:b,type:y,component:x,containerStyle:m}),c.jsx("div",{className:"react-flow__edgelabel-renderer"}),c.jsx(zk,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:s,onNodeMouseEnter:r,onNodeMouseMove:o,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:J,onlyRenderVisibleElements:k,noPanClassName:Ka,noDragClassName:Rn,disableKeyboardA11y:Fa,nodeExtent:Jt,rfId:Hn,nodesDraggable:Su}),c.jsx("div",{className:"react-flow__viewport-portal"})]})})}K1.displayName="GraphView";const dj=R.memo(K1),fj=Gx(),l0=({nodes:e,edges:t,defaultNodes:n,defaultEdges:a,width:l,height:s,fitView:i,fitViewOptions:r,minZoom:o=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const h=new Map,y=new Map,b=new Map,x=new Map,m=a??t??[],_=n??e??[],g=d??[0,0],v=f??lr;a1(b,x,m);const{nodesInitialized:w}=np(_,h,y,{nodeOrigin:g,nodeExtent:v,zIndexMode:p});let N=[0,0,1];if(i&&l&&s){const S=Ar(h,{filter:O=>!!((O.width||O.initialWidth)&&(O.height||O.initialHeight))}),{x:A,y:k,zoom:H}=zm(S,l,s,o,u,(r==null?void 0:r.padding)??.1);N=[A,k,H]}return{rfId:"1",width:l??0,height:s??0,transform:N,nodes:_,nodesInitialized:w,nodeLookup:h,parentLookup:y,edges:m,edgeLookup:x,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:o,maxZoom:u,translateExtent:lr,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vs.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:g,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:r,fitViewResolver:null,connection:{...Bx},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fj,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Hx,zIndexMode:p,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},pj=({nodes:e,edges:t,defaultNodes:n,defaultEdges:a,width:l,height:s,fitView:i,fitViewOptions:r,minZoom:o,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>AA((h,y)=>{async function b(){const{nodeLookup:x,panZoom:m,fitViewOptions:_,fitViewResolver:g,width:v,height:w,minZoom:N,maxZoom:S}=y();m&&(await r4({nodes:x,width:v,height:w,panZoom:m,minZoom:N,maxZoom:S},_),g==null||g.resolve(!0),h({fitViewResolver:null}))}return{...l0({nodes:e,edges:t,width:l,height:s,fitView:i,fitViewOptions:r,minZoom:o,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:a,zIndexMode:p}),setNodes:x=>{const{nodeLookup:m,parentLookup:_,nodeOrigin:g,nodeExtent:v,elevateNodesOnSelect:w,fitViewQueued:N,zIndexMode:S,nodesSelectionActive:A}=y(),{nodesInitialized:k,hasSelectedNodes:H}=np(x,m,_,{nodeOrigin:g,nodeExtent:v,elevateNodesOnSelect:w,checkEquality:!0,zIndexMode:S}),O=A&&H;N&&k?(b(),h({nodes:x,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):h({nodes:x,nodesInitialized:k,nodesSelectionActive:O})},setEdges:x=>{const{connectionLookup:m,edgeLookup:_}=y();a1(m,_,x),h({edges:x})},setDefaultNodesAndEdges:(x,m)=>{if(x){const{setNodes:_}=y();_(x),h({hasDefaultNodes:!0})}if(m){const{setEdges:_}=y();_(m),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:m,nodeLookup:_,parentLookup:g,domNode:v,nodeOrigin:w,nodeExtent:N,debug:S,fitViewQueued:A,zIndexMode:k}=y(),{changes:H,updatedInternals:O}=M4(x,_,g,v,w,N,k);O&&(T4(_,g,{nodeOrigin:w,nodeExtent:N,zIndexMode:k}),A?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(H==null?void 0:H.length)>0&&(S&&console.log("React Flow: trigger node changes",H),m==null||m(H)))},updateNodePositions:(x,m=!1)=>{const _=[];let g=[];const{nodeLookup:v,triggerNodeChanges:w,connection:N,updateConnection:S,onNodesChangeMiddlewareMap:A}=y();for(const[k,H]of x){const O=v.get(k),V=!!(O!=null&&O.expandParent&&(O!=null&&O.parentId)&&(H!=null&&H.position)),U={id:k,type:"position",position:V?{x:Math.max(0,H.position.x),y:Math.max(0,H.position.y)}:H.position,dragging:m};if(O&&N.inProgress&&N.fromNode.id===O.id){const T=Ml(O,N.fromHandle,W.Left,!0);S({...N,from:T})}V&&O.parentId&&_.push({id:k,parentId:O.parentId,rect:{...H.internals.positionAbsolute,width:H.measured.width??0,height:H.measured.height??0}}),g.push(U)}if(_.length>0){const{parentLookup:k,nodeOrigin:H}=y(),O=Um(_,v,k,H);g.push(...O)}for(const k of A.values())g=k(g);w(g)},triggerNodeChanges:x=>{const{onNodesChange:m,setNodes:_,nodes:g,hasDefaultNodes:v,debug:w}=y();if(x!=null&&x.length){if(v){const N=w1(x,g);_(N)}w&&console.log("React Flow: trigger node changes",x),m==null||m(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:m,setEdges:_,edges:g,hasDefaultEdges:v,debug:w}=y();if(x!=null&&x.length){if(v){const N=S1(x,g);_(N)}w&&console.log("React Flow: trigger edge changes",x),m==null||m(x)}},addSelectedNodes:x=>{const{multiSelectionActive:m,edgeLookup:_,nodeLookup:g,triggerNodeChanges:v,triggerEdgeChanges:w}=y();if(m){const N=x.map(S=>sl(S,!0));v(N);return}v(rs(g,new Set([...x]))),w(rs(_))},addSelectedEdges:x=>{const{multiSelectionActive:m,edgeLookup:_,nodeLookup:g,triggerNodeChanges:v,triggerEdgeChanges:w}=y();if(m){const N=x.map(S=>sl(S,!0));w(N);return}w(rs(_,new Set([...x]))),v(rs(g,new Set))},unselectNodesAndEdges:({nodes:x,edges:m}={})=>{const{edges:_,nodes:g,nodeLookup:v,triggerNodeChanges:w,triggerEdgeChanges:N}=y(),S=x||g,A=m||_,k=[];for(const O of S)O.selected&&k.push(sl(O.id,!1));const H=[];for(const O of A)O.selected&&H.push(sl(O.id,!1));w(k),N(H)},setMinZoom:x=>{const{panZoom:m,maxZoom:_}=y();m==null||m.setScaleExtent([x,_]),h({minZoom:x})},setMaxZoom:x=>{const{panZoom:m,minZoom:_}=y();m==null||m.setScaleExtent([_,x]),h({maxZoom:x})},setTranslateExtent:x=>{var m;(m=y().panZoom)==null||m.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:m,triggerNodeChanges:_,triggerEdgeChanges:g,elementsSelectable:v}=y();if(!v)return;const w=m.reduce((S,A)=>A.selected?[...S,sl(A.id,!1)]:S,[]),N=x.reduce((S,A)=>A.selected?[...S,sl(A.id,!1)]:S,[]);_(w),g(N)},setNodeExtent:x=>{const{nodes:m,nodeLookup:_,parentLookup:g,nodeOrigin:v,elevateNodesOnSelect:w,nodeExtent:N,zIndexMode:S}=y();x[0][0]===N[0][0]&&x[0][1]===N[0][1]&&x[1][0]===N[1][0]&&x[1][1]===N[1][1]||(np(m,_,g,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:w,checkEquality:!1,zIndexMode:S}),h({nodeExtent:x}))},panBy:x=>{const{transform:m,width:_,height:g,panZoom:v,translateExtent:w}=y();return $4({delta:x,panZoom:v,transform:m,translateExtent:w,width:_,height:g})},setCenter:async(x,m,_)=>{const{width:g,height:v,maxZoom:w,panZoom:N}=y();if(!N)return!1;const S=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:w;return await N.setViewport({x:g/2-x*S,y:v/2-m*S,zoom:S},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),!0},cancelConnection:()=>{h({connection:{...Bx}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...l0()})}},Object.is);function mj({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:a,initialWidth:l,initialHeight:s,initialMinZoom:i,initialMaxZoom:r,initialFitViewOptions:o,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:h}){const[y]=R.useState(()=>pj({nodes:e,edges:t,defaultNodes:n,defaultEdges:a,width:l,height:s,fitView:u,minZoom:i,maxZoom:r,fitViewOptions:o,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return c.jsx(kA,{value:y,children:c.jsx(JA,{children:c.jsx(pk,{children:h})})})}function hj({children:e,nodes:t,edges:n,defaultNodes:a,defaultEdges:l,width:s,height:i,fitView:r,fitViewOptions:o,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h}){return R.useContext(gu)?c.jsx(c.Fragment,{children:e}):c.jsx(mj,{initialNodes:t,initialEdges:n,defaultNodes:a,defaultEdges:l,initialWidth:s,initialHeight:i,fitView:r,initialFitViewOptions:o,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h,children:e})}const gj={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function yj({nodes:e,edges:t,defaultNodes:n,defaultEdges:a,className:l,nodeTypes:s,edgeTypes:i,onNodeClick:r,onEdgeClick:o,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:y,onConnectEnd:b,onClickConnectStart:x,onClickConnectEnd:m,onNodeMouseEnter:_,onNodeMouseMove:g,onNodeMouseLeave:v,onNodeContextMenu:w,onNodeDoubleClick:N,onNodeDragStart:S,onNodeDrag:A,onNodeDragStop:k,onNodesDelete:H,onEdgesDelete:O,onDelete:V,onSelectionChange:U,onSelectionDragStart:T,onSelectionDrag:M,onSelectionDragStop:j,onSelectionContextMenu:z,onSelectionStart:D,onSelectionEnd:C,onBeforeDelete:E,connectionMode:$,connectionLineType:L=xa.Bezier,connectionLineStyle:P,connectionLineComponent:G,connectionLineContainerStyle:K,deleteKeyCode:le="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:I=!1,selectionMode:X=sr.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:F=rr()?"Meta":"Control",zoomActivationKeyCode:J=rr()?"Meta":"Control",snapToGrid:ee,snapGrid:se,onlyRenderVisibleElements:oe=!1,selectNodesOnDrag:pe,nodesDraggable:Ne,autoPanOnNodeFocus:Ut,nodesConnectable:pn,nodesFocusable:mn,nodeOrigin:Rn=b1,edgesFocusable:ti,edgesReconnectable:Ka,elementsSelectable:Fa=!0,defaultViewport:Jt=IA,minZoom:Hn=.5,maxZoom:Bn=2,translateExtent:Ja=lr,preventScrolling:Su=!0,nodeExtent:Nu,defaultMarkerColor:Mw="#b1b1b7",zoomOnScroll:$w=!0,zoomOnPinch:Ow=!0,panOnScroll:Dw=!1,panOnScrollSpeed:zw=.5,panOnScrollMode:Rw=yl.Free,zoomOnDoubleClick:Hw=!0,panOnDrag:Bw=!0,onPaneClick:Lw,onPaneMouseEnter:Vw,onPaneMouseMove:Uw,onPaneMouseLeave:Iw,onPaneScroll:qw,onPaneContextMenu:Gw,paneClickDistance:Yw=1,nodeClickDistance:Pw=0,children:Xw,onReconnect:Zw,onReconnectStart:Qw,onReconnectEnd:Kw,onEdgeContextMenu:Fw,onEdgeDoubleClick:Jw,onEdgeMouseEnter:Ww,onEdgeMouseMove:e2,onEdgeMouseLeave:t2,reconnectRadius:n2=10,onNodesChange:a2,onEdgesChange:l2,noDragClassName:s2="nodrag",noWheelClassName:i2="nowheel",noPanClassName:th="nopan",fitView:nh,fitViewOptions:ah,connectOnClick:r2,attributionPosition:o2,proOptions:c2,defaultEdgeOptions:u2,elevateNodesOnSelect:d2=!0,elevateEdgesOnSelect:f2=!1,disableKeyboardA11y:lh=!1,autoPanOnConnect:p2,autoPanOnNodeDrag:m2,autoPanOnSelection:h2=!0,autoPanSpeed:g2,connectionRadius:y2,isValidConnection:v2,onError:_2,style:b2,id:sh,nodeDragThreshold:x2,connectionDragThreshold:w2,viewport:S2,onViewportChange:N2,width:E2,height:C2,colorMode:T2="light",debug:A2,onScroll:Or,ariaLabelConfig:k2,zIndexMode:ih="basic",...j2},M2){const Eu=sh||"1",$2=PA(T2),O2=R.useCallback(rh=>{rh.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Or==null||Or(rh)},[Or]);return c.jsx("div",{"data-testid":"rf__wrapper",...j2,onScroll:O2,style:{...b2,...gj},ref:M2,className:Pe(["react-flow",l,$2]),id:sh,role:"application",children:c.jsxs(hj,{nodes:e,edges:t,width:E2,height:C2,fitView:nh,fitViewOptions:ah,minZoom:Hn,maxZoom:Bn,nodeOrigin:Rn,nodeExtent:Nu,zIndexMode:ih,children:[c.jsx(YA,{nodes:e,edges:t,defaultNodes:n,defaultEdges:a,onConnect:h,onConnectStart:y,onConnectEnd:b,onClickConnectStart:x,onClickConnectEnd:m,nodesDraggable:Ne,autoPanOnNodeFocus:Ut,nodesConnectable:pn,nodesFocusable:mn,edgesFocusable:ti,edgesReconnectable:Ka,elementsSelectable:Fa,elevateNodesOnSelect:d2,elevateEdgesOnSelect:f2,minZoom:Hn,maxZoom:Bn,nodeExtent:Nu,onNodesChange:a2,onEdgesChange:l2,snapToGrid:ee,snapGrid:se,connectionMode:$,translateExtent:Ja,connectOnClick:r2,defaultEdgeOptions:u2,fitView:nh,fitViewOptions:ah,onNodesDelete:H,onEdgesDelete:O,onDelete:V,onNodeDragStart:S,onNodeDrag:A,onNodeDragStop:k,onSelectionDrag:M,onSelectionDragStart:T,onSelectionDragStop:j,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:th,nodeOrigin:Rn,rfId:Eu,autoPanOnConnect:p2,autoPanOnNodeDrag:m2,autoPanSpeed:g2,onError:_2,connectionRadius:y2,isValidConnection:v2,selectNodesOnDrag:pe,nodeDragThreshold:x2,connectionDragThreshold:w2,onBeforeDelete:E,debug:A2,ariaLabelConfig:k2,zIndexMode:ih}),c.jsx(dj,{onInit:u,onNodeClick:r,onEdgeClick:o,onNodeMouseEnter:_,onNodeMouseMove:g,onNodeMouseLeave:v,onNodeContextMenu:w,onNodeDoubleClick:N,nodeTypes:s,edgeTypes:i,connectionLineType:L,connectionLineStyle:P,connectionLineComponent:G,connectionLineContainerStyle:K,selectionKeyCode:Y,selectionOnDrag:I,selectionMode:X,deleteKeyCode:le,multiSelectionKeyCode:F,panActivationKeyCode:te,zoomActivationKeyCode:J,onlyRenderVisibleElements:oe,defaultViewport:Jt,translateExtent:Ja,minZoom:Hn,maxZoom:Bn,preventScrolling:Su,zoomOnScroll:$w,zoomOnPinch:Ow,zoomOnDoubleClick:Hw,panOnScroll:Dw,panOnScrollSpeed:zw,panOnScrollMode:Rw,panOnDrag:Bw,autoPanOnSelection:h2,onPaneClick:Lw,onPaneMouseEnter:Vw,onPaneMouseMove:Uw,onPaneMouseLeave:Iw,onPaneScroll:qw,onPaneContextMenu:Gw,paneClickDistance:Yw,nodeClickDistance:Pw,onSelectionContextMenu:z,onSelectionStart:D,onSelectionEnd:C,onReconnect:Zw,onReconnectStart:Qw,onReconnectEnd:Kw,onEdgeContextMenu:Fw,onEdgeDoubleClick:Jw,onEdgeMouseEnter:Ww,onEdgeMouseMove:e2,onEdgeMouseLeave:t2,reconnectRadius:n2,defaultMarkerColor:Mw,noDragClassName:s2,noWheelClassName:i2,noPanClassName:th,rfId:Eu,disableKeyboardA11y:lh,nodeExtent:Nu,viewport:S2,onViewportChange:N2,nodesDraggable:Ne}),c.jsx(UA,{onSelectionChange:U}),Xw,c.jsx(RA,{proOptions:c2,position:o2}),c.jsx(zA,{rfId:Eu,disableKeyboardA11y:lh})]})})}var vj=E1(yj);function _j({dimensions:e,lineWidth:t,variant:n,className:a}){return c.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Pe(["react-flow__background-pattern",n,a])})}function bj({radius:e,className:t}){return c.jsx("circle",{cx:e,cy:e,r:e,className:Pe(["react-flow__background-pattern","dots",t])})}var Kn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Kn||(Kn={}));const xj={[Kn.Dots]:1,[Kn.Lines]:1,[Kn.Cross]:6},wj=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function F1({id:e,variant:t=Kn.Dots,gap:n=20,size:a,lineWidth:l=1,offset:s=0,color:i,bgColor:r,style:o,className:u,patternClassName:d}){const f=R.useRef(null),{transform:p,patternId:h}=he(wj,Re),y=a||xj[t],b=t===Kn.Dots,x=t===Kn.Cross,m=Array.isArray(n)?n:[n,n],_=[m[0]*p[2]||1,m[1]*p[2]||1],g=y*p[2],v=Array.isArray(s)?s:[s,s],w=x?[g,g]:_,N=[v[0]*p[2]+w[0]/2,v[1]*p[2]+w[1]/2],S=`${h}${e||""}`;return c.jsxs("svg",{className:Pe(["react-flow__background",u]),style:{...o,...vu,"--xy-background-color-props":r,"--xy-background-pattern-color-props":i},ref:f,"data-testid":"rf__background",children:[c.jsx("pattern",{id:S,x:p[0]%_[0],y:p[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:b?c.jsx(bj,{radius:g/2,className:d}):c.jsx(_j,{dimensions:w,lineWidth:l,variant:t,className:d})}),c.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${S})`})]})}F1.displayName="Background";const Sj=R.memo(F1);function Nj(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:c.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Ej(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:c.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Cj(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:c.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 Tj(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.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 Aj(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.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 ro({children:e,className:t,...n}){return c.jsx("button",{type:"button",className:Pe(["react-flow__controls-button",t]),...n,children:e})}const kj=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function J1({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:a=!0,fitViewOptions:l,onZoomIn:s,onZoomOut:i,onFitView:r,onInteractiveChange:o,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":h}){const y=$e(),{isInteractive:b,minZoomReached:x,maxZoomReached:m,ariaLabelConfig:_}=he(kj,Re),{zoomIn:g,zoomOut:v,fitView:w}=Im(),N=()=>{g(),s==null||s()},S=()=>{v(),i==null||i()},A=()=>{w(l),r==null||r()},k=()=>{y.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),o==null||o(!b)},H=p==="horizontal"?"horizontal":"vertical";return c.jsxs(yu,{className:Pe(["react-flow__controls",H,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??_["controls.ariaLabel"],children:[t&&c.jsxs(c.Fragment,{children:[c.jsx(ro,{onClick:N,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:m,children:c.jsx(Nj,{})}),c.jsx(ro,{onClick:S,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:x,children:c.jsx(Ej,{})})]}),n&&c.jsx(ro,{className:"react-flow__controls-fitview",onClick:A,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:c.jsx(Cj,{})}),a&&c.jsx(ro,{className:"react-flow__controls-interactive",onClick:k,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:b?c.jsx(Aj,{}):c.jsx(Tj,{})}),d]})}J1.displayName="Controls";const jj=R.memo(J1);function Mj({id:e,x:t,y:n,width:a,height:l,style:s,color:i,strokeColor:r,strokeWidth:o,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:h}){const{background:y,backgroundColor:b}=s||{},x=i||y||b;return c.jsx("rect",{className:Pe(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:d,ry:d,width:a,height:l,style:{fill:x,stroke:r,strokeWidth:o},shapeRendering:f,onClick:h?m=>h(m,e):void 0})}const $j=R.memo(Mj),Oj=e=>e.nodes.map(t=>t.id),bd=e=>e instanceof Function?e:()=>e;function Dj({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:s=$j,onClick:i}){const r=he(Oj,Re),o=bd(t),u=bd(e),d=bd(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return c.jsx(c.Fragment,{children:r.map(p=>c.jsx(Rj,{id:p,nodeColorFunc:o,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:a,nodeStrokeWidth:l,NodeComponent:s,onClick:i,shapeRendering:f},p))})}function zj({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:a,nodeBorderRadius:l,nodeStrokeWidth:s,shapeRendering:i,NodeComponent:r,onClick:o}){const{node:u,x:d,y:f,width:p,height:h}=he(y=>{const b=y.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const x=b.internals.userNode,{x:m,y:_}=b.internals.positionAbsolute,{width:g,height:v}=fn(x);return{node:x,x:m,y:_,width:g,height:v}},Re);return!u||u.hidden||!Yx(u)?null:c.jsx(r,{x:d,y:f,width:p,height:h,style:u.style,selected:!!u.selected,className:a(u),color:t(u),borderRadius:l,strokeColor:n(u),strokeWidth:s,shapeRendering:i,onClick:o,id:u.id})}const Rj=R.memo(zj);var Hj=R.memo(Dj);const Bj=200,Lj=150,Vj=e=>!e.hidden,Uj=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]};let n=!1;for(const a of e.nodeLookup.values())if(!a.hidden){n=!0;break}return{viewBB:t,boundingRect:n?Ix(Ar(e.nodeLookup,{filter:Vj}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},s0=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,Ij=(e,t)=>s0(e.viewBB,t.viewBB)&&s0(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,qj="react-flow__minimap-desc";function W1({style:e,className:t,nodeStrokeColor:n,nodeColor:a,nodeClassName:l="",nodeBorderRadius:s=5,nodeStrokeWidth:i,nodeComponent:r,bgColor:o,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:h,onNodeClick:y,pannable:b=!1,zoomable:x=!1,ariaLabel:m,inversePan:_,zoomStep:g=1,offsetScale:v=5}){const w=$e(),N=R.useRef(null),{boundingRect:S,panZoom:A,viewBB:k,rfId:H,translateExtent:O,flowWidth:V,flowHeight:U,ariaLabelConfig:T}=he(Uj,Ij),M=(e==null?void 0:e.width)??Bj,j=(e==null?void 0:e.height)??Lj,z=S.width/M,D=S.height/j,C=Math.max(z,D),E=C*M,$=C*j,L=v*C,P=S.x-(E-S.width)/2-L,G=S.y-($-S.height)/2-L,K=E+L*2,le=$+L*2,Y=`${qj}-${H}`,I=R.useRef(0),X=R.useRef();I.current=C,R.useEffect(()=>{const se=w.getState().panZoom;if(N.current&&se)return X.current=U4({domNode:N.current,panZoom:se,getTransform:()=>w.getState().transform,getViewScale:()=>I.current}),()=>{var oe;(oe=X.current)==null||oe.destroy()}},[A]),R.useEffect(()=>{var se;(se=X.current)==null||se.update({translateExtent:O,width:V,height:U,inversePan:_,pannable:b,zoomStep:g,zoomable:x})},[b,x,_,g,O,V,U]);const te=h?se=>{var Ne;const[oe,pe]=((Ne=X.current)==null?void 0:Ne.pointer(se))||[0,0];h(se,{x:oe,y:pe})}:void 0,F=R.useCallback((se,oe)=>{const pe=w.getState().nodeLookup.get(oe).internals.userNode;y==null||y(se,pe)},[y]),J=y?F:void 0,ee=m??T["minimap.ariaLabel"];return c.jsx(yu,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*C:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a: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:Pe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:c.jsxs("svg",{width:M,height:j,viewBox:`${P} ${G} ${K} ${le}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:N,onClick:te,children:[ee&&c.jsx("title",{id:Y,children:ee}),c.jsx(Hj,{onClick:J,nodeColor:a,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:l,nodeStrokeWidth:i,nodeComponent:r}),c.jsx("path",{className:"react-flow__minimap-mask",d:`M${P-L},${G-L}h${K+L*2}v${le+L*2}h${-K-L*2}z
|
|
71
|
+
M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}W1.displayName="MiniMap";const Gj=R.memo(W1),Yj=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Pj={[$l.Line]:"right",[$l.Handle]:"bottom-right"};function Xj({nodeId:e,position:t,variant:n=$l.Handle,className:a,style:l=void 0,children:s,color:i,minWidth:r=10,minHeight:o=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:h=!0,shouldResize:y,onResizeStart:b,onResize:x,onResizeEnd:m}){const _=j1(),g=typeof e=="string"?e:_,v=$e(),w=R.useRef(null),N=n===$l.Handle,S=he(R.useCallback(Yj(N&&h),[N,h]),Re),A=R.useRef(null),k=t??Pj[n];R.useEffect(()=>{if(!(!w.current||!g))return A.current||(A.current=nA({domNode:w.current,nodeId:g,getStoreItems:()=>{const{nodeLookup:O,transform:V,snapGrid:U,snapToGrid:T,nodeOrigin:M,domNode:j}=v.getState();return{nodeLookup:O,transform:V,snapGrid:U,snapToGrid:T,nodeOrigin:M,paneDomNode:j}},onChange:(O,V)=>{const{triggerNodeChanges:U,nodeLookup:T,parentLookup:M,nodeOrigin:j}=v.getState(),z=[],D={x:O.x,y:O.y},C=T.get(g);if(C&&C.expandParent&&C.parentId){const E=C.origin??j,$=O.width??C.measured.width??0,L=O.height??C.measured.height??0,P={id:C.id,parentId:C.parentId,rect:{width:$,height:L,...Px({x:O.x??C.position.x,y:O.y??C.position.y},{width:$,height:L},C.parentId,T,E)}},G=Um([P],T,M,j);z.push(...G),D.x=O.x?Math.max(E[0]*$,O.x):void 0,D.y=O.y?Math.max(E[1]*L,O.y):void 0}if(D.x!==void 0&&D.y!==void 0){const E={id:g,type:"position",position:{...D}};z.push(E)}if(O.width!==void 0&&O.height!==void 0){const $={id:g,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:O.width,height:O.height}};z.push($)}for(const E of V){const $={...E,type:"position"};z.push($)}U(z)},onEnd:({width:O,height:V})=>{const U={id:g,type:"dimensions",resizing:!1,dimensions:{width:O,height:V}};v.getState().triggerNodeChanges([U])}})),A.current.update({controlPosition:k,boundaries:{minWidth:r,minHeight:o,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:b,onResize:x,onResizeEnd:m,shouldResize:y}),()=>{var O;(O=A.current)==null||O.destroy()}},[k,r,o,u,d,f,b,x,m,y]);const H=k.split("-");return c.jsx("div",{className:Pe(["react-flow__resize-control","nodrag",...H,n,a]),ref:w,style:{...l,scale:S,...i&&{[N?"backgroundColor":"borderColor"]:i}},children:s})}const i0=R.memo(Xj);function Zj({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:a,lineClassName:l,lineStyle:s,color:i,minWidth:r=10,minHeight:o=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,autoScale:p=!0,shouldResize:h,onResizeStart:y,onResize:b,onResizeEnd:x}){return t?c.jsxs(c.Fragment,{children:[F4.map(m=>c.jsx(i0,{className:l,style:s,nodeId:e,position:m,variant:$l.Line,color:i,minWidth:r,minHeight:o,maxWidth:u,maxHeight:d,onResizeStart:y,keepAspectRatio:f,autoScale:p,shouldResize:h,onResize:b,onResizeEnd:x},m)),K4.map(m=>c.jsx(i0,{className:n,style:a,nodeId:e,position:m,color:i,minWidth:r,minHeight:o,maxWidth:u,maxHeight:d,onResizeStart:y,keepAspectRatio:f,autoScale:p,shouldResize:h,onResize:b,onResizeEnd:x},m))]}):null}const la={dev:{id:"dev",name:"Development",shortLabel:"DEV",color:"#6E94B0",badgeClass:"bg-sky-500/15 text-sky-400 border-sky-500/30",region:"us-east-1",accountId:"111122223333",emulatorPort:9297,emulatorEndpoint:"https://127.0.0.1:9297",emulatorTelemetry:!1,emulatorAuth:!0,instanceSizingMultiplier:1,enableHighAvailability:!1,defaultTags:{Environment:"dev",ManagedBy:"LocalCloudStudio",EmulatorPort:"9297"},usage:{requestsMillions:.2,dataTransferGb:5,storageGb:5,logsGb:2}},testing:{id:"testing",name:"Testing / QA",shortLabel:"TEST",color:"#9B8AC7",badgeClass:"bg-purple-500/15 text-purple-400 border-purple-500/30",region:"us-east-1",accountId:"222233334444",emulatorPort:9298,emulatorEndpoint:"https://127.0.0.1:9298",emulatorTelemetry:!1,emulatorAuth:!0,instanceSizingMultiplier:1,enableHighAvailability:!1,defaultTags:{Environment:"testing",ManagedBy:"LocalCloudStudio",EmulatorPort:"9298"},usage:{requestsMillions:.5,dataTransferGb:10,storageGb:10,logsGb:5}},staging:{id:"staging",name:"Staging",shortLabel:"STG",color:"#5FA59A",badgeClass:"bg-amber-500/15 text-amber-400 border-amber-500/30",region:"us-west-2",accountId:"333344445555",emulatorPort:9299,emulatorEndpoint:"https://127.0.0.1:9299",emulatorTelemetry:!1,emulatorAuth:!0,instanceSizingMultiplier:2,enableHighAvailability:!0,defaultTags:{Environment:"staging",ManagedBy:"LocalCloudStudio",EmulatorPort:"9299"},usage:{requestsMillions:2,dataTransferGb:50,storageGb:50,logsGb:20}},prod:{id:"prod",name:"Production",shortLabel:"PROD",color:"#D08A5C",badgeClass:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",region:"us-west-2",accountId:"999988887777",emulatorPort:9300,emulatorEndpoint:"https://127.0.0.1:9300",emulatorTelemetry:!1,emulatorAuth:!0,instanceSizingMultiplier:4,enableHighAvailability:!0,defaultTags:{Environment:"prod",ManagedBy:"LocalCloudStudio",Criticality:"High",EmulatorPort:"9300"},usage:{requestsMillions:25,dataTransferGb:800,storageGb:500,logsGb:150}}},Qj=["Networking & Content Delivery","Compute","Containers","Storage","Database","Application Integration","Security, Identity, & Compliance","Management & Governance","Analytics & Streaming","Developer Tools & AI"],sp=[{typeId:"aws_vpc",serviceCode:"ec2",name:"Virtual Private Cloud (VPC)",shortName:"VPC",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Network",description:"Isolated virtual network environment in AWS with custom CIDR routing and DNS resolution.",terraformResourceType:"aws_vpc",isContainer:!0,defaultWidth:560,defaultHeight:380,schema:[{key:"cidr_block",label:"IPv4 CIDR Block",type:"cidr",defaultValue:"10.0.0.0/16",group:"networking",envConfigurable:!0,description:"Primary IPv4 CIDR block for the VPC (e.g. 10.0.0.0/16 for dev, 10.100.0.0/16 for prod)"},{key:"instance_tenancy",label:"Instance Tenancy",type:"select",defaultValue:"default",group:"general",options:[{label:"Default (Shared)",value:"default"},{label:"Dedicated",value:"dedicated"}],envConfigurable:!0},{key:"enable_dns_support",label:"Enable DNS Resolution",type:"boolean",defaultValue:!0,group:"networking"},{key:"enable_dns_hostnames",label:"Enable DNS Hostnames",type:"boolean",defaultValue:!0,group:"networking"},{key:"assign_generated_ipv6_cidr_block",label:"Assign IPv6 CIDR Block",type:"boolean",defaultValue:!1,group:"networking"}],outputs:[{name:"vpc_id",tfExpression:e=>`aws_vpc.${e}.id`,description:"The ID of the VPC"},{name:"vpc_cidr",tfExpression:e=>`aws_vpc.${e}.cidr_block`,description:"The CIDR block of the VPC"}]},{typeId:"aws_subnet",serviceCode:"ec2",name:"VPC Subnet",shortName:"Subnet",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"GitFork",description:"Public or Private IP address range partition inside a VPC Availability Zone.",terraformResourceType:"aws_subnet",isContainer:!0,defaultWidth:320,defaultHeight:220,schema:[{key:"cidr_block",label:"Subnet CIDR Block",type:"cidr",defaultValue:"10.0.1.0/24",group:"networking",envConfigurable:!0},{key:"availability_zone",label:"Availability Zone",type:"select",defaultValue:"us-east-1a",group:"networking",envConfigurable:!0,options:[{label:"us-east-1a",value:"us-east-1a"},{label:"us-east-1b",value:"us-east-1b"},{label:"us-east-1c",value:"us-east-1c"},{label:"us-west-2a",value:"us-west-2a"},{label:"us-west-2b",value:"us-west-2b"},{label:"eu-west-1a",value:"eu-west-1a"}]},{key:"map_public_ip_on_launch",label:"Auto-assign Public IPv4",type:"boolean",defaultValue:!0,group:"networking",envConfigurable:!0},{key:"tier",label:"Subnet Tier",type:"select",defaultValue:"public",group:"general",options:[{label:"Public Subnet",value:"public"},{label:"Private App Subnet",value:"private"},{label:"Isolated Data Subnet",value:"isolated"}]}],outputs:[{name:"subnet_id",tfExpression:e=>`aws_subnet.${e}.id`,description:"The ID of the Subnet"}]},{typeId:"aws_internet_gateway",serviceCode:"ec2",name:"Internet Gateway (IGW)",shortName:"IGW",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Globe",description:"Horizontally scaled, redundant, and highly available VPC component allowing communication between VPC and the internet.",terraformResourceType:"aws_internet_gateway",schema:[{key:"auto_route_default",label:"Create 0.0.0.0/0 Route Automatically",type:"boolean",defaultValue:!0,group:"networking"}],outputs:[{name:"igw_id",tfExpression:e=>`aws_internet_gateway.${e}.id`,description:"The ID of the Internet Gateway"}]},{typeId:"aws_nat_gateway",serviceCode:"ec2",name:"NAT Gateway",shortName:"NAT GW",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"ArrowUpRight",description:"Network Address Translation (NAT) service so private subnet instances can connect outbound to the internet.",terraformResourceType:"aws_nat_gateway",schema:[{key:"connectivity_type",label:"Connectivity Type",type:"select",defaultValue:"public",group:"networking",options:[{label:"Public (Requires Elastic IP)",value:"public"},{label:"Private",value:"private"}]},{key:"allocate_eip",label:"Auto-Allocate Elastic IP",type:"boolean",defaultValue:!0,group:"networking"}],outputs:[{name:"nat_public_ip",tfExpression:e=>`aws_nat_gateway.${e}.public_ip`,description:"Public IP address of NAT Gateway"}]},{typeId:"aws_route_table",serviceCode:"ec2",name:"Route Table",shortName:"RouteTbl",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Compass",description:"Set of routing rules (routes) that determine where network traffic from your subnet or gateway is directed.",terraformResourceType:"aws_route_table",schema:[{key:"default_cidr_block",label:"Default Destination CIDR",type:"cidr",defaultValue:"0.0.0.0/0",group:"networking"},{key:"propagate_vgws",label:"Propagate Virtual Gateways",type:"boolean",defaultValue:!1,group:"advanced"}],outputs:[{name:"route_table_id",tfExpression:e=>`aws_route_table.${e}.id`,description:"ID of the routing table"}]},{typeId:"aws_security_group",serviceCode:"ec2",name:"Security Group",shortName:"SecGroup",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"ShieldAlert",description:"Virtual stateful firewall for instances, load balancers, and databases to control inbound and outbound traffic.",terraformResourceType:"aws_security_group",schema:[{key:"description",label:"Description",type:"string",defaultValue:"Managed by LocalCloud Studio",group:"general"},{key:"ingress_port",label:"Primary Ingress Port",type:"number",defaultValue:443,group:"security",envConfigurable:!0},{key:"ingress_protocol",label:"Ingress Protocol",type:"select",defaultValue:"tcp",group:"security",options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"},{label:"All (-1)",value:"-1"}]},{key:"ingress_cidr",label:"Allowed Ingress CIDR",type:"cidr",defaultValue:"0.0.0.0/0",group:"security",envConfigurable:!0},{key:"allow_all_egress",label:"Allow All Outbound Traffic",type:"boolean",defaultValue:!0,group:"security"}],outputs:[{name:"security_group_id",tfExpression:e=>`aws_security_group.${e}.id`,description:"ID of the Security Group"}]},{typeId:"aws_lb",serviceCode:"elbv2",name:"Application / Network Load Balancer",shortName:"ALB/NLB",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Scale",description:"Distributes incoming application or network traffic across multiple targets, such as EC2, ECS, and Lambda.",terraformResourceType:"aws_lb",schema:[{key:"load_balancer_type",label:"Load Balancer Type",type:"select",defaultValue:"application",group:"general",options:[{label:"Application (Layer 7 HTTP/HTTPS)",value:"application"},{label:"Network (Layer 4 TCP/UDP/TLS)",value:"network"}]},{key:"internal",label:"Internal (Private) Load Balancer",type:"boolean",defaultValue:!1,group:"networking",envConfigurable:!0},{key:"enable_deletion_protection",label:"Enable Deletion Protection",type:"boolean",defaultValue:!1,group:"security",envConfigurable:!0},{key:"idle_timeout",label:"Idle Timeout (seconds)",type:"number",defaultValue:60,group:"advanced"},{key:"listener_port",label:"Default Listener Port",type:"number",defaultValue:80,group:"networking"},{key:"health_check_path",label:"Target Group Health Check Path",type:"string",defaultValue:"/health",group:"networking"}],outputs:[{name:"alb_dns_name",tfExpression:e=>`aws_lb.${e}.dns_name`,description:"DNS name of the load balancer"},{name:"alb_arn",tfExpression:e=>`aws_lb.${e}.arn`,description:"ARN of the load balancer"}]},{typeId:"aws_apigatewayv2_api",serviceCode:"apigateway",name:"API Gateway (HTTP / REST / WebSocket)",shortName:"API GW",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Webhook",description:"Fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs.",terraformResourceType:"aws_apigatewayv2_api",schema:[{key:"protocol_type",label:"Protocol Type",type:"select",defaultValue:"HTTP",group:"general",options:[{label:"HTTP API (v2)",value:"HTTP"},{label:"WebSocket API (v2)",value:"WEBSOCKET"}]},{key:"stage_name",label:"Default Stage Name",type:"string",defaultValue:"$default",group:"general",envConfigurable:!0},{key:"auto_deploy",label:"Auto Deploy Stage Changes",type:"boolean",defaultValue:!0,group:"general",envConfigurable:!0},{key:"cors_allow_origins",label:"CORS Allow Origins",type:"string",defaultValue:"*",group:"security",envConfigurable:!0},{key:"throttling_burst_limit",label:"Throttling Burst Limit",type:"number",defaultValue:5e3,group:"scaling",envConfigurable:!0},{key:"throttling_rate_limit",label:"Throttling Rate Limit (req/s)",type:"number",defaultValue:1e4,group:"scaling",envConfigurable:!0}],outputs:[{name:"api_endpoint",tfExpression:e=>`aws_apigatewayv2_api.${e}.api_endpoint`,description:"URI of the API Gateway"}]},{typeId:"aws_cloudfront_distribution",serviceCode:"cloudfront",name:"CloudFront CDN Distribution",shortName:"CloudFront",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Radio",description:"Global content delivery network (CDN) service built for high-speed, low-latency content delivery and edge security.",terraformResourceType:"aws_cloudfront_distribution",schema:[{key:"enabled",label:"Distribution Enabled",type:"boolean",defaultValue:!0,group:"general"},{key:"default_root_object",label:"Default Root Object",type:"string",defaultValue:"index.html",group:"general"},{key:"price_class",label:"Edge Price Class",type:"select",defaultValue:"PriceClass_100",group:"scaling",envConfigurable:!0,options:[{label:"PriceClass_100 (NA & Europe)",value:"PriceClass_100"},{label:"PriceClass_200 (NA, EU, Asia, ME, Africa)",value:"PriceClass_200"},{label:"PriceClass_All (All Global Edge Locations)",value:"PriceClass_All"}]},{key:"viewer_protocol_policy",label:"Viewer Protocol Policy",type:"select",defaultValue:"redirect-to-https",group:"security",options:[{label:"Redirect HTTP to HTTPS",value:"redirect-to-https"},{label:"HTTPS Only",value:"https-only"},{label:"Allow All",value:"allow-all"}]},{key:"is_ipv6_enabled",label:"Enable IPv6",type:"boolean",defaultValue:!0,group:"networking"}],outputs:[{name:"cdn_domain_name",tfExpression:e=>`aws_cloudfront_distribution.${e}.domain_name`,description:"Domain name corresponding to the distribution"}]},{typeId:"aws_route53_zone",serviceCode:"route53",name:"Route 53 Hosted Zone & Records",shortName:"Route 53",category:"Networking & Content Delivery",color:"#8E8CD8",iconName:"Signpost",description:"Highly available and scalable cloud Domain Name System (DNS) web service and traffic router.",terraformResourceType:"aws_route53_zone",schema:[{key:"domain_name",label:"Hosted Zone Domain Name",type:"string",defaultValue:"internal.localcloud.dev",group:"general",envConfigurable:!0},{key:"private_zone",label:"Private Hosted Zone (VPC-only)",type:"boolean",defaultValue:!1,group:"networking",envConfigurable:!0},{key:"record_type",label:"Default Record Type",type:"select",defaultValue:"A",group:"networking",options:[{label:"A (IPv4 / Alias)",value:"A"},{label:"CNAME",value:"CNAME"},{label:"TXT",value:"TXT"}]},{key:"ttl",label:"Record TTL (seconds)",type:"number",defaultValue:300,group:"networking"}],outputs:[{name:"zone_id",tfExpression:e=>`aws_route53_zone.${e}.zone_id`,description:"Hosted Zone ID"}]},{typeId:"aws_instance",serviceCode:"ec2",name:"EC2 Virtual Server Instance",shortName:"EC2",category:"Compute",color:"#D4945A",iconName:"Cpu",description:"Secure and resizable compute capacity in the cloud supporting custom AMIs, EBS volumes, and user-data.",terraformResourceType:"aws_instance",schema:[{key:"ami",label:"AMI ID",type:"string",defaultValue:"ami-0c55b159cbfafe1f0",group:"general",envConfigurable:!0},{key:"instance_type",label:"Instance Type",type:"select",defaultValue:"t3.micro",group:"scaling",envConfigurable:!0,options:[{label:"t3.nano (2 vCPU, 0.5 GiB)",value:"t3.nano"},{label:"t3.micro (2 vCPU, 1 GiB)",value:"t3.micro"},{label:"t3.small (2 vCPU, 2 GiB)",value:"t3.small"},{label:"t3.medium (2 vCPU, 4 GiB)",value:"t3.medium"},{label:"t3.large (2 vCPU, 8 GiB)",value:"t3.large"},{label:"m6i.large (2 vCPU, 8 GiB)",value:"m6i.large"},{label:"m6i.xlarge (4 vCPU, 16 GiB)",value:"m6i.xlarge"},{label:"c6i.2xlarge (8 vCPU, 16 GiB)",value:"c6i.2xlarge"}]},{key:"root_volume_size",label:"Root EBS Volume Size (GiB)",type:"number",defaultValue:20,group:"scaling",envConfigurable:!0},{key:"root_volume_type",label:"Root EBS Volume Type",type:"select",defaultValue:"gp3",group:"scaling",options:[{label:"gp3 (General Purpose SSD)",value:"gp3"},{label:"gp2",value:"gp2"},{label:"io2 (Provisioned IOPS)",value:"io2"}]},{key:"monitoring",label:"Detailed CloudWatch Monitoring",type:"boolean",defaultValue:!1,group:"advanced",envConfigurable:!0},{key:"associate_public_ip_address",label:"Associate Public IP",type:"boolean",defaultValue:!1,group:"networking",envConfigurable:!0},{key:"ebs_encrypted",label:"Encrypt Root EBS Volume",type:"boolean",defaultValue:!0,group:"security"},{key:"user_data",label:"User Data Startup Script",type:"string",defaultValue:`#!/bin/bash
|
|
72
|
+
echo "Bootstrapped by LocalCloud Studio"`,group:"advanced"}],outputs:[{name:"instance_id",tfExpression:e=>`aws_instance.${e}.id`,description:"EC2 Instance ID"},{name:"private_ip",tfExpression:e=>`aws_instance.${e}.private_ip`,description:"Private IPv4 address"}]},{typeId:"aws_lambda_function",serviceCode:"lambda",name:"Lambda Serverless Function",shortName:"Lambda",category:"Compute",color:"#D4945A",iconName:"Zap",description:"Run code without provisioning or managing servers. Automatically scales and integrates with AWS Emulator.",terraformResourceType:"aws_lambda_function",schema:[{key:"runtime",label:"Runtime Environment",type:"select",defaultValue:"nodejs20.x",group:"general",options:[{label:"Node.js 20.x",value:"nodejs20.x"},{label:"Python 3.12",value:"python3.12"},{label:"Rust (provided.al2023)",value:"provided.al2023"},{label:"Go (provided.al2023)",value:"provided.al2023"},{label:"Java 21",value:"java21"}]},{key:"handler",label:"Function Handler",type:"string",defaultValue:"index.handler",group:"general"},{key:"memory_size",label:"Memory Allocation (MB)",type:"number",defaultValue:256,group:"scaling",envConfigurable:!0},{key:"timeout",label:"Execution Timeout (seconds)",type:"number",defaultValue:30,group:"scaling",envConfigurable:!0},{key:"architectures",label:"CPU Architecture",type:"select",defaultValue:"arm64",group:"general",options:[{label:"arm64 (Graviton2)",value:"arm64"},{label:"x86_64",value:"x86_64"}]},{key:"reserved_concurrent_executions",label:"Reserved Concurrency (-1 = unreserved)",type:"number",defaultValue:-1,group:"scaling",envConfigurable:!0},{key:"tracing_mode",label:"X-Ray Tracing Mode",type:"select",defaultValue:"PassThrough",group:"advanced",envConfigurable:!0,options:[{label:"Active",value:"Active"},{label:"PassThrough",value:"PassThrough"}]},{key:"env_vars",label:"Environment Variables (JSON)",type:"json",defaultValue:'{"LOG_LEVEL":"info","STAGE":"local"}',group:"general",envConfigurable:!0},{key:"claude_model_id",label:"Claude model (Bedrock)",type:"string",defaultValue:"",group:"advanced",envConfigurable:!0,placeholder:"anthropic.claude-opus-5-5",description:"Grants bedrock-mantle:CreateInference and sets CLAUDE_MODEL_ID. Call it with the Anthropic SDK (AnthropicBedrockMantle); empty for none."}],outputs:[{name:"lambda_arn",tfExpression:e=>`aws_lambda_function.${e}.arn`,description:"ARN of the Lambda function"},{name:"invoke_arn",tfExpression:e=>`aws_lambda_function.${e}.invoke_arn`,description:"Invoke ARN for API Gateway"}]},{typeId:"aws_autoscaling_group",serviceCode:"autoscaling",name:"EC2 Auto Scaling Group (ASG)",shortName:"ASG",category:"Compute",color:"#D4945A",iconName:"Layers",description:"Automatically adjusts EC2 compute capacity to maintain steady, predictable performance at the lowest possible cost.",terraformResourceType:"aws_autoscaling_group",schema:[{key:"min_size",label:"Minimum Instances",type:"number",defaultValue:1,group:"scaling",envConfigurable:!0},{key:"max_size",label:"Maximum Instances",type:"number",defaultValue:4,group:"scaling",envConfigurable:!0},{key:"desired_capacity",label:"Desired Capacity",type:"number",defaultValue:2,group:"scaling",envConfigurable:!0},{key:"instance_type",label:"Launch Template Instance Type",type:"select",defaultValue:"t3.medium",group:"scaling",envConfigurable:!0,options:[{label:"t3.micro",value:"t3.micro"},{label:"t3.medium",value:"t3.medium"},{label:"m6i.large",value:"m6i.large"},{label:"c6i.xlarge",value:"c6i.xlarge"}]},{key:"health_check_type",label:"Health Check Type",type:"select",defaultValue:"ELB",group:"general",options:[{label:"ELB (Load Balancer)",value:"ELB"},{label:"EC2",value:"EC2"}]},{key:"health_check_grace_period",label:"Health Check Grace Period (s)",type:"number",defaultValue:300,group:"advanced"}],outputs:[{name:"asg_arn",tfExpression:e=>`aws_autoscaling_group.${e}.arn`,description:"ARN of the Auto Scaling Group"}]},{typeId:"aws_ecs_service",serviceCode:"ecs",name:"ECS Fargate Cluster & Service",shortName:"ECS Fargate",category:"Containers",color:"#D4945A",iconName:"Boxes",description:"Fully managed container orchestration service running serverless Fargate tasks with task definitions.",terraformResourceType:"aws_ecs_service",schema:[{key:"container_image",label:"Container Image URI",type:"string",defaultValue:"public.ecr.aws/nginx/nginx:stable-alpine",group:"general",envConfigurable:!0},{key:"container_port",label:"Container Port",type:"number",defaultValue:80,group:"networking"},{key:"cpu",label:"Task CPU Units",type:"select",defaultValue:"256",group:"scaling",envConfigurable:!0,options:[{label:"256 (.25 vCPU)",value:"256"},{label:"512 (.5 vCPU)",value:"512"},{label:"1024 (1 vCPU)",value:"1024"},{label:"2048 (2 vCPU)",value:"2048"},{label:"4096 (4 vCPU)",value:"4096"}]},{key:"memory",label:"Task Memory (MiB)",type:"select",defaultValue:"512",group:"scaling",envConfigurable:!0,options:[{label:"512 MiB",value:"512"},{label:"1024 MiB (1 GiB)",value:"1024"},{label:"2048 MiB (2 GiB)",value:"2048"},{label:"4096 MiB (4 GiB)",value:"4096"},{label:"8192 MiB (8 GiB)",value:"8192"}]},{key:"desired_count",label:"Desired Running Tasks",type:"number",defaultValue:2,group:"scaling",envConfigurable:!0},{key:"assign_public_ip",label:"Assign Public IP to ENI",type:"boolean",defaultValue:!1,group:"networking",envConfigurable:!0},{key:"enable_execute_command",label:"Enable ECS Exec (Debugging)",type:"boolean",defaultValue:!0,group:"security",envConfigurable:!0}],outputs:[{name:"ecs_cluster_arn",tfExpression:e=>`aws_ecs_cluster.${e}_cluster.arn`,description:"ECS Cluster ARN"},{name:"ecs_service_name",tfExpression:e=>`aws_ecs_service.${e}.name`,description:"ECS Service Name"}]},{typeId:"aws_eks_cluster",serviceCode:"eks",name:"Elastic Kubernetes Service (EKS)",shortName:"EKS",category:"Containers",color:"#D4945A",iconName:"Ship",description:"Managed Kubernetes control plane and worker node group for cloud-native containerized workloads.",terraformResourceType:"aws_eks_cluster",schema:[{key:"kubernetes_version",label:"Kubernetes Version",type:"select",defaultValue:"1.31",group:"general",options:[{label:"1.31",value:"1.31"},{label:"1.30",value:"1.30"},{label:"1.29",value:"1.29"}]},{key:"endpoint_public_access",label:"Public Control Plane Endpoint",type:"boolean",defaultValue:!0,group:"networking",envConfigurable:!0},{key:"endpoint_private_access",label:"Private Control Plane Endpoint",type:"boolean",defaultValue:!0,group:"networking"},{key:"node_instance_type",label:"Managed Node Group Instance",type:"select",defaultValue:"m6i.large",group:"scaling",envConfigurable:!0,options:[{label:"t3.medium",value:"t3.medium"},{label:"m6i.large",value:"m6i.large"},{label:"m6i.xlarge",value:"m6i.xlarge"}]},{key:"node_desired_size",label:"Node Group Desired Nodes",type:"number",defaultValue:2,group:"scaling",envConfigurable:!0}],outputs:[{name:"eks_endpoint",tfExpression:e=>`aws_eks_cluster.${e}.endpoint`,description:"EKS API Server Endpoint"}]},{typeId:"aws_ecr_repository",serviceCode:"ecr",name:"Elastic Container Registry (ECR)",shortName:"ECR",category:"Containers",color:"#D4945A",iconName:"Package",description:"Fully managed Docker & OCI container registry with image scanning and lifecycle policies.",terraformResourceType:"aws_ecr_repository",schema:[{key:"image_tag_mutability",label:"Image Tag Mutability",type:"select",defaultValue:"MUTABLE",group:"security",envConfigurable:!0,options:[{label:"MUTABLE",value:"MUTABLE"},{label:"IMMUTABLE",value:"IMMUTABLE"}]},{key:"scan_on_push",label:"Vulnerability Scan on Push",type:"boolean",defaultValue:!0,group:"security",envConfigurable:!0},{key:"force_delete",label:"Force Delete Even With Images",type:"boolean",defaultValue:!0,group:"general",envConfigurable:!0}],outputs:[{name:"repository_url",tfExpression:e=>`aws_ecr_repository.${e}.repository_url`,description:"URL of the ECR repository"}]},{typeId:"aws_s3_bucket",serviceCode:"s3",name:"Simple Storage Service (S3 Bucket)",shortName:"S3",category:"Storage",color:"#7FAE7A",iconName:"HardDrive",description:"Object storage built to store and retrieve any amount of data with versioning, encryption, and public access blocks.",terraformResourceType:"aws_s3_bucket",schema:[{key:"bucket_prefix",label:"Bucket Base Name",type:"string",defaultValue:"app-assets-storage",group:"general",envConfigurable:!0},{key:"versioning_enabled",label:"Enable Object Versioning",type:"boolean",defaultValue:!0,group:"general",envConfigurable:!0},{key:"sse_algorithm",label:"Server-Side Encryption",type:"select",defaultValue:"AES256",group:"security",options:[{label:"SSE-S3 (AES256)",value:"AES256"},{label:"SSE-KMS (aws:kms)",value:"aws:kms"}]},{key:"block_public_acls",label:"Block All Public Access",type:"boolean",defaultValue:!0,group:"security",envConfigurable:!0},{key:"force_destroy",label:"Force Destroy Non-Empty Bucket",type:"boolean",defaultValue:!0,group:"advanced",envConfigurable:!0},{key:"lifecycle_expiration_days",label:"Lifecycle Expiration Days (0 = disabled)",type:"number",defaultValue:0,group:"advanced",envConfigurable:!0}],outputs:[{name:"bucket_id",tfExpression:e=>`aws_s3_bucket.${e}.id`,description:"Name of the S3 bucket"},{name:"bucket_arn",tfExpression:e=>`aws_s3_bucket.${e}.arn`,description:"ARN of the S3 bucket"}]},{typeId:"aws_efs_file_system",serviceCode:"efs",name:"Elastic File System (EFS)",shortName:"EFS",category:"Storage",color:"#7FAE7A",iconName:"FolderSync",description:"Serverless, fully elastic shared NFS file storage for EC2, ECS, EKS, and Lambda.",terraformResourceType:"aws_efs_file_system",schema:[{key:"performance_mode",label:"Performance Mode",type:"select",defaultValue:"generalPurpose",group:"scaling",options:[{label:"General Purpose",value:"generalPurpose"},{label:"Max I/O",value:"maxIO"}]},{key:"throughput_mode",label:"Throughput Mode",type:"select",defaultValue:"bursting",group:"scaling",envConfigurable:!0,options:[{label:"Bursting",value:"bursting"},{label:"Elastic",value:"elastic"},{label:"Provisioned",value:"provisioned"}]},{key:"encrypted",label:"Encrypt Data at Rest",type:"boolean",defaultValue:!0,group:"security"}],outputs:[{name:"efs_id",tfExpression:e=>`aws_efs_file_system.${e}.id`,description:"EFS File System ID"},{name:"efs_dns_name",tfExpression:e=>`aws_efs_file_system.${e}.dns_name`,description:"EFS Mount DNS Name"}]},{typeId:"aws_dynamodb_table",serviceCode:"dynamodb",name:"DynamoDB NoSQL Table",shortName:"DynamoDB",category:"Database",color:"#6F9DD4",iconName:"Table",description:"Fast, flexible NoSQL database service for single-digit millisecond performance at any scale.",terraformResourceType:"aws_dynamodb_table",schema:[{key:"billing_mode",label:"Capacity Billing Mode",type:"select",defaultValue:"PAY_PER_REQUEST",group:"scaling",envConfigurable:!0,options:[{label:"On-Demand (PAY_PER_REQUEST)",value:"PAY_PER_REQUEST"},{label:"Provisioned (RCU / WCU)",value:"PROVISIONED"}]},{key:"hash_key",label:"Partition Key (Hash Key)",type:"string",defaultValue:"pk",group:"general"},{key:"hash_key_type",label:"Partition Key Type",type:"select",defaultValue:"S",group:"general",options:[{label:"String (S)",value:"S"},{label:"Number (N)",value:"N"},{label:"Binary (B)",value:"B"}]},{key:"range_key",label:"Sort Key (Range Key - optional)",type:"string",defaultValue:"sk",group:"general"},{key:"range_key_type",label:"Sort Key Type",type:"select",defaultValue:"S",group:"general",options:[{label:"String (S)",value:"S"},{label:"Number (N)",value:"N"}]},{key:"read_capacity",label:"Provisioned Read Capacity (RCU)",type:"number",defaultValue:5,group:"scaling",envConfigurable:!0},{key:"write_capacity",label:"Provisioned Write Capacity (WCU)",type:"number",defaultValue:5,group:"scaling",envConfigurable:!0},{key:"stream_enabled",label:"Enable DynamoDB Streams",type:"boolean",defaultValue:!0,group:"advanced",envConfigurable:!0},{key:"stream_view_type",label:"Stream View Type",type:"select",defaultValue:"NEW_AND_OLD_IMAGES",group:"advanced",options:[{label:"NEW_AND_OLD_IMAGES",value:"NEW_AND_OLD_IMAGES"},{label:"NEW_IMAGE",value:"NEW_IMAGE"},{label:"KEYS_ONLY",value:"KEYS_ONLY"}]},{key:"point_in_time_recovery",label:"Point-in-Time Recovery (PITR)",type:"boolean",defaultValue:!1,group:"security",envConfigurable:!0},{key:"ttl_attribute",label:"TTL Attribute Name",type:"string",defaultValue:"expiresAt",group:"advanced"}],outputs:[{name:"table_name",tfExpression:e=>`aws_dynamodb_table.${e}.name`,description:"DynamoDB Table Name"},{name:"table_arn",tfExpression:e=>`aws_dynamodb_table.${e}.arn`,description:"DynamoDB Table ARN"}]},{typeId:"aws_db_instance",serviceCode:"rds",name:"RDS Relational Database (Postgres / MySQL)",shortName:"RDS",category:"Database",color:"#6F9DD4",iconName:"Database",description:"Managed relational database supporting PostgreSQL, MySQL, MariaDB with Multi-AZ high availability and automated backups.",terraformResourceType:"aws_db_instance",schema:[{key:"engine",label:"Database Engine",type:"select",defaultValue:"postgres",group:"general",options:[{label:"PostgreSQL",value:"postgres"},{label:"MySQL",value:"mysql"},{label:"MariaDB",value:"mariadb"}]},{key:"engine_version",label:"Engine Version",type:"string",defaultValue:"16.3",group:"general"},{key:"instance_class",label:"DB Instance Class",type:"select",defaultValue:"db.t4g.micro",group:"scaling",envConfigurable:!0,options:[{label:"db.t4g.micro (2 vCPU, 1 GiB)",value:"db.t4g.micro"},{label:"db.t4g.small (2 vCPU, 2 GiB)",value:"db.t4g.small"},{label:"db.t4g.medium (2 vCPU, 4 GiB)",value:"db.t4g.medium"},{label:"db.r6g.large (2 vCPU, 16 GiB)",value:"db.r6g.large"},{label:"db.r6g.xlarge (4 vCPU, 32 GiB)",value:"db.r6g.xlarge"}]},{key:"allocated_storage",label:"Allocated Storage (GiB)",type:"number",defaultValue:20,group:"scaling",envConfigurable:!0},{key:"max_allocated_storage",label:"Max Autoscaled Storage (GiB)",type:"number",defaultValue:100,group:"scaling",envConfigurable:!0},{key:"db_name",label:"Initial Database Name",type:"string",defaultValue:"appdb",group:"general",envConfigurable:!0},{key:"username",label:"Master Username",type:"string",defaultValue:"dbadmin",group:"security"},{key:"multi_az",label:"Multi-AZ Standby Deployment",type:"boolean",defaultValue:!1,group:"scaling",envConfigurable:!0},{key:"storage_encrypted",label:"Storage Encryption at Rest",type:"boolean",defaultValue:!0,group:"security"},{key:"backup_retention_period",label:"Backup Retention (Days)",type:"number",defaultValue:7,group:"security",envConfigurable:!0},{key:"skip_final_snapshot",label:"Skip Final Snapshot on Destroy",type:"boolean",defaultValue:!0,group:"advanced",envConfigurable:!0}],outputs:[{name:"rds_endpoint",tfExpression:e=>`aws_db_instance.${e}.endpoint`,description:"RDS connection endpoint"}]},{typeId:"aws_elasticache_cluster",serviceCode:"elasticache",name:"ElastiCache (Redis / Valkey / Memcached)",shortName:"ElastiCache",category:"Database",color:"#6F9DD4",iconName:"Gauge",description:"Fully managed in-memory data store and cache for sub-millisecond latency response times.",terraformResourceType:"aws_elasticache_cluster",schema:[{key:"engine",label:"Cache Engine",type:"select",defaultValue:"redis",group:"general",options:[{label:"Redis / Valkey",value:"redis"},{label:"Memcached",value:"memcached"}]},{key:"node_type",label:"Cache Node Type",type:"select",defaultValue:"cache.t4g.micro",group:"scaling",envConfigurable:!0,options:[{label:"cache.t4g.micro (0.5 GiB)",value:"cache.t4g.micro"},{label:"cache.t4g.small (1.37 GiB)",value:"cache.t4g.small"},{label:"cache.t4g.medium (3.09 GiB)",value:"cache.t4g.medium"},{label:"cache.r6g.large (13.07 GiB)",value:"cache.r6g.large"}]},{key:"num_cache_nodes",label:"Number of Cache Nodes",type:"number",defaultValue:1,group:"scaling",envConfigurable:!0},{key:"port",label:"Port",type:"number",defaultValue:6379,group:"networking"}],outputs:[{name:"cache_nodes",tfExpression:e=>`aws_elasticache_cluster.${e}.cache_nodes`,description:"ElastiCache node connection details"}]},{typeId:"aws_sqs_queue",serviceCode:"sqs",name:"Simple Queue Service (SQS)",shortName:"SQS",category:"Application Integration",color:"#C985AB",iconName:"ListOrdered",description:"Fully managed message queuing for microservices, distributed systems, and serverless applications.",terraformResourceType:"aws_sqs_queue",schema:[{key:"fifo_queue",label:"FIFO Queue (Exact-Once Ordering)",type:"boolean",defaultValue:!1,group:"general"},{key:"visibility_timeout_seconds",label:"Visibility Timeout (seconds)",type:"number",defaultValue:30,group:"general",envConfigurable:!0},{key:"message_retention_seconds",label:"Message Retention (seconds)",type:"number",defaultValue:345600,group:"general",envConfigurable:!0},{key:"delay_seconds",label:"Delivery Delay (seconds)",type:"number",defaultValue:0,group:"general"},{key:"receive_wait_time_seconds",label:"Long Polling Wait Time (s)",type:"number",defaultValue:10,group:"scaling"},{key:"sqs_managed_sse_enabled",label:"Enable Server-Side Encryption (SSE-SQS)",type:"boolean",defaultValue:!0,group:"security"},{key:"enable_dlq",label:"Auto-Create Companion Dead-Letter Queue (DLQ)",type:"boolean",defaultValue:!0,group:"advanced",envConfigurable:!0}],outputs:[{name:"queue_url",tfExpression:e=>`aws_sqs_queue.${e}.url`,description:"URL of the SQS queue"},{name:"queue_arn",tfExpression:e=>`aws_sqs_queue.${e}.arn`,description:"ARN of the SQS queue"}]},{typeId:"aws_sns_topic",serviceCode:"sns",name:"Simple Notification Service (SNS)",shortName:"SNS",category:"Application Integration",color:"#C985AB",iconName:"BellRing",description:"Fully managed pub/sub messaging for A2A fanout to SQS, Lambda, HTTP webhooks, and A2P notifications.",terraformResourceType:"aws_sns_topic",schema:[{key:"fifo_topic",label:"FIFO Topic",type:"boolean",defaultValue:!1,group:"general"},{key:"content_based_deduplication",label:"Content-Based Deduplication",type:"boolean",defaultValue:!1,group:"general"},{key:"display_name",label:"Display Name",type:"string",defaultValue:"LocalCloud Alerts",group:"general"}],outputs:[{name:"topic_arn",tfExpression:e=>`aws_sns_topic.${e}.arn`,description:"ARN of the SNS Topic"}]},{typeId:"aws_cloudwatch_event_bus",serviceCode:"events",name:"EventBridge Event Bus & Rules",shortName:"EventBridge",category:"Application Integration",color:"#C985AB",iconName:"Waypoints",description:"Serverless event bus that makes it easy to build event-driven applications at scale across AWS services.",terraformResourceType:"aws_cloudwatch_event_bus",schema:[{key:"event_pattern_source",label:"Rule Event Source Pattern",type:"string",defaultValue:"custom.app.orders",group:"general"},{key:"schedule_expression",label:"Optional Schedule Cron (e.g. rate(5 minutes))",type:"string",defaultValue:"",group:"general",envConfigurable:!0},{key:"enable_archive",label:"Enable Event Replay Archive",type:"boolean",defaultValue:!1,group:"advanced",envConfigurable:!0}],outputs:[{name:"event_bus_arn",tfExpression:e=>`aws_cloudwatch_event_bus.${e}.arn`,description:"ARN of the EventBridge Bus"}]},{typeId:"aws_sfn_state_machine",serviceCode:"stepfunctions",name:"Step Functions State Machine",shortName:"StepFn",category:"Application Integration",color:"#C985AB",iconName:"Workflow",description:"Visual workflow orchestrator for distributed microservices, Lambda functions, and resilience retries.",terraformResourceType:"aws_sfn_state_machine",schema:[{key:"type",label:"Workflow Type",type:"select",defaultValue:"STANDARD",group:"general",envConfigurable:!0,options:[{label:"STANDARD (Long-running, auditable)",value:"STANDARD"},{label:"EXPRESS (High-volume, short-duration)",value:"EXPRESS"}]},{key:"tracing_enabled",label:"Enable X-Ray Tracing",type:"boolean",defaultValue:!0,group:"advanced"}],outputs:[{name:"state_machine_arn",tfExpression:e=>`aws_sfn_state_machine.${e}.arn`,description:"State Machine ARN"}]},{typeId:"aws_iam_role",serviceCode:"iam",name:"IAM Role & Policy Document",shortName:"IAM Role",category:"Security, Identity, & Compliance",color:"#D07468",iconName:"KeyRound",description:"Identity with specific permissions and trust policies assumed by Lambda, EC2, ECS, or users.",terraformResourceType:"aws_iam_role",schema:[{key:"principal_service",label:"Trusted AWS Service Principal",type:"select",defaultValue:"lambda.amazonaws.com",group:"security",options:[{label:"lambda.amazonaws.com",value:"lambda.amazonaws.com"},{label:"ecs-tasks.amazonaws.com",value:"ecs-tasks.amazonaws.com"},{label:"ec2.amazonaws.com",value:"ec2.amazonaws.com"},{label:"states.amazonaws.com",value:"states.amazonaws.com"},{label:"events.amazonaws.com",value:"events.amazonaws.com"}]},{key:"managed_policy_arns",label:"Managed Policy Attachment",type:"string",defaultValue:"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",group:"security"},{key:"max_session_duration",label:"Max Session Duration (seconds)",type:"number",defaultValue:3600,group:"security"}],outputs:[{name:"iam_role_arn",tfExpression:e=>`aws_iam_role.${e}.arn`,description:"ARN of the IAM Role"}]},{typeId:"aws_kms_key",serviceCode:"kms",name:"Key Management Service (KMS Key)",shortName:"KMS",category:"Security, Identity, & Compliance",color:"#D07468",iconName:"Lock",description:"Create and control cryptographic keys used to encrypt and digitally sign your data across AWS services.",terraformResourceType:"aws_kms_key",schema:[{key:"key_usage",label:"Key Usage",type:"select",defaultValue:"ENCRYPT_DECRYPT",group:"security",options:[{label:"ENCRYPT_DECRYPT",value:"ENCRYPT_DECRYPT"},{label:"SIGN_VERIFY",value:"SIGN_VERIFY"}]},{key:"enable_key_rotation",label:"Enable Automatic Annual Key Rotation",type:"boolean",defaultValue:!0,group:"security",envConfigurable:!0},{key:"deletion_window_in_days",label:"Deletion Waiting Window (Days)",type:"number",defaultValue:7,group:"security",envConfigurable:!0},{key:"alias_name",label:"KMS Alias Suffix",type:"string",defaultValue:"app-master-key",group:"general"}],outputs:[{name:"kms_key_arn",tfExpression:e=>`aws_kms_key.${e}.arn`,description:"ARN of the KMS Key"}]},{typeId:"aws_secretsmanager_secret",serviceCode:"secretsmanager",name:"Secrets Manager Secret",shortName:"SecretsMgr",category:"Security, Identity, & Compliance",color:"#D07468",iconName:"FileKey",description:"Rotate, manage, and retrieve database credentials, API keys, and other secrets throughout their lifecycle.",terraformResourceType:"aws_secretsmanager_secret",schema:[{key:"secret_prefix",label:"Secret Path Name",type:"string",defaultValue:"app/database/credentials",group:"general",envConfigurable:!0},{key:"recovery_window_in_days",label:"Recovery Window Days (0 = immediate delete)",type:"number",defaultValue:0,group:"security",envConfigurable:!0},{key:"secret_json",label:"Initial Secret Payload (JSON)",type:"json",defaultValue:'{"username":"app_user","api_key":"local_emulator_secret_key"}',group:"security",envConfigurable:!0}],outputs:[{name:"secret_arn",tfExpression:e=>`aws_secretsmanager_secret.${e}.arn`,description:"ARN of the Secret"}]},{typeId:"aws_cognito_user_pool",serviceCode:"cognito-idp",name:"Cognito User Pool (Auth / OIDC)",shortName:"Cognito",category:"Security, Identity, & Compliance",color:"#D07468",iconName:"Users",description:"Customer identity and access management (CIAM) with OAuth 2.0, OIDC, MFA, and JWT issuance.",terraformResourceType:"aws_cognito_user_pool",schema:[{key:"mfa_configuration",label:"MFA Requirement",type:"select",defaultValue:"OFF",group:"security",envConfigurable:!0,options:[{label:"OFF",value:"OFF"},{label:"OPTIONAL",value:"OPTIONAL"},{label:"ON (Required)",value:"ON"}]},{key:"password_minimum_length",label:"Minimum Password Length",type:"number",defaultValue:8,group:"security",envConfigurable:!0},{key:"auto_verified_attributes",label:"Auto-Verify Email",type:"boolean",defaultValue:!0,group:"general"},{key:"create_app_client",label:"Generate OAuth App Client",type:"boolean",defaultValue:!0,group:"general"}],outputs:[{name:"user_pool_id",tfExpression:e=>`aws_cognito_user_pool.${e}.id`,description:"Cognito User Pool ID"},{name:"user_pool_endpoint",tfExpression:e=>`aws_cognito_user_pool.${e}.endpoint`,description:"Cognito Endpoint"}]},{typeId:"aws_cloudwatch_log_group",serviceCode:"logs",name:"CloudWatch Log Group & Metric Alarm",shortName:"CloudWatch",category:"Management & Governance",color:"#6CAFB8",iconName:"Activity",description:"Centralized log aggregation, retention governance, and metric threshold alarms.",terraformResourceType:"aws_cloudwatch_log_group",schema:[{key:"log_group_prefix",label:"Log Group Path",type:"string",defaultValue:"/aws/localcloud/service",group:"general",envConfigurable:!0},{key:"retention_in_days",label:"Log Retention (Days)",type:"select",defaultValue:"14",group:"general",envConfigurable:!0,options:[{label:"1 Day",value:"1"},{label:"7 Days",value:"7"},{label:"14 Days",value:"14"},{label:"30 Days",value:"30"},{label:"90 Days",value:"90"},{label:"365 Days (1 Year)",value:"365"}]},{key:"create_error_alarm",label:"Create Error Rate Metric Alarm",type:"boolean",defaultValue:!0,group:"advanced",envConfigurable:!0}],outputs:[{name:"log_group_arn",tfExpression:e=>`aws_cloudwatch_log_group.${e}.arn`,description:"CloudWatch Log Group ARN"}]},{typeId:"aws_ssm_parameter",serviceCode:"ssm",name:"Systems Manager Parameter Store",shortName:"SSM Param",category:"Management & Governance",color:"#6CAFB8",iconName:"Sliders",description:"Hierarchical configuration data management and encrypted parameter storage.",terraformResourceType:"aws_ssm_parameter",schema:[{key:"param_name",label:"Parameter Hierarchy Path",type:"string",defaultValue:"/config/app/feature_flags",group:"general",envConfigurable:!0},{key:"param_type",label:"Parameter Type",type:"select",defaultValue:"String",group:"general",options:[{label:"String",value:"String"},{label:"StringList",value:"StringList"},{label:"SecureString",value:"SecureString"}]},{key:"param_value",label:"Parameter Value",type:"string",defaultValue:'{"newCheckout":true}',group:"general",envConfigurable:!0}],outputs:[{name:"ssm_param_arn",tfExpression:e=>`aws_ssm_parameter.${e}.arn`,description:"ARN of the SSM Parameter"}]},{typeId:"aws_kinesis_stream",serviceCode:"kinesis",name:"Kinesis Data Stream",shortName:"Kinesis",category:"Analytics & Streaming",color:"#A98ACB",iconName:"Waves",description:"Massively scalable and durable real-time data streaming service for clickstreams, logs, and event telemetry.",terraformResourceType:"aws_kinesis_stream",schema:[{key:"stream_mode",label:"Capacity Mode",type:"select",defaultValue:"ON_DEMAND",group:"scaling",envConfigurable:!0,options:[{label:"ON_DEMAND",value:"ON_DEMAND"},{label:"PROVISIONED",value:"PROVISIONED"}]},{key:"shard_count",label:"Provisioned Shard Count",type:"number",defaultValue:1,group:"scaling",envConfigurable:!0},{key:"retention_period",label:"Data Retention Period (Hours)",type:"number",defaultValue:24,group:"general",envConfigurable:!0}],outputs:[{name:"kinesis_arn",tfExpression:e=>`aws_kinesis_stream.${e}.arn`,description:"Kinesis Stream ARN"}]},{typeId:"aws_opensearch_domain",serviceCode:"opensearch",name:"OpenSearch Search & Vector Engine",shortName:"OpenSearch",category:"Analytics & Streaming",color:"#A98ACB",iconName:"Search",description:"Distributed search, vector database, and log analytics suite powered by OpenSearch.",terraformResourceType:"aws_opensearch_domain",schema:[{key:"engine_version",label:"Engine Version",type:"select",defaultValue:"OpenSearch_2.15",group:"general",options:[{label:"OpenSearch_2.15",value:"OpenSearch_2.15"},{label:"OpenSearch_2.13",value:"OpenSearch_2.13"}]},{key:"instance_type",label:"Data Node Instance Type",type:"select",defaultValue:"t3.small.search",group:"scaling",envConfigurable:!0,options:[{label:"t3.small.search",value:"t3.small.search"},{label:"m6g.large.search",value:"m6g.large.search"},{label:"r6g.xlarge.search",value:"r6g.xlarge.search"}]},{key:"instance_count",label:"Data Node Count",type:"number",defaultValue:1,group:"scaling",envConfigurable:!0},{key:"ebs_volume_size",label:"EBS Storage per Node (GiB)",type:"number",defaultValue:20,group:"scaling",envConfigurable:!0}],outputs:[{name:"opensearch_endpoint",tfExpression:e=>`aws_opensearch_domain.${e}.endpoint`,description:"Domain-specific endpoint"}]},{typeId:"aws_bedrock_agent",serviceCode:"bedrock",name:"Bedrock AI Foundation Model Gateway",shortName:"Bedrock AI",category:"Developer Tools & AI",color:"#6DB3A1",iconName:"Sparkles",description:"Serverless generative AI foundation models, guardrails, and knowledge base integration.",terraformResourceType:"aws_bedrockagent_agent",schema:[{key:"foundation_model",label:"Foundation Model ID",type:"select",defaultValue:"anthropic.claude-3-5-sonnet-20241022-v2:0",group:"general",envConfigurable:!0,options:[{label:"Claude 3.5 Sonnet v2",value:"anthropic.claude-3-5-sonnet-20241022-v2:0"},{label:"Claude 3.5 Haiku",value:"anthropic.claude-3-5-haiku-20241022-v1:0"},{label:"Amazon Nova Pro",value:"amazon.nova-pro-v1:0"},{label:"Meta Llama 3.3 70B",value:"meta.llama3-3-70b-instruct-v1:0"}]},{key:"instruction",label:"System Prompt Instruction",type:"string",defaultValue:"You are an intelligent cloud assistant analyzing customer telemetry and executing workflow tools.",group:"general"},{key:"idle_session_ttl_in_seconds",label:"Session TTL (seconds)",type:"number",defaultValue:600,group:"advanced"}],outputs:[{name:"agent_id",tfExpression:e=>`aws_bedrockagent_agent.${e}.id`,description:"Bedrock Agent Identifier"}]}],De=Object.fromEntries(sp.map(e=>[e.typeId,e]));function ew(e){const t=De[e];if(!t)return{};const n={};for(const a of t.schema)n[a.key]=a.defaultValue;return n}const Gm=[{id:"serverless-ecommerce",name:"Serverless Event-Driven Platform",subtitle:"CloudFront + API Gateway + Lambda + DynamoDB + SQS + S3 + Cognito",description:"Production-grade serverless architecture with Cognito JWT auth, API Gateway routing, Lambda microservices, DynamoDB single-table persistence, SQS async order processing, and S3 media assets.",badge:"Recommended Starter",nodes:[{id:"node-cf-web",type:"awsNode",position:{x:60,y:80},data:{label:"Global Edge CDN",resourceName:"global_edge_cdn",serviceType:"aws_cloudfront_distribution",baseConfig:{enabled:!0,default_root_object:"index.html",price_class:"PriceClass_100",viewer_protocol_policy:"redirect-to-https",is_ipv6_enabled:!0},envOverrides:{staging:{price_class:"PriceClass_200"},prod:{price_class:"PriceClass_All"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Component:"Edge"}}},{id:"node-cognito-auth",type:"awsNode",position:{x:60,y:310},data:{label:"Customer Identity Pool",resourceName:"customer_identity_pool",serviceType:"aws_cognito_user_pool",baseConfig:{mfa_configuration:"OFF",password_minimum_length:8,auto_verified_attributes:!0,create_app_client:!0},envOverrides:{staging:{mfa_configuration:"OPTIONAL",password_minimum_length:10},prod:{mfa_configuration:"ON",password_minimum_length:12}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Component:"Auth"}}},{id:"node-apigw-core",type:"awsNode",position:{x:390,y:185},data:{label:"Core Commerce HTTP API",resourceName:"core_commerce_api",serviceType:"aws_apigatewayv2_api",baseConfig:{protocol_type:"HTTP",stage_name:"$default",auto_deploy:!0,cors_allow_origins:"*",throttling_burst_limit:1e3,throttling_rate_limit:2e3},envOverrides:{dev:{cors_allow_origins:"http://localhost:3000"},staging:{throttling_burst_limit:5e3,throttling_rate_limit:1e4},prod:{cors_allow_origins:"https://shop.localcloud.io",throttling_burst_limit:15e3,throttling_rate_limit:3e4}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Component:"Gateway"}}},{id:"node-lambda-orders",type:"awsNode",position:{x:730,y:90},data:{label:"Orders API Handler",resourceName:"orders_api_handler",serviceType:"aws_lambda_function",baseConfig:{runtime:"nodejs20.x",handler:"dist/orders.handler",memory_size:256,timeout:15,architectures:"arm64",reserved_concurrent_executions:-1,tracing_mode:"PassThrough",env_vars:'{"LOG_LEVEL":"debug","FEATURE_FAST_CHECKOUT":"true"}'},envOverrides:{testing:{memory_size:512,env_vars:'{"LOG_LEVEL":"info","TEST_MODE":"true"}'},staging:{memory_size:1024,tracing_mode:"Active",env_vars:'{"LOG_LEVEL":"info"}'},prod:{memory_size:2048,timeout:30,reserved_concurrent_executions:150,tracing_mode:"Active",env_vars:'{"LOG_LEVEL":"warn","STRICT_AUDIT":"true"}'}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Domain:"Orders"}}},{id:"node-lambda-worker",type:"awsNode",position:{x:730,y:330},data:{label:"Fulfillment Worker",resourceName:"fulfillment_worker",serviceType:"aws_lambda_function",baseConfig:{runtime:"python3.12",handler:"worker.process_queue",memory_size:512,timeout:60,architectures:"arm64",reserved_concurrent_executions:-1,tracing_mode:"Active",env_vars:'{"BATCH_SIZE":"10"}'},envOverrides:{prod:{memory_size:1024,timeout:120,reserved_concurrent_executions:50}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Domain:"Fulfillment"}}},{id:"node-ddb-orders",type:"awsNode",position:{x:1090,y:40},data:{label:"Orders Single-Table",resourceName:"orders_table",serviceType:"aws_dynamodb_table",baseConfig:{billing_mode:"PAY_PER_REQUEST",hash_key:"pk",hash_key_type:"S",range_key:"sk",range_key_type:"S",read_capacity:5,write_capacity:5,stream_enabled:!0,stream_view_type:"NEW_AND_OLD_IMAGES",point_in_time_recovery:!1,ttl_attribute:"expiresAt"},envOverrides:{staging:{point_in_time_recovery:!0},prod:{billing_mode:"PROVISIONED",read_capacity:100,write_capacity:100,point_in_time_recovery:!0}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{DataClassification:"Confidential"}}},{id:"node-sqs-events",type:"awsNode",position:{x:1090,y:250},data:{label:"Order Fulfillment Queue",resourceName:"order_fulfillment_queue",serviceType:"aws_sqs_queue",baseConfig:{fifo_queue:!1,visibility_timeout_seconds:60,message_retention_seconds:345600,delay_seconds:0,receive_wait_time_seconds:10,sqs_managed_sse_enabled:!0,enable_dlq:!0},envOverrides:{prod:{message_retention_seconds:1209600,visibility_timeout_seconds:180}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Messaging:"Async"}}},{id:"node-s3-media",type:"awsNode",position:{x:1090,y:450},data:{label:"Invoices & Media Bucket",resourceName:"invoices_media_bucket",serviceType:"aws_s3_bucket",baseConfig:{bucket_prefix:"commerce-invoices-assets",versioning_enabled:!1,sse_algorithm:"AES256",block_public_acls:!0,force_destroy:!0,lifecycle_expiration_days:30},envOverrides:{staging:{versioning_enabled:!0,lifecycle_expiration_days:90},prod:{versioning_enabled:!0,sse_algorithm:"aws:kms",force_destroy:!1,lifecycle_expiration_days:365}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{StorageTier:"Standard"}}}],edges:[{id:"e-cf-apigw",source:"node-cf-web",target:"node-apigw-core",animated:!0,data:{relationshipType:"target_route",label:"HTTPS Origin"}},{id:"e-cognito-apigw",source:"node-cognito-auth",target:"node-apigw-core",animated:!1,data:{relationshipType:"iam_grant",label:"JWT Authorizer"}},{id:"e-apigw-lambda",source:"node-apigw-core",target:"node-lambda-orders",animated:!0,data:{relationshipType:"event_trigger",label:"ANY /orders/*"}},{id:"e-lambda-ddb",source:"node-lambda-orders",target:"node-ddb-orders",animated:!0,data:{relationshipType:"iam_grant",label:"Read/Write Items"}},{id:"e-lambda-sqs",source:"node-lambda-orders",target:"node-sqs-events",animated:!0,data:{relationshipType:"data_flow",label:"Enqueue Order"}},{id:"e-sqs-worker",source:"node-sqs-events",target:"node-lambda-worker",animated:!0,data:{relationshipType:"event_trigger",label:"Event Source Map"}},{id:"e-worker-s3",source:"node-lambda-worker",target:"node-s3-media",animated:!0,data:{relationshipType:"iam_grant",label:"PutObject PDF"}}]},{id:"vpc-ecs-rds-ha",name:"Enterprise VPC + ECS Fargate + RDS + Redis",subtitle:"VPC + Subnets + ALB + ECS Fargate + RDS Postgres + ElastiCache + Secrets Manager",description:"Multi-tier VPC container topology with Application Load Balancer, Fargate cluster, RDS PostgreSQL with Multi-AZ in prod, ElastiCache Redis cluster, and KMS-encrypted Secrets Manager.",badge:"Container Stack",nodes:[{id:"node-vpc-main",type:"awsContainer",position:{x:40,y:40},width:980,height:740,data:{label:"Primary Cloud VPC",resourceName:"primary_vpc",serviceType:"aws_vpc",baseConfig:{cidr_block:"10.10.0.0/16",instance_tenancy:"default",enable_dns_support:!0,enable_dns_hostnames:!0,assign_generated_ipv6_cidr_block:!1},envOverrides:{dev:{cidr_block:"10.10.0.0/16"},testing:{cidr_block:"10.20.0.0/16"},staging:{cidr_block:"10.30.0.0/16"},prod:{cidr_block:"10.100.0.0/16",assign_generated_ipv6_cidr_block:!0}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Network:"Core"}}},{id:"node-subnet-public",type:"awsContainer",parentId:"node-vpc-main",position:{x:28,y:64},width:320,height:270,data:{label:"Public Ingress Subnet",resourceName:"public_ingress_subnet",serviceType:"aws_subnet",baseConfig:{cidr_block:"10.10.1.0/24",availability_zone:"us-east-1a",map_public_ip_on_launch:!0,tier:"public"},envOverrides:{testing:{cidr_block:"10.20.1.0/24"},staging:{cidr_block:"10.30.1.0/24",availability_zone:"us-west-2a"},prod:{cidr_block:"10.100.1.0/24",availability_zone:"us-west-2a"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Tier:"Public"}}},{id:"node-subnet-private",type:"awsContainer",parentId:"node-vpc-main",position:{x:372,y:64},width:580,height:470,data:{label:"Private App Subnet",resourceName:"private_app_subnet",serviceType:"aws_subnet",baseConfig:{cidr_block:"10.10.10.0/24",availability_zone:"us-east-1a",map_public_ip_on_launch:!1,tier:"private"},envOverrides:{testing:{cidr_block:"10.20.10.0/24"},staging:{cidr_block:"10.30.10.0/24",availability_zone:"us-west-2a"},prod:{cidr_block:"10.100.10.0/24",availability_zone:"us-west-2a"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Tier:"Private"}}},{id:"node-subnet-public-b",type:"awsContainer",parentId:"node-vpc-main",position:{x:28,y:352},width:320,height:180,data:{label:"Public Ingress Subnet B",resourceName:"public_ingress_subnet_b",serviceType:"aws_subnet",baseConfig:{cidr_block:"10.10.2.0/24",availability_zone:"us-east-1b",map_public_ip_on_launch:!0,tier:"public"},envOverrides:{testing:{cidr_block:"10.20.2.0/24"},staging:{cidr_block:"10.30.2.0/24",availability_zone:"us-west-2b"},prod:{cidr_block:"10.100.2.0/24",availability_zone:"us-west-2b"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Tier:"Public"}}},{id:"node-subnet-private-b",type:"awsContainer",parentId:"node-vpc-main",position:{x:372,y:556},width:580,height:160,data:{label:"Private App Subnet B",resourceName:"private_app_subnet_b",serviceType:"aws_subnet",baseConfig:{cidr_block:"10.10.11.0/24",availability_zone:"us-east-1b",map_public_ip_on_launch:!1,tier:"private"},envOverrides:{testing:{cidr_block:"10.20.11.0/24"},staging:{cidr_block:"10.30.11.0/24",availability_zone:"us-west-2b"},prod:{cidr_block:"10.100.11.0/24",availability_zone:"us-west-2b"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Tier:"Private"}}},{id:"node-alb-ingress",type:"awsNode",parentId:"node-subnet-public",position:{x:28,y:64},data:{label:"Public Ingress ALB",resourceName:"public_ingress_alb",serviceType:"aws_lb",baseConfig:{load_balancer_type:"application",internal:!1,enable_deletion_protection:!1,idle_timeout:60,listener_port:443,health_check_path:"/healthz"},envOverrides:{prod:{enable_deletion_protection:!0,idle_timeout:120}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Ingress:"ALB"}}},{id:"node-ecs-api",type:"awsNode",parentId:"node-subnet-private",position:{x:22,y:150},data:{label:"Core Backend Fargate Service",resourceName:"core_backend_fargate",serviceType:"aws_ecs_service",baseConfig:{container_image:"111122223333.dkr.ecr.us-east-1.amazonaws.com/backend:latest",container_port:8080,cpu:"256",memory:"512",desired_count:1,assign_public_ip:!1,enable_execute_command:!0},envOverrides:{testing:{desired_count:2,cpu:"512",memory:"1024"},staging:{desired_count:3,cpu:"1024",memory:"2048"},prod:{desired_count:6,cpu:"2048",memory:"4096",enable_execute_command:!1}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Runtime:"Fargate"}}},{id:"node-rds-pg",type:"awsNode",parentId:"node-subnet-private",position:{x:298,y:56},data:{label:"Primary PostgreSQL DB",resourceName:"primary_postgres_db",serviceType:"aws_db_instance",baseConfig:{engine:"postgres",engine_version:"16.3",instance_class:"db.t4g.micro",allocated_storage:20,max_allocated_storage:100,db_name:"core_platform",username:"postgres_admin",multi_az:!1,storage_encrypted:!0,backup_retention_period:1,skip_final_snapshot:!0},envOverrides:{staging:{instance_class:"db.t4g.medium",allocated_storage:50,multi_az:!0,backup_retention_period:7},prod:{instance_class:"db.r6g.large",allocated_storage:200,max_allocated_storage:1e3,multi_az:!0,backup_retention_period:30,skip_final_snapshot:!1}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Engine:"PostgreSQL"}}},{id:"node-redis-cache",type:"awsNode",parentId:"node-subnet-private",position:{x:298,y:270},data:{label:"Session & Query Cache",resourceName:"session_redis_cache",serviceType:"aws_elasticache_cluster",baseConfig:{engine:"redis",node_type:"cache.t4g.micro",num_cache_nodes:1,port:6379},envOverrides:{staging:{node_type:"cache.t4g.small",num_cache_nodes:2},prod:{node_type:"cache.r6g.large",num_cache_nodes:3}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Cache:"Redis"}}},{id:"node-secrets-db",type:"awsNode",position:{x:1080,y:250},data:{label:"Database Credentials Vault",resourceName:"db_credentials_secret",serviceType:"aws_secretsmanager_secret",baseConfig:{secret_prefix:"platform/rds/master",recovery_window_in_days:0,secret_json:'{"username":"postgres_admin","password":"local_dev_password_9297"}'},envOverrides:{prod:{recovery_window_in_days:30}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Security:"Vault"}}}],edges:[{id:"e-alb-ecs",source:"node-alb-ingress",target:"node-ecs-api",animated:!0,data:{relationshipType:"target_route",label:"Target Group :8080"}},{id:"e-ecs-rds",source:"node-ecs-api",target:"node-rds-pg",animated:!0,data:{relationshipType:"data_flow",label:"SQL Port 5432"}},{id:"e-ecs-redis",source:"node-ecs-api",target:"node-redis-cache",animated:!0,data:{relationshipType:"data_flow",label:"RESP Port 6379"}},{id:"e-ecs-secrets",source:"node-ecs-api",target:"node-secrets-db",animated:!1,data:{relationshipType:"iam_grant",label:"GetSecretValue"}}]},{id:"ai-streaming-rag",name:"Real-Time AI RAG & Streaming Pipeline",subtitle:"Kinesis + Lambda + Claude on Bedrock + OpenSearch Vector + Step Functions",description:"Streaming ingestion & AI orchestration pipeline using Kinesis Data Streams, Step Functions workflows, a Lambda that calls Claude through Amazon Bedrock, and OpenSearch vector indexing.",badge:"AI & Streaming",nodes:[{id:"node-kinesis-ingest",type:"awsNode",position:{x:70,y:180},data:{label:"Telemetry Ingestion Stream",resourceName:"telemetry_ingest_stream",serviceType:"aws_kinesis_stream",baseConfig:{stream_mode:"ON_DEMAND",shard_count:1,retention_period:24},envOverrides:{prod:{stream_mode:"PROVISIONED",shard_count:8,retention_period:168}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Pipeline:"Ingest"}}},{id:"node-sfn-orchestrator",type:"awsNode",position:{x:400,y:80},data:{label:"RAG Ingestion State Machine",resourceName:"rag_orchestrator_sfn",serviceType:"aws_sfn_state_machine",baseConfig:{type:"EXPRESS",tracing_enabled:!0},envOverrides:{prod:{type:"STANDARD"}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Orchestration:"StepFunctions"}}},{id:"node-lambda-embed",type:"awsNode",position:{x:400,y:290},data:{label:"Chunk & Embedding Processor",resourceName:"embedding_processor_fn",serviceType:"aws_lambda_function",baseConfig:{runtime:"python3.12",handler:"embeddings.handler",memory_size:1024,timeout:60,architectures:"arm64",reserved_concurrent_executions:-1,tracing_mode:"Active",env_vars:'{"CHUNK_TOKENS":"512"}'},envOverrides:{prod:{memory_size:3008,timeout:180}},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{AI:"Embeddings"}}},{id:"node-lambda-claude",type:"awsNode",position:{x:760,y:70},data:{label:"Claude Reasoning Function",resourceName:"claude_reasoning_fn",serviceType:"aws_lambda_function",baseConfig:{runtime:"python3.12",handler:"app.handler",memory_size:512,timeout:120,architectures:"arm64",reserved_concurrent_executions:-1,tracing_mode:"Active",env_vars:"{}",claude_model_id:"anthropic.claude-opus-5-5"},envOverrides:{},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{AI:"Claude"},inlineCode:`import json
|
|
73
|
+
import os
|
|
74
|
+
|
|
75
|
+
# Calls Claude through Amazon Bedrock with the Anthropic SDK, which the Lambda runtime does not include.
|
|
76
|
+
# To deploy it, switch Code to Folder and point it at a folder holding this file plus the SDK:
|
|
77
|
+
# pip install "anthropic[bedrock]" -t functions/claude_reasoning
|
|
78
|
+
#
|
|
79
|
+
# from anthropic import AnthropicBedrockMantle
|
|
80
|
+
#
|
|
81
|
+
# client = AnthropicBedrockMantle(aws_region=os.environ["AWS_REGION"])
|
|
82
|
+
#
|
|
83
|
+
# def handler(event, context):
|
|
84
|
+
# message = client.messages.create(
|
|
85
|
+
# model=os.environ["CLAUDE_MODEL_ID"],
|
|
86
|
+
# max_tokens=1024,
|
|
87
|
+
# messages=[{"role": "user", "content": json.dumps(event)}],
|
|
88
|
+
# )
|
|
89
|
+
# return {"text": next(block.text for block in message.content if block.type == "text")}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def handler(event, context):
|
|
93
|
+
return {"model": os.environ.get("CLAUDE_MODEL_ID"), "received": event}
|
|
94
|
+
`}},{id:"node-opensearch-vec",type:"awsNode",position:{x:760,y:290},data:{label:"OpenSearch Vector Knowledge Index",resourceName:"vector_knowledge_index",serviceType:"aws_opensearch_domain",baseConfig:{engine_version:"OpenSearch_2.15",instance_type:"t3.small.search",instance_count:1,ebs_volume_size:20},envOverrides:{staging:{instance_type:"m6g.large.search",instance_count:2,ebs_volume_size:100},prod:{instance_type:"r6g.xlarge.search",instance_count:3,ebs_volume_size:500}},envEnabled:{dev:!0,testing:!1,staging:!0,prod:!0},tags:{VectorDB:"OpenSearch"}}}],edges:[{id:"e-kin-lambda",source:"node-kinesis-ingest",target:"node-lambda-embed",animated:!0,data:{relationshipType:"event_trigger",label:"Stream Consumer"}},{id:"e-lambda-sfn",source:"node-lambda-embed",target:"node-sfn-orchestrator",animated:!0,data:{relationshipType:"event_trigger",label:"StartExecution"}},{id:"e-sfn-claude",source:"node-sfn-orchestrator",target:"node-lambda-claude",animated:!0,data:{relationshipType:"data_flow",label:"Invoke"}},{id:"e-lambda-os",source:"node-lambda-embed",target:"node-opensearch-vec",animated:!0,data:{relationshipType:"data_flow",label:"k-NN Vector Upsert"}}]}],Ym=240,Kj=150,Fj={aws_vpc:0,aws_subnet:1};function bi(e){var t;return!!((t=De[e.data.serviceType])!=null&&t.isContainer)}function ip(e){var n,a,l,s;const t=De[e.data.serviceType];return t!=null&&t.isContainer?{width:e.width??((n=e.measured)==null?void 0:n.width)??t.defaultWidth??420,height:e.height??((a=e.measured)==null?void 0:a.height)??t.defaultHeight??280}:{width:((l=e.measured)==null?void 0:l.width)??Ym,height:((s=e.measured)==null?void 0:s.height)??Kj}}function cr(e,t){let n=e.position.x,a=e.position.y,l=e.parentId;const s=new Set;for(;l&&!s.has(l);){s.add(l);const i=t[l];if(!i)break;n+=i.position.x,a+=i.position.y,l=i.parentId}return{x:n,y:a}}function oo(e,t,n){let a=e.parentId;const l=new Set;for(;a&&!l.has(a);){l.add(a);const s=n[a];if(!s)return;if(s.data.serviceType===t)return s;a=s.parentId}}function Jj(e,t){const n=e.data.serviceType,a=t.data.serviceType;return n==="aws_vpc"?!1:n==="aws_subnet"?a==="aws_vpc":a==="aws_vpc"||a==="aws_subnet"}function r0(e,t){const n=Object.fromEntries(t.map(u=>[u.id,u])),a=cr(e,n),l=ip(e),s=a.x+l.width/2,i=a.y+l.height/2;let r,o=1/0;for(const u of t){if(u.id===e.id||!bi(u)||!Jj(e,u)||Wj(u,e.id,n))continue;const d=cr(u,n),f=ip(u),p=s>=d.x&&s<=d.x+f.width&&i>=d.y&&i<=d.y+f.height,h=f.width*f.height;p&&h<o&&(r=u,o=h)}return r}function Wj(e,t,n){var s;let a=e.parentId;const l=new Set;for(;a&&!l.has(a);){if(a===t)return!0;l.add(a),a=(s=n[a])==null?void 0:s.parentId}return!1}function tw(e){return e.map((t,n)=>({n:t,i:n,rank:Fj[t.data.serviceType]??2})).sort((t,n)=>t.rank-n.rank||t.i-n.i).map(({n:t})=>t)}function fa(e){const t=new Set(e.map(l=>l.id)),n=Object.fromEntries(e.map(l=>[l.id,l])),a=e.map(l=>{const s=De[l.data.serviceType];let i=l;if(i.parentId&&!t.has(i.parentId)){const{parentId:r,...o}=i;i={...o,position:cr(l,n)}}return s!=null&&s.isContainer?i={...i,type:"awsContainer",width:i.width??s.defaultWidth??420,height:i.height??s.defaultHeight??280}:i.type!=="awsNode"&&(i={...i,type:"awsNode"}),i});return tw(a)}function o0(e,t,n){const a=Object.fromEntries(e.map(o=>[o.id,o])),l=a[t];if(!l||l.parentId===n)return e;const s=cr(l,a),i=n?cr(a[n],a):{x:0,y:0},r=e.map(o=>{if(o.id!==t)return o;const{parentId:u,...d}=o;return{...d,...n?{parentId:n}:{},position:{x:s.x-i.x,y:s.y-i.y}}});return tw(r)}function c0(e,t){const n=e.find(a=>a.id===t);return n?e.map(a=>{if(a.parentId!==t)return a;const{parentId:l,...s}=a;return{...s,...n.parentId?{parentId:n.parentId}:{},position:{x:a.position.x+n.position.x,y:a.position.y+n.position.y}}}):e}const eM={"Networking & Content Delivery":0,"Security, Identity, & Compliance":1,Compute:2,Containers:2,"Application Integration":3,"Analytics & Streaming":3,"Developer Tools & AI":3,Database:4,Storage:4,"Management & Governance":4},u0=40,co=24,tM=60,nM=24,d0=2;function f0(e){var r;const t={};for(const o of e)o.parentId&&(t[r=o.parentId]||(t[r]=[])).push(o);const n={},a={},l=o=>{if(a[o.id])return a[o.id];const u=ip(o),d=t[o.id]||[];if(!bi(o)||d.length===0)return a[o.id]=u;const f=[...d].sort((y,b)=>Number(bi(b))-Number(bi(y)));let p=tM,h=0;for(let y=0;y<f.length;y+=d0){const b=f.slice(y,y+d0);let x=co,m=0;for(const _ of b){const g=l(_);n[_.id]={x,y:p},x+=g.width+co,m=Math.max(m,g.height)}h=Math.max(h,x),p+=m+co}return a[o.id]={width:Math.max(u.width,h),height:Math.max(u.height,p-co+nM)}},s={};for(const o of e){if(o.parentId)continue;const u=De[o.data.serviceType],d=u?eM[u.category]??2:2;(s[d]||(s[d]=[])).push(o)}let i=80;for(const o of Object.keys(s).map(Number).sort((u,d)=>u-d)){let u=70,d=0;for(const f of s[o]){const p=l(f);n[f.id]={x:i,y:u},u+=p.height+u0,d=Math.max(d,p.width)}i+=d+u0*2}return e.map(o=>{const u=n[o.id]?{...o,position:n[o.id]}:o;return bi(o)&&a[o.id]?{...u,...a[o.id]}:u})}function Ft(e,t){var l;const n=e.data.baseConfig||{},a=((l=e.data.envOverrides)==null?void 0:l[t])||{};return{...n,...a}}function Vo(e,t,n){var l;const a=(l=e.data.envOverrides)==null?void 0:l[t];return!!(a&&Object.prototype.hasOwnProperty.call(a,n))}function Le(e){return e.toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/^[^a-z_]+/,"res_").replace(/_+/g,"_").replace(/_$/,"")||"aws_resource"}const xn="_extra_hcl";function aM(e,t,n,a){const l=a.replace(/\s+$/,"");if(!l.trim())return e;const s=`resource "${t}" "${n}" {`,i=e.indexOf(s);if(i===-1)return`${e}
|
|
95
|
+
|
|
96
|
+
# Extra HCL for ${n} was not applied: no ${t} block to attach it to.`;let r=1,o=i+s.length;for(;o<e.length&&r>0;)e[o]==="{"?r++:e[o]==="}"&&r--,o++;if(r!==0)return e;const u=o-1,d=l.split(`
|
|
97
|
+
`).map(f=>f.trim()?` ${f.replace(/\s+$/,"")}`:"").join(`
|
|
98
|
+
`);return`${e.slice(0,u).replace(/\s+$/,"")}
|
|
99
|
+
|
|
100
|
+
# Extra arguments (hand-written)
|
|
101
|
+
${d}
|
|
102
|
+
${e.slice(u)}`}function vn(e,t){return`trimsuffix(substr("\${local.name_prefix}-${e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}", 0, ${t}), "-")`}const lM=new Set(["aws_lb","aws_db_instance","aws_elasticache_cluster"]);function nw(e,t){return e==="aws_elasticache_cluster"&&(t.engine||"redis")==="redis"&&Number(t.num_cache_nodes??1)>1}function Pm(e,t){var n;return nw(e.data.serviceType,t)?"aws_elasticache_replication_group":((n=De[e.data.serviceType])==null?void 0:n.terraformResourceType)||e.data.serviceType}const p0="ami-0c55b159cbfafe1f0",sM=new Set(["EmulatorPort"]);function iM(e){var n;return(((n=e.match(/^[a-z]+\d+([a-z-]*)\./))==null?void 0:n[1])||"").includes("g")?"arm64":"x86_64"}function m0(e,t){const n=typeof e=="string"&&e.trim()?e.trim():p0;return n===p0?`data.aws_ssm_parameter.al2023_ami_${iM(t)}.insecure_value`:`"${n}"`}function Ws(e,t,n,a,l="emulator"){const s=n.id,i=e.filter(O=>{var V;return((V=O.data.envEnabled)==null?void 0:V[s])!==!1}),r=new Set(i.map(O=>O.id)),o=t.filter(O=>r.has(O.source)&&r.has(O.target)),u={},d={};for(const O of o)u[O.target]||(u[O.target]=[]),u[O.target].push(O),d[O.source]||(d[O.source]=[]),d[O.source].push(O);const f=Object.fromEntries(i.map(O=>[O.id,O])),p=i.find(O=>O.data.serviceType==="aws_vpc"),h=i.filter(O=>O.data.serviceType==="aws_subnet"),y=i.filter(O=>O.data.serviceType==="aws_security_group"),b=rM(n,l),x=[];x.push(`# ============================================================================
|
|
103
|
+
# LocalCloud Studio — Compiled Terraform Infrastructure (${n.name.toUpperCase()})
|
|
104
|
+
# Target Mode: ${l==="emulator"?`AWS Emulator (${n.emulatorEndpoint})`:`AWS (${n.region})`}
|
|
105
|
+
# Active Resources: ${i.length} | Wired Connections: ${o.length}
|
|
106
|
+
# ============================================================================
|
|
107
|
+
|
|
108
|
+
locals {
|
|
109
|
+
environment = var.environment
|
|
110
|
+
name_prefix = "lc-\${var.environment}"
|
|
111
|
+
common_tags = merge(var.default_tags, {
|
|
112
|
+
Environment = var.environment
|
|
113
|
+
Region = var.aws_region
|
|
114
|
+
Compiler = "LocalCloud-Studio-2D"
|
|
115
|
+
})
|
|
116
|
+
}`);for(const O of i){const V=Le(O.data.resourceName||O.data.label),U=Ft(O,s),T=u[O.id]||[],M=d[O.id]||[],j=oo(O,"aws_vpc",f)||(O.data.parentVpcId?f[O.data.parentVpcId]:void 0),z=oo(O,"aws_subnet",f),D=T.map(Y=>f[Y.source]).find(Y=>(Y==null?void 0:Y.data.serviceType)==="aws_vpc")||j||p,C=T.map(Y=>f[Y.source]).filter(Y=>(Y==null?void 0:Y.data.serviceType)==="aws_subnet");z&&!C.some(Y=>Y.id===z.id)&&C.unshift(z);let E=C.length>0?C:h;if(lM.has(O.data.serviceType)&&E.length===1){const Y=E[0],I=oo(Y,"aws_vpc",f),X=F=>String(Ft(F,s).tier||"public"),te=h.filter(F=>{var J;return F.id!==Y.id&&((J=oo(F,"aws_vpc",f))==null?void 0:J.id)===(I==null?void 0:I.id)&&X(F)===X(Y)});E=[Y,...te]}const $=T.map(Y=>f[Y.source]).filter(Y=>(Y==null?void 0:Y.data.serviceType)==="aws_security_group"),L=$.length>0?$:y,P=T.filter(Y=>{var I;return((I=Y.data)==null?void 0:I.relationshipType)==="depends_on"}).map(Y=>f[Y.source]).filter(Boolean),G=P.length>0?`
|
|
117
|
+
depends_on = [${P.map(Y=>`${Y.data.serviceType}.${Le(Y.data.resourceName||Y.data.label)}`).join(", ")}]`:"",K=uM(O,V,U,s,D,E,L,T,M,f,G,l),le=typeof U[xn]=="string"?U[xn]:"";x.push(le.trim()?aM(K,Pm(O,U),V,le):K)}const m=dM(o,f);m.length>0&&(x.push(`# ============================================================================
|
|
118
|
+
# Cross-Service Wiring, Permissions & Event Triggers (Canvas Edges)
|
|
119
|
+
# ============================================================================`),x.push(...m));for(const O of["x86_64","arm64"]){const V=`data.aws_ssm_parameter.al2023_ami_${O}`;x.some(U=>U.includes(V))&&x.splice(1,0,`# Latest Amazon Linux 2023 image for this region (set an AMI on the node to pin one)
|
|
120
|
+
data "aws_ssm_parameter" "al2023_ami_${O}" {
|
|
121
|
+
name = "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-${O}"
|
|
122
|
+
}`)}const _=x.join(`
|
|
123
|
+
|
|
124
|
+
`)+`
|
|
125
|
+
`,{variablesTf:g,tfvars:v}=cM(n,a,l,{vpcId:/\bvar\.vpc_id\b/.test(_),subnetIds:/\bvar\.subnet_ids\b/.test(_)}),{backendTf:w,backendConfig:N}=l==="aws"?oM(n):{backendTf:"",backendConfig:""},S=fM(i,s),A=hM(n,a),k=pM(),H=mM(a);return{environment:n,target:l,mainTf:_,providerTf:b,variablesTf:g,tfvars:v,outputsTf:S,backendTf:w,backendConfig:N,emulatorScriptSh:A,dockerfile:k,dockerComposeYml:H}}function rM(e,t){return t==="aws"?`# ============================================================================
|
|
126
|
+
# AWS Provider: ${e.name} (${e.id}), ${e.region}
|
|
127
|
+
# Credentials come from your usual AWS setup (profile, SSO, CI role).
|
|
128
|
+
# Remote state is configured in backend.tf.
|
|
129
|
+
# ============================================================================
|
|
130
|
+
|
|
131
|
+
terraform {
|
|
132
|
+
# 1.10+ for S3 native state locking (use_lockfile in backend.tfbackend)
|
|
133
|
+
required_version = ">= 1.10.0"
|
|
134
|
+
|
|
135
|
+
required_providers {
|
|
136
|
+
aws = {
|
|
137
|
+
source = "hashicorp/aws"
|
|
138
|
+
version = "~> 5.70"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
provider "aws" {
|
|
144
|
+
region = var.aws_region
|
|
145
|
+
|
|
146
|
+
default_tags {
|
|
147
|
+
tags = var.default_tags
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
`:`# ============================================================================
|
|
151
|
+
# AWS Emulator Provider Configuration (https://github.com/aws/aws-emulator)
|
|
152
|
+
# Environment: ${e.name} (${e.id}) -> HTTPS Endpoint 127.0.0.1:${e.emulatorPort}
|
|
153
|
+
# ============================================================================
|
|
154
|
+
|
|
155
|
+
terraform {
|
|
156
|
+
required_version = ">= 1.5.0"
|
|
157
|
+
|
|
158
|
+
required_providers {
|
|
159
|
+
aws = {
|
|
160
|
+
source = "hashicorp/aws"
|
|
161
|
+
version = "~> 5.70"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
provider "aws" {
|
|
167
|
+
region = var.aws_region
|
|
168
|
+
|
|
169
|
+
# Point all AWS API operations to local aws-emulator router instance for [${e.id}]
|
|
170
|
+
endpoints {
|
|
171
|
+
apigateway = var.emulator_endpoint
|
|
172
|
+
apigatewayv2 = var.emulator_endpoint
|
|
173
|
+
autoscaling = var.emulator_endpoint
|
|
174
|
+
bedrock = var.emulator_endpoint
|
|
175
|
+
bedrockagent = var.emulator_endpoint
|
|
176
|
+
cloudfront = var.emulator_endpoint
|
|
177
|
+
cloudwatch = var.emulator_endpoint
|
|
178
|
+
cognitoidp = var.emulator_endpoint
|
|
179
|
+
dynamodb = var.emulator_endpoint
|
|
180
|
+
ec2 = var.emulator_endpoint
|
|
181
|
+
ecr = var.emulator_endpoint
|
|
182
|
+
ecs = var.emulator_endpoint
|
|
183
|
+
efs = var.emulator_endpoint
|
|
184
|
+
eks = var.emulator_endpoint
|
|
185
|
+
elasticache = var.emulator_endpoint
|
|
186
|
+
elbv2 = var.emulator_endpoint
|
|
187
|
+
events = var.emulator_endpoint
|
|
188
|
+
iam = var.emulator_endpoint
|
|
189
|
+
kinesis = var.emulator_endpoint
|
|
190
|
+
kms = var.emulator_endpoint
|
|
191
|
+
lambda = var.emulator_endpoint
|
|
192
|
+
logs = var.emulator_endpoint
|
|
193
|
+
opensearch = var.emulator_endpoint
|
|
194
|
+
rds = var.emulator_endpoint
|
|
195
|
+
route53 = var.emulator_endpoint
|
|
196
|
+
s3 = var.emulator_endpoint
|
|
197
|
+
secretsmanager = var.emulator_endpoint
|
|
198
|
+
sfn = var.emulator_endpoint
|
|
199
|
+
sns = var.emulator_endpoint
|
|
200
|
+
sqs = var.emulator_endpoint
|
|
201
|
+
ssm = var.emulator_endpoint
|
|
202
|
+
sts = var.emulator_endpoint
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
# AWS Emulator local credentials & self-signed CA bundle (~/.aws/emulator/${e.emulatorPort}/)
|
|
206
|
+
shared_credentials_files = [pathexpand("~/.aws/emulator/\${var.emulator_port}/emulator_credentials")]
|
|
207
|
+
shared_config_files = [pathexpand("~/.aws/emulator/\${var.emulator_port}/config")]
|
|
208
|
+
custom_ca_bundle = pathexpand("~/.aws/emulator/\${var.emulator_port}/ca.pem")
|
|
209
|
+
|
|
210
|
+
s3_use_path_style = true
|
|
211
|
+
skip_credentials_validation = true
|
|
212
|
+
skip_metadata_api_check = true
|
|
213
|
+
skip_requesting_account_id = true
|
|
214
|
+
|
|
215
|
+
default_tags {
|
|
216
|
+
tags = var.default_tags
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
`}function oM(e){const t=`# Remote state in S3. The settings live in backend.tfbackend so each environment
|
|
220
|
+
# can point at its own bucket or account:
|
|
221
|
+
# terraform init -backend-config=backend.tfbackend
|
|
222
|
+
#
|
|
223
|
+
# Using Terraform Cloud or another backend instead? Replace this block.
|
|
224
|
+
|
|
225
|
+
terraform {
|
|
226
|
+
backend "s3" {}
|
|
227
|
+
}
|
|
228
|
+
`,n=`# State settings for ${e.name} (${e.id}). Fill in once; LocalCloud never overwrites this file.
|
|
229
|
+
# The bucket must exist before \`terraform init\` and should have versioning enabled.
|
|
230
|
+
|
|
231
|
+
bucket = "CHANGE-ME-terraform-state"
|
|
232
|
+
key = "localcloud/${e.id}/terraform.tfstate"
|
|
233
|
+
region = "${e.region}"
|
|
234
|
+
encrypt = true
|
|
235
|
+
use_lockfile = true
|
|
236
|
+
`;return{backendTf:t,backendConfig:n}}function cM(e,t,n,a){const l=n==="aws",s=Object.entries(e.defaultTags).filter(([p])=>!l||!sM.has(p)),i=l?"":`variable "emulator_port" {
|
|
237
|
+
description = "Local AWS Emulator port for isolated environment state"
|
|
238
|
+
type = number
|
|
239
|
+
default = ${e.emulatorPort}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
variable "emulator_endpoint" {
|
|
243
|
+
description = "Local AWS Emulator HTTPS endpoint URL"
|
|
244
|
+
type = string
|
|
245
|
+
default = "${e.emulatorEndpoint}"
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
`,r=[a.vpcId&&`variable "vpc_id" {
|
|
249
|
+
description = "Existing VPC for resources that are not placed in a VPC on the canvas"
|
|
250
|
+
type = string
|
|
251
|
+
}
|
|
252
|
+
`,a.subnetIds&&`variable "subnet_ids" {
|
|
253
|
+
description = "Existing subnets for resources that are not placed in a subnet on the canvas"
|
|
254
|
+
type = list(string)
|
|
255
|
+
}
|
|
256
|
+
`].filter(Boolean).join(`
|
|
257
|
+
`),o=`variable "environment" {
|
|
258
|
+
description = "Target deployment environment (dev, testing, staging, prod)"
|
|
259
|
+
type = string
|
|
260
|
+
default = "${e.id}"
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
variable "aws_region" {
|
|
264
|
+
description = "AWS Region for this environment"
|
|
265
|
+
type = string
|
|
266
|
+
default = "${e.region}"
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
${i}variable "default_tags" {
|
|
270
|
+
description = "Default resource tags applied across the environment"
|
|
271
|
+
type = map(string)
|
|
272
|
+
default = {
|
|
273
|
+
${s.map(([p,h])=>` ${p} = "${h}"`).join(`
|
|
274
|
+
`)}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
${r?`
|
|
278
|
+
${r}`:""}`,u=Object.values(t).map(p=>l?`# - ${p.id.padEnd(8)} : region=${p.region}`:`# - ${p.id.padEnd(8)} : region=${p.region}, port=${p.emulatorPort}, endpoint=${p.emulatorEndpoint}`).join(`
|
|
279
|
+
`),d=a.vpcId||a.subnetIds?`
|
|
280
|
+
# Required: some resources need a network, and the canvas has no VPC or Subnet for them in ${e.id}.
|
|
281
|
+
# Either place them in a VPC / Subnet on the canvas, or point them at existing ones here.
|
|
282
|
+
${a.vpcId?`vpc_id = "CHANGE-ME" # e.g. "vpc-0123456789abcdef0"
|
|
283
|
+
`:""}${a.subnetIds?`subnet_ids = ["CHANGE-ME"] # e.g. ["subnet-0aaa...", "subnet-0bbb..."]
|
|
284
|
+
`:""}`:"",f=`# ============================================================================
|
|
285
|
+
# Environment Variable Values: ${e.name} (${e.id}.tfvars)
|
|
286
|
+
# Multi-Environment Matrix:
|
|
287
|
+
${u}
|
|
288
|
+
# ============================================================================
|
|
289
|
+
|
|
290
|
+
${l?`environment = "${e.id}"
|
|
291
|
+
aws_region = "${e.region}"`:`environment = "${e.id}"
|
|
292
|
+
aws_region = "${e.region}"
|
|
293
|
+
emulator_port = ${e.emulatorPort}
|
|
294
|
+
emulator_endpoint = "${e.emulatorEndpoint}"`}
|
|
295
|
+
|
|
296
|
+
default_tags = {
|
|
297
|
+
${s.map(([p,h])=>` ${p} = "${h}"`).join(`
|
|
298
|
+
`)}
|
|
299
|
+
}
|
|
300
|
+
${d}`;return{variablesTf:o,tfvars:f}}function uM(e,t,n,a,l,s,i,r,o,u,d,f){const p=e.data.serviceType,h=f==="aws",y=s.length>0||h,b=l?`aws_vpc.${Le(l.data.resourceName||l.data.label)}.id`:h?"var.vpc_id":`"vpc-default-${a}"`,x=s.length>0?`[${s.map(g=>`aws_subnet.${Le(g.data.resourceName||g.data.label)}.id`).join(", ")}]`:h?"var.subnet_ids":`["subnet-default-${a}-a", "subnet-default-${a}-b"]`,m=s.length>0?`aws_subnet.${Le(s[0].data.resourceName||s[0].data.label)}.id`:h?"var.subnet_ids[0]":`"subnet-default-${a}-a"`,_=i.length>0?`[${i.map(g=>`aws_security_group.${Le(g.data.resourceName||g.data.label)}.id`).join(", ")}]`:"[]";switch(p){case"aws_vpc":return`resource "aws_vpc" "${t}" {
|
|
301
|
+
cidr_block = "${n.cidr_block||"10.0.0.0/16"}"
|
|
302
|
+
instance_tenancy = "${n.instance_tenancy||"default"}"
|
|
303
|
+
enable_dns_support = ${!!(n.enable_dns_support??!0)}
|
|
304
|
+
enable_dns_hostnames = ${!!(n.enable_dns_hostnames??!0)}
|
|
305
|
+
assign_generated_ipv6_cidr_block = ${!!(n.assign_generated_ipv6_cidr_block??!1)}
|
|
306
|
+
|
|
307
|
+
tags = merge(local.common_tags, {
|
|
308
|
+
Name = "\${local.name_prefix}-${t}"
|
|
309
|
+
})${d}
|
|
310
|
+
}`;case"aws_subnet":return`resource "aws_subnet" "${t}" {
|
|
311
|
+
vpc_id = ${b}
|
|
312
|
+
cidr_block = "${n.cidr_block||"10.0.1.0/24"}"
|
|
313
|
+
availability_zone = "${n.availability_zone||"us-east-1a"}"
|
|
314
|
+
map_public_ip_on_launch = ${!!(n.map_public_ip_on_launch??!0)}
|
|
315
|
+
|
|
316
|
+
tags = merge(local.common_tags, {
|
|
317
|
+
Name = "\${local.name_prefix}-${t}"
|
|
318
|
+
Tier = "${n.tier||"public"}"
|
|
319
|
+
})${d}
|
|
320
|
+
}`;case"aws_internet_gateway":return`resource "aws_internet_gateway" "${t}" {
|
|
321
|
+
vpc_id = ${b}
|
|
322
|
+
|
|
323
|
+
tags = merge(local.common_tags, {
|
|
324
|
+
Name = "\${local.name_prefix}-${t}"
|
|
325
|
+
})${d}
|
|
326
|
+
}`;case"aws_nat_gateway":return`resource "aws_eip" "${t}_eip" {
|
|
327
|
+
domain = "vpc"
|
|
328
|
+
tags = merge(local.common_tags, {
|
|
329
|
+
Name = "\${local.name_prefix}-${t}-eip"
|
|
330
|
+
})
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
resource "aws_nat_gateway" "${t}" {
|
|
334
|
+
allocation_id = aws_eip.${t}_eip.id
|
|
335
|
+
subnet_id = ${m}
|
|
336
|
+
connectivity_type = "${n.connectivity_type||"public"}"
|
|
337
|
+
|
|
338
|
+
tags = merge(local.common_tags, {
|
|
339
|
+
Name = "\${local.name_prefix}-${t}"
|
|
340
|
+
})${d}
|
|
341
|
+
}`;case"aws_route_table":{const g=Object.values(u).find(w=>w.data.serviceType==="aws_internet_gateway"),v=g?`aws_internet_gateway.${Le(g.data.resourceName||g.data.label)}.id`:'"igw-local"';return`resource "aws_route_table" "${t}" {
|
|
342
|
+
vpc_id = ${b}
|
|
343
|
+
|
|
344
|
+
route {
|
|
345
|
+
cidr_block = "${n.default_cidr_block||"0.0.0.0/0"}"
|
|
346
|
+
gateway_id = ${v}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
tags = merge(local.common_tags, {
|
|
350
|
+
Name = "\${local.name_prefix}-${t}"
|
|
351
|
+
})${d}
|
|
352
|
+
}`}case"aws_security_group":return`resource "aws_security_group" "${t}" {
|
|
353
|
+
name = "\${local.name_prefix}-${t}"
|
|
354
|
+
description = "${n.description||"Managed by LocalCloud Studio"}"
|
|
355
|
+
vpc_id = ${b}
|
|
356
|
+
|
|
357
|
+
ingress {
|
|
358
|
+
description = "Primary Ingress Rule"
|
|
359
|
+
from_port = ${Number(n.ingress_port??443)}
|
|
360
|
+
to_port = ${Number(n.ingress_port??443)}
|
|
361
|
+
protocol = "${n.ingress_protocol||"tcp"}"
|
|
362
|
+
cidr_blocks = ["${n.ingress_cidr||"0.0.0.0/0"}"]
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
egress {
|
|
366
|
+
from_port = 0
|
|
367
|
+
to_port = 0
|
|
368
|
+
protocol = "-1"
|
|
369
|
+
cidr_blocks = ["0.0.0.0/0"]
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
tags = merge(local.common_tags, {
|
|
373
|
+
Name = "\${local.name_prefix}-${t}"
|
|
374
|
+
})${d}
|
|
375
|
+
}`;case"aws_lb":return`resource "aws_lb" "${t}" {
|
|
376
|
+
name = ${vn(t,32)}
|
|
377
|
+
internal = ${!!(n.internal??!1)}
|
|
378
|
+
load_balancer_type = "${n.load_balancer_type||"application"}"
|
|
379
|
+
subnets = ${x}
|
|
380
|
+
security_groups = ${_}
|
|
381
|
+
enable_deletion_protection = ${!!(n.enable_deletion_protection??!1)}
|
|
382
|
+
idle_timeout = ${Number(n.idle_timeout??60)}
|
|
383
|
+
|
|
384
|
+
tags = merge(local.common_tags, {
|
|
385
|
+
Name = "\${local.name_prefix}-${t}"
|
|
386
|
+
})${d}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
resource "aws_lb_target_group" "${t}_tg" {
|
|
390
|
+
name = ${vn(`${t}-tg`,32)}
|
|
391
|
+
port = ${Number(n.listener_port??80)}
|
|
392
|
+
protocol = "HTTP"
|
|
393
|
+
vpc_id = ${b}
|
|
394
|
+
target_type = "ip"
|
|
395
|
+
|
|
396
|
+
health_check {
|
|
397
|
+
enabled = true
|
|
398
|
+
path = "${n.health_check_path||"/health"}"
|
|
399
|
+
healthy_threshold = 2
|
|
400
|
+
unhealthy_threshold = 3
|
|
401
|
+
timeout = 5
|
|
402
|
+
interval = 30
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
resource "aws_lb_listener" "${t}_listener" {
|
|
407
|
+
load_balancer_arn = aws_lb.${t}.arn
|
|
408
|
+
port = ${Number(n.listener_port??80)}
|
|
409
|
+
protocol = "HTTP"
|
|
410
|
+
|
|
411
|
+
default_action {
|
|
412
|
+
type = "forward"
|
|
413
|
+
target_group_arn = aws_lb_target_group.${t}_tg.arn
|
|
414
|
+
}
|
|
415
|
+
}`;case"aws_apigatewayv2_api":return`resource "aws_apigatewayv2_api" "${t}" {
|
|
416
|
+
name = "\${local.name_prefix}-${t}"
|
|
417
|
+
protocol_type = "${n.protocol_type||"HTTP"}"
|
|
418
|
+
|
|
419
|
+
cors_configuration {
|
|
420
|
+
allow_origins = ["${n.cors_allow_origins||"*"}"]
|
|
421
|
+
allow_methods = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
|
|
422
|
+
allow_headers = ["content-type", "authorization", "x-amz-date"]
|
|
423
|
+
max_age = 300
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
tags = merge(local.common_tags, {
|
|
427
|
+
Name = "\${local.name_prefix}-${t}"
|
|
428
|
+
})${d}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
resource "aws_apigatewayv2_stage" "${t}_stage" {
|
|
432
|
+
api_id = aws_apigatewayv2_api.${t}.id
|
|
433
|
+
name = "${n.stage_name||"$default"}"
|
|
434
|
+
auto_deploy = ${!!(n.auto_deploy??!0)}
|
|
435
|
+
|
|
436
|
+
default_route_settings {
|
|
437
|
+
throttling_burst_limit = ${Number(n.throttling_burst_limit??5e3)}
|
|
438
|
+
throttling_rate_limit = ${Number(n.throttling_rate_limit??1e4)}
|
|
439
|
+
}
|
|
440
|
+
}`;case"aws_cloudfront_distribution":{const g=o.map(w=>u[w.target]).find(Boolean);let v=`"origin.${a}.localcloud.internal"`;if(g){const w=Le(g.data.resourceName||g.data.label);g.data.serviceType==="aws_s3_bucket"?v=`aws_s3_bucket.${w}.bucket_regional_domain_name`:g.data.serviceType==="aws_lb"?v=`aws_lb.${w}.dns_name`:g.data.serviceType==="aws_apigatewayv2_api"&&(v=`replace(aws_apigatewayv2_api.${w}.api_endpoint, "https://", "")`)}return`resource "aws_cloudfront_distribution" "${t}" {
|
|
441
|
+
enabled = ${!!(n.enabled??!0)}
|
|
442
|
+
is_ipv6_enabled = ${!!(n.is_ipv6_enabled??!0)}
|
|
443
|
+
default_root_object = "${n.default_root_object||"index.html"}"
|
|
444
|
+
price_class = "${n.price_class||"PriceClass_100"}"
|
|
445
|
+
|
|
446
|
+
origin {
|
|
447
|
+
domain_name = ${v}
|
|
448
|
+
origin_id = "${t}-primary-origin"
|
|
449
|
+
|
|
450
|
+
custom_origin_config {
|
|
451
|
+
http_port = 80
|
|
452
|
+
https_port = 443
|
|
453
|
+
origin_protocol_policy = "https-only"
|
|
454
|
+
origin_ssl_protocols = ["TLSv1.2"]
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
default_cache_behavior {
|
|
459
|
+
allowed_methods = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
|
|
460
|
+
cached_methods = ["GET", "HEAD"]
|
|
461
|
+
target_origin_id = "${t}-primary-origin"
|
|
462
|
+
viewer_protocol_policy = "${n.viewer_protocol_policy||"redirect-to-https"}"
|
|
463
|
+
|
|
464
|
+
forwarded_values {
|
|
465
|
+
query_string = true
|
|
466
|
+
cookies {
|
|
467
|
+
forward = "none"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
restrictions {
|
|
473
|
+
geo_restriction {
|
|
474
|
+
restriction_type = "none"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
viewer_certificate {
|
|
479
|
+
cloudfront_default_certificate = true
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
tags = merge(local.common_tags, {
|
|
483
|
+
Name = "\${local.name_prefix}-${t}"
|
|
484
|
+
})${d}
|
|
485
|
+
}`}case"aws_route53_zone":return`resource "aws_route53_zone" "${t}" {
|
|
486
|
+
name = "${n.domain_name||`${a}.localcloud.dev`}"
|
|
487
|
+
${n.private_zone?`
|
|
488
|
+
vpc {
|
|
489
|
+
vpc_id = ${b}
|
|
490
|
+
}`:""}
|
|
491
|
+
tags = merge(local.common_tags, {
|
|
492
|
+
Name = "\${local.name_prefix}-${t}"
|
|
493
|
+
})${d}
|
|
494
|
+
}`;case"aws_instance":return`resource "aws_instance" "${t}" {
|
|
495
|
+
ami = ${m0(n.ami,n.instance_type||"t3.micro")}
|
|
496
|
+
instance_type = "${n.instance_type||"t3.micro"}"
|
|
497
|
+
subnet_id = ${m}${s.length>0?`
|
|
498
|
+
availability_zone = aws_subnet.${Le(s[0].data.resourceName||s[0].data.label)}.availability_zone`:""}
|
|
499
|
+
vpc_security_group_ids = ${_}
|
|
500
|
+
associate_public_ip_address = ${!!(n.associate_public_ip_address??!1)}
|
|
501
|
+
monitoring = ${!!(n.monitoring??!1)}
|
|
502
|
+
|
|
503
|
+
root_block_device {
|
|
504
|
+
volume_size = ${Number(n.root_volume_size??20)}
|
|
505
|
+
volume_type = "${n.root_volume_type||"gp3"}"
|
|
506
|
+
encrypted = ${!!(n.ebs_encrypted??!0)}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
user_data = <<-EOF
|
|
510
|
+
${n.user_data||`#!/bin/bash
|
|
511
|
+
echo "Ready"`}
|
|
512
|
+
EOF
|
|
513
|
+
|
|
514
|
+
tags = merge(local.common_tags, {
|
|
515
|
+
Name = "\${local.name_prefix}-${t}"
|
|
516
|
+
})${d}
|
|
517
|
+
}`;case"aws_lambda_function":{let g={};try{g=typeof n.env_vars=="string"?JSON.parse(n.env_vars):n.env_vars||{}}catch{g={STAGE:a}}for(const N of o){const S=u[N.target];if(!S)continue;const A=Le(S.data.resourceName||S.data.label),k=A.toUpperCase();S.data.serviceType==="aws_dynamodb_table"?g[`${k}_TABLE_NAME`]=`\${aws_dynamodb_table.${A}.name}`:S.data.serviceType==="aws_sqs_queue"?g[`${k}_QUEUE_URL`]=`\${aws_sqs_queue.${A}.url}`:S.data.serviceType==="aws_s3_bucket"?g[`${k}_BUCKET_NAME`]=`\${aws_s3_bucket.${A}.id}`:S.data.serviceType==="aws_sns_topic"?g[`${k}_TOPIC_ARN`]=`\${aws_sns_topic.${A}.arn}`:S.data.serviceType==="aws_secretsmanager_secret"&&(g[`${k}_SECRET_ARN`]=`\${aws_secretsmanager_secret.${A}.arn}`)}const v=typeof n.claude_model_id=="string"?n.claude_model_id.trim():"";v&&(g.CLAUDE_MODEL_ID=v);const w=Object.entries(g).map(([N,S])=>` ${N} = "${S}"`).join(`
|
|
518
|
+
`);return`resource "aws_iam_role" "${t}_exec_role" {
|
|
519
|
+
name = "\${local.name_prefix}-${t}-role"
|
|
520
|
+
|
|
521
|
+
assume_role_policy = jsonencode({
|
|
522
|
+
Version = "2012-10-17"
|
|
523
|
+
Statement = [{
|
|
524
|
+
Action = "sts:AssumeRole"
|
|
525
|
+
Effect = "Allow"
|
|
526
|
+
Principal = {
|
|
527
|
+
Service = "lambda.amazonaws.com"
|
|
528
|
+
}
|
|
529
|
+
}]
|
|
530
|
+
})
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
resource "aws_lambda_function" "${t}" {
|
|
534
|
+
function_name = "\${local.name_prefix}-${t}"
|
|
535
|
+
role = aws_iam_role.${t}_exec_role.arn
|
|
536
|
+
runtime = "${n.runtime||"nodejs20.x"}"
|
|
537
|
+
handler = "${n.handler||"index.handler"}"
|
|
538
|
+
filename = "artifacts/${t}.zip"
|
|
539
|
+
source_code_hash = filebase64sha256("artifacts/${t}.zip")
|
|
540
|
+
memory_size = ${Number(n.memory_size??256)}
|
|
541
|
+
timeout = ${Number(n.timeout??30)}
|
|
542
|
+
architectures = ["${n.architectures||"arm64"}"]
|
|
543
|
+
reserved_concurrent_executions = ${Number(n.reserved_concurrent_executions??-1)}
|
|
544
|
+
|
|
545
|
+
tracing_config {
|
|
546
|
+
mode = "${n.tracing_mode||"PassThrough"}"
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
environment {
|
|
550
|
+
variables = {
|
|
551
|
+
ENVIRONMENT = var.environment
|
|
552
|
+
${w}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
tags = merge(local.common_tags, {
|
|
557
|
+
Name = "\${local.name_prefix}-${t}"
|
|
558
|
+
})${d}
|
|
559
|
+
}${v?`
|
|
560
|
+
|
|
561
|
+
# Lets the function call Claude through Amazon Bedrock's Messages API (bedrock-mantle endpoint)
|
|
562
|
+
resource "aws_iam_role_policy" "${t}_claude" {
|
|
563
|
+
name = "claude-bedrock"
|
|
564
|
+
role = aws_iam_role.${t}_exec_role.id
|
|
565
|
+
|
|
566
|
+
policy = jsonencode({
|
|
567
|
+
Version = "2012-10-17"
|
|
568
|
+
Statement = [{
|
|
569
|
+
Effect = "Allow"
|
|
570
|
+
Action = ["bedrock-mantle:CreateInference"]
|
|
571
|
+
Resource = "*"
|
|
572
|
+
}]
|
|
573
|
+
})
|
|
574
|
+
}`:""}`}case"aws_autoscaling_group":return`resource "aws_launch_template" "${t}_lt" {
|
|
575
|
+
name_prefix = "\${local.name_prefix}-${t}-"
|
|
576
|
+
image_id = ${m0(void 0,n.instance_type||"t3.medium")}
|
|
577
|
+
instance_type = "${n.instance_type||"t3.medium"}"
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
resource "aws_autoscaling_group" "${t}" {
|
|
581
|
+
name = "\${local.name_prefix}-${t}-asg"
|
|
582
|
+
min_size = ${Number(n.min_size??1)}
|
|
583
|
+
max_size = ${Number(n.max_size??4)}
|
|
584
|
+
desired_capacity = ${Number(n.desired_capacity??2)}
|
|
585
|
+
vpc_zone_identifier = ${x}
|
|
586
|
+
health_check_type = "${n.health_check_type||"ELB"}"
|
|
587
|
+
health_check_grace_period = ${Number(n.health_check_grace_period??300)}
|
|
588
|
+
|
|
589
|
+
launch_template {
|
|
590
|
+
id = aws_launch_template.${t}_lt.id
|
|
591
|
+
version = "$Latest"
|
|
592
|
+
}
|
|
593
|
+
}`;case"aws_ecs_service":return`resource "aws_ecs_cluster" "${t}_cluster" {
|
|
594
|
+
name = "\${local.name_prefix}-${t}-cluster"
|
|
595
|
+
|
|
596
|
+
setting {
|
|
597
|
+
name = "containerInsights"
|
|
598
|
+
value = "${a==="prod"||a==="staging"?"enabled":"disabled"}"
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
tags = local.common_tags
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
# Execution role: lets ECS pull the image and write logs
|
|
605
|
+
resource "aws_iam_role" "${t}_exec_role" {
|
|
606
|
+
name = "\${local.name_prefix}-${t}-exec-role"
|
|
607
|
+
|
|
608
|
+
assume_role_policy = jsonencode({
|
|
609
|
+
Version = "2012-10-17"
|
|
610
|
+
Statement = [{
|
|
611
|
+
Action = "sts:AssumeRole"
|
|
612
|
+
Effect = "Allow"
|
|
613
|
+
Principal = { Service = "ecs-tasks.amazonaws.com" }
|
|
614
|
+
}]
|
|
615
|
+
})
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
resource "aws_iam_role_policy_attachment" "${t}_exec_role" {
|
|
619
|
+
role = aws_iam_role.${t}_exec_role.name
|
|
620
|
+
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
# Task role: what the containers themselves may call
|
|
624
|
+
resource "aws_iam_role" "${t}_task_role" {
|
|
625
|
+
name = "\${local.name_prefix}-${t}-task-role"
|
|
626
|
+
|
|
627
|
+
assume_role_policy = jsonencode({
|
|
628
|
+
Version = "2012-10-17"
|
|
629
|
+
Statement = [{
|
|
630
|
+
Action = "sts:AssumeRole"
|
|
631
|
+
Effect = "Allow"
|
|
632
|
+
Principal = { Service = "ecs-tasks.amazonaws.com" }
|
|
633
|
+
}]
|
|
634
|
+
})
|
|
635
|
+
}
|
|
636
|
+
${n.enable_execute_command??!0?`
|
|
637
|
+
# ECS Exec needs the task to open SSM sessions
|
|
638
|
+
resource "aws_iam_role_policy" "${t}_task_exec_command" {
|
|
639
|
+
name = "ecs-exec"
|
|
640
|
+
role = aws_iam_role.${t}_task_role.id
|
|
641
|
+
|
|
642
|
+
policy = jsonencode({
|
|
643
|
+
Version = "2012-10-17"
|
|
644
|
+
Statement = [{
|
|
645
|
+
Effect = "Allow"
|
|
646
|
+
Action = [
|
|
647
|
+
"ssmmessages:CreateControlChannel",
|
|
648
|
+
"ssmmessages:CreateDataChannel",
|
|
649
|
+
"ssmmessages:OpenControlChannel",
|
|
650
|
+
"ssmmessages:OpenDataChannel"
|
|
651
|
+
]
|
|
652
|
+
Resource = "*"
|
|
653
|
+
}]
|
|
654
|
+
})
|
|
655
|
+
}
|
|
656
|
+
`:""}
|
|
657
|
+
resource "aws_ecs_task_definition" "${t}_task" {
|
|
658
|
+
family = "\${local.name_prefix}-${t}"
|
|
659
|
+
network_mode = "awsvpc"
|
|
660
|
+
requires_compatibilities = ["FARGATE"]
|
|
661
|
+
cpu = "${n.cpu||"256"}"
|
|
662
|
+
memory = "${n.memory||"512"}"
|
|
663
|
+
execution_role_arn = aws_iam_role.${t}_exec_role.arn
|
|
664
|
+
task_role_arn = aws_iam_role.${t}_task_role.arn
|
|
665
|
+
|
|
666
|
+
container_definitions = jsonencode([
|
|
667
|
+
{
|
|
668
|
+
name = "${t}"
|
|
669
|
+
image = "${n.container_image||"public.ecr.aws/nginx/nginx:stable-alpine"}"
|
|
670
|
+
essential = true
|
|
671
|
+
portMappings = [
|
|
672
|
+
{
|
|
673
|
+
containerPort = ${Number(n.container_port??80)}
|
|
674
|
+
hostPort = ${Number(n.container_port??80)}
|
|
675
|
+
protocol = "tcp"
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
environment = [
|
|
679
|
+
{ name = "ENVIRONMENT", value = var.environment }
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
])
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
resource "aws_ecs_service" "${t}" {
|
|
686
|
+
name = "\${local.name_prefix}-${t}"
|
|
687
|
+
cluster = aws_ecs_cluster.${t}_cluster.id
|
|
688
|
+
task_definition = aws_ecs_task_definition.${t}_task.arn
|
|
689
|
+
desired_count = ${Number(n.desired_count??2)}
|
|
690
|
+
launch_type = "FARGATE"
|
|
691
|
+
enable_execute_command = ${!!(n.enable_execute_command??!0)}
|
|
692
|
+
|
|
693
|
+
network_configuration {
|
|
694
|
+
subnets = ${x}
|
|
695
|
+
security_groups = ${_}
|
|
696
|
+
assign_public_ip = ${!!(n.assign_public_ip??!1)}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
tags = local.common_tags${d}
|
|
700
|
+
}`;case"aws_eks_cluster":return`resource "aws_iam_role" "${t}_eks_role" {
|
|
701
|
+
name = "\${local.name_prefix}-${t}-eks-role"
|
|
702
|
+
assume_role_policy = jsonencode({
|
|
703
|
+
Version = "2012-10-17"
|
|
704
|
+
Statement = [{
|
|
705
|
+
Action = "sts:AssumeRole"
|
|
706
|
+
Effect = "Allow"
|
|
707
|
+
Principal = { Service = "eks.amazonaws.com" }
|
|
708
|
+
}]
|
|
709
|
+
})
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
resource "aws_eks_cluster" "${t}" {
|
|
713
|
+
name = "\${local.name_prefix}-${t}"
|
|
714
|
+
role_arn = aws_iam_role.${t}_eks_role.arn
|
|
715
|
+
version = "${n.kubernetes_version||"1.31"}"
|
|
716
|
+
|
|
717
|
+
vpc_config {
|
|
718
|
+
subnet_ids = ${x}
|
|
719
|
+
endpoint_public_access = ${!!(n.endpoint_public_access??!0)}
|
|
720
|
+
endpoint_private_access = ${!!(n.endpoint_private_access??!0)}
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
tags = local.common_tags${d}
|
|
724
|
+
}`;case"aws_ecr_repository":return`resource "aws_ecr_repository" "${t}" {
|
|
725
|
+
name = "\${local.name_prefix}/${t}"
|
|
726
|
+
image_tag_mutability = "${n.image_tag_mutability||"MUTABLE"}"
|
|
727
|
+
force_delete = ${!!(n.force_delete??!0)}
|
|
728
|
+
|
|
729
|
+
image_scanning_configuration {
|
|
730
|
+
scan_on_push = ${!!(n.scan_on_push??!0)}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
tags = local.common_tags${d}
|
|
734
|
+
}`;case"aws_s3_bucket":{const g=[];return g.push(`resource "aws_s3_bucket" "${t}" {
|
|
735
|
+
bucket = ${vn(String(n.bucket_prefix||t),63)}
|
|
736
|
+
force_destroy = ${!!(n.force_destroy??!0)}
|
|
737
|
+
|
|
738
|
+
tags = merge(local.common_tags, {
|
|
739
|
+
Name = "\${local.name_prefix}-${t}"
|
|
740
|
+
})${d}
|
|
741
|
+
}`),g.push(`resource "aws_s3_bucket_versioning" "${t}_versioning" {
|
|
742
|
+
bucket = aws_s3_bucket.${t}.id
|
|
743
|
+
versioning_configuration {
|
|
744
|
+
status = "${n.versioning_enabled?"Enabled":"Suspended"}"
|
|
745
|
+
}
|
|
746
|
+
}`),g.push(`resource "aws_s3_bucket_server_side_encryption_configuration" "${t}_sse" {
|
|
747
|
+
bucket = aws_s3_bucket.${t}.id
|
|
748
|
+
rule {
|
|
749
|
+
apply_server_side_encryption_by_default {
|
|
750
|
+
sse_algorithm = "${n.sse_algorithm||"AES256"}"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}`),g.push(`resource "aws_s3_bucket_public_access_block" "${t}_pab" {
|
|
754
|
+
bucket = aws_s3_bucket.${t}.id
|
|
755
|
+
block_public_acls = ${!!(n.block_public_acls??!0)}
|
|
756
|
+
block_public_policy = ${!!(n.block_public_acls??!0)}
|
|
757
|
+
ignore_public_acls = ${!!(n.block_public_acls??!0)}
|
|
758
|
+
restrict_public_buckets = ${!!(n.block_public_acls??!0)}
|
|
759
|
+
}`),Number(n.lifecycle_expiration_days)>0&&g.push(`resource "aws_s3_bucket_lifecycle_configuration" "${t}_lifecycle" {
|
|
760
|
+
bucket = aws_s3_bucket.${t}.id
|
|
761
|
+
rule {
|
|
762
|
+
id = "auto-expire-objects"
|
|
763
|
+
status = "Enabled"
|
|
764
|
+
filter {}
|
|
765
|
+
expiration {
|
|
766
|
+
days = ${Number(n.lifecycle_expiration_days)}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}`),g.join(`
|
|
770
|
+
|
|
771
|
+
`)}case"aws_efs_file_system":return`resource "aws_efs_file_system" "${t}" {
|
|
772
|
+
creation_token = "\${local.name_prefix}-${t}"
|
|
773
|
+
performance_mode = "${n.performance_mode||"generalPurpose"}"
|
|
774
|
+
throughput_mode = "${n.throughput_mode||"bursting"}"
|
|
775
|
+
encrypted = ${!!(n.encrypted??!0)}
|
|
776
|
+
|
|
777
|
+
tags = merge(local.common_tags, {
|
|
778
|
+
Name = "\${local.name_prefix}-${t}"
|
|
779
|
+
})${d}
|
|
780
|
+
}`;case"aws_dynamodb_table":{const g=n.billing_mode==="PROVISIONED",v=!!(n.range_key&&String(n.range_key).trim());return`resource "aws_dynamodb_table" "${t}" {
|
|
781
|
+
name = "\${local.name_prefix}-${t}"
|
|
782
|
+
billing_mode = "${n.billing_mode||"PAY_PER_REQUEST"}"
|
|
783
|
+
hash_key = "${n.hash_key||"pk"}"
|
|
784
|
+
${v?` range_key = "${n.range_key}"
|
|
785
|
+
`:""}${g?` read_capacity = ${Number(n.read_capacity??5)}
|
|
786
|
+
write_capacity = ${Number(n.write_capacity??5)}
|
|
787
|
+
`:""} stream_enabled = ${!!(n.stream_enabled??!0)}
|
|
788
|
+
stream_view_type = "${n.stream_view_type||"NEW_AND_OLD_IMAGES"}"
|
|
789
|
+
|
|
790
|
+
attribute {
|
|
791
|
+
name = "${n.hash_key||"pk"}"
|
|
792
|
+
type = "${n.hash_key_type||"S"}"
|
|
793
|
+
}
|
|
794
|
+
${v?`
|
|
795
|
+
attribute {
|
|
796
|
+
name = "${n.range_key}"
|
|
797
|
+
type = "${n.range_key_type||"S"}"
|
|
798
|
+
}`:""}
|
|
799
|
+
|
|
800
|
+
point_in_time_recovery {
|
|
801
|
+
enabled = ${!!(n.point_in_time_recovery??!1)}
|
|
802
|
+
}
|
|
803
|
+
${n.ttl_attribute?`
|
|
804
|
+
ttl {
|
|
805
|
+
attribute_name = "${n.ttl_attribute}"
|
|
806
|
+
enabled = true
|
|
807
|
+
}`:""}
|
|
808
|
+
|
|
809
|
+
tags = merge(local.common_tags, {
|
|
810
|
+
Name = "\${local.name_prefix}-${t}"
|
|
811
|
+
})
|
|
812
|
+
|
|
813
|
+
# Not modeled on the canvas; AWS Emulator reports -1 here, which would otherwise diff on every plan
|
|
814
|
+
lifecycle {
|
|
815
|
+
ignore_changes = [on_demand_throughput]
|
|
816
|
+
}${d}
|
|
817
|
+
}`}case"aws_db_instance":return`${y?`resource "aws_db_subnet_group" "${t}_subnets" {
|
|
818
|
+
name = ${vn(`${t}-subnets`,255)}
|
|
819
|
+
subnet_ids = ${x}
|
|
820
|
+
|
|
821
|
+
tags = local.common_tags
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
`:""}resource "aws_db_instance" "${t}" {
|
|
825
|
+
identifier = ${vn(t,63)}
|
|
826
|
+
engine = "${n.engine||"postgres"}"
|
|
827
|
+
engine_version = "${n.engine_version||"16.3"}"
|
|
828
|
+
instance_class = "${n.instance_class||"db.t4g.micro"}"
|
|
829
|
+
allocated_storage = ${Number(n.allocated_storage??20)}
|
|
830
|
+
max_allocated_storage = ${Number(n.max_allocated_storage??100)}
|
|
831
|
+
db_name = "${n.db_name||"appdb"}"
|
|
832
|
+
username = "${n.username||"dbadmin"}"
|
|
833
|
+
manage_master_user_password = true
|
|
834
|
+
multi_az = ${!!(n.multi_az??!1)}
|
|
835
|
+
storage_encrypted = ${!!(n.storage_encrypted??!0)}
|
|
836
|
+
backup_retention_period = ${Number(n.backup_retention_period??7)}
|
|
837
|
+
skip_final_snapshot = ${!!(n.skip_final_snapshot??!0)}${n.skip_final_snapshot??!0?"":`
|
|
838
|
+
final_snapshot_identifier = ${vn(`${t}-final`,255)}`}
|
|
839
|
+
vpc_security_group_ids = ${_}${y?`
|
|
840
|
+
db_subnet_group_name = aws_db_subnet_group.${t}_subnets.name`:""}
|
|
841
|
+
|
|
842
|
+
tags = merge(local.common_tags, {
|
|
843
|
+
Name = "\${local.name_prefix}-${t}"
|
|
844
|
+
})${d}
|
|
845
|
+
}`;case"aws_elasticache_cluster":{const g=y?`resource "aws_elasticache_subnet_group" "${t}_subnets" {
|
|
846
|
+
name = ${vn(`${t}-subnets`,255)}
|
|
847
|
+
subnet_ids = ${x}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
`:"",v=y?`
|
|
851
|
+
subnet_group_name = aws_elasticache_subnet_group.${t}_subnets.name
|
|
852
|
+
security_group_ids = ${_}`:"";if(nw(p,n)){const w=Number(n.num_cache_nodes);return`${g}# Redis with more than one node: a primary plus replicas with automatic failover
|
|
853
|
+
resource "aws_elasticache_replication_group" "${t}" {
|
|
854
|
+
replication_group_id = ${vn(t,40)}
|
|
855
|
+
description = "${t} (${w} nodes)"
|
|
856
|
+
engine = "redis"
|
|
857
|
+
node_type = "${n.node_type||"cache.t4g.micro"}"
|
|
858
|
+
num_cache_clusters = ${w}
|
|
859
|
+
port = ${Number(n.port??6379)}
|
|
860
|
+
automatic_failover_enabled = true
|
|
861
|
+
multi_az_enabled = true${v}
|
|
862
|
+
|
|
863
|
+
tags = merge(local.common_tags, {
|
|
864
|
+
Name = "\${local.name_prefix}-${t}"
|
|
865
|
+
})${d}
|
|
866
|
+
}`}return`${g}resource "aws_elasticache_cluster" "${t}" {
|
|
867
|
+
cluster_id = ${vn(t,50)}
|
|
868
|
+
engine = "${n.engine||"redis"}"
|
|
869
|
+
node_type = "${n.node_type||"cache.t4g.micro"}"
|
|
870
|
+
num_cache_nodes = ${Number(n.num_cache_nodes??1)}
|
|
871
|
+
port = ${Number(n.port??6379)}${v}
|
|
872
|
+
|
|
873
|
+
tags = merge(local.common_tags, {
|
|
874
|
+
Name = "\${local.name_prefix}-${t}"
|
|
875
|
+
})${d}
|
|
876
|
+
}`}case"aws_sqs_queue":{const g=n.fifo_queue?".fifo":"";return`${n.enable_dlq?`resource "aws_sqs_queue" "${t}_dlq" {
|
|
877
|
+
name = "\${local.name_prefix}-${t}-dlq${g}"
|
|
878
|
+
fifo_queue = ${!!(n.fifo_queue??!1)}
|
|
879
|
+
message_retention_seconds = 1209600
|
|
880
|
+
sqs_managed_sse_enabled = true
|
|
881
|
+
tags = local.common_tags
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
`:""}resource "aws_sqs_queue" "${t}" {
|
|
885
|
+
name = "\${local.name_prefix}-${t}${g}"
|
|
886
|
+
fifo_queue = ${!!(n.fifo_queue??!1)}
|
|
887
|
+
visibility_timeout_seconds = ${Number(n.visibility_timeout_seconds??30)}
|
|
888
|
+
message_retention_seconds = ${Number(n.message_retention_seconds??345600)}
|
|
889
|
+
delay_seconds = ${Number(n.delay_seconds??0)}
|
|
890
|
+
receive_wait_time_seconds = ${Number(n.receive_wait_time_seconds??10)}
|
|
891
|
+
sqs_managed_sse_enabled = ${!!(n.sqs_managed_sse_enabled??!0)}
|
|
892
|
+
${n.enable_dlq?`
|
|
893
|
+
redrive_policy = jsonencode({
|
|
894
|
+
deadLetterTargetArn = aws_sqs_queue.${t}_dlq.arn
|
|
895
|
+
maxReceiveCount = 5
|
|
896
|
+
})`:""}
|
|
897
|
+
|
|
898
|
+
tags = merge(local.common_tags, {
|
|
899
|
+
Name = "\${local.name_prefix}-${t}"
|
|
900
|
+
})${d}
|
|
901
|
+
}`}case"aws_sns_topic":{const g=n.fifo_topic?".fifo":"";return`resource "aws_sns_topic" "${t}" {
|
|
902
|
+
name = "\${local.name_prefix}-${t}${g}"
|
|
903
|
+
display_name = "${n.display_name||t}"
|
|
904
|
+
fifo_topic = ${!!(n.fifo_topic??!1)}
|
|
905
|
+
content_based_deduplication = ${!!(n.content_based_deduplication??!1)}
|
|
906
|
+
|
|
907
|
+
tags = merge(local.common_tags, {
|
|
908
|
+
Name = "\${local.name_prefix}-${t}"
|
|
909
|
+
})${d}
|
|
910
|
+
}`}case"aws_cloudwatch_event_bus":return`resource "aws_cloudwatch_event_bus" "${t}" {
|
|
911
|
+
name = "\${local.name_prefix}-${t}"
|
|
912
|
+
tags = local.common_tags${d}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
resource "aws_cloudwatch_event_rule" "${t}_rule" {
|
|
916
|
+
name = "\${local.name_prefix}-${t}-rule"
|
|
917
|
+
event_bus_name = aws_cloudwatch_event_bus.${t}.name
|
|
918
|
+
event_pattern = jsonencode({
|
|
919
|
+
source = ["${n.event_pattern_source||"custom.app"}"]
|
|
920
|
+
})
|
|
921
|
+
}`;case"aws_sfn_state_machine":return`resource "aws_iam_role" "${t}_sfn_role" {
|
|
922
|
+
name = "\${local.name_prefix}-${t}-sfn-role"
|
|
923
|
+
assume_role_policy = jsonencode({
|
|
924
|
+
Version = "2012-10-17"
|
|
925
|
+
Statement = [{
|
|
926
|
+
Action = "sts:AssumeRole"
|
|
927
|
+
Effect = "Allow"
|
|
928
|
+
Principal = { Service = "states.amazonaws.com" }
|
|
929
|
+
}]
|
|
930
|
+
})
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
resource "aws_sfn_state_machine" "${t}" {
|
|
934
|
+
name = "\${local.name_prefix}-${t}"
|
|
935
|
+
role_arn = aws_iam_role.${t}_sfn_role.arn
|
|
936
|
+
type = "${n.type||"STANDARD"}"
|
|
937
|
+
|
|
938
|
+
definition = jsonencode({
|
|
939
|
+
Comment = "Compiled by LocalCloud Studio"
|
|
940
|
+
StartAt = "InvokePrimaryStep"
|
|
941
|
+
States = {
|
|
942
|
+
InvokePrimaryStep = {
|
|
943
|
+
Type = "Pass"
|
|
944
|
+
End = true
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
})
|
|
948
|
+
|
|
949
|
+
tracing_configuration {
|
|
950
|
+
enabled = ${!!(n.tracing_enabled??!0)}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
tags = local.common_tags${d}
|
|
954
|
+
}`;case"aws_iam_role":return`resource "aws_iam_role" "${t}" {
|
|
955
|
+
name = "\${local.name_prefix}-${t}"
|
|
956
|
+
max_session_duration = ${Number(n.max_session_duration??3600)}
|
|
957
|
+
|
|
958
|
+
assume_role_policy = jsonencode({
|
|
959
|
+
Version = "2012-10-17"
|
|
960
|
+
Statement = [{
|
|
961
|
+
Action = "sts:AssumeRole"
|
|
962
|
+
Effect = "Allow"
|
|
963
|
+
Principal = {
|
|
964
|
+
Service = "${n.principal_service||"lambda.amazonaws.com"}"
|
|
965
|
+
}
|
|
966
|
+
}]
|
|
967
|
+
})
|
|
968
|
+
|
|
969
|
+
tags = local.common_tags${d}
|
|
970
|
+
}`;case"aws_kms_key":return`resource "aws_kms_key" "${t}" {
|
|
971
|
+
description = "KMS Master Key for ${t} (\${var.environment})"
|
|
972
|
+
key_usage = "${n.key_usage||"ENCRYPT_DECRYPT"}"
|
|
973
|
+
enable_key_rotation = ${!!(n.enable_key_rotation??!0)}
|
|
974
|
+
deletion_window_in_days = ${Number(n.deletion_window_in_days??7)}
|
|
975
|
+
|
|
976
|
+
tags = local.common_tags${d}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
resource "aws_kms_alias" "${t}_alias" {
|
|
980
|
+
name = "alias/\${local.name_prefix}-${n.alias_name||t}"
|
|
981
|
+
target_key_id = aws_kms_key.${t}.key_id
|
|
982
|
+
}`;case"aws_secretsmanager_secret":return`resource "aws_secretsmanager_secret" "${t}" {
|
|
983
|
+
name = "\${local.name_prefix}/${n.secret_prefix||t}"
|
|
984
|
+
recovery_window_in_days = ${Number(n.recovery_window_in_days??0)}
|
|
985
|
+
|
|
986
|
+
tags = local.common_tags${d}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
resource "aws_secretsmanager_secret_version" "${t}_val" {
|
|
990
|
+
secret_id = aws_secretsmanager_secret.${t}.id
|
|
991
|
+
secret_string = ${JSON.stringify(n.secret_json||'{"key":"value"}')}
|
|
992
|
+
}`;case"aws_cognito_user_pool":return`resource "aws_cognito_user_pool" "${t}" {
|
|
993
|
+
name = "\${local.name_prefix}-${t}"
|
|
994
|
+
mfa_configuration = "${n.mfa_configuration||"OFF"}"
|
|
995
|
+
auto_verified_attributes = ${n.auto_verified_attributes?'["email"]':"[]"}
|
|
996
|
+
${(n.mfa_configuration||"OFF")!=="OFF"?`
|
|
997
|
+
software_token_mfa_configuration {
|
|
998
|
+
enabled = true
|
|
999
|
+
}
|
|
1000
|
+
`:""}
|
|
1001
|
+
password_policy {
|
|
1002
|
+
minimum_length = ${Number(n.password_minimum_length??8)}
|
|
1003
|
+
require_lowercase = true
|
|
1004
|
+
require_numbers = true
|
|
1005
|
+
require_symbols = false
|
|
1006
|
+
require_uppercase = true
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
tags = local.common_tags${d}
|
|
1010
|
+
}${n.create_app_client?`
|
|
1011
|
+
|
|
1012
|
+
resource "aws_cognito_user_pool_client" "${t}_client" {
|
|
1013
|
+
name = "\${local.name_prefix}-${t}-web-client"
|
|
1014
|
+
user_pool_id = aws_cognito_user_pool.${t}.id
|
|
1015
|
+
explicit_auth_flows = [
|
|
1016
|
+
"ALLOW_USER_PASSWORD_AUTH",
|
|
1017
|
+
"ALLOW_REFRESH_TOKEN_AUTH",
|
|
1018
|
+
"ALLOW_USER_SRP_AUTH"
|
|
1019
|
+
]
|
|
1020
|
+
}`:""}`;case"aws_cloudwatch_log_group":return`resource "aws_cloudwatch_log_group" "${t}" {
|
|
1021
|
+
name = "${n.log_group_prefix||"/aws/localcloud"}/\${var.environment}/${t}"
|
|
1022
|
+
retention_in_days = ${Number(n.retention_in_days??14)}
|
|
1023
|
+
|
|
1024
|
+
tags = local.common_tags${d}
|
|
1025
|
+
}`;case"aws_ssm_parameter":return`resource "aws_ssm_parameter" "${t}" {
|
|
1026
|
+
name = "/\${var.environment}${n.param_name||`/app/${t}`}"
|
|
1027
|
+
type = "${n.param_type||"String"}"
|
|
1028
|
+
value = ${JSON.stringify(n.param_value||"enabled")}
|
|
1029
|
+
|
|
1030
|
+
tags = local.common_tags${d}
|
|
1031
|
+
}`;case"aws_kinesis_stream":return`resource "aws_kinesis_stream" "${t}" {
|
|
1032
|
+
name = "\${local.name_prefix}-${t}"
|
|
1033
|
+
retention_period = ${Number(n.retention_period??24)}
|
|
1034
|
+
${n.stream_mode==="PROVISIONED"?` shard_count = ${Number(n.shard_count??1)}`:""}
|
|
1035
|
+
stream_mode_details {
|
|
1036
|
+
stream_mode = "${n.stream_mode||"ON_DEMAND"}"
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
tags = local.common_tags${d}
|
|
1040
|
+
}`;case"aws_opensearch_domain":return`resource "aws_opensearch_domain" "${t}" {
|
|
1041
|
+
domain_name = ${vn(t,28)}
|
|
1042
|
+
engine_version = "${n.engine_version||"OpenSearch_2.15"}"
|
|
1043
|
+
|
|
1044
|
+
cluster_config {
|
|
1045
|
+
instance_type = "${n.instance_type||"t3.small.search"}"
|
|
1046
|
+
instance_count = ${Number(n.instance_count??1)}
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
ebs_options {
|
|
1050
|
+
ebs_enabled = true
|
|
1051
|
+
volume_size = ${Number(n.ebs_volume_size??20)}
|
|
1052
|
+
volume_type = "gp3"
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
tags = local.common_tags${d}
|
|
1056
|
+
}`;case"aws_bedrock_agent":return`resource "aws_iam_role" "${t}_agent_role" {
|
|
1057
|
+
name = "\${local.name_prefix}-${t}-agent-role"
|
|
1058
|
+
|
|
1059
|
+
assume_role_policy = jsonencode({
|
|
1060
|
+
Version = "2012-10-17"
|
|
1061
|
+
Statement = [{
|
|
1062
|
+
Action = "sts:AssumeRole"
|
|
1063
|
+
Effect = "Allow"
|
|
1064
|
+
Principal = {
|
|
1065
|
+
Service = "bedrock.amazonaws.com"
|
|
1066
|
+
}
|
|
1067
|
+
}]
|
|
1068
|
+
})
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
resource "aws_bedrockagent_agent" "${t}" {
|
|
1072
|
+
agent_name = "\${local.name_prefix}-${t}"
|
|
1073
|
+
agent_resource_role_arn = aws_iam_role.${t}_agent_role.arn
|
|
1074
|
+
foundation_model = "${n.foundation_model||"anthropic.claude-3-5-sonnet-20241022-v2:0"}"
|
|
1075
|
+
instruction = ${JSON.stringify(n.instruction||"You are an AWS cloud infrastructure AI assistant.")}
|
|
1076
|
+
idle_session_ttl_in_seconds = ${Number(n.idle_session_ttl_in_seconds??600)}
|
|
1077
|
+
|
|
1078
|
+
tags = local.common_tags${d}
|
|
1079
|
+
}`;default:return`# Unmapped service ${p} (${t})`}}function dM(e,t,n){var l;const a=[];for(const s of e){const i=t[s.source],r=t[s.target];if(!i||!r)continue;const o=Le(i.data.resourceName||i.data.label),u=Le(r.data.resourceName||r.data.label),d=i.data.serviceType,f=r.data.serviceType;d==="aws_apigatewayv2_api"&&f==="aws_lambda_function"&&a.push(`resource "aws_apigatewayv2_integration" "${o}_to_${u}" {
|
|
1080
|
+
api_id = aws_apigatewayv2_api.${o}.id
|
|
1081
|
+
integration_type = "AWS_PROXY"
|
|
1082
|
+
integration_uri = aws_lambda_function.${u}.invoke_arn
|
|
1083
|
+
payload_format_version = "2.0"
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
resource "aws_apigatewayv2_route" "${o}_route_${u}" {
|
|
1087
|
+
api_id = aws_apigatewayv2_api.${o}.id
|
|
1088
|
+
route_key = "${(l=s.data)!=null&&l.label&&s.data.label.includes("/")?s.data.label:`ANY /${u}/{proxy+}`}"
|
|
1089
|
+
target = "integrations/\${aws_apigatewayv2_integration.${o}_to_${u}.id}"
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
resource "aws_lambda_permission" "${o}_invoke_${u}" {
|
|
1093
|
+
statement_id = "AllowExecutionFromAPIGateway-${o}"
|
|
1094
|
+
action = "lambda:InvokeFunction"
|
|
1095
|
+
function_name = aws_lambda_function.${u}.function_name
|
|
1096
|
+
principal = "apigateway.amazonaws.com"
|
|
1097
|
+
source_arn = "\${aws_apigatewayv2_api.${o}.execution_arn}/*/*"
|
|
1098
|
+
}`),d==="aws_sqs_queue"&&f==="aws_lambda_function"&&a.push(`resource "aws_iam_role_policy" "${u}_consume_${o}" {
|
|
1099
|
+
name = "${u}-consume-${o}"
|
|
1100
|
+
role = aws_iam_role.${u}_exec_role.id
|
|
1101
|
+
|
|
1102
|
+
policy = jsonencode({
|
|
1103
|
+
Version = "2012-10-17"
|
|
1104
|
+
Statement = [{
|
|
1105
|
+
Effect = "Allow"
|
|
1106
|
+
Action = ["sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes", "sqs:ChangeMessageVisibility"]
|
|
1107
|
+
Resource = aws_sqs_queue.${o}.arn
|
|
1108
|
+
}]
|
|
1109
|
+
})
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
resource "aws_lambda_event_source_mapping" "${o}_trigger_${u}" {
|
|
1113
|
+
event_source_arn = aws_sqs_queue.${o}.arn
|
|
1114
|
+
function_name = aws_lambda_function.${u}.arn
|
|
1115
|
+
batch_size = 10
|
|
1116
|
+
enabled = true
|
|
1117
|
+
depends_on = [aws_iam_role_policy.${u}_consume_${o}]
|
|
1118
|
+
}`),d==="aws_kinesis_stream"&&f==="aws_lambda_function"&&a.push(`resource "aws_iam_role_policy" "${u}_consume_${o}" {
|
|
1119
|
+
name = "${u}-consume-${o}"
|
|
1120
|
+
role = aws_iam_role.${u}_exec_role.id
|
|
1121
|
+
|
|
1122
|
+
policy = jsonencode({
|
|
1123
|
+
Version = "2012-10-17"
|
|
1124
|
+
Statement = [{
|
|
1125
|
+
Effect = "Allow"
|
|
1126
|
+
Action = ["kinesis:GetRecords", "kinesis:GetShardIterator", "kinesis:DescribeStream", "kinesis:DescribeStreamSummary", "kinesis:ListShards", "kinesis:ListStreams"]
|
|
1127
|
+
Resource = aws_kinesis_stream.${o}.arn
|
|
1128
|
+
}]
|
|
1129
|
+
})
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
resource "aws_lambda_event_source_mapping" "${o}_stream_${u}" {
|
|
1133
|
+
event_source_arn = aws_kinesis_stream.${o}.arn
|
|
1134
|
+
function_name = aws_lambda_function.${u}.arn
|
|
1135
|
+
starting_position = "LATEST"
|
|
1136
|
+
batch_size = 100
|
|
1137
|
+
depends_on = [aws_iam_role_policy.${u}_consume_${o}]
|
|
1138
|
+
}`),d==="aws_sns_topic"&&f==="aws_sqs_queue"&&a.push(`resource "aws_sns_topic_subscription" "${o}_sub_${u}" {
|
|
1139
|
+
topic_arn = aws_sns_topic.${o}.arn
|
|
1140
|
+
protocol = "sqs"
|
|
1141
|
+
endpoint = aws_sqs_queue.${u}.arn
|
|
1142
|
+
}`),d==="aws_sns_topic"&&f==="aws_lambda_function"&&a.push(`resource "aws_sns_topic_subscription" "${o}_sub_${u}" {
|
|
1143
|
+
topic_arn = aws_sns_topic.${o}.arn
|
|
1144
|
+
protocol = "lambda"
|
|
1145
|
+
endpoint = aws_lambda_function.${u}.arn
|
|
1146
|
+
}`),d==="aws_lambda_function"&&(f==="aws_dynamodb_table"?a.push(`resource "aws_iam_role_policy" "${o}_ddb_${u}" {
|
|
1147
|
+
name = "${o}-ddb-${u}"
|
|
1148
|
+
role = aws_iam_role.${o}_exec_role.id
|
|
1149
|
+
policy = jsonencode({
|
|
1150
|
+
Version = "2012-10-17"
|
|
1151
|
+
Statement = [{
|
|
1152
|
+
Effect = "Allow"
|
|
1153
|
+
Action = ["dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:Query", "dynamodb:Scan"]
|
|
1154
|
+
Resource = [aws_dynamodb_table.${u}.arn, "\${aws_dynamodb_table.${u}.arn}/index/*"]
|
|
1155
|
+
}]
|
|
1156
|
+
})
|
|
1157
|
+
}`):f==="aws_s3_bucket"?a.push(`resource "aws_iam_role_policy" "${o}_s3_${u}" {
|
|
1158
|
+
name = "${o}-s3-${u}"
|
|
1159
|
+
role = aws_iam_role.${o}_exec_role.id
|
|
1160
|
+
policy = jsonencode({
|
|
1161
|
+
Version = "2012-10-17"
|
|
1162
|
+
Statement = [{
|
|
1163
|
+
Effect = "Allow"
|
|
1164
|
+
Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket"]
|
|
1165
|
+
Resource = [aws_s3_bucket.${u}.arn, "\${aws_s3_bucket.${u}.arn}/*"]
|
|
1166
|
+
}]
|
|
1167
|
+
})
|
|
1168
|
+
}`):f==="aws_sqs_queue"&&a.push(`resource "aws_iam_role_policy" "${o}_sqs_${u}" {
|
|
1169
|
+
name = "${o}-sqs-${u}"
|
|
1170
|
+
role = aws_iam_role.${o}_exec_role.id
|
|
1171
|
+
policy = jsonencode({
|
|
1172
|
+
Version = "2012-10-17"
|
|
1173
|
+
Statement = [{
|
|
1174
|
+
Effect = "Allow"
|
|
1175
|
+
Action = ["sqs:SendMessage", "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes"]
|
|
1176
|
+
Resource = [aws_sqs_queue.${u}.arn]
|
|
1177
|
+
}]
|
|
1178
|
+
})
|
|
1179
|
+
}`))}return a}function fM(e,t){const n=[`# ============================================================================
|
|
1180
|
+
# Compiled Terraform Outputs
|
|
1181
|
+
# ============================================================================`];for(const a of e){const l=De[a.data.serviceType];if(!l||!l.outputs.length)continue;const s=Le(a.data.resourceName||a.data.label),i=Pm(a,Ft(a,t))==="aws_elasticache_replication_group"?[{name:"primary_endpoint",tfExpression:r=>`aws_elasticache_replication_group.${r}.primary_endpoint_address`,description:"Redis primary endpoint"}]:l.outputs;for(const r of i)n.push(`output "${s}_${r.name}" {
|
|
1182
|
+
description = "${r.description} (${a.data.label})"
|
|
1183
|
+
value = ${r.tfExpression(s)}
|
|
1184
|
+
}`)}return n.join(`
|
|
1185
|
+
|
|
1186
|
+
`)+`
|
|
1187
|
+
`}function pM(){return`# ============================================================================
|
|
1188
|
+
# AWS Emulator Official Container Image (https://github.com/aws/aws-emulator)
|
|
1189
|
+
# Supports x86_64 and Apple Silicon (aarch64)
|
|
1190
|
+
# ============================================================================
|
|
1191
|
+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal
|
|
1192
|
+
ARG TARGETARCH=aarch64
|
|
1193
|
+
ADD https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator-aarch64.rpm /tmp/aws-emulator.rpm
|
|
1194
|
+
RUN rpm -i /tmp/aws-emulator.rpm && rm /tmp/aws-emulator.rpm \\
|
|
1195
|
+
&& mkdir -p /home/emulator && chown 1000 /home/emulator
|
|
1196
|
+
USER 1000
|
|
1197
|
+
ENV HOME=/home/emulator
|
|
1198
|
+
EXPOSE 9297 9298 9299 9300
|
|
1199
|
+
ENTRYPOINT ["aws-emulator", "-b", "0.0.0.0"]
|
|
1200
|
+
`}function mM(e){return`# ============================================================================
|
|
1201
|
+
# Multi-Environment AWS Emulator Cluster (dev, testing, staging, prod)
|
|
1202
|
+
# Each environment runs an isolated in-memory AWS Emulator on its dedicated port
|
|
1203
|
+
# ============================================================================
|
|
1204
|
+
services:
|
|
1205
|
+
${Object.values(e).map(n=>{const a=n.emulatorTelemetry?"on":"off",l=n.emulatorAuth?"on":"off";return` aws-emulator-${n.id}:
|
|
1206
|
+
build:
|
|
1207
|
+
context: .
|
|
1208
|
+
dockerfile: Dockerfile.emulator
|
|
1209
|
+
image: aws-emulator:local
|
|
1210
|
+
container_name: localcloud-aws-emulator-${n.id}
|
|
1211
|
+
ports:
|
|
1212
|
+
- "127.0.0.1:${n.emulatorPort}:${n.emulatorPort}"
|
|
1213
|
+
environment:
|
|
1214
|
+
- HOME=\${HOME}
|
|
1215
|
+
- EMULATOR_TELEMETRY=${a}
|
|
1216
|
+
volumes:
|
|
1217
|
+
- "\${HOME}/.aws/emulator:\${HOME}/.aws/emulator"
|
|
1218
|
+
command: ["-p", "${n.emulatorPort}", "--telemetry", "${a}", "--auth", "${l}"]
|
|
1219
|
+
deploy:
|
|
1220
|
+
resources:
|
|
1221
|
+
limits:
|
|
1222
|
+
memory: 2G`}).join(`
|
|
1223
|
+
|
|
1224
|
+
`)}
|
|
1225
|
+
`}function hM(e,t){const n=e.emulatorPort,a=Object.values(t).map(l=>`# ${l.id.padEnd(8)} -> Port ${l.emulatorPort} (${l.region})`).join(`
|
|
1226
|
+
`);return`#!/usr/bin/env bash
|
|
1227
|
+
# ============================================================================
|
|
1228
|
+
# LocalCloud Studio — AWS Emulator Launcher & SDK Environment Setup
|
|
1229
|
+
# Active Environment: ${e.name} (${e.id})
|
|
1230
|
+
#
|
|
1231
|
+
# Multi-Environment Port Allocation:
|
|
1232
|
+
${a}
|
|
1233
|
+
# ============================================================================
|
|
1234
|
+
set -euo pipefail
|
|
1235
|
+
|
|
1236
|
+
PORT=${n}
|
|
1237
|
+
REGION="${e.region}"
|
|
1238
|
+
ENV_NAME="${e.id}"
|
|
1239
|
+
|
|
1240
|
+
mkdir -p "$HOME/.aws/emulator"
|
|
1241
|
+
|
|
1242
|
+
echo "🚀 Configuring shell for AWS Emulator [$ENV_NAME] on https://127.0.0.1:$PORT ($REGION)..."
|
|
1243
|
+
|
|
1244
|
+
# 1. Export AWS SDK / CLI / Terraform environment variables for aws-emulator
|
|
1245
|
+
export AWS_ENDPOINT_URL="https://127.0.0.1:$PORT"
|
|
1246
|
+
export AWS_SHARED_CREDENTIALS_FILE="$HOME/.aws/emulator/$PORT/emulator_credentials"
|
|
1247
|
+
export AWS_CONFIG_FILE="$HOME/.aws/emulator/$PORT/config"
|
|
1248
|
+
export AWS_CA_BUNDLE="$HOME/.aws/emulator/$PORT/ca.pem"
|
|
1249
|
+
export NODE_EXTRA_CA_CERTS="$HOME/.aws/emulator/$PORT/ca.pem"
|
|
1250
|
+
export AWS_EC2_METADATA_DISABLED="true"
|
|
1251
|
+
export AWS_DISABLE_HOST_PREFIX_INJECTION="true"
|
|
1252
|
+
export AWS_REGION="$REGION"
|
|
1253
|
+
export AWS_DEFAULT_REGION="$REGION"
|
|
1254
|
+
export EMULATOR_TELEMETRY="${e.emulatorTelemetry?"on":"off"}"
|
|
1255
|
+
|
|
1256
|
+
# 2. Unset real AWS credentials so requests are signed with emulator keys
|
|
1257
|
+
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILE || true
|
|
1258
|
+
|
|
1259
|
+
# 3. Health check helper
|
|
1260
|
+
check_health() {
|
|
1261
|
+
curl -sf --cacert "$HOME/.aws/emulator/$PORT/ca.pem" "https://127.0.0.1:$PORT/__admin/health" >/dev/null 2>&1
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
if check_health; then
|
|
1265
|
+
echo "✅ AWS Emulator [$ENV_NAME] is healthy on https://127.0.0.1:$PORT"
|
|
1266
|
+
else
|
|
1267
|
+
echo "⚠️ AWS Emulator is not running yet on port $PORT. Start it via Docker:"
|
|
1268
|
+
echo " docker run --rm -d --name aws-emulator-$ENV_NAME --memory=2g --memory-swap=2g \\\\"
|
|
1269
|
+
echo " -p 127.0.0.1:$PORT:$PORT -e HOME="$HOME" \\\\"
|
|
1270
|
+
echo " -v "$HOME/.aws/emulator:$HOME/.aws/emulator" \\\\"
|
|
1271
|
+
echo " aws-emulator -p $PORT --telemetry ${e.emulatorTelemetry?"on":"off"}"
|
|
1272
|
+
fi
|
|
1273
|
+
|
|
1274
|
+
# 4. Run Terraform against this environment
|
|
1275
|
+
echo ""
|
|
1276
|
+
echo "📦 To provision [${e.id}] infrastructure into AWS Emulator:"
|
|
1277
|
+
echo " terraform init"
|
|
1278
|
+
echo " terraform apply -var-file="${e.id}.tfvars" -auto-approve"
|
|
1279
|
+
`}const Uo="terraform-aws",gM=["backend.tfbackend"],yM=["dev","testing","staging","prod"];function vM(e,t,n){var l;const a=[];for(const s of yM){const i=n[s],r=Ws(e,t,i,n,"aws"),o=[/\bvar\.vpc_id\b/.test(r.mainTf)&&"vpc_id",/\bvar\.subnet_ids\b/.test(r.mainTf)&&"subnet_ids"].filter(Boolean);o.length>0&&a.push({envId:s,message:`Some resources have no VPC or Subnet on the canvas. Set ${o.join(" and ")} in the environment's .tfvars, or place them in one.`});for(const u of e){if(u.data.serviceType!=="aws_subnet"||((l=u.data.envEnabled)==null?void 0:l[s])===!1)continue;const d=String(Ft(u,s).availability_zone||"");d&&!d.startsWith(i.region)&&a.push({envId:s,nodeId:u.id,message:`Subnet ${Le(u.data.resourceName||u.data.label)} uses ${d}, but ${s} is in ${i.region}. Override its availability zone for ${s}.`})}}return a}function _M(e){const t=new Map;for(const n of e){const a=`${n.nodeId||""}\0${n.message}`,l=t.get(a);l?l.envIds.push(n.envId):t.set(a,{envIds:[n.envId],nodeId:n.nodeId,message:n.message})}return[...t.values()]}function bM(e,t,n){var r,o;const a=new Set(n.resources.map(u=>`${u.type}.${u.name}`)),l={},s={},i=e.map(u=>({node:u,resName:Le(u.data.resourceName||u.data.label)})).sort((u,d)=>d.resName.length-u.resName.length);for(const{node:u,resName:d}of i){const f=Pm(u,Ft(u,t)),p=((r=u.data.envEnabled)==null?void 0:r[t])!==!1&&a.has(`${f}.${d}`),h=(o=u.data.provisioningStatus)==null?void 0:o[t];l[u.id]=p?"provisioned":h==="failed"?"failed":"unapplied",s[u.id]=void 0}for(const[u,d]of Object.entries(n.outputs)){const f=i.find(p=>u.startsWith(`${p.resName}_`));!f||l[f.node.id]!=="provisioned"||(s[f.node.id]={...s[f.node.id]||{},[u.slice(f.resName.length+1)]:d})}return{status:l,outputs:s}}const xM=new Set(["aws_subnet","aws_internet_gateway","aws_nat_gateway","aws_route_table","aws_security_group","aws_lb","aws_route53_zone","aws_instance","aws_autoscaling_group","aws_ecs_service","aws_eks_cluster","aws_db_instance","aws_elasticache_cluster"]),xd=new Set(["aws_vpc","aws_subnet","aws_security_group"]),wd=new Set(["aws_lambda_function","aws_ecs_service","aws_instance","aws_autoscaling_group","aws_eks_cluster","aws_sfn_state_machine","aws_bedrock_agent"]),h0={aws_apigatewayv2_api:["aws_lambda_function","aws_sfn_state_machine","aws_sqs_queue","aws_sns_topic","aws_lb"],aws_sqs_queue:["aws_lambda_function","aws_sfn_state_machine","aws_ecs_service"],aws_sns_topic:["aws_lambda_function","aws_sqs_queue"],aws_kinesis_stream:["aws_lambda_function","aws_ecs_service"],aws_cloudwatch_event_bus:["aws_lambda_function","aws_sqs_queue","aws_sns_topic","aws_sfn_state_machine"],aws_dynamodb_table:["aws_lambda_function"],aws_s3_bucket:["aws_lambda_function","aws_sqs_queue","aws_sns_topic"],aws_cloudfront_distribution:["aws_s3_bucket","aws_lb","aws_apigatewayv2_api","aws_lambda_function"],aws_lb:["aws_lambda_function","aws_ecs_service","aws_instance","aws_autoscaling_group","aws_eks_cluster"],aws_route53_zone:["aws_cloudfront_distribution","aws_lb","aws_apigatewayv2_api"],aws_cognito_user_pool:["aws_apigatewayv2_api","aws_lb","aws_lambda_function"],aws_ecr_repository:["aws_ecs_service","aws_eks_cluster","aws_lambda_function"]},wM=new Set(["aws_cloudfront_distribution","aws_lb","aws_route53_zone","aws_apigatewayv2_api","aws_cognito_user_pool"]),SM=new Set(["aws_apigatewayv2_api","aws_sqs_queue","aws_sns_topic","aws_kinesis_stream","aws_cloudwatch_event_bus","aws_dynamodb_table","aws_s3_bucket"]),NM=new Set(["aws_dynamodb_table","aws_s3_bucket","aws_secretsmanager_secret","aws_kms_key"]),tl=e=>{var t;return((t=De[e])==null?void 0:t.shortName)||e};function rp(e,t,n){if(!e||!t)return{ok:!1,reason:"Connect two resources."};if(e.id===t.id)return{ok:!1,reason:"A resource can’t connect to itself."};if(n.some(i=>i.source===e.id&&i.target===t.id))return{ok:!1,reason:`${e.data.label} is already connected to ${t.data.label}.`};const a=e.data.serviceType,l=t.data.serviceType;return xd.has(l)&&!(a==="aws_vpc"&&l==="aws_subnet")&&!(a==="aws_vpc"&&l==="aws_security_group")?{ok:!1,reason:`Nothing connects into a ${tl(l)}. Draw from the ${tl(l)} to the resource, or drop the resource inside it.`}:xd.has(a)?a==="aws_vpc"&&(l==="aws_subnet"||l==="aws_security_group")?{ok:!0,relationshipType:"network_attachment",label:"VPC Network"}:xM.has(l)?{ok:!0,relationshipType:"network_attachment",label:"VPC Network"}:{ok:!1,reason:`${tl(l)} isn't placed in a network, so a ${tl(a)} has nothing to attach to.`}:(wd.has(a)?!xd.has(l)&&!wM.has(l):(h0[a]||[]).includes(l))?SM.has(a)&&!wd.has(a)?{ok:!0,relationshipType:"event_trigger",label:"Event Trigger"}:a==="aws_lb"||a==="aws_cloudfront_distribution"||a==="aws_route53_zone"?{ok:!0,relationshipType:"target_route",label:"Route Traffic"}:NM.has(l)?{ok:!0,relationshipType:"iam_grant",label:"IAM Policy & Data"}:{ok:!0,relationshipType:"data_flow",label:"Connects To"}:{ok:!1,reason:h0[a]||wd.has(a)?`${tl(a)} → ${tl(l)} doesn't mean anything to AWS. Draw from the caller to what it calls.`:`${tl(a)} doesn't call other services. Draw the connection from whatever uses it.`}}const op={"{":"}","[":"]","(":")"},Xm=/^<<-?([A-Za-z_]\w*)[ \t]*\r?\n/;function Hi(e,t){const n=e.indexOf(`
|
|
1280
|
+
`,t);return n===-1?e.length:n}function aw(e,t){const n=e.indexOf("*/",t+2);return n===-1?e.length:n+2}function lw(e,t){const n=Xm.exec(e.slice(t));if(!n)return t+2;let a=t+n[0].length;for(;a<e.length;){const l=Hi(e,a);if(e.slice(a,l).trim()===n[1])return l;a=l+1}return e.length}function Zm(e,t){let n=t+1;for(;n<e.length;){const a=e[n];if(a==="\\")n+=2;else{if(a==='"')return n+1;(a==="$"||a==="%")&&e[n+1]==="{"?n=Qm(e,n+1):n++}}return e.length}function Qm(e,t){const n=[];let a=t;for(;a<e.length;){const l=e[a];if(l==='"')a=Zm(e,a);else if(l==="<"&&e[a+1]==="<"&&Xm.test(e.slice(a)))a=lw(e,a);else if(l==="#"||l==="/"&&e[a+1]==="/")a=Hi(e,a);else if(l==="/"&&e[a+1]==="*")a=aw(e,a);else if(op[l])n.push(op[l]),a++;else if(l===n[n.length-1]){if(n.pop(),a++,n.length===0)return a}else a++}return e.length}function EM(e,t){let n=t;for(;n<e.length;){const a=e[n];if(a===`
|
|
1281
|
+
`||a==="#"||a==="/"&&(e[n+1]==="/"||e[n+1]==="*"))return n;a==='"'?n=Zm(e,n):a==="<"&&e[n+1]==="<"&&Xm.test(e.slice(n))?n=lw(e,n):op[a]?n=Qm(e,n):n++}return e.length}function g0(e,t){return t?e.split(`
|
|
1282
|
+
`).map((n,a)=>a>0&&n.startsWith(t)?n.slice(t.length):n).join(`
|
|
1283
|
+
`):e}function ur(e){var a;const t=[];let n=0;for(;n<e.length;){const l=e[n];if(/\s/.test(l)){n++;continue}if(l==="#"||l==="/"&&e[n+1]==="/"){n=Hi(e,n);continue}if(l==="/"&&e[n+1]==="*"){n=aw(e,n);continue}const s=/^[A-Za-z_][\w-]*/.exec(e.slice(n));if(!s){n=Hi(e,n);continue}const i=n,r=s[0],o=e.lastIndexOf(`
|
|
1284
|
+
`,i-1)+1,u=((a=/^[ \t]*/.exec(e.slice(o,i)))==null?void 0:a[0])??"";let d=i+r.length;for(;e[d]===" "||e[d]===" ";)d++;if(e[d]==="="&&e[d+1]!=="="){const p=d+1,h=EM(e,p);t.push({key:r,kind:"attribute",text:g0(e.slice(i,h).trimEnd(),u),value:e.slice(p,h).trim()}),n=h;continue}for(;d<e.length&&e[d]!=="{"&&e[d]!==`
|
|
1285
|
+
`;)d=e[d]==='"'?Zm(e,d):d+1;if(e[d]!=="{"){n=Hi(e,i);continue}const f=Qm(e,d);t.push({key:r,kind:"block",text:g0(e.slice(i,f),u)}),n=f}return t}function sw(e){const t=e.trim();if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(/^"([^"\\]|\\.)*"$/.test(t)&&!/[$%]\{/.test(t))try{return JSON.parse(t)}catch{return}}function CM(e){const t=e.trim();if(!t.startsWith("{")||!t.endsWith("}"))return;const n={},a=t.slice(1,-1).replace(/"([A-Za-z_][\w-]*)"(\s*=)/g,"$1$2");for(const l of ur(a)){const s=l.kind==="attribute"?sw((l.value||"").replace(/,$/,"")):void 0;if(s===void 0)return;n[l.key]=String(s)}return n}const TM=new Set(["count","for_each","provider"]),AM=new Set(["tags_all","id","arn"]),kM={dev:!0,testing:!0,staging:!0,prod:!0};function jM(e){const t=De[e.data.serviceType],n=Le(e.data.resourceName),{mainTf:a}=Ws([e],[],la.dev,la),l=`resource "${t.terraformResourceType}" "${n}" {`,s=a.indexOf(l);if(s===-1)return new Set;const i=ur(a.slice(s)).find(o=>o.key==="resource"),r=i?i.text.slice(i.text.indexOf("{")+1,i.text.lastIndexOf("}")):"";return new Set(ur(r).map(o=>o.key))}function MM(e){const t=[],n=[],a=[],l=[];let s=0;const i=[];for(const m of ur(e)){if(m.key!=="resource"||m.kind!=="block")continue;const _=/^resource\s+"([a-zA-Z0-9_]+)"\s+"([a-zA-Z0-9_-]+)"\s*\{/.exec(m.text);_&&i.push({tfType:_[1],tfName:_[2],body:m.text.slice(_[0].length,m.text.lastIndexOf("}"))})}const r=i.filter(m=>!!De[m.tfType]),o={},u=new Map;for(const m of r){const _=De[m.tfType],g=Le(m.tfName);_&&g!==m.tfName&&u.set(`${_.terraformResourceType}.${m.tfName}`,`${_.terraformResourceType}.${g}`)}r.forEach((m,_)=>{const g=De[m.tfType];if(!g)return;const v=`${m.tfType}.${m.tfName}`,w=ew(m.tfType),N=new Map(g.schema.map(D=>[D.key,D])),S=ur(m.body);let A={};const k=new Set;for(const D of S){const C=D.kind==="attribute"?N.get(D.key):void 0;if(!C)continue;const E=sw(D.value||"");if(E!==void 0){if(C.type==="number"&&typeof E=="number")w[C.key]=E;else if(C.type==="boolean"&&typeof E=="boolean")w[C.key]=E;else if(C.type!=="number"&&C.type!=="boolean")w[C.key]=String(E);else continue;k.add(D.key)}}const H=`node-import-${m.tfName}-${_}`,O={id:H,type:"awsNode",position:{x:0,y:0},data:{label:m.tfName,resourceName:m.tfName,serviceType:m.tfType,baseConfig:w,envOverrides:{},envEnabled:kM,tags:{}}},V=jM(O),U=[];for(const D of S){if(k.has(D.key)||AM.has(D.key))continue;if(D.key==="tags"&&D.kind==="attribute"){const E=CM(D.value||"");E?A=E:a.push({address:v,key:"tags",reason:"not a plain map of strings"});continue}if(TM.has(D.key)){a.push({address:v,key:D.key,reason:"not supported on the canvas"});continue}if(V.has(D.key)){a.push({address:v,key:D.key,reason:N.has(D.key)?"not a literal value the form can hold":"generated by LocalCloud"});continue}let C=D.text;for(const[E,$]of u)C=C.replace(new RegExp(`\\b${E.replace(".","\\.")}\\b`,"g"),$);U.push(C)}U.length>0&&(w[xn]=U.join(`
|
|
1286
|
+
`),s+=U.length);const T=_%4,M=Math.floor(_/4),j=m.tfName.split("_").map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" "),z={id:H,type:"awsNode",position:{x:80+T*330,y:80+M*210},data:{label:`${g.shortName}: ${j}`,resourceName:m.tfName,serviceType:m.tfType,baseConfig:w,envOverrides:{},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{...A,ImportedFrom:"TerraformHCL"}}};t.push(z),o[`${m.tfType}.${m.tfName}`]=z});const d=/\b(aws_[a-z0-9_]+)\.([a-zA-Z0-9_-]+)\b/g,f=new Set;for(const m of i){const _=o[`${m.tfType}.${m.tfName}`];if(!_){const v=[];let w;for(;(w=d.exec(m.body))!==null;){const N=`${w[1]}.${w[2]}`;o[N]&&!v.includes(o[N])&&v.push(o[N])}if(v.length>=2){const N=v[0],S=v[1],A=`${N.id}->${S.id}`;!f.has(A)&&N.id!==S.id&&(f.add(A),n.push({id:`edge-import-${N.id}-${S.id}`,source:N.id,target:S.id,animated:!0,data:{relationshipType:"event_trigger",label:"Trigger / Integration"}}))}continue}let g;for(;(g=d.exec(m.body))!==null;){const v=`${g[1]}.${g[2]}`,w=o[v];if(w&&w.id!==_.id){const N=["aws_vpc","aws_subnet","aws_security_group"].includes(w.data.serviceType),S=N?w.id:_.id,A=N?_.id:w.id,k=`${S}->${A}`;f.has(k)||(f.add(k),n.push({id:`edge-import-${S}-${A}`,source:S,target:A,animated:!N,data:{relationshipType:N?"network_attachment":"data_flow",label:N?"VPC Network":"Reference"}}))}}}const p=Object.fromEntries(t.map(m=>[m.id,m])),h=(m,_)=>n.filter(g=>{var v,w;return g.target===m&&((v=g.data)==null?void 0:v.relationshipType)==="network_attachment"&&((w=p[g.source])==null?void 0:w.data.serviceType)===_}),y=new Set;for(const m of t){const _=m.data.serviceType;if(_==="aws_vpc")continue;const g=_==="aws_subnet"?[]:h(m.id,"aws_subnet"),v=h(m.id,"aws_vpc"),w=g.length===1?g[0]:g.length===0?v[0]:void 0;w&&(m.parentId=w.source,y.add(w.id),g.length===1&&v.forEach(N=>y.add(N.id)))}const b=new Set(t.map(m=>`${De[m.data.serviceType].terraformResourceType}.${Le(m.data.resourceName)}`));for(const m of t){const _=String(m.data.baseConfig[xn]||""),g=new Set;for(const v of _.matchAll(/\b(aws_[a-z0-9_]+\.[A-Za-z0-9_-]+|var\.\w+|local\.\w+|module\.\w+|data\.\w+\.\w+)/g))b.has(v[1])||g.add(v[1]);g.size>0&&l.push(`${m.data.resourceName}: Extra HCL refers to ${[...g].join(", ")}, which the canvas doesn't define`)}const x=new Set(r.map(m=>`${m.tfType}.${m.tfName}`));return{nodes:t,edges:n.filter(m=>!y.has(m.id)),importedCount:t.length,extraArgCount:s,skippedResources:i.map(m=>`${m.tfType}.${m.tfName}`).filter(m=>!x.has(m)),dropped:a,warnings:l}}const $M="2.0.0";function iw(e){return{version:$M,environments:Object.fromEntries(Object.entries(e.environments).map(([t,{color:n,badgeClass:a,...l}])=>[t,l])),nodes:e.nodes.map(t=>{const{selected:n,dragging:a,measured:l,resizing:s,...i}=t,{provisioningStatus:r,provisionedOutputs:o,...u}=i.data;return{...i,data:u}}),edges:e.edges.map(t=>{const{selected:n,...a}=t;return a})}}function OM(e,t){const n=new Map(t.map(a=>[a.id,a]));return e.map(a=>{const l=n.get(a.id);return!(l!=null&&l.data.provisioningStatus)&&!(l!=null&&l.data.provisionedOutputs)?a:{...a,data:{...a.data,provisioningStatus:l.data.provisioningStatus,provisionedOutputs:l.data.provisionedOutputs}}})}function rw(e,t){const n=e.filter(a=>{var l;return((l=a.data.envEnabled)==null?void 0:l[t])!==!1}).map(a=>({id:a.id,resName:Le(a.data.resourceName||a.data.label)})).sort((a,l)=>l.resName.length-a.resName.length);return a=>{var l;return(l=n.find(s=>a===s.resName||a.startsWith(`${s.resName}_`)))==null?void 0:l.id}}function DM(e){const t=n=>e.includes(n);return t("create")&&t("delete")?"replace":t("create")?"create":t("delete")?"delete":t("update")?"update":null}function zM(e,t,n){var s;const a=rw(t,n),l={counts:{add:0,change:0,destroy:0},byNode:{},changesByNode:{},other:[]};for(const i of e){const r=DM(i.actions);if(!r)continue;(r==="create"||r==="replace")&&l.counts.add++,(r==="delete"||r==="replace")&&l.counts.destroy++,r==="update"&&l.counts.change++;const o=a(i.name);if(!o){l.other.push({address:i.address,action:r});continue}((s=l.changesByNode)[o]||(s[o]=[])).push({address:i.address,action:r})}for(const[i,r]of Object.entries(l.changesByNode)){const o=new Set(r.map(u=>u.action));l.byNode[i]=o.size===1?r[0].action:o.has("replace")?"replace":"update"}return l}function $c(e){return e.counts.add+e.counts.change+e.counts.destroy>0}const Sd=Gm[0],Oc=["dev","testing","staging","prod"],RM=1200;let Il={key:"",at:0};const HM=/^(?:module\.[^\s]+\.)?([a-z0-9_]+)\.([A-Za-z0-9_-]+)(?:\[[^\]]*\])?: (Creating|Creation complete|Modifying|Modifications complete|Destroying|Destruction complete|Still creating|Still modifying)/,BM=/with (?:module\.[^\s]+\.)?([a-z0-9_]+)\.([A-Za-z0-9_-]+)/;function Io(e,t){const n=Ws(e.nodes,e.edges,e.environments[t],e.environments),a=e.nodes.filter(l=>{var s;return l.data.serviceType==="aws_lambda_function"&&((s=l.data.envEnabled)==null?void 0:s[t])!==!1}).map(l=>`${l.id}:${l.data.sourceDir??""}:${l.data.inlineCode||""}`);return[n.mainTf,n.providerTf,n.variablesTf,n.tfvars,n.outputsTf,...a].join("\0")}function y0(e,t){var o;const{nodes:n,edges:a,environments:l}=e,s={},i={},r=[];for(const u of Oc){const d=Ws(n,a,l[u],l,t),f=`environments/${u}`;if(s[`${f}/main.tf`]=d.mainTf,s[`${f}/provider.tf`]=d.providerTf,s[`${f}/variables.tf`]=d.variablesTf,s[`${f}/${u}.tfvars`]=d.tfvars,s[`${f}/outputs.tf`]=d.outputsTf,t==="emulator")s[`${f}/run-emulator-${u}.sh`]=d.emulatorScriptSh,u==="dev"&&(s["Dockerfile.emulator"]=d.dockerfile,s["docker-compose.emulator.yml"]=d.dockerComposeYml);else{s[`${f}/backend.tf`]=d.backendTf;for(const p of gM)i[`${f}/${p}`]=d.backendConfig}for(const p of n)if(p.data.serviceType==="aws_lambda_function"&&((o=p.data.envEnabled)==null?void 0:o[u])!==!1){const h=Ft(p,u);r.push({envId:u,resourceName:Le(p.data.resourceName||p.data.label),runtime:String(h.runtime||"nodejs20.x"),handler:String(h.handler||"index.handler"),code:p.data.inlineCode,sourceDir:p.data.sourceDir})}}return{files:s,filesIfMissing:i,lambdaArtifacts:r}}function ui(e,t,n){return e.map(a=>{var i;const l=(i=a.data.provisioningStatus)==null?void 0:i[t],s=n(a,l);return!s||s===l?a:{...a,data:{...a.data,provisioningStatus:{...a.data.provisioningStatus||{},[t]:s}}}})}function Nd(e){if(e)return Object.fromEntries(Oc.map(t=>[t,{...la[t],...e[t],color:la[t].color}]))}const Gn={ready:!1,lastSaved:"",loading:null},LM=800;async function ow(){if(!Gn.ready)return;const e=B.getState(),t=iw(e),n=JSON.stringify(t);if(n===Gn.lastSaved)return;const a=e.projectFile.file;B.setState({projectFile:{state:"saving",file:a}});try{const l=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:t})}),s=await l.json();if(!s.ok)throw new Error(s.error||`HTTP ${l.status}`);Gn.lastSaved=n,B.setState({projectFile:{state:"saved",file:a}})}catch(l){B.setState({projectFile:{state:"error",file:a,error:(l==null?void 0:l.message)||"Save failed"}})}}const B=mC()(vC((e,t)=>{var n;return{activeEnv:"dev",environments:{...la},nodes:fa(Sd.nodes),edges:Sd.edges,selectedNodeId:((n=Sd.nodes[2])==null?void 0:n.id)||null,selectedEdgeId:null,past:[],future:[],view:"design",rightTab:"inspector",isCatalogOpen:!0,isDrawerOpen:!0,isTemplateModalOpen:!1,isImportModalOpen:!1,isExportModalOpen:!1,emulatorStatuses:{9297:{running:!1,status:"unchecked",caExists:!1},9298:{running:!1,status:"unchecked",caExists:!1},9299:{running:!1,status:"unchecked",caExists:!1},9300:{running:!1,status:"unchecked",caExists:!1}},terminalLogs:["LocalCloud Studio ready. Emulator ports: dev 9297, testing 9298, staging 9299, prod 9300."],isRunningCommand:!1,runningCommand:null,runningEnv:null,pendingPlan:null,projectFile:{state:"unknown"},pushHistory:a=>{const l=Date.now();if(a&&Il.key===a&&l-Il.at<RM){Il.at=l;return}Il={key:a||"",at:l};const{nodes:s,edges:i,past:r}=t(),o={nodes:structuredClone(s),edges:structuredClone(i)};e({past:[...r.slice(-24),o],future:[]})},undo:()=>{const{past:a,future:l,nodes:s,edges:i}=t();if(a.length===0)return;Il={key:"",at:0};const r=a[a.length-1],o=a.slice(0,a.length-1);e({past:o,future:[{nodes:structuredClone(s),edges:structuredClone(i)},...l],nodes:r.nodes,edges:r.edges})},redo:()=>{const{past:a,future:l,nodes:s,edges:i}=t();if(l.length===0)return;Il={key:"",at:0};const r=l[0],o=l.slice(1);e({past:[...a,{nodes:structuredClone(s),edges:structuredClone(i)}],future:o,nodes:r.nodes,edges:r.edges})},setActiveEnv:a=>e({activeEnv:a}),updateEnvironmentProfile:(a,l)=>e(s=>({environments:{...s.environments,[a]:{...s.environments[a],...l}}})),onNodesChange:a=>{e({nodes:w1(a,t().nodes)})},onEdgesChange:a=>{e({edges:S1(a,t().edges)})},onConnect:a=>{const l=t().nodes.find(d=>d.id===a.source),s=t().nodes.find(d=>d.id===a.target),i=rp(l,s,t().edges);if(!i.ok)return;t().pushHistory();const{relationshipType:r,label:o}=i,u={...a,id:`edge-${a.source}-${a.target}-${Date.now().toString(36)}`,animated:r!=="network_attachment",data:{relationshipType:r,label:o}};e({edges:N1(u,t().edges),selectedEdgeId:u.id,selectedNodeId:null})},onNodeDragStart:()=>t().pushHistory(),onNodeDragStop:a=>{let l=t().nodes;for(const s of a){const i=l.find(o=>o.id===s);if(!i)continue;const r=r0(i,l);l=o0(l,s,r==null?void 0:r.id)}l!==t().nodes&&e({nodes:l})},selectNode:a=>e({selectedNodeId:a,selectedEdgeId:null}),selectEdge:a=>e({selectedEdgeId:a,selectedNodeId:null}),setRightTab:a=>e({rightTab:a,isDrawerOpen:!0}),setView:a=>e({view:a}),setCatalogOpen:a=>e({isCatalogOpen:a}),setDrawerOpen:a=>e({isDrawerOpen:a}),setTemplateModalOpen:a=>e({isTemplateModalOpen:a}),setImportModalOpen:a=>e({isImportModalOpen:a}),setExportModalOpen:a=>e({isExportModalOpen:a}),addServiceNode:(a,l)=>{const s=De[a];if(!s)return;t().pushHistory();const r=t().nodes.filter(b=>b.data.serviceType===a).length+1,o=s.shortName.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_"),u=`node-${o}-${Date.now().toString(36)}`,d=l||{x:240+t().nodes.length*45%450,y:120+t().nodes.length*40%340},f=a==="aws_lambda_function"?`export const handler = async (event) => {
|
|
1287
|
+
console.log("Event received on AWS Emulator:", JSON.stringify(event));
|
|
1288
|
+
return {
|
|
1289
|
+
statusCode: 200,
|
|
1290
|
+
headers: { "content-type": "application/json" },
|
|
1291
|
+
body: JSON.stringify({
|
|
1292
|
+
ok: true,
|
|
1293
|
+
service: "${o}_${r}",
|
|
1294
|
+
environment: process.env.ENVIRONMENT || "dev",
|
|
1295
|
+
timestamp: new Date().toISOString(),
|
|
1296
|
+
}),
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
`:void 0,p={id:u,type:s.isContainer?"awsContainer":"awsNode",position:d,...s.isContainer?{width:s.defaultWidth??420,height:s.defaultHeight??280}:{},data:{label:`${s.shortName} ${r}`,resourceName:`${o}_${r}`,serviceType:a,baseConfig:ew(a),envOverrides:{},envEnabled:{dev:!0,testing:!0,staging:!0,prod:!0},tags:{Service:s.serviceCode},inlineCode:f}};let h=fa([...t().nodes,p]);const y=l?r0(p,h):void 0;y&&(h=o0(h,u,y.id)),e({nodes:h,selectedNodeId:u,selectedEdgeId:null,rightTab:"inspector"})},duplicateNode:a=>{const l=t().nodes.find(r=>r.id===a);if(!l)return;t().pushHistory();const s=`${l.id}-copy-${Date.now().toString(36)}`,i={...l,id:s,position:{x:l.position.x+48,y:l.position.y+48},selected:!0,data:{...structuredClone(l.data),label:`${l.data.label} Copy`,resourceName:`${l.data.resourceName}_copy`}};e(r=>({nodes:fa([...r.nodes.map(o=>({...o,selected:!1})),i]),selectedNodeId:s}))},deleteNode:a=>{t().pushHistory(),e(l=>({nodes:c0(l.nodes,a).filter(s=>s.id!==a),edges:l.edges.filter(s=>s.source!==a&&s.target!==a),selectedNodeId:l.selectedNodeId===a?null:l.selectedNodeId}))},deleteEdge:a=>{t().pushHistory(),e(l=>({edges:l.edges.filter(s=>s.id!==a),selectedEdgeId:l.selectedEdgeId===a?null:l.selectedEdgeId}))},deleteSelectedElements:()=>{const{nodes:a,edges:l,selectedNodeId:s,selectedEdgeId:i}=t(),r=new Set(a.filter(d=>d.selected).map(d=>d.id));s&&r.add(s);const o=new Set(l.filter(d=>d.selected).map(d=>d.id));if(i&&o.add(i),r.size===0&&o.size===0)return;t().pushHistory();let u=a;for(const d of r)u=c0(u,d);e({nodes:u.filter(d=>!r.has(d.id)),edges:l.filter(d=>!o.has(d.id)&&!r.has(d.source)&&!r.has(d.target)),selectedNodeId:null,selectedEdgeId:null})},updateNodeMetadata:(a,l)=>{t().pushHistory(`meta:${a}:${Object.keys(l).join(",")}`),e(s=>({nodes:s.nodes.map(i=>i.id===a?{...i,data:{...i.data,...l}}:i)}))},updateNodeProperty:(a,l,s,i)=>{t().pushHistory(`prop:${a}:${i}:${l}`),e(r=>({nodes:r.nodes.map(o=>{var d;if(o.id!==a)return o;if(i==="base")return{...o,data:{...o.data,baseConfig:{...o.data.baseConfig,[l]:s}}};const u=((d=o.data.envOverrides)==null?void 0:d[i])||{};return{...o,data:{...o.data,envOverrides:{...o.data.envOverrides,[i]:{...u,[l]:s}}}}})}))},resetNodeEnvOverride:(a,l,s)=>{t().pushHistory(),e(i=>({nodes:i.nodes.map(r=>{var u;if(r.id!==a)return r;const o={...((u=r.data.envOverrides)==null?void 0:u[l])||{}};if(s)delete o[s];else for(const d of Object.keys(o))delete o[d];return{...r,data:{...r.data,envOverrides:{...r.data.envOverrides,[l]:o}}}})}))},toggleNodeInEnvironment:(a,l)=>{t().pushHistory(),e(s=>({nodes:s.nodes.map(i=>{var o;if(i.id!==a)return i;const r=((o=i.data.envEnabled)==null?void 0:o[l])!==!1;return{...i,data:{...i.data,envEnabled:{...i.data.envEnabled,[l]:!r}}}})}))},updateNodeTags:(a,l)=>{t().pushHistory(),e(s=>({nodes:s.nodes.map(i=>i.id===a?{...i,data:{...i.data,tags:l}}:i)}))},updateEdgeData:(a,l)=>{t().pushHistory(`edge:${a}:${Object.keys(l).join(",")}`),e(s=>({edges:s.edges.map(i=>i.id===a?{...i,data:{...i.data||{relationshipType:"data_flow"},...l}}:i)}))},loadTemplate:a=>{var r;const l=Gm.find(o=>o.id===a);if(!l)return;t().pushHistory();const s=fa(structuredClone(l.nodes)),i=structuredClone(l.edges);e({nodes:s,edges:i,selectedNodeId:((r=s[0])==null?void 0:r.id)||null,selectedEdgeId:null,isTemplateModalOpen:!1})},importTerraformHcl:a=>{var s;const l=MM(a);return l.importedCount>0&&(t().pushHistory(),e({nodes:f0(fa(l.nodes)),edges:l.edges,selectedNodeId:((s=l.nodes[0])==null?void 0:s.id)||null,selectedEdgeId:null})),l},exportProjectJson:()=>{const{nodes:a,edges:l,environments:s,activeEnv:i}=t();return JSON.stringify({version:"2.0.0",exportedAt:new Date().toISOString(),activeEnv:i,environments:s,nodes:a,edges:l},null,2)},importProjectJson:a=>{var l;try{const s=JSON.parse(a);return!Array.isArray(s.nodes)||!Array.isArray(s.edges)?!1:(t().pushHistory(),e({nodes:fa(s.nodes),edges:s.edges,environments:Nd(s.environments)||t().environments,activeEnv:s.activeEnv||"dev",selectedNodeId:((l=s.nodes[0])==null?void 0:l.id)||null,selectedEdgeId:null,isImportModalOpen:!1}),!0)}catch{return!1}},clearCanvas:()=>{t().pushHistory(),e({nodes:[],edges:[],selectedNodeId:null,selectedEdgeId:null})},autoLayoutCanvas:()=>{t().pushHistory(),e({nodes:f0(t().nodes)})},refreshEmulatorStatuses:async()=>{try{const a=Object.values(t().environments).map(i=>i.emulatorPort).join(","),l=await fetch(`/api/emulator/status?ports=${a}`);if(!l.ok)return;const s=await l.json();s.ok&&s.statuses&&e({emulatorStatuses:s.statuses})}catch{}},syncTerraformToDisk:async()=>{var i;const{appendTerminalLog:a}=t(),{files:l,lambdaArtifacts:s}=y0(t(),"emulator");try{const o=await(await fetch("/api/terraform/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:"emulator",files:l,lambdaArtifacts:s})})).json();if(o.ok){a(`Synced ${((i=o.writtenFiles)==null?void 0:i.length)||0} Terraform & Lambda zip artifacts to ./terraform-out`);for(const u of o.errors||[])a(`Error: ${u}`);return{ok:(o.errors||[]).length===0,writtenFiles:o.writtenFiles}}return{ok:!1}}catch{return{ok:!1}}},exportForAws:async()=>{var i,r;const{files:a,filesIfMissing:l,lambdaArtifacts:s}=y0(t(),"aws");try{const o=await fetch("/api/terraform/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:"aws",files:a,filesIfMissing:l,lambdaArtifacts:s})}),u=await o.json();return u.ok?(i=u.errors)!=null&&i.length?{ok:!1,error:u.errors.join(" · ")}:(t().appendTerminalLog(`Exported Terraform for AWS to ./${u.outDir} (${((r=u.writtenFiles)==null?void 0:r.length)||0} files)`),{ok:!0,writtenFiles:u.writtenFiles,keptFiles:u.keptFiles}):{ok:!1,error:u.error||`HTTP ${o.status}`}}catch(o){return{ok:!1,error:(o==null?void 0:o.message)||"The local API is not reachable"}}},controlEmulatorContainer:async(a,l)=>{const s=l||t().activeEnv,i=t().environments[s],{appendTerminalLog:r,refreshEmulatorStatuses:o}=t();e({isRunningCommand:!0}),r(`[${s.toUpperCase()}] ${a==="start"?"Starting":"Stopping"} aws-emulator container on port ${i.emulatorPort}...`);try{const d=await(await fetch("/api/emulator/control",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,envId:s,port:i.emulatorPort})})).json();d.ok?r(`[${s.toUpperCase()}] Container ${a} succeeded:
|
|
1300
|
+
${d.output||"Ready"}`):r(`Warning: [${s.toUpperCase()}] Container ${a} note: ${d.error||""}
|
|
1301
|
+
${d.output||""}`),await o()}catch(u){r(`Error: [${s.toUpperCase()}] ${u==null?void 0:u.message}`)}finally{e({isRunningCommand:!1})}},requestApply:async a=>{const l=a||t().activeEnv,s=t().pendingPlan;s&&s.envId===l&&s.mode==="apply"&&$c(s)&&s.fingerprint===Io(t(),l)?await t().runTerraformCommand("apply",l,{usePlan:!0}):(e({rightTab:"emulator"}),await t().runTerraformCommand("plan",l))},requestDestroy:async a=>{const l=a||t().activeEnv;e({rightTab:"emulator"}),await t().runTerraformCommand("plan",l,{destroyPlan:!0})},applyReviewedPlan:async()=>{const a=t().pendingPlan;if(!(!a||!$c(a))){if(a.fingerprint!==Io(t(),a.envId)){e({pendingPlan:null}),t().appendTerminalLog(`[${a.envId.toUpperCase()}] The canvas changed since this plan; plan again.`);return}await t().runTerraformCommand("apply",a.envId,{usePlan:!0})}},discardPlan:()=>e({pendingPlan:null}),runTerraformCommand:async(a,l,s)=>{const i=l||t().activeEnv,r=t().environments[i],{syncTerraformToDisk:o,appendTerminalLog:u}=t(),d=`[${i.toUpperCase()}]`,f=a==="apply"&&(s==null?void 0:s.usePlan);e(A=>{var k;return{isRunningCommand:!0,runningCommand:a,runningEnv:i,pendingPlan:f||((k=A.pendingPlan)==null?void 0:k.envId)!==i?A.pendingPlan:null}});const p=Io(t(),i);let h=null,y=!1;const b=a==="apply"||a==="destroy"?"provisioning":a==="plan"?"planning":void 0,x=Object.fromEntries(t().nodes.map(A=>{var k;return[A.id,(k=A.data.provisioningStatus)==null?void 0:k[i]]}));if(b&&e(A=>({nodes:ui(A.nodes,i,k=>{var H;return((H=k.data.envEnabled)==null?void 0:H[i])!==!1?b:void 0})})),!(await o()).ok){u(`Error: ${d} ./terraform-out could not be prepared (see above, or is the local server running?). Nothing was run.`),e(A=>({nodes:ui(A.nodes,i,k=>x[k.id]??"unapplied"),isRunningCommand:!1,runningCommand:null,runningEnv:null}));return}u(`${d} $ terraform ${a} in ./terraform-out/environments/${i} → https://127.0.0.1:${r.emulatorPort}`);const _=rw(t().nodes,i),g=new Map,v=(A,k)=>{A&&(g.set(A,k),e(H=>({nodes:ui(H.nodes,i,O=>O.id===A?k:void 0)})))},w=A=>{if(!A.trim())return;u(A);const k=A.match(HM);if(k){const O=_(k[2]),V=k[3];V==="Creation complete"||V==="Modifications complete"?v(O,"provisioned"):V==="Destruction complete"?v(O,"unapplied"):O&&!g.has(O)&&(v(O,"provisioning"),g.delete(O));return}const H=A.match(BM);H&&v(_(H[2]),"failed")};let N=1;try{const A=await fetch("/api/terraform/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:a,envId:i,port:r.emulatorPort,region:r.region,usePlan:(s==null?void 0:s.usePlan)===!0,destroy:a==="plan"&&(s==null?void 0:s.destroyPlan)===!0})});if(!A.body)throw new Error(`HTTP ${A.status}`);const k=A.body.getReader(),H=new TextDecoder;let O="";for(;;){const{value:V,done:U}=await k.read();O+=H.decode(V,{stream:!U});const T=O.split(`
|
|
1302
|
+
`);O=T.pop()??"";for(const M of T){const j=M.match(/^__LC_EXIT__:(-?\d+)$/);if(j)N=Number(j[1]);else if(M==="__LC_PLAN_STALE__")y=!0;else if(M.startsWith("__LC_PLAN__:"))try{h=JSON.parse(M.slice(12))}catch{h=null}else w(M)}if(U)break}O&&w(O)}catch(A){u(`Error: ${d} ${A==null?void 0:A.message}`)}const S=N===0;e(A=>{var k;return{nodes:ui(A.nodes,i,(H,O)=>{var V;if(!(((V=H.data.envEnabled)==null?void 0:V[i])===!1||g.has(H.id))&&O===b)return S?a==="apply"?"provisioned":a==="destroy"?"unapplied":x[H.id]??"unapplied":a==="plan"||y?x[H.id]??"unapplied":"failed"}),isRunningCommand:!1,runningCommand:null,runningEnv:null,pendingPlan:a==="plan"&&S&&h?{envId:i,mode:s!=null&&s.destroyPlan?"destroy":"apply",fingerprint:p,...zM(h,A.nodes,i)}:(a==="apply"||y)&&((k=A.pendingPlan)==null?void 0:k.envId)===i?null:A.pendingPlan}}),u(S?`${d} terraform ${a} completed successfully.`:`Warning: ${d} terraform ${a} exited with code ${N}.`),(a==="apply"||a==="destroy")&&await t().syncStatusFromState([i])},syncStatusFromState:async(a=Oc)=>{await Promise.all(a.map(async l=>{try{const i=await(await fetch(`/api/terraform/state?envId=${l}`)).json();if(!i.ok)return;e(r=>{if(r.isRunningCommand&&r.runningEnv===l)return{};const{status:o,outputs:u}=bM(r.nodes,l,i);return{nodes:r.nodes.map(d=>{var h,y;const f=o[d.id],p=u[d.id];return((h=d.data.provisioningStatus)==null?void 0:h[l])===f&&JSON.stringify((y=d.data.provisionedOutputs)==null?void 0:y[l])===JSON.stringify(p)?d:{...d,data:{...d.data,provisioningStatus:{...d.data.provisioningStatus||{},[l]:f},provisionedOutputs:{...d.data.provisionedOutputs||{},[l]:p}}}})}})}catch{}}))},loadProjectFromDisk:()=>(Gn.loading??(Gn.loading=(async()=>{var a,l;try{const i=await(await fetch("/api/project")).json();if(!i.ok){e({projectFile:{state:i.exists?"error":"unavailable",file:i.file,error:i.error}}),i.exists&&t().appendTerminalLog(`Error: ${i.error}. Fix or remove the file, then reload.`);return}if(i.exists&&Array.isArray((a=i.project)==null?void 0:a.nodes)&&Array.isArray((l=i.project)==null?void 0:l.edges)){const r=i.project,o=OM(fa(r.nodes),t().nodes);e(u=>({nodes:o,edges:r.edges,environments:Nd(r.environments)||u.environments,selectedNodeId:o.some(d=>d.id===u.selectedNodeId)?u.selectedNodeId:null,selectedEdgeId:null,past:[],future:[]}))}Gn.ready=!0,Gn.lastSaved=i.exists?JSON.stringify(iw(t())):"",e({projectFile:{state:"saved",file:i.file}}),t().appendTerminalLog(i.exists?`Loaded project from ./${i.file}`:`Saving project to ./${i.file}`),await ow()}catch{e({projectFile:{state:"unavailable"}})}})()),Gn.loading),appendTerminalLog:a=>e(l=>({terminalLogs:[...l.terminalLogs.slice(-499),`[${new Date().toLocaleTimeString()}] ${a}`]})),clearTerminalLogs:()=>e({terminalLogs:[]})}},{name:"localcloud-studio-storage-v2",partialize:e=>({activeEnv:e.activeEnv,environments:e.environments,nodes:e.nodes,edges:e.edges,isCatalogOpen:e.isCatalogOpen,isDrawerOpen:e.isDrawerOpen}),merge:(e,t)=>{const n=e||{};let a=fa(n.nodes??t.nodes);for(const s of Oc)a=ui(a,s,(i,r)=>r==="planning"||r==="provisioning"?"unapplied":void 0);const l=Nd(n.environments)||t.environments;return{...t,...n,environments:l,nodes:a}}}));let v0;B.subscribe((e,t)=>{e.nodes===t.nodes&&e.edges===t.edges&&e.environments===t.environments||(clearTimeout(v0),v0=setTimeout(()=>{const{pendingPlan:n,isRunningCommand:a}=B.getState();n&&!a&&n.fingerprint!==Io(B.getState(),n.envId)&&B.setState({pendingPlan:null}),ow()},LM))});/**
|
|
1303
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1304
|
+
*
|
|
1305
|
+
* This source code is licensed under the ISC license.
|
|
1306
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1307
|
+
*/const VM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/**
|
|
1308
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1309
|
+
*
|
|
1310
|
+
* This source code is licensed under the ISC license.
|
|
1311
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1312
|
+
*/var UM={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"};/**
|
|
1313
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1314
|
+
*
|
|
1315
|
+
* This source code is licensed under the ISC license.
|
|
1316
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1317
|
+
*/const IM=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:l="",children:s,iconNode:i,...r},o)=>R.createElement("svg",{ref:o,...UM,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:cw("lucide",l),...r},[...i.map(([u,d])=>R.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
|
|
1318
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1319
|
+
*
|
|
1320
|
+
* This source code is licensed under the ISC license.
|
|
1321
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1322
|
+
*/const Z=(e,t)=>{const n=R.forwardRef(({className:a,...l},s)=>R.createElement(IM,{ref:s,iconNode:t,className:cw(`lucide-${VM(e)}`,a),...l}));return n.displayName=`${e}`,n};/**
|
|
1323
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1324
|
+
*
|
|
1325
|
+
* This source code is licensed under the ISC license.
|
|
1326
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1327
|
+
*/const qM=Z("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
1328
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1329
|
+
*
|
|
1330
|
+
* This source code is licensed under the ISC license.
|
|
1331
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1332
|
+
*/const _0=Z("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
1333
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1334
|
+
*
|
|
1335
|
+
* This source code is licensed under the ISC license.
|
|
1336
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1337
|
+
*/const uw=Z("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
1338
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1339
|
+
*
|
|
1340
|
+
* This source code is licensed under the ISC license.
|
|
1341
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1342
|
+
*/const GM=Z("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
1343
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1344
|
+
*
|
|
1345
|
+
* This source code is licensed under the ISC license.
|
|
1346
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1347
|
+
*/const YM=Z("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
|
|
1348
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1349
|
+
*
|
|
1350
|
+
* This source code is licensed under the ISC license.
|
|
1351
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1352
|
+
*/const PM=Z("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
1353
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1354
|
+
*
|
|
1355
|
+
* This source code is licensed under the ISC license.
|
|
1356
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1357
|
+
*/const Km=Z("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
1358
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1359
|
+
*
|
|
1360
|
+
* This source code is licensed under the ISC license.
|
|
1361
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1362
|
+
*/const XM=Z("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
1363
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1364
|
+
*
|
|
1365
|
+
* This source code is licensed under the ISC license.
|
|
1366
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1367
|
+
*/const bu=Z("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
1368
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1369
|
+
*
|
|
1370
|
+
* This source code is licensed under the ISC license.
|
|
1371
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1372
|
+
*/const ZM=Z("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
1373
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1374
|
+
*
|
|
1375
|
+
* This source code is licensed under the ISC license.
|
|
1376
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1377
|
+
*/const Mr=Z("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
1378
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1379
|
+
*
|
|
1380
|
+
* This source code is licensed under the ISC license.
|
|
1381
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1382
|
+
*/const QM=Z("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
1383
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1384
|
+
*
|
|
1385
|
+
* This source code is licensed under the ISC license.
|
|
1386
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1387
|
+
*/const Fm=Z("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
1388
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1389
|
+
*
|
|
1390
|
+
* This source code is licensed under the ISC license.
|
|
1391
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1392
|
+
*/const dw=Z("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
1393
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1394
|
+
*
|
|
1395
|
+
* This source code is licensed under the ISC license.
|
|
1396
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1397
|
+
*/const KM=Z("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/**
|
|
1398
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1399
|
+
*
|
|
1400
|
+
* This source code is licensed under the ISC license.
|
|
1401
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1402
|
+
*/const FM=Z("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
1403
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1404
|
+
*
|
|
1405
|
+
* This source code is licensed under the ISC license.
|
|
1406
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1407
|
+
*/const JM=Z("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
1408
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1409
|
+
*
|
|
1410
|
+
* This source code is licensed under the ISC license.
|
|
1411
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1412
|
+
*/const WM=Z("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
1413
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1414
|
+
*
|
|
1415
|
+
* This source code is licensed under the ISC license.
|
|
1416
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1417
|
+
*/const e$=Z("FileKey",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["circle",{cx:"10",cy:"16",r:"2",key:"4ckbqe"}],["path",{d:"m16 10-4.5 4.5",key:"7p3ebg"}],["path",{d:"m15 11 1 1",key:"1bsyx3"}]]);/**
|
|
1418
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1419
|
+
*
|
|
1420
|
+
* This source code is licensed under the ISC license.
|
|
1421
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1422
|
+
*/const t$=Z("FileOutput",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]);/**
|
|
1423
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1424
|
+
*
|
|
1425
|
+
* This source code is licensed under the ISC license.
|
|
1426
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1427
|
+
*/const n$=Z("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
1428
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1429
|
+
*
|
|
1430
|
+
* This source code is licensed under the ISC license.
|
|
1431
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1432
|
+
*/const a$=Z("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]);/**
|
|
1433
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1434
|
+
*
|
|
1435
|
+
* This source code is licensed under the ISC license.
|
|
1436
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1437
|
+
*/const l$=Z("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
1438
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1439
|
+
*
|
|
1440
|
+
* This source code is licensed under the ISC license.
|
|
1441
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1442
|
+
*/const s$=Z("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);/**
|
|
1443
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1444
|
+
*
|
|
1445
|
+
* This source code is licensed under the ISC license.
|
|
1446
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1447
|
+
*/const i$=Z("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
1448
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1449
|
+
*
|
|
1450
|
+
* This source code is licensed under the ISC license.
|
|
1451
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1452
|
+
*/const r$=Z("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
1453
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1454
|
+
*
|
|
1455
|
+
* This source code is licensed under the ISC license.
|
|
1456
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1457
|
+
*/const o$=Z("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
|
1458
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1459
|
+
*
|
|
1460
|
+
* This source code is licensed under the ISC license.
|
|
1461
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1462
|
+
*/const c$=Z("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
1463
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1464
|
+
*
|
|
1465
|
+
* This source code is licensed under the ISC license.
|
|
1466
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1467
|
+
*/const u$=Z("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
1468
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1469
|
+
*
|
|
1470
|
+
* This source code is licensed under the ISC license.
|
|
1471
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1472
|
+
*/const fw=Z("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
1473
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1474
|
+
*
|
|
1475
|
+
* This source code is licensed under the ISC license.
|
|
1476
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1477
|
+
*/const d$=Z("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
1478
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1479
|
+
*
|
|
1480
|
+
* This source code is licensed under the ISC license.
|
|
1481
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1482
|
+
*/const f$=Z("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
|
|
1483
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1484
|
+
*
|
|
1485
|
+
* This source code is licensed under the ISC license.
|
|
1486
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1487
|
+
*/const p$=Z("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
1488
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1489
|
+
*
|
|
1490
|
+
* This source code is licensed under the ISC license.
|
|
1491
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1492
|
+
*/const Bl=Z("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
1493
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1494
|
+
*
|
|
1495
|
+
* This source code is licensed under the ISC license.
|
|
1496
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1497
|
+
*/const m$=Z("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
1498
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1499
|
+
*
|
|
1500
|
+
* This source code is licensed under the ISC license.
|
|
1501
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1502
|
+
*/const h$=Z("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
1503
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1504
|
+
*
|
|
1505
|
+
* This source code is licensed under the ISC license.
|
|
1506
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1507
|
+
*/const g$=Z("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
|
|
1508
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1509
|
+
*
|
|
1510
|
+
* This source code is licensed under the ISC license.
|
|
1511
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1512
|
+
*/const y$=Z("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
1513
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1514
|
+
*
|
|
1515
|
+
* This source code is licensed under the ISC license.
|
|
1516
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1517
|
+
*/const v$=Z("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
1518
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1519
|
+
*
|
|
1520
|
+
* This source code is licensed under the ISC license.
|
|
1521
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1522
|
+
*/const _$=Z("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
|
|
1523
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1524
|
+
*
|
|
1525
|
+
* This source code is licensed under the ISC license.
|
|
1526
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1527
|
+
*/const b$=Z("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);/**
|
|
1528
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1529
|
+
*
|
|
1530
|
+
* This source code is licensed under the ISC license.
|
|
1531
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1532
|
+
*/const x$=Z("PanelRightOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
|
|
1533
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1534
|
+
*
|
|
1535
|
+
* This source code is licensed under the ISC license.
|
|
1536
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1537
|
+
*/const pw=Z("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
1538
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1539
|
+
*
|
|
1540
|
+
* This source code is licensed under the ISC license.
|
|
1541
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1542
|
+
*/const mw=Z("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
1543
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1544
|
+
*
|
|
1545
|
+
* This source code is licensed under the ISC license.
|
|
1546
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1547
|
+
*/const w$=Z("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
1548
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1549
|
+
*
|
|
1550
|
+
* This source code is licensed under the ISC license.
|
|
1551
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1552
|
+
*/const S$=Z("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
|
|
1553
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1554
|
+
*
|
|
1555
|
+
* This source code is licensed under the ISC license.
|
|
1556
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1557
|
+
*/const Jm=Z("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
1558
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1559
|
+
*
|
|
1560
|
+
* This source code is licensed under the ISC license.
|
|
1561
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1562
|
+
*/const qo=Z("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
1563
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1564
|
+
*
|
|
1565
|
+
* This source code is licensed under the ISC license.
|
|
1566
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1567
|
+
*/const N$=Z("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
|
|
1568
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1569
|
+
*
|
|
1570
|
+
* This source code is licensed under the ISC license.
|
|
1571
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1572
|
+
*/const Dc=Z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
1573
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1574
|
+
*
|
|
1575
|
+
* This source code is licensed under the ISC license.
|
|
1576
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1577
|
+
*/const E$=Z("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
1578
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1579
|
+
*
|
|
1580
|
+
* This source code is licensed under the ISC license.
|
|
1581
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1582
|
+
*/const C$=Z("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
1583
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1584
|
+
*
|
|
1585
|
+
* This source code is licensed under the ISC license.
|
|
1586
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1587
|
+
*/const T$=Z("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
1588
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1589
|
+
*
|
|
1590
|
+
* This source code is licensed under the ISC license.
|
|
1591
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1592
|
+
*/const A$=Z("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
1593
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1594
|
+
*
|
|
1595
|
+
* This source code is licensed under the ISC license.
|
|
1596
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1597
|
+
*/const k$=Z("Ship",[["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1 .6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"iegodh"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-9-4-9 4c0 2.9.94 5.34 2.81 7.76",key:"fp8vka"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M12 10v4",key:"1kjpxc"}],["path",{d:"M12 2v3",key:"qbqxhf"}]]);/**
|
|
1598
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1599
|
+
*
|
|
1600
|
+
* This source code is licensed under the ISC license.
|
|
1601
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1602
|
+
*/const j$=Z("Signpost",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18 6a2 2 0 0 1 1.387.56l2.307 2.22a1 1 0 0 1 0 1.44l-2.307 2.22A2 2 0 0 1 18 13H6a2 2 0 0 1-1.387-.56l-2.306-2.22a1 1 0 0 1 0-1.44l2.306-2.22A2 2 0 0 1 6 6z",key:"gqqp9m"}]]);/**
|
|
1603
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1604
|
+
*
|
|
1605
|
+
* This source code is licensed under the ISC license.
|
|
1606
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1607
|
+
*/const M$=Z("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
1608
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1609
|
+
*
|
|
1610
|
+
* This source code is licensed under the ISC license.
|
|
1611
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1612
|
+
*/const $$=Z("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
|
1613
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1614
|
+
*
|
|
1615
|
+
* This source code is licensed under the ISC license.
|
|
1616
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1617
|
+
*/const O$=Z("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
1618
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1619
|
+
*
|
|
1620
|
+
* This source code is licensed under the ISC license.
|
|
1621
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1622
|
+
*/const D$=Z("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
|
|
1623
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1624
|
+
*
|
|
1625
|
+
* This source code is licensed under the ISC license.
|
|
1626
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1627
|
+
*/const z$=Z("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
1628
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1629
|
+
*
|
|
1630
|
+
* This source code is licensed under the ISC license.
|
|
1631
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1632
|
+
*/const R$=Z("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
1633
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1634
|
+
*
|
|
1635
|
+
* This source code is licensed under the ISC license.
|
|
1636
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1637
|
+
*/const dr=Z("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
1638
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1639
|
+
*
|
|
1640
|
+
* This source code is licensed under the ISC license.
|
|
1641
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1642
|
+
*/const fr=Z("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
1643
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1644
|
+
*
|
|
1645
|
+
* This source code is licensed under the ISC license.
|
|
1646
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1647
|
+
*/const H$=Z("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
1648
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1649
|
+
*
|
|
1650
|
+
* This source code is licensed under the ISC license.
|
|
1651
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1652
|
+
*/const cp=Z("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
1653
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1654
|
+
*
|
|
1655
|
+
* This source code is licensed under the ISC license.
|
|
1656
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1657
|
+
*/const B$=Z("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
1658
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1659
|
+
*
|
|
1660
|
+
* This source code is licensed under the ISC license.
|
|
1661
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1662
|
+
*/const L$=Z("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
|
|
1663
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1664
|
+
*
|
|
1665
|
+
* This source code is licensed under the ISC license.
|
|
1666
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1667
|
+
*/const V$=Z("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]]);/**
|
|
1668
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1669
|
+
*
|
|
1670
|
+
* This source code is licensed under the ISC license.
|
|
1671
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1672
|
+
*/const U$=Z("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
|
|
1673
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1674
|
+
*
|
|
1675
|
+
* This source code is licensed under the ISC license.
|
|
1676
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1677
|
+
*/const I$=Z("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
|
|
1678
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1679
|
+
*
|
|
1680
|
+
* This source code is licensed under the ISC license.
|
|
1681
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1682
|
+
*/const $r=Z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
1683
|
+
* @license lucide-react v0.460.0 - ISC
|
|
1684
|
+
*
|
|
1685
|
+
* This source code is licensed under the ISC license.
|
|
1686
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1687
|
+
*/const hw=Z("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function gw(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=gw(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function q$(){for(var e,t,n=0,a="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=gw(e))&&(a&&(a+=" "),a+=t);return a}const Wm="-",G$=e=>{const t=P$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{const r=i.split(Wm);return r[0]===""&&r.length!==1&&r.shift(),yw(r,t)||Y$(i)},getConflictingClassGroupIds:(i,r)=>{const o=n[i]||[];return r&&a[i]?[...o,...a[i]]:o}}},yw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),l=a?yw(e.slice(1),a):void 0;if(l)return l;if(t.validators.length===0)return;const s=e.join(Wm);return(i=t.validators.find(({validator:r})=>r(s)))==null?void 0:i.classGroupId},b0=/^\[(.+)\]$/,Y$=e=>{if(b0.test(e)){const t=b0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},P$=e=>{const{theme:t,prefix:n}=e,a={nextPart:new Map,validators:[]};return Z$(Object.entries(e.classGroups),n).forEach(([s,i])=>{up(i,a,s,t)}),a},up=(e,t,n,a)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?t:x0(t,l);s.classGroupId=n;return}if(typeof l=="function"){if(X$(l)){up(l(a),t,n,a);return}t.validators.push({validator:l,classGroupId:n});return}Object.entries(l).forEach(([s,i])=>{up(i,x0(t,s),n,a)})})},x0=(e,t)=>{let n=e;return t.split(Wm).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},X$=e=>e.isThemeGetter,Z$=(e,t)=>t?e.map(([n,a])=>{const l=a.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,r])=>[t+i,r])):s);return[n,l]}):e,Q$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const l=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,a=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=a.get(s))!==void 0)return l(s,i),i},set(s,i){n.has(s)?n.set(s,i):l(s,i)}}},vw="!",K$=e=>{const{separator:t,experimentalParseClassName:n}=e,a=t.length===1,l=t[0],s=t.length,i=r=>{const o=[];let u=0,d=0,f;for(let x=0;x<r.length;x++){let m=r[x];if(u===0){if(m===l&&(a||r.slice(x,x+s)===t)){o.push(r.slice(d,x)),d=x+s;continue}if(m==="/"){f=x;continue}}m==="["?u++:m==="]"&&u--}const p=o.length===0?r:r.substring(d),h=p.startsWith(vw),y=h?p.substring(1):p,b=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:b}};return n?r=>n({className:r,parseClassName:i}):i},F$=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(a=>{a[0]==="["?(t.push(...n.sort(),a),n=[]):n.push(a)}),t.push(...n.sort()),t},J$=e=>({cache:Q$(e.cacheSize),parseClassName:K$(e),...G$(e)}),W$=/\s+/,e6=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:l}=t,s=[],i=e.trim().split(W$);let r="";for(let o=i.length-1;o>=0;o-=1){const u=i[o],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let y=!!h,b=a(y?p.substring(0,h):p);if(!b){if(!y){r=u+(r.length>0?" "+r:r);continue}if(b=a(p),!b){r=u+(r.length>0?" "+r:r);continue}y=!1}const x=F$(d).join(":"),m=f?x+vw:x,_=m+b;if(s.includes(_))continue;s.push(_);const g=l(b,y);for(let v=0;v<g.length;++v){const w=g[v];s.push(m+w)}r=u+(r.length>0?" "+r:r)}return r};function t6(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=_w(t))&&(a&&(a+=" "),a+=n);return a}const _w=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=_w(e[a]))&&(n&&(n+=" "),n+=t);return n};function n6(e,...t){let n,a,l,s=i;function i(o){const u=t.reduce((d,f)=>f(d),e());return n=J$(u),a=n.cache.get,l=n.cache.set,s=r,r(o)}function r(o){const u=a(o);if(u)return u;const d=e6(o,n);return l(o,d),d}return function(){return s(t6.apply(null,arguments))}}const Me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bw=/^\[(?:([a-z-]+):)?(.+)\]$/i,a6=/^\d+\/\d+$/,l6=new Set(["px","full","screen"]),s6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,i6=/\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$/,r6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,o6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>ws(e)||l6.has(e)||a6.test(e),pa=e=>ei(e,"length",y6),ws=e=>!!e&&!Number.isNaN(Number(e)),Ed=e=>ei(e,"number",ws),di=e=>!!e&&Number.isInteger(Number(e)),u6=e=>e.endsWith("%")&&ws(e.slice(0,-1)),re=e=>bw.test(e),ma=e=>s6.test(e),d6=new Set(["length","size","percentage"]),f6=e=>ei(e,d6,xw),p6=e=>ei(e,"position",xw),m6=new Set(["image","url"]),h6=e=>ei(e,m6,_6),g6=e=>ei(e,"",v6),fi=()=>!0,ei=(e,t,n)=>{const a=bw.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):n(a[2]):!1},y6=e=>i6.test(e)&&!r6.test(e),xw=()=>!1,v6=e=>o6.test(e),_6=e=>c6.test(e),b6=()=>{const e=Me("colors"),t=Me("spacing"),n=Me("blur"),a=Me("brightness"),l=Me("borderColor"),s=Me("borderRadius"),i=Me("borderSpacing"),r=Me("borderWidth"),o=Me("contrast"),u=Me("grayscale"),d=Me("hueRotate"),f=Me("invert"),p=Me("gap"),h=Me("gradientColorStops"),y=Me("gradientColorStopPositions"),b=Me("inset"),x=Me("margin"),m=Me("opacity"),_=Me("padding"),g=Me("saturate"),v=Me("scale"),w=Me("sepia"),N=Me("skew"),S=Me("space"),A=Me("translate"),k=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",re,t],V=()=>[re,t],U=()=>["",In,pa],T=()=>["auto",ws,re],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",re],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ws,re];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[In,pa],blur:["none","",ma,re],brightness:$(),borderColor:[e],borderRadius:["none","","full",ma,re],borderSpacing:V(),borderWidth:U(),contrast:$(),grayscale:C(),hueRotate:$(),invert:C(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[u6,pa],inset:O(),margin:O(),opacity:$(),padding:V(),saturate:$(),scale:$(),sepia:C(),skew:$(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[ma]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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"],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:[...M(),re]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,re]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",di,re]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,re]},re]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,re]},re]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[ma]},ma]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ma,pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ed]}],"font-family":[{font:[fi]}],"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:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",ws,Ed]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",In,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",In,pa]}],"underline-offset":[{"underline-offset":["auto",In,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),p6]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",f6]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},h6]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:j()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[In,re]}],"outline-w":[{outline:[In,pa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[In,pa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ma,g6]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[a]}],contrast:[{contrast:[o]}],"drop-shadow":[{"drop-shadow":["","none",ma,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[o]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[di,re]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[In,pa,Ed]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},x6=n6(b6),w6={Network:h$,GitFork:s$,Globe:i$,ArrowUpRight:GM,Compass:ZM,ShieldAlert:T$,Scale:N$,Webhook:U$,Radio:w$,Signpost:j$,Cpu:QM,Zap:hw,Layers:fw,Boxes:PM,Ship:k$,Package:y$,HardDrive:r$,FolderSync:a$,Table:R$,Database:Fm,Gauge:l$,ListOrdered:p$,BellRing:YM,Waypoints:V$,Workflow:I$,KeyRound:u$,Lock:m$,FileKey:e$,Users:B$,Activity:qM,Sliders:$$,Waves:L$,Search:Dc,Sparkles:O$};function xu({iconName:e,className:t="w-4 h-4",style:n}){const a=w6[e]||C$;return c.jsx(a,{className:t,style:n})}function Q(...e){return x6(q$(e))}const ww={primary:"bg-accent text-accent-ink hover:bg-accent-hover font-medium",secondary:"bg-raised text-fg border border-line hover:bg-overlay hover:border-line-strong",ghost:"text-fg-muted hover:text-fg hover:bg-raised",danger:"text-fg-muted hover:text-err hover:bg-err/10"};function me({variant:e="secondary",size:t="sm",className:n,...a}){return c.jsx("button",{type:"button",className:Q("inline-flex items-center justify-center gap-1.5 rounded-md whitespace-nowrap transition-colors","disabled:opacity-40 disabled:pointer-events-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-accent",t==="sm"?"h-7 px-2.5 text-xs":"h-8 px-3 text-[14px]",ww[e],n),...a})}function Ge({variant:e="ghost",className:t,...n}){return c.jsx("button",{type:"button",className:Q("inline-flex items-center justify-center w-7 h-7 rounded-md shrink-0 transition-colors","disabled:opacity-30 disabled:pointer-events-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-accent",ww[e],t),...n})}const zc="w-full bg-base border border-line rounded-md px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-faint hover:border-line-strong focus:outline-none focus:border-accent/70 transition-colors",Ue=`${zc} font-mono`;function Je({title:e,aside:t,children:n,className:a}){return c.jsxs("section",{className:Q("px-4 py-4 border-b border-line last:border-b-0",a),children:[(e||t)&&c.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3 min-h-[20px]",children:[c.jsx("h3",{className:"text-xs font-medium text-fg-muted",children:e}),t]}),n]})}function Sw({checked:e,onChange:t,title:n}){return c.jsx("button",{type:"button",role:"switch","aria-checked":e,title:n,onClick:()=>t(!e),className:Q("relative w-7 h-4 rounded-full shrink-0 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-accent",e?"bg-accent":"bg-overlay border border-line-strong"),children:c.jsx("span",{className:Q("absolute top-1/2 -translate-y-1/2 w-3 h-3 rounded-full transition-[left]",e?"left-[14px] bg-accent-ink":"left-[2px] bg-fg-muted")})})}function Pa({value:e,options:t,onChange:n,className:a}){return c.jsx("div",{className:Q("flex p-0.5 rounded-md bg-base border border-line",a),children:t.map(l=>c.jsx("button",{type:"button",onClick:()=>n(l.value),className:Q("flex-1 h-6 px-2.5 rounded-[5px] text-xs whitespace-nowrap inline-flex items-center justify-center gap-1.5 transition-colors",e===l.value?"bg-overlay text-fg":"text-fg-muted hover:text-fg"),children:l.label},l.value))})}function St({color:e,hollow:t,className:n}){return c.jsx("span",{className:Q("inline-block w-2 h-2 rounded-full shrink-0",n),style:t?{boxShadow:`inset 0 0 0 1.5px ${e}`}:{backgroundColor:e}})}function eh({iconName:e,color:t,size:n="md"}){const a=n==="sm"?"w-6 h-6":n==="md"?"w-7 h-7":"w-9 h-9",l=n==="lg"?"w-[18px] h-[18px]":"w-3.5 h-3.5";return c.jsx("span",{className:Q(a,"rounded-md bg-overlay border border-line flex items-center justify-center shrink-0"),style:{color:t},children:c.jsx(xu,{iconName:e,className:l})})}function uo({children:e}){return c.jsx("kbd",{className:"font-mono text-[11.5px] px-1 py-px rounded border border-line text-fg-muted",children:e})}const S6=["dev","testing","staging","prod"];function N6(){const e=B(M=>M.activeEnv),t=B(M=>M.environments),n=B(M=>M.setActiveEnv),a=B(M=>M.nodes),l=B(M=>M.view),s=B(M=>M.setView),i=B(M=>M.autoLayoutCanvas),r=B(M=>M.clearCanvas),o=B(M=>M.setTemplateModalOpen),u=B(M=>M.setImportModalOpen),d=B(M=>M.setExportModalOpen),f=B(M=>M.setRightTab),p=B(M=>M.emulatorStatuses),h=B(M=>M.refreshEmulatorStatuses),y=B(M=>M.syncTerraformToDisk),b=B(M=>M.requestApply),x=B(M=>M.loadProjectFromDisk),m=B(M=>M.syncStatusFromState),_=B(M=>M.isRunningCommand),g=B(M=>M.runningCommand),v=B(M=>M.projectFile),w=B(M=>{var j;return((j=M.pendingPlan)==null?void 0:j.envId)===M.activeEnv&&$c(M.pendingPlan)}),N=B(M=>M.undo),S=B(M=>M.redo),A=B(M=>M.past.length),k=B(M=>M.future.length),[H,O]=R.useState("idle");R.useEffect(()=>{h(),x().finally(()=>{y(),m()});const M=setInterval(h,6e3);return()=>clearInterval(M)},[]);const V=t[e],U=async()=>{O("saving"),(await y()).ok?(O("saved"),setTimeout(()=>O("idle"),3e3)):O("idle")},T=async()=>{f("emulator"),await b(e)};return c.jsxs("header",{className:"h-12 shrink-0 bg-panel border-b border-line pl-4 pr-3 flex items-center gap-4 select-none z-30",children:[c.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 w-[224px]",children:[c.jsx("div",{className:"w-5 h-5 rounded-[5px] bg-accent flex items-center justify-center",children:c.jsx("span",{className:"w-2 h-2 rounded-[2px] bg-accent-ink"})}),c.jsx("span",{className:"text-[14px] font-semibold tracking-tight text-fg",children:"LocalCloud"}),c.jsx("span",{className:"text-[14px] text-fg-faint",children:"Studio"})]}),c.jsx("nav",{className:"flex items-center h-full","aria-label":"Environment",children:S6.map(M=>{var E;const j=t[M],z=e===M,D=a.filter($=>{var L;return((L=$.data.envEnabled)==null?void 0:L[M])!==!1}).length,C=(E=p[j.emulatorPort])==null?void 0:E.running;return c.jsxs("button",{type:"button",onClick:()=>n(M),title:`${j.name} · ${D} resources · emulator :${j.emulatorPort} ${C?"running":"stopped"}`,className:Q("relative h-full px-3 flex items-center gap-2 text-[14px] transition-colors",z?"text-fg":"text-fg-muted hover:text-fg"),children:[c.jsx(St,{color:j.color,hollow:!C}),c.jsx("span",{children:M==="testing"?"test":M}),z&&c.jsx("span",{className:"absolute left-3 right-3 -bottom-px h-px bg-fg"})]},M)})}),c.jsx("span",{className:"w-px h-5 bg-line"}),c.jsx(Pa,{value:l,onChange:s,options:[{value:"design",label:"Design"},{value:"costs",label:"Costs"}]}),c.jsx("div",{className:"flex-1"}),v.file&&c.jsxs("span",{className:"hidden xl:flex items-center gap-1.5 text-[12.5px] font-mono text-fg-faint",title:v.state==="error"?`Could not save ./${v.file}: ${v.error}`:`The canvas is saved to ./${v.file} as you edit`,children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full",v.state==="error"?"bg-err":v.state==="saving"?"bg-warn":"bg-ok")}),v.file]}),c.jsxs("div",{className:"flex items-center gap-0.5",children:[c.jsx(Ge,{disabled:A===0,onClick:N,title:"Undo (⌘Z)",children:c.jsx(H$,{className:"w-4 h-4"})}),c.jsx(Ge,{disabled:k===0,onClick:S,title:"Redo (⌘⇧Z)",children:c.jsx(S$,{className:"w-4 h-4"})}),c.jsx(Ge,{onClick:i,title:"Auto-arrange canvas",children:c.jsx(d$,{className:"w-4 h-4"})}),c.jsx(Ge,{variant:"danger",onClick:r,title:"Clear canvas",children:c.jsx(dr,{className:"w-4 h-4"})})]}),c.jsx("span",{className:"w-px h-5 bg-line"}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsxs(me,{variant:"ghost",onClick:()=>o(!0),children:[c.jsx(f$,{className:"w-3.5 h-3.5"}),c.jsx("span",{className:"hidden lg:inline",children:"Blueprints"})]}),c.jsxs(me,{variant:"ghost",onClick:()=>u(!0),title:"Import Terraform, or save / load a project file",children:[c.jsx(WM,{className:"w-3.5 h-3.5"}),c.jsx("span",{className:"hidden lg:inline",children:"Import"})]}),c.jsxs(me,{variant:"ghost",onClick:()=>d(!0),title:"Write Terraform for your real AWS accounts to ./terraform-aws",children:[c.jsx(t$,{className:"w-3.5 h-3.5"}),c.jsx("span",{className:"hidden lg:inline",children:"Export for AWS"})]})]}),c.jsx("span",{className:"w-px h-5 bg-line"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:"h-7 px-1 text-xs font-mono text-fg-muted flex items-center gap-1.5",title:`Plan and apply run against the ${e} emulator. Use Export for AWS to deploy for real.`,children:[c.jsx("span",{className:"font-sans text-fg-faint",children:"emulator"}),"127.0.0.1:",V.emulatorPort]}),c.jsxs(me,{onClick:U,title:"Write Terraform for every environment to ./terraform-out",children:[H==="saved"?c.jsx(Km,{className:"w-3.5 h-3.5 text-ok"}):c.jsx(Jm,{className:Q("w-3.5 h-3.5",H==="saving"&&"animate-spin")}),H==="saved"?"Synced":"Sync"]}),c.jsxs(me,{variant:"primary",disabled:_,onClick:T,title:w?`Apply the reviewed plan to ${e}`:`Plan ${e} and review the changes before anything is applied`,children:[_?c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(pw,{className:"w-3 h-3 fill-current"}),g==="plan"?"Planning":g==="apply"?"Applying":"Apply"," ",e]})]})]})}const E6="2026-11-14T12:06:20.342Z",C6={aws_iam_role:{status:"verified",applied:20,failed:0,errors:[]},aws_iam_role_policy:{status:"verified",applied:12,failed:0,errors:[]},aws_kinesis_stream:{status:"fails",applied:1,failed:1,errors:["increasing Kinesis Stream (lc-dev-telemetry_ingest_stream) retention period: operation error Kinesis: IncreaseStreamRetentionPeriod, https response error StatusCode: 400, RequestID: , InvalidArgumentException: Requested retention period (24 hours) for stream lc-dev-telemetry_ingest_stream can not be shorter than existing retention period (24 hours). Use DecreaseRetentionPeriod API."],upstreamIssue:327},aws_lambda_event_source_mapping:{status:"verified",applied:3,failed:0,errors:[]},aws_lambda_function:{status:"verified",applied:8,failed:0,errors:[]},aws_opensearch_domain:{status:"verified",applied:2,failed:0,errors:[]},aws_sfn_state_machine:{status:"verified",applied:2,failed:0,errors:[]},aws_autoscaling_group:{status:"verified",applied:2,failed:0,errors:[]},aws_bedrockagent_agent:{status:"fails",applied:0,failed:2,errors:["creating Bedrock Agent: operation error Bedrock Agent: CreateAgent, https response error StatusCode: 403, RequestID: , AccessDeniedException: Amazon Bedrock Agents is in Maintenance Mode. New agent creation is not available for accounts without prior service usage. For new agent development, use Amazon Bedrock AgentCore."]},aws_cloudwatch_event_bus:{status:"verified",applied:2,failed:0,errors:[]},aws_cloudwatch_event_rule:{status:"verified",applied:2,failed:0,errors:[]},aws_cloudwatch_log_group:{status:"verified",applied:2,failed:0,errors:[]},aws_ecr_repository:{status:"verified",applied:2,failed:0,errors:[]},aws_efs_file_system:{status:"verified",applied:2,failed:0,errors:[]},aws_eip:{status:"verified",applied:2,failed:0,errors:[]},aws_eks_cluster:{status:"verified",applied:2,failed:0,errors:[]},aws_instance:{status:"fails",applied:0,failed:2,errors:["reading EC2 Instance (i-00000000000000003) credit specification: operation error EC2: DescribeInstanceCreditSpecifications, https response error StatusCode: 501, RequestID: 00000000-0000-0000-0000-000000000002, api error NotImplemented: operation DescribeInstanceCreditSpecifications is scaffolded but not implemented in this emulator"],upstreamIssue:422},aws_internet_gateway:{status:"verified",applied:2,failed:0,errors:[]},aws_kms_alias:{status:"verified",applied:2,failed:0,errors:[]},aws_kms_key:{status:"verified",applied:2,failed:0,errors:[]},aws_launch_template:{status:"verified",applied:2,failed:0,errors:[]},aws_nat_gateway:{status:"verified",applied:2,failed:0,errors:[]},aws_route53_zone:{status:"verified",applied:2,failed:0,errors:[]},aws_route_table:{status:"verified",applied:2,failed:0,errors:[]},aws_security_group:{status:"second-apply",applied:2,failed:0,errors:["The emulator stores a VPC security group's default egress rule without ports, so the provider's request to remove it (ports 0-0) doesn't match (aws/aws-emulator#46). The group is created; LocalCloud marks it usable, and applying again finishes the rest."],upstreamIssue:46},aws_sns_topic:{status:"verified",applied:2,failed:0,errors:[]},aws_ssm_parameter:{status:"verified",applied:2,failed:0,errors:[]},aws_subnet:{status:"verified",applied:12,failed:0,errors:[]},aws_vpc:{status:"verified",applied:4,failed:0,errors:[]},aws_apigatewayv2_api:{status:"verified",applied:2,failed:0,errors:[]},aws_apigatewayv2_integration:{status:"verified",applied:2,failed:0,errors:[]},aws_apigatewayv2_route:{status:"verified",applied:2,failed:0,errors:[]},aws_apigatewayv2_stage:{status:"verified",applied:2,failed:0,errors:[]},aws_cloudfront_distribution:{status:"verified",applied:2,failed:0,errors:[]},aws_cognito_user_pool:{status:"verified",applied:2,failed:0,errors:[]},aws_cognito_user_pool_client:{status:"verified",applied:2,failed:0,errors:[]},aws_dynamodb_table:{status:"verified",applied:2,failed:0,errors:[]},aws_lambda_permission:{status:"verified",applied:2,failed:0,errors:[]},aws_s3_bucket:{status:"verified",applied:2,failed:0,errors:[]},aws_s3_bucket_lifecycle_configuration:{status:"verified",applied:2,failed:0,errors:[]},aws_s3_bucket_public_access_block:{status:"verified",applied:2,failed:0,errors:[]},aws_s3_bucket_server_side_encryption_configuration:{status:"verified",applied:2,failed:0,errors:[]},aws_s3_bucket_versioning:{status:"verified",applied:2,failed:0,errors:[]},aws_sqs_queue:{status:"verified",applied:4,failed:0,errors:[]},aws_db_instance:{status:"verified",applied:2,failed:0,errors:[]},aws_db_subnet_group:{status:"verified",applied:2,failed:0,errors:[]},aws_ecs_cluster:{status:"verified",applied:2,failed:0,errors:[]},aws_ecs_service:{status:"verified",applied:2,failed:0,errors:[]},aws_ecs_task_definition:{status:"verified",applied:2,failed:0,errors:[]},aws_elasticache_cluster:{status:"verified",applied:1,failed:0,errors:[]},aws_elasticache_subnet_group:{status:"verified",applied:2,failed:0,errors:[]},aws_iam_role_policy_attachment:{status:"verified",applied:2,failed:0,errors:[]},aws_lb:{status:"verified",applied:2,failed:0,errors:[]},aws_lb_listener:{status:"verified",applied:2,failed:0,errors:[]},aws_lb_target_group:{status:"verified",applied:2,failed:0,errors:[]},aws_secretsmanager_secret:{status:"verified",applied:2,failed:0,errors:[]},aws_secretsmanager_secret_version:{status:"verified",applied:2,failed:0,errors:[]},aws_elasticache_replication_group:{status:"fails",applied:0,failed:1,errors:["destroy: deleting ElastiCache Replication Group (lc-prod-session-redis-cache): operation error ElastiCache: DeleteReplicationGroup, https response error StatusCode: 501, RequestID: defa58c9-b6e4-490e-b506-c58cdf6de997, api error NotImplemented: operation DeleteReplicationGroup is scaffolded but not implemented in this emulator"],upstreamIssue:355}},Nw={generatedAt:E6,byType:C6},T6=Nw.byType||{};function Rc(e){const t=e?T6[e.terraformResourceType]:void 0;return{level:t?t.status:"untested",errors:(t==null?void 0:t.errors)||[],testedAt:Nw.generatedAt,upstreamIssueUrl:t!=null&&t.upstreamIssue?`https://github.com/aws/aws-emulator/issues/${t.upstreamIssue}`:null}}function A6(e,t){let n=e;return n.startsWith(`${t} `)&&(n=n.slice(t.length+1)),n.replace(` (${t})`,"")}function k6(){const[e,t]=R.useState(""),[n,a]=R.useState({}),l=B(d=>d.addServiceNode),s=B(d=>d.isCatalogOpen),i=B(d=>d.setCatalogOpen),r=R.useMemo(()=>{const d=e.trim().toLowerCase(),f={};for(const p of Qj){const h=sp.filter(y=>y.category===p&&(!d||y.name.toLowerCase().includes(d)||y.shortName.toLowerCase().includes(d)||y.serviceCode.toLowerCase().includes(d)||y.terraformResourceType.toLowerCase().includes(d)||y.description.toLowerCase().includes(d)));h.length>0&&(f[p]=h)}return f},[e]),o=(d,f)=>{d.dataTransfer.setData("application/localcloud-service",f),d.dataTransfer.effectAllowed="move"},u=d=>{a(f=>({...f,[d]:!f[d]}))};return s?c.jsxs("aside",{className:"w-64 shrink-0 h-full bg-panel border-r border-line flex flex-col select-none",children:[c.jsxs("div",{className:"p-3 border-b border-line flex items-center gap-1.5",children:[c.jsxs("div",{className:"relative flex-1 min-w-0",children:[c.jsx(Dc,{className:"w-3.5 h-3.5 text-fg-faint absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none"}),c.jsx("input",{type:"text",value:e,onChange:d=>t(d.target.value),placeholder:`Search ${sp.length} services`,className:"w-full h-8 bg-base border border-line hover:border-line-strong focus:border-accent/70 rounded-md pl-8 pr-7 text-xs text-fg placeholder:text-fg-faint focus:outline-none transition-colors"}),e&&c.jsx("button",{type:"button",onClick:()=>t(""),title:"Clear search",className:"absolute right-1.5 top-1/2 -translate-y-1/2 p-1 rounded text-fg-faint hover:text-fg",children:c.jsx($r,{className:"w-3 h-3"})})]}),c.jsx(Ge,{onClick:()=>i(!1),title:"Hide services (⌘B)",className:"-mr-1",children:c.jsx(v$,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto py-1.5",children:[Object.entries(r).map(([d,f])=>{const p=n[d]&&!e;return c.jsxs("div",{className:"mb-1",children:[c.jsxs("button",{type:"button",onClick:()=>u(d),className:"w-full h-7 px-3 flex items-center gap-1.5 text-left text-fg-muted hover:text-fg transition-colors",children:[c.jsx(XM,{className:Q("w-3 h-3 shrink-0 transition-transform",!p&&"rotate-90")}),c.jsx("span",{className:"text-[12.5px] font-medium truncate",children:d}),c.jsx("span",{className:"ml-auto text-[12.5px] text-fg-faint tabular-nums",children:f.length})]}),!p&&c.jsx("div",{className:"px-1.5",children:f.map(h=>c.jsxs("div",{draggable:!0,onDragStart:y=>o(y,h.typeId),onClick:()=>l(h.typeId),title:`${h.name}
|
|
1688
|
+
${h.terraformResourceType}
|
|
1689
|
+
Drag onto the canvas or click to add`,className:"group h-8 px-1.5 flex items-center gap-2.5 rounded-md hover:bg-raised cursor-grab active:cursor-grabbing transition-colors",children:[c.jsx("span",{className:"w-5 flex justify-center shrink-0",style:{color:h.color},children:c.jsx(xu,{iconName:h.iconName,className:"w-3.5 h-3.5"})}),c.jsx("span",{className:"text-[14px] text-fg shrink-0",children:h.shortName}),c.jsx("span",{className:"text-xs text-fg-faint truncate",children:A6(h.name,h.shortName)}),Rc(h).level==="fails"&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-warn shrink-0",title:`Fails on the emulator in tests:
|
|
1690
|
+
${Rc(h).errors[0]||""}`}),c.jsx(mw,{className:"w-3.5 h-3.5 ml-auto shrink-0 text-fg-muted opacity-0 group-hover:opacity-100 transition-opacity"})]},h.typeId))})]},d)}),Object.keys(r).length===0&&c.jsxs("div",{className:"py-12 px-4 text-center text-xs text-fg-faint",children:["No services match “",e,"”"]})]})]}):c.jsx("aside",{className:"w-10 shrink-0 h-full bg-panel border-r border-line flex flex-col items-center py-3 select-none",children:c.jsx(Ge,{onClick:()=>i(!0),title:"Show services (⌘B)",children:c.jsx(_$,{className:"w-4 h-4"})})})}const Sn={create:{symbol:"+",label:"create",text:"text-ok",border:"border-ok/60"},update:{symbol:"~",label:"change",text:"text-warn",border:"border-warn/60"},replace:{symbol:"±",label:"replace",text:"text-err",border:"border-err/60"},delete:{symbol:"−",label:"destroy",text:"text-err",border:"border-err/60"}},Cd=5;function j6(){const e=B(f=>f.activeEnv),t=B(f=>{var p;return((p=f.pendingPlan)==null?void 0:p.envId)===f.activeEnv?f.pendingPlan:null}),n=B(f=>f.isRunningCommand),a=B(f=>f.runningCommand),l=B(f=>f.applyReviewedPlan),s=B(f=>f.discardPlan);if(!t)return null;const i=$c(t),{add:r,change:o,destroy:u}=t.counts,d=t.mode==="destroy";return c.jsxs("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 max-w-[calc(100%-24px)] rounded-lg bg-raised border border-line-strong shadow-xl shadow-black/40",children:[c.jsx("div",{className:"h-11 pl-4 pr-2 flex items-center gap-4",children:i?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-[14px] text-fg whitespace-nowrap",children:d?`Destroy ${e}`:`Plan for ${e}`}),c.jsxs("span",{className:"flex items-center gap-3 font-mono text-xs whitespace-nowrap",children:[c.jsxs("span",{className:r?"text-ok":"text-fg-faint",children:["+",r," add"]}),c.jsxs("span",{className:o?"text-warn":"text-fg-faint",children:["~",o," change"]}),c.jsxs("span",{className:u?"text-err":"text-fg-faint",children:["−",u," destroy"]})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(me,{variant:"ghost",disabled:n,onClick:s,children:"Discard"}),c.jsxs(me,{variant:"primary",disabled:n,onClick:l,className:Q(d&&"bg-err text-base hover:bg-err/85"),children:[a==="apply"&&c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}),d?`Destroy ${u} resource${u===1?"":"s"}`:"Apply"]})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-[14px] text-fg-muted whitespace-nowrap",children:d?c.jsxs(c.Fragment,{children:["Nothing to destroy in ",c.jsx("span",{className:"text-fg",children:e}),"."]}):c.jsxs(c.Fragment,{children:["No changes. ",c.jsx("span",{className:"text-fg",children:e})," already matches the canvas."]})}),c.jsx(me,{variant:"ghost",onClick:s,children:"Dismiss"})]})}),t.other.length>0&&c.jsxs("div",{className:"px-4 py-2.5 border-t border-line",children:[c.jsx("div",{className:"text-[12.5px] text-fg-faint mb-1.5",children:"Not on the canvas"}),c.jsxs("ul",{className:"space-y-0.5 font-mono text-[12.5px]",children:[t.other.slice(0,Cd).map(f=>c.jsxs("li",{className:"flex gap-2",children:[c.jsx("span",{className:Q("w-2 text-center",Sn[f.action].text),children:Sn[f.action].symbol}),c.jsx("span",{className:"text-fg-muted truncate",children:f.address})]},f.address)),t.other.length>Cd&&c.jsxs("li",{className:"text-fg-faint pl-4",children:["and ",t.other.length-Cd," more, listed in the Run tab"]})]})]})]})}const M6=["dev","testing","staging","prod"],Ew=R.memo(({id:e,data:t,selected:n})=>{var w,N,S,A;const a=B(k=>k.activeEnv),l=B(k=>k.environments),s=B(k=>k.selectedNodeId),i=B(k=>k.selectNode),r=B(k=>k.duplicateNode),o=B(k=>k.deleteNode),u=B(k=>k.setRightTab),d=B(k=>{var H;return((H=k.pendingPlan)==null?void 0:H.envId)===k.activeEnv?k.pendingPlan.changesByNode[e]:void 0}),f=B(k=>{var H;return((H=k.pendingPlan)==null?void 0:H.envId)===k.activeEnv?k.pendingPlan.byNode[e]:void 0}),p=De[t.serviceType],h=n||s===e,y=((w=t.envEnabled)==null?void 0:w[a])!==!1,b={...t.baseConfig||{},...((N=t.envOverrides)==null?void 0:N[a])||{}},x=Object.keys(((S=t.envOverrides)==null?void 0:S[a])||{}),m=((A=t.provisioningStatus)==null?void 0:A[a])||"unapplied",_=m==="provisioning"||m==="planning",g=["aws_s3_bucket","aws_dynamodb_table","aws_sqs_queue","aws_lambda_function"].includes(t.serviceType),v=((p==null?void 0:p.schema)||[]).slice(0,3);return c.jsxs("div",{onClick:k=>{k.stopPropagation(),i(e)},style:{width:Ym},className:Q("group relative rounded-lg bg-raised border shadow-[0_1px_2px_rgba(0,0,0,0.4)] transition-[border-color,box-shadow,opacity] duration-150",h?"border-accent shadow-[0_0_0_3px_rgba(232,196,0,0.15)]":f?Sn[f].border:_?"border-warn/70":m==="failed"?"border-err/60":"border-line hover:border-line-strong",!y&&"opacity-40 border-dashed"),children:[c.jsx(Ya,{type:"target",position:W.Left}),c.jsxs("div",{className:"flex items-center gap-2.5 px-3 pt-3 pb-2.5",children:[c.jsx(eh,{iconName:(p==null?void 0:p.iconName)||"Server",color:(p==null?void 0:p.color)||"#9CA1A4"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-[14px] font-medium text-fg truncate leading-tight",children:t.label}),c.jsxs("div",{className:"text-[12.5px] text-fg-faint truncate mt-0.5",children:[(p==null?void 0:p.shortName)||"AWS",c.jsx("span",{className:"mx-1",children:"·"}),c.jsx("span",{className:"font-mono",children:t.resourceName})]})]})]}),c.jsxs("div",{className:"absolute top-2 right-2 hidden group-hover:flex items-center bg-overlay border border-line-strong rounded-md",children:[g&&c.jsx("button",{type:"button",title:"Browse live data",onClick:k=>{k.stopPropagation(),i(e),u("explorer")},className:"p-1.5 text-fg-muted hover:text-fg",children:c.jsx(Fm,{className:"w-3 h-3"})}),c.jsx("button",{type:"button",title:"Duplicate (⌘D)",onClick:k=>{k.stopPropagation(),r(e)},className:"p-1.5 text-fg-muted hover:text-fg",children:c.jsx(Mr,{className:"w-3 h-3"})}),c.jsx("button",{type:"button",title:"Delete (⌫)",onClick:k=>{k.stopPropagation(),o(e)},className:"p-1.5 text-fg-muted hover:text-err",children:c.jsx(dr,{className:"w-3 h-3"})})]}),v.length>0&&c.jsx("dl",{className:"px-3 py-2 space-y-1 border-t border-line",children:v.map(k=>{const H=b[k.key],O=x.includes(k.key),V=typeof H=="boolean"?String(H):H===void 0||H===""?"—":String(H);return c.jsxs("div",{className:"flex items-baseline justify-between gap-3 font-mono text-[12.5px]",children:[c.jsx("dt",{className:"text-fg-faint truncate shrink-0 max-w-[45%]",children:k.key}),c.jsx("dd",{title:O?`Overridden in ${a}`:void 0,className:Q("truncate",O?"text-accent":"text-fg-muted"),children:V})]},k.key)})}),c.jsxs("div",{className:"h-7 px-3 flex items-center justify-between border-t border-line",children:[c.jsx("div",{className:"flex items-center gap-1",title:"Deployed in dev · test · staging · prod",children:M6.map(k=>{var H;return c.jsx(St,{color:l[k].color,hollow:((H=t.envEnabled)==null?void 0:H[k])===!1,className:"w-1.5 h-1.5"},k)})}),c.jsx("span",{className:"text-[12.5px] flex items-center gap-1.5",children:y?f&&!_?c.jsxs("span",{className:Q("font-mono",Sn[f].text),title:(d||[]).map(k=>`${Sn[k.action].symbol} ${k.address}`).join(`
|
|
1691
|
+
`),children:[Sn[f].symbol," ",Sn[f].label]}):_?c.jsxs("span",{className:"text-warn flex items-center gap-1",children:[c.jsx(Bl,{className:"w-3 h-3 animate-spin"}),m]}):m==="provisioned"?c.jsxs("span",{className:"text-fg-muted flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-ok"}),"applied"]}):m==="failed"?c.jsx("span",{className:"text-err",children:"failed"}):x.length>0?c.jsxs("span",{className:"text-fg-faint",children:[x.length," ",a," override",x.length>1?"s":""]}):null:c.jsxs("span",{className:"text-fg-faint",children:["skipped in ",a]})})]}),c.jsx(Ya,{type:"source",position:W.Right})]})});Ew.displayName="AwsNodeCard";const Cw=R.memo(({id:e,data:t,selected:n})=>{var v,w,N;const a=B(S=>S.activeEnv),l=B(S=>S.selectedNodeId),s=B(S=>S.selectNode),i=B(S=>S.duplicateNode),r=B(S=>S.deleteNode),o=B(S=>S.pushHistory),u=B(S=>S.nodes.filter(A=>A.parentId===e).length),d=B(S=>{var A;return((A=S.pendingPlan)==null?void 0:A.envId)===S.activeEnv?S.pendingPlan.byNode[e]:void 0}),f=De[t.serviceType],p=(f==null?void 0:f.color)||"#8E8CD8",h=t.serviceType==="aws_subnet",y=n||l===e,b=((v=t.envEnabled)==null?void 0:v[a])!==!1,x=((w=t.provisioningStatus)==null?void 0:w[a])||"unapplied",m={...t.baseConfig||{},...((N=t.envOverrides)==null?void 0:N[a])||{}},_=S=>{var A;return Object.prototype.hasOwnProperty.call(((A=t.envOverrides)==null?void 0:A[a])||{},S)},g=h?String(m.tier||(m.map_public_ip_on_launch?"public":"private")):null;return c.jsxs("div",{onClick:S=>{S.stopPropagation(),s(e)},className:Q("group relative w-full h-full rounded-xl border border-dashed transition-[opacity,border-color] duration-150",h?"bg-white/[0.02]":"bg-white/[0.012]",y?"border-accent":"border-line-strong hover:border-fg-faint",!b&&"opacity-40"),children:[c.jsx(Zj,{isVisible:y,minWidth:h?300:360,minHeight:h?200:240,color:"#E8C400",onResizeStart:()=>o(),handleStyle:{width:8,height:8,borderRadius:2},lineStyle:{borderColor:"transparent"}}),c.jsx(Ya,{type:"target",position:W.Left}),c.jsxs("div",{className:"absolute top-0 inset-x-0 h-10 px-3.5 flex items-center justify-between gap-3 cursor-grab",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{style:{color:p},className:"shrink-0",children:c.jsx(xu,{iconName:(f==null?void 0:f.iconName)||"Network",className:"w-3.5 h-3.5"})}),c.jsx("span",{className:"text-xs text-fg-muted shrink-0",children:f==null?void 0:f.shortName}),c.jsx("span",{className:"text-[14px] font-medium text-fg truncate",children:t.label}),g&&c.jsx("span",{className:"text-[12.5px] text-fg-faint px-1.5 rounded border border-line shrink-0",children:g})]}),c.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 font-mono text-[12.5px]",children:[c.jsx("span",{className:_("cidr_block")?"text-accent":"text-fg-muted",title:`CIDR in ${a}${_("cidr_block")?" (override)":""}`,children:String(m.cidr_block||"—")}),h&&m.availability_zone&&c.jsx("span",{className:"text-fg-faint",children:String(m.availability_zone)}),b?d?c.jsxs("span",{className:Sn[d].text,children:[Sn[d].symbol," ",Sn[d].label]}):x==="provisioning"||x==="planning"?c.jsx(Bl,{className:"w-3 h-3 animate-spin text-warn"}):x==="provisioned"?c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-ok",title:`Applied in ${a}`}):x==="failed"?c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-err",title:`Failed in ${a}`}):null:c.jsxs("span",{className:"font-sans text-fg-faint",children:["skipped in ",a]}),c.jsxs("div",{className:"hidden group-hover:flex items-center",children:[c.jsx("button",{type:"button",title:"Duplicate (⌘D)",onClick:S=>{S.stopPropagation(),i(e)},className:"p-1 rounded text-fg-muted hover:text-fg",children:c.jsx(Mr,{className:"w-3 h-3"})}),c.jsx("button",{type:"button",title:"Delete container (resources inside are kept)",onClick:S=>{S.stopPropagation(),r(e)},className:"p-1 rounded text-fg-muted hover:text-err",children:c.jsx(dr,{className:"w-3 h-3"})})]})]})]}),u===0&&c.jsx("div",{className:"absolute inset-0 top-10 flex items-center justify-center pointer-events-none",children:c.jsxs("span",{className:"text-xs text-fg-faint",children:["Drop resources here to place them in this ",h?"subnet":"VPC"]})}),c.jsx(Ya,{type:"source",position:W.Right})]})});Cw.displayName="AwsContainerNode";const Td={event_trigger:"#D4945A",iam_grant:"#7FAE7A",target_route:"#6E94B0",network_attachment:"#8E8CD8",data_flow:"#5A6166",depends_on:"#5A6166"},$6=[{rel:"event_trigger",label:"Trigger"},{rel:"iam_grant",label:"Access"},{rel:"target_route",label:"Route"},{rel:"network_attachment",label:"Network"},{rel:"data_flow",label:"Data"}],O6={awsNode:Ew,awsContainer:Cw};function D6(e){const t=e;return t?t.isContentEditable||t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT":!1}function z6(){const e=R.useRef(null),t=R.useRef(null),n=B(N=>N.nodes),a=B(N=>N.edges),l=B(N=>N.onNodesChange),s=B(N=>N.onEdgesChange),i=B(N=>N.onConnect),r=B(N=>N.selectNode),o=B(N=>N.selectEdge),u=B(N=>N.addServiceNode),d=B(N=>N.setTemplateModalOpen),f=B(N=>N.onNodeDragStart),p=B(N=>N.onNodeDragStop);R.useEffect(()=>{const N=S=>{if(D6(S.target))return;const A=B.getState();if(A.view!=="design")return;const k=S.metaKey||S.ctrlKey,H=S.key.toLowerCase();k&&H==="z"?(S.preventDefault(),S.shiftKey?A.redo():A.undo()):k&&H==="y"?(S.preventDefault(),A.redo()):k&&S.code==="KeyB"?(S.preventDefault(),S.altKey?A.setDrawerOpen(!A.isDrawerOpen):A.setCatalogOpen(!A.isCatalogOpen)):k&&H==="d"?(S.preventDefault(),A.selectedNodeId&&A.duplicateNode(A.selectedNodeId)):!k&&(S.key==="Backspace"||S.key==="Delete")?(S.preventDefault(),A.deleteSelectedElements()):S.key==="Escape"&&A.selectNode(null)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[]);const[h,y]=R.useState(null),b=R.useRef(),x=N=>{y(N),clearTimeout(b.current),b.current=setTimeout(()=>y(null),4e3)},m=R.useCallback(N=>{const{nodes:S,edges:A}=B.getState();return rp(S.find(k=>k.id===N.source),S.find(k=>k.id===N.target),A).ok},[]),_=R.useCallback((N,S)=>{var T;if(S.isValid!==!1||!S.fromNode||!S.toNode)return;const A=((T=S.fromHandle)==null?void 0:T.type)==="target",{nodes:k,edges:H}=B.getState(),O=k.find(M=>M.id===(A?S.toNode.id:S.fromNode.id)),V=k.find(M=>M.id===(A?S.fromNode.id:S.toNode.id)),U=rp(O,V,H);U.ok||x(U.reason)},[]),g=R.useCallback(N=>{N.preventDefault(),N.dataTransfer.dropEffect="move"},[]),v=R.useCallback(N=>{N.preventDefault();const S=N.dataTransfer.getData("application/localcloud-service");if(S)if(t.current){const A=t.current.screenToFlowPosition({x:N.clientX-Ym/2,y:N.clientY-24});u(S,A)}else u(S)},[u]),w=a.map(N=>{var k,H;const S=((k=N.data)==null?void 0:k.relationshipType)||"data_flow",A=N.selected?"#E8C400":Td[S]||Td.data_flow;return{...N,animated:!!N.selected,label:((H=N.data)==null?void 0:H.label)||S,labelStyle:{fill:"#9CA1A4",fontSize:11.5,fontFamily:'"IBM Plex Mono", monospace'},labelBgStyle:{fill:"#101214",fillOpacity:1},labelBgPadding:[4,2],labelBgBorderRadius:3,style:{stroke:A,strokeWidth:N.selected?2:1.5}}});return c.jsxs("div",{ref:e,className:"flex-1 h-full relative bg-base overflow-hidden",children:[c.jsx("div",{className:"absolute bottom-[18px] left-14 z-10 pointer-events-none hidden xl:flex items-center gap-4 text-[12.5px] text-fg-faint",children:$6.map(({rel:N,label:S})=>c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"w-3 h-0.5 rounded-full",style:{backgroundColor:Td[N]}}),S]},N))}),c.jsx(j6,{}),h&&c.jsx("div",{role:"status",className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 max-w-[min(520px,calc(100%-24px))] px-3.5 py-2 rounded-md bg-raised border border-line-strong text-xs text-fg-muted shadow-lg shadow-black/40",children:h}),n.length===0&&c.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:c.jsxs("div",{className:"pointer-events-auto max-w-sm text-center",children:[c.jsx("h2",{className:"text-[16px] font-medium text-fg",children:"Empty canvas"}),c.jsx("p",{className:"text-[14px] text-fg-muted mt-1.5 leading-relaxed",children:"Drag a service from the left, or start from a blueprint. Terraform for every environment updates as you build."}),c.jsxs("div",{className:"flex items-center justify-center gap-2 mt-5",children:[c.jsx(me,{variant:"primary",size:"md",onClick:()=>d(!0),children:"Browse blueprints"}),c.jsx(me,{size:"md",onClick:()=>u("aws_lambda_function",{x:350,y:220}),children:"Add a Lambda"})]})]})}),c.jsxs(vj,{nodes:n,edges:w,nodeTypes:O6,onNodesChange:l,onEdgesChange:s,onConnect:i,isValidConnection:m,onConnectEnd:_,onNodeDragStart:f,onNodeDragStop:(N,S,A)=>p(A.map(k=>k.id)),deleteKeyCode:null,onInit:N=>{t.current=N},onNodeClick:(N,S)=>r(S.id),onEdgeClick:(N,S)=>o(S.id),onPaneClick:()=>{r(null),o(null)},onDragOver:g,onDrop:v,fitView:!0,fitViewOptions:{padding:.1},minZoom:.2,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[c.jsx(Sj,{variant:Kn.Dots,gap:20,size:1,color:"#2C3135"}),c.jsx(jj,{position:"bottom-left",showInteractive:!1}),c.jsx(Gj,{position:"bottom-right",pannable:!0,zoomable:!0,nodeColor:N=>{var S,A;return N.type==="awsContainer"?"#1E2124":((A=De[String(((S=N.data)==null?void 0:S.serviceType)||"")])==null?void 0:A.color)||"#6E7478"},nodeStrokeColor:N=>N.type==="awsContainer"?"#454B50":"transparent",nodeBorderRadius:2,maskColor:"rgba(16, 18, 20, 0.7)",style:{width:168,height:112}})]})]})}const R6=[{command:"init",label:"init"},{command:"validate",label:"validate"},{command:"plan",label:"plan"},{command:"apply",label:"apply"},{command:"destroy",label:"destroy"}];function H6(e){return/Error:|error:|│ Error/.test(e)?"text-err":/Warning:/.test(e)?"text-warn":/complete after|Apply complete|No changes|Success|succeeded|completed successfully|Synced|Captured/.test(e)?"text-ok":/\] \$ terraform/.test(e)?"text-fg":(/Creating\.\.\.|Destroying\.\.\.|Still /.test(e),"text-fg-muted")}function B6(){var y;const e=B(b=>b.activeEnv),t=B(b=>b.environments),n=B(b=>b.emulatorStatuses),a=B(b=>b.isRunningCommand),l=B(b=>b.terminalLogs),s=B(b=>b.controlEmulatorContainer),i=B(b=>b.runTerraformCommand),r=B(b=>b.requestApply),o=B(b=>b.requestDestroy),u=B(b=>b.clearTerminalLogs),d=t[e],f=(y=n[d.emulatorPort])==null?void 0:y.running,p=R.useRef(null);R.useEffect(()=>{const b=p.current;b&&(b.scrollTop=b.scrollHeight)},[l.length]);const h=b=>{b==="apply"?r(e):b==="destroy"?o(e):i(b,e)};return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"text-[14px] text-fg flex items-center gap-2",children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full shrink-0",f?"bg-ok":"bg-fg-faint/60")}),d.name," emulator"]}),c.jsxs("div",{className:"text-[12.5px] font-mono text-fg-faint mt-0.5 pl-3.5",children:["127.0.0.1:",d.emulatorPort," · ",f?"running":"stopped"]})]}),f?c.jsxs(me,{disabled:a,onClick:()=>s("stop",e),children:[c.jsx(z$,{className:"w-3 h-3 fill-current"})," Stop"]}):c.jsxs(me,{disabled:a,onClick:()=>s("start",e),children:[c.jsx(pw,{className:"w-3 h-3 fill-current"})," Start"]})]}),c.jsx("div",{className:"flex rounded-md border border-line overflow-hidden divide-x divide-line",children:R6.map(({command:b,label:x})=>c.jsx("button",{type:"button",disabled:a,onClick:()=>h(b),className:Q("flex-1 h-7 text-xs font-mono transition-colors disabled:opacity-40",b==="destroy"?"text-fg-muted hover:text-err hover:bg-err/10":"text-fg-muted hover:text-fg hover:bg-raised"),children:x},b))}),c.jsxs("div",{className:"rounded-md border border-line bg-base overflow-hidden",children:[c.jsxs("div",{className:"h-8 pl-3 pr-1 border-b border-line flex items-center justify-between",children:[c.jsxs("span",{className:"text-[12.5px] font-mono text-fg-faint flex items-center gap-1.5",children:[a&&c.jsx(Bl,{className:"w-3 h-3 animate-spin text-warn"}),"terraform-out/environments/",e]}),c.jsx(Ge,{onClick:u,title:"Clear output",className:"w-6 h-6",children:c.jsx(KM,{className:"w-3 h-3"})})]}),c.jsx("div",{ref:p,className:"h-72 overflow-y-auto p-3 font-mono text-[12.5px] leading-relaxed select-text",children:l.length===0?c.jsx("span",{className:"text-fg-faint",children:"No output yet."}):l.map((b,x)=>c.jsx("div",{className:`whitespace-pre-wrap break-words ${H6(b)}`,children:b},x))})]})]})}const fo=[{id:"s3",label:"S3",nodeType:"aws_s3_bucket",listOp:"list_buckets"},{id:"dynamodb",label:"DynamoDB",nodeType:"aws_dynamodb_table",listOp:"list_tables"},{id:"sqs",label:"SQS",nodeType:"aws_sqs_queue",listOp:"list_queues"},{id:"lambda",label:"Lambda",nodeType:"aws_lambda_function",listOp:"list_functions"}];function L6(e,t){return!t||typeof t!="object"?[]:e==="s3"?(t.Buckets||[]).map(n=>n.Name):e==="dynamodb"?t.TableNames||[]:e==="sqs"?t.QueueUrls||[]:(t.Functions||[]).map(n=>n.FunctionName)}function dp(e){return e==null?{NULL:!0}:typeof e=="string"?{S:e}:typeof e=="number"?{N:String(e)}:typeof e=="boolean"?{BOOL:e}:Array.isArray(e)?{L:e.map(dp)}:{M:Object.fromEntries(Object.entries(e).map(([t,n])=>[t,dp(n)]))}}function V6(){var E;const e=B($=>$.nodes),t=B($=>$.selectedNodeId),n=B($=>$.activeEnv),l=B($=>$.environments)[n],s=e.find($=>$.id===t),i=fo.find($=>$.nodeType===(s==null?void 0:s.data.serviceType)),[r,o]=R.useState((i==null?void 0:i.id)||"s3"),[u,d]=R.useState([]),[f,p]=R.useState(""),[h,y]=R.useState(null),[b,x]=R.useState(null),[m,_]=R.useState(!1),[g,v]=R.useState("hello.txt"),[w,N]=R.useState("Hello from LocalCloud Studio"),[S,A]=R.useState(`{
|
|
1692
|
+
"pk": "order#1001",
|
|
1693
|
+
"status": "PENDING"
|
|
1694
|
+
}`),[k,H]=R.useState('{"orderId":"1001"}'),[O,V]=R.useState(`{
|
|
1695
|
+
"ping": "hello"
|
|
1696
|
+
}`);R.useEffect(()=>{i&&o(i.id)},[i==null?void 0:i.id]);const U=R.useCallback(async($,L={})=>{_(!0);try{return await(await fetch("/api/emulator/explore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:l.emulatorPort,region:l.region,service:r,operation:$,target:L.target??f,input:L.input})})).json()}catch(P){return{ok:!1,error:(P==null?void 0:P.message)||"Request failed"}}finally{_(!1)}},[l.emulatorPort,l.region,r,f]),T=R.useMemo(()=>!s||(i==null?void 0:i.id)!==r?null:Le(s.data.resourceName||s.data.label).replace(/_/g,"-"),[s,i,r]),M=R.useCallback(async()=>{const $=fo.find(K=>K.id===r),L=await U($.listOp,{target:""});y(L);const P=L.ok?L6(r,L.data):[];d(P);const G=T&&P.find(K=>K.toLowerCase().includes(T))||P[0]||"";p(G),x(null)},[U,r,T]);R.useEffect(()=>{M()},[r,n]);const j=async($,L)=>{x(await U($,{input:L}))},z=()=>{try{const $=JSON.parse(S),L=Object.fromEntries(Object.entries($).map(([P,G])=>[P,dp(G)]));j("put_item",{item:L})}catch{x({ok:!1,error:"Item must be valid JSON"})}},D=()=>{try{j("invoke",{event:JSON.parse(O)})}catch{x({ok:!1,error:"Event must be valid JSON"})}},C=(h==null?void 0:h.emulatorOnline)===!1;return c.jsxs(c.Fragment,{children:[c.jsx(Je,{children:c.jsx(Pa,{value:r,onChange:o,options:fo.map($=>{const L=De[$.nodeType];return{value:$.id,label:c.jsxs(c.Fragment,{children:[c.jsx("span",{style:{color:L==null?void 0:L.color},children:c.jsx(xu,{iconName:(L==null?void 0:L.iconName)||"Box",className:"w-3 h-3"})}),$.label]})}})})}),c.jsxs(Je,{title:c.jsxs(c.Fragment,{children:["Live on ",c.jsxs("span",{className:"font-mono",children:[":",l.emulatorPort]})," · ",n]}),aside:c.jsx(Ge,{onClick:M,disabled:m,title:"Refresh",className:"-mr-1.5",children:m?c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(Jm,{className:"w-3.5 h-3.5"})}),children:[C?c.jsxs("p",{className:"text-xs text-warn flex gap-2 leading-relaxed",children:[c.jsx(fr,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),c.jsx("span",{children:h==null?void 0:h.error})]}):u.length===0?c.jsx("p",{className:"text-xs text-fg-faint leading-relaxed",children:(h==null?void 0:h.ok)===!1?h.error:`No ${(E=fo.find($=>$.id===r))==null?void 0:E.label} resources yet. Apply ${n} first.`}):c.jsx("select",{value:f,onChange:$=>{p($.target.value),x(null)},className:Ue,children:u.map($=>c.jsx("option",{value:$,children:$},$))}),f&&!C&&c.jsxs("div",{className:"mt-4 space-y-2",children:[r==="s3"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{value:g,onChange:$=>v($.target.value),placeholder:"Object key",className:Ue}),c.jsx(me,{onClick:()=>j("get_object",{key:g}),children:"Get"}),c.jsxs(me,{onClick:()=>j("list_objects"),children:[c.jsx(Dc,{className:"w-3 h-3"})," List"]})]}),c.jsx("textarea",{rows:3,value:w,onChange:$=>N($.target.value),className:Ue}),c.jsxs(me,{variant:"primary",onClick:()=>j("put_object",{key:g,body:w}),children:[c.jsx(cp,{className:"w-3 h-3"})," Upload ",g||"object"]})]}),r==="dynamodb"&&c.jsxs(c.Fragment,{children:[c.jsx("textarea",{rows:5,value:S,onChange:$=>A($.target.value),className:Ue}),c.jsx("p",{className:"text-[12.5px] text-fg-faint",children:"Plain JSON is converted to DynamoDB attribute values. Include the table's key attributes."}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsxs(me,{variant:"primary",onClick:z,children:[c.jsx(cp,{className:"w-3 h-3"})," Put item"]}),c.jsxs(me,{onClick:()=>j("scan"),children:[c.jsx(Dc,{className:"w-3 h-3"})," Scan"]})]})]}),r==="sqs"&&c.jsxs(c.Fragment,{children:[c.jsx("textarea",{rows:3,value:k,onChange:$=>H($.target.value),className:Ue}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsxs(me,{variant:"primary",onClick:()=>j("send_message",{body:k}),children:[c.jsx(E$,{className:"w-3 h-3"})," Send"]}),c.jsxs(me,{onClick:()=>j("receive_message"),children:[c.jsx(o$,{className:"w-3 h-3"})," Receive"]})]})]}),r==="lambda"&&c.jsxs(c.Fragment,{children:[c.jsx("textarea",{rows:5,value:O,onChange:$=>V($.target.value),className:Ue}),c.jsxs(me,{variant:"primary",onClick:D,children:[c.jsx(hw,{className:"w-3 h-3"})," Invoke"]})]})]})]}),b&&c.jsxs(Je,{title:c.jsxs("span",{className:Q("flex items-center gap-1.5",b.ok?"text-fg-muted":"text-err"),children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full",b.ok?"bg-ok":"bg-err")}),b.ok?"Response":"Failed"]}),children:[b.cliCommand&&c.jsxs("code",{className:"block mb-2 text-[12.5px] font-mono text-fg-faint break-all select-text",children:["$ ",b.cliCommand]}),c.jsx("pre",{className:"rounded-md border border-line bg-base p-3 font-mono text-[12.5px] leading-relaxed text-fg/90 overflow-x-auto max-h-80 select-text",children:b.ok?JSON.stringify(b.data,null,2):b.error})]})]})}function U6(e,t,n){const a=[],l=e.filter(o=>{var u;return((u=o.data.envEnabled)==null?void 0:u[n])!==!1}),s=Object.fromEntries(l.map(o=>[o.id,o])),i={},r={};for(const o of t)i[o.target]=(i[o.target]||0)+1,r[o.source]=(r[o.source]||0)+1;for(const o of l){const u=o.data.serviceType,d=Ft(o,n);if((i[o.id]||0)+(r[o.id]||0)===0&&e.length>1&&u!=="aws_vpc"&&u!=="aws_kms_key"&&u!=="aws_ssm_parameter"&&a.push({id:`orphan-${o.id}`,severity:"info",category:"Networking",title:`${o.data.label} is not wired to any resource`,description:`Drag a handle from or to ${o.data.label} so LocalCloud Studio can automatically generate IAM permissions, event triggers, or VPC placement.`,nodeId:o.id,envId:n}),u==="aws_s3_bucket"&&d.block_public_acls===!1&&a.push({id:`s3-public-${o.id}`,severity:"warning",category:"Security",title:`S3 Bucket "${o.data.label}" allows public ACLs`,description:`Public access block is disabled in [${n.toUpperCase()}]. Enable block_public_acls unless serving static public assets directly.`,nodeId:o.id,envId:n,remediation:'Enable "Block All Public Access" in the Inspector.'}),u==="aws_db_instance"&&n==="prod"&&(d.multi_az||a.push({id:`rds-multiaz-${o.id}`,severity:"warning",category:"Reliability",title:`Production RDS "${o.data.label}" is Single-AZ`,description:"Multi-AZ standby deployment is disabled in PROD. Enable multi_az for automatic failover protection.",nodeId:o.id,envId:"prod",remediation:'Toggle "Multi-AZ Standby Deployment" on for PROD.'}),d.skip_final_snapshot&&a.push({id:`rds-snapshot-${o.id}`,severity:"info",category:"Reliability",title:`Production RDS "${o.data.label}" skips final snapshot`,description:"skip_final_snapshot is true in PROD. Set to false to retain a recovery snapshot on deletion.",nodeId:o.id,envId:"prod"})),u==="aws_security_group"){const y=Number(d.ingress_port??443);String(d.ingress_cidr||"0.0.0.0/0")==="0.0.0.0/0"&&[22,3389,5432,3306,6379].includes(y)&&a.push({id:`sg-open-${o.id}`,severity:"error",category:"Security",title:`Security Group opens sensitive port ${y} to 0.0.0.0/0`,description:`"${o.data.label}" allows unrestricted public ingress on port ${y} in [${n.toUpperCase()}]. Restrict to your VPC CIDR (e.g. 10.0.0.0/16).`,nodeId:o.id,envId:n})}u==="aws_sqs_queue"&&n==="prod"&&!d.enable_dlq&&a.push({id:`sqs-dlq-${o.id}`,severity:"warning",category:"Reliability",title:`SQS Queue "${o.data.label}" has no Dead-Letter Queue (DLQ)`,description:"Poison-pill messages in PROD could loop until retention expiry. Enable companion DLQ generation.",nodeId:o.id,envId:"prod"}),u==="aws_cognito_user_pool"&&n==="prod"&&d.mfa_configuration==="OFF"&&a.push({id:`cognito-mfa-${o.id}`,severity:"warning",category:"Security",title:`Cognito Pool "${o.data.label}" has MFA disabled in PROD`,description:"Consider setting mfa_configuration to OPTIONAL or ON for production customer identity pools.",nodeId:o.id,envId:"prod"});const p=De[u],h=Rc(p);h.level==="fails"&&a.push({id:`emulator-support-${o.id}`,severity:"warning",category:"Emulator",title:`${p.shortName} failed on the emulator in tests`,description:h.errors[0]||"It did not apply cleanly in the last emulator test run.",nodeId:o.id,envId:n,remediation:"Expect apply to fail locally for this resource. The AWS export is not affected."})}for(const o of t){const u=s[o.source],d=s[o.target];if((u==null?void 0:u.data.serviceType)==="aws_subnet"&&(d==null?void 0:d.data.serviceType)==="aws_db_instance"){const f=Ft(u,n);(f.map_public_ip_on_launch||f.tier==="public")&&a.push({id:`rds-public-sub-${d.id}`,severity:"error",category:"Security",title:`Database "${d.data.label}" placed in Public Subnet "${u.data.label}"`,description:"Relational databases should reside in private or isolated subnets without auto-assigned public IPv4 addresses.",nodeId:d.id,envId:n})}}return a}const dt=["dev","testing","staging","prod"],Et=["compute","storage","requests","transfer","fees"],Tw={compute:"Compute",storage:"Storage",requests:"Requests",transfer:"Data transfer",fees:"Fixed fees"},ct=730,Ad={"t3.nano":.0052,"t3.micro":.0104,"t3.small":.0208,"t3.medium":.0416,"t3.large":.0832,"t4g.small":.0168,"m6i.large":.096,"m6i.xlarge":.192,"c6i.xlarge":.17,"c6i.2xlarge":.34},I6={"db.t4g.micro":.016,"db.t4g.small":.032,"db.t4g.medium":.065,"db.r6g.large":.24,"db.r6g.xlarge":.48},q6={"cache.t4g.micro":.016,"cache.t4g.small":.032,"cache.t4g.medium":.065,"cache.r6g.large":.226},G6={"t3.small.search":.036,"m6g.large.search":.128,"r6g.xlarge.search":.334},w0=[{match:"haiku",input:.8,output:4},{match:"sonnet",input:3,output:15},{match:"nova-pro",input:.8,output:3.2},{match:"llama3-3-70b",input:.72,output:.72}],Y6={PriceClass_100:.085,PriceClass_200:.12,PriceClass_All:.14},fp=()=>({compute:0,storage:0,requests:0,transfer:0,fees:0}),La=e=>Math.round(e*100)/100;function Go(e,t){return{...la[t].usage,...e==null?void 0:e.usage}}function P6(e,t,n){var u;const a=fp(),{requestsMillions:l,dataTransferGb:s,storageGb:i,logsGb:r}=n.usage;let o="";switch(e){case"aws_instance":{const d=t.instance_type||"t3.micro",f=Number(t.root_volume_size??20);a.compute=(Ad[d]??.02)*ct,a.storage=f*.08,o=`${d} + ${f} GB gp3`;break}case"aws_autoscaling_group":{const d=t.instance_type||"t3.medium",f=Number(t.desired_capacity??2);a.compute=(Ad[d]??.0416)*ct*f,a.storage=20*.08*f,o=`${f} × ${d}`;break}case"aws_ecs_service":{const d=Number(t.cpu??256)/1024,f=Number(t.memory??512)/1024,p=Number(t.desired_count??2);a.compute=(d*.04048+f*.004445)*ct*p,o=`${p} × Fargate ${t.cpu??256} CPU / ${t.memory??512} MiB`;break}case"aws_eks_cluster":{const d=t.node_instance_type||"m6i.large",f=Number(t.node_desired_size??2);a.fees=.1*ct,a.compute=(Ad[d]??.096)*ct*f,a.storage=20*.08*f,o=`Control plane + ${f} × ${d}`;break}case"aws_ecr_repository":{a.storage=(2+i*.02)*.1,o="Image storage";break}case"aws_lambda_function":{const d=Number(t.memory_size??256)/1024,f=(t.architectures||"arm64")==="arm64",p=l*1e6*.12*d;a.requests=l*.2,a.compute=p*(f?133334e-10:166667e-10),Number(t.reserved_concurrent_executions)>0&&(a.fees=Number(t.reserved_concurrent_executions)*.15),o=`${t.memory_size??256} MB ${f?"arm64":"x86_64"}`;break}case"aws_apigatewayv2_api":{const d=t.protocol_type==="WEBSOCKET";a.requests=l*1,d&&(a.fees=l*.25),o=d?"WebSocket API":"HTTP API";break}case"aws_lb":{const d=t.load_balancer_type==="network",f=l*1e6/(ct*3600),p=Math.max(.5,f/25,s/ct);a.fees=.0225*ct,a.requests=p*(d?.006:.008)*ct,o=`${d?"Network":"Application"} LB, ~${p.toFixed(1)} LCU`;break}case"aws_nat_gateway":{a.fees=.045*ct,a.transfer=s*.045,o=`NAT gateway + ${s} GB processed`;break}case"aws_cloudfront_distribution":{const d=t.price_class||"PriceClass_100";a.transfer=s*(Y6[d]??.085),a.requests=l*.75,o=`${d}, ${s} GB out`;break}case"aws_route53_zone":{a.fees=.5,a.requests=l*.4,o="Hosted zone + queries";break}case"aws_s3_bucket":{const d=t.versioning_enabled?1.2:1;a.storage=i*d*.023,a.requests=l*(.1*5+.9*.4),o=`${i} GB Standard${t.versioning_enabled?" + versions":""}`;break}case"aws_efs_file_system":{a.storage=i*.3,o=`${i} GB Standard`;break}case"aws_dynamodb_table":{if(t.billing_mode==="PROVISIONED"){const d=Number(t.read_capacity??5),f=Number(t.write_capacity??5);a.compute=(d*13e-5+f*65e-5)*ct,o=`Provisioned ${d} RCU / ${f} WCU`}else a.requests=l*(.2*.625+.8*.125),o="On-demand";a.storage=i*.25+(t.point_in_time_recovery?i*.2:0),t.point_in_time_recovery&&(o+=" + PITR");break}case"aws_db_instance":{const d=t.instance_class||"db.t4g.micro",f=t.multi_az?2:1,p=Number(t.allocated_storage??20);a.compute=(I6[d]??.032)*ct*f,a.storage=p*.115*f,o=`${d}${t.multi_az?", Multi-AZ":""}, ${p} GB`;break}case"aws_elasticache_cluster":{const d=t.node_type||"cache.t4g.micro",f=Number(t.num_cache_nodes??1);a.compute=(q6[d]??.016)*ct*f,o=`${f} × ${d}`;break}case"aws_opensearch_domain":{const d=t.instance_type||"t3.small.search",f=Number(t.instance_count??1);a.compute=(G6[d]??.036)*ct*f,a.storage=Number(t.ebs_volume_size??20)*.122*f,o=`${f} × ${d}`;break}case"aws_sqs_queue":{a.requests=l*3*(t.fifo_queue?.5:.4),o=t.fifo_queue?"FIFO queue":"Standard queue";break}case"aws_sns_topic":{a.requests=l*.2*.5,o="Publishes";break}case"aws_cloudwatch_event_bus":{a.requests=l*.2*1,o="Custom events";break}case"aws_sfn_state_machine":{const d=t.type==="EXPRESS";a.requests=d?l*.05*1:l*.05*5*25,o=d?"Express workflows":"Standard workflows";break}case"aws_cognito_user_pool":{const d=l*800;a.requests=Math.max(0,d-1e4)*.0055,o=`~${Math.round(d).toLocaleString()} MAU`;break}case"aws_cloudwatch_log_group":{const d=r/Math.max(1,n.logGroupCount),f=Number(t.retention_in_days)||365;a.requests=d*.5,a.storage=d*Math.min(f,365)/30*.03,t.create_error_alarm&&(a.fees=.1),o=`${d.toFixed(1)} GB/mo, ${Number(t.retention_in_days)?`${t.retention_in_days} d`:"never expires"}`;break}case"aws_kms_key":{a.fees=1,a.requests=l*.1*3,o="Customer managed key";break}case"aws_secretsmanager_secret":{a.fees=.4,o="Secret";break}case"aws_kinesis_stream":{if(t.stream_mode==="PROVISIONED"){const d=Number(t.shard_count??1);a.compute=d*.015*ct,a.requests=l*.014,o=`${d} shard${d===1?"":"s"}`}else a.fees=.04*ct,a.requests=i*.08,o="On-demand";break}case"aws_bedrock_agent":{const d=String(t.foundation_model||""),f=w0.find(h=>d.includes(h.match))??w0[1],p=l*1e6*.02;a.requests=p*(2e3*f.input+500*f.output)/1e6,o=`${((u=d.split(".")[1])==null?void 0:u.split("-v")[0])||"model"}, ${Math.round(p).toLocaleString()} calls`;break}default:o="No charge"}for(const d of Et)a[d]=La(a[d]);return{drivers:a,note:o}}function Aw(e,t=la){var i,r;const n={dev:0,testing:0,staging:0,prod:0},a=Object.fromEntries(dt.map(o=>[o,fp()])),l=[],s=Object.fromEntries(dt.map(o=>[o,e.filter(u=>{var d;return u.data.serviceType==="aws_cloudwatch_log_group"&&((d=u.data.envEnabled)==null?void 0:d[o])!==!1}).length]));for(const o of e){const u=o.data.serviceType,d={nodeId:o.id,label:o.data.label,serviceType:u,category:((i=De[u])==null?void 0:i.category)??"Management & Governance",monthlyUsd:{dev:0,testing:0,staging:0,prod:0},drivers:Object.fromEntries(dt.map(f=>[f,fp()])),sizingNotes:{dev:"",testing:"",staging:"",prod:""}};for(const f of dt){if(((r=o.data.envEnabled)==null?void 0:r[f])===!1){d.sizingNotes[f]="Disabled";continue}const{drivers:p,note:h}=P6(u,Ft(o,f),{usage:Go(t[f],f),logGroupCount:s[f]});d.drivers[f]=p,d.sizingNotes[f]=h,d.monthlyUsd[f]=La(Et.reduce((y,b)=>y+p[b],0)),n[f]=La(n[f]+d.monthlyUsd[f]);for(const y of Et)a[f][y]=La(a[f][y]+p[y])}l.push(d)}return{items:l,totalsByEnv:n,driversByEnv:a}}function X6(e,t,n=12){return Array.from({length:n},(a,l)=>{const s=Math.pow(1+t,l);return{compute:e.compute,fees:e.fees,storage:La(e.storage*s),requests:La(e.requests*s),transfer:La(e.transfer*s)}})}const Z6=new Set(["aws_instance","aws_autoscaling_group","aws_ecs_service","aws_db_instance"]),Q6=new Set(["aws_instance","aws_autoscaling_group","aws_ecs_service","aws_eks_cluster","aws_db_instance","aws_elasticache_cluster","aws_opensearch_domain"]);function K6(e,t){const n=new Map(e.map(l=>[l.id,l])),a=[];for(const l of t.items){const s=n.get(l.nodeId);if(s)for(const i of dt){if(l.monthlyUsd[i]<=0)continue;const r=Ft(s,i),o=l.drivers[i],u=i==="dev"||i==="testing",d=(f,p,h)=>{h>=.5&&a.push({id:`${l.nodeId}:${i}`,nodeId:l.nodeId,envId:i,title:f,detail:p,monthlyUsd:La(h)})};l.serviceType==="aws_nat_gateway"&&i!=="prod"?d("Drop the NAT gateway","Use VPC endpoints for AWS APIs, or share one NAT gateway across non-production environments.",o.fees):l.serviceType==="aws_db_instance"&&r.multi_az&&i!=="prod"?d("Run single-AZ outside production","A standby replica doubles instance and storage cost.",(o.compute+o.storage)/2):u&&Z6.has(l.serviceType)?d("Stop outside working hours","Running 12 hours on weekdays instead of around the clock covers a typical team.",o.compute*(1-60/168)):i==="prod"&&Q6.has(l.serviceType)?d("Commit to a 1-year savings plan","No-upfront compute savings plans and reserved instances run about 30% under on-demand.",o.compute*.3):l.serviceType==="aws_lambda_function"&&r.architectures==="x86_64"?d("Switch to arm64","Graviton Lambda is 20% cheaper per GB-second for most runtimes.",o.compute*.2):l.serviceType==="aws_cloudwatch_log_group"&&i!=="prod"&&(Number(r.retention_in_days)||9999)>14&&d("Shorten log retention","Keep non-production logs for 14 days.",o.storage*(1-14/Math.min(Number(r.retention_in_days)||365,365)))}}return a.sort((l,s)=>s.monthlyUsd-l.monthlyUsd)}function F6(e){const t=["resource","service","category","environment",...Et,"total_usd","sizing"],n=l=>/[",\n]/.test(String(l))?`"${String(l).replace(/"/g,'""')}"`:String(l),a=e.items.flatMap(l=>dt.map(s=>{var i;return[l.label,((i=De[l.serviceType])==null?void 0:i.name)??l.serviceType,l.category,s,...Et.map(r=>l.drivers[s][r].toFixed(2)),l.monthlyUsd[s].toFixed(2),l.sizingNotes[s]]}));return[t,...a].map(l=>l.map(n).join(",")).join(`
|
|
1697
|
+
`)}const S0=["dev","testing","staging","prod"],J6={error:{icon:g$,cls:"text-err"},warning:{icon:fr,cls:"text-warn"},info:{icon:c$,cls:"text-info"}},N0=e=>e>=1e3?`$${(e/1e3).toFixed(1)}k`:`$${e.toFixed(e<10?2:0)}`;function W6(){const e=B(b=>b.nodes),t=B(b=>b.edges),n=B(b=>b.activeEnv),a=B(b=>b.environments),l=B(b=>b.selectNode),s=B(b=>b.setRightTab),i=B(b=>b.setView),[r,o]=R.useState("all"),u=R.useMemo(()=>U6(e,t,n),[e,t,n]),d=R.useMemo(()=>Aw(e,a),[e,a]),f={error:u.filter(b=>b.severity==="error").length,warning:u.filter(b=>b.severity==="warning").length,info:u.filter(b=>b.severity==="info").length},p=r==="all"?u:u.filter(b=>b.severity===r),h=Math.max(1,...S0.map(b=>d.totalsByEnv[b])),y=[...d.items].sort((b,x)=>x.monthlyUsd[n]-b.monthlyUsd[n]).filter(b=>b.monthlyUsd[n]>0).slice(0,8);return c.jsxs(c.Fragment,{children:[c.jsxs(Je,{title:"Estimated monthly cost",aside:c.jsx(me,{variant:"ghost",className:"-mr-2",onClick:()=>i("costs"),children:"Open cost analysis"}),children:[c.jsx("div",{className:"space-y-2",children:S0.map(b=>{const x=a[b],m=d.totalsByEnv[b];return c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:Q("w-20 text-xs flex items-center gap-2",b===n?"text-fg":"text-fg-muted"),children:[c.jsx(St,{color:x.color,className:"w-1.5 h-1.5"}),x.shortLabel.toLowerCase()]}),c.jsx("div",{className:"flex-1 h-1 rounded-full bg-overlay overflow-hidden",children:c.jsx("div",{className:"h-full rounded-full transition-[width] duration-300",style:{width:`${m/h*100}%`,backgroundColor:x.color}})}),c.jsx("span",{className:"w-14 text-right text-xs font-mono text-fg tabular-nums",children:N0(m)})]},b)})}),y.length>0&&c.jsx("div",{className:"mt-4 -mx-2",children:y.map(b=>c.jsxs("button",{type:"button",onClick:()=>{l(b.nodeId),s("inspector")},className:"w-full px-2 py-1.5 rounded-md flex items-center justify-between gap-3 text-left hover:bg-raised transition-colors",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-fg truncate",children:b.label}),c.jsx("div",{className:"text-[12.5px] text-fg-faint truncate",children:b.sizingNotes[n]})]}),c.jsx("span",{className:"text-xs font-mono text-fg-muted shrink-0 tabular-nums",children:N0(b.monthlyUsd[n])})]},b.nodeId))})]}),c.jsxs(Je,{title:`Checks · ${n}`,children:[c.jsx(Pa,{value:r,onChange:o,className:"mb-3",options:["all","error","warning","info"].map(b=>({value:b,label:c.jsxs(c.Fragment,{children:[b==="all"?"All":b==="error"?"Errors":b==="warning"?"Warnings":"Info",c.jsx("span",{className:"text-fg-faint tabular-nums",children:b==="all"?u.length:f[b]})]})}))}),p.length===0?c.jsxs("p",{className:"py-6 text-center text-xs text-fg-muted flex items-center justify-center gap-2",children:[c.jsx(bu,{className:"w-3.5 h-3.5 text-ok"})," Nothing to flag in ",n,"."]}):c.jsx("div",{className:"-mx-2",children:p.map(b=>{const{icon:x,cls:m}=J6[b.severity];return c.jsxs("button",{type:"button",disabled:!b.nodeId,onClick:()=>{b.nodeId&&(l(b.nodeId),s("inspector"))},className:"w-full text-left px-2 py-2.5 rounded-md enabled:hover:bg-raised transition-colors flex items-start gap-2.5",children:[c.jsx(x,{className:Q("w-3.5 h-3.5 shrink-0 mt-px",m)}),c.jsxs("div",{className:"space-y-1 min-w-0",children:[c.jsxs("div",{className:"flex items-baseline gap-2",children:[c.jsx("span",{className:"text-xs font-medium text-fg",children:b.title}),c.jsx("span",{className:"text-[12.5px] text-fg-faint",children:b.category})]}),c.jsx("p",{className:"text-xs text-fg-muted leading-relaxed",children:b.description}),b.remediation&&c.jsx("p",{className:"text-xs text-fg-faint leading-relaxed",children:b.remediation})]})]},b.id)})})]})]})}const il=["dev","testing","staging","prod"],E0=[{id:"inspector",label:"Inspect",icon:M$},{id:"env-matrix",label:"Envs",icon:fw},{id:"terraform",label:"Terraform",icon:JM},{id:"emulator",label:"Run",icon:D$},{id:"explorer",label:"Data",icon:Fm},{id:"audit",label:"Audit",icon:A$}],wa=e=>e==="testing"?"test":e;function eO(){const e=B(l=>l.rightTab),t=B(l=>l.setRightTab),n=B(l=>l.isDrawerOpen),a=B(l=>l.setDrawerOpen);return n?c.jsxs("aside",{className:"w-[400px] shrink-0 h-full bg-panel border-l border-line flex flex-col select-none",children:[c.jsxs("nav",{className:"h-10 shrink-0 pl-2 pr-1.5 border-b border-line flex items-stretch",children:[E0.map(({id:l,label:s})=>c.jsxs("button",{type:"button",onClick:()=>t(l),className:Q("relative px-2.5 text-[14px] transition-colors",e===l?"text-fg":"text-fg-muted hover:text-fg"),children:[s,e===l&&c.jsx("span",{className:"absolute left-2.5 right-2.5 -bottom-px h-px bg-fg"})]},l)),c.jsx(Ge,{onClick:()=>a(!1),title:"Hide panel (⌘⌥B)",className:"ml-auto self-center",children:c.jsx(b$,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[e==="inspector"&&c.jsx(nO,{}),e==="env-matrix"&&c.jsx(aO,{}),e==="terraform"&&c.jsx(rO,{}),e==="emulator"&&c.jsx(oO,{}),e==="explorer"&&c.jsx(V6,{}),e==="audit"&&c.jsx(W6,{})]})]}):c.jsxs("aside",{className:"w-10 shrink-0 h-full bg-panel border-l border-line flex flex-col items-center select-none",children:[c.jsx("div",{className:"h-10 shrink-0 w-full border-b border-line flex items-center justify-center",children:c.jsx(Ge,{onClick:()=>a(!0),title:"Show panel (⌘⌥B)",children:c.jsx(x$,{className:"w-4 h-4"})})}),c.jsx("div",{className:"py-2 flex flex-col gap-1",children:E0.map(({id:l,label:s,icon:i})=>c.jsx(Ge,{onClick:()=>t(l),title:s,className:Q(e===l&&"text-fg"),children:c.jsx(i,{className:"w-4 h-4"})},l))})]})}function tO({support:e}){const t=e.level==="verified"?"Applies and destroys on the emulator":e.level==="second-apply"?"Works on the emulator with a second Apply":e.level==="fails"?`Fails on the emulator: ${e.errors[0]||"see npm run test:emulator"}`:"Not tested on the emulator";return c.jsxs("div",{className:"text-[12.5px] mt-1 flex items-center gap-1.5 min-w-0",title:[t,...e.errors.slice(1),e.testedAt?`Tested ${e.testedAt.slice(0,10)}`:""].filter(Boolean).join(`
|
|
1698
|
+
`),children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full shrink-0",e.level==="verified"||e.level==="second-apply"?"bg-ok":e.level==="fails"?"bg-warn":"bg-fg-faint/50")}),c.jsx("span",{className:Q("truncate",e.level==="fails"?"text-warn":"text-fg-faint"),children:t}),e.upstreamIssueUrl&&c.jsxs("a",{href:e.upstreamIssueUrl,target:"_blank",rel:"noreferrer",title:"Reported to the emulator team",className:"shrink-0 font-mono text-fg-muted hover:text-fg underline decoration-line-strong underline-offset-2",children:["#",e.upstreamIssueUrl.split("/").pop()]})]})}function ql({label:e,hint:t,overridden:n,children:a}){return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"self-start h-7 flex items-center gap-1.5 min-w-0",title:t,children:[n&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent shrink-0"}),c.jsx("span",{className:Q("text-xs leading-tight",n?"text-fg":"text-fg-muted"),children:e})]}),c.jsx("div",{className:"min-w-0 flex items-start gap-1",children:a})]})}const kd="grid grid-cols-[112px_minmax(0,1fr)] gap-x-3 gap-y-2.5";function nO(){var M,j,z,D,C;const e=B(E=>E.nodes),t=B(E=>E.edges),n=B(E=>E.selectedNodeId),a=B(E=>E.selectedEdgeId),l=B(E=>E.activeEnv),s=B(E=>E.environments),i=B(E=>E.updateNodeMetadata),r=B(E=>E.updateNodeProperty),o=B(E=>E.resetNodeEnvOverride),u=B(E=>E.toggleNodeInEnvironment),d=B(E=>E.updateNodeTags),f=B(E=>E.duplicateNode),p=B(E=>E.deleteNode),h=B(E=>E.updateEdgeData),y=B(E=>E.deleteEdge),[b,x]=R.useState("env"),[m,_]=R.useState(""),[g,v]=R.useState(""),w=e.find(E=>E.id===n),N=t.find(E=>E.id===a);if(N){const E=e.find(L=>L.id===N.source),$=e.find(L=>L.id===N.target);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"px-4 py-4 border-b border-line flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-fg-muted",children:"Connection"}),c.jsxs("div",{className:"mt-1 flex items-center gap-2 text-[14px] font-medium text-fg min-w-0",children:[c.jsx("span",{className:"truncate",children:(E==null?void 0:E.data.label)||N.source}),c.jsx(uw,{className:"w-3.5 h-3.5 text-fg-faint shrink-0"}),c.jsx("span",{className:"truncate",children:($==null?void 0:$.data.label)||N.target})]})]}),c.jsx(Ge,{variant:"danger",onClick:()=>y(N.id),title:"Remove connection",children:c.jsx(dr,{className:"w-3.5 h-3.5"})})]}),c.jsx(Je,{children:c.jsxs("div",{className:kd,children:[c.jsx(ql,{label:"Type",hint:"How the compiler wires these two resources together",children:c.jsxs("select",{value:((M=N.data)==null?void 0:M.relationshipType)||"data_flow",onChange:L=>h(N.id,{relationshipType:L.target.value}),className:zc,children:[c.jsx("option",{value:"event_trigger",children:"Event trigger / API route"}),c.jsx("option",{value:"iam_grant",children:"IAM access grant"}),c.jsx("option",{value:"target_route",children:"Load balancer / CDN origin"}),c.jsx("option",{value:"network_attachment",children:"Network placement"}),c.jsx("option",{value:"data_flow",children:"Data flow"}),c.jsx("option",{value:"depends_on",children:"depends_on only"})]})}),c.jsx(ql,{label:"Label",hint:"Shown on the canvas; route key for API routes, e.g. ANY /orders/*",children:c.jsx("input",{type:"text",value:((j=N.data)==null?void 0:j.label)||"",placeholder:"ANY /orders/*",onChange:L=>h(N.id,{label:L.target.value}),className:Ue})})]})})]})}if(!w)return c.jsxs("div",{className:"px-6 py-16 text-center",children:[c.jsx("p",{className:"text-[14px] text-fg-muted",children:"Select a resource or connection to edit it."}),c.jsxs("div",{className:"mt-6 inline-grid grid-cols-[auto_auto] gap-x-4 gap-y-2 text-xs text-fg-faint text-left",children:[c.jsx(uo,{children:"⌘Z"})," ",c.jsx("span",{children:"Undo"}),c.jsx(uo,{children:"⌘D"})," ",c.jsx("span",{children:"Duplicate"}),c.jsx(uo,{children:"⌫"})," ",c.jsx("span",{children:"Delete"}),c.jsx(uo,{children:"Esc"})," ",c.jsx("span",{children:"Deselect"})]})]});const S=De[w.data.serviceType],A=Ft(w,l),k=Object.keys(((z=w.data.envOverrides)==null?void 0:z[l])||{}).length,H=s[l],O=(E,$)=>{const L=b==="env"?l:"base";r(w.id,E.key,$,L)},V=()=>{m.trim()&&(d(w.id,{...w.data.tags||{},[m.trim()]:g.trim()||"true"}),_(""),v(""))},U=E=>{const $={...w.data.tags||{}};delete $[E],d(w.id,$)},T=Object.entries(w.data.tags||{});return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"px-4 py-4 border-b border-line flex items-center gap-3",children:[c.jsx(eh,{iconName:(S==null?void 0:S.iconName)||"Server",color:(S==null?void 0:S.color)||"#9CA1A4",size:"lg"}),c.jsxs("div",{className:"min-w-0 flex-1",title:S==null?void 0:S.description,children:[c.jsx("div",{className:"text-[15px] font-medium text-fg truncate",children:(S==null?void 0:S.name)||w.data.label}),c.jsx("div",{className:"text-[12.5px] font-mono text-fg-faint truncate mt-0.5",children:S==null?void 0:S.terraformResourceType}),c.jsx(tO,{support:Rc(S)})]}),c.jsxs("div",{className:"flex items-center shrink-0",children:[c.jsx(Ge,{onClick:()=>f(w.id),title:"Duplicate (⌘D)",children:c.jsx(Mr,{className:"w-3.5 h-3.5"})}),c.jsx(Ge,{variant:"danger",onClick:()=>p(w.id),title:"Delete (⌫)",children:c.jsx(dr,{className:"w-3.5 h-3.5"})})]})]}),c.jsx(Je,{children:c.jsxs("div",{className:kd,children:[c.jsx(ql,{label:"Name",children:c.jsx("input",{type:"text",value:w.data.label,onChange:E=>i(w.id,{label:E.target.value}),className:zc})}),c.jsx(ql,{label:"Resource ID",hint:"Terraform resource name",children:c.jsx("input",{type:"text",value:w.data.resourceName,onChange:E=>i(w.id,{resourceName:E.target.value.replace(/[^a-zA-Z0-9_]/g,"_")}),className:Ue})}),c.jsx(ql,{label:"Deploy to",hint:"Turn this resource off for individual environments",children:c.jsx("div",{className:"grid grid-cols-4 gap-1 w-full",children:il.map(E=>{var P;const $=s[E],L=((P=w.data.envEnabled)==null?void 0:P[E])!==!1;return c.jsxs("button",{type:"button",onClick:()=>u(w.id,E),title:`${L?"Deployed":"Skipped"} in ${$.name}`,className:Q("h-7 px-1 rounded-md border text-xs inline-flex items-center justify-center gap-1 transition-colors",L?"border-line-strong bg-raised text-fg":"border-line text-fg-faint hover:text-fg-muted"),children:[c.jsx(St,{color:$.color,hollow:!L,className:"w-1.5 h-1.5"}),wa(E)]},E)})})})]})}),c.jsxs(Je,{title:"Configuration",aside:k>0&&c.jsxs("button",{type:"button",onClick:()=>o(w.id,l),className:"text-xs text-fg-muted hover:text-fg flex items-center gap-1",children:[c.jsx(qo,{className:"w-3 h-3"}),"Reset ",k," ",wa(l)," override",k>1?"s":""]}),children:[c.jsx(Pa,{value:b,onChange:x,options:[{value:"env",label:c.jsxs(c.Fragment,{children:[c.jsx(St,{color:H.color,className:"w-1.5 h-1.5"}),wa(l)," only"]})},{value:"base",label:"All environments"}]}),c.jsx("p",{className:"text-[12.5px] text-fg-faint mt-2 mb-4",children:b==="env"?c.jsxs(c.Fragment,{children:["Edits override the base value in ",c.jsxs("span",{className:"font-mono",children:[l,".tfvars"]})," only."]}):c.jsx(c.Fragment,{children:"Edits change the base value every environment inherits unless it overrides it."})}),c.jsx("div",{className:kd,children:((S==null?void 0:S.schema)||[]).map(E=>{var P;const $=b==="base"?((P=w.data.baseConfig)==null?void 0:P[E.key])??E.defaultValue:A[E.key]??E.defaultValue,L=Vo(w,l,E.key);return c.jsxs(ql,{label:E.label,hint:`${E.key}${E.description?` · ${E.description}`:""}${L?`
|
|
1699
|
+
Overridden in ${l}`:""}`,overridden:L,children:[E.type==="boolean"?c.jsx("div",{className:"h-7 flex items-center flex-1",children:c.jsx(Sw,{checked:!!$,onChange:G=>O(E,G)})}):E.type==="select"?c.jsx("select",{value:String($??""),onChange:G=>O(E,G.target.value),className:Ue,children:(E.options||[]).map(G=>c.jsx("option",{value:G.value,children:G.label},G.value))}):E.type==="number"?c.jsx("input",{type:"number",value:Number($??0),onChange:G=>O(E,Number(G.target.value)),className:Ue}):E.type==="json"?c.jsx("textarea",{rows:3,value:typeof $=="string"?$:JSON.stringify($,null,2),onChange:G=>O(E,G.target.value),className:Q(Ue,"resize-y leading-relaxed")}):c.jsx("input",{type:"text",value:String($??""),placeholder:E.placeholder,onChange:G=>O(E,G.target.value),className:Ue}),L&&c.jsx(Ge,{title:"Revert to base value",onClick:()=>o(w.id,l,E.key),className:"w-6 h-7",children:c.jsx(qo,{className:"w-3 h-3"})})]},E.key)})})]}),c.jsxs(Je,{title:c.jsxs("span",{className:"flex items-center gap-1.5",children:[Vo(w,l,xn)&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent"}),"Extra HCL"]}),aside:Vo(w,l,xn)&&c.jsxs("button",{type:"button",onClick:()=>o(w.id,l,xn),className:"text-xs text-fg-muted hover:text-fg flex items-center gap-1",children:[c.jsx(qo,{className:"w-3 h-3"}),"Revert to base"]}),children:[c.jsx("textarea",{value:String((b==="base"?(D=w.data.baseConfig)==null?void 0:D[xn]:A[xn])??""),onChange:E=>r(w.id,xn,E.target.value,b==="env"?l:"base"),rows:4,spellCheck:!1,placeholder:`publish = true
|
|
1700
|
+
|
|
1701
|
+
lifecycle {
|
|
1702
|
+
prevent_destroy = true
|
|
1703
|
+
}`,className:Q(Ue,"p-3 text-[13px] leading-relaxed resize-y")}),c.jsxs("p",{className:"text-[12.5px] text-fg-faint mt-2",children:["Added inside the ",c.jsx("span",{className:"font-mono",children:S==null?void 0:S.terraformResourceType})," block as written, for"," ",b==="env"?`${wa(l)} only`:"all environments",". Don't repeat arguments the form already sets."]})]}),w.data.serviceType==="aws_lambda_function"&&c.jsxs(Je,{title:"Code",aside:c.jsxs("span",{className:"text-[12.5px] font-mono text-fg-faint",children:["handler ",String(A.handler||"index.handler")]}),children:[c.jsx(Pa,{value:w.data.sourceDir===void 0?"inline":"folder",onChange:E=>i(w.id,{sourceDir:E==="folder"?w.data.sourceDir??"":void 0}),options:[{value:"inline",label:"Inline"},{value:"folder",label:"Folder"}],className:"mb-3"}),w.data.sourceDir===void 0?c.jsxs(c.Fragment,{children:[c.jsx("textarea",{value:w.data.inlineCode||"",onChange:E=>i(w.id,{inlineCode:E.target.value}),onKeyDown:E=>{if(E.key!=="Tab")return;E.preventDefault();const $=E.currentTarget,{selectionStart:L,selectionEnd:P,value:G}=$,K=`${G.slice(0,L)} ${G.slice(P)}`;i(w.id,{inlineCode:K}),requestAnimationFrame(()=>$.setSelectionRange(L+2,L+2))},rows:12,spellCheck:!1,placeholder:"Leave empty to deploy a default echo handler",className:Q(Ue,"p-3 text-[13px] leading-relaxed resize-y")}),c.jsxs("p",{className:"text-[12.5px] text-fg-faint mt-2",children:["Saved as"," ",c.jsxs("span",{className:"font-mono",children:[String(A.handler||"index.handler").split(".").slice(0,-1).join(".")||"index",".",String(A.runtime||"nodejs20.x").startsWith("python")?"py":"mjs"]})," ","and zipped on sync and apply. One file, no dependencies."]})]}):c.jsxs(c.Fragment,{children:[c.jsx("input",{type:"text",value:w.data.sourceDir,placeholder:"functions/orders",spellCheck:!1,onChange:E=>i(w.id,{sourceDir:E.target.value}),className:Ue}),c.jsx("p",{className:Q("text-[12.5px] mt-2 leading-relaxed",w.data.sourceDir.trim()?"text-fg-faint":"text-warn"),children:w.data.sourceDir.trim()?"Relative to the project folder. Zipped as-is on sync, apply and export, including node_modules or vendored packages, so build or install first. The handler is a path inside it.":"Set a folder relative to the project. Until then the inline code is used."})]})]}),((C=w.data.provisionedOutputs)==null?void 0:C[l])&&c.jsx(Je,{title:c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-ok"}),"Outputs in ",wa(l)]}),children:c.jsx("dl",{className:"space-y-1.5",children:Object.entries(w.data.provisionedOutputs[l]).map(([E,$])=>c.jsxs("div",{className:"grid grid-cols-[112px_minmax(0,1fr)] gap-3 text-xs",children:[c.jsx("dt",{className:"text-fg-muted truncate",children:E}),c.jsx("dd",{className:"font-mono text-[12.5px] text-fg break-all select-text",children:$})]},E))})}),c.jsxs(Je,{title:"Tags",children:[T.length>0&&c.jsx("div",{className:"mb-3 space-y-1",children:T.map(([E,$])=>c.jsxs("div",{className:"group grid grid-cols-[112px_minmax(0,1fr)_auto] gap-3 items-center h-6 text-xs font-mono",children:[c.jsx("span",{className:"text-fg-muted truncate",children:E}),c.jsx("span",{className:"text-fg truncate",children:$}),c.jsx("button",{type:"button",onClick:()=>U(E),title:`Remove ${E}`,className:"text-fg-faint hover:text-err opacity-0 group-hover:opacity-100 transition-opacity",children:c.jsx($r,{className:"w-3 h-3"})})]},E))}),c.jsxs("form",{className:"flex items-center gap-1.5",onSubmit:E=>{E.preventDefault(),V()},children:[c.jsx("input",{type:"text",placeholder:"key",value:m,onChange:E=>_(E.target.value),className:Ue}),c.jsx("input",{type:"text",placeholder:"value",value:g,onChange:E=>v(E.target.value),className:Ue}),c.jsx(Ge,{type:"submit",title:"Add tag",disabled:!m.trim(),className:"border border-line",children:c.jsx(mw,{className:"w-3.5 h-3.5"})})]})]})]})}function aO(){const e=B(f=>f.nodes),t=B(f=>f.selectedNodeId),n=B(f=>f.selectNode),a=B(f=>f.environments),l=B(f=>f.activeEnv),s=B(f=>f.setActiveEnv),i=B(f=>f.updateEnvironmentProfile),r=B(f=>f.toggleNodeInEnvironment),o=e.find(f=>f.id===t)||e[0],u=o?De[o.data.serviceType]:null,d="h-8 px-2 text-left text-[12.5px] font-normal text-fg-faint";return c.jsxs(c.Fragment,{children:[c.jsx(Je,{title:"Environments",children:c.jsxs("table",{className:"w-full border-collapse",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-line",children:[c.jsx("th",{className:Q(d,"pl-0"),children:"Name"}),c.jsx("th",{className:d,children:"Region"}),c.jsx("th",{className:Q(d,"pr-0"),children:"Emulator port"})]})}),c.jsx("tbody",{children:il.map(f=>{const p=a[f],h=l===f;return c.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[c.jsx("td",{className:"py-1.5 pr-2",children:c.jsxs("button",{type:"button",onClick:()=>s(f),className:Q("flex items-center gap-2 text-[14px]",h?"text-fg":"text-fg-muted hover:text-fg"),children:[c.jsx(St,{color:p.color}),p.name]})}),c.jsx("td",{className:"py-1.5 px-2 w-[128px]",children:c.jsxs("select",{value:p.region,onChange:y=>i(f,{region:y.target.value}),className:Q(Ue,"py-1 text-[12.5px]"),children:[c.jsx("option",{value:"us-east-1",children:"us-east-1"}),c.jsx("option",{value:"us-west-2",children:"us-west-2"}),c.jsx("option",{value:"eu-west-1",children:"eu-west-1"}),c.jsx("option",{value:"ap-southeast-1",children:"ap-southeast-1"})]})}),c.jsx("td",{className:"py-1.5 pl-2 w-[88px]",children:c.jsx("input",{type:"number",value:p.emulatorPort,onChange:y=>{const b=Number(y.target.value)||9297;i(f,{emulatorPort:b,emulatorEndpoint:`https://127.0.0.1:${b}`})},className:Q(Ue,"py-1 text-[12.5px]")})})]},f)})})]})}),c.jsxs(Je,{title:`Resources · ${e.length}`,children:[c.jsxs("table",{className:"w-full border-collapse",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-line",children:[c.jsx("th",{className:Q(d,"pl-0"),children:"Resource"}),il.map(f=>c.jsx("th",{className:Q(d,"text-center w-12 px-0"),children:wa(f)},f))]})}),c.jsx("tbody",{children:e.map(f=>{const p=(o==null?void 0:o.id)===f.id;return c.jsxs("tr",{onClick:()=>n(f.id),className:Q("cursor-pointer border-b border-line last:border-b-0 transition-colors",p?"bg-raised":"hover:bg-raised/60"),children:[c.jsx("td",{className:"py-1.5 pr-2",children:c.jsx("div",{className:Q("text-xs truncate max-w-[180px]",p?"text-fg":"text-fg-muted"),children:f.data.label})}),il.map(h=>{var x,m;const y=((x=f.data.envEnabled)==null?void 0:x[h])!==!1,b=Object.keys(((m=f.data.envOverrides)==null?void 0:m[h])||{}).length;return c.jsx("td",{className:"py-1 text-center",children:c.jsxs("button",{type:"button",onClick:_=>{_.stopPropagation(),r(f.id,h)},title:y?b>0?`Deployed with ${b} override(s)`:"Deployed with base values":"Skipped in this environment",className:"w-8 h-6 rounded inline-flex items-center justify-center gap-1 hover:bg-overlay",children:[c.jsx(St,{color:a[h].color,hollow:!y,className:"w-1.5 h-1.5"}),y&&b>0&&c.jsx("span",{className:"text-[11.5px] font-mono text-accent",children:b})]})},h)})]},f.id)})})]}),c.jsx("p",{className:"text-[12.5px] text-fg-faint mt-3",children:"Click a dot to turn a resource on or off. Numbers count overridden parameters."})]}),o&&u&&c.jsx(Je,{title:`Compare · ${o.data.label}`,children:c.jsx("div",{className:"overflow-x-auto -mx-1",children:c.jsxs("table",{className:"w-full border-collapse font-mono text-[12.5px]",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-line",children:[c.jsx("th",{className:Q(d,"font-sans"),children:"Parameter"}),il.map(f=>c.jsx("th",{className:Q(d,"font-sans"),children:wa(f)},f))]})}),c.jsx("tbody",{children:u.schema.map(f=>c.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[c.jsx("td",{className:"py-1.5 px-2 text-fg-muted truncate max-w-[110px]",title:f.key,children:f.key}),il.map(p=>{const h=Ft(o,p)[f.key],y=Vo(o,p,f.key);return c.jsx("td",{className:Q("py-1.5 px-2 truncate max-w-[64px]",y?"text-accent":"text-fg-faint"),title:String(h),children:String(h)},p)})]},f.key))})]})})})]})}const lO=/^(resource|data|variable|output|provider|terraform|locals|module)\b/;function sO({line:e}){const t=e.trimStart();if(t.startsWith("#")||t.startsWith("//"))return c.jsx("span",{className:"text-fg-faint",children:e});const n=e.match(lO);return n?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-info",children:n[0]}),e.slice(n[0].length)]}):c.jsx(c.Fragment,{children:e||" "})}const iO=[{id:"main.tf",label:"main"},{id:"provider.tf",label:"provider"},{id:"backend",label:"backend",awsOnly:!0},{id:"tfvars",label:"tfvars"},{id:"variables.tf",label:"variables"},{id:"outputs.tf",label:"outputs"}];function rO(){const e=B(m=>m.nodes),t=B(m=>m.edges),n=B(m=>m.activeEnv),a=B(m=>m.environments),l=B(m=>m.setExportModalOpen),[s,i]=R.useState("emulator"),[r,o]=R.useState("main.tf"),[u,d]=R.useState(!1),f=R.useMemo(()=>Ws(e,t,a[n],a,s),[e,t,n,a,s]),p=iO.filter(m=>s==="aws"||!("awsOnly"in m)),h=p.some(m=>m.id===r)?r:"main.tf",y=R.useMemo(()=>{switch(h){case"backend":return`# ---- backend.tf ----
|
|
1704
|
+
|
|
1705
|
+
${f.backendTf}
|
|
1706
|
+
# ---- backend.tfbackend ----
|
|
1707
|
+
|
|
1708
|
+
${f.backendConfig}`;case"main.tf":return f.mainTf;case"provider.tf":return f.providerTf;case"tfvars":return f.tfvars;case"variables.tf":return f.variablesTf;case"outputs.tf":return f.outputsTf}},[h,f]),b=()=>{navigator.clipboard.writeText(y),d(!0),setTimeout(()=>d(!1),2e3)},x=y.split(`
|
|
1709
|
+
`);return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"shrink-0 border-b border-line",children:[c.jsxs("div",{className:"px-4 pt-3 flex items-center gap-2",children:[c.jsx(Pa,{value:s,onChange:i,className:"flex-1",options:[{value:"emulator",label:"Emulator"},{value:"aws",label:"AWS export"}]}),s==="aws"&&c.jsx(me,{onClick:()=>l(!0),className:"shrink-0",children:"Export…"})]}),c.jsxs("div",{className:"h-9 px-4 flex items-center justify-between",children:[c.jsxs("span",{className:"text-[12.5px] font-mono text-fg-faint truncate",children:[s==="aws"?Uo:"terraform-out","/environments/",n,"/",h==="tfvars"?`${n}.tfvars`:h==="backend"?"backend.tf, backend.tfbackend":h]}),c.jsxs(me,{variant:"ghost",onClick:b,className:"-mr-2",children:[u?c.jsx(Km,{className:"w-3.5 h-3.5 text-ok"}):c.jsx(Mr,{className:"w-3.5 h-3.5"}),u?"Copied":"Copy"]})]}),c.jsx("div",{className:"px-2 flex items-stretch overflow-x-auto",children:p.map(m=>c.jsxs("button",{type:"button",onClick:()=>o(m.id),className:Q("relative h-8 px-1.5 text-[12.5px] font-mono shrink-0 transition-colors",h===m.id?"text-fg":"text-fg-faint hover:text-fg-muted"),children:[m.label,h===m.id&&c.jsx("span",{className:"absolute left-1.5 right-1.5 -bottom-px h-px bg-fg"})]},m.id))})]}),c.jsx("div",{className:"flex-1 overflow-auto bg-base py-3 font-mono text-[13px] leading-[1.7] select-text",children:c.jsx("pre",{className:"text-fg/90",children:x.map((m,_)=>c.jsxs("div",{className:"flex",children:[c.jsx("span",{className:"w-10 pr-4 text-right text-fg-faint/60 select-none shrink-0 tabular-nums",children:_+1}),c.jsx("span",{className:"whitespace-pre pr-4",children:c.jsx(sO,{line:m})})]},_))})})]})}function oO(){const e=B(y=>y.activeEnv),t=B(y=>y.environments),n=B(y=>y.nodes),a=B(y=>y.edges),l=B(y=>y.emulatorStatuses),s=B(y=>y.refreshEmulatorStatuses),[i,r]=R.useState("shell"),[o,u]=R.useState(!1),d=t[e],f=R.useMemo(()=>Ws(n,a,d,t),[n,a,d,t]),p=i==="shell"?f.emulatorScriptSh:i==="compose"?f.dockerComposeYml:f.dockerfile,h=()=>{navigator.clipboard.writeText(p),u(!0),setTimeout(()=>u(!1),2e3)};return c.jsxs(c.Fragment,{children:[c.jsx(Je,{children:c.jsx(B6,{})}),c.jsxs(Je,{title:"Emulators",aside:c.jsxs("div",{className:"flex items-center gap-1 -mr-2",children:[c.jsxs("a",{href:"https://github.com/aws/aws-emulator",target:"_blank",rel:"noreferrer",className:"h-7 px-2 rounded-md text-xs text-fg-muted hover:text-fg hover:bg-raised flex items-center gap-1",children:["aws/aws-emulator ",c.jsx(FM,{className:"w-3 h-3"})]}),c.jsx(Ge,{onClick:()=>s(),title:"Check ports",children:c.jsx(Jm,{className:"w-3.5 h-3.5"})})]}),children:[c.jsx("div",{className:"divide-y divide-line",children:il.map(y=>{var m;const b=t[y],x=(m=l[b.emulatorPort])==null?void 0:m.running;return c.jsxs("div",{className:"h-8 flex items-center gap-2.5 text-xs",children:[c.jsx(St,{color:b.color}),c.jsx("span",{className:y===e?"text-fg":"text-fg-muted",children:b.name}),c.jsxs("span",{className:"font-mono text-[12.5px] text-fg-faint",children:[":",b.emulatorPort]}),c.jsxs("span",{className:Q("ml-auto flex items-center gap-1.5",x?"text-fg-muted":"text-fg-faint"),children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full",x?"bg-ok":"bg-fg-faint/50")}),x?"running":"stopped"]})]},y)})}),c.jsxs("p",{className:"text-[12.5px] text-fg-faint mt-3",children:["Each emulator serves HTTPS with a local CA in"," ",c.jsx("span",{className:"font-mono",children:"~/.aws/emulator/<port>/"}),"."]})]}),c.jsxs(Je,{title:"Setup files",aside:c.jsxs(me,{variant:"ghost",onClick:h,className:"-mr-2",children:[o?c.jsx(Km,{className:"w-3.5 h-3.5 text-ok"}):c.jsx(Mr,{className:"w-3.5 h-3.5"}),o?"Copied":"Copy"]}),children:[c.jsx(Pa,{value:i,onChange:r,options:[{value:"shell",label:`Shell env · ${wa(e)}`},{value:"compose",label:"docker-compose"},{value:"dockerfile",label:"Dockerfile"}]}),c.jsx("pre",{className:"mt-3 rounded-md border border-line bg-base p-3 font-mono text-[12.5px] leading-relaxed text-fg/90 select-text overflow-x-auto max-h-96",children:p})]})]})}function cO(){const e=B(a=>a.isTemplateModalOpen),t=B(a=>a.setTemplateModalOpen),n=B(a=>a.loadTemplate);return e?c.jsx("div",{onClick:()=>t(!1),className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4",children:c.jsxs("div",{onClick:a=>a.stopPropagation(),className:"w-full max-w-2xl rounded-lg bg-panel border border-line shadow-2xl shadow-black/50 overflow-hidden",children:[c.jsxs("div",{className:"px-5 py-4 border-b border-line flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-[16px] font-medium text-fg",children:"Blueprints"}),c.jsx("p",{className:"text-xs text-fg-muted mt-1",children:"Pre-wired architectures with per-environment overrides. Loading one replaces the canvas; undo with ⌘Z."})]}),c.jsx(Ge,{onClick:()=>t(!1),title:"Close",className:"-mr-2 -mt-1",children:c.jsx($r,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"max-h-[70vh] overflow-y-auto divide-y divide-line",children:Gm.map(a=>c.jsxs("div",{className:"px-5 py-4 flex items-start justify-between gap-6 hover:bg-raised/50 transition-colors",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-baseline gap-2",children:[c.jsx("h3",{className:"text-[14px] font-medium text-fg",children:a.name}),c.jsxs("span",{className:"text-[12.5px] text-fg-faint",children:[a.nodes.length," resources · ",a.edges.length," connections"]})]}),c.jsx("p",{className:"text-[12.5px] font-mono text-fg-muted mt-1",children:a.subtitle}),c.jsx("p",{className:"text-xs text-fg-muted leading-relaxed mt-2",children:a.description})]}),c.jsx(me,{onClick:()=>n(a.id),className:"shrink-0 mt-0.5",children:"Load"})]},a.id))})]})}):null}const jd=8;function uO(){const e=B(v=>v.isImportModalOpen),t=B(v=>v.setImportModalOpen),n=B(v=>v.importTerraformHcl),a=B(v=>v.exportProjectJson),l=B(v=>v.importProjectJson),s=B(v=>v.nodes.length),i=B(v=>v.projectFile),[r,o]=R.useState("terraform"),[u,d]=R.useState(""),[f,p]=R.useState(null),h=R.useRef(null),y=R.useRef(null);if(!e)return null;const b=()=>{t(!1),p(null)},x=async v=>{if(!(v!=null&&v.length))return;const w=await Promise.all(Array.from(v).map(async N=>`# --- ${N.name} ---
|
|
1710
|
+
${await N.text()}`));d(w.join(`
|
|
1711
|
+
|
|
1712
|
+
`)),p(null)},m=()=>{const v=n(u);if(v.importedCount===0){p({kind:"error",message:'No supported `resource "aws_*"` blocks found.'});return}d("");const w=[...v.dropped.map(N=>`Not imported: ${N.key} on ${N.address} (${N.reason})`),...v.skippedResources.length?[`No canvas service for ${v.skippedResources.length} resource(s): ${v.skippedResources.join(", ")}`]:[],...v.warnings];p({kind:"ok",message:`Imported ${v.importedCount} resource${v.importedCount===1?"":"s"}${v.extraArgCount?`; ${v.extraArgCount} argument${v.extraArgCount===1?"":"s"} kept as Extra HCL`:""}.`,details:w})},_=()=>{const v=new Blob([a()],{type:"application/json"}),w=URL.createObjectURL(v),N=document.createElement("a");N.href=w,N.download=`localcloud-${new Date().toISOString().slice(0,10)}.localcloud.json`,N.click(),URL.revokeObjectURL(w),p({kind:"ok",message:"Project downloaded."})},g=async v=>{const w=v==null?void 0:v[0];w&&(l(await w.text())?p(null):p({kind:"error",message:`${w.name} is not a LocalCloud project file.`}))};return c.jsx("div",{onClick:b,className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4",children:c.jsxs("div",{onClick:v=>v.stopPropagation(),className:"w-full max-w-2xl rounded-lg bg-panel border border-line shadow-2xl shadow-black/50 overflow-hidden",children:[c.jsxs("div",{className:"h-12 pl-3 pr-3 border-b border-line flex items-stretch justify-between",children:[c.jsx("nav",{className:"flex items-stretch",children:[{id:"terraform",label:"Import Terraform"},{id:"project",label:"Project file"}].map(({id:v,label:w})=>c.jsxs("button",{type:"button",onClick:()=>{o(v),p(null)},className:Q("relative px-2.5 text-[14px] transition-colors",r===v?"text-fg":"text-fg-muted hover:text-fg"),children:[w,r===v&&c.jsx("span",{className:"absolute left-2.5 right-2.5 -bottom-px h-px bg-fg"})]},v))}),c.jsx(Ge,{onClick:b,title:"Close",className:"self-center",children:c.jsx($r,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"p-5 space-y-4",children:[r==="terraform"?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"text-xs text-fg-muted leading-relaxed",children:["Paste HCL or choose ",c.jsx("span",{className:"font-mono text-fg",children:".tf"})," files. Each"," ",c.jsx("span",{className:"font-mono text-fg",children:'resource "aws_*"'})," block becomes a node and references become connections. This replaces the current canvas (",s," nodes); undo with ⌘Z."]}),c.jsx("textarea",{value:u,onChange:v=>d(v.target.value),rows:12,spellCheck:!1,placeholder:`resource "aws_s3_bucket" "assets" {
|
|
1713
|
+
bucket = "my-assets"
|
|
1714
|
+
}`,className:Q(Ue,"p-3 text-[13px] leading-relaxed resize-y")}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(me,{onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},children:[c.jsx(n$,{className:"w-3.5 h-3.5"})," Choose files"]}),c.jsx("input",{ref:h,type:"file",accept:".tf,.hcl,text/plain",multiple:!0,hidden:!0,onChange:v=>{x(v.target.files),v.target.value=""}}),c.jsx(me,{variant:"primary",disabled:!u.trim(),onClick:m,children:"Import to canvas"})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"text-xs text-fg-muted leading-relaxed",children:[i.file&&i.state!=="error"?c.jsxs(c.Fragment,{children:["The canvas saves to ",c.jsxs("span",{className:"font-mono text-fg",children:["./",i.file]})," as you edit, so you can commit it next to your Terraform. After pulling changes to that file, reload this page to pick them up."]}):c.jsx(c.Fragment,{children:"The canvas is saved in this browser only."})," ","A downloaded copy holds every node, connection, override and environment profile."]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{type:"button",onClick:_,className:"p-4 rounded-md border border-line hover:border-line-strong hover:bg-raised text-left transition-colors",children:[c.jsx(dw,{className:"w-4 h-4 text-fg-muted"}),c.jsx("div",{className:"text-[14px] text-fg mt-3",children:"Download project"}),c.jsxs("div",{className:"text-[12.5px] text-fg-faint mt-0.5",children:[s," nodes · 4 environments"]})]}),c.jsxs("button",{type:"button",onClick:()=>{var v;return(v=y.current)==null?void 0:v.click()},className:"p-4 rounded-md border border-line hover:border-line-strong hover:bg-raised text-left transition-colors",children:[c.jsx(cp,{className:"w-4 h-4 text-fg-muted"}),c.jsx("div",{className:"text-[14px] text-fg mt-3",children:"Load project file"}),c.jsx("div",{className:"text-[12.5px] text-fg-faint mt-0.5",children:"Replaces the canvas; undo with ⌘Z"})]}),c.jsx("input",{ref:y,type:"file",accept:".json,application/json",hidden:!0,onChange:v=>{g(v.target.files),v.target.value=""}})]})]}),f&&c.jsxs("div",{children:[c.jsxs("p",{className:Q("text-xs flex items-center gap-2",f.kind==="ok"?"text-fg":"text-err"),children:[f.kind==="ok"?c.jsx(bu,{className:"w-3.5 h-3.5 text-ok"}):c.jsx(fr,{className:"w-3.5 h-3.5"}),f.message]}),f.details&&f.details.length>0&&c.jsxs("ul",{className:"mt-2 pl-5 space-y-1 text-[12.5px] text-fg-muted leading-relaxed list-disc marker:text-fg-faint",children:[f.details.slice(0,jd).map((v,w)=>c.jsx("li",{children:v},w)),f.details.length>jd&&c.jsxs("li",{className:"text-fg-faint",children:["and ",f.details.length-jd," more"]})]})]})]})]})})}const C0=["dev","testing","staging","prod"];function dO(){const e=B(m=>m.isExportModalOpen),t=B(m=>m.setExportModalOpen),n=B(m=>m.nodes),a=B(m=>m.edges),l=B(m=>m.environments),s=B(m=>m.exportForAws),i=B(m=>m.selectNode),r=B(m=>m.setActiveEnv),o=B(m=>m.setRightTab),[u,d]=R.useState(!1),[f,p]=R.useState(null),h=R.useMemo(()=>e?vM(n,a,l):[],[e,n,a,l]);if(!e)return null;const y=()=>{t(!1),p(null)},b=async()=>{var _,g;d(!0);const m=await s();d(!1),p(m.ok?{kind:"ok",written:((_=m.writtenFiles)==null?void 0:_.length)||0,kept:((g=m.keptFiles)==null?void 0:g.length)||0}:{kind:"error",message:m.error||"Export failed"})},x=(m,_)=>{r(m),_&&(i(_),o("inspector"),y())};return c.jsx("div",{onClick:y,className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-4",children:c.jsxs("div",{onClick:m=>m.stopPropagation(),className:"w-full max-w-2xl max-h-[90vh] flex flex-col rounded-lg bg-panel border border-line shadow-2xl shadow-black/50 overflow-hidden",children:[c.jsxs("div",{className:"px-5 py-4 border-b border-line flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-[16px] font-medium text-fg",children:"Export for AWS"}),c.jsxs("p",{className:"text-xs text-fg-muted mt-1 leading-relaxed",children:["Writes Terraform for your real accounts to"," ",c.jsxs("span",{className:"font-mono text-fg",children:["./",Uo]}),": no emulator endpoints or credentials, remote state in S3, and real values wherever the local build uses stand-ins. LocalCloud never runs it; deploy it with your usual pipeline."]})]}),c.jsx(Ge,{onClick:y,title:"Close",className:"-mr-2 -mt-1",children:c.jsx($r,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c.jsx("div",{className:"px-5 py-4 border-b border-line",children:c.jsx("div",{className:"divide-y divide-line",children:C0.map(m=>{const _=l[m],g=n.filter(w=>{var N;return((N=w.data.envEnabled)==null?void 0:N[m])!==!1}).length,v=h.filter(w=>w.envId===m).length;return c.jsxs("div",{className:"h-9 flex items-center gap-2.5 text-xs",children:[c.jsx(St,{color:_.color}),c.jsx("span",{className:"text-fg w-24",children:_.name}),c.jsx("span",{className:"font-mono text-[12.5px] text-fg-faint w-24",children:_.region}),c.jsxs("span",{className:"text-fg-faint",children:[g," resource",g===1?"":"s"]}),c.jsxs("span",{className:Q("ml-auto flex items-center gap-1.5",v?"text-warn":"text-fg-muted"),children:[c.jsx("span",{className:Q("w-1.5 h-1.5 rounded-full",v?"bg-warn":"bg-ok")}),v?`${v} to fix`:"ready"]})]},m)})})}),h.length>0&&c.jsxs("div",{className:"px-5 py-4 border-b border-line",children:[c.jsx("h3",{className:"text-xs font-medium text-fg-muted mb-2",children:"To fix before deploying"}),c.jsx("div",{className:"-mx-2",children:_M(h).map((m,_)=>c.jsxs("button",{type:"button",onClick:()=>x(m.envIds[0],m.nodeId),disabled:!m.nodeId,className:"w-full px-2 py-1.5 rounded-md text-left flex items-start gap-2.5 enabled:hover:bg-raised transition-colors",children:[c.jsx(fr,{className:"w-3.5 h-3.5 text-warn shrink-0 mt-0.5"}),c.jsxs("span",{className:"text-xs leading-relaxed",children:[c.jsxs("span",{className:"text-fg-faint",children:[m.envIds.length===C0.length?"All environments":m.envIds.map(g=>g==="testing"?"test":g).join(", "),":"]})," ",c.jsx("span",{className:"text-fg-muted",children:m.message})]})]},_))}),c.jsx("p",{className:"text-[12.5px] text-fg-faint mt-2",children:"You can export now and fix these in the exported files, or fix them on the canvas and export again."})]}),c.jsxs("div",{className:"px-5 py-4",children:[c.jsx("h3",{className:"text-xs font-medium text-fg-muted mb-2",children:"First deploy"}),c.jsxs("ol",{className:"text-xs text-fg-muted leading-relaxed space-y-1.5 list-decimal pl-4",children:[c.jsxs("li",{children:["Create an S3 bucket for Terraform state and put its name in each environment's"," ",c.jsx("span",{className:"font-mono text-fg",children:"backend.tfbackend"}),". Exporting again keeps that file."]}),c.jsx("li",{children:"Then, per environment, with your AWS credentials for that account:"})]}),c.jsx("pre",{className:"mt-2 rounded-md border border-line bg-base p-3 font-mono text-[12.5px] leading-relaxed text-fg/90 select-text overflow-x-auto",children:`cd ${Uo}/environments/dev
|
|
1715
|
+
terraform init -backend-config=backend.tfbackend
|
|
1716
|
+
terraform plan -var-file=dev.tfvars`})]})]}),c.jsxs("div",{className:"px-5 py-3 border-t border-line flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"text-xs min-w-0",children:[(f==null?void 0:f.kind)==="ok"&&c.jsxs("span",{className:"text-fg-muted flex items-center gap-2",children:[c.jsx(bu,{className:"w-3.5 h-3.5 text-ok shrink-0"}),c.jsxs("span",{children:["Wrote ",f.written," files to ",c.jsxs("span",{className:"font-mono",children:["./",Uo]}),f.kept>0&&`, kept your ${f.kept} backend settings`,"."]})]}),(f==null?void 0:f.kind)==="error"&&c.jsxs("span",{className:"text-err flex items-center gap-2",children:[c.jsx(fr,{className:"w-3.5 h-3.5 shrink-0"}),f.message]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c.jsx(me,{variant:"ghost",onClick:y,children:(f==null?void 0:f.kind)==="ok"?"Done":"Cancel"}),c.jsxs(me,{variant:"primary",disabled:u,onClick:b,children:[u&&c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}),(f==null?void 0:f.kind)==="ok"?"Export again":"Export"]})]})]})]})})}const wu={compute:"#3987e5",storage:"#d95926",requests:"#199e70",transfer:"#c98500",fees:"#d55181"};function ut(e){return e===0?"$0":Math.abs(e)<10?`$${e.toFixed(2)}`:`$${Math.round(e).toLocaleString("en-US")}`}function T0(e){return Math.abs(e)>=1e3?`$${(e/1e3).toFixed(e%1e3===0||e>=1e4?0:1)}K`:ut(e)}function fO(e){if(e<=0)return 1;const t=Math.pow(10,Math.floor(Math.log10(e)));return([1,2,2.5,5,10].find(a=>a*t>=e)??10)*t}function A0({className:e}){return c.jsx("div",{className:Q("flex flex-wrap items-center gap-x-4 gap-y-1",e),children:Et.map(t=>c.jsxs("span",{className:"flex items-center gap-1.5 text-[12.5px] text-fg-muted",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-[2px]",style:{backgroundColor:wu[t]}}),Tw[t]]},t))})}function kw(){const[e,t]=R.useState(null);return{tip:e,show:t,hide:()=>t(null)}}function jw({tip:e}){const t=Et.reduce((l,s)=>l+e.drivers[s],0),n=Math.min(e.x+14,window.innerWidth-230),a=Math.min(e.y+14,window.innerHeight-190);return c.jsxs("div",{role:"tooltip",className:"fixed z-50 w-[210px] pointer-events-none rounded-md border border-line-strong bg-raised px-3 py-2.5",style:{left:n,top:a},children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2 mb-2",children:[c.jsx("span",{className:"text-xs text-fg-muted truncate",children:e.title}),c.jsx("span",{className:"text-xs font-semibold text-fg tabular-nums",children:ut(t)})]}),c.jsxs("div",{className:"space-y-1",children:[Et.filter(l=>e.drivers[l]>0).map(l=>c.jsxs("div",{className:Q("flex items-center gap-2 text-xs",e.highlight&&e.highlight!==l&&"opacity-60"),children:[c.jsx("span",{className:"w-2.5 h-[2px] rounded-full shrink-0",style:{backgroundColor:wu[l]}}),c.jsx("span",{className:"font-medium text-fg tabular-nums",children:ut(e.drivers[l])}),c.jsx("span",{className:"text-fg-muted",children:Tw[l]})]},l)),t===0&&c.jsx("span",{className:"text-xs text-fg-faint",children:"No charge"})]})]})}function k0({rows:e,labelWidth:t=120}){const{tip:n,show:a,hide:l}=kw(),s=Math.max(.01,...e.map(i=>i.total));return c.jsxs("div",{className:"space-y-1",onPointerLeave:l,children:[e.map(i=>{const r=Et.filter(u=>i.drivers[u]>0),o=i.onClick?"button":"div";return c.jsxs(o,{type:i.onClick?"button":void 0,onClick:i.onClick,onFocus:u=>{const d=u.currentTarget.getBoundingClientRect();a({x:d.right-220,y:d.bottom,title:i.tooltipTitle,drivers:i.drivers})},onBlur:l,className:Q("w-full grid items-center gap-3 h-8 px-2 -mx-2 rounded-md text-left",i.onClick&&"hover:bg-raised transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-accent"),style:{gridTemplateColumns:`${t}px 1fr 64px`},children:[c.jsx("span",{className:Q("text-xs truncate",i.active===!1?"text-fg-muted":"text-fg"),children:i.label}),c.jsx("span",{className:"flex h-2.5 gap-[2px]",style:{width:`${i.total/s*100}%`},children:r.map((u,d)=>c.jsx("span",{className:Q("h-full",d===r.length-1&&"rounded-r-[4px]","hover:brightness-125"),style:{flexGrow:i.drivers[u],flexBasis:0,minWidth:2,backgroundColor:wu[u]},onPointerMove:f=>a({x:f.clientX,y:f.clientY,title:i.tooltipTitle,drivers:i.drivers,highlight:u})},u))}),c.jsx("span",{className:"text-xs text-right tabular-nums text-fg",children:ut(i.total)})]},i.key)}),n&&c.jsx(jw,{tip:n})]})}function pO({columns:e,height:t=200}){const{tip:n,show:a,hide:l}=kw(),s=e.map(u=>Et.reduce((d,f)=>d+u.drivers[f],0)),i=fO(Math.max(...s,.01)),r=[0,.25,.5,.75,1].map(u=>i*u),o=e.length-1;return c.jsxs("div",{className:"flex gap-3",onPointerLeave:l,children:[c.jsx("div",{className:"relative w-11 shrink-0",style:{height:t},children:r.map(u=>c.jsx("span",{className:"absolute right-0 text-[12.5px] text-fg-faint tabular-nums",style:{bottom:`${u/i*100}%`,transform:"translateY(50%)"},children:T0(u)},u))}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"relative",style:{height:t},children:[r.map(u=>c.jsx("span",{className:Q("absolute left-0 right-0 h-px",u===0?"bg-line-strong":"bg-line/60"),style:{bottom:`${u/i*100}%`}},u)),c.jsx("div",{className:"absolute inset-0 flex",children:e.map((u,d)=>{const f=Et.filter(p=>u.drivers[p]>0);return c.jsxs("div",{tabIndex:0,"aria-label":`${u.title}: ${ut(s[d])}`,className:"group relative flex-1 flex flex-col justify-end items-center outline-none",onPointerMove:p=>a({x:p.clientX,y:p.clientY,title:u.title,drivers:u.drivers}),onFocus:p=>{const h=p.currentTarget.getBoundingClientRect();a({x:h.left,y:h.top+20,title:u.title,drivers:u.drivers})},onBlur:l,children:[c.jsx("span",{className:"absolute inset-y-0 inset-x-0.5 rounded-sm group-hover:bg-fg/[0.04] group-focus-visible:bg-fg/[0.06]"}),d===o&&c.jsx("span",{className:"relative mb-1 text-[12.5px] text-fg tabular-nums whitespace-nowrap",children:T0(s[d])}),c.jsx("div",{className:"relative w-full max-w-[24px] flex flex-col-reverse gap-[2px]",style:{height:`${s[d]/i*100}%`},children:f.map((p,h)=>c.jsx("span",{className:Q("w-full",h===f.length-1&&"rounded-t-[4px]"),style:{flexGrow:u.drivers[p],flexBasis:0,minHeight:2,backgroundColor:wu[p]}},p))})]},u.label+d)})})]}),c.jsx("div",{className:"flex mt-2",children:e.map((u,d)=>c.jsx("span",{className:"flex-1 text-center text-[12.5px] text-fg-faint",children:u.label},u.label+d))})]}),n&&c.jsx(jw,{tip:n})]})}const po=e=>e==="testing"?"test":e,mO=[{value:"0",label:"Flat"},{value:"0.05",label:"+5%"},{value:"0.1",label:"+10%"},{value:"0.2",label:"+20%"}],j0=[{key:"requestsMillions",label:"Requests",unit:"M / mo",step:.1},{key:"dataTransferGb",label:"Data out to internet",unit:"GB / mo",step:10},{key:"storageGb",label:"Data per storage service",unit:"GB",step:10},{key:"logsGb",label:"Logs ingested",unit:"GB / mo",step:5}];function Gl({title:e,aside:t,children:n,className:a}){return c.jsxs("section",{className:Q("bg-panel border border-line rounded-lg min-w-0",a),children:[(e||t)&&c.jsxs("header",{className:"flex items-center justify-between gap-3 px-4 pt-3.5 min-h-[42px]",children:[c.jsx("h2",{className:"text-[14px] font-medium text-fg",children:e}),t]}),c.jsx("div",{className:"p-4",children:n})]})}function mo({label:e,value:t,sub:n,hero:a}){return c.jsxs("div",{className:Q("bg-panel border border-line rounded-lg px-4 py-3.5 flex flex-col min-w-0",a&&"col-span-2"),children:[c.jsx("span",{className:"text-xs text-fg-muted flex items-center gap-2",children:e}),c.jsx("span",{className:Q("mt-auto pt-3 font-semibold tracking-tight text-fg truncate",a?"text-[48px] leading-none":"text-[26px] leading-tight"),children:t}),n&&c.jsx("span",{className:"mt-1.5 text-xs text-fg-faint truncate",children:n})]})}function hO(){const e=B(C=>C.nodes),t=B(C=>C.environments),n=B(C=>C.activeEnv),a=B(C=>C.setActiveEnv),l=B(C=>C.setView),s=B(C=>C.selectNode),i=B(C=>C.setRightTab),r=B(C=>C.updateEnvironmentProfile),[o,u]=R.useState("0.05"),[d,f]=R.useState(null),[p,h]=R.useState(!1),[y,b]=R.useState(!1),x=R.useMemo(()=>Aw(e,t),[e,t]),m=R.useMemo(()=>K6(e,x),[e,x]),_=t[n],g=x.totalsByEnv[n],v=dt.reduce((C,E)=>C+x.totalsByEnv[E],0),w=m.reduce((C,E)=>C+E.monthlyUsd,0),N=[...x.items].sort((C,E)=>E.monthlyUsd[n]-C.monthlyUsd[n])[0],S=x.items.filter(C=>C.monthlyUsd[n]>0).length,A=(C,E)=>{E&&a(E),s(C),i("inspector"),l("design")},k=dt.map(C=>({key:C,label:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(St,{color:t[C].color}),t[C].name]}),tooltipTitle:t[C].name,drivers:x.driversByEnv[C],total:x.totalsByEnv[C],active:C===n,onClick:()=>a(C)})),H=R.useMemo(()=>{const C=new Map;for(const E of x.items){if(E.monthlyUsd[n]<=0)continue;const $=C.get(E.category)??{compute:0,storage:0,requests:0,transfer:0,fees:0};for(const L of Et)$[L]+=E.drivers[n][L];C.set(E.category,$)}return[...C.entries()].map(([E,$])=>({key:E,label:E,tooltipTitle:E,drivers:$,total:Et.reduce((L,P)=>L+$[P],0)})).sort((E,$)=>$.total-E.total)},[x,n]),O=R.useMemo(()=>{const C=new Date;return X6(x.driversByEnv[n],Number(o)).map((E,$)=>{const L=new Date(C.getFullYear(),C.getMonth()+$,1);return{label:L.toLocaleString("en-US",{month:"short"}),title:L.toLocaleString("en-US",{month:"long",year:"numeric"}),drivers:E}})},[x,n,o]),V=O.reduce((C,E)=>C+Et.reduce(($,L)=>$+E.drivers[L],0),0),U=d??n,T=x.items.filter(C=>p||dt.some(E=>C.monthlyUsd[E]>0)).sort((C,E)=>E.monthlyUsd[U]-C.monthlyUsd[U]||C.label.localeCompare(E.label)),M=y?m:m.slice(0,3),j=()=>{const C=new Blob([F6(x)],{type:"text/csv"}),E=URL.createObjectURL(C),$=document.createElement("a");$.href=E,$.download="localcloud-cost-estimate.csv",$.click(),URL.revokeObjectURL(E)},z=(C,E,$)=>{const L=Math.max(0,Number($)||0);r(C,{usage:{...Go(t[C],C),[E]:L}})},D=dt.every(C=>j0.every(({key:E})=>Go(t[C],C)[E]===la[C].usage[E]));return e.length===0?c.jsx("main",{className:"flex-1 flex items-center justify-center bg-base",children:c.jsxs("div",{className:"text-center space-y-3",children:[c.jsx("p",{className:"text-[14px] text-fg",children:"Nothing to price yet"}),c.jsx("p",{className:"text-xs text-fg-muted",children:"Add services on the canvas and their cost shows up here."}),c.jsx(me,{onClick:()=>l("design"),children:"Back to design"})]})}):c.jsx("main",{className:"flex-1 min-h-0 overflow-y-auto bg-base select-text",children:c.jsxs("div",{className:"max-w-[1320px] mx-auto px-6 py-6 space-y-4",children:[c.jsxs("div",{className:"flex items-end justify-between gap-4 flex-wrap",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-[20px] font-semibold tracking-tight text-fg",children:"Cost analysis"}),c.jsx("p",{className:"mt-1 text-xs text-fg-muted",children:"Estimated monthly spend at on-demand us-east-1 list prices, sized from the usage assumptions at the bottom of this page."})]}),c.jsxs(me,{onClick:j,children:[c.jsx(dw,{className:"w-3.5 h-3.5"}),"Export CSV"]})]}),c.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-4",children:[c.jsx(mo,{hero:!0,label:c.jsxs(c.Fragment,{children:[c.jsx(St,{color:_.color}),_.name," per month"]}),value:ut(g),sub:`${ut(g*12)} per year · ${S} billable resource${S===1?"":"s"}`}),c.jsx(mo,{label:"All environments per month",value:ut(v),sub:`${ut(v*12)} per year · prod is ${v>0?Math.round(x.totalsByEnv.prod/v*100):0}%`}),c.jsx(mo,{label:"Largest line item",value:N&&N.monthlyUsd[n]>0?ut(N.monthlyUsd[n]):"$0",sub:N&&N.monthlyUsd[n]>0?N.label:"Nothing billable"}),c.jsx(mo,{label:"Possible savings per month",value:ut(w),sub:`${m.length} suggestion${m.length===1?"":"s"} across environments`})]}),c.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-12 gap-4",children:[c.jsx(Gl,{title:"Monthly cost by environment",aside:c.jsx(A0,{}),className:"xl:col-span-7",children:c.jsx(k0,{rows:k,labelWidth:130})}),c.jsx(Gl,{title:`By service category · ${_.name}`,className:"xl:col-span-5",children:H.length===0?c.jsxs("p",{className:"py-8 text-center text-xs text-fg-muted",children:["Nothing billable in ",_.name,"."]}):c.jsx(k0,{rows:H,labelWidth:170})}),c.jsxs(Gl,{title:`12-month projection · ${_.name}`,aside:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs text-fg-faint",children:"Usage growth per month"}),c.jsx(Pa,{value:o,onChange:u,options:mO})]}),className:"xl:col-span-7",children:[c.jsx(pO,{columns:O}),c.jsxs("div",{className:"mt-4 pt-3 border-t border-line flex items-center justify-between gap-4 text-xs",children:[c.jsx(A0,{}),c.jsxs("span",{className:"text-fg-muted shrink-0",children:["12-month total ",c.jsx("span",{className:"ml-1 font-medium text-fg tabular-nums",children:ut(V)})]})]}),c.jsx("p",{className:"mt-2 text-xs text-fg-faint",children:"Growth applies to storage, requests and data transfer. Compute and fixed fees stay as configured."})]}),c.jsx(Gl,{title:"Savings opportunities",aside:m.length>0&&c.jsxs("span",{className:"text-xs text-fg-muted tabular-nums",children:[ut(w)," / mo"]}),className:"xl:col-span-5",children:m.length===0?c.jsxs("p",{className:"py-8 text-center text-xs text-fg-muted flex items-center justify-center gap-2",children:[c.jsx(bu,{className:"w-3.5 h-3.5 text-ok"})," No obvious savings in this design."]}):c.jsxs("div",{className:"-mx-2 -my-1",children:[M.map(C=>{const E=x.items.find($=>$.nodeId===C.nodeId);return c.jsxs("button",{type:"button",onClick:()=>A(C.nodeId,C.envId),title:`Open ${E==null?void 0:E.label} in ${t[C.envId].name}`,className:"group w-full text-left px-2 py-2.5 rounded-md hover:bg-raised transition-colors flex items-start gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[c.jsx("div",{className:"text-xs font-medium text-fg",children:C.title}),c.jsxs("div",{className:"text-xs text-fg-muted flex items-center gap-1.5 min-w-0",children:[c.jsx(St,{color:t[C.envId].color,className:"w-1.5 h-1.5"}),c.jsxs("span",{className:"truncate",children:[E==null?void 0:E.label," · ",po(C.envId)]})]}),c.jsx("p",{className:"text-xs text-fg-faint leading-relaxed",children:C.detail})]}),c.jsxs("span",{className:"text-xs font-medium text-ok tabular-nums shrink-0 flex items-center gap-1",children:[c.jsx(_0,{className:"w-3 h-3"}),ut(C.monthlyUsd)]})]},C.id)}),m.length>3&&c.jsx(me,{variant:"ghost",className:"mt-1 ml-0.5",onClick:()=>b(!y),children:y?"Show fewer":`Show all ${m.length}`})]})}),c.jsx(Gl,{title:"Resources",aside:c.jsxs("label",{className:"flex items-center gap-2 text-xs text-fg-muted cursor-pointer",children:["Show free resources",c.jsx(Sw,{checked:p,onChange:h})]}),className:"xl:col-span-12",children:c.jsx("div",{className:"-mx-4 -mb-4 overflow-x-auto",children:c.jsxs("table",{className:"w-full text-xs",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-line text-fg-muted",children:[c.jsx("th",{className:"pl-4 pr-3 py-2 text-left font-normal",children:"Resource"}),c.jsxs("th",{className:"px-3 py-2 text-left font-normal",children:["Sizing in ",po(n)]}),dt.map(C=>c.jsx("th",{className:"px-3 py-2 text-right font-normal w-[92px]",children:c.jsxs("button",{type:"button",onClick:()=>f(C),title:`Sort by ${t[C].name}`,className:Q("inline-flex items-center gap-1.5 hover:text-fg transition-colors",U===C&&"text-fg"),children:[c.jsx(St,{color:t[C].color,className:"w-1.5 h-1.5"}),po(C),U===C&&c.jsx(_0,{className:"w-3 h-3"})]})},C)),c.jsxs("th",{className:"pl-3 pr-4 py-2 text-left font-normal w-[160px]",children:["Share of ",po(n)]})]})}),c.jsx("tbody",{children:T.map(C=>{const E=De[C.serviceType],$=g>0?C.monthlyUsd[n]/g:0;return c.jsxs("tr",{onClick:()=>A(C.nodeId),className:"group border-b border-line last:border-b-0 hover:bg-raised cursor-pointer transition-colors",children:[c.jsx("td",{className:"pl-4 pr-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[E&&c.jsx(eh,{iconName:E.iconName,color:E.color,size:"sm"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-fg truncate",children:C.label}),c.jsx("div",{className:"text-fg-faint truncate",children:(E==null?void 0:E.name)??C.serviceType})]}),c.jsx(uw,{className:"w-3 h-3 text-fg-faint opacity-0 group-hover:opacity-100 transition-opacity shrink-0"})]})}),c.jsx("td",{className:"px-3 py-2 text-fg-muted max-w-[260px] truncate",children:C.sizingNotes[n]}),dt.map(L=>c.jsx("td",{className:Q("px-3 py-2 text-right tabular-nums",C.monthlyUsd[L]===0?"text-fg-faint":L===n?"text-fg":"text-fg-muted"),children:C.sizingNotes[L]==="Disabled"?"off":ut(C.monthlyUsd[L])},L)),c.jsx("td",{className:"pl-3 pr-4 py-2",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-overlay overflow-hidden",children:c.jsx("div",{className:"h-full rounded-full bg-fg-muted",style:{width:`${$*100}%`}})}),c.jsxs("span",{className:"w-9 text-right text-fg-muted tabular-nums",children:[Math.round($*100),"%"]})]})})]},C.nodeId)})}),c.jsx("tfoot",{children:c.jsxs("tr",{className:"border-t border-line-strong",children:[c.jsx("td",{className:"pl-4 pr-3 py-2.5 text-fg-muted",colSpan:2,children:"Total"}),dt.map(C=>c.jsx("td",{className:Q("px-3 py-2.5 text-right tabular-nums font-medium",C===n?"text-fg":"text-fg-muted"),children:ut(x.totalsByEnv[C])},C)),c.jsx("td",{})]})})]})})}),c.jsxs(Gl,{title:"Usage assumptions",aside:c.jsxs(me,{variant:"ghost",disabled:D,onClick:()=>dt.forEach(C=>r(C,{usage:{...la[C].usage}})),children:[c.jsx(qo,{className:"w-3.5 h-3.5"}),"Reset"]}),className:"xl:col-span-12",children:[c.jsx("p",{className:"-mt-1 mb-4 text-xs text-fg-muted leading-relaxed max-w-[760px]",children:"Lambda, API Gateway, queues, DynamoDB and other usage-priced services each see the full request volume. Instances, databases and clusters are priced from their configuration, not these numbers. Saved with the project."}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-xs",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"text-fg-muted",children:[c.jsx("th",{className:"pb-2 pr-4 text-left font-normal",children:"Assumption"}),dt.map(C=>c.jsx("th",{className:"pb-2 px-2 text-left font-normal",children:c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(St,{color:t[C].color,className:"w-1.5 h-1.5"}),t[C].name]})},C))]})}),c.jsx("tbody",{children:j0.map(C=>c.jsxs("tr",{children:[c.jsxs("td",{className:"py-1 pr-4 text-fg whitespace-nowrap",children:[C.label," ",c.jsx("span",{className:"text-fg-faint",children:C.unit})]}),dt.map(E=>c.jsx("td",{className:"py-1 px-2 min-w-[120px]",children:c.jsx("input",{type:"number",min:0,step:C.step,"aria-label":`${C.label} in ${t[E].name}`,value:Go(t[E],E)[C.key],onChange:$=>z(E,C.key,$.target.value),className:Q(zc,"font-mono tabular-nums")})},E))]},C.key))})]})})]})]})]})})}function gO(){const e=B(t=>t.view);return c.jsxs("div",{className:"h-screen w-screen flex flex-col bg-base text-fg overflow-hidden",children:[c.jsx(N6,{}),c.jsxs("div",{className:Q("flex-1 flex min-h-0 overflow-hidden",e!=="design"&&"hidden"),children:[c.jsx(k6,{}),c.jsx(z6,{}),c.jsx(eO,{})]}),e==="costs"&&c.jsx(hO,{}),c.jsx(cO,{}),c.jsx(uO,{}),c.jsx(dO,{})]})}cC.createRoot(document.getElementById("root")).render(c.jsx(R.StrictMode,{children:c.jsx(gO,{})}));
|