migflow 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +44 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +45 -0
  5. data/CLAUDE.md +124 -0
  6. data/CODE_OF_CONDUCT.md +132 -0
  7. data/CONTRIBUTING.md +157 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +218 -0
  10. data/Rakefile +11 -0
  11. data/SECURITY.md +27 -0
  12. data/app/assets/migflow/app.css +1 -0
  13. data/app/assets/migflow/app.js +28 -0
  14. data/app/assets/migflow/index.html +14 -0
  15. data/app/assets/migflow/vite.svg +1 -0
  16. data/app/controllers/migflow/api/diff_controller.rb +73 -0
  17. data/app/controllers/migflow/api/migrations_controller.rb +97 -0
  18. data/app/controllers/migflow/application_controller.rb +62 -0
  19. data/app/views/migflow/application/index.html.erb +16 -0
  20. data/config/routes.rb +10 -0
  21. data/docs/architecture.md +130 -0
  22. data/lib/migflow/analyzers/audit_analyzer.rb +58 -0
  23. data/lib/migflow/analyzers/rules/base_rule.rb +32 -0
  24. data/lib/migflow/analyzers/rules/dangerous_migration_rule.rb +44 -0
  25. data/lib/migflow/analyzers/rules/missing_foreign_key_rule.rb +30 -0
  26. data/lib/migflow/analyzers/rules/missing_index_rule.rb +32 -0
  27. data/lib/migflow/analyzers/rules/missing_timestamps_rule.rb +38 -0
  28. data/lib/migflow/analyzers/rules/null_column_without_default_rule.rb +46 -0
  29. data/lib/migflow/analyzers/rules/string_without_limit_rule.rb +28 -0
  30. data/lib/migflow/app/assets/migflow/app.css +1 -0
  31. data/lib/migflow/app/assets/migflow/app.js +17 -0
  32. data/lib/migflow/app/assets/migflow/index.html +14 -0
  33. data/lib/migflow/app/assets/migflow/vite.svg +1 -0
  34. data/lib/migflow/configuration.rb +36 -0
  35. data/lib/migflow/engine.rb +14 -0
  36. data/lib/migflow/models/migration_snapshot.rb +15 -0
  37. data/lib/migflow/models/schema_diff.rb +9 -0
  38. data/lib/migflow/models/warning.rb +7 -0
  39. data/lib/migflow/parsers/migration_parser.rb +52 -0
  40. data/lib/migflow/parsers/schema_parser.rb +105 -0
  41. data/lib/migflow/reporters/json_reporter.rb +13 -0
  42. data/lib/migflow/reporters/markdown_reporter.rb +58 -0
  43. data/lib/migflow/reporters.rb +38 -0
  44. data/lib/migflow/services/diff_builder.rb +77 -0
  45. data/lib/migflow/services/migration_dsl_scanner.rb +161 -0
  46. data/lib/migflow/services/migration_summary_builder.rb +43 -0
  47. data/lib/migflow/services/report_generator.rb +76 -0
  48. data/lib/migflow/services/risk_scorer.rb +38 -0
  49. data/lib/migflow/services/schema_builder.rb +25 -0
  50. data/lib/migflow/services/schema_patch_builder.rb +237 -0
  51. data/lib/migflow/services/scoped_migration_warnings.rb +93 -0
  52. data/lib/migflow/services/snapshot_builder.rb +542 -0
  53. data/lib/migflow/services/touched_tables_from_migration.rb +60 -0
  54. data/lib/migflow/version.rb +5 -0
  55. data/lib/migflow.rb +20 -0
  56. data/lib/tasks/migflow.rake +31 -0
  57. data/sig/migflow.rbs +3 -0
  58. metadata +124 -0
@@ -0,0 +1,17 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))u(r);new MutationObserver(r=>{for(const f of r)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function o(r){const f={};return r.integrity&&(f.integrity=r.integrity),r.referrerPolicy&&(f.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?f.credentials="include":r.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(r){if(r.ep)return;r.ep=!0;const f=o(r);fetch(r.href,f)}})();function Cy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var of={exports:{}},to={};var Fm;function Rx(){if(Fm)return to;Fm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function o(u,r,f){var d=null;if(f!==void 0&&(d=""+f),r.key!==void 0&&(d=""+r.key),"key"in r){f={};for(var g in r)g!=="key"&&(f[g]=r[g])}else f=r;return r=f.ref,{$$typeof:n,type:u,key:d,ref:r!==void 0?r:null,props:f}}return to.Fragment=a,to.jsx=o,to.jsxs=o,to}var Jm;function Hx(){return Jm||(Jm=1,of.exports=Rx()),of.exports}var z=Hx(),uf={exports:{}},xt={};var Im;function jx(){if(Im)return xt;Im=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function E(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,T={};function N(C,U,P){this.props=C,this.context=U,this.refs=T,this.updater=P||b}N.prototype.isReactComponent={},N.prototype.setState=function(C,U){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,U,"setState")},N.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function q(){}q.prototype=N.prototype;function w(C,U,P){this.props=C,this.context=U,this.refs=T,this.updater=P||b}var A=w.prototype=new q;A.constructor=w,_(A,N.prototype),A.isPureReactComponent=!0;var Y=Array.isArray;function B(){}var j={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function $(C,U,P){var et=P.ref;return{$$typeof:n,type:C,key:U,ref:et!==void 0?et:null,props:P}}function ot(C,U){return $(C.type,U,C.props)}function k(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function I(C){var U={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(P){return U[P]})}var lt=/\/+/g;function O(C,U){return typeof C=="object"&&C!==null&&C.key!=null?I(""+C.key):U.toString(36)}function G(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(B,B):(C.status="pending",C.then(function(U){C.status==="pending"&&(C.status="fulfilled",C.value=U)},function(U){C.status==="pending"&&(C.status="rejected",C.reason=U)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function M(C,U,P,et,st){var ct=typeof C;(ct==="undefined"||ct==="boolean")&&(C=null);var rt=!1;if(C===null)rt=!0;else switch(ct){case"bigint":case"string":case"number":rt=!0;break;case"object":switch(C.$$typeof){case n:case a:rt=!0;break;case p:return rt=C._init,M(rt(C._payload),U,P,et,st)}}if(rt)return st=st(C),rt=et===""?"."+O(C,0):et,Y(st)?(P="",rt!=null&&(P=rt.replace(lt,"$&/")+"/"),M(st,U,P,"",function(Et){return Et})):st!=null&&(k(st)&&(st=ot(st,P+(st.key==null||C&&C.key===st.key?"":(""+st.key).replace(lt,"$&/")+"/")+rt)),U.push(st)),1;rt=0;var ut=et===""?".":et+":";if(Y(C))for(var ft=0;ft<C.length;ft++)et=C[ft],ct=ut+O(et,ft),rt+=M(et,U,P,ct,st);else if(ft=E(C),typeof ft=="function")for(C=ft.call(C),ft=0;!(et=C.next()).done;)et=et.value,ct=ut+O(et,ft++),rt+=M(et,U,P,ct,st);else if(ct==="object"){if(typeof C.then=="function")return M(G(C),U,P,et,st);throw U=String(C),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return rt}function R(C,U,P){if(C==null)return C;var et=[],st=0;return M(C,et,"","",function(ct){return U.call(P,ct,st++)}),et}function H(C){if(C._status===-1){var U=C._result;U=U(),U.then(function(P){(C._status===0||C._status===-1)&&(C._status=1,C._result=P)},function(P){(C._status===0||C._status===-1)&&(C._status=2,C._result=P)}),C._status===-1&&(C._status=0,C._result=U)}if(C._status===1)return C._result.default;throw C._result}var Q=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},tt={map:R,forEach:function(C,U,P){R(C,function(){U.apply(this,arguments)},P)},count:function(C){var U=0;return R(C,function(){U++}),U},toArray:function(C){return R(C,function(U){return U})||[]},only:function(C){if(!k(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return xt.Activity=v,xt.Children=tt,xt.Component=N,xt.Fragment=o,xt.Profiler=r,xt.PureComponent=w,xt.StrictMode=u,xt.Suspense=m,xt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,xt.__COMPILER_RUNTIME={__proto__:null,c:function(C){return j.H.useMemoCache(C)}},xt.cache=function(C){return function(){return C.apply(null,arguments)}},xt.cacheSignal=function(){return null},xt.cloneElement=function(C,U,P){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var et=_({},C.props),st=C.key;if(U!=null)for(ct in U.key!==void 0&&(st=""+U.key),U)!X.call(U,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&U.ref===void 0||(et[ct]=U[ct]);var ct=arguments.length-2;if(ct===1)et.children=P;else if(1<ct){for(var rt=Array(ct),ut=0;ut<ct;ut++)rt[ut]=arguments[ut+2];et.children=rt}return $(C.type,st,et)},xt.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},xt.createElement=function(C,U,P){var et,st={},ct=null;if(U!=null)for(et in U.key!==void 0&&(ct=""+U.key),U)X.call(U,et)&&et!=="key"&&et!=="__self"&&et!=="__source"&&(st[et]=U[et]);var rt=arguments.length-2;if(rt===1)st.children=P;else if(1<rt){for(var ut=Array(rt),ft=0;ft<rt;ft++)ut[ft]=arguments[ft+2];st.children=ut}if(C&&C.defaultProps)for(et in rt=C.defaultProps,rt)st[et]===void 0&&(st[et]=rt[et]);return $(C,ct,st)},xt.createRef=function(){return{current:null}},xt.forwardRef=function(C){return{$$typeof:g,render:C}},xt.isValidElement=k,xt.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:H}},xt.memo=function(C,U){return{$$typeof:h,type:C,compare:U===void 0?null:U}},xt.startTransition=function(C){var U=j.T,P={};j.T=P;try{var et=C(),st=j.S;st!==null&&st(P,et),typeof et=="object"&&et!==null&&typeof et.then=="function"&&et.then(B,Q)}catch(ct){Q(ct)}finally{U!==null&&P.types!==null&&(U.types=P.types),j.T=U}},xt.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},xt.use=function(C){return j.H.use(C)},xt.useActionState=function(C,U,P){return j.H.useActionState(C,U,P)},xt.useCallback=function(C,U){return j.H.useCallback(C,U)},xt.useContext=function(C){return j.H.useContext(C)},xt.useDebugValue=function(){},xt.useDeferredValue=function(C,U){return j.H.useDeferredValue(C,U)},xt.useEffect=function(C,U){return j.H.useEffect(C,U)},xt.useEffectEvent=function(C){return j.H.useEffectEvent(C)},xt.useId=function(){return j.H.useId()},xt.useImperativeHandle=function(C,U,P){return j.H.useImperativeHandle(C,U,P)},xt.useInsertionEffect=function(C,U){return j.H.useInsertionEffect(C,U)},xt.useLayoutEffect=function(C,U){return j.H.useLayoutEffect(C,U)},xt.useMemo=function(C,U){return j.H.useMemo(C,U)},xt.useOptimistic=function(C,U){return j.H.useOptimistic(C,U)},xt.useReducer=function(C,U,P){return j.H.useReducer(C,U,P)},xt.useRef=function(C){return j.H.useRef(C)},xt.useState=function(C){return j.H.useState(C)},xt.useSyncExternalStore=function(C,U,P){return j.H.useSyncExternalStore(C,U,P)},xt.useTransition=function(){return j.H.useTransition()},xt.version="19.2.4",xt}var Wm;function Eo(){return Wm||(Wm=1,uf.exports=jx()),uf.exports}var J=Eo();const ao=Cy(J);var sf={exports:{}},eo={},rf={exports:{}},cf={};var Pm;function Bx(){return Pm||(Pm=1,(function(n){function a(M,R){var H=M.length;M.push(R);t:for(;0<H;){var Q=H-1>>>1,tt=M[Q];if(0<r(tt,R))M[Q]=R,M[H]=tt,H=Q;else break t}}function o(M){return M.length===0?null:M[0]}function u(M){if(M.length===0)return null;var R=M[0],H=M.pop();if(H!==R){M[0]=H;t:for(var Q=0,tt=M.length,C=tt>>>1;Q<C;){var U=2*(Q+1)-1,P=M[U],et=U+1,st=M[et];if(0>r(P,H))et<tt&&0>r(st,P)?(M[Q]=st,M[et]=H,Q=et):(M[Q]=P,M[U]=H,Q=U);else if(et<tt&&0>r(st,H))M[Q]=st,M[et]=H,Q=et;else break t}}return R}function r(M,R){var H=M.sortIndex-R.sortIndex;return H!==0?H:M.id-R.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,g=d.now();n.unstable_now=function(){return d.now()-g}}var m=[],h=[],p=1,v=null,x=3,E=!1,b=!1,_=!1,T=!1,N=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function A(M){for(var R=o(h);R!==null;){if(R.callback===null)u(h);else if(R.startTime<=M)u(h),R.sortIndex=R.expirationTime,a(m,R);else break;R=o(h)}}function Y(M){if(_=!1,A(M),!b)if(o(m)!==null)b=!0,B||(B=!0,I());else{var R=o(h);R!==null&&G(Y,R.startTime-M)}}var B=!1,j=-1,X=5,$=-1;function ot(){return T?!0:!(n.unstable_now()-$<X)}function k(){if(T=!1,B){var M=n.unstable_now();$=M;var R=!0;try{t:{b=!1,_&&(_=!1,q(j),j=-1),E=!0;var H=x;try{e:{for(A(M),v=o(m);v!==null&&!(v.expirationTime>M&&ot());){var Q=v.callback;if(typeof Q=="function"){v.callback=null,x=v.priorityLevel;var tt=Q(v.expirationTime<=M);if(M=n.unstable_now(),typeof tt=="function"){v.callback=tt,A(M),R=!0;break e}v===o(m)&&u(m),A(M)}else u(m);v=o(m)}if(v!==null)R=!0;else{var C=o(h);C!==null&&G(Y,C.startTime-M),R=!1}}break t}finally{v=null,x=H,E=!1}R=void 0}}finally{R?I():B=!1}}}var I;if(typeof w=="function")I=function(){w(k)};else if(typeof MessageChannel<"u"){var lt=new MessageChannel,O=lt.port2;lt.port1.onmessage=k,I=function(){O.postMessage(null)}}else I=function(){N(k,0)};function G(M,R){j=N(function(){M(n.unstable_now())},R)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(M){switch(x){case 1:case 2:case 3:var R=3;break;default:R=x}var H=x;x=R;try{return M()}finally{x=H}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(M,R){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var H=x;x=M;try{return R()}finally{x=H}},n.unstable_scheduleCallback=function(M,R,H){var Q=n.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?Q+H:Q):H=Q,M){case 1:var tt=-1;break;case 2:tt=250;break;case 5:tt=1073741823;break;case 4:tt=1e4;break;default:tt=5e3}return tt=H+tt,M={id:p++,callback:R,priorityLevel:M,startTime:H,expirationTime:tt,sortIndex:-1},H>Q?(M.sortIndex=H,a(h,M),o(m)===null&&M===o(h)&&(_?(q(j),j=-1):_=!0,G(Y,H-Q))):(M.sortIndex=tt,a(m,M),b||E||(b=!0,B||(B=!0,I()))),M},n.unstable_shouldYield=ot,n.unstable_wrapCallback=function(M){var R=x;return function(){var H=x;x=R;try{return M.apply(this,arguments)}finally{x=H}}}})(cf)),cf}var t0;function Ux(){return t0||(t0=1,rf.exports=Bx()),rf.exports}var ff={exports:{}},ge={};var e0;function qx(){if(e0)return ge;e0=1;var n=Eo();function a(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(a(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},r=Symbol.for("react.portal");function f(m,h,p){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:v==null?null:""+v,children:m,containerInfo:h,implementation:p}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ge.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ge.createPortal=function(m,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return f(m,h,null,p)},ge.flushSync=function(m){var h=d.T,p=u.p;try{if(d.T=null,u.p=2,m)return m()}finally{d.T=h,u.p=p,u.d.f()}},ge.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(m,h))},ge.prefetchDNS=function(m){typeof m=="string"&&u.d.D(m)},ge.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var p=h.as,v=g(p,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,E=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?u.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:E}):p==="script"&&u.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:E,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ge.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=g(h.as,h.crossOrigin);u.d.M(m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(m)},ge.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,v=g(p,h.crossOrigin);u.d.L(m,p,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ge.preloadModule=function(m,h){if(typeof m=="string")if(h){var p=g(h.as,h.crossOrigin);u.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(m)},ge.requestFormReset=function(m){u.d.r(m)},ge.unstable_batchedUpdates=function(m,h){return m(h)},ge.useFormState=function(m,h,p){return d.H.useFormState(m,h,p)},ge.useFormStatus=function(){return d.H.useHostTransitionStatus()},ge.version="19.2.4",ge}var n0;function Ny(){if(n0)return ff.exports;n0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ff.exports=qx(),ff.exports}var i0;function Lx(){if(i0)return eo;i0=1;var n=Ux(),a=Eo(),o=Ny();function u(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)e+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var e=t,i=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(i=e.return),t=e.return;while(t)}return e.tag===3?i:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function m(t){if(f(t)!==t)throw Error(u(188))}function h(t){var e=t.alternate;if(!e){if(e=f(t),e===null)throw Error(u(188));return e!==t?null:t}for(var i=t,l=e;;){var s=i.return;if(s===null)break;var c=s.alternate;if(c===null){if(l=s.return,l!==null){i=l;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===i)return m(s),t;if(c===l)return m(s),e;c=c.sibling}throw Error(u(188))}if(i.return!==l.return)i=s,l=c;else{for(var y=!1,S=s.child;S;){if(S===i){y=!0,i=s,l=c;break}if(S===l){y=!0,l=s,i=c;break}S=S.sibling}if(!y){for(S=c.child;S;){if(S===i){y=!0,i=c,l=s;break}if(S===l){y=!0,l=c,i=s;break}S=S.sibling}if(!y)throw Error(u(189))}}if(i.alternate!==l)throw Error(u(190))}if(i.tag!==3)throw Error(u(188));return i.stateNode.current===i?t:e}function p(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=p(t),e!==null)return e;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),w=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),ot=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=k&&t[k]||t["@@iterator"],typeof t=="function"?t:null)}var lt=Symbol.for("react.client.reference");function O(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===lt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case N:return"Profiler";case T:return"StrictMode";case Y:return"Suspense";case B:return"SuspenseList";case $:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case b:return"Portal";case w:return t.displayName||"Context";case q:return(t._context.displayName||"Context")+".Consumer";case A:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case j:return e=t.displayName||null,e!==null?e:O(t.type)||"Memo";case X:e=t._payload,t=t._init;try{return O(t(e))}catch{}}return null}var G=Array.isArray,M=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},Q=[],tt=-1;function C(t){return{current:t}}function U(t){0>tt||(t.current=Q[tt],Q[tt]=null,tt--)}function P(t,e){tt++,Q[tt]=t.current,t.current=e}var et=C(null),st=C(null),ct=C(null),rt=C(null);function ut(t,e){switch(P(ct,e),P(st,t),P(et,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?vm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=vm(e),t=xm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(et),P(et,t)}function ft(){U(et),U(st),U(ct)}function Et(t){t.memoizedState!==null&&P(rt,t);var e=et.current,i=xm(e,t.type);e!==i&&(P(st,t),P(et,i))}function bt(t){st.current===t&&(U(et),U(st)),rt.current===t&&(U(rt),Jl._currentValue=H)}var yt,vt;function Ct(t){if(yt===void 0)try{throw Error()}catch(i){var e=i.stack.trim().match(/\n( *(at )?)/);yt=e&&e[1]||"",vt=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+yt+t+vt}var Ut=!1;function Ht(t,e){if(!t||Ut)return"";Ut=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var at=function(){throw Error()};if(Object.defineProperty(at.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(at,[])}catch(W){var F=W}Reflect.construct(t,[],at)}else{try{at.call()}catch(W){F=W}t.call(at.prototype)}}else{try{throw Error()}catch(W){F=W}(at=t())&&typeof at.catch=="function"&&at.catch(function(){})}}catch(W){if(W&&F&&typeof W.stack=="string")return[W.stack,F.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),y=c[0],S=c[1];if(y&&S){var D=y.split(`
4
+ `),K=S.split(`
5
+ `);for(s=l=0;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;for(;s<K.length&&!K[s].includes("DetermineComponentFrameRoot");)s++;if(l===D.length||s===K.length)for(l=D.length-1,s=K.length-1;1<=l&&0<=s&&D[l]!==K[s];)s--;for(;1<=l&&0<=s;l--,s--)if(D[l]!==K[s]){if(l!==1||s!==1)do if(l--,s--,0>s||D[l]!==K[s]){var nt=`
6
+ `+D[l].replace(" at new "," at ");return t.displayName&&nt.includes("<anonymous>")&&(nt=nt.replace("<anonymous>",t.displayName)),nt}while(1<=l&&0<=s);break}}}finally{Ut=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?Ct(i):""}function le(t,e){switch(t.tag){case 26:case 27:case 5:return Ct(t.type);case 16:return Ct("Lazy");case 13:return t.child!==e&&e!==null?Ct("Suspense Fallback"):Ct("Suspense");case 19:return Ct("SuspenseList");case 0:case 15:return Ht(t.type,!1);case 11:return Ht(t.type.render,!1);case 1:return Ht(t.type,!0);case 31:return Ct("Activity");default:return""}}function ke(t){try{var e="",i=null;do e+=le(t,i),i=t,t=t.return;while(t);return e}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var Te=Object.prototype.hasOwnProperty,$e=n.unstable_scheduleCallback,yn=n.unstable_cancelCallback,_i=n.unstable_shouldYield,Mi=n.unstable_requestPaint,ue=n.unstable_now,la=n.unstable_getCurrentPriorityLevel,pn=n.unstable_ImmediatePriority,Xn=n.unstable_UserBlockingPriority,Ci=n.unstable_NormalPriority,Qs=n.unstable_LowPriority,oa=n.unstable_IdlePriority,Xs=n.log,Gs=n.unstable_setDisableYieldValue,Ni=null,me=null;function ln(t){if(typeof Xs=="function"&&Gs(t),me&&typeof me.setStrictMode=="function")try{me.setStrictMode(Ni,t)}catch{}}var ye=Math.clz32?Math.clz32:ks,Zs=Math.log,Ks=Math.LN2;function ks(t){return t>>>=0,t===0?32:31-(Zs(t)/Ks|0)|0}var ua=256,sa=262144,ra=4194304;function vn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ca(t,e,i){var l=t.pendingLanes;if(l===0)return 0;var s=0,c=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var S=l&134217727;return S!==0?(l=S&~c,l!==0?s=vn(l):(y&=S,y!==0?s=vn(y):i||(i=S&~t,i!==0&&(s=vn(i))))):(S=l&~c,S!==0?s=vn(S):y!==0?s=vn(y):i||(i=l&~t,i!==0&&(s=vn(i)))),s===0?0:e!==0&&e!==s&&(e&c)===0&&(c=s&-s,i=e&-e,c>=i||c===32&&(i&4194048)!==0)?e:s}function Ti(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function $s(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Do(){var t=ra;return ra<<=1,(ra&62914560)===0&&(ra=4194304),t}function ul(t){for(var e=[],i=0;31>i;i++)e.push(t);return e}function Ai(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Fs(t,e,i,l,s,c){var y=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var S=t.entanglements,D=t.expirationTimes,K=t.hiddenUpdates;for(i=y&~i;0<i;){var nt=31-ye(i),at=1<<nt;S[nt]=0,D[nt]=-1;var F=K[nt];if(F!==null)for(K[nt]=null,nt=0;nt<F.length;nt++){var W=F[nt];W!==null&&(W.lane&=-536870913)}i&=~at}l!==0&&Oo(t,l,0),c!==0&&s===0&&t.tag!==0&&(t.suspendedLanes|=c&~(y&~e))}function Oo(t,e,i){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-ye(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function Ro(t,e){var i=t.entangledLanes|=e;for(t=t.entanglements;i;){var l=31-ye(i),s=1<<l;s&e|t[l]&e&&(t[l]|=e),i&=~s}}function Ho(t,e){var i=e&-e;return i=(i&42)!==0?1:sl(i),(i&(t.suspendedLanes|e))!==0?0:i}function sl(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function rl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function jo(){var t=R.p;return t!==0?t:(t=window.event,t===void 0?32:Qm(t.type))}function Bo(t,e){var i=R.p;try{return R.p=t,e()}finally{R.p=i}}var on=Math.random().toString(36).slice(2),ie="__reactFiber$"+on,he="__reactProps$"+on,xn="__reactContainer$"+on,fa="__reactEvents$"+on,Uo="__reactListeners$"+on,Js="__reactHandles$"+on,qo="__reactResources$"+on,zi="__reactMarker$"+on;function cl(t){delete t[ie],delete t[he],delete t[fa],delete t[Uo],delete t[Js]}function Gn(t){var e=t[ie];if(e)return e;for(var i=t.parentNode;i;){if(e=i[xn]||i[ie]){if(i=e.alternate,e.child!==null||i!==null&&i.child!==null)for(t=Cm(t);t!==null;){if(i=t[ie])return i;t=Cm(t)}return e}t=i,i=t.parentNode}return null}function Zn(t){if(t=t[ie]||t[xn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Kn(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(u(33))}function kn(t){var e=t[qo];return e||(e=t[qo]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function It(t){t[zi]=!0}var Lo=new Set,Yo={};function bn(t,e){$n(t,e),$n(t+"Capture",e)}function $n(t,e){for(Yo[t]=e,t=0;t<e.length;t++)Lo.add(e[t])}var Is=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]*$"),fl={},Vo={};function Ws(t){return Te.call(Vo,t)?!0:Te.call(fl,t)?!1:Is.test(t)?Vo[t]=!0:(fl[t]=!0,!1)}function da(t,e,i){if(Ws(e))if(i===null)t.removeAttribute(e);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+i)}}function ha(t,e,i){if(i===null)t.removeAttribute(e);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+i)}}function Fe(t,e,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(e,i,""+l)}}function ve(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Qo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ps(t,e,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var s=l.get,c=l.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(y){i=""+y,c.call(this,y)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ga(t){if(!t._valueTracker){var e=Qo(t)?"checked":"value";t._valueTracker=Ps(t,e,""+t[e])}}function Xo(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var i=e.getValue(),l="";return t&&(l=Qo(t)?t.checked?"true":"false":t.value),t=l,t!==i?(e.setValue(t),!0):!1}function Di(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var tr=/[\n"\\]/g;function xe(t){return t.replace(tr,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Oi(t,e,i,l,s,c,y,S){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),e!=null?y==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+ve(e)):t.value!==""+ve(e)&&(t.value=""+ve(e)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),e!=null?dl(t,y,ve(e)):i!=null?dl(t,y,ve(i)):l!=null&&t.removeAttribute("value"),s==null&&c!=null&&(t.defaultChecked=!!c),s!=null&&(t.checked=s&&typeof s!="function"&&typeof s!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+ve(S):t.removeAttribute("name")}function Go(t,e,i,l,s,c,y,S){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){ga(t);return}i=i!=null?""+ve(i):"",e=e!=null?""+ve(e):i,S||e===t.value||(t.value=e),t.defaultValue=e}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=S?t.checked:!!l,t.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),ga(t)}function dl(t,e,i){e==="number"&&Di(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Sn(t,e,i,l){if(t=t.options,e){e={};for(var s=0;s<i.length;s++)e["$"+i[s]]=!0;for(i=0;i<t.length;i++)s=e.hasOwnProperty("$"+t[i].value),t[i].selected!==s&&(t[i].selected=s),s&&l&&(t[i].defaultSelected=!0)}else{for(i=""+ve(i),e=null,s=0;s<t.length;s++){if(t[s].value===i){t[s].selected=!0,l&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function hd(t,e,i){if(e!=null&&(e=""+ve(e),e!==t.value&&(t.value=e),i==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=i!=null?""+ve(i):""}function gd(t,e,i,l){if(e==null){if(l!=null){if(i!=null)throw Error(u(92));if(G(l)){if(1<l.length)throw Error(u(93));l=l[0]}i=l}i==null&&(i=""),e=i}i=ve(e),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),ga(t)}function ma(t,e){if(e){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=e;return}}t.textContent=e}var Tv=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 md(t,e,i){var l=e.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,i):typeof i!="number"||i===0||Tv.has(e)?e==="float"?t.cssFloat=i:t[e]=(""+i).trim():t[e]=i+"px"}function yd(t,e,i){if(e!=null&&typeof e!="object")throw Error(u(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var s in e)l=e[s],e.hasOwnProperty(s)&&i[s]!==l&&md(t,s,l)}else for(var c in e)e.hasOwnProperty(c)&&md(t,c,e[c])}function er(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Av=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"],["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"]]),zv=/^[\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 Zo(t){return zv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function En(){}var nr=null;function ir(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ya=null,pa=null;function pd(t){var e=Zn(t);if(e&&(t=e.stateNode)){var i=t[he]||null;t:switch(t=e.stateNode,e.type){case"input":if(Oi(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),e=i.name,i.type==="radio"&&e!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+xe(""+e)+'"][type="radio"]'),e=0;e<i.length;e++){var l=i[e];if(l!==t&&l.form===t.form){var s=l[he]||null;if(!s)throw Error(u(90));Oi(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(e=0;e<i.length;e++)l=i[e],l.form===t.form&&Xo(l)}break t;case"textarea":hd(t,i.value,i.defaultValue);break t;case"select":e=i.value,e!=null&&Sn(t,!!i.multiple,e,!1)}}}var ar=!1;function vd(t,e,i){if(ar)return t(e,i);ar=!0;try{var l=t(e);return l}finally{if(ar=!1,(ya!==null||pa!==null)&&(Ou(),ya&&(e=ya,t=pa,pa=ya=null,pd(e),t)))for(e=0;e<t.length;e++)pd(t[e])}}function hl(t,e){var i=t.stateNode;if(i===null)return null;var l=i[he]||null;if(l===null)return null;i=l[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(u(231,e,typeof i));return i}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lr=!1;if(wn)try{var gl={};Object.defineProperty(gl,"passive",{get:function(){lr=!0}}),window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch{lr=!1}var Fn=null,or=null,Ko=null;function xd(){if(Ko)return Ko;var t,e=or,i=e.length,l,s="value"in Fn?Fn.value:Fn.textContent,c=s.length;for(t=0;t<i&&e[t]===s[t];t++);var y=i-t;for(l=1;l<=y&&e[i-l]===s[c-l];l++);return Ko=s.slice(t,1<l?1-l:void 0)}function ko(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function $o(){return!0}function bd(){return!1}function be(t){function e(i,l,s,c,y){this._reactName=i,this._targetInst=s,this.type=l,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(i=t[S],this[S]=i?i(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?$o:bd,this.isPropagationStopped=bd,this}return v(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),e}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fo=be(Ri),ml=v({},Ri,{view:0,detail:0}),Dv=be(ml),ur,sr,yl,Jo=v({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==yl&&(yl&&t.type==="mousemove"?(ur=t.screenX-yl.screenX,sr=t.screenY-yl.screenY):sr=ur=0,yl=t),ur)},movementY:function(t){return"movementY"in t?t.movementY:sr}}),Sd=be(Jo),Ov=v({},Jo,{dataTransfer:0}),Rv=be(Ov),Hv=v({},ml,{relatedTarget:0}),rr=be(Hv),jv=v({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),Bv=be(jv),Uv=v({},Ri,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qv=be(Uv),Lv=v({},Ri,{data:0}),Ed=be(Lv),Yv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vv={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"},Qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xv(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Qv[t])?!!e[t]:!1}function cr(){return Xv}var Gv=v({},ml,{key:function(t){if(t.key){var e=Yv[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ko(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Vv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cr,charCode:function(t){return t.type==="keypress"?ko(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ko(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Zv=be(Gv),Kv=v({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wd=be(Kv),kv=v({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cr}),$v=be(kv),Fv=v({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jv=be(Fv),Iv=v({},Jo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Wv=be(Iv),Pv=v({},Ri,{newState:0,oldState:0}),t1=be(Pv),e1=[9,13,27,32],fr=wn&&"CompositionEvent"in window,pl=null;wn&&"documentMode"in document&&(pl=document.documentMode);var n1=wn&&"TextEvent"in window&&!pl,_d=wn&&(!fr||pl&&8<pl&&11>=pl),Md=" ",Cd=!1;function Nd(t,e){switch(t){case"keyup":return e1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Td(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var va=!1;function i1(t,e){switch(t){case"compositionend":return Td(e);case"keypress":return e.which!==32?null:(Cd=!0,Md);case"textInput":return t=e.data,t===Md&&Cd?null:t;default:return null}}function a1(t,e){if(va)return t==="compositionend"||!fr&&Nd(t,e)?(t=xd(),Ko=or=Fn=null,va=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return _d&&e.locale!=="ko"?null:e.data;default:return null}}var l1={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 Ad(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!l1[t.type]:e==="textarea"}function zd(t,e,i,l){ya?pa?pa.push(l):pa=[l]:ya=l,e=Lu(e,"onChange"),0<e.length&&(i=new Fo("onChange","change",null,i,l),t.push({event:i,listeners:e}))}var vl=null,xl=null;function o1(t){dm(t,0)}function Io(t){var e=Kn(t);if(Xo(e))return t}function Dd(t,e){if(t==="change")return e}var Od=!1;if(wn){var dr;if(wn){var hr="oninput"in document;if(!hr){var Rd=document.createElement("div");Rd.setAttribute("oninput","return;"),hr=typeof Rd.oninput=="function"}dr=hr}else dr=!1;Od=dr&&(!document.documentMode||9<document.documentMode)}function Hd(){vl&&(vl.detachEvent("onpropertychange",jd),xl=vl=null)}function jd(t){if(t.propertyName==="value"&&Io(xl)){var e=[];zd(e,xl,t,ir(t)),vd(o1,e)}}function u1(t,e,i){t==="focusin"?(Hd(),vl=e,xl=i,vl.attachEvent("onpropertychange",jd)):t==="focusout"&&Hd()}function s1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Io(xl)}function r1(t,e){if(t==="click")return Io(e)}function c1(t,e){if(t==="input"||t==="change")return Io(e)}function f1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ae=typeof Object.is=="function"?Object.is:f1;function bl(t,e){if(Ae(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var i=Object.keys(t),l=Object.keys(e);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var s=i[l];if(!Te.call(e,s)||!Ae(t[s],e[s]))return!1}return!0}function Bd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ud(t,e){var i=Bd(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=e&&l>=e)return{node:i,offset:e-t};t=l}t:{for(;i;){if(i.nextSibling){i=i.nextSibling;break t}i=i.parentNode}i=void 0}i=Bd(i)}}function qd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?qd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ld(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Di(t.document);e instanceof t.HTMLIFrameElement;){try{var i=typeof e.contentWindow.location.href=="string"}catch{i=!1}if(i)t=e.contentWindow;else break;e=Di(t.document)}return e}function gr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var d1=wn&&"documentMode"in document&&11>=document.documentMode,xa=null,mr=null,Sl=null,yr=!1;function Yd(t,e,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yr||xa==null||xa!==Di(l)||(l=xa,"selectionStart"in l&&gr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Sl&&bl(Sl,l)||(Sl=l,l=Lu(mr,"onSelect"),0<l.length&&(e=new Fo("onSelect","select",null,e,i),t.push({event:e,listeners:l}),e.target=xa)))}function Hi(t,e){var i={};return i[t.toLowerCase()]=e.toLowerCase(),i["Webkit"+t]="webkit"+e,i["Moz"+t]="moz"+e,i}var ba={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},pr={},Vd={};wn&&(Vd=document.createElement("div").style,"AnimationEvent"in window||(delete ba.animationend.animation,delete ba.animationiteration.animation,delete ba.animationstart.animation),"TransitionEvent"in window||delete ba.transitionend.transition);function ji(t){if(pr[t])return pr[t];if(!ba[t])return t;var e=ba[t],i;for(i in e)if(e.hasOwnProperty(i)&&i in Vd)return pr[t]=e[i];return t}var Qd=ji("animationend"),Xd=ji("animationiteration"),Gd=ji("animationstart"),h1=ji("transitionrun"),g1=ji("transitionstart"),m1=ji("transitioncancel"),Zd=ji("transitionend"),Kd=new Map,vr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");vr.push("scrollEnd");function Je(t,e){Kd.set(t,e),bn(e,[t])}var Wo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},qe=[],Sa=0,xr=0;function Po(){for(var t=Sa,e=xr=Sa=0;e<t;){var i=qe[e];qe[e++]=null;var l=qe[e];qe[e++]=null;var s=qe[e];qe[e++]=null;var c=qe[e];if(qe[e++]=null,l!==null&&s!==null){var y=l.pending;y===null?s.next=s:(s.next=y.next,y.next=s),l.pending=s}c!==0&&kd(i,s,c)}}function tu(t,e,i,l){qe[Sa++]=t,qe[Sa++]=e,qe[Sa++]=i,qe[Sa++]=l,xr|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function br(t,e,i,l){return tu(t,e,i,l),eu(t)}function Bi(t,e){return tu(t,null,null,e),eu(t)}function kd(t,e,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var s=!1,c=t.return;c!==null;)c.childLanes|=i,l=c.alternate,l!==null&&(l.childLanes|=i),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(s=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,s&&e!==null&&(s=31-ye(i),t=c.hiddenUpdates,l=t[s],l===null?t[s]=[e]:l.push(e),e.lane=i|536870912),c):null}function eu(t){if(50<Xl)throw Xl=0,Ac=null,Error(u(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ea={};function y1(t,e,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ze(t,e,i,l){return new y1(t,e,i,l)}function Sr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _n(t,e){var i=t.alternate;return i===null?(i=ze(t.tag,e,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=e,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,e=t.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function $d(t,e){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function nu(t,e,i,l,s,c){var y=0;if(l=t,typeof t=="function")Sr(t)&&(y=1);else if(typeof t=="string")y=Sx(t,i,et.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case $:return t=ze(31,i,e,s),t.elementType=$,t.lanes=c,t;case _:return Ui(i.children,s,c,e);case T:y=8,s|=24;break;case N:return t=ze(12,i,e,s|2),t.elementType=N,t.lanes=c,t;case Y:return t=ze(13,i,e,s),t.elementType=Y,t.lanes=c,t;case B:return t=ze(19,i,e,s),t.elementType=B,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case w:y=10;break t;case q:y=9;break t;case A:y=11;break t;case j:y=14;break t;case X:y=16,l=null;break t}y=29,i=Error(u(130,t===null?"null":typeof t,"")),l=null}return e=ze(y,i,e,s),e.elementType=t,e.type=l,e.lanes=c,e}function Ui(t,e,i,l){return t=ze(7,t,l,e),t.lanes=i,t}function Er(t,e,i){return t=ze(6,t,null,e),t.lanes=i,t}function Fd(t){var e=ze(18,null,null,0);return e.stateNode=t,e}function wr(t,e,i){return e=ze(4,t.children!==null?t.children:[],t.key,e),e.lanes=i,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Jd=new WeakMap;function Le(t,e){if(typeof t=="object"&&t!==null){var i=Jd.get(t);return i!==void 0?i:(e={value:t,source:e,stack:ke(e)},Jd.set(t,e),e)}return{value:t,source:e,stack:ke(e)}}var wa=[],_a=0,iu=null,El=0,Ye=[],Ve=0,Jn=null,un=1,sn="";function Mn(t,e){wa[_a++]=El,wa[_a++]=iu,iu=t,El=e}function Id(t,e,i){Ye[Ve++]=un,Ye[Ve++]=sn,Ye[Ve++]=Jn,Jn=t;var l=un;t=sn;var s=32-ye(l)-1;l&=~(1<<s),i+=1;var c=32-ye(e)+s;if(30<c){var y=s-s%5;c=(l&(1<<y)-1).toString(32),l>>=y,s-=y,un=1<<32-ye(e)+s|i<<s|l,sn=c+t}else un=1<<c|i<<s|l,sn=t}function _r(t){t.return!==null&&(Mn(t,1),Id(t,1,0))}function Mr(t){for(;t===iu;)iu=wa[--_a],wa[_a]=null,El=wa[--_a],wa[_a]=null;for(;t===Jn;)Jn=Ye[--Ve],Ye[Ve]=null,sn=Ye[--Ve],Ye[Ve]=null,un=Ye[--Ve],Ye[Ve]=null}function Wd(t,e){Ye[Ve++]=un,Ye[Ve++]=sn,Ye[Ve++]=Jn,un=e.id,sn=e.overflow,Jn=t}var se=null,Qt=null,At=!1,In=null,Qe=!1,Cr=Error(u(519));function Wn(t){var e=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wl(Le(e,t)),Cr}function Pd(t){var e=t.stateNode,i=t.type,l=t.memoizedProps;switch(e[ie]=t,e[he]=l,i){case"dialog":Mt("cancel",e),Mt("close",e);break;case"iframe":case"object":case"embed":Mt("load",e);break;case"video":case"audio":for(i=0;i<Zl.length;i++)Mt(Zl[i],e);break;case"source":Mt("error",e);break;case"img":case"image":case"link":Mt("error",e),Mt("load",e);break;case"details":Mt("toggle",e);break;case"input":Mt("invalid",e),Go(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Mt("invalid",e);break;case"textarea":Mt("invalid",e),gd(e,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||e.textContent===""+i||l.suppressHydrationWarning===!0||ym(e.textContent,i)?(l.popover!=null&&(Mt("beforetoggle",e),Mt("toggle",e)),l.onScroll!=null&&Mt("scroll",e),l.onScrollEnd!=null&&Mt("scrollend",e),l.onClick!=null&&(e.onclick=En),e=!0):e=!1,e||Wn(t,!0)}function th(t){for(se=t.return;se;)switch(se.tag){case 5:case 31:case 13:Qe=!1;return;case 27:case 3:Qe=!0;return;default:se=se.return}}function Ma(t){if(t!==se)return!1;if(!At)return th(t),At=!0,!1;var e=t.tag,i;if((i=e!==3&&e!==27)&&((i=e===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Gc(t.type,t.memoizedProps)),i=!i),i&&Qt&&Wn(t),th(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(317));Qt=Mm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(317));Qt=Mm(t)}else e===27?(e=Qt,di(t.type)?(t=Fc,Fc=null,Qt=t):Qt=e):Qt=se?Ge(t.stateNode.nextSibling):null;return!0}function qi(){Qt=se=null,At=!1}function Nr(){var t=In;return t!==null&&(_e===null?_e=t:_e.push.apply(_e,t),In=null),t}function wl(t){In===null?In=[t]:In.push(t)}var Tr=C(null),Li=null,Cn=null;function Pn(t,e,i){P(Tr,e._currentValue),e._currentValue=i}function Nn(t){t._currentValue=Tr.current,U(Tr)}function Ar(t,e,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===i)break;t=t.return}}function zr(t,e,i,l){var s=t.child;for(s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){var y=s.child;c=c.firstContext;t:for(;c!==null;){var S=c;c=s;for(var D=0;D<e.length;D++)if(S.context===e[D]){c.lanes|=i,S=c.alternate,S!==null&&(S.lanes|=i),Ar(c.return,i,t),l||(y=null);break t}c=S.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(u(341));y.lanes|=i,c=y.alternate,c!==null&&(c.lanes|=i),Ar(y,i,t),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===t){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function Ca(t,e,i,l){t=null;for(var s=e,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(u(387));if(y=y.memoizedProps,y!==null){var S=s.type;Ae(s.pendingProps.value,y.value)||(t!==null?t.push(S):t=[S])}}else if(s===rt.current){if(y=s.alternate,y===null)throw Error(u(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(t!==null?t.push(Jl):t=[Jl])}s=s.return}t!==null&&zr(e,t,i,l),e.flags|=262144}function au(t){for(t=t.firstContext;t!==null;){if(!Ae(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Yi(t){Li=t,Cn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function re(t){return eh(Li,t)}function lu(t,e){return Li===null&&Yi(t),eh(t,e)}function eh(t,e){var i=e._currentValue;if(e={context:e,memoizedValue:i,next:null},Cn===null){if(t===null)throw Error(u(308));Cn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Cn=Cn.next=e;return i}var p1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(i){return i()})}},v1=n.unstable_scheduleCallback,x1=n.unstable_NormalPriority,Wt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dr(){return{controller:new p1,data:new Map,refCount:0}}function _l(t){t.refCount--,t.refCount===0&&v1(x1,function(){t.controller.abort()})}var Ml=null,Or=0,Na=0,Ta=null;function b1(t,e){if(Ml===null){var i=Ml=[];Or=0,Na=jc(),Ta={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Or++,e.then(nh,nh),e}function nh(){if(--Or===0&&Ml!==null){Ta!==null&&(Ta.status="fulfilled");var t=Ml;Ml=null,Na=0,Ta=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function S1(t,e){var i=[],l={status:"pending",value:null,reason:null,then:function(s){i.push(s)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var s=0;s<i.length;s++)(0,i[s])(e)},function(s){for(l.status="rejected",l.reason=s,s=0;s<i.length;s++)(0,i[s])(void 0)}),l}var ih=M.S;M.S=function(t,e){Yg=ue(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&b1(t,e),ih!==null&&ih(t,e)};var Vi=C(null);function Rr(){var t=Vi.current;return t!==null?t:Vt.pooledCache}function ou(t,e){e===null?P(Vi,Vi.current):P(Vi,e.pool)}function ah(){var t=Rr();return t===null?null:{parent:Wt._currentValue,pool:t}}var Aa=Error(u(460)),Hr=Error(u(474)),uu=Error(u(542)),su={then:function(){}};function lh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function oh(t,e,i){switch(i=t[i],i===void 0?t.push(e):i!==e&&(e.then(En,En),e=i),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,sh(t),t;default:if(typeof e.status=="string")e.then(En,En);else{if(t=Vt,t!==null&&100<t.shellSuspendCounter)throw Error(u(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var s=e;s.status="fulfilled",s.value=l}},function(l){if(e.status==="pending"){var s=e;s.status="rejected",s.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,sh(t),t}throw Xi=e,Aa}}function Qi(t){try{var e=t._init;return e(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Xi=i,Aa):i}}var Xi=null;function uh(){if(Xi===null)throw Error(u(459));var t=Xi;return Xi=null,t}function sh(t){if(t===Aa||t===uu)throw Error(u(483))}var za=null,Cl=0;function ru(t){var e=Cl;return Cl+=1,za===null&&(za=[]),oh(za,t,e)}function Nl(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function cu(t,e){throw e.$$typeof===x?Error(u(525)):(t=Object.prototype.toString.call(e),Error(u(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function rh(t){function e(V,L){if(t){var Z=V.deletions;Z===null?(V.deletions=[L],V.flags|=16):Z.push(L)}}function i(V,L){if(!t)return null;for(;L!==null;)e(V,L),L=L.sibling;return null}function l(V){for(var L=new Map;V!==null;)V.key!==null?L.set(V.key,V):L.set(V.index,V),V=V.sibling;return L}function s(V,L){return V=_n(V,L),V.index=0,V.sibling=null,V}function c(V,L,Z){return V.index=Z,t?(Z=V.alternate,Z!==null?(Z=Z.index,Z<L?(V.flags|=67108866,L):Z):(V.flags|=67108866,L)):(V.flags|=1048576,L)}function y(V){return t&&V.alternate===null&&(V.flags|=67108866),V}function S(V,L,Z,it){return L===null||L.tag!==6?(L=Er(Z,V.mode,it),L.return=V,L):(L=s(L,Z),L.return=V,L)}function D(V,L,Z,it){var mt=Z.type;return mt===_?nt(V,L,Z.props.children,it,Z.key):L!==null&&(L.elementType===mt||typeof mt=="object"&&mt!==null&&mt.$$typeof===X&&Qi(mt)===L.type)?(L=s(L,Z.props),Nl(L,Z),L.return=V,L):(L=nu(Z.type,Z.key,Z.props,null,V.mode,it),Nl(L,Z),L.return=V,L)}function K(V,L,Z,it){return L===null||L.tag!==4||L.stateNode.containerInfo!==Z.containerInfo||L.stateNode.implementation!==Z.implementation?(L=wr(Z,V.mode,it),L.return=V,L):(L=s(L,Z.children||[]),L.return=V,L)}function nt(V,L,Z,it,mt){return L===null||L.tag!==7?(L=Ui(Z,V.mode,it,mt),L.return=V,L):(L=s(L,Z),L.return=V,L)}function at(V,L,Z){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Er(""+L,V.mode,Z),L.return=V,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return Z=nu(L.type,L.key,L.props,null,V.mode,Z),Nl(Z,L),Z.return=V,Z;case b:return L=wr(L,V.mode,Z),L.return=V,L;case X:return L=Qi(L),at(V,L,Z)}if(G(L)||I(L))return L=Ui(L,V.mode,Z,null),L.return=V,L;if(typeof L.then=="function")return at(V,ru(L),Z);if(L.$$typeof===w)return at(V,lu(V,L),Z);cu(V,L)}return null}function F(V,L,Z,it){var mt=L!==null?L.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return mt!==null?null:S(V,L,""+Z,it);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case E:return Z.key===mt?D(V,L,Z,it):null;case b:return Z.key===mt?K(V,L,Z,it):null;case X:return Z=Qi(Z),F(V,L,Z,it)}if(G(Z)||I(Z))return mt!==null?null:nt(V,L,Z,it,null);if(typeof Z.then=="function")return F(V,L,ru(Z),it);if(Z.$$typeof===w)return F(V,L,lu(V,Z),it);cu(V,Z)}return null}function W(V,L,Z,it,mt){if(typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint")return V=V.get(Z)||null,S(L,V,""+it,mt);if(typeof it=="object"&&it!==null){switch(it.$$typeof){case E:return V=V.get(it.key===null?Z:it.key)||null,D(L,V,it,mt);case b:return V=V.get(it.key===null?Z:it.key)||null,K(L,V,it,mt);case X:return it=Qi(it),W(V,L,Z,it,mt)}if(G(it)||I(it))return V=V.get(Z)||null,nt(L,V,it,mt,null);if(typeof it.then=="function")return W(V,L,Z,ru(it),mt);if(it.$$typeof===w)return W(V,L,Z,lu(L,it),mt);cu(L,it)}return null}function dt(V,L,Z,it){for(var mt=null,Dt=null,ht=L,wt=L=0,Tt=null;ht!==null&&wt<Z.length;wt++){ht.index>wt?(Tt=ht,ht=null):Tt=ht.sibling;var Ot=F(V,ht,Z[wt],it);if(Ot===null){ht===null&&(ht=Tt);break}t&&ht&&Ot.alternate===null&&e(V,ht),L=c(Ot,L,wt),Dt===null?mt=Ot:Dt.sibling=Ot,Dt=Ot,ht=Tt}if(wt===Z.length)return i(V,ht),At&&Mn(V,wt),mt;if(ht===null){for(;wt<Z.length;wt++)ht=at(V,Z[wt],it),ht!==null&&(L=c(ht,L,wt),Dt===null?mt=ht:Dt.sibling=ht,Dt=ht);return At&&Mn(V,wt),mt}for(ht=l(ht);wt<Z.length;wt++)Tt=W(ht,V,wt,Z[wt],it),Tt!==null&&(t&&Tt.alternate!==null&&ht.delete(Tt.key===null?wt:Tt.key),L=c(Tt,L,wt),Dt===null?mt=Tt:Dt.sibling=Tt,Dt=Tt);return t&&ht.forEach(function(pi){return e(V,pi)}),At&&Mn(V,wt),mt}function pt(V,L,Z,it){if(Z==null)throw Error(u(151));for(var mt=null,Dt=null,ht=L,wt=L=0,Tt=null,Ot=Z.next();ht!==null&&!Ot.done;wt++,Ot=Z.next()){ht.index>wt?(Tt=ht,ht=null):Tt=ht.sibling;var pi=F(V,ht,Ot.value,it);if(pi===null){ht===null&&(ht=Tt);break}t&&ht&&pi.alternate===null&&e(V,ht),L=c(pi,L,wt),Dt===null?mt=pi:Dt.sibling=pi,Dt=pi,ht=Tt}if(Ot.done)return i(V,ht),At&&Mn(V,wt),mt;if(ht===null){for(;!Ot.done;wt++,Ot=Z.next())Ot=at(V,Ot.value,it),Ot!==null&&(L=c(Ot,L,wt),Dt===null?mt=Ot:Dt.sibling=Ot,Dt=Ot);return At&&Mn(V,wt),mt}for(ht=l(ht);!Ot.done;wt++,Ot=Z.next())Ot=W(ht,V,wt,Ot.value,it),Ot!==null&&(t&&Ot.alternate!==null&&ht.delete(Ot.key===null?wt:Ot.key),L=c(Ot,L,wt),Dt===null?mt=Ot:Dt.sibling=Ot,Dt=Ot);return t&&ht.forEach(function(Ox){return e(V,Ox)}),At&&Mn(V,wt),mt}function Yt(V,L,Z,it){if(typeof Z=="object"&&Z!==null&&Z.type===_&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case E:t:{for(var mt=Z.key;L!==null;){if(L.key===mt){if(mt=Z.type,mt===_){if(L.tag===7){i(V,L.sibling),it=s(L,Z.props.children),it.return=V,V=it;break t}}else if(L.elementType===mt||typeof mt=="object"&&mt!==null&&mt.$$typeof===X&&Qi(mt)===L.type){i(V,L.sibling),it=s(L,Z.props),Nl(it,Z),it.return=V,V=it;break t}i(V,L);break}else e(V,L);L=L.sibling}Z.type===_?(it=Ui(Z.props.children,V.mode,it,Z.key),it.return=V,V=it):(it=nu(Z.type,Z.key,Z.props,null,V.mode,it),Nl(it,Z),it.return=V,V=it)}return y(V);case b:t:{for(mt=Z.key;L!==null;){if(L.key===mt)if(L.tag===4&&L.stateNode.containerInfo===Z.containerInfo&&L.stateNode.implementation===Z.implementation){i(V,L.sibling),it=s(L,Z.children||[]),it.return=V,V=it;break t}else{i(V,L);break}else e(V,L);L=L.sibling}it=wr(Z,V.mode,it),it.return=V,V=it}return y(V);case X:return Z=Qi(Z),Yt(V,L,Z,it)}if(G(Z))return dt(V,L,Z,it);if(I(Z)){if(mt=I(Z),typeof mt!="function")throw Error(u(150));return Z=mt.call(Z),pt(V,L,Z,it)}if(typeof Z.then=="function")return Yt(V,L,ru(Z),it);if(Z.$$typeof===w)return Yt(V,L,lu(V,Z),it);cu(V,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,L!==null&&L.tag===6?(i(V,L.sibling),it=s(L,Z),it.return=V,V=it):(i(V,L),it=Er(Z,V.mode,it),it.return=V,V=it),y(V)):i(V,L)}return function(V,L,Z,it){try{Cl=0;var mt=Yt(V,L,Z,it);return za=null,mt}catch(ht){if(ht===Aa||ht===uu)throw ht;var Dt=ze(29,ht,null,V.mode);return Dt.lanes=it,Dt.return=V,Dt}}}var Gi=rh(!0),ch=rh(!1),ti=!1;function jr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Br(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ei(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ni(t,e,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Rt&2)!==0){var s=l.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),l.pending=e,e=eu(t),kd(t,null,i),e}return tu(t,l,e,i),eu(t)}function Tl(t,e,i){if(e=e.updateQueue,e!==null&&(e=e.shared,(i&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,i|=l,e.lanes=i,Ro(t,i)}}function Ur(t,e){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var s=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var y={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?s=c=y:c=c.next=y,i=i.next}while(i!==null);c===null?s=c=e:c=c.next=e}else s=c=e;i={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=e:t.next=e,i.lastBaseUpdate=e}var qr=!1;function Al(){if(qr){var t=Ta;if(t!==null)throw t}}function zl(t,e,i,l){qr=!1;var s=t.updateQueue;ti=!1;var c=s.firstBaseUpdate,y=s.lastBaseUpdate,S=s.shared.pending;if(S!==null){s.shared.pending=null;var D=S,K=D.next;D.next=null,y===null?c=K:y.next=K,y=D;var nt=t.alternate;nt!==null&&(nt=nt.updateQueue,S=nt.lastBaseUpdate,S!==y&&(S===null?nt.firstBaseUpdate=K:S.next=K,nt.lastBaseUpdate=D))}if(c!==null){var at=s.baseState;y=0,nt=K=D=null,S=c;do{var F=S.lane&-536870913,W=F!==S.lane;if(W?(Nt&F)===F:(l&F)===F){F!==0&&F===Na&&(qr=!0),nt!==null&&(nt=nt.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});t:{var dt=t,pt=S;F=e;var Yt=i;switch(pt.tag){case 1:if(dt=pt.payload,typeof dt=="function"){at=dt.call(Yt,at,F);break t}at=dt;break t;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=pt.payload,F=typeof dt=="function"?dt.call(Yt,at,F):dt,F==null)break t;at=v({},at,F);break t;case 2:ti=!0}}F=S.callback,F!==null&&(t.flags|=64,W&&(t.flags|=8192),W=s.callbacks,W===null?s.callbacks=[F]:W.push(F))}else W={lane:F,tag:S.tag,payload:S.payload,callback:S.callback,next:null},nt===null?(K=nt=W,D=at):nt=nt.next=W,y|=F;if(S=S.next,S===null){if(S=s.shared.pending,S===null)break;W=S,S=W.next,W.next=null,s.lastBaseUpdate=W,s.shared.pending=null}}while(!0);nt===null&&(D=at),s.baseState=D,s.firstBaseUpdate=K,s.lastBaseUpdate=nt,c===null&&(s.shared.lanes=0),ui|=y,t.lanes=y,t.memoizedState=at}}function fh(t,e){if(typeof t!="function")throw Error(u(191,t));t.call(e)}function dh(t,e){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)fh(i[t],e)}var Da=C(null),fu=C(0);function hh(t,e){t=Bn,P(fu,t),P(Da,e),Bn=t|e.baseLanes}function Lr(){P(fu,Bn),P(Da,Da.current)}function Yr(){Bn=fu.current,U(Da),U(fu)}var De=C(null),Xe=null;function ii(t){var e=t.alternate;P(Ft,Ft.current&1),P(De,t),Xe===null&&(e===null||Da.current!==null||e.memoizedState!==null)&&(Xe=t)}function Vr(t){P(Ft,Ft.current),P(De,t),Xe===null&&(Xe=t)}function gh(t){t.tag===22?(P(Ft,Ft.current),P(De,t),Xe===null&&(Xe=t)):ai()}function ai(){P(Ft,Ft.current),P(De,De.current)}function Oe(t){U(De),Xe===t&&(Xe=null),U(Ft)}var Ft=C(0);function du(t){for(var e=t;e!==null;){if(e.tag===13){var i=e.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||kc(i)||$c(i)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Tn=0,St=null,qt=null,Pt=null,hu=!1,Oa=!1,Zi=!1,gu=0,Dl=0,Ra=null,E1=0;function kt(){throw Error(u(321))}function Qr(t,e){if(e===null)return!1;for(var i=0;i<e.length&&i<t.length;i++)if(!Ae(t[i],e[i]))return!1;return!0}function Xr(t,e,i,l,s,c){return Tn=c,St=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,M.H=t===null||t.memoizedState===null?Ih:ac,Zi=!1,c=i(l,s),Zi=!1,Oa&&(c=yh(e,i,l,s)),mh(t),c}function mh(t){M.H=Hl;var e=qt!==null&&qt.next!==null;if(Tn=0,Pt=qt=St=null,hu=!1,Dl=0,Ra=null,e)throw Error(u(300));t===null||te||(t=t.dependencies,t!==null&&au(t)&&(te=!0))}function yh(t,e,i,l){St=t;var s=0;do{if(Oa&&(Ra=null),Dl=0,Oa=!1,25<=s)throw Error(u(301));if(s+=1,Pt=qt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=Wh,c=e(i,l)}while(Oa);return c}function w1(){var t=M.H,e=t.useState()[0];return e=typeof e.then=="function"?Ol(e):e,t=t.useState()[0],(qt!==null?qt.memoizedState:null)!==t&&(St.flags|=1024),e}function Gr(){var t=gu!==0;return gu=0,t}function Zr(t,e,i){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i}function Kr(t){if(hu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}hu=!1}Tn=0,Pt=qt=St=null,Oa=!1,Dl=gu=0,Ra=null}function pe(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?St.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function Jt(){if(qt===null){var t=St.alternate;t=t!==null?t.memoizedState:null}else t=qt.next;var e=Pt===null?St.memoizedState:Pt.next;if(e!==null)Pt=e,qt=t;else{if(t===null)throw St.alternate===null?Error(u(467)):Error(u(310));qt=t,t={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Pt===null?St.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ol(t){var e=Dl;return Dl+=1,Ra===null&&(Ra=[]),t=oh(Ra,t,e),e=St,(Pt===null?e.memoizedState:Pt.next)===null&&(e=e.alternate,M.H=e===null||e.memoizedState===null?Ih:ac),t}function yu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ol(t);if(t.$$typeof===w)return re(t)}throw Error(u(438,String(t)))}function kr(t){var e=null,i=St.updateQueue;if(i!==null&&(e=i.memoCache),e==null){var l=St.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(s){return s.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),i===null&&(i=mu(),St.updateQueue=i),i.memoCache=e,i=e.data[e.index],i===void 0)for(i=e.data[e.index]=Array(t),l=0;l<t;l++)i[l]=ot;return e.index++,i}function An(t,e){return typeof e=="function"?e(t):e}function pu(t){var e=Jt();return $r(e,qt,t)}function $r(t,e,i){var l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=i;var s=t.baseQueue,c=l.pending;if(c!==null){if(s!==null){var y=s.next;s.next=c.next,c.next=y}e.baseQueue=s=c,l.pending=null}if(c=t.baseState,s===null)t.memoizedState=c;else{e=s.next;var S=y=null,D=null,K=e,nt=!1;do{var at=K.lane&-536870913;if(at!==K.lane?(Nt&at)===at:(Tn&at)===at){var F=K.revertLane;if(F===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),at===Na&&(nt=!0);else if((Tn&F)===F){K=K.next,F===Na&&(nt=!0);continue}else at={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},D===null?(S=D=at,y=c):D=D.next=at,St.lanes|=F,ui|=F;at=K.action,Zi&&i(c,at),c=K.hasEagerState?K.eagerState:i(c,at)}else F={lane:at,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},D===null?(S=D=F,y=c):D=D.next=F,St.lanes|=at,ui|=at;K=K.next}while(K!==null&&K!==e);if(D===null?y=c:D.next=S,!Ae(c,t.memoizedState)&&(te=!0,nt&&(i=Ta,i!==null)))throw i;t.memoizedState=c,t.baseState=y,t.baseQueue=D,l.lastRenderedState=c}return s===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Fr(t){var e=Jt(),i=e.queue;if(i===null)throw Error(u(311));i.lastRenderedReducer=t;var l=i.dispatch,s=i.pending,c=e.memoizedState;if(s!==null){i.pending=null;var y=s=s.next;do c=t(c,y.action),y=y.next;while(y!==s);Ae(c,e.memoizedState)||(te=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),i.lastRenderedState=c}return[c,l]}function ph(t,e,i){var l=St,s=Jt(),c=At;if(c){if(i===void 0)throw Error(u(407));i=i()}else i=e();var y=!Ae((qt||s).memoizedState,i);if(y&&(s.memoizedState=i,te=!0),s=s.queue,Wr(bh.bind(null,l,s,t),[t]),s.getSnapshot!==e||y||Pt!==null&&Pt.memoizedState.tag&1){if(l.flags|=2048,Ha(9,{destroy:void 0},xh.bind(null,l,s,i,e),null),Vt===null)throw Error(u(349));c||(Tn&127)!==0||vh(l,e,i)}return i}function vh(t,e,i){t.flags|=16384,t={getSnapshot:e,value:i},e=St.updateQueue,e===null?(e=mu(),St.updateQueue=e,e.stores=[t]):(i=e.stores,i===null?e.stores=[t]:i.push(t))}function xh(t,e,i,l){e.value=i,e.getSnapshot=l,Sh(e)&&Eh(t)}function bh(t,e,i){return i(function(){Sh(e)&&Eh(t)})}function Sh(t){var e=t.getSnapshot;t=t.value;try{var i=e();return!Ae(t,i)}catch{return!0}}function Eh(t){var e=Bi(t,2);e!==null&&Me(e,t,2)}function Jr(t){var e=pe();if(typeof t=="function"){var i=t;if(t=i(),Zi){ln(!0);try{i()}finally{ln(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:t},e}function wh(t,e,i,l){return t.baseState=i,$r(t,qt,typeof l=="function"?l:An)}function _1(t,e,i,l,s){if(bu(t))throw Error(u(485));if(t=e.action,t!==null){var c={payload:s,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};M.T!==null?i(!0):c.isTransition=!1,l(c),i=e.pending,i===null?(c.next=e.pending=c,_h(e,c)):(c.next=i.next,e.pending=i.next=c)}}function _h(t,e){var i=e.action,l=e.payload,s=t.state;if(e.isTransition){var c=M.T,y={};M.T=y;try{var S=i(s,l),D=M.S;D!==null&&D(y,S),Mh(t,e,S)}catch(K){Ir(t,e,K)}finally{c!==null&&y.types!==null&&(c.types=y.types),M.T=c}}else try{c=i(s,l),Mh(t,e,c)}catch(K){Ir(t,e,K)}}function Mh(t,e,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Ch(t,e,l)},function(l){return Ir(t,e,l)}):Ch(t,e,i)}function Ch(t,e,i){e.status="fulfilled",e.value=i,Nh(e),t.state=i,e=t.pending,e!==null&&(i=e.next,i===e?t.pending=null:(i=i.next,e.next=i,_h(t,i)))}function Ir(t,e,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=i,Nh(e),e=e.next;while(e!==l)}t.action=null}function Nh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Th(t,e){return e}function Ah(t,e){if(At){var i=Vt.formState;if(i!==null){t:{var l=St;if(At){if(Qt){e:{for(var s=Qt,c=Qe;s.nodeType!==8;){if(!c){s=null;break e}if(s=Ge(s.nextSibling),s===null){s=null;break e}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Qt=Ge(s.nextSibling),l=s.data==="F!";break t}}Wn(l)}l=!1}l&&(e=i[0])}}return i=pe(),i.memoizedState=i.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:e},i.queue=l,i=$h.bind(null,St,l),l.dispatch=i,l=Jr(!1),c=ic.bind(null,St,!1,l.queue),l=pe(),s={state:e,dispatch:null,action:t,pending:null},l.queue=s,i=_1.bind(null,St,s,c,i),s.dispatch=i,l.memoizedState=t,[e,i,!1]}function zh(t){var e=Jt();return Dh(e,qt,t)}function Dh(t,e,i){if(e=$r(t,e,Th)[0],t=pu(An)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=Ol(e)}catch(y){throw y===Aa?uu:y}else l=e;e=Jt();var s=e.queue,c=s.dispatch;return i!==e.memoizedState&&(St.flags|=2048,Ha(9,{destroy:void 0},M1.bind(null,s,i),null)),[l,c,t]}function M1(t,e){t.action=e}function Oh(t){var e=Jt(),i=qt;if(i!==null)return Dh(e,i,t);Jt(),e=e.memoizedState,i=Jt();var l=i.queue.dispatch;return i.memoizedState=t,[e,l,!1]}function Ha(t,e,i,l){return t={tag:t,create:i,deps:l,inst:e,next:null},e=St.updateQueue,e===null&&(e=mu(),St.updateQueue=e),i=e.lastEffect,i===null?e.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,e.lastEffect=t),t}function Rh(){return Jt().memoizedState}function vu(t,e,i,l){var s=pe();St.flags|=t,s.memoizedState=Ha(1|e,{destroy:void 0},i,l===void 0?null:l)}function xu(t,e,i,l){var s=Jt();l=l===void 0?null:l;var c=s.memoizedState.inst;qt!==null&&l!==null&&Qr(l,qt.memoizedState.deps)?s.memoizedState=Ha(e,c,i,l):(St.flags|=t,s.memoizedState=Ha(1|e,c,i,l))}function Hh(t,e){vu(8390656,8,t,e)}function Wr(t,e){xu(2048,8,t,e)}function C1(t){St.flags|=4;var e=St.updateQueue;if(e===null)e=mu(),St.updateQueue=e,e.events=[t];else{var i=e.events;i===null?e.events=[t]:i.push(t)}}function jh(t){var e=Jt().memoizedState;return C1({ref:e,nextImpl:t}),function(){if((Rt&2)!==0)throw Error(u(440));return e.impl.apply(void 0,arguments)}}function Bh(t,e){return xu(4,2,t,e)}function Uh(t,e){return xu(4,4,t,e)}function qh(t,e){if(typeof e=="function"){t=t();var i=e(t);return function(){typeof i=="function"?i():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Lh(t,e,i){i=i!=null?i.concat([t]):null,xu(4,4,qh.bind(null,e,t),i)}function Pr(){}function Yh(t,e){var i=Jt();e=e===void 0?null:e;var l=i.memoizedState;return e!==null&&Qr(e,l[1])?l[0]:(i.memoizedState=[t,e],t)}function Vh(t,e){var i=Jt();e=e===void 0?null:e;var l=i.memoizedState;if(e!==null&&Qr(e,l[1]))return l[0];if(l=t(),Zi){ln(!0);try{t()}finally{ln(!1)}}return i.memoizedState=[l,e],l}function tc(t,e,i){return i===void 0||(Tn&1073741824)!==0&&(Nt&261930)===0?t.memoizedState=e:(t.memoizedState=i,t=Qg(),St.lanes|=t,ui|=t,i)}function Qh(t,e,i,l){return Ae(i,e)?i:Da.current!==null?(t=tc(t,i,l),Ae(t,e)||(te=!0),t):(Tn&42)===0||(Tn&1073741824)!==0&&(Nt&261930)===0?(te=!0,t.memoizedState=i):(t=Qg(),St.lanes|=t,ui|=t,e)}function Xh(t,e,i,l,s){var c=R.p;R.p=c!==0&&8>c?c:8;var y=M.T,S={};M.T=S,ic(t,!1,e,i);try{var D=s(),K=M.S;if(K!==null&&K(S,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var nt=S1(D,l);Rl(t,e,nt,je(t))}else Rl(t,e,l,je(t))}catch(at){Rl(t,e,{then:function(){},status:"rejected",reason:at},je())}finally{R.p=c,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function N1(){}function ec(t,e,i,l){if(t.tag!==5)throw Error(u(476));var s=Gh(t).queue;Xh(t,s,e,H,i===null?N1:function(){return Zh(t),i(l)})}function Gh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:H},next:null};var i={};return e.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:i},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Zh(t){var e=Gh(t);e.next===null&&(e=t.alternate.memoizedState),Rl(t,e.next.queue,{},je())}function nc(){return re(Jl)}function Kh(){return Jt().memoizedState}function kh(){return Jt().memoizedState}function T1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var i=je();t=ei(i);var l=ni(e,t,i);l!==null&&(Me(l,e,i),Tl(l,e,i)),e={cache:Dr()},t.payload=e;return}e=e.return}}function A1(t,e,i){var l=je();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},bu(t)?Fh(e,i):(i=br(t,e,i,l),i!==null&&(Me(i,t,l),Jh(i,e,l)))}function $h(t,e,i){var l=je();Rl(t,e,i,l)}function Rl(t,e,i,l){var s={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(bu(t))Fh(e,s);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var y=e.lastRenderedState,S=c(y,i);if(s.hasEagerState=!0,s.eagerState=S,Ae(S,y))return tu(t,e,s,0),Vt===null&&Po(),!1}catch{}if(i=br(t,e,s,l),i!==null)return Me(i,t,l),Jh(i,e,l),!0}return!1}function ic(t,e,i,l){if(l={lane:2,revertLane:jc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},bu(t)){if(e)throw Error(u(479))}else e=br(t,i,l,2),e!==null&&Me(e,t,2)}function bu(t){var e=t.alternate;return t===St||e!==null&&e===St}function Fh(t,e){Oa=hu=!0;var i=t.pending;i===null?e.next=e:(e.next=i.next,i.next=e),t.pending=e}function Jh(t,e,i){if((i&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,i|=l,e.lanes=i,Ro(t,i)}}var Hl={readContext:re,use:yu,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};Hl.useEffectEvent=kt;var Ih={readContext:re,use:yu,useCallback:function(t,e){return pe().memoizedState=[t,e===void 0?null:e],t},useContext:re,useEffect:Hh,useImperativeHandle:function(t,e,i){i=i!=null?i.concat([t]):null,vu(4194308,4,qh.bind(null,e,t),i)},useLayoutEffect:function(t,e){return vu(4194308,4,t,e)},useInsertionEffect:function(t,e){vu(4,2,t,e)},useMemo:function(t,e){var i=pe();e=e===void 0?null:e;var l=t();if(Zi){ln(!0);try{t()}finally{ln(!1)}}return i.memoizedState=[l,e],l},useReducer:function(t,e,i){var l=pe();if(i!==void 0){var s=i(e);if(Zi){ln(!0);try{i(e)}finally{ln(!1)}}}else s=e;return l.memoizedState=l.baseState=s,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},l.queue=t,t=t.dispatch=A1.bind(null,St,t),[l.memoizedState,t]},useRef:function(t){var e=pe();return t={current:t},e.memoizedState=t},useState:function(t){t=Jr(t);var e=t.queue,i=$h.bind(null,St,e);return e.dispatch=i,[t.memoizedState,i]},useDebugValue:Pr,useDeferredValue:function(t,e){var i=pe();return tc(i,t,e)},useTransition:function(){var t=Jr(!1);return t=Xh.bind(null,St,t.queue,!0,!1),pe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,i){var l=St,s=pe();if(At){if(i===void 0)throw Error(u(407));i=i()}else{if(i=e(),Vt===null)throw Error(u(349));(Nt&127)!==0||vh(l,e,i)}s.memoizedState=i;var c={value:i,getSnapshot:e};return s.queue=c,Hh(bh.bind(null,l,c,t),[t]),l.flags|=2048,Ha(9,{destroy:void 0},xh.bind(null,l,c,i,e),null),i},useId:function(){var t=pe(),e=Vt.identifierPrefix;if(At){var i=sn,l=un;i=(l&~(1<<32-ye(l)-1)).toString(32)+i,e="_"+e+"R_"+i,i=gu++,0<i&&(e+="H"+i.toString(32)),e+="_"}else i=E1++,e="_"+e+"r_"+i.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:nc,useFormState:Ah,useActionState:Ah,useOptimistic:function(t){var e=pe();e.memoizedState=e.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=i,e=ic.bind(null,St,!0,i),i.dispatch=e,[t,e]},useMemoCache:kr,useCacheRefresh:function(){return pe().memoizedState=T1.bind(null,St)},useEffectEvent:function(t){var e=pe(),i={impl:t};return e.memoizedState=i,function(){if((Rt&2)!==0)throw Error(u(440));return i.impl.apply(void 0,arguments)}}},ac={readContext:re,use:yu,useCallback:Yh,useContext:re,useEffect:Wr,useImperativeHandle:Lh,useInsertionEffect:Bh,useLayoutEffect:Uh,useMemo:Vh,useReducer:pu,useRef:Rh,useState:function(){return pu(An)},useDebugValue:Pr,useDeferredValue:function(t,e){var i=Jt();return Qh(i,qt.memoizedState,t,e)},useTransition:function(){var t=pu(An)[0],e=Jt().memoizedState;return[typeof t=="boolean"?t:Ol(t),e]},useSyncExternalStore:ph,useId:Kh,useHostTransitionStatus:nc,useFormState:zh,useActionState:zh,useOptimistic:function(t,e){var i=Jt();return wh(i,qt,t,e)},useMemoCache:kr,useCacheRefresh:kh};ac.useEffectEvent=jh;var Wh={readContext:re,use:yu,useCallback:Yh,useContext:re,useEffect:Wr,useImperativeHandle:Lh,useInsertionEffect:Bh,useLayoutEffect:Uh,useMemo:Vh,useReducer:Fr,useRef:Rh,useState:function(){return Fr(An)},useDebugValue:Pr,useDeferredValue:function(t,e){var i=Jt();return qt===null?tc(i,t,e):Qh(i,qt.memoizedState,t,e)},useTransition:function(){var t=Fr(An)[0],e=Jt().memoizedState;return[typeof t=="boolean"?t:Ol(t),e]},useSyncExternalStore:ph,useId:Kh,useHostTransitionStatus:nc,useFormState:Oh,useActionState:Oh,useOptimistic:function(t,e){var i=Jt();return qt!==null?wh(i,qt,t,e):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:kr,useCacheRefresh:kh};Wh.useEffectEvent=jh;function lc(t,e,i,l){e=t.memoizedState,i=i(l,e),i=i==null?e:v({},e,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var oc={enqueueSetState:function(t,e,i){t=t._reactInternals;var l=je(),s=ei(l);s.payload=e,i!=null&&(s.callback=i),e=ni(t,s,l),e!==null&&(Me(e,t,l),Tl(e,t,l))},enqueueReplaceState:function(t,e,i){t=t._reactInternals;var l=je(),s=ei(l);s.tag=1,s.payload=e,i!=null&&(s.callback=i),e=ni(t,s,l),e!==null&&(Me(e,t,l),Tl(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var i=je(),l=ei(i);l.tag=2,e!=null&&(l.callback=e),e=ni(t,l,i),e!==null&&(Me(e,t,i),Tl(e,t,i))}};function Ph(t,e,i,l,s,c,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,c,y):e.prototype&&e.prototype.isPureReactComponent?!bl(i,l)||!bl(s,c):!0}function tg(t,e,i,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(i,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(i,l),e.state!==t&&oc.enqueueReplaceState(e,e.state,null)}function Ki(t,e){var i=e;if("ref"in e){i={};for(var l in e)l!=="ref"&&(i[l]=e[l])}if(t=t.defaultProps){i===e&&(i=v({},i));for(var s in t)i[s]===void 0&&(i[s]=t[s])}return i}function eg(t){Wo(t)}function ng(t){console.error(t)}function ig(t){Wo(t)}function Su(t,e){try{var i=t.onUncaughtError;i(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function ag(t,e,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function uc(t,e,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Su(t,e)},i}function lg(t){return t=ei(t),t.tag=3,t}function og(t,e,i,l){var s=i.type.getDerivedStateFromError;if(typeof s=="function"){var c=l.value;t.payload=function(){return s(c)},t.callback=function(){ag(e,i,l)}}var y=i.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){ag(e,i,l),typeof s!="function"&&(si===null?si=new Set([this]):si.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function z1(t,e,i,l,s){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=i.alternate,e!==null&&Ca(e,i,s,!0),i=De.current,i!==null){switch(i.tag){case 31:case 13:return Xe===null?Ru():i.alternate===null&&$t===0&&($t=3),i.flags&=-257,i.flags|=65536,i.lanes=s,l===su?i.flags|=16384:(e=i.updateQueue,e===null?i.updateQueue=new Set([l]):e.add(l),Oc(t,l,s)),!1;case 22:return i.flags|=65536,l===su?i.flags|=16384:(e=i.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=e):(i=e.retryQueue,i===null?e.retryQueue=new Set([l]):i.add(l)),Oc(t,l,s)),!1}throw Error(u(435,i.tag))}return Oc(t,l,s),Ru(),!1}if(At)return e=De.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=s,l!==Cr&&(t=Error(u(422),{cause:l}),wl(Le(t,i)))):(l!==Cr&&(e=Error(u(423),{cause:l}),wl(Le(e,i))),t=t.current.alternate,t.flags|=65536,s&=-s,t.lanes|=s,l=Le(l,i),s=uc(t.stateNode,l,s),Ur(t,s),$t!==4&&($t=2)),!1;var c=Error(u(520),{cause:l});if(c=Le(c,i),Ql===null?Ql=[c]:Ql.push(c),$t!==4&&($t=2),e===null)return!0;l=Le(l,i),i=e;do{switch(i.tag){case 3:return i.flags|=65536,t=s&-s,i.lanes|=t,t=uc(i.stateNode,l,t),Ur(i,t),!1;case 1:if(e=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(si===null||!si.has(c))))return i.flags|=65536,s&=-s,i.lanes|=s,s=lg(s),og(s,t,i,l),Ur(i,s),!1}i=i.return}while(i!==null);return!1}var sc=Error(u(461)),te=!1;function ce(t,e,i,l){e.child=t===null?ch(e,null,i,l):Gi(e,t.child,i,l)}function ug(t,e,i,l,s){i=i.render;var c=e.ref;if("ref"in l){var y={};for(var S in l)S!=="ref"&&(y[S]=l[S])}else y=l;return Yi(e),l=Xr(t,e,i,y,c,s),S=Gr(),t!==null&&!te?(Zr(t,e,s),zn(t,e,s)):(At&&S&&_r(e),e.flags|=1,ce(t,e,l,s),e.child)}function sg(t,e,i,l,s){if(t===null){var c=i.type;return typeof c=="function"&&!Sr(c)&&c.defaultProps===void 0&&i.compare===null?(e.tag=15,e.type=c,rg(t,e,c,l,s)):(t=nu(i.type,null,l,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!yc(t,s)){var y=c.memoizedProps;if(i=i.compare,i=i!==null?i:bl,i(y,l)&&t.ref===e.ref)return zn(t,e,s)}return e.flags|=1,t=_n(c,l),t.ref=e.ref,t.return=e,e.child=t}function rg(t,e,i,l,s){if(t!==null){var c=t.memoizedProps;if(bl(c,l)&&t.ref===e.ref)if(te=!1,e.pendingProps=l=c,yc(t,s))(t.flags&131072)!==0&&(te=!0);else return e.lanes=t.lanes,zn(t,e,s)}return rc(t,e,i,l,s)}function cg(t,e,i,l){var s=l.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|i:i,t!==null){for(l=e.child=t.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~c}else l=0,e.child=null;return fg(t,e,c,i,l)}if((i&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&ou(e,c!==null?c.cachePool:null),c!==null?hh(e,c):Lr(),gh(e);else return l=e.lanes=536870912,fg(t,e,c!==null?c.baseLanes|i:i,i,l)}else c!==null?(ou(e,c.cachePool),hh(e,c),ai(),e.memoizedState=null):(t!==null&&ou(e,null),Lr(),ai());return ce(t,e,s,i),e.child}function jl(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function fg(t,e,i,l,s){var c=Rr();return c=c===null?null:{parent:Wt._currentValue,pool:c},e.memoizedState={baseLanes:i,cachePool:c},t!==null&&ou(e,null),Lr(),gh(e),t!==null&&Ca(t,e,l,!0),e.childLanes=s,null}function Eu(t,e){return e=_u({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function dg(t,e,i){return Gi(e,t.child,null,i),t=Eu(e,e.pendingProps),t.flags|=2,Oe(e),e.memoizedState=null,t}function D1(t,e,i){var l=e.pendingProps,s=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(At){if(l.mode==="hidden")return t=Eu(e,l),e.lanes=536870912,jl(null,t);if(Vr(e),(t=Qt)?(t=_m(t,Qe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Jn!==null?{id:un,overflow:sn}:null,retryLane:536870912,hydrationErrors:null},i=Fd(t),i.return=e,e.child=i,se=e,Qt=null)):t=null,t===null)throw Wn(e);return e.lanes=536870912,null}return Eu(e,l)}var c=t.memoizedState;if(c!==null){var y=c.dehydrated;if(Vr(e),s)if(e.flags&256)e.flags&=-257,e=dg(t,e,i);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(u(558));else if(te||Ca(t,e,i,!1),s=(i&t.childLanes)!==0,te||s){if(l=Vt,l!==null&&(y=Ho(l,i),y!==0&&y!==c.retryLane))throw c.retryLane=y,Bi(t,y),Me(l,t,y),sc;Ru(),e=dg(t,e,i)}else t=c.treeContext,Qt=Ge(y.nextSibling),se=e,At=!0,In=null,Qe=!1,t!==null&&Wd(e,t),e=Eu(e,l),e.flags|=4096;return e}return t=_n(t.child,{mode:l.mode,children:l.children}),t.ref=e.ref,e.child=t,t.return=e,t}function wu(t,e){var i=e.ref;if(i===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(u(284));(t===null||t.ref!==i)&&(e.flags|=4194816)}}function rc(t,e,i,l,s){return Yi(e),i=Xr(t,e,i,l,void 0,s),l=Gr(),t!==null&&!te?(Zr(t,e,s),zn(t,e,s)):(At&&l&&_r(e),e.flags|=1,ce(t,e,i,s),e.child)}function hg(t,e,i,l,s,c){return Yi(e),e.updateQueue=null,i=yh(e,l,i,s),mh(t),l=Gr(),t!==null&&!te?(Zr(t,e,c),zn(t,e,c)):(At&&l&&_r(e),e.flags|=1,ce(t,e,i,c),e.child)}function gg(t,e,i,l,s){if(Yi(e),e.stateNode===null){var c=Ea,y=i.contextType;typeof y=="object"&&y!==null&&(c=re(y)),c=new i(l,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=oc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=l,c.state=e.memoizedState,c.refs={},jr(e),y=i.contextType,c.context=typeof y=="object"&&y!==null?re(y):Ea,c.state=e.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(lc(e,i,y,l),c.state=e.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&oc.enqueueReplaceState(c,c.state,null),zl(e,l,c,s),Al(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){c=e.stateNode;var S=e.memoizedProps,D=Ki(i,S);c.props=D;var K=c.context,nt=i.contextType;y=Ea,typeof nt=="object"&&nt!==null&&(y=re(nt));var at=i.getDerivedStateFromProps;nt=typeof at=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=e.pendingProps!==S,nt||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||K!==y)&&tg(e,c,l,y),ti=!1;var F=e.memoizedState;c.state=F,zl(e,l,c,s),Al(),K=e.memoizedState,S||F!==K||ti?(typeof at=="function"&&(lc(e,i,at,l),K=e.memoizedState),(D=ti||Ph(e,i,D,l,F,K,y))?(nt||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=K),c.props=l,c.state=K,c.context=y,l=D):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{c=e.stateNode,Br(t,e),y=e.memoizedProps,nt=Ki(i,y),c.props=nt,at=e.pendingProps,F=c.context,K=i.contextType,D=Ea,typeof K=="object"&&K!==null&&(D=re(K)),S=i.getDerivedStateFromProps,(K=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==at||F!==D)&&tg(e,c,l,D),ti=!1,F=e.memoizedState,c.state=F,zl(e,l,c,s),Al();var W=e.memoizedState;y!==at||F!==W||ti||t!==null&&t.dependencies!==null&&au(t.dependencies)?(typeof S=="function"&&(lc(e,i,S,l),W=e.memoizedState),(nt=ti||Ph(e,i,nt,l,F,W,D)||t!==null&&t.dependencies!==null&&au(t.dependencies))?(K||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,W,D),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,W,D)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&F===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&F===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=W),c.props=l,c.state=W,c.context=D,l=nt):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&F===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&F===t.memoizedState||(e.flags|=1024),l=!1)}return c=l,wu(t,e),l=(e.flags&128)!==0,c||l?(c=e.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&l?(e.child=Gi(e,t.child,null,s),e.child=Gi(e,null,i,s)):ce(t,e,i,s),e.memoizedState=c.state,t=e.child):t=zn(t,e,s),t}function mg(t,e,i,l){return qi(),e.flags|=256,ce(t,e,i,l),e.child}var cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(t){return{baseLanes:t,cachePool:ah()}}function dc(t,e,i){return t=t!==null?t.childLanes&~i:0,e&&(t|=He),t}function yg(t,e,i){var l=e.pendingProps,s=!1,c=(e.flags&128)!==0,y;if((y=c)||(y=t!==null&&t.memoizedState===null?!1:(Ft.current&2)!==0),y&&(s=!0,e.flags&=-129),y=(e.flags&32)!==0,e.flags&=-33,t===null){if(At){if(s?ii(e):ai(),(t=Qt)?(t=_m(t,Qe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Jn!==null?{id:un,overflow:sn}:null,retryLane:536870912,hydrationErrors:null},i=Fd(t),i.return=e,e.child=i,se=e,Qt=null)):t=null,t===null)throw Wn(e);return $c(t)?e.lanes=32:e.lanes=536870912,null}var S=l.children;return l=l.fallback,s?(ai(),s=e.mode,S=_u({mode:"hidden",children:S},s),l=Ui(l,s,i,null),S.return=e,l.return=e,S.sibling=l,e.child=S,l=e.child,l.memoizedState=fc(i),l.childLanes=dc(t,y,i),e.memoizedState=cc,jl(null,l)):(ii(e),hc(e,S))}var D=t.memoizedState;if(D!==null&&(S=D.dehydrated,S!==null)){if(c)e.flags&256?(ii(e),e.flags&=-257,e=gc(t,e,i)):e.memoizedState!==null?(ai(),e.child=t.child,e.flags|=128,e=null):(ai(),S=l.fallback,s=e.mode,l=_u({mode:"visible",children:l.children},s),S=Ui(S,s,i,null),S.flags|=2,l.return=e,S.return=e,l.sibling=S,e.child=l,Gi(e,t.child,null,i),l=e.child,l.memoizedState=fc(i),l.childLanes=dc(t,y,i),e.memoizedState=cc,e=jl(null,l));else if(ii(e),$c(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var K=y.dgst;y=K,l=Error(u(419)),l.stack="",l.digest=y,wl({value:l,source:null,stack:null}),e=gc(t,e,i)}else if(te||Ca(t,e,i,!1),y=(i&t.childLanes)!==0,te||y){if(y=Vt,y!==null&&(l=Ho(y,i),l!==0&&l!==D.retryLane))throw D.retryLane=l,Bi(t,l),Me(y,t,l),sc;kc(S)||Ru(),e=gc(t,e,i)}else kc(S)?(e.flags|=192,e.child=t.child,e=null):(t=D.treeContext,Qt=Ge(S.nextSibling),se=e,At=!0,In=null,Qe=!1,t!==null&&Wd(e,t),e=hc(e,l.children),e.flags|=4096);return e}return s?(ai(),S=l.fallback,s=e.mode,D=t.child,K=D.sibling,l=_n(D,{mode:"hidden",children:l.children}),l.subtreeFlags=D.subtreeFlags&65011712,K!==null?S=_n(K,S):(S=Ui(S,s,i,null),S.flags|=2),S.return=e,l.return=e,l.sibling=S,e.child=l,jl(null,l),l=e.child,S=t.child.memoizedState,S===null?S=fc(i):(s=S.cachePool,s!==null?(D=Wt._currentValue,s=s.parent!==D?{parent:D,pool:D}:s):s=ah(),S={baseLanes:S.baseLanes|i,cachePool:s}),l.memoizedState=S,l.childLanes=dc(t,y,i),e.memoizedState=cc,jl(t.child,l)):(ii(e),i=t.child,t=i.sibling,i=_n(i,{mode:"visible",children:l.children}),i.return=e,i.sibling=null,t!==null&&(y=e.deletions,y===null?(e.deletions=[t],e.flags|=16):y.push(t)),e.child=i,e.memoizedState=null,i)}function hc(t,e){return e=_u({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function _u(t,e){return t=ze(22,t,null,e),t.lanes=0,t}function gc(t,e,i){return Gi(e,t.child,null,i),t=hc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function pg(t,e,i){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),Ar(t.return,e,i)}function mc(t,e,i,l,s,c){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:s,treeForkCount:c}:(y.isBackwards=e,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=i,y.tailMode=s,y.treeForkCount=c)}function vg(t,e,i){var l=e.pendingProps,s=l.revealOrder,c=l.tail;l=l.children;var y=Ft.current,S=(y&2)!==0;if(S?(y=y&1|2,e.flags|=128):y&=1,P(Ft,y),ce(t,e,l,i),l=At?El:0,!S&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&pg(t,i,e);else if(t.tag===19)pg(t,i,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(s){case"forwards":for(i=e.child,s=null;i!==null;)t=i.alternate,t!==null&&du(t)===null&&(s=i),i=i.sibling;i=s,i===null?(s=e.child,e.child=null):(s=i.sibling,i.sibling=null),mc(e,!1,s,i,c,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&du(t)===null){e.child=s;break}t=s.sibling,s.sibling=i,i=s,s=t}mc(e,!0,i,null,c,l);break;case"together":mc(e,!1,null,null,void 0,l);break;default:e.memoizedState=null}return e.child}function zn(t,e,i){if(t!==null&&(e.dependencies=t.dependencies),ui|=e.lanes,(i&e.childLanes)===0)if(t!==null){if(Ca(t,e,i,!1),(i&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(u(153));if(e.child!==null){for(t=e.child,i=_n(t,t.pendingProps),e.child=i,i.return=e;t.sibling!==null;)t=t.sibling,i=i.sibling=_n(t,t.pendingProps),i.return=e;i.sibling=null}return e.child}function yc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&au(t)))}function O1(t,e,i){switch(e.tag){case 3:ut(e,e.stateNode.containerInfo),Pn(e,Wt,t.memoizedState.cache),qi();break;case 27:case 5:Et(e);break;case 4:ut(e,e.stateNode.containerInfo);break;case 10:Pn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Vr(e),null;break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(ii(e),e.flags|=128,null):(i&e.child.childLanes)!==0?yg(t,e,i):(ii(e),t=zn(t,e,i),t!==null?t.sibling:null);ii(e);break;case 19:var s=(t.flags&128)!==0;if(l=(i&e.childLanes)!==0,l||(Ca(t,e,i,!1),l=(i&e.childLanes)!==0),s){if(l)return vg(t,e,i);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),P(Ft,Ft.current),l)break;return null;case 22:return e.lanes=0,cg(t,e,i,e.pendingProps);case 24:Pn(e,Wt,t.memoizedState.cache)}return zn(t,e,i)}function xg(t,e,i){if(t!==null)if(t.memoizedProps!==e.pendingProps)te=!0;else{if(!yc(t,i)&&(e.flags&128)===0)return te=!1,O1(t,e,i);te=(t.flags&131072)!==0}else te=!1,At&&(e.flags&1048576)!==0&&Id(e,El,e.index);switch(e.lanes=0,e.tag){case 16:t:{var l=e.pendingProps;if(t=Qi(e.elementType),e.type=t,typeof t=="function")Sr(t)?(l=Ki(t,l),e.tag=1,e=gg(null,e,t,l,i)):(e.tag=0,e=rc(null,e,t,l,i));else{if(t!=null){var s=t.$$typeof;if(s===A){e.tag=11,e=ug(null,e,t,l,i);break t}else if(s===j){e.tag=14,e=sg(null,e,t,l,i);break t}}throw e=O(t)||t,Error(u(306,e,""))}}return e;case 0:return rc(t,e,e.type,e.pendingProps,i);case 1:return l=e.type,s=Ki(l,e.pendingProps),gg(t,e,l,s,i);case 3:t:{if(ut(e,e.stateNode.containerInfo),t===null)throw Error(u(387));l=e.pendingProps;var c=e.memoizedState;s=c.element,Br(t,e),zl(e,l,null,i);var y=e.memoizedState;if(l=y.cache,Pn(e,Wt,l),l!==c.cache&&zr(e,[Wt],i,!0),Al(),l=y.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:y.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=mg(t,e,l,i);break t}else if(l!==s){s=Le(Error(u(424)),e),wl(s),e=mg(t,e,l,i);break t}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Qt=Ge(t.firstChild),se=e,At=!0,In=null,Qe=!0,i=ch(e,null,l,i),e.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(qi(),l===s){e=zn(t,e,i);break t}ce(t,e,l,i)}e=e.child}return e;case 26:return wu(t,e),t===null?(i=zm(e.type,null,e.pendingProps,null))?e.memoizedState=i:At||(i=e.type,t=e.pendingProps,l=Yu(ct.current).createElement(i),l[ie]=e,l[he]=t,fe(l,i,t),It(l),e.stateNode=l):e.memoizedState=zm(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Et(e),t===null&&At&&(l=e.stateNode=Nm(e.type,e.pendingProps,ct.current),se=e,Qe=!0,s=Qt,di(e.type)?(Fc=s,Qt=Ge(l.firstChild)):Qt=s),ce(t,e,e.pendingProps.children,i),wu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&At&&((s=l=Qt)&&(l=sx(l,e.type,e.pendingProps,Qe),l!==null?(e.stateNode=l,se=e,Qt=Ge(l.firstChild),Qe=!1,s=!0):s=!1),s||Wn(e)),Et(e),s=e.type,c=e.pendingProps,y=t!==null?t.memoizedProps:null,l=c.children,Gc(s,c)?l=null:y!==null&&Gc(s,y)&&(e.flags|=32),e.memoizedState!==null&&(s=Xr(t,e,w1,null,null,i),Jl._currentValue=s),wu(t,e),ce(t,e,l,i),e.child;case 6:return t===null&&At&&((t=i=Qt)&&(i=rx(i,e.pendingProps,Qe),i!==null?(e.stateNode=i,se=e,Qt=null,t=!0):t=!1),t||Wn(e)),null;case 13:return yg(t,e,i);case 4:return ut(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Gi(e,null,l,i):ce(t,e,l,i),e.child;case 11:return ug(t,e,e.type,e.pendingProps,i);case 7:return ce(t,e,e.pendingProps,i),e.child;case 8:return ce(t,e,e.pendingProps.children,i),e.child;case 12:return ce(t,e,e.pendingProps.children,i),e.child;case 10:return l=e.pendingProps,Pn(e,e.type,l.value),ce(t,e,l.children,i),e.child;case 9:return s=e.type._context,l=e.pendingProps.children,Yi(e),s=re(s),l=l(s),e.flags|=1,ce(t,e,l,i),e.child;case 14:return sg(t,e,e.type,e.pendingProps,i);case 15:return rg(t,e,e.type,e.pendingProps,i);case 19:return vg(t,e,i);case 31:return D1(t,e,i);case 22:return cg(t,e,i,e.pendingProps);case 24:return Yi(e),l=re(Wt),t===null?(s=Rr(),s===null&&(s=Vt,c=Dr(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=i),s=c),e.memoizedState={parent:l,cache:s},jr(e),Pn(e,Wt,s)):((t.lanes&i)!==0&&(Br(t,e),zl(e,null,null,i),Al()),s=t.memoizedState,c=e.memoizedState,s.parent!==l?(s={parent:l,cache:l},e.memoizedState=s,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=s),Pn(e,Wt,l)):(l=c.cache,Pn(e,Wt,l),l!==s.cache&&zr(e,[Wt],i,!0))),ce(t,e,e.pendingProps.children,i),e.child;case 29:throw e.pendingProps}throw Error(u(156,e.tag))}function Dn(t){t.flags|=4}function pc(t,e,i,l,s){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(s&335544128)===s)if(t.stateNode.complete)t.flags|=8192;else if(Kg())t.flags|=8192;else throw Xi=su,Hr}else t.flags&=-16777217}function bg(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!jm(e))if(Kg())t.flags|=8192;else throw Xi=su,Hr}function Mu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Do():536870912,t.lanes|=e,qa|=e)}function Bl(t,e){if(!At)switch(t.tailMode){case"hidden":e=t.tail;for(var i=null;e!==null;)e.alternate!==null&&(i=e),e=e.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Xt(t){var e=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(e)for(var s=t.child;s!==null;)i|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)i|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=l,t.childLanes=i,e}function R1(t,e,i){var l=e.pendingProps;switch(Mr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(e),null;case 1:return Xt(e),null;case 3:return i=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Nn(Wt),ft(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Ma(e)?Dn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Nr())),Xt(e),null;case 26:var s=e.type,c=e.memoizedState;return t===null?(Dn(e),c!==null?(Xt(e),bg(e,c)):(Xt(e),pc(e,s,null,l,i))):c?c!==t.memoizedState?(Dn(e),Xt(e),bg(e,c)):(Xt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==l&&Dn(e),Xt(e),pc(e,s,t,l,i)),null;case 27:if(bt(e),i=ct.current,s=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&Dn(e);else{if(!l){if(e.stateNode===null)throw Error(u(166));return Xt(e),null}t=et.current,Ma(e)?Pd(e):(t=Nm(s,l,i),e.stateNode=t,Dn(e))}return Xt(e),null;case 5:if(bt(e),s=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&Dn(e);else{if(!l){if(e.stateNode===null)throw Error(u(166));return Xt(e),null}if(c=et.current,Ma(e))Pd(e);else{var y=Yu(ct.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?y.createElement(s,{is:l.is}):y.createElement(s)}}c[ie]=e,c[he]=l;t:for(y=e.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break t;for(;y.sibling===null;){if(y.return===null||y.return===e)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}e.stateNode=c;t:switch(fe(c,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&Dn(e)}}return Xt(e),pc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,i),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&Dn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(u(166));if(t=ct.current,Ma(e)){if(t=e.stateNode,i=e.memoizedProps,l=null,s=se,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}t[ie]=e,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||ym(t.nodeValue,i)),t||Wn(e,!0)}else t=Yu(t).createTextNode(l),t[ie]=e,e.stateNode=t}return Xt(e),null;case 31:if(i=e.memoizedState,t===null||t.memoizedState!==null){if(l=Ma(e),i!==null){if(t===null){if(!l)throw Error(u(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(557));t[ie]=e}else qi(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Xt(e),t=!1}else i=Nr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return e.flags&256?(Oe(e),e):(Oe(e),null);if((e.flags&128)!==0)throw Error(u(558))}return Xt(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(s=Ma(e),l!==null&&l.dehydrated!==null){if(t===null){if(!s)throw Error(u(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[ie]=e}else qi(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Xt(e),s=!1}else s=Nr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),s=!0;if(!s)return e.flags&256?(Oe(e),e):(Oe(e),null)}return Oe(e),(e.flags&128)!==0?(e.lanes=i,e):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=e.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==s&&(l.flags|=2048)),i!==t&&i&&(e.child.flags|=8192),Mu(e,e.updateQueue),Xt(e),null);case 4:return ft(),t===null&&Lc(e.stateNode.containerInfo),Xt(e),null;case 10:return Nn(e.type),Xt(e),null;case 19:if(U(Ft),l=e.memoizedState,l===null)return Xt(e),null;if(s=(e.flags&128)!==0,c=l.rendering,c===null)if(s)Bl(l,!1);else{if($t!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=du(t),c!==null){for(e.flags|=128,Bl(l,!1),t=c.updateQueue,e.updateQueue=t,Mu(e,t),e.subtreeFlags=0,t=i,i=e.child;i!==null;)$d(i,t),i=i.sibling;return P(Ft,Ft.current&1|2),At&&Mn(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&ue()>zu&&(e.flags|=128,s=!0,Bl(l,!1),e.lanes=4194304)}else{if(!s)if(t=du(c),t!==null){if(e.flags|=128,s=!0,t=t.updateQueue,e.updateQueue=t,Mu(e,t),Bl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!At)return Xt(e),null}else 2*ue()-l.renderingStartTime>zu&&i!==536870912&&(e.flags|=128,s=!0,Bl(l,!1),e.lanes=4194304);l.isBackwards?(c.sibling=e.child,e.child=c):(t=l.last,t!==null?t.sibling=c:e.child=c,l.last=c)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ue(),t.sibling=null,i=Ft.current,P(Ft,s?i&1|2:i&1),At&&Mn(e,l.treeForkCount),t):(Xt(e),null);case 22:case 23:return Oe(e),Yr(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(i&536870912)!==0&&(e.flags&128)===0&&(Xt(e),e.subtreeFlags&6&&(e.flags|=8192)):Xt(e),i=e.updateQueue,i!==null&&Mu(e,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==i&&(e.flags|=2048),t!==null&&U(Vi),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),Nn(Wt),Xt(e),null;case 25:return null;case 30:return null}throw Error(u(156,e.tag))}function H1(t,e){switch(Mr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Nn(Wt),ft(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return bt(e),null;case 31:if(e.memoizedState!==null){if(Oe(e),e.alternate===null)throw Error(u(340));qi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Oe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(u(340));qi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return U(Ft),null;case 4:return ft(),null;case 10:return Nn(e.type),null;case 22:case 23:return Oe(e),Yr(),t!==null&&U(Vi),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Nn(Wt),null;case 25:return null;default:return null}}function Sg(t,e){switch(Mr(e),e.tag){case 3:Nn(Wt),ft();break;case 26:case 27:case 5:bt(e);break;case 4:ft();break;case 31:e.memoizedState!==null&&Oe(e);break;case 13:Oe(e);break;case 19:U(Ft);break;case 10:Nn(e.type);break;case 22:case 23:Oe(e),Yr(),t!==null&&U(Vi);break;case 24:Nn(Wt)}}function Ul(t,e){try{var i=e.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var s=l.next;i=s;do{if((i.tag&t)===t){l=void 0;var c=i.create,y=i.inst;l=c(),y.destroy=l}i=i.next}while(i!==s)}}catch(S){Bt(e,e.return,S)}}function li(t,e,i){try{var l=e.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var c=s.next;l=c;do{if((l.tag&t)===t){var y=l.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,s=e;var D=i,K=S;try{K()}catch(nt){Bt(s,D,nt)}}}l=l.next}while(l!==c)}}catch(nt){Bt(e,e.return,nt)}}function Eg(t){var e=t.updateQueue;if(e!==null){var i=t.stateNode;try{dh(e,i)}catch(l){Bt(t,t.return,l)}}}function wg(t,e,i){i.props=Ki(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){Bt(t,e,l)}}function ql(t,e){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(s){Bt(t,e,s)}}function rn(t,e){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(s){Bt(t,e,s)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(s){Bt(t,e,s)}else i.current=null}function _g(t){var e=t.type,i=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break t;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(s){Bt(t,t.return,s)}}function vc(t,e,i){try{var l=t.stateNode;nx(l,t.type,i,e),l[he]=e}catch(s){Bt(t,t.return,s)}}function Mg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&di(t.type)||t.tag===4}function xc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Mg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&di(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function bc(t,e,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,e):(e=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,e.appendChild(t),i=i._reactRootContainer,i!=null||e.onclick!==null||(e.onclick=En));else if(l!==4&&(l===27&&di(t.type)&&(i=t.stateNode,e=null),t=t.child,t!==null))for(bc(t,e,i),t=t.sibling;t!==null;)bc(t,e,i),t=t.sibling}function Cu(t,e,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?i.insertBefore(t,e):i.appendChild(t);else if(l!==4&&(l===27&&di(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Cu(t,e,i),t=t.sibling;t!==null;)Cu(t,e,i),t=t.sibling}function Cg(t){var e=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,s=e.attributes;s.length;)e.removeAttributeNode(s[0]);fe(e,l,i),e[ie]=t,e[he]=i}catch(c){Bt(t,t.return,c)}}var On=!1,ee=!1,Sc=!1,Ng=typeof WeakSet=="function"?WeakSet:Set,oe=null;function j1(t,e){if(t=t.containerInfo,Qc=ku,t=Ld(t),gr(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else t:{i=(i=t.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var s=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break t}var y=0,S=-1,D=-1,K=0,nt=0,at=t,F=null;e:for(;;){for(var W;at!==i||s!==0&&at.nodeType!==3||(S=y+s),at!==c||l!==0&&at.nodeType!==3||(D=y+l),at.nodeType===3&&(y+=at.nodeValue.length),(W=at.firstChild)!==null;)F=at,at=W;for(;;){if(at===t)break e;if(F===i&&++K===s&&(S=y),F===c&&++nt===l&&(D=y),(W=at.nextSibling)!==null)break;at=F,F=at.parentNode}at=W}i=S===-1||D===-1?null:{start:S,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(Xc={focusedElem:t,selectionRange:i},ku=!1,oe=e;oe!==null;)if(e=oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,oe=t;else for(;oe!==null;){switch(e=oe,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)s=t[i],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,i=e,s=c.memoizedProps,c=c.memoizedState,l=i.stateNode;try{var dt=Ki(i.type,s);t=l.getSnapshotBeforeUpdate(dt,c),l.__reactInternalSnapshotBeforeUpdate=t}catch(pt){Bt(i,i.return,pt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,i=t.nodeType,i===9)Kc(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Kc(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(u(163))}if(t=e.sibling,t!==null){t.return=e.return,oe=t;break}oe=e.return}}function Tg(t,e,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Hn(t,i),l&4&&Ul(5,i);break;case 1:if(Hn(t,i),l&4)if(t=i.stateNode,e===null)try{t.componentDidMount()}catch(y){Bt(i,i.return,y)}else{var s=Ki(i.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(s,e,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Bt(i,i.return,y)}}l&64&&Eg(i),l&512&&ql(i,i.return);break;case 3:if(Hn(t,i),l&64&&(t=i.updateQueue,t!==null)){if(e=null,i.child!==null)switch(i.child.tag){case 27:case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}try{dh(t,e)}catch(y){Bt(i,i.return,y)}}break;case 27:e===null&&l&4&&Cg(i);case 26:case 5:Hn(t,i),e===null&&l&4&&_g(i),l&512&&ql(i,i.return);break;case 12:Hn(t,i);break;case 31:Hn(t,i),l&4&&Dg(t,i);break;case 13:Hn(t,i),l&4&&Og(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=G1.bind(null,i),cx(t,i))));break;case 22:if(l=i.memoizedState!==null||On,!l){e=e!==null&&e.memoizedState!==null||ee,s=On;var c=ee;On=l,(ee=e)&&!c?jn(t,i,(i.subtreeFlags&8772)!==0):Hn(t,i),On=s,ee=c}break;case 30:break;default:Hn(t,i)}}function Ag(t){var e=t.alternate;e!==null&&(t.alternate=null,Ag(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&cl(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Gt=null,Se=!1;function Rn(t,e,i){for(i=i.child;i!==null;)zg(t,e,i),i=i.sibling}function zg(t,e,i){if(me&&typeof me.onCommitFiberUnmount=="function")try{me.onCommitFiberUnmount(Ni,i)}catch{}switch(i.tag){case 26:ee||rn(i,e),Rn(t,e,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ee||rn(i,e);var l=Gt,s=Se;di(i.type)&&(Gt=i.stateNode,Se=!1),Rn(t,e,i),kl(i.stateNode),Gt=l,Se=s;break;case 5:ee||rn(i,e);case 6:if(l=Gt,s=Se,Gt=null,Rn(t,e,i),Gt=l,Se=s,Gt!==null)if(Se)try{(Gt.nodeType===9?Gt.body:Gt.nodeName==="HTML"?Gt.ownerDocument.body:Gt).removeChild(i.stateNode)}catch(c){Bt(i,e,c)}else try{Gt.removeChild(i.stateNode)}catch(c){Bt(i,e,c)}break;case 18:Gt!==null&&(Se?(t=Gt,Em(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),Ka(t)):Em(Gt,i.stateNode));break;case 4:l=Gt,s=Se,Gt=i.stateNode.containerInfo,Se=!0,Rn(t,e,i),Gt=l,Se=s;break;case 0:case 11:case 14:case 15:li(2,i,e),ee||li(4,i,e),Rn(t,e,i);break;case 1:ee||(rn(i,e),l=i.stateNode,typeof l.componentWillUnmount=="function"&&wg(i,e,l)),Rn(t,e,i);break;case 21:Rn(t,e,i);break;case 22:ee=(l=ee)||i.memoizedState!==null,Rn(t,e,i),ee=l;break;default:Rn(t,e,i)}}function Dg(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ka(t)}catch(i){Bt(e,e.return,i)}}}function Og(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ka(t)}catch(i){Bt(e,e.return,i)}}function B1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Ng),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Ng),e;default:throw Error(u(435,t.tag))}}function Nu(t,e){var i=B1(t);e.forEach(function(l){if(!i.has(l)){i.add(l);var s=Z1.bind(null,t,l);l.then(s,s)}})}function Ee(t,e){var i=e.deletions;if(i!==null)for(var l=0;l<i.length;l++){var s=i[l],c=t,y=e,S=y;t:for(;S!==null;){switch(S.tag){case 27:if(di(S.type)){Gt=S.stateNode,Se=!1;break t}break;case 5:Gt=S.stateNode,Se=!1;break t;case 3:case 4:Gt=S.stateNode.containerInfo,Se=!0;break t}S=S.return}if(Gt===null)throw Error(u(160));zg(c,y,s),Gt=null,Se=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Rg(e,t),e=e.sibling}var Ie=null;function Rg(t,e){var i=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ee(e,t),we(t),l&4&&(li(3,t,t.return),Ul(3,t),li(5,t,t.return));break;case 1:Ee(e,t),we(t),l&512&&(ee||i===null||rn(i,i.return)),l&64&&On&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var s=Ie;if(Ee(e,t),we(t),l&512&&(ee||i===null||rn(i,i.return)),l&4){var c=i!==null?i.memoizedState:null;if(l=t.memoizedState,i===null)if(l===null)if(t.stateNode===null){t:{l=t.type,i=t.memoizedProps,s=s.ownerDocument||s;e:switch(l){case"title":c=s.getElementsByTagName("title")[0],(!c||c[zi]||c[ie]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(l),s.head.insertBefore(c,s.querySelector("head > title"))),fe(c,l,i),c[ie]=t,It(c),l=c;break t;case"link":var y=Rm("link","href",s).get(l+(i.href||""));if(y){for(var S=0;S<y.length;S++)if(c=y[S],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){y.splice(S,1);break e}}c=s.createElement(l),fe(c,l,i),s.head.appendChild(c);break;case"meta":if(y=Rm("meta","content",s).get(l+(i.content||""))){for(S=0;S<y.length;S++)if(c=y[S],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){y.splice(S,1);break e}}c=s.createElement(l),fe(c,l,i),s.head.appendChild(c);break;default:throw Error(u(468,l))}c[ie]=t,It(c),l=c}t.stateNode=l}else Hm(s,t.type,t.stateNode);else t.stateNode=Om(s,l,t.memoizedProps);else c!==l?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,l===null?Hm(s,t.type,t.stateNode):Om(s,l,t.memoizedProps)):l===null&&t.stateNode!==null&&vc(t,t.memoizedProps,i.memoizedProps)}break;case 27:Ee(e,t),we(t),l&512&&(ee||i===null||rn(i,i.return)),i!==null&&l&4&&vc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Ee(e,t),we(t),l&512&&(ee||i===null||rn(i,i.return)),t.flags&32){s=t.stateNode;try{ma(s,"")}catch(dt){Bt(t,t.return,dt)}}l&4&&t.stateNode!=null&&(s=t.memoizedProps,vc(t,s,i!==null?i.memoizedProps:s)),l&1024&&(Sc=!0);break;case 6:if(Ee(e,t),we(t),l&4){if(t.stateNode===null)throw Error(u(162));l=t.memoizedProps,i=t.stateNode;try{i.nodeValue=l}catch(dt){Bt(t,t.return,dt)}}break;case 3:if(Xu=null,s=Ie,Ie=Vu(e.containerInfo),Ee(e,t),Ie=s,we(t),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Ka(e.containerInfo)}catch(dt){Bt(t,t.return,dt)}Sc&&(Sc=!1,Hg(t));break;case 4:l=Ie,Ie=Vu(t.stateNode.containerInfo),Ee(e,t),we(t),Ie=l;break;case 12:Ee(e,t),we(t);break;case 31:Ee(e,t),we(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 13:Ee(e,t),we(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Au=ue()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 22:s=t.memoizedState!==null;var D=i!==null&&i.memoizedState!==null,K=On,nt=ee;if(On=K||s,ee=nt||D,Ee(e,t),ee=nt,On=K,we(t),l&8192)t:for(e=t.stateNode,e._visibility=s?e._visibility&-2:e._visibility|1,s&&(i===null||D||On||ee||ki(t)),i=null,e=t;;){if(e.tag===5||e.tag===26){if(i===null){D=i=e;try{if(c=D.stateNode,s)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=D.stateNode;var at=D.memoizedProps.style,F=at!=null&&at.hasOwnProperty("display")?at.display:null;S.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(dt){Bt(D,D.return,dt)}}}else if(e.tag===6){if(i===null){D=e;try{D.stateNode.nodeValue=s?"":D.memoizedProps}catch(dt){Bt(D,D.return,dt)}}}else if(e.tag===18){if(i===null){D=e;try{var W=D.stateNode;s?wm(W,!0):wm(D.stateNode,!1)}catch(dt){Bt(D,D.return,dt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;i===e&&(i=null),e=e.return}i===e&&(i=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Nu(t,i))));break;case 19:Ee(e,t),we(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 30:break;case 21:break;default:Ee(e,t),we(t)}}function we(t){var e=t.flags;if(e&2){try{for(var i,l=t.return;l!==null;){if(Mg(l)){i=l;break}l=l.return}if(i==null)throw Error(u(160));switch(i.tag){case 27:var s=i.stateNode,c=xc(t);Cu(t,c,s);break;case 5:var y=i.stateNode;i.flags&32&&(ma(y,""),i.flags&=-33);var S=xc(t);Cu(t,S,y);break;case 3:case 4:var D=i.stateNode.containerInfo,K=xc(t);bc(t,K,D);break;default:throw Error(u(161))}}catch(nt){Bt(t,t.return,nt)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Hg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Hg(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Hn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Tg(t,e.alternate,e),e=e.sibling}function ki(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:li(4,e,e.return),ki(e);break;case 1:rn(e,e.return);var i=e.stateNode;typeof i.componentWillUnmount=="function"&&wg(e,e.return,i),ki(e);break;case 27:kl(e.stateNode);case 26:case 5:rn(e,e.return),ki(e);break;case 22:e.memoizedState===null&&ki(e);break;case 30:ki(e);break;default:ki(e)}t=t.sibling}}function jn(t,e,i){for(i=i&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,s=t,c=e,y=c.flags;switch(c.tag){case 0:case 11:case 15:jn(s,c,i),Ul(4,c);break;case 1:if(jn(s,c,i),l=c,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(K){Bt(l,l.return,K)}if(l=c,s=l.updateQueue,s!==null){var S=l.stateNode;try{var D=s.shared.hiddenCallbacks;if(D!==null)for(s.shared.hiddenCallbacks=null,s=0;s<D.length;s++)fh(D[s],S)}catch(K){Bt(l,l.return,K)}}i&&y&64&&Eg(c),ql(c,c.return);break;case 27:Cg(c);case 26:case 5:jn(s,c,i),i&&l===null&&y&4&&_g(c),ql(c,c.return);break;case 12:jn(s,c,i);break;case 31:jn(s,c,i),i&&y&4&&Dg(s,c);break;case 13:jn(s,c,i),i&&y&4&&Og(s,c);break;case 22:c.memoizedState===null&&jn(s,c,i),ql(c,c.return);break;case 30:break;default:jn(s,c,i)}e=e.sibling}}function Ec(t,e){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&_l(i))}function wc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_l(t))}function We(t,e,i,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jg(t,e,i,l),e=e.sibling}function jg(t,e,i,l){var s=e.flags;switch(e.tag){case 0:case 11:case 15:We(t,e,i,l),s&2048&&Ul(9,e);break;case 1:We(t,e,i,l);break;case 3:We(t,e,i,l),s&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_l(t)));break;case 12:if(s&2048){We(t,e,i,l),t=e.stateNode;try{var c=e.memoizedProps,y=c.id,S=c.onPostCommit;typeof S=="function"&&S(y,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(D){Bt(e,e.return,D)}}else We(t,e,i,l);break;case 31:We(t,e,i,l);break;case 13:We(t,e,i,l);break;case 23:break;case 22:c=e.stateNode,y=e.alternate,e.memoizedState!==null?c._visibility&2?We(t,e,i,l):Ll(t,e):c._visibility&2?We(t,e,i,l):(c._visibility|=2,ja(t,e,i,l,(e.subtreeFlags&10256)!==0||!1)),s&2048&&Ec(y,e);break;case 24:We(t,e,i,l),s&2048&&wc(e.alternate,e);break;default:We(t,e,i,l)}}function ja(t,e,i,l,s){for(s=s&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,y=e,S=i,D=l,K=y.flags;switch(y.tag){case 0:case 11:case 15:ja(c,y,S,D,s),Ul(8,y);break;case 23:break;case 22:var nt=y.stateNode;y.memoizedState!==null?nt._visibility&2?ja(c,y,S,D,s):Ll(c,y):(nt._visibility|=2,ja(c,y,S,D,s)),s&&K&2048&&Ec(y.alternate,y);break;case 24:ja(c,y,S,D,s),s&&K&2048&&wc(y.alternate,y);break;default:ja(c,y,S,D,s)}e=e.sibling}}function Ll(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var i=t,l=e,s=l.flags;switch(l.tag){case 22:Ll(i,l),s&2048&&Ec(l.alternate,l);break;case 24:Ll(i,l),s&2048&&wc(l.alternate,l);break;default:Ll(i,l)}e=e.sibling}}var Yl=8192;function Ba(t,e,i){if(t.subtreeFlags&Yl)for(t=t.child;t!==null;)Bg(t,e,i),t=t.sibling}function Bg(t,e,i){switch(t.tag){case 26:Ba(t,e,i),t.flags&Yl&&t.memoizedState!==null&&Ex(i,Ie,t.memoizedState,t.memoizedProps);break;case 5:Ba(t,e,i);break;case 3:case 4:var l=Ie;Ie=Vu(t.stateNode.containerInfo),Ba(t,e,i),Ie=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Yl,Yl=16777216,Ba(t,e,i),Yl=l):Ba(t,e,i));break;default:Ba(t,e,i)}}function Ug(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Vl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var i=0;i<e.length;i++){var l=e[i];oe=l,Lg(l,t)}Ug(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qg(t),t=t.sibling}function qg(t){switch(t.tag){case 0:case 11:case 15:Vl(t),t.flags&2048&&li(9,t,t.return);break;case 3:Vl(t);break;case 12:Vl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Tu(t)):Vl(t);break;default:Vl(t)}}function Tu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var i=0;i<e.length;i++){var l=e[i];oe=l,Lg(l,t)}Ug(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:li(8,e,e.return),Tu(e);break;case 22:i=e.stateNode,i._visibility&2&&(i._visibility&=-3,Tu(e));break;default:Tu(e)}t=t.sibling}}function Lg(t,e){for(;oe!==null;){var i=oe;switch(i.tag){case 0:case 11:case 15:li(8,i,e);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:_l(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,oe=l;else t:for(i=t;oe!==null;){l=oe;var s=l.sibling,c=l.return;if(Ag(l),l===i){oe=null;break t}if(s!==null){s.return=c,oe=s;break t}oe=c}}}var U1={getCacheForType:function(t){var e=re(Wt),i=e.data.get(t);return i===void 0&&(i=t(),e.data.set(t,i)),i},cacheSignal:function(){return re(Wt).controller.signal}},q1=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Vt=null,_t=null,Nt=0,jt=0,Re=null,oi=!1,Ua=!1,_c=!1,Bn=0,$t=0,ui=0,$i=0,Mc=0,He=0,qa=0,Ql=null,_e=null,Cc=!1,Au=0,Yg=0,zu=1/0,Du=null,si=null,ae=0,ri=null,La=null,Un=0,Nc=0,Tc=null,Vg=null,Xl=0,Ac=null;function je(){return(Rt&2)!==0&&Nt!==0?Nt&-Nt:M.T!==null?jc():jo()}function Qg(){if(He===0)if((Nt&536870912)===0||At){var t=sa;sa<<=1,(sa&3932160)===0&&(sa=262144),He=t}else He=536870912;return t=De.current,t!==null&&(t.flags|=32),He}function Me(t,e,i){(t===Vt&&(jt===2||jt===9)||t.cancelPendingCommit!==null)&&(Ya(t,0),ci(t,Nt,He,!1)),Ai(t,i),((Rt&2)===0||t!==Vt)&&(t===Vt&&((Rt&2)===0&&($i|=i),$t===4&&ci(t,Nt,He,!1)),cn(t))}function Xg(t,e,i){if((Rt&6)!==0)throw Error(u(327));var l=!i&&(e&127)===0&&(e&t.expiredLanes)===0||Ti(t,e),s=l?V1(t,e):Dc(t,e,!0),c=l;do{if(s===0){Ua&&!l&&ci(t,e,0,!1);break}else{if(i=t.current.alternate,c&&!L1(i)){s=Dc(t,e,!1),c=!1;continue}if(s===2){if(c=e,t.errorRecoveryDisabledLanes&c)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){e=y;t:{var S=t;s=Ql;var D=S.current.memoizedState.isDehydrated;if(D&&(Ya(S,y).flags|=256),y=Dc(S,y,!1),y!==2){if(_c&&!D){S.errorRecoveryDisabledLanes|=c,$i|=c,s=4;break t}c=_e,_e=s,c!==null&&(_e===null?_e=c:_e.push.apply(_e,c))}s=y}if(c=!1,s!==2)continue}}if(s===1){Ya(t,0),ci(t,e,0,!0);break}t:{switch(l=t,c=s,c){case 0:case 1:throw Error(u(345));case 4:if((e&4194048)!==e)break;case 6:ci(l,e,He,!oi);break t;case 2:_e=null;break;case 3:case 5:break;default:throw Error(u(329))}if((e&62914560)===e&&(s=Au+300-ue(),10<s)){if(ci(l,e,He,!oi),ca(l,0,!0)!==0)break t;Un=e,l.timeoutHandle=bm(Gg.bind(null,l,i,_e,Du,Cc,e,He,$i,qa,oi,c,"Throttled",-0,0),s);break t}Gg(l,i,_e,Du,Cc,e,He,$i,qa,oi,c,null,-0,0)}}break}while(!0);cn(t)}function Gg(t,e,i,l,s,c,y,S,D,K,nt,at,F,W){if(t.timeoutHandle=-1,at=e.subtreeFlags,at&8192||(at&16785408)===16785408){at={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},Bg(e,c,at);var dt=(c&62914560)===c?Au-ue():(c&4194048)===c?Yg-ue():0;if(dt=wx(at,dt),dt!==null){Un=c,t.cancelPendingCommit=dt(Wg.bind(null,t,e,c,i,l,s,y,S,D,nt,at,null,F,W)),ci(t,c,y,!K);return}}Wg(t,e,c,i,l,s,y,S,D)}function L1(t){for(var e=t;;){var i=e.tag;if((i===0||i===11||i===15)&&e.flags&16384&&(i=e.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var s=i[l],c=s.getSnapshot;s=s.value;try{if(!Ae(c(),s))return!1}catch{return!1}}if(i=e.child,e.subtreeFlags&16384&&i!==null)i.return=e,e=i;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ci(t,e,i,l){e&=~Mc,e&=~$i,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var s=e;0<s;){var c=31-ye(s),y=1<<c;l[c]=-1,s&=~y}i!==0&&Oo(t,i,e)}function Ou(){return(Rt&6)===0?(Gl(0),!1):!0}function zc(){if(_t!==null){if(jt===0)var t=_t.return;else t=_t,Cn=Li=null,Kr(t),za=null,Cl=0,t=_t;for(;t!==null;)Sg(t.alternate,t),t=t.return;_t=null}}function Ya(t,e){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,lx(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),Un=0,zc(),Vt=t,_t=i=_n(t.current,null),Nt=e,jt=0,Re=null,oi=!1,Ua=Ti(t,e),_c=!1,qa=He=Mc=$i=ui=$t=0,_e=Ql=null,Cc=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var s=31-ye(l),c=1<<s;e|=t[s],l&=~c}return Bn=e,Po(),i}function Zg(t,e){St=null,M.H=Hl,e===Aa||e===uu?(e=uh(),jt=3):e===Hr?(e=uh(),jt=4):jt=e===sc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Re=e,_t===null&&($t=1,Su(t,Le(e,t.current)))}function Kg(){var t=De.current;return t===null?!0:(Nt&4194048)===Nt?Xe===null:(Nt&62914560)===Nt||(Nt&536870912)!==0?t===Xe:!1}function kg(){var t=M.H;return M.H=Hl,t===null?Hl:t}function $g(){var t=M.A;return M.A=U1,t}function Ru(){$t=4,oi||(Nt&4194048)!==Nt&&De.current!==null||(Ua=!0),(ui&134217727)===0&&($i&134217727)===0||Vt===null||ci(Vt,Nt,He,!1)}function Dc(t,e,i){var l=Rt;Rt|=2;var s=kg(),c=$g();(Vt!==t||Nt!==e)&&(Du=null,Ya(t,e)),e=!1;var y=$t;t:do try{if(jt!==0&&_t!==null){var S=_t,D=Re;switch(jt){case 8:zc(),y=6;break t;case 3:case 2:case 9:case 6:De.current===null&&(e=!0);var K=jt;if(jt=0,Re=null,Va(t,S,D,K),i&&Ua){y=0;break t}break;default:K=jt,jt=0,Re=null,Va(t,S,D,K)}}Y1(),y=$t;break}catch(nt){Zg(t,nt)}while(!0);return e&&t.shellSuspendCounter++,Cn=Li=null,Rt=l,M.H=s,M.A=c,_t===null&&(Vt=null,Nt=0,Po()),y}function Y1(){for(;_t!==null;)Fg(_t)}function V1(t,e){var i=Rt;Rt|=2;var l=kg(),s=$g();Vt!==t||Nt!==e?(Du=null,zu=ue()+500,Ya(t,e)):Ua=Ti(t,e);t:do try{if(jt!==0&&_t!==null){e=_t;var c=Re;e:switch(jt){case 1:jt=0,Re=null,Va(t,e,c,1);break;case 2:case 9:if(lh(c)){jt=0,Re=null,Jg(e);break}e=function(){jt!==2&&jt!==9||Vt!==t||(jt=7),cn(t)},c.then(e,e);break t;case 3:jt=7;break t;case 4:jt=5;break t;case 7:lh(c)?(jt=0,Re=null,Jg(e)):(jt=0,Re=null,Va(t,e,c,7));break;case 5:var y=null;switch(_t.tag){case 26:y=_t.memoizedState;case 5:case 27:var S=_t;if(y?jm(y):S.stateNode.complete){jt=0,Re=null;var D=S.sibling;if(D!==null)_t=D;else{var K=S.return;K!==null?(_t=K,Hu(K)):_t=null}break e}}jt=0,Re=null,Va(t,e,c,5);break;case 6:jt=0,Re=null,Va(t,e,c,6);break;case 8:zc(),$t=6;break t;default:throw Error(u(462))}}Q1();break}catch(nt){Zg(t,nt)}while(!0);return Cn=Li=null,M.H=l,M.A=s,Rt=i,_t!==null?0:(Vt=null,Nt=0,Po(),$t)}function Q1(){for(;_t!==null&&!_i();)Fg(_t)}function Fg(t){var e=xg(t.alternate,t,Bn);t.memoizedProps=t.pendingProps,e===null?Hu(t):_t=e}function Jg(t){var e=t,i=e.alternate;switch(e.tag){case 15:case 0:e=hg(i,e,e.pendingProps,e.type,void 0,Nt);break;case 11:e=hg(i,e,e.pendingProps,e.type.render,e.ref,Nt);break;case 5:Kr(e);default:Sg(i,e),e=_t=$d(e,Bn),e=xg(i,e,Bn)}t.memoizedProps=t.pendingProps,e===null?Hu(t):_t=e}function Va(t,e,i,l){Cn=Li=null,Kr(e),za=null,Cl=0;var s=e.return;try{if(z1(t,s,e,i,Nt)){$t=1,Su(t,Le(i,t.current)),_t=null;return}}catch(c){if(s!==null)throw _t=s,c;$t=1,Su(t,Le(i,t.current)),_t=null;return}e.flags&32768?(At||l===1?t=!0:Ua||(Nt&536870912)!==0?t=!1:(oi=t=!0,(l===2||l===9||l===3||l===6)&&(l=De.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ig(e,t)):Hu(e)}function Hu(t){var e=t;do{if((e.flags&32768)!==0){Ig(e,oi);return}t=e.return;var i=R1(e.alternate,e,Bn);if(i!==null){_t=i;return}if(e=e.sibling,e!==null){_t=e;return}_t=e=t}while(e!==null);$t===0&&($t=5)}function Ig(t,e){do{var i=H1(t.alternate,t);if(i!==null){i.flags&=32767,_t=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!e&&(t=t.sibling,t!==null)){_t=t;return}_t=t=i}while(t!==null);$t=6,_t=null}function Wg(t,e,i,l,s,c,y,S,D){t.cancelPendingCommit=null;do ju();while(ae!==0);if((Rt&6)!==0)throw Error(u(327));if(e!==null){if(e===t.current)throw Error(u(177));if(c=e.lanes|e.childLanes,c|=xr,Fs(t,i,c,y,S,D),t===Vt&&(_t=Vt=null,Nt=0),La=e,ri=t,Un=i,Nc=c,Tc=s,Vg=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,K1(Ci,function(){return im(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,s=R.p,R.p=2,y=Rt,Rt|=4;try{j1(t,e,i)}finally{Rt=y,R.p=s,M.T=l}}ae=1,Pg(),tm(),em()}}function Pg(){if(ae===1){ae=0;var t=ri,e=La,i=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||i){i=M.T,M.T=null;var l=R.p;R.p=2;var s=Rt;Rt|=4;try{Rg(e,t);var c=Xc,y=Ld(t.containerInfo),S=c.focusedElem,D=c.selectionRange;if(y!==S&&S&&S.ownerDocument&&qd(S.ownerDocument.documentElement,S)){if(D!==null&&gr(S)){var K=D.start,nt=D.end;if(nt===void 0&&(nt=K),"selectionStart"in S)S.selectionStart=K,S.selectionEnd=Math.min(nt,S.value.length);else{var at=S.ownerDocument||document,F=at&&at.defaultView||window;if(F.getSelection){var W=F.getSelection(),dt=S.textContent.length,pt=Math.min(D.start,dt),Yt=D.end===void 0?pt:Math.min(D.end,dt);!W.extend&&pt>Yt&&(y=Yt,Yt=pt,pt=y);var V=Ud(S,pt),L=Ud(S,Yt);if(V&&L&&(W.rangeCount!==1||W.anchorNode!==V.node||W.anchorOffset!==V.offset||W.focusNode!==L.node||W.focusOffset!==L.offset)){var Z=at.createRange();Z.setStart(V.node,V.offset),W.removeAllRanges(),pt>Yt?(W.addRange(Z),W.extend(L.node,L.offset)):(Z.setEnd(L.node,L.offset),W.addRange(Z))}}}}for(at=[],W=S;W=W.parentNode;)W.nodeType===1&&at.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<at.length;S++){var it=at[S];it.element.scrollLeft=it.left,it.element.scrollTop=it.top}}ku=!!Qc,Xc=Qc=null}finally{Rt=s,R.p=l,M.T=i}}t.current=e,ae=2}}function tm(){if(ae===2){ae=0;var t=ri,e=La,i=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||i){i=M.T,M.T=null;var l=R.p;R.p=2;var s=Rt;Rt|=4;try{Tg(t,e.alternate,e)}finally{Rt=s,R.p=l,M.T=i}}ae=3}}function em(){if(ae===4||ae===3){ae=0,Mi();var t=ri,e=La,i=Un,l=Vg;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ae=5:(ae=0,La=ri=null,nm(t,t.pendingLanes));var s=t.pendingLanes;if(s===0&&(si=null),rl(i),e=e.stateNode,me&&typeof me.onCommitFiberRoot=="function")try{me.onCommitFiberRoot(Ni,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=M.T,s=R.p,R.p=2,M.T=null;try{for(var c=t.onRecoverableError,y=0;y<l.length;y++){var S=l[y];c(S.value,{componentStack:S.stack})}}finally{M.T=e,R.p=s}}(Un&3)!==0&&ju(),cn(t),s=t.pendingLanes,(i&261930)!==0&&(s&42)!==0?t===Ac?Xl++:(Xl=0,Ac=t):Xl=0,Gl(0)}}function nm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,_l(e)))}function ju(){return Pg(),tm(),em(),im()}function im(){if(ae!==5)return!1;var t=ri,e=Nc;Nc=0;var i=rl(Un),l=M.T,s=R.p;try{R.p=32>i?32:i,M.T=null,i=Tc,Tc=null;var c=ri,y=Un;if(ae=0,La=ri=null,Un=0,(Rt&6)!==0)throw Error(u(331));var S=Rt;if(Rt|=4,qg(c.current),jg(c,c.current,y,i),Rt=S,Gl(0,!1),me&&typeof me.onPostCommitFiberRoot=="function")try{me.onPostCommitFiberRoot(Ni,c)}catch{}return!0}finally{R.p=s,M.T=l,nm(t,e)}}function am(t,e,i){e=Le(i,e),e=uc(t.stateNode,e,2),t=ni(t,e,2),t!==null&&(Ai(t,2),cn(t))}function Bt(t,e,i){if(t.tag===3)am(t,t,i);else for(;e!==null;){if(e.tag===3){am(e,t,i);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(si===null||!si.has(l))){t=Le(i,t),i=lg(2),l=ni(e,i,2),l!==null&&(og(i,l,e,t),Ai(l,2),cn(l));break}}e=e.return}}function Oc(t,e,i){var l=t.pingCache;if(l===null){l=t.pingCache=new q1;var s=new Set;l.set(e,s)}else s=l.get(e),s===void 0&&(s=new Set,l.set(e,s));s.has(i)||(_c=!0,s.add(i),t=X1.bind(null,t,e,i),e.then(t,t))}function X1(t,e,i){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Vt===t&&(Nt&i)===i&&($t===4||$t===3&&(Nt&62914560)===Nt&&300>ue()-Au?(Rt&2)===0&&Ya(t,0):Mc|=i,qa===Nt&&(qa=0)),cn(t)}function lm(t,e){e===0&&(e=Do()),t=Bi(t,e),t!==null&&(Ai(t,e),cn(t))}function G1(t){var e=t.memoizedState,i=0;e!==null&&(i=e.retryLane),lm(t,i)}function Z1(t,e){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,s=t.memoizedState;s!==null&&(i=s.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(e),lm(t,i)}function K1(t,e){return $e(t,e)}var Bu=null,Qa=null,Rc=!1,Uu=!1,Hc=!1,fi=0;function cn(t){t!==Qa&&t.next===null&&(Qa===null?Bu=Qa=t:Qa=Qa.next=t),Uu=!0,Rc||(Rc=!0,$1())}function Gl(t,e){if(!Hc&&Uu){Hc=!0;do for(var i=!1,l=Bu;l!==null;){if(t!==0){var s=l.pendingLanes;if(s===0)var c=0;else{var y=l.suspendedLanes,S=l.pingedLanes;c=(1<<31-ye(42|t)+1)-1,c&=s&~(y&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,rm(l,c))}else c=Nt,c=ca(l,l===Vt?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Ti(l,c)||(i=!0,rm(l,c));l=l.next}while(i);Hc=!1}}function k1(){om()}function om(){Uu=Rc=!1;var t=0;fi!==0&&ax()&&(t=fi);for(var e=ue(),i=null,l=Bu;l!==null;){var s=l.next,c=um(l,e);c===0?(l.next=null,i===null?Bu=s:i.next=s,s===null&&(Qa=i)):(i=l,(t!==0||(c&3)!==0)&&(Uu=!0)),l=s}ae!==0&&ae!==5||Gl(t),fi!==0&&(fi=0)}function um(t,e){for(var i=t.suspendedLanes,l=t.pingedLanes,s=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var y=31-ye(c),S=1<<y,D=s[y];D===-1?((S&i)===0||(S&l)!==0)&&(s[y]=$s(S,e)):D<=e&&(t.expiredLanes|=S),c&=~S}if(e=Vt,i=Nt,i=ca(t,t===e?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===e&&(jt===2||jt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&yn(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Ti(t,i)){if(e=i&-i,e===t.callbackPriority)return e;switch(l!==null&&yn(l),rl(i)){case 2:case 8:i=Xn;break;case 32:i=Ci;break;case 268435456:i=oa;break;default:i=Ci}return l=sm.bind(null,t),i=$e(i,l),t.callbackPriority=e,t.callbackNode=i,e}return l!==null&&l!==null&&yn(l),t.callbackPriority=2,t.callbackNode=null,2}function sm(t,e){if(ae!==0&&ae!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(ju()&&t.callbackNode!==i)return null;var l=Nt;return l=ca(t,t===Vt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(Xg(t,l,e),um(t,ue()),t.callbackNode!=null&&t.callbackNode===i?sm.bind(null,t):null)}function rm(t,e){if(ju())return null;Xg(t,e,!0)}function $1(){ox(function(){(Rt&6)!==0?$e(pn,k1):om()})}function jc(){if(fi===0){var t=Na;t===0&&(t=ua,ua<<=1,(ua&261888)===0&&(ua=256)),fi=t}return fi}function cm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Zo(""+t)}function fm(t,e){var i=e.ownerDocument.createElement("input");return i.name=e.name,i.value=e.value,t.id&&i.setAttribute("form",t.id),e.parentNode.insertBefore(i,e),t=new FormData(t),i.parentNode.removeChild(i),t}function F1(t,e,i,l,s){if(e==="submit"&&i&&i.stateNode===s){var c=cm((s[he]||null).action),y=l.submitter;y&&(e=(e=y[he]||null)?cm(e.formAction):y.getAttribute("formAction"),e!==null&&(c=e,y=null));var S=new Fo("action","action",null,l,s);t.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(fi!==0){var D=y?fm(s,y):new FormData(s);ec(i,{pending:!0,data:D,method:s.method,action:c},null,D)}}else typeof c=="function"&&(S.preventDefault(),D=y?fm(s,y):new FormData(s),ec(i,{pending:!0,data:D,method:s.method,action:c},c,D))},currentTarget:s}]})}}for(var Bc=0;Bc<vr.length;Bc++){var Uc=vr[Bc],J1=Uc.toLowerCase(),I1=Uc[0].toUpperCase()+Uc.slice(1);Je(J1,"on"+I1)}Je(Qd,"onAnimationEnd"),Je(Xd,"onAnimationIteration"),Je(Gd,"onAnimationStart"),Je("dblclick","onDoubleClick"),Je("focusin","onFocus"),Je("focusout","onBlur"),Je(h1,"onTransitionRun"),Je(g1,"onTransitionStart"),Je(m1,"onTransitionCancel"),Je(Zd,"onTransitionEnd"),$n("onMouseEnter",["mouseout","mouseover"]),$n("onMouseLeave",["mouseout","mouseover"]),$n("onPointerEnter",["pointerout","pointerover"]),$n("onPointerLeave",["pointerout","pointerover"]),bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="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(" "),W1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zl));function dm(t,e){e=(e&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],s=l.event;l=l.listeners;t:{var c=void 0;if(e)for(var y=l.length-1;0<=y;y--){var S=l[y],D=S.instance,K=S.currentTarget;if(S=S.listener,D!==c&&s.isPropagationStopped())break t;c=S,s.currentTarget=K;try{c(s)}catch(nt){Wo(nt)}s.currentTarget=null,c=D}else for(y=0;y<l.length;y++){if(S=l[y],D=S.instance,K=S.currentTarget,S=S.listener,D!==c&&s.isPropagationStopped())break t;c=S,s.currentTarget=K;try{c(s)}catch(nt){Wo(nt)}s.currentTarget=null,c=D}}}}function Mt(t,e){var i=e[fa];i===void 0&&(i=e[fa]=new Set);var l=t+"__bubble";i.has(l)||(hm(e,t,2,!1),i.add(l))}function qc(t,e,i){var l=0;e&&(l|=4),hm(i,t,l,e)}var qu="_reactListening"+Math.random().toString(36).slice(2);function Lc(t){if(!t[qu]){t[qu]=!0,Lo.forEach(function(i){i!=="selectionchange"&&(W1.has(i)||qc(i,!1,t),qc(i,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[qu]||(e[qu]=!0,qc("selectionchange",!1,e))}}function hm(t,e,i,l){switch(Qm(e)){case 2:var s=Cx;break;case 8:s=Nx;break;default:s=tf}i=s.bind(null,e,i,t),s=void 0,!lr||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),l?s!==void 0?t.addEventListener(e,i,{capture:!0,passive:s}):t.addEventListener(e,i,!0):s!==void 0?t.addEventListener(e,i,{passive:s}):t.addEventListener(e,i,!1)}function Yc(t,e,i,l,s){var c=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var S=l.stateNode.containerInfo;if(S===s)break;if(y===4)for(y=l.return;y!==null;){var D=y.tag;if((D===3||D===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;S!==null;){if(y=Gn(S),y===null)return;if(D=y.tag,D===5||D===6||D===26||D===27){l=c=y;continue t}S=S.parentNode}}l=l.return}vd(function(){var K=c,nt=ir(i),at=[];t:{var F=Kd.get(t);if(F!==void 0){var W=Fo,dt=t;switch(t){case"keypress":if(ko(i)===0)break t;case"keydown":case"keyup":W=Zv;break;case"focusin":dt="focus",W=rr;break;case"focusout":dt="blur",W=rr;break;case"beforeblur":case"afterblur":W=rr;break;case"click":if(i.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Rv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=$v;break;case Qd:case Xd:case Gd:W=Bv;break;case Zd:W=Jv;break;case"scroll":case"scrollend":W=Dv;break;case"wheel":W=Wv;break;case"copy":case"cut":case"paste":W=qv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=wd;break;case"toggle":case"beforetoggle":W=t1}var pt=(e&4)!==0,Yt=!pt&&(t==="scroll"||t==="scrollend"),V=pt?F!==null?F+"Capture":null:F;pt=[];for(var L=K,Z;L!==null;){var it=L;if(Z=it.stateNode,it=it.tag,it!==5&&it!==26&&it!==27||Z===null||V===null||(it=hl(L,V),it!=null&&pt.push(Kl(L,it,Z))),Yt)break;L=L.return}0<pt.length&&(F=new W(F,dt,null,i,nt),at.push({event:F,listeners:pt}))}}if((e&7)===0){t:{if(F=t==="mouseover"||t==="pointerover",W=t==="mouseout"||t==="pointerout",F&&i!==nr&&(dt=i.relatedTarget||i.fromElement)&&(Gn(dt)||dt[xn]))break t;if((W||F)&&(F=nt.window===nt?nt:(F=nt.ownerDocument)?F.defaultView||F.parentWindow:window,W?(dt=i.relatedTarget||i.toElement,W=K,dt=dt?Gn(dt):null,dt!==null&&(Yt=f(dt),pt=dt.tag,dt!==Yt||pt!==5&&pt!==27&&pt!==6)&&(dt=null)):(W=null,dt=K),W!==dt)){if(pt=Sd,it="onMouseLeave",V="onMouseEnter",L="mouse",(t==="pointerout"||t==="pointerover")&&(pt=wd,it="onPointerLeave",V="onPointerEnter",L="pointer"),Yt=W==null?F:Kn(W),Z=dt==null?F:Kn(dt),F=new pt(it,L+"leave",W,i,nt),F.target=Yt,F.relatedTarget=Z,it=null,Gn(nt)===K&&(pt=new pt(V,L+"enter",dt,i,nt),pt.target=Z,pt.relatedTarget=Yt,it=pt),Yt=it,W&&dt)e:{for(pt=P1,V=W,L=dt,Z=0,it=V;it;it=pt(it))Z++;it=0;for(var mt=L;mt;mt=pt(mt))it++;for(;0<Z-it;)V=pt(V),Z--;for(;0<it-Z;)L=pt(L),it--;for(;Z--;){if(V===L||L!==null&&V===L.alternate){pt=V;break e}V=pt(V),L=pt(L)}pt=null}else pt=null;W!==null&&gm(at,F,W,pt,!1),dt!==null&&Yt!==null&&gm(at,Yt,dt,pt,!0)}}t:{if(F=K?Kn(K):window,W=F.nodeName&&F.nodeName.toLowerCase(),W==="select"||W==="input"&&F.type==="file")var Dt=Dd;else if(Ad(F))if(Od)Dt=c1;else{Dt=s1;var ht=u1}else W=F.nodeName,!W||W.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?K&&er(K.elementType)&&(Dt=Dd):Dt=r1;if(Dt&&(Dt=Dt(t,K))){zd(at,Dt,i,nt);break t}ht&&ht(t,F,K),t==="focusout"&&K&&F.type==="number"&&K.memoizedProps.value!=null&&dl(F,"number",F.value)}switch(ht=K?Kn(K):window,t){case"focusin":(Ad(ht)||ht.contentEditable==="true")&&(xa=ht,mr=K,Sl=null);break;case"focusout":Sl=mr=xa=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,Yd(at,i,nt);break;case"selectionchange":if(d1)break;case"keydown":case"keyup":Yd(at,i,nt)}var wt;if(fr)t:{switch(t){case"compositionstart":var Tt="onCompositionStart";break t;case"compositionend":Tt="onCompositionEnd";break t;case"compositionupdate":Tt="onCompositionUpdate";break t}Tt=void 0}else va?Nd(t,i)&&(Tt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Tt="onCompositionStart");Tt&&(_d&&i.locale!=="ko"&&(va||Tt!=="onCompositionStart"?Tt==="onCompositionEnd"&&va&&(wt=xd()):(Fn=nt,or="value"in Fn?Fn.value:Fn.textContent,va=!0)),ht=Lu(K,Tt),0<ht.length&&(Tt=new Ed(Tt,t,null,i,nt),at.push({event:Tt,listeners:ht}),wt?Tt.data=wt:(wt=Td(i),wt!==null&&(Tt.data=wt)))),(wt=n1?i1(t,i):a1(t,i))&&(Tt=Lu(K,"onBeforeInput"),0<Tt.length&&(ht=new Ed("onBeforeInput","beforeinput",null,i,nt),at.push({event:ht,listeners:Tt}),ht.data=wt)),F1(at,t,K,i,nt)}dm(at,e)})}function Kl(t,e,i){return{instance:t,listener:e,currentTarget:i}}function Lu(t,e){for(var i=e+"Capture",l=[];t!==null;){var s=t,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=hl(t,i),s!=null&&l.unshift(Kl(t,s,c)),s=hl(t,e),s!=null&&l.push(Kl(t,s,c))),t.tag===3)return l;t=t.return}return[]}function P1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function gm(t,e,i,l,s){for(var c=e._reactName,y=[];i!==null&&i!==l;){var S=i,D=S.alternate,K=S.stateNode;if(S=S.tag,D!==null&&D===l)break;S!==5&&S!==26&&S!==27||K===null||(D=K,s?(K=hl(i,c),K!=null&&y.unshift(Kl(i,K,D))):s||(K=hl(i,c),K!=null&&y.push(Kl(i,K,D)))),i=i.return}y.length!==0&&t.push({event:e,listeners:y})}var tx=/\r\n?/g,ex=/\u0000|\uFFFD/g;function mm(t){return(typeof t=="string"?t:""+t).replace(tx,`
9
+ `).replace(ex,"")}function ym(t,e){return e=mm(e),mm(t)===e}function Lt(t,e,i,l,s,c){switch(i){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||ma(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&ma(t,""+l);break;case"className":ha(t,"class",l);break;case"tabIndex":ha(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ha(t,i,l);break;case"style":yd(t,l,c);break;case"data":if(e!=="object"){ha(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=Zo(""+l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"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 c=="function"&&(i==="formAction"?(e!=="input"&&Lt(t,e,"name",s.name,s,null),Lt(t,e,"formEncType",s.formEncType,s,null),Lt(t,e,"formMethod",s.formMethod,s,null),Lt(t,e,"formTarget",s.formTarget,s,null)):(Lt(t,e,"encType",s.encType,s,null),Lt(t,e,"method",s.method,s,null),Lt(t,e,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=Zo(""+l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=En);break;case"onScroll":l!=null&&Mt("scroll",t);break;case"onScrollEnd":l!=null&&Mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(i=l.__html,i!=null){if(s.children!=null)throw Error(u(60));t.innerHTML=i}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}i=Zo(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""+l):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Mt("beforetoggle",t),Mt("toggle",t),da(t,"popover",l);break;case"xlinkActuate":Fe(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Fe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Fe(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Fe(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Fe(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Fe(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":da(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Av.get(i)||i,da(t,i,l))}}function Vc(t,e,i,l,s,c){switch(i){case"style":yd(t,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(i=l.__html,i!=null){if(s.children!=null)throw Error(u(60));t.innerHTML=i}}break;case"children":typeof l=="string"?ma(t,l):(typeof l=="number"||typeof l=="bigint")&&ma(t,""+l);break;case"onScroll":l!=null&&Mt("scroll",t);break;case"onScrollEnd":l!=null&&Mt("scrollend",t);break;case"onClick":l!=null&&(t.onclick=En);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yo.hasOwnProperty(i))t:{if(i[0]==="o"&&i[1]==="n"&&(s=i.endsWith("Capture"),e=i.slice(2,s?i.length-7:void 0),c=t[he]||null,c=c!=null?c[i]:null,typeof c=="function"&&t.removeEventListener(e,c,s),typeof l=="function")){typeof c!="function"&&c!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(e,l,s);break t}i in t?t[i]=l:l===!0?t.setAttribute(i,""):da(t,i,l)}}}function fe(t,e,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mt("error",t),Mt("load",t);var l=!1,s=!1,c;for(c in i)if(i.hasOwnProperty(c)){var y=i[c];if(y!=null)switch(c){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,e));default:Lt(t,e,c,y,i,null)}}s&&Lt(t,e,"srcSet",i.srcSet,i,null),l&&Lt(t,e,"src",i.src,i,null);return;case"input":Mt("invalid",t);var S=c=y=s=null,D=null,K=null;for(l in i)if(i.hasOwnProperty(l)){var nt=i[l];if(nt!=null)switch(l){case"name":s=nt;break;case"type":y=nt;break;case"checked":D=nt;break;case"defaultChecked":K=nt;break;case"value":c=nt;break;case"defaultValue":S=nt;break;case"children":case"dangerouslySetInnerHTML":if(nt!=null)throw Error(u(137,e));break;default:Lt(t,e,l,nt,i,null)}}Go(t,c,S,D,K,y,s,!1);return;case"select":Mt("invalid",t),l=y=c=null;for(s in i)if(i.hasOwnProperty(s)&&(S=i[s],S!=null))switch(s){case"value":c=S;break;case"defaultValue":y=S;break;case"multiple":l=S;default:Lt(t,e,s,S,i,null)}e=c,i=y,t.multiple=!!l,e!=null?Sn(t,!!l,e,!1):i!=null&&Sn(t,!!l,i,!0);return;case"textarea":Mt("invalid",t),c=s=l=null;for(y in i)if(i.hasOwnProperty(y)&&(S=i[y],S!=null))switch(y){case"value":l=S;break;case"defaultValue":s=S;break;case"children":c=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(u(91));break;default:Lt(t,e,y,S,i,null)}gd(t,l,s,c);return;case"option":for(D in i)i.hasOwnProperty(D)&&(l=i[D],l!=null)&&(D==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":Lt(t,e,D,l,i,null));return;case"dialog":Mt("beforetoggle",t),Mt("toggle",t),Mt("cancel",t),Mt("close",t);break;case"iframe":case"object":Mt("load",t);break;case"video":case"audio":for(l=0;l<Zl.length;l++)Mt(Zl[l],t);break;case"image":Mt("error",t),Mt("load",t);break;case"details":Mt("toggle",t);break;case"embed":case"source":case"link":Mt("error",t),Mt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in i)if(i.hasOwnProperty(K)&&(l=i[K],l!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,e));default:Lt(t,e,K,l,i,null)}return;default:if(er(e)){for(nt in i)i.hasOwnProperty(nt)&&(l=i[nt],l!==void 0&&Vc(t,e,nt,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&Lt(t,e,S,l,i,null))}function nx(t,e,i,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,y=null,S=null,D=null,K=null,nt=null;for(W in i){var at=i[W];if(i.hasOwnProperty(W)&&at!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":D=at;default:l.hasOwnProperty(W)||Lt(t,e,W,null,l,at)}}for(var F in l){var W=l[F];if(at=i[F],l.hasOwnProperty(F)&&(W!=null||at!=null))switch(F){case"type":c=W;break;case"name":s=W;break;case"checked":K=W;break;case"defaultChecked":nt=W;break;case"value":y=W;break;case"defaultValue":S=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(u(137,e));break;default:W!==at&&Lt(t,e,F,W,l,at)}}Oi(t,y,S,D,K,nt,c,s);return;case"select":W=y=S=F=null;for(c in i)if(D=i[c],i.hasOwnProperty(c)&&D!=null)switch(c){case"value":break;case"multiple":W=D;default:l.hasOwnProperty(c)||Lt(t,e,c,null,l,D)}for(s in l)if(c=l[s],D=i[s],l.hasOwnProperty(s)&&(c!=null||D!=null))switch(s){case"value":F=c;break;case"defaultValue":S=c;break;case"multiple":y=c;default:c!==D&&Lt(t,e,s,c,l,D)}e=S,i=y,l=W,F!=null?Sn(t,!!i,F,!1):!!l!=!!i&&(e!=null?Sn(t,!!i,e,!0):Sn(t,!!i,i?[]:"",!1));return;case"textarea":W=F=null;for(S in i)if(s=i[S],i.hasOwnProperty(S)&&s!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Lt(t,e,S,null,l,s)}for(y in l)if(s=l[y],c=i[y],l.hasOwnProperty(y)&&(s!=null||c!=null))switch(y){case"value":F=s;break;case"defaultValue":W=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==c&&Lt(t,e,y,s,l,c)}hd(t,F,W);return;case"option":for(var dt in i)F=i[dt],i.hasOwnProperty(dt)&&F!=null&&!l.hasOwnProperty(dt)&&(dt==="selected"?t.selected=!1:Lt(t,e,dt,null,l,F));for(D in l)F=l[D],W=i[D],l.hasOwnProperty(D)&&F!==W&&(F!=null||W!=null)&&(D==="selected"?t.selected=F&&typeof F!="function"&&typeof F!="symbol":Lt(t,e,D,F,l,W));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 pt in i)F=i[pt],i.hasOwnProperty(pt)&&F!=null&&!l.hasOwnProperty(pt)&&Lt(t,e,pt,null,l,F);for(K in l)if(F=l[K],W=i[K],l.hasOwnProperty(K)&&F!==W&&(F!=null||W!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(u(137,e));break;default:Lt(t,e,K,F,l,W)}return;default:if(er(e)){for(var Yt in i)F=i[Yt],i.hasOwnProperty(Yt)&&F!==void 0&&!l.hasOwnProperty(Yt)&&Vc(t,e,Yt,void 0,l,F);for(nt in l)F=l[nt],W=i[nt],!l.hasOwnProperty(nt)||F===W||F===void 0&&W===void 0||Vc(t,e,nt,F,l,W);return}}for(var V in i)F=i[V],i.hasOwnProperty(V)&&F!=null&&!l.hasOwnProperty(V)&&Lt(t,e,V,null,l,F);for(at in l)F=l[at],W=i[at],!l.hasOwnProperty(at)||F===W||F==null&&W==null||Lt(t,e,at,F,l,W)}function pm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ix(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var s=i[l],c=s.transferSize,y=s.initiatorType,S=s.duration;if(c&&S&&pm(y)){for(y=0,S=s.responseEnd,l+=1;l<i.length;l++){var D=i[l],K=D.startTime;if(K>S)break;var nt=D.transferSize,at=D.initiatorType;nt&&pm(at)&&(D=D.responseEnd,y+=nt*(D<S?1:(S-K)/(D-K)))}if(--l,e+=8*(c+y)/(s.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Qc=null,Xc=null;function Yu(t){return t.nodeType===9?t:t.ownerDocument}function vm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xm(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Gc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Zc=null;function ax(){var t=window.event;return t&&t.type==="popstate"?t===Zc?!1:(Zc=t,!0):(Zc=null,!1)}var bm=typeof setTimeout=="function"?setTimeout:void 0,lx=typeof clearTimeout=="function"?clearTimeout:void 0,Sm=typeof Promise=="function"?Promise:void 0,ox=typeof queueMicrotask=="function"?queueMicrotask:typeof Sm<"u"?function(t){return Sm.resolve(null).then(t).catch(ux)}:bm;function ux(t){setTimeout(function(){throw t})}function di(t){return t==="head"}function Em(t,e){var i=e,l=0;do{var s=i.nextSibling;if(t.removeChild(i),s&&s.nodeType===8)if(i=s.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(s),Ka(e);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")kl(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,kl(i);for(var c=i.firstChild;c;){var y=c.nextSibling,S=c.nodeName;c[zi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=y}}else i==="body"&&kl(t.ownerDocument.body);i=s}while(i);Ka(e)}function wm(t,e){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?e?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(e?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function Kc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var i=e;switch(e=e.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Kc(i),cl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function sx(t,e,i,l){for(;t.nodeType===1;){var s=i;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[zi])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==s.rel||t.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||t.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||t.getAttribute("title")!==(s.title==null?null:s.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(s.src==null?null:s.src)||t.getAttribute("type")!==(s.type==null?null:s.type)||t.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=Ge(t.nextSibling),t===null)break}return null}function rx(t,e,i){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Ge(t.nextSibling),t===null))return null;return t}function _m(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ge(t.nextSibling),t===null))return null;return t}function kc(t){return t.data==="$?"||t.data==="$~"}function $c(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function cx(t,e){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||i.readyState!=="loading")e();else{var l=function(){e(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Ge(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Fc=null;function Mm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(e===0)return Ge(t.nextSibling);e--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||e++}t=t.nextSibling}return null}function Cm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(e===0)return t;e--}else i!=="/$"&&i!=="/&"||e++}t=t.previousSibling}return null}function Nm(t,e,i){switch(e=Yu(i),t){case"html":if(t=e.documentElement,!t)throw Error(u(452));return t;case"head":if(t=e.head,!t)throw Error(u(453));return t;case"body":if(t=e.body,!t)throw Error(u(454));return t;default:throw Error(u(451))}}function kl(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);cl(t)}var Ze=new Map,Tm=new Set;function Vu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var qn=R.d;R.d={f:fx,r:dx,D:hx,C:gx,L:mx,m:yx,X:vx,S:px,M:xx};function fx(){var t=qn.f(),e=Ou();return t||e}function dx(t){var e=Zn(t);e!==null&&e.tag===5&&e.type==="form"?Zh(e):qn.r(t)}var Xa=typeof document>"u"?null:document;function Am(t,e,i){var l=Xa;if(l&&typeof e=="string"&&e){var s=xe(e);s='link[rel="'+t+'"][href="'+s+'"]',typeof i=="string"&&(s+='[crossorigin="'+i+'"]'),Tm.has(s)||(Tm.add(s),t={rel:t,crossOrigin:i,href:e},l.querySelector(s)===null&&(e=l.createElement("link"),fe(e,"link",t),It(e),l.head.appendChild(e)))}}function hx(t){qn.D(t),Am("dns-prefetch",t,null)}function gx(t,e){qn.C(t,e),Am("preconnect",t,e)}function mx(t,e,i){qn.L(t,e,i);var l=Xa;if(l&&t&&e){var s='link[rel="preload"][as="'+xe(e)+'"]';e==="image"&&i&&i.imageSrcSet?(s+='[imagesrcset="'+xe(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(s+='[imagesizes="'+xe(i.imageSizes)+'"]')):s+='[href="'+xe(t)+'"]';var c=s;switch(e){case"style":c=Ga(t);break;case"script":c=Za(t)}Ze.has(c)||(t=v({rel:"preload",href:e==="image"&&i&&i.imageSrcSet?void 0:t,as:e},i),Ze.set(c,t),l.querySelector(s)!==null||e==="style"&&l.querySelector($l(c))||e==="script"&&l.querySelector(Fl(c))||(e=l.createElement("link"),fe(e,"link",t),It(e),l.head.appendChild(e)))}}function yx(t,e){qn.m(t,e);var i=Xa;if(i&&t){var l=e&&typeof e.as=="string"?e.as:"script",s='link[rel="modulepreload"][as="'+xe(l)+'"][href="'+xe(t)+'"]',c=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Za(t)}if(!Ze.has(c)&&(t=v({rel:"modulepreload",href:t},e),Ze.set(c,t),i.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Fl(c)))return}l=i.createElement("link"),fe(l,"link",t),It(l),i.head.appendChild(l)}}}function px(t,e,i){qn.S(t,e,i);var l=Xa;if(l&&t){var s=kn(l).hoistableStyles,c=Ga(t);e=e||"default";var y=s.get(c);if(!y){var S={loading:0,preload:null};if(y=l.querySelector($l(c)))S.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":e},i),(i=Ze.get(c))&&Jc(t,i);var D=y=l.createElement("link");It(D),fe(D,"link",t),D._p=new Promise(function(K,nt){D.onload=K,D.onerror=nt}),D.addEventListener("load",function(){S.loading|=1}),D.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Qu(y,e,l)}y={type:"stylesheet",instance:y,count:1,state:S},s.set(c,y)}}}function vx(t,e){qn.X(t,e);var i=Xa;if(i&&t){var l=kn(i).hoistableScripts,s=Za(t),c=l.get(s);c||(c=i.querySelector(Fl(s)),c||(t=v({src:t,async:!0},e),(e=Ze.get(s))&&Ic(t,e),c=i.createElement("script"),It(c),fe(c,"link",t),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(s,c))}}function xx(t,e){qn.M(t,e);var i=Xa;if(i&&t){var l=kn(i).hoistableScripts,s=Za(t),c=l.get(s);c||(c=i.querySelector(Fl(s)),c||(t=v({src:t,async:!0,type:"module"},e),(e=Ze.get(s))&&Ic(t,e),c=i.createElement("script"),It(c),fe(c,"link",t),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(s,c))}}function zm(t,e,i,l){var s=(s=ct.current)?Vu(s):null;if(!s)throw Error(u(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(e=Ga(i.href),i=kn(s).hoistableStyles,l=i.get(e),l||(l={type:"style",instance:null,count:0,state:null},i.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=Ga(i.href);var c=kn(s).hoistableStyles,y=c.get(t);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,y),(c=s.querySelector($l(t)))&&!c._p&&(y.instance=c,y.state.loading=5),Ze.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ze.set(t,i),c||bx(s,t,i,y.state))),e&&l===null)throw Error(u(528,""));return y}if(e&&l!==null)throw Error(u(529,""));return null;case"script":return e=i.async,i=i.src,typeof i=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Za(i),i=kn(s).hoistableScripts,l=i.get(e),l||(l={type:"script",instance:null,count:0,state:null},i.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,t))}}function Ga(t){return'href="'+xe(t)+'"'}function $l(t){return'link[rel="stylesheet"]['+t+"]"}function Dm(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function bx(t,e,i,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),fe(e,"link",i),It(e),t.head.appendChild(e))}function Za(t){return'[src="'+xe(t)+'"]'}function Fl(t){return"script[async]"+t}function Om(t,e,i){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+xe(i.href)+'"]');if(l)return e.instance=l,It(l),l;var s=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),It(l),fe(l,"style",s),Qu(l,i.precedence,t),e.instance=l;case"stylesheet":s=Ga(i.href);var c=t.querySelector($l(s));if(c)return e.state.loading|=4,e.instance=c,It(c),c;l=Dm(i),(s=Ze.get(s))&&Jc(l,s),c=(t.ownerDocument||t).createElement("link"),It(c);var y=c;return y._p=new Promise(function(S,D){y.onload=S,y.onerror=D}),fe(c,"link",l),e.state.loading|=4,Qu(c,i.precedence,t),e.instance=c;case"script":return c=Za(i.src),(s=t.querySelector(Fl(c)))?(e.instance=s,It(s),s):(l=i,(s=Ze.get(c))&&(l=v({},i),Ic(l,s)),t=t.ownerDocument||t,s=t.createElement("script"),It(s),fe(s,"link",l),t.head.appendChild(s),e.instance=s);case"void":return null;default:throw Error(u(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,Qu(l,i.precedence,t));return e.instance}function Qu(t,e,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,c=s,y=0;y<l.length;y++){var S=l[y];if(S.dataset.precedence===e)c=S;else if(c!==s)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=i.nodeType===9?i.head:i,e.insertBefore(t,e.firstChild))}function Jc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Ic(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Xu=null;function Rm(t,e,i){if(Xu===null){var l=new Map,s=Xu=new Map;s.set(i,l)}else s=Xu,l=s.get(i),l||(l=new Map,s.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),s=0;s<i.length;s++){var c=i[s];if(!(c[zi]||c[ie]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(e)||"";y=t+y;var S=l.get(y);S?S.push(c):l.set(y,[c])}}return l}function Hm(t,e,i){t=t.ownerDocument||t,t.head.insertBefore(i,e==="title"?t.querySelector("head > title"):null)}function Sx(t,e,i){if(i===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function jm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Ex(t,e,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var s=Ga(l.href),c=e.querySelector($l(s));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Gu.bind(t),e.then(t,t)),i.state.loading|=4,i.instance=c,It(c);return}c=e.ownerDocument||e,l=Dm(l),(s=Ze.get(s))&&Jc(l,s),c=c.createElement("link"),It(c);var y=c;y._p=new Promise(function(S,D){y.onload=S,y.onerror=D}),fe(c,"link",l),i.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,e),(e=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=Gu.bind(t),e.addEventListener("load",i),e.addEventListener("error",i))}}var Wc=0;function wx(t,e){return t.stylesheets&&t.count===0&&Ku(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&Ku(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&Wc===0&&(Wc=62500*ix());var s=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ku(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>Wc?50:800)+e);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function Gu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ku(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Zu=null;function Ku(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Zu=new Map,e.forEach(_x,t),Zu=null,Gu.call(t))}function _x(t,e){if(!(e.state.loading&4)){var i=Zu.get(t);if(i)var l=i.get(null);else{i=new Map,Zu.set(t,i);for(var s=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var y=s[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(i.set(y.dataset.precedence,y),l=y)}l&&i.set(null,l)}s=e.instance,y=s.getAttribute("data-precedence"),c=i.get(y)||l,c===l&&i.set(null,s),i.set(y,s),this.count++,l=Gu.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),c?c.parentNode.insertBefore(s,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(s,t.firstChild)),e.state.loading|=4}}var Jl={$$typeof:w,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Mx(t,e,i,l,s,c,y,S,D){this.tag=1,this.containerInfo=t,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=ul(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.hiddenUpdates=ul(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Bm(t,e,i,l,s,c,y,S,D,K,nt,at){return t=new Mx(t,e,i,y,D,K,nt,at,S),e=1,c===!0&&(e|=24),c=ze(3,null,null,e),t.current=c,c.stateNode=t,e=Dr(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:l,isDehydrated:i,cache:e},jr(c),t}function Um(t){return t?(t=Ea,t):Ea}function qm(t,e,i,l,s,c){s=Um(s),l.context===null?l.context=s:l.pendingContext=s,l=ei(e),l.payload={element:i},c=c===void 0?null:c,c!==null&&(l.callback=c),i=ni(t,l,e),i!==null&&(Me(i,t,e),Tl(i,t,e))}function Lm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<e?i:e}}function Pc(t,e){Lm(t,e),(t=t.alternate)&&Lm(t,e)}function Ym(t){if(t.tag===13||t.tag===31){var e=Bi(t,67108864);e!==null&&Me(e,t,67108864),Pc(t,67108864)}}function Vm(t){if(t.tag===13||t.tag===31){var e=je();e=sl(e);var i=Bi(t,e);i!==null&&Me(i,t,e),Pc(t,e)}}var ku=!0;function Cx(t,e,i,l){var s=M.T;M.T=null;var c=R.p;try{R.p=2,tf(t,e,i,l)}finally{R.p=c,M.T=s}}function Nx(t,e,i,l){var s=M.T;M.T=null;var c=R.p;try{R.p=8,tf(t,e,i,l)}finally{R.p=c,M.T=s}}function tf(t,e,i,l){if(ku){var s=ef(l);if(s===null)Yc(t,e,l,$u,i),Xm(t,l);else if(Ax(s,t,e,i,l))l.stopPropagation();else if(Xm(t,l),e&4&&-1<Tx.indexOf(t)){for(;s!==null;){var c=Zn(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=vn(c.pendingLanes);if(y!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var D=1<<31-ye(y);S.entanglements[1]|=D,y&=~D}cn(c),(Rt&6)===0&&(zu=ue()+500,Gl(0))}}break;case 31:case 13:S=Bi(c,2),S!==null&&Me(S,c,2),Ou(),Pc(c,2)}if(c=ef(l),c===null&&Yc(t,e,l,$u,i),c===s)break;s=c}s!==null&&l.stopPropagation()}else Yc(t,e,l,null,i)}}function ef(t){return t=ir(t),nf(t)}var $u=null;function nf(t){if($u=null,t=Gn(t),t!==null){var e=f(t);if(e===null)t=null;else{var i=e.tag;if(i===13){if(t=d(e),t!==null)return t;t=null}else if(i===31){if(t=g(e),t!==null)return t;t=null}else if(i===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return $u=t,null}function Qm(t){switch(t){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(la()){case pn:return 2;case Xn:return 8;case Ci:case Qs:return 32;case oa:return 268435456;default:return 32}default:return 32}}var af=!1,hi=null,gi=null,mi=null,Il=new Map,Wl=new Map,yi=[],Tx="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 Xm(t,e){switch(t){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Il.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wl.delete(e.pointerId)}}function Pl(t,e,i,l,s,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:i,eventSystemFlags:l,nativeEvent:c,targetContainers:[s]},e!==null&&(e=Zn(e),e!==null&&Ym(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Ax(t,e,i,l,s){switch(e){case"focusin":return hi=Pl(hi,t,e,i,l,s),!0;case"dragenter":return gi=Pl(gi,t,e,i,l,s),!0;case"mouseover":return mi=Pl(mi,t,e,i,l,s),!0;case"pointerover":var c=s.pointerId;return Il.set(c,Pl(Il.get(c)||null,t,e,i,l,s)),!0;case"gotpointercapture":return c=s.pointerId,Wl.set(c,Pl(Wl.get(c)||null,t,e,i,l,s)),!0}return!1}function Gm(t){var e=Gn(t.target);if(e!==null){var i=f(e);if(i!==null){if(e=i.tag,e===13){if(e=d(i),e!==null){t.blockedOn=e,Bo(t.priority,function(){Vm(i)});return}}else if(e===31){if(e=g(i),e!==null){t.blockedOn=e,Bo(t.priority,function(){Vm(i)});return}}else if(e===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Fu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var i=ef(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);nr=l,i.target.dispatchEvent(l),nr=null}else return e=Zn(i),e!==null&&Ym(e),t.blockedOn=i,!1;e.shift()}return!0}function Zm(t,e,i){Fu(t)&&i.delete(e)}function zx(){af=!1,hi!==null&&Fu(hi)&&(hi=null),gi!==null&&Fu(gi)&&(gi=null),mi!==null&&Fu(mi)&&(mi=null),Il.forEach(Zm),Wl.forEach(Zm)}function Ju(t,e){t.blockedOn===e&&(t.blockedOn=null,af||(af=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,zx)))}var Iu=null;function Km(t){Iu!==t&&(Iu=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Iu===t&&(Iu=null);for(var e=0;e<t.length;e+=3){var i=t[e],l=t[e+1],s=t[e+2];if(typeof l!="function"){if(nf(l||i)===null)continue;break}var c=Zn(i);c!==null&&(t.splice(e,3),e-=3,ec(c,{pending:!0,data:s,method:i.method,action:l},l,s))}}))}function Ka(t){function e(D){return Ju(D,t)}hi!==null&&Ju(hi,t),gi!==null&&Ju(gi,t),mi!==null&&Ju(mi,t),Il.forEach(e),Wl.forEach(e);for(var i=0;i<yi.length;i++){var l=yi[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<yi.length&&(i=yi[0],i.blockedOn===null);)Gm(i),i.blockedOn===null&&yi.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var s=i[l],c=i[l+1],y=s[he]||null;if(typeof c=="function")y||Km(i);else if(y){var S=null;if(c&&c.hasAttribute("formAction")){if(s=c,y=c[he]||null)S=y.formAction;else if(nf(s)!==null)continue}else S=y.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),Km(i)}}}function km(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function e(){s!==null&&(s(),s=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),s!==null&&(s(),s=null)}}}function lf(t){this._internalRoot=t}Wu.prototype.render=lf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(u(409));var i=e.current,l=je();qm(i,l,t,e,null,null)},Wu.prototype.unmount=lf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;qm(t.current,2,null,t,null,null),Ou(),e[xn]=null}};function Wu(t){this._internalRoot=t}Wu.prototype.unstable_scheduleHydration=function(t){if(t){var e=jo();t={blockedOn:null,target:t,priority:e};for(var i=0;i<yi.length&&e!==0&&e<yi[i].priority;i++);yi.splice(i,0,t),i===0&&Gm(t)}};var $m=a.version;if($m!=="19.2.4")throw Error(u(527,$m,"19.2.4"));R.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(u(188)):(t=Object.keys(t).join(","),Error(u(268,t)));return t=h(e),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Dx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{Ni=Pu.inject(Dx),me=Pu}catch{}}return eo.createRoot=function(t,e){if(!r(t))throw Error(u(299));var i=!1,l="",s=eg,c=ng,y=ig;return e!=null&&(e.unstable_strictMode===!0&&(i=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(s=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(y=e.onRecoverableError)),e=Bm(t,1,!1,null,null,i,l,null,s,c,y,km),t[xn]=e.current,Lc(t),new lf(e)},eo.hydrateRoot=function(t,e,i){if(!r(t))throw Error(u(299));var l=!1,s="",c=eg,y=ng,S=ig,D=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(D=i.formState)),e=Bm(t,1,!0,e,i??null,l,s,D,c,y,S,km),e.context=Um(null),i=e.current,l=je(),l=sl(l),s=ei(l),s.callback=null,ni(i,s,l),i=l,e.current.lanes=i,Ai(e,i),cn(e),t[xn]=e.current,Lc(t),new Wu(e)},eo.version="19.2.4",eo}var a0;function Yx(){if(a0)return sf.exports;a0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sf.exports=Lx(),sf.exports}var Vx=Yx(),wo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qx={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)},Xx=class{#t=Qx;#e=!1;setTimeoutProvider(n){this.#t=n}setTimeout(n,a){return this.#t.setTimeout(n,a)}clearTimeout(n){this.#t.clearTimeout(n)}setInterval(n,a){return this.#t.setInterval(n,a)}clearInterval(n){this.#t.clearInterval(n)}},Ji=new Xx;function Gx(n){setTimeout(n,0)}var ta=typeof window>"u"||"Deno"in globalThis;function Ce(){}function Zx(n,a){return typeof n=="function"?n(a):n}function Cf(n){return typeof n=="number"&&n>=0&&n!==1/0}function Ty(n,a){return Math.max(n+(a||0)-Date.now(),0)}function Ei(n,a){return typeof n=="function"?n(a):n}function Ke(n,a){return typeof n=="function"?n(a):n}function l0(n,a){const{type:o="all",exact:u,fetchStatus:r,predicate:f,queryKey:d,stale:g}=n;if(d){if(u){if(a.queryHash!==Kf(d,a.options))return!1}else if(!fo(a.queryKey,d))return!1}if(o!=="all"){const m=a.isActive();if(o==="active"&&!m||o==="inactive"&&m)return!1}return!(typeof g=="boolean"&&a.isStale()!==g||r&&r!==a.state.fetchStatus||f&&!f(a))}function o0(n,a){const{exact:o,status:u,predicate:r,mutationKey:f}=n;if(f){if(!a.options.mutationKey)return!1;if(o){if(co(a.options.mutationKey)!==co(f))return!1}else if(!fo(a.options.mutationKey,f))return!1}return!(u&&a.state.status!==u||r&&!r(a))}function Kf(n,a){return(a?.queryKeyHashFn||co)(n)}function co(n){return JSON.stringify(n,(a,o)=>Tf(o)?Object.keys(o).sort().reduce((u,r)=>(u[r]=o[r],u),{}):o)}function fo(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(o=>fo(n[o],a[o])):!1}var Kx=Object.prototype.hasOwnProperty;function Ay(n,a,o=0){if(n===a)return n;if(o>500)return a;const u=u0(n)&&u0(a);if(!u&&!(Tf(n)&&Tf(a)))return a;const f=(u?n:Object.keys(n)).length,d=u?a:Object.keys(a),g=d.length,m=u?new Array(g):{};let h=0;for(let p=0;p<g;p++){const v=u?p:d[p],x=n[v],E=a[v];if(x===E){m[v]=x,(u?p<f:Kx.call(n,v))&&h++;continue}if(x===null||E===null||typeof x!="object"||typeof E!="object"){m[v]=E;continue}const b=Ay(x,E,o+1);m[v]=b,b===x&&h++}return f===g&&h===f?n:m}function Nf(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const o in n)if(n[o]!==a[o])return!1;return!0}function u0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Tf(n){if(!s0(n))return!1;const a=n.constructor;if(a===void 0)return!0;const o=a.prototype;return!(!s0(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function s0(n){return Object.prototype.toString.call(n)==="[object Object]"}function kx(n){return new Promise(a=>{Ji.setTimeout(a,n)})}function Af(n,a,o){return typeof o.structuralSharing=="function"?o.structuralSharing(n,a):o.structuralSharing!==!1?Ay(n,a):a}function $x(n,a,o=0){const u=[...n,a];return o&&u.length>o?u.slice(1):u}function Fx(n,a,o=0){const u=[a,...n];return o&&u.length>o?u.slice(0,-1):u}var kf=Symbol();function zy(n,a){return!n.queryFn&&a?.initialPromise?()=>a.initialPromise:!n.queryFn||n.queryFn===kf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Dy(n,a){return typeof n=="function"?n(...a):!!n}function Jx(n,a,o){let u=!1,r;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(r??=a(),u||(u=!0,r.aborted?o():r.addEventListener("abort",o,{once:!0})),r)}),n}var Ix=class extends wo{#t;#e;#n;constructor(){super(),this.#n=n=>{if(!ta&&window.addEventListener){const a=()=>n();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(n){this.#t!==n&&(this.#t=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(a=>{a(n)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},$f=new Ix;function zf(){let n,a;const o=new Promise((r,f)=>{n=r,a=f});o.status="pending",o.catch(()=>{});function u(r){Object.assign(o,r),delete o.resolve,delete o.reject}return o.resolve=r=>{u({status:"fulfilled",value:r}),n(r)},o.reject=r=>{u({status:"rejected",reason:r}),a(r)},o}var Wx=Gx;function Px(){let n=[],a=0,o=g=>{g()},u=g=>{g()},r=Wx;const f=g=>{a?n.push(g):r(()=>{o(g)})},d=()=>{const g=n;n=[],g.length&&r(()=>{u(()=>{g.forEach(m=>{o(m)})})})};return{batch:g=>{let m;a++;try{m=g()}finally{a--,a||d()}return m},batchCalls:g=>(...m)=>{f(()=>{g(...m)})},schedule:f,setNotifyFunction:g=>{o=g},setBatchNotifyFunction:g=>{u=g},setScheduler:g=>{r=g}}}var de=Px(),tb=class extends wo{#t=!0;#e;#n;constructor(){super(),this.#n=n=>{if(!ta&&window.addEventListener){const a=()=>n(!0),o=()=>n(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(this.setOnline.bind(this))}setOnline(n){this.#t!==n&&(this.#t=n,this.listeners.forEach(o=>{o(n)}))}isOnline(){return this.#t}},ys=new tb;function eb(n){return Math.min(1e3*2**n,3e4)}function Oy(n){return(n??"online")==="online"?ys.isOnline():!0}var Df=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Ry(n){let a=!1,o=0,u;const r=zf(),f=()=>r.status!=="pending",d=_=>{if(!f()){const T=new Df(_);x(T),n.onCancel?.(T)}},g=()=>{a=!0},m=()=>{a=!1},h=()=>$f.isFocused()&&(n.networkMode==="always"||ys.isOnline())&&n.canRun(),p=()=>Oy(n.networkMode)&&n.canRun(),v=_=>{f()||(u?.(),r.resolve(_))},x=_=>{f()||(u?.(),r.reject(_))},E=()=>new Promise(_=>{u=T=>{(f()||h())&&_(T)},n.onPause?.()}).then(()=>{u=void 0,f()||n.onContinue?.()}),b=()=>{if(f())return;let _;const T=o===0?n.initialPromise:void 0;try{_=T??n.fn()}catch(N){_=Promise.reject(N)}Promise.resolve(_).then(v).catch(N=>{if(f())return;const q=n.retry??(ta?0:3),w=n.retryDelay??eb,A=typeof w=="function"?w(o,N):w,Y=q===!0||typeof q=="number"&&o<q||typeof q=="function"&&q(o,N);if(a||!Y){x(N);return}o++,n.onFail?.(o,N),kx(A).then(()=>h()?void 0:E()).then(()=>{a?x(N):b()})})};return{promise:r,status:()=>r.status,cancel:d,continue:()=>(u?.(),r),cancelRetry:g,continueRetry:m,canStart:p,start:()=>(p()?b():E().then(b),r)}}var Hy=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cf(this.gcTime)&&(this.#t=Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ta?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Ji.clearTimeout(this.#t),this.#t=void 0)}},nb=class extends Hy{#t;#e;#n;#a;#i;#u;#o;constructor(n){super(),this.#o=!1,this.#u=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#a=n.client,this.#n=this.#a.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#t=c0(this.options),this.state=n.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(n){if(this.options={...this.#u,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=c0(this.options);a.data!==void 0&&(this.setState(r0(a.data,a.dataUpdatedAt)),this.#t=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,a){const o=Af(this.state.data,n,this.options);return this.#l({data:o,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),o}setState(n,a){this.#l({type:"setState",state:n,setStateOptions:a})}cancel(n){const a=this.#i?.promise;return this.#i?.cancel(n),a?a.then(Ce).catch(Ce):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(n=>Ke(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Ei(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Ty(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(a=>a!==n),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(n,a){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(n&&this.setOptions(n),!this.options.queryFn){const g=this.observers.find(m=>m.options.queryFn);g&&this.setOptions(g.options)}const o=new AbortController,u=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(this.#o=!0,o.signal)})},r=()=>{const g=zy(this.options,a),h=(()=>{const p={client:this.#a,queryKey:this.queryKey,meta:this.meta};return u(p),p})();return this.#o=!1,this.options.persister?this.options.persister(g,h,this):g(h)},d=(()=>{const g={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:r};return u(g),g})();this.options.behavior?.onFetch(d,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta}),this.#i=Ry({initialPromise:a?.initialPromise,fn:d.fetchFn,onCancel:g=>{g instanceof Df&&g.revert&&this.setState({...this.#e,fetchStatus:"idle"}),o.abort()},onFail:(g,m)=>{this.#l({type:"failed",failureCount:g,error:m})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const g=await this.#i.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#n.config.onSuccess?.(g,this),this.#n.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof Df){if(g.silent)return this.#i.promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#l({type:"error",error:g}),this.#n.config.onError?.(g,this),this.#n.config.onSettled?.(this.state.data,g,this),g}finally{this.scheduleGc()}}#l(n){const a=o=>{switch(n.type){case"failed":return{...o,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...jy(o.data,this.options),fetchMeta:n.meta??null};case"success":const u={...o,...r0(n.data,n.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=n.manual?u:void 0,u;case"error":const r=n.error;return{...o,error:r,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...n.state}}};this.state=a(this.state),de.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function jy(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oy(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function r0(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function c0(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,o=a!==void 0,u=o?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:o?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var ib=class extends wo{constructor(n,a){super(),this.options=a,this.#t=n,this.#l=null,this.#o=zf(),this.bindMethods(),this.setOptions(a)}#t;#e=void 0;#n=void 0;#a=void 0;#i;#u;#o;#l;#m;#d;#h;#r;#c;#s;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),f0(this.#e,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Of(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Of(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#e.removeObserver(this)}setOptions(n){const a=this.options,o=this.#e;if(this.options=this.#t.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#e.setOptions(this.options),a._defaulted&&!Nf(this.options,a)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const u=this.hasListeners();u&&d0(this.#e,o,this.options,a)&&this.#f(),this.updateResult(),u&&(this.#e!==o||Ke(this.options.enabled,this.#e)!==Ke(a.enabled,this.#e)||Ei(this.options.staleTime,this.#e)!==Ei(a.staleTime,this.#e))&&this.#y();const r=this.#p();u&&(this.#e!==o||Ke(this.options.enabled,this.#e)!==Ke(a.enabled,this.#e)||r!==this.#s)&&this.#v(r)}getOptimisticResult(n){const a=this.#t.getQueryCache().build(this.#t,n),o=this.createResult(a,n);return lb(this,o)&&(this.#a=o,this.#u=this.options,this.#i=this.#e.state),o}getCurrentResult(){return this.#a}trackResult(n,a){return new Proxy(n,{get:(o,u)=>(this.trackProp(u),a?.(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,u))})}trackProp(n){this.#g.add(n)}getCurrentQuery(){return this.#e}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const a=this.#t.defaultQueryOptions(n),o=this.#t.getQueryCache().build(this.#t,a);return o.fetch().then(()=>this.createResult(o,a))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(n){this.#E();let a=this.#e.fetch(this.options,n);return n?.throwOnError||(a=a.catch(Ce)),a}#y(){this.#b();const n=Ei(this.options.staleTime,this.#e);if(ta||this.#a.isStale||!Cf(n))return;const o=Ty(this.#a.dataUpdatedAt,n)+1;this.#r=Ji.setTimeout(()=>{this.#a.isStale||this.updateResult()},o)}#p(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#s=n,!(ta||Ke(this.options.enabled,this.#e)===!1||!Cf(this.#s)||this.#s===0)&&(this.#c=Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||$f.isFocused())&&this.#f()},this.#s))}#x(){this.#y(),this.#v(this.#p())}#b(){this.#r&&(Ji.clearTimeout(this.#r),this.#r=void 0)}#S(){this.#c&&(Ji.clearInterval(this.#c),this.#c=void 0)}createResult(n,a){const o=this.#e,u=this.options,r=this.#a,f=this.#i,d=this.#u,m=n!==o?n.state:this.#n,{state:h}=n;let p={...h},v=!1,x;if(a._optimisticResults){const X=this.hasListeners(),$=!X&&f0(n,a),ot=X&&d0(n,o,a,u);($||ot)&&(p={...p,...jy(h.data,n.options)}),a._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:E,errorUpdatedAt:b,status:_}=p;x=p.data;let T=!1;if(a.placeholderData!==void 0&&x===void 0&&_==="pending"){let X;r?.isPlaceholderData&&a.placeholderData===d?.placeholderData?(X=r.data,T=!0):X=typeof a.placeholderData=="function"?a.placeholderData(this.#h?.state.data,this.#h):a.placeholderData,X!==void 0&&(_="success",x=Af(r?.data,X,a),v=!0)}if(a.select&&x!==void 0&&!T)if(r&&x===f?.data&&a.select===this.#m)x=this.#d;else try{this.#m=a.select,x=a.select(x),x=Af(r?.data,x,a),this.#d=x,this.#l=null}catch(X){this.#l=X}this.#l&&(E=this.#l,x=this.#d,b=Date.now(),_="error");const N=p.fetchStatus==="fetching",q=_==="pending",w=_==="error",A=q&&N,Y=x!==void 0,j={status:_,fetchStatus:p.fetchStatus,isPending:q,isSuccess:_==="success",isError:w,isInitialLoading:A,isLoading:A,data:x,dataUpdatedAt:p.dataUpdatedAt,error:E,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>m.dataUpdateCount||p.errorUpdateCount>m.errorUpdateCount,isFetching:N,isRefetching:N&&!q,isLoadingError:w&&!Y,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:w&&Y,isStale:Ff(n,a),refetch:this.refetch,promise:this.#o,isEnabled:Ke(a.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const X=j.data!==void 0,$=j.status==="error"&&!X,ot=lt=>{$?lt.reject(j.error):X&&lt.resolve(j.data)},k=()=>{const lt=this.#o=j.promise=zf();ot(lt)},I=this.#o;switch(I.status){case"pending":n.queryHash===o.queryHash&&ot(I);break;case"fulfilled":($||j.data!==I.value)&&k();break;case"rejected":(!$||j.error!==I.reason)&&k();break}}return j}updateResult(){const n=this.#a,a=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#u=this.options,this.#i.data!==void 0&&(this.#h=this.#e),Nf(a,n))return;this.#a=a;const o=()=>{if(!n)return!0;const{notifyOnChangeProps:u}=this.options,r=typeof u=="function"?u():u;if(r==="all"||!r&&!this.#g.size)return!0;const f=new Set(r??this.#g);return this.options.throwOnError&&f.add("error"),Object.keys(this.#a).some(d=>{const g=d;return this.#a[g]!==n[g]&&f.has(g)})};this.#w({listeners:o()})}#E(){const n=this.#t.getQueryCache().build(this.#t,this.options);if(n===this.#e)return;const a=this.#e;this.#e=n,this.#n=n.state,this.hasListeners()&&(a?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#w(n){de.batch(()=>{n.listeners&&this.listeners.forEach(a=>{a(this.#a)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ab(n,a){return Ke(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function f0(n,a){return ab(n,a)||n.state.data!==void 0&&Of(n,a,a.refetchOnMount)}function Of(n,a,o){if(Ke(a.enabled,n)!==!1&&Ei(a.staleTime,n)!=="static"){const u=typeof o=="function"?o(n):o;return u==="always"||u!==!1&&Ff(n,a)}return!1}function d0(n,a,o,u){return(n!==a||Ke(u.enabled,n)===!1)&&(!o.suspense||n.state.status!=="error")&&Ff(n,o)}function Ff(n,a){return Ke(a.enabled,n)!==!1&&n.isStaleByTime(Ei(a.staleTime,n))}function lb(n,a){return!Nf(n.getCurrentResult(),a)}function h0(n){return{onFetch:(a,o)=>{const u=a.options,r=a.fetchOptions?.meta?.fetchMore?.direction,f=a.state.data?.pages||[],d=a.state.data?.pageParams||[];let g={pages:[],pageParams:[]},m=0;const h=async()=>{let p=!1;const v=b=>{Jx(b,()=>a.signal,()=>p=!0)},x=zy(a.options,a.fetchOptions),E=async(b,_,T)=>{if(p)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const q=(()=>{const B={client:a.client,queryKey:a.queryKey,pageParam:_,direction:T?"backward":"forward",meta:a.options.meta};return v(B),B})(),w=await x(q),{maxPages:A}=a.options,Y=T?Fx:$x;return{pages:Y(b.pages,w,A),pageParams:Y(b.pageParams,_,A)}};if(r&&f.length){const b=r==="backward",_=b?ob:g0,T={pages:f,pageParams:d},N=_(u,T);g=await E(T,N,b)}else{const b=n??f.length;do{const _=m===0?d[0]??u.initialPageParam:g0(u,g);if(m>0&&_==null)break;g=await E(g,_),m++}while(m<b)}return g};a.options.persister?a.fetchFn=()=>a.options.persister?.(h,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},o):a.fetchFn=h}}}function g0(n,{pages:a,pageParams:o}){const u=a.length-1;return a.length>0?n.getNextPageParam(a[u],a,o[u],o):void 0}function ob(n,{pages:a,pageParams:o}){return a.length>0?n.getPreviousPageParam?.(a[0],a,o[0],o):void 0}var ub=class extends Hy{#t;#e;#n;#a;constructor(n){super(),this.#t=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#e=[],this.state=n.state||sb(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#e.includes(n)||(this.#e.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#e=this.#e.filter(a=>a!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(n){const a=()=>{this.#i({type:"continue"})},o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=Ry({fn:()=>this.options.mutationFn?this.options.mutationFn(n,o):Promise.reject(new Error("No mutationFn found")),onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const u=this.state.status==="pending",r=!this.#a.canStart();try{if(u)a();else{this.#i({type:"pending",variables:n,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,o);const d=await this.options.onMutate?.(n,o);d!==this.state.context&&this.#i({type:"pending",context:d,variables:n,isPaused:r})}const f=await this.#a.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,o),await this.options.onSuccess?.(f,n,this.state.context,o),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(f,null,n,this.state.context,o),this.#i({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,o)}catch(d){Promise.reject(d)}try{await this.options.onError?.(f,n,this.state.context,o)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,o)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,o)}catch(d){Promise.reject(d)}throw this.#i({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#i(n){const a=o=>{switch(n.type){case"failed":return{...o,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...o,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:n.error,failureCount:o.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=a(this.state),de.batch(()=>{this.#e.forEach(o=>{o.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function sb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rb=class extends wo{constructor(n={}){super(),this.config=n,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(n,a,o){const u=new ub({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(a),state:o});return this.add(u),u}add(n){this.#t.add(n);const a=ts(n);if(typeof a=="string"){const o=this.#e.get(a);o?o.push(n):this.#e.set(a,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#t.delete(n)){const a=ts(n);if(typeof a=="string"){const o=this.#e.get(a);if(o)if(o.length>1){const u=o.indexOf(n);u!==-1&&o.splice(u,1)}else o[0]===n&&this.#e.delete(a)}}this.notify({type:"removed",mutation:n})}canRun(n){const a=ts(n);if(typeof a=="string"){const u=this.#e.get(a)?.find(r=>r.state.status==="pending");return!u||u===n}else return!0}runNext(n){const a=ts(n);return typeof a=="string"?this.#e.get(a)?.find(u=>u!==n&&u.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){de.batch(()=>{this.#t.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(n){const a={exact:!0,...n};return this.getAll().find(o=>o0(a,o))}findAll(n={}){return this.getAll().filter(a=>o0(n,a))}notify(n){de.batch(()=>{this.listeners.forEach(a=>{a(n)})})}resumePausedMutations(){const n=this.getAll().filter(a=>a.state.isPaused);return de.batch(()=>Promise.all(n.map(a=>a.continue().catch(Ce))))}};function ts(n){return n.options.scope?.id}var cb=class extends wo{constructor(n={}){super(),this.config=n,this.#t=new Map}#t;build(n,a,o){const u=a.queryKey,r=a.queryHash??Kf(u,a);let f=this.get(r);return f||(f=new nb({client:n,queryKey:u,queryHash:r,options:n.defaultQueryOptions(a),state:o,defaultOptions:n.getQueryDefaults(u)}),this.add(f)),f}add(n){this.#t.has(n.queryHash)||(this.#t.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const a=this.#t.get(n.queryHash);a&&(n.destroy(),a===n&&this.#t.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){de.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#t.get(n)}getAll(){return[...this.#t.values()]}find(n){const a={exact:!0,...n};return this.getAll().find(o=>l0(a,o))}findAll(n={}){const a=this.getAll();return Object.keys(n).length>0?a.filter(o=>l0(n,o)):a}notify(n){de.batch(()=>{this.listeners.forEach(a=>{a(n)})})}onFocus(){de.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){de.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},fb=class{#t;#e;#n;#a;#i;#u;#o;#l;constructor(n={}){this.#t=n.queryCache||new cb,this.#e=n.mutationCache||new rb,this.#n=n.defaultOptions||{},this.#a=new Map,this.#i=new Map,this.#u=0}mount(){this.#u++,this.#u===1&&(this.#o=$f.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=ys.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#u--,this.#u===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(n){return this.#t.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#e.findAll({...n,status:"pending"}).length}getQueryData(n){const a=this.defaultQueryOptions({queryKey:n});return this.#t.get(a.queryHash)?.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),o=this.#t.build(this,a),u=o.state.data;return u===void 0?this.fetchQuery(n):(n.revalidateIfStale&&o.isStaleByTime(Ei(a.staleTime,o))&&this.prefetchQuery(a),Promise.resolve(u))}getQueriesData(n){return this.#t.findAll(n).map(({queryKey:a,state:o})=>{const u=o.data;return[a,u]})}setQueryData(n,a,o){const u=this.defaultQueryOptions({queryKey:n}),f=this.#t.get(u.queryHash)?.state.data,d=Zx(a,f);if(d!==void 0)return this.#t.build(this,u).setData(d,{...o,manual:!0})}setQueriesData(n,a,o){return de.batch(()=>this.#t.findAll(n).map(({queryKey:u})=>[u,this.setQueryData(u,a,o)]))}getQueryState(n){const a=this.defaultQueryOptions({queryKey:n});return this.#t.get(a.queryHash)?.state}removeQueries(n){const a=this.#t;de.batch(()=>{a.findAll(n).forEach(o=>{a.remove(o)})})}resetQueries(n,a){const o=this.#t;return de.batch(()=>(o.findAll(n).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const o={revert:!0,...a},u=de.batch(()=>this.#t.findAll(n).map(r=>r.cancel(o)));return Promise.all(u).then(Ce).catch(Ce)}invalidateQueries(n,a={}){return de.batch(()=>(this.#t.findAll(n).forEach(o=>{o.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},a)))}refetchQueries(n,a={}){const o={...a,cancelRefetch:a.cancelRefetch??!0},u=de.batch(()=>this.#t.findAll(n).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let f=r.fetch(void 0,o);return o.throwOnError||(f=f.catch(Ce)),r.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(u).then(Ce)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const o=this.#t.build(this,a);return o.isStaleByTime(Ei(a.staleTime,o))?o.fetch(a):Promise.resolve(o.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ce).catch(Ce)}fetchInfiniteQuery(n){return n.behavior=h0(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ce).catch(Ce)}ensureInfiniteQueryData(n){return n.behavior=h0(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return ys.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,a){this.#a.set(co(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...this.#a.values()],o={};return a.forEach(u=>{fo(n,u.queryKey)&&Object.assign(o,u.defaultOptions)}),o}setMutationDefaults(n,a){this.#i.set(co(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...this.#i.values()],o={};return a.forEach(u=>{fo(n,u.mutationKey)&&Object.assign(o,u.defaultOptions)}),o}defaultQueryOptions(n){if(n._defaulted)return n;const a={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Kf(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===kf&&(a.enabled=!1),a}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},By=J.createContext(void 0),db=n=>{const a=J.useContext(By);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},hb=({client:n,children:a})=>(J.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),z.jsx(By.Provider,{value:n,children:a})),Uy=J.createContext(!1),gb=()=>J.useContext(Uy);Uy.Provider;function mb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var yb=J.createContext(mb()),pb=()=>J.useContext(yb),vb=(n,a,o)=>{const u=o?.state.error&&typeof n.throwOnError=="function"?Dy(n.throwOnError,[o.state.error,o]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||u)&&(a.isReset()||(n.retryOnMount=!1))},xb=n=>{J.useEffect(()=>{n.clearReset()},[n])},bb=({result:n,errorResetBoundary:a,throwOnError:o,query:u,suspense:r})=>n.isError&&!a.isReset()&&!n.isFetching&&u&&(r&&n.data===void 0||Dy(o,[n.error,u])),Sb=n=>{if(n.suspense){const o=r=>r==="static"?r:Math.max(r??1e3,1e3),u=n.staleTime;n.staleTime=typeof u=="function"?(...r)=>o(u(...r)):o(u),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Eb=(n,a)=>n.isLoading&&n.isFetching&&!a,wb=(n,a)=>n?.suspense&&a.isPending,m0=(n,a,o)=>a.fetchOptimistic(n).catch(()=>{o.clearReset()});function _b(n,a,o){const u=gb(),r=pb(),f=db(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const g=f.getQueryCache().get(d.queryHash);d._optimisticResults=u?"isRestoring":"optimistic",Sb(d),vb(d,r,g),xb(r);const m=!f.getQueryCache().get(d.queryHash),[h]=J.useState(()=>new a(f,d)),p=h.getOptimisticResult(d),v=!u&&n.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(x=>{const E=v?h.subscribe(de.batchCalls(x)):Ce;return h.updateResult(),E},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),J.useEffect(()=>{h.setOptions(d)},[d,h]),wb(d,p))throw m0(d,h,r);if(bb({result:p,errorResetBoundary:r,throwOnError:d.throwOnError,query:g,suspense:d.suspense}))throw p.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(d,p),d.experimental_prefetchInRender&&!ta&&Eb(p,u)&&(m?m0(d,h,r):g?.promise)?.catch(Ce).finally(()=>{h.updateResult()}),d.notifyOnChangeProps?p:h.trackResult(p)}function Wa(n,a){return _b(n,ib)}const y0=n=>{let a;const o=new Set,u=(h,p)=>{const v=typeof h=="function"?h(a):h;if(!Object.is(v,a)){const x=a;a=p??(typeof v!="object"||v===null)?v:Object.assign({},a,v),o.forEach(E=>E(a,x))}},r=()=>a,g={setState:u,getState:r,getInitialState:()=>m,subscribe:h=>(o.add(h),()=>o.delete(h))},m=a=n(u,r,g);return g},Mb=(n=>n?y0(n):y0),Cb=n=>n;function Nb(n,a=Cb){const o=ao.useSyncExternalStore(n.subscribe,ao.useCallback(()=>a(n.getState()),[n,a]),ao.useCallback(()=>a(n.getInitialState()),[n,a]));return ao.useDebugValue(o),o}const p0=n=>{const a=Mb(n),o=u=>Nb(a,u);return Object.assign(o,a),o},Tb=(n=>n?p0(n):p0),gn=Tb(n=>({selectedVersion:null,compareFrom:null,compareTo:null,isCompareMode:!1,highlightedEdgeId:null,selectedTableId:null,selectedEdgeId:null,collapsedTables:new Set,setSelectedVersion:a=>n({selectedVersion:a}),selectMigration:a=>n({selectedVersion:a,selectedTableId:null,selectedEdgeId:null}),setCompareFrom:a=>n({compareFrom:a}),setCompareTo:a=>n({compareTo:a}),toggleCompareMode:()=>n(a=>({isCompareMode:!a.isCompareMode})),setHighlightedEdgeId:a=>n({highlightedEdgeId:a}),setSelectedTableId:a=>n({selectedTableId:a}),setSelectedEdgeId:a=>n({selectedEdgeId:a}),toggleTableCollapsed:a=>n(o=>{const u=new Set(o.collapsedTables);return u.has(a)?u.delete(a):u.add(a),{collapsedTables:u}})}));function Ab(){return document.getElementById("schema-trail-root")?.dataset.apiBase??"/migflow/api"}async function es(n){const a=await fetch(`${Ab()}${n}`,{headers:{Accept:"application/json"}});if(!a.ok)throw new Error(`API error ${a.status}: ${a.statusText}`);return a.json()}const Pa={getMigrations(){return es("/migrations").then(n=>n.migrations)},getMigrationDetail(n){return es(`/migrations/${n}`).then(a=>a.migration)},getDiff(n,a){return es(`/diff?from=${n}&to=${a}`).then(o=>o.diff)},getWarnings(){return es("/warnings").then(n=>n.warnings)}},zb={create:"#58A6FF",add:"#3FB950",remove:"#F85149",drop:"#F85149",change:"#D29922",rename:"#D29922"};function Db(n){const a=n.toLowerCase();for(const[o,u]of Object.entries(zb))if(a.startsWith(o))return u;return"#7D8590"}function Ob(n){if(n.length<14)return n;const a=n.slice(0,4),o=n.slice(4,6),u=n.slice(6,8),r=n.slice(8,10),f=n.slice(10,12);return`${a}-${o}-${u} ${r}:${f}`}function Rb(){return z.jsx("div",{className:"animate-pulse px-4 py-3 border-b border-[#30363D]",children:z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsx("div",{className:"w-2 h-2 rounded-full bg-[#30363D]"}),z.jsxs("div",{className:"flex-1 space-y-1.5",children:[z.jsx("div",{className:"h-3 bg-[#30363D] rounded w-3/4"}),z.jsx("div",{className:"h-2.5 bg-[#30363D] rounded w-1/2"})]})]})})}function Hb({migration:n,isSelected:a,onSelect:o}){const u=Db(n.name);return z.jsxs("button",{onClick:()=>o(n.version),className:`w-full text-left px-4 py-3 border-b border-[#30363D] transition-colors duration-150 hover:bg-[#161B22] flex items-start gap-3 ${a?"bg-[#161B22] border-l-2 border-l-[#58A6FF]":""}`,children:[z.jsx("span",{className:"mt-1 w-2 h-2 rounded-full shrink-0",style:{backgroundColor:u}}),z.jsxs("div",{className:"flex-1 min-w-0",children:[z.jsx("p",{className:"text-xs font-mono text-[#7D8590] truncate",children:Ob(n.version)}),z.jsx("p",{className:"text-sm text-[#E6EDF3] truncate mt-0.5",children:n.name}),z.jsx("p",{className:"text-xs text-[#7D8590] truncate mt-0.5",children:n.summary})]})]})}function jb(){const{data:n,isLoading:a}=Wa({queryKey:["migrations"],queryFn:Pa.getMigrations}),{selectedVersion:o,selectMigration:u}=gn();return a?z.jsx("div",{children:Array.from({length:8}).map((r,f)=>z.jsx(Rb,{},f))}):n?.length?z.jsxs("div",{children:[z.jsxs("div",{className:"px-4 py-3 text-xs font-mono text-[#7D8590] uppercase tracking-widest border-b border-[#30363D]",children:["Migrations (",n.length,")"]}),[...n].reverse().map(r=>z.jsx(Hb,{migration:r,isSelected:o===r.version,onSelect:u},r.version))]}):z.jsx("div",{className:"flex items-center justify-center h-32 text-[#7D8590] text-sm",children:"No migrations found"})}function ne(n){if(typeof n=="string"||typeof n=="number")return""+n;let a="";if(Array.isArray(n))for(let o=0,u;o<n.length;o++)(u=ne(n[o]))!==""&&(a+=(a&&" ")+u);else for(let o in n)n[o]&&(a+=(a&&" ")+o);return a}var Bb={value:()=>{}};function zs(){for(var n=0,a=arguments.length,o={},u;n<a;++n){if(!(u=arguments[n]+"")||u in o||/[\s.]/.test(u))throw new Error("illegal type: "+u);o[u]=[]}return new fs(o)}function fs(n){this._=n}function Ub(n,a){return n.trim().split(/^|\s+/).map(function(o){var u="",r=o.indexOf(".");if(r>=0&&(u=o.slice(r+1),o=o.slice(0,r)),o&&!a.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:u}})}fs.prototype=zs.prototype={constructor:fs,on:function(n,a){var o=this._,u=Ub(n+"",o),r,f=-1,d=u.length;if(arguments.length<2){for(;++f<d;)if((r=(n=u[f]).type)&&(r=qb(o[r],n.name)))return r;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++f<d;)if(r=(n=u[f]).type)o[r]=v0(o[r],n.name,a);else if(a==null)for(r in o)o[r]=v0(o[r],n.name,null);return this},copy:function(){var n={},a=this._;for(var o in a)n[o]=a[o].slice();return new fs(n)},call:function(n,a){if((r=arguments.length-2)>0)for(var o=new Array(r),u=0,r,f;u<r;++u)o[u]=arguments[u+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(f=this._[n],u=0,r=f.length;u<r;++u)f[u].value.apply(a,o)},apply:function(n,a,o){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var u=this._[n],r=0,f=u.length;r<f;++r)u[r].value.apply(a,o)}};function qb(n,a){for(var o=0,u=n.length,r;o<u;++o)if((r=n[o]).name===a)return r.value}function v0(n,a,o){for(var u=0,r=n.length;u<r;++u)if(n[u].name===a){n[u]=Bb,n=n.slice(0,u).concat(n.slice(u+1));break}return o!=null&&n.push({name:a,value:o}),n}var Rf="http://www.w3.org/1999/xhtml";const x0={svg:"http://www.w3.org/2000/svg",xhtml:Rf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ds(n){var a=n+="",o=a.indexOf(":");return o>=0&&(a=n.slice(0,o))!=="xmlns"&&(n=n.slice(o+1)),x0.hasOwnProperty(a)?{space:x0[a],local:n}:n}function Lb(n){return function(){var a=this.ownerDocument,o=this.namespaceURI;return o===Rf&&a.documentElement.namespaceURI===Rf?a.createElement(n):a.createElementNS(o,n)}}function Yb(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function qy(n){var a=Ds(n);return(a.local?Yb:Lb)(a)}function Vb(){}function Jf(n){return n==null?Vb:function(){return this.querySelector(n)}}function Qb(n){typeof n!="function"&&(n=Jf(n));for(var a=this._groups,o=a.length,u=new Array(o),r=0;r<o;++r)for(var f=a[r],d=f.length,g=u[r]=new Array(d),m,h,p=0;p<d;++p)(m=f[p])&&(h=n.call(m,m.__data__,p,f))&&("__data__"in m&&(h.__data__=m.__data__),g[p]=h);return new Ue(u,this._parents)}function Xb(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function Gb(){return[]}function Ly(n){return n==null?Gb:function(){return this.querySelectorAll(n)}}function Zb(n){return function(){return Xb(n.apply(this,arguments))}}function Kb(n){typeof n=="function"?n=Zb(n):n=Ly(n);for(var a=this._groups,o=a.length,u=[],r=[],f=0;f<o;++f)for(var d=a[f],g=d.length,m,h=0;h<g;++h)(m=d[h])&&(u.push(n.call(m,m.__data__,h,d)),r.push(m));return new Ue(u,r)}function Yy(n){return function(){return this.matches(n)}}function Vy(n){return function(a){return a.matches(n)}}var kb=Array.prototype.find;function $b(n){return function(){return kb.call(this.children,n)}}function Fb(){return this.firstElementChild}function Jb(n){return this.select(n==null?Fb:$b(typeof n=="function"?n:Vy(n)))}var Ib=Array.prototype.filter;function Wb(){return Array.from(this.children)}function Pb(n){return function(){return Ib.call(this.children,n)}}function tS(n){return this.selectAll(n==null?Wb:Pb(typeof n=="function"?n:Vy(n)))}function eS(n){typeof n!="function"&&(n=Yy(n));for(var a=this._groups,o=a.length,u=new Array(o),r=0;r<o;++r)for(var f=a[r],d=f.length,g=u[r]=[],m,h=0;h<d;++h)(m=f[h])&&n.call(m,m.__data__,h,f)&&g.push(m);return new Ue(u,this._parents)}function Qy(n){return new Array(n.length)}function nS(){return new Ue(this._enter||this._groups.map(Qy),this._parents)}function ps(n,a){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=a}ps.prototype={constructor:ps,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,a){return this._parent.insertBefore(n,a)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function iS(n){return function(){return n}}function aS(n,a,o,u,r,f){for(var d=0,g,m=a.length,h=f.length;d<h;++d)(g=a[d])?(g.__data__=f[d],u[d]=g):o[d]=new ps(n,f[d]);for(;d<m;++d)(g=a[d])&&(r[d]=g)}function lS(n,a,o,u,r,f,d){var g,m,h=new Map,p=a.length,v=f.length,x=new Array(p),E;for(g=0;g<p;++g)(m=a[g])&&(x[g]=E=d.call(m,m.__data__,g,a)+"",h.has(E)?r[g]=m:h.set(E,m));for(g=0;g<v;++g)E=d.call(n,f[g],g,f)+"",(m=h.get(E))?(u[g]=m,m.__data__=f[g],h.delete(E)):o[g]=new ps(n,f[g]);for(g=0;g<p;++g)(m=a[g])&&h.get(x[g])===m&&(r[g]=m)}function oS(n){return n.__data__}function uS(n,a){if(!arguments.length)return Array.from(this,oS);var o=a?lS:aS,u=this._parents,r=this._groups;typeof n!="function"&&(n=iS(n));for(var f=r.length,d=new Array(f),g=new Array(f),m=new Array(f),h=0;h<f;++h){var p=u[h],v=r[h],x=v.length,E=sS(n.call(p,p&&p.__data__,h,u)),b=E.length,_=g[h]=new Array(b),T=d[h]=new Array(b),N=m[h]=new Array(x);o(p,v,_,T,N,E,a);for(var q=0,w=0,A,Y;q<b;++q)if(A=_[q]){for(q>=w&&(w=q+1);!(Y=T[w])&&++w<b;);A._next=Y||null}}return d=new Ue(d,u),d._enter=g,d._exit=m,d}function sS(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function rS(){return new Ue(this._exit||this._groups.map(Qy),this._parents)}function cS(n,a,o){var u=this.enter(),r=this,f=this.exit();return typeof n=="function"?(u=n(u),u&&(u=u.selection())):u=u.append(n+""),a!=null&&(r=a(r),r&&(r=r.selection())),o==null?f.remove():o(f),u&&r?u.merge(r).order():r}function fS(n){for(var a=n.selection?n.selection():n,o=this._groups,u=a._groups,r=o.length,f=u.length,d=Math.min(r,f),g=new Array(r),m=0;m<d;++m)for(var h=o[m],p=u[m],v=h.length,x=g[m]=new Array(v),E,b=0;b<v;++b)(E=h[b]||p[b])&&(x[b]=E);for(;m<r;++m)g[m]=o[m];return new Ue(g,this._parents)}function dS(){for(var n=this._groups,a=-1,o=n.length;++a<o;)for(var u=n[a],r=u.length-1,f=u[r],d;--r>=0;)(d=u[r])&&(f&&d.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(d,f),f=d);return this}function hS(n){n||(n=gS);function a(v,x){return v&&x?n(v.__data__,x.__data__):!v-!x}for(var o=this._groups,u=o.length,r=new Array(u),f=0;f<u;++f){for(var d=o[f],g=d.length,m=r[f]=new Array(g),h,p=0;p<g;++p)(h=d[p])&&(m[p]=h);m.sort(a)}return new Ue(r,this._parents).order()}function gS(n,a){return n<a?-1:n>a?1:n>=a?0:NaN}function mS(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function yS(){return Array.from(this)}function pS(){for(var n=this._groups,a=0,o=n.length;a<o;++a)for(var u=n[a],r=0,f=u.length;r<f;++r){var d=u[r];if(d)return d}return null}function vS(){let n=0;for(const a of this)++n;return n}function xS(){return!this.node()}function bS(n){for(var a=this._groups,o=0,u=a.length;o<u;++o)for(var r=a[o],f=0,d=r.length,g;f<d;++f)(g=r[f])&&n.call(g,g.__data__,f,r);return this}function SS(n){return function(){this.removeAttribute(n)}}function ES(n){return function(){this.removeAttributeNS(n.space,n.local)}}function wS(n,a){return function(){this.setAttribute(n,a)}}function _S(n,a){return function(){this.setAttributeNS(n.space,n.local,a)}}function MS(n,a){return function(){var o=a.apply(this,arguments);o==null?this.removeAttribute(n):this.setAttribute(n,o)}}function CS(n,a){return function(){var o=a.apply(this,arguments);o==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,o)}}function NS(n,a){var o=Ds(n);if(arguments.length<2){var u=this.node();return o.local?u.getAttributeNS(o.space,o.local):u.getAttribute(o)}return this.each((a==null?o.local?ES:SS:typeof a=="function"?o.local?CS:MS:o.local?_S:wS)(o,a))}function Xy(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function TS(n){return function(){this.style.removeProperty(n)}}function AS(n,a,o){return function(){this.style.setProperty(n,a,o)}}function zS(n,a,o){return function(){var u=a.apply(this,arguments);u==null?this.style.removeProperty(n):this.style.setProperty(n,u,o)}}function DS(n,a,o){return arguments.length>1?this.each((a==null?TS:typeof a=="function"?zS:AS)(n,a,o??"")):tl(this.node(),n)}function tl(n,a){return n.style.getPropertyValue(a)||Xy(n).getComputedStyle(n,null).getPropertyValue(a)}function OS(n){return function(){delete this[n]}}function RS(n,a){return function(){this[n]=a}}function HS(n,a){return function(){var o=a.apply(this,arguments);o==null?delete this[n]:this[n]=o}}function jS(n,a){return arguments.length>1?this.each((a==null?OS:typeof a=="function"?HS:RS)(n,a)):this.node()[n]}function Gy(n){return n.trim().split(/^|\s+/)}function If(n){return n.classList||new Zy(n)}function Zy(n){this._node=n,this._names=Gy(n.getAttribute("class")||"")}Zy.prototype={add:function(n){var a=this._names.indexOf(n);a<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var a=this._names.indexOf(n);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Ky(n,a){for(var o=If(n),u=-1,r=a.length;++u<r;)o.add(a[u])}function ky(n,a){for(var o=If(n),u=-1,r=a.length;++u<r;)o.remove(a[u])}function BS(n){return function(){Ky(this,n)}}function US(n){return function(){ky(this,n)}}function qS(n,a){return function(){(a.apply(this,arguments)?Ky:ky)(this,n)}}function LS(n,a){var o=Gy(n+"");if(arguments.length<2){for(var u=If(this.node()),r=-1,f=o.length;++r<f;)if(!u.contains(o[r]))return!1;return!0}return this.each((typeof a=="function"?qS:a?BS:US)(o,a))}function YS(){this.textContent=""}function VS(n){return function(){this.textContent=n}}function QS(n){return function(){var a=n.apply(this,arguments);this.textContent=a??""}}function XS(n){return arguments.length?this.each(n==null?YS:(typeof n=="function"?QS:VS)(n)):this.node().textContent}function GS(){this.innerHTML=""}function ZS(n){return function(){this.innerHTML=n}}function KS(n){return function(){var a=n.apply(this,arguments);this.innerHTML=a??""}}function kS(n){return arguments.length?this.each(n==null?GS:(typeof n=="function"?KS:ZS)(n)):this.node().innerHTML}function $S(){this.nextSibling&&this.parentNode.appendChild(this)}function FS(){return this.each($S)}function JS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function IS(){return this.each(JS)}function WS(n){var a=typeof n=="function"?n:qy(n);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function PS(){return null}function t2(n,a){var o=typeof n=="function"?n:qy(n),u=a==null?PS:typeof a=="function"?a:Jf(a);return this.select(function(){return this.insertBefore(o.apply(this,arguments),u.apply(this,arguments)||null)})}function e2(){var n=this.parentNode;n&&n.removeChild(this)}function n2(){return this.each(e2)}function i2(){var n=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function a2(){var n=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function l2(n){return this.select(n?a2:i2)}function o2(n){return arguments.length?this.property("__data__",n):this.node().__data__}function u2(n){return function(a){n.call(this,a,this.__data__)}}function s2(n){return n.trim().split(/^|\s+/).map(function(a){var o="",u=a.indexOf(".");return u>=0&&(o=a.slice(u+1),a=a.slice(0,u)),{type:a,name:o}})}function r2(n){return function(){var a=this.__on;if(a){for(var o=0,u=-1,r=a.length,f;o<r;++o)f=a[o],(!n.type||f.type===n.type)&&f.name===n.name?this.removeEventListener(f.type,f.listener,f.options):a[++u]=f;++u?a.length=u:delete this.__on}}}function c2(n,a,o){return function(){var u=this.__on,r,f=u2(a);if(u){for(var d=0,g=u.length;d<g;++d)if((r=u[d]).type===n.type&&r.name===n.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=f,r.options=o),r.value=a;return}}this.addEventListener(n.type,f,o),r={type:n.type,name:n.name,value:a,listener:f,options:o},u?u.push(r):this.__on=[r]}}function f2(n,a,o){var u=s2(n+""),r,f=u.length,d;if(arguments.length<2){var g=this.node().__on;if(g){for(var m=0,h=g.length,p;m<h;++m)for(r=0,p=g[m];r<f;++r)if((d=u[r]).type===p.type&&d.name===p.name)return p.value}return}for(g=a?c2:r2,r=0;r<f;++r)this.each(g(u[r],a,o));return this}function $y(n,a,o){var u=Xy(n),r=u.CustomEvent;typeof r=="function"?r=new r(a,o):(r=u.document.createEvent("Event"),o?(r.initEvent(a,o.bubbles,o.cancelable),r.detail=o.detail):r.initEvent(a,!1,!1)),n.dispatchEvent(r)}function d2(n,a){return function(){return $y(this,n,a)}}function h2(n,a){return function(){return $y(this,n,a.apply(this,arguments))}}function g2(n,a){return this.each((typeof a=="function"?h2:d2)(n,a))}function*m2(){for(var n=this._groups,a=0,o=n.length;a<o;++a)for(var u=n[a],r=0,f=u.length,d;r<f;++r)(d=u[r])&&(yield d)}var Fy=[null];function Ue(n,a){this._groups=n,this._parents=a}function _o(){return new Ue([[document.documentElement]],Fy)}function y2(){return this}Ue.prototype=_o.prototype={constructor:Ue,select:Qb,selectAll:Kb,selectChild:Jb,selectChildren:tS,filter:eS,data:uS,enter:nS,exit:rS,join:cS,merge:fS,selection:y2,order:dS,sort:hS,call:mS,nodes:yS,node:pS,size:vS,empty:xS,each:bS,attr:NS,style:DS,property:jS,classed:LS,text:XS,html:kS,raise:FS,lower:IS,append:WS,insert:t2,remove:n2,clone:l2,datum:o2,on:f2,dispatch:g2,[Symbol.iterator]:m2};function Be(n){return typeof n=="string"?new Ue([[document.querySelector(n)]],[document.documentElement]):new Ue([[n]],Fy)}function p2(n){let a;for(;a=n.sourceEvent;)n=a;return n}function Pe(n,a){if(n=p2(n),a===void 0&&(a=n.currentTarget),a){var o=a.ownerSVGElement||a;if(o.createSVGPoint){var u=o.createSVGPoint();return u.x=n.clientX,u.y=n.clientY,u=u.matrixTransform(a.getScreenCTM().inverse()),[u.x,u.y]}if(a.getBoundingClientRect){var r=a.getBoundingClientRect();return[n.clientX-r.left-a.clientLeft,n.clientY-r.top-a.clientTop]}}return[n.pageX,n.pageY]}const v2={passive:!1},ho={capture:!0,passive:!1};function df(n){n.stopImmediatePropagation()}function Ja(n){n.preventDefault(),n.stopImmediatePropagation()}function Jy(n){var a=n.document.documentElement,o=Be(n).on("dragstart.drag",Ja,ho);"onselectstart"in a?o.on("selectstart.drag",Ja,ho):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function Iy(n,a){var o=n.document.documentElement,u=Be(n).on("dragstart.drag",null);a&&(u.on("click.drag",Ja,ho),setTimeout(function(){u.on("click.drag",null)},0)),"onselectstart"in o?u.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}const ns=n=>()=>n;function Hf(n,{sourceEvent:a,subject:o,target:u,identifier:r,active:f,x:d,y:g,dx:m,dy:h,dispatch:p}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:u,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:g,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:p}})}Hf.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function x2(n){return!n.ctrlKey&&!n.button}function b2(){return this.parentNode}function S2(n,a){return a??{x:n.x,y:n.y}}function E2(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wy(){var n=x2,a=b2,o=S2,u=E2,r={},f=zs("start","drag","end"),d=0,g,m,h,p,v=0;function x(A){A.on("mousedown.drag",E).filter(u).on("touchstart.drag",T).on("touchmove.drag",N,v2).on("touchend.drag touchcancel.drag",q).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(A,Y){if(!(p||!n.call(this,A,Y))){var B=w(this,a.call(this,A,Y),A,Y,"mouse");B&&(Be(A.view).on("mousemove.drag",b,ho).on("mouseup.drag",_,ho),Jy(A.view),df(A),h=!1,g=A.clientX,m=A.clientY,B("start",A))}}function b(A){if(Ja(A),!h){var Y=A.clientX-g,B=A.clientY-m;h=Y*Y+B*B>v}r.mouse("drag",A)}function _(A){Be(A.view).on("mousemove.drag mouseup.drag",null),Iy(A.view,h),Ja(A),r.mouse("end",A)}function T(A,Y){if(n.call(this,A,Y)){var B=A.changedTouches,j=a.call(this,A,Y),X=B.length,$,ot;for($=0;$<X;++$)(ot=w(this,j,A,Y,B[$].identifier,B[$]))&&(df(A),ot("start",A,B[$]))}}function N(A){var Y=A.changedTouches,B=Y.length,j,X;for(j=0;j<B;++j)(X=r[Y[j].identifier])&&(Ja(A),X("drag",A,Y[j]))}function q(A){var Y=A.changedTouches,B=Y.length,j,X;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),j=0;j<B;++j)(X=r[Y[j].identifier])&&(df(A),X("end",A,Y[j]))}function w(A,Y,B,j,X,$){var ot=f.copy(),k=Pe($||B,Y),I,lt,O;if((O=o.call(A,new Hf("beforestart",{sourceEvent:B,target:x,identifier:X,active:d,x:k[0],y:k[1],dx:0,dy:0,dispatch:ot}),j))!=null)return I=O.x-k[0]||0,lt=O.y-k[1]||0,function G(M,R,H){var Q=k,tt;switch(M){case"start":r[X]=G,tt=d++;break;case"end":delete r[X],--d;case"drag":k=Pe(H||R,Y),tt=d;break}ot.call(M,A,new Hf(M,{sourceEvent:R,subject:O,target:x,identifier:X,active:tt,x:k[0]+I,y:k[1]+lt,dx:k[0]-Q[0],dy:k[1]-Q[1],dispatch:ot}),j)}}return x.filter=function(A){return arguments.length?(n=typeof A=="function"?A:ns(!!A),x):n},x.container=function(A){return arguments.length?(a=typeof A=="function"?A:ns(A),x):a},x.subject=function(A){return arguments.length?(o=typeof A=="function"?A:ns(A),x):o},x.touchable=function(A){return arguments.length?(u=typeof A=="function"?A:ns(!!A),x):u},x.on=function(){var A=f.on.apply(f,arguments);return A===f?x:A},x.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,x):Math.sqrt(v)},x}function Wf(n,a,o){n.prototype=a.prototype=o,o.constructor=n}function Py(n,a){var o=Object.create(n.prototype);for(var u in a)o[u]=a[u];return o}function Mo(){}var go=.7,vs=1/go,Ia="\\s*([+-]?\\d+)\\s*",mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w2=/^#([0-9a-f]{3,8})$/,_2=new RegExp(`^rgb\\(${Ia},${Ia},${Ia}\\)$`),M2=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),C2=new RegExp(`^rgba\\(${Ia},${Ia},${Ia},${mo}\\)$`),N2=new RegExp(`^rgba\\(${dn},${dn},${dn},${mo}\\)$`),T2=new RegExp(`^hsl\\(${mo},${dn},${dn}\\)$`),A2=new RegExp(`^hsla\\(${mo},${dn},${dn},${mo}\\)$`),b0={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};Wf(Mo,ea,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:S0,formatHex:S0,formatHex8:z2,formatHsl:D2,formatRgb:E0,toString:E0});function S0(){return this.rgb().formatHex()}function z2(){return this.rgb().formatHex8()}function D2(){return tp(this).formatHsl()}function E0(){return this.rgb().formatRgb()}function ea(n){var a,o;return n=(n+"").trim().toLowerCase(),(a=w2.exec(n))?(o=a[1].length,a=parseInt(a[1],16),o===6?w0(a):o===3?new Ne(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):o===8?is(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):o===4?is(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=_2.exec(n))?new Ne(a[1],a[2],a[3],1):(a=M2.exec(n))?new Ne(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=C2.exec(n))?is(a[1],a[2],a[3],a[4]):(a=N2.exec(n))?is(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=T2.exec(n))?C0(a[1],a[2]/100,a[3]/100,1):(a=A2.exec(n))?C0(a[1],a[2]/100,a[3]/100,a[4]):b0.hasOwnProperty(n)?w0(b0[n]):n==="transparent"?new Ne(NaN,NaN,NaN,0):null}function w0(n){return new Ne(n>>16&255,n>>8&255,n&255,1)}function is(n,a,o,u){return u<=0&&(n=a=o=NaN),new Ne(n,a,o,u)}function O2(n){return n instanceof Mo||(n=ea(n)),n?(n=n.rgb(),new Ne(n.r,n.g,n.b,n.opacity)):new Ne}function jf(n,a,o,u){return arguments.length===1?O2(n):new Ne(n,a,o,u??1)}function Ne(n,a,o,u){this.r=+n,this.g=+a,this.b=+o,this.opacity=+u}Wf(Ne,jf,Py(Mo,{brighter(n){return n=n==null?vs:Math.pow(vs,n),new Ne(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?go:Math.pow(go,n),new Ne(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Ne(Wi(this.r),Wi(this.g),Wi(this.b),xs(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:_0,formatHex:_0,formatHex8:R2,formatRgb:M0,toString:M0}));function _0(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function R2(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function M0(){const n=xs(this.opacity);return`${n===1?"rgb(":"rgba("}${Wi(this.r)}, ${Wi(this.g)}, ${Wi(this.b)}${n===1?")":`, ${n})`}`}function xs(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Wi(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Ii(n){return n=Wi(n),(n<16?"0":"")+n.toString(16)}function C0(n,a,o,u){return u<=0?n=a=o=NaN:o<=0||o>=1?n=a=NaN:a<=0&&(n=NaN),new tn(n,a,o,u)}function tp(n){if(n instanceof tn)return new tn(n.h,n.s,n.l,n.opacity);if(n instanceof Mo||(n=ea(n)),!n)return new tn;if(n instanceof tn)return n;n=n.rgb();var a=n.r/255,o=n.g/255,u=n.b/255,r=Math.min(a,o,u),f=Math.max(a,o,u),d=NaN,g=f-r,m=(f+r)/2;return g?(a===f?d=(o-u)/g+(o<u)*6:o===f?d=(u-a)/g+2:d=(a-o)/g+4,g/=m<.5?f+r:2-f-r,d*=60):g=m>0&&m<1?0:d,new tn(d,g,m,n.opacity)}function H2(n,a,o,u){return arguments.length===1?tp(n):new tn(n,a,o,u??1)}function tn(n,a,o,u){this.h=+n,this.s=+a,this.l=+o,this.opacity=+u}Wf(tn,H2,Py(Mo,{brighter(n){return n=n==null?vs:Math.pow(vs,n),new tn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?go:Math.pow(go,n),new tn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,a=isNaN(n)||isNaN(this.s)?0:this.s,o=this.l,u=o+(o<.5?o:1-o)*a,r=2*o-u;return new Ne(hf(n>=240?n-240:n+120,r,u),hf(n,r,u),hf(n<120?n+240:n-120,r,u),this.opacity)},clamp(){return new tn(N0(this.h),as(this.s),as(this.l),xs(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 n=xs(this.opacity);return`${n===1?"hsl(":"hsla("}${N0(this.h)}, ${as(this.s)*100}%, ${as(this.l)*100}%${n===1?")":`, ${n})`}`}}));function N0(n){return n=(n||0)%360,n<0?n+360:n}function as(n){return Math.max(0,Math.min(1,n||0))}function hf(n,a,o){return(n<60?a+(o-a)*n/60:n<180?o:n<240?a+(o-a)*(240-n)/60:a)*255}const Pf=n=>()=>n;function j2(n,a){return function(o){return n+o*a}}function B2(n,a,o){return n=Math.pow(n,o),a=Math.pow(a,o)-n,o=1/o,function(u){return Math.pow(n+u*a,o)}}function U2(n){return(n=+n)==1?ep:function(a,o){return o-a?B2(a,o,n):Pf(isNaN(a)?o:a)}}function ep(n,a){var o=a-n;return o?j2(n,o):Pf(isNaN(n)?a:n)}const bs=(function n(a){var o=U2(a);function u(r,f){var d=o((r=jf(r)).r,(f=jf(f)).r),g=o(r.g,f.g),m=o(r.b,f.b),h=ep(r.opacity,f.opacity);return function(p){return r.r=d(p),r.g=g(p),r.b=m(p),r.opacity=h(p),r+""}}return u.gamma=n,u})(1);function q2(n,a){a||(a=[]);var o=n?Math.min(a.length,n.length):0,u=a.slice(),r;return function(f){for(r=0;r<o;++r)u[r]=n[r]*(1-f)+a[r]*f;return u}}function L2(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Y2(n,a){var o=a?a.length:0,u=n?Math.min(o,n.length):0,r=new Array(u),f=new Array(o),d;for(d=0;d<u;++d)r[d]=uo(n[d],a[d]);for(;d<o;++d)f[d]=a[d];return function(g){for(d=0;d<u;++d)f[d]=r[d](g);return f}}function V2(n,a){var o=new Date;return n=+n,a=+a,function(u){return o.setTime(n*(1-u)+a*u),o}}function fn(n,a){return n=+n,a=+a,function(o){return n*(1-o)+a*o}}function Q2(n,a){var o={},u={},r;(n===null||typeof n!="object")&&(n={}),(a===null||typeof a!="object")&&(a={});for(r in a)r in n?o[r]=uo(n[r],a[r]):u[r]=a[r];return function(f){for(r in o)u[r]=o[r](f);return u}}var Bf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gf=new RegExp(Bf.source,"g");function X2(n){return function(){return n}}function G2(n){return function(a){return n(a)+""}}function np(n,a){var o=Bf.lastIndex=gf.lastIndex=0,u,r,f,d=-1,g=[],m=[];for(n=n+"",a=a+"";(u=Bf.exec(n))&&(r=gf.exec(a));)(f=r.index)>o&&(f=a.slice(o,f),g[d]?g[d]+=f:g[++d]=f),(u=u[0])===(r=r[0])?g[d]?g[d]+=r:g[++d]=r:(g[++d]=null,m.push({i:d,x:fn(u,r)})),o=gf.lastIndex;return o<a.length&&(f=a.slice(o),g[d]?g[d]+=f:g[++d]=f),g.length<2?m[0]?G2(m[0].x):X2(a):(a=m.length,function(h){for(var p=0,v;p<a;++p)g[(v=m[p]).i]=v.x(h);return g.join("")})}function uo(n,a){var o=typeof a,u;return a==null||o==="boolean"?Pf(a):(o==="number"?fn:o==="string"?(u=ea(a))?(a=u,bs):np:a instanceof ea?bs:a instanceof Date?V2:L2(a)?q2:Array.isArray(a)?Y2:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?Q2:fn)(n,a)}var T0=180/Math.PI,Uf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ip(n,a,o,u,r,f){var d,g,m;return(d=Math.sqrt(n*n+a*a))&&(n/=d,a/=d),(m=n*o+a*u)&&(o-=n*m,u-=a*m),(g=Math.sqrt(o*o+u*u))&&(o/=g,u/=g,m/=g),n*u<a*o&&(n=-n,a=-a,m=-m,d=-d),{translateX:r,translateY:f,rotate:Math.atan2(a,n)*T0,skewX:Math.atan(m)*T0,scaleX:d,scaleY:g}}var ls;function Z2(n){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return a.isIdentity?Uf:ip(a.a,a.b,a.c,a.d,a.e,a.f)}function K2(n){return n==null||(ls||(ls=document.createElementNS("http://www.w3.org/2000/svg","g")),ls.setAttribute("transform",n),!(n=ls.transform.baseVal.consolidate()))?Uf:(n=n.matrix,ip(n.a,n.b,n.c,n.d,n.e,n.f))}function ap(n,a,o,u){function r(h){return h.length?h.pop()+" ":""}function f(h,p,v,x,E,b){if(h!==v||p!==x){var _=E.push("translate(",null,a,null,o);b.push({i:_-4,x:fn(h,v)},{i:_-2,x:fn(p,x)})}else(v||x)&&E.push("translate("+v+a+x+o)}function d(h,p,v,x){h!==p?(h-p>180?p+=360:p-h>180&&(h+=360),x.push({i:v.push(r(v)+"rotate(",null,u)-2,x:fn(h,p)})):p&&v.push(r(v)+"rotate("+p+u)}function g(h,p,v,x){h!==p?x.push({i:v.push(r(v)+"skewX(",null,u)-2,x:fn(h,p)}):p&&v.push(r(v)+"skewX("+p+u)}function m(h,p,v,x,E,b){if(h!==v||p!==x){var _=E.push(r(E)+"scale(",null,",",null,")");b.push({i:_-4,x:fn(h,v)},{i:_-2,x:fn(p,x)})}else(v!==1||x!==1)&&E.push(r(E)+"scale("+v+","+x+")")}return function(h,p){var v=[],x=[];return h=n(h),p=n(p),f(h.translateX,h.translateY,p.translateX,p.translateY,v,x),d(h.rotate,p.rotate,v,x),g(h.skewX,p.skewX,v,x),m(h.scaleX,h.scaleY,p.scaleX,p.scaleY,v,x),h=p=null,function(E){for(var b=-1,_=x.length,T;++b<_;)v[(T=x[b]).i]=T.x(E);return v.join("")}}}var k2=ap(Z2,"px, ","px)","deg)"),$2=ap(K2,", ",")",")"),F2=1e-12;function A0(n){return((n=Math.exp(n))+1/n)/2}function J2(n){return((n=Math.exp(n))-1/n)/2}function I2(n){return((n=Math.exp(2*n))-1)/(n+1)}const ds=(function n(a,o,u){function r(f,d){var g=f[0],m=f[1],h=f[2],p=d[0],v=d[1],x=d[2],E=p-g,b=v-m,_=E*E+b*b,T,N;if(_<F2)N=Math.log(x/h)/a,T=function(j){return[g+j*E,m+j*b,h*Math.exp(a*j*N)]};else{var q=Math.sqrt(_),w=(x*x-h*h+u*_)/(2*h*o*q),A=(x*x-h*h-u*_)/(2*x*o*q),Y=Math.log(Math.sqrt(w*w+1)-w),B=Math.log(Math.sqrt(A*A+1)-A);N=(B-Y)/a,T=function(j){var X=j*N,$=A0(Y),ot=h/(o*q)*($*I2(a*X+Y)-J2(Y));return[g+ot*E,m+ot*b,h*$/A0(a*X+Y)]}}return T.duration=N*1e3*a/Math.SQRT2,T}return r.rho=function(f){var d=Math.max(.001,+f),g=d*d,m=g*g;return n(d,g,m)},r})(Math.SQRT2,2,4);var el=0,lo=0,no=0,lp=1e3,Ss,oo,Es=0,na=0,Os=0,yo=typeof performance=="object"&&performance.now?performance:Date,op=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function td(){return na||(op(W2),na=yo.now()+Os)}function W2(){na=0}function ws(){this._call=this._time=this._next=null}ws.prototype=up.prototype={constructor:ws,restart:function(n,a,o){if(typeof n!="function")throw new TypeError("callback is not a function");o=(o==null?td():+o)+(a==null?0:+a),!this._next&&oo!==this&&(oo?oo._next=this:Ss=this,oo=this),this._call=n,this._time=o,qf()},stop:function(){this._call&&(this._call=null,this._time=1/0,qf())}};function up(n,a,o){var u=new ws;return u.restart(n,a,o),u}function P2(){td(),++el;for(var n=Ss,a;n;)(a=na-n._time)>=0&&n._call.call(void 0,a),n=n._next;--el}function z0(){na=(Es=yo.now())+Os,el=lo=0;try{P2()}finally{el=0,eE(),na=0}}function tE(){var n=yo.now(),a=n-Es;a>lp&&(Os-=a,Es=n)}function eE(){for(var n,a=Ss,o,u=1/0;a;)a._call?(u>a._time&&(u=a._time),n=a,a=a._next):(o=a._next,a._next=null,a=n?n._next=o:Ss=o);oo=n,qf(u)}function qf(n){if(!el){lo&&(lo=clearTimeout(lo));var a=n-na;a>24?(n<1/0&&(lo=setTimeout(z0,n-yo.now()-Os)),no&&(no=clearInterval(no))):(no||(Es=yo.now(),no=setInterval(tE,lp)),el=1,op(z0))}}function D0(n,a,o){var u=new ws;return a=a==null?0:+a,u.restart(r=>{u.stop(),n(r+a)},a,o),u}var nE=zs("start","end","cancel","interrupt"),iE=[],sp=0,O0=1,Lf=2,hs=3,R0=4,Yf=5,gs=6;function Rs(n,a,o,u,r,f){var d=n.__transition;if(!d)n.__transition={};else if(o in d)return;aE(n,o,{name:a,index:u,group:r,on:nE,tween:iE,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:sp})}function ed(n,a){var o=an(n,a);if(o.state>sp)throw new Error("too late; already scheduled");return o}function mn(n,a){var o=an(n,a);if(o.state>hs)throw new Error("too late; already running");return o}function an(n,a){var o=n.__transition;if(!o||!(o=o[a]))throw new Error("transition not found");return o}function aE(n,a,o){var u=n.__transition,r;u[a]=o,o.timer=up(f,0,o.time);function f(h){o.state=O0,o.timer.restart(d,o.delay,o.time),o.delay<=h&&d(h-o.delay)}function d(h){var p,v,x,E;if(o.state!==O0)return m();for(p in u)if(E=u[p],E.name===o.name){if(E.state===hs)return D0(d);E.state===R0?(E.state=gs,E.timer.stop(),E.on.call("interrupt",n,n.__data__,E.index,E.group),delete u[p]):+p<a&&(E.state=gs,E.timer.stop(),E.on.call("cancel",n,n.__data__,E.index,E.group),delete u[p])}if(D0(function(){o.state===hs&&(o.state=R0,o.timer.restart(g,o.delay,o.time),g(h))}),o.state=Lf,o.on.call("start",n,n.__data__,o.index,o.group),o.state===Lf){for(o.state=hs,r=new Array(x=o.tween.length),p=0,v=-1;p<x;++p)(E=o.tween[p].value.call(n,n.__data__,o.index,o.group))&&(r[++v]=E);r.length=v+1}}function g(h){for(var p=h<o.duration?o.ease.call(null,h/o.duration):(o.timer.restart(m),o.state=Yf,1),v=-1,x=r.length;++v<x;)r[v].call(n,p);o.state===Yf&&(o.on.call("end",n,n.__data__,o.index,o.group),m())}function m(){o.state=gs,o.timer.stop(),delete u[a];for(var h in u)return;delete n.__transition}}function ms(n,a){var o=n.__transition,u,r,f=!0,d;if(o){a=a==null?null:a+"";for(d in o){if((u=o[d]).name!==a){f=!1;continue}r=u.state>Lf&&u.state<Yf,u.state=gs,u.timer.stop(),u.on.call(r?"interrupt":"cancel",n,n.__data__,u.index,u.group),delete o[d]}f&&delete n.__transition}}function lE(n){return this.each(function(){ms(this,n)})}function oE(n,a){var o,u;return function(){var r=mn(this,n),f=r.tween;if(f!==o){u=o=f;for(var d=0,g=u.length;d<g;++d)if(u[d].name===a){u=u.slice(),u.splice(d,1);break}}r.tween=u}}function uE(n,a,o){var u,r;if(typeof o!="function")throw new Error;return function(){var f=mn(this,n),d=f.tween;if(d!==u){r=(u=d).slice();for(var g={name:a,value:o},m=0,h=r.length;m<h;++m)if(r[m].name===a){r[m]=g;break}m===h&&r.push(g)}f.tween=r}}function sE(n,a){var o=this._id;if(n+="",arguments.length<2){for(var u=an(this.node(),o).tween,r=0,f=u.length,d;r<f;++r)if((d=u[r]).name===n)return d.value;return null}return this.each((a==null?oE:uE)(o,n,a))}function nd(n,a,o){var u=n._id;return n.each(function(){var r=mn(this,u);(r.value||(r.value={}))[a]=o.apply(this,arguments)}),function(r){return an(r,u).value[a]}}function rp(n,a){var o;return(typeof a=="number"?fn:a instanceof ea?bs:(o=ea(a))?(a=o,bs):np)(n,a)}function rE(n){return function(){this.removeAttribute(n)}}function cE(n){return function(){this.removeAttributeNS(n.space,n.local)}}function fE(n,a,o){var u,r=o+"",f;return function(){var d=this.getAttribute(n);return d===r?null:d===u?f:f=a(u=d,o)}}function dE(n,a,o){var u,r=o+"",f;return function(){var d=this.getAttributeNS(n.space,n.local);return d===r?null:d===u?f:f=a(u=d,o)}}function hE(n,a,o){var u,r,f;return function(){var d,g=o(this),m;return g==null?void this.removeAttribute(n):(d=this.getAttribute(n),m=g+"",d===m?null:d===u&&m===r?f:(r=m,f=a(u=d,g)))}}function gE(n,a,o){var u,r,f;return function(){var d,g=o(this),m;return g==null?void this.removeAttributeNS(n.space,n.local):(d=this.getAttributeNS(n.space,n.local),m=g+"",d===m?null:d===u&&m===r?f:(r=m,f=a(u=d,g)))}}function mE(n,a){var o=Ds(n),u=o==="transform"?$2:rp;return this.attrTween(n,typeof a=="function"?(o.local?gE:hE)(o,u,nd(this,"attr."+n,a)):a==null?(o.local?cE:rE)(o):(o.local?dE:fE)(o,u,a))}function yE(n,a){return function(o){this.setAttribute(n,a.call(this,o))}}function pE(n,a){return function(o){this.setAttributeNS(n.space,n.local,a.call(this,o))}}function vE(n,a){var o,u;function r(){var f=a.apply(this,arguments);return f!==u&&(o=(u=f)&&pE(n,f)),o}return r._value=a,r}function xE(n,a){var o,u;function r(){var f=a.apply(this,arguments);return f!==u&&(o=(u=f)&&yE(n,f)),o}return r._value=a,r}function bE(n,a){var o="attr."+n;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(a==null)return this.tween(o,null);if(typeof a!="function")throw new Error;var u=Ds(n);return this.tween(o,(u.local?vE:xE)(u,a))}function SE(n,a){return function(){ed(this,n).delay=+a.apply(this,arguments)}}function EE(n,a){return a=+a,function(){ed(this,n).delay=a}}function wE(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?SE:EE)(a,n)):an(this.node(),a).delay}function _E(n,a){return function(){mn(this,n).duration=+a.apply(this,arguments)}}function ME(n,a){return a=+a,function(){mn(this,n).duration=a}}function CE(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?_E:ME)(a,n)):an(this.node(),a).duration}function NE(n,a){if(typeof a!="function")throw new Error;return function(){mn(this,n).ease=a}}function TE(n){var a=this._id;return arguments.length?this.each(NE(a,n)):an(this.node(),a).ease}function AE(n,a){return function(){var o=a.apply(this,arguments);if(typeof o!="function")throw new Error;mn(this,n).ease=o}}function zE(n){if(typeof n!="function")throw new Error;return this.each(AE(this._id,n))}function DE(n){typeof n!="function"&&(n=Yy(n));for(var a=this._groups,o=a.length,u=new Array(o),r=0;r<o;++r)for(var f=a[r],d=f.length,g=u[r]=[],m,h=0;h<d;++h)(m=f[h])&&n.call(m,m.__data__,h,f)&&g.push(m);return new Vn(u,this._parents,this._name,this._id)}function OE(n){if(n._id!==this._id)throw new Error;for(var a=this._groups,o=n._groups,u=a.length,r=o.length,f=Math.min(u,r),d=new Array(u),g=0;g<f;++g)for(var m=a[g],h=o[g],p=m.length,v=d[g]=new Array(p),x,E=0;E<p;++E)(x=m[E]||h[E])&&(v[E]=x);for(;g<u;++g)d[g]=a[g];return new Vn(d,this._parents,this._name,this._id)}function RE(n){return(n+"").trim().split(/^|\s+/).every(function(a){var o=a.indexOf(".");return o>=0&&(a=a.slice(0,o)),!a||a==="start"})}function HE(n,a,o){var u,r,f=RE(a)?ed:mn;return function(){var d=f(this,n),g=d.on;g!==u&&(r=(u=g).copy()).on(a,o),d.on=r}}function jE(n,a){var o=this._id;return arguments.length<2?an(this.node(),o).on.on(n):this.each(HE(o,n,a))}function BE(n){return function(){var a=this.parentNode;for(var o in this.__transition)if(+o!==n)return;a&&a.removeChild(this)}}function UE(){return this.on("end.remove",BE(this._id))}function qE(n){var a=this._name,o=this._id;typeof n!="function"&&(n=Jf(n));for(var u=this._groups,r=u.length,f=new Array(r),d=0;d<r;++d)for(var g=u[d],m=g.length,h=f[d]=new Array(m),p,v,x=0;x<m;++x)(p=g[x])&&(v=n.call(p,p.__data__,x,g))&&("__data__"in p&&(v.__data__=p.__data__),h[x]=v,Rs(h[x],a,o,x,h,an(p,o)));return new Vn(f,this._parents,a,o)}function LE(n){var a=this._name,o=this._id;typeof n!="function"&&(n=Ly(n));for(var u=this._groups,r=u.length,f=[],d=[],g=0;g<r;++g)for(var m=u[g],h=m.length,p,v=0;v<h;++v)if(p=m[v]){for(var x=n.call(p,p.__data__,v,m),E,b=an(p,o),_=0,T=x.length;_<T;++_)(E=x[_])&&Rs(E,a,o,_,x,b);f.push(x),d.push(p)}return new Vn(f,d,a,o)}var YE=_o.prototype.constructor;function VE(){return new YE(this._groups,this._parents)}function QE(n,a){var o,u,r;return function(){var f=tl(this,n),d=(this.style.removeProperty(n),tl(this,n));return f===d?null:f===o&&d===u?r:r=a(o=f,u=d)}}function cp(n){return function(){this.style.removeProperty(n)}}function XE(n,a,o){var u,r=o+"",f;return function(){var d=tl(this,n);return d===r?null:d===u?f:f=a(u=d,o)}}function GE(n,a,o){var u,r,f;return function(){var d=tl(this,n),g=o(this),m=g+"";return g==null&&(m=g=(this.style.removeProperty(n),tl(this,n))),d===m?null:d===u&&m===r?f:(r=m,f=a(u=d,g))}}function ZE(n,a){var o,u,r,f="style."+a,d="end."+f,g;return function(){var m=mn(this,n),h=m.on,p=m.value[f]==null?g||(g=cp(a)):void 0;(h!==o||r!==p)&&(u=(o=h).copy()).on(d,r=p),m.on=u}}function KE(n,a,o){var u=(n+="")=="transform"?k2:rp;return a==null?this.styleTween(n,QE(n,u)).on("end.style."+n,cp(n)):typeof a=="function"?this.styleTween(n,GE(n,u,nd(this,"style."+n,a))).each(ZE(this._id,n)):this.styleTween(n,XE(n,u,a),o).on("end.style."+n,null)}function kE(n,a,o){return function(u){this.style.setProperty(n,a.call(this,u),o)}}function $E(n,a,o){var u,r;function f(){var d=a.apply(this,arguments);return d!==r&&(u=(r=d)&&kE(n,d,o)),u}return f._value=a,f}function FE(n,a,o){var u="style."+(n+="");if(arguments.length<2)return(u=this.tween(u))&&u._value;if(a==null)return this.tween(u,null);if(typeof a!="function")throw new Error;return this.tween(u,$E(n,a,o??""))}function JE(n){return function(){this.textContent=n}}function IE(n){return function(){var a=n(this);this.textContent=a??""}}function WE(n){return this.tween("text",typeof n=="function"?IE(nd(this,"text",n)):JE(n==null?"":n+""))}function PE(n){return function(a){this.textContent=n.call(this,a)}}function tw(n){var a,o;function u(){var r=n.apply(this,arguments);return r!==o&&(a=(o=r)&&PE(r)),a}return u._value=n,u}function ew(n){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,tw(n))}function nw(){for(var n=this._name,a=this._id,o=fp(),u=this._groups,r=u.length,f=0;f<r;++f)for(var d=u[f],g=d.length,m,h=0;h<g;++h)if(m=d[h]){var p=an(m,a);Rs(m,n,o,h,d,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Vn(u,this._parents,n,o)}function iw(){var n,a,o=this,u=o._id,r=o.size();return new Promise(function(f,d){var g={value:d},m={value:function(){--r===0&&f()}};o.each(function(){var h=mn(this,u),p=h.on;p!==n&&(a=(n=p).copy(),a._.cancel.push(g),a._.interrupt.push(g),a._.end.push(m)),h.on=a}),r===0&&f()})}var aw=0;function Vn(n,a,o,u){this._groups=n,this._parents=a,this._name=o,this._id=u}function fp(){return++aw}var Ln=_o.prototype;Vn.prototype={constructor:Vn,select:qE,selectAll:LE,selectChild:Ln.selectChild,selectChildren:Ln.selectChildren,filter:DE,merge:OE,selection:VE,transition:nw,call:Ln.call,nodes:Ln.nodes,node:Ln.node,size:Ln.size,empty:Ln.empty,each:Ln.each,on:jE,attr:mE,attrTween:bE,style:KE,styleTween:FE,text:WE,textTween:ew,remove:UE,tween:sE,delay:wE,duration:CE,ease:TE,easeVarying:zE,end:iw,[Symbol.iterator]:Ln[Symbol.iterator]};function lw(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var ow={time:null,delay:0,duration:250,ease:lw};function uw(n,a){for(var o;!(o=n.__transition)||!(o=o[a]);)if(!(n=n.parentNode))throw new Error(`transition ${a} not found`);return o}function sw(n){var a,o;n instanceof Vn?(a=n._id,n=n._name):(a=fp(),(o=ow).time=td(),n=n==null?null:n+"");for(var u=this._groups,r=u.length,f=0;f<r;++f)for(var d=u[f],g=d.length,m,h=0;h<g;++h)(m=d[h])&&Rs(m,n,a,h,d,o||uw(m,a));return new Vn(u,this._parents,n,a)}_o.prototype.interrupt=lE;_o.prototype.transition=sw;const os=n=>()=>n;function rw(n,{sourceEvent:a,target:o,transform:u,dispatch:r}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:u,enumerable:!0,configurable:!0},_:{value:r}})}function Yn(n,a,o){this.k=n,this.x=a,this.y=o}Yn.prototype={constructor:Yn,scale:function(n){return n===1?this:new Yn(this.k*n,this.x,this.y)},translate:function(n,a){return n===0&a===0?this:new Yn(this.k,this.x+this.k*n,this.y+this.k*a)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Hs=new Yn(1,0,0);dp.prototype=Yn.prototype;function dp(n){for(;!n.__zoom;)if(!(n=n.parentNode))return Hs;return n.__zoom}function mf(n){n.stopImmediatePropagation()}function io(n){n.preventDefault(),n.stopImmediatePropagation()}function cw(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function fw(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function H0(){return this.__zoom||Hs}function dw(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function hw(){return navigator.maxTouchPoints||"ontouchstart"in this}function gw(n,a,o){var u=n.invertX(a[0][0])-o[0][0],r=n.invertX(a[1][0])-o[1][0],f=n.invertY(a[0][1])-o[0][1],d=n.invertY(a[1][1])-o[1][1];return n.translate(r>u?(u+r)/2:Math.min(0,u)||Math.max(0,r),d>f?(f+d)/2:Math.min(0,f)||Math.max(0,d))}function hp(){var n=cw,a=fw,o=gw,u=dw,r=hw,f=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],g=250,m=ds,h=zs("start","zoom","end"),p,v,x,E=500,b=150,_=0,T=10;function N(O){O.property("__zoom",H0).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",ot).filter(r).on("touchstart.zoom",k).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",lt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}N.transform=function(O,G,M,R){var H=O.selection?O.selection():O;H.property("__zoom",H0),O!==H?Y(O,G,M,R):H.interrupt().each(function(){B(this,arguments).event(R).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},N.scaleBy=function(O,G,M,R){N.scaleTo(O,function(){var H=this.__zoom.k,Q=typeof G=="function"?G.apply(this,arguments):G;return H*Q},M,R)},N.scaleTo=function(O,G,M,R){N.transform(O,function(){var H=a.apply(this,arguments),Q=this.__zoom,tt=M==null?A(H):typeof M=="function"?M.apply(this,arguments):M,C=Q.invert(tt),U=typeof G=="function"?G.apply(this,arguments):G;return o(w(q(Q,U),tt,C),H,d)},M,R)},N.translateBy=function(O,G,M,R){N.transform(O,function(){return o(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof M=="function"?M.apply(this,arguments):M),a.apply(this,arguments),d)},null,R)},N.translateTo=function(O,G,M,R,H){N.transform(O,function(){var Q=a.apply(this,arguments),tt=this.__zoom,C=R==null?A(Q):typeof R=="function"?R.apply(this,arguments):R;return o(Hs.translate(C[0],C[1]).scale(tt.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof M=="function"?-M.apply(this,arguments):-M),Q,d)},R,H)};function q(O,G){return G=Math.max(f[0],Math.min(f[1],G)),G===O.k?O:new Yn(G,O.x,O.y)}function w(O,G,M){var R=G[0]-M[0]*O.k,H=G[1]-M[1]*O.k;return R===O.x&&H===O.y?O:new Yn(O.k,R,H)}function A(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function Y(O,G,M,R){O.on("start.zoom",function(){B(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(R).end()}).tween("zoom",function(){var H=this,Q=arguments,tt=B(H,Q).event(R),C=a.apply(H,Q),U=M==null?A(C):typeof M=="function"?M.apply(H,Q):M,P=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),et=H.__zoom,st=typeof G=="function"?G.apply(H,Q):G,ct=m(et.invert(U).concat(P/et.k),st.invert(U).concat(P/st.k));return function(rt){if(rt===1)rt=st;else{var ut=ct(rt),ft=P/ut[2];rt=new Yn(ft,U[0]-ut[0]*ft,U[1]-ut[1]*ft)}tt.zoom(null,rt)}})}function B(O,G,M){return!M&&O.__zooming||new j(O,G)}function j(O,G){this.that=O,this.args=G,this.active=0,this.sourceEvent=null,this.extent=a.apply(O,G),this.taps=0}j.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,G){return this.mouse&&O!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var G=Be(this.that).datum();h.call(O,this.that,new rw(O,{sourceEvent:this.sourceEvent,target:N,transform:this.that.__zoom,dispatch:h}),G)}};function X(O,...G){if(!n.apply(this,arguments))return;var M=B(this,G).event(O),R=this.__zoom,H=Math.max(f[0],Math.min(f[1],R.k*Math.pow(2,u.apply(this,arguments)))),Q=Pe(O);if(M.wheel)(M.mouse[0][0]!==Q[0]||M.mouse[0][1]!==Q[1])&&(M.mouse[1]=R.invert(M.mouse[0]=Q)),clearTimeout(M.wheel);else{if(R.k===H)return;M.mouse=[Q,R.invert(Q)],ms(this),M.start()}io(O),M.wheel=setTimeout(tt,b),M.zoom("mouse",o(w(q(R,H),M.mouse[0],M.mouse[1]),M.extent,d));function tt(){M.wheel=null,M.end()}}function $(O,...G){if(x||!n.apply(this,arguments))return;var M=O.currentTarget,R=B(this,G,!0).event(O),H=Be(O.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",P,!0),Q=Pe(O,M),tt=O.clientX,C=O.clientY;Jy(O.view),mf(O),R.mouse=[Q,this.__zoom.invert(Q)],ms(this),R.start();function U(et){if(io(et),!R.moved){var st=et.clientX-tt,ct=et.clientY-C;R.moved=st*st+ct*ct>_}R.event(et).zoom("mouse",o(w(R.that.__zoom,R.mouse[0]=Pe(et,M),R.mouse[1]),R.extent,d))}function P(et){H.on("mousemove.zoom mouseup.zoom",null),Iy(et.view,R.moved),io(et),R.event(et).end()}}function ot(O,...G){if(n.apply(this,arguments)){var M=this.__zoom,R=Pe(O.changedTouches?O.changedTouches[0]:O,this),H=M.invert(R),Q=M.k*(O.shiftKey?.5:2),tt=o(w(q(M,Q),R,H),a.apply(this,G),d);io(O),g>0?Be(this).transition().duration(g).call(Y,tt,R,O):Be(this).call(N.transform,tt,R,O)}}function k(O,...G){if(n.apply(this,arguments)){var M=O.touches,R=M.length,H=B(this,G,O.changedTouches.length===R).event(O),Q,tt,C,U;for(mf(O),tt=0;tt<R;++tt)C=M[tt],U=Pe(C,this),U=[U,this.__zoom.invert(U),C.identifier],H.touch0?!H.touch1&&H.touch0[2]!==U[2]&&(H.touch1=U,H.taps=0):(H.touch0=U,Q=!0,H.taps=1+!!p);p&&(p=clearTimeout(p)),Q&&(H.taps<2&&(v=U[0],p=setTimeout(function(){p=null},E)),ms(this),H.start())}}function I(O,...G){if(this.__zooming){var M=B(this,G).event(O),R=O.changedTouches,H=R.length,Q,tt,C,U;for(io(O),Q=0;Q<H;++Q)tt=R[Q],C=Pe(tt,this),M.touch0&&M.touch0[2]===tt.identifier?M.touch0[0]=C:M.touch1&&M.touch1[2]===tt.identifier&&(M.touch1[0]=C);if(tt=M.that.__zoom,M.touch1){var P=M.touch0[0],et=M.touch0[1],st=M.touch1[0],ct=M.touch1[1],rt=(rt=st[0]-P[0])*rt+(rt=st[1]-P[1])*rt,ut=(ut=ct[0]-et[0])*ut+(ut=ct[1]-et[1])*ut;tt=q(tt,Math.sqrt(rt/ut)),C=[(P[0]+st[0])/2,(P[1]+st[1])/2],U=[(et[0]+ct[0])/2,(et[1]+ct[1])/2]}else if(M.touch0)C=M.touch0[0],U=M.touch0[1];else return;M.zoom("touch",o(w(tt,C,U),M.extent,d))}}function lt(O,...G){if(this.__zooming){var M=B(this,G).event(O),R=O.changedTouches,H=R.length,Q,tt;for(mf(O),x&&clearTimeout(x),x=setTimeout(function(){x=null},E),Q=0;Q<H;++Q)tt=R[Q],M.touch0&&M.touch0[2]===tt.identifier?delete M.touch0:M.touch1&&M.touch1[2]===tt.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(tt=Pe(tt,this),Math.hypot(v[0]-tt[0],v[1]-tt[1])<T)){var C=Be(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return N.wheelDelta=function(O){return arguments.length?(u=typeof O=="function"?O:os(+O),N):u},N.filter=function(O){return arguments.length?(n=typeof O=="function"?O:os(!!O),N):n},N.touchable=function(O){return arguments.length?(r=typeof O=="function"?O:os(!!O),N):r},N.extent=function(O){return arguments.length?(a=typeof O=="function"?O:os([[+O[0][0],+O[0][1]],[+O[1][0],+O[1][1]]]),N):a},N.scaleExtent=function(O){return arguments.length?(f[0]=+O[0],f[1]=+O[1],N):[f[0],f[1]]},N.translateExtent=function(O){return arguments.length?(d[0][0]=+O[0][0],d[1][0]=+O[1][0],d[0][1]=+O[0][1],d[1][1]=+O[1][1],N):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},N.constrain=function(O){return arguments.length?(o=O,N):o},N.duration=function(O){return arguments.length?(g=+O,N):g},N.interpolate=function(O){return arguments.length?(m=O,N):m},N.on=function(){var O=h.on.apply(h,arguments);return O===h?N:O},N.clickDistance=function(O){return arguments.length?(_=(O=+O)*O,N):Math.sqrt(_)},N.tapDistance=function(O){return arguments.length?(T=+O,N):T},N}const hn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:n=>`Node type "${n}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:a,sourceHandle:o,targetHandle:u})=>`Couldn't create edge for ${n} handle id: "${n==="source"?o:u}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/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."},po=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],gp=["Enter"," ","Escape"],mp={"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:n,x:a,y:o})=>`Moved selected node ${n}. New position, x: ${a}, y: ${o}`,"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 nl;(function(n){n.Strict="strict",n.Loose="loose"})(nl||(nl={}));var Pi;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(Pi||(Pi={}));var vo;(function(n){n.Partial="partial",n.Full="full"})(vo||(vo={}));const yp={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var bi;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(bi||(bi={}));var _s;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(_s||(_s={}));var gt;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(gt||(gt={}));const j0={[gt.Left]:gt.Right,[gt.Right]:gt.Left,[gt.Top]:gt.Bottom,[gt.Bottom]:gt.Top};function pp(n){return n===null?null:n?"valid":"invalid"}const vp=n=>"id"in n&&"source"in n&&"target"in n,mw=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),id=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),Co=(n,a=[0,0])=>{const{width:o,height:u}=Qn(n),r=n.origin??a,f=o*r[0],d=u*r[1];return{x:n.position.x-f,y:n.position.y-d}},yw=(n,a={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const o=n.reduce((u,r)=>{const f=typeof r=="string";let d=!a.nodeLookup&&!f?r:void 0;a.nodeLookup&&(d=f?a.nodeLookup.get(r):id(r)?r:a.nodeLookup.get(r.id));const g=d?Ms(d,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return js(u,g)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Bs(o)},No=(n,a={})=>{let o={x:1/0,y:1/0,x2:-1/0,y2:-1/0},u=!1;return n.forEach(r=>{(a.filter===void 0||a.filter(r))&&(o=js(o,Ms(r)),u=!0)}),u?Bs(o):{x:0,y:0,width:0,height:0}},ad=(n,a,[o,u,r]=[0,0,1],f=!1,d=!1)=>{const g={...Ao(a,[o,u,r]),width:a.width/r,height:a.height/r},m=[];for(const h of n.values()){const{measured:p,selectable:v=!0,hidden:x=!1}=h;if(d&&!v||x)continue;const E=p.width??h.width??h.initialWidth??null,b=p.height??h.height??h.initialHeight??null,_=xo(g,al(h)),T=(E??0)*(b??0),N=f&&_>0;(!h.internals.handleBounds||N||_>=T||h.dragging)&&m.push(h)}return m},pw=(n,a)=>{const o=new Set;return n.forEach(u=>{o.add(u.id)}),a.filter(u=>o.has(u.source)||o.has(u.target))};function vw(n,a){const o=new Map,u=a?.nodes?new Set(a.nodes.map(r=>r.id)):null;return n.forEach(r=>{r.measured.width&&r.measured.height&&(a?.includeHiddenNodes||!r.hidden)&&(!u||u.has(r.id))&&o.set(r.id,r)}),o}async function xw({nodes:n,width:a,height:o,panZoom:u,minZoom:r,maxZoom:f},d){if(n.size===0)return Promise.resolve(!0);const g=vw(n,d),m=No(g),h=ld(m,a,o,d?.minZoom??r,d?.maxZoom??f,d?.padding??.1);return await u.setViewport(h,{duration:d?.duration,ease:d?.ease,interpolate:d?.interpolate}),Promise.resolve(!0)}function xp({nodeId:n,nextPosition:a,nodeLookup:o,nodeOrigin:u=[0,0],nodeExtent:r,onError:f}){const d=o.get(n),g=d.parentId?o.get(d.parentId):void 0,{x:m,y:h}=g?g.internals.positionAbsolute:{x:0,y:0},p=d.origin??u;let v=d.extent||r;if(d.extent==="parent"&&!d.expandParent)if(!g)f?.("005",hn.error005());else{const E=g.measured.width,b=g.measured.height;E&&b&&(v=[[m,h],[m+E,h+b]])}else g&&ll(d.extent)&&(v=[[d.extent[0][0]+m,d.extent[0][1]+h],[d.extent[1][0]+m,d.extent[1][1]+h]]);const x=ll(v)?ia(a,v,d.measured):a;return(d.measured.width===void 0||d.measured.height===void 0)&&f?.("015",hn.error015()),{position:{x:x.x-m+(d.measured.width??0)*p[0],y:x.y-h+(d.measured.height??0)*p[1]},positionAbsolute:x}}async function bw({nodesToRemove:n=[],edgesToRemove:a=[],nodes:o,edges:u,onBeforeDelete:r}){const f=new Set(n.map(x=>x.id)),d=[];for(const x of o){if(x.deletable===!1)continue;const E=f.has(x.id),b=!E&&x.parentId&&d.find(_=>_.id===x.parentId);(E||b)&&d.push(x)}const g=new Set(a.map(x=>x.id)),m=u.filter(x=>x.deletable!==!1),p=pw(d,m);for(const x of m)g.has(x.id)&&!p.find(b=>b.id===x.id)&&p.push(x);if(!r)return{edges:p,nodes:d};const v=await r({nodes:d,edges:p});return typeof v=="boolean"?v?{edges:p,nodes:d}:{edges:[],nodes:[]}:v}const il=(n,a=0,o=1)=>Math.min(Math.max(n,a),o),ia=(n={x:0,y:0},a,o)=>({x:il(n.x,a[0][0],a[1][0]-(o?.width??0)),y:il(n.y,a[0][1],a[1][1]-(o?.height??0))});function bp(n,a,o){const{width:u,height:r}=Qn(o),{x:f,y:d}=o.internals.positionAbsolute;return ia(n,[[f,d],[f+u,d+r]],a)}const B0=(n,a,o)=>n<a?il(Math.abs(n-a),1,a)/a:n>o?-il(Math.abs(n-o),1,a)/a:0,Sp=(n,a,o=15,u=40)=>{const r=B0(n.x,u,a.width-u)*o,f=B0(n.y,u,a.height-u)*o;return[r,f]},js=(n,a)=>({x:Math.min(n.x,a.x),y:Math.min(n.y,a.y),x2:Math.max(n.x2,a.x2),y2:Math.max(n.y2,a.y2)}),Vf=({x:n,y:a,width:o,height:u})=>({x:n,y:a,x2:n+o,y2:a+u}),Bs=({x:n,y:a,x2:o,y2:u})=>({x:n,y:a,width:o-n,height:u-a}),al=(n,a=[0,0])=>{const{x:o,y:u}=id(n)?n.internals.positionAbsolute:Co(n,a);return{x:o,y:u,width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}},Ms=(n,a=[0,0])=>{const{x:o,y:u}=id(n)?n.internals.positionAbsolute:Co(n,a);return{x:o,y:u,x2:o+(n.measured?.width??n.width??n.initialWidth??0),y2:u+(n.measured?.height??n.height??n.initialHeight??0)}},Ep=(n,a)=>Bs(js(Vf(n),Vf(a))),xo=(n,a)=>{const o=Math.max(0,Math.min(n.x+n.width,a.x+a.width)-Math.max(n.x,a.x)),u=Math.max(0,Math.min(n.y+n.height,a.y+a.height)-Math.max(n.y,a.y));return Math.ceil(o*u)},U0=n=>en(n.width)&&en(n.height)&&en(n.x)&&en(n.y),en=n=>!isNaN(n)&&isFinite(n),Sw=(n,a)=>{},To=(n,a=[1,1])=>({x:a[0]*Math.round(n.x/a[0]),y:a[1]*Math.round(n.y/a[1])}),Ao=({x:n,y:a},[o,u,r],f=!1,d=[1,1])=>{const g={x:(n-o)/r,y:(a-u)/r};return f?To(g,d):g},Cs=({x:n,y:a},[o,u,r])=>({x:n*r+o,y:a*r+u});function ka(n,a){if(typeof n=="number")return Math.floor((a-a/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(o)}if(typeof n=="string"&&n.endsWith("%")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(a*o*.01)}return console.error(`[React Flow] The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ew(n,a,o){if(typeof n=="string"||typeof n=="number"){const u=ka(n,o),r=ka(n,a);return{top:u,right:r,bottom:u,left:r,x:r*2,y:u*2}}if(typeof n=="object"){const u=ka(n.top??n.y??0,o),r=ka(n.bottom??n.y??0,o),f=ka(n.left??n.x??0,a),d=ka(n.right??n.x??0,a);return{top:u,right:d,bottom:r,left:f,x:f+d,y:u+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ww(n,a,o,u,r,f){const{x:d,y:g}=Cs(n,[a,o,u]),{x:m,y:h}=Cs({x:n.x+n.width,y:n.y+n.height},[a,o,u]),p=r-m,v=f-h;return{left:Math.floor(d),top:Math.floor(g),right:Math.floor(p),bottom:Math.floor(v)}}const ld=(n,a,o,u,r,f)=>{const d=Ew(f,a,o),g=(a-d.x)/n.width,m=(o-d.y)/n.height,h=Math.min(g,m),p=il(h,u,r),v=n.x+n.width/2,x=n.y+n.height/2,E=a/2-v*p,b=o/2-x*p,_=ww(n,E,b,p,a,o),T={left:Math.min(_.left-d.left,0),top:Math.min(_.top-d.top,0),right:Math.min(_.right-d.right,0),bottom:Math.min(_.bottom-d.bottom,0)};return{x:E-T.left+T.right,y:b-T.top+T.bottom,zoom:p}},bo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ll(n){return n!=null&&n!=="parent"}function Qn(n){return{width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}}function wp(n){return(n.measured?.width??n.width??n.initialWidth)!==void 0&&(n.measured?.height??n.height??n.initialHeight)!==void 0}function _p(n,a={width:0,height:0},o,u,r){const f={...n},d=u.get(o);if(d){const g=d.origin||r;f.x+=d.internals.positionAbsolute.x-(a.width??0)*g[0],f.y+=d.internals.positionAbsolute.y-(a.height??0)*g[1]}return f}function q0(n,a){if(n.size!==a.size)return!1;for(const o of n)if(!a.has(o))return!1;return!0}function _w(){let n,a;return{promise:new Promise((u,r)=>{n=u,a=r}),resolve:n,reject:a}}function Mw(n){return{...mp,...n||{}}}function so(n,{snapGrid:a=[0,0],snapToGrid:o=!1,transform:u,containerBounds:r}){const{x:f,y:d}=nn(n),g=Ao({x:f-(r?.left??0),y:d-(r?.top??0)},u),{x:m,y:h}=o?To(g,a):g;return{xSnapped:m,ySnapped:h,...g}}const od=n=>({width:n.offsetWidth,height:n.offsetHeight}),Mp=n=>n?.getRootNode?.()||window?.document,Cw=["INPUT","SELECT","TEXTAREA"];function Cp(n){const a=n.composedPath?.()?.[0]||n.target;return a?.nodeType!==1?!1:Cw.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const Np=n=>"clientX"in n,nn=(n,a)=>{const o=Np(n),u=o?n.clientX:n.touches?.[0].clientX,r=o?n.clientY:n.touches?.[0].clientY;return{x:u-(a?.left??0),y:r-(a?.top??0)}},L0=(n,a,o,u,r)=>{const f=a.querySelectorAll(`.${n}`);return!f||!f.length?null:Array.from(f).map(d=>{const g=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:n,nodeId:r,position:d.getAttribute("data-handlepos"),x:(g.left-o.left)/u,y:(g.top-o.top)/u,...od(d)}})};function Tp({sourceX:n,sourceY:a,targetX:o,targetY:u,sourceControlX:r,sourceControlY:f,targetControlX:d,targetControlY:g}){const m=n*.125+r*.375+d*.375+o*.125,h=a*.125+f*.375+g*.375+u*.125,p=Math.abs(m-n),v=Math.abs(h-a);return[m,h,p,v]}function us(n,a){return n>=0?.5*n:a*25*Math.sqrt(-n)}function Y0({pos:n,x1:a,y1:o,x2:u,y2:r,c:f}){switch(n){case gt.Left:return[a-us(a-u,f),o];case gt.Right:return[a+us(u-a,f),o];case gt.Top:return[a,o-us(o-r,f)];case gt.Bottom:return[a,o+us(r-o,f)]}}function Ap({sourceX:n,sourceY:a,sourcePosition:o=gt.Bottom,targetX:u,targetY:r,targetPosition:f=gt.Top,curvature:d=.25}){const[g,m]=Y0({pos:o,x1:n,y1:a,x2:u,y2:r,c:d}),[h,p]=Y0({pos:f,x1:u,y1:r,x2:n,y2:a,c:d}),[v,x,E,b]=Tp({sourceX:n,sourceY:a,targetX:u,targetY:r,sourceControlX:g,sourceControlY:m,targetControlX:h,targetControlY:p});return[`M${n},${a} C${g},${m} ${h},${p} ${u},${r}`,v,x,E,b]}function zp({sourceX:n,sourceY:a,targetX:o,targetY:u}){const r=Math.abs(o-n)/2,f=o<n?o+r:o-r,d=Math.abs(u-a)/2,g=u<a?u+d:u-d;return[f,g,r,d]}function Nw({sourceNode:n,targetNode:a,selected:o=!1,zIndex:u=0,elevateOnSelect:r=!1,zIndexMode:f="basic"}){if(f==="manual")return u;const d=r&&o?u+1e3:u,g=Math.max(n.parentId||r&&n.selected?n.internals.z:0,a.parentId||r&&a.selected?a.internals.z:0);return d+g}function Tw({sourceNode:n,targetNode:a,width:o,height:u,transform:r}){const f=js(Ms(n),Ms(a));f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);const d={x:-r[0]/r[2],y:-r[1]/r[2],width:o/r[2],height:u/r[2]};return xo(d,Bs(f))>0}const Aw=({source:n,sourceHandle:a,target:o,targetHandle:u})=>`xy-edge__${n}${a||""}-${o}${u||""}`,zw=(n,a)=>a.some(o=>o.source===n.source&&o.target===n.target&&(o.sourceHandle===n.sourceHandle||!o.sourceHandle&&!n.sourceHandle)&&(o.targetHandle===n.targetHandle||!o.targetHandle&&!n.targetHandle)),Dw=(n,a,o={})=>{if(!n.source||!n.target)return a;const u=o.getEdgeId||Aw;let r;return vp(n)?r={...n}:r={...n,id:u(n)},zw(r,a)?a:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,a.concat(r))};function Dp({sourceX:n,sourceY:a,targetX:o,targetY:u}){const[r,f,d,g]=zp({sourceX:n,sourceY:a,targetX:o,targetY:u});return[`M ${n},${a}L ${o},${u}`,r,f,d,g]}const V0={[gt.Left]:{x:-1,y:0},[gt.Right]:{x:1,y:0},[gt.Top]:{x:0,y:-1},[gt.Bottom]:{x:0,y:1}},Ow=({source:n,sourcePosition:a=gt.Bottom,target:o})=>a===gt.Left||a===gt.Right?n.x<o.x?{x:1,y:0}:{x:-1,y:0}:n.y<o.y?{x:0,y:1}:{x:0,y:-1},Q0=(n,a)=>Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2));function Rw({source:n,sourcePosition:a=gt.Bottom,target:o,targetPosition:u=gt.Top,center:r,offset:f,stepPosition:d}){const g=V0[a],m=V0[u],h={x:n.x+g.x*f,y:n.y+g.y*f},p={x:o.x+m.x*f,y:o.y+m.y*f},v=Ow({source:h,sourcePosition:a,target:p}),x=v.x!==0?"x":"y",E=v[x];let b=[],_,T;const N={x:0,y:0},q={x:0,y:0},[,,w,A]=zp({sourceX:n.x,sourceY:n.y,targetX:o.x,targetY:o.y});if(g[x]*m[x]===-1){x==="x"?(_=r.x??h.x+(p.x-h.x)*d,T=r.y??(h.y+p.y)/2):(_=r.x??(h.x+p.x)/2,T=r.y??h.y+(p.y-h.y)*d);const B=[{x:_,y:h.y},{x:_,y:p.y}],j=[{x:h.x,y:T},{x:p.x,y:T}];g[x]===E?b=x==="x"?B:j:b=x==="x"?j:B}else{const B=[{x:h.x,y:p.y}],j=[{x:p.x,y:h.y}];if(x==="x"?b=g.x===E?j:B:b=g.y===E?B:j,a===u){const I=Math.abs(n[x]-o[x]);if(I<=f){const lt=Math.min(f-1,f-I);g[x]===E?N[x]=(h[x]>n[x]?-1:1)*lt:q[x]=(p[x]>o[x]?-1:1)*lt}}if(a!==u){const I=x==="x"?"y":"x",lt=g[x]===m[I],O=h[I]>p[I],G=h[I]<p[I];(g[x]===1&&(!lt&&O||lt&&G)||g[x]!==1&&(!lt&&G||lt&&O))&&(b=x==="x"?B:j)}const X={x:h.x+N.x,y:h.y+N.y},$={x:p.x+q.x,y:p.y+q.y},ot=Math.max(Math.abs(X.x-b[0].x),Math.abs($.x-b[0].x)),k=Math.max(Math.abs(X.y-b[0].y),Math.abs($.y-b[0].y));ot>=k?(_=(X.x+$.x)/2,T=b[0].y):(_=b[0].x,T=(X.y+$.y)/2)}return[[n,{x:h.x+N.x,y:h.y+N.y},...b,{x:p.x+q.x,y:p.y+q.y},o],_,T,w,A]}function Hw(n,a,o,u){const r=Math.min(Q0(n,a)/2,Q0(a,o)/2,u),{x:f,y:d}=a;if(n.x===f&&f===o.x||n.y===d&&d===o.y)return`L${f} ${d}`;if(n.y===d){const h=n.x<o.x?-1:1,p=n.y<o.y?1:-1;return`L ${f+r*h},${d}Q ${f},${d} ${f},${d+r*p}`}const g=n.x<o.x?1:-1,m=n.y<o.y?-1:1;return`L ${f},${d+r*m}Q ${f},${d} ${f+r*g},${d}`}function Ns({sourceX:n,sourceY:a,sourcePosition:o=gt.Bottom,targetX:u,targetY:r,targetPosition:f=gt.Top,borderRadius:d=5,centerX:g,centerY:m,offset:h=20,stepPosition:p=.5}){const[v,x,E,b,_]=Rw({source:{x:n,y:a},sourcePosition:o,target:{x:u,y:r},targetPosition:f,center:{x:g,y:m},offset:h,stepPosition:p});return[v.reduce((N,q,w)=>{let A="";return w>0&&w<v.length-1?A=Hw(v[w-1],q,v[w+1],d):A=`${w===0?"M":"L"}${q.x} ${q.y}`,N+=A,N},""),x,E,b,_]}function X0(n){return n&&!!(n.internals.handleBounds||n.handles?.length)&&!!(n.measured.width||n.width||n.initialWidth)}function jw(n){const{sourceNode:a,targetNode:o}=n;if(!X0(a)||!X0(o))return null;const u=a.internals.handleBounds||G0(a.handles),r=o.internals.handleBounds||G0(o.handles),f=Z0(u?.source??[],n.sourceHandle),d=Z0(n.connectionMode===nl.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),n.targetHandle);if(!f||!d)return n.onError?.("008",hn.error008(f?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const g=f?.position||gt.Bottom,m=d?.position||gt.Top,h=aa(a,f,g),p=aa(o,d,m);return{sourceX:h.x,sourceY:h.y,targetX:p.x,targetY:p.y,sourcePosition:g,targetPosition:m}}function G0(n){if(!n)return null;const a=[],o=[];for(const u of n)u.width=u.width??1,u.height=u.height??1,u.type==="source"?a.push(u):u.type==="target"&&o.push(u);return{source:a,target:o}}function aa(n,a,o=gt.Left,u=!1){const r=(a?.x??0)+n.internals.positionAbsolute.x,f=(a?.y??0)+n.internals.positionAbsolute.y,{width:d,height:g}=a??Qn(n);if(u)return{x:r+d/2,y:f+g/2};switch(a?.position??o){case gt.Top:return{x:r+d/2,y:f};case gt.Right:return{x:r+d,y:f+g/2};case gt.Bottom:return{x:r+d/2,y:f+g};case gt.Left:return{x:r,y:f+g/2}}}function Z0(n,a){return n&&(a?n.find(o=>o.id===a):n[0])||null}function Qf(n,a){return n?typeof n=="string"?n:`${a?`${a}__`:""}${Object.keys(n).sort().map(u=>`${u}=${n[u]}`).join("&")}`:""}function Bw(n,{id:a,defaultColor:o,defaultMarkerStart:u,defaultMarkerEnd:r}){const f=new Set;return n.reduce((d,g)=>([g.markerStart||u,g.markerEnd||r].forEach(m=>{if(m&&typeof m=="object"){const h=Qf(m,a);f.has(h)||(d.push({id:h,color:m.color||o,...m}),f.add(h))}}),d),[]).sort((d,g)=>d.id.localeCompare(g.id))}const Op=1e3,Uw=10,ud={nodeOrigin:[0,0],nodeExtent:po,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},qw={...ud,checkEquality:!0};function sd(n,a){const o={...n};for(const u in a)a[u]!==void 0&&(o[u]=a[u]);return o}function Lw(n,a,o){const u=sd(ud,o);for(const r of n.values())if(r.parentId)cd(r,n,a,u);else{const f=Co(r,u.nodeOrigin),d=ll(r.extent)?r.extent:u.nodeExtent,g=ia(f,d,Qn(r));r.internals.positionAbsolute=g}}function Yw(n,a){if(!n.handles)return n.measured?a?.internals.handleBounds:void 0;const o=[],u=[];for(const r of n.handles){const f={id:r.id,width:r.width??1,height:r.height??1,nodeId:n.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?o.push(f):r.type==="target"&&u.push(f)}return{source:o,target:u}}function rd(n){return n==="manual"}function Xf(n,a,o,u={}){const r=sd(qw,u),f={i:0},d=new Map(a),g=r?.elevateNodesOnSelect&&!rd(r.zIndexMode)?Op:0;let m=n.length>0;a.clear(),o.clear();for(const h of n){let p=d.get(h.id);if(r.checkEquality&&h===p?.internals.userNode)a.set(h.id,p);else{const v=Co(h,r.nodeOrigin),x=ll(h.extent)?h.extent:r.nodeExtent,E=ia(v,x,Qn(h));p={...r.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:E,handleBounds:Yw(h,p),z:Rp(h,g,r.zIndexMode),userNode:h}},a.set(h.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(m=!1),h.parentId&&cd(p,a,o,u,f)}return m}function Vw(n,a){if(!n.parentId)return;const o=a.get(n.parentId);o?o.set(n.id,n):a.set(n.parentId,new Map([[n.id,n]]))}function cd(n,a,o,u,r){const{elevateNodesOnSelect:f,nodeOrigin:d,nodeExtent:g,zIndexMode:m}=sd(ud,u),h=n.parentId,p=a.get(h);if(!p){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Vw(n,o),r&&!p.parentId&&p.internals.rootParentIndex===void 0&&m==="auto"&&(p.internals.rootParentIndex=++r.i,p.internals.z=p.internals.z+r.i*Uw),r&&p.internals.rootParentIndex!==void 0&&(r.i=p.internals.rootParentIndex);const v=f&&!rd(m)?Op:0,{x,y:E,z:b}=Qw(n,p,d,g,v,m),{positionAbsolute:_}=n.internals,T=x!==_.x||E!==_.y;(T||b!==n.internals.z)&&a.set(n.id,{...n,internals:{...n.internals,positionAbsolute:T?{x,y:E}:_,z:b}})}function Rp(n,a,o){const u=en(n.zIndex)?n.zIndex:0;return rd(o)?u:u+(n.selected?a:0)}function Qw(n,a,o,u,r,f){const{x:d,y:g}=a.internals.positionAbsolute,m=Qn(n),h=Co(n,o),p=ll(n.extent)?ia(h,n.extent,m):h;let v=ia({x:d+p.x,y:g+p.y},u,m);n.extent==="parent"&&(v=bp(v,m,a));const x=Rp(n,r,f),E=a.internals.z??0;return{x:v.x,y:v.y,z:E>=x?E+1:x}}function fd(n,a,o,u=[0,0]){const r=[],f=new Map;for(const d of n){const g=a.get(d.parentId);if(!g)continue;const m=f.get(d.parentId)?.expandedRect??al(g),h=Ep(m,d.rect);f.set(d.parentId,{expandedRect:h,parent:g})}return f.size>0&&f.forEach(({expandedRect:d,parent:g},m)=>{const h=g.internals.positionAbsolute,p=Qn(g),v=g.origin??u,x=d.x<h.x?Math.round(Math.abs(h.x-d.x)):0,E=d.y<h.y?Math.round(Math.abs(h.y-d.y)):0,b=Math.max(p.width,Math.round(d.width)),_=Math.max(p.height,Math.round(d.height)),T=(b-p.width)*v[0],N=(_-p.height)*v[1];(x>0||E>0||T||N)&&(r.push({id:m,type:"position",position:{x:g.position.x-x+T,y:g.position.y-E+N}}),o.get(m)?.forEach(q=>{n.some(w=>w.id===q.id)||r.push({id:q.id,type:"position",position:{x:q.position.x+x,y:q.position.y+E}})})),(p.width<d.width||p.height<d.height||x||E)&&r.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:b+(x?v[0]*x-T:0),height:_+(E?v[1]*E-N:0)}})}),r}function Xw(n,a,o,u,r,f,d){const g=u?.querySelector(".xyflow__viewport");let m=!1;if(!g)return{changes:[],updatedInternals:m};const h=[],p=window.getComputedStyle(g),{m22:v}=new window.DOMMatrixReadOnly(p.transform),x=[];for(const E of n.values()){const b=a.get(E.id);if(!b)continue;if(b.hidden){a.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),m=!0;continue}const _=od(E.nodeElement),T=b.measured.width!==_.width||b.measured.height!==_.height;if(!!(_.width&&_.height&&(T||!b.internals.handleBounds||E.force))){const q=E.nodeElement.getBoundingClientRect(),w=ll(b.extent)?b.extent:f;let{positionAbsolute:A}=b.internals;b.parentId&&b.extent==="parent"?A=bp(A,_,a.get(b.parentId)):w&&(A=ia(A,w,_));const Y={...b,measured:_,internals:{...b.internals,positionAbsolute:A,handleBounds:{source:L0("source",E.nodeElement,q,v,b.id),target:L0("target",E.nodeElement,q,v,b.id)}}};a.set(b.id,Y),b.parentId&&cd(Y,a,o,{nodeOrigin:r,zIndexMode:d}),m=!0,T&&(h.push({id:b.id,type:"dimensions",dimensions:_}),b.expandParent&&b.parentId&&x.push({id:b.id,parentId:b.parentId,rect:al(Y,r)}))}}if(x.length>0){const E=fd(x,a,o,r);h.push(...E)}return{changes:h,updatedInternals:m}}async function Gw({delta:n,panZoom:a,transform:o,translateExtent:u,width:r,height:f}){if(!a||!n.x&&!n.y)return Promise.resolve(!1);const d=await a.setViewportConstrained({x:o[0]+n.x,y:o[1]+n.y,zoom:o[2]},[[0,0],[r,f]],u),g=!!d&&(d.x!==o[0]||d.y!==o[1]||d.k!==o[2]);return Promise.resolve(g)}function K0(n,a,o,u,r,f){let d=r;const g=u.get(d)||new Map;u.set(d,g.set(o,a)),d=`${r}-${n}`;const m=u.get(d)||new Map;if(u.set(d,m.set(o,a)),f){d=`${r}-${n}-${f}`;const h=u.get(d)||new Map;u.set(d,h.set(o,a))}}function Hp(n,a,o){n.clear(),a.clear();for(const u of o){const{source:r,target:f,sourceHandle:d=null,targetHandle:g=null}=u,m={edgeId:u.id,source:r,target:f,sourceHandle:d,targetHandle:g},h=`${r}-${d}--${f}-${g}`,p=`${f}-${g}--${r}-${d}`;K0("source",m,p,n,r,d),K0("target",m,h,n,f,g),a.set(u.id,u)}}function jp(n,a){if(!n.parentId)return!1;const o=a.get(n.parentId);return o?o.selected?!0:jp(o,a):!1}function k0(n,a,o){let u=n;do{if(u?.matches?.(a))return!0;if(u===o)return!1;u=u?.parentElement}while(u);return!1}function Zw(n,a,o,u){const r=new Map;for(const[f,d]of n)if((d.selected||d.id===u)&&(!d.parentId||!jp(d,n))&&(d.draggable||a&&typeof d.draggable>"u")){const g=n.get(f);g&&r.set(f,{id:f,position:g.position||{x:0,y:0},distance:{x:o.x-g.internals.positionAbsolute.x,y:o.y-g.internals.positionAbsolute.y},extent:g.extent,parentId:g.parentId,origin:g.origin,expandParent:g.expandParent,internals:{positionAbsolute:g.internals.positionAbsolute||{x:0,y:0}},measured:{width:g.measured.width??0,height:g.measured.height??0}})}return r}function yf({nodeId:n,dragItems:a,nodeLookup:o,dragging:u=!0}){const r=[];for(const[d,g]of a){const m=o.get(d)?.internals.userNode;m&&r.push({...m,position:g.position,dragging:u})}if(!n)return[r[0],r];const f=o.get(n)?.internals.userNode;return[f?{...f,position:a.get(n)?.position||f.position,dragging:u}:r[0],r]}function Kw({dragItems:n,snapGrid:a,x:o,y:u}){const r=n.values().next().value;if(!r)return null;const f={x:o-r.distance.x,y:u-r.distance.y},d=To(f,a);return{x:d.x-f.x,y:d.y-f.y}}function kw({onNodeMouseDown:n,getStoreItems:a,onDragStart:o,onDrag:u,onDragStop:r}){let f={x:null,y:null},d=0,g=new Map,m=!1,h={x:0,y:0},p=null,v=!1,x=null,E=!1,b=!1,_=null;function T({noDragClassName:q,handleSelector:w,domNode:A,isSelectable:Y,nodeId:B,nodeClickDistance:j=0}){x=Be(A);function X({x:I,y:lt}){const{nodeLookup:O,nodeExtent:G,snapGrid:M,snapToGrid:R,nodeOrigin:H,onNodeDrag:Q,onSelectionDrag:tt,onError:C,updateNodePositions:U}=a();f={x:I,y:lt};let P=!1;const et=g.size>1,st=et&&G?Vf(No(g)):null,ct=et&&R?Kw({dragItems:g,snapGrid:M,x:I,y:lt}):null;for(const[rt,ut]of g){if(!O.has(rt))continue;let ft={x:I-ut.distance.x,y:lt-ut.distance.y};R&&(ft=ct?{x:Math.round(ft.x+ct.x),y:Math.round(ft.y+ct.y)}:To(ft,M));let Et=null;if(et&&G&&!ut.extent&&st){const{positionAbsolute:vt}=ut.internals,Ct=vt.x-st.x+G[0][0],Ut=vt.x+ut.measured.width-st.x2+G[1][0],Ht=vt.y-st.y+G[0][1],le=vt.y+ut.measured.height-st.y2+G[1][1];Et=[[Ct,Ht],[Ut,le]]}const{position:bt,positionAbsolute:yt}=xp({nodeId:rt,nextPosition:ft,nodeLookup:O,nodeExtent:Et||G,nodeOrigin:H,onError:C});P=P||ut.position.x!==bt.x||ut.position.y!==bt.y,ut.position=bt,ut.internals.positionAbsolute=yt}if(b=b||P,!!P&&(U(g,!0),_&&(u||Q||!B&&tt))){const[rt,ut]=yf({nodeId:B,dragItems:g,nodeLookup:O});u?.(_,g,rt,ut),Q?.(_,rt,ut),B||tt?.(_,ut)}}async function $(){if(!p)return;const{transform:I,panBy:lt,autoPanSpeed:O,autoPanOnNodeDrag:G}=a();if(!G){m=!1,cancelAnimationFrame(d);return}const[M,R]=Sp(h,p,O);(M!==0||R!==0)&&(f.x=(f.x??0)-M/I[2],f.y=(f.y??0)-R/I[2],await lt({x:M,y:R})&&X(f)),d=requestAnimationFrame($)}function ot(I){const{nodeLookup:lt,multiSelectionActive:O,nodesDraggable:G,transform:M,snapGrid:R,snapToGrid:H,selectNodesOnDrag:Q,onNodeDragStart:tt,onSelectionDragStart:C,unselectNodesAndEdges:U}=a();v=!0,(!Q||!Y)&&!O&&B&&(lt.get(B)?.selected||U()),Y&&Q&&B&&n?.(B);const P=so(I.sourceEvent,{transform:M,snapGrid:R,snapToGrid:H,containerBounds:p});if(f=P,g=Zw(lt,G,P,B),g.size>0&&(o||tt||!B&&C)){const[et,st]=yf({nodeId:B,dragItems:g,nodeLookup:lt});o?.(I.sourceEvent,g,et,st),tt?.(I.sourceEvent,et,st),B||C?.(I.sourceEvent,st)}}const k=Wy().clickDistance(j).on("start",I=>{const{domNode:lt,nodeDragThreshold:O,transform:G,snapGrid:M,snapToGrid:R}=a();p=lt?.getBoundingClientRect()||null,E=!1,b=!1,_=I.sourceEvent,O===0&&ot(I),f=so(I.sourceEvent,{transform:G,snapGrid:M,snapToGrid:R,containerBounds:p}),h=nn(I.sourceEvent,p)}).on("drag",I=>{const{autoPanOnNodeDrag:lt,transform:O,snapGrid:G,snapToGrid:M,nodeDragThreshold:R,nodeLookup:H}=a(),Q=so(I.sourceEvent,{transform:O,snapGrid:G,snapToGrid:M,containerBounds:p});if(_=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||B&&!H.has(B))&&(E=!0),!E){if(!m&&lt&&v&&(m=!0,$()),!v){const tt=nn(I.sourceEvent,p),C=tt.x-h.x,U=tt.y-h.y;Math.sqrt(C*C+U*U)>R&&ot(I)}(f.x!==Q.xSnapped||f.y!==Q.ySnapped)&&g&&v&&(h=nn(I.sourceEvent,p),X(Q))}}).on("end",I=>{if(!(!v||E)&&(m=!1,v=!1,cancelAnimationFrame(d),g.size>0)){const{nodeLookup:lt,updateNodePositions:O,onNodeDragStop:G,onSelectionDragStop:M}=a();if(b&&(O(g,!1),b=!1),r||G||!B&&M){const[R,H]=yf({nodeId:B,dragItems:g,nodeLookup:lt,dragging:!1});r?.(I.sourceEvent,g,R,H),G?.(I.sourceEvent,R,H),B||M?.(I.sourceEvent,H)}}}).filter(I=>{const lt=I.target;return!I.button&&(!q||!k0(lt,`.${q}`,A))&&(!w||k0(lt,w,A))});x.call(k)}function N(){x?.on(".drag",null)}return{update:T,destroy:N}}function $w(n,a,o){const u=[],r={x:n.x-o,y:n.y-o,width:o*2,height:o*2};for(const f of a.values())xo(r,al(f))>0&&u.push(f);return u}const Fw=250;function Jw(n,a,o,u){let r=[],f=1/0;const d=$w(n,o,a+Fw);for(const g of d){const m=[...g.internals.handleBounds?.source??[],...g.internals.handleBounds?.target??[]];for(const h of m){if(u.nodeId===h.nodeId&&u.type===h.type&&u.id===h.id)continue;const{x:p,y:v}=aa(g,h,h.position,!0),x=Math.sqrt(Math.pow(p-n.x,2)+Math.pow(v-n.y,2));x>a||(x<f?(r=[{...h,x:p,y:v}],f=x):x===f&&r.push({...h,x:p,y:v}))}}if(!r.length)return null;if(r.length>1){const g=u.type==="source"?"target":"source";return r.find(m=>m.type===g)??r[0]}return r[0]}function Bp(n,a,o,u,r,f=!1){const d=u.get(n);if(!d)return null;const g=r==="strict"?d.internals.handleBounds?.[a]:[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]],m=(o?g?.find(h=>h.id===o):g?.[0])??null;return m&&f?{...m,...aa(d,m,m.position,!0)}:m}function Up(n,a){return n||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function Iw(n,a){let o=null;return a?o=!0:n&&!a&&(o=!1),o}const qp=()=>!0;function Ww(n,{connectionMode:a,connectionRadius:o,handleId:u,nodeId:r,edgeUpdaterType:f,isTarget:d,domNode:g,nodeLookup:m,lib:h,autoPanOnConnect:p,flowId:v,panBy:x,cancelConnection:E,onConnectStart:b,onConnect:_,onConnectEnd:T,isValidConnection:N=qp,onReconnectEnd:q,updateConnection:w,getTransform:A,getFromHandle:Y,autoPanSpeed:B,dragThreshold:j=1,handleDomNode:X}){const $=Mp(n.target);let ot=0,k;const{x:I,y:lt}=nn(n),O=Up(f,X),G=g?.getBoundingClientRect();let M=!1;if(!G||!O)return;const R=Bp(r,O,u,m,a);if(!R)return;let H=nn(n,G),Q=!1,tt=null,C=!1,U=null;function P(){if(!p||!G)return;const[bt,yt]=Sp(H,G,B);x({x:bt,y:yt}),ot=requestAnimationFrame(P)}const et={...R,nodeId:r,type:O,position:R.position},st=m.get(r);let rt={inProgress:!0,isValid:null,from:aa(st,et,gt.Left,!0),fromHandle:et,fromPosition:et.position,fromNode:st,to:H,toHandle:null,toPosition:j0[et.position],toNode:null,pointer:H};function ut(){M=!0,w(rt),b?.(n,{nodeId:r,handleId:u,handleType:O})}j===0&&ut();function ft(bt){if(!M){const{x:le,y:ke}=nn(bt),Te=le-I,$e=ke-lt;if(!(Te*Te+$e*$e>j*j))return;ut()}if(!Y()||!et){Et(bt);return}const yt=A();H=nn(bt,G),k=Jw(Ao(H,yt,!1,[1,1]),o,m,et),Q||(P(),Q=!0);const vt=Lp(bt,{handle:k,connectionMode:a,fromNodeId:r,fromHandleId:u,fromType:d?"target":"source",isValidConnection:N,doc:$,lib:h,flowId:v,nodeLookup:m});U=vt.handleDomNode,tt=vt.connection,C=Iw(!!k,vt.isValid);const Ct=m.get(r),Ut=Ct?aa(Ct,et,gt.Left,!0):rt.from,Ht={...rt,from:Ut,isValid:C,to:vt.toHandle&&C?Cs({x:vt.toHandle.x,y:vt.toHandle.y},yt):H,toHandle:vt.toHandle,toPosition:C&&vt.toHandle?vt.toHandle.position:j0[et.position],toNode:vt.toHandle?m.get(vt.toHandle.nodeId):null,pointer:H};w(Ht),rt=Ht}function Et(bt){if(!("touches"in bt&&bt.touches.length>0)){if(M){(k||U)&&tt&&C&&_?.(tt);const{inProgress:yt,...vt}=rt,Ct={...vt,toPosition:rt.toHandle?rt.toPosition:null};T?.(bt,Ct),f&&q?.(bt,Ct)}E(),cancelAnimationFrame(ot),Q=!1,C=!1,tt=null,U=null,$.removeEventListener("mousemove",ft),$.removeEventListener("mouseup",Et),$.removeEventListener("touchmove",ft),$.removeEventListener("touchend",Et)}}$.addEventListener("mousemove",ft),$.addEventListener("mouseup",Et),$.addEventListener("touchmove",ft),$.addEventListener("touchend",Et)}function Lp(n,{handle:a,connectionMode:o,fromNodeId:u,fromHandleId:r,fromType:f,doc:d,lib:g,flowId:m,isValidConnection:h=qp,nodeLookup:p}){const v=f==="target",x=a?d.querySelector(`.${g}-flow__handle[data-id="${m}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x:E,y:b}=nn(n),_=d.elementFromPoint(E,b),T=_?.classList.contains(`${g}-flow__handle`)?_:x,N={handleDomNode:T,isValid:!1,connection:null,toHandle:null};if(T){const q=Up(void 0,T),w=T.getAttribute("data-nodeid"),A=T.getAttribute("data-handleid"),Y=T.classList.contains("connectable"),B=T.classList.contains("connectableend");if(!w||!q)return N;const j={source:v?w:u,sourceHandle:v?A:r,target:v?u:w,targetHandle:v?r:A};N.connection=j;const $=Y&&B&&(o===nl.Strict?v&&q==="source"||!v&&q==="target":w!==u||A!==r);N.isValid=$&&h(j),N.toHandle=Bp(w,q,A,p,o,!0)}return N}const Gf={onPointerDown:Ww,isValid:Lp};function Pw({domNode:n,panZoom:a,getTransform:o,getViewScale:u}){const r=Be(n);function f({translateExtent:g,width:m,height:h,zoomStep:p=1,pannable:v=!0,zoomable:x=!0,inversePan:E=!1}){const b=w=>{if(w.sourceEvent.type!=="wheel"||!a)return;const A=o(),Y=w.sourceEvent.ctrlKey&&bo()?10:1,B=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*p,j=A[2]*Math.pow(2,B*Y);a.scaleTo(j)};let _=[0,0];const T=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(_=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},N=w=>{const A=o();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!a)return;const Y=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],B=[Y[0]-_[0],Y[1]-_[1]];_=Y;const j=u()*Math.max(A[2],Math.log(A[2]))*(E?-1:1),X={x:A[0]-B[0]*j,y:A[1]-B[1]*j},$=[[0,0],[m,h]];a.setViewportConstrained({x:X.x,y:X.y,zoom:A[2]},$,g)},q=hp().on("start",T).on("zoom",v?N:null).on("zoom.wheel",x?b:null);r.call(q,{})}function d(){r.on("zoom",null)}return{update:f,destroy:d,pointer:Pe}}const Us=n=>({x:n.x,y:n.y,zoom:n.k}),pf=({x:n,y:a,zoom:o})=>Hs.translate(n,a).scale(o),$a=(n,a)=>n.target.closest(`.${a}`),Yp=(n,a)=>a===2&&Array.isArray(n)&&n.includes(2),t_=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,vf=(n,a=0,o=t_,u=()=>{})=>{const r=typeof a=="number"&&a>0;return r||u(),r?n.transition().duration(a).ease(o).on("end",u):n},Vp=n=>{const a=n.ctrlKey&&bo()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*a};function e_({zoomPanValues:n,noWheelClassName:a,d3Selection:o,d3Zoom:u,panOnScrollMode:r,panOnScrollSpeed:f,zoomOnPinch:d,onPanZoomStart:g,onPanZoom:m,onPanZoomEnd:h}){return p=>{if($a(p,a))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const v=o.property("__zoom").k||1;if(p.ctrlKey&&d){const T=Pe(p),N=Vp(p),q=v*Math.pow(2,N);u.scaleTo(o,q,T,p);return}const x=p.deltaMode===1?20:1;let E=r===Pi.Vertical?0:p.deltaX*x,b=r===Pi.Horizontal?0:p.deltaY*x;!bo()&&p.shiftKey&&r!==Pi.Vertical&&(E=p.deltaY*x,b=0),u.translateBy(o,-(E/v)*f,-(b/v)*f,{internal:!0});const _=Us(o.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(m?.(p,_),n.panScrollTimeout=setTimeout(()=>{h?.(p,_),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,g?.(p,_))}}function n_({noWheelClassName:n,preventScrolling:a,d3ZoomHandler:o}){return function(u,r){const f=u.type==="wheel",d=!a&&f&&!u.ctrlKey,g=$a(u,n);if(u.ctrlKey&&f&&g&&u.preventDefault(),d||g)return null;u.preventDefault(),o.call(this,u,r)}}function i_({zoomPanValues:n,onDraggingChange:a,onPanZoomStart:o}){return u=>{if(u.sourceEvent?.internal)return;const r=Us(u.transform);n.mouseButton=u.sourceEvent?.button||0,n.isZoomingOrPanning=!0,n.prevViewport=r,u.sourceEvent?.type==="mousedown"&&a(!0),o&&o?.(u.sourceEvent,r)}}function a_({zoomPanValues:n,panOnDrag:a,onPaneContextMenu:o,onTransformChange:u,onPanZoom:r}){return f=>{n.usedRightMouseButton=!!(o&&Yp(a,n.mouseButton??0)),f.sourceEvent?.sync||u([f.transform.x,f.transform.y,f.transform.k]),r&&!f.sourceEvent?.internal&&r?.(f.sourceEvent,Us(f.transform))}}function l_({zoomPanValues:n,panOnDrag:a,panOnScroll:o,onDraggingChange:u,onPanZoomEnd:r,onPaneContextMenu:f}){return d=>{if(!d.sourceEvent?.internal&&(n.isZoomingOrPanning=!1,f&&Yp(a,n.mouseButton??0)&&!n.usedRightMouseButton&&d.sourceEvent&&f(d.sourceEvent),n.usedRightMouseButton=!1,u(!1),r)){const g=Us(d.transform);n.prevViewport=g,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{r?.(d.sourceEvent,g)},o?150:0)}}}function o_({zoomActivationKeyPressed:n,zoomOnScroll:a,zoomOnPinch:o,panOnDrag:u,panOnScroll:r,zoomOnDoubleClick:f,userSelectionActive:d,noWheelClassName:g,noPanClassName:m,lib:h,connectionInProgress:p}){return v=>{const x=n||a,E=o&&v.ctrlKey,b=v.type==="wheel";if(v.button===1&&v.type==="mousedown"&&($a(v,`${h}-flow__node`)||$a(v,`${h}-flow__edge`)))return!0;if(!u&&!x&&!r&&!f&&!o||d||p&&!b||$a(v,g)&&b||$a(v,m)&&(!b||r&&b&&!n)||!o&&v.ctrlKey&&b)return!1;if(!o&&v.type==="touchstart"&&v.touches?.length>1)return v.preventDefault(),!1;if(!x&&!r&&!E&&b||!u&&(v.type==="mousedown"||v.type==="touchstart")||Array.isArray(u)&&!u.includes(v.button)&&v.type==="mousedown")return!1;const _=Array.isArray(u)&&u.includes(v.button)||!v.button||v.button<=1;return(!v.ctrlKey||b)&&_}}function u_({domNode:n,minZoom:a,maxZoom:o,translateExtent:u,viewport:r,onPanZoom:f,onPanZoomStart:d,onPanZoomEnd:g,onDraggingChange:m}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=n.getBoundingClientRect(),v=hp().scaleExtent([a,o]).translateExtent(u),x=Be(n).call(v);q({x:r.x,y:r.y,zoom:il(r.zoom,a,o)},[[0,0],[p.width,p.height]],u);const E=x.on("wheel.zoom"),b=x.on("dblclick.zoom");v.wheelDelta(Vp);function _(k,I){return x?new Promise(lt=>{v?.interpolate(I?.interpolate==="linear"?uo:ds).transform(vf(x,I?.duration,I?.ease,()=>lt(!0)),k)}):Promise.resolve(!1)}function T({noWheelClassName:k,noPanClassName:I,onPaneContextMenu:lt,userSelectionActive:O,panOnScroll:G,panOnDrag:M,panOnScrollMode:R,panOnScrollSpeed:H,preventScrolling:Q,zoomOnPinch:tt,zoomOnScroll:C,zoomOnDoubleClick:U,zoomActivationKeyPressed:P,lib:et,onTransformChange:st,connectionInProgress:ct,paneClickDistance:rt,selectionOnDrag:ut}){O&&!h.isZoomingOrPanning&&N();const ft=G&&!P&&!O;v.clickDistance(ut?1/0:!en(rt)||rt<0?0:rt);const Et=ft?e_({zoomPanValues:h,noWheelClassName:k,d3Selection:x,d3Zoom:v,panOnScrollMode:R,panOnScrollSpeed:H,zoomOnPinch:tt,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:g}):n_({noWheelClassName:k,preventScrolling:Q,d3ZoomHandler:E});if(x.on("wheel.zoom",Et,{passive:!1}),!O){const yt=i_({zoomPanValues:h,onDraggingChange:m,onPanZoomStart:d});v.on("start",yt);const vt=a_({zoomPanValues:h,panOnDrag:M,onPaneContextMenu:!!lt,onPanZoom:f,onTransformChange:st});v.on("zoom",vt);const Ct=l_({zoomPanValues:h,panOnDrag:M,panOnScroll:G,onPaneContextMenu:lt,onPanZoomEnd:g,onDraggingChange:m});v.on("end",Ct)}const bt=o_({zoomActivationKeyPressed:P,panOnDrag:M,zoomOnScroll:C,panOnScroll:G,zoomOnDoubleClick:U,zoomOnPinch:tt,userSelectionActive:O,noPanClassName:I,noWheelClassName:k,lib:et,connectionInProgress:ct});v.filter(bt),U?x.on("dblclick.zoom",b):x.on("dblclick.zoom",null)}function N(){v.on("zoom",null)}async function q(k,I,lt){const O=pf(k),G=v?.constrain()(O,I,lt);return G&&await _(G),new Promise(M=>M(G))}async function w(k,I){const lt=pf(k);return await _(lt,I),new Promise(O=>O(lt))}function A(k){if(x){const I=pf(k),lt=x.property("__zoom");(lt.k!==k.zoom||lt.x!==k.x||lt.y!==k.y)&&v?.transform(x,I,null,{sync:!0})}}function Y(){const k=x?dp(x.node()):{x:0,y:0,k:1};return{x:k.x,y:k.y,zoom:k.k}}function B(k,I){return x?new Promise(lt=>{v?.interpolate(I?.interpolate==="linear"?uo:ds).scaleTo(vf(x,I?.duration,I?.ease,()=>lt(!0)),k)}):Promise.resolve(!1)}function j(k,I){return x?new Promise(lt=>{v?.interpolate(I?.interpolate==="linear"?uo:ds).scaleBy(vf(x,I?.duration,I?.ease,()=>lt(!0)),k)}):Promise.resolve(!1)}function X(k){v?.scaleExtent(k)}function $(k){v?.translateExtent(k)}function ot(k){const I=!en(k)||k<0?0:k;v?.clickDistance(I)}return{update:T,destroy:N,setViewport:w,setViewportConstrained:q,getViewport:Y,scaleTo:B,scaleBy:j,setScaleExtent:X,setTranslateExtent:$,syncViewport:A,setClickDistance:ot}}var ol;(function(n){n.Line="line",n.Handle="handle"})(ol||(ol={}));function s_({width:n,prevWidth:a,height:o,prevHeight:u,affectsX:r,affectsY:f}){const d=n-a,g=o-u,m=[d>0?1:d<0?-1:0,g>0?1:g<0?-1:0];return d&&r&&(m[0]=m[0]*-1),g&&f&&(m[1]=m[1]*-1),m}function $0(n){const a=n.includes("right")||n.includes("left"),o=n.includes("bottom")||n.includes("top"),u=n.includes("left"),r=n.includes("top");return{isHorizontal:a,isVertical:o,affectsX:u,affectsY:r}}function vi(n,a){return Math.max(0,a-n)}function xi(n,a){return Math.max(0,n-a)}function ss(n,a,o){return Math.max(0,a-n,n-o)}function F0(n,a){return n?!a:a}function r_(n,a,o,u,r,f,d,g){let{affectsX:m,affectsY:h}=a;const{isHorizontal:p,isVertical:v}=a,x=p&&v,{xSnapped:E,ySnapped:b}=o,{minWidth:_,maxWidth:T,minHeight:N,maxHeight:q}=u,{x:w,y:A,width:Y,height:B,aspectRatio:j}=n;let X=Math.floor(p?E-n.pointerX:0),$=Math.floor(v?b-n.pointerY:0);const ot=Y+(m?-X:X),k=B+(h?-$:$),I=-f[0]*Y,lt=-f[1]*B;let O=ss(ot,_,T),G=ss(k,N,q);if(d){let H=0,Q=0;m&&X<0?H=vi(w+X+I,d[0][0]):!m&&X>0&&(H=xi(w+ot+I,d[1][0])),h&&$<0?Q=vi(A+$+lt,d[0][1]):!h&&$>0&&(Q=xi(A+k+lt,d[1][1])),O=Math.max(O,H),G=Math.max(G,Q)}if(g){let H=0,Q=0;m&&X>0?H=xi(w+X,g[0][0]):!m&&X<0&&(H=vi(w+ot,g[1][0])),h&&$>0?Q=xi(A+$,g[0][1]):!h&&$<0&&(Q=vi(A+k,g[1][1])),O=Math.max(O,H),G=Math.max(G,Q)}if(r){if(p){const H=ss(ot/j,N,q)*j;if(O=Math.max(O,H),d){let Q=0;!m&&!h||m&&!h&&x?Q=xi(A+lt+ot/j,d[1][1])*j:Q=vi(A+lt+(m?X:-X)/j,d[0][1])*j,O=Math.max(O,Q)}if(g){let Q=0;!m&&!h||m&&!h&&x?Q=vi(A+ot/j,g[1][1])*j:Q=xi(A+(m?X:-X)/j,g[0][1])*j,O=Math.max(O,Q)}}if(v){const H=ss(k*j,_,T)/j;if(G=Math.max(G,H),d){let Q=0;!m&&!h||h&&!m&&x?Q=xi(w+k*j+I,d[1][0])/j:Q=vi(w+(h?$:-$)*j+I,d[0][0])/j,G=Math.max(G,Q)}if(g){let Q=0;!m&&!h||h&&!m&&x?Q=vi(w+k*j,g[1][0])/j:Q=xi(w+(h?$:-$)*j,g[0][0])/j,G=Math.max(G,Q)}}}$=$+($<0?G:-G),X=X+(X<0?O:-O),r&&(x?ot>k*j?$=(F0(m,h)?-X:X)/j:X=(F0(m,h)?-$:$)*j:p?($=X/j,h=m):(X=$*j,m=h));const M=m?w+X:w,R=h?A+$:A;return{width:Y+(m?-X:X),height:B+(h?-$:$),x:f[0]*X*(m?-1:1)+M,y:f[1]*$*(h?-1:1)+R}}const Qp={width:0,height:0,x:0,y:0},c_={...Qp,pointerX:0,pointerY:0,aspectRatio:1};function f_(n){return[[0,0],[n.measured.width,n.measured.height]]}function d_(n,a,o){const u=a.position.x+n.position.x,r=a.position.y+n.position.y,f=n.measured.width??0,d=n.measured.height??0,g=o[0]*f,m=o[1]*d;return[[u-g,r-m],[u+f-g,r+d-m]]}function h_({domNode:n,nodeId:a,getStoreItems:o,onChange:u,onEnd:r}){const f=Be(n);let d={controlDirection:$0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function g({controlPosition:h,boundaries:p,keepAspectRatio:v,resizeDirection:x,onResizeStart:E,onResize:b,onResizeEnd:_,shouldResize:T}){let N={...Qp},q={...c_};d={boundaries:p,resizeDirection:x,keepAspectRatio:v,controlDirection:$0(h)};let w,A=null,Y=[],B,j,X,$=!1;const ot=Wy().on("start",k=>{const{nodeLookup:I,transform:lt,snapGrid:O,snapToGrid:G,nodeOrigin:M,paneDomNode:R}=o();if(w=I.get(a),!w)return;A=R?.getBoundingClientRect()??null;const{xSnapped:H,ySnapped:Q}=so(k.sourceEvent,{transform:lt,snapGrid:O,snapToGrid:G,containerBounds:A});N={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},q={...N,pointerX:H,pointerY:Q,aspectRatio:N.width/N.height},B=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(B=I.get(w.parentId),j=B&&w.extent==="parent"?f_(B):void 0),Y=[],X=void 0;for(const[tt,C]of I)if(C.parentId===a&&(Y.push({id:tt,position:{...C.position},extent:C.extent}),C.extent==="parent"||C.expandParent)){const U=d_(C,w,C.origin??M);X?X=[[Math.min(U[0][0],X[0][0]),Math.min(U[0][1],X[0][1])],[Math.max(U[1][0],X[1][0]),Math.max(U[1][1],X[1][1])]]:X=U}E?.(k,{...N})}).on("drag",k=>{const{transform:I,snapGrid:lt,snapToGrid:O,nodeOrigin:G}=o(),M=so(k.sourceEvent,{transform:I,snapGrid:lt,snapToGrid:O,containerBounds:A}),R=[];if(!w)return;const{x:H,y:Q,width:tt,height:C}=N,U={},P=w.origin??G,{width:et,height:st,x:ct,y:rt}=r_(q,d.controlDirection,M,d.boundaries,d.keepAspectRatio,P,j,X),ut=et!==tt,ft=st!==C,Et=ct!==H&&ut,bt=rt!==Q&&ft;if(!Et&&!bt&&!ut&&!ft)return;if((Et||bt||P[0]===1||P[1]===1)&&(U.x=Et?ct:N.x,U.y=bt?rt:N.y,N.x=U.x,N.y=U.y,Y.length>0)){const Ut=ct-H,Ht=rt-Q;for(const le of Y)le.position={x:le.position.x-Ut+P[0]*(et-tt),y:le.position.y-Ht+P[1]*(st-C)},R.push(le)}if((ut||ft)&&(U.width=ut&&(!d.resizeDirection||d.resizeDirection==="horizontal")?et:N.width,U.height=ft&&(!d.resizeDirection||d.resizeDirection==="vertical")?st:N.height,N.width=U.width,N.height=U.height),B&&w.expandParent){const Ut=P[0]*(U.width??0);U.x&&U.x<Ut&&(N.x=Ut,q.x=q.x-(U.x-Ut));const Ht=P[1]*(U.height??0);U.y&&U.y<Ht&&(N.y=Ht,q.y=q.y-(U.y-Ht))}const yt=s_({width:N.width,prevWidth:tt,height:N.height,prevHeight:C,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),vt={...N,direction:yt};T?.(k,vt)!==!1&&($=!0,b?.(k,vt),u(U,R))}).on("end",k=>{$&&(_?.(k,{...N}),r?.({...N}),$=!1)});f.call(ot)}function m(){f.on(".drag",null)}return{update:g,destroy:m}}var xf={exports:{}},bf={},Sf={exports:{}},Ef={};var J0;function g_(){if(J0)return Ef;J0=1;var n=Eo();function a(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var o=typeof Object.is=="function"?Object.is:a,u=n.useState,r=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function g(v,x){var E=x(),b=u({inst:{value:E,getSnapshot:x}}),_=b[0].inst,T=b[1];return f(function(){_.value=E,_.getSnapshot=x,m(_)&&T({inst:_})},[v,E,x]),r(function(){return m(_)&&T({inst:_}),v(function(){m(_)&&T({inst:_})})},[v]),d(E),E}function m(v){var x=v.getSnapshot;v=v.value;try{var E=x();return!o(v,E)}catch{return!0}}function h(v,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:g;return Ef.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:p,Ef}var I0;function m_(){return I0||(I0=1,Sf.exports=g_()),Sf.exports}var W0;function y_(){if(W0)return bf;W0=1;var n=Eo(),a=m_();function o(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var u=typeof Object.is=="function"?Object.is:o,r=a.useSyncExternalStore,f=n.useRef,d=n.useEffect,g=n.useMemo,m=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(h,p,v,x,E){var b=f(null);if(b.current===null){var _={hasValue:!1,value:null};b.current=_}else _=b.current;b=g(function(){function N(B){if(!q){if(q=!0,w=B,B=x(B),E!==void 0&&_.hasValue){var j=_.value;if(E(j,B))return A=j}return A=B}if(j=A,u(w,B))return j;var X=x(B);return E!==void 0&&E(j,X)?(w=B,j):(w=B,A=X)}var q=!1,w,A,Y=v===void 0?null:v;return[function(){return N(p())},Y===null?void 0:function(){return N(Y())}]},[p,v,x,E]);var T=r(h,b[0],b[1]);return d(function(){_.hasValue=!0,_.value=T},[T]),m(T),T},bf}var P0;function p_(){return P0||(P0=1,xf.exports=y_()),xf.exports}var v_=p_();const x_=Cy(v_),b_={},ty=n=>{let a;const o=new Set,u=(p,v)=>{const x=typeof p=="function"?p(a):p;if(!Object.is(x,a)){const E=a;a=v??(typeof x!="object"||x===null)?x:Object.assign({},a,x),o.forEach(b=>b(a,E))}},r=()=>a,m={setState:u,getState:r,getInitialState:()=>h,subscribe:p=>(o.add(p),()=>o.delete(p)),destroy:()=>{(b_?"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."),o.clear()}},h=a=n(u,r,m);return m},S_=n=>n?ty(n):ty,{useDebugValue:E_}=ao,{useSyncExternalStoreWithSelector:w_}=x_,__=n=>n;function Xp(n,a=__,o){const u=w_(n.subscribe,n.getState,n.getServerState||n.getInitialState,a,o);return E_(u),u}const ey=(n,a)=>{const o=S_(n),u=(r,f=a)=>Xp(o,r,f);return Object.assign(u,o),u},M_=(n,a)=>n?ey(n,a):ey;function Zt(n,a){if(Object.is(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;if(n instanceof Map&&a instanceof Map){if(n.size!==a.size)return!1;for(const[u,r]of n)if(!Object.is(r,a.get(u)))return!1;return!0}if(n instanceof Set&&a instanceof Set){if(n.size!==a.size)return!1;for(const u of n)if(!a.has(u))return!1;return!0}const o=Object.keys(n);if(o.length!==Object.keys(a).length)return!1;for(const u of o)if(!Object.prototype.hasOwnProperty.call(a,u)||!Object.is(n[u],a[u]))return!1;return!0}var C_=Ny();const qs=J.createContext(null),N_=qs.Provider,Gp=hn.error001();function zt(n,a){const o=J.useContext(qs);if(o===null)throw new Error(Gp);return Xp(o,n,a)}function Kt(){const n=J.useContext(qs);if(n===null)throw new Error(Gp);return J.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const ny={display:"none"},T_={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Zp="react-flow__node-desc",Kp="react-flow__edge-desc",A_="react-flow__aria-live",z_=n=>n.ariaLiveMessage,D_=n=>n.ariaLabelConfig;function O_({rfId:n}){const a=zt(z_);return z.jsx("div",{id:`${A_}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:T_,children:a})}function R_({rfId:n,disableKeyboardA11y:a}){const o=zt(D_);return z.jsxs(z.Fragment,{children:[z.jsx("div",{id:`${Zp}-${n}`,style:ny,children:a?o["node.a11yDescription.default"]:o["node.a11yDescription.keyboardDisabled"]}),z.jsx("div",{id:`${Kp}-${n}`,style:ny,children:o["edge.a11yDescription.default"]}),!a&&z.jsx(O_,{rfId:n})]})}const Ls=J.forwardRef(({position:n="top-left",children:a,className:o,style:u,...r},f)=>{const d=`${n}`.split("-");return z.jsx("div",{className:ne(["react-flow__panel",o,...d]),style:u,ref:f,...r,children:a})});Ls.displayName="Panel";function H_({proOptions:n,position:a="bottom-right"}){return n?.hideAttribution?null:z.jsx(Ls,{position:a,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:z.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const j_=n=>{const a=[],o=[];for(const[,u]of n.nodeLookup)u.selected&&a.push(u.internals.userNode);for(const[,u]of n.edgeLookup)u.selected&&o.push(u);return{selectedNodes:a,selectedEdges:o}},rs=n=>n.id;function B_(n,a){return Zt(n.selectedNodes.map(rs),a.selectedNodes.map(rs))&&Zt(n.selectedEdges.map(rs),a.selectedEdges.map(rs))}function U_({onSelectionChange:n}){const a=Kt(),{selectedNodes:o,selectedEdges:u}=zt(j_,B_);return J.useEffect(()=>{const r={nodes:o,edges:u};n?.(r),a.getState().onSelectionChangeHandlers.forEach(f=>f(r))},[o,u,n]),null}const q_=n=>!!n.onSelectionChangeHandlers;function L_({onSelectionChange:n}){const a=zt(q_);return n||a?z.jsx(U_,{onSelectionChange:n}):null}const kp=[0,0],Y_={x:0,y:0,zoom:1},V_=["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"],iy=[...V_,"rfId"],Q_=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges}),ay={translateExtent:po,nodeOrigin:kp,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function X_(n){const{setNodes:a,setEdges:o,setMinZoom:u,setMaxZoom:r,setTranslateExtent:f,setNodeExtent:d,reset:g,setDefaultNodesAndEdges:m}=zt(Q_,Zt),h=Kt();J.useEffect(()=>(m(n.defaultNodes,n.defaultEdges),()=>{p.current=ay,g()}),[]);const p=J.useRef(ay);return J.useEffect(()=>{for(const v of iy){const x=n[v],E=p.current[v];x!==E&&(typeof n[v]>"u"||(v==="nodes"?a(x):v==="edges"?o(x):v==="minZoom"?u(x):v==="maxZoom"?r(x):v==="translateExtent"?f(x):v==="nodeExtent"?d(x):v==="ariaLabelConfig"?h.setState({ariaLabelConfig:Mw(x)}):v==="fitView"?h.setState({fitViewQueued:x}):v==="fitViewOptions"?h.setState({fitViewOptions:x}):h.setState({[v]:x})))}p.current=n},iy.map(v=>n[v])),null}function ly(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function G_(n){const[a,o]=J.useState(n==="system"?null:n);return J.useEffect(()=>{if(n!=="system"){o(n);return}const u=ly(),r=()=>o(u?.matches?"dark":"light");return r(),u?.addEventListener("change",r),()=>{u?.removeEventListener("change",r)}},[n]),a!==null?a:ly()?.matches?"dark":"light"}const oy=typeof document<"u"?document:null;function So(n=null,a={target:oy,actInsideInputWithModifier:!0}){const[o,u]=J.useState(!1),r=J.useRef(!1),f=J.useRef(new Set([])),[d,g]=J.useMemo(()=>{if(n!==null){const h=(Array.isArray(n)?n:[n]).filter(v=>typeof v=="string").map(v=>v.replace("+",`
10
+ `).replace(`
11
+
12
+ `,`
13
+ +`).split(`
14
+ `)),p=h.reduce((v,x)=>v.concat(...x),[]);return[h,p]}return[[],[]]},[n]);return J.useEffect(()=>{const m=a?.target??oy,h=a?.actInsideInputWithModifier??!0;if(n!==null){const p=E=>{if(r.current=E.ctrlKey||E.metaKey||E.shiftKey||E.altKey,(!r.current||r.current&&!h)&&Cp(E))return!1;const _=sy(E.code,g);if(f.current.add(E[_]),uy(d,f.current,!1)){const T=E.composedPath?.()?.[0]||E.target,N=T?.nodeName==="BUTTON"||T?.nodeName==="A";a.preventDefault!==!1&&(r.current||!N)&&E.preventDefault(),u(!0)}},v=E=>{const b=sy(E.code,g);uy(d,f.current,!0)?(u(!1),f.current.clear()):f.current.delete(E[b]),E.key==="Meta"&&f.current.clear(),r.current=!1},x=()=>{f.current.clear(),u(!1)};return m?.addEventListener("keydown",p),m?.addEventListener("keyup",v),window.addEventListener("blur",x),window.addEventListener("contextmenu",x),()=>{m?.removeEventListener("keydown",p),m?.removeEventListener("keyup",v),window.removeEventListener("blur",x),window.removeEventListener("contextmenu",x)}}},[n,u]),o}function uy(n,a,o){return n.filter(u=>o||u.length===a.size).some(u=>u.every(r=>a.has(r)))}function sy(n,a){return a.includes(n)?"code":"key"}const Z_=()=>{const n=Kt();return J.useMemo(()=>({zoomIn:a=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1/1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomTo:(a,o)=>{const{panZoom:u}=n.getState();return u?u.scaleTo(a,{duration:o?.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(a,o)=>{const{transform:[u,r,f],panZoom:d}=n.getState();return d?(await d.setViewport({x:a.x??u,y:a.y??r,zoom:a.zoom??f},o),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,o,u]=n.getState().transform;return{x:a,y:o,zoom:u}},setCenter:async(a,o,u)=>n.getState().setCenter(a,o,u),fitBounds:async(a,o)=>{const{width:u,height:r,minZoom:f,maxZoom:d,panZoom:g}=n.getState(),m=ld(a,u,r,f,d,o?.padding??.1);return g?(await g.setViewport(m,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,o={})=>{const{transform:u,snapGrid:r,snapToGrid:f,domNode:d}=n.getState();if(!d)return a;const{x:g,y:m}=d.getBoundingClientRect(),h={x:a.x-g,y:a.y-m},p=o.snapGrid??r,v=o.snapToGrid??f;return Ao(h,u,v,p)},flowToScreenPosition:a=>{const{transform:o,domNode:u}=n.getState();if(!u)return a;const{x:r,y:f}=u.getBoundingClientRect(),d=Cs(a,o);return{x:d.x+r,y:d.y+f}}}),[])};function $p(n,a){const o=[],u=new Map,r=[];for(const f of n)if(f.type==="add"){r.push(f);continue}else if(f.type==="remove"||f.type==="replace")u.set(f.id,[f]);else{const d=u.get(f.id);d?d.push(f):u.set(f.id,[f])}for(const f of a){const d=u.get(f.id);if(!d){o.push(f);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){o.push({...d[0].item});continue}const g={...f};for(const m of d)K_(m,g);o.push(g)}return r.length&&r.forEach(f=>{f.index!==void 0?o.splice(f.index,0,{...f.item}):o.push({...f.item})}),o}function K_(n,a){switch(n.type){case"select":{a.selected=n.selected;break}case"position":{typeof n.position<"u"&&(a.position=n.position),typeof n.dragging<"u"&&(a.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(a.measured={...n.dimensions},n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(a.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(a.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(a.resizing=n.resizing);break}}}function Fp(n,a){return $p(n,a)}function Jp(n,a){return $p(n,a)}function Fi(n,a){return{id:n,type:"select",selected:a}}function Fa(n,a=new Set,o=!1){const u=[];for(const[r,f]of n){const d=a.has(r);!(f.selected===void 0&&!d)&&f.selected!==d&&(o&&(f.selected=d),u.push(Fi(f.id,d)))}return u}function ry({items:n=[],lookup:a}){const o=[],u=new Map(n.map(r=>[r.id,r]));for(const[r,f]of n.entries()){const d=a.get(f.id),g=d?.internals?.userNode??d;g!==void 0&&g!==f&&o.push({id:f.id,item:f,type:"replace"}),g===void 0&&o.push({item:f,type:"add",index:r})}for(const[r]of a)u.get(r)===void 0&&o.push({id:r,type:"remove"});return o}function cy(n){return{id:n.id,type:"remove"}}const fy=n=>mw(n),k_=n=>vp(n);function Ip(n){return J.forwardRef(n)}const $_=typeof window<"u"?J.useLayoutEffect:J.useEffect;function dy(n){const[a,o]=J.useState(BigInt(0)),[u]=J.useState(()=>F_(()=>o(r=>r+BigInt(1))));return $_(()=>{const r=u.get();r.length&&(n(r),u.reset())},[a]),u}function F_(n){let a=[];return{get:()=>a,reset:()=>{a=[]},push:o=>{a.push(o),n()}}}const Wp=J.createContext(null);function J_({children:n}){const a=Kt(),o=J.useCallback(g=>{const{nodes:m=[],setNodes:h,hasDefaultNodes:p,onNodesChange:v,nodeLookup:x,fitViewQueued:E,onNodesChangeMiddlewareMap:b}=a.getState();let _=m;for(const N of g)_=typeof N=="function"?N(_):N;let T=ry({items:_,lookup:x});for(const N of b.values())T=N(T);p&&h(_),T.length>0?v?.(T):E&&window.requestAnimationFrame(()=>{const{fitViewQueued:N,nodes:q,setNodes:w}=a.getState();N&&w(q)})},[]),u=dy(o),r=J.useCallback(g=>{const{edges:m=[],setEdges:h,hasDefaultEdges:p,onEdgesChange:v,edgeLookup:x}=a.getState();let E=m;for(const b of g)E=typeof b=="function"?b(E):b;p?h(E):v&&v(ry({items:E,lookup:x}))},[]),f=dy(r),d=J.useMemo(()=>({nodeQueue:u,edgeQueue:f}),[]);return z.jsx(Wp.Provider,{value:d,children:n})}function I_(){const n=J.useContext(Wp);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const W_=n=>!!n.panZoom;function Ys(){const n=Z_(),a=Kt(),o=I_(),u=zt(W_),r=J.useMemo(()=>{const f=v=>a.getState().nodeLookup.get(v),d=v=>{o.nodeQueue.push(v)},g=v=>{o.edgeQueue.push(v)},m=v=>{const{nodeLookup:x,nodeOrigin:E}=a.getState(),b=fy(v)?v:x.get(v.id),_=b.parentId?_p(b.position,b.measured,b.parentId,x,E):b.position,T={...b,position:_,width:b.measured?.width??b.width,height:b.measured?.height??b.height};return al(T)},h=(v,x,E={replace:!1})=>{d(b=>b.map(_=>{if(_.id===v){const T=typeof x=="function"?x(_):x;return E.replace&&fy(T)?T:{..._,...T}}return _}))},p=(v,x,E={replace:!1})=>{g(b=>b.map(_=>{if(_.id===v){const T=typeof x=="function"?x(_):x;return E.replace&&k_(T)?T:{..._,...T}}return _}))};return{getNodes:()=>a.getState().nodes.map(v=>({...v})),getNode:v=>f(v)?.internals.userNode,getInternalNode:f,getEdges:()=>{const{edges:v=[]}=a.getState();return v.map(x=>({...x}))},getEdge:v=>a.getState().edgeLookup.get(v),setNodes:d,setEdges:g,addNodes:v=>{const x=Array.isArray(v)?v:[v];o.nodeQueue.push(E=>[...E,...x])},addEdges:v=>{const x=Array.isArray(v)?v:[v];o.edgeQueue.push(E=>[...E,...x])},toObject:()=>{const{nodes:v=[],edges:x=[],transform:E}=a.getState(),[b,_,T]=E;return{nodes:v.map(N=>({...N})),edges:x.map(N=>({...N})),viewport:{x:b,y:_,zoom:T}}},deleteElements:async({nodes:v=[],edges:x=[]})=>{const{nodes:E,edges:b,onNodesDelete:_,onEdgesDelete:T,triggerNodeChanges:N,triggerEdgeChanges:q,onDelete:w,onBeforeDelete:A}=a.getState(),{nodes:Y,edges:B}=await bw({nodesToRemove:v,edgesToRemove:x,nodes:E,edges:b,onBeforeDelete:A}),j=B.length>0,X=Y.length>0;if(j){const $=B.map(cy);T?.(B),q($)}if(X){const $=Y.map(cy);_?.(Y),N($)}return(X||j)&&w?.({nodes:Y,edges:B}),{deletedNodes:Y,deletedEdges:B}},getIntersectingNodes:(v,x=!0,E)=>{const b=U0(v),_=b?v:m(v),T=E!==void 0;return _?(E||a.getState().nodes).filter(N=>{const q=a.getState().nodeLookup.get(N.id);if(q&&!b&&(N.id===v.id||!q.internals.positionAbsolute))return!1;const w=al(T?N:q),A=xo(w,_);return x&&A>0||A>=w.width*w.height||A>=_.width*_.height}):[]},isNodeIntersecting:(v,x,E=!0)=>{const _=U0(v)?v:m(v);if(!_)return!1;const T=xo(_,x);return E&&T>0||T>=x.width*x.height||T>=_.width*_.height},updateNode:h,updateNodeData:(v,x,E={replace:!1})=>{h(v,b=>{const _=typeof x=="function"?x(b):x;return E.replace?{...b,data:_}:{...b,data:{...b.data,..._}}},E)},updateEdge:p,updateEdgeData:(v,x,E={replace:!1})=>{p(v,b=>{const _=typeof x=="function"?x(b):x;return E.replace?{...b,data:_}:{...b,data:{...b.data,..._}}},E)},getNodesBounds:v=>{const{nodeLookup:x,nodeOrigin:E}=a.getState();return yw(v,{nodeLookup:x,nodeOrigin:E})},getHandleConnections:({type:v,id:x,nodeId:E})=>Array.from(a.getState().connectionLookup.get(`${E}-${v}${x?`-${x}`:""}`)?.values()??[]),getNodeConnections:({type:v,handleId:x,nodeId:E})=>Array.from(a.getState().connectionLookup.get(`${E}${v?x?`-${v}-${x}`:`-${v}`:""}`)?.values()??[]),fitView:async v=>{const x=a.getState().fitViewResolver??_w();return a.setState({fitViewQueued:!0,fitViewOptions:v,fitViewResolver:x}),o.nodeQueue.push(E=>[...E]),x.promise}}},[]);return J.useMemo(()=>({...r,...n,viewportInitialized:u}),[u])}const hy=n=>n.selected,P_=typeof window<"u"?window:void 0;function t3({deleteKeyCode:n,multiSelectionKeyCode:a}){const o=Kt(),{deleteElements:u}=Ys(),r=So(n,{actInsideInputWithModifier:!1}),f=So(a,{target:P_});J.useEffect(()=>{if(r){const{edges:d,nodes:g}=o.getState();u({nodes:g.filter(hy),edges:d.filter(hy)}),o.setState({nodesSelectionActive:!1})}},[r]),J.useEffect(()=>{o.setState({multiSelectionActive:f})},[f])}function e3(n){const a=Kt();J.useEffect(()=>{const o=()=>{if(!n.current||!(n.current.checkVisibility?.()??!0))return!1;const u=od(n.current);(u.height===0||u.width===0)&&a.getState().onError?.("004",hn.error004()),a.setState({width:u.width||500,height:u.height||500})};if(n.current){o(),window.addEventListener("resize",o);const u=new ResizeObserver(()=>o());return u.observe(n.current),()=>{window.removeEventListener("resize",o),u&&n.current&&u.unobserve(n.current)}}},[])}const Vs={position:"absolute",width:"100%",height:"100%",top:0,left:0},n3=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function i3({onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:o=!0,panOnScroll:u=!1,panOnScrollSpeed:r=.5,panOnScrollMode:f=Pi.Free,zoomOnDoubleClick:d=!0,panOnDrag:g=!0,defaultViewport:m,translateExtent:h,minZoom:p,maxZoom:v,zoomActivationKeyCode:x,preventScrolling:E=!0,children:b,noWheelClassName:_,noPanClassName:T,onViewportChange:N,isControlledViewport:q,paneClickDistance:w,selectionOnDrag:A}){const Y=Kt(),B=J.useRef(null),{userSelectionActive:j,lib:X,connectionInProgress:$}=zt(n3,Zt),ot=So(x),k=J.useRef();e3(B);const I=J.useCallback(lt=>{N?.({x:lt[0],y:lt[1],zoom:lt[2]}),q||Y.setState({transform:lt})},[N,q]);return J.useEffect(()=>{if(B.current){k.current=u_({domNode:B.current,minZoom:p,maxZoom:v,translateExtent:h,viewport:m,onDraggingChange:M=>Y.setState(R=>R.paneDragging===M?R:{paneDragging:M}),onPanZoomStart:(M,R)=>{const{onViewportChangeStart:H,onMoveStart:Q}=Y.getState();Q?.(M,R),H?.(R)},onPanZoom:(M,R)=>{const{onViewportChange:H,onMove:Q}=Y.getState();Q?.(M,R),H?.(R)},onPanZoomEnd:(M,R)=>{const{onViewportChangeEnd:H,onMoveEnd:Q}=Y.getState();Q?.(M,R),H?.(R)}});const{x:lt,y:O,zoom:G}=k.current.getViewport();return Y.setState({panZoom:k.current,transform:[lt,O,G],domNode:B.current.closest(".react-flow")}),()=>{k.current?.destroy()}}},[]),J.useEffect(()=>{k.current?.update({onPaneContextMenu:n,zoomOnScroll:a,zoomOnPinch:o,panOnScroll:u,panOnScrollSpeed:r,panOnScrollMode:f,zoomOnDoubleClick:d,panOnDrag:g,zoomActivationKeyPressed:ot,preventScrolling:E,noPanClassName:T,userSelectionActive:j,noWheelClassName:_,lib:X,onTransformChange:I,connectionInProgress:$,selectionOnDrag:A,paneClickDistance:w})},[n,a,o,u,r,f,d,g,ot,E,T,j,_,X,I,$,A,w]),z.jsx("div",{className:"react-flow__renderer",ref:B,style:Vs,children:b})}const a3=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function l3(){const{userSelectionActive:n,userSelectionRect:a}=zt(a3,Zt);return n&&a?z.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const wf=(n,a)=>o=>{o.target===a.current&&n?.(o)},o3=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function u3({isSelecting:n,selectionKeyPressed:a,selectionMode:o=vo.Full,panOnDrag:u,paneClickDistance:r,selectionOnDrag:f,onSelectionStart:d,onSelectionEnd:g,onPaneClick:m,onPaneContextMenu:h,onPaneScroll:p,onPaneMouseEnter:v,onPaneMouseMove:x,onPaneMouseLeave:E,children:b}){const _=Kt(),{userSelectionActive:T,elementsSelectable:N,dragging:q,connectionInProgress:w}=zt(o3,Zt),A=N&&(n||T),Y=J.useRef(null),B=J.useRef(),j=J.useRef(new Set),X=J.useRef(new Set),$=J.useRef(!1),ot=H=>{if($.current||w){$.current=!1;return}m?.(H),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},k=H=>{if(Array.isArray(u)&&u?.includes(2)){H.preventDefault();return}h?.(H)},I=p?H=>p(H):void 0,lt=H=>{$.current&&(H.stopPropagation(),$.current=!1)},O=H=>{const{domNode:Q}=_.getState();if(B.current=Q?.getBoundingClientRect(),!B.current)return;const tt=H.target===Y.current;if(!tt&&!!H.target.closest(".nokey")||!n||!(f&&tt||a)||H.button!==0||!H.isPrimary)return;H.target?.setPointerCapture?.(H.pointerId),$.current=!1;const{x:P,y:et}=nn(H.nativeEvent,B.current);_.setState({userSelectionRect:{width:0,height:0,startX:P,startY:et,x:P,y:et}}),tt||(H.stopPropagation(),H.preventDefault())},G=H=>{const{userSelectionRect:Q,transform:tt,nodeLookup:C,edgeLookup:U,connectionLookup:P,triggerNodeChanges:et,triggerEdgeChanges:st,defaultEdgeOptions:ct,resetSelectedElements:rt}=_.getState();if(!B.current||!Q)return;const{x:ut,y:ft}=nn(H.nativeEvent,B.current),{startX:Et,startY:bt}=Q;if(!$.current){const Ht=a?0:r;if(Math.hypot(ut-Et,ft-bt)<=Ht)return;rt(),d?.(H)}$.current=!0;const yt={startX:Et,startY:bt,x:ut<Et?ut:Et,y:ft<bt?ft:bt,width:Math.abs(ut-Et),height:Math.abs(ft-bt)},vt=j.current,Ct=X.current;j.current=new Set(ad(C,yt,tt,o===vo.Partial,!0).map(Ht=>Ht.id)),X.current=new Set;const Ut=ct?.selectable??!0;for(const Ht of j.current){const le=P.get(Ht);if(le)for(const{edgeId:ke}of le.values()){const Te=U.get(ke);Te&&(Te.selectable??Ut)&&X.current.add(ke)}}if(!q0(vt,j.current)){const Ht=Fa(C,j.current,!0);et(Ht)}if(!q0(Ct,X.current)){const Ht=Fa(U,X.current);st(Ht)}_.setState({userSelectionRect:yt,userSelectionActive:!0,nodesSelectionActive:!1})},M=H=>{H.button===0&&(H.target?.releasePointerCapture?.(H.pointerId),!T&&H.target===Y.current&&_.getState().userSelectionRect&&ot?.(H),_.setState({userSelectionActive:!1,userSelectionRect:null}),$.current&&(g?.(H),_.setState({nodesSelectionActive:j.current.size>0})))},R=u===!0||Array.isArray(u)&&u.includes(0);return z.jsxs("div",{className:ne(["react-flow__pane",{draggable:R,dragging:q,selection:n}]),onClick:A?void 0:wf(ot,Y),onContextMenu:wf(k,Y),onWheel:wf(I,Y),onPointerEnter:A?void 0:v,onPointerMove:A?G:x,onPointerUp:A?M:void 0,onPointerDownCapture:A?O:void 0,onClickCapture:A?lt:void 0,onPointerLeave:E,ref:Y,style:Vs,children:[b,z.jsx(l3,{})]})}function Zf({id:n,store:a,unselect:o=!1,nodeRef:u}){const{addSelectedNodes:r,unselectNodesAndEdges:f,multiSelectionActive:d,nodeLookup:g,onError:m}=a.getState(),h=g.get(n);if(!h){m?.("012",hn.error012(n));return}a.setState({nodesSelectionActive:!1}),h.selected?(o||h.selected&&d)&&(f({nodes:[h],edges:[]}),requestAnimationFrame(()=>u?.current?.blur())):r([n])}function Pp({nodeRef:n,disabled:a=!1,noDragClassName:o,handleSelector:u,nodeId:r,isSelectable:f,nodeClickDistance:d}){const g=Kt(),[m,h]=J.useState(!1),p=J.useRef();return J.useEffect(()=>{p.current=kw({getStoreItems:()=>g.getState(),onNodeMouseDown:v=>{Zf({id:v,store:g,nodeRef:n})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),J.useEffect(()=>{if(!(a||!n.current||!p.current))return p.current.update({noDragClassName:o,handleSelector:u,domNode:n.current,isSelectable:f,nodeId:r,nodeClickDistance:d}),()=>{p.current?.destroy()}},[o,u,a,f,n,r,d]),m}const s3=n=>a=>a.selected&&(a.draggable||n&&typeof a.draggable>"u");function tv(){const n=Kt();return J.useCallback(o=>{const{nodeExtent:u,snapToGrid:r,snapGrid:f,nodesDraggable:d,onError:g,updateNodePositions:m,nodeLookup:h,nodeOrigin:p}=n.getState(),v=new Map,x=s3(d),E=r?f[0]:5,b=r?f[1]:5,_=o.direction.x*E*o.factor,T=o.direction.y*b*o.factor;for(const[,N]of h){if(!x(N))continue;let q={x:N.internals.positionAbsolute.x+_,y:N.internals.positionAbsolute.y+T};r&&(q=To(q,f));const{position:w,positionAbsolute:A}=xp({nodeId:N.id,nextPosition:q,nodeLookup:h,nodeExtent:u,nodeOrigin:p,onError:g});N.position=w,N.internals.positionAbsolute=A,v.set(N.id,N)}m(v)},[])}const dd=J.createContext(null),r3=dd.Provider;dd.Consumer;const ev=()=>J.useContext(dd),c3=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),f3=(n,a,o)=>u=>{const{connectionClickStartHandle:r,connectionMode:f,connection:d}=u,{fromHandle:g,toHandle:m,isValid:h}=d,p=m?.nodeId===n&&m?.id===a&&m?.type===o;return{connectingFrom:g?.nodeId===n&&g?.id===a&&g?.type===o,connectingTo:p,clickConnecting:r?.nodeId===n&&r?.id===a&&r?.type===o,isPossibleEndHandle:f===nl.Strict?g?.type!==o:n!==g?.nodeId||a!==g?.id,connectionInProcess:!!g,clickConnectionInProcess:!!r,valid:p&&h}};function d3({type:n="source",position:a=gt.Top,isValidConnection:o,isConnectable:u=!0,isConnectableStart:r=!0,isConnectableEnd:f=!0,id:d,onConnect:g,children:m,className:h,onMouseDown:p,onTouchStart:v,...x},E){const b=d||null,_=n==="target",T=Kt(),N=ev(),{connectOnClick:q,noPanClassName:w,rfId:A}=zt(c3,Zt),{connectingFrom:Y,connectingTo:B,clickConnecting:j,isPossibleEndHandle:X,connectionInProcess:$,clickConnectionInProcess:ot,valid:k}=zt(f3(N,b,n),Zt);N||T.getState().onError?.("010",hn.error010());const I=G=>{const{defaultEdgeOptions:M,onConnect:R,hasDefaultEdges:H}=T.getState(),Q={...M,...G};if(H){const{edges:tt,setEdges:C}=T.getState();C(Dw(Q,tt))}R?.(Q),g?.(Q)},lt=G=>{if(!N)return;const M=Np(G.nativeEvent);if(r&&(M&&G.button===0||!M)){const R=T.getState();Gf.onPointerDown(G.nativeEvent,{handleDomNode:G.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:_,handleId:b,nodeId:N,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...H)=>T.getState().onConnectEnd?.(...H),updateConnection:R.updateConnection,onConnect:I,isValidConnection:o||((...H)=>T.getState().isValidConnection?.(...H)??!0),getTransform:()=>T.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}M?p?.(G):v?.(G)},O=G=>{const{onClickConnectStart:M,onClickConnectEnd:R,connectionClickStartHandle:H,connectionMode:Q,isValidConnection:tt,lib:C,rfId:U,nodeLookup:P,connection:et}=T.getState();if(!N||!H&&!r)return;if(!H){M?.(G.nativeEvent,{nodeId:N,handleId:b,handleType:n}),T.setState({connectionClickStartHandle:{nodeId:N,type:n,id:b}});return}const st=Mp(G.target),ct=o||tt,{connection:rt,isValid:ut}=Gf.isValid(G.nativeEvent,{handle:{nodeId:N,id:b,type:n},connectionMode:Q,fromNodeId:H.nodeId,fromHandleId:H.id||null,fromType:H.type,isValidConnection:ct,flowId:U,doc:st,lib:C,nodeLookup:P});ut&&rt&&I(rt);const ft=structuredClone(et);delete ft.inProgress,ft.toPosition=ft.toHandle?ft.toHandle.position:null,R?.(G,ft),T.setState({connectionClickStartHandle:null})};return z.jsx("div",{"data-handleid":b,"data-nodeid":N,"data-handlepos":a,"data-id":`${A}-${N}-${b}-${n}`,className:ne(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",w,h,{source:!_,target:_,connectable:u,connectablestart:r,connectableend:f,clickconnecting:j,connectingfrom:Y,connectingto:B,valid:k,connectionindicator:u&&(!$||X)&&($||ot?f:r)}]),onMouseDown:lt,onTouchStart:lt,onClick:q?O:void 0,ref:E,...x,children:m})}const Si=J.memo(Ip(d3));function h3({data:n,isConnectable:a,sourcePosition:o=gt.Bottom}){return z.jsxs(z.Fragment,{children:[n?.label,z.jsx(Si,{type:"source",position:o,isConnectable:a})]})}function g3({data:n,isConnectable:a,targetPosition:o=gt.Top,sourcePosition:u=gt.Bottom}){return z.jsxs(z.Fragment,{children:[z.jsx(Si,{type:"target",position:o,isConnectable:a}),n?.label,z.jsx(Si,{type:"source",position:u,isConnectable:a})]})}function m3(){return null}function y3({data:n,isConnectable:a,targetPosition:o=gt.Top}){return z.jsxs(z.Fragment,{children:[z.jsx(Si,{type:"target",position:o,isConnectable:a}),n?.label]})}const Ts={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gy={input:h3,default:g3,output:y3,group:m3};function p3(n){return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??n.style?.width,height:n.height??n.initialHeight??n.style?.height}:{width:n.width??n.style?.width,height:n.height??n.style?.height}}const v3=n=>{const{width:a,height:o,x:u,y:r}=No(n.nodeLookup,{filter:f=>!!f.selected});return{width:en(a)?a:null,height:en(o)?o:null,userSelectionActive:n.userSelectionActive,transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]}) translate(${u}px,${r}px)`}};function x3({onSelectionContextMenu:n,noPanClassName:a,disableKeyboardA11y:o}){const u=Kt(),{width:r,height:f,transformString:d,userSelectionActive:g}=zt(v3,Zt),m=tv(),h=J.useRef(null);J.useEffect(()=>{o||h.current?.focus({preventScroll:!0})},[o]);const p=!g&&r!==null&&f!==null;if(Pp({nodeRef:h,disabled:!p}),!p)return null;const v=n?E=>{const b=u.getState().nodes.filter(_=>_.selected);n(E,b)}:void 0,x=E=>{Object.prototype.hasOwnProperty.call(Ts,E.key)&&(E.preventDefault(),m({direction:Ts[E.key],factor:E.shiftKey?4:1}))};return z.jsx("div",{className:ne(["react-flow__nodesselection","react-flow__container",a]),style:{transform:d},children:z.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:o?void 0:-1,onKeyDown:o?void 0:x,style:{width:r,height:f}})})}const my=typeof window<"u"?window:void 0,b3=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function nv({children:n,onPaneClick:a,onPaneMouseEnter:o,onPaneMouseMove:u,onPaneMouseLeave:r,onPaneContextMenu:f,onPaneScroll:d,paneClickDistance:g,deleteKeyCode:m,selectionKeyCode:h,selectionOnDrag:p,selectionMode:v,onSelectionStart:x,onSelectionEnd:E,multiSelectionKeyCode:b,panActivationKeyCode:_,zoomActivationKeyCode:T,elementsSelectable:N,zoomOnScroll:q,zoomOnPinch:w,panOnScroll:A,panOnScrollSpeed:Y,panOnScrollMode:B,zoomOnDoubleClick:j,panOnDrag:X,defaultViewport:$,translateExtent:ot,minZoom:k,maxZoom:I,preventScrolling:lt,onSelectionContextMenu:O,noWheelClassName:G,noPanClassName:M,disableKeyboardA11y:R,onViewportChange:H,isControlledViewport:Q}){const{nodesSelectionActive:tt,userSelectionActive:C}=zt(b3,Zt),U=So(h,{target:my}),P=So(_,{target:my}),et=P||X,st=P||A,ct=p&&et!==!0,rt=U||C||ct;return t3({deleteKeyCode:m,multiSelectionKeyCode:b}),z.jsx(i3,{onPaneContextMenu:f,elementsSelectable:N,zoomOnScroll:q,zoomOnPinch:w,panOnScroll:st,panOnScrollSpeed:Y,panOnScrollMode:B,zoomOnDoubleClick:j,panOnDrag:!U&&et,defaultViewport:$,translateExtent:ot,minZoom:k,maxZoom:I,zoomActivationKeyCode:T,preventScrolling:lt,noWheelClassName:G,noPanClassName:M,onViewportChange:H,isControlledViewport:Q,paneClickDistance:g,selectionOnDrag:ct,children:z.jsxs(u3,{onSelectionStart:x,onSelectionEnd:E,onPaneClick:a,onPaneMouseEnter:o,onPaneMouseMove:u,onPaneMouseLeave:r,onPaneContextMenu:f,onPaneScroll:d,panOnDrag:et,isSelecting:!!rt,selectionMode:v,selectionKeyPressed:U,paneClickDistance:g,selectionOnDrag:ct,children:[n,tt&&z.jsx(x3,{onSelectionContextMenu:O,noPanClassName:M,disableKeyboardA11y:R})]})})}nv.displayName="FlowRenderer";const S3=J.memo(nv),E3=n=>a=>n?ad(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(o=>o.id):Array.from(a.nodeLookup.keys());function w3(n){return zt(J.useCallback(E3(n),[n]),Zt)}const _3=n=>n.updateNodeInternals;function M3(){const n=zt(_3),[a]=J.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(o=>{const u=new Map;o.forEach(r=>{const f=r.target.getAttribute("data-id");u.set(f,{id:f,nodeElement:r.target,force:!0})}),n(u)}));return J.useEffect(()=>()=>{a?.disconnect()},[a]),a}function C3({node:n,nodeType:a,hasDimensions:o,resizeObserver:u}){const r=Kt(),f=J.useRef(null),d=J.useRef(null),g=J.useRef(n.sourcePosition),m=J.useRef(n.targetPosition),h=J.useRef(a),p=o&&!!n.internals.handleBounds;return J.useEffect(()=>{f.current&&!n.hidden&&(!p||d.current!==f.current)&&(d.current&&u?.unobserve(d.current),u?.observe(f.current),d.current=f.current)},[p,n.hidden]),J.useEffect(()=>()=>{d.current&&(u?.unobserve(d.current),d.current=null)},[]),J.useEffect(()=>{if(f.current){const v=h.current!==a,x=g.current!==n.sourcePosition,E=m.current!==n.targetPosition;(v||x||E)&&(h.current=a,g.current=n.sourcePosition,m.current=n.targetPosition,r.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:f.current,force:!0}]])))}},[n.id,a,n.sourcePosition,n.targetPosition]),f}function N3({id:n,onClick:a,onMouseEnter:o,onMouseMove:u,onMouseLeave:r,onContextMenu:f,onDoubleClick:d,nodesDraggable:g,elementsSelectable:m,nodesConnectable:h,nodesFocusable:p,resizeObserver:v,noDragClassName:x,noPanClassName:E,disableKeyboardA11y:b,rfId:_,nodeTypes:T,nodeClickDistance:N,onError:q}){const{node:w,internals:A,isParent:Y}=zt(ut=>{const ft=ut.nodeLookup.get(n),Et=ut.parentLookup.has(n);return{node:ft,internals:ft.internals,isParent:Et}},Zt);let B=w.type||"default",j=T?.[B]||gy[B];j===void 0&&(q?.("003",hn.error003(B)),B="default",j=T?.default||gy.default);const X=!!(w.draggable||g&&typeof w.draggable>"u"),$=!!(w.selectable||m&&typeof w.selectable>"u"),ot=!!(w.connectable||h&&typeof w.connectable>"u"),k=!!(w.focusable||p&&typeof w.focusable>"u"),I=Kt(),lt=wp(w),O=C3({node:w,nodeType:B,hasDimensions:lt,resizeObserver:v}),G=Pp({nodeRef:O,disabled:w.hidden||!X,noDragClassName:x,handleSelector:w.dragHandle,nodeId:n,isSelectable:$,nodeClickDistance:N}),M=tv();if(w.hidden)return null;const R=Qn(w),H=p3(w),Q=$||X||a||o||u||r,tt=o?ut=>o(ut,{...A.userNode}):void 0,C=u?ut=>u(ut,{...A.userNode}):void 0,U=r?ut=>r(ut,{...A.userNode}):void 0,P=f?ut=>f(ut,{...A.userNode}):void 0,et=d?ut=>d(ut,{...A.userNode}):void 0,st=ut=>{const{selectNodesOnDrag:ft,nodeDragThreshold:Et}=I.getState();$&&(!ft||!X||Et>0)&&Zf({id:n,store:I,nodeRef:O}),a&&a(ut,{...A.userNode})},ct=ut=>{if(!(Cp(ut.nativeEvent)||b)){if(gp.includes(ut.key)&&$){const ft=ut.key==="Escape";Zf({id:n,store:I,unselect:ft,nodeRef:O})}else if(X&&w.selected&&Object.prototype.hasOwnProperty.call(Ts,ut.key)){ut.preventDefault();const{ariaLabelConfig:ft}=I.getState();I.setState({ariaLiveMessage:ft["node.a11yDescription.ariaLiveMessage"]({direction:ut.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),M({direction:Ts[ut.key],factor:ut.shiftKey?4:1})}}},rt=()=>{if(b||!O.current?.matches(":focus-visible"))return;const{transform:ut,width:ft,height:Et,autoPanOnNodeFocus:bt,setCenter:yt}=I.getState();if(!bt)return;ad(new Map([[n,w]]),{x:0,y:0,width:ft,height:Et},ut,!0).length>0||yt(w.position.x+R.width/2,w.position.y+R.height/2,{zoom:ut[2]})};return z.jsx("div",{className:ne(["react-flow__node",`react-flow__node-${B}`,{[E]:X},w.className,{selected:w.selected,selectable:$,parent:Y,draggable:X,dragging:G}]),ref:O,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:Q?"all":"none",visibility:lt?"visible":"hidden",...w.style,...H},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:tt,onMouseMove:C,onMouseLeave:U,onContextMenu:P,onClick:st,onDoubleClick:et,onKeyDown:k?ct:void 0,tabIndex:k?0:void 0,onFocus:k?rt:void 0,role:w.ariaRole??(k?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${Zp}-${_}`,"aria-label":w.ariaLabel,...w.domAttributes,children:z.jsx(r3,{value:n,children:z.jsx(j,{id:n,data:w.data,type:B,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:w.selected??!1,selectable:$,draggable:X,deletable:w.deletable??!0,isConnectable:ot,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:G,dragHandle:w.dragHandle,zIndex:A.z,parentId:w.parentId,...R})})})}var T3=J.memo(N3);const A3=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function iv(n){const{nodesDraggable:a,nodesConnectable:o,nodesFocusable:u,elementsSelectable:r,onError:f}=zt(A3,Zt),d=w3(n.onlyRenderVisibleElements),g=M3();return z.jsx("div",{className:"react-flow__nodes",style:Vs,children:d.map(m=>z.jsx(T3,{id:m,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:g,nodesDraggable:a,nodesConnectable:o,nodesFocusable:u,elementsSelectable:r,nodeClickDistance:n.nodeClickDistance,onError:f},m))})}iv.displayName="NodeRenderer";const z3=J.memo(iv);function D3(n){return zt(J.useCallback(o=>{if(!n)return o.edges.map(r=>r.id);const u=[];if(o.width&&o.height)for(const r of o.edges){const f=o.nodeLookup.get(r.source),d=o.nodeLookup.get(r.target);f&&d&&Tw({sourceNode:f,targetNode:d,width:o.width,height:o.height,transform:o.transform})&&u.push(r.id)}return u},[n]),Zt)}const O3=({color:n="none",strokeWidth:a=1})=>{const o={strokeWidth:a,...n&&{stroke:n}};return z.jsx("polyline",{className:"arrow",style:o,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},R3=({color:n="none",strokeWidth:a=1})=>{const o={strokeWidth:a,...n&&{stroke:n,fill:n}};return z.jsx("polyline",{className:"arrowclosed",style:o,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},yy={[_s.Arrow]:O3,[_s.ArrowClosed]:R3};function H3(n){const a=Kt();return J.useMemo(()=>Object.prototype.hasOwnProperty.call(yy,n)?yy[n]:(a.getState().onError?.("009",hn.error009(n)),null),[n])}const j3=({id:n,type:a,color:o,width:u=12.5,height:r=12.5,markerUnits:f="strokeWidth",strokeWidth:d,orient:g="auto-start-reverse"})=>{const m=H3(a);return m?z.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${u}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:g,refX:"0",refY:"0",children:z.jsx(m,{color:o,strokeWidth:d})}):null},av=({defaultColor:n,rfId:a})=>{const o=zt(f=>f.edges),u=zt(f=>f.defaultEdgeOptions),r=J.useMemo(()=>Bw(o,{id:a,defaultColor:n,defaultMarkerStart:u?.markerStart,defaultMarkerEnd:u?.markerEnd}),[o,u,a,n]);return r.length?z.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:z.jsx("defs",{children:r.map(f=>z.jsx(j3,{id:f.id,type:f.type,color:f.color,width:f.width,height:f.height,markerUnits:f.markerUnits,strokeWidth:f.strokeWidth,orient:f.orient},f.id))})}):null};av.displayName="MarkerDefinitions";var B3=J.memo(av);function lv({x:n,y:a,label:o,labelStyle:u,labelShowBg:r=!0,labelBgStyle:f,labelBgPadding:d=[2,4],labelBgBorderRadius:g=2,children:m,className:h,...p}){const[v,x]=J.useState({x:1,y:0,width:0,height:0}),E=ne(["react-flow__edge-textwrapper",h]),b=J.useRef(null);return J.useEffect(()=>{if(b.current){const _=b.current.getBBox();x({x:_.x,y:_.y,width:_.width,height:_.height})}},[o]),o?z.jsxs("g",{transform:`translate(${n-v.width/2} ${a-v.height/2})`,className:E,visibility:v.width?"visible":"hidden",...p,children:[r&&z.jsx("rect",{width:v.width+2*d[0],x:-d[0],y:-d[1],height:v.height+2*d[1],className:"react-flow__edge-textbg",style:f,rx:g,ry:g}),z.jsx("text",{className:"react-flow__edge-text",y:v.height/2,dy:"0.3em",ref:b,style:u,children:o}),m]}):null}lv.displayName="EdgeText";const U3=J.memo(lv);function zo({path:n,labelX:a,labelY:o,label:u,labelStyle:r,labelShowBg:f,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:m,interactionWidth:h=20,...p}){return z.jsxs(z.Fragment,{children:[z.jsx("path",{...p,d:n,fill:"none",className:ne(["react-flow__edge-path",p.className])}),h?z.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,u&&en(a)&&en(o)?z.jsx(U3,{x:a,y:o,label:u,labelStyle:r,labelShowBg:f,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:m}):null]})}function py({pos:n,x1:a,y1:o,x2:u,y2:r}){return n===gt.Left||n===gt.Right?[.5*(a+u),o]:[a,.5*(o+r)]}function ov({sourceX:n,sourceY:a,sourcePosition:o=gt.Bottom,targetX:u,targetY:r,targetPosition:f=gt.Top}){const[d,g]=py({pos:o,x1:n,y1:a,x2:u,y2:r}),[m,h]=py({pos:f,x1:u,y1:r,x2:n,y2:a}),[p,v,x,E]=Tp({sourceX:n,sourceY:a,targetX:u,targetY:r,sourceControlX:d,sourceControlY:g,targetControlX:m,targetControlY:h});return[`M${n},${a} C${d},${g} ${m},${h} ${u},${r}`,p,v,x,E]}function uv(n){return J.memo(({id:a,sourceX:o,sourceY:u,targetX:r,targetY:f,sourcePosition:d,targetPosition:g,label:m,labelStyle:h,labelShowBg:p,labelBgStyle:v,labelBgPadding:x,labelBgBorderRadius:E,style:b,markerEnd:_,markerStart:T,interactionWidth:N})=>{const[q,w,A]=ov({sourceX:o,sourceY:u,sourcePosition:d,targetX:r,targetY:f,targetPosition:g}),Y=n.isInternal?void 0:a;return z.jsx(zo,{id:Y,path:q,labelX:w,labelY:A,label:m,labelStyle:h,labelShowBg:p,labelBgStyle:v,labelBgPadding:x,labelBgBorderRadius:E,style:b,markerEnd:_,markerStart:T,interactionWidth:N})})}const q3=uv({isInternal:!1}),sv=uv({isInternal:!0});q3.displayName="SimpleBezierEdge";sv.displayName="SimpleBezierEdgeInternal";function rv(n){return J.memo(({id:a,sourceX:o,sourceY:u,targetX:r,targetY:f,label:d,labelStyle:g,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:v,style:x,sourcePosition:E=gt.Bottom,targetPosition:b=gt.Top,markerEnd:_,markerStart:T,pathOptions:N,interactionWidth:q})=>{const[w,A,Y]=Ns({sourceX:o,sourceY:u,sourcePosition:E,targetX:r,targetY:f,targetPosition:b,borderRadius:N?.borderRadius,offset:N?.offset,stepPosition:N?.stepPosition}),B=n.isInternal?void 0:a;return z.jsx(zo,{id:B,path:w,labelX:A,labelY:Y,label:d,labelStyle:g,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:v,style:x,markerEnd:_,markerStart:T,interactionWidth:q})})}const cv=rv({isInternal:!1}),fv=rv({isInternal:!0});cv.displayName="SmoothStepEdge";fv.displayName="SmoothStepEdgeInternal";function dv(n){return J.memo(({id:a,...o})=>{const u=n.isInternal?void 0:a;return z.jsx(cv,{...o,id:u,pathOptions:J.useMemo(()=>({borderRadius:0,offset:o.pathOptions?.offset}),[o.pathOptions?.offset])})})}const L3=dv({isInternal:!1}),hv=dv({isInternal:!0});L3.displayName="StepEdge";hv.displayName="StepEdgeInternal";function gv(n){return J.memo(({id:a,sourceX:o,sourceY:u,targetX:r,targetY:f,label:d,labelStyle:g,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:v,style:x,markerEnd:E,markerStart:b,interactionWidth:_})=>{const[T,N,q]=Dp({sourceX:o,sourceY:u,targetX:r,targetY:f}),w=n.isInternal?void 0:a;return z.jsx(zo,{id:w,path:T,labelX:N,labelY:q,label:d,labelStyle:g,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:v,style:x,markerEnd:E,markerStart:b,interactionWidth:_})})}const Y3=gv({isInternal:!1}),mv=gv({isInternal:!0});Y3.displayName="StraightEdge";mv.displayName="StraightEdgeInternal";function yv(n){return J.memo(({id:a,sourceX:o,sourceY:u,targetX:r,targetY:f,sourcePosition:d=gt.Bottom,targetPosition:g=gt.Top,label:m,labelStyle:h,labelShowBg:p,labelBgStyle:v,labelBgPadding:x,labelBgBorderRadius:E,style:b,markerEnd:_,markerStart:T,pathOptions:N,interactionWidth:q})=>{const[w,A,Y]=Ap({sourceX:o,sourceY:u,sourcePosition:d,targetX:r,targetY:f,targetPosition:g,curvature:N?.curvature}),B=n.isInternal?void 0:a;return z.jsx(zo,{id:B,path:w,labelX:A,labelY:Y,label:m,labelStyle:h,labelShowBg:p,labelBgStyle:v,labelBgPadding:x,labelBgBorderRadius:E,style:b,markerEnd:_,markerStart:T,interactionWidth:q})})}const V3=yv({isInternal:!1}),pv=yv({isInternal:!0});V3.displayName="BezierEdge";pv.displayName="BezierEdgeInternal";const vy={default:pv,straight:mv,step:hv,smoothstep:fv,simplebezier:sv},xy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Q3=(n,a,o)=>o===gt.Left?n-a:o===gt.Right?n+a:n,X3=(n,a,o)=>o===gt.Top?n-a:o===gt.Bottom?n+a:n,by="react-flow__edgeupdater";function Sy({position:n,centerX:a,centerY:o,radius:u=10,onMouseDown:r,onMouseEnter:f,onMouseOut:d,type:g}){return z.jsx("circle",{onMouseDown:r,onMouseEnter:f,onMouseOut:d,className:ne([by,`${by}-${g}`]),cx:Q3(a,u,n),cy:X3(o,u,n),r:u,stroke:"transparent",fill:"transparent"})}function G3({isReconnectable:n,reconnectRadius:a,edge:o,sourceX:u,sourceY:r,targetX:f,targetY:d,sourcePosition:g,targetPosition:m,onReconnect:h,onReconnectStart:p,onReconnectEnd:v,setReconnecting:x,setUpdateHover:E}){const b=Kt(),_=(A,Y)=>{if(A.button!==0)return;const{autoPanOnConnect:B,domNode:j,connectionMode:X,connectionRadius:$,lib:ot,onConnectStart:k,cancelConnection:I,nodeLookup:lt,rfId:O,panBy:G,updateConnection:M}=b.getState(),R=Y.type==="target",H=(C,U)=>{x(!1),v?.(C,o,Y.type,U)},Q=C=>h?.(o,C),tt=(C,U)=>{x(!0),p?.(A,o,Y.type),k?.(C,U)};Gf.onPointerDown(A.nativeEvent,{autoPanOnConnect:B,connectionMode:X,connectionRadius:$,domNode:j,handleId:Y.id,nodeId:Y.nodeId,nodeLookup:lt,isTarget:R,edgeUpdaterType:Y.type,lib:ot,flowId:O,cancelConnection:I,panBy:G,isValidConnection:(...C)=>b.getState().isValidConnection?.(...C)??!0,onConnect:Q,onConnectStart:tt,onConnectEnd:(...C)=>b.getState().onConnectEnd?.(...C),onReconnectEnd:H,updateConnection:M,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},T=A=>_(A,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),N=A=>_(A,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),q=()=>E(!0),w=()=>E(!1);return z.jsxs(z.Fragment,{children:[(n===!0||n==="source")&&z.jsx(Sy,{position:g,centerX:u,centerY:r,radius:a,onMouseDown:T,onMouseEnter:q,onMouseOut:w,type:"source"}),(n===!0||n==="target")&&z.jsx(Sy,{position:m,centerX:f,centerY:d,radius:a,onMouseDown:N,onMouseEnter:q,onMouseOut:w,type:"target"})]})}function Z3({id:n,edgesFocusable:a,edgesReconnectable:o,elementsSelectable:u,onClick:r,onDoubleClick:f,onContextMenu:d,onMouseEnter:g,onMouseMove:m,onMouseLeave:h,reconnectRadius:p,onReconnect:v,onReconnectStart:x,onReconnectEnd:E,rfId:b,edgeTypes:_,noPanClassName:T,onError:N,disableKeyboardA11y:q}){let w=zt(yt=>yt.edgeLookup.get(n));const A=zt(yt=>yt.defaultEdgeOptions);w=A?{...A,...w}:w;let Y=w.type||"default",B=_?.[Y]||vy[Y];B===void 0&&(N?.("011",hn.error011(Y)),Y="default",B=_?.default||vy.default);const j=!!(w.focusable||a&&typeof w.focusable>"u"),X=typeof v<"u"&&(w.reconnectable||o&&typeof w.reconnectable>"u"),$=!!(w.selectable||u&&typeof w.selectable>"u"),ot=J.useRef(null),[k,I]=J.useState(!1),[lt,O]=J.useState(!1),G=Kt(),{zIndex:M,sourceX:R,sourceY:H,targetX:Q,targetY:tt,sourcePosition:C,targetPosition:U}=zt(J.useCallback(yt=>{const vt=yt.nodeLookup.get(w.source),Ct=yt.nodeLookup.get(w.target);if(!vt||!Ct)return{zIndex:w.zIndex,...xy};const Ut=jw({id:n,sourceNode:vt,targetNode:Ct,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:yt.connectionMode,onError:N});return{zIndex:Nw({selected:w.selected,zIndex:w.zIndex,sourceNode:vt,targetNode:Ct,elevateOnSelect:yt.elevateEdgesOnSelect,zIndexMode:yt.zIndexMode}),...Ut||xy}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Zt),P=J.useMemo(()=>w.markerStart?`url('#${Qf(w.markerStart,b)}')`:void 0,[w.markerStart,b]),et=J.useMemo(()=>w.markerEnd?`url('#${Qf(w.markerEnd,b)}')`:void 0,[w.markerEnd,b]);if(w.hidden||R===null||H===null||Q===null||tt===null)return null;const st=yt=>{const{addSelectedEdges:vt,unselectNodesAndEdges:Ct,multiSelectionActive:Ut}=G.getState();$&&(G.setState({nodesSelectionActive:!1}),w.selected&&Ut?(Ct({nodes:[],edges:[w]}),ot.current?.blur()):vt([n])),r&&r(yt,w)},ct=f?yt=>{f(yt,{...w})}:void 0,rt=d?yt=>{d(yt,{...w})}:void 0,ut=g?yt=>{g(yt,{...w})}:void 0,ft=m?yt=>{m(yt,{...w})}:void 0,Et=h?yt=>{h(yt,{...w})}:void 0,bt=yt=>{if(!q&&gp.includes(yt.key)&&$){const{unselectNodesAndEdges:vt,addSelectedEdges:Ct}=G.getState();yt.key==="Escape"?(ot.current?.blur(),vt({edges:[w]})):Ct([n])}};return z.jsx("svg",{style:{zIndex:M},children:z.jsxs("g",{className:ne(["react-flow__edge",`react-flow__edge-${Y}`,w.className,T,{selected:w.selected,animated:w.animated,inactive:!$&&!r,updating:k,selectable:$}]),onClick:st,onDoubleClick:ct,onContextMenu:rt,onMouseEnter:ut,onMouseMove:ft,onMouseLeave:Et,onKeyDown:j?bt:void 0,tabIndex:j?0:void 0,role:w.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":`rf__edge-${n}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":j?`${Kp}-${b}`:void 0,ref:ot,...w.domAttributes,children:[!lt&&z.jsx(B,{id:n,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:$,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:R,sourceY:H,targetX:Q,targetY:tt,sourcePosition:C,targetPosition:U,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:P,markerEnd:et,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),X&&z.jsx(G3,{edge:w,isReconnectable:X,reconnectRadius:p,onReconnect:v,onReconnectStart:x,onReconnectEnd:E,sourceX:R,sourceY:H,targetX:Q,targetY:tt,sourcePosition:C,targetPosition:U,setUpdateHover:I,setReconnecting:O})]})})}var K3=J.memo(Z3);const k3=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function vv({defaultMarkerColor:n,onlyRenderVisibleElements:a,rfId:o,edgeTypes:u,noPanClassName:r,onReconnect:f,onEdgeContextMenu:d,onEdgeMouseEnter:g,onEdgeMouseMove:m,onEdgeMouseLeave:h,onEdgeClick:p,reconnectRadius:v,onEdgeDoubleClick:x,onReconnectStart:E,onReconnectEnd:b,disableKeyboardA11y:_}){const{edgesFocusable:T,edgesReconnectable:N,elementsSelectable:q,onError:w}=zt(k3,Zt),A=D3(a);return z.jsxs("div",{className:"react-flow__edges",children:[z.jsx(B3,{defaultColor:n,rfId:o}),A.map(Y=>z.jsx(K3,{id:Y,edgesFocusable:T,edgesReconnectable:N,elementsSelectable:q,noPanClassName:r,onReconnect:f,onContextMenu:d,onMouseEnter:g,onMouseMove:m,onMouseLeave:h,onClick:p,reconnectRadius:v,onDoubleClick:x,onReconnectStart:E,onReconnectEnd:b,rfId:o,onError:w,edgeTypes:u,disableKeyboardA11y:_},Y))]})}vv.displayName="EdgeRenderer";const $3=J.memo(vv),F3=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function J3({children:n}){const a=zt(F3);return z.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:n})}function I3(n){const a=Ys(),o=J.useRef(!1);J.useEffect(()=>{!o.current&&a.viewportInitialized&&n&&(setTimeout(()=>n(a),1),o.current=!0)},[n,a.viewportInitialized])}const W3=n=>n.panZoom?.syncViewport;function P3(n){const a=zt(W3),o=Kt();return J.useEffect(()=>{n&&(a?.(n),o.setState({transform:[n.x,n.y,n.zoom]}))},[n,a]),null}function tM(n){return n.connection.inProgress?{...n.connection,to:Ao(n.connection.to,n.transform)}:{...n.connection}}function eM(n){return tM}function nM(n){const a=eM();return zt(a,Zt)}const iM=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function aM({containerStyle:n,style:a,type:o,component:u}){const{nodesConnectable:r,width:f,height:d,isValid:g,inProgress:m}=zt(iM,Zt);return!(f&&r&&m)?null:z.jsx("svg",{style:n,width:f,height:d,className:"react-flow__connectionline react-flow__container",children:z.jsx("g",{className:ne(["react-flow__connection",pp(g)]),children:z.jsx(xv,{style:a,type:o,CustomComponent:u,isValid:g})})})}const xv=({style:n,type:a=bi.Bezier,CustomComponent:o,isValid:u})=>{const{inProgress:r,from:f,fromNode:d,fromHandle:g,fromPosition:m,to:h,toNode:p,toHandle:v,toPosition:x,pointer:E}=nM();if(!r)return;if(o)return z.jsx(o,{connectionLineType:a,connectionLineStyle:n,fromNode:d,fromHandle:g,fromX:f.x,fromY:f.y,toX:h.x,toY:h.y,fromPosition:m,toPosition:x,connectionStatus:pp(u),toNode:p,toHandle:v,pointer:E});let b="";const _={sourceX:f.x,sourceY:f.y,sourcePosition:m,targetX:h.x,targetY:h.y,targetPosition:x};switch(a){case bi.Bezier:[b]=Ap(_);break;case bi.SimpleBezier:[b]=ov(_);break;case bi.Step:[b]=Ns({..._,borderRadius:0});break;case bi.SmoothStep:[b]=Ns(_);break;default:[b]=Dp(_)}return z.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:n})};xv.displayName="ConnectionLine";const lM={};function Ey(n=lM){J.useRef(n),Kt(),J.useEffect(()=>{},[n])}function oM(){Kt(),J.useRef(!1),J.useEffect(()=>{},[])}function bv({nodeTypes:n,edgeTypes:a,onInit:o,onNodeClick:u,onEdgeClick:r,onNodeDoubleClick:f,onEdgeDoubleClick:d,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:v,onSelectionStart:x,onSelectionEnd:E,connectionLineType:b,connectionLineStyle:_,connectionLineComponent:T,connectionLineContainerStyle:N,selectionKeyCode:q,selectionOnDrag:w,selectionMode:A,multiSelectionKeyCode:Y,panActivationKeyCode:B,zoomActivationKeyCode:j,deleteKeyCode:X,onlyRenderVisibleElements:$,elementsSelectable:ot,defaultViewport:k,translateExtent:I,minZoom:lt,maxZoom:O,preventScrolling:G,defaultMarkerColor:M,zoomOnScroll:R,zoomOnPinch:H,panOnScroll:Q,panOnScrollSpeed:tt,panOnScrollMode:C,zoomOnDoubleClick:U,panOnDrag:P,onPaneClick:et,onPaneMouseEnter:st,onPaneMouseMove:ct,onPaneMouseLeave:rt,onPaneScroll:ut,onPaneContextMenu:ft,paneClickDistance:Et,nodeClickDistance:bt,onEdgeContextMenu:yt,onEdgeMouseEnter:vt,onEdgeMouseMove:Ct,onEdgeMouseLeave:Ut,reconnectRadius:Ht,onReconnect:le,onReconnectStart:ke,onReconnectEnd:Te,noDragClassName:$e,noWheelClassName:yn,noPanClassName:_i,disableKeyboardA11y:Mi,nodeExtent:ue,rfId:la,viewport:pn,onViewportChange:Xn}){return Ey(n),Ey(a),oM(),I3(o),P3(pn),z.jsx(S3,{onPaneClick:et,onPaneMouseEnter:st,onPaneMouseMove:ct,onPaneMouseLeave:rt,onPaneContextMenu:ft,onPaneScroll:ut,paneClickDistance:Et,deleteKeyCode:X,selectionKeyCode:q,selectionOnDrag:w,selectionMode:A,onSelectionStart:x,onSelectionEnd:E,multiSelectionKeyCode:Y,panActivationKeyCode:B,zoomActivationKeyCode:j,elementsSelectable:ot,zoomOnScroll:R,zoomOnPinch:H,zoomOnDoubleClick:U,panOnScroll:Q,panOnScrollSpeed:tt,panOnScrollMode:C,panOnDrag:P,defaultViewport:k,translateExtent:I,minZoom:lt,maxZoom:O,onSelectionContextMenu:v,preventScrolling:G,noDragClassName:$e,noWheelClassName:yn,noPanClassName:_i,disableKeyboardA11y:Mi,onViewportChange:Xn,isControlledViewport:!!pn,children:z.jsxs(J3,{children:[z.jsx($3,{edgeTypes:a,onEdgeClick:r,onEdgeDoubleClick:d,onReconnect:le,onReconnectStart:ke,onReconnectEnd:Te,onlyRenderVisibleElements:$,onEdgeContextMenu:yt,onEdgeMouseEnter:vt,onEdgeMouseMove:Ct,onEdgeMouseLeave:Ut,reconnectRadius:Ht,defaultMarkerColor:M,noPanClassName:_i,disableKeyboardA11y:Mi,rfId:la}),z.jsx(aM,{style:_,type:b,component:T,containerStyle:N}),z.jsx("div",{className:"react-flow__edgelabel-renderer"}),z.jsx(z3,{nodeTypes:n,onNodeClick:u,onNodeDoubleClick:f,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:h,onNodeContextMenu:p,nodeClickDistance:bt,onlyRenderVisibleElements:$,noPanClassName:_i,noDragClassName:$e,disableKeyboardA11y:Mi,nodeExtent:ue,rfId:la}),z.jsx("div",{className:"react-flow__viewport-portal"})]})})}bv.displayName="GraphView";const uM=J.memo(bv),wy=({nodes:n,edges:a,defaultNodes:o,defaultEdges:u,width:r,height:f,fitView:d,fitViewOptions:g,minZoom:m=.5,maxZoom:h=2,nodeOrigin:p,nodeExtent:v,zIndexMode:x="basic"}={})=>{const E=new Map,b=new Map,_=new Map,T=new Map,N=u??a??[],q=o??n??[],w=p??[0,0],A=v??po;Hp(_,T,N);const Y=Xf(q,E,b,{nodeOrigin:w,nodeExtent:A,zIndexMode:x});let B=[0,0,1];if(d&&r&&f){const j=No(E,{filter:k=>!!((k.width||k.initialWidth)&&(k.height||k.initialHeight))}),{x:X,y:$,zoom:ot}=ld(j,r,f,m,h,g?.padding??.1);B=[X,$,ot]}return{rfId:"1",width:r??0,height:f??0,transform:B,nodes:q,nodesInitialized:Y,nodeLookup:E,parentLookup:b,edges:N,edgeLookup:T,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:o!==void 0,hasDefaultEdges:u!==void 0,panZoom:null,minZoom:m,maxZoom:h,translateExtent:po,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:nl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,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:d??!1,fitViewOptions:g,fitViewResolver:null,connection:{...yp},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Sw,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:mp,zIndexMode:x,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},sM=({nodes:n,edges:a,defaultNodes:o,defaultEdges:u,width:r,height:f,fitView:d,fitViewOptions:g,minZoom:m,maxZoom:h,nodeOrigin:p,nodeExtent:v,zIndexMode:x})=>M_((E,b)=>{async function _(){const{nodeLookup:T,panZoom:N,fitViewOptions:q,fitViewResolver:w,width:A,height:Y,minZoom:B,maxZoom:j}=b();N&&(await xw({nodes:T,width:A,height:Y,panZoom:N,minZoom:B,maxZoom:j},q),w?.resolve(!0),E({fitViewResolver:null}))}return{...wy({nodes:n,edges:a,width:r,height:f,fitView:d,fitViewOptions:g,minZoom:m,maxZoom:h,nodeOrigin:p,nodeExtent:v,defaultNodes:o,defaultEdges:u,zIndexMode:x}),setNodes:T=>{const{nodeLookup:N,parentLookup:q,nodeOrigin:w,elevateNodesOnSelect:A,fitViewQueued:Y,zIndexMode:B}=b(),j=Xf(T,N,q,{nodeOrigin:w,nodeExtent:v,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:B});Y&&j?(_(),E({nodes:T,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0})):E({nodes:T,nodesInitialized:j})},setEdges:T=>{const{connectionLookup:N,edgeLookup:q}=b();Hp(N,q,T),E({edges:T})},setDefaultNodesAndEdges:(T,N)=>{if(T){const{setNodes:q}=b();q(T),E({hasDefaultNodes:!0})}if(N){const{setEdges:q}=b();q(N),E({hasDefaultEdges:!0})}},updateNodeInternals:T=>{const{triggerNodeChanges:N,nodeLookup:q,parentLookup:w,domNode:A,nodeOrigin:Y,nodeExtent:B,debug:j,fitViewQueued:X,zIndexMode:$}=b(),{changes:ot,updatedInternals:k}=Xw(T,q,w,A,Y,B,$);k&&(Lw(q,w,{nodeOrigin:Y,nodeExtent:B,zIndexMode:$}),X?(_(),E({fitViewQueued:!1,fitViewOptions:void 0})):E({}),ot?.length>0&&(j&&console.log("React Flow: trigger node changes",ot),N?.(ot)))},updateNodePositions:(T,N=!1)=>{const q=[];let w=[];const{nodeLookup:A,triggerNodeChanges:Y,connection:B,updateConnection:j,onNodesChangeMiddlewareMap:X}=b();for(const[$,ot]of T){const k=A.get($),I=!!(k?.expandParent&&k?.parentId&&ot?.position),lt={id:$,type:"position",position:I?{x:Math.max(0,ot.position.x),y:Math.max(0,ot.position.y)}:ot.position,dragging:N};if(k&&B.inProgress&&B.fromNode.id===k.id){const O=aa(k,B.fromHandle,gt.Left,!0);j({...B,from:O})}I&&k.parentId&&q.push({id:$,parentId:k.parentId,rect:{...ot.internals.positionAbsolute,width:ot.measured.width??0,height:ot.measured.height??0}}),w.push(lt)}if(q.length>0){const{parentLookup:$,nodeOrigin:ot}=b(),k=fd(q,A,$,ot);w.push(...k)}for(const $ of X.values())w=$(w);Y(w)},triggerNodeChanges:T=>{const{onNodesChange:N,setNodes:q,nodes:w,hasDefaultNodes:A,debug:Y}=b();if(T?.length){if(A){const B=Fp(T,w);q(B)}Y&&console.log("React Flow: trigger node changes",T),N?.(T)}},triggerEdgeChanges:T=>{const{onEdgesChange:N,setEdges:q,edges:w,hasDefaultEdges:A,debug:Y}=b();if(T?.length){if(A){const B=Jp(T,w);q(B)}Y&&console.log("React Flow: trigger edge changes",T),N?.(T)}},addSelectedNodes:T=>{const{multiSelectionActive:N,edgeLookup:q,nodeLookup:w,triggerNodeChanges:A,triggerEdgeChanges:Y}=b();if(N){const B=T.map(j=>Fi(j,!0));A(B);return}A(Fa(w,new Set([...T]),!0)),Y(Fa(q))},addSelectedEdges:T=>{const{multiSelectionActive:N,edgeLookup:q,nodeLookup:w,triggerNodeChanges:A,triggerEdgeChanges:Y}=b();if(N){const B=T.map(j=>Fi(j,!0));Y(B);return}Y(Fa(q,new Set([...T]))),A(Fa(w,new Set,!0))},unselectNodesAndEdges:({nodes:T,edges:N}={})=>{const{edges:q,nodes:w,nodeLookup:A,triggerNodeChanges:Y,triggerEdgeChanges:B}=b(),j=T||w,X=N||q,$=[];for(const k of j){if(!k.selected)continue;const I=A.get(k.id);I&&(I.selected=!1),$.push(Fi(k.id,!1))}const ot=[];for(const k of X)k.selected&&ot.push(Fi(k.id,!1));Y($),B(ot)},setMinZoom:T=>{const{panZoom:N,maxZoom:q}=b();N?.setScaleExtent([T,q]),E({minZoom:T})},setMaxZoom:T=>{const{panZoom:N,minZoom:q}=b();N?.setScaleExtent([q,T]),E({maxZoom:T})},setTranslateExtent:T=>{b().panZoom?.setTranslateExtent(T),E({translateExtent:T})},resetSelectedElements:()=>{const{edges:T,nodes:N,triggerNodeChanges:q,triggerEdgeChanges:w,elementsSelectable:A}=b();if(!A)return;const Y=N.reduce((j,X)=>X.selected?[...j,Fi(X.id,!1)]:j,[]),B=T.reduce((j,X)=>X.selected?[...j,Fi(X.id,!1)]:j,[]);q(Y),w(B)},setNodeExtent:T=>{const{nodes:N,nodeLookup:q,parentLookup:w,nodeOrigin:A,elevateNodesOnSelect:Y,nodeExtent:B,zIndexMode:j}=b();T[0][0]===B[0][0]&&T[0][1]===B[0][1]&&T[1][0]===B[1][0]&&T[1][1]===B[1][1]||(Xf(N,q,w,{nodeOrigin:A,nodeExtent:T,elevateNodesOnSelect:Y,checkEquality:!1,zIndexMode:j}),E({nodeExtent:T}))},panBy:T=>{const{transform:N,width:q,height:w,panZoom:A,translateExtent:Y}=b();return Gw({delta:T,panZoom:A,transform:N,translateExtent:Y,width:q,height:w})},setCenter:async(T,N,q)=>{const{width:w,height:A,maxZoom:Y,panZoom:B}=b();if(!B)return Promise.resolve(!1);const j=typeof q?.zoom<"u"?q.zoom:Y;return await B.setViewport({x:w/2-T*j,y:A/2-N*j,zoom:j},{duration:q?.duration,ease:q?.ease,interpolate:q?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{E({connection:{...yp}})},updateConnection:T=>{E({connection:T})},reset:()=>E({...wy()})}},Object.is);function rM({initialNodes:n,initialEdges:a,defaultNodes:o,defaultEdges:u,initialWidth:r,initialHeight:f,initialMinZoom:d,initialMaxZoom:g,initialFitViewOptions:m,fitView:h,nodeOrigin:p,nodeExtent:v,zIndexMode:x,children:E}){const[b]=J.useState(()=>sM({nodes:n,edges:a,defaultNodes:o,defaultEdges:u,width:r,height:f,fitView:h,minZoom:d,maxZoom:g,fitViewOptions:m,nodeOrigin:p,nodeExtent:v,zIndexMode:x}));return z.jsx(N_,{value:b,children:z.jsx(J_,{children:E})})}function cM({children:n,nodes:a,edges:o,defaultNodes:u,defaultEdges:r,width:f,height:d,fitView:g,fitViewOptions:m,minZoom:h,maxZoom:p,nodeOrigin:v,nodeExtent:x,zIndexMode:E}){return J.useContext(qs)?z.jsx(z.Fragment,{children:n}):z.jsx(rM,{initialNodes:a,initialEdges:o,defaultNodes:u,defaultEdges:r,initialWidth:f,initialHeight:d,fitView:g,initialFitViewOptions:m,initialMinZoom:h,initialMaxZoom:p,nodeOrigin:v,nodeExtent:x,zIndexMode:E,children:n})}const fM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function dM({nodes:n,edges:a,defaultNodes:o,defaultEdges:u,className:r,nodeTypes:f,edgeTypes:d,onNodeClick:g,onEdgeClick:m,onInit:h,onMove:p,onMoveStart:v,onMoveEnd:x,onConnect:E,onConnectStart:b,onConnectEnd:_,onClickConnectStart:T,onClickConnectEnd:N,onNodeMouseEnter:q,onNodeMouseMove:w,onNodeMouseLeave:A,onNodeContextMenu:Y,onNodeDoubleClick:B,onNodeDragStart:j,onNodeDrag:X,onNodeDragStop:$,onNodesDelete:ot,onEdgesDelete:k,onDelete:I,onSelectionChange:lt,onSelectionDragStart:O,onSelectionDrag:G,onSelectionDragStop:M,onSelectionContextMenu:R,onSelectionStart:H,onSelectionEnd:Q,onBeforeDelete:tt,connectionMode:C,connectionLineType:U=bi.Bezier,connectionLineStyle:P,connectionLineComponent:et,connectionLineContainerStyle:st,deleteKeyCode:ct="Backspace",selectionKeyCode:rt="Shift",selectionOnDrag:ut=!1,selectionMode:ft=vo.Full,panActivationKeyCode:Et="Space",multiSelectionKeyCode:bt=bo()?"Meta":"Control",zoomActivationKeyCode:yt=bo()?"Meta":"Control",snapToGrid:vt,snapGrid:Ct,onlyRenderVisibleElements:Ut=!1,selectNodesOnDrag:Ht,nodesDraggable:le,autoPanOnNodeFocus:ke,nodesConnectable:Te,nodesFocusable:$e,nodeOrigin:yn=kp,edgesFocusable:_i,edgesReconnectable:Mi,elementsSelectable:ue=!0,defaultViewport:la=Y_,minZoom:pn=.5,maxZoom:Xn=2,translateExtent:Ci=po,preventScrolling:Qs=!0,nodeExtent:oa,defaultMarkerColor:Xs="#b1b1b7",zoomOnScroll:Gs=!0,zoomOnPinch:Ni=!0,panOnScroll:me=!1,panOnScrollSpeed:ln=.5,panOnScrollMode:ye=Pi.Free,zoomOnDoubleClick:Zs=!0,panOnDrag:Ks=!0,onPaneClick:ks,onPaneMouseEnter:ua,onPaneMouseMove:sa,onPaneMouseLeave:ra,onPaneScroll:vn,onPaneContextMenu:ca,paneClickDistance:Ti=1,nodeClickDistance:$s=0,children:Do,onReconnect:ul,onReconnectStart:Ai,onReconnectEnd:Fs,onEdgeContextMenu:Oo,onEdgeDoubleClick:Ro,onEdgeMouseEnter:Ho,onEdgeMouseMove:sl,onEdgeMouseLeave:rl,reconnectRadius:jo=10,onNodesChange:Bo,onEdgesChange:on,noDragClassName:ie="nodrag",noWheelClassName:he="nowheel",noPanClassName:xn="nopan",fitView:fa,fitViewOptions:Uo,connectOnClick:Js,attributionPosition:qo,proOptions:zi,defaultEdgeOptions:cl,elevateNodesOnSelect:Gn=!0,elevateEdgesOnSelect:Zn=!1,disableKeyboardA11y:Kn=!1,autoPanOnConnect:kn,autoPanOnNodeDrag:It,autoPanSpeed:Lo,connectionRadius:Yo,isValidConnection:bn,onError:$n,style:Is,id:fl,nodeDragThreshold:Vo,connectionDragThreshold:Ws,viewport:da,onViewportChange:ha,width:Fe,height:ve,colorMode:Qo="light",debug:Ps,onScroll:ga,ariaLabelConfig:Xo,zIndexMode:Di="basic",...tr},xe){const Oi=fl||"1",Go=G_(Qo),dl=J.useCallback(Sn=>{Sn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ga?.(Sn)},[ga]);return z.jsx("div",{"data-testid":"rf__wrapper",...tr,onScroll:dl,style:{...Is,...fM},ref:xe,className:ne(["react-flow",r,Go]),id:fl,role:"application",children:z.jsxs(cM,{nodes:n,edges:a,width:Fe,height:ve,fitView:fa,fitViewOptions:Uo,minZoom:pn,maxZoom:Xn,nodeOrigin:yn,nodeExtent:oa,zIndexMode:Di,children:[z.jsx(uM,{onInit:h,onNodeClick:g,onEdgeClick:m,onNodeMouseEnter:q,onNodeMouseMove:w,onNodeMouseLeave:A,onNodeContextMenu:Y,onNodeDoubleClick:B,nodeTypes:f,edgeTypes:d,connectionLineType:U,connectionLineStyle:P,connectionLineComponent:et,connectionLineContainerStyle:st,selectionKeyCode:rt,selectionOnDrag:ut,selectionMode:ft,deleteKeyCode:ct,multiSelectionKeyCode:bt,panActivationKeyCode:Et,zoomActivationKeyCode:yt,onlyRenderVisibleElements:Ut,defaultViewport:la,translateExtent:Ci,minZoom:pn,maxZoom:Xn,preventScrolling:Qs,zoomOnScroll:Gs,zoomOnPinch:Ni,zoomOnDoubleClick:Zs,panOnScroll:me,panOnScrollSpeed:ln,panOnScrollMode:ye,panOnDrag:Ks,onPaneClick:ks,onPaneMouseEnter:ua,onPaneMouseMove:sa,onPaneMouseLeave:ra,onPaneScroll:vn,onPaneContextMenu:ca,paneClickDistance:Ti,nodeClickDistance:$s,onSelectionContextMenu:R,onSelectionStart:H,onSelectionEnd:Q,onReconnect:ul,onReconnectStart:Ai,onReconnectEnd:Fs,onEdgeContextMenu:Oo,onEdgeDoubleClick:Ro,onEdgeMouseEnter:Ho,onEdgeMouseMove:sl,onEdgeMouseLeave:rl,reconnectRadius:jo,defaultMarkerColor:Xs,noDragClassName:ie,noWheelClassName:he,noPanClassName:xn,rfId:Oi,disableKeyboardA11y:Kn,nodeExtent:oa,viewport:da,onViewportChange:ha}),z.jsx(X_,{nodes:n,edges:a,defaultNodes:o,defaultEdges:u,onConnect:E,onConnectStart:b,onConnectEnd:_,onClickConnectStart:T,onClickConnectEnd:N,nodesDraggable:le,autoPanOnNodeFocus:ke,nodesConnectable:Te,nodesFocusable:$e,edgesFocusable:_i,edgesReconnectable:Mi,elementsSelectable:ue,elevateNodesOnSelect:Gn,elevateEdgesOnSelect:Zn,minZoom:pn,maxZoom:Xn,nodeExtent:oa,onNodesChange:Bo,onEdgesChange:on,snapToGrid:vt,snapGrid:Ct,connectionMode:C,translateExtent:Ci,connectOnClick:Js,defaultEdgeOptions:cl,fitView:fa,fitViewOptions:Uo,onNodesDelete:ot,onEdgesDelete:k,onDelete:I,onNodeDragStart:j,onNodeDrag:X,onNodeDragStop:$,onSelectionDrag:G,onSelectionDragStart:O,onSelectionDragStop:M,onMove:p,onMoveStart:v,onMoveEnd:x,noPanClassName:xn,nodeOrigin:yn,rfId:Oi,autoPanOnConnect:kn,autoPanOnNodeDrag:It,autoPanSpeed:Lo,onError:$n,connectionRadius:Yo,isValidConnection:bn,selectNodesOnDrag:Ht,nodeDragThreshold:Vo,connectionDragThreshold:Ws,onBeforeDelete:tt,debug:Ps,ariaLabelConfig:Xo,zIndexMode:Di}),z.jsx(L_,{onSelectionChange:lt}),Do,z.jsx(H_,{proOptions:zi,position:qo}),z.jsx(R_,{rfId:Oi,disableKeyboardA11y:Kn})]})})}var hM=Ip(dM);const gM=n=>n.domNode?.querySelector(".react-flow__edgelabel-renderer");function mM({children:n}){const a=zt(gM);return a?C_.createPortal(n,a):null}function yM(n){const[a,o]=J.useState(n),u=J.useCallback(r=>o(f=>Fp(r,f)),[]);return[a,o,u]}function pM(n){const[a,o]=J.useState(n),u=J.useCallback(r=>o(f=>Jp(r,f)),[]);return[a,o,u]}function vM({dimensions:n,lineWidth:a,variant:o,className:u}){return z.jsx("path",{strokeWidth:a,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,className:ne(["react-flow__background-pattern",o,u])})}function xM({radius:n,className:a}){return z.jsx("circle",{cx:n,cy:n,r:n,className:ne(["react-flow__background-pattern","dots",a])})}var wi;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(wi||(wi={}));const bM={[wi.Dots]:1,[wi.Lines]:1,[wi.Cross]:6},SM=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function Sv({id:n,variant:a=wi.Dots,gap:o=20,size:u,lineWidth:r=1,offset:f=0,color:d,bgColor:g,style:m,className:h,patternClassName:p}){const v=J.useRef(null),{transform:x,patternId:E}=zt(SM,Zt),b=u||bM[a],_=a===wi.Dots,T=a===wi.Cross,N=Array.isArray(o)?o:[o,o],q=[N[0]*x[2]||1,N[1]*x[2]||1],w=b*x[2],A=Array.isArray(f)?f:[f,f],Y=T?[w,w]:q,B=[A[0]*x[2]||1+Y[0]/2,A[1]*x[2]||1+Y[1]/2],j=`${E}${n||""}`;return z.jsxs("svg",{className:ne(["react-flow__background",h]),style:{...m,...Vs,"--xy-background-color-props":g,"--xy-background-pattern-color-props":d},ref:v,"data-testid":"rf__background",children:[z.jsx("pattern",{id:j,x:x[0]%q[0],y:x[1]%q[1],width:q[0],height:q[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${B[0]},-${B[1]})`,children:_?z.jsx(xM,{radius:w/2,className:p}):z.jsx(vM,{dimensions:Y,lineWidth:r,variant:a,className:p})}),z.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}Sv.displayName="Background";const EM=J.memo(Sv);function wM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:z.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function _M(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:z.jsx("path",{d:"M0 0h32v4.2H0z"})})}function MM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:z.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 CM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 NM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 cs({children:n,className:a,...o}){return z.jsx("button",{type:"button",className:ne(["react-flow__controls-button",a]),...o,children:n})}const TM=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function Ev({style:n,showZoom:a=!0,showFitView:o=!0,showInteractive:u=!0,fitViewOptions:r,onZoomIn:f,onZoomOut:d,onFitView:g,onInteractiveChange:m,className:h,children:p,position:v="bottom-left",orientation:x="vertical","aria-label":E}){const b=Kt(),{isInteractive:_,minZoomReached:T,maxZoomReached:N,ariaLabelConfig:q}=zt(TM,Zt),{zoomIn:w,zoomOut:A,fitView:Y}=Ys(),B=()=>{w(),f?.()},j=()=>{A(),d?.()},X=()=>{Y(r),g?.()},$=()=>{b.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),m?.(!_)},ot=x==="horizontal"?"horizontal":"vertical";return z.jsxs(Ls,{className:ne(["react-flow__controls",ot,h]),position:v,style:n,"data-testid":"rf__controls","aria-label":E??q["controls.ariaLabel"],children:[a&&z.jsxs(z.Fragment,{children:[z.jsx(cs,{onClick:B,className:"react-flow__controls-zoomin",title:q["controls.zoomIn.ariaLabel"],"aria-label":q["controls.zoomIn.ariaLabel"],disabled:N,children:z.jsx(wM,{})}),z.jsx(cs,{onClick:j,className:"react-flow__controls-zoomout",title:q["controls.zoomOut.ariaLabel"],"aria-label":q["controls.zoomOut.ariaLabel"],disabled:T,children:z.jsx(_M,{})})]}),o&&z.jsx(cs,{className:"react-flow__controls-fitview",onClick:X,title:q["controls.fitView.ariaLabel"],"aria-label":q["controls.fitView.ariaLabel"],children:z.jsx(MM,{})}),u&&z.jsx(cs,{className:"react-flow__controls-interactive",onClick:$,title:q["controls.interactive.ariaLabel"],"aria-label":q["controls.interactive.ariaLabel"],children:_?z.jsx(NM,{}):z.jsx(CM,{})}),p]})}Ev.displayName="Controls";const AM=J.memo(Ev);function zM({id:n,x:a,y:o,width:u,height:r,style:f,color:d,strokeColor:g,strokeWidth:m,className:h,borderRadius:p,shapeRendering:v,selected:x,onClick:E}){const{background:b,backgroundColor:_}=f||{},T=d||b||_;return z.jsx("rect",{className:ne(["react-flow__minimap-node",{selected:x},h]),x:a,y:o,rx:p,ry:p,width:u,height:r,style:{fill:T,stroke:g,strokeWidth:m},shapeRendering:v,onClick:E?N=>E(N,n):void 0})}const DM=J.memo(zM),OM=n=>n.nodes.map(a=>a.id),_f=n=>n instanceof Function?n:()=>n;function RM({nodeStrokeColor:n,nodeColor:a,nodeClassName:o="",nodeBorderRadius:u=5,nodeStrokeWidth:r,nodeComponent:f=DM,onClick:d}){const g=zt(OM,Zt),m=_f(a),h=_f(n),p=_f(o),v=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return z.jsx(z.Fragment,{children:g.map(x=>z.jsx(jM,{id:x,nodeColorFunc:m,nodeStrokeColorFunc:h,nodeClassNameFunc:p,nodeBorderRadius:u,nodeStrokeWidth:r,NodeComponent:f,onClick:d,shapeRendering:v},x))})}function HM({id:n,nodeColorFunc:a,nodeStrokeColorFunc:o,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:f,shapeRendering:d,NodeComponent:g,onClick:m}){const{node:h,x:p,y:v,width:x,height:E}=zt(b=>{const _=b.nodeLookup.get(n);if(!_)return{node:void 0,x:0,y:0,width:0,height:0};const T=_.internals.userNode,{x:N,y:q}=_.internals.positionAbsolute,{width:w,height:A}=Qn(T);return{node:T,x:N,y:q,width:w,height:A}},Zt);return!h||h.hidden||!wp(h)?null:z.jsx(g,{x:p,y:v,width:x,height:E,style:h.style,selected:!!h.selected,className:u(h),color:a(h),borderRadius:r,strokeColor:o(h),strokeWidth:f,shapeRendering:d,onClick:m,id:h.id})}const jM=J.memo(HM);var BM=J.memo(RM);const UM=200,qM=150,LM=n=>!n.hidden,YM=n=>{const a={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:a,boundingRect:n.nodeLookup.size>0?Ep(No(n.nodeLookup,{filter:LM}),a):a,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},VM="react-flow__minimap-desc";function wv({style:n,className:a,nodeStrokeColor:o,nodeColor:u,nodeClassName:r="",nodeBorderRadius:f=5,nodeStrokeWidth:d,nodeComponent:g,bgColor:m,maskColor:h,maskStrokeColor:p,maskStrokeWidth:v,position:x="bottom-right",onClick:E,onNodeClick:b,pannable:_=!1,zoomable:T=!1,ariaLabel:N,inversePan:q,zoomStep:w=1,offsetScale:A=5}){const Y=Kt(),B=J.useRef(null),{boundingRect:j,viewBB:X,rfId:$,panZoom:ot,translateExtent:k,flowWidth:I,flowHeight:lt,ariaLabelConfig:O}=zt(YM,Zt),G=n?.width??UM,M=n?.height??qM,R=j.width/G,H=j.height/M,Q=Math.max(R,H),tt=Q*G,C=Q*M,U=A*Q,P=j.x-(tt-j.width)/2-U,et=j.y-(C-j.height)/2-U,st=tt+U*2,ct=C+U*2,rt=`${VM}-${$}`,ut=J.useRef(0),ft=J.useRef();ut.current=Q,J.useEffect(()=>{if(B.current&&ot)return ft.current=Pw({domNode:B.current,panZoom:ot,getTransform:()=>Y.getState().transform,getViewScale:()=>ut.current}),()=>{ft.current?.destroy()}},[ot]),J.useEffect(()=>{ft.current?.update({translateExtent:k,width:I,height:lt,inversePan:q,pannable:_,zoomStep:w,zoomable:T})},[_,T,q,w,k,I,lt]);const Et=E?vt=>{const[Ct,Ut]=ft.current?.pointer(vt)||[0,0];E(vt,{x:Ct,y:Ut})}:void 0,bt=b?J.useCallback((vt,Ct)=>{const Ut=Y.getState().nodeLookup.get(Ct).internals.userNode;b(vt,Ut)},[]):void 0,yt=N??O["minimap.ariaLabel"];return z.jsx(Ls,{position:x,style:{...n,"--xy-minimap-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof v=="number"?v*Q:void 0,"--xy-minimap-node-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-node-stroke-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:ne(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:z.jsxs("svg",{width:G,height:M,viewBox:`${P} ${et} ${st} ${ct}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":rt,ref:B,onClick:Et,children:[yt&&z.jsx("title",{id:rt,children:yt}),z.jsx(BM,{onClick:bt,nodeColor:u,nodeStrokeColor:o,nodeBorderRadius:f,nodeClassName:r,nodeStrokeWidth:d,nodeComponent:g}),z.jsx("path",{className:"react-flow__minimap-mask",d:`M${P-U},${et-U}h${st+U*2}v${ct+U*2}h${-st-U*2}z
15
+ M${X.x},${X.y}h${X.width}v${X.height}h${-X.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}wv.displayName="MiniMap";J.memo(wv);const QM=n=>a=>n?`${Math.max(1/a.transform[2],1)}`:void 0,XM={[ol.Line]:"right",[ol.Handle]:"bottom-right"};function GM({nodeId:n,position:a,variant:o=ol.Handle,className:u,style:r=void 0,children:f,color:d,minWidth:g=10,minHeight:m=10,maxWidth:h=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:v=!1,resizeDirection:x,autoScale:E=!0,shouldResize:b,onResizeStart:_,onResize:T,onResizeEnd:N}){const q=ev(),w=typeof n=="string"?n:q,A=Kt(),Y=J.useRef(null),B=o===ol.Handle,j=zt(J.useCallback(QM(B&&E),[B,E]),Zt),X=J.useRef(null),$=a??XM[o];J.useEffect(()=>{if(!(!Y.current||!w))return X.current||(X.current=h_({domNode:Y.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:k,transform:I,snapGrid:lt,snapToGrid:O,nodeOrigin:G,domNode:M}=A.getState();return{nodeLookup:k,transform:I,snapGrid:lt,snapToGrid:O,nodeOrigin:G,paneDomNode:M}},onChange:(k,I)=>{const{triggerNodeChanges:lt,nodeLookup:O,parentLookup:G,nodeOrigin:M}=A.getState(),R=[],H={x:k.x,y:k.y},Q=O.get(w);if(Q&&Q.expandParent&&Q.parentId){const tt=Q.origin??M,C=k.width??Q.measured.width??0,U=k.height??Q.measured.height??0,P={id:Q.id,parentId:Q.parentId,rect:{width:C,height:U,..._p({x:k.x??Q.position.x,y:k.y??Q.position.y},{width:C,height:U},Q.parentId,O,tt)}},et=fd([P],O,G,M);R.push(...et),H.x=k.x?Math.max(tt[0]*C,k.x):void 0,H.y=k.y?Math.max(tt[1]*U,k.y):void 0}if(H.x!==void 0&&H.y!==void 0){const tt={id:w,type:"position",position:{...H}};R.push(tt)}if(k.width!==void 0&&k.height!==void 0){const C={id:w,type:"dimensions",resizing:!0,setAttributes:x?x==="horizontal"?"width":"height":!0,dimensions:{width:k.width,height:k.height}};R.push(C)}for(const tt of I){const C={...tt,type:"position"};R.push(C)}lt(R)},onEnd:({width:k,height:I})=>{const lt={id:w,type:"dimensions",resizing:!1,dimensions:{width:k,height:I}};A.getState().triggerNodeChanges([lt])}})),X.current.update({controlPosition:$,boundaries:{minWidth:g,minHeight:m,maxWidth:h,maxHeight:p},keepAspectRatio:v,resizeDirection:x,onResizeStart:_,onResize:T,onResizeEnd:N,shouldResize:b}),()=>{X.current?.destroy()}},[$,g,m,h,p,v,_,T,N,b]);const ot=$.split("-");return z.jsx("div",{className:ne(["react-flow__resize-control","nodrag",...ot,o,u]),ref:Y,style:{...r,scale:j,...d&&{[B?"backgroundColor":"borderColor"]:d}},children:f})}J.memo(GM);const ro=40,As=28,_y=1,ZM=0,_v=220;function KM(n){return ro+n*As}const kM={integer:"#",bigint:"#",string:"A",text:"¶",boolean:"~",date:"◷",datetime:"◷",decimal:"∑",float:"∑",json:"{}",jsonb:"{}"};function $M(n){return kM[n]??"·"}function FM({column:n,indexes:a,fkEdgeId:o,columnIndex:u}){const{setHighlightedEdgeId:r}=gn(),f=!!o,d=n.diffStatus,g=a.find(b=>b.columns.includes(n.name)),m=!!g,h=g?.diffStatus,p=d==="added"?"bg-[#0d2012]":d==="removed"?"bg-[#2d1212]":"hover:bg-[#0D1117]",v=d==="removed"?"line-through text-[#F85149]":d==="added"?"text-[#3FB950]":f?"text-[#58A6FF]":"text-[#E6EDF3]",x=d==="removed"?"text-[#F85149]":"text-[#7D8590]",E=h==="added"?"text-[#3FB950]":h==="removed"?"text-[#F85149]":"text-[#D29922]";return z.jsxs("div",{className:`flex items-center gap-1.5 px-3 text-xs transition-colors cursor-default box-border ${u>0?"border-t border-[#30363D]":""} ${p}`,style:{height:As},onMouseEnter:f?()=>r(o):void 0,onMouseLeave:f?()=>r(null):void 0,children:[z.jsxs("span",{className:"w-3 text-center shrink-0 font-mono text-[#7D8590]",children:[d==="added"&&z.jsx("span",{className:"text-[#3FB950]",children:"+"}),d==="removed"&&z.jsx("span",{className:"text-[#F85149]",children:"−"}),!d&&$M(n.type)]}),z.jsx("span",{className:`flex-1 font-mono truncate ${v}`,children:n.name}),n.type&&z.jsxs("span",{className:`font-mono shrink-0 text-[10px] ${x}`,children:[n.type,n.limit?`(${n.limit})`:""]}),m&&z.jsx("span",{className:`shrink-0 ${E}`,title:"indexed",children:"⚡"}),f&&!d&&z.jsx("span",{className:"shrink-0 text-[#58A6FF]",title:"foreign key",children:"⇢"})]})}const Mv=J.memo(({data:n,id:a})=>{const{label:o,columns:u,indexes:r,warningCount:f,tableStatus:d,fkColumns:g,fkEdgeMap:m,isEdgeSelected:h,isSelected:p,isCollapsed:v}=n,x=d==="added",E=d==="removed",b=p||h?"#58A6FF":x?"#3FB950":E?"#F85149":"#30363D",_=p?2:1,T=p?"0 0 0 3px rgba(88, 166, 255, 0.2)":void 0,N=p?"#1a2332":"#0D1117",{toggleTableCollapsed:q}=gn(),w=B=>{B.stopPropagation(),a&&q(a)},A=new Set(g??[]),Y=_y+ro/2;return z.jsxs("div",{className:"relative cursor-pointer",style:{width:_v},children:[z.jsx(Si,{type:"target",position:gt.Left,id:"table-target",className:"!w-2 !h-2 !bg-[#30363D] !border-[#484F58]",style:{top:Y,position:"absolute"}}),z.jsx(Si,{type:"target",position:gt.Left,id:"table-target",className:"!w-2 !h-2 !bg-[#30363D] !border-[#484F58]",style:{top:Y,position:"absolute"}}),v?z.jsx(Si,{type:"source",position:gt.Right,id:"table-source",style:{top:Y,right:-5,position:"absolute",background:"#58A6FF",width:8,height:8,border:"none",borderRadius:"50%"}}):u.map((B,j)=>{if(!A.has(B.name))return null;const X=_y+ro+ZM+j*As+As/2;return z.jsx(Si,{type:"source",position:gt.Right,id:B.name,style:{top:X,right:-5,position:"absolute",background:"#58A6FF",width:8,height:8,border:"none",borderRadius:"50%"}},B.name)}),z.jsxs("div",{className:`bg-[#161B22] border rounded-lg overflow-hidden shadow-lg ${E?"opacity-60":""} ${p||h?"ring-2 ring-[#58A6FF]":""}`,style:{borderColor:b,borderWidth:_,boxShadow:T},children:[z.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b",style:{borderColor:b,height:ro,background:N},children:[z.jsx("span",{className:"font-mono text-sm font-semibold text-[#E6EDF3] truncate",children:o}),z.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-1",children:[z.jsx("button",{type:"button",onClick:w,className:"p-0.5 rounded hover:bg-[#30363D] text-[#7D8590] hover:text-[#E6EDF3] transition-colors","aria-label":v?"Expand table":"Collapse table",children:v?z.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:z.jsx("path",{d:"M6 9l6 6 6-6"})}):z.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:z.jsx("path",{d:"M18 15l-6-6-6 6"})})}),x&&z.jsx("span",{className:"bg-[#3FB950] text-[#0D1117] text-[9px] font-bold px-1.5 py-0.5 rounded",children:"NEW"}),E&&z.jsx("span",{className:"bg-[#F85149] text-white text-[9px] font-bold px-1.5 py-0.5 rounded",children:"REMOVED"}),f>0&&z.jsx("span",{className:"bg-[#F85149] text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full",children:f})]})]}),!v&&z.jsx("div",{children:u.map((B,j)=>z.jsx(FM,{column:B,indexes:r,fkEdgeId:A.has(B.name)?(m??{})[B.name]:void 0,columnIndex:j},B.name))})]})]})});Mv.displayName="TableNode";function JM({id:n,source:a,target:o,sourceX:u,sourceY:r,targetX:f,targetY:d,sourcePosition:g,targetPosition:m,data:h}){const{highlightedEdgeId:p,selectedTableId:v,selectedEdgeId:x}=gn(),E=h??{},b=p===n,_=x===n,T=v===a||v===o,N=_||T,q=(b||N)&&E.fkColumn,w=E.diffAdded?"#3FB950":E.diffRemoved?"#F85149":b||N?"#58A6FF":"#444C56",A=_?2.5:b||T?2:1.5,Y=E.pathOptions??{borderRadius:12,offset:20},[B,j,X]=Ns({sourceX:u,sourceY:r,targetX:f,targetY:d,sourcePosition:g,targetPosition:m,borderRadius:Y.borderRadius,offset:Y.offset}),$=N&&!E.diffAdded&&!E.diffRemoved?"edge-flow":"";return z.jsxs(z.Fragment,{children:[z.jsx(zo,{id:n,path:B,className:$,style:{stroke:w,strokeWidth:A,...E.diffRemoved?{strokeDasharray:"5 5"}:{}}}),q&&z.jsx(mM,{children:z.jsxs("div",{style:{transform:`translate(-50%, -50%) translate(${j}px,${X}px)`,position:"absolute"},className:"text-[10px] font-mono text-[#7D8590] bg-[#161B22] border border-[#30363D] px-1.5 py-0.5 rounded pointer-events-none",children:[String(E.fkColumn)," → ",o]})})]})}function IM(){return{addedTables:new Set,removedTables:new Set,addedColumns:new Map,removedColumns:new Map,addedIndexColumns:new Map,removedIndexColumns:new Map}}function WM(n){const a=new Map,o=new Map;for(const[u,r]of Object.entries(n.modified_tables))r.added_columns.length&&a.set(u,r.added_columns),r.removed_columns.length&&o.set(u,r.removed_columns);return{addedTables:new Set(n.added_tables),removedTables:new Set(n.removed_tables),addedColumns:a,removedColumns:o,addedIndexColumns:new Map,removedIndexColumns:new Map}}const PM={tableNode:Mv},tC={relationship:JM},eC=80,nC=80,iC=4;function aC(n,a){const o=[],u=new Map,r=new Set(Object.keys(n));for(const[d,g]of Object.entries(n))for(const m of g.columns){if(!m.name.endsWith("_id"))continue;const h=m.name.replace(/_id$/,""),p=r.has(`${h}s`)?`${h}s`:r.has(h)?h:null;if(!p)continue;const v=a.addedColumns.get(d)??[],x=a.removedColumns.get(d)??[],E=a.addedTables.has(d)||v.includes(m.name),b=x.includes(m.name),_=u.get(d)??[];_.push(m.name),u.set(d,_),o.push({id:`${d}-${m.name}-${p}`,source:d,target:p,sourceHandle:m.name,targetHandle:"table-target",type:"relationship",animated:E,data:{diffAdded:E,diffRemoved:b,fkColumn:m.name}})}return{rawEdges:Cv(o),fkColumnsMap:u}}function lC(n,a){return a===1?20:(n-(a-1)/2)*20+20}function Cv(n){const a=new Map;n.forEach(u=>{const r=[u.source,u.target].sort().join("__");a.has(r)||a.set(r,[]),a.get(r).push(u)});const o=[];return a.forEach(u=>{const r=u.length;u.forEach((f,d)=>{const g=lC(d,r);o.push({...f,type:"relationship",data:{...f.data??{},pathOptions:{borderRadius:12,offset:g}}})})}),o}function oC(n,a,o,u,r,f,d,g){const m=new Set;if(r){const b=g.find(_=>_.id===r);b&&(m.add(b.source),m.add(b.target))}const h=new Set(Object.keys(n)),p=[...Object.entries(n)];for(const b of o.removedTables)n[b]||p.push([b,null]);let v=0,x=0,E=0;return p.map(([b,_])=>{const T=o.addedTables.has(b),N=o.removedTables.has(b),q=o.addedColumns.get(b)??[],w=o.removedColumns.get(b)??[],A=o.addedIndexColumns.get(b)??[],Y=o.removedIndexColumns.get(b)??[],B=(_?.columns??[]).map(H=>({...H,diffStatus:T||q.includes(H.name)?"added":void 0})),j=w.filter(H=>!B.some(Q=>Q.name===H)).map(H=>({name:H,type:"",null:!0,default:null,diffStatus:"removed"})),X=[...B,...j],$=(_?.indexes??[]).map(H=>({...H,diffStatus:H.columns.some(Q=>A.includes(Q))?"added":H.columns.some(Q=>Y.includes(Q))?"removed":void 0})),ot=u.get(b)??[],k={};for(const H of ot){const Q=H.replace(/_id$/,""),tt=h.has(`${Q}s`)?`${Q}s`:h.has(Q)?Q:null;tt&&(k[H]=`${b}-${H}-${tt}`)}const I=a.filter(H=>H.table===b).length,lt=T?"added":N?"removed":void 0,O=d.has(b),G=O?ro:KM(X.length),M=v*(_v+eC),R=x;return E=Math.max(E,G),v++,v>=iC&&(v=0,x+=E+nC,E=0),{id:b,type:"tableNode",position:{x:M,y:R},style:{transition:"transform 250ms ease"},data:{label:b,columns:X,indexes:$,warningCount:I,tableStatus:lt,fkColumns:ot,fkEdgeMap:k,isEdgeSelected:m.has(b),isSelected:f===b,isCollapsed:O}}})}function uC({computedNodes:n,computedEdges:a,setNodes:o,setEdges:u}){const{fitView:r}=Ys(),f=gn(g=>g.selectedVersion),d=J.useRef(!1);return J.useEffect(()=>{d.current=!0},[f]),J.useEffect(()=>{if(d.current?o(n):o(m=>{const h=new Map(m.map(p=>[p.id,p.position]));return n.map(p=>({...p,position:h.get(p.id)??p.position}))}),u(a),!d.current||n.length===0)return;d.current=!1;const g=n.filter(m=>{const h=m.data;return h.tableStatus==="added"||h.tableStatus==="removed"||h.columns.some(p=>p.diffStatus)}).map(m=>({id:m.id}));requestAnimationFrame(()=>{r(g.length>0?{nodes:g,duration:500,padding:.2}:{duration:500,padding:.1})})},[n,a]),null}function sC({computedNodes:n,computedEdges:a}){const{setHighlightedEdgeId:o,setSelectedTableId:u,setSelectedEdgeId:r}=gn(),[f,d,g]=yM(n),[m,h,p]=pM(a),v=J.useCallback((T,N)=>{u(N.id),r(null)},[u,r]),x=J.useCallback(()=>{r(null),u(null)},[r,u]),E=J.useCallback((T,N)=>{r(N.id),u(null)},[r,u]),b=J.useCallback((T,N)=>o(N.id),[o]),_=J.useCallback(()=>o(null),[o]);return z.jsxs(hM,{nodes:f,edges:m,onNodesChange:g,onEdgesChange:p,nodeTypes:PM,edgeTypes:tC,onNodeClick:v,onPaneClick:x,onEdgeClick:E,onEdgeMouseEnter:b,onEdgeMouseLeave:_,defaultEdgeOptions:{type:"relationship"},fitView:!0,className:"bg-[#0D1117]",children:[z.jsx(uC,{computedNodes:n,computedEdges:a,setNodes:d,setEdges:h}),z.jsx(EM,{color:"#30363D",gap:24,size:1}),z.jsx(AM,{})]})}function rC(){return z.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-[#7D8590]",children:[z.jsx("p",{className:"text-4xl mb-4",children:"⬡"}),z.jsx("p",{className:"text-sm",children:"Select a migration from the timeline"})]})}function cC(){const{selectedVersion:n,selectedEdgeId:a,selectedTableId:o,collapsedTables:u}=gn(),{data:r}=Wa({queryKey:["migration",n],queryFn:()=>Pa.getMigrationDetail(n),enabled:!!n}),{data:f}=Wa({queryKey:["warnings"],queryFn:Pa.getWarnings}),d=J.useMemo(()=>r?.diff?WM(r.diff):IM(),[r?.diff]),{computedNodes:g,computedEdges:m}=J.useMemo(()=>{if(!r?.schema_after?.tables)return{computedNodes:[],computedEdges:[]};const{rawEdges:h,fkColumnsMap:p}=aC(r.schema_after.tables,d),v=u,x=h.map(T=>{const N=v.has(T.source);return{...T,sourceHandle:N?"table-source":T.sourceHandle}}),b=Cv(x).map(T=>({...T,animated:a===T.id}));return{computedNodes:oC(r.schema_after.tables,f??[],d,p,a,o,u,b),computedEdges:b}},[r,f,d,a,o,u]);return n?z.jsx(sC,{computedNodes:g,computedEdges:m}):z.jsx(rC,{})}const fC={error:{bg:"#2D1B1B",border:"#F85149",badge:"bg-[#F85149]",text:"text-[#F85149]"},warning:{bg:"#2D2414",border:"#D29922",badge:"bg-[#D29922]",text:"text-[#D29922]"},info:{bg:"#1A2435",border:"#58A6FF",badge:"bg-[#58A6FF]",text:"text-[#58A6FF]"}};function dC({warning:n}){const a=fC[n.severity];return z.jsxs("div",{className:"rounded p-3 mb-2 border text-xs",style:{backgroundColor:a.bg,borderColor:a.border},children:[z.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[z.jsx("span",{className:`${a.badge} text-white text-[10px] font-bold px-1.5 py-0.5 rounded`,children:n.severity.toUpperCase()}),z.jsx("span",{className:"font-mono text-[#7D8590]",children:n.rule})]}),z.jsx("p",{className:`${a.text} font-medium`,children:n.message}),n.column&&z.jsx("p",{className:"text-[#7D8590] mt-1",children:z.jsxs("span",{className:"font-mono",children:[n.table,".",n.column]})})]})}const hC=[{pattern:/#[^\n]*/,color:"#6A737D"},{pattern:/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,color:"#9ECBFF"},{pattern:/\b(?:def|class|module|end|do|if|elsif|else|unless|true|false|nil|return|self|require|include)\b/,color:"#F97583"},{pattern:/:[a-zA-Z_]\w*/,color:"#79B8FF"}];function Mf(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function gC(n){let a="",o=n;for(;o.length>0;){let u=null;for(const r of hC){const f=r.pattern.exec(o);f!==null&&(u===null||f.index<u.index)&&(u={index:f.index,match:f[0],color:r.color})}if(!u){a+=Mf(o);break}a+=Mf(o.slice(0,u.index)),a+=`<span style="color:${u.color}">${Mf(u.match)}</span>`,o=o.slice(u.index+u.match.length)}return a}function mC(n){return n.split(`
16
+ `).map(gC).join(`
17
+ `)}function yC({rawContent:n}){return z.jsx("pre",{className:"text-xs font-mono text-[#E6EDF3] p-4 overflow-auto h-full leading-5 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:mC(n)}})}function pC({warnings:n}){const a={error:n.filter(o=>o.severity==="error"),warning:n.filter(o=>o.severity==="warning"),info:n.filter(o=>o.severity==="info")};return n.length?z.jsx("div",{className:"p-4 space-y-4",children:["error","warning","info"].map(o=>a[o].length>0?z.jsxs("div",{children:[z.jsxs("p",{className:"text-xs font-mono text-[#7D8590] uppercase tracking-widest mb-2",children:[o," (",a[o].length,")"]}),a[o].map((u,r)=>z.jsx(dC,{warning:u},r))]},o):null)}):z.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-[#7D8590] text-sm",children:[z.jsx("span",{className:"text-2xl mb-2",children:"✓"}),"No warnings found"]})}function vC(){const[n,a]=J.useState("code"),{selectedVersion:o}=gn(),{data:u,isLoading:r}=Wa({queryKey:["migration",o],queryFn:()=>Pa.getMigrationDetail(o),enabled:!!o});return r?z.jsx("div",{className:"animate-pulse p-4 space-y-3",children:Array.from({length:6}).map((f,d)=>z.jsx("div",{className:"h-3 bg-[#30363D] rounded w-full"},d))}):u?z.jsxs("div",{className:"flex flex-col h-full",children:[z.jsxs("div",{className:"px-4 py-3 border-b border-[#30363D]",children:[z.jsx("p",{className:"text-sm font-semibold truncate",children:u.name}),z.jsx("p",{className:"text-xs font-mono text-[#7D8590]",children:u.version})]}),z.jsx("div",{className:"flex border-b border-[#30363D]",children:["code","warnings"].map(f=>z.jsxs("button",{onClick:()=>a(f),className:`flex-1 py-2 text-xs font-mono uppercase tracking-wider transition-colors ${n===f?"text-[#58A6FF] border-b-2 border-[#58A6FF]":"text-[#7D8590] hover:text-[#E6EDF3]"}`,children:[f,f==="warnings"&&u.warnings.length>0&&z.jsx("span",{className:"ml-1 bg-[#F85149] text-white text-[10px] px-1 rounded-full",children:u.warnings.length})]},f))}),z.jsx("div",{className:"flex-1 overflow-auto",children:n==="code"?z.jsx(yC,{rawContent:u.raw_content}):z.jsx(pC,{warnings:u.warnings})})]}):null}function xC(){const{compareFrom:n,compareTo:a,setCompareFrom:o,setCompareTo:u}=gn(),{data:r}=Wa({queryKey:["migrations"],queryFn:Pa.getMigrations}),{data:f,refetch:d,isFetching:g}=Wa({queryKey:["diff",n,a],queryFn:()=>Pa.getDiff(n,a),enabled:!1}),m=!!n&&!!a&&n!==a;return z.jsxs("div",{className:"flex items-center gap-3 px-4 h-full",children:[z.jsx("span",{className:"text-xs font-mono text-[#7D8590] shrink-0",children:"Compare"}),z.jsxs("select",{value:n??"",onChange:h=>o(h.target.value),className:"bg-[#161B22] border border-[#30363D] text-[#E6EDF3] text-xs font-mono rounded px-2 py-1 flex-1",children:[z.jsx("option",{value:"",children:"From..."}),r?.map(h=>z.jsxs("option",{value:h.version,children:[h.version," — ",h.name]},h.version))]}),z.jsx("span",{className:"text-[#7D8590] text-xs",children:"→"}),z.jsxs("select",{value:a??"",onChange:h=>u(h.target.value),className:"bg-[#161B22] border border-[#30363D] text-[#E6EDF3] text-xs font-mono rounded px-2 py-1 flex-1",children:[z.jsx("option",{value:"",children:"To..."}),r?.map(h=>z.jsxs("option",{value:h.version,children:[h.version," — ",h.name]},h.version))]}),z.jsx("button",{onClick:()=>d(),disabled:!m||g,className:"bg-[#58A6FF] text-[#0D1117] text-xs font-semibold px-3 py-1 rounded transition-opacity disabled:opacity-40 shrink-0",children:g?"Loading...":"Compare"}),f&&z.jsxs("span",{className:"text-xs text-[#7D8590] font-mono shrink-0",children:[f.changes.length," changes"]})]})}function My({initialWidth:n,minWidth:a,maxWidth:o,side:u,children:r,className:f=""}){const[d,g]=J.useState(n),m=J.useRef(!1),h=J.useRef(0),p=J.useRef(0),v=J.useCallback(E=>{m.current=!0,h.current=E.clientX,p.current=d;const b=T=>{if(!m.current)return;const N=u==="left"?T.clientX-h.current:h.current-T.clientX,q=Math.min(o,Math.max(a,p.current+N));g(q)},_=()=>{m.current=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",_),E.preventDefault()},[d,a,o,u]),x=u==="left"?"right-0":"left-0";return z.jsxs("div",{className:`relative shrink-0 ${f}`,style:{width:d},children:[r,z.jsx("div",{role:"separator","aria-orientation":"vertical",onMouseDown:v,className:`absolute top-0 ${x} w-1 h-full cursor-col-resize bg-[#30363D] hover:bg-[#58A6FF] transition-colors duration-150 z-10 select-none`})]})}const bC=new fb({defaultOptions:{queries:{staleTime:3e4,retry:1}}});function SC(){const{selectedVersion:n,isCompareMode:a}=gn();return z.jsxs("div",{className:"flex flex-col h-screen bg-[#0D1117] text-[#E6EDF3] overflow-hidden",children:[z.jsxs("header",{className:"flex items-center gap-3 px-5 h-12 border-b border-[#30363D] shrink-0",children:[z.jsx("span",{className:"text-[#58A6FF] font-mono font-semibold tracking-wider text-sm",children:"Migflow"}),z.jsx("span",{className:"text-[#7D8590] text-xs font-mono",children:"migration history & audit"})]}),z.jsxs("div",{className:"flex flex-1 min-h-0",children:[z.jsx(My,{initialWidth:280,minWidth:200,maxWidth:600,side:"left",className:"border-r border-[#30363D] overflow-hidden",children:z.jsx("div",{className:"h-full overflow-y-auto",children:z.jsx(jb,{})})}),z.jsx("main",{className:"flex-1 min-w-0 relative",children:z.jsx(cC,{})}),n&&z.jsx(My,{initialWidth:320,minWidth:200,maxWidth:600,side:"right",className:"border-l border-[#30363D] overflow-hidden",children:z.jsx("div",{className:"h-full flex flex-col",children:z.jsx(vC,{})})})]}),a&&z.jsx("footer",{className:"h-[60px] shrink-0 border-t border-[#30363D]",children:z.jsx(xC,{})})]})}function EC(){return z.jsx(hb,{client:bC,children:z.jsx(SC,{})})}const Nv=document.getElementById("schema-trail-root");if(!Nv)throw new Error("Root element #schema-trail-root not found");Vx.createRoot(Nv).render(z.jsx(J.StrictMode,{children:z.jsx(EC,{})}));