import{r as _a,g as y0,R as V,a as O}from"./markdown-mWYlERSe.js";var Yu={exports:{}},gt={},Xu={exports:{}},ju={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var fd;function v0(){return fd||(fd=1,(function(n){function o(D,N){var R=D.length;D.push(N);e:for(;0<R;){var W=R-1>>>1,X=D[W];if(0<a(X,N))D[W]=N,D[R]=X,R=W;else break e}}function i(D){return D.length===0?null:D[0]}function s(D){if(D.length===0)return null;var N=D[0],R=D.pop();if(R!==N){D[0]=R;e:for(var W=0,X=D.length,ie=X>>>1;W<ie;){var oe=2*(W+1)-1,fe=D[oe],pe=oe+1,ve=D[pe];if(0>a(fe,R))pe<X&&0>a(ve,fe)?(D[W]=ve,D[pe]=R,W=pe):(D[W]=fe,D[oe]=R,W=oe);else if(pe<X&&0>a(ve,R))D[W]=ve,D[pe]=R,W=pe;else break e}}return N}function a(D,N){var R=D.sortIndex-N.sortIndex;return R!==0?R:D.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var m=[],y=[],g=1,v=null,w=3,E=!1,P=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(D){for(var N=i(y);N!==null;){if(N.callback===null)s(y);else if(N.startTime<=D)s(y),N.sortIndex=N.expirationTime,o(m,N);else break;N=i(y)}}function T(D){if(_=!1,B(D),!P)if(i(m)!==null)P=!0,A(Y);else{var N=i(y);N!==null&&j(T,N.startTime-D)}}function Y(D,N){P=!1,_&&(_=!1,z(J),J=-1),E=!0;var R=w;try{for(B(N),v=i(m);v!==null&&(!(v.expirationTime>N)||D&&!ee());){var W=v.callback;if(typeof W=="function"){v.callback=null,w=v.priorityLevel;var X=W(v.expirationTime<=N);N=n.unstable_now(),typeof X=="function"?v.callback=X:v===i(m)&&s(m),B(N)}else s(m);v=i(m)}if(v!==null)var ie=!0;else{var oe=i(y);oe!==null&&j(T,oe.startTime-N),ie=!1}return ie}finally{v=null,w=R,E=!1}}var U=!1,K=null,J=-1,Q=5,te=-1;function ee(){return!(n.unstable_now()-te<Q)}function re(){if(K!==null){var D=n.unstable_now();te=D;var N=!0;try{N=K(!0,D)}finally{N?b():(U=!1,K=null)}}else U=!1}var b;if(typeof $=="function")b=function(){$(re)};else if(typeof MessageChannel<"u"){var x=new MessageChannel,H=x.port2;x.port1.onmessage=re,b=function(){H.postMessage(null)}}else b=function(){M(re,0)};function A(D){K=D,U||(U=!0,b())}function j(D,N){J=M(function(){D(n.unstable_now())},N)}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(D){D.callback=null},n.unstable_continueExecution=function(){P||E||(P=!0,A(Y))},n.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_getFirstCallbackNode=function(){return i(m)},n.unstable_next=function(D){switch(w){case 1:case 2:case 3:var N=3;break;default:N=w}var R=w;w=N;try{return D()}finally{w=R}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(D,N){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var R=w;w=D;try{return N()}finally{w=R}},n.unstable_scheduleCallback=function(D,N,R){var W=n.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?W+R:W):R=W,D){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=R+X,D={id:g++,callback:N,priorityLevel:D,startTime:R,expirationTime:X,sortIndex:-1},R>W?(D.sortIndex=R,o(y,D),i(m)===null&&D===i(y)&&(_?(z(J),J=-1):_=!0,j(T,R-W))):(D.sortIndex=X,o(m,D),P||E||(P=!0,A(Y))),D},n.unstable_shouldYield=ee,n.unstable_wrapCallback=function(D){var N=w;return function(){var R=w;w=N;try{return D.apply(this,arguments)}finally{w=R}}}})(ju)),ju}var dd;function w0(){return dd||(dd=1,Xu.exports=v0()),Xu.exports}/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hd;function x0(){if(hd)return gt;hd=1;var n=_a(),o=w0();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function d(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,y=/^[: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]*$/,g={},v={};function w(e){return m.call(v,e)?!0:m.call(g,e)?!1:y.test(e)?v[e]=!0:(g[e]=!0,!1)}function E(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P(e,t,r,l){if(t===null||typeof t>"u"||E(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,r,l,u,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=u,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){M[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){M[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){M[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var z=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(z,$);M[t]=new _(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(z,$);M[t]=new _(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(z,$);M[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),M.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){M[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,r,l){var u=M.hasOwnProperty(t)?M[t]:null;(u!==null?u.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(P(t,r,u,l)&&(r=null),l||u===null?w(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):u.mustUseProperty?e[u.propertyName]=r===null?u.type===3?!1:"":r:(t=u.attributeName,l=u.attributeNamespace,r===null?e.removeAttribute(t):(u=u.type,r=u===3||u===4&&r===!0?"":""+r,l?e.setAttributeNS(l,t,r):e.setAttribute(t,r))))}var T=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),U=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),te=Symbol.for("react.provider"),ee=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),D=Symbol.iterator;function N(e){return e===null||typeof e!="object"?null:(e=D&&e[D]||e["@@iterator"],typeof e=="function"?e:null)}var R=Object.assign,W;function X(e){if(W===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return`
`+W+e}var ie=!1;function oe(e,t){if(!e||ie)return"";ie=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(F){var l=F}Reflect.construct(e,[],t)}else{try{t.call()}catch(F){l=F}e.call(t.prototype)}else{try{throw Error()}catch(F){l=F}e()}}catch(F){if(F&&l&&typeof F.stack=="string"){for(var u=F.stack.split(`
`),c=l.stack.split(`
`),p=u.length-1,S=c.length-1;1<=p&&0<=S&&u[p]!==c[S];)S--;for(;1<=p&&0<=S;p--,S--)if(u[p]!==c[S]){if(p!==1||S!==1)do if(p--,S--,0>S||u[p]!==c[S]){var k=`
`+u[p].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=p&&0<=S);break}}}finally{ie=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?X(e):""}function fe(e){switch(e.tag){case 5:return X(e.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case K:return"Fragment";case U:return"Portal";case Q:return"Profiler";case J:return"StrictMode";case b:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ee:return(e.displayName||"Context")+".Consumer";case te:return(e._context.displayName||"Context")+".Provider";case re:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function ve(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===J?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Se(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ee(e){var t=Se(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(p){l=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $e(e){e._valueTracker||(e._valueTracker=Ee(e))}function Fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=Se(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Ue(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function We(e,t){var r=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ae(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=we(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nt(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function ke(e,t){nt(e,t);var r=we(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xe(e,t.type,r):t.hasOwnProperty("defaultValue")&&Xe(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function de(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Xe(e,t,r){(t!=="number"||Ue(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var st=Array.isArray;function Nt(e,t,r,l){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&l&&(e[r].defaultSelected=!0)}else{for(r=""+we(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Zt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function an(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(i(92));if(st(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:we(r)}}function Ct(e,t){var r=we(t.value),l=we(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),l!=null&&(e.defaultValue=""+l)}function cn(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $t(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ft,fn=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,l,u){MSApp.execUnsafeLocalFunction(function(){return e(t,r,l,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ft=Ft||document.createElement("div"),Ft.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ft.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ht(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var He={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vt=["Webkit","ms","Moz","O"];Object.keys(He).forEach(function(e){vt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),He[t]=He[e]})});function Jt(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||He.hasOwnProperty(e)&&He[e]?(""+t).trim():t+"px"}function bt(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,u=Jt(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,u):e[r]=u}}var dn=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(e,t){if(t){if(dn[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function ct(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hn=null;function er(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pn=null,en=null,mn=null;function tn(e){if(e=Po(e)){if(typeof pn!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Yi(t),pn(e.stateNode,e.type,t))}}function ci(e){en?mn?mn.push(e):mn=[e]:en=e}function fi(){if(en){var e=en,t=mn;if(mn=en=null,tn(e),t)for(e=0;e<t.length;e++)tn(t[e])}}function di(e,t){return e(t)}function hi(){}var lo=!1;function pi(e,t,r){if(lo)return e(t,r);lo=!0;try{return di(e,t,r)}finally{lo=!1,(en!==null||mn!==null)&&(hi(),fi())}}function tr(e,t){var r=e.stateNode;if(r===null)return null;var l=Yi(r);if(l===null)return null;r=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var so=!1;if(h)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){so=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{so=!1}function is(e,t,r,l,u,c,p,S,k){var F=Array.prototype.slice.call(arguments,3);try{t.apply(r,F)}catch(Z){this.onError(Z)}}var rr=!1,_r=null,kr=!1,uo=null,ls={onError:function(e){rr=!0,_r=e}};function ss(e,t,r,l,u,c,p,S,k){rr=!1,_r=null,is.apply(ls,arguments)}function mi(e,t,r,l,u,c,p,S,k){if(ss.apply(this,arguments),rr){if(rr){var F=_r;rr=!1,_r=null}else throw Error(i(198));kr||(kr=!0,uo=F)}}function gn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function gi(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yi(e){if(gn(e)!==e)throw Error(i(188))}function us(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,l=t;;){var u=r.return;if(u===null)break;var c=u.alternate;if(c===null){if(l=u.return,l!==null){r=l;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===r)return yi(u),e;if(c===l)return yi(u),t;c=c.sibling}throw Error(i(188))}if(r.return!==l.return)r=u,l=c;else{for(var p=!1,S=u.child;S;){if(S===r){p=!0,r=u,l=c;break}if(S===l){p=!0,l=u,r=c;break}S=S.sibling}if(!p){for(S=c.child;S;){if(S===r){p=!0,r=c,l=u;break}if(S===l){p=!0,l=c,r=u;break}S=S.sibling}if(!p)throw Error(i(189))}}if(r.alternate!==l)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function vi(e){return e=us(e),e!==null?wi(e):null}function wi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=wi(e);if(t!==null)return t;e=e.sibling}return null}var xi=o.unstable_scheduleCallback,Si=o.unstable_cancelCallback,Ei=o.unstable_shouldYield,as=o.unstable_requestPaint,Ie=o.unstable_now,cs=o.unstable_getCurrentPriorityLevel,ao=o.unstable_ImmediatePriority,_i=o.unstable_UserBlockingPriority,Nr=o.unstable_NormalPriority,ki=o.unstable_LowPriority,Ni=o.unstable_IdlePriority,Cr=null,zt=null;function co(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Cr,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:Lp,Ip=Math.log,Dp=Math.LN2;function Lp(e){return e>>>=0,e===0?32:31-(Ip(e)/Dp|0)|0}var Ci=64,zi=4194304;function fo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mi(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,u=e.suspendedLanes,c=e.pingedLanes,p=r&268435455;if(p!==0){var S=p&~u;S!==0?l=fo(S):(c&=p,c!==0&&(l=fo(c)))}else p=r&~u,p!==0?l=fo(p):c!==0&&(l=fo(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&u)===0&&(u=l&-l,c=t&-t,u>=c||u===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0<t;)r=31-Ot(t),u=1<<r,l|=e[r],t&=~u;return l}function $p(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fp(e,t){for(var r=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes;0<c;){var p=31-Ot(c),S=1<<p,k=u[p];k===-1?((S&r)===0||(S&l)!==0)&&(u[p]=$p(S,t)):k<=t&&(e.expiredLanes|=S),c&=~S}}function fs(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ba(){var e=Ci;return Ci<<=1,(Ci&4194240)===0&&(Ci=64),e}function ds(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ho(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=r}function Hp(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<r;){var u=31-Ot(r),c=1<<u;t[u]=0,l[u]=-1,e[u]=-1,r&=~c}}function hs(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var l=31-Ot(r),u=1<<l;u&t|e[l]&t&&(e[l]|=t),r&=~u}}var Ce=0;function Ua(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Wa,ps,Ya,Xa,ja,ms=!1,Ti=[],Pn=null,An=null,Rn=null,po=new Map,mo=new Map,In=[],Op="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 submit".split(" ");function Qa(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":mo.delete(t.pointerId)}}function go(e,t,r,l,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:l,nativeEvent:c,targetContainers:[u]},t!==null&&(t=Po(t),t!==null&&ps(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Vp(e,t,r,l,u){switch(t){case"focusin":return Pn=go(Pn,e,t,r,l,u),!0;case"dragenter":return An=go(An,e,t,r,l,u),!0;case"mouseover":return Rn=go(Rn,e,t,r,l,u),!0;case"pointerover":var c=u.pointerId;return po.set(c,go(po.get(c)||null,e,t,r,l,u)),!0;case"gotpointercapture":return c=u.pointerId,mo.set(c,go(mo.get(c)||null,e,t,r,l,u)),!0}return!1}function Ka(e){var t=or(e.target);if(t!==null){var r=gn(t);if(r!==null){if(t=r.tag,t===13){if(t=gi(r),t!==null){e.blockedOn=t,ja(e.priority,function(){Ya(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ys(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var l=new r.constructor(r.type,r);hn=l,r.target.dispatchEvent(l),hn=null}else return t=Po(r),t!==null&&ps(t),e.blockedOn=r,!1;t.shift()}return!0}function Ga(e,t,r){Pi(e)&&r.delete(t)}function Bp(){ms=!1,Pn!==null&&Pi(Pn)&&(Pn=null),An!==null&&Pi(An)&&(An=null),Rn!==null&&Pi(Rn)&&(Rn=null),po.forEach(Ga),mo.forEach(Ga)}function yo(e,t){e.blockedOn===t&&(e.blockedOn=null,ms||(ms=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Bp)))}function vo(e){function t(u){return yo(u,e)}if(0<Ti.length){yo(Ti[0],e);for(var r=1;r<Ti.length;r++){var l=Ti[r];l.blockedOn===e&&(l.blockedOn=null)}}for(Pn!==null&&yo(Pn,e),An!==null&&yo(An,e),Rn!==null&&yo(Rn,e),po.forEach(t),mo.forEach(t),r=0;r<In.length;r++)l=In[r],l.blockedOn===e&&(l.blockedOn=null);for(;0<In.length&&(r=In[0],r.blockedOn===null);)Ka(r),r.blockedOn===null&&In.shift()}var zr=T.ReactCurrentBatchConfig,Ai=!0;function Up(e,t,r,l){var u=Ce,c=zr.transition;zr.transition=null;try{Ce=1,gs(e,t,r,l)}finally{Ce=u,zr.transition=c}}function Wp(e,t,r,l){var u=Ce,c=zr.transition;zr.transition=null;try{Ce=4,gs(e,t,r,l)}finally{Ce=u,zr.transition=c}}function gs(e,t,r,l){if(Ai){var u=ys(e,t,r,l);if(u===null)Ds(e,t,l,Ri,r),Qa(e,l);else if(Vp(u,e,t,r,l))l.stopPropagation();else if(Qa(e,l),t&4&&-1<Op.indexOf(e)){for(;u!==null;){var c=Po(u);if(c!==null&&Wa(c),c=ys(e,t,r,l),c===null&&Ds(e,t,l,Ri,r),c===u)break;u=c}u!==null&&l.stopPropagation()}else Ds(e,t,l,null,r)}}var Ri=null;function ys(e,t,r,l){if(Ri=null,e=er(l),e=or(e),e!==null)if(t=gn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=gi(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ri=e,null}function Za(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cs()){case ao:return 1;case _i:return 4;case Nr:case ki:return 16;case Ni:return 536870912;default:return 16}default:return 16}}var Dn=null,vs=null,Ii=null;function qa(){if(Ii)return Ii;var e,t=vs,r=t.length,l,u="value"in Dn?Dn.value:Dn.textContent,c=u.length;for(e=0;e<r&&t[e]===u[e];e++);var p=r-e;for(l=1;l<=p&&t[r-l]===u[c-l];l++);return Ii=u.slice(e,1<l?1-l:void 0)}function Di(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Li(){return!0}function Ja(){return!1}function xt(e){function t(r,l,u,c,p){this._reactName=r,this._targetInst=u,this.type=l,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(r=e[S],this[S]=r?r(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Li:Ja,this.isPropagationStopped=Ja,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Li)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Li)},persist:function(){},isPersistent:Li}),t}var Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ws=xt(Mr),wo=R({},Mr,{view:0,detail:0}),Yp=xt(wo),xs,Ss,xo,$i=R({},wo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_s,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xo&&(xo&&e.type==="mousemove"?(xs=e.screenX-xo.screenX,Ss=e.screenY-xo.screenY):Ss=xs=0,xo=e),xs)},movementY:function(e){return"movementY"in e?e.movementY:Ss}}),ba=xt($i),Xp=R({},$i,{dataTransfer:0}),jp=xt(Xp),Qp=R({},wo,{relatedTarget:0}),Es=xt(Qp),Kp=R({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),Gp=xt(Kp),Zp=R({},Mr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qp=xt(Zp),Jp=R({},Mr,{data:0}),ec=xt(Jp),bp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},em={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"},tm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tm[e])?!!t[e]:!1}function _s(){return nm}var rm=R({},wo,{key:function(e){if(e.key){var t=bp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Di(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?em[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_s,charCode:function(e){return e.type==="keypress"?Di(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Di(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),om=xt(rm),im=R({},$i,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tc=xt(im),lm=R({},wo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_s}),sm=xt(lm),um=R({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),am=xt(um),cm=R({},$i,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fm=xt(cm),dm=[9,13,27,32],ks=h&&"CompositionEvent"in window,So=null;h&&"documentMode"in document&&(So=document.documentMode);var hm=h&&"TextEvent"in window&&!So,nc=h&&(!ks||So&&8<So&&11>=So),rc=" ",oc=!1;function ic(e,t){switch(e){case"keyup":return dm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tr=!1;function pm(e,t){switch(e){case"compositionend":return lc(t);case"keypress":return t.which!==32?null:(oc=!0,rc);case"textInput":return e=t.data,e===rc&&oc?null:e;default:return null}}function mm(e,t){if(Tr)return e==="compositionend"||!ks&&ic(e,t)?(e=qa(),Ii=vs=Dn=null,Tr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nc&&t.locale!=="ko"?null:t.data;default:return null}}var gm={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 sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gm[e.type]:t==="textarea"}function uc(e,t,r,l){ci(l),t=Bi(t,"onChange"),0<t.length&&(r=new ws("onChange","change",null,r,l),e.push({event:r,listeners:t}))}var Eo=null,_o=null;function ym(e){Cc(e,0)}function Fi(e){var t=Dr(e);if(Fe(t))return e}function vm(e,t){if(e==="change")return t}var ac=!1;if(h){var Ns;if(h){var Cs="oninput"in document;if(!Cs){var cc=document.createElement("div");cc.setAttribute("oninput","return;"),Cs=typeof cc.oninput=="function"}Ns=Cs}else Ns=!1;ac=Ns&&(!document.documentMode||9<document.documentMode)}function fc(){Eo&&(Eo.detachEvent("onpropertychange",dc),_o=Eo=null)}function dc(e){if(e.propertyName==="value"&&Fi(_o)){var t=[];uc(t,_o,e,er(e)),pi(ym,t)}}function wm(e,t,r){e==="focusin"?(fc(),Eo=t,_o=r,Eo.attachEvent("onpropertychange",dc)):e==="focusout"&&fc()}function xm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fi(_o)}function Sm(e,t){if(e==="click")return Fi(t)}function Em(e,t){if(e==="input"||e==="change")return Fi(t)}function _m(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:_m;function ko(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),l=Object.keys(t);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var u=r[l];if(!m.call(t,u)||!Vt(e[u],t[u]))return!1}return!0}function hc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pc(e,t){var r=hc(e);e=0;for(var l;r;){if(r.nodeType===3){if(l=e+r.textContent.length,e<=t&&l>=t)return{node:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hc(r)}}function mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gc(){for(var e=window,t=Ue();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ue(e.document)}return t}function zs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function km(e){var t=gc(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&mc(r.ownerDocument.documentElement,r)){if(l!==null&&zs(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=r.textContent.length,c=Math.min(l.start,u);l=l.end===void 0?c:Math.min(l.end,u),!e.extend&&c>l&&(u=l,l=c,c=u),u=pc(r,c);var p=pc(r,l);u&&p&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),c>l?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Nm=h&&"documentMode"in document&&11>=document.documentMode,Pr=null,Ms=null,No=null,Ts=!1;function yc(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ts||Pr==null||Pr!==Ue(l)||(l=Pr,"selectionStart"in l&&zs(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}),No&&ko(No,l)||(No=l,l=Bi(Ms,"onSelect"),0<l.length&&(t=new ws("onSelect","select",null,t,r),e.push({event:t,listeners:l}),t.target=Pr)))}function Hi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ar={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionend:Hi("Transition","TransitionEnd")},Ps={},vc={};h&&(vc=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function Oi(e){if(Ps[e])return Ps[e];if(!Ar[e])return e;var t=Ar[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vc)return Ps[e]=t[r];return e}var wc=Oi("animationend"),xc=Oi("animationiteration"),Sc=Oi("animationstart"),Ec=Oi("transitionend"),_c=new Map,kc="abort auxClick 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(" ");function Ln(e,t){_c.set(e,t),d(t,[e])}for(var As=0;As<kc.length;As++){var Rs=kc[As],Cm=Rs.toLowerCase(),zm=Rs[0].toUpperCase()+Rs.slice(1);Ln(Cm,"on"+zm)}Ln(wc,"onAnimationEnd"),Ln(xc,"onAnimationIteration"),Ln(Sc,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(Ec,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Co="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(" "),Mm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Co));function Nc(e,t,r){var l=e.type||"unknown-event";e.currentTarget=r,mi(l,t,void 0,e),e.currentTarget=null}function Cc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var l=e[r],u=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var p=l.length-1;0<=p;p--){var S=l[p],k=S.instance,F=S.currentTarget;if(S=S.listener,k!==c&&u.isPropagationStopped())break e;Nc(u,S,F),c=k}else for(p=0;p<l.length;p++){if(S=l[p],k=S.instance,F=S.currentTarget,S=S.listener,k!==c&&u.isPropagationStopped())break e;Nc(u,S,F),c=k}}}if(kr)throw e=uo,kr=!1,uo=null,e}function Te(e,t){var r=t[Vs];r===void 0&&(r=t[Vs]=new Set);var l=e+"__bubble";r.has(l)||(zc(t,e,2,!1),r.add(l))}function Is(e,t,r){var l=0;t&&(l|=4),zc(r,e,l,t)}var Vi="_reactListening"+Math.random().toString(36).slice(2);function zo(e){if(!e[Vi]){e[Vi]=!0,s.forEach(function(r){r!=="selectionchange"&&(Mm.has(r)||Is(r,!1,e),Is(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vi]||(t[Vi]=!0,Is("selectionchange",!1,t))}}function zc(e,t,r,l){switch(Za(t)){case 1:var u=Up;break;case 4:u=Wp;break;default:u=gs}r=u.bind(null,t,r,e),u=void 0,!so||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function Ds(e,t,r,l,u){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var S=l.stateNode.containerInfo;if(S===u||S.nodeType===8&&S.parentNode===u)break;if(p===4)for(p=l.return;p!==null;){var k=p.tag;if((k===3||k===4)&&(k=p.stateNode.containerInfo,k===u||k.nodeType===8&&k.parentNode===u))return;p=p.return}for(;S!==null;){if(p=or(S),p===null)return;if(k=p.tag,k===5||k===6){l=c=p;continue e}S=S.parentNode}}l=l.return}pi(function(){var F=c,Z=er(r),q=[];e:{var G=_c.get(e);if(G!==void 0){var le=ws,ue=e;switch(e){case"keypress":if(Di(r)===0)break e;case"keydown":case"keyup":le=om;break;case"focusin":ue="focus",le=Es;break;case"focusout":ue="blur",le=Es;break;case"beforeblur":case"afterblur":le=Es;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=ba;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=sm;break;case wc:case xc:case Sc:le=Gp;break;case Ec:le=am;break;case"scroll":le=Yp;break;case"wheel":le=fm;break;case"copy":case"cut":case"paste":le=qp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=tc}var ae=(t&4)!==0,Be=!ae&&e==="scroll",I=ae?G!==null?G+"Capture":null:G;ae=[];for(var C=F,L;C!==null;){L=C;var ne=L.stateNode;if(L.tag===5&&ne!==null&&(L=ne,I!==null&&(ne=tr(C,I),ne!=null&&ae.push(Mo(C,ne,L)))),Be)break;C=C.return}0<ae.length&&(G=new le(G,ue,null,r,Z),q.push({event:G,listeners:ae}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",G&&r!==hn&&(ue=r.relatedTarget||r.fromElement)&&(or(ue)||ue[yn]))break e;if((le||G)&&(G=Z.window===Z?Z:(G=Z.ownerDocument)?G.defaultView||G.parentWindow:window,le?(ue=r.relatedTarget||r.toElement,le=F,ue=ue?or(ue):null,ue!==null&&(Be=gn(ue),ue!==Be||ue.tag!==5&&ue.tag!==6)&&(ue=null)):(le=null,ue=F),le!==ue)){if(ae=ba,ne="onMouseLeave",I="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ae=tc,ne="onPointerLeave",I="onPointerEnter",C="pointer"),Be=le==null?G:Dr(le),L=ue==null?G:Dr(ue),G=new ae(ne,C+"leave",le,r,Z),G.target=Be,G.relatedTarget=L,ne=null,or(Z)===F&&(ae=new ae(I,C+"enter",ue,r,Z),ae.target=L,ae.relatedTarget=Be,ne=ae),Be=ne,le&&ue)t:{for(ae=le,I=ue,C=0,L=ae;L;L=Rr(L))C++;for(L=0,ne=I;ne;ne=Rr(ne))L++;for(;0<C-L;)ae=Rr(ae),C--;for(;0<L-C;)I=Rr(I),L--;for(;C--;){if(ae===I||I!==null&&ae===I.alternate)break t;ae=Rr(ae),I=Rr(I)}ae=null}else ae=null;le!==null&&Mc(q,G,le,ae,!1),ue!==null&&Be!==null&&Mc(q,Be,ue,ae,!0)}}e:{if(G=F?Dr(F):window,le=G.nodeName&&G.nodeName.toLowerCase(),le==="select"||le==="input"&&G.type==="file")var ce=vm;else if(sc(G))if(ac)ce=Em;else{ce=xm;var me=wm}else(le=G.nodeName)&&le.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(ce=Sm);if(ce&&(ce=ce(e,F))){uc(q,ce,r,Z);break e}me&&me(e,G,F),e==="focusout"&&(me=G._wrapperState)&&me.controlled&&G.type==="number"&&Xe(G,"number",G.value)}switch(me=F?Dr(F):window,e){case"focusin":(sc(me)||me.contentEditable==="true")&&(Pr=me,Ms=F,No=null);break;case"focusout":No=Ms=Pr=null;break;case"mousedown":Ts=!0;break;case"contextmenu":case"mouseup":case"dragend":Ts=!1,yc(q,r,Z);break;case"selectionchange":if(Nm)break;case"keydown":case"keyup":yc(q,r,Z)}var ge;if(ks)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else Tr?ic(e,r)&&(ye="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ye="onCompositionStart");ye&&(nc&&r.locale!=="ko"&&(Tr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&Tr&&(ge=qa()):(Dn=Z,vs="value"in Dn?Dn.value:Dn.textContent,Tr=!0)),me=Bi(F,ye),0<me.length&&(ye=new ec(ye,e,null,r,Z),q.push({event:ye,listeners:me}),ge?ye.data=ge:(ge=lc(r),ge!==null&&(ye.data=ge)))),(ge=hm?pm(e,r):mm(e,r))&&(F=Bi(F,"onBeforeInput"),0<F.length&&(Z=new ec("onBeforeInput","beforeinput",null,r,Z),q.push({event:Z,listeners:F}),Z.data=ge))}Cc(q,t)})}function Mo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Bi(e,t){for(var r=t+"Capture",l=[];e!==null;){var u=e,c=u.stateNode;u.tag===5&&c!==null&&(u=c,c=tr(e,r),c!=null&&l.unshift(Mo(e,c,u)),c=tr(e,t),c!=null&&l.push(Mo(e,c,u))),e=e.return}return l}function Rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mc(e,t,r,l,u){for(var c=t._reactName,p=[];r!==null&&r!==l;){var S=r,k=S.alternate,F=S.stateNode;if(k!==null&&k===l)break;S.tag===5&&F!==null&&(S=F,u?(k=tr(r,c),k!=null&&p.unshift(Mo(r,k,S))):u||(k=tr(r,c),k!=null&&p.push(Mo(r,k,S)))),r=r.return}p.length!==0&&e.push({event:t,listeners:p})}var Tm=/\r\n?/g,Pm=/\u0000|\uFFFD/g;function Tc(e){return(typeof e=="string"?e:""+e).replace(Tm,`
`).replace(Pm,"")}function Ui(e,t,r){if(t=Tc(t),Tc(e)!==t&&r)throw Error(i(425))}function Wi(){}var Ls=null,$s=null;function Fs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hs=typeof setTimeout=="function"?setTimeout:void 0,Am=typeof clearTimeout=="function"?clearTimeout:void 0,Pc=typeof Promise=="function"?Promise:void 0,Rm=typeof queueMicrotask=="function"?queueMicrotask:typeof Pc<"u"?function(e){return Pc.resolve(null).then(e).catch(Im)}:Hs;function Im(e){setTimeout(function(){throw e})}function Os(e,t){var r=t,l=0;do{var u=r.nextSibling;if(e.removeChild(r),u&&u.nodeType===8)if(r=u.data,r==="/$"){if(l===0){e.removeChild(u),vo(t);return}l--}else r!=="$"&&r!=="$?"&&r!=="$!"||l++;r=u}while(r);vo(t)}function $n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ac(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ir=Math.random().toString(36).slice(2),nn="__reactFiber$"+Ir,To="__reactProps$"+Ir,yn="__reactContainer$"+Ir,Vs="__reactEvents$"+Ir,Dm="__reactListeners$"+Ir,Lm="__reactHandles$"+Ir;function or(e){var t=e[nn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[yn]||r[nn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ac(e);e!==null;){if(r=e[nn])return r;e=Ac(e)}return t}e=r,r=e.parentNode}return null}function Po(e){return e=e[nn]||e[yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Dr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function Yi(e){return e[To]||null}var Bs=[],Lr=-1;function Fn(e){return{current:e}}function Pe(e){0>Lr||(e.current=Bs[Lr],Bs[Lr]=null,Lr--)}function ze(e,t){Lr++,Bs[Lr]=e.current,e.current=t}var Hn={},rt=Fn(Hn),ft=Fn(!1),ir=Hn;function $r(e,t){var r=e.type.contextTypes;if(!r)return Hn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var u={},c;for(c in r)u[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function dt(e){return e=e.childContextTypes,e!=null}function Xi(){Pe(ft),Pe(rt)}function Rc(e,t,r){if(rt.current!==Hn)throw Error(i(168));ze(rt,t),ze(ft,r)}function Ic(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var u in l)if(!(u in t))throw Error(i(108,ve(e)||"Unknown",u));return R({},r,l)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hn,ir=rt.current,ze(rt,e),ze(ft,ft.current),!0}function Dc(e,t,r){var l=e.stateNode;if(!l)throw Error(i(169));r?(e=Ic(e,t,ir),l.__reactInternalMemoizedMergedChildContext=e,Pe(ft),Pe(rt),ze(rt,e)):Pe(ft),ze(ft,r)}var vn=null,Qi=!1,Us=!1;function Lc(e){vn===null?vn=[e]:vn.push(e)}function $m(e){Qi=!0,Lc(e)}function On(){if(!Us&&vn!==null){Us=!0;var e=0,t=Ce;try{var r=vn;for(Ce=1;e<r.length;e++){var l=r[e];do l=l(!0);while(l!==null)}vn=null,Qi=!1}catch(u){throw vn!==null&&(vn=vn.slice(e+1)),xi(ao,On),u}finally{Ce=t,Us=!1}}return null}var Fr=[],Hr=0,Ki=null,Gi=0,Mt=[],Tt=0,lr=null,wn=1,xn="";function sr(e,t){Fr[Hr++]=Gi,Fr[Hr++]=Ki,Ki=e,Gi=t}function $c(e,t,r){Mt[Tt++]=wn,Mt[Tt++]=xn,Mt[Tt++]=lr,lr=e;var l=wn;e=xn;var u=32-Ot(l)-1;l&=~(1<<u),r+=1;var c=32-Ot(t)+u;if(30<c){var p=u-u%5;c=(l&(1<<p)-1).toString(32),l>>=p,u-=p,wn=1<<32-Ot(t)+u|r<<u|l,xn=c+e}else wn=1<<c|r<<u|l,xn=e}function Ws(e){e.return!==null&&(sr(e,1),$c(e,1,0))}function Ys(e){for(;e===Ki;)Ki=Fr[--Hr],Fr[Hr]=null,Gi=Fr[--Hr],Fr[Hr]=null;for(;e===lr;)lr=Mt[--Tt],Mt[Tt]=null,xn=Mt[--Tt],Mt[Tt]=null,wn=Mt[--Tt],Mt[Tt]=null}var St=null,Et=null,Re=!1,Bt=null;function Fc(e,t){var r=It(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Hc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,St=e,Et=$n(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,St=e,Et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=lr!==null?{id:wn,overflow:xn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=It(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,St=e,Et=null,!0):!1;default:return!1}}function Xs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function js(e){if(Re){var t=Et;if(t){var r=t;if(!Hc(e,t)){if(Xs(e))throw Error(i(418));t=$n(r.nextSibling);var l=St;t&&Hc(e,t)?Fc(l,r):(e.flags=e.flags&-4097|2,Re=!1,St=e)}}else{if(Xs(e))throw Error(i(418));e.flags=e.flags&-4097|2,Re=!1,St=e}}}function Oc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function Zi(e){if(e!==St)return!1;if(!Re)return Oc(e),Re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fs(e.type,e.memoizedProps)),t&&(t=Et)){if(Xs(e))throw Vc(),Error(i(418));for(;t;)Fc(e,t),t=$n(t.nextSibling)}if(Oc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Et=$n(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Et=null}}else Et=St?$n(e.stateNode.nextSibling):null;return!0}function Vc(){for(var e=Et;e;)e=$n(e.nextSibling)}function Or(){Et=St=null,Re=!1}function Qs(e){Bt===null?Bt=[e]:Bt.push(e)}var Fm=T.ReactCurrentBatchConfig;function Ao(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(i(309));var l=r.stateNode}if(!l)throw Error(i(147,e));var u=l,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(p){var S=u.refs;p===null?delete S[c]:S[c]=p},t._stringRef=c,t)}if(typeof e!="string")throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function qi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bc(e){var t=e._init;return t(e._payload)}function Uc(e){function t(I,C){if(e){var L=I.deletions;L===null?(I.deletions=[C],I.flags|=16):L.push(C)}}function r(I,C){if(!e)return null;for(;C!==null;)t(I,C),C=C.sibling;return null}function l(I,C){for(I=new Map;C!==null;)C.key!==null?I.set(C.key,C):I.set(C.index,C),C=C.sibling;return I}function u(I,C){return I=Qn(I,C),I.index=0,I.sibling=null,I}function c(I,C,L){return I.index=L,e?(L=I.alternate,L!==null?(L=L.index,L<C?(I.flags|=2,C):L):(I.flags|=2,C)):(I.flags|=1048576,C)}function p(I){return e&&I.alternate===null&&(I.flags|=2),I}function S(I,C,L,ne){return C===null||C.tag!==6?(C=Hu(L,I.mode,ne),C.return=I,C):(C=u(C,L),C.return=I,C)}function k(I,C,L,ne){var ce=L.type;return ce===K?Z(I,C,L.props.children,ne,L.key):C!==null&&(C.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===A&&Bc(ce)===C.type)?(ne=u(C,L.props),ne.ref=Ao(I,C,L),ne.return=I,ne):(ne=Sl(L.type,L.key,L.props,null,I.mode,ne),ne.ref=Ao(I,C,L),ne.return=I,ne)}function F(I,C,L,ne){return C===null||C.tag!==4||C.stateNode.containerInfo!==L.containerInfo||C.stateNode.implementation!==L.implementation?(C=Ou(L,I.mode,ne),C.return=I,C):(C=u(C,L.children||[]),C.return=I,C)}function Z(I,C,L,ne,ce){return C===null||C.tag!==7?(C=mr(L,I.mode,ne,ce),C.return=I,C):(C=u(C,L),C.return=I,C)}function q(I,C,L){if(typeof C=="string"&&C!==""||typeof C=="number")return C=Hu(""+C,I.mode,L),C.return=I,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Y:return L=Sl(C.type,C.key,C.props,null,I.mode,L),L.ref=Ao(I,null,C),L.return=I,L;case U:return C=Ou(C,I.mode,L),C.return=I,C;case A:var ne=C._init;return q(I,ne(C._payload),L)}if(st(C)||N(C))return C=mr(C,I.mode,L,null),C.return=I,C;qi(I,C)}return null}function G(I,C,L,ne){var ce=C!==null?C.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ce!==null?null:S(I,C,""+L,ne);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case Y:return L.key===ce?k(I,C,L,ne):null;case U:return L.key===ce?F(I,C,L,ne):null;case A:return ce=L._init,G(I,C,ce(L._payload),ne)}if(st(L)||N(L))return ce!==null?null:Z(I,C,L,ne,null);qi(I,L)}return null}function le(I,C,L,ne,ce){if(typeof ne=="string"&&ne!==""||typeof ne=="number")return I=I.get(L)||null,S(C,I,""+ne,ce);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case Y:return I=I.get(ne.key===null?L:ne.key)||null,k(C,I,ne,ce);case U:return I=I.get(ne.key===null?L:ne.key)||null,F(C,I,ne,ce);case A:var me=ne._init;return le(I,C,L,me(ne._payload),ce)}if(st(ne)||N(ne))return I=I.get(L)||null,Z(C,I,ne,ce,null);qi(C,ne)}return null}function ue(I,C,L,ne){for(var ce=null,me=null,ge=C,ye=C=0,qe=null;ge!==null&&ye<L.length;ye++){ge.index>ye?(qe=ge,ge=null):qe=ge.sibling;var Ne=G(I,ge,L[ye],ne);if(Ne===null){ge===null&&(ge=qe);break}e&&ge&&Ne.alternate===null&&t(I,ge),C=c(Ne,C,ye),me===null?ce=Ne:me.sibling=Ne,me=Ne,ge=qe}if(ye===L.length)return r(I,ge),Re&&sr(I,ye),ce;if(ge===null){for(;ye<L.length;ye++)ge=q(I,L[ye],ne),ge!==null&&(C=c(ge,C,ye),me===null?ce=ge:me.sibling=ge,me=ge);return Re&&sr(I,ye),ce}for(ge=l(I,ge);ye<L.length;ye++)qe=le(ge,I,ye,L[ye],ne),qe!==null&&(e&&qe.alternate!==null&&ge.delete(qe.key===null?ye:qe.key),C=c(qe,C,ye),me===null?ce=qe:me.sibling=qe,me=qe);return e&&ge.forEach(function(Kn){return t(I,Kn)}),Re&&sr(I,ye),ce}function ae(I,C,L,ne){var ce=N(L);if(typeof ce!="function")throw Error(i(150));if(L=ce.call(L),L==null)throw Error(i(151));for(var me=ce=null,ge=C,ye=C=0,qe=null,Ne=L.next();ge!==null&&!Ne.done;ye++,Ne=L.next()){ge.index>ye?(qe=ge,ge=null):qe=ge.sibling;var Kn=G(I,ge,Ne.value,ne);if(Kn===null){ge===null&&(ge=qe);break}e&&ge&&Kn.alternate===null&&t(I,ge),C=c(Kn,C,ye),me===null?ce=Kn:me.sibling=Kn,me=Kn,ge=qe}if(Ne.done)return r(I,ge),Re&&sr(I,ye),ce;if(ge===null){for(;!Ne.done;ye++,Ne=L.next())Ne=q(I,Ne.value,ne),Ne!==null&&(C=c(Ne,C,ye),me===null?ce=Ne:me.sibling=Ne,me=Ne);return Re&&sr(I,ye),ce}for(ge=l(I,ge);!Ne.done;ye++,Ne=L.next())Ne=le(ge,I,ye,Ne.value,ne),Ne!==null&&(e&&Ne.alternate!==null&&ge.delete(Ne.key===null?ye:Ne.key),C=c(Ne,C,ye),me===null?ce=Ne:me.sibling=Ne,me=Ne);return e&&ge.forEach(function(g0){return t(I,g0)}),Re&&sr(I,ye),ce}function Be(I,C,L,ne){if(typeof L=="object"&&L!==null&&L.type===K&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case Y:e:{for(var ce=L.key,me=C;me!==null;){if(me.key===ce){if(ce=L.type,ce===K){if(me.tag===7){r(I,me.sibling),C=u(me,L.props.children),C.return=I,I=C;break e}}else if(me.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===A&&Bc(ce)===me.type){r(I,me.sibling),C=u(me,L.props),C.ref=Ao(I,me,L),C.return=I,I=C;break e}r(I,me);break}else t(I,me);me=me.sibling}L.type===K?(C=mr(L.props.children,I.mode,ne,L.key),C.return=I,I=C):(ne=Sl(L.type,L.key,L.props,null,I.mode,ne),ne.ref=Ao(I,C,L),ne.return=I,I=ne)}return p(I);case U:e:{for(me=L.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===L.containerInfo&&C.stateNode.implementation===L.implementation){r(I,C.sibling),C=u(C,L.children||[]),C.return=I,I=C;break e}else{r(I,C);break}else t(I,C);C=C.sibling}C=Ou(L,I.mode,ne),C.return=I,I=C}return p(I);case A:return me=L._init,Be(I,C,me(L._payload),ne)}if(st(L))return ue(I,C,L,ne);if(N(L))return ae(I,C,L,ne);qi(I,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,C!==null&&C.tag===6?(r(I,C.sibling),C=u(C,L),C.return=I,I=C):(r(I,C),C=Hu(L,I.mode,ne),C.return=I,I=C),p(I)):r(I,C)}return Be}var Vr=Uc(!0),Wc=Uc(!1),Ji=Fn(null),bi=null,Br=null,Ks=null;function Gs(){Ks=Br=bi=null}function Zs(e){var t=Ji.current;Pe(Ji),e._currentValue=t}function qs(e,t,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===r)break;e=e.return}}function Ur(e,t){bi=e,Ks=Br=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ht=!0),e.firstContext=null)}function Pt(e){var t=e._currentValue;if(Ks!==e)if(e={context:e,memoizedValue:t,next:null},Br===null){if(bi===null)throw Error(i(308));Br=e,bi.dependencies={lanes:0,firstContext:e}}else Br=Br.next=e;return t}var ur=null;function Js(e){ur===null?ur=[e]:ur.push(e)}function Yc(e,t,r,l){var u=t.interleaved;return u===null?(r.next=r,Js(t)):(r.next=u.next,u.next=r),t.interleaved=r,Sn(e,l)}function Sn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Vn=!1;function bs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function En(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bn(e,t,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(_e&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,Sn(e,r)}return u=l.interleaved,u===null?(t.next=t,Js(l)):(t.next=u.next,u.next=t),l.interleaved=t,Sn(e,r)}function el(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,hs(e,r)}}function jc(e,t){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var u=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var p={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?u=c=p:c=c.next=p,r=r.next}while(r!==null);c===null?u=c=t:c=c.next=t}else u=c=t;r={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:l.shared,effects:l.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function tl(e,t,r,l){var u=e.updateQueue;Vn=!1;var c=u.firstBaseUpdate,p=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var k=S,F=k.next;k.next=null,p===null?c=F:p.next=F,p=k;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,S=Z.lastBaseUpdate,S!==p&&(S===null?Z.firstBaseUpdate=F:S.next=F,Z.lastBaseUpdate=k))}if(c!==null){var q=u.baseState;p=0,Z=F=k=null,S=c;do{var G=S.lane,le=S.eventTime;if((l&G)===G){Z!==null&&(Z=Z.next={eventTime:le,lane:0,tag:S.tag,payload:S.payload,callback:S.callback,next:null});e:{var ue=e,ae=S;switch(G=t,le=r,ae.tag){case 1:if(ue=ae.payload,typeof ue=="function"){q=ue.call(le,q,G);break e}q=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ae.payload,G=typeof ue=="function"?ue.call(le,q,G):ue,G==null)break e;q=R({},q,G);break e;case 2:Vn=!0}}S.callback!==null&&S.lane!==0&&(e.flags|=64,G=u.effects,G===null?u.effects=[S]:G.push(S))}else le={eventTime:le,lane:G,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Z===null?(F=Z=le,k=q):Z=Z.next=le,p|=G;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;G=S,S=G.next,G.next=null,u.lastBaseUpdate=G,u.shared.pending=null}}while(!0);if(Z===null&&(k=q),u.baseState=k,u.firstBaseUpdate=F,u.lastBaseUpdate=Z,t=u.shared.interleaved,t!==null){u=t;do p|=u.lane,u=u.next;while(u!==t)}else c===null&&(u.shared.lanes=0);fr|=p,e.lanes=p,e.memoizedState=q}}function Qc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var l=e[t],u=l.callback;if(u!==null){if(l.callback=null,l=r,typeof u!="function")throw Error(i(191,u));u.call(l)}}}var Ro={},rn=Fn(Ro),Io=Fn(Ro),Do=Fn(Ro);function ar(e){if(e===Ro)throw Error(i(174));return e}function eu(e,t){switch(ze(Do,t),ze(Io,e),ze(rn,Ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$t(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$t(t,e)}Pe(rn),ze(rn,t)}function Wr(){Pe(rn),Pe(Io),Pe(Do)}function Kc(e){ar(Do.current);var t=ar(rn.current),r=$t(t,e.type);t!==r&&(ze(Io,e),ze(rn,r))}function tu(e){Io.current===e&&(Pe(rn),Pe(Io))}var De=Fn(0);function nl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nu=[];function ru(){for(var e=0;e<nu.length;e++)nu[e]._workInProgressVersionPrimary=null;nu.length=0}var rl=T.ReactCurrentDispatcher,ou=T.ReactCurrentBatchConfig,cr=0,Le=null,je=null,Ge=null,ol=!1,Lo=!1,$o=0,Hm=0;function ot(){throw Error(i(321))}function iu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Vt(e[r],t[r]))return!1;return!0}function lu(e,t,r,l,u,c){if(cr=c,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rl.current=e===null||e.memoizedState===null?Um:Wm,e=r(l,u),Lo){c=0;do{if(Lo=!1,$o=0,25<=c)throw Error(i(301));c+=1,Ge=je=null,t.updateQueue=null,rl.current=Ym,e=r(l,u)}while(Lo)}if(rl.current=sl,t=je!==null&&je.next!==null,cr=0,Ge=je=Le=null,ol=!1,t)throw Error(i(300));return e}function su(){var e=$o!==0;return $o=0,e}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Le.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function At(){if(je===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Ge===null?Le.memoizedState:Ge.next;if(t!==null)Ge=t,je=e;else{if(e===null)throw Error(i(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Ge===null?Le.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Fo(e,t){return typeof t=="function"?t(e):t}function uu(e){var t=At(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=je,u=l.baseQueue,c=r.pending;if(c!==null){if(u!==null){var p=u.next;u.next=c.next,c.next=p}l.baseQueue=u=c,r.pending=null}if(u!==null){c=u.next,l=l.baseState;var S=p=null,k=null,F=c;do{var Z=F.lane;if((cr&Z)===Z)k!==null&&(k=k.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),l=F.hasEagerState?F.eagerState:e(l,F.action);else{var q={lane:Z,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};k===null?(S=k=q,p=l):k=k.next=q,Le.lanes|=Z,fr|=Z}F=F.next}while(F!==null&&F!==c);k===null?p=l:k.next=S,Vt(l,t.memoizedState)||(ht=!0),t.memoizedState=l,t.baseState=p,t.baseQueue=k,r.lastRenderedState=l}if(e=r.interleaved,e!==null){u=e;do c=u.lane,Le.lanes|=c,fr|=c,u=u.next;while(u!==e)}else u===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function au(e){var t=At(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=r.dispatch,u=r.pending,c=t.memoizedState;if(u!==null){r.pending=null;var p=u=u.next;do c=e(c,p.action),p=p.next;while(p!==u);Vt(c,t.memoizedState)||(ht=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,l]}function Gc(){}function Zc(e,t){var r=Le,l=At(),u=t(),c=!Vt(l.memoizedState,u);if(c&&(l.memoizedState=u,ht=!0),l=l.queue,cu(bc.bind(null,r,l,e),[e]),l.getSnapshot!==t||c||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,Ho(9,Jc.bind(null,r,l,u,t),void 0,null),Ze===null)throw Error(i(349));(cr&30)!==0||qc(r,t,u)}return u}function qc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jc(e,t,r,l){t.value=r,t.getSnapshot=l,ef(t)&&tf(e)}function bc(e,t,r){return r(function(){ef(t)&&tf(e)})}function ef(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Vt(e,r)}catch{return!0}}function tf(e){var t=Sn(e,1);t!==null&&Xt(t,e,1,-1)}function nf(e){var t=on();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t.queue=e,e=e.dispatch=Bm.bind(null,Le,e),[t.memoizedState,e]}function Ho(e,t,r,l){return e={tag:e,create:t,destroy:r,deps:l,next:null},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(l=r.next,r.next=e,e.next=l,t.lastEffect=e)),e}function rf(){return At().memoizedState}function il(e,t,r,l){var u=on();Le.flags|=e,u.memoizedState=Ho(1|t,r,void 0,l===void 0?null:l)}function ll(e,t,r,l){var u=At();l=l===void 0?null:l;var c=void 0;if(je!==null){var p=je.memoizedState;if(c=p.destroy,l!==null&&iu(l,p.deps)){u.memoizedState=Ho(t,r,c,l);return}}Le.flags|=e,u.memoizedState=Ho(1|t,r,c,l)}function of(e,t){return il(8390656,8,e,t)}function cu(e,t){return ll(2048,8,e,t)}function lf(e,t){return ll(4,2,e,t)}function sf(e,t){return ll(4,4,e,t)}function uf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function af(e,t,r){return r=r!=null?r.concat([e]):null,ll(4,4,uf.bind(null,t,e),r)}function fu(){}function cf(e,t){var r=At();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&iu(t,l[1])?l[0]:(r.memoizedState=[e,t],e)}function ff(e,t){var r=At();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&iu(t,l[1])?l[0]:(e=e(),r.memoizedState=[e,t],e)}function df(e,t,r){return(cr&21)===0?(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=r):(Vt(r,t)||(r=Ba(),Le.lanes|=r,fr|=r,e.baseState=!0),t)}function Om(e,t){var r=Ce;Ce=r!==0&&4>r?r:4,e(!0);var l=ou.transition;ou.transition={};try{e(!1),t()}finally{Ce=r,ou.transition=l}}function hf(){return At().memoizedState}function Vm(e,t,r){var l=Xn(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},pf(e))mf(t,r);else if(r=Yc(e,t,r,l),r!==null){var u=at();Xt(r,e,l,u),gf(r,t,l)}}function Bm(e,t,r){var l=Xn(e),u={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(pf(e))mf(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,S=c(p,r);if(u.hasEagerState=!0,u.eagerState=S,Vt(S,p)){var k=t.interleaved;k===null?(u.next=u,Js(t)):(u.next=k.next,k.next=u),t.interleaved=u;return}}catch{}finally{}r=Yc(e,t,u,l),r!==null&&(u=at(),Xt(r,e,l,u),gf(r,t,l))}}function pf(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function mf(e,t){Lo=ol=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function gf(e,t,r){if((r&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,hs(e,r)}}var sl={readContext:Pt,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},Um={readContext:Pt,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:of,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,il(4194308,4,uf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return il(4194308,4,e,t)},useInsertionEffect:function(e,t){return il(4,2,e,t)},useMemo:function(e,t){var r=on();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=on();return t=r!==void 0?r(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Vm.bind(null,Le,e),[l.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:nf,useDebugValue:fu,useDeferredValue:function(e){return on().memoizedState=e},useTransition:function(){var e=nf(!1),t=e[0];return e=Om.bind(null,e[1]),on().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=Le,u=on();if(Re){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),Ze===null)throw Error(i(349));(cr&30)!==0||qc(l,t,r)}u.memoizedState=r;var c={value:r,getSnapshot:t};return u.queue=c,of(bc.bind(null,l,c,e),[e]),l.flags|=2048,Ho(9,Jc.bind(null,l,c,r,t),void 0,null),r},useId:function(){var e=on(),t=Ze.identifierPrefix;if(Re){var r=xn,l=wn;r=(l&~(1<<32-Ot(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=$o++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Hm++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Wm={readContext:Pt,useCallback:cf,useContext:Pt,useEffect:cu,useImperativeHandle:af,useInsertionEffect:lf,useLayoutEffect:sf,useMemo:ff,useReducer:uu,useRef:rf,useState:function(){return uu(Fo)},useDebugValue:fu,useDeferredValue:function(e){var t=At();return df(t,je.memoizedState,e)},useTransition:function(){var e=uu(Fo)[0],t=At().memoizedState;return[e,t]},useMutableSource:Gc,useSyncExternalStore:Zc,useId:hf,unstable_isNewReconciler:!1},Ym={readContext:Pt,useCallback:cf,useContext:Pt,useEffect:cu,useImperativeHandle:af,useInsertionEffect:lf,useLayoutEffect:sf,useMemo:ff,useReducer:au,useRef:rf,useState:function(){return au(Fo)},useDebugValue:fu,useDeferredValue:function(e){var t=At();return je===null?t.memoizedState=e:df(t,je.memoizedState,e)},useTransition:function(){var e=au(Fo)[0],t=At().memoizedState;return[e,t]},useMutableSource:Gc,useSyncExternalStore:Zc,useId:hf,unstable_isNewReconciler:!1};function Ut(e,t){if(e&&e.defaultProps){t=R({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function du(e,t,r,l){t=e.memoizedState,r=r(l,t),r=r==null?t:R({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ul={isMounted:function(e){return(e=e._reactInternals)?gn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var l=at(),u=Xn(e),c=En(l,u);c.payload=t,r!=null&&(c.callback=r),t=Bn(e,c,u),t!==null&&(Xt(t,e,u,l),el(t,e,u))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var l=at(),u=Xn(e),c=En(l,u);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=Bn(e,c,u),t!==null&&(Xt(t,e,u,l),el(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=at(),l=Xn(e),u=En(r,l);u.tag=2,t!=null&&(u.callback=t),t=Bn(e,u,l),t!==null&&(Xt(t,e,l,r),el(t,e,l))}};function yf(e,t,r,l,u,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,p):t.prototype&&t.prototype.isPureReactComponent?!ko(r,l)||!ko(u,c):!0}function vf(e,t,r){var l=!1,u=Hn,c=t.contextType;return typeof c=="object"&&c!==null?c=Pt(c):(u=dt(t)?ir:rt.current,l=t.contextTypes,c=(l=l!=null)?$r(e,u):Hn),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ul,e.stateNode=t,t._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=c),t}function wf(e,t,r,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,l),t.state!==e&&ul.enqueueReplaceState(t,t.state,null)}function hu(e,t,r,l){var u=e.stateNode;u.props=r,u.state=e.memoizedState,u.refs={},bs(e);var c=t.contextType;typeof c=="object"&&c!==null?u.context=Pt(c):(c=dt(t)?ir:rt.current,u.context=$r(e,c)),u.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(du(e,t,c,r),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&ul.enqueueReplaceState(u,u.state,null),tl(e,r,u,l),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function Yr(e,t){try{var r="",l=t;do r+=fe(l),l=l.return;while(l);var u=r}catch(c){u=`
Error generating stack: `+c.message+`
`+c.stack}return{value:e,source:t,stack:u,digest:null}}function pu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Xm=typeof WeakMap=="function"?WeakMap:Map;function xf(e,t,r){r=En(-1,r),r.tag=3,r.payload={element:null};var l=t.value;return r.callback=function(){ml||(ml=!0,Pu=l),mu(e,t)},r}function Sf(e,t,r){r=En(-1,r),r.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var u=t.value;r.payload=function(){return l(u)},r.callback=function(){mu(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){mu(e,t),typeof l!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),r}function Ef(e,t,r){var l=e.pingCache;if(l===null){l=e.pingCache=new Xm;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(r)||(u.add(r),e=i0.bind(null,e,t,r),t.then(e,e))}function _f(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kf(e,t,r,l,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=En(-1,1),t.tag=2,Bn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var jm=T.ReactCurrentOwner,ht=!1;function ut(e,t,r,l){t.child=e===null?Wc(t,null,r,l):Vr(t,e.child,r,l)}function Nf(e,t,r,l,u){r=r.render;var c=t.ref;return Ur(t,u),l=lu(e,t,r,l,c,u),r=su(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,_n(e,t,u)):(Re&&r&&Ws(t),t.flags|=1,ut(e,t,l,u),t.child)}function Cf(e,t,r,l,u){if(e===null){var c=r.type;return typeof c=="function"&&!Fu(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,zf(e,t,c,l,u)):(e=Sl(r.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&u)===0){var p=c.memoizedProps;if(r=r.compare,r=r!==null?r:ko,r(p,l)&&e.ref===t.ref)return _n(e,t,u)}return t.flags|=1,e=Qn(c,l),e.ref=t.ref,e.return=t,t.child=e}function zf(e,t,r,l,u){if(e!==null){var c=e.memoizedProps;if(ko(c,l)&&e.ref===t.ref)if(ht=!1,t.pendingProps=l=c,(e.lanes&u)!==0)(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,_n(e,t,u)}return gu(e,t,r,l,u)}function Mf(e,t,r){var l=t.pendingProps,u=l.children,c=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(jr,_t),_t|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(jr,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=c!==null?c.baseLanes:r,ze(jr,_t),_t|=l}else c!==null?(l=c.baseLanes|r,t.memoizedState=null):l=r,ze(jr,_t),_t|=l;return ut(e,t,u,r),t.child}function Tf(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function gu(e,t,r,l,u){var c=dt(r)?ir:rt.current;return c=$r(t,c),Ur(t,u),r=lu(e,t,r,l,c,u),l=su(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,_n(e,t,u)):(Re&&l&&Ws(t),t.flags|=1,ut(e,t,r,u),t.child)}function Pf(e,t,r,l,u){if(dt(r)){var c=!0;ji(t)}else c=!1;if(Ur(t,u),t.stateNode===null)cl(e,t),vf(t,r,l),hu(t,r,l,u),l=!0;else if(e===null){var p=t.stateNode,S=t.memoizedProps;p.props=S;var k=p.context,F=r.contextType;typeof F=="object"&&F!==null?F=Pt(F):(F=dt(r)?ir:rt.current,F=$r(t,F));var Z=r.getDerivedStateFromProps,q=typeof Z=="function"||typeof p.getSnapshotBeforeUpdate=="function";q||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==l||k!==F)&&wf(t,p,l,F),Vn=!1;var G=t.memoizedState;p.state=G,tl(t,l,p,u),k=t.memoizedState,S!==l||G!==k||ft.current||Vn?(typeof Z=="function"&&(du(t,r,Z,l),k=t.memoizedState),(S=Vn||yf(t,r,S,l,G,k,F))?(q||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=k),p.props=l,p.state=k,p.context=F,l=S):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{p=t.stateNode,Xc(e,t),S=t.memoizedProps,F=t.type===t.elementType?S:Ut(t.type,S),p.props=F,q=t.pendingProps,G=p.context,k=r.contextType,typeof k=="object"&&k!==null?k=Pt(k):(k=dt(r)?ir:rt.current,k=$r(t,k));var le=r.getDerivedStateFromProps;(Z=typeof le=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==q||G!==k)&&wf(t,p,l,k),Vn=!1,G=t.memoizedState,p.state=G,tl(t,l,p,u);var ue=t.memoizedState;S!==q||G!==ue||ft.current||Vn?(typeof le=="function"&&(du(t,r,le,l),ue=t.memoizedState),(F=Vn||yf(t,r,F,l,G,ue,k)||!1)?(Z||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,ue,k),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,ue,k)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||S===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ue),p.props=l,p.state=ue,p.context=k,l=F):(typeof p.componentDidUpdate!="function"||S===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),l=!1)}return yu(e,t,r,l,c,u)}function yu(e,t,r,l,u,c){Tf(e,t);var p=(t.flags&128)!==0;if(!l&&!p)return u&&Dc(t,r,!1),_n(e,t,c);l=t.stateNode,jm.current=t;var S=p&&typeof r.getDerivedStateFromError!="function"?null:l.render();return t.flags|=1,e!==null&&p?(t.child=Vr(t,e.child,null,c),t.child=Vr(t,null,S,c)):ut(e,t,S,c),t.memoizedState=l.state,u&&Dc(t,r,!0),t.child}function Af(e){var t=e.stateNode;t.pendingContext?Rc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rc(e,t.context,!1),eu(e,t.containerInfo)}function Rf(e,t,r,l,u){return Or(),Qs(u),t.flags|=256,ut(e,t,r,l),t.child}var vu={dehydrated:null,treeContext:null,retryLane:0};function wu(e){return{baseLanes:e,cachePool:null,transitions:null}}function If(e,t,r){var l=t.pendingProps,u=De.current,c=!1,p=(t.flags&128)!==0,S;if((S=p)||(S=e!==null&&e.memoizedState===null?!1:(u&2)!==0),S?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),ze(De,u&1),e===null)return js(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=l.children,e=l.fallback,c?(l=t.mode,c=t.child,p={mode:"hidden",children:p},(l&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=p):c=El(p,l,0,null),e=mr(e,l,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=wu(r),t.memoizedState=vu,e):xu(t,p));if(u=e.memoizedState,u!==null&&(S=u.dehydrated,S!==null))return Qm(e,t,p,l,S,u,r);if(c){c=l.fallback,p=t.mode,u=e.child,S=u.sibling;var k={mode:"hidden",children:l.children};return(p&1)===0&&t.child!==u?(l=t.child,l.childLanes=0,l.pendingProps=k,t.deletions=null):(l=Qn(u,k),l.subtreeFlags=u.subtreeFlags&14680064),S!==null?c=Qn(S,c):(c=mr(c,p,r,null),c.flags|=2),c.return=t,l.return=t,l.sibling=c,t.child=l,l=c,c=t.child,p=e.child.memoizedState,p=p===null?wu(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=vu,l}return c=e.child,e=c.sibling,l=Qn(c,{mode:"visible",children:l.children}),(t.mode&1)===0&&(l.lanes=r),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l}function xu(e,t){return t=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function al(e,t,r,l){return l!==null&&Qs(l),Vr(t,e.child,null,r),e=xu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qm(e,t,r,l,u,c,p){if(r)return t.flags&256?(t.flags&=-257,l=pu(Error(i(422))),al(e,t,p,l)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=l.fallback,u=t.mode,l=El({mode:"visible",children:l.children},u,0,null),c=mr(c,u,p,null),c.flags|=2,l.return=t,c.return=t,l.sibling=c,t.child=l,(t.mode&1)!==0&&Vr(t,e.child,null,p),t.child.memoizedState=wu(p),t.memoizedState=vu,c);if((t.mode&1)===0)return al(e,t,p,null);if(u.data==="$!"){if(l=u.nextSibling&&u.nextSibling.dataset,l)var S=l.dgst;return l=S,c=Error(i(419)),l=pu(c,l,void 0),al(e,t,p,l)}if(S=(p&e.childLanes)!==0,ht||S){if(l=Ze,l!==null){switch(p&-p){case 4:u=2;break;case 16:u=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(l.suspendedLanes|p))!==0?0:u,u!==0&&u!==c.retryLane&&(c.retryLane=u,Sn(e,u),Xt(l,e,u,-1))}return $u(),l=pu(Error(i(421))),al(e,t,p,l)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=l0.bind(null,e),u._reactRetry=t,null):(e=c.treeContext,Et=$n(u.nextSibling),St=t,Re=!0,Bt=null,e!==null&&(Mt[Tt++]=wn,Mt[Tt++]=xn,Mt[Tt++]=lr,wn=e.id,xn=e.overflow,lr=t),t=xu(t,l.children),t.flags|=4096,t)}function Df(e,t,r){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qs(e.return,t,r)}function Su(e,t,r,l,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=r,c.tailMode=u)}function Lf(e,t,r){var l=t.pendingProps,u=l.revealOrder,c=l.tail;if(ut(e,t,l.children,r),l=De.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Df(e,r,t);else if(e.tag===19)Df(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(ze(De,l),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&nl(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),Su(t,!1,u,r,c);break;case"backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&nl(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}Su(t,!0,r,null,c);break;case"together":Su(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _n(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),fr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=Qn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Qn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Km(e,t,r){switch(t.tag){case 3:Af(t),Or();break;case 5:Kc(t);break;case 1:dt(t.type)&&ji(t);break;case 4:eu(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,u=t.memoizedProps.value;ze(Ji,l._currentValue),l._currentValue=u;break;case 13:if(l=t.memoizedState,l!==null)return l.dehydrated!==null?(ze(De,De.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?If(e,t,r):(ze(De,De.current&1),e=_n(e,t,r),e!==null?e.sibling:null);ze(De,De.current&1);break;case 19:if(l=(r&t.childLanes)!==0,(e.flags&128)!==0){if(l)return Lf(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ze(De,De.current),l)break;return null;case 22:case 23:return t.lanes=0,Mf(e,t,r)}return _n(e,t,r)}var $f,Eu,Ff,Hf;$f=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Eu=function(){},Ff=function(e,t,r,l){var u=e.memoizedProps;if(u!==l){e=t.stateNode,ar(rn.current);var c=null;switch(r){case"input":u=We(e,u),l=We(e,l),c=[];break;case"select":u=R({},u,{value:void 0}),l=R({},l,{value:void 0}),c=[];break;case"textarea":u=Zt(e,u),l=Zt(e,l),c=[];break;default:typeof u.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=Wi)}wt(r,l);var p;r=null;for(F in u)if(!l.hasOwnProperty(F)&&u.hasOwnProperty(F)&&u[F]!=null)if(F==="style"){var S=u[F];for(p in S)S.hasOwnProperty(p)&&(r||(r={}),r[p]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(a.hasOwnProperty(F)?c||(c=[]):(c=c||[]).push(F,null));for(F in l){var k=l[F];if(S=u!=null?u[F]:void 0,l.hasOwnProperty(F)&&k!==S&&(k!=null||S!=null))if(F==="style")if(S){for(p in S)!S.hasOwnProperty(p)||k&&k.hasOwnProperty(p)||(r||(r={}),r[p]="");for(p in k)k.hasOwnProperty(p)&&S[p]!==k[p]&&(r||(r={}),r[p]=k[p])}else r||(c||(c=[]),c.push(F,r)),r=k;else F==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,S=S?S.__html:void 0,k!=null&&S!==k&&(c=c||[]).push(F,k)):F==="children"?typeof k!="string"&&typeof k!="number"||(c=c||[]).push(F,""+k):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(a.hasOwnProperty(F)?(k!=null&&F==="onScroll"&&Te("scroll",e),c||S===k||(c=[])):(c=c||[]).push(F,k))}r&&(c=c||[]).push("style",r);var F=c;(t.updateQueue=F)&&(t.flags|=4)}},Hf=function(e,t,r,l){r!==l&&(t.flags|=4)};function Oo(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,l=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,l|=u.subtreeFlags&14680064,l|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=r,t}function Gm(e,t,r){var l=t.pendingProps;switch(Ys(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return dt(t.type)&&Xi(),it(t),null;case 3:return l=t.stateNode,Wr(),Pe(ft),Pe(rt),ru(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Zi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Bt!==null&&(Iu(Bt),Bt=null))),Eu(e,t),it(t),null;case 5:tu(t);var u=ar(Do.current);if(r=t.type,e!==null&&t.stateNode!=null)Ff(e,t,r,l,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(t.stateNode===null)throw Error(i(166));return it(t),null}if(e=ar(rn.current),Zi(t)){l=t.stateNode,r=t.type;var c=t.memoizedProps;switch(l[nn]=t,l[To]=c,e=(t.mode&1)!==0,r){case"dialog":Te("cancel",l),Te("close",l);break;case"iframe":case"object":case"embed":Te("load",l);break;case"video":case"audio":for(u=0;u<Co.length;u++)Te(Co[u],l);break;case"source":Te("error",l);break;case"img":case"image":case"link":Te("error",l),Te("load",l);break;case"details":Te("toggle",l);break;case"input":Ae(l,c),Te("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!c.multiple},Te("invalid",l);break;case"textarea":an(l,c),Te("invalid",l)}wt(r,c),u=null;for(var p in c)if(c.hasOwnProperty(p)){var S=c[p];p==="children"?typeof S=="string"?l.textContent!==S&&(c.suppressHydrationWarning!==!0&&Ui(l.textContent,S,e),u=["children",S]):typeof S=="number"&&l.textContent!==""+S&&(c.suppressHydrationWarning!==!0&&Ui(l.textContent,S,e),u=["children",""+S]):a.hasOwnProperty(p)&&S!=null&&p==="onScroll"&&Te("scroll",l)}switch(r){case"input":$e(l),de(l,c,!0);break;case"textarea":$e(l),cn(l);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(l.onclick=Wi)}l=u,t.updateQueue=l,l!==null&&(t.flags|=4)}else{p=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qt(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=p.createElement(r,{is:l.is}):(e=p.createElement(r),r==="select"&&(p=e,l.multiple?p.multiple=!0:l.size&&(p.size=l.size))):e=p.createElementNS(e,r),e[nn]=t,e[To]=l,$f(e,t,!1,!1),t.stateNode=e;e:{switch(p=ct(r,l),r){case"dialog":Te("cancel",e),Te("close",e),u=l;break;case"iframe":case"object":case"embed":Te("load",e),u=l;break;case"video":case"audio":for(u=0;u<Co.length;u++)Te(Co[u],e);u=l;break;case"source":Te("error",e),u=l;break;case"img":case"image":case"link":Te("error",e),Te("load",e),u=l;break;case"details":Te("toggle",e),u=l;break;case"input":Ae(e,l),u=We(e,l),Te("invalid",e);break;case"option":u=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},u=R({},l,{value:void 0}),Te("invalid",e);break;case"textarea":an(e,l),u=Zt(e,l),Te("invalid",e);break;default:u=l}wt(r,u),S=u;for(c in S)if(S.hasOwnProperty(c)){var k=S[c];c==="style"?bt(e,k):c==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&fn(e,k)):c==="children"?typeof k=="string"?(r!=="textarea"||k!=="")&&Ht(e,k):typeof k=="number"&&Ht(e,""+k):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(a.hasOwnProperty(c)?k!=null&&c==="onScroll"&&Te("scroll",e):k!=null&&B(e,c,k,p))}switch(r){case"input":$e(e),de(e,l,!1);break;case"textarea":$e(e),cn(e);break;case"option":l.value!=null&&e.setAttribute("value",""+we(l.value));break;case"select":e.multiple=!!l.multiple,c=l.value,c!=null?Nt(e,!!l.multiple,c,!1):l.defaultValue!=null&&Nt(e,!!l.multiple,l.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Wi)}switch(r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return it(t),null;case 6:if(e&&t.stateNode!=null)Hf(e,t,e.memoizedProps,l);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(r=ar(Do.current),ar(rn.current),Zi(t)){if(l=t.stateNode,r=t.memoizedProps,l[nn]=t,(c=l.nodeValue!==r)&&(e=St,e!==null))switch(e.tag){case 3:Ui(l.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ui(l.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else l=(r.nodeType===9?r:r.ownerDocument).createTextNode(l),l[nn]=t,t.stateNode=l}return it(t),null;case 13:if(Pe(De),l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&Et!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Vc(),Or(),t.flags|=98560,c=!1;else if(c=Zi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[nn]=t}else Or(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),c=!1}else Bt!==null&&(Iu(Bt),Bt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(De.current&1)!==0?Qe===0&&(Qe=3):$u())),t.updateQueue!==null&&(t.flags|=4),it(t),null);case 4:return Wr(),Eu(e,t),e===null&&zo(t.stateNode.containerInfo),it(t),null;case 10:return Zs(t.type._context),it(t),null;case 17:return dt(t.type)&&Xi(),it(t),null;case 19:if(Pe(De),c=t.memoizedState,c===null)return it(t),null;if(l=(t.flags&128)!==0,p=c.rendering,p===null)if(l)Oo(c,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=nl(e),p!==null){for(t.flags|=128,Oo(c,!1),l=p.updateQueue,l!==null&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=r,r=t.child;r!==null;)c=r,e=l,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,e=p.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ze(De,De.current&1|2),t.child}e=e.sibling}c.tail!==null&&Ie()>Qr&&(t.flags|=128,l=!0,Oo(c,!1),t.lanes=4194304)}else{if(!l)if(e=nl(p),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Oo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!Re)return it(t),null}else 2*Ie()-c.renderingStartTime>Qr&&r!==1073741824&&(t.flags|=128,l=!0,Oo(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(r=c.last,r!==null?r.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ie(),t.sibling=null,r=De.current,ze(De,l?r&1|2:r&1),t):(it(t),null);case 22:case 23:return Lu(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(_t&1073741824)!==0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Zm(e,t){switch(Ys(t),t.tag){case 1:return dt(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wr(),Pe(ft),Pe(rt),ru(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return tu(t),null;case 13:if(Pe(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(De),null;case 4:return Wr(),null;case 10:return Zs(t.type._context),null;case 22:case 23:return Lu(),null;case 24:return null;default:return null}}var fl=!1,lt=!1,qm=typeof WeakSet=="function"?WeakSet:Set,se=null;function Xr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){Oe(e,t,l)}else r.current=null}function _u(e,t,r){try{r()}catch(l){Oe(e,t,l)}}var Of=!1;function Jm(e,t){if(Ls=Ai,e=gc(),zs(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,S=-1,k=-1,F=0,Z=0,q=e,G=null;t:for(;;){for(var le;q!==r||u!==0&&q.nodeType!==3||(S=p+u),q!==c||l!==0&&q.nodeType!==3||(k=p+l),q.nodeType===3&&(p+=q.nodeValue.length),(le=q.firstChild)!==null;)G=q,q=le;for(;;){if(q===e)break t;if(G===r&&++F===u&&(S=p),G===c&&++Z===l&&(k=p),(le=q.nextSibling)!==null)break;q=G,G=q.parentNode}q=le}r=S===-1||k===-1?null:{start:S,end:k}}else r=null}r=r||{start:0,end:0}}else r=null;for($s={focusedElem:e,selectionRange:r},Ai=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var ue=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ue!==null){var ae=ue.memoizedProps,Be=ue.memoizedState,I=t.stateNode,C=I.getSnapshotBeforeUpdate(t.elementType===t.type?ae:Ut(t.type,ae),Be);I.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ne){Oe(t,t.return,ne)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return ue=Of,Of=!1,ue}function Vo(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var u=l=l.next;do{if((u.tag&e)===e){var c=u.destroy;u.destroy=void 0,c!==void 0&&_u(t,r,c)}u=u.next}while(u!==l)}}function dl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function ku(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Vf(e){var t=e.alternate;t!==null&&(e.alternate=null,Vf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[To],delete t[Vs],delete t[Dm],delete t[Lm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bf(e){return e.tag===5||e.tag===3||e.tag===4}function Uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nu(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Wi));else if(l!==4&&(e=e.child,e!==null))for(Nu(e,t,r),e=e.sibling;e!==null;)Nu(e,t,r),e=e.sibling}function Cu(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Cu(e,t,r),e=e.sibling;e!==null;)Cu(e,t,r),e=e.sibling}var be=null,Wt=!1;function Un(e,t,r){for(r=r.child;r!==null;)Wf(e,t,r),r=r.sibling}function Wf(e,t,r){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Cr,r)}catch{}switch(r.tag){case 5:lt||Xr(r,t);case 6:var l=be,u=Wt;be=null,Un(e,t,r),be=l,Wt=u,be!==null&&(Wt?(e=be,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):be.removeChild(r.stateNode));break;case 18:be!==null&&(Wt?(e=be,r=r.stateNode,e.nodeType===8?Os(e.parentNode,r):e.nodeType===1&&Os(e,r),vo(e)):Os(be,r.stateNode));break;case 4:l=be,u=Wt,be=r.stateNode.containerInfo,Wt=!0,Un(e,t,r),be=l,Wt=u;break;case 0:case 11:case 14:case 15:if(!lt&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){u=l=l.next;do{var c=u,p=c.destroy;c=c.tag,p!==void 0&&((c&2)!==0||(c&4)!==0)&&_u(r,t,p),u=u.next}while(u!==l)}Un(e,t,r);break;case 1:if(!lt&&(Xr(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(S){Oe(r,t,S)}Un(e,t,r);break;case 21:Un(e,t,r);break;case 22:r.mode&1?(lt=(l=lt)||r.memoizedState!==null,Un(e,t,r),lt=l):Un(e,t,r);break;default:Un(e,t,r)}}function Yf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new qm),t.forEach(function(l){var u=s0.bind(null,e,l);r.has(l)||(r.add(l),l.then(u,u))})}}function Yt(e,t){var r=t.deletions;if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];try{var c=e,p=t,S=p;e:for(;S!==null;){switch(S.tag){case 5:be=S.stateNode,Wt=!1;break e;case 3:be=S.stateNode.containerInfo,Wt=!0;break e;case 4:be=S.stateNode.containerInfo,Wt=!0;break e}S=S.return}if(be===null)throw Error(i(160));Wf(c,p,u),be=null,Wt=!1;var k=u.alternate;k!==null&&(k.return=null),u.return=null}catch(F){Oe(u,t,F)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}function Xf(e,t){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yt(t,e),ln(e),l&4){try{Vo(3,e,e.return),dl(3,e)}catch(ae){Oe(e,e.return,ae)}try{Vo(5,e,e.return)}catch(ae){Oe(e,e.return,ae)}}break;case 1:Yt(t,e),ln(e),l&512&&r!==null&&Xr(r,r.return);break;case 5:if(Yt(t,e),ln(e),l&512&&r!==null&&Xr(r,r.return),e.flags&32){var u=e.stateNode;try{Ht(u,"")}catch(ae){Oe(e,e.return,ae)}}if(l&4&&(u=e.stateNode,u!=null)){var c=e.memoizedProps,p=r!==null?r.memoizedProps:c,S=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{S==="input"&&c.type==="radio"&&c.name!=null&&nt(u,c),ct(S,p);var F=ct(S,c);for(p=0;p<k.length;p+=2){var Z=k[p],q=k[p+1];Z==="style"?bt(u,q):Z==="dangerouslySetInnerHTML"?fn(u,q):Z==="children"?Ht(u,q):B(u,Z,q,F)}switch(S){case"input":ke(u,c);break;case"textarea":Ct(u,c);break;case"select":var G=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!c.multiple;var le=c.value;le!=null?Nt(u,!!c.multiple,le,!1):G!==!!c.multiple&&(c.defaultValue!=null?Nt(u,!!c.multiple,c.defaultValue,!0):Nt(u,!!c.multiple,c.multiple?[]:"",!1))}u[To]=c}catch(ae){Oe(e,e.return,ae)}}break;case 6:if(Yt(t,e),ln(e),l&4){if(e.stateNode===null)throw Error(i(162));u=e.stateNode,c=e.memoizedProps;try{u.nodeValue=c}catch(ae){Oe(e,e.return,ae)}}break;case 3:if(Yt(t,e),ln(e),l&4&&r!==null&&r.memoizedState.isDehydrated)try{vo(t.containerInfo)}catch(ae){Oe(e,e.return,ae)}break;case 4:Yt(t,e),ln(e);break;case 13:Yt(t,e),ln(e),u=e.child,u.flags&8192&&(c=u.memoizedState!==null,u.stateNode.isHidden=c,!c||u.alternate!==null&&u.alternate.memoizedState!==null||(Tu=Ie())),l&4&&Yf(e);break;case 22:if(Z=r!==null&&r.memoizedState!==null,e.mode&1?(lt=(F=lt)||Z,Yt(t,e),lt=F):Yt(t,e),ln(e),l&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!Z&&(e.mode&1)!==0)for(se=e,Z=e.child;Z!==null;){for(q=se=Z;se!==null;){switch(G=se,le=G.child,G.tag){case 0:case 11:case 14:case 15:Vo(4,G,G.return);break;case 1:Xr(G,G.return);var ue=G.stateNode;if(typeof ue.componentWillUnmount=="function"){l=G,r=G.return;try{t=l,ue.props=t.memoizedProps,ue.state=t.memoizedState,ue.componentWillUnmount()}catch(ae){Oe(l,r,ae)}}break;case 5:Xr(G,G.return);break;case 22:if(G.memoizedState!==null){Kf(q);continue}}le!==null?(le.return=G,se=le):Kf(q)}Z=Z.sibling}e:for(Z=null,q=e;;){if(q.tag===5){if(Z===null){Z=q;try{u=q.stateNode,F?(c=u.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(S=q.stateNode,k=q.memoizedProps.style,p=k!=null&&k.hasOwnProperty("display")?k.display:null,S.style.display=Jt("display",p))}catch(ae){Oe(e,e.return,ae)}}}else if(q.tag===6){if(Z===null)try{q.stateNode.nodeValue=F?"":q.memoizedProps}catch(ae){Oe(e,e.return,ae)}}else if((q.tag!==22&&q.tag!==23||q.memoizedState===null||q===e)&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===e)break e;for(;q.sibling===null;){if(q.return===null||q.return===e)break e;Z===q&&(Z=null),q=q.return}Z===q&&(Z=null),q.sibling.return=q.return,q=q.sibling}}break;case 19:Yt(t,e),ln(e),l&4&&Yf(e);break;case 21:break;default:Yt(t,e),ln(e)}}function ln(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Bf(r)){var l=r;break e}r=r.return}throw Error(i(160))}switch(l.tag){case 5:var u=l.stateNode;l.flags&32&&(Ht(u,""),l.flags&=-33);var c=Uf(e);Cu(e,c,u);break;case 3:case 4:var p=l.stateNode.containerInfo,S=Uf(e);Nu(e,S,p);break;default:throw Error(i(161))}}catch(k){Oe(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bm(e,t,r){se=e,jf(e)}function jf(e,t,r){for(var l=(e.mode&1)!==0;se!==null;){var u=se,c=u.child;if(u.tag===22&&l){var p=u.memoizedState!==null||fl;if(!p){var S=u.alternate,k=S!==null&&S.memoizedState!==null||lt;S=fl;var F=lt;if(fl=p,(lt=k)&&!F)for(se=u;se!==null;)p=se,k=p.child,p.tag===22&&p.memoizedState!==null?Gf(u):k!==null?(k.return=p,se=k):Gf(u);for(;c!==null;)se=c,jf(c),c=c.sibling;se=u,fl=S,lt=F}Qf(e)}else(u.subtreeFlags&8772)!==0&&c!==null?(c.return=u,se=c):Qf(e)}}function Qf(e){for(;se!==null;){var t=se;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:lt||dl(5,t);break;case 1:var l=t.stateNode;if(t.flags&4&&!lt)if(r===null)l.componentDidMount();else{var u=t.elementType===t.type?r.memoizedProps:Ut(t.type,r.memoizedProps);l.componentDidUpdate(u,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&Qc(t,c,l);break;case 3:var p=t.updateQueue;if(p!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Qc(t,p,r)}break;case 5:var S=t.stateNode;if(r===null&&t.flags&4){r=S;var k=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&r.focus();break;case"img":k.src&&(r.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var F=t.alternate;if(F!==null){var Z=F.memoizedState;if(Z!==null){var q=Z.dehydrated;q!==null&&vo(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}lt||t.flags&512&&ku(t)}catch(G){Oe(t,t.return,G)}}if(t===e){se=null;break}if(r=t.sibling,r!==null){r.return=t.return,se=r;break}se=t.return}}function Kf(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var r=t.sibling;if(r!==null){r.return=t.return,se=r;break}se=t.return}}function Gf(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{dl(4,t)}catch(k){Oe(t,r,k)}break;case 1:var l=t.stateNode;if(typeof l.componentDidMount=="function"){var u=t.return;try{l.componentDidMount()}catch(k){Oe(t,u,k)}}var c=t.return;try{ku(t)}catch(k){Oe(t,c,k)}break;case 5:var p=t.return;try{ku(t)}catch(k){Oe(t,p,k)}}}catch(k){Oe(t,t.return,k)}if(t===e){se=null;break}var S=t.sibling;if(S!==null){S.return=t.return,se=S;break}se=t.return}}var e0=Math.ceil,hl=T.ReactCurrentDispatcher,zu=T.ReactCurrentOwner,Rt=T.ReactCurrentBatchConfig,_e=0,Ze=null,Ye=null,et=0,_t=0,jr=Fn(0),Qe=0,Bo=null,fr=0,pl=0,Mu=0,Uo=null,pt=null,Tu=0,Qr=1/0,kn=null,ml=!1,Pu=null,Wn=null,gl=!1,Yn=null,yl=0,Wo=0,Au=null,vl=-1,wl=0;function at(){return(_e&6)!==0?Ie():vl!==-1?vl:vl=Ie()}function Xn(e){return(e.mode&1)===0?1:(_e&2)!==0&&et!==0?et&-et:Fm.transition!==null?(wl===0&&(wl=Ba()),wl):(e=Ce,e!==0||(e=window.event,e=e===void 0?16:Za(e.type)),e)}function Xt(e,t,r,l){if(50<Wo)throw Wo=0,Au=null,Error(i(185));ho(e,r,l),((_e&2)===0||e!==Ze)&&(e===Ze&&((_e&2)===0&&(pl|=r),Qe===4&&jn(e,et)),mt(e,l),r===1&&_e===0&&(t.mode&1)===0&&(Qr=Ie()+500,Qi&&On()))}function mt(e,t){var r=e.callbackNode;Fp(e,t);var l=Mi(e,e===Ze?et:0);if(l===0)r!==null&&Si(r),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(r!=null&&Si(r),t===1)e.tag===0?$m(qf.bind(null,e)):Lc(qf.bind(null,e)),Rm(function(){(_e&6)===0&&On()}),r=null;else{switch(Ua(l)){case 1:r=ao;break;case 4:r=_i;break;case 16:r=Nr;break;case 536870912:r=Ni;break;default:r=Nr}r=id(r,Zf.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Zf(e,t){if(vl=-1,wl=0,(_e&6)!==0)throw Error(i(327));var r=e.callbackNode;if(Kr()&&e.callbackNode!==r)return null;var l=Mi(e,e===Ze?et:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||t)t=xl(e,l);else{t=l;var u=_e;_e|=2;var c=bf();(Ze!==e||et!==t)&&(kn=null,Qr=Ie()+500,hr(e,t));do try{r0();break}catch(S){Jf(e,S)}while(!0);Gs(),hl.current=c,_e=u,Ye!==null?t=0:(Ze=null,et=0,t=Qe)}if(t!==0){if(t===2&&(u=fs(e),u!==0&&(l=u,t=Ru(e,u))),t===1)throw r=Bo,hr(e,0),jn(e,l),mt(e,Ie()),r;if(t===6)jn(e,l);else{if(u=e.current.alternate,(l&30)===0&&!t0(u)&&(t=xl(e,l),t===2&&(c=fs(e),c!==0&&(l=c,t=Ru(e,c))),t===1))throw r=Bo,hr(e,0),jn(e,l),mt(e,Ie()),r;switch(e.finishedWork=u,e.finishedLanes=l,t){case 0:case 1:throw Error(i(345));case 2:pr(e,pt,kn);break;case 3:if(jn(e,l),(l&130023424)===l&&(t=Tu+500-Ie(),10<t)){if(Mi(e,0)!==0)break;if(u=e.suspendedLanes,(u&l)!==l){at(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Hs(pr.bind(null,e,pt,kn),t);break}pr(e,pt,kn);break;case 4:if(jn(e,l),(l&4194240)===l)break;for(t=e.eventTimes,u=-1;0<l;){var p=31-Ot(l);c=1<<p,p=t[p],p>u&&(u=p),l&=~c}if(l=u,l=Ie()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*e0(l/1960))-l,10<l){e.timeoutHandle=Hs(pr.bind(null,e,pt,kn),l);break}pr(e,pt,kn);break;case 5:pr(e,pt,kn);break;default:throw Error(i(329))}}}return mt(e,Ie()),e.callbackNode===r?Zf.bind(null,e):null}function Ru(e,t){var r=Uo;return e.current.memoizedState.isDehydrated&&(hr(e,t).flags|=256),e=xl(e,t),e!==2&&(t=pt,pt=r,t!==null&&Iu(t)),e}function Iu(e){pt===null?pt=e:pt.push.apply(pt,e)}function t0(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var l=0;l<r.length;l++){var u=r[l],c=u.getSnapshot;u=u.value;try{if(!Vt(c(),u))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jn(e,t){for(t&=~Mu,t&=~pl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ot(t),l=1<<r;e[r]=-1,t&=~l}}function qf(e){if((_e&6)!==0)throw Error(i(327));Kr();var t=Mi(e,0);if((t&1)===0)return mt(e,Ie()),null;var r=xl(e,t);if(e.tag!==0&&r===2){var l=fs(e);l!==0&&(t=l,r=Ru(e,l))}if(r===1)throw r=Bo,hr(e,0),jn(e,t),mt(e,Ie()),r;if(r===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,pr(e,pt,kn),mt(e,Ie()),null}function Du(e,t){var r=_e;_e|=1;try{return e(t)}finally{_e=r,_e===0&&(Qr=Ie()+500,Qi&&On())}}function dr(e){Yn!==null&&Yn.tag===0&&(_e&6)===0&&Kr();var t=_e;_e|=1;var r=Rt.transition,l=Ce;try{if(Rt.transition=null,Ce=1,e)return e()}finally{Ce=l,Rt.transition=r,_e=t,(_e&6)===0&&On()}}function Lu(){_t=jr.current,Pe(jr)}function hr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Am(r)),Ye!==null)for(r=Ye.return;r!==null;){var l=r;switch(Ys(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Xi();break;case 3:Wr(),Pe(ft),Pe(rt),ru();break;case 5:tu(l);break;case 4:Wr();break;case 13:Pe(De);break;case 19:Pe(De);break;case 10:Zs(l.type._context);break;case 22:case 23:Lu()}r=r.return}if(Ze=e,Ye=e=Qn(e.current,null),et=_t=t,Qe=0,Bo=null,Mu=pl=fr=0,pt=Uo=null,ur!==null){for(t=0;t<ur.length;t++)if(r=ur[t],l=r.interleaved,l!==null){r.interleaved=null;var u=l.next,c=r.pending;if(c!==null){var p=c.next;c.next=u,l.next=p}r.pending=l}ur=null}return e}function Jf(e,t){do{var r=Ye;try{if(Gs(),rl.current=sl,ol){for(var l=Le.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}ol=!1}if(cr=0,Ge=je=Le=null,Lo=!1,$o=0,zu.current=null,r===null||r.return===null){Qe=1,Bo=t,Ye=null;break}e:{var c=e,p=r.return,S=r,k=t;if(t=et,S.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var F=k,Z=S,q=Z.tag;if((Z.mode&1)===0&&(q===0||q===11||q===15)){var G=Z.alternate;G?(Z.updateQueue=G.updateQueue,Z.memoizedState=G.memoizedState,Z.lanes=G.lanes):(Z.updateQueue=null,Z.memoizedState=null)}var le=_f(p);if(le!==null){le.flags&=-257,kf(le,p,S,c,t),le.mode&1&&Ef(c,F,t),t=le,k=F;var ue=t.updateQueue;if(ue===null){var ae=new Set;ae.add(k),t.updateQueue=ae}else ue.add(k);break e}else{if((t&1)===0){Ef(c,F,t),$u();break e}k=Error(i(426))}}else if(Re&&S.mode&1){var Be=_f(p);if(Be!==null){(Be.flags&65536)===0&&(Be.flags|=256),kf(Be,p,S,c,t),Qs(Yr(k,S));break e}}c=k=Yr(k,S),Qe!==4&&(Qe=2),Uo===null?Uo=[c]:Uo.push(c),c=p;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var I=xf(c,k,t);jc(c,I);break e;case 1:S=k;var C=c.type,L=c.stateNode;if((c.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Wn===null||!Wn.has(L)))){c.flags|=65536,t&=-t,c.lanes|=t;var ne=Sf(c,S,t);jc(c,ne);break e}}c=c.return}while(c!==null)}td(r)}catch(ce){t=ce,Ye===r&&r!==null&&(Ye=r=r.return);continue}break}while(!0)}function bf(){var e=hl.current;return hl.current=sl,e===null?sl:e}function $u(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ze===null||(fr&268435455)===0&&(pl&268435455)===0||jn(Ze,et)}function xl(e,t){var r=_e;_e|=2;var l=bf();(Ze!==e||et!==t)&&(kn=null,hr(e,t));do try{n0();break}catch(u){Jf(e,u)}while(!0);if(Gs(),_e=r,hl.current=l,Ye!==null)throw Error(i(261));return Ze=null,et=0,Qe}function n0(){for(;Ye!==null;)ed(Ye)}function r0(){for(;Ye!==null&&!Ei();)ed(Ye)}function ed(e){var t=od(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?td(e):Ye=t,zu.current=null}function td(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Gm(r,t,_t),r!==null){Ye=r;return}}else{if(r=Zm(r,t),r!==null){r.flags&=32767,Ye=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Ye=null;return}}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Qe===0&&(Qe=5)}function pr(e,t,r){var l=Ce,u=Rt.transition;try{Rt.transition=null,Ce=1,o0(e,t,r,l)}finally{Rt.transition=u,Ce=l}return null}function o0(e,t,r,l){do Kr();while(Yn!==null);if((_e&6)!==0)throw Error(i(327));r=e.finishedWork;var u=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Hp(e,c),e===Ze&&(Ye=Ze=null,et=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||gl||(gl=!0,id(Nr,function(){return Kr(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=Rt.transition,Rt.transition=null;var p=Ce;Ce=1;var S=_e;_e|=4,zu.current=null,Jm(e,r),Xf(r,e),km($s),Ai=!!Ls,$s=Ls=null,e.current=r,bm(r),as(),_e=S,Ce=p,Rt.transition=c}else e.current=r;if(gl&&(gl=!1,Yn=e,yl=u),c=e.pendingLanes,c===0&&(Wn=null),co(r.stateNode),mt(e,Ie()),t!==null)for(l=e.onRecoverableError,r=0;r<t.length;r++)u=t[r],l(u.value,{componentStack:u.stack,digest:u.digest});if(ml)throw ml=!1,e=Pu,Pu=null,e;return(yl&1)!==0&&e.tag!==0&&Kr(),c=e.pendingLanes,(c&1)!==0?e===Au?Wo++:(Wo=0,Au=e):Wo=0,On(),null}function Kr(){if(Yn!==null){var e=Ua(yl),t=Rt.transition,r=Ce;try{if(Rt.transition=null,Ce=16>e?16:e,Yn===null)var l=!1;else{if(e=Yn,Yn=null,yl=0,(_e&6)!==0)throw Error(i(331));var u=_e;for(_e|=4,se=e.current;se!==null;){var c=se,p=c.child;if((se.flags&16)!==0){var S=c.deletions;if(S!==null){for(var k=0;k<S.length;k++){var F=S[k];for(se=F;se!==null;){var Z=se;switch(Z.tag){case 0:case 11:case 15:Vo(8,Z,c)}var q=Z.child;if(q!==null)q.return=Z,se=q;else for(;se!==null;){Z=se;var G=Z.sibling,le=Z.return;if(Vf(Z),Z===F){se=null;break}if(G!==null){G.return=le,se=G;break}se=le}}}var ue=c.alternate;if(ue!==null){var ae=ue.child;if(ae!==null){ue.child=null;do{var Be=ae.sibling;ae.sibling=null,ae=Be}while(ae!==null)}}se=c}}if((c.subtreeFlags&2064)!==0&&p!==null)p.return=c,se=p;else e:for(;se!==null;){if(c=se,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:Vo(9,c,c.return)}var I=c.sibling;if(I!==null){I.return=c.return,se=I;break e}se=c.return}}var C=e.current;for(se=C;se!==null;){p=se;var L=p.child;if((p.subtreeFlags&2064)!==0&&L!==null)L.return=p,se=L;else e:for(p=C;se!==null;){if(S=se,(S.flags&2048)!==0)try{switch(S.tag){case 0:case 11:case 15:dl(9,S)}}catch(ce){Oe(S,S.return,ce)}if(S===p){se=null;break e}var ne=S.sibling;if(ne!==null){ne.return=S.return,se=ne;break e}se=S.return}}if(_e=u,On(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Cr,e)}catch{}l=!0}return l}finally{Ce=r,Rt.transition=t}}return!1}function nd(e,t,r){t=Yr(r,t),t=xf(e,t,1),e=Bn(e,t,1),t=at(),e!==null&&(ho(e,1,t),mt(e,t))}function Oe(e,t,r){if(e.tag===3)nd(e,e,r);else for(;t!==null;){if(t.tag===3){nd(t,e,r);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Wn===null||!Wn.has(l))){e=Yr(r,e),e=Sf(t,e,1),t=Bn(t,e,1),e=at(),t!==null&&(ho(t,1,e),mt(t,e));break}}t=t.return}}function i0(e,t,r){var l=e.pingCache;l!==null&&l.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&r,Ze===e&&(et&r)===r&&(Qe===4||Qe===3&&(et&130023424)===et&&500>Ie()-Tu?hr(e,0):Mu|=r),mt(e,t)}function rd(e,t){t===0&&((e.mode&1)===0?t=1:(t=zi,zi<<=1,(zi&130023424)===0&&(zi=4194304)));var r=at();e=Sn(e,t),e!==null&&(ho(e,t,r),mt(e,r))}function l0(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),rd(e,r)}function s0(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(r=u.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(t),rd(e,r)}var od;od=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ht=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return ht=!1,Km(e,t,r);ht=(e.flags&131072)!==0}else ht=!1,Re&&(t.flags&1048576)!==0&&$c(t,Gi,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;cl(e,t),e=t.pendingProps;var u=$r(t,rt.current);Ur(t,r),u=lu(null,t,l,e,u,r);var c=su();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dt(l)?(c=!0,ji(t)):c=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,bs(t),u.updater=ul,t.stateNode=u,u._reactInternals=t,hu(t,l,e,r),t=yu(null,t,l,!0,c,r)):(t.tag=0,Re&&c&&Ws(t),ut(null,t,u,r),t=t.child),t;case 16:l=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,u=l._init,l=u(l._payload),t.type=l,u=t.tag=a0(l),e=Ut(l,e),u){case 0:t=gu(null,t,l,e,r);break e;case 1:t=Pf(null,t,l,e,r);break e;case 11:t=Nf(null,t,l,e,r);break e;case 14:t=Cf(null,t,l,Ut(l.type,e),r);break e}throw Error(i(306,l,""))}return t;case 0:return l=t.type,u=t.pendingProps,u=t.elementType===l?u:Ut(l,u),gu(e,t,l,u,r);case 1:return l=t.type,u=t.pendingProps,u=t.elementType===l?u:Ut(l,u),Pf(e,t,l,u,r);case 3:e:{if(Af(t),e===null)throw Error(i(387));l=t.pendingProps,c=t.memoizedState,u=c.element,Xc(e,t),tl(t,l,null,r);var p=t.memoizedState;if(l=p.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){u=Yr(Error(i(423)),t),t=Rf(e,t,l,r,u);break e}else if(l!==u){u=Yr(Error(i(424)),t),t=Rf(e,t,l,r,u);break e}else for(Et=$n(t.stateNode.containerInfo.firstChild),St=t,Re=!0,Bt=null,r=Wc(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Or(),l===u){t=_n(e,t,r);break e}ut(e,t,l,r)}t=t.child}return t;case 5:return Kc(t),e===null&&js(t),l=t.type,u=t.pendingProps,c=e!==null?e.memoizedProps:null,p=u.children,Fs(l,u)?p=null:c!==null&&Fs(l,c)&&(t.flags|=32),Tf(e,t),ut(e,t,p,r),t.child;case 6:return e===null&&js(t),null;case 13:return If(e,t,r);case 4:return eu(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Vr(t,null,l,r):ut(e,t,l,r),t.child;case 11:return l=t.type,u=t.pendingProps,u=t.elementType===l?u:Ut(l,u),Nf(e,t,l,u,r);case 7:return ut(e,t,t.pendingProps,r),t.child;case 8:return ut(e,t,t.pendingProps.children,r),t.child;case 12:return ut(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,u=t.pendingProps,c=t.memoizedProps,p=u.value,ze(Ji,l._currentValue),l._currentValue=p,c!==null)if(Vt(c.value,p)){if(c.children===u.children&&!ft.current){t=_n(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var S=c.dependencies;if(S!==null){p=c.child;for(var k=S.firstContext;k!==null;){if(k.context===l){if(c.tag===1){k=En(-1,r&-r),k.tag=2;var F=c.updateQueue;if(F!==null){F=F.shared;var Z=F.pending;Z===null?k.next=k:(k.next=Z.next,Z.next=k),F.pending=k}}c.lanes|=r,k=c.alternate,k!==null&&(k.lanes|=r),qs(c.return,r,t),S.lanes|=r;break}k=k.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(i(341));p.lanes|=r,S=p.alternate,S!==null&&(S.lanes|=r),qs(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}ut(e,t,u.children,r),t=t.child}return t;case 9:return u=t.type,l=t.pendingProps.children,Ur(t,r),u=Pt(u),l=l(u),t.flags|=1,ut(e,t,l,r),t.child;case 14:return l=t.type,u=Ut(l,t.pendingProps),u=Ut(l.type,u),Cf(e,t,l,u,r);case 15:return zf(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,u=t.pendingProps,u=t.elementType===l?u:Ut(l,u),cl(e,t),t.tag=1,dt(l)?(e=!0,ji(t)):e=!1,Ur(t,r),vf(t,l,u),hu(t,l,u,r),yu(null,t,l,!0,e,r);case 19:return Lf(e,t,r);case 22:return Mf(e,t,r)}throw Error(i(156,t.tag))};function id(e,t){return xi(e,t)}function u0(e,t,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 It(e,t,r,l){return new u0(e,t,r,l)}function Fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a0(e){if(typeof e=="function")return Fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===re)return 11;if(e===H)return 14}return 2}function Qn(e,t){var r=e.alternate;return r===null?(r=It(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Sl(e,t,r,l,u,c){var p=2;if(l=e,typeof e=="function")Fu(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case K:return mr(r.children,u,c,t);case J:p=8,u|=8;break;case Q:return e=It(12,r,t,u|2),e.elementType=Q,e.lanes=c,e;case b:return e=It(13,r,t,u),e.elementType=b,e.lanes=c,e;case x:return e=It(19,r,t,u),e.elementType=x,e.lanes=c,e;case j:return El(r,u,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:p=10;break e;case ee:p=9;break e;case re:p=11;break e;case H:p=14;break e;case A:p=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=It(p,r,t,u),t.elementType=e,t.type=l,t.lanes=c,t}function mr(e,t,r,l){return e=It(7,e,l,t),e.lanes=r,e}function El(e,t,r,l){return e=It(22,e,l,t),e.elementType=j,e.lanes=r,e.stateNode={isHidden:!1},e}function Hu(e,t,r){return e=It(6,e,null,t),e.lanes=r,e}function Ou(e,t,r){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function c0(e,t,r,l,u){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ds(0),this.expirationTimes=ds(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ds(0),this.identifierPrefix=l,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Vu(e,t,r,l,u,c,p,S,k){return e=new c0(e,t,r,S,k),t===1?(t=1,c===!0&&(t|=8)):t=0,c=It(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},bs(c),e}function f0(e,t,r){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:l==null?null:""+l,children:e,containerInfo:t,implementation:r}}function ld(e){if(!e)return Hn;e=e._reactInternals;e:{if(gn(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var r=e.type;if(dt(r))return Ic(e,r,t)}return t}function sd(e,t,r,l,u,c,p,S,k){return e=Vu(r,l,!0,e,u,c,p,S,k),e.context=ld(null),r=e.current,l=at(),u=Xn(r),c=En(l,u),c.callback=t??null,Bn(r,c,u),e.current.lanes=u,ho(e,u,l),mt(e,l),e}function _l(e,t,r,l){var u=t.current,c=at(),p=Xn(u);return r=ld(r),t.context===null?t.context=r:t.pendingContext=r,t=En(c,p),t.payload={element:e},l=l===void 0?null:l,l!==null&&(t.callback=l),e=Bn(u,t,p),e!==null&&(Xt(e,u,p,c),el(e,u,p)),p}function kl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ud(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Bu(e,t){ud(e,t),(e=e.alternate)&&ud(e,t)}function d0(){return null}var ad=typeof reportError=="function"?reportError:function(e){console.error(e)};function Uu(e){this._internalRoot=e}Nl.prototype.render=Uu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));_l(e,t,null,null)},Nl.prototype.unmount=Uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dr(function(){_l(null,e,null,null)}),t[yn]=null}};function Nl(e){this._internalRoot=e}Nl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xa();e={blockedOn:null,target:e,priority:t};for(var r=0;r<In.length&&t!==0&&t<In[r].priority;r++);In.splice(r,0,e),r===0&&Ka(e)}};function Wu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function cd(){}function h0(e,t,r,l,u){if(u){if(typeof l=="function"){var c=l;l=function(){var F=kl(p);c.call(F)}}var p=sd(t,l,e,0,null,!1,!1,"",cd);return e._reactRootContainer=p,e[yn]=p.current,zo(e.nodeType===8?e.parentNode:e),dr(),p}for(;u=e.lastChild;)e.removeChild(u);if(typeof l=="function"){var S=l;l=function(){var F=kl(k);S.call(F)}}var k=Vu(e,0,!1,null,null,!1,!1,"",cd);return e._reactRootContainer=k,e[yn]=k.current,zo(e.nodeType===8?e.parentNode:e),dr(function(){_l(t,k,r,l)}),k}function zl(e,t,r,l,u){var c=r._reactRootContainer;if(c){var p=c;if(typeof u=="function"){var S=u;u=function(){var k=kl(p);S.call(k)}}_l(t,p,e,u)}else p=h0(r,t,e,u,l);return kl(p)}Wa=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fo(t.pendingLanes);r!==0&&(hs(t,r|1),mt(t,Ie()),(_e&6)===0&&(Qr=Ie()+500,On()))}break;case 13:dr(function(){var l=Sn(e,1);if(l!==null){var u=at();Xt(l,e,1,u)}}),Bu(e,1)}},ps=function(e){if(e.tag===13){var t=Sn(e,134217728);if(t!==null){var r=at();Xt(t,e,134217728,r)}Bu(e,134217728)}},Ya=function(e){if(e.tag===13){var t=Xn(e),r=Sn(e,t);if(r!==null){var l=at();Xt(r,e,t,l)}Bu(e,t)}},Xa=function(){return Ce},ja=function(e,t){var r=Ce;try{return Ce=e,t()}finally{Ce=r}},pn=function(e,t,r){switch(t){case"input":if(ke(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var l=r[t];if(l!==e&&l.form===e.form){var u=Yi(l);if(!u)throw Error(i(90));Fe(l),ke(l,u)}}}break;case"textarea":Ct(e,r);break;case"select":t=r.value,t!=null&&Nt(e,!!r.multiple,t,!1)}},di=Du,hi=dr;var p0={usingClientEntryPoint:!1,Events:[Po,Dr,Yi,ci,fi,Du]},Yo={findFiberByHostInstance:or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m0={bundleType:Yo.bundleType,version:Yo.version,rendererPackageName:Yo.rendererPackageName,rendererConfig:Yo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=vi(e),e===null?null:e.stateNode},findFiberByHostInstance:Yo.findFiberByHostInstance||d0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{Cr=Ml.inject(m0),zt=Ml}catch{}}return gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p0,gt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wu(t))throw Error(i(200));return f0(e,t,null,r)},gt.createRoot=function(e,t){if(!Wu(e))throw Error(i(299));var r=!1,l="",u=ad;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Vu(e,1,!1,null,null,r,!1,l,u),e[yn]=t.current,zo(e.nodeType===8?e.parentNode:e),new Uu(t)},gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=vi(t),e=e===null?null:e.stateNode,e},gt.flushSync=function(e){return dr(e)},gt.hydrate=function(e,t,r){if(!Cl(t))throw Error(i(200));return zl(null,e,t,!0,r)},gt.hydrateRoot=function(e,t,r){if(!Wu(e))throw Error(i(405));var l=r!=null&&r.hydratedSources||null,u=!1,c="",p=ad;if(r!=null&&(r.unstable_strictMode===!0&&(u=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),t=sd(t,null,e,1,r??null,u,!1,c,p),e[yn]=t.current,zo(e),l)for(e=0;e<l.length;e++)r=l[e],u=r._getVersion,u=u(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,u]:t.mutableSourceEagerHydrationData.push(r,u);return new Nl(t)},gt.render=function(e,t,r){if(!Cl(t))throw Error(i(200));return zl(null,e,t,!1,r)},gt.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(i(40));return e._reactRootContainer?(dr(function(){zl(null,null,e,!1,function(){e._reactRootContainer=null,e[yn]=null})}),!0):!1},gt.unstable_batchedUpdates=Du,gt.unstable_renderSubtreeIntoContainer=function(e,t,r,l){if(!Cl(r))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return zl(e,t,r,!1,l)},gt.version="18.3.1-next-f1338f8080-20240426",gt}var pd;function S0(){if(pd)return Yu.exports;pd=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(o){console.error(o)}}return n(),Yu.exports=x0(),Yu.exports}const E0={},md=n=>{let o;const i=new Set,s=(g,v)=>{const w=typeof g=="function"?g(o):g;if(!Object.is(w,o)){const E=o;o=v??(typeof w!="object"||w===null)?w:Object.assign({},o,w),i.forEach(P=>P(o,E))}},a=()=>o,m={setState:s,getState:a,getInitialState:()=>y,subscribe:g=>(i.add(g),()=>i.delete(g)),destroy:()=>{(E0?"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."),i.clear()}},y=o=n(s,a,m);return m},_0=n=>n?md(n):md;var Qu={exports:{}},Ku={},Gu={exports:{}},Zu={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gd;function k0(){if(gd)return Zu;gd=1;var n=_a();function o(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var i=typeof Object.is=="function"?Object.is:o,s=n.useState,a=n.useEffect,d=n.useLayoutEffect,f=n.useDebugValue;function h(v,w){var E=w(),P=s({inst:{value:E,getSnapshot:w}}),_=P[0].inst,M=P[1];return d(function(){_.value=E,_.getSnapshot=w,m(_)&&M({inst:_})},[v,E,w]),a(function(){return m(_)&&M({inst:_}),v(function(){m(_)&&M({inst:_})})},[v]),f(E),E}function m(v){var w=v.getSnapshot;v=v.value;try{var E=w();return!i(v,E)}catch{return!0}}function y(v,w){return w()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:h;return Zu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Zu}var yd;function N0(){return yd||(yd=1,Gu.exports=k0()),Gu.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vd;function C0(){if(vd)return Ku;vd=1;var n=_a(),o=N0();function i(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var s=typeof Object.is=="function"?Object.is:i,a=o.useSyncExternalStore,d=n.useRef,f=n.useEffect,h=n.useMemo,m=n.useDebugValue;return Ku.useSyncExternalStoreWithSelector=function(y,g,v,w,E){var P=d(null);if(P.current===null){var _={hasValue:!1,value:null};P.current=_}else _=P.current;P=h(function(){function z(U){if(!$){if($=!0,B=U,U=w(U),E!==void 0&&_.hasValue){var K=_.value;if(E(K,U))return T=K}return T=U}if(K=T,s(B,U))return K;var J=w(U);return E!==void 0&&E(K,J)?(B=U,K):(B=U,T=J)}var $=!1,B,T,Y=v===void 0?null:v;return[function(){return z(g())},Y===null?void 0:function(){return z(Y())}]},[g,v,w,E]);var M=a(y,P[0],P[1]);return f(function(){_.hasValue=!0,_.value=M},[M]),m(M),M},Ku}var wd;function z0(){return wd||(wd=1,Qu.exports=C0()),Qu.exports}var M0=z0();const T0=y0(M0);function tt(n){if(typeof n=="string"||typeof n=="number")return""+n;let o="";if(Array.isArray(n))for(let i=0,s;i<n.length;i++)(s=tt(n[i]))!==""&&(o+=(o&&" ")+s);else for(let i in n)n[i]&&(o+=(o&&" ")+i);return o}const{useDebugValue:P0}=V,{useSyncExternalStoreWithSelector:A0}=T0,R0=n=>n;function uh(n,o=R0,i){const s=A0(n.subscribe,n.getState,n.getServerState||n.getInitialState,o,i);return P0(s),s}const xd=(n,o)=>{const i=_0(n),s=(a,d=o)=>uh(i,a,d);return Object.assign(s,i),s},I0=(n,o)=>n?xd(n,o):xd;function Je(n,o){if(Object.is(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;if(n instanceof Map&&o instanceof Map){if(n.size!==o.size)return!1;for(const[s,a]of n)if(!Object.is(a,o.get(s)))return!1;return!0}if(n instanceof Set&&o instanceof Set){if(n.size!==o.size)return!1;for(const s of n)if(!o.has(s))return!1;return!0}const i=Object.keys(n);if(i.length!==Object.keys(o).length)return!1;for(const s of i)if(!Object.prototype.hasOwnProperty.call(o,s)||!Object.is(n[s],o[s]))return!1;return!0}var D0={value:()=>{}};function Jl(){for(var n=0,o=arguments.length,i={},s;n<o;++n){if(!(s=arguments[n]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new Hl(i)}function Hl(n){this._=n}function L0(n,o){return n.trim().split(/^|\s+/).map(function(i){var s="",a=i.indexOf(".");if(a>=0&&(s=i.slice(a+1),i=i.slice(0,a)),i&&!o.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}Hl.prototype=Jl.prototype={constructor:Hl,on:function(n,o){var i=this._,s=L0(n+"",i),a,d=-1,f=s.length;if(arguments.length<2){for(;++d<f;)if((a=(n=s[d]).type)&&(a=$0(i[a],n.name)))return a;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++d<f;)if(a=(n=s[d]).type)i[a]=Sd(i[a],n.name,o);else if(o==null)for(a in i)i[a]=Sd(i[a],n.name,null);return this},copy:function(){var n={},o=this._;for(var i in o)n[i]=o[i].slice();return new Hl(n)},call:function(n,o){if((a=arguments.length-2)>0)for(var i=new Array(a),s=0,a,d;s<a;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(d=this._[n],s=0,a=d.length;s<a;++s)d[s].value.apply(o,i)},apply:function(n,o,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var s=this._[n],a=0,d=s.length;a<d;++a)s[a].value.apply(o,i)}};function $0(n,o){for(var i=0,s=n.length,a;i<s;++i)if((a=n[i]).name===o)return a.value}function Sd(n,o,i){for(var s=0,a=n.length;s<a;++s)if(n[s].name===o){n[s]=D0,n=n.slice(0,s).concat(n.slice(s+1));break}return i!=null&&n.push({name:o,value:i}),n}var sa="http://www.w3.org/1999/xhtml";const Ed={svg:"http://www.w3.org/2000/svg",xhtml:sa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bl(n){var o=n+="",i=o.indexOf(":");return i>=0&&(o=n.slice(0,i))!=="xmlns"&&(n=n.slice(i+1)),Ed.hasOwnProperty(o)?{space:Ed[o],local:n}:n}function F0(n){return function(){var o=this.ownerDocument,i=this.namespaceURI;return i===sa&&o.documentElement.namespaceURI===sa?o.createElement(n):o.createElementNS(i,n)}}function H0(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function ah(n){var o=bl(n);return(o.local?H0:F0)(o)}function O0(){}function ka(n){return n==null?O0:function(){return this.querySelector(n)}}function V0(n){typeof n!="function"&&(n=ka(n));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var d=o[a],f=d.length,h=s[a]=new Array(f),m,y,g=0;g<f;++g)(m=d[g])&&(y=n.call(m,m.__data__,g,d))&&("__data__"in m&&(y.__data__=m.__data__),h[g]=y);return new kt(s,this._parents)}function B0(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function U0(){return[]}function ch(n){return n==null?U0:function(){return this.querySelectorAll(n)}}function W0(n){return function(){return B0(n.apply(this,arguments))}}function Y0(n){typeof n=="function"?n=W0(n):n=ch(n);for(var o=this._groups,i=o.length,s=[],a=[],d=0;d<i;++d)for(var f=o[d],h=f.length,m,y=0;y<h;++y)(m=f[y])&&(s.push(n.call(m,m.__data__,y,f)),a.push(m));return new kt(s,a)}function fh(n){return function(){return this.matches(n)}}function dh(n){return function(o){return o.matches(n)}}var X0=Array.prototype.find;function j0(n){return function(){return X0.call(this.children,n)}}function Q0(){return this.firstElementChild}function K0(n){return this.select(n==null?Q0:j0(typeof n=="function"?n:dh(n)))}var G0=Array.prototype.filter;function Z0(){return Array.from(this.children)}function q0(n){return function(){return G0.call(this.children,n)}}function J0(n){return this.selectAll(n==null?Z0:q0(typeof n=="function"?n:dh(n)))}function b0(n){typeof n!="function"&&(n=fh(n));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var d=o[a],f=d.length,h=s[a]=[],m,y=0;y<f;++y)(m=d[y])&&n.call(m,m.__data__,y,d)&&h.push(m);return new kt(s,this._parents)}function hh(n){return new Array(n.length)}function eg(){return new kt(this._enter||this._groups.map(hh),this._parents)}function Ul(n,o){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=o}Ul.prototype={constructor:Ul,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,o){return this._parent.insertBefore(n,o)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function tg(n){return function(){return n}}function ng(n,o,i,s,a,d){for(var f=0,h,m=o.length,y=d.length;f<y;++f)(h=o[f])?(h.__data__=d[f],s[f]=h):i[f]=new Ul(n,d[f]);for(;f<m;++f)(h=o[f])&&(a[f]=h)}function rg(n,o,i,s,a,d,f){var h,m,y=new Map,g=o.length,v=d.length,w=new Array(g),E;for(h=0;h<g;++h)(m=o[h])&&(w[h]=E=f.call(m,m.__data__,h,o)+"",y.has(E)?a[h]=m:y.set(E,m));for(h=0;h<v;++h)E=f.call(n,d[h],h,d)+"",(m=y.get(E))?(s[h]=m,m.__data__=d[h],y.delete(E)):i[h]=new Ul(n,d[h]);for(h=0;h<g;++h)(m=o[h])&&y.get(w[h])===m&&(a[h]=m)}function og(n){return n.__data__}function ig(n,o){if(!arguments.length)return Array.from(this,og);var i=o?rg:ng,s=this._parents,a=this._groups;typeof n!="function"&&(n=tg(n));for(var d=a.length,f=new Array(d),h=new Array(d),m=new Array(d),y=0;y<d;++y){var g=s[y],v=a[y],w=v.length,E=lg(n.call(g,g&&g.__data__,y,s)),P=E.length,_=h[y]=new Array(P),M=f[y]=new Array(P),z=m[y]=new Array(w);i(g,v,_,M,z,E,o);for(var $=0,B=0,T,Y;$<P;++$)if(T=_[$]){for($>=B&&(B=$+1);!(Y=M[B])&&++B<P;);T._next=Y||null}}return f=new kt(f,s),f._enter=h,f._exit=m,f}function lg(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function sg(){return new kt(this._exit||this._groups.map(hh),this._parents)}function ug(n,o,i){var s=this.enter(),a=this,d=this.exit();return typeof n=="function"?(s=n(s),s&&(s=s.selection())):s=s.append(n+""),o!=null&&(a=o(a),a&&(a=a.selection())),i==null?d.remove():i(d),s&&a?s.merge(a).order():a}function ag(n){for(var o=n.selection?n.selection():n,i=this._groups,s=o._groups,a=i.length,d=s.length,f=Math.min(a,d),h=new Array(a),m=0;m<f;++m)for(var y=i[m],g=s[m],v=y.length,w=h[m]=new Array(v),E,P=0;P<v;++P)(E=y[P]||g[P])&&(w[P]=E);for(;m<a;++m)h[m]=i[m];return new kt(h,this._parents)}function cg(){for(var n=this._groups,o=-1,i=n.length;++o<i;)for(var s=n[o],a=s.length-1,d=s[a],f;--a>=0;)(f=s[a])&&(d&&f.compareDocumentPosition(d)^4&&d.parentNode.insertBefore(f,d),d=f);return this}function fg(n){n||(n=dg);function o(v,w){return v&&w?n(v.__data__,w.__data__):!v-!w}for(var i=this._groups,s=i.length,a=new Array(s),d=0;d<s;++d){for(var f=i[d],h=f.length,m=a[d]=new Array(h),y,g=0;g<h;++g)(y=f[g])&&(m[g]=y);m.sort(o)}return new kt(a,this._parents).order()}function dg(n,o){return n<o?-1:n>o?1:n>=o?0:NaN}function hg(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function pg(){return Array.from(this)}function mg(){for(var n=this._groups,o=0,i=n.length;o<i;++o)for(var s=n[o],a=0,d=s.length;a<d;++a){var f=s[a];if(f)return f}return null}function gg(){let n=0;for(const o of this)++n;return n}function yg(){return!this.node()}function vg(n){for(var o=this._groups,i=0,s=o.length;i<s;++i)for(var a=o[i],d=0,f=a.length,h;d<f;++d)(h=a[d])&&n.call(h,h.__data__,d,a);return this}function wg(n){return function(){this.removeAttribute(n)}}function xg(n){return function(){this.removeAttributeNS(n.space,n.local)}}function Sg(n,o){return function(){this.setAttribute(n,o)}}function Eg(n,o){return function(){this.setAttributeNS(n.space,n.local,o)}}function _g(n,o){return function(){var i=o.apply(this,arguments);i==null?this.removeAttribute(n):this.setAttribute(n,i)}}function kg(n,o){return function(){var i=o.apply(this,arguments);i==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,i)}}function Ng(n,o){var i=bl(n);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((o==null?i.local?xg:wg:typeof o=="function"?i.local?kg:_g:i.local?Eg:Sg)(i,o))}function ph(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Cg(n){return function(){this.style.removeProperty(n)}}function zg(n,o,i){return function(){this.style.setProperty(n,o,i)}}function Mg(n,o,i){return function(){var s=o.apply(this,arguments);s==null?this.style.removeProperty(n):this.style.setProperty(n,s,i)}}function Tg(n,o,i){return arguments.length>1?this.each((o==null?Cg:typeof o=="function"?Mg:zg)(n,o,i??"")):ro(this.node(),n)}function ro(n,o){return n.style.getPropertyValue(o)||ph(n).getComputedStyle(n,null).getPropertyValue(o)}function Pg(n){return function(){delete this[n]}}function Ag(n,o){return function(){this[n]=o}}function Rg(n,o){return function(){var i=o.apply(this,arguments);i==null?delete this[n]:this[n]=i}}function Ig(n,o){return arguments.length>1?this.each((o==null?Pg:typeof o=="function"?Rg:Ag)(n,o)):this.node()[n]}function mh(n){return n.trim().split(/^|\s+/)}function Na(n){return n.classList||new gh(n)}function gh(n){this._node=n,this._names=mh(n.getAttribute("class")||"")}gh.prototype={add:function(n){var o=this._names.indexOf(n);o<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var o=this._names.indexOf(n);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function yh(n,o){for(var i=Na(n),s=-1,a=o.length;++s<a;)i.add(o[s])}function vh(n,o){for(var i=Na(n),s=-1,a=o.length;++s<a;)i.remove(o[s])}function Dg(n){return function(){yh(this,n)}}function Lg(n){return function(){vh(this,n)}}function $g(n,o){return function(){(o.apply(this,arguments)?yh:vh)(this,n)}}function Fg(n,o){var i=mh(n+"");if(arguments.length<2){for(var s=Na(this.node()),a=-1,d=i.length;++a<d;)if(!s.contains(i[a]))return!1;return!0}return this.each((typeof o=="function"?$g:o?Dg:Lg)(i,o))}function Hg(){this.textContent=""}function Og(n){return function(){this.textContent=n}}function Vg(n){return function(){var o=n.apply(this,arguments);this.textContent=o??""}}function Bg(n){return arguments.length?this.each(n==null?Hg:(typeof n=="function"?Vg:Og)(n)):this.node().textContent}function Ug(){this.innerHTML=""}function Wg(n){return function(){this.innerHTML=n}}function Yg(n){return function(){var o=n.apply(this,arguments);this.innerHTML=o??""}}function Xg(n){return arguments.length?this.each(n==null?Ug:(typeof n=="function"?Yg:Wg)(n)):this.node().innerHTML}function jg(){this.nextSibling&&this.parentNode.appendChild(this)}function Qg(){return this.each(jg)}function Kg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gg(){return this.each(Kg)}function Zg(n){var o=typeof n=="function"?n:ah(n);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function qg(){return null}function Jg(n,o){var i=typeof n=="function"?n:ah(n),s=o==null?qg:typeof o=="function"?o:ka(o);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function bg(){var n=this.parentNode;n&&n.removeChild(this)}function ey(){return this.each(bg)}function ty(){var n=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(n,this.nextSibling):n}function ny(){var n=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(n,this.nextSibling):n}function ry(n){return this.select(n?ny:ty)}function oy(n){return arguments.length?this.property("__data__",n):this.node().__data__}function iy(n){return function(o){n.call(this,o,this.__data__)}}function ly(n){return n.trim().split(/^|\s+/).map(function(o){var i="",s=o.indexOf(".");return s>=0&&(i=o.slice(s+1),o=o.slice(0,s)),{type:o,name:i}})}function sy(n){return function(){var o=this.__on;if(o){for(var i=0,s=-1,a=o.length,d;i<a;++i)d=o[i],(!n.type||d.type===n.type)&&d.name===n.name?this.removeEventListener(d.type,d.listener,d.options):o[++s]=d;++s?o.length=s:delete this.__on}}}function uy(n,o,i){return function(){var s=this.__on,a,d=iy(o);if(s){for(var f=0,h=s.length;f<h;++f)if((a=s[f]).type===n.type&&a.name===n.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=d,a.options=i),a.value=o;return}}this.addEventListener(n.type,d,i),a={type:n.type,name:n.name,value:o,listener:d,options:i},s?s.push(a):this.__on=[a]}}function ay(n,o,i){var s=ly(n+""),a,d=s.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var m=0,y=h.length,g;m<y;++m)for(a=0,g=h[m];a<d;++a)if((f=s[a]).type===g.type&&f.name===g.name)return g.value}return}for(h=o?uy:sy,a=0;a<d;++a)this.each(h(s[a],o,i));return this}function wh(n,o,i){var s=ph(n),a=s.CustomEvent;typeof a=="function"?a=new a(o,i):(a=s.document.createEvent("Event"),i?(a.initEvent(o,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(o,!1,!1)),n.dispatchEvent(a)}function cy(n,o){return function(){return wh(this,n,o)}}function fy(n,o){return function(){return wh(this,n,o.apply(this,arguments))}}function dy(n,o){return this.each((typeof o=="function"?fy:cy)(n,o))}function*hy(){for(var n=this._groups,o=0,i=n.length;o<i;++o)for(var s=n[o],a=0,d=s.length,f;a<d;++a)(f=s[a])&&(yield f)}var xh=[null];function kt(n,o){this._groups=n,this._parents=o}function si(){return new kt([[document.documentElement]],xh)}function py(){return this}kt.prototype=si.prototype={constructor:kt,select:V0,selectAll:Y0,selectChild:K0,selectChildren:J0,filter:b0,data:ig,enter:eg,exit:sg,join:ug,merge:ag,selection:py,order:cg,sort:fg,call:hg,nodes:pg,node:mg,size:gg,empty:yg,each:vg,attr:Ng,style:Tg,property:Ig,classed:Fg,text:Bg,html:Xg,raise:Qg,lower:Gg,append:Zg,insert:Jg,remove:ey,clone:ry,datum:oy,on:ay,dispatch:dy,[Symbol.iterator]:hy};function Dt(n){return typeof n=="string"?new kt([[document.querySelector(n)]],[document.documentElement]):new kt([[n]],xh)}function my(n){let o;for(;o=n.sourceEvent;)n=o;return n}function jt(n,o){if(n=my(n),o===void 0&&(o=n.currentTarget),o){var i=o.ownerSVGElement||o;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=n.clientX,s.y=n.clientY,s=s.matrixTransform(o.getScreenCTM().inverse()),[s.x,s.y]}if(o.getBoundingClientRect){var a=o.getBoundingClientRect();return[n.clientX-a.left-o.clientLeft,n.clientY-a.top-o.clientTop]}}return[n.pageX,n.pageY]}const gy={passive:!1},bo={capture:!0,passive:!1};function qu(n){n.stopImmediatePropagation()}function eo(n){n.preventDefault(),n.stopImmediatePropagation()}function Sh(n){var o=n.document.documentElement,i=Dt(n).on("dragstart.drag",eo,bo);"onselectstart"in o?i.on("selectstart.drag",eo,bo):(o.__noselect=o.style.MozUserSelect,o.style.MozUserSelect="none")}function Eh(n,o){var i=n.document.documentElement,s=Dt(n).on("dragstart.drag",null);o&&(s.on("click.drag",eo,bo),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Tl=n=>()=>n;function ua(n,{sourceEvent:o,subject:i,target:s,identifier:a,active:d,x:f,y:h,dx:m,dy:y,dispatch:g}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:d,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:g}})}ua.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function yy(n){return!n.ctrlKey&&!n.button}function vy(){return this.parentNode}function wy(n,o){return o??{x:n.x,y:n.y}}function xy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sy(){var n=yy,o=vy,i=wy,s=xy,a={},d=Jl("start","drag","end"),f=0,h,m,y,g,v=0;function w(T){T.on("mousedown.drag",E).filter(s).on("touchstart.drag",M).on("touchmove.drag",z,gy).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(T,Y){if(!(g||!n.call(this,T,Y))){var U=B(this,o.call(this,T,Y),T,Y,"mouse");U&&(Dt(T.view).on("mousemove.drag",P,bo).on("mouseup.drag",_,bo),Sh(T.view),qu(T),y=!1,h=T.clientX,m=T.clientY,U("start",T))}}function P(T){if(eo(T),!y){var Y=T.clientX-h,U=T.clientY-m;y=Y*Y+U*U>v}a.mouse("drag",T)}function _(T){Dt(T.view).on("mousemove.drag mouseup.drag",null),Eh(T.view,y),eo(T),a.mouse("end",T)}function M(T,Y){if(n.call(this,T,Y)){var U=T.changedTouches,K=o.call(this,T,Y),J=U.length,Q,te;for(Q=0;Q<J;++Q)(te=B(this,K,T,Y,U[Q].identifier,U[Q]))&&(qu(T),te("start",T,U[Q]))}}function z(T){var Y=T.changedTouches,U=Y.length,K,J;for(K=0;K<U;++K)(J=a[Y[K].identifier])&&(eo(T),J("drag",T,Y[K]))}function $(T){var Y=T.changedTouches,U=Y.length,K,J;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),K=0;K<U;++K)(J=a[Y[K].identifier])&&(qu(T),J("end",T,Y[K]))}function B(T,Y,U,K,J,Q){var te=d.copy(),ee=jt(Q||U,Y),re,b,x;if((x=i.call(T,new ua("beforestart",{sourceEvent:U,target:w,identifier:J,active:f,x:ee[0],y:ee[1],dx:0,dy:0,dispatch:te}),K))!=null)return re=x.x-ee[0]||0,b=x.y-ee[1]||0,function H(A,j,D){var N=ee,R;switch(A){case"start":a[J]=H,R=f++;break;case"end":delete a[J],--f;case"drag":ee=jt(D||j,Y),R=f;break}te.call(A,T,new ua(A,{sourceEvent:j,subject:x,target:w,identifier:J,active:R,x:ee[0]+re,y:ee[1]+b,dx:ee[0]-N[0],dy:ee[1]-N[1],dispatch:te}),K)}}return w.filter=function(T){return arguments.length?(n=typeof T=="function"?T:Tl(!!T),w):n},w.container=function(T){return arguments.length?(o=typeof T=="function"?T:Tl(T),w):o},w.subject=function(T){return arguments.length?(i=typeof T=="function"?T:Tl(T),w):i},w.touchable=function(T){return arguments.length?(s=typeof T=="function"?T:Tl(!!T),w):s},w.on=function(){var T=d.on.apply(d,arguments);return T===d?w:T},w.clickDistance=function(T){return arguments.length?(v=(T=+T)*T,w):Math.sqrt(v)},w}function Ca(n,o,i){n.prototype=o.prototype=i,i.constructor=n}function _h(n,o){var i=Object.create(n.prototype);for(var s in o)i[s]=o[s];return i}function ui(){}var ei=.7,Wl=1/ei,to="\\s*([+-]?\\d+)\\s*",ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ey=/^#([0-9a-f]{3,8})$/,_y=new RegExp(`^rgb\\(${to},${to},${to}\\)$`),ky=new RegExp(`^rgb\\(${sn},${sn},${sn}\\)$`),Ny=new RegExp(`^rgba\\(${to},${to},${to},${ti}\\)$`),Cy=new RegExp(`^rgba\\(${sn},${sn},${sn},${ti}\\)$`),zy=new RegExp(`^hsl\\(${ti},${sn},${sn}\\)$`),My=new RegExp(`^hsla\\(${ti},${sn},${sn},${ti}\\)$`),_d={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};Ca(ui,ni,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:kd,formatHex:kd,formatHex8:Ty,formatHsl:Py,formatRgb:Nd,toString:Nd});function kd(){return this.rgb().formatHex()}function Ty(){return this.rgb().formatHex8()}function Py(){return kh(this).formatHsl()}function Nd(){return this.rgb().formatRgb()}function ni(n){var o,i;return n=(n+"").trim().toLowerCase(),(o=Ey.exec(n))?(i=o[1].length,o=parseInt(o[1],16),i===6?Cd(o):i===3?new yt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):i===8?Pl(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):i===4?Pl(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=_y.exec(n))?new yt(o[1],o[2],o[3],1):(o=ky.exec(n))?new yt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=Ny.exec(n))?Pl(o[1],o[2],o[3],o[4]):(o=Cy.exec(n))?Pl(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=zy.exec(n))?Td(o[1],o[2]/100,o[3]/100,1):(o=My.exec(n))?Td(o[1],o[2]/100,o[3]/100,o[4]):_d.hasOwnProperty(n)?Cd(_d[n]):n==="transparent"?new yt(NaN,NaN,NaN,0):null}function Cd(n){return new yt(n>>16&255,n>>8&255,n&255,1)}function Pl(n,o,i,s){return s<=0&&(n=o=i=NaN),new yt(n,o,i,s)}function Ay(n){return n instanceof ui||(n=ni(n)),n?(n=n.rgb(),new yt(n.r,n.g,n.b,n.opacity)):new yt}function aa(n,o,i,s){return arguments.length===1?Ay(n):new yt(n,o,i,s??1)}function yt(n,o,i,s){this.r=+n,this.g=+o,this.b=+i,this.opacity=+s}Ca(yt,aa,_h(ui,{brighter(n){return n=n==null?Wl:Math.pow(Wl,n),new yt(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?ei:Math.pow(ei,n),new yt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new yt(wr(this.r),wr(this.g),wr(this.b),Yl(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:zd,formatHex:zd,formatHex8:Ry,formatRgb:Md,toString:Md}));function zd(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function Ry(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Md(){const n=Yl(this.opacity);return`${n===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${n===1?")":`, ${n})`}`}function Yl(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function wr(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function yr(n){return n=wr(n),(n<16?"0":"")+n.toString(16)}function Td(n,o,i,s){return s<=0?n=o=i=NaN:i<=0||i>=1?n=o=NaN:o<=0&&(n=NaN),new Qt(n,o,i,s)}function kh(n){if(n instanceof Qt)return new Qt(n.h,n.s,n.l,n.opacity);if(n instanceof ui||(n=ni(n)),!n)return new Qt;if(n instanceof Qt)return n;n=n.rgb();var o=n.r/255,i=n.g/255,s=n.b/255,a=Math.min(o,i,s),d=Math.max(o,i,s),f=NaN,h=d-a,m=(d+a)/2;return h?(o===d?f=(i-s)/h+(i<s)*6:i===d?f=(s-o)/h+2:f=(o-i)/h+4,h/=m<.5?d+a:2-d-a,f*=60):h=m>0&&m<1?0:f,new Qt(f,h,m,n.opacity)}function Iy(n,o,i,s){return arguments.length===1?kh(n):new Qt(n,o,i,s??1)}function Qt(n,o,i,s){this.h=+n,this.s=+o,this.l=+i,this.opacity=+s}Ca(Qt,Iy,_h(ui,{brighter(n){return n=n==null?Wl:Math.pow(Wl,n),new Qt(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?ei:Math.pow(ei,n),new Qt(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,o=isNaN(n)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*o,a=2*i-s;return new yt(Ju(n>=240?n-240:n+120,a,s),Ju(n,a,s),Ju(n<120?n+240:n-120,a,s),this.opacity)},clamp(){return new Qt(Pd(this.h),Al(this.s),Al(this.l),Yl(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=Yl(this.opacity);return`${n===1?"hsl(":"hsla("}${Pd(this.h)}, ${Al(this.s)*100}%, ${Al(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Pd(n){return n=(n||0)%360,n<0?n+360:n}function Al(n){return Math.max(0,Math.min(1,n||0))}function Ju(n,o,i){return(n<60?o+(i-o)*n/60:n<180?i:n<240?o+(i-o)*(240-n)/60:o)*255}const Nh=n=>()=>n;function Dy(n,o){return function(i){return n+i*o}}function Ly(n,o,i){return n=Math.pow(n,i),o=Math.pow(o,i)-n,i=1/i,function(s){return Math.pow(n+s*o,i)}}function $y(n){return(n=+n)==1?Ch:function(o,i){return i-o?Ly(o,i,n):Nh(isNaN(o)?i:o)}}function Ch(n,o){var i=o-n;return i?Dy(n,i):Nh(isNaN(n)?o:n)}const Ad=(function n(o){var i=$y(o);function s(a,d){var f=i((a=aa(a)).r,(d=aa(d)).r),h=i(a.g,d.g),m=i(a.b,d.b),y=Ch(a.opacity,d.opacity);return function(g){return a.r=f(g),a.g=h(g),a.b=m(g),a.opacity=y(g),a+""}}return s.gamma=n,s})(1);function Zn(n,o){return n=+n,o=+o,function(i){return n*(1-i)+o*i}}var ca=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bu=new RegExp(ca.source,"g");function Fy(n){return function(){return n}}function Hy(n){return function(o){return n(o)+""}}function Oy(n,o){var i=ca.lastIndex=bu.lastIndex=0,s,a,d,f=-1,h=[],m=[];for(n=n+"",o=o+"";(s=ca.exec(n))&&(a=bu.exec(o));)(d=a.index)>i&&(d=o.slice(i,d),h[f]?h[f]+=d:h[++f]=d),(s=s[0])===(a=a[0])?h[f]?h[f]+=a:h[++f]=a:(h[++f]=null,m.push({i:f,x:Zn(s,a)})),i=bu.lastIndex;return i<o.length&&(d=o.slice(i),h[f]?h[f]+=d:h[++f]=d),h.length<2?m[0]?Hy(m[0].x):Fy(o):(o=m.length,function(y){for(var g=0,v;g<o;++g)h[(v=m[g]).i]=v.x(y);return h.join("")})}var Rd=180/Math.PI,fa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zh(n,o,i,s,a,d){var f,h,m;return(f=Math.sqrt(n*n+o*o))&&(n/=f,o/=f),(m=n*i+o*s)&&(i-=n*m,s-=o*m),(h=Math.sqrt(i*i+s*s))&&(i/=h,s/=h,m/=h),n*s<o*i&&(n=-n,o=-o,m=-m,f=-f),{translateX:a,translateY:d,rotate:Math.atan2(o,n)*Rd,skewX:Math.atan(m)*Rd,scaleX:f,scaleY:h}}var Rl;function Vy(n){const o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return o.isIdentity?fa:zh(o.a,o.b,o.c,o.d,o.e,o.f)}function By(n){return n==null||(Rl||(Rl=document.createElementNS("http://www.w3.org/2000/svg","g")),Rl.setAttribute("transform",n),!(n=Rl.transform.baseVal.consolidate()))?fa:(n=n.matrix,zh(n.a,n.b,n.c,n.d,n.e,n.f))}function Mh(n,o,i,s){function a(y){return y.length?y.pop()+" ":""}function d(y,g,v,w,E,P){if(y!==v||g!==w){var _=E.push("translate(",null,o,null,i);P.push({i:_-4,x:Zn(y,v)},{i:_-2,x:Zn(g,w)})}else(v||w)&&E.push("translate("+v+o+w+i)}function f(y,g,v,w){y!==g?(y-g>180?g+=360:g-y>180&&(y+=360),w.push({i:v.push(a(v)+"rotate(",null,s)-2,x:Zn(y,g)})):g&&v.push(a(v)+"rotate("+g+s)}function h(y,g,v,w){y!==g?w.push({i:v.push(a(v)+"skewX(",null,s)-2,x:Zn(y,g)}):g&&v.push(a(v)+"skewX("+g+s)}function m(y,g,v,w,E,P){if(y!==v||g!==w){var _=E.push(a(E)+"scale(",null,",",null,")");P.push({i:_-4,x:Zn(y,v)},{i:_-2,x:Zn(g,w)})}else(v!==1||w!==1)&&E.push(a(E)+"scale("+v+","+w+")")}return function(y,g){var v=[],w=[];return y=n(y),g=n(g),d(y.translateX,y.translateY,g.translateX,g.translateY,v,w),f(y.rotate,g.rotate,v,w),h(y.skewX,g.skewX,v,w),m(y.scaleX,y.scaleY,g.scaleX,g.scaleY,v,w),y=g=null,function(E){for(var P=-1,_=w.length,M;++P<_;)v[(M=w[P]).i]=M.x(E);return v.join("")}}}var Uy=Mh(Vy,"px, ","px)","deg)"),Wy=Mh(By,", ",")",")"),Yy=1e-12;function Id(n){return((n=Math.exp(n))+1/n)/2}function Xy(n){return((n=Math.exp(n))-1/n)/2}function jy(n){return((n=Math.exp(2*n))-1)/(n+1)}const Qy=(function n(o,i,s){function a(d,f){var h=d[0],m=d[1],y=d[2],g=f[0],v=f[1],w=f[2],E=g-h,P=v-m,_=E*E+P*P,M,z;if(_<Yy)z=Math.log(w/y)/o,M=function(K){return[h+K*E,m+K*P,y*Math.exp(o*K*z)]};else{var $=Math.sqrt(_),B=(w*w-y*y+s*_)/(2*y*i*$),T=(w*w-y*y-s*_)/(2*w*i*$),Y=Math.log(Math.sqrt(B*B+1)-B),U=Math.log(Math.sqrt(T*T+1)-T);z=(U-Y)/o,M=function(K){var J=K*z,Q=Id(Y),te=y/(i*$)*(Q*jy(o*J+Y)-Xy(Y));return[h+te*E,m+te*P,y*Q/Id(o*J+Y)]}}return M.duration=z*1e3*o/Math.SQRT2,M}return a.rho=function(d){var f=Math.max(.001,+d),h=f*f,m=h*h;return n(f,h,m)},a})(Math.SQRT2,2,4);var oo=0,Zo=0,Xo=0,Th=1e3,Xl,qo,jl=0,Sr=0,es=0,ri=typeof performance=="object"&&performance.now?performance:Date,Ph=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function za(){return Sr||(Ph(Ky),Sr=ri.now()+es)}function Ky(){Sr=0}function Ql(){this._call=this._time=this._next=null}Ql.prototype=Ah.prototype={constructor:Ql,restart:function(n,o,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?za():+i)+(o==null?0:+o),!this._next&&qo!==this&&(qo?qo._next=this:Xl=this,qo=this),this._call=n,this._time=i,da()},stop:function(){this._call&&(this._call=null,this._time=1/0,da())}};function Ah(n,o,i){var s=new Ql;return s.restart(n,o,i),s}function Gy(){za(),++oo;for(var n=Xl,o;n;)(o=Sr-n._time)>=0&&n._call.call(void 0,o),n=n._next;--oo}function Dd(){Sr=(jl=ri.now())+es,oo=Zo=0;try{Gy()}finally{oo=0,qy(),Sr=0}}function Zy(){var n=ri.now(),o=n-jl;o>Th&&(es-=o,jl=n)}function qy(){for(var n,o=Xl,i,s=1/0;o;)o._call?(s>o._time&&(s=o._time),n=o,o=o._next):(i=o._next,o._next=null,o=n?n._next=i:Xl=i);qo=n,da(s)}function da(n){if(!oo){Zo&&(Zo=clearTimeout(Zo));var o=n-Sr;o>24?(n<1/0&&(Zo=setTimeout(Dd,n-ri.now()-es)),Xo&&(Xo=clearInterval(Xo))):(Xo||(jl=ri.now(),Xo=setInterval(Zy,Th)),oo=1,Ph(Dd))}}function Ld(n,o,i){var s=new Ql;return o=o==null?0:+o,s.restart(a=>{s.stop(),n(a+o)},o,i),s}var Jy=Jl("start","end","cancel","interrupt"),by=[],Rh=0,$d=1,ha=2,Ol=3,Fd=4,pa=5,Vl=6;function ts(n,o,i,s,a,d){var f=n.__transition;if(!f)n.__transition={};else if(i in f)return;ev(n,i,{name:o,index:s,group:a,on:Jy,tween:by,time:d.time,delay:d.delay,duration:d.duration,ease:d.ease,timer:null,state:Rh})}function Ma(n,o){var i=Gt(n,o);if(i.state>Rh)throw new Error("too late; already scheduled");return i}function un(n,o){var i=Gt(n,o);if(i.state>Ol)throw new Error("too late; already running");return i}function Gt(n,o){var i=n.__transition;if(!i||!(i=i[o]))throw new Error("transition not found");return i}function ev(n,o,i){var s=n.__transition,a;s[o]=i,i.timer=Ah(d,0,i.time);function d(y){i.state=$d,i.timer.restart(f,i.delay,i.time),i.delay<=y&&f(y-i.delay)}function f(y){var g,v,w,E;if(i.state!==$d)return m();for(g in s)if(E=s[g],E.name===i.name){if(E.state===Ol)return Ld(f);E.state===Fd?(E.state=Vl,E.timer.stop(),E.on.call("interrupt",n,n.__data__,E.index,E.group),delete s[g]):+g<o&&(E.state=Vl,E.timer.stop(),E.on.call("cancel",n,n.__data__,E.index,E.group),delete s[g])}if(Ld(function(){i.state===Ol&&(i.state=Fd,i.timer.restart(h,i.delay,i.time),h(y))}),i.state=ha,i.on.call("start",n,n.__data__,i.index,i.group),i.state===ha){for(i.state=Ol,a=new Array(w=i.tween.length),g=0,v=-1;g<w;++g)(E=i.tween[g].value.call(n,n.__data__,i.index,i.group))&&(a[++v]=E);a.length=v+1}}function h(y){for(var g=y<i.duration?i.ease.call(null,y/i.duration):(i.timer.restart(m),i.state=pa,1),v=-1,w=a.length;++v<w;)a[v].call(n,g);i.state===pa&&(i.on.call("end",n,n.__data__,i.index,i.group),m())}function m(){i.state=Vl,i.timer.stop(),delete s[o];for(var y in s)return;delete n.__transition}}function Bl(n,o){var i=n.__transition,s,a,d=!0,f;if(i){o=o==null?null:o+"";for(f in i){if((s=i[f]).name!==o){d=!1;continue}a=s.state>ha&&s.state<pa,s.state=Vl,s.timer.stop(),s.on.call(a?"interrupt":"cancel",n,n.__data__,s.index,s.group),delete i[f]}d&&delete n.__transition}}function tv(n){return this.each(function(){Bl(this,n)})}function nv(n,o){var i,s;return function(){var a=un(this,n),d=a.tween;if(d!==i){s=i=d;for(var f=0,h=s.length;f<h;++f)if(s[f].name===o){s=s.slice(),s.splice(f,1);break}}a.tween=s}}function rv(n,o,i){var s,a;if(typeof i!="function")throw new Error;return function(){var d=un(this,n),f=d.tween;if(f!==s){a=(s=f).slice();for(var h={name:o,value:i},m=0,y=a.length;m<y;++m)if(a[m].name===o){a[m]=h;break}m===y&&a.push(h)}d.tween=a}}function ov(n,o){var i=this._id;if(n+="",arguments.length<2){for(var s=Gt(this.node(),i).tween,a=0,d=s.length,f;a<d;++a)if((f=s[a]).name===n)return f.value;return null}return this.each((o==null?nv:rv)(i,n,o))}function Ta(n,o,i){var s=n._id;return n.each(function(){var a=un(this,s);(a.value||(a.value={}))[o]=i.apply(this,arguments)}),function(a){return Gt(a,s).value[o]}}function Ih(n,o){var i;return(typeof o=="number"?Zn:o instanceof ni?Ad:(i=ni(o))?(o=i,Ad):Oy)(n,o)}function iv(n){return function(){this.removeAttribute(n)}}function lv(n){return function(){this.removeAttributeNS(n.space,n.local)}}function sv(n,o,i){var s,a=i+"",d;return function(){var f=this.getAttribute(n);return f===a?null:f===s?d:d=o(s=f,i)}}function uv(n,o,i){var s,a=i+"",d;return function(){var f=this.getAttributeNS(n.space,n.local);return f===a?null:f===s?d:d=o(s=f,i)}}function av(n,o,i){var s,a,d;return function(){var f,h=i(this),m;return h==null?void this.removeAttribute(n):(f=this.getAttribute(n),m=h+"",f===m?null:f===s&&m===a?d:(a=m,d=o(s=f,h)))}}function cv(n,o,i){var s,a,d;return function(){var f,h=i(this),m;return h==null?void this.removeAttributeNS(n.space,n.local):(f=this.getAttributeNS(n.space,n.local),m=h+"",f===m?null:f===s&&m===a?d:(a=m,d=o(s=f,h)))}}function fv(n,o){var i=bl(n),s=i==="transform"?Wy:Ih;return this.attrTween(n,typeof o=="function"?(i.local?cv:av)(i,s,Ta(this,"attr."+n,o)):o==null?(i.local?lv:iv)(i):(i.local?uv:sv)(i,s,o))}function dv(n,o){return function(i){this.setAttribute(n,o.call(this,i))}}function hv(n,o){return function(i){this.setAttributeNS(n.space,n.local,o.call(this,i))}}function pv(n,o){var i,s;function a(){var d=o.apply(this,arguments);return d!==s&&(i=(s=d)&&hv(n,d)),i}return a._value=o,a}function mv(n,o){var i,s;function a(){var d=o.apply(this,arguments);return d!==s&&(i=(s=d)&&dv(n,d)),i}return a._value=o,a}function gv(n,o){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;var s=bl(n);return this.tween(i,(s.local?pv:mv)(s,o))}function yv(n,o){return function(){Ma(this,n).delay=+o.apply(this,arguments)}}function vv(n,o){return o=+o,function(){Ma(this,n).delay=o}}function wv(n){var o=this._id;return arguments.length?this.each((typeof n=="function"?yv:vv)(o,n)):Gt(this.node(),o).delay}function xv(n,o){return function(){un(this,n).duration=+o.apply(this,arguments)}}function Sv(n,o){return o=+o,function(){un(this,n).duration=o}}function Ev(n){var o=this._id;return arguments.length?this.each((typeof n=="function"?xv:Sv)(o,n)):Gt(this.node(),o).duration}function _v(n,o){if(typeof o!="function")throw new Error;return function(){un(this,n).ease=o}}function kv(n){var o=this._id;return arguments.length?this.each(_v(o,n)):Gt(this.node(),o).ease}function Nv(n,o){return function(){var i=o.apply(this,arguments);if(typeof i!="function")throw new Error;un(this,n).ease=i}}function Cv(n){if(typeof n!="function")throw new Error;return this.each(Nv(this._id,n))}function zv(n){typeof n!="function"&&(n=fh(n));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var d=o[a],f=d.length,h=s[a]=[],m,y=0;y<f;++y)(m=d[y])&&n.call(m,m.__data__,y,d)&&h.push(m);return new Mn(s,this._parents,this._name,this._id)}function Mv(n){if(n._id!==this._id)throw new Error;for(var o=this._groups,i=n._groups,s=o.length,a=i.length,d=Math.min(s,a),f=new Array(s),h=0;h<d;++h)for(var m=o[h],y=i[h],g=m.length,v=f[h]=new Array(g),w,E=0;E<g;++E)(w=m[E]||y[E])&&(v[E]=w);for(;h<s;++h)f[h]=o[h];return new Mn(f,this._parents,this._name,this._id)}function Tv(n){return(n+"").trim().split(/^|\s+/).every(function(o){var i=o.indexOf(".");return i>=0&&(o=o.slice(0,i)),!o||o==="start"})}function Pv(n,o,i){var s,a,d=Tv(o)?Ma:un;return function(){var f=d(this,n),h=f.on;h!==s&&(a=(s=h).copy()).on(o,i),f.on=a}}function Av(n,o){var i=this._id;return arguments.length<2?Gt(this.node(),i).on.on(n):this.each(Pv(i,n,o))}function Rv(n){return function(){var o=this.parentNode;for(var i in this.__transition)if(+i!==n)return;o&&o.removeChild(this)}}function Iv(){return this.on("end.remove",Rv(this._id))}function Dv(n){var o=this._name,i=this._id;typeof n!="function"&&(n=ka(n));for(var s=this._groups,a=s.length,d=new Array(a),f=0;f<a;++f)for(var h=s[f],m=h.length,y=d[f]=new Array(m),g,v,w=0;w<m;++w)(g=h[w])&&(v=n.call(g,g.__data__,w,h))&&("__data__"in g&&(v.__data__=g.__data__),y[w]=v,ts(y[w],o,i,w,y,Gt(g,i)));return new Mn(d,this._parents,o,i)}function Lv(n){var o=this._name,i=this._id;typeof n!="function"&&(n=ch(n));for(var s=this._groups,a=s.length,d=[],f=[],h=0;h<a;++h)for(var m=s[h],y=m.length,g,v=0;v<y;++v)if(g=m[v]){for(var w=n.call(g,g.__data__,v,m),E,P=Gt(g,i),_=0,M=w.length;_<M;++_)(E=w[_])&&ts(E,o,i,_,w,P);d.push(w),f.push(g)}return new Mn(d,f,o,i)}var $v=si.prototype.constructor;function Fv(){return new $v(this._groups,this._parents)}function Hv(n,o){var i,s,a;return function(){var d=ro(this,n),f=(this.style.removeProperty(n),ro(this,n));return d===f?null:d===i&&f===s?a:a=o(i=d,s=f)}}function Dh(n){return function(){this.style.removeProperty(n)}}function Ov(n,o,i){var s,a=i+"",d;return function(){var f=ro(this,n);return f===a?null:f===s?d:d=o(s=f,i)}}function Vv(n,o,i){var s,a,d;return function(){var f=ro(this,n),h=i(this),m=h+"";return h==null&&(m=h=(this.style.removeProperty(n),ro(this,n))),f===m?null:f===s&&m===a?d:(a=m,d=o(s=f,h))}}function Bv(n,o){var i,s,a,d="style."+o,f="end."+d,h;return function(){var m=un(this,n),y=m.on,g=m.value[d]==null?h||(h=Dh(o)):void 0;(y!==i||a!==g)&&(s=(i=y).copy()).on(f,a=g),m.on=s}}function Uv(n,o,i){var s=(n+="")=="transform"?Uy:Ih;return o==null?this.styleTween(n,Hv(n,s)).on("end.style."+n,Dh(n)):typeof o=="function"?this.styleTween(n,Vv(n,s,Ta(this,"style."+n,o))).each(Bv(this._id,n)):this.styleTween(n,Ov(n,s,o),i).on("end.style."+n,null)}function Wv(n,o,i){return function(s){this.style.setProperty(n,o.call(this,s),i)}}function Yv(n,o,i){var s,a;function d(){var f=o.apply(this,arguments);return f!==a&&(s=(a=f)&&Wv(n,f,i)),s}return d._value=o,d}function Xv(n,o,i){var s="style."+(n+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(o==null)return this.tween(s,null);if(typeof o!="function")throw new Error;return this.tween(s,Yv(n,o,i??""))}function jv(n){return function(){this.textContent=n}}function Qv(n){return function(){var o=n(this);this.textContent=o??""}}function Kv(n){return this.tween("text",typeof n=="function"?Qv(Ta(this,"text",n)):jv(n==null?"":n+""))}function Gv(n){return function(o){this.textContent=n.call(this,o)}}function Zv(n){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&Gv(a)),o}return s._value=n,s}function qv(n){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,Zv(n))}function Jv(){for(var n=this._name,o=this._id,i=Lh(),s=this._groups,a=s.length,d=0;d<a;++d)for(var f=s[d],h=f.length,m,y=0;y<h;++y)if(m=f[y]){var g=Gt(m,o);ts(m,n,i,y,f,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new Mn(s,this._parents,n,i)}function bv(){var n,o,i=this,s=i._id,a=i.size();return new Promise(function(d,f){var h={value:f},m={value:function(){--a===0&&d()}};i.each(function(){var y=un(this,s),g=y.on;g!==n&&(o=(n=g).copy(),o._.cancel.push(h),o._.interrupt.push(h),o._.end.push(m)),y.on=o}),a===0&&d()})}var e1=0;function Mn(n,o,i,s){this._groups=n,this._parents=o,this._name=i,this._id=s}function Lh(){return++e1}var Nn=si.prototype;Mn.prototype={constructor:Mn,select:Dv,selectAll:Lv,selectChild:Nn.selectChild,selectChildren:Nn.selectChildren,filter:zv,merge:Mv,selection:Fv,transition:Jv,call:Nn.call,nodes:Nn.nodes,node:Nn.node,size:Nn.size,empty:Nn.empty,each:Nn.each,on:Av,attr:fv,attrTween:gv,style:Uv,styleTween:Xv,text:Kv,textTween:qv,remove:Iv,tween:ov,delay:wv,duration:Ev,ease:kv,easeVarying:Cv,end:bv,[Symbol.iterator]:Nn[Symbol.iterator]};function t1(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var n1={time:null,delay:0,duration:250,ease:t1};function r1(n,o){for(var i;!(i=n.__transition)||!(i=i[o]);)if(!(n=n.parentNode))throw new Error(`transition ${o} not found`);return i}function o1(n){var o,i;n instanceof Mn?(o=n._id,n=n._name):(o=Lh(),(i=n1).time=za(),n=n==null?null:n+"");for(var s=this._groups,a=s.length,d=0;d<a;++d)for(var f=s[d],h=f.length,m,y=0;y<h;++y)(m=f[y])&&ts(m,n,o,y,f,i||r1(m,o));return new Mn(s,this._parents,n,o)}si.prototype.interrupt=tv;si.prototype.transition=o1;const Il=n=>()=>n;function i1(n,{sourceEvent:o,target:i,transform:s,dispatch:a}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:a}})}function Cn(n,o,i){this.k=n,this.x=o,this.y=i}Cn.prototype={constructor:Cn,scale:function(n){return n===1?this:new Cn(this.k*n,this.x,this.y)},translate:function(n,o){return n===0&o===0?this:new Cn(this.k,this.x+this.k*n,this.y+this.k*o)},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 zn=new Cn(1,0,0);Cn.prototype;function ea(n){n.stopImmediatePropagation()}function jo(n){n.preventDefault(),n.stopImmediatePropagation()}function l1(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function s1(){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 Hd(){return this.__zoom||zn}function u1(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function a1(){return navigator.maxTouchPoints||"ontouchstart"in this}function c1(n,o,i){var s=n.invertX(o[0][0])-i[0][0],a=n.invertX(o[1][0])-i[1][0],d=n.invertY(o[0][1])-i[0][1],f=n.invertY(o[1][1])-i[1][1];return n.translate(a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a),f>d?(d+f)/2:Math.min(0,d)||Math.max(0,f))}function $h(){var n=l1,o=s1,i=c1,s=u1,a=a1,d=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,m=Qy,y=Jl("start","zoom","end"),g,v,w,E=500,P=150,_=0,M=10;function z(x){x.property("__zoom",Hd).on("wheel.zoom",J,{passive:!1}).on("mousedown.zoom",Q).on("dblclick.zoom",te).filter(a).on("touchstart.zoom",ee).on("touchmove.zoom",re).on("touchend.zoom touchcancel.zoom",b).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}z.transform=function(x,H,A,j){var D=x.selection?x.selection():x;D.property("__zoom",Hd),x!==D?Y(x,H,A,j):D.interrupt().each(function(){U(this,arguments).event(j).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},z.scaleBy=function(x,H,A,j){z.scaleTo(x,function(){var D=this.__zoom.k,N=typeof H=="function"?H.apply(this,arguments):H;return D*N},A,j)},z.scaleTo=function(x,H,A,j){z.transform(x,function(){var D=o.apply(this,arguments),N=this.__zoom,R=A==null?T(D):typeof A=="function"?A.apply(this,arguments):A,W=N.invert(R),X=typeof H=="function"?H.apply(this,arguments):H;return i(B($(N,X),R,W),D,f)},A,j)},z.translateBy=function(x,H,A,j){z.transform(x,function(){return i(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof A=="function"?A.apply(this,arguments):A),o.apply(this,arguments),f)},null,j)},z.translateTo=function(x,H,A,j,D){z.transform(x,function(){var N=o.apply(this,arguments),R=this.__zoom,W=j==null?T(N):typeof j=="function"?j.apply(this,arguments):j;return i(zn.translate(W[0],W[1]).scale(R.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof A=="function"?-A.apply(this,arguments):-A),N,f)},j,D)};function $(x,H){return H=Math.max(d[0],Math.min(d[1],H)),H===x.k?x:new Cn(H,x.x,x.y)}function B(x,H,A){var j=H[0]-A[0]*x.k,D=H[1]-A[1]*x.k;return j===x.x&&D===x.y?x:new Cn(x.k,j,D)}function T(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}function Y(x,H,A,j){x.on("start.zoom",function(){U(this,arguments).event(j).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(j).end()}).tween("zoom",function(){var D=this,N=arguments,R=U(D,N).event(j),W=o.apply(D,N),X=A==null?T(W):typeof A=="function"?A.apply(D,N):A,ie=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),oe=D.__zoom,fe=typeof H=="function"?H.apply(D,N):H,pe=m(oe.invert(X).concat(ie/oe.k),fe.invert(X).concat(ie/fe.k));return function(ve){if(ve===1)ve=fe;else{var we=pe(ve),Se=ie/we[2];ve=new Cn(Se,X[0]-we[0]*Se,X[1]-we[1]*Se)}R.zoom(null,ve)}})}function U(x,H,A){return!A&&x.__zooming||new K(x,H)}function K(x,H){this.that=x,this.args=H,this.active=0,this.sourceEvent=null,this.extent=o.apply(x,H),this.taps=0}K.prototype={event:function(x){return x&&(this.sourceEvent=x),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(x,H){return this.mouse&&x!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(x){var H=Dt(this.that).datum();y.call(x,this.that,new i1(x,{sourceEvent:this.sourceEvent,target:z,transform:this.that.__zoom,dispatch:y}),H)}};function J(x,...H){if(!n.apply(this,arguments))return;var A=U(this,H).event(x),j=this.__zoom,D=Math.max(d[0],Math.min(d[1],j.k*Math.pow(2,s.apply(this,arguments)))),N=jt(x);if(A.wheel)(A.mouse[0][0]!==N[0]||A.mouse[0][1]!==N[1])&&(A.mouse[1]=j.invert(A.mouse[0]=N)),clearTimeout(A.wheel);else{if(j.k===D)return;A.mouse=[N,j.invert(N)],Bl(this),A.start()}jo(x),A.wheel=setTimeout(R,P),A.zoom("mouse",i(B($(j,D),A.mouse[0],A.mouse[1]),A.extent,f));function R(){A.wheel=null,A.end()}}function Q(x,...H){if(w||!n.apply(this,arguments))return;var A=x.currentTarget,j=U(this,H,!0).event(x),D=Dt(x.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",ie,!0),N=jt(x,A),R=x.clientX,W=x.clientY;Sh(x.view),ea(x),j.mouse=[N,this.__zoom.invert(N)],Bl(this),j.start();function X(oe){if(jo(oe),!j.moved){var fe=oe.clientX-R,pe=oe.clientY-W;j.moved=fe*fe+pe*pe>_}j.event(oe).zoom("mouse",i(B(j.that.__zoom,j.mouse[0]=jt(oe,A),j.mouse[1]),j.extent,f))}function ie(oe){D.on("mousemove.zoom mouseup.zoom",null),Eh(oe.view,j.moved),jo(oe),j.event(oe).end()}}function te(x,...H){if(n.apply(this,arguments)){var A=this.__zoom,j=jt(x.changedTouches?x.changedTouches[0]:x,this),D=A.invert(j),N=A.k*(x.shiftKey?.5:2),R=i(B($(A,N),j,D),o.apply(this,H),f);jo(x),h>0?Dt(this).transition().duration(h).call(Y,R,j,x):Dt(this).call(z.transform,R,j,x)}}function ee(x,...H){if(n.apply(this,arguments)){var A=x.touches,j=A.length,D=U(this,H,x.changedTouches.length===j).event(x),N,R,W,X;for(ea(x),R=0;R<j;++R)W=A[R],X=jt(W,this),X=[X,this.__zoom.invert(X),W.identifier],D.touch0?!D.touch1&&D.touch0[2]!==X[2]&&(D.touch1=X,D.taps=0):(D.touch0=X,N=!0,D.taps=1+!!g);g&&(g=clearTimeout(g)),N&&(D.taps<2&&(v=X[0],g=setTimeout(function(){g=null},E)),Bl(this),D.start())}}function re(x,...H){if(this.__zooming){var A=U(this,H).event(x),j=x.changedTouches,D=j.length,N,R,W,X;for(jo(x),N=0;N<D;++N)R=j[N],W=jt(R,this),A.touch0&&A.touch0[2]===R.identifier?A.touch0[0]=W:A.touch1&&A.touch1[2]===R.identifier&&(A.touch1[0]=W);if(R=A.that.__zoom,A.touch1){var ie=A.touch0[0],oe=A.touch0[1],fe=A.touch1[0],pe=A.touch1[1],ve=(ve=fe[0]-ie[0])*ve+(ve=fe[1]-ie[1])*ve,we=(we=pe[0]-oe[0])*we+(we=pe[1]-oe[1])*we;R=$(R,Math.sqrt(ve/we)),W=[(ie[0]+fe[0])/2,(ie[1]+fe[1])/2],X=[(oe[0]+pe[0])/2,(oe[1]+pe[1])/2]}else if(A.touch0)W=A.touch0[0],X=A.touch0[1];else return;A.zoom("touch",i(B(R,W,X),A.extent,f))}}function b(x,...H){if(this.__zooming){var A=U(this,H).event(x),j=x.changedTouches,D=j.length,N,R;for(ea(x),w&&clearTimeout(w),w=setTimeout(function(){w=null},E),N=0;N<D;++N)R=j[N],A.touch0&&A.touch0[2]===R.identifier?delete A.touch0:A.touch1&&A.touch1[2]===R.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(R=jt(R,this),Math.hypot(v[0]-R[0],v[1]-R[1])<M)){var W=Dt(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return z.wheelDelta=function(x){return arguments.length?(s=typeof x=="function"?x:Il(+x),z):s},z.filter=function(x){return arguments.length?(n=typeof x=="function"?x:Il(!!x),z):n},z.touchable=function(x){return arguments.length?(a=typeof x=="function"?x:Il(!!x),z):a},z.extent=function(x){return arguments.length?(o=typeof x=="function"?x:Il([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),z):o},z.scaleExtent=function(x){return arguments.length?(d[0]=+x[0],d[1]=+x[1],z):[d[0],d[1]]},z.translateExtent=function(x){return arguments.length?(f[0][0]=+x[0][0],f[1][0]=+x[1][0],f[0][1]=+x[0][1],f[1][1]=+x[1][1],z):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},z.constrain=function(x){return arguments.length?(i=x,z):i},z.duration=function(x){return arguments.length?(h=+x,z):h},z.interpolate=function(x){return arguments.length?(m=x,z):m},z.on=function(){var x=y.on.apply(y,arguments);return x===y?z:x},z.clickDistance=function(x){return arguments.length?(_=(x=+x)*x,z):Math.sqrt(_)},z.tapDistance=function(x){return arguments.length?(M=+x,z):M},z}S0();const ns=O.createContext(null),f1=ns.Provider,Tn={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,o)=>`Couldn't create edge for ${n?"target":"source"} handle id: "${n?o.targetHandle:o.sourceHandle}", edge id: ${o.id}.`,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.`},Fh=Tn.error001();function Me(n,o){const i=O.useContext(ns);if(i===null)throw new Error(Fh);return uh(i,n,o)}const Ke=()=>{const n=O.useContext(ns);if(n===null)throw new Error(Fh);return O.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe,destroy:n.destroy}),[n])},d1=n=>n.userSelectionActive?"none":"all";function Pa({position:n,children:o,className:i,style:s,...a}){const d=Me(d1),f=`${n}`.split("-");return V.createElement("div",{className:tt(["react-flow__panel",i,...f]),style:{...s,pointerEvents:d},...a},o)}function h1({proOptions:n,position:o="bottom-right"}){return n!=null&&n.hideAttribution?null:V.createElement(Pa,{position:o,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},V.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const p1=({x:n,y:o,label:i,labelStyle:s={},labelShowBg:a=!0,labelBgStyle:d={},labelBgPadding:f=[2,4],labelBgBorderRadius:h=2,children:m,className:y,...g})=>{const v=O.useRef(null),[w,E]=O.useState({x:0,y:0,width:0,height:0}),P=tt(["react-flow__edge-textwrapper",y]);return O.useEffect(()=>{if(v.current){const _=v.current.getBBox();E({x:_.x,y:_.y,width:_.width,height:_.height})}},[i]),typeof i>"u"||!i?null:V.createElement("g",{transform:`translate(${n-w.width/2} ${o-w.height/2})`,className:P,visibility:w.width?"visible":"hidden",...g},a&&V.createElement("rect",{width:w.width+2*f[0],x:-f[0],y:-f[1],height:w.height+2*f[1],className:"react-flow__edge-textbg",style:d,rx:h,ry:h}),V.createElement("text",{className:"react-flow__edge-text",y:w.height/2,dy:"0.3em",ref:v,style:s},i),m)};var m1=O.memo(p1);const Aa=n=>({width:n.offsetWidth,height:n.offsetHeight}),io=(n,o=0,i=1)=>Math.min(Math.max(n,o),i),Ra=(n={x:0,y:0},o)=>({x:io(n.x,o[0][0],o[1][0]),y:io(n.y,o[0][1],o[1][1])}),Od=(n,o,i)=>n<o?io(Math.abs(n-o),1,50)/50:n>i?-io(Math.abs(n-i),1,50)/50:0,Hh=(n,o)=>{const i=Od(n.x,35,o.width-35)*20,s=Od(n.y,35,o.height-35)*20;return[i,s]},Oh=n=>{var o;return((o=n.getRootNode)==null?void 0:o.call(n))||(window==null?void 0:window.document)},Vh=(n,o)=>({x:Math.min(n.x,o.x),y:Math.min(n.y,o.y),x2:Math.max(n.x2,o.x2),y2:Math.max(n.y2,o.y2)}),oi=({x:n,y:o,width:i,height:s})=>({x:n,y:o,x2:n+i,y2:o+s}),Bh=({x:n,y:o,x2:i,y2:s})=>({x:n,y:o,width:i-n,height:s-o}),Vd=n=>({...n.positionAbsolute||{x:0,y:0},width:n.width||0,height:n.height||0}),g1=(n,o)=>Bh(Vh(oi(n),oi(o))),ma=(n,o)=>{const i=Math.max(0,Math.min(n.x+n.width,o.x+o.width)-Math.max(n.x,o.x)),s=Math.max(0,Math.min(n.y+n.height,o.y+o.height)-Math.max(n.y,o.y));return Math.ceil(i*s)},y1=n=>Lt(n.width)&&Lt(n.height)&&Lt(n.x)&&Lt(n.y),Lt=n=>!isNaN(n)&&isFinite(n),Ve=Symbol.for("internals"),Uh=["Enter"," ","Escape"],v1=(n,o)=>{},w1=n=>"nativeEvent"in n;function ga(n){var a,d;const o=w1(n)?n.nativeEvent:n,i=((d=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:d[0])||n.target;return["INPUT","SELECT","TEXTAREA"].includes(i==null?void 0:i.nodeName)||(i==null?void 0:i.hasAttribute("contenteditable"))||!!(i!=null&&i.closest(".nokey"))}const Wh=n=>"clientX"in n,bn=(n,o)=>{var d,f;const i=Wh(n),s=i?n.clientX:(d=n.touches)==null?void 0:d[0].clientX,a=i?n.clientY:(f=n.touches)==null?void 0:f[0].clientY;return{x:s-((o==null?void 0:o.left)??0),y:a-((o==null?void 0:o.top)??0)}},Kl=()=>{var n;return typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)==null?void 0:n.indexOf("Mac"))>=0},ai=({id:n,path:o,labelX:i,labelY:s,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y,style:g,markerEnd:v,markerStart:w,interactionWidth:E=20})=>V.createElement(V.Fragment,null,V.createElement("path",{id:n,style:g,d:o,fill:"none",className:"react-flow__edge-path",markerEnd:v,markerStart:w}),E&&V.createElement("path",{d:o,fill:"none",strokeOpacity:0,strokeWidth:E,className:"react-flow__edge-interaction"}),a&&Lt(i)&&Lt(s)?V.createElement(m1,{x:i,y:s,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y}):null);ai.displayName="BaseEdge";function Qo(n,o,i){return i===void 0?i:s=>{const a=o().edges.find(d=>d.id===n);a&&i(s,{...a})}}function Yh({sourceX:n,sourceY:o,targetX:i,targetY:s}){const a=Math.abs(i-n)/2,d=i<n?i+a:i-a,f=Math.abs(s-o)/2,h=s<o?s+f:s-f;return[d,h,a,f]}function Xh({sourceX:n,sourceY:o,targetX:i,targetY:s,sourceControlX:a,sourceControlY:d,targetControlX:f,targetControlY:h}){const m=n*.125+a*.375+f*.375+i*.125,y=o*.125+d*.375+h*.375+s*.125,g=Math.abs(m-n),v=Math.abs(y-o);return[m,y,g,v]}var Er;(function(n){n.Strict="strict",n.Loose="loose"})(Er||(Er={}));var vr;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(vr||(vr={}));var ii;(function(n){n.Partial="partial",n.Full="full"})(ii||(ii={}));var Jn;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Jn||(Jn={}));var Gl;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(Gl||(Gl={}));var he;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(he||(he={}));function Bd({pos:n,x1:o,y1:i,x2:s,y2:a}){return n===he.Left||n===he.Right?[.5*(o+s),i]:[o,.5*(i+a)]}function jh({sourceX:n,sourceY:o,sourcePosition:i=he.Bottom,targetX:s,targetY:a,targetPosition:d=he.Top}){const[f,h]=Bd({pos:i,x1:n,y1:o,x2:s,y2:a}),[m,y]=Bd({pos:d,x1:s,y1:a,x2:n,y2:o}),[g,v,w,E]=Xh({sourceX:n,sourceY:o,targetX:s,targetY:a,sourceControlX:f,sourceControlY:h,targetControlX:m,targetControlY:y});return[`M${n},${o} C${f},${h} ${m},${y} ${s},${a}`,g,v,w,E]}const Ia=O.memo(({sourceX:n,sourceY:o,targetX:i,targetY:s,sourcePosition:a=he.Bottom,targetPosition:d=he.Top,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:y,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:P,interactionWidth:_})=>{const[M,z,$]=jh({sourceX:n,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:d});return V.createElement(ai,{path:M,labelX:z,labelY:$,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:y,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:P,interactionWidth:_})});Ia.displayName="SimpleBezierEdge";const Ud={[he.Left]:{x:-1,y:0},[he.Right]:{x:1,y:0},[he.Top]:{x:0,y:-1},[he.Bottom]:{x:0,y:1}},x1=({source:n,sourcePosition:o=he.Bottom,target:i})=>o===he.Left||o===he.Right?n.x<i.x?{x:1,y:0}:{x:-1,y:0}:n.y<i.y?{x:0,y:1}:{x:0,y:-1},Wd=(n,o)=>Math.sqrt(Math.pow(o.x-n.x,2)+Math.pow(o.y-n.y,2));function S1({source:n,sourcePosition:o=he.Bottom,target:i,targetPosition:s=he.Top,center:a,offset:d}){const f=Ud[o],h=Ud[s],m={x:n.x+f.x*d,y:n.y+f.y*d},y={x:i.x+h.x*d,y:i.y+h.y*d},g=x1({source:m,sourcePosition:o,target:y}),v=g.x!==0?"x":"y",w=g[v];let E=[],P,_;const M={x:0,y:0},z={x:0,y:0},[$,B,T,Y]=Yh({sourceX:n.x,sourceY:n.y,targetX:i.x,targetY:i.y});if(f[v]*h[v]===-1){P=a.x??$,_=a.y??B;const K=[{x:P,y:m.y},{x:P,y:y.y}],J=[{x:m.x,y:_},{x:y.x,y:_}];f[v]===w?E=v==="x"?K:J:E=v==="x"?J:K}else{const K=[{x:m.x,y:y.y}],J=[{x:y.x,y:m.y}];if(v==="x"?E=f.x===w?J:K:E=f.y===w?K:J,o===s){const b=Math.abs(n[v]-i[v]);if(b<=d){const x=Math.min(d-1,d-b);f[v]===w?M[v]=(m[v]>n[v]?-1:1)*x:z[v]=(y[v]>i[v]?-1:1)*x}}if(o!==s){const b=v==="x"?"y":"x",x=f[v]===h[b],H=m[b]>y[b],A=m[b]<y[b];(f[v]===1&&(!x&&H||x&&A)||f[v]!==1&&(!x&&A||x&&H))&&(E=v==="x"?K:J)}const Q={x:m.x+M.x,y:m.y+M.y},te={x:y.x+z.x,y:y.y+z.y},ee=Math.max(Math.abs(Q.x-E[0].x),Math.abs(te.x-E[0].x)),re=Math.max(Math.abs(Q.y-E[0].y),Math.abs(te.y-E[0].y));ee>=re?(P=(Q.x+te.x)/2,_=E[0].y):(P=E[0].x,_=(Q.y+te.y)/2)}return[[n,{x:m.x+M.x,y:m.y+M.y},...E,{x:y.x+z.x,y:y.y+z.y},i],P,_,T,Y]}function E1(n,o,i,s){const a=Math.min(Wd(n,o)/2,Wd(o,i)/2,s),{x:d,y:f}=o;if(n.x===d&&d===i.x||n.y===f&&f===i.y)return`L${d} ${f}`;if(n.y===f){const y=n.x<i.x?-1:1,g=n.y<i.y?1:-1;return`L ${d+a*y},${f}Q ${d},${f} ${d},${f+a*g}`}const h=n.x<i.x?1:-1,m=n.y<i.y?-1:1;return`L ${d},${f+a*m}Q ${d},${f} ${d+a*h},${f}`}function ya({sourceX:n,sourceY:o,sourcePosition:i=he.Bottom,targetX:s,targetY:a,targetPosition:d=he.Top,borderRadius:f=5,centerX:h,centerY:m,offset:y=20}){const[g,v,w,E,P]=S1({source:{x:n,y:o},sourcePosition:i,target:{x:s,y:a},targetPosition:d,center:{x:h,y:m},offset:y});return[g.reduce((M,z,$)=>{let B="";return $>0&&$<g.length-1?B=E1(g[$-1],z,g[$+1],f):B=`${$===0?"M":"L"}${z.x} ${z.y}`,M+=B,M},""),v,w,E,P]}const rs=O.memo(({sourceX:n,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y,style:g,sourcePosition:v=he.Bottom,targetPosition:w=he.Top,markerEnd:E,markerStart:P,pathOptions:_,interactionWidth:M})=>{const[z,$,B]=ya({sourceX:n,sourceY:o,sourcePosition:v,targetX:i,targetY:s,targetPosition:w,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset});return V.createElement(ai,{path:z,labelX:$,labelY:B,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y,style:g,markerEnd:E,markerStart:P,interactionWidth:M})});rs.displayName="SmoothStepEdge";const Da=O.memo(n=>{var o;return V.createElement(rs,{...n,pathOptions:O.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})});Da.displayName="StepEdge";function _1({sourceX:n,sourceY:o,targetX:i,targetY:s}){const[a,d,f,h]=Yh({sourceX:n,sourceY:o,targetX:i,targetY:s});return[`M ${n},${o}L ${i},${s}`,a,d,f,h]}const La=O.memo(({sourceX:n,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y,style:g,markerEnd:v,markerStart:w,interactionWidth:E})=>{const[P,_,M]=_1({sourceX:n,sourceY:o,targetX:i,targetY:s});return V.createElement(ai,{path:P,labelX:_,labelY:M,label:a,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:y,style:g,markerEnd:v,markerStart:w,interactionWidth:E})});La.displayName="StraightEdge";function Dl(n,o){return n>=0?.5*n:o*25*Math.sqrt(-n)}function Yd({pos:n,x1:o,y1:i,x2:s,y2:a,c:d}){switch(n){case he.Left:return[o-Dl(o-s,d),i];case he.Right:return[o+Dl(s-o,d),i];case he.Top:return[o,i-Dl(i-a,d)];case he.Bottom:return[o,i+Dl(a-i,d)]}}function Qh({sourceX:n,sourceY:o,sourcePosition:i=he.Bottom,targetX:s,targetY:a,targetPosition:d=he.Top,curvature:f=.25}){const[h,m]=Yd({pos:i,x1:n,y1:o,x2:s,y2:a,c:f}),[y,g]=Yd({pos:d,x1:s,y1:a,x2:n,y2:o,c:f}),[v,w,E,P]=Xh({sourceX:n,sourceY:o,targetX:s,targetY:a,sourceControlX:h,sourceControlY:m,targetControlX:y,targetControlY:g});return[`M${n},${o} C${h},${m} ${y},${g} ${s},${a}`,v,w,E,P]}const Zl=O.memo(({sourceX:n,sourceY:o,targetX:i,targetY:s,sourcePosition:a=he.Bottom,targetPosition:d=he.Top,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:y,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:P,pathOptions:_,interactionWidth:M})=>{const[z,$,B]=Qh({sourceX:n,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:d,curvature:_==null?void 0:_.curvature});return V.createElement(ai,{path:z,labelX:$,labelY:B,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:y,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:P,interactionWidth:M})});Zl.displayName="BezierEdge";const $a=O.createContext(null),k1=$a.Provider;$a.Consumer;const N1=()=>O.useContext($a),C1=n=>"id"in n&&"source"in n&&"target"in n,z1=({source:n,sourceHandle:o,target:i,targetHandle:s})=>`reactflow__edge-${n}${o||""}-${i}${s||""}`,va=(n,o)=>typeof n>"u"?"":typeof n=="string"?n:`${o?`${o}__`:""}${Object.keys(n).sort().map(s=>`${s}=${n[s]}`).join("&")}`,M1=(n,o)=>o.some(i=>i.source===n.source&&i.target===n.target&&(i.sourceHandle===n.sourceHandle||!i.sourceHandle&&!n.sourceHandle)&&(i.targetHandle===n.targetHandle||!i.targetHandle&&!n.targetHandle)),T1=(n,o)=>{if(!n.source||!n.target)return o;let i;return C1(n)?i={...n}:i={...n,id:z1(n)},M1(i,o)?o:o.concat(i)},wa=({x:n,y:o},[i,s,a],d,[f,h])=>{const m={x:(n-i)/a,y:(o-s)/a};return d?{x:f*Math.round(m.x/f),y:h*Math.round(m.y/h)}:m},Kh=({x:n,y:o},[i,s,a])=>({x:n*a+i,y:o*a+s}),xr=(n,o=[0,0])=>{if(!n)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const i=(n.width??0)*o[0],s=(n.height??0)*o[1],a={x:n.position.x-i,y:n.position.y-s};return{...a,positionAbsolute:n.positionAbsolute?{x:n.positionAbsolute.x-i,y:n.positionAbsolute.y-s}:a}},os=(n,o=[0,0])=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const i=n.reduce((s,a)=>{const{x:d,y:f}=xr(a,o).positionAbsolute;return Vh(s,oi({x:d,y:f,width:a.width||0,height:a.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Bh(i)},Gh=(n,o,[i,s,a]=[0,0,1],d=!1,f=!1,h=[0,0])=>{const m={x:(o.x-i)/a,y:(o.y-s)/a,width:o.width/a,height:o.height/a},y=[];return n.forEach(g=>{const{width:v,height:w,selectable:E=!0,hidden:P=!1}=g;if(f&&!E||P)return!1;const{positionAbsolute:_}=xr(g,h),M={x:_.x,y:_.y,width:v||0,height:w||0},z=ma(m,M),$=typeof v>"u"||typeof w>"u"||v===null||w===null,B=d&&z>0,T=(v||0)*(w||0);($||B||z>=T||g.dragging)&&y.push(g)}),y},Zh=(n,o)=>{const i=n.map(s=>s.id);return o.filter(s=>i.includes(s.source)||i.includes(s.target))},qh=(n,o,i,s,a,d=.1)=>{const f=o/(n.width*(1+d)),h=i/(n.height*(1+d)),m=Math.min(f,h),y=io(m,s,a),g=n.x+n.width/2,v=n.y+n.height/2,w=o/2-g*y,E=i/2-v*y;return{x:w,y:E,zoom:y}},gr=(n,o=0)=>n.transition().duration(o);function Xd(n,o,i,s){return(o[i]||[]).reduce((a,d)=>{var f,h;return`${n.id}-${d.id}-${i}`!==s&&a.push({id:d.id||null,type:i,nodeId:n.id,x:(((f=n.positionAbsolute)==null?void 0:f.x)??0)+d.x+d.width/2,y:(((h=n.positionAbsolute)==null?void 0:h.y)??0)+d.y+d.height/2}),a},[])}function P1(n,o,i,s,a,d){const{x:f,y:h}=bn(n),y=o.elementsFromPoint(f,h).find(P=>P.classList.contains("react-flow__handle"));if(y){const P=y.getAttribute("data-nodeid");if(P){const _=Fa(void 0,y),M=y.getAttribute("data-handleid"),z=d({nodeId:P,id:M,type:_});if(z){const $=a.find(B=>B.nodeId===P&&B.type===_&&B.id===M);return{handle:{id:M,type:_,nodeId:P,x:($==null?void 0:$.x)||i.x,y:($==null?void 0:$.y)||i.y},validHandleResult:z}}}}let g=[],v=1/0;if(a.forEach(P=>{const _=Math.sqrt((P.x-i.x)**2+(P.y-i.y)**2);if(_<=s){const M=d(P);_<=v&&(_<v?g=[{handle:P,validHandleResult:M}]:_===v&&g.push({handle:P,validHandleResult:M}),v=_)}}),!g.length)return{handle:null,validHandleResult:Jh()};if(g.length===1)return g[0];const w=g.some(({validHandleResult:P})=>P.isValid),E=g.some(({handle:P})=>P.type==="target");return g.find(({handle:P,validHandleResult:_})=>E?P.type==="target":w?_.isValid:!0)||g[0]}const A1={source:null,target:null,sourceHandle:null,targetHandle:null},Jh=()=>({handleDomNode:null,isValid:!1,connection:A1,endHandle:null});function bh(n,o,i,s,a,d,f){const h=a==="target",m=f.querySelector(`.react-flow__handle[data-id="${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`),y={...Jh(),handleDomNode:m};if(m){const g=Fa(void 0,m),v=m.getAttribute("data-nodeid"),w=m.getAttribute("data-handleid"),E=m.classList.contains("connectable"),P=m.classList.contains("connectableend"),_={source:h?v:i,sourceHandle:h?w:s,target:h?i:v,targetHandle:h?s:w};y.connection=_,E&&P&&(o===Er.Strict?h&&g==="source"||!h&&g==="target":v!==i||w!==s)&&(y.endHandle={nodeId:v,handleId:w,type:g},y.isValid=d(_))}return y}function R1({nodes:n,nodeId:o,handleId:i,handleType:s}){return n.reduce((a,d)=>{if(d[Ve]){const{handleBounds:f}=d[Ve];let h=[],m=[];f&&(h=Xd(d,f,"source",`${o}-${i}-${s}`),m=Xd(d,f,"target",`${o}-${i}-${s}`)),a.push(...h,...m)}return a},[])}function Fa(n,o){return n||(o!=null&&o.classList.contains("target")?"target":o!=null&&o.classList.contains("source")?"source":null)}function ta(n){n==null||n.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function I1(n,o){let i=null;return o?i="valid":n&&!o&&(i="invalid"),i}function ep({event:n,handleId:o,nodeId:i,onConnect:s,isTarget:a,getState:d,setState:f,isValidConnection:h,edgeUpdaterType:m,onReconnectEnd:y}){const g=Oh(n.target),{connectionMode:v,domNode:w,autoPanOnConnect:E,connectionRadius:P,onConnectStart:_,panBy:M,getNodes:z,cancelConnection:$}=d();let B=0,T;const{x:Y,y:U}=bn(n),K=g==null?void 0:g.elementFromPoint(Y,U),J=Fa(m,K),Q=w==null?void 0:w.getBoundingClientRect();if(!Q||!J)return;let te,ee=bn(n,Q),re=!1,b=null,x=!1,H=null;const A=R1({nodes:z(),nodeId:i,handleId:o,handleType:J}),j=()=>{if(!E)return;const[R,W]=Hh(ee,Q);M({x:R,y:W}),B=requestAnimationFrame(j)};f({connectionPosition:ee,connectionStatus:null,connectionNodeId:i,connectionHandleId:o,connectionHandleType:J,connectionStartHandle:{nodeId:i,handleId:o,type:J},connectionEndHandle:null}),_==null||_(n,{nodeId:i,handleId:o,handleType:J});function D(R){const{transform:W}=d();ee=bn(R,Q);const{handle:X,validHandleResult:ie}=P1(R,g,wa(ee,W,!1,[1,1]),P,A,oe=>bh(oe,v,i,o,a?"target":"source",h,g));if(T=X,re||(j(),re=!0),H=ie.handleDomNode,b=ie.connection,x=ie.isValid,f({connectionPosition:T&&x?Kh({x:T.x,y:T.y},W):ee,connectionStatus:I1(!!T,x),connectionEndHandle:ie.endHandle}),!T&&!x&&!H)return ta(te);b.source!==b.target&&H&&(ta(te),te=H,H.classList.add("connecting","react-flow__handle-connecting"),H.classList.toggle("valid",x),H.classList.toggle("react-flow__handle-valid",x))}function N(R){var W,X;(T||H)&&b&&x&&(s==null||s(b)),(X=(W=d()).onConnectEnd)==null||X.call(W,R),m&&(y==null||y(R)),ta(te),$(),cancelAnimationFrame(B),re=!1,x=!1,b=null,H=null,g.removeEventListener("mousemove",D),g.removeEventListener("mouseup",N),g.removeEventListener("touchmove",D),g.removeEventListener("touchend",N)}g.addEventListener("mousemove",D),g.addEventListener("mouseup",N),g.addEventListener("touchmove",D),g.addEventListener("touchend",N)}const jd=()=>!0,D1=n=>({connectionStartHandle:n.connectionStartHandle,connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName}),L1=(n,o,i)=>s=>{const{connectionStartHandle:a,connectionEndHandle:d,connectionClickStartHandle:f}=s;return{connecting:(a==null?void 0:a.nodeId)===n&&(a==null?void 0:a.handleId)===o&&(a==null?void 0:a.type)===i||(d==null?void 0:d.nodeId)===n&&(d==null?void 0:d.handleId)===o&&(d==null?void 0:d.type)===i,clickConnecting:(f==null?void 0:f.nodeId)===n&&(f==null?void 0:f.handleId)===o&&(f==null?void 0:f.type)===i}},tp=O.forwardRef(({type:n="source",position:o=he.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:a=!0,isConnectableEnd:d=!0,id:f,onConnect:h,children:m,className:y,onMouseDown:g,onTouchStart:v,...w},E)=>{var Q,te;const P=f||null,_=n==="target",M=Ke(),z=N1(),{connectOnClick:$,noPanClassName:B}=Me(D1,Je),{connecting:T,clickConnecting:Y}=Me(L1(z,P,n),Je);z||(te=(Q=M.getState()).onError)==null||te.call(Q,"010",Tn.error010());const U=ee=>{const{defaultEdgeOptions:re,onConnect:b,hasDefaultEdges:x}=M.getState(),H={...re,...ee};if(x){const{edges:A,setEdges:j}=M.getState();j(T1(H,A))}b==null||b(H),h==null||h(H)},K=ee=>{if(!z)return;const re=Wh(ee);a&&(re&&ee.button===0||!re)&&ep({event:ee,handleId:P,nodeId:z,onConnect:U,isTarget:_,getState:M.getState,setState:M.setState,isValidConnection:i||M.getState().isValidConnection||jd}),re?g==null||g(ee):v==null||v(ee)},J=ee=>{const{onClickConnectStart:re,onClickConnectEnd:b,connectionClickStartHandle:x,connectionMode:H,isValidConnection:A}=M.getState();if(!z||!x&&!a)return;if(!x){re==null||re(ee,{nodeId:z,handleId:P,handleType:n}),M.setState({connectionClickStartHandle:{nodeId:z,type:n,handleId:P}});return}const j=Oh(ee.target),D=i||A||jd,{connection:N,isValid:R}=bh({nodeId:z,id:P,type:n},H,x.nodeId,x.handleId||null,x.type,D,j);R&&U(N),b==null||b(ee),M.setState({connectionClickStartHandle:null})};return V.createElement("div",{"data-handleid":P,"data-nodeid":z,"data-handlepos":o,"data-id":`${z}-${P}-${n}`,className:tt(["react-flow__handle",`react-flow__handle-${o}`,"nodrag",B,y,{source:!_,target:_,connectable:s,connectablestart:a,connectableend:d,connecting:Y,connectionindicator:s&&(a&&!T||d&&T)}]),onMouseDown:K,onTouchStart:K,onClick:$?J:void 0,ref:E,...w},m)});tp.displayName="Handle";var ql=O.memo(tp);const np=({data:n,isConnectable:o,targetPosition:i=he.Top,sourcePosition:s=he.Bottom})=>V.createElement(V.Fragment,null,V.createElement(ql,{type:"target",position:i,isConnectable:o}),n==null?void 0:n.label,V.createElement(ql,{type:"source",position:s,isConnectable:o}));np.displayName="DefaultNode";var xa=O.memo(np);const rp=({data:n,isConnectable:o,sourcePosition:i=he.Bottom})=>V.createElement(V.Fragment,null,n==null?void 0:n.label,V.createElement(ql,{type:"source",position:i,isConnectable:o}));rp.displayName="InputNode";var op=O.memo(rp);const ip=({data:n,isConnectable:o,targetPosition:i=he.Top})=>V.createElement(V.Fragment,null,V.createElement(ql,{type:"target",position:i,isConnectable:o}),n==null?void 0:n.label);ip.displayName="OutputNode";var lp=O.memo(ip);const Ha=()=>null;Ha.displayName="GroupNode";const $1=n=>({selectedNodes:n.getNodes().filter(o=>o.selected),selectedEdges:n.edges.filter(o=>o.selected).map(o=>({...o}))}),Ll=n=>n.id;function F1(n,o){return Je(n.selectedNodes.map(Ll),o.selectedNodes.map(Ll))&&Je(n.selectedEdges.map(Ll),o.selectedEdges.map(Ll))}const sp=O.memo(({onSelectionChange:n})=>{const o=Ke(),{selectedNodes:i,selectedEdges:s}=Me($1,F1);return O.useEffect(()=>{const a={nodes:i,edges:s};n==null||n(a),o.getState().onSelectionChange.forEach(d=>d(a))},[i,s,n]),null});sp.displayName="SelectionListener";const H1=n=>!!n.onSelectionChange;function O1({onSelectionChange:n}){const o=Me(H1);return n||o?V.createElement(sp,{onSelectionChange:n}):null}const V1=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset});function Gr(n,o){O.useEffect(()=>{typeof n<"u"&&o(n)},[n])}function xe(n,o,i){O.useEffect(()=>{typeof o<"u"&&i({[n]:o})},[o])}const B1=({nodes:n,edges:o,defaultNodes:i,defaultEdges:s,onConnect:a,onConnectStart:d,onConnectEnd:f,onClickConnectStart:h,onClickConnectEnd:m,nodesDraggable:y,nodesConnectable:g,nodesFocusable:v,edgesFocusable:w,edgesUpdatable:E,elevateNodesOnSelect:P,minZoom:_,maxZoom:M,nodeExtent:z,onNodesChange:$,onEdgesChange:B,elementsSelectable:T,connectionMode:Y,snapGrid:U,snapToGrid:K,translateExtent:J,connectOnClick:Q,defaultEdgeOptions:te,fitView:ee,fitViewOptions:re,onNodesDelete:b,onEdgesDelete:x,onNodeDrag:H,onNodeDragStart:A,onNodeDragStop:j,onSelectionDrag:D,onSelectionDragStart:N,onSelectionDragStop:R,noPanClassName:W,nodeOrigin:X,rfId:ie,autoPanOnConnect:oe,autoPanOnNodeDrag:fe,onError:pe,connectionRadius:ve,isValidConnection:we,nodeDragThreshold:Se})=>{const{setNodes:Ee,setEdges:$e,setDefaultNodesAndEdges:Fe,setMinZoom:Ue,setMaxZoom:We,setTranslateExtent:Ae,setNodeExtent:nt,reset:ke}=Me(V1,Je),de=Ke();return O.useEffect(()=>{const Xe=s==null?void 0:s.map(st=>({...st,...te}));return Fe(i,Xe),()=>{ke()}},[]),xe("defaultEdgeOptions",te,de.setState),xe("connectionMode",Y,de.setState),xe("onConnect",a,de.setState),xe("onConnectStart",d,de.setState),xe("onConnectEnd",f,de.setState),xe("onClickConnectStart",h,de.setState),xe("onClickConnectEnd",m,de.setState),xe("nodesDraggable",y,de.setState),xe("nodesConnectable",g,de.setState),xe("nodesFocusable",v,de.setState),xe("edgesFocusable",w,de.setState),xe("edgesUpdatable",E,de.setState),xe("elementsSelectable",T,de.setState),xe("elevateNodesOnSelect",P,de.setState),xe("snapToGrid",K,de.setState),xe("snapGrid",U,de.setState),xe("onNodesChange",$,de.setState),xe("onEdgesChange",B,de.setState),xe("connectOnClick",Q,de.setState),xe("fitViewOnInit",ee,de.setState),xe("fitViewOnInitOptions",re,de.setState),xe("onNodesDelete",b,de.setState),xe("onEdgesDelete",x,de.setState),xe("onNodeDrag",H,de.setState),xe("onNodeDragStart",A,de.setState),xe("onNodeDragStop",j,de.setState),xe("onSelectionDrag",D,de.setState),xe("onSelectionDragStart",N,de.setState),xe("onSelectionDragStop",R,de.setState),xe("noPanClassName",W,de.setState),xe("nodeOrigin",X,de.setState),xe("rfId",ie,de.setState),xe("autoPanOnConnect",oe,de.setState),xe("autoPanOnNodeDrag",fe,de.setState),xe("onError",pe,de.setState),xe("connectionRadius",ve,de.setState),xe("isValidConnection",we,de.setState),xe("nodeDragThreshold",Se,de.setState),Gr(n,Ee),Gr(o,$e),Gr(_,Ue),Gr(M,We),Gr(J,Ae),Gr(z,nt),null},Qd={display:"none"},U1={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},up="react-flow__node-desc",ap="react-flow__edge-desc",W1="react-flow__aria-live",Y1=n=>n.ariaLiveMessage;function X1({rfId:n}){const o=Me(Y1);return V.createElement("div",{id:`${W1}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:U1},o)}function j1({rfId:n,disableKeyboardA11y:o}){return V.createElement(V.Fragment,null,V.createElement("div",{id:`${up}-${n}`,style:Qd},"Press enter or space to select a node.",!o&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),V.createElement("div",{id:`${ap}-${n}`,style:Qd},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!o&&V.createElement(X1,{rfId:n}))}var li=(n=null,o={actInsideInputWithModifier:!0})=>{const[i,s]=O.useState(!1),a=O.useRef(!1),d=O.useRef(new Set([])),[f,h]=O.useMemo(()=>{if(n!==null){const y=(Array.isArray(n)?n:[n]).filter(v=>typeof v=="string").map(v=>v.split("+")),g=y.reduce((v,w)=>v.concat(...w),[]);return[y,g]}return[[],[]]},[n]);return O.useEffect(()=>{const m=typeof document<"u"?document:null,y=(o==null?void 0:o.target)||m;if(n!==null){const g=E=>{if(a.current=E.ctrlKey||E.metaKey||E.shiftKey,(!a.current||a.current&&!o.actInsideInputWithModifier)&&ga(E))return!1;const _=Gd(E.code,h);d.current.add(E[_]),Kd(f,d.current,!1)&&(E.preventDefault(),s(!0))},v=E=>{if((!a.current||a.current&&!o.actInsideInputWithModifier)&&ga(E))return!1;const _=Gd(E.code,h);Kd(f,d.current,!0)?(s(!1),d.current.clear()):d.current.delete(E[_]),E.key==="Meta"&&d.current.clear(),a.current=!1},w=()=>{d.current.clear(),s(!1)};return y==null||y.addEventListener("keydown",g),y==null||y.addEventListener("keyup",v),window.addEventListener("blur",w),()=>{y==null||y.removeEventListener("keydown",g),y==null||y.removeEventListener("keyup",v),window.removeEventListener("blur",w)}}},[n,s]),i};function Kd(n,o,i){return n.filter(s=>i||s.length===o.size).some(s=>s.every(a=>o.has(a)))}function Gd(n,o){return o.includes(n)?"code":"key"}function cp(n,o,i,s){var h,m;const a=n.parentNode||n.parentId;if(!a)return i;const d=o.get(a),f=xr(d,s);return cp(d,o,{x:(i.x??0)+f.x,y:(i.y??0)+f.y,z:(((h=d[Ve])==null?void 0:h.z)??0)>(i.z??0)?((m=d[Ve])==null?void 0:m.z)??0:i.z??0},s)}function fp(n,o,i){n.forEach(s=>{var d;const a=s.parentNode||s.parentId;if(a&&!n.has(a))throw new Error(`Parent node ${a} not found`);if(a||i!=null&&i[s.id]){const{x:f,y:h,z:m}=cp(s,n,{...s.position,z:((d=s[Ve])==null?void 0:d.z)??0},o);s.positionAbsolute={x:f,y:h},s[Ve].z=m,i!=null&&i[s.id]&&(s[Ve].isParent=!0)}})}function na(n,o,i,s){const a=new Map,d={},f=s?1e3:0;return n.forEach(h=>{var E;const m=(Lt(h.zIndex)?h.zIndex:0)+(h.selected?f:0),y=o.get(h.id),g={...h,positionAbsolute:{x:h.position.x,y:h.position.y}},v=h.parentNode||h.parentId;v&&(d[v]=!0);const w=(y==null?void 0:y.type)&&(y==null?void 0:y.type)!==h.type;Object.defineProperty(g,Ve,{enumerable:!1,value:{handleBounds:w||(E=y==null?void 0:y[Ve])==null?void 0:E.handleBounds,z:m}}),a.set(h.id,g)}),fp(a,i,d),a}function dp(n,o={}){const{getNodes:i,width:s,height:a,minZoom:d,maxZoom:f,d3Zoom:h,d3Selection:m,fitViewOnInitDone:y,fitViewOnInit:g,nodeOrigin:v}=n(),w=o.initial&&!y&&g;if(h&&m&&(w||!o.initial)){const P=i().filter(M=>{var $;const z=o.includeHiddenNodes?M.width&&M.height:!M.hidden;return($=o.nodes)!=null&&$.length?z&&o.nodes.some(B=>B.id===M.id):z}),_=P.every(M=>M.width&&M.height);if(P.length>0&&_){const M=os(P,v),{x:z,y:$,zoom:B}=qh(M,s,a,o.minZoom??d,o.maxZoom??f,o.padding??.1),T=zn.translate(z,$).scale(B);return typeof o.duration=="number"&&o.duration>0?h.transform(gr(m,o.duration),T):h.transform(m,T),!0}}return!1}function Q1(n,o){return n.forEach(i=>{const s=o.get(i.id);s&&o.set(s.id,{...s,[Ve]:s[Ve],selected:i.selected})}),new Map(o)}function K1(n,o){return o.map(i=>{const s=n.find(a=>a.id===i.id);return s&&(i.selected=s.selected),i})}function $l({changedNodes:n,changedEdges:o,get:i,set:s}){const{nodeInternals:a,edges:d,onNodesChange:f,onEdgesChange:h,hasDefaultNodes:m,hasDefaultEdges:y}=i();n!=null&&n.length&&(m&&s({nodeInternals:Q1(n,a)}),f==null||f(n)),o!=null&&o.length&&(y&&s({edges:K1(o,d)}),h==null||h(o))}const Zr=()=>{},G1={zoomIn:Zr,zoomOut:Zr,zoomTo:Zr,getZoom:()=>1,setViewport:Zr,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Zr,fitBounds:Zr,project:n=>n,screenToFlowPosition:n=>n,flowToScreenPosition:n=>n,viewportInitialized:!1},Z1=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection}),q1=()=>{const n=Ke(),{d3Zoom:o,d3Selection:i}=Me(Z1,Je);return O.useMemo(()=>i&&o?{zoomIn:a=>o.scaleBy(gr(i,a==null?void 0:a.duration),1.2),zoomOut:a=>o.scaleBy(gr(i,a==null?void 0:a.duration),1/1.2),zoomTo:(a,d)=>o.scaleTo(gr(i,d==null?void 0:d.duration),a),getZoom:()=>n.getState().transform[2],setViewport:(a,d)=>{const[f,h,m]=n.getState().transform,y=zn.translate(a.x??f,a.y??h).scale(a.zoom??m);o.transform(gr(i,d==null?void 0:d.duration),y)},getViewport:()=>{const[a,d,f]=n.getState().transform;return{x:a,y:d,zoom:f}},fitView:a=>dp(n.getState,a),setCenter:(a,d,f)=>{const{width:h,height:m,maxZoom:y}=n.getState(),g=typeof(f==null?void 0:f.zoom)<"u"?f.zoom:y,v=h/2-a*g,w=m/2-d*g,E=zn.translate(v,w).scale(g);o.transform(gr(i,f==null?void 0:f.duration),E)},fitBounds:(a,d)=>{const{width:f,height:h,minZoom:m,maxZoom:y}=n.getState(),{x:g,y:v,zoom:w}=qh(a,f,h,m,y,(d==null?void 0:d.padding)??.1),E=zn.translate(g,v).scale(w);o.transform(gr(i,d==null?void 0:d.duration),E)},project:a=>{const{transform:d,snapToGrid:f,snapGrid:h}=n.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),wa(a,d,f,h)},screenToFlowPosition:a=>{const{transform:d,snapToGrid:f,snapGrid:h,domNode:m}=n.getState();if(!m)return a;const{x:y,y:g}=m.getBoundingClientRect(),v={x:a.x-y,y:a.y-g};return wa(v,d,f,h)},flowToScreenPosition:a=>{const{transform:d,domNode:f}=n.getState();if(!f)return a;const{x:h,y:m}=f.getBoundingClientRect(),y=Kh(a,d);return{x:y.x+h,y:y.y+m}},viewportInitialized:!0}:G1,[o,i])};function Oa(){const n=q1(),o=Ke(),i=O.useCallback(()=>o.getState().getNodes().map(_=>({..._})),[]),s=O.useCallback(_=>o.getState().nodeInternals.get(_),[]),a=O.useCallback(()=>{const{edges:_=[]}=o.getState();return _.map(M=>({...M}))},[]),d=O.useCallback(_=>{const{edges:M=[]}=o.getState();return M.find(z=>z.id===_)},[]),f=O.useCallback(_=>{const{getNodes:M,setNodes:z,hasDefaultNodes:$,onNodesChange:B}=o.getState(),T=M(),Y=typeof _=="function"?_(T):_;if($)z(Y);else if(B){const U=Y.length===0?T.map(K=>({type:"remove",id:K.id})):Y.map(K=>({item:K,type:"reset"}));B(U)}},[]),h=O.useCallback(_=>{const{edges:M=[],setEdges:z,hasDefaultEdges:$,onEdgesChange:B}=o.getState(),T=typeof _=="function"?_(M):_;if($)z(T);else if(B){const Y=T.length===0?M.map(U=>({type:"remove",id:U.id})):T.map(U=>({item:U,type:"reset"}));B(Y)}},[]),m=O.useCallback(_=>{const M=Array.isArray(_)?_:[_],{getNodes:z,setNodes:$,hasDefaultNodes:B,onNodesChange:T}=o.getState();if(B){const U=[...z(),...M];$(U)}else if(T){const Y=M.map(U=>({item:U,type:"add"}));T(Y)}},[]),y=O.useCallback(_=>{const M=Array.isArray(_)?_:[_],{edges:z=[],setEdges:$,hasDefaultEdges:B,onEdgesChange:T}=o.getState();if(B)$([...z,...M]);else if(T){const Y=M.map(U=>({item:U,type:"add"}));T(Y)}},[]),g=O.useCallback(()=>{const{getNodes:_,edges:M=[],transform:z}=o.getState(),[$,B,T]=z;return{nodes:_().map(Y=>({...Y})),edges:M.map(Y=>({...Y})),viewport:{x:$,y:B,zoom:T}}},[]),v=O.useCallback(({nodes:_,edges:M})=>{const{nodeInternals:z,getNodes:$,edges:B,hasDefaultNodes:T,hasDefaultEdges:Y,onNodesDelete:U,onEdgesDelete:K,onNodesChange:J,onEdgesChange:Q}=o.getState(),te=(_||[]).map(H=>H.id),ee=(M||[]).map(H=>H.id),re=$().reduce((H,A)=>{const j=A.parentNode||A.parentId,D=!te.includes(A.id)&&j&&H.find(R=>R.id===j);return(typeof A.deletable=="boolean"?A.deletable:!0)&&(te.includes(A.id)||D)&&H.push(A),H},[]),b=B.filter(H=>typeof H.deletable=="boolean"?H.deletable:!0),x=b.filter(H=>ee.includes(H.id));if(re||x){const H=Zh(re,b),A=[...x,...H],j=A.reduce((D,N)=>(D.includes(N.id)||D.push(N.id),D),[]);if((Y||T)&&(Y&&o.setState({edges:B.filter(D=>!j.includes(D.id))}),T&&(re.forEach(D=>{z.delete(D.id)}),o.setState({nodeInternals:new Map(z)}))),j.length>0&&(K==null||K(A),Q&&Q(j.map(D=>({id:D,type:"remove"})))),re.length>0&&(U==null||U(re),J)){const D=re.map(N=>({id:N.id,type:"remove"}));J(D)}}},[]),w=O.useCallback(_=>{const M=y1(_),z=M?null:o.getState().nodeInternals.get(_.id);return!M&&!z?[null,null,M]:[M?_:Vd(z),z,M]},[]),E=O.useCallback((_,M=!0,z)=>{const[$,B,T]=w(_);return $?(z||o.getState().getNodes()).filter(Y=>{if(!T&&(Y.id===B.id||!Y.positionAbsolute))return!1;const U=Vd(Y),K=ma(U,$);return M&&K>0||K>=$.width*$.height}):[]},[]),P=O.useCallback((_,M,z=!0)=>{const[$]=w(_);if(!$)return!1;const B=ma($,M);return z&&B>0||B>=$.width*$.height},[]);return O.useMemo(()=>({...n,getNodes:i,getNode:s,getEdges:a,getEdge:d,setNodes:f,setEdges:h,addNodes:m,addEdges:y,toObject:g,deleteElements:v,getIntersectingNodes:E,isNodeIntersecting:P}),[n,i,s,a,d,f,h,m,y,g,v,E,P])}const J1={actInsideInputWithModifier:!1};var b1=({deleteKeyCode:n,multiSelectionKeyCode:o})=>{const i=Ke(),{deleteElements:s}=Oa(),a=li(n,J1),d=li(o);O.useEffect(()=>{if(a){const{edges:f,getNodes:h}=i.getState(),m=h().filter(g=>g.selected),y=f.filter(g=>g.selected);s({nodes:m,edges:y}),i.setState({nodesSelectionActive:!1})}},[a]),O.useEffect(()=>{i.setState({multiSelectionActive:d})},[d])};function ew(n){const o=Ke();O.useEffect(()=>{let i;const s=()=>{var d,f;if(!n.current)return;const a=Aa(n.current);(a.height===0||a.width===0)&&((f=(d=o.getState()).onError)==null||f.call(d,"004",Tn.error004())),o.setState({width:a.width||500,height:a.height||500})};return s(),window.addEventListener("resize",s),n.current&&(i=new ResizeObserver(()=>s()),i.observe(n.current)),()=>{window.removeEventListener("resize",s),i&&n.current&&i.unobserve(n.current)}},[])}const Va={position:"absolute",width:"100%",height:"100%",top:0,left:0},tw=(n,o)=>n.x!==o.x||n.y!==o.y||n.zoom!==o.k,Fl=n=>({x:n.x,y:n.y,zoom:n.k}),qr=(n,o)=>n.target.closest(`.${o}`),Zd=(n,o)=>o===2&&Array.isArray(n)&&n.includes(2),qd=n=>{const o=n.ctrlKey&&Kl()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*o},nw=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection,d3ZoomHandler:n.d3ZoomHandler,userSelectionActive:n.userSelectionActive}),rw=({onMove:n,onMoveStart:o,onMoveEnd:i,onPaneContextMenu:s,zoomOnScroll:a=!0,zoomOnPinch:d=!0,panOnScroll:f=!1,panOnScrollSpeed:h=.5,panOnScrollMode:m=vr.Free,zoomOnDoubleClick:y=!0,elementsSelectable:g,panOnDrag:v=!0,defaultViewport:w,translateExtent:E,minZoom:P,maxZoom:_,zoomActivationKeyCode:M,preventScrolling:z=!0,children:$,noWheelClassName:B,noPanClassName:T})=>{const Y=O.useRef(),U=Ke(),K=O.useRef(!1),J=O.useRef(!1),Q=O.useRef(null),te=O.useRef({x:0,y:0,zoom:0}),{d3Zoom:ee,d3Selection:re,d3ZoomHandler:b,userSelectionActive:x}=Me(nw,Je),H=li(M),A=O.useRef(0),j=O.useRef(!1),D=O.useRef();return ew(Q),O.useEffect(()=>{if(Q.current){const N=Q.current.getBoundingClientRect(),R=$h().scaleExtent([P,_]).translateExtent(E),W=Dt(Q.current).call(R),X=zn.translate(w.x,w.y).scale(io(w.zoom,P,_)),ie=[[0,0],[N.width,N.height]],oe=R.constrain()(X,ie,E);R.transform(W,oe),R.wheelDelta(qd),U.setState({d3Zoom:R,d3Selection:W,d3ZoomHandler:W.on("wheel.zoom"),transform:[oe.x,oe.y,oe.k],domNode:Q.current.closest(".react-flow")})}},[]),O.useEffect(()=>{re&&ee&&(f&&!H&&!x?re.on("wheel.zoom",N=>{if(qr(N,B))return!1;N.preventDefault(),N.stopImmediatePropagation();const R=re.property("__zoom").k||1;if(N.ctrlKey&&d){const we=jt(N),Se=qd(N),Ee=R*Math.pow(2,Se);ee.scaleTo(re,Ee,we,N);return}const W=N.deltaMode===1?20:1;let X=m===vr.Vertical?0:N.deltaX*W,ie=m===vr.Horizontal?0:N.deltaY*W;!Kl()&&N.shiftKey&&m!==vr.Vertical&&(X=N.deltaY*W,ie=0),ee.translateBy(re,-(X/R)*h,-(ie/R)*h,{internal:!0});const oe=Fl(re.property("__zoom")),{onViewportChangeStart:fe,onViewportChange:pe,onViewportChangeEnd:ve}=U.getState();clearTimeout(D.current),j.current||(j.current=!0,o==null||o(N,oe),fe==null||fe(oe)),j.current&&(n==null||n(N,oe),pe==null||pe(oe),D.current=setTimeout(()=>{i==null||i(N,oe),ve==null||ve(oe),j.current=!1},150))},{passive:!1}):typeof b<"u"&&re.on("wheel.zoom",function(N,R){if(!z&&N.type==="wheel"&&!N.ctrlKey||qr(N,B))return null;N.preventDefault(),b.call(this,N,R)},{passive:!1}))},[x,f,m,re,ee,b,H,d,z,B,o,n,i]),O.useEffect(()=>{ee&&ee.on("start",N=>{var X,ie;if(!N.sourceEvent||N.sourceEvent.internal)return null;A.current=(X=N.sourceEvent)==null?void 0:X.button;const{onViewportChangeStart:R}=U.getState(),W=Fl(N.transform);K.current=!0,te.current=W,((ie=N.sourceEvent)==null?void 0:ie.type)==="mousedown"&&U.setState({paneDragging:!0}),R==null||R(W),o==null||o(N.sourceEvent,W)})},[ee,o]),O.useEffect(()=>{ee&&(x&&!K.current?ee.on("zoom",null):x||ee.on("zoom",N=>{var W;const{onViewportChange:R}=U.getState();if(U.setState({transform:[N.transform.x,N.transform.y,N.transform.k]}),J.current=!!(s&&Zd(v,A.current??0)),(n||R)&&!((W=N.sourceEvent)!=null&&W.internal)){const X=Fl(N.transform);R==null||R(X),n==null||n(N.sourceEvent,X)}}))},[x,ee,n,v,s]),O.useEffect(()=>{ee&&ee.on("end",N=>{if(!N.sourceEvent||N.sourceEvent.internal)return null;const{onViewportChangeEnd:R}=U.getState();if(K.current=!1,U.setState({paneDragging:!1}),s&&Zd(v,A.current??0)&&!J.current&&s(N.sourceEvent),J.current=!1,(i||R)&&tw(te.current,N.transform)){const W=Fl(N.transform);te.current=W,clearTimeout(Y.current),Y.current=setTimeout(()=>{R==null||R(W),i==null||i(N.sourceEvent,W)},f?150:0)}})},[ee,f,v,i,s]),O.useEffect(()=>{ee&&ee.filter(N=>{const R=H||a,W=d&&N.ctrlKey;if((v===!0||Array.isArray(v)&&v.includes(1))&&N.button===1&&N.type==="mousedown"&&(qr(N,"react-flow__node")||qr(N,"react-flow__edge")))return!0;if(!v&&!R&&!f&&!y&&!d||x||!y&&N.type==="dblclick"||qr(N,B)&&N.type==="wheel"||qr(N,T)&&(N.type!=="wheel"||f&&N.type==="wheel"&&!H)||!d&&N.ctrlKey&&N.type==="wheel"||!R&&!f&&!W&&N.type==="wheel"||!v&&(N.type==="mousedown"||N.type==="touchstart")||Array.isArray(v)&&!v.includes(N.button)&&N.type==="mousedown")return!1;const X=Array.isArray(v)&&v.includes(N.button)||!N.button||N.button<=1;return(!N.ctrlKey||N.type==="wheel")&&X})},[x,ee,a,d,f,y,v,g,H]),V.createElement("div",{className:"react-flow__renderer",ref:Q,style:Va},$)},ow=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function iw(){const{userSelectionActive:n,userSelectionRect:o}=Me(ow,Je);return n&&o?V.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:o.width,height:o.height,transform:`translate(${o.x}px, ${o.y}px)`}}):null}function Jd(n,o){const i=o.parentNode||o.parentId,s=n.find(a=>a.id===i);if(s){const a=o.position.x+o.width-s.width,d=o.position.y+o.height-s.height;if(a>0||d>0||o.position.x<0||o.position.y<0){if(s.style={...s.style},s.style.width=s.style.width??s.width,s.style.height=s.style.height??s.height,a>0&&(s.style.width+=a),d>0&&(s.style.height+=d),o.position.x<0){const f=Math.abs(o.position.x);s.position.x=s.position.x-f,s.style.width+=f,o.position.x=0}if(o.position.y<0){const f=Math.abs(o.position.y);s.position.y=s.position.y-f,s.style.height+=f,o.position.y=0}s.width=s.style.width,s.height=s.style.height}}}function hp(n,o){if(n.some(s=>s.type==="reset"))return n.filter(s=>s.type==="reset").map(s=>s.item);const i=n.filter(s=>s.type==="add").map(s=>s.item);return o.reduce((s,a)=>{const d=n.filter(h=>h.id===a.id);if(d.length===0)return s.push(a),s;const f={...a};for(const h of d)if(h)switch(h.type){case"select":{f.selected=h.selected;break}case"position":{typeof h.position<"u"&&(f.position=h.position),typeof h.positionAbsolute<"u"&&(f.positionAbsolute=h.positionAbsolute),typeof h.dragging<"u"&&(f.dragging=h.dragging),f.expandParent&&Jd(s,f);break}case"dimensions":{typeof h.dimensions<"u"&&(f.width=h.dimensions.width,f.height=h.dimensions.height),typeof h.updateStyle<"u"&&(f.style={...f.style||{},...h.dimensions}),typeof h.resizing=="boolean"&&(f.resizing=h.resizing),f.expandParent&&Jd(s,f);break}case"remove":return s}return s.push(f),s},i)}function pp(n,o){return hp(n,o)}function lw(n,o){return hp(n,o)}const qn=(n,o)=>({id:n,type:"select",selected:o});function br(n,o){return n.reduce((i,s)=>{const a=o.includes(s.id);return!s.selected&&a?(s.selected=!0,i.push(qn(s.id,!0))):s.selected&&!a&&(s.selected=!1,i.push(qn(s.id,!1))),i},[])}const ra=(n,o)=>i=>{i.target===o.current&&(n==null||n(i))},sw=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,dragging:n.paneDragging}),mp=O.memo(({isSelecting:n,selectionMode:o=ii.Full,panOnDrag:i,onSelectionStart:s,onSelectionEnd:a,onPaneClick:d,onPaneContextMenu:f,onPaneScroll:h,onPaneMouseEnter:m,onPaneMouseMove:y,onPaneMouseLeave:g,children:v})=>{const w=O.useRef(null),E=Ke(),P=O.useRef(0),_=O.useRef(0),M=O.useRef(),{userSelectionActive:z,elementsSelectable:$,dragging:B}=Me(sw,Je),T=()=>{E.setState({userSelectionActive:!1,userSelectionRect:null}),P.current=0,_.current=0},Y=b=>{d==null||d(b),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},U=b=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){b.preventDefault();return}f==null||f(b)},K=h?b=>h(b):void 0,J=b=>{const{resetSelectedElements:x,domNode:H}=E.getState();if(M.current=H==null?void 0:H.getBoundingClientRect(),!$||!n||b.button!==0||b.target!==w.current||!M.current)return;const{x:A,y:j}=bn(b,M.current);x(),E.setState({userSelectionRect:{width:0,height:0,startX:A,startY:j,x:A,y:j}}),s==null||s(b)},Q=b=>{const{userSelectionRect:x,nodeInternals:H,edges:A,transform:j,onNodesChange:D,onEdgesChange:N,nodeOrigin:R,getNodes:W}=E.getState();if(!n||!M.current||!x)return;E.setState({userSelectionActive:!0,nodesSelectionActive:!1});const X=bn(b,M.current),ie=x.startX??0,oe=x.startY??0,fe={...x,x:X.x<ie?X.x:ie,y:X.y<oe?X.y:oe,width:Math.abs(X.x-ie),height:Math.abs(X.y-oe)},pe=W(),ve=Gh(H,fe,j,o===ii.Partial,!0,R),we=Zh(ve,A).map(Ee=>Ee.id),Se=ve.map(Ee=>Ee.id);if(P.current!==Se.length){P.current=Se.length;const Ee=br(pe,Se);Ee.length&&(D==null||D(Ee))}if(_.current!==we.length){_.current=we.length;const Ee=br(A,we);Ee.length&&(N==null||N(Ee))}E.setState({userSelectionRect:fe})},te=b=>{if(b.button!==0)return;const{userSelectionRect:x}=E.getState();!z&&x&&b.target===w.current&&(Y==null||Y(b)),E.setState({nodesSelectionActive:P.current>0}),T(),a==null||a(b)},ee=b=>{z&&(E.setState({nodesSelectionActive:P.current>0}),a==null||a(b)),T()},re=$&&(n||z);return V.createElement("div",{className:tt(["react-flow__pane",{dragging:B,selection:n}]),onClick:re?void 0:ra(Y,w),onContextMenu:ra(U,w),onWheel:ra(K,w),onMouseEnter:re?void 0:m,onMouseDown:re?J:void 0,onMouseMove:re?Q:y,onMouseUp:re?te:void 0,onMouseLeave:re?ee:g,ref:w,style:Va},v,V.createElement(iw,null))});mp.displayName="Pane";function gp(n,o){const i=n.parentNode||n.parentId;if(!i)return!1;const s=o.get(i);return s?s.selected?!0:gp(s,o):!1}function bd(n,o,i){let s=n;do{if(s!=null&&s.matches(o))return!0;if(s===i.current)return!1;s=s.parentElement}while(s);return!1}function uw(n,o,i,s){return Array.from(n.values()).filter(a=>(a.selected||a.id===s)&&(!a.parentNode||a.parentId||!gp(a,n))&&(a.draggable||o&&typeof a.draggable>"u")).map(a=>{var d,f;return{id:a.id,position:a.position||{x:0,y:0},positionAbsolute:a.positionAbsolute||{x:0,y:0},distance:{x:i.x-(((d=a.positionAbsolute)==null?void 0:d.x)??0),y:i.y-(((f=a.positionAbsolute)==null?void 0:f.y)??0)},delta:{x:0,y:0},extent:a.extent,parentNode:a.parentNode||a.parentId,parentId:a.parentNode||a.parentId,width:a.width,height:a.height,expandParent:a.expandParent}})}function aw(n,o){return!o||o==="parent"?o:[o[0],[o[1][0]-(n.width||0),o[1][1]-(n.height||0)]]}function yp(n,o,i,s,a=[0,0],d){const f=aw(n,n.extent||s);let h=f;const m=n.parentNode||n.parentId;if(n.extent==="parent"&&!n.expandParent)if(m&&n.width&&n.height){const v=i.get(m),{x:w,y:E}=xr(v,a).positionAbsolute;h=v&&Lt(w)&&Lt(E)&&Lt(v.width)&&Lt(v.height)?[[w+n.width*a[0],E+n.height*a[1]],[w+v.width-n.width+n.width*a[0],E+v.height-n.height+n.height*a[1]]]:h}else d==null||d("005",Tn.error005()),h=f;else if(n.extent&&m&&n.extent!=="parent"){const v=i.get(m),{x:w,y:E}=xr(v,a).positionAbsolute;h=[[n.extent[0][0]+w,n.extent[0][1]+E],[n.extent[1][0]+w,n.extent[1][1]+E]]}let y={x:0,y:0};if(m){const v=i.get(m);y=xr(v,a).positionAbsolute}const g=h&&h!=="parent"?Ra(o,h):o;return{position:{x:g.x-y.x,y:g.y-y.y},positionAbsolute:g}}function oa({nodeId:n,dragItems:o,nodeInternals:i}){const s=o.map(a=>({...i.get(a.id),position:a.position,positionAbsolute:a.positionAbsolute}));return[n?s.find(a=>a.id===n):s[0],s]}const eh=(n,o,i,s)=>{const a=o.querySelectorAll(n);if(!a||!a.length)return null;const d=Array.from(a),f=o.getBoundingClientRect(),h={x:f.width*s[0],y:f.height*s[1]};return d.map(m=>{const y=m.getBoundingClientRect();return{id:m.getAttribute("data-handleid"),position:m.getAttribute("data-handlepos"),x:(y.left-f.left-h.x)/i,y:(y.top-f.top-h.y)/i,...Aa(m)}})};function Ko(n,o,i){return i===void 0?i:s=>{const a=o().nodeInternals.get(n);a&&i(s,{...a})}}function Sa({id:n,store:o,unselect:i=!1,nodeRef:s}){const{addSelectedNodes:a,unselectNodesAndEdges:d,multiSelectionActive:f,nodeInternals:h,onError:m}=o.getState(),y=h.get(n);if(!y){m==null||m("012",Tn.error012(n));return}o.setState({nodesSelectionActive:!1}),y.selected?(i||y.selected&&f)&&(d({nodes:[y],edges:[]}),requestAnimationFrame(()=>{var g;return(g=s==null?void 0:s.current)==null?void 0:g.blur()})):a([n])}function cw(){const n=Ke();return O.useCallback(({sourceEvent:i})=>{const{transform:s,snapGrid:a,snapToGrid:d}=n.getState(),f=i.touches?i.touches[0].clientX:i.clientX,h=i.touches?i.touches[0].clientY:i.clientY,m={x:(f-s[0])/s[2],y:(h-s[1])/s[2]};return{xSnapped:d?a[0]*Math.round(m.x/a[0]):m.x,ySnapped:d?a[1]*Math.round(m.y/a[1]):m.y,...m}},[])}function ia(n){return(o,i,s)=>n==null?void 0:n(o,s)}function vp({nodeRef:n,disabled:o=!1,noDragClassName:i,handleSelector:s,nodeId:a,isSelectable:d,selectNodesOnDrag:f}){const h=Ke(),[m,y]=O.useState(!1),g=O.useRef([]),v=O.useRef({x:null,y:null}),w=O.useRef(0),E=O.useRef(null),P=O.useRef({x:0,y:0}),_=O.useRef(null),M=O.useRef(!1),z=O.useRef(!1),$=O.useRef(!1),B=cw();return O.useEffect(()=>{if(n!=null&&n.current){const T=Dt(n.current),Y=({x:J,y:Q})=>{const{nodeInternals:te,onNodeDrag:ee,onSelectionDrag:re,updateNodePositions:b,nodeExtent:x,snapGrid:H,snapToGrid:A,nodeOrigin:j,onError:D}=h.getState();v.current={x:J,y:Q};let N=!1,R={x:0,y:0,x2:0,y2:0};if(g.current.length>1&&x){const X=os(g.current,j);R=oi(X)}if(g.current=g.current.map(X=>{const ie={x:J-X.distance.x,y:Q-X.distance.y};A&&(ie.x=H[0]*Math.round(ie.x/H[0]),ie.y=H[1]*Math.round(ie.y/H[1]));const oe=[[x[0][0],x[0][1]],[x[1][0],x[1][1]]];g.current.length>1&&x&&!X.extent&&(oe[0][0]=X.positionAbsolute.x-R.x+x[0][0],oe[1][0]=X.positionAbsolute.x+(X.width??0)-R.x2+x[1][0],oe[0][1]=X.positionAbsolute.y-R.y+x[0][1],oe[1][1]=X.positionAbsolute.y+(X.height??0)-R.y2+x[1][1]);const fe=yp(X,ie,te,oe,j,D);return N=N||X.position.x!==fe.position.x||X.position.y!==fe.position.y,X.position=fe.position,X.positionAbsolute=fe.positionAbsolute,X}),!N)return;b(g.current,!0,!0),y(!0);const W=a?ee:ia(re);if(W&&_.current){const[X,ie]=oa({nodeId:a,dragItems:g.current,nodeInternals:te});W(_.current,X,ie)}},U=()=>{if(!E.current)return;const[J,Q]=Hh(P.current,E.current);if(J!==0||Q!==0){const{transform:te,panBy:ee}=h.getState();v.current.x=(v.current.x??0)-J/te[2],v.current.y=(v.current.y??0)-Q/te[2],ee({x:J,y:Q})&&Y(v.current)}w.current=requestAnimationFrame(U)},K=J=>{var j;const{nodeInternals:Q,multiSelectionActive:te,nodesDraggable:ee,unselectNodesAndEdges:re,onNodeDragStart:b,onSelectionDragStart:x}=h.getState();z.current=!0;const H=a?b:ia(x);(!f||!d)&&!te&&a&&((j=Q.get(a))!=null&&j.selected||re()),a&&d&&f&&Sa({id:a,store:h,nodeRef:n});const A=B(J);if(v.current=A,g.current=uw(Q,ee,A,a),H&&g.current){const[D,N]=oa({nodeId:a,dragItems:g.current,nodeInternals:Q});H(J.sourceEvent,D,N)}};if(o)T.on(".drag",null);else{const J=Sy().on("start",Q=>{const{domNode:te,nodeDragThreshold:ee}=h.getState();ee===0&&K(Q),$.current=!1;const re=B(Q);v.current=re,E.current=(te==null?void 0:te.getBoundingClientRect())||null,P.current=bn(Q.sourceEvent,E.current)}).on("drag",Q=>{var b,x;const te=B(Q),{autoPanOnNodeDrag:ee,nodeDragThreshold:re}=h.getState();if(Q.sourceEvent.type==="touchmove"&&Q.sourceEvent.touches.length>1&&($.current=!0),!$.current){if(!M.current&&z.current&&ee&&(M.current=!0,U()),!z.current){const H=te.xSnapped-(((b=v==null?void 0:v.current)==null?void 0:b.x)??0),A=te.ySnapped-(((x=v==null?void 0:v.current)==null?void 0:x.y)??0);Math.sqrt(H*H+A*A)>re&&K(Q)}(v.current.x!==te.xSnapped||v.current.y!==te.ySnapped)&&g.current&&z.current&&(_.current=Q.sourceEvent,P.current=bn(Q.sourceEvent,E.current),Y(te))}}).on("end",Q=>{if(!(!z.current||$.current)&&(y(!1),M.current=!1,z.current=!1,cancelAnimationFrame(w.current),g.current)){const{updateNodePositions:te,nodeInternals:ee,onNodeDragStop:re,onSelectionDragStop:b}=h.getState(),x=a?re:ia(b);if(te(g.current,!1,!1),x){const[H,A]=oa({nodeId:a,dragItems:g.current,nodeInternals:ee});x(Q.sourceEvent,H,A)}}}).filter(Q=>{const te=Q.target;return!Q.button&&(!i||!bd(te,`.${i}`,n))&&(!s||bd(te,s,n))});return T.call(J),()=>{T.on(".drag",null)}}}},[n,o,i,s,d,h,a,f,B]),m}function wp(){const n=Ke();return O.useCallback(i=>{const{nodeInternals:s,nodeExtent:a,updateNodePositions:d,getNodes:f,snapToGrid:h,snapGrid:m,onError:y,nodesDraggable:g}=n.getState(),v=f().filter($=>$.selected&&($.draggable||g&&typeof $.draggable>"u")),w=h?m[0]:5,E=h?m[1]:5,P=i.isShiftPressed?4:1,_=i.x*w*P,M=i.y*E*P,z=v.map($=>{if($.positionAbsolute){const B={x:$.positionAbsolute.x+_,y:$.positionAbsolute.y+M};h&&(B.x=m[0]*Math.round(B.x/m[0]),B.y=m[1]*Math.round(B.y/m[1]));const{positionAbsolute:T,position:Y}=yp($,B,s,a,void 0,y);$.position=Y,$.positionAbsolute=T}return $});d(z,!0,!1)},[])}const no={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Go=n=>{const o=({id:i,type:s,data:a,xPos:d,yPos:f,xPosOrigin:h,yPosOrigin:m,selected:y,onClick:g,onMouseEnter:v,onMouseMove:w,onMouseLeave:E,onContextMenu:P,onDoubleClick:_,style:M,className:z,isDraggable:$,isSelectable:B,isConnectable:T,isFocusable:Y,selectNodesOnDrag:U,sourcePosition:K,targetPosition:J,hidden:Q,resizeObserver:te,dragHandle:ee,zIndex:re,isParent:b,noDragClassName:x,noPanClassName:H,initialized:A,disableKeyboardA11y:j,ariaLabel:D,rfId:N,hasHandleBounds:R})=>{const W=Ke(),X=O.useRef(null),ie=O.useRef(null),oe=O.useRef(K),fe=O.useRef(J),pe=O.useRef(s),ve=B||$||g||v||w||E,we=wp(),Se=Ko(i,W.getState,v),Ee=Ko(i,W.getState,w),$e=Ko(i,W.getState,E),Fe=Ko(i,W.getState,P),Ue=Ko(i,W.getState,_),We=ke=>{const{nodeDragThreshold:de}=W.getState();if(B&&(!U||!$||de>0)&&Sa({id:i,store:W,nodeRef:X}),g){const Xe=W.getState().nodeInternals.get(i);Xe&&g(ke,{...Xe})}},Ae=ke=>{if(!ga(ke)&&!j)if(Uh.includes(ke.key)&&B){const de=ke.key==="Escape";Sa({id:i,store:W,unselect:de,nodeRef:X})}else $&&y&&Object.prototype.hasOwnProperty.call(no,ke.key)&&(W.setState({ariaLiveMessage:`Moved selected node ${ke.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~d}, y: ${~~f}`}),we({x:no[ke.key].x,y:no[ke.key].y,isShiftPressed:ke.shiftKey}))};O.useEffect(()=>()=>{ie.current&&(te==null||te.unobserve(ie.current),ie.current=null)},[]),O.useEffect(()=>{if(X.current&&!Q){const ke=X.current;(!A||!R||ie.current!==ke)&&(ie.current&&(te==null||te.unobserve(ie.current)),te==null||te.observe(ke),ie.current=ke)}},[Q,A,R]),O.useEffect(()=>{const ke=pe.current!==s,de=oe.current!==K,Xe=fe.current!==J;X.current&&(ke||de||Xe)&&(ke&&(pe.current=s),de&&(oe.current=K),Xe&&(fe.current=J),W.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,s,K,J]);const nt=vp({nodeRef:X,disabled:Q||!$,noDragClassName:x,handleSelector:ee,nodeId:i,isSelectable:B,selectNodesOnDrag:U});return Q?null:V.createElement("div",{className:tt(["react-flow__node",`react-flow__node-${s}`,{[H]:$},z,{selected:y,selectable:B,parent:b,dragging:nt}]),ref:X,style:{zIndex:re,transform:`translate(${h}px,${m}px)`,pointerEvents:ve?"all":"none",visibility:A?"visible":"hidden",...M},"data-id":i,"data-testid":`rf__node-${i}`,onMouseEnter:Se,onMouseMove:Ee,onMouseLeave:$e,onContextMenu:Fe,onClick:We,onDoubleClick:Ue,onKeyDown:Y?Ae:void 0,tabIndex:Y?0:void 0,role:Y?"button":void 0,"aria-describedby":j?void 0:`${up}-${N}`,"aria-label":D},V.createElement(k1,{value:i},V.createElement(n,{id:i,data:a,type:s,xPos:d,yPos:f,selected:y,isConnectable:T,sourcePosition:K,targetPosition:J,dragging:nt,dragHandle:ee,zIndex:re})))};return o.displayName="NodeWrapper",O.memo(o)};const fw=n=>{const o=n.getNodes().filter(i=>i.selected);return{...os(o,n.nodeOrigin),transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`,userSelectionActive:n.userSelectionActive}};function dw({onSelectionContextMenu:n,noPanClassName:o,disableKeyboardA11y:i}){const s=Ke(),{width:a,height:d,x:f,y:h,transformString:m,userSelectionActive:y}=Me(fw,Je),g=wp(),v=O.useRef(null);if(O.useEffect(()=>{var P;i||(P=v.current)==null||P.focus({preventScroll:!0})},[i]),vp({nodeRef:v}),y||!a||!d)return null;const w=n?P=>{const _=s.getState().getNodes().filter(M=>M.selected);n(P,_)}:void 0,E=P=>{Object.prototype.hasOwnProperty.call(no,P.key)&&g({x:no[P.key].x,y:no[P.key].y,isShiftPressed:P.shiftKey})};return V.createElement("div",{className:tt(["react-flow__nodesselection","react-flow__container",o]),style:{transform:m}},V.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:w,tabIndex:i?void 0:-1,onKeyDown:i?void 0:E,style:{width:a,height:d,top:h,left:f}}))}var hw=O.memo(dw);const pw=n=>n.nodesSelectionActive,xp=({children:n,onPaneClick:o,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:d,onPaneScroll:f,deleteKeyCode:h,onMove:m,onMoveStart:y,onMoveEnd:g,selectionKeyCode:v,selectionOnDrag:w,selectionMode:E,onSelectionStart:P,onSelectionEnd:_,multiSelectionKeyCode:M,panActivationKeyCode:z,zoomActivationKeyCode:$,elementsSelectable:B,zoomOnScroll:T,zoomOnPinch:Y,panOnScroll:U,panOnScrollSpeed:K,panOnScrollMode:J,zoomOnDoubleClick:Q,panOnDrag:te,defaultViewport:ee,translateExtent:re,minZoom:b,maxZoom:x,preventScrolling:H,onSelectionContextMenu:A,noWheelClassName:j,noPanClassName:D,disableKeyboardA11y:N})=>{const R=Me(pw),W=li(v),X=li(z),ie=X||te,oe=X||U,fe=W||w&&ie!==!0;return b1({deleteKeyCode:h,multiSelectionKeyCode:M}),V.createElement(rw,{onMove:m,onMoveStart:y,onMoveEnd:g,onPaneContextMenu:d,elementsSelectable:B,zoomOnScroll:T,zoomOnPinch:Y,panOnScroll:oe,panOnScrollSpeed:K,panOnScrollMode:J,zoomOnDoubleClick:Q,panOnDrag:!W&&ie,defaultViewport:ee,translateExtent:re,minZoom:b,maxZoom:x,zoomActivationKeyCode:$,preventScrolling:H,noWheelClassName:j,noPanClassName:D},V.createElement(mp,{onSelectionStart:P,onSelectionEnd:_,onPaneClick:o,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:d,onPaneScroll:f,panOnDrag:ie,isSelecting:!!fe,selectionMode:E},n,R&&V.createElement(hw,{onSelectionContextMenu:A,noPanClassName:D,disableKeyboardA11y:N})))};xp.displayName="FlowRenderer";var mw=O.memo(xp);function gw(n){return Me(O.useCallback(i=>n?Gh(i.nodeInternals,{x:0,y:0,width:i.width,height:i.height},i.transform,!0):i.getNodes(),[n]))}function yw(n){const o={input:Go(n.input||op),default:Go(n.default||xa),output:Go(n.output||lp),group:Go(n.group||Ha)},i={},s=Object.keys(n).filter(a=>!["input","default","output","group"].includes(a)).reduce((a,d)=>(a[d]=Go(n[d]||xa),a),i);return{...o,...s}}const vw=({x:n,y:o,width:i,height:s,origin:a})=>!i||!s?{x:n,y:o}:a[0]<0||a[1]<0||a[0]>1||a[1]>1?{x:n,y:o}:{x:n-i*a[0],y:o-s*a[1]},ww=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,updateNodeDimensions:n.updateNodeDimensions,onError:n.onError}),Sp=n=>{const{nodesDraggable:o,nodesConnectable:i,nodesFocusable:s,elementsSelectable:a,updateNodeDimensions:d,onError:f}=Me(ww,Je),h=gw(n.onlyRenderVisibleElements),m=O.useRef(),y=O.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const g=new ResizeObserver(v=>{const w=v.map(E=>({id:E.target.getAttribute("data-id"),nodeElement:E.target,forceUpdate:!0}));d(w)});return m.current=g,g},[]);return O.useEffect(()=>()=>{var g;(g=m==null?void 0:m.current)==null||g.disconnect()},[]),V.createElement("div",{className:"react-flow__nodes",style:Va},h.map(g=>{var Y,U,K;let v=g.type||"default";n.nodeTypes[v]||(f==null||f("003",Tn.error003(v)),v="default");const w=n.nodeTypes[v]||n.nodeTypes.default,E=!!(g.draggable||o&&typeof g.draggable>"u"),P=!!(g.selectable||a&&typeof g.selectable>"u"),_=!!(g.connectable||i&&typeof g.connectable>"u"),M=!!(g.focusable||s&&typeof g.focusable>"u"),z=n.nodeExtent?Ra(g.positionAbsolute,n.nodeExtent):g.positionAbsolute,$=(z==null?void 0:z.x)??0,B=(z==null?void 0:z.y)??0,T=vw({x:$,y:B,width:g.width??0,height:g.height??0,origin:n.nodeOrigin});return V.createElement(w,{key:g.id,id:g.id,className:g.className,style:g.style,type:v,data:g.data,sourcePosition:g.sourcePosition||he.Bottom,targetPosition:g.targetPosition||he.Top,hidden:g.hidden,xPos:$,yPos:B,xPosOrigin:T.x,yPosOrigin:T.y,selectNodesOnDrag:n.selectNodesOnDrag,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,selected:!!g.selected,isDraggable:E,isSelectable:P,isConnectable:_,isFocusable:M,resizeObserver:y,dragHandle:g.dragHandle,zIndex:((Y=g[Ve])==null?void 0:Y.z)??0,isParent:!!((U=g[Ve])!=null&&U.isParent),noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,initialized:!!g.width&&!!g.height,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,ariaLabel:g.ariaLabel,hasHandleBounds:!!((K=g[Ve])!=null&&K.handleBounds)})}))};Sp.displayName="NodeRenderer";var xw=O.memo(Sp);const Sw=(n,o,i)=>i===he.Left?n-o:i===he.Right?n+o:n,Ew=(n,o,i)=>i===he.Top?n-o:i===he.Bottom?n+o:n,th="react-flow__edgeupdater",nh=({position:n,centerX:o,centerY:i,radius:s=10,onMouseDown:a,onMouseEnter:d,onMouseOut:f,type:h})=>V.createElement("circle",{onMouseDown:a,onMouseEnter:d,onMouseOut:f,className:tt([th,`${th}-${h}`]),cx:Sw(o,s,n),cy:Ew(i,s,n),r:s,stroke:"transparent",fill:"transparent"}),_w=()=>!0;var Jr=n=>{const o=({id:i,className:s,type:a,data:d,onClick:f,onEdgeDoubleClick:h,selected:m,animated:y,label:g,labelStyle:v,labelShowBg:w,labelBgStyle:E,labelBgPadding:P,labelBgBorderRadius:_,style:M,source:z,target:$,sourceX:B,sourceY:T,targetX:Y,targetY:U,sourcePosition:K,targetPosition:J,elementsSelectable:Q,hidden:te,sourceHandleId:ee,targetHandleId:re,onContextMenu:b,onMouseEnter:x,onMouseMove:H,onMouseLeave:A,reconnectRadius:j,onReconnect:D,onReconnectStart:N,onReconnectEnd:R,markerEnd:W,markerStart:X,rfId:ie,ariaLabel:oe,isFocusable:fe,isReconnectable:pe,pathOptions:ve,interactionWidth:we,disableKeyboardA11y:Se})=>{const Ee=O.useRef(null),[$e,Fe]=O.useState(!1),[Ue,We]=O.useState(!1),Ae=Ke(),nt=O.useMemo(()=>`url('#${va(X,ie)}')`,[X,ie]),ke=O.useMemo(()=>`url('#${va(W,ie)}')`,[W,ie]);if(te)return null;const de=He=>{var ct;const{edges:vt,addSelectedEdges:Jt,unselectNodesAndEdges:bt,multiSelectionActive:dn}=Ae.getState(),wt=vt.find(hn=>hn.id===i);wt&&(Q&&(Ae.setState({nodesSelectionActive:!1}),wt.selected&&dn?(bt({nodes:[],edges:[wt]}),(ct=Ee.current)==null||ct.blur()):Jt([i])),f&&f(He,wt))},Xe=Qo(i,Ae.getState,h),st=Qo(i,Ae.getState,b),Nt=Qo(i,Ae.getState,x),Zt=Qo(i,Ae.getState,H),an=Qo(i,Ae.getState,A),Ct=(He,vt)=>{if(He.button!==0)return;const{edges:Jt,isValidConnection:bt}=Ae.getState(),dn=vt?$:z,wt=(vt?re:ee)||null,ct=vt?"target":"source",hn=bt||_w,er=vt,pn=Jt.find(tn=>tn.id===i);We(!0),N==null||N(He,pn,ct);const en=tn=>{We(!1),R==null||R(tn,pn,ct)};ep({event:He,handleId:wt,nodeId:dn,onConnect:tn=>D==null?void 0:D(pn,tn),isTarget:er,getState:Ae.getState,setState:Ae.setState,isValidConnection:hn,edgeUpdaterType:ct,onReconnectEnd:en})},cn=He=>Ct(He,!0),qt=He=>Ct(He,!1),$t=()=>Fe(!0),Ft=()=>Fe(!1),fn=!Q&&!f,Ht=He=>{var vt;if(!Se&&Uh.includes(He.key)&&Q){const{unselectNodesAndEdges:Jt,addSelectedEdges:bt,edges:dn}=Ae.getState();He.key==="Escape"?((vt=Ee.current)==null||vt.blur(),Jt({edges:[dn.find(ct=>ct.id===i)]})):bt([i])}};return V.createElement("g",{className:tt(["react-flow__edge",`react-flow__edge-${a}`,s,{selected:m,animated:y,inactive:fn,updating:$e}]),onClick:de,onDoubleClick:Xe,onContextMenu:st,onMouseEnter:Nt,onMouseMove:Zt,onMouseLeave:an,onKeyDown:fe?Ht:void 0,tabIndex:fe?0:void 0,role:fe?"button":"img","data-testid":`rf__edge-${i}`,"aria-label":oe===null?void 0:oe||`Edge from ${z} to ${$}`,"aria-describedby":fe?`${ap}-${ie}`:void 0,ref:Ee},!Ue&&V.createElement(n,{id:i,source:z,target:$,selected:m,animated:y,label:g,labelStyle:v,labelShowBg:w,labelBgStyle:E,labelBgPadding:P,labelBgBorderRadius:_,data:d,style:M,sourceX:B,sourceY:T,targetX:Y,targetY:U,sourcePosition:K,targetPosition:J,sourceHandleId:ee,targetHandleId:re,markerStart:nt,markerEnd:ke,pathOptions:ve,interactionWidth:we}),pe&&V.createElement(V.Fragment,null,(pe==="source"||pe===!0)&&V.createElement(nh,{position:K,centerX:B,centerY:T,radius:j,onMouseDown:cn,onMouseEnter:$t,onMouseOut:Ft,type:"source"}),(pe==="target"||pe===!0)&&V.createElement(nh,{position:J,centerX:Y,centerY:U,radius:j,onMouseDown:qt,onMouseEnter:$t,onMouseOut:Ft,type:"target"})))};return o.displayName="EdgeWrapper",O.memo(o)};function kw(n){const o={default:Jr(n.default||Zl),straight:Jr(n.bezier||La),step:Jr(n.step||Da),smoothstep:Jr(n.step||rs),simplebezier:Jr(n.simplebezier||Ia)},i={},s=Object.keys(n).filter(a=>!["default","bezier"].includes(a)).reduce((a,d)=>(a[d]=Jr(n[d]||Zl),a),i);return{...o,...s}}function rh(n,o,i=null){const s=((i==null?void 0:i.x)||0)+o.x,a=((i==null?void 0:i.y)||0)+o.y,d=(i==null?void 0:i.width)||o.width,f=(i==null?void 0:i.height)||o.height;switch(n){case he.Top:return{x:s+d/2,y:a};case he.Right:return{x:s+d,y:a+f/2};case he.Bottom:return{x:s+d/2,y:a+f};case he.Left:return{x:s,y:a+f/2}}}function oh(n,o){return n?n.length===1||!o?n[0]:o&&n.find(i=>i.id===o)||null:null}const Nw=(n,o,i,s,a,d)=>{const f=rh(i,n,o),h=rh(d,s,a);return{sourceX:f.x,sourceY:f.y,targetX:h.x,targetY:h.y}};function Cw({sourcePos:n,targetPos:o,sourceWidth:i,sourceHeight:s,targetWidth:a,targetHeight:d,width:f,height:h,transform:m}){const y={x:Math.min(n.x,o.x),y:Math.min(n.y,o.y),x2:Math.max(n.x+i,o.x+a),y2:Math.max(n.y+s,o.y+d)};y.x===y.x2&&(y.x2+=1),y.y===y.y2&&(y.y2+=1);const g=oi({x:(0-m[0])/m[2],y:(0-m[1])/m[2],width:f/m[2],height:h/m[2]}),v=Math.max(0,Math.min(g.x2,y.x2)-Math.max(g.x,y.x)),w=Math.max(0,Math.min(g.y2,y.y2)-Math.max(g.y,y.y));return Math.ceil(v*w)>0}function ih(n){var s,a,d,f,h;const o=((s=n==null?void 0:n[Ve])==null?void 0:s.handleBounds)||null,i=o&&(n==null?void 0:n.width)&&(n==null?void 0:n.height)&&typeof((a=n==null?void 0:n.positionAbsolute)==null?void 0:a.x)<"u"&&typeof((d=n==null?void 0:n.positionAbsolute)==null?void 0:d.y)<"u";return[{x:((f=n==null?void 0:n.positionAbsolute)==null?void 0:f.x)||0,y:((h=n==null?void 0:n.positionAbsolute)==null?void 0:h.y)||0,width:(n==null?void 0:n.width)||0,height:(n==null?void 0:n.height)||0},o,!!i]}const zw=[{level:0,isMaxLevel:!0,edges:[]}];function Mw(n,o,i=!1){let s=-1;const a=n.reduce((f,h)=>{var g,v;const m=Lt(h.zIndex);let y=m?h.zIndex:0;if(i){const w=o.get(h.target),E=o.get(h.source),P=h.selected||(w==null?void 0:w.selected)||(E==null?void 0:E.selected),_=Math.max(((g=E==null?void 0:E[Ve])==null?void 0:g.z)||0,((v=w==null?void 0:w[Ve])==null?void 0:v.z)||0,1e3);y=(m?h.zIndex:0)+(P?_:0)}return f[y]?f[y].push(h):f[y]=[h],s=y>s?y:s,f},{}),d=Object.entries(a).map(([f,h])=>{const m=+f;return{edges:h,level:m,isMaxLevel:m===s}});return d.length===0?zw:d}function Tw(n,o,i){const s=Me(O.useCallback(a=>n?a.edges.filter(d=>{const f=o.get(d.source),h=o.get(d.target);return(f==null?void 0:f.width)&&(f==null?void 0:f.height)&&(h==null?void 0:h.width)&&(h==null?void 0:h.height)&&Cw({sourcePos:f.positionAbsolute||{x:0,y:0},targetPos:h.positionAbsolute||{x:0,y:0},sourceWidth:f.width,sourceHeight:f.height,targetWidth:h.width,targetHeight:h.height,width:a.width,height:a.height,transform:a.transform})}):a.edges,[n,o]));return Mw(s,o,i)}const Pw=({color:n="none",strokeWidth:o=1})=>V.createElement("polyline",{style:{stroke:n,strokeWidth:o},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),Aw=({color:n="none",strokeWidth:o=1})=>V.createElement("polyline",{style:{stroke:n,fill:n,strokeWidth:o},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),lh={[Gl.Arrow]:Pw,[Gl.ArrowClosed]:Aw};function Rw(n){const o=Ke();return O.useMemo(()=>{var a,d;return Object.prototype.hasOwnProperty.call(lh,n)?lh[n]:((d=(a=o.getState()).onError)==null||d.call(a,"009",Tn.error009(n)),null)},[n])}const Iw=({id:n,type:o,color:i,width:s=12.5,height:a=12.5,markerUnits:d="strokeWidth",strokeWidth:f,orient:h="auto-start-reverse"})=>{const m=Rw(o);return m?V.createElement("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${s}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:d,orient:h,refX:"0",refY:"0"},V.createElement(m,{color:i,strokeWidth:f})):null},Dw=({defaultColor:n,rfId:o})=>i=>{const s=[];return i.edges.reduce((a,d)=>([d.markerStart,d.markerEnd].forEach(f=>{if(f&&typeof f=="object"){const h=va(f,o);s.includes(h)||(a.push({id:h,color:f.color||n,...f}),s.push(h))}}),a),[]).sort((a,d)=>a.id.localeCompare(d.id))},Ep=({defaultColor:n,rfId:o})=>{const i=Me(O.useCallback(Dw({defaultColor:n,rfId:o}),[n,o]),(s,a)=>!(s.length!==a.length||s.some((d,f)=>d.id!==a[f].id)));return V.createElement("defs",null,i.map(s=>V.createElement(Iw,{id:s.id,key:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient})))};Ep.displayName="MarkerDefinitions";var Lw=O.memo(Ep);const $w=n=>({nodesConnectable:n.nodesConnectable,edgesFocusable:n.edgesFocusable,edgesUpdatable:n.edgesUpdatable,elementsSelectable:n.elementsSelectable,width:n.width,height:n.height,connectionMode:n.connectionMode,nodeInternals:n.nodeInternals,onError:n.onError}),_p=({defaultMarkerColor:n,onlyRenderVisibleElements:o,elevateEdgesOnSelect:i,rfId:s,edgeTypes:a,noPanClassName:d,onEdgeContextMenu:f,onEdgeMouseEnter:h,onEdgeMouseMove:m,onEdgeMouseLeave:y,onEdgeClick:g,onEdgeDoubleClick:v,onReconnect:w,onReconnectStart:E,onReconnectEnd:P,reconnectRadius:_,children:M,disableKeyboardA11y:z})=>{const{edgesFocusable:$,edgesUpdatable:B,elementsSelectable:T,width:Y,height:U,connectionMode:K,nodeInternals:J,onError:Q}=Me($w,Je),te=Tw(o,J,i);return Y?V.createElement(V.Fragment,null,te.map(({level:ee,edges:re,isMaxLevel:b})=>V.createElement("svg",{key:ee,style:{zIndex:ee},width:Y,height:U,className:"react-flow__edges react-flow__container"},b&&V.createElement(Lw,{defaultColor:n,rfId:s}),V.createElement("g",null,re.map(x=>{const[H,A,j]=ih(J.get(x.source)),[D,N,R]=ih(J.get(x.target));if(!j||!R)return null;let W=x.type||"default";a[W]||(Q==null||Q("011",Tn.error011(W)),W="default");const X=a[W]||a.default,ie=K===Er.Strict?N.target:(N.target??[]).concat(N.source??[]),oe=oh(A.source,x.sourceHandle),fe=oh(ie,x.targetHandle),pe=(oe==null?void 0:oe.position)||he.Bottom,ve=(fe==null?void 0:fe.position)||he.Top,we=!!(x.focusable||$&&typeof x.focusable>"u"),Se=x.reconnectable||x.updatable,Ee=typeof w<"u"&&(Se||B&&typeof Se>"u");if(!oe||!fe)return Q==null||Q("008",Tn.error008(oe,x)),null;const{sourceX:$e,sourceY:Fe,targetX:Ue,targetY:We}=Nw(H,oe,pe,D,fe,ve);return V.createElement(X,{key:x.id,id:x.id,className:tt([x.className,d]),type:W,data:x.data,selected:!!x.selected,animated:!!x.animated,hidden:!!x.hidden,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,style:x.style,source:x.source,target:x.target,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerEnd:x.markerEnd,markerStart:x.markerStart,sourceX:$e,sourceY:Fe,targetX:Ue,targetY:We,sourcePosition:pe,targetPosition:ve,elementsSelectable:T,onContextMenu:f,onMouseEnter:h,onMouseMove:m,onMouseLeave:y,onClick:g,onEdgeDoubleClick:v,onReconnect:w,onReconnectStart:E,onReconnectEnd:P,reconnectRadius:_,rfId:s,ariaLabel:x.ariaLabel,isFocusable:we,isReconnectable:Ee,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth,disableKeyboardA11y:z})})))),M):null};_p.displayName="EdgeRenderer";var Fw=O.memo(_p);const Hw=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function Ow({children:n}){const o=Me(Hw);return V.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:o}},n)}function Vw(n){const o=Oa(),i=O.useRef(!1);O.useEffect(()=>{!i.current&&o.viewportInitialized&&n&&(setTimeout(()=>n(o),1),i.current=!0)},[n,o.viewportInitialized])}const Bw={[he.Left]:he.Right,[he.Right]:he.Left,[he.Top]:he.Bottom,[he.Bottom]:he.Top},kp=({nodeId:n,handleType:o,style:i,type:s=Jn.Bezier,CustomComponent:a,connectionStatus:d})=>{var U,K,J;const{fromNode:f,handleId:h,toX:m,toY:y,connectionMode:g}=Me(O.useCallback(Q=>({fromNode:Q.nodeInternals.get(n),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2],connectionMode:Q.connectionMode}),[n]),Je),v=(U=f==null?void 0:f[Ve])==null?void 0:U.handleBounds;let w=v==null?void 0:v[o];if(g===Er.Loose&&(w=w||(v==null?void 0:v[o==="source"?"target":"source"])),!f||!w)return null;const E=h?w.find(Q=>Q.id===h):w[0],P=E?E.x+E.width/2:(f.width??0)/2,_=E?E.y+E.height/2:f.height??0,M=(((K=f.positionAbsolute)==null?void 0:K.x)??0)+P,z=(((J=f.positionAbsolute)==null?void 0:J.y)??0)+_,$=E==null?void 0:E.position,B=$?Bw[$]:null;if(!$||!B)return null;if(a)return V.createElement(a,{connectionLineType:s,connectionLineStyle:i,fromNode:f,fromHandle:E,fromX:M,fromY:z,toX:m,toY:y,fromPosition:$,toPosition:B,connectionStatus:d});let T="";const Y={sourceX:M,sourceY:z,sourcePosition:$,targetX:m,targetY:y,targetPosition:B};return s===Jn.Bezier?[T]=Qh(Y):s===Jn.Step?[T]=ya({...Y,borderRadius:0}):s===Jn.SmoothStep?[T]=ya(Y):s===Jn.SimpleBezier?[T]=jh(Y):T=`M${M},${z} ${m},${y}`,V.createElement("path",{d:T,fill:"none",className:"react-flow__connection-path",style:i})};kp.displayName="ConnectionLine";const Uw=n=>({nodeId:n.connectionNodeId,handleType:n.connectionHandleType,nodesConnectable:n.nodesConnectable,connectionStatus:n.connectionStatus,width:n.width,height:n.height});function Ww({containerStyle:n,style:o,type:i,component:s}){const{nodeId:a,handleType:d,nodesConnectable:f,width:h,height:m,connectionStatus:y}=Me(Uw,Je);return!(a&&d&&h&&f)?null:V.createElement("svg",{style:n,width:h,height:m,className:"react-flow__edges react-flow__connectionline react-flow__container"},V.createElement("g",{className:tt(["react-flow__connection",y])},V.createElement(kp,{nodeId:a,handleType:d,style:o,type:i,CustomComponent:s,connectionStatus:y})))}function sh(n,o){return O.useRef(null),Ke(),O.useMemo(()=>o(n),[n])}const Np=({nodeTypes:n,edgeTypes:o,onMove:i,onMoveStart:s,onMoveEnd:a,onInit:d,onNodeClick:f,onEdgeClick:h,onNodeDoubleClick:m,onEdgeDoubleClick:y,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:w,onNodeContextMenu:E,onSelectionContextMenu:P,onSelectionStart:_,onSelectionEnd:M,connectionLineType:z,connectionLineStyle:$,connectionLineComponent:B,connectionLineContainerStyle:T,selectionKeyCode:Y,selectionOnDrag:U,selectionMode:K,multiSelectionKeyCode:J,panActivationKeyCode:Q,zoomActivationKeyCode:te,deleteKeyCode:ee,onlyRenderVisibleElements:re,elementsSelectable:b,selectNodesOnDrag:x,defaultViewport:H,translateExtent:A,minZoom:j,maxZoom:D,preventScrolling:N,defaultMarkerColor:R,zoomOnScroll:W,zoomOnPinch:X,panOnScroll:ie,panOnScrollSpeed:oe,panOnScrollMode:fe,zoomOnDoubleClick:pe,panOnDrag:ve,onPaneClick:we,onPaneMouseEnter:Se,onPaneMouseMove:Ee,onPaneMouseLeave:$e,onPaneScroll:Fe,onPaneContextMenu:Ue,onEdgeContextMenu:We,onEdgeMouseEnter:Ae,onEdgeMouseMove:nt,onEdgeMouseLeave:ke,onReconnect:de,onReconnectStart:Xe,onReconnectEnd:st,reconnectRadius:Nt,noDragClassName:Zt,noWheelClassName:an,noPanClassName:Ct,elevateEdgesOnSelect:cn,disableKeyboardA11y:qt,nodeOrigin:$t,nodeExtent:Ft,rfId:fn})=>{const Ht=sh(n,yw),He=sh(o,kw);return Vw(d),V.createElement(mw,{onPaneClick:we,onPaneMouseEnter:Se,onPaneMouseMove:Ee,onPaneMouseLeave:$e,onPaneContextMenu:Ue,onPaneScroll:Fe,deleteKeyCode:ee,selectionKeyCode:Y,selectionOnDrag:U,selectionMode:K,onSelectionStart:_,onSelectionEnd:M,multiSelectionKeyCode:J,panActivationKeyCode:Q,zoomActivationKeyCode:te,elementsSelectable:b,onMove:i,onMoveStart:s,onMoveEnd:a,zoomOnScroll:W,zoomOnPinch:X,zoomOnDoubleClick:pe,panOnScroll:ie,panOnScrollSpeed:oe,panOnScrollMode:fe,panOnDrag:ve,defaultViewport:H,translateExtent:A,minZoom:j,maxZoom:D,onSelectionContextMenu:P,preventScrolling:N,noDragClassName:Zt,noWheelClassName:an,noPanClassName:Ct,disableKeyboardA11y:qt},V.createElement(Ow,null,V.createElement(Fw,{edgeTypes:He,onEdgeClick:h,onEdgeDoubleClick:y,onlyRenderVisibleElements:re,onEdgeContextMenu:We,onEdgeMouseEnter:Ae,onEdgeMouseMove:nt,onEdgeMouseLeave:ke,onReconnect:de,onReconnectStart:Xe,onReconnectEnd:st,reconnectRadius:Nt,defaultMarkerColor:R,noPanClassName:Ct,elevateEdgesOnSelect:!!cn,disableKeyboardA11y:qt,rfId:fn},V.createElement(Ww,{style:$,type:z,component:B,containerStyle:T})),V.createElement("div",{className:"react-flow__edgelabel-renderer"}),V.createElement(xw,{nodeTypes:Ht,onNodeClick:f,onNodeDoubleClick:m,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:w,onNodeContextMenu:E,selectNodesOnDrag:x,onlyRenderVisibleElements:re,noPanClassName:Ct,noDragClassName:Zt,disableKeyboardA11y:qt,nodeOrigin:$t,nodeExtent:Ft,rfId:fn})))};Np.displayName="GraphView";var Yw=O.memo(Np);const Ea=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Gn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ea,nodeExtent:Ea,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Er.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:v1,isValidConnection:void 0},Xw=()=>I0((n,o)=>({...Gn,setNodes:i=>{const{nodeInternals:s,nodeOrigin:a,elevateNodesOnSelect:d}=o();n({nodeInternals:na(i,s,a,d)})},getNodes:()=>Array.from(o().nodeInternals.values()),setEdges:i=>{const{defaultEdgeOptions:s={}}=o();n({edges:i.map(a=>({...s,...a}))})},setDefaultNodesAndEdges:(i,s)=>{const a=typeof i<"u",d=typeof s<"u",f=a?na(i,new Map,o().nodeOrigin,o().elevateNodesOnSelect):new Map;n({nodeInternals:f,edges:d?s:[],hasDefaultNodes:a,hasDefaultEdges:d})},updateNodeDimensions:i=>{const{onNodesChange:s,nodeInternals:a,fitViewOnInit:d,fitViewOnInitDone:f,fitViewOnInitOptions:h,domNode:m,nodeOrigin:y}=o(),g=m==null?void 0:m.querySelector(".react-flow__viewport");if(!g)return;const v=window.getComputedStyle(g),{m22:w}=new window.DOMMatrixReadOnly(v.transform),E=i.reduce((_,M)=>{const z=a.get(M.id);if(z!=null&&z.hidden)a.set(z.id,{...z,[Ve]:{...z[Ve],handleBounds:void 0}});else if(z){const $=Aa(M.nodeElement);!!($.width&&$.height&&(z.width!==$.width||z.height!==$.height||M.forceUpdate))&&(a.set(z.id,{...z,[Ve]:{...z[Ve],handleBounds:{source:eh(".source",M.nodeElement,w,y),target:eh(".target",M.nodeElement,w,y)}},...$}),_.push({id:z.id,type:"dimensions",dimensions:$}))}return _},[]);fp(a,y);const P=f||d&&!f&&dp(o,{initial:!0,...h});n({nodeInternals:new Map(a),fitViewOnInitDone:P}),(E==null?void 0:E.length)>0&&(s==null||s(E))},updateNodePositions:(i,s=!0,a=!1)=>{const{triggerNodeChanges:d}=o(),f=i.map(h=>{const m={id:h.id,type:"position",dragging:a};return s&&(m.positionAbsolute=h.positionAbsolute,m.position=h.position),m});d(f)},triggerNodeChanges:i=>{const{onNodesChange:s,nodeInternals:a,hasDefaultNodes:d,nodeOrigin:f,getNodes:h,elevateNodesOnSelect:m}=o();if(i!=null&&i.length){if(d){const y=pp(i,h()),g=na(y,a,f,m);n({nodeInternals:g})}s==null||s(i)}},addSelectedNodes:i=>{const{multiSelectionActive:s,edges:a,getNodes:d}=o();let f,h=null;s?f=i.map(m=>qn(m,!0)):(f=br(d(),i),h=br(a,[])),$l({changedNodes:f,changedEdges:h,get:o,set:n})},addSelectedEdges:i=>{const{multiSelectionActive:s,edges:a,getNodes:d}=o();let f,h=null;s?f=i.map(m=>qn(m,!0)):(f=br(a,i),h=br(d(),[])),$l({changedNodes:h,changedEdges:f,get:o,set:n})},unselectNodesAndEdges:({nodes:i,edges:s}={})=>{const{edges:a,getNodes:d}=o(),f=i||d(),h=s||a,m=f.map(g=>(g.selected=!1,qn(g.id,!1))),y=h.map(g=>qn(g.id,!1));$l({changedNodes:m,changedEdges:y,get:o,set:n})},setMinZoom:i=>{const{d3Zoom:s,maxZoom:a}=o();s==null||s.scaleExtent([i,a]),n({minZoom:i})},setMaxZoom:i=>{const{d3Zoom:s,minZoom:a}=o();s==null||s.scaleExtent([a,i]),n({maxZoom:i})},setTranslateExtent:i=>{var s;(s=o().d3Zoom)==null||s.translateExtent(i),n({translateExtent:i})},resetSelectedElements:()=>{const{edges:i,getNodes:s}=o(),d=s().filter(h=>h.selected).map(h=>qn(h.id,!1)),f=i.filter(h=>h.selected).map(h=>qn(h.id,!1));$l({changedNodes:d,changedEdges:f,get:o,set:n})},setNodeExtent:i=>{const{nodeInternals:s}=o();s.forEach(a=>{a.positionAbsolute=Ra(a.position,i)}),n({nodeExtent:i,nodeInternals:new Map(s)})},panBy:i=>{const{transform:s,width:a,height:d,d3Zoom:f,d3Selection:h,translateExtent:m}=o();if(!f||!h||!i.x&&!i.y)return!1;const y=zn.translate(s[0]+i.x,s[1]+i.y).scale(s[2]),g=[[0,0],[a,d]],v=f==null?void 0:f.constrain()(y,g,m);return f.transform(h,v),s[0]!==v.x||s[1]!==v.y||s[2]!==v.k},cancelConnection:()=>n({connectionNodeId:Gn.connectionNodeId,connectionHandleId:Gn.connectionHandleId,connectionHandleType:Gn.connectionHandleType,connectionStatus:Gn.connectionStatus,connectionStartHandle:Gn.connectionStartHandle,connectionEndHandle:Gn.connectionEndHandle}),reset:()=>n({...Gn})}),Object.is),Cp=({children:n})=>{const o=O.useRef(null);return o.current||(o.current=Xw()),V.createElement(f1,{value:o.current},n)};Cp.displayName="ReactFlowProvider";const zp=({children:n})=>O.useContext(ns)?V.createElement(V.Fragment,null,n):V.createElement(Cp,null,n);zp.displayName="ReactFlowWrapper";const jw={input:op,default:xa,output:lp,group:Ha},Qw={default:Zl,straight:La,step:Da,smoothstep:rs,simplebezier:Ia},Kw=[0,0],Gw=[15,15],Zw={x:0,y:0,zoom:1},qw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Jw=O.forwardRef(({nodes:n,edges:o,defaultNodes:i,defaultEdges:s,className:a,nodeTypes:d=jw,edgeTypes:f=Qw,onNodeClick:h,onEdgeClick:m,onInit:y,onMove:g,onMoveStart:v,onMoveEnd:w,onConnect:E,onConnectStart:P,onConnectEnd:_,onClickConnectStart:M,onClickConnectEnd:z,onNodeMouseEnter:$,onNodeMouseMove:B,onNodeMouseLeave:T,onNodeContextMenu:Y,onNodeDoubleClick:U,onNodeDragStart:K,onNodeDrag:J,onNodeDragStop:Q,onNodesDelete:te,onEdgesDelete:ee,onSelectionChange:re,onSelectionDragStart:b,onSelectionDrag:x,onSelectionDragStop:H,onSelectionContextMenu:A,onSelectionStart:j,onSelectionEnd:D,connectionMode:N=Er.Strict,connectionLineType:R=Jn.Bezier,connectionLineStyle:W,connectionLineComponent:X,connectionLineContainerStyle:ie,deleteKeyCode:oe="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:pe=!1,selectionMode:ve=ii.Full,panActivationKeyCode:we="Space",multiSelectionKeyCode:Se=Kl()?"Meta":"Control",zoomActivationKeyCode:Ee=Kl()?"Meta":"Control",snapToGrid:$e=!1,snapGrid:Fe=Gw,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:We=!0,nodesDraggable:Ae,nodesConnectable:nt,nodesFocusable:ke,nodeOrigin:de=Kw,edgesFocusable:Xe,edgesUpdatable:st,elementsSelectable:Nt,defaultViewport:Zt=Zw,minZoom:an=.5,maxZoom:Ct=2,translateExtent:cn=Ea,preventScrolling:qt=!0,nodeExtent:$t,defaultMarkerColor:Ft="#b1b1b7",zoomOnScroll:fn=!0,zoomOnPinch:Ht=!0,panOnScroll:He=!1,panOnScrollSpeed:vt=.5,panOnScrollMode:Jt=vr.Free,zoomOnDoubleClick:bt=!0,panOnDrag:dn=!0,onPaneClick:wt,onPaneMouseEnter:ct,onPaneMouseMove:hn,onPaneMouseLeave:er,onPaneScroll:pn,onPaneContextMenu:en,children:mn,onEdgeContextMenu:tn,onEdgeDoubleClick:ci,onEdgeMouseEnter:fi,onEdgeMouseMove:di,onEdgeMouseLeave:hi,onEdgeUpdate:lo,onEdgeUpdateStart:pi,onEdgeUpdateEnd:tr,onReconnect:so,onReconnectStart:nr,onReconnectEnd:is,reconnectRadius:rr=10,edgeUpdaterRadius:_r=10,onNodesChange:kr,onEdgesChange:uo,noDragClassName:ls="nodrag",noWheelClassName:ss="nowheel",noPanClassName:mi="nopan",fitView:gn=!1,fitViewOptions:gi,connectOnClick:yi=!0,attributionPosition:us,proOptions:vi,defaultEdgeOptions:wi,elevateNodesOnSelect:xi=!0,elevateEdgesOnSelect:Si=!1,disableKeyboardA11y:Ei=!1,autoPanOnConnect:as=!0,autoPanOnNodeDrag:Ie=!0,connectionRadius:cs=20,isValidConnection:ao,onError:_i,style:Nr,id:ki,nodeDragThreshold:Ni,...Cr},zt)=>{const co=ki||"1";return V.createElement("div",{...Cr,style:{...Nr,...qw},ref:zt,className:tt(["react-flow",a]),"data-testid":"rf__wrapper",id:ki},V.createElement(zp,null,V.createElement(Yw,{onInit:y,onMove:g,onMoveStart:v,onMoveEnd:w,onNodeClick:h,onEdgeClick:m,onNodeMouseEnter:$,onNodeMouseMove:B,onNodeMouseLeave:T,onNodeContextMenu:Y,onNodeDoubleClick:U,nodeTypes:d,edgeTypes:f,connectionLineType:R,connectionLineStyle:W,connectionLineComponent:X,connectionLineContainerStyle:ie,selectionKeyCode:fe,selectionOnDrag:pe,selectionMode:ve,deleteKeyCode:oe,multiSelectionKeyCode:Se,panActivationKeyCode:we,zoomActivationKeyCode:Ee,onlyRenderVisibleElements:Ue,selectNodesOnDrag:We,defaultViewport:Zt,translateExtent:cn,minZoom:an,maxZoom:Ct,preventScrolling:qt,zoomOnScroll:fn,zoomOnPinch:Ht,zoomOnDoubleClick:bt,panOnScroll:He,panOnScrollSpeed:vt,panOnScrollMode:Jt,panOnDrag:dn,onPaneClick:wt,onPaneMouseEnter:ct,onPaneMouseMove:hn,onPaneMouseLeave:er,onPaneScroll:pn,onPaneContextMenu:en,onSelectionContextMenu:A,onSelectionStart:j,onSelectionEnd:D,onEdgeContextMenu:tn,onEdgeDoubleClick:ci,onEdgeMouseEnter:fi,onEdgeMouseMove:di,onEdgeMouseLeave:hi,onReconnect:so??lo,onReconnectStart:nr??pi,onReconnectEnd:is??tr,reconnectRadius:rr??_r,defaultMarkerColor:Ft,noDragClassName:ls,noWheelClassName:ss,noPanClassName:mi,elevateEdgesOnSelect:Si,rfId:co,disableKeyboardA11y:Ei,nodeOrigin:de,nodeExtent:$t}),V.createElement(B1,{nodes:n,edges:o,defaultNodes:i,defaultEdges:s,onConnect:E,onConnectStart:P,onConnectEnd:_,onClickConnectStart:M,onClickConnectEnd:z,nodesDraggable:Ae,nodesConnectable:nt,nodesFocusable:ke,edgesFocusable:Xe,edgesUpdatable:st,elementsSelectable:Nt,elevateNodesOnSelect:xi,minZoom:an,maxZoom:Ct,nodeExtent:$t,onNodesChange:kr,onEdgesChange:uo,snapToGrid:$e,snapGrid:Fe,connectionMode:N,translateExtent:cn,connectOnClick:yi,defaultEdgeOptions:wi,fitView:gn,fitViewOptions:gi,onNodesDelete:te,onEdgesDelete:ee,onNodeDragStart:K,onNodeDrag:J,onNodeDragStop:Q,onSelectionDrag:x,onSelectionDragStart:b,onSelectionDragStop:H,noPanClassName:mi,nodeOrigin:de,rfId:co,autoPanOnConnect:as,autoPanOnNodeDrag:Ie,onError:_i,connectionRadius:cs,isValidConnection:ao,nodeDragThreshold:Ni}),V.createElement(O1,{onSelectionChange:re}),mn,V.createElement(h1,{proOptions:vi,position:us}),V.createElement(j1,{rfId:co,disableKeyboardA11y:Ei})))});Jw.displayName="ReactFlow";function Mp(n){return o=>{const[i,s]=O.useState(o),a=O.useCallback(d=>s(f=>n(d,f)),[]);return[i,s,a]}}const xx=Mp(pp),Sx=Mp(lw),Tp=({id:n,x:o,y:i,width:s,height:a,style:d,color:f,strokeColor:h,strokeWidth:m,className:y,borderRadius:g,shapeRendering:v,onClick:w,selected:E})=>{const{background:P,backgroundColor:_}=d||{},M=f||P||_;return V.createElement("rect",{className:tt(["react-flow__minimap-node",{selected:E},y]),x:o,y:i,rx:g,ry:g,width:s,height:a,fill:M,stroke:h,strokeWidth:m,shapeRendering:v,onClick:w?z=>w(z,n):void 0})};Tp.displayName="MiniMapNode";var bw=O.memo(Tp);const ex=n=>n.nodeOrigin,tx=n=>n.getNodes().filter(o=>!o.hidden&&o.width&&o.height),la=n=>n instanceof Function?n:()=>n;function nx({nodeStrokeColor:n="transparent",nodeColor:o="#e2e2e2",nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a=2,nodeComponent:d=bw,onClick:f}){const h=Me(tx,Je),m=Me(ex),y=la(o),g=la(n),v=la(i),w=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return V.createElement(V.Fragment,null,h.map(E=>{const{x:P,y:_}=xr(E,m).positionAbsolute;return V.createElement(d,{key:E.id,x:P,y:_,width:E.width,height:E.height,style:E.style,selected:E.selected,className:v(E),color:y(E),borderRadius:s,strokeColor:g(E),strokeWidth:a,shapeRendering:w,onClick:f,id:E.id})}))}var rx=O.memo(nx);const ox=200,ix=150,lx=n=>{const o=n.getNodes(),i={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:i,boundingRect:o.length>0?g1(os(o,n.nodeOrigin),i):i,rfId:n.rfId}},sx="react-flow__minimap-desc";function Pp({style:n,className:o,nodeStrokeColor:i="transparent",nodeColor:s="#e2e2e2",nodeClassName:a="",nodeBorderRadius:d=5,nodeStrokeWidth:f=2,nodeComponent:h,maskColor:m="rgb(240, 240, 240, 0.6)",maskStrokeColor:y="none",maskStrokeWidth:g=1,position:v="bottom-right",onClick:w,onNodeClick:E,pannable:P=!1,zoomable:_=!1,ariaLabel:M="React Flow mini map",inversePan:z=!1,zoomStep:$=10,offsetScale:B=5}){const T=Ke(),Y=O.useRef(null),{boundingRect:U,viewBB:K,rfId:J}=Me(lx,Je),Q=(n==null?void 0:n.width)??ox,te=(n==null?void 0:n.height)??ix,ee=U.width/Q,re=U.height/te,b=Math.max(ee,re),x=b*Q,H=b*te,A=B*b,j=U.x-(x-U.width)/2-A,D=U.y-(H-U.height)/2-A,N=x+A*2,R=H+A*2,W=`${sx}-${J}`,X=O.useRef(0);X.current=b,O.useEffect(()=>{if(Y.current){const fe=Dt(Y.current),pe=Se=>{const{transform:Ee,d3Selection:$e,d3Zoom:Fe}=T.getState();if(Se.sourceEvent.type!=="wheel"||!$e||!Fe)return;const Ue=-Se.sourceEvent.deltaY*(Se.sourceEvent.deltaMode===1?.05:Se.sourceEvent.deltaMode?1:.002)*$,We=Ee[2]*Math.pow(2,Ue);Fe.scaleTo($e,We)},ve=Se=>{const{transform:Ee,d3Selection:$e,d3Zoom:Fe,translateExtent:Ue,width:We,height:Ae}=T.getState();if(Se.sourceEvent.type!=="mousemove"||!$e||!Fe)return;const nt=X.current*Math.max(1,Ee[2])*(z?-1:1),ke={x:Ee[0]-Se.sourceEvent.movementX*nt,y:Ee[1]-Se.sourceEvent.movementY*nt},de=[[0,0],[We,Ae]],Xe=zn.translate(ke.x,ke.y).scale(Ee[2]),st=Fe.constrain()(Xe,de,Ue);Fe.transform($e,st)},we=$h().on("zoom",P?ve:null).on("zoom.wheel",_?pe:null);return fe.call(we),()=>{fe.on("zoom",null)}}},[P,_,z,$]);const ie=w?fe=>{const pe=jt(fe);w(fe,{x:pe[0],y:pe[1]})}:void 0,oe=E?(fe,pe)=>{const ve=T.getState().nodeInternals.get(pe);E(fe,ve)}:void 0;return V.createElement(Pa,{position:v,style:n,className:tt(["react-flow__minimap",o]),"data-testid":"rf__minimap"},V.createElement("svg",{width:Q,height:te,viewBox:`${j} ${D} ${N} ${R}`,role:"img","aria-labelledby":W,ref:Y,onClick:ie},M&&V.createElement("title",{id:W},M),V.createElement(rx,{onClick:oe,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:d,nodeClassName:a,nodeStrokeWidth:f,nodeComponent:h}),V.createElement("path",{className:"react-flow__minimap-mask",d:`M${j-A},${D-A}h${N+A*2}v${R+A*2}h${-N-A*2}z
        M${K.x},${K.y}h${K.width}v${K.height}h${-K.width}z`,fill:m,fillRule:"evenodd",stroke:y,strokeWidth:g,pointerEvents:"none"})))}Pp.displayName="MiniMap";var Ex=O.memo(Pp);function ux(){return V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},V.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function ax(){return V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},V.createElement("path",{d:"M0 0h32v4.2H0z"}))}function cx(){return V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},V.createElement("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 fx(){return V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},V.createElement("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 dx(){return V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},V.createElement("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"}))}const Jo=({children:n,className:o,...i})=>V.createElement("button",{type:"button",className:tt(["react-flow__controls-button",o]),...i},n);Jo.displayName="ControlButton";const hx=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom}),Ap=({style:n,showZoom:o=!0,showFitView:i=!0,showInteractive:s=!0,fitViewOptions:a,onZoomIn:d,onZoomOut:f,onFitView:h,onInteractiveChange:m,className:y,children:g,position:v="bottom-left"})=>{const w=Ke(),[E,P]=O.useState(!1),{isInteractive:_,minZoomReached:M,maxZoomReached:z}=Me(hx,Je),{zoomIn:$,zoomOut:B,fitView:T}=Oa();if(O.useEffect(()=>{P(!0)},[]),!E)return null;const Y=()=>{$(),d==null||d()},U=()=>{B(),f==null||f()},K=()=>{T(a),h==null||h()},J=()=>{w.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),m==null||m(!_)};return V.createElement(Pa,{className:tt(["react-flow__controls",y]),position:v,style:n,"data-testid":"rf__controls"},o&&V.createElement(V.Fragment,null,V.createElement(Jo,{onClick:Y,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:z},V.createElement(ux,null)),V.createElement(Jo,{onClick:U,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:M},V.createElement(ax,null))),i&&V.createElement(Jo,{className:"react-flow__controls-fitview",onClick:K,title:"fit view","aria-label":"fit view"},V.createElement(cx,null)),s&&V.createElement(Jo,{className:"react-flow__controls-interactive",onClick:J,title:"toggle interactivity","aria-label":"toggle interactivity"},_?V.createElement(dx,null):V.createElement(fx,null)),g)};Ap.displayName="Controls";var _x=O.memo(Ap),Kt;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(Kt||(Kt={}));function px({color:n,dimensions:o,lineWidth:i}){return V.createElement("path",{stroke:n,strokeWidth:i,d:`M${o[0]/2} 0 V${o[1]} M0 ${o[1]/2} H${o[0]}`})}function mx({color:n,radius:o}){return V.createElement("circle",{cx:o,cy:o,r:o,fill:n})}const gx={[Kt.Dots]:"#91919a",[Kt.Lines]:"#eee",[Kt.Cross]:"#e2e2e2"},yx={[Kt.Dots]:1,[Kt.Lines]:1,[Kt.Cross]:6},vx=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function Rp({id:n,variant:o=Kt.Dots,gap:i=20,size:s,lineWidth:a=1,offset:d=2,color:f,style:h,className:m}){const y=O.useRef(null),{transform:g,patternId:v}=Me(vx,Je),w=f||gx[o],E=s||yx[o],P=o===Kt.Dots,_=o===Kt.Cross,M=Array.isArray(i)?i:[i,i],z=[M[0]*g[2]||1,M[1]*g[2]||1],$=E*g[2],B=_?[$,$]:z,T=P?[$/d,$/d]:[B[0]/d,B[1]/d];return V.createElement("svg",{className:tt(["react-flow__background",m]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:y,"data-testid":"rf__background"},V.createElement("pattern",{id:v+n,x:g[0]%z[0],y:g[1]%z[1],width:z[0],height:z[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`},P?V.createElement(mx,{color:w,radius:$/d}):V.createElement(px,{dimensions:B,color:w,lineWidth:a})),V.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${v+n})`}))}Rp.displayName="Background";var kx=O.memo(Rp);export{kx as B,_x as C,ql as H,Ex as M,he as P,Jw as R,xx as a,Sx as b,_0 as c,Kt as d,Gl as e,S0 as r,T0 as u};
//# sourceMappingURL=flow-BL2FLl3r.js.map
