agentix-cli 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-57MG4LBM.js → agent-I3ILI3MO.js} +2 -2
- package/dist/{board-dashboard-HXDOYGIG.js → board-dashboard-ASI6MDKX.js} +339 -97
- package/dist/board-dashboard-ASI6MDKX.js.map +1 -0
- package/dist/{chunk-WFHIIVLL.js → chunk-2B2DIQKD.js} +75 -51
- package/dist/chunk-2B2DIQKD.js.map +1 -0
- package/dist/{chunk-MBOLXKA2.js → chunk-5GDCJ2SF.js} +13 -6
- package/dist/chunk-5GDCJ2SF.js.map +1 -0
- package/dist/{chunk-23AUU4S2.js → chunk-5XZ73VM4.js} +38 -38
- package/dist/chunk-5XZ73VM4.js.map +1 -0
- package/dist/{chunk-DLVOHCTA.js → chunk-AANSVC5A.js} +2 -2
- package/dist/{chunk-TC3BSUP7.js → chunk-AGINLNAW.js} +2 -2
- package/dist/{chunk-6B74TO2J.js → chunk-BLRLUF2H.js} +2 -2
- package/dist/chunk-EQNM3TOF.js +15 -0
- package/dist/chunk-EQNM3TOF.js.map +1 -0
- package/dist/{chunk-WPPUOTY6.js → chunk-FUYZUGNQ.js} +2 -2
- package/dist/chunk-GSX4NK2N.js +2 -0
- package/dist/chunk-GSX4NK2N.js.map +1 -0
- package/dist/chunk-GV7S5BAX.js +2 -0
- package/dist/chunk-GV7S5BAX.js.map +1 -0
- package/dist/{chunk-7GVXCOLO.js → chunk-IFQQVDM6.js} +85 -83
- package/dist/chunk-IFQQVDM6.js.map +1 -0
- package/dist/{chunk-QW2OYR3N.js → chunk-K6MC66D6.js} +2 -2
- package/dist/chunk-SZDACK6O.js +2 -0
- package/dist/chunk-SZDACK6O.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/{config-QXWKEQON.js → config-RWHSEE4N.js} +2 -2
- package/dist/config-mutator-JKCNCY2F.js +2 -0
- package/dist/doctor-KWN7NUFQ.js +2 -0
- package/dist/index.js +1 -1
- package/dist/program-JEKM7SCS.js +2 -0
- package/dist/{registry-HM4ELSXS.js → registry-EGKDMVSP.js} +2 -2
- package/dist/runner-BFYDWPUO.js +2 -0
- package/dist/scheduler-ED4FCI2Y.js +2 -0
- package/dist/scheduler-ED4FCI2Y.js.map +1 -0
- package/dist/store-I3HEWVLQ.js +2 -0
- package/dist/store-I3HEWVLQ.js.map +1 -0
- package/dist/types-Y6ZCZ52Z.js +2 -0
- package/dist/types-Y6ZCZ52Z.js.map +1 -0
- package/dist/web/workflow-editor.global.js +12 -10
- package/dist/web/workflow-editor.global.js.map +1 -1
- package/package.json +1 -1
- package/dist/board-dashboard-HXDOYGIG.js.map +0 -1
- package/dist/chunk-23AUU4S2.js.map +0 -1
- package/dist/chunk-7GVXCOLO.js.map +0 -1
- package/dist/chunk-E4ZZILAK.js +0 -15
- package/dist/chunk-E4ZZILAK.js.map +0 -1
- package/dist/chunk-MBOLXKA2.js.map +0 -1
- package/dist/chunk-WFHIIVLL.js.map +0 -1
- package/dist/config-mutator-53XGR2NT.js +0 -2
- package/dist/doctor-SEOUFHSL.js +0 -2
- package/dist/program-WWCXMRU2.js +0 -2
- package/dist/scheduler-XVFIK4XH.js +0 -2
- /package/dist/{agent-57MG4LBM.js.map → agent-I3ILI3MO.js.map} +0 -0
- /package/dist/{chunk-DLVOHCTA.js.map → chunk-AANSVC5A.js.map} +0 -0
- /package/dist/{chunk-TC3BSUP7.js.map → chunk-AGINLNAW.js.map} +0 -0
- /package/dist/{chunk-6B74TO2J.js.map → chunk-BLRLUF2H.js.map} +0 -0
- /package/dist/{chunk-WPPUOTY6.js.map → chunk-FUYZUGNQ.js.map} +0 -0
- /package/dist/{chunk-QW2OYR3N.js.map → chunk-K6MC66D6.js.map} +0 -0
- /package/dist/{config-QXWKEQON.js.map → config-RWHSEE4N.js.map} +0 -0
- /package/dist/{config-mutator-53XGR2NT.js.map → config-mutator-JKCNCY2F.js.map} +0 -0
- /package/dist/{doctor-SEOUFHSL.js.map → doctor-KWN7NUFQ.js.map} +0 -0
- /package/dist/{program-WWCXMRU2.js.map → program-JEKM7SCS.js.map} +0 -0
- /package/dist/{registry-HM4ELSXS.js.map → registry-EGKDMVSP.js.map} +0 -0
- /package/dist/{scheduler-XVFIK4XH.js.map → runner-BFYDWPUO.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";(()=>{var Pp=Object.create;var ms=Object.defineProperty;var Tp=Object.getOwnPropertyDescriptor;var Mp=Object.getOwnPropertyNames;var Fp=Object.getPrototypeOf,Rp=Object.prototype.hasOwnProperty;var Nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ip=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mp(t))!Rp.call(e,o)&&o!==n&&ms(e,o,{get:()=>t[o],enumerable:!(r=Tp(t,o))||r.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?Pp(Fp(e)):{},Ip(t||!e||!e.__esModule?ms(n,"default",{value:e,enumerable:!0}):n,e));var Ts=Nt(H=>{"use strict";var pr=Symbol.for("react.element"),Lp=Symbol.for("react.portal"),zp=Symbol.for("react.fragment"),Ap=Symbol.for("react.strict_mode"),Dp=Symbol.for("react.profiler"),jp=Symbol.for("react.provider"),Up=Symbol.for("react.context"),Wp=Symbol.for("react.forward_ref"),Bp=Symbol.for("react.suspense"),Hp=Symbol.for("react.memo"),Gp=Symbol.for("react.lazy"),ys=Symbol.iterator;function $p(e){return e===null||typeof e!="object"?null:(e=ys&&e[ys]||e["@@iterator"],typeof e=="function"?e:null)}var ks={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_s=Object.assign,bs={};function Sn(e,t,n){this.props=e,this.context=t,this.refs=bs,this.updater=n||ks}Sn.prototype.isReactComponent={};Sn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Sn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ss(){}Ss.prototype=Sn.prototype;function Wi(e,t,n){this.props=e,this.context=t,this.refs=bs,this.updater=n||ks}var Bi=Wi.prototype=new Ss;Bi.constructor=Wi;_s(Bi,Sn.prototype);Bi.isPureReactComponent=!0;var xs=Array.isArray,Ns=Object.prototype.hasOwnProperty,Hi={current:null},Cs={key:!0,ref:!0,__self:!0,__source:!0};function Es(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Ns.call(t,r)&&!Cs.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)o[r]===void 0&&(o[r]=u[r]);return{$$typeof:pr,type:e,key:i,ref:a,props:o,_owner:Hi.current}}function Vp(e,t){return{$$typeof:pr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gi(e){return typeof e=="object"&&e!==null&&e.$$typeof===pr}function Kp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ws=/\/+/g;function Ui(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Kp(""+e.key):t.toString(36)}function uo(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case pr:case Lp:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Ui(a,0):r,xs(o)?(n="",e!=null&&(n=e.replace(ws,"$&/")+"/"),uo(o,t,n,"",function(c){return c})):o!=null&&(Gi(o)&&(o=Vp(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(ws,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",xs(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Ui(i,u);a+=uo(i,t,n,s,o)}else if(s=$p(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Ui(i,u++),a+=uo(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function so(e,t,n){if(e==null)return e;var r=[],o=0;return uo(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Qp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fe={current:null},co={transition:null},Jp={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:co,ReactCurrentOwner:Hi};function Ps(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:so,forEach:function(e,t,n){so(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return so(e,function(){t++}),t},toArray:function(e){return so(e,function(t){return t})||[]},only:function(e){if(!Gi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Sn;H.Fragment=zp;H.Profiler=Dp;H.PureComponent=Wi;H.StrictMode=Ap;H.Suspense=Bp;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jp;H.act=Ps;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_s({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Hi.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)Ns.call(t,s)&&!Cs.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&u!==void 0?u[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:pr,type:e.type,key:o,ref:i,props:r,_owner:a}};H.createContext=function(e){return e={$$typeof:Up,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:jp,_context:e},e.Consumer=e};H.createElement=Es;H.createFactory=function(e){var t=Es.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Wp,render:e}};H.isValidElement=Gi;H.lazy=function(e){return{$$typeof:Gp,_payload:{_status:-1,_result:e},_init:Qp}};H.memo=function(e,t){return{$$typeof:Hp,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=co.transition;co.transition={};try{e()}finally{co.transition=t}};H.unstable_act=Ps;H.useCallback=function(e,t){return Fe.current.useCallback(e,t)};H.useContext=function(e){return Fe.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)};H.useEffect=function(e,t){return Fe.current.useEffect(e,t)};H.useId=function(){return Fe.current.useId()};H.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Fe.current.useMemo(e,t)};H.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)};H.useRef=function(e){return Fe.current.useRef(e)};H.useState=function(e){return Fe.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return Fe.current.useTransition()};H.version="18.3.1"});var Ct=Nt((Om,Ms)=>{"use strict";Ms.exports=Ts()});var Us=Nt(Y=>{"use strict";function Qi(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<po(o,t))e[r]=t,e[n]=o,n=r;else break e}}function lt(e){return e.length===0?null:e[0]}function go(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var a=2*(r+1)-1,u=e[a],s=a+1,c=e[s];if(0>po(u,n))s<o&&0>po(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[a]=n,r=a);else if(s<o&&0>po(c,n))e[r]=c,e[s]=n,r=s;else break e}}return t}function po(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Fs=performance,Y.unstable_now=function(){return Fs.now()}):($i=Date,Rs=$i.now(),Y.unstable_now=function(){return $i.now()-Rs});var Fs,$i,Rs,vt=[],At=[],Yp=1,Ze=null,Se=3,ho=!1,on=!1,gr=!1,Ls=typeof setTimeout=="function"?setTimeout:null,zs=typeof clearTimeout=="function"?clearTimeout:null,Is=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ji(e){for(var t=lt(At);t!==null;){if(t.callback===null)go(At);else if(t.startTime<=e)go(At),t.sortIndex=t.expirationTime,Qi(vt,t);else break;t=lt(At)}}function Yi(e){if(gr=!1,Ji(e),!on)if(lt(vt)!==null)on=!0,qi(Xi);else{var t=lt(At);t!==null&&Zi(Yi,t.startTime-e)}}function Xi(e,t){on=!1,gr&&(gr=!1,zs(hr),hr=-1),ho=!0;var n=Se;try{for(Ji(t),Ze=lt(vt);Ze!==null&&(!(Ze.expirationTime>t)||e&&!js());){var r=Ze.callback;if(typeof r=="function"){Ze.callback=null,Se=Ze.priorityLevel;var o=r(Ze.expirationTime<=t);t=Y.unstable_now(),typeof o=="function"?Ze.callback=o:Ze===lt(vt)&&go(vt),Ji(t)}else go(vt);Ze=lt(vt)}if(Ze!==null)var i=!0;else{var a=lt(At);a!==null&&Zi(Yi,a.startTime-t),i=!1}return i}finally{Ze=null,Se=n,ho=!1}}var mo=!1,fo=null,hr=-1,As=5,Ds=-1;function js(){return!(Y.unstable_now()-Ds<As)}function Vi(){if(fo!==null){var e=Y.unstable_now();Ds=e;var t=!0;try{t=fo(!0,e)}finally{t?fr():(mo=!1,fo=null)}}else mo=!1}var fr;typeof Is=="function"?fr=function(){Is(Vi)}:typeof MessageChannel<"u"?(Ki=new MessageChannel,Os=Ki.port2,Ki.port1.onmessage=Vi,fr=function(){Os.postMessage(null)}):fr=function(){Ls(Vi,0)};var Ki,Os;function qi(e){fo=e,mo||(mo=!0,fr())}function Zi(e,t){hr=Ls(function(){e(Y.unstable_now())},t)}Y.unstable_IdlePriority=5;Y.unstable_ImmediatePriority=1;Y.unstable_LowPriority=4;Y.unstable_NormalPriority=3;Y.unstable_Profiling=null;Y.unstable_UserBlockingPriority=2;Y.unstable_cancelCallback=function(e){e.callback=null};Y.unstable_continueExecution=function(){on||ho||(on=!0,qi(Xi))};Y.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):As=0<e?Math.floor(1e3/e):5};Y.unstable_getCurrentPriorityLevel=function(){return Se};Y.unstable_getFirstCallbackNode=function(){return lt(vt)};Y.unstable_next=function(e){switch(Se){case 1:case 2:case 3:var t=3;break;default:t=Se}var n=Se;Se=t;try{return e()}finally{Se=n}};Y.unstable_pauseExecution=function(){};Y.unstable_requestPaint=function(){};Y.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Se;Se=e;try{return t()}finally{Se=n}};Y.unstable_scheduleCallback=function(e,t,n){var r=Y.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:Yp++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Qi(At,e),lt(vt)===null&&e===lt(At)&&(gr?(zs(hr),hr=-1):gr=!0,Zi(Yi,n-r))):(e.sortIndex=o,Qi(vt,e),on||ho||(on=!0,qi(Xi))),e};Y.unstable_shouldYield=js;Y.unstable_wrapCallback=function(e){var t=Se;return function(){var n=Se;Se=t;try{return e.apply(this,arguments)}finally{Se=n}}}});var Bs=Nt((zm,Ws)=>{"use strict";Ws.exports=Us()});var Vd=Nt(Ye=>{"use strict";var Xp=Ct(),Qe=Bs();function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ju=new Set,Ar={};function yn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Ar[e]=t,e=0;e<t.length;e++)Ju.add(t[e])}var Rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_a=Object.prototype.hasOwnProperty,qp=/^[: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]*$/,Hs={},Gs={};function Zp(e){return _a.call(Gs,e)?!0:_a.call(Hs,e)?!1:qp.test(e)?Gs[e]=!0:(Hs[e]=!0,!1)}function ef(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tf(e,t,n,r){if(t===null||typeof t>"u"||ef(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Oe(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Oe(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){_e[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var gl=/[\-:]([a-z])/g;function hl(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(gl,hl);_e[t]=new Oe(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(gl,hl);_e[t]=new Oe(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(gl,hl);_e[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ml(e,t,n,r){var o=_e.hasOwnProperty(t)?_e[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(tf(t,n,o,r)&&(n=null),r||o===null?Zp(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var zt=Xp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vo=Symbol.for("react.element"),En=Symbol.for("react.portal"),Pn=Symbol.for("react.fragment"),vl=Symbol.for("react.strict_mode"),ba=Symbol.for("react.profiler"),Yu=Symbol.for("react.provider"),Xu=Symbol.for("react.context"),yl=Symbol.for("react.forward_ref"),Sa=Symbol.for("react.suspense"),Na=Symbol.for("react.suspense_list"),xl=Symbol.for("react.memo"),jt=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var qu=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var $s=Symbol.iterator;function mr(e){return e===null||typeof e!="object"?null:(e=$s&&e[$s]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,ea;function Sr(e){if(ea===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ea=t&&t[1]||""}return`
|
|
1
|
+
"use strict";(()=>{var Pp=Object.create;var ms=Object.defineProperty;var Tp=Object.getOwnPropertyDescriptor;var Mp=Object.getOwnPropertyNames;var Fp=Object.getPrototypeOf,Ip=Object.prototype.hasOwnProperty;var Nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Rp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mp(t))!Ip.call(e,o)&&o!==n&&ms(e,o,{get:()=>t[o],enumerable:!(r=Tp(t,o))||r.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?Pp(Fp(e)):{},Rp(t||!e||!e.__esModule?ms(n,"default",{value:e,enumerable:!0}):n,e));var Ts=Nt(H=>{"use strict";var pr=Symbol.for("react.element"),Lp=Symbol.for("react.portal"),zp=Symbol.for("react.fragment"),Ap=Symbol.for("react.strict_mode"),Dp=Symbol.for("react.profiler"),jp=Symbol.for("react.provider"),Up=Symbol.for("react.context"),Wp=Symbol.for("react.forward_ref"),Bp=Symbol.for("react.suspense"),Hp=Symbol.for("react.memo"),Gp=Symbol.for("react.lazy"),ys=Symbol.iterator;function $p(e){return e===null||typeof e!="object"?null:(e=ys&&e[ys]||e["@@iterator"],typeof e=="function"?e:null)}var ks={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_s=Object.assign,bs={};function Sn(e,t,n){this.props=e,this.context=t,this.refs=bs,this.updater=n||ks}Sn.prototype.isReactComponent={};Sn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Sn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ss(){}Ss.prototype=Sn.prototype;function Wi(e,t,n){this.props=e,this.context=t,this.refs=bs,this.updater=n||ks}var Bi=Wi.prototype=new Ss;Bi.constructor=Wi;_s(Bi,Sn.prototype);Bi.isPureReactComponent=!0;var xs=Array.isArray,Ns=Object.prototype.hasOwnProperty,Hi={current:null},Cs={key:!0,ref:!0,__self:!0,__source:!0};function Es(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Ns.call(t,r)&&!Cs.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)o[r]===void 0&&(o[r]=u[r]);return{$$typeof:pr,type:e,key:i,ref:a,props:o,_owner:Hi.current}}function Vp(e,t){return{$$typeof:pr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gi(e){return typeof e=="object"&&e!==null&&e.$$typeof===pr}function Kp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ws=/\/+/g;function Ui(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Kp(""+e.key):t.toString(36)}function uo(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case pr:case Lp:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Ui(a,0):r,xs(o)?(n="",e!=null&&(n=e.replace(ws,"$&/")+"/"),uo(o,t,n,"",function(c){return c})):o!=null&&(Gi(o)&&(o=Vp(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(ws,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",xs(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Ui(i,u);a+=uo(i,t,n,s,o)}else if(s=$p(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Ui(i,u++),a+=uo(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function so(e,t,n){if(e==null)return e;var r=[],o=0;return uo(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Jp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fe={current:null},co={transition:null},Qp={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:co,ReactCurrentOwner:Hi};function Ps(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:so,forEach:function(e,t,n){so(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return so(e,function(){t++}),t},toArray:function(e){return so(e,function(t){return t})||[]},only:function(e){if(!Gi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Sn;H.Fragment=zp;H.Profiler=Dp;H.PureComponent=Wi;H.StrictMode=Ap;H.Suspense=Bp;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qp;H.act=Ps;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_s({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Hi.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)Ns.call(t,s)&&!Cs.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&u!==void 0?u[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:pr,type:e.type,key:o,ref:i,props:r,_owner:a}};H.createContext=function(e){return e={$$typeof:Up,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:jp,_context:e},e.Consumer=e};H.createElement=Es;H.createFactory=function(e){var t=Es.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Wp,render:e}};H.isValidElement=Gi;H.lazy=function(e){return{$$typeof:Gp,_payload:{_status:-1,_result:e},_init:Jp}};H.memo=function(e,t){return{$$typeof:Hp,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=co.transition;co.transition={};try{e()}finally{co.transition=t}};H.unstable_act=Ps;H.useCallback=function(e,t){return Fe.current.useCallback(e,t)};H.useContext=function(e){return Fe.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)};H.useEffect=function(e,t){return Fe.current.useEffect(e,t)};H.useId=function(){return Fe.current.useId()};H.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Fe.current.useMemo(e,t)};H.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)};H.useRef=function(e){return Fe.current.useRef(e)};H.useState=function(e){return Fe.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return Fe.current.useTransition()};H.version="18.3.1"});var Ct=Nt((zm,Ms)=>{"use strict";Ms.exports=Ts()});var Us=Nt(Y=>{"use strict";function Ji(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<po(o,t))e[r]=t,e[n]=o,n=r;else break e}}function lt(e){return e.length===0?null:e[0]}function go(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var a=2*(r+1)-1,u=e[a],s=a+1,c=e[s];if(0>po(u,n))s<o&&0>po(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[a]=n,r=a);else if(s<o&&0>po(c,n))e[r]=c,e[s]=n,r=s;else break e}}return t}function po(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Fs=performance,Y.unstable_now=function(){return Fs.now()}):($i=Date,Is=$i.now(),Y.unstable_now=function(){return $i.now()-Is});var Fs,$i,Is,yt=[],At=[],Yp=1,Ze=null,Se=3,ho=!1,on=!1,gr=!1,Ls=typeof setTimeout=="function"?setTimeout:null,zs=typeof clearTimeout=="function"?clearTimeout:null,Rs=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Qi(e){for(var t=lt(At);t!==null;){if(t.callback===null)go(At);else if(t.startTime<=e)go(At),t.sortIndex=t.expirationTime,Ji(yt,t);else break;t=lt(At)}}function Yi(e){if(gr=!1,Qi(e),!on)if(lt(yt)!==null)on=!0,qi(Xi);else{var t=lt(At);t!==null&&Zi(Yi,t.startTime-e)}}function Xi(e,t){on=!1,gr&&(gr=!1,zs(hr),hr=-1),ho=!0;var n=Se;try{for(Qi(t),Ze=lt(yt);Ze!==null&&(!(Ze.expirationTime>t)||e&&!js());){var r=Ze.callback;if(typeof r=="function"){Ze.callback=null,Se=Ze.priorityLevel;var o=r(Ze.expirationTime<=t);t=Y.unstable_now(),typeof o=="function"?Ze.callback=o:Ze===lt(yt)&&go(yt),Qi(t)}else go(yt);Ze=lt(yt)}if(Ze!==null)var i=!0;else{var a=lt(At);a!==null&&Zi(Yi,a.startTime-t),i=!1}return i}finally{Ze=null,Se=n,ho=!1}}var mo=!1,fo=null,hr=-1,As=5,Ds=-1;function js(){return!(Y.unstable_now()-Ds<As)}function Vi(){if(fo!==null){var e=Y.unstable_now();Ds=e;var t=!0;try{t=fo(!0,e)}finally{t?fr():(mo=!1,fo=null)}}else mo=!1}var fr;typeof Rs=="function"?fr=function(){Rs(Vi)}:typeof MessageChannel<"u"?(Ki=new MessageChannel,Os=Ki.port2,Ki.port1.onmessage=Vi,fr=function(){Os.postMessage(null)}):fr=function(){Ls(Vi,0)};var Ki,Os;function qi(e){fo=e,mo||(mo=!0,fr())}function Zi(e,t){hr=Ls(function(){e(Y.unstable_now())},t)}Y.unstable_IdlePriority=5;Y.unstable_ImmediatePriority=1;Y.unstable_LowPriority=4;Y.unstable_NormalPriority=3;Y.unstable_Profiling=null;Y.unstable_UserBlockingPriority=2;Y.unstable_cancelCallback=function(e){e.callback=null};Y.unstable_continueExecution=function(){on||ho||(on=!0,qi(Xi))};Y.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):As=0<e?Math.floor(1e3/e):5};Y.unstable_getCurrentPriorityLevel=function(){return Se};Y.unstable_getFirstCallbackNode=function(){return lt(yt)};Y.unstable_next=function(e){switch(Se){case 1:case 2:case 3:var t=3;break;default:t=Se}var n=Se;Se=t;try{return e()}finally{Se=n}};Y.unstable_pauseExecution=function(){};Y.unstable_requestPaint=function(){};Y.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Se;Se=e;try{return t()}finally{Se=n}};Y.unstable_scheduleCallback=function(e,t,n){var r=Y.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:Yp++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Ji(At,e),lt(yt)===null&&e===lt(At)&&(gr?(zs(hr),hr=-1):gr=!0,Zi(Yi,n-r))):(e.sortIndex=o,Ji(yt,e),on||ho||(on=!0,qi(Xi))),e};Y.unstable_shouldYield=js;Y.unstable_wrapCallback=function(e){var t=Se;return function(){var n=Se;Se=t;try{return e.apply(this,arguments)}finally{Se=n}}}});var Bs=Nt((Dm,Ws)=>{"use strict";Ws.exports=Us()});var Vd=Nt(Ye=>{"use strict";var Xp=Ct(),Je=Bs();function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qu=new Set,Ar={};function yn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Ar[e]=t,e=0;e<t.length;e++)Qu.add(t[e])}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_a=Object.prototype.hasOwnProperty,qp=/^[: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]*$/,Hs={},Gs={};function Zp(e){return _a.call(Gs,e)?!0:_a.call(Hs,e)?!1:qp.test(e)?Gs[e]=!0:(Hs[e]=!0,!1)}function ef(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tf(e,t,n,r){if(t===null||typeof t>"u"||ef(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Oe(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Oe(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){_e[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var gl=/[\-:]([a-z])/g;function hl(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(gl,hl);_e[t]=new Oe(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(gl,hl);_e[t]=new Oe(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(gl,hl);_e[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ml(e,t,n,r){var o=_e.hasOwnProperty(t)?_e[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(tf(t,n,o,r)&&(n=null),r||o===null?Zp(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var zt=Xp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vo=Symbol.for("react.element"),En=Symbol.for("react.portal"),Pn=Symbol.for("react.fragment"),vl=Symbol.for("react.strict_mode"),ba=Symbol.for("react.profiler"),Yu=Symbol.for("react.provider"),Xu=Symbol.for("react.context"),yl=Symbol.for("react.forward_ref"),Sa=Symbol.for("react.suspense"),Na=Symbol.for("react.suspense_list"),xl=Symbol.for("react.memo"),jt=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var qu=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var $s=Symbol.iterator;function mr(e){return e===null||typeof e!="object"?null:(e=$s&&e[$s]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,ea;function Sr(e){if(ea===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ea=t&&t[1]||""}return`
|
|
2
2
|
`+ea+e}var ta=!1;function na(e,t){if(!e||ta)return"";ta=!0;var n=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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
3
3
|
`),i=r.stack.split(`
|
|
4
4
|
`),a=o.length-1,u=i.length-1;1<=a&&0<=u&&o[a]!==i[u];)u--;for(;1<=a&&0<=u;a--,u--)if(o[a]!==i[u]){if(a!==1||u!==1)do if(a--,u--,0>u||o[a]!==i[u]){var s=`
|
|
5
|
-
`+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{ta=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sr(e):""}function nf(e){switch(e.tag){case 5:return Sr(e.type);case 16:return Sr("Lazy");case 13:return Sr("Suspense");case 19:return Sr("SuspenseList");case 0:case 2:case 15:return e=na(e.type,!1),e;case 11:return e=na(e.type.render,!1),e;case 1:return e=na(e.type,!0),e;default:return""}}function Ca(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 Pn:return"Fragment";case En:return"Portal";case ba:return"Profiler";case vl:return"StrictMode";case Sa:return"Suspense";case Na:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xu:return(e.displayName||"Context")+".Consumer";case Yu:return(e._context.displayName||"Context")+".Provider";case yl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xl:return t=e.displayName||null,t!==null?t:Ca(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Ca(e(t))}catch{}}return null}function rf(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 Ca(t);case 8:return t===vl?"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 Zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function of(e){var t=Zu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yo(e){e._valueTracker||(e._valueTracker=of(e))}function ec(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vo(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 Ea(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tc(e,t){t=t.checked,t!=null&&ml(e,"checked",t,!1)}function Pa(e,t){tc(e,t);var n=Zt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ta(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ta(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ks(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ta(e,t,n){(t!=="number"||Vo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nr=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ma(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(Nr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Zt(n)}}function nc(e,t){var n=Zt(t.value),r=Zt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Js(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rc(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 Fa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xo,oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xo=xo||document.createElement("div"),xo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pr={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},af=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(e){af.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pr[t]=Pr[e]})});function ic(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pr.hasOwnProperty(e)&&Pr[e]?(""+t).trim():t+"px"}function ac(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ic(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var lf=le({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 Ra(e,t){if(t){if(lf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Ia(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 Oa=null;function wl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var La=null,Un=null,Wn=null;function Ys(e){if(e=no(e)){if(typeof La!="function")throw Error(_(280));var t=e.stateNode;t&&(t=wi(t),La(e.stateNode,e.type,t))}}function lc(e){Un?Wn?Wn.push(e):Wn=[e]:Un=e}function sc(){if(Un){var e=Un,t=Wn;if(Wn=Un=null,Ys(e),t)for(e=0;e<t.length;e++)Ys(t[e])}}function uc(e,t){return e(t)}function cc(){}var ra=!1;function dc(e,t,n){if(ra)return e(t,n);ra=!0;try{return uc(e,t,n)}finally{ra=!1,(Un!==null||Wn!==null)&&(cc(),sc())}}function jr(e,t){var n=e.stateNode;if(n===null)return null;var r=wi(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var za=!1;if(Rt)try{Nn={},Object.defineProperty(Nn,"passive",{get:function(){za=!0}}),window.addEventListener("test",Nn,Nn),window.removeEventListener("test",Nn,Nn)}catch{za=!1}var Nn;function sf(e,t,n,r,o,i,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Tr=!1,Ko=null,Qo=!1,Aa=null,uf={onError:function(e){Tr=!0,Ko=e}};function cf(e,t,n,r,o,i,a,u,s){Tr=!1,Ko=null,sf.apply(uf,arguments)}function df(e,t,n,r,o,i,a,u,s){if(cf.apply(this,arguments),Tr){if(Tr){var c=Ko;Tr=!1,Ko=null}else throw Error(_(198));Qo||(Qo=!0,Aa=c)}}function xn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pc(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 Xs(e){if(xn(e)!==e)throw Error(_(188))}function pf(e){var t=e.alternate;if(!t){if(t=xn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xs(o),e;if(i===r)return Xs(o),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,u=o.child;u;){if(u===n){a=!0,n=o,r=i;break}if(u===r){a=!0,r=o,n=i;break}u=u.sibling}if(!a){for(u=i.child;u;){if(u===n){a=!0,n=i,r=o;break}if(u===r){a=!0,r=i,n=o;break}u=u.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function fc(e){return e=pf(e),e!==null?gc(e):null}function gc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gc(e);if(t!==null)return t;e=e.sibling}return null}var hc=Qe.unstable_scheduleCallback,qs=Qe.unstable_cancelCallback,ff=Qe.unstable_shouldYield,gf=Qe.unstable_requestPaint,de=Qe.unstable_now,hf=Qe.unstable_getCurrentPriorityLevel,kl=Qe.unstable_ImmediatePriority,mc=Qe.unstable_UserBlockingPriority,Jo=Qe.unstable_NormalPriority,mf=Qe.unstable_LowPriority,vc=Qe.unstable_IdlePriority,mi=null,kt=null;function vf(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(mi,e,void 0,(e.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:wf,yf=Math.log,xf=Math.LN2;function wf(e){return e>>>=0,e===0?32:31-(yf(e)/xf|0)|0}var wo=64,ko=4194304;function Cr(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 Yo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~o;u!==0?r=Cr(u):(i&=a,i!==0&&(r=Cr(i)))}else a=n&~o,a!==0?r=Cr(a):i!==0&&(r=Cr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pt(t),o=1<<n,r|=e[n],t&=~o;return r}function kf(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 _f(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-pt(i),u=1<<a,s=o[a];s===-1?(!(u&n)||u&r)&&(o[a]=kf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function Da(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yc(){var e=wo;return wo<<=1,!(wo&4194240)&&(wo=64),e}function oa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=n}function bf(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-pt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function _l(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var J=0;function xc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wc,bl,kc,_c,bc,ja=!1,_o=[],$t=null,Vt=null,Kt=null,Ur=new Map,Wr=new Map,Wt=[],Sf="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 Zs(e,t){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Vt=null;break;case"mouseover":case"mouseout":Kt=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(t.pointerId)}}function vr(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=no(t),t!==null&&bl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Nf(e,t,n,r,o){switch(t){case"focusin":return $t=vr($t,e,t,n,r,o),!0;case"dragenter":return Vt=vr(Vt,e,t,n,r,o),!0;case"mouseover":return Kt=vr(Kt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ur.set(i,vr(Ur.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Wr.set(i,vr(Wr.get(i)||null,e,t,n,r,o)),!0}return!1}function Sc(e){var t=sn(e.target);if(t!==null){var n=xn(t);if(n!==null){if(t=n.tag,t===13){if(t=pc(n),t!==null){e.blockedOn=t,bc(e.priority,function(){kc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ua(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Oa=r,n.target.dispatchEvent(r),Oa=null}else return t=no(n),t!==null&&bl(t),e.blockedOn=n,!1;t.shift()}return!0}function eu(e,t,n){zo(e)&&n.delete(t)}function Cf(){ja=!1,$t!==null&&zo($t)&&($t=null),Vt!==null&&zo(Vt)&&(Vt=null),Kt!==null&&zo(Kt)&&(Kt=null),Ur.forEach(eu),Wr.forEach(eu)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,ja||(ja=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,Cf)))}function Br(e){function t(o){return yr(o,e)}if(0<_o.length){yr(_o[0],e);for(var n=1;n<_o.length;n++){var r=_o[n];r.blockedOn===e&&(r.blockedOn=null)}}for($t!==null&&yr($t,e),Vt!==null&&yr(Vt,e),Kt!==null&&yr(Kt,e),Ur.forEach(t),Wr.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)Sc(n),n.blockedOn===null&&Wt.shift()}var Bn=zt.ReactCurrentBatchConfig,Xo=!0;function Ef(e,t,n,r){var o=J,i=Bn.transition;Bn.transition=null;try{J=1,Sl(e,t,n,r)}finally{J=o,Bn.transition=i}}function Pf(e,t,n,r){var o=J,i=Bn.transition;Bn.transition=null;try{J=4,Sl(e,t,n,r)}finally{J=o,Bn.transition=i}}function Sl(e,t,n,r){if(Xo){var o=Ua(e,t,n,r);if(o===null)da(e,t,r,qo,n),Zs(e,r);else if(Nf(o,e,t,n,r))r.stopPropagation();else if(Zs(e,r),t&4&&-1<Sf.indexOf(e)){for(;o!==null;){var i=no(o);if(i!==null&&wc(i),i=Ua(e,t,n,r),i===null&&da(e,t,r,qo,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else da(e,t,r,null,n)}}var qo=null;function Ua(e,t,n,r){if(qo=null,e=wl(r),e=sn(e),e!==null)if(t=xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qo=e,null}function Nc(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(hf()){case kl:return 1;case mc:return 4;case Jo:case mf:return 16;case vc:return 536870912;default:return 16}default:return 16}}var Ht=null,Nl=null,Ao=null;function Cc(){if(Ao)return Ao;var e,t=Nl,n=t.length,r,o="value"in Ht?Ht.value:Ht.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return Ao=o.slice(e,1<r?1-r:void 0)}function Do(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 bo(){return!0}function tu(){return!1}function Je(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bo:tu,this.isPropagationStopped=tu,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cl=Je(qn),to=le({},qn,{view:0,detail:0}),Tf=Je(to),ia,aa,xr,vi=le({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:El,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!==xr&&(xr&&e.type==="mousemove"?(ia=e.screenX-xr.screenX,aa=e.screenY-xr.screenY):aa=ia=0,xr=e),ia)},movementY:function(e){return"movementY"in e?e.movementY:aa}}),nu=Je(vi),Mf=le({},vi,{dataTransfer:0}),Ff=Je(Mf),Rf=le({},to,{relatedTarget:0}),la=Je(Rf),If=le({},qn,{animationName:0,elapsedTime:0,pseudoElement:0}),Of=Je(If),Lf=le({},qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zf=Je(Lf),Af=le({},qn,{data:0}),ru=Je(Af),Df={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jf={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"},Uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uf[e])?!!t[e]:!1}function El(){return Wf}var Bf=le({},to,{key:function(e){if(e.key){var t=Df[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Do(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:El,charCode:function(e){return e.type==="keypress"?Do(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Do(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hf=Je(Bf),Gf=le({},vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ou=Je(Gf),$f=le({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:El}),Vf=Je($f),Kf=le({},qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qf=Je(Kf),Jf=le({},vi,{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}),Yf=Je(Jf),Xf=[9,13,27,32],Pl=Rt&&"CompositionEvent"in window,Mr=null;Rt&&"documentMode"in document&&(Mr=document.documentMode);var qf=Rt&&"TextEvent"in window&&!Mr,Ec=Rt&&(!Pl||Mr&&8<Mr&&11>=Mr),iu=String.fromCharCode(32),au=!1;function Pc(e,t){switch(e){case"keyup":return Xf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function Zf(e,t){switch(e){case"compositionend":return Tc(t);case"keypress":return t.which!==32?null:(au=!0,iu);case"textInput":return e=t.data,e===iu&&au?null:e;default:return null}}function eg(e,t){if(Tn)return e==="compositionend"||!Pl&&Pc(e,t)?(e=Cc(),Ao=Nl=Ht=null,Tn=!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 Ec&&t.locale!=="ko"?null:t.data;default:return null}}var tg={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 lu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tg[e.type]:t==="textarea"}function Mc(e,t,n,r){lc(r),t=Zo(t,"onChange"),0<t.length&&(n=new Cl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fr=null,Hr=null;function ng(e){Wc(e,0)}function yi(e){var t=Rn(e);if(ec(t))return e}function rg(e,t){if(e==="change")return t}var Fc=!1;Rt&&(Rt?(No="oninput"in document,No||(sa=document.createElement("div"),sa.setAttribute("oninput","return;"),No=typeof sa.oninput=="function"),So=No):So=!1,Fc=So&&(!document.documentMode||9<document.documentMode));var So,No,sa;function su(){Fr&&(Fr.detachEvent("onpropertychange",Rc),Hr=Fr=null)}function Rc(e){if(e.propertyName==="value"&&yi(Hr)){var t=[];Mc(t,Hr,e,wl(e)),dc(ng,t)}}function og(e,t,n){e==="focusin"?(su(),Fr=t,Hr=n,Fr.attachEvent("onpropertychange",Rc)):e==="focusout"&&su()}function ig(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(Hr)}function ag(e,t){if(e==="click")return yi(t)}function lg(e,t){if(e==="input"||e==="change")return yi(t)}function sg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:sg;function Gr(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!_a.call(t,o)||!gt(e[o],t[o]))return!1}return!0}function uu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cu(e,t){var n=uu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uu(n)}}function Ic(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ic(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oc(){for(var e=window,t=Vo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vo(e.document)}return t}function Tl(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 ug(e){var t=Oc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ic(n.ownerDocument.documentElement,n)){if(r!==null&&Tl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cu(n,i);var a=cu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cg=Rt&&"documentMode"in document&&11>=document.documentMode,Mn=null,Wa=null,Rr=null,Ba=!1;function du(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ba||Mn==null||Mn!==Vo(r)||(r=Mn,"selectionStart"in r&&Tl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&Gr(Rr,r)||(Rr=r,r=Zo(Wa,"onSelect"),0<r.length&&(t=new Cl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Mn)))}function Co(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fn={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},ua={},Lc={};Rt&&(Lc=document.createElement("div").style,"AnimationEvent"in window||(delete Fn.animationend.animation,delete Fn.animationiteration.animation,delete Fn.animationstart.animation),"TransitionEvent"in window||delete Fn.transitionend.transition);function xi(e){if(ua[e])return ua[e];if(!Fn[e])return e;var t=Fn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lc)return ua[e]=t[n];return e}var zc=xi("animationend"),Ac=xi("animationiteration"),Dc=xi("animationstart"),jc=xi("transitionend"),Uc=new Map,pu="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 tn(e,t){Uc.set(e,t),yn(t,[e])}for(Eo=0;Eo<pu.length;Eo++)Po=pu[Eo],fu=Po.toLowerCase(),gu=Po[0].toUpperCase()+Po.slice(1),tn(fu,"on"+gu);var Po,fu,gu,Eo;tn(zc,"onAnimationEnd");tn(Ac,"onAnimationIteration");tn(Dc,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(jc,"onTransitionEnd");$n("onMouseEnter",["mouseout","mouseover"]);$n("onMouseLeave",["mouseout","mouseover"]);$n("onPointerEnter",["pointerout","pointerover"]);$n("onPointerLeave",["pointerout","pointerover"]);yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yn("onBeforeInput",["compositionend","keypress","textInput","paste"]);yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="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(" "),dg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function hu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,df(r,t,void 0,e),e.currentTarget=null}function Wc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==i&&o.isPropagationStopped())break e;hu(o,u,c),i=s}else for(a=0;a<r.length;a++){if(u=r[a],s=u.instance,c=u.currentTarget,u=u.listener,s!==i&&o.isPropagationStopped())break e;hu(o,u,c),i=s}}}if(Qo)throw e=Aa,Qo=!1,Aa=null,e}function ee(e,t){var n=t[Ka];n===void 0&&(n=t[Ka]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function ca(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var To="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[To]){e[To]=!0,Ju.forEach(function(n){n!=="selectionchange"&&(dg.has(n)||ca(n,!1,e),ca(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[To]||(t[To]=!0,ca("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(Nc(t)){case 1:var o=Ef;break;case 4:o=Pf;break;default:o=Sl}n=o.bind(null,t,n,e),o=void 0,!za||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function da(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===o||u.nodeType===8&&u.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;a=a.return}for(;u!==null;){if(a=sn(u),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}u=u.parentNode}}r=r.return}dc(function(){var c=i,d=wl(n),g=[];e:{var m=Uc.get(e);if(m!==void 0){var y=Cl,k=e;switch(e){case"keypress":if(Do(n)===0)break e;case"keydown":case"keyup":y=Hf;break;case"focusin":k="focus",y=la;break;case"focusout":k="blur",y=la;break;case"beforeblur":case"afterblur":y=la;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ff;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Vf;break;case zc:case Ac:case Dc:y=Of;break;case jc:y=Qf;break;case"scroll":y=Tf;break;case"wheel":y=Yf;break;case"copy":case"cut":case"paste":y=zf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=ou}var S=(t&4)!==0,B=!S&&e==="scroll",f=S?m!==null?m+"Capture":null:m;S=[];for(var p=c,h;p!==null;){h=p;var x=h.stateNode;if(h.tag===5&&x!==null&&(h=x,f!==null&&(x=jr(p,f),x!=null&&S.push(Vr(p,x,h)))),B)break;p=p.return}0<S.length&&(m=new y(m,k,null,n,d),g.push({event:m,listeners:S}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&n!==Oa&&(k=n.relatedTarget||n.fromElement)&&(sn(k)||k[It]))break e;if((y||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?sn(k):null,k!==null&&(B=xn(k),k!==B||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(S=nu,x="onMouseLeave",f="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(S=ou,x="onPointerLeave",f="onPointerEnter",p="pointer"),B=y==null?m:Rn(y),h=k==null?m:Rn(k),m=new S(x,p+"leave",y,n,d),m.target=B,m.relatedTarget=h,x=null,sn(d)===c&&(S=new S(f,p+"enter",k,n,d),S.target=h,S.relatedTarget=B,x=S),B=x,y&&k)t:{for(S=y,f=k,p=0,h=S;h;h=Cn(h))p++;for(h=0,x=f;x;x=Cn(x))h++;for(;0<p-h;)S=Cn(S),p--;for(;0<h-p;)f=Cn(f),h--;for(;p--;){if(S===f||f!==null&&S===f.alternate)break t;S=Cn(S),f=Cn(f)}S=null}else S=null;y!==null&&mu(g,m,y,S,!1),k!==null&&B!==null&&mu(g,B,k,S,!0)}}e:{if(m=c?Rn(c):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var C=rg;else if(lu(m))if(Fc)C=lg;else{C=ig;var M=og}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(C=ag);if(C&&(C=C(e,c))){Mc(g,C,n,d);break e}M&&M(e,m,c),e==="focusout"&&(M=m._wrapperState)&&M.controlled&&m.type==="number"&&Ta(m,"number",m.value)}switch(M=c?Rn(c):window,e){case"focusin":(lu(M)||M.contentEditable==="true")&&(Mn=M,Wa=c,Rr=null);break;case"focusout":Rr=Wa=Mn=null;break;case"mousedown":Ba=!0;break;case"contextmenu":case"mouseup":case"dragend":Ba=!1,du(g,n,d);break;case"selectionchange":if(cg)break;case"keydown":case"keyup":du(g,n,d)}var F;if(Pl)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Tn?Pc(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Ec&&n.locale!=="ko"&&(Tn||P!=="onCompositionStart"?P==="onCompositionEnd"&&Tn&&(F=Cc()):(Ht=d,Nl="value"in Ht?Ht.value:Ht.textContent,Tn=!0)),M=Zo(c,P),0<M.length&&(P=new ru(P,e,null,n,d),g.push({event:P,listeners:M}),F?P.data=F:(F=Tc(n),F!==null&&(P.data=F)))),(F=qf?Zf(e,n):eg(e,n))&&(c=Zo(c,"onBeforeInput"),0<c.length&&(d=new ru("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:c}),d.data=F))}Wc(g,t)})}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zo(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=jr(e,n),i!=null&&r.unshift(Vr(e,i,o)),i=jr(e,t),i!=null&&r.push(Vr(e,i,o))),e=e.return}return r}function Cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mu(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&c!==null&&(u=c,o?(s=jr(n,i),s!=null&&a.unshift(Vr(n,s,u))):o||(s=jr(n,i),s!=null&&a.push(Vr(n,s,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var pg=/\r\n?/g,fg=/\u0000|\uFFFD/g;function vu(e){return(typeof e=="string"?e:""+e).replace(pg,`
|
|
6
|
-
`).replace(fg,"")}function Mo(e,t,n){if(t=vu(t),vu(e)!==t&&n)throw Error(_(425))}function ei(){}var Ha=null,Ga=null;function $a(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 Va=typeof setTimeout=="function"?setTimeout:void 0,gg=typeof clearTimeout=="function"?clearTimeout:void 0,yu=typeof Promise=="function"?Promise:void 0,hg=typeof queueMicrotask=="function"?queueMicrotask:typeof yu<"u"?function(e){return yu.resolve(null).then(e).catch(mg)}:Va;function mg(e){setTimeout(function(){throw e})}function pa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Br(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Br(t)}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Zn=Math.random().toString(36).slice(2),wt="__reactFiber$"+Zn,Kr="__reactProps$"+Zn,It="__reactContainer$"+Zn,Ka="__reactEvents$"+Zn,vg="__reactListeners$"+Zn,yg="__reactHandles$"+Zn;function sn(e){var t=e[wt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[It]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xu(e);e!==null;){if(n=e[wt])return n;e=xu(e)}return t}e=n,n=e.parentNode}return null}function no(e){return e=e[wt]||e[It],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function wi(e){return e[Kr]||null}var Qa=[],In=-1;function nn(e){return{current:e}}function te(e){0>In||(e.current=Qa[In],Qa[In]=null,In--)}function X(e,t){In++,Qa[In]=e.current,e.current=t}var en={},Pe=nn(en),De=nn(!1),fn=en;function Vn(e,t){var n=e.type.contextTypes;if(!n)return en;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function je(e){return e=e.childContextTypes,e!=null}function ti(){te(De),te(Pe)}function wu(e,t,n){if(Pe.current!==en)throw Error(_(168));X(Pe,t),X(De,n)}function Hc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(_(108,rf(e)||"Unknown",o));return le({},n,r)}function ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,fn=Pe.current,X(Pe,e),X(De,De.current),!0}function ku(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Hc(e,t,fn),r.__reactInternalMemoizedMergedChildContext=e,te(De),te(Pe),X(Pe,e)):te(De),X(De,n)}var Pt=null,ki=!1,fa=!1;function Gc(e){Pt===null?Pt=[e]:Pt.push(e)}function xg(e){ki=!0,Gc(e)}function rn(){if(!fa&&Pt!==null){fa=!0;var e=0,t=J;try{var n=Pt;for(J=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pt=null,ki=!1}catch(o){throw Pt!==null&&(Pt=Pt.slice(e+1)),hc(kl,rn),o}finally{J=t,fa=!1}}return null}var On=[],Ln=0,ri=null,oi=0,et=[],tt=0,gn=null,Tt=1,Mt="";function an(e,t){On[Ln++]=oi,On[Ln++]=ri,ri=e,oi=t}function $c(e,t,n){et[tt++]=Tt,et[tt++]=Mt,et[tt++]=gn,gn=e;var r=Tt;e=Mt;var o=32-pt(r)-1;r&=~(1<<o),n+=1;var i=32-pt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Tt=1<<32-pt(t)+o|n<<o|r,Mt=i+e}else Tt=1<<i|n<<o|r,Mt=e}function Ml(e){e.return!==null&&(an(e,1),$c(e,1,0))}function Fl(e){for(;e===ri;)ri=On[--Ln],On[Ln]=null,oi=On[--Ln],On[Ln]=null;for(;e===gn;)gn=et[--tt],et[tt]=null,Mt=et[--tt],et[tt]=null,Tt=et[--tt],et[tt]=null}var Ke=null,Ve=null,ne=!1,dt=null;function Vc(e,t){var n=nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _u(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ke=e,Ve=Qt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ke=e,Ve=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=gn!==null?{id:Tt,overflow:Mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ke=e,Ve=null,!0):!1;default:return!1}}function Ja(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ya(e){if(ne){var t=Ve;if(t){var n=t;if(!_u(e,t)){if(Ja(e))throw Error(_(418));t=Qt(n.nextSibling);var r=Ke;t&&_u(e,t)?Vc(r,n):(e.flags=e.flags&-4097|2,ne=!1,Ke=e)}}else{if(Ja(e))throw Error(_(418));e.flags=e.flags&-4097|2,ne=!1,Ke=e}}}function bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ke=e}function Fo(e){if(e!==Ke)return!1;if(!ne)return bu(e),ne=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$a(e.type,e.memoizedProps)),t&&(t=Ve)){if(Ja(e))throw Kc(),Error(_(418));for(;t;)Vc(e,t),t=Qt(t.nextSibling)}if(bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ve=Qt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ve=null}}else Ve=Ke?Qt(e.stateNode.nextSibling):null;return!0}function Kc(){for(var e=Ve;e;)e=Qt(e.nextSibling)}function Kn(){Ve=Ke=null,ne=!1}function Rl(e){dt===null?dt=[e]:dt.push(e)}var wg=zt.ReactCurrentBatchConfig;function wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var u=o.refs;a===null?delete u[i]:u[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Ro(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Su(e){var t=e._init;return t(e._payload)}function Qc(e){function t(f,p){if(e){var h=f.deletions;h===null?(f.deletions=[p],f.flags|=16):h.push(p)}}function n(f,p){if(!e)return null;for(;p!==null;)t(f,p),p=p.sibling;return null}function r(f,p){for(f=new Map;p!==null;)p.key!==null?f.set(p.key,p):f.set(p.index,p),p=p.sibling;return f}function o(f,p){return f=qt(f,p),f.index=0,f.sibling=null,f}function i(f,p,h){return f.index=h,e?(h=f.alternate,h!==null?(h=h.index,h<p?(f.flags|=2,p):h):(f.flags|=2,p)):(f.flags|=1048576,p)}function a(f){return e&&f.alternate===null&&(f.flags|=2),f}function u(f,p,h,x){return p===null||p.tag!==6?(p=wa(h,f.mode,x),p.return=f,p):(p=o(p,h),p.return=f,p)}function s(f,p,h,x){var C=h.type;return C===Pn?d(f,p,h.props.children,x,h.key):p!==null&&(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Su(C)===p.type)?(x=o(p,h.props),x.ref=wr(f,p,h),x.return=f,x):(x=$o(h.type,h.key,h.props,null,f.mode,x),x.ref=wr(f,p,h),x.return=f,x)}function c(f,p,h,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==h.containerInfo||p.stateNode.implementation!==h.implementation?(p=ka(h,f.mode,x),p.return=f,p):(p=o(p,h.children||[]),p.return=f,p)}function d(f,p,h,x,C){return p===null||p.tag!==7?(p=pn(h,f.mode,x,C),p.return=f,p):(p=o(p,h),p.return=f,p)}function g(f,p,h){if(typeof p=="string"&&p!==""||typeof p=="number")return p=wa(""+p,f.mode,h),p.return=f,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case vo:return h=$o(p.type,p.key,p.props,null,f.mode,h),h.ref=wr(f,null,p),h.return=f,h;case En:return p=ka(p,f.mode,h),p.return=f,p;case jt:var x=p._init;return g(f,x(p._payload),h)}if(Nr(p)||mr(p))return p=pn(p,f.mode,h,null),p.return=f,p;Ro(f,p)}return null}function m(f,p,h,x){var C=p!==null?p.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return C!==null?null:u(f,p,""+h,x);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:return h.key===C?s(f,p,h,x):null;case En:return h.key===C?c(f,p,h,x):null;case jt:return C=h._init,m(f,p,C(h._payload),x)}if(Nr(h)||mr(h))return C!==null?null:d(f,p,h,x,null);Ro(f,h)}return null}function y(f,p,h,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return f=f.get(h)||null,u(p,f,""+x,C);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case vo:return f=f.get(x.key===null?h:x.key)||null,s(p,f,x,C);case En:return f=f.get(x.key===null?h:x.key)||null,c(p,f,x,C);case jt:var M=x._init;return y(f,p,h,M(x._payload),C)}if(Nr(x)||mr(x))return f=f.get(h)||null,d(p,f,x,C,null);Ro(p,x)}return null}function k(f,p,h,x){for(var C=null,M=null,F=p,P=p=0,K=null;F!==null&&P<h.length;P++){F.index>P?(K=F,F=null):K=F.sibling;var W=m(f,F,h[P],x);if(W===null){F===null&&(F=K);break}e&&F&&W.alternate===null&&t(f,F),p=i(W,p,P),M===null?C=W:M.sibling=W,M=W,F=K}if(P===h.length)return n(f,F),ne&&an(f,P),C;if(F===null){for(;P<h.length;P++)F=g(f,h[P],x),F!==null&&(p=i(F,p,P),M===null?C=F:M.sibling=F,M=F);return ne&&an(f,P),C}for(F=r(f,F);P<h.length;P++)K=y(F,f,P,h[P],x),K!==null&&(e&&K.alternate!==null&&F.delete(K.key===null?P:K.key),p=i(K,p,P),M===null?C=K:M.sibling=K,M=K);return e&&F.forEach(function(ve){return t(f,ve)}),ne&&an(f,P),C}function S(f,p,h,x){var C=mr(h);if(typeof C!="function")throw Error(_(150));if(h=C.call(h),h==null)throw Error(_(151));for(var M=C=null,F=p,P=p=0,K=null,W=h.next();F!==null&&!W.done;P++,W=h.next()){F.index>P?(K=F,F=null):K=F.sibling;var ve=m(f,F,W.value,x);if(ve===null){F===null&&(F=K);break}e&&F&&ve.alternate===null&&t(f,F),p=i(ve,p,P),M===null?C=ve:M.sibling=ve,M=ve,F=K}if(W.done)return n(f,F),ne&&an(f,P),C;if(F===null){for(;!W.done;P++,W=h.next())W=g(f,W.value,x),W!==null&&(p=i(W,p,P),M===null?C=W:M.sibling=W,M=W);return ne&&an(f,P),C}for(F=r(f,F);!W.done;P++,W=h.next())W=y(F,f,P,W.value,x),W!==null&&(e&&W.alternate!==null&&F.delete(W.key===null?P:W.key),p=i(W,p,P),M===null?C=W:M.sibling=W,M=W);return e&&F.forEach(function(ir){return t(f,ir)}),ne&&an(f,P),C}function B(f,p,h,x){if(typeof h=="object"&&h!==null&&h.type===Pn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:e:{for(var C=h.key,M=p;M!==null;){if(M.key===C){if(C=h.type,C===Pn){if(M.tag===7){n(f,M.sibling),p=o(M,h.props.children),p.return=f,f=p;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Su(C)===M.type){n(f,M.sibling),p=o(M,h.props),p.ref=wr(f,M,h),p.return=f,f=p;break e}n(f,M);break}else t(f,M);M=M.sibling}h.type===Pn?(p=pn(h.props.children,f.mode,x,h.key),p.return=f,f=p):(x=$o(h.type,h.key,h.props,null,f.mode,x),x.ref=wr(f,p,h),x.return=f,f=x)}return a(f);case En:e:{for(M=h.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(f,p.sibling),p=o(p,h.children||[]),p.return=f,f=p;break e}else{n(f,p);break}else t(f,p);p=p.sibling}p=ka(h,f.mode,x),p.return=f,f=p}return a(f);case jt:return M=h._init,B(f,p,M(h._payload),x)}if(Nr(h))return k(f,p,h,x);if(mr(h))return S(f,p,h,x);Ro(f,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(f,p.sibling),p=o(p,h),p.return=f,f=p):(n(f,p),p=wa(h,f.mode,x),p.return=f,f=p),a(f)):n(f,p)}return B}var Qn=Qc(!0),Jc=Qc(!1),ii=nn(null),ai=null,zn=null,Il=null;function Ol(){Il=zn=ai=null}function Ll(e){var t=ii.current;te(ii),e._currentValue=t}function Xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hn(e,t){ai=e,Il=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Il!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(ai===null)throw Error(_(308));zn=e,ai.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var un=null;function zl(e){un===null?un=[e]:un.push(e)}function Yc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,zl(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function Al(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 Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ot(e,n)}return o=r.interleaved,o===null?(t.next=t,zl(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ot(e,n)}function jo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_l(e,n)}}function Nu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function li(e,t,n,r){var o=e.updateQueue;Ut=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,c=s.next;s.next=null,a===null?i=c:a.next=c,a=s;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==a&&(u===null?d.firstBaseUpdate=c:u.next=c,d.lastBaseUpdate=s))}if(i!==null){var g=o.baseState;a=0,d=c=s=null,u=i;do{var m=u.lane,y=u.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var k=e,S=u;switch(m=t,y=n,S.tag){case 1:if(k=S.payload,typeof k=="function"){g=k.call(y,g,m);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=S.payload,m=typeof k=="function"?k.call(y,g,m):k,m==null)break e;g=le({},g,m);break e;case 2:Ut=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[u]:m.push(u))}else y={eventTime:y,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(c=d=y,s=g):d=d.next=y,a|=m;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;m=u,u=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(1);if(d===null&&(s=g),o.baseState=s,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);mn|=a,e.lanes=a,e.memoizedState=g}}function Cu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(_(191,o));o.call(r)}}}var ro={},_t=nn(ro),Qr=nn(ro),Jr=nn(ro);function cn(e){if(e===ro)throw Error(_(174));return e}function Dl(e,t){switch(X(Jr,t),X(Qr,e),X(_t,ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fa(t,e)}te(_t),X(_t,t)}function Jn(){te(_t),te(Qr),te(Jr)}function qc(e){cn(Jr.current);var t=cn(_t.current),n=Fa(t,e.type);t!==n&&(X(Qr,e),X(_t,n))}function jl(e){Qr.current===e&&(te(_t),te(Qr))}var ie=nn(0);function si(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=[];function Ul(){for(var e=0;e<ga.length;e++)ga[e]._workInProgressVersionPrimary=null;ga.length=0}var Uo=zt.ReactCurrentDispatcher,ha=zt.ReactCurrentBatchConfig,hn=0,ae=null,fe=null,he=null,ui=!1,Ir=!1,Yr=0,kg=0;function Ne(){throw Error(_(321))}function Wl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function Bl(e,t,n,r,o,i){if(hn=i,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Uo.current=e===null||e.memoizedState===null?Ng:Cg,e=n(r,o),Ir){i=0;do{if(Ir=!1,Yr=0,25<=i)throw Error(_(301));i+=1,he=fe=null,t.updateQueue=null,Uo.current=Eg,e=n(r,o)}while(Ir)}if(Uo.current=ci,t=fe!==null&&fe.next!==null,hn=0,he=fe=ae=null,ui=!1,t)throw Error(_(300));return e}function Hl(){var e=Yr!==0;return Yr=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?ae.memoizedState=he=e:he=he.next=e,he}function it(){if(fe===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=fe.next;var t=he===null?ae.memoizedState:he.next;if(t!==null)he=t,fe=e;else{if(e===null)throw Error(_(310));fe=e,e={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},he===null?ae.memoizedState=he=e:he=he.next=e}return he}function Xr(e,t){return typeof t=="function"?t(e):t}function ma(e){var t=it(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=fe,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var u=a=null,s=null,c=i;do{var d=c.lane;if((hn&d)===d)s!==null&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=g,a=r):s=s.next=g,ae.lanes|=d,mn|=d}c=c.next}while(c!==null&&c!==i);s===null?a=r:s.next=u,gt(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ae.lanes|=i,mn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function va(e){var t=it(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);gt(i,t.memoizedState)||(Ae=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zc(){}function ed(e,t){var n=ae,r=it(),o=t(),i=!gt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ae=!0),r=r.queue,Gl(rd.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,qr(9,nd.bind(null,n,r,o,t),void 0,null),me===null)throw Error(_(349));hn&30||td(n,t,o)}return o}function td(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nd(e,t,n,r){t.value=n,t.getSnapshot=r,od(t)&&id(e)}function rd(e,t,n){return n(function(){od(t)&&id(e)})}function od(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gt(e,n)}catch{return!0}}function id(e){var t=Ot(e,1);t!==null&&ft(t,e,1,-1)}function Eu(e){var t=xt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:e},t.queue=e,e=e.dispatch=Sg.bind(null,ae,e),[t.memoizedState,e]}function qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ad(){return it().memoizedState}function Wo(e,t,n,r){var o=xt();ae.flags|=e,o.memoizedState=qr(1|t,n,void 0,r===void 0?null:r)}function _i(e,t,n,r){var o=it();r=r===void 0?null:r;var i=void 0;if(fe!==null){var a=fe.memoizedState;if(i=a.destroy,r!==null&&Wl(r,a.deps)){o.memoizedState=qr(t,n,i,r);return}}ae.flags|=e,o.memoizedState=qr(1|t,n,i,r)}function Pu(e,t){return Wo(8390656,8,e,t)}function Gl(e,t){return _i(2048,8,e,t)}function ld(e,t){return _i(4,2,e,t)}function sd(e,t){return _i(4,4,e,t)}function ud(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 cd(e,t,n){return n=n!=null?n.concat([e]):null,_i(4,4,ud.bind(null,t,e),n)}function $l(){}function dd(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pd(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fd(e,t,n){return hn&21?(gt(n,t)||(n=yc(),ae.lanes|=n,mn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n)}function _g(e,t){var n=J;J=n!==0&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{J=n,ha.transition=r}}function gd(){return it().memoizedState}function bg(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hd(e))md(t,n);else if(n=Yc(e,t,n,r),n!==null){var o=Ie();ft(n,e,r,o),vd(n,t,r)}}function Sg(e,t,n){var r=Xt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hd(e))md(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,u=i(a,n);if(o.hasEagerState=!0,o.eagerState=u,gt(u,a)){var s=t.interleaved;s===null?(o.next=o,zl(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Yc(e,t,o,r),n!==null&&(o=Ie(),ft(n,e,r,o),vd(n,t,r))}}function hd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function md(e,t){Ir=ui=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_l(e,n)}}var ci={readContext:ot,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},Ng={readContext:ot,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wo(4194308,4,ud.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wo(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bg.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Eu,useDebugValue:$l,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Eu(!1),t=e[0];return e=_g.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,o=xt();if(ne){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),me===null)throw Error(_(349));hn&30||td(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Pu(rd.bind(null,r,i,e),[e]),r.flags|=2048,qr(9,nd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=xt(),t=me.identifierPrefix;if(ne){var n=Mt,r=Tt;n=(r&~(1<<32-pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Cg={readContext:ot,useCallback:dd,useContext:ot,useEffect:Gl,useImperativeHandle:cd,useInsertionEffect:ld,useLayoutEffect:sd,useMemo:pd,useReducer:ma,useRef:ad,useState:function(){return ma(Xr)},useDebugValue:$l,useDeferredValue:function(e){var t=it();return fd(t,fe.memoizedState,e)},useTransition:function(){var e=ma(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:ed,useId:gd,unstable_isNewReconciler:!1},Eg={readContext:ot,useCallback:dd,useContext:ot,useEffect:Gl,useImperativeHandle:cd,useInsertionEffect:ld,useLayoutEffect:sd,useMemo:pd,useReducer:va,useRef:ad,useState:function(){return va(Xr)},useDebugValue:$l,useDeferredValue:function(e){var t=it();return fe===null?t.memoizedState=e:fd(t,fe.memoizedState,e)},useTransition:function(){var e=va(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:ed,useId:gd,unstable_isNewReconciler:!1};function ut(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function qa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bi={isMounted:function(e){return(e=e._reactInternals)?xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ie(),o=Xt(e),i=Ft(r,o);i.payload=t,n!=null&&(i.callback=n),t=Jt(e,i,o),t!==null&&(ft(t,e,o,r),jo(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ie(),o=Xt(e),i=Ft(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Jt(e,i,o),t!==null&&(ft(t,e,o,r),jo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ie(),r=Xt(e),o=Ft(n,r);o.tag=2,t!=null&&(o.callback=t),t=Jt(e,o,r),t!==null&&(ft(t,e,r,n),jo(t,e,r))}};function Tu(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Gr(n,r)||!Gr(o,i):!0}function yd(e,t,n){var r=!1,o=en,i=t.contextType;return typeof i=="object"&&i!==null?i=ot(i):(o=je(t)?fn:Pe.current,r=t.contextTypes,i=(r=r!=null)?Vn(e,o):en),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Mu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bi.enqueueReplaceState(t,t.state,null)}function Za(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Al(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ot(i):(i=je(t)?fn:Pe.current,o.context=Vn(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(qa(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bi.enqueueReplaceState(o,o.state,null),li(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yn(e,t){try{var n="",r=t;do n+=nf(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
5
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{ta=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sr(e):""}function nf(e){switch(e.tag){case 5:return Sr(e.type);case 16:return Sr("Lazy");case 13:return Sr("Suspense");case 19:return Sr("SuspenseList");case 0:case 2:case 15:return e=na(e.type,!1),e;case 11:return e=na(e.type.render,!1),e;case 1:return e=na(e.type,!0),e;default:return""}}function Ca(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 Pn:return"Fragment";case En:return"Portal";case ba:return"Profiler";case vl:return"StrictMode";case Sa:return"Suspense";case Na:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xu:return(e.displayName||"Context")+".Consumer";case Yu:return(e._context.displayName||"Context")+".Provider";case yl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xl:return t=e.displayName||null,t!==null?t:Ca(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Ca(e(t))}catch{}}return null}function rf(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 Ca(t);case 8:return t===vl?"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 Zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function of(e){var t=Zu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yo(e){e._valueTracker||(e._valueTracker=of(e))}function ec(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vo(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 Ea(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tc(e,t){t=t.checked,t!=null&&ml(e,"checked",t,!1)}function Pa(e,t){tc(e,t);var n=Zt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ta(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ta(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ks(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ta(e,t,n){(t!=="number"||Vo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nr=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ma(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Js(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(Nr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Zt(n)}}function nc(e,t){var n=Zt(t.value),r=Zt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Qs(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rc(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 Fa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xo,oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xo=xo||document.createElement("div"),xo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pr={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},af=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(e){af.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pr[t]=Pr[e]})});function ic(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pr.hasOwnProperty(e)&&Pr[e]?(""+t).trim():t+"px"}function ac(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ic(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var lf=le({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 Ia(e,t){if(t){if(lf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Ra(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 Oa=null;function wl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var La=null,Un=null,Wn=null;function Ys(e){if(e=no(e)){if(typeof La!="function")throw Error(_(280));var t=e.stateNode;t&&(t=wi(t),La(e.stateNode,e.type,t))}}function lc(e){Un?Wn?Wn.push(e):Wn=[e]:Un=e}function sc(){if(Un){var e=Un,t=Wn;if(Wn=Un=null,Ys(e),t)for(e=0;e<t.length;e++)Ys(t[e])}}function uc(e,t){return e(t)}function cc(){}var ra=!1;function dc(e,t,n){if(ra)return e(t,n);ra=!0;try{return uc(e,t,n)}finally{ra=!1,(Un!==null||Wn!==null)&&(cc(),sc())}}function jr(e,t){var n=e.stateNode;if(n===null)return null;var r=wi(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var za=!1;if(It)try{Nn={},Object.defineProperty(Nn,"passive",{get:function(){za=!0}}),window.addEventListener("test",Nn,Nn),window.removeEventListener("test",Nn,Nn)}catch{za=!1}var Nn;function sf(e,t,n,r,o,i,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Tr=!1,Ko=null,Jo=!1,Aa=null,uf={onError:function(e){Tr=!0,Ko=e}};function cf(e,t,n,r,o,i,a,u,s){Tr=!1,Ko=null,sf.apply(uf,arguments)}function df(e,t,n,r,o,i,a,u,s){if(cf.apply(this,arguments),Tr){if(Tr){var c=Ko;Tr=!1,Ko=null}else throw Error(_(198));Jo||(Jo=!0,Aa=c)}}function xn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pc(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 Xs(e){if(xn(e)!==e)throw Error(_(188))}function pf(e){var t=e.alternate;if(!t){if(t=xn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xs(o),e;if(i===r)return Xs(o),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,u=o.child;u;){if(u===n){a=!0,n=o,r=i;break}if(u===r){a=!0,r=o,n=i;break}u=u.sibling}if(!a){for(u=i.child;u;){if(u===n){a=!0,n=i,r=o;break}if(u===r){a=!0,r=i,n=o;break}u=u.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function fc(e){return e=pf(e),e!==null?gc(e):null}function gc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gc(e);if(t!==null)return t;e=e.sibling}return null}var hc=Je.unstable_scheduleCallback,qs=Je.unstable_cancelCallback,ff=Je.unstable_shouldYield,gf=Je.unstable_requestPaint,de=Je.unstable_now,hf=Je.unstable_getCurrentPriorityLevel,kl=Je.unstable_ImmediatePriority,mc=Je.unstable_UserBlockingPriority,Qo=Je.unstable_NormalPriority,mf=Je.unstable_LowPriority,vc=Je.unstable_IdlePriority,mi=null,_t=null;function vf(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(mi,e,void 0,(e.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:wf,yf=Math.log,xf=Math.LN2;function wf(e){return e>>>=0,e===0?32:31-(yf(e)/xf|0)|0}var wo=64,ko=4194304;function Cr(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 Yo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~o;u!==0?r=Cr(u):(i&=a,i!==0&&(r=Cr(i)))}else a=n&~o,a!==0?r=Cr(a):i!==0&&(r=Cr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pt(t),o=1<<n,r|=e[n],t&=~o;return r}function kf(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 _f(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-pt(i),u=1<<a,s=o[a];s===-1?(!(u&n)||u&r)&&(o[a]=kf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function Da(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yc(){var e=wo;return wo<<=1,!(wo&4194240)&&(wo=64),e}function oa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=n}function bf(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-pt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function _l(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Q=0;function xc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wc,bl,kc,_c,bc,ja=!1,_o=[],$t=null,Vt=null,Kt=null,Ur=new Map,Wr=new Map,Wt=[],Sf="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 Zs(e,t){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Vt=null;break;case"mouseover":case"mouseout":Kt=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(t.pointerId)}}function vr(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=no(t),t!==null&&bl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Nf(e,t,n,r,o){switch(t){case"focusin":return $t=vr($t,e,t,n,r,o),!0;case"dragenter":return Vt=vr(Vt,e,t,n,r,o),!0;case"mouseover":return Kt=vr(Kt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ur.set(i,vr(Ur.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Wr.set(i,vr(Wr.get(i)||null,e,t,n,r,o)),!0}return!1}function Sc(e){var t=sn(e.target);if(t!==null){var n=xn(t);if(n!==null){if(t=n.tag,t===13){if(t=pc(n),t!==null){e.blockedOn=t,bc(e.priority,function(){kc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ua(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Oa=r,n.target.dispatchEvent(r),Oa=null}else return t=no(n),t!==null&&bl(t),e.blockedOn=n,!1;t.shift()}return!0}function eu(e,t,n){zo(e)&&n.delete(t)}function Cf(){ja=!1,$t!==null&&zo($t)&&($t=null),Vt!==null&&zo(Vt)&&(Vt=null),Kt!==null&&zo(Kt)&&(Kt=null),Ur.forEach(eu),Wr.forEach(eu)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,ja||(ja=!0,Je.unstable_scheduleCallback(Je.unstable_NormalPriority,Cf)))}function Br(e){function t(o){return yr(o,e)}if(0<_o.length){yr(_o[0],e);for(var n=1;n<_o.length;n++){var r=_o[n];r.blockedOn===e&&(r.blockedOn=null)}}for($t!==null&&yr($t,e),Vt!==null&&yr(Vt,e),Kt!==null&&yr(Kt,e),Ur.forEach(t),Wr.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)Sc(n),n.blockedOn===null&&Wt.shift()}var Bn=zt.ReactCurrentBatchConfig,Xo=!0;function Ef(e,t,n,r){var o=Q,i=Bn.transition;Bn.transition=null;try{Q=1,Sl(e,t,n,r)}finally{Q=o,Bn.transition=i}}function Pf(e,t,n,r){var o=Q,i=Bn.transition;Bn.transition=null;try{Q=4,Sl(e,t,n,r)}finally{Q=o,Bn.transition=i}}function Sl(e,t,n,r){if(Xo){var o=Ua(e,t,n,r);if(o===null)da(e,t,r,qo,n),Zs(e,r);else if(Nf(o,e,t,n,r))r.stopPropagation();else if(Zs(e,r),t&4&&-1<Sf.indexOf(e)){for(;o!==null;){var i=no(o);if(i!==null&&wc(i),i=Ua(e,t,n,r),i===null&&da(e,t,r,qo,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else da(e,t,r,null,n)}}var qo=null;function Ua(e,t,n,r){if(qo=null,e=wl(r),e=sn(e),e!==null)if(t=xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qo=e,null}function Nc(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(hf()){case kl:return 1;case mc:return 4;case Qo:case mf:return 16;case vc:return 536870912;default:return 16}default:return 16}}var Ht=null,Nl=null,Ao=null;function Cc(){if(Ao)return Ao;var e,t=Nl,n=t.length,r,o="value"in Ht?Ht.value:Ht.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return Ao=o.slice(e,1<r?1-r:void 0)}function Do(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 bo(){return!0}function tu(){return!1}function Qe(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bo:tu,this.isPropagationStopped=tu,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cl=Qe(qn),to=le({},qn,{view:0,detail:0}),Tf=Qe(to),ia,aa,xr,vi=le({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:El,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!==xr&&(xr&&e.type==="mousemove"?(ia=e.screenX-xr.screenX,aa=e.screenY-xr.screenY):aa=ia=0,xr=e),ia)},movementY:function(e){return"movementY"in e?e.movementY:aa}}),nu=Qe(vi),Mf=le({},vi,{dataTransfer:0}),Ff=Qe(Mf),If=le({},to,{relatedTarget:0}),la=Qe(If),Rf=le({},qn,{animationName:0,elapsedTime:0,pseudoElement:0}),Of=Qe(Rf),Lf=le({},qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zf=Qe(Lf),Af=le({},qn,{data:0}),ru=Qe(Af),Df={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jf={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"},Uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uf[e])?!!t[e]:!1}function El(){return Wf}var Bf=le({},to,{key:function(e){if(e.key){var t=Df[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Do(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:El,charCode:function(e){return e.type==="keypress"?Do(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Do(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hf=Qe(Bf),Gf=le({},vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ou=Qe(Gf),$f=le({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:El}),Vf=Qe($f),Kf=le({},qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jf=Qe(Kf),Qf=le({},vi,{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}),Yf=Qe(Qf),Xf=[9,13,27,32],Pl=It&&"CompositionEvent"in window,Mr=null;It&&"documentMode"in document&&(Mr=document.documentMode);var qf=It&&"TextEvent"in window&&!Mr,Ec=It&&(!Pl||Mr&&8<Mr&&11>=Mr),iu=String.fromCharCode(32),au=!1;function Pc(e,t){switch(e){case"keyup":return Xf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function Zf(e,t){switch(e){case"compositionend":return Tc(t);case"keypress":return t.which!==32?null:(au=!0,iu);case"textInput":return e=t.data,e===iu&&au?null:e;default:return null}}function eg(e,t){if(Tn)return e==="compositionend"||!Pl&&Pc(e,t)?(e=Cc(),Ao=Nl=Ht=null,Tn=!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 Ec&&t.locale!=="ko"?null:t.data;default:return null}}var tg={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 lu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tg[e.type]:t==="textarea"}function Mc(e,t,n,r){lc(r),t=Zo(t,"onChange"),0<t.length&&(n=new Cl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fr=null,Hr=null;function ng(e){Wc(e,0)}function yi(e){var t=In(e);if(ec(t))return e}function rg(e,t){if(e==="change")return t}var Fc=!1;It&&(It?(No="oninput"in document,No||(sa=document.createElement("div"),sa.setAttribute("oninput","return;"),No=typeof sa.oninput=="function"),So=No):So=!1,Fc=So&&(!document.documentMode||9<document.documentMode));var So,No,sa;function su(){Fr&&(Fr.detachEvent("onpropertychange",Ic),Hr=Fr=null)}function Ic(e){if(e.propertyName==="value"&&yi(Hr)){var t=[];Mc(t,Hr,e,wl(e)),dc(ng,t)}}function og(e,t,n){e==="focusin"?(su(),Fr=t,Hr=n,Fr.attachEvent("onpropertychange",Ic)):e==="focusout"&&su()}function ig(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(Hr)}function ag(e,t){if(e==="click")return yi(t)}function lg(e,t){if(e==="input"||e==="change")return yi(t)}function sg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:sg;function Gr(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!_a.call(t,o)||!gt(e[o],t[o]))return!1}return!0}function uu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cu(e,t){var n=uu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uu(n)}}function Rc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oc(){for(var e=window,t=Vo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vo(e.document)}return t}function Tl(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 ug(e){var t=Oc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rc(n.ownerDocument.documentElement,n)){if(r!==null&&Tl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cu(n,i);var a=cu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cg=It&&"documentMode"in document&&11>=document.documentMode,Mn=null,Wa=null,Ir=null,Ba=!1;function du(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ba||Mn==null||Mn!==Vo(r)||(r=Mn,"selectionStart"in r&&Tl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Gr(Ir,r)||(Ir=r,r=Zo(Wa,"onSelect"),0<r.length&&(t=new Cl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Mn)))}function Co(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fn={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},ua={},Lc={};It&&(Lc=document.createElement("div").style,"AnimationEvent"in window||(delete Fn.animationend.animation,delete Fn.animationiteration.animation,delete Fn.animationstart.animation),"TransitionEvent"in window||delete Fn.transitionend.transition);function xi(e){if(ua[e])return ua[e];if(!Fn[e])return e;var t=Fn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lc)return ua[e]=t[n];return e}var zc=xi("animationend"),Ac=xi("animationiteration"),Dc=xi("animationstart"),jc=xi("transitionend"),Uc=new Map,pu="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 tn(e,t){Uc.set(e,t),yn(t,[e])}for(Eo=0;Eo<pu.length;Eo++)Po=pu[Eo],fu=Po.toLowerCase(),gu=Po[0].toUpperCase()+Po.slice(1),tn(fu,"on"+gu);var Po,fu,gu,Eo;tn(zc,"onAnimationEnd");tn(Ac,"onAnimationIteration");tn(Dc,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(jc,"onTransitionEnd");$n("onMouseEnter",["mouseout","mouseover"]);$n("onMouseLeave",["mouseout","mouseover"]);$n("onPointerEnter",["pointerout","pointerover"]);$n("onPointerLeave",["pointerout","pointerover"]);yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yn("onBeforeInput",["compositionend","keypress","textInput","paste"]);yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="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(" "),dg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function hu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,df(r,t,void 0,e),e.currentTarget=null}function Wc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==i&&o.isPropagationStopped())break e;hu(o,u,c),i=s}else for(a=0;a<r.length;a++){if(u=r[a],s=u.instance,c=u.currentTarget,u=u.listener,s!==i&&o.isPropagationStopped())break e;hu(o,u,c),i=s}}}if(Jo)throw e=Aa,Jo=!1,Aa=null,e}function ee(e,t){var n=t[Ka];n===void 0&&(n=t[Ka]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function ca(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var To="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[To]){e[To]=!0,Qu.forEach(function(n){n!=="selectionchange"&&(dg.has(n)||ca(n,!1,e),ca(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[To]||(t[To]=!0,ca("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(Nc(t)){case 1:var o=Ef;break;case 4:o=Pf;break;default:o=Sl}n=o.bind(null,t,n,e),o=void 0,!za||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function da(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===o||u.nodeType===8&&u.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;a=a.return}for(;u!==null;){if(a=sn(u),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}u=u.parentNode}}r=r.return}dc(function(){var c=i,d=wl(n),g=[];e:{var m=Uc.get(e);if(m!==void 0){var y=Cl,k=e;switch(e){case"keypress":if(Do(n)===0)break e;case"keydown":case"keyup":y=Hf;break;case"focusin":k="focus",y=la;break;case"focusout":k="blur",y=la;break;case"beforeblur":case"afterblur":y=la;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ff;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Vf;break;case zc:case Ac:case Dc:y=Of;break;case jc:y=Jf;break;case"scroll":y=Tf;break;case"wheel":y=Yf;break;case"copy":case"cut":case"paste":y=zf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=ou}var S=(t&4)!==0,B=!S&&e==="scroll",f=S?m!==null?m+"Capture":null:m;S=[];for(var p=c,h;p!==null;){h=p;var x=h.stateNode;if(h.tag===5&&x!==null&&(h=x,f!==null&&(x=jr(p,f),x!=null&&S.push(Vr(p,x,h)))),B)break;p=p.return}0<S.length&&(m=new y(m,k,null,n,d),g.push({event:m,listeners:S}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&n!==Oa&&(k=n.relatedTarget||n.fromElement)&&(sn(k)||k[Rt]))break e;if((y||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?sn(k):null,k!==null&&(B=xn(k),k!==B||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(S=nu,x="onMouseLeave",f="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(S=ou,x="onPointerLeave",f="onPointerEnter",p="pointer"),B=y==null?m:In(y),h=k==null?m:In(k),m=new S(x,p+"leave",y,n,d),m.target=B,m.relatedTarget=h,x=null,sn(d)===c&&(S=new S(f,p+"enter",k,n,d),S.target=h,S.relatedTarget=B,x=S),B=x,y&&k)t:{for(S=y,f=k,p=0,h=S;h;h=Cn(h))p++;for(h=0,x=f;x;x=Cn(x))h++;for(;0<p-h;)S=Cn(S),p--;for(;0<h-p;)f=Cn(f),h--;for(;p--;){if(S===f||f!==null&&S===f.alternate)break t;S=Cn(S),f=Cn(f)}S=null}else S=null;y!==null&&mu(g,m,y,S,!1),k!==null&&B!==null&&mu(g,B,k,S,!0)}}e:{if(m=c?In(c):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var C=rg;else if(lu(m))if(Fc)C=lg;else{C=ig;var M=og}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(C=ag);if(C&&(C=C(e,c))){Mc(g,C,n,d);break e}M&&M(e,m,c),e==="focusout"&&(M=m._wrapperState)&&M.controlled&&m.type==="number"&&Ta(m,"number",m.value)}switch(M=c?In(c):window,e){case"focusin":(lu(M)||M.contentEditable==="true")&&(Mn=M,Wa=c,Ir=null);break;case"focusout":Ir=Wa=Mn=null;break;case"mousedown":Ba=!0;break;case"contextmenu":case"mouseup":case"dragend":Ba=!1,du(g,n,d);break;case"selectionchange":if(cg)break;case"keydown":case"keyup":du(g,n,d)}var F;if(Pl)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Tn?Pc(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Ec&&n.locale!=="ko"&&(Tn||P!=="onCompositionStart"?P==="onCompositionEnd"&&Tn&&(F=Cc()):(Ht=d,Nl="value"in Ht?Ht.value:Ht.textContent,Tn=!0)),M=Zo(c,P),0<M.length&&(P=new ru(P,e,null,n,d),g.push({event:P,listeners:M}),F?P.data=F:(F=Tc(n),F!==null&&(P.data=F)))),(F=qf?Zf(e,n):eg(e,n))&&(c=Zo(c,"onBeforeInput"),0<c.length&&(d=new ru("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:c}),d.data=F))}Wc(g,t)})}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zo(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=jr(e,n),i!=null&&r.unshift(Vr(e,i,o)),i=jr(e,t),i!=null&&r.push(Vr(e,i,o))),e=e.return}return r}function Cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mu(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&c!==null&&(u=c,o?(s=jr(n,i),s!=null&&a.unshift(Vr(n,s,u))):o||(s=jr(n,i),s!=null&&a.push(Vr(n,s,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var pg=/\r\n?/g,fg=/\u0000|\uFFFD/g;function vu(e){return(typeof e=="string"?e:""+e).replace(pg,`
|
|
6
|
+
`).replace(fg,"")}function Mo(e,t,n){if(t=vu(t),vu(e)!==t&&n)throw Error(_(425))}function ei(){}var Ha=null,Ga=null;function $a(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 Va=typeof setTimeout=="function"?setTimeout:void 0,gg=typeof clearTimeout=="function"?clearTimeout:void 0,yu=typeof Promise=="function"?Promise:void 0,hg=typeof queueMicrotask=="function"?queueMicrotask:typeof yu<"u"?function(e){return yu.resolve(null).then(e).catch(mg)}:Va;function mg(e){setTimeout(function(){throw e})}function pa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Br(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Br(t)}function Jt(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 xu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Zn=Math.random().toString(36).slice(2),kt="__reactFiber$"+Zn,Kr="__reactProps$"+Zn,Rt="__reactContainer$"+Zn,Ka="__reactEvents$"+Zn,vg="__reactListeners$"+Zn,yg="__reactHandles$"+Zn;function sn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Rt]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xu(e);e!==null;){if(n=e[kt])return n;e=xu(e)}return t}e=n,n=e.parentNode}return null}function no(e){return e=e[kt]||e[Rt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function In(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function wi(e){return e[Kr]||null}var Ja=[],Rn=-1;function nn(e){return{current:e}}function te(e){0>Rn||(e.current=Ja[Rn],Ja[Rn]=null,Rn--)}function X(e,t){Rn++,Ja[Rn]=e.current,e.current=t}var en={},Pe=nn(en),De=nn(!1),fn=en;function Vn(e,t){var n=e.type.contextTypes;if(!n)return en;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function je(e){return e=e.childContextTypes,e!=null}function ti(){te(De),te(Pe)}function wu(e,t,n){if(Pe.current!==en)throw Error(_(168));X(Pe,t),X(De,n)}function Hc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(_(108,rf(e)||"Unknown",o));return le({},n,r)}function ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,fn=Pe.current,X(Pe,e),X(De,De.current),!0}function ku(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Hc(e,t,fn),r.__reactInternalMemoizedMergedChildContext=e,te(De),te(Pe),X(Pe,e)):te(De),X(De,n)}var Pt=null,ki=!1,fa=!1;function Gc(e){Pt===null?Pt=[e]:Pt.push(e)}function xg(e){ki=!0,Gc(e)}function rn(){if(!fa&&Pt!==null){fa=!0;var e=0,t=Q;try{var n=Pt;for(Q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pt=null,ki=!1}catch(o){throw Pt!==null&&(Pt=Pt.slice(e+1)),hc(kl,rn),o}finally{Q=t,fa=!1}}return null}var On=[],Ln=0,ri=null,oi=0,et=[],tt=0,gn=null,Tt=1,Mt="";function an(e,t){On[Ln++]=oi,On[Ln++]=ri,ri=e,oi=t}function $c(e,t,n){et[tt++]=Tt,et[tt++]=Mt,et[tt++]=gn,gn=e;var r=Tt;e=Mt;var o=32-pt(r)-1;r&=~(1<<o),n+=1;var i=32-pt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Tt=1<<32-pt(t)+o|n<<o|r,Mt=i+e}else Tt=1<<i|n<<o|r,Mt=e}function Ml(e){e.return!==null&&(an(e,1),$c(e,1,0))}function Fl(e){for(;e===ri;)ri=On[--Ln],On[Ln]=null,oi=On[--Ln],On[Ln]=null;for(;e===gn;)gn=et[--tt],et[tt]=null,Mt=et[--tt],et[tt]=null,Tt=et[--tt],et[tt]=null}var Ke=null,Ve=null,ne=!1,dt=null;function Vc(e,t){var n=nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _u(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ke=e,Ve=Jt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ke=e,Ve=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=gn!==null?{id:Tt,overflow:Mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ke=e,Ve=null,!0):!1;default:return!1}}function Qa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ya(e){if(ne){var t=Ve;if(t){var n=t;if(!_u(e,t)){if(Qa(e))throw Error(_(418));t=Jt(n.nextSibling);var r=Ke;t&&_u(e,t)?Vc(r,n):(e.flags=e.flags&-4097|2,ne=!1,Ke=e)}}else{if(Qa(e))throw Error(_(418));e.flags=e.flags&-4097|2,ne=!1,Ke=e}}}function bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ke=e}function Fo(e){if(e!==Ke)return!1;if(!ne)return bu(e),ne=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$a(e.type,e.memoizedProps)),t&&(t=Ve)){if(Qa(e))throw Kc(),Error(_(418));for(;t;)Vc(e,t),t=Jt(t.nextSibling)}if(bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ve=Jt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ve=null}}else Ve=Ke?Jt(e.stateNode.nextSibling):null;return!0}function Kc(){for(var e=Ve;e;)e=Jt(e.nextSibling)}function Kn(){Ve=Ke=null,ne=!1}function Il(e){dt===null?dt=[e]:dt.push(e)}var wg=zt.ReactCurrentBatchConfig;function wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var u=o.refs;a===null?delete u[i]:u[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Io(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Su(e){var t=e._init;return t(e._payload)}function Jc(e){function t(f,p){if(e){var h=f.deletions;h===null?(f.deletions=[p],f.flags|=16):h.push(p)}}function n(f,p){if(!e)return null;for(;p!==null;)t(f,p),p=p.sibling;return null}function r(f,p){for(f=new Map;p!==null;)p.key!==null?f.set(p.key,p):f.set(p.index,p),p=p.sibling;return f}function o(f,p){return f=qt(f,p),f.index=0,f.sibling=null,f}function i(f,p,h){return f.index=h,e?(h=f.alternate,h!==null?(h=h.index,h<p?(f.flags|=2,p):h):(f.flags|=2,p)):(f.flags|=1048576,p)}function a(f){return e&&f.alternate===null&&(f.flags|=2),f}function u(f,p,h,x){return p===null||p.tag!==6?(p=wa(h,f.mode,x),p.return=f,p):(p=o(p,h),p.return=f,p)}function s(f,p,h,x){var C=h.type;return C===Pn?d(f,p,h.props.children,x,h.key):p!==null&&(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Su(C)===p.type)?(x=o(p,h.props),x.ref=wr(f,p,h),x.return=f,x):(x=$o(h.type,h.key,h.props,null,f.mode,x),x.ref=wr(f,p,h),x.return=f,x)}function c(f,p,h,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==h.containerInfo||p.stateNode.implementation!==h.implementation?(p=ka(h,f.mode,x),p.return=f,p):(p=o(p,h.children||[]),p.return=f,p)}function d(f,p,h,x,C){return p===null||p.tag!==7?(p=pn(h,f.mode,x,C),p.return=f,p):(p=o(p,h),p.return=f,p)}function g(f,p,h){if(typeof p=="string"&&p!==""||typeof p=="number")return p=wa(""+p,f.mode,h),p.return=f,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case vo:return h=$o(p.type,p.key,p.props,null,f.mode,h),h.ref=wr(f,null,p),h.return=f,h;case En:return p=ka(p,f.mode,h),p.return=f,p;case jt:var x=p._init;return g(f,x(p._payload),h)}if(Nr(p)||mr(p))return p=pn(p,f.mode,h,null),p.return=f,p;Io(f,p)}return null}function m(f,p,h,x){var C=p!==null?p.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return C!==null?null:u(f,p,""+h,x);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:return h.key===C?s(f,p,h,x):null;case En:return h.key===C?c(f,p,h,x):null;case jt:return C=h._init,m(f,p,C(h._payload),x)}if(Nr(h)||mr(h))return C!==null?null:d(f,p,h,x,null);Io(f,h)}return null}function y(f,p,h,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return f=f.get(h)||null,u(p,f,""+x,C);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case vo:return f=f.get(x.key===null?h:x.key)||null,s(p,f,x,C);case En:return f=f.get(x.key===null?h:x.key)||null,c(p,f,x,C);case jt:var M=x._init;return y(f,p,h,M(x._payload),C)}if(Nr(x)||mr(x))return f=f.get(h)||null,d(p,f,x,C,null);Io(p,x)}return null}function k(f,p,h,x){for(var C=null,M=null,F=p,P=p=0,K=null;F!==null&&P<h.length;P++){F.index>P?(K=F,F=null):K=F.sibling;var W=m(f,F,h[P],x);if(W===null){F===null&&(F=K);break}e&&F&&W.alternate===null&&t(f,F),p=i(W,p,P),M===null?C=W:M.sibling=W,M=W,F=K}if(P===h.length)return n(f,F),ne&&an(f,P),C;if(F===null){for(;P<h.length;P++)F=g(f,h[P],x),F!==null&&(p=i(F,p,P),M===null?C=F:M.sibling=F,M=F);return ne&&an(f,P),C}for(F=r(f,F);P<h.length;P++)K=y(F,f,P,h[P],x),K!==null&&(e&&K.alternate!==null&&F.delete(K.key===null?P:K.key),p=i(K,p,P),M===null?C=K:M.sibling=K,M=K);return e&&F.forEach(function(ve){return t(f,ve)}),ne&&an(f,P),C}function S(f,p,h,x){var C=mr(h);if(typeof C!="function")throw Error(_(150));if(h=C.call(h),h==null)throw Error(_(151));for(var M=C=null,F=p,P=p=0,K=null,W=h.next();F!==null&&!W.done;P++,W=h.next()){F.index>P?(K=F,F=null):K=F.sibling;var ve=m(f,F,W.value,x);if(ve===null){F===null&&(F=K);break}e&&F&&ve.alternate===null&&t(f,F),p=i(ve,p,P),M===null?C=ve:M.sibling=ve,M=ve,F=K}if(W.done)return n(f,F),ne&&an(f,P),C;if(F===null){for(;!W.done;P++,W=h.next())W=g(f,W.value,x),W!==null&&(p=i(W,p,P),M===null?C=W:M.sibling=W,M=W);return ne&&an(f,P),C}for(F=r(f,F);!W.done;P++,W=h.next())W=y(F,f,P,W.value,x),W!==null&&(e&&W.alternate!==null&&F.delete(W.key===null?P:W.key),p=i(W,p,P),M===null?C=W:M.sibling=W,M=W);return e&&F.forEach(function(ir){return t(f,ir)}),ne&&an(f,P),C}function B(f,p,h,x){if(typeof h=="object"&&h!==null&&h.type===Pn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:e:{for(var C=h.key,M=p;M!==null;){if(M.key===C){if(C=h.type,C===Pn){if(M.tag===7){n(f,M.sibling),p=o(M,h.props.children),p.return=f,f=p;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Su(C)===M.type){n(f,M.sibling),p=o(M,h.props),p.ref=wr(f,M,h),p.return=f,f=p;break e}n(f,M);break}else t(f,M);M=M.sibling}h.type===Pn?(p=pn(h.props.children,f.mode,x,h.key),p.return=f,f=p):(x=$o(h.type,h.key,h.props,null,f.mode,x),x.ref=wr(f,p,h),x.return=f,f=x)}return a(f);case En:e:{for(M=h.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(f,p.sibling),p=o(p,h.children||[]),p.return=f,f=p;break e}else{n(f,p);break}else t(f,p);p=p.sibling}p=ka(h,f.mode,x),p.return=f,f=p}return a(f);case jt:return M=h._init,B(f,p,M(h._payload),x)}if(Nr(h))return k(f,p,h,x);if(mr(h))return S(f,p,h,x);Io(f,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(f,p.sibling),p=o(p,h),p.return=f,f=p):(n(f,p),p=wa(h,f.mode,x),p.return=f,f=p),a(f)):n(f,p)}return B}var Jn=Jc(!0),Qc=Jc(!1),ii=nn(null),ai=null,zn=null,Rl=null;function Ol(){Rl=zn=ai=null}function Ll(e){var t=ii.current;te(ii),e._currentValue=t}function Xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hn(e,t){ai=e,Rl=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Rl!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(ai===null)throw Error(_(308));zn=e,ai.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var un=null;function zl(e){un===null?un=[e]:un.push(e)}function Yc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,zl(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function Al(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 Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ot(e,n)}return o=r.interleaved,o===null?(t.next=t,zl(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ot(e,n)}function jo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_l(e,n)}}function Nu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function li(e,t,n,r){var o=e.updateQueue;Ut=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,c=s.next;s.next=null,a===null?i=c:a.next=c,a=s;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==a&&(u===null?d.firstBaseUpdate=c:u.next=c,d.lastBaseUpdate=s))}if(i!==null){var g=o.baseState;a=0,d=c=s=null,u=i;do{var m=u.lane,y=u.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var k=e,S=u;switch(m=t,y=n,S.tag){case 1:if(k=S.payload,typeof k=="function"){g=k.call(y,g,m);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=S.payload,m=typeof k=="function"?k.call(y,g,m):k,m==null)break e;g=le({},g,m);break e;case 2:Ut=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[u]:m.push(u))}else y={eventTime:y,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(c=d=y,s=g):d=d.next=y,a|=m;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;m=u,u=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(1);if(d===null&&(s=g),o.baseState=s,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);mn|=a,e.lanes=a,e.memoizedState=g}}function Cu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(_(191,o));o.call(r)}}}var ro={},bt=nn(ro),Jr=nn(ro),Qr=nn(ro);function cn(e){if(e===ro)throw Error(_(174));return e}function Dl(e,t){switch(X(Qr,t),X(Jr,e),X(bt,ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fa(t,e)}te(bt),X(bt,t)}function Qn(){te(bt),te(Jr),te(Qr)}function qc(e){cn(Qr.current);var t=cn(bt.current),n=Fa(t,e.type);t!==n&&(X(Jr,e),X(bt,n))}function jl(e){Jr.current===e&&(te(bt),te(Jr))}var ie=nn(0);function si(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=[];function Ul(){for(var e=0;e<ga.length;e++)ga[e]._workInProgressVersionPrimary=null;ga.length=0}var Uo=zt.ReactCurrentDispatcher,ha=zt.ReactCurrentBatchConfig,hn=0,ae=null,fe=null,he=null,ui=!1,Rr=!1,Yr=0,kg=0;function Ne(){throw Error(_(321))}function Wl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function Bl(e,t,n,r,o,i){if(hn=i,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Uo.current=e===null||e.memoizedState===null?Ng:Cg,e=n(r,o),Rr){i=0;do{if(Rr=!1,Yr=0,25<=i)throw Error(_(301));i+=1,he=fe=null,t.updateQueue=null,Uo.current=Eg,e=n(r,o)}while(Rr)}if(Uo.current=ci,t=fe!==null&&fe.next!==null,hn=0,he=fe=ae=null,ui=!1,t)throw Error(_(300));return e}function Hl(){var e=Yr!==0;return Yr=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?ae.memoizedState=he=e:he=he.next=e,he}function it(){if(fe===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=fe.next;var t=he===null?ae.memoizedState:he.next;if(t!==null)he=t,fe=e;else{if(e===null)throw Error(_(310));fe=e,e={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},he===null?ae.memoizedState=he=e:he=he.next=e}return he}function Xr(e,t){return typeof t=="function"?t(e):t}function ma(e){var t=it(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=fe,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var u=a=null,s=null,c=i;do{var d=c.lane;if((hn&d)===d)s!==null&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=g,a=r):s=s.next=g,ae.lanes|=d,mn|=d}c=c.next}while(c!==null&&c!==i);s===null?a=r:s.next=u,gt(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ae.lanes|=i,mn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function va(e){var t=it(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);gt(i,t.memoizedState)||(Ae=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zc(){}function ed(e,t){var n=ae,r=it(),o=t(),i=!gt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ae=!0),r=r.queue,Gl(rd.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,qr(9,nd.bind(null,n,r,o,t),void 0,null),me===null)throw Error(_(349));hn&30||td(n,t,o)}return o}function td(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nd(e,t,n,r){t.value=n,t.getSnapshot=r,od(t)&&id(e)}function rd(e,t,n){return n(function(){od(t)&&id(e)})}function od(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gt(e,n)}catch{return!0}}function id(e){var t=Ot(e,1);t!==null&&ft(t,e,1,-1)}function Eu(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:e},t.queue=e,e=e.dispatch=Sg.bind(null,ae,e),[t.memoizedState,e]}function qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ad(){return it().memoizedState}function Wo(e,t,n,r){var o=wt();ae.flags|=e,o.memoizedState=qr(1|t,n,void 0,r===void 0?null:r)}function _i(e,t,n,r){var o=it();r=r===void 0?null:r;var i=void 0;if(fe!==null){var a=fe.memoizedState;if(i=a.destroy,r!==null&&Wl(r,a.deps)){o.memoizedState=qr(t,n,i,r);return}}ae.flags|=e,o.memoizedState=qr(1|t,n,i,r)}function Pu(e,t){return Wo(8390656,8,e,t)}function Gl(e,t){return _i(2048,8,e,t)}function ld(e,t){return _i(4,2,e,t)}function sd(e,t){return _i(4,4,e,t)}function ud(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 cd(e,t,n){return n=n!=null?n.concat([e]):null,_i(4,4,ud.bind(null,t,e),n)}function $l(){}function dd(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pd(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fd(e,t,n){return hn&21?(gt(n,t)||(n=yc(),ae.lanes|=n,mn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n)}function _g(e,t){var n=Q;Q=n!==0&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{Q=n,ha.transition=r}}function gd(){return it().memoizedState}function bg(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hd(e))md(t,n);else if(n=Yc(e,t,n,r),n!==null){var o=Re();ft(n,e,r,o),vd(n,t,r)}}function Sg(e,t,n){var r=Xt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hd(e))md(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,u=i(a,n);if(o.hasEagerState=!0,o.eagerState=u,gt(u,a)){var s=t.interleaved;s===null?(o.next=o,zl(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Yc(e,t,o,r),n!==null&&(o=Re(),ft(n,e,r,o),vd(n,t,r))}}function hd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function md(e,t){Rr=ui=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_l(e,n)}}var ci={readContext:ot,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},Ng={readContext:ot,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wo(4194308,4,ud.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wo(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bg.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Eu,useDebugValue:$l,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Eu(!1),t=e[0];return e=_g.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,o=wt();if(ne){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),me===null)throw Error(_(349));hn&30||td(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Pu(rd.bind(null,r,i,e),[e]),r.flags|=2048,qr(9,nd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=me.identifierPrefix;if(ne){var n=Mt,r=Tt;n=(r&~(1<<32-pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Cg={readContext:ot,useCallback:dd,useContext:ot,useEffect:Gl,useImperativeHandle:cd,useInsertionEffect:ld,useLayoutEffect:sd,useMemo:pd,useReducer:ma,useRef:ad,useState:function(){return ma(Xr)},useDebugValue:$l,useDeferredValue:function(e){var t=it();return fd(t,fe.memoizedState,e)},useTransition:function(){var e=ma(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:ed,useId:gd,unstable_isNewReconciler:!1},Eg={readContext:ot,useCallback:dd,useContext:ot,useEffect:Gl,useImperativeHandle:cd,useInsertionEffect:ld,useLayoutEffect:sd,useMemo:pd,useReducer:va,useRef:ad,useState:function(){return va(Xr)},useDebugValue:$l,useDeferredValue:function(e){var t=it();return fe===null?t.memoizedState=e:fd(t,fe.memoizedState,e)},useTransition:function(){var e=va(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:ed,useId:gd,unstable_isNewReconciler:!1};function ut(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function qa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bi={isMounted:function(e){return(e=e._reactInternals)?xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Re(),o=Xt(e),i=Ft(r,o);i.payload=t,n!=null&&(i.callback=n),t=Qt(e,i,o),t!==null&&(ft(t,e,o,r),jo(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Re(),o=Xt(e),i=Ft(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Qt(e,i,o),t!==null&&(ft(t,e,o,r),jo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Re(),r=Xt(e),o=Ft(n,r);o.tag=2,t!=null&&(o.callback=t),t=Qt(e,o,r),t!==null&&(ft(t,e,r,n),jo(t,e,r))}};function Tu(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Gr(n,r)||!Gr(o,i):!0}function yd(e,t,n){var r=!1,o=en,i=t.contextType;return typeof i=="object"&&i!==null?i=ot(i):(o=je(t)?fn:Pe.current,r=t.contextTypes,i=(r=r!=null)?Vn(e,o):en),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Mu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bi.enqueueReplaceState(t,t.state,null)}function Za(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Al(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ot(i):(i=je(t)?fn:Pe.current,o.context=Vn(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(qa(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bi.enqueueReplaceState(o,o.state,null),li(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yn(e,t){try{var n="",r=t;do n+=nf(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
7
7
|
Error generating stack: `+i.message+`
|
|
8
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function ya(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function el(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Pg=typeof WeakMap=="function"?WeakMap:Map;function xd(e,t,n){n=Ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pi||(pi=!0,cl=r),el(e,t)},n}function wd(e,t,n){n=Ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){el(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){el(e,t),typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Fu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pg;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Bg.bind(null,e,t,n),t.then(e,e))}function Ru(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 Iu(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ft(-1,1),t.tag=2,Jt(n,t,1))),n.lanes|=1),e)}var Tg=zt.ReactCurrentOwner,Ae=!1;function Re(e,t,n,r){t.child=e===null?Jc(t,null,n,r):Qn(t,e.child,n,r)}function Ou(e,t,n,r,o){n=n.render;var i=t.ref;return Hn(t,o),r=Bl(e,t,n,r,i,o),n=Hl(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(ne&&n&&Ml(t),t.flags|=1,Re(e,t,r,o),t.child)}function Lu(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Zl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,kd(e,t,i,r,o)):(e=$o(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Gr,n(a,r)&&e.ref===t.ref)return Lt(e,t,o)}return t.flags|=1,e=qt(i,r),e.ref=t.ref,e.return=t,t.child=e}function kd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Gr(i,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ae=!0);else return t.lanes=e.lanes,Lt(e,t,o)}return tl(e,t,n,r,o)}function _d(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(Dn,$e),$e|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(Dn,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(Dn,$e),$e|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(Dn,$e),$e|=r;return Re(e,t,o,n),t.child}function bd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tl(e,t,n,r,o){var i=je(n)?fn:Pe.current;return i=Vn(t,i),Hn(t,o),n=Bl(e,t,n,r,i,o),r=Hl(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(ne&&r&&Ml(t),t.flags|=1,Re(e,t,n,o),t.child)}function zu(e,t,n,r,o){if(je(n)){var i=!0;ni(t)}else i=!1;if(Hn(t,o),t.stateNode===null)Bo(e,t),yd(t,n,r),Za(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=ot(c):(c=je(n)?fn:Pe.current,c=Vn(t,c));var d=n.getDerivedStateFromProps,g=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==c)&&Mu(t,a,r,c),Ut=!1;var m=t.memoizedState;a.state=m,li(t,r,a,o),s=t.memoizedState,u!==r||m!==s||De.current||Ut?(typeof d=="function"&&(qa(t,n,d,r),s=t.memoizedState),(u=Ut||Tu(t,n,u,r,m,s,c))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Xc(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:ut(t.type,u),a.props=c,g=t.pendingProps,m=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=ot(s):(s=je(n)?fn:Pe.current,s=Vn(t,s));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==g||m!==s)&&Mu(t,a,r,s),Ut=!1,m=t.memoizedState,a.state=m,li(t,r,a,o);var k=t.memoizedState;u!==g||m!==k||De.current||Ut?(typeof y=="function"&&(qa(t,n,y,r),k=t.memoizedState),(c=Ut||Tu(t,n,c,r,m,k,s)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,k,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,k,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),a.props=r,a.state=k,a.context=s,r=c):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return nl(e,t,n,r,i,o)}function nl(e,t,n,r,o,i){bd(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&ku(t,n,!1),Lt(e,t,i);r=t.stateNode,Tg.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Qn(t,e.child,null,i),t.child=Qn(t,null,u,i)):Re(e,t,u,i),t.memoizedState=r.state,o&&ku(t,n,!0),t.child}function Sd(e){var t=e.stateNode;t.pendingContext?wu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wu(e,t.context,!1),Dl(e,t.containerInfo)}function Au(e,t,n,r,o){return Kn(),Rl(o),t.flags|=256,Re(e,t,n,r),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0};function ol(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nd(e,t,n){var r=t.pendingProps,o=ie.current,i=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(o&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),X(ie,o&1),e===null)return Ya(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ci(a,r,0,null),e=pn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ol(n),t.memoizedState=rl,e):Vl(t,a));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return Mg(e,t,a,r,u,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,u=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=qt(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?i=qt(u,i):(i=pn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ol(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=rl,r}return i=e.child,e=i.sibling,r=qt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vl(e,t){return t=Ci({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Io(e,t,n,r){return r!==null&&Rl(r),Qn(t,e.child,null,n),e=Vl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mg(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=ya(Error(_(422))),Io(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ci({mode:"visible",children:r.children},o,0,null),i=pn(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Qn(t,e.child,null,a),t.child.memoizedState=ol(a),t.memoizedState=rl,i);if(!(t.mode&1))return Io(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(_(419)),r=ya(i,r,void 0),Io(e,t,a,r)}if(u=(a&e.childLanes)!==0,Ae||u){if(r=me,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Ot(e,o),ft(r,e,o,-1))}return ql(),r=ya(Error(_(421))),Io(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Hg.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ve=Qt(o.nextSibling),Ke=t,ne=!0,dt=null,e!==null&&(et[tt++]=Tt,et[tt++]=Mt,et[tt++]=gn,Tt=e.id,Mt=e.overflow,gn=t),t=Vl(t,r.children),t.flags|=4096,t)}function Du(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xa(e.return,t,n)}function xa(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Cd(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Re(e,t,r.children,n),r=ie.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Du(e,n,t);else if(e.tag===19)Du(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(ie,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&si(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),xa(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&si(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}xa(t,!0,n,null,i);break;case"together":xa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fg(e,t,n){switch(t.tag){case 3:Sd(t),Kn();break;case 5:qc(t);break;case 1:je(t.type)&&ni(t);break;case 4:Dl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;X(ii,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(ie,ie.current&1),t.flags|=128,null):n&t.child.childLanes?Nd(e,t,n):(X(ie,ie.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);X(ie,ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),X(ie,ie.current),r)break;return null;case 22:case 23:return t.lanes=0,_d(e,t,n)}return Lt(e,t,n)}var Ed,il,Pd,Td;Ed=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};il=function(){};Pd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,cn(_t.current);var i=null;switch(n){case"input":o=Ea(e,o),r=Ea(e,r),i=[];break;case"select":o=le({},o,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":o=Ma(e,o),r=Ma(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ei)}Ra(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ar.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=o?.[c],r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ar.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&ee("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Td=function(e,t,n,r){n!==r&&(t.flags|=4)};function kr(e,t){if(!ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rg(e,t,n){var r=t.pendingProps;switch(Fl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return je(t.type)&&ti(),Ce(t),null;case 3:return r=t.stateNode,Jn(),te(De),te(Pe),Ul(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dt!==null&&(fl(dt),dt=null))),il(e,t),Ce(t),null;case 5:jl(t);var o=cn(Jr.current);if(n=t.type,e!==null&&t.stateNode!=null)Pd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Ce(t),null}if(e=cn(_t.current),Fo(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[wt]=t,r[Kr]=i,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(o=0;o<Er.length;o++)ee(Er[o],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":Vs(r,i),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ee("invalid",r);break;case"textarea":Qs(r,i),ee("invalid",r)}Ra(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var u=i[a];a==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&Mo(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Mo(r.textContent,u,e),o=["children",""+u]):Ar.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&ee("scroll",r)}switch(n){case"input":yo(r),Ks(r,i,!0);break;case"textarea":yo(r),Js(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ei)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[wt]=t,e[Kr]=r,Ed(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ia(n,r),n){case"dialog":ee("cancel",e),ee("close",e),o=r;break;case"iframe":case"object":case"embed":ee("load",e),o=r;break;case"video":case"audio":for(o=0;o<Er.length;o++)ee(Er[o],e);o=r;break;case"source":ee("error",e),o=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),o=r;break;case"details":ee("toggle",e),o=r;break;case"input":Vs(e,r),o=Ea(e,r),ee("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=le({},r,{value:void 0}),ee("invalid",e);break;case"textarea":Qs(e,r),o=Ma(e,r),ee("invalid",e);break;default:o=r}Ra(n,o),u=o;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?ac(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&oc(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Dr(e,s):typeof s=="number"&&Dr(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ar.hasOwnProperty(i)?s!=null&&i==="onScroll"&&ee("scroll",e):s!=null&&ml(e,i,s,a))}switch(n){case"input":yo(e),Ks(e,r,!1);break;case"textarea":yo(e),Js(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Zt(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?jn(e,!!r.multiple,i,!1):r.defaultValue!=null&&jn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ei)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)Td(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=cn(Jr.current),cn(_t.current),Fo(t)){if(r=t.stateNode,n=t.memoizedProps,r[wt]=t,(i=r.nodeValue!==n)&&(e=Ke,e!==null))switch(e.tag){case 3:Mo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mo(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wt]=t,t.stateNode=r}return Ce(t),null;case 13:if(te(ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ne&&Ve!==null&&t.mode&1&&!(t.flags&128))Kc(),Kn(),t.flags|=98560,i=!1;else if(i=Fo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[wt]=t}else Kn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),i=!1}else dt!==null&&(fl(dt),dt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ie.current&1?ge===0&&(ge=3):ql())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return Jn(),il(e,t),e===null&&$r(t.stateNode.containerInfo),Ce(t),null;case 10:return Ll(t.type._context),Ce(t),null;case 17:return je(t.type)&&ti(),Ce(t),null;case 19:if(te(ie),i=t.memoizedState,i===null)return Ce(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)kr(i,!1);else{if(ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=si(e),a!==null){for(t.flags|=128,kr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(ie,ie.current&1|2),t.child}e=e.sibling}i.tail!==null&&de()>Xn&&(t.flags|=128,r=!0,kr(i,!1),t.lanes=4194304)}else{if(!r)if(e=si(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ne)return Ce(t),null}else 2*de()-i.renderingStartTime>Xn&&n!==1073741824&&(t.flags|=128,r=!0,kr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=de(),t.sibling=null,n=ie.current,X(ie,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return Xl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Ig(e,t){switch(Fl(t),t.tag){case 1:return je(t.type)&&ti(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(),te(De),te(Pe),Ul(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jl(t),null;case 13:if(te(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ie),null;case 4:return Jn(),null;case 10:return Ll(t.type._context),null;case 22:case 23:return Xl(),null;case 24:return null;default:return null}}var Oo=!1,Ee=!1,Og=typeof WeakSet=="function"?WeakSet:Set,T=null;function An(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){se(e,t,r)}else n.current=null}function al(e,t,n){try{n()}catch(r){se(e,t,r)}}var ju=!1;function Lg(e,t){if(Ha=Xo,e=Oc(),Tl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,c=0,d=0,g=e,m=null;t:for(;;){for(var y;g!==n||o!==0&&g.nodeType!==3||(u=a+o),g!==i||r!==0&&g.nodeType!==3||(s=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(y=g.firstChild)!==null;)m=g,g=y;for(;;){if(g===e)break t;if(m===n&&++c===o&&(u=a),m===i&&++d===r&&(s=a),(y=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=y}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ga={focusedElem:e,selectionRange:n},Xo=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var S=k.memoizedProps,B=k.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:ut(t.type,S),B);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(x){se(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return k=ju,ju=!1,k}function Or(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&al(t,n,i)}o=o.next}while(o!==r)}}function Si(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ll(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[Kr],delete t[Ka],delete t[vg],delete t[yg])),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 Fd(e){return e.tag===5||e.tag===3||e.tag===4}function Uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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 sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ei));else if(r!==4&&(e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}var we=null,ct=!1;function Dt(e,t,n){for(n=n.child;n!==null;)Rd(e,t,n),n=n.sibling}function Rd(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(mi,n)}catch{}switch(n.tag){case 5:Ee||An(n,t);case 6:var r=we,o=ct;we=null,Dt(e,t,n),we=r,ct=o,we!==null&&(ct?(e=we,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):we.removeChild(n.stateNode));break;case 18:we!==null&&(ct?(e=we,n=n.stateNode,e.nodeType===8?pa(e.parentNode,n):e.nodeType===1&&pa(e,n),Br(e)):pa(we,n.stateNode));break;case 4:r=we,o=ct,we=n.stateNode.containerInfo,ct=!0,Dt(e,t,n),we=r,ct=o;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&al(n,t,a),o=o.next}while(o!==r)}Dt(e,t,n);break;case 1:if(!Ee&&(An(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){se(n,t,u)}Dt(e,t,n);break;case 21:Dt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Dt(e,t,n),Ee=r):Dt(e,t,n);break;default:Dt(e,t,n)}}function Wu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Og),t.forEach(function(r){var o=Gg.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function st(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:we=u.stateNode,ct=!1;break e;case 3:we=u.stateNode.containerInfo,ct=!0;break e;case 4:we=u.stateNode.containerInfo,ct=!0;break e}u=u.return}if(we===null)throw Error(_(160));Rd(i,a,o),we=null,ct=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(c){se(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Id(t,e),t=t.sibling}function Id(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(st(t,e),yt(e),r&4){try{Or(3,e,e.return),Si(3,e)}catch(S){se(e,e.return,S)}try{Or(5,e,e.return)}catch(S){se(e,e.return,S)}}break;case 1:st(t,e),yt(e),r&512&&n!==null&&An(n,n.return);break;case 5:if(st(t,e),yt(e),r&512&&n!==null&&An(n,n.return),e.flags&32){var o=e.stateNode;try{Dr(o,"")}catch(S){se(e,e.return,S)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&tc(o,i),Ia(u,a);var c=Ia(u,i);for(a=0;a<s.length;a+=2){var d=s[a],g=s[a+1];d==="style"?ac(o,g):d==="dangerouslySetInnerHTML"?oc(o,g):d==="children"?Dr(o,g):ml(o,d,g,c)}switch(u){case"input":Pa(o,i);break;case"textarea":nc(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?jn(o,!!i.multiple,y,!1):m!==!!i.multiple&&(i.defaultValue!=null?jn(o,!!i.multiple,i.defaultValue,!0):jn(o,!!i.multiple,i.multiple?[]:"",!1))}o[Kr]=i}catch(S){se(e,e.return,S)}}break;case 6:if(st(t,e),yt(e),r&4){if(e.stateNode===null)throw Error(_(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(S){se(e,e.return,S)}}break;case 3:if(st(t,e),yt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Br(t.containerInfo)}catch(S){se(e,e.return,S)}break;case 4:st(t,e),yt(e);break;case 13:st(t,e),yt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Jl=de())),r&4&&Wu(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(c=Ee)||d,st(t,e),Ee=c):st(t,e),yt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(T=e,d=e.child;d!==null;){for(g=T=d;T!==null;){switch(m=T,y=m.child,m.tag){case 0:case 11:case 14:case 15:Or(4,m,m.return);break;case 1:An(m,m.return);var k=m.stateNode;if(typeof k.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(S){se(r,n,S)}}break;case 5:An(m,m.return);break;case 22:if(m.memoizedState!==null){Hu(g);continue}}y!==null?(y.return=m,T=y):Hu(g)}d=d.sibling}e:for(d=null,g=e;;){if(g.tag===5){if(d===null){d=g;try{o=g.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=g.stateNode,s=g.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=ic("display",a))}catch(S){se(e,e.return,S)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(S){se(e,e.return,S)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;d===g&&(d=null),g=g.return}d===g&&(d=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:st(t,e),yt(e),r&4&&Wu(e);break;case 21:break;default:st(t,e),yt(e)}}function yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Dr(o,""),r.flags&=-33);var i=Uu(e);ul(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,u=Uu(e);sl(e,u,a);break;default:throw Error(_(161))}}catch(s){se(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zg(e,t,n){T=e,Od(e,t,n)}function Od(e,t,n){for(var r=(e.mode&1)!==0;T!==null;){var o=T,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Oo;if(!a){var u=o.alternate,s=u!==null&&u.memoizedState!==null||Ee;u=Oo;var c=Ee;if(Oo=a,(Ee=s)&&!c)for(T=o;T!==null;)a=T,s=a.child,a.tag===22&&a.memoizedState!==null?Gu(o):s!==null?(s.return=a,T=s):Gu(o);for(;i!==null;)T=i,Od(i,t,n),i=i.sibling;T=o,Oo=u,Ee=c}Bu(e,t,n)}else o.subtreeFlags&8772&&i!==null?(i.return=o,T=i):Bu(e,t,n)}}function Bu(e){for(;T!==null;){var t=T;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||Si(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ut(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Cu(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Cu(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&Br(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ee||t.flags&512&&ll(t)}catch(m){se(t,t.return,m)}}if(t===e){T=null;break}if(n=t.sibling,n!==null){n.return=t.return,T=n;break}T=t.return}}function Hu(e){for(;T!==null;){var t=T;if(t===e){T=null;break}var n=t.sibling;if(n!==null){n.return=t.return,T=n;break}T=t.return}}function Gu(e){for(;T!==null;){var t=T;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Si(4,t)}catch(s){se(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){se(t,o,s)}}var i=t.return;try{ll(t)}catch(s){se(t,i,s)}break;case 5:var a=t.return;try{ll(t)}catch(s){se(t,a,s)}}}catch(s){se(t,t.return,s)}if(t===e){T=null;break}var u=t.sibling;if(u!==null){u.return=t.return,T=u;break}T=t.return}}var Ag=Math.ceil,di=zt.ReactCurrentDispatcher,Kl=zt.ReactCurrentOwner,rt=zt.ReactCurrentBatchConfig,G=0,me=null,pe=null,ke=0,$e=0,Dn=nn(0),ge=0,Zr=null,mn=0,Ni=0,Ql=0,Lr=null,ze=null,Jl=0,Xn=1/0,Et=null,pi=!1,cl=null,Yt=null,Lo=!1,Gt=null,fi=0,zr=0,dl=null,Ho=-1,Go=0;function Ie(){return G&6?de():Ho!==-1?Ho:Ho=de()}function Xt(e){return e.mode&1?G&2&&ke!==0?ke&-ke:wg.transition!==null?(Go===0&&(Go=yc()),Go):(e=J,e!==0||(e=window.event,e=e===void 0?16:Nc(e.type)),e):1}function ft(e,t,n,r){if(50<zr)throw zr=0,dl=null,Error(_(185));eo(e,n,r),(!(G&2)||e!==me)&&(e===me&&(!(G&2)&&(Ni|=n),ge===4&&Bt(e,ke)),Ue(e,r),n===1&&G===0&&!(t.mode&1)&&(Xn=de()+500,ki&&rn()))}function Ue(e,t){var n=e.callbackNode;_f(e,t);var r=Yo(e,e===me?ke:0);if(r===0)n!==null&&qs(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qs(n),t===1)e.tag===0?xg($u.bind(null,e)):Gc($u.bind(null,e)),hg(function(){!(G&6)&&rn()}),n=null;else{switch(xc(r)){case 1:n=kl;break;case 4:n=mc;break;case 16:n=Jo;break;case 536870912:n=vc;break;default:n=Jo}n=Bd(n,Ld.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ld(e,t){if(Ho=-1,Go=0,G&6)throw Error(_(327));var n=e.callbackNode;if(Gn()&&e.callbackNode!==n)return null;var r=Yo(e,e===me?ke:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gi(e,r);else{t=r;var o=G;G|=2;var i=Ad();(me!==e||ke!==t)&&(Et=null,Xn=de()+500,dn(e,t));do try{Ug();break}catch(u){zd(e,u)}while(1);Ol(),di.current=i,G=o,pe!==null?t=0:(me=null,ke=0,t=ge)}if(t!==0){if(t===2&&(o=Da(e),o!==0&&(r=o,t=pl(e,o))),t===1)throw n=Zr,dn(e,0),Bt(e,r),Ue(e,de()),n;if(t===6)Bt(e,r);else{if(o=e.current.alternate,!(r&30)&&!Dg(o)&&(t=gi(e,r),t===2&&(i=Da(e),i!==0&&(r=i,t=pl(e,i))),t===1))throw n=Zr,dn(e,0),Bt(e,r),Ue(e,de()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:ln(e,ze,Et);break;case 3:if(Bt(e,r),(r&130023424)===r&&(t=Jl+500-de(),10<t)){if(Yo(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ie(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Va(ln.bind(null,e,ze,Et),t);break}ln(e,ze,Et);break;case 4:if(Bt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-pt(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=de()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ag(r/1960))-r,10<r){e.timeoutHandle=Va(ln.bind(null,e,ze,Et),r);break}ln(e,ze,Et);break;case 5:ln(e,ze,Et);break;default:throw Error(_(329))}}}return Ue(e,de()),e.callbackNode===n?Ld.bind(null,e):null}function pl(e,t){var n=Lr;return e.current.memoizedState.isDehydrated&&(dn(e,t).flags|=256),e=gi(e,t),e!==2&&(t=ze,ze=n,t!==null&&fl(t)),e}function fl(e){ze===null?ze=e:ze.push.apply(ze,e)}function Dg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!gt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bt(e,t){for(t&=~Ql,t&=~Ni,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pt(t),r=1<<n;e[n]=-1,t&=~r}}function $u(e){if(G&6)throw Error(_(327));Gn();var t=Yo(e,0);if(!(t&1))return Ue(e,de()),null;var n=gi(e,t);if(e.tag!==0&&n===2){var r=Da(e);r!==0&&(t=r,n=pl(e,r))}if(n===1)throw n=Zr,dn(e,0),Bt(e,t),Ue(e,de()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ln(e,ze,Et),Ue(e,de()),null}function Yl(e,t){var n=G;G|=1;try{return e(t)}finally{G=n,G===0&&(Xn=de()+500,ki&&rn())}}function vn(e){Gt!==null&&Gt.tag===0&&!(G&6)&&Gn();var t=G;G|=1;var n=rt.transition,r=J;try{if(rt.transition=null,J=1,e)return e()}finally{J=r,rt.transition=n,G=t,!(G&6)&&rn()}}function Xl(){$e=Dn.current,te(Dn)}function dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gg(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(Fl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ti();break;case 3:Jn(),te(De),te(Pe),Ul();break;case 5:jl(r);break;case 4:Jn();break;case 13:te(ie);break;case 19:te(ie);break;case 10:Ll(r.type._context);break;case 22:case 23:Xl()}n=n.return}if(me=e,pe=e=qt(e.current,null),ke=$e=t,ge=0,Zr=null,Ql=Ni=mn=0,ze=Lr=null,un!==null){for(t=0;t<un.length;t++)if(n=un[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}un=null}return e}function zd(e,t){do{var n=pe;try{if(Ol(),Uo.current=ci,ui){for(var r=ae.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ui=!1}if(hn=0,he=fe=ae=null,Ir=!1,Yr=0,Kl.current=null,n===null||n.return===null){ge=1,Zr=t,pe=null;break}e:{var i=e,a=n.return,u=n,s=t;if(t=ke,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,d=u,g=d.tag;if(!(d.mode&1)&&(g===0||g===11||g===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=Ru(a);if(y!==null){y.flags&=-257,Iu(y,a,u,i,t),y.mode&1&&Fu(i,c,t),t=y,s=c;var k=t.updateQueue;if(k===null){var S=new Set;S.add(s),t.updateQueue=S}else k.add(s);break e}else{if(!(t&1)){Fu(i,c,t),ql();break e}s=Error(_(426))}}else if(ne&&u.mode&1){var B=Ru(a);if(B!==null){!(B.flags&65536)&&(B.flags|=256),Iu(B,a,u,i,t),Rl(Yn(s,u));break e}}i=s=Yn(s,u),ge!==4&&(ge=2),Lr===null?Lr=[i]:Lr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=xd(i,s,t);Nu(i,f);break e;case 1:u=s;var p=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Yt===null||!Yt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=wd(i,u,t);Nu(i,x);break e}}i=i.return}while(i!==null)}jd(n)}catch(C){t=C,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(1)}function Ad(){var e=di.current;return di.current=ci,e===null?ci:e}function ql(){(ge===0||ge===3||ge===2)&&(ge=4),me===null||!(mn&268435455)&&!(Ni&268435455)||Bt(me,ke)}function gi(e,t){var n=G;G|=2;var r=Ad();(me!==e||ke!==t)&&(Et=null,dn(e,t));do try{jg();break}catch(o){zd(e,o)}while(1);if(Ol(),G=n,di.current=r,pe!==null)throw Error(_(261));return me=null,ke=0,ge}function jg(){for(;pe!==null;)Dd(pe)}function Ug(){for(;pe!==null&&!ff();)Dd(pe)}function Dd(e){var t=Wd(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?jd(e):pe=t,Kl.current=null}function jd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ig(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ge=6,pe=null;return}}else if(n=Rg(n,t,$e),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);ge===0&&(ge=5)}function ln(e,t,n){var r=J,o=rt.transition;try{rt.transition=null,J=1,Wg(e,t,n,r)}finally{rt.transition=o,J=r}return null}function Wg(e,t,n,r){do Gn();while(Gt!==null);if(G&6)throw Error(_(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(bf(e,i),e===me&&(pe=me=null,ke=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Lo||(Lo=!0,Bd(Jo,function(){return Gn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=rt.transition,rt.transition=null;var a=J;J=1;var u=G;G|=4,Kl.current=null,Lg(e,n),Id(n,e),ug(Ga),Xo=!!Ha,Ga=Ha=null,e.current=n,zg(n,e,o),gf(),G=u,J=a,rt.transition=i}else e.current=n;if(Lo&&(Lo=!1,Gt=e,fi=o),i=e.pendingLanes,i===0&&(Yt=null),vf(n.stateNode,r),Ue(e,de()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(pi)throw pi=!1,e=cl,cl=null,e;return fi&1&&e.tag!==0&&Gn(),i=e.pendingLanes,i&1?e===dl?zr++:(zr=0,dl=e):zr=0,rn(),null}function Gn(){if(Gt!==null){var e=xc(fi),t=rt.transition,n=J;try{if(rt.transition=null,J=16>e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,fi=0,G&6)throw Error(_(331));var o=G;for(G|=4,T=e.current;T!==null;){var i=T,a=i.child;if(T.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(T=c;T!==null;){var d=T;switch(d.tag){case 0:case 11:case 15:Or(8,d,i)}var g=d.child;if(g!==null)g.return=d,T=g;else for(;T!==null;){d=T;var m=d.sibling,y=d.return;if(Md(d),d===c){T=null;break}if(m!==null){m.return=y,T=m;break}T=y}}}var k=i.alternate;if(k!==null){var S=k.child;if(S!==null){k.child=null;do{var B=S.sibling;S.sibling=null,S=B}while(S!==null)}}T=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,T=a;else e:for(;T!==null;){if(i=T,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Or(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,T=f;break e}T=i.return}}var p=e.current;for(T=p;T!==null;){a=T;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,T=h;else e:for(a=p;T!==null;){if(u=T,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Si(9,u)}}catch(C){se(u,u.return,C)}if(u===a){T=null;break e}var x=u.sibling;if(x!==null){x.return=u.return,T=x;break e}T=u.return}}if(G=o,rn(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(mi,e)}catch{}r=!0}return r}finally{J=n,rt.transition=t}}return!1}function Vu(e,t,n){t=Yn(n,t),t=xd(e,t,1),e=Jt(e,t,1),t=Ie(),e!==null&&(eo(e,1,t),Ue(e,t))}function se(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Yn(n,e),e=wd(t,e,1),t=Jt(t,e,1),e=Ie(),t!==null&&(eo(t,1,e),Ue(t,e));break}}t=t.return}}function Bg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&n,me===e&&(ke&n)===n&&(ge===4||ge===3&&(ke&130023424)===ke&&500>de()-Jl?dn(e,0):Ql|=n),Ue(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):t=1);var n=Ie();e=Ot(e,t),e!==null&&(eo(e,t,n),Ue(e,n))}function Hg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function Gg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Ud(e,n)}var Wd;Wd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||De.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,Fg(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,ne&&t.flags&1048576&&$c(t,oi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bo(e,t),e=t.pendingProps;var o=Vn(t,Pe.current);Hn(t,n),o=Bl(null,t,r,e,o,n);var i=Hl();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,je(r)?(i=!0,ni(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Al(t),o.updater=bi,t.stateNode=o,o._reactInternals=t,Za(t,r,e,n),t=nl(null,t,r,!0,i,n)):(t.tag=0,ne&&i&&Ml(t),Re(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Vg(r),e=ut(r,e),o){case 0:t=tl(null,t,r,e,n);break e;case 1:t=zu(null,t,r,e,n);break e;case 11:t=Ou(null,t,r,e,n);break e;case 14:t=Lu(null,t,r,ut(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),tl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),zu(e,t,r,o,n);case 3:e:{if(Sd(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Xc(e,t),li(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Yn(Error(_(423)),t),t=Au(e,t,r,n,o);break e}else if(r!==o){o=Yn(Error(_(424)),t),t=Au(e,t,r,n,o);break e}else for(Ve=Qt(t.stateNode.containerInfo.firstChild),Ke=t,ne=!0,dt=null,n=Jc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kn(),r===o){t=Lt(e,t,n);break e}Re(e,t,r,n)}t=t.child}return t;case 5:return qc(t),e===null&&Ya(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,$a(r,o)?a=null:i!==null&&$a(r,i)&&(t.flags|=32),bd(e,t),Re(e,t,a,n),t.child;case 6:return e===null&&Ya(t),null;case 13:return Nd(e,t,n);case 4:return Dl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qn(t,null,r,n):Re(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Ou(e,t,r,o,n);case 7:return Re(e,t,t.pendingProps,n),t.child;case 8:return Re(e,t,t.pendingProps.children,n),t.child;case 12:return Re(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,X(ii,r._currentValue),r._currentValue=a,i!==null)if(gt(i.value,a)){if(i.children===o.children&&!De.current){t=Lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){a=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Ft(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?s.next=s:(s.next=d.next,d.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Xa(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(_(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Xa(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Re(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hn(t,n),o=ot(o),r=r(o),t.flags|=1,Re(e,t,r,n),t.child;case 14:return r=t.type,o=ut(r,t.pendingProps),o=ut(r.type,o),Lu(e,t,r,o,n);case 15:return kd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Bo(e,t),t.tag=1,je(r)?(e=!0,ni(t)):e=!1,Hn(t,n),yd(t,r,o),Za(t,r,o,n),nl(null,t,r,!0,e,n);case 19:return Cd(e,t,n);case 22:return _d(e,t,n)}throw Error(_(156,t.tag))};function Bd(e,t){return hc(e,t)}function $g(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nt(e,t,n,r){return new $g(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vg(e){if(typeof e=="function")return Zl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yl)return 11;if(e===xl)return 14}return 2}function qt(e,t){var n=e.alternate;return n===null?(n=nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $o(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Zl(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Pn:return pn(n.children,o,i,t);case vl:a=8,o|=8;break;case ba:return e=nt(12,n,t,o|2),e.elementType=ba,e.lanes=i,e;case Sa:return e=nt(13,n,t,o),e.elementType=Sa,e.lanes=i,e;case Na:return e=nt(19,n,t,o),e.elementType=Na,e.lanes=i,e;case qu:return Ci(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yu:a=10;break e;case Xu:a=9;break e;case yl:a=11;break e;case xl:a=14;break e;case jt:a=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=nt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function pn(e,t,n,r){return e=nt(7,e,r,t),e.lanes=n,e}function Ci(e,t,n,r){return e=nt(22,e,r,t),e.elementType=qu,e.lanes=n,e.stateNode={isHidden:!1},e}function wa(e,t,n){return e=nt(6,e,null,t),e.lanes=n,e}function ka(e,t,n){return t=nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kg(e,t,n,r,o){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=oa(0),this.expirationTimes=oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function es(e,t,n,r,o,i,a,u,s){return e=new Kg(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=nt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Al(i),e}function Qg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:En,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hd(e){if(!e)return en;e=e._reactInternals;e:{if(xn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(je(n))return Hc(e,n,t)}return t}function Gd(e,t,n,r,o,i,a,u,s){return e=es(n,r,!0,e,o,i,a,u,s),e.context=Hd(null),n=e.current,r=Ie(),o=Xt(n),i=Ft(r,o),i.callback=t??null,Jt(n,i,o),e.current.lanes=o,eo(e,o,r),Ue(e,r),e}function Ei(e,t,n,r){var o=t.current,i=Ie(),a=Xt(o);return n=Hd(n),t.context===null?t.context=n:t.pendingContext=n,t=Ft(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Jt(o,t,a),e!==null&&(ft(e,o,a,i),jo(e,o,a)),a}function hi(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 Ku(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ts(e,t){Ku(e,t),(e=e.alternate)&&Ku(e,t)}function Jg(){return null}var $d=typeof reportError=="function"?reportError:function(e){console.error(e)};function ns(e){this._internalRoot=e}Pi.prototype.render=ns.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));Ei(e,t,null,null)};Pi.prototype.unmount=ns.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vn(function(){Ei(null,e,null,null)}),t[It]=null}};function Pi(e){this._internalRoot=e}Pi.prototype.unstable_scheduleHydration=function(e){if(e){var t=_c();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&Sc(e)}};function rs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ti(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Qu(){}function Yg(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=hi(a);i.call(c)}}var a=Gd(t,r,e,0,null,!1,!1,"",Qu);return e._reactRootContainer=a,e[It]=a.current,$r(e.nodeType===8?e.parentNode:e),vn(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var u=r;r=function(){var c=hi(s);u.call(c)}}var s=es(e,0,!1,null,null,!1,!1,"",Qu);return e._reactRootContainer=s,e[It]=s.current,$r(e.nodeType===8?e.parentNode:e),vn(function(){Ei(t,s,n,r)}),s}function Mi(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var u=o;o=function(){var s=hi(a);u.call(s)}}Ei(t,a,e,o)}else a=Yg(n,t,e,o,r);return hi(a)}wc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cr(t.pendingLanes);n!==0&&(_l(t,n|1),Ue(t,de()),!(G&6)&&(Xn=de()+500,rn()))}break;case 13:vn(function(){var r=Ot(e,1);if(r!==null){var o=Ie();ft(r,e,1,o)}}),ts(e,1)}};bl=function(e){if(e.tag===13){var t=Ot(e,134217728);if(t!==null){var n=Ie();ft(t,e,134217728,n)}ts(e,134217728)}};kc=function(e){if(e.tag===13){var t=Xt(e),n=Ot(e,t);if(n!==null){var r=Ie();ft(n,e,t,r)}ts(e,t)}};_c=function(){return J};bc=function(e,t){var n=J;try{return J=e,t()}finally{J=n}};La=function(e,t,n){switch(t){case"input":if(Pa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=wi(r);if(!o)throw Error(_(90));ec(r),Pa(r,o)}}}break;case"textarea":nc(e,n);break;case"select":t=n.value,t!=null&&jn(e,!!n.multiple,t,!1)}};uc=Yl;cc=vn;var Xg={usingClientEntryPoint:!1,Events:[no,Rn,wi,lc,sc,Yl]},_r={findFiberByHostInstance:sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qg={bundleType:_r.bundleType,version:_r.version,rendererPackageName:_r.rendererPackageName,rendererConfig:_r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fc(e),e===null?null:e.stateNode},findFiberByHostInstance:_r.findFiberByHostInstance||Jg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(br=__REACT_DEVTOOLS_GLOBAL_HOOK__,!br.isDisabled&&br.supportsFiber))try{mi=br.inject(qg),kt=br}catch{}var br;Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xg;Ye.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rs(t))throw Error(_(200));return Qg(e,t,null,n)};Ye.createRoot=function(e,t){if(!rs(e))throw Error(_(299));var n=!1,r="",o=$d;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=es(e,1,!1,null,null,n,!1,r,o),e[It]=t.current,$r(e.nodeType===8?e.parentNode:e),new ns(t)};Ye.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(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=fc(t),e=e===null?null:e.stateNode,e};Ye.flushSync=function(e){return vn(e)};Ye.hydrate=function(e,t,n){if(!Ti(t))throw Error(_(200));return Mi(null,e,t,!0,n)};Ye.hydrateRoot=function(e,t,n){if(!rs(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=$d;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Gd(t,null,e,1,n??null,o,!1,i,a),e[It]=t.current,$r(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Pi(t)};Ye.render=function(e,t,n){if(!Ti(t))throw Error(_(200));return Mi(null,e,t,!1,n)};Ye.unmountComponentAtNode=function(e){if(!Ti(e))throw Error(_(40));return e._reactRootContainer?(vn(function(){Mi(null,null,e,!1,function(){e._reactRootContainer=null,e[It]=null})}),!0):!1};Ye.unstable_batchedUpdates=Yl;Ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ti(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return Mi(e,t,n,!1,r)};Ye.version="18.3.1-next-f1338f8080-20240426"});var Jd=Nt((Dm,Qd)=>{"use strict";function Kd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kd)}catch(e){console.error(e)}}Kd(),Qd.exports=Vd()});var Xd=Nt(os=>{"use strict";var Yd=Jd();os.createRoot=Yd.createRoot,os.hydrateRoot=Yd.hydrateRoot;var jm});var Zd=Nt(Fi=>{"use strict";var Zg=Ct(),eh=Symbol.for("react.element"),th=Symbol.for("react.fragment"),nh=Object.prototype.hasOwnProperty,rh=Zg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oh={key:!0,ref:!0,__self:!0,__source:!0};function qd(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)nh.call(t,r)&&!oh.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:eh,type:e,key:i,ref:a,props:o,_owner:rh.current}}Fi.Fragment=th;Fi.jsx=qd;Fi.jsxs=qd});var be=Nt((Bm,ep)=>{"use strict";ep.exports=Zd()});var vs=`/* ---------------------------------------------------------------
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function ya(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function el(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Pg=typeof WeakMap=="function"?WeakMap:Map;function xd(e,t,n){n=Ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pi||(pi=!0,cl=r),el(e,t)},n}function wd(e,t,n){n=Ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){el(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){el(e,t),typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Fu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pg;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Bg.bind(null,e,t,n),t.then(e,e))}function Iu(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 Ru(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ft(-1,1),t.tag=2,Qt(n,t,1))),n.lanes|=1),e)}var Tg=zt.ReactCurrentOwner,Ae=!1;function Ie(e,t,n,r){t.child=e===null?Qc(t,null,n,r):Jn(t,e.child,n,r)}function Ou(e,t,n,r,o){n=n.render;var i=t.ref;return Hn(t,o),r=Bl(e,t,n,r,i,o),n=Hl(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(ne&&n&&Ml(t),t.flags|=1,Ie(e,t,r,o),t.child)}function Lu(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Zl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,kd(e,t,i,r,o)):(e=$o(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Gr,n(a,r)&&e.ref===t.ref)return Lt(e,t,o)}return t.flags|=1,e=qt(i,r),e.ref=t.ref,e.return=t,t.child=e}function kd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Gr(i,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ae=!0);else return t.lanes=e.lanes,Lt(e,t,o)}return tl(e,t,n,r,o)}function _d(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(Dn,$e),$e|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(Dn,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(Dn,$e),$e|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(Dn,$e),$e|=r;return Ie(e,t,o,n),t.child}function bd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tl(e,t,n,r,o){var i=je(n)?fn:Pe.current;return i=Vn(t,i),Hn(t,o),n=Bl(e,t,n,r,i,o),r=Hl(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(ne&&r&&Ml(t),t.flags|=1,Ie(e,t,n,o),t.child)}function zu(e,t,n,r,o){if(je(n)){var i=!0;ni(t)}else i=!1;if(Hn(t,o),t.stateNode===null)Bo(e,t),yd(t,n,r),Za(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=ot(c):(c=je(n)?fn:Pe.current,c=Vn(t,c));var d=n.getDerivedStateFromProps,g=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==c)&&Mu(t,a,r,c),Ut=!1;var m=t.memoizedState;a.state=m,li(t,r,a,o),s=t.memoizedState,u!==r||m!==s||De.current||Ut?(typeof d=="function"&&(qa(t,n,d,r),s=t.memoizedState),(u=Ut||Tu(t,n,u,r,m,s,c))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Xc(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:ut(t.type,u),a.props=c,g=t.pendingProps,m=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=ot(s):(s=je(n)?fn:Pe.current,s=Vn(t,s));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==g||m!==s)&&Mu(t,a,r,s),Ut=!1,m=t.memoizedState,a.state=m,li(t,r,a,o);var k=t.memoizedState;u!==g||m!==k||De.current||Ut?(typeof y=="function"&&(qa(t,n,y,r),k=t.memoizedState),(c=Ut||Tu(t,n,c,r,m,k,s)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,k,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,k,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),a.props=r,a.state=k,a.context=s,r=c):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return nl(e,t,n,r,i,o)}function nl(e,t,n,r,o,i){bd(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&ku(t,n,!1),Lt(e,t,i);r=t.stateNode,Tg.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Jn(t,e.child,null,i),t.child=Jn(t,null,u,i)):Ie(e,t,u,i),t.memoizedState=r.state,o&&ku(t,n,!0),t.child}function Sd(e){var t=e.stateNode;t.pendingContext?wu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wu(e,t.context,!1),Dl(e,t.containerInfo)}function Au(e,t,n,r,o){return Kn(),Il(o),t.flags|=256,Ie(e,t,n,r),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0};function ol(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nd(e,t,n){var r=t.pendingProps,o=ie.current,i=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(o&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),X(ie,o&1),e===null)return Ya(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ci(a,r,0,null),e=pn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ol(n),t.memoizedState=rl,e):Vl(t,a));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return Mg(e,t,a,r,u,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,u=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=qt(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?i=qt(u,i):(i=pn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ol(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=rl,r}return i=e.child,e=i.sibling,r=qt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vl(e,t){return t=Ci({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ro(e,t,n,r){return r!==null&&Il(r),Jn(t,e.child,null,n),e=Vl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mg(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=ya(Error(_(422))),Ro(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ci({mode:"visible",children:r.children},o,0,null),i=pn(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Jn(t,e.child,null,a),t.child.memoizedState=ol(a),t.memoizedState=rl,i);if(!(t.mode&1))return Ro(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(_(419)),r=ya(i,r,void 0),Ro(e,t,a,r)}if(u=(a&e.childLanes)!==0,Ae||u){if(r=me,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Ot(e,o),ft(r,e,o,-1))}return ql(),r=ya(Error(_(421))),Ro(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Hg.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ve=Jt(o.nextSibling),Ke=t,ne=!0,dt=null,e!==null&&(et[tt++]=Tt,et[tt++]=Mt,et[tt++]=gn,Tt=e.id,Mt=e.overflow,gn=t),t=Vl(t,r.children),t.flags|=4096,t)}function Du(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xa(e.return,t,n)}function xa(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Cd(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=ie.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Du(e,n,t);else if(e.tag===19)Du(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(ie,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&si(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),xa(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&si(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}xa(t,!0,n,null,i);break;case"together":xa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fg(e,t,n){switch(t.tag){case 3:Sd(t),Kn();break;case 5:qc(t);break;case 1:je(t.type)&&ni(t);break;case 4:Dl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;X(ii,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(ie,ie.current&1),t.flags|=128,null):n&t.child.childLanes?Nd(e,t,n):(X(ie,ie.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);X(ie,ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),X(ie,ie.current),r)break;return null;case 22:case 23:return t.lanes=0,_d(e,t,n)}return Lt(e,t,n)}var Ed,il,Pd,Td;Ed=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};il=function(){};Pd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,cn(bt.current);var i=null;switch(n){case"input":o=Ea(e,o),r=Ea(e,r),i=[];break;case"select":o=le({},o,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":o=Ma(e,o),r=Ma(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ei)}Ia(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ar.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=o?.[c],r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ar.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&ee("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Td=function(e,t,n,r){n!==r&&(t.flags|=4)};function kr(e,t){if(!ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ig(e,t,n){var r=t.pendingProps;switch(Fl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return je(t.type)&&ti(),Ce(t),null;case 3:return r=t.stateNode,Qn(),te(De),te(Pe),Ul(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dt!==null&&(fl(dt),dt=null))),il(e,t),Ce(t),null;case 5:jl(t);var o=cn(Qr.current);if(n=t.type,e!==null&&t.stateNode!=null)Pd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Ce(t),null}if(e=cn(bt.current),Fo(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kt]=t,r[Kr]=i,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(o=0;o<Er.length;o++)ee(Er[o],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":Vs(r,i),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ee("invalid",r);break;case"textarea":Js(r,i),ee("invalid",r)}Ia(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var u=i[a];a==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&Mo(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Mo(r.textContent,u,e),o=["children",""+u]):Ar.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&ee("scroll",r)}switch(n){case"input":yo(r),Ks(r,i,!0);break;case"textarea":yo(r),Qs(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ei)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[kt]=t,e[Kr]=r,Ed(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ra(n,r),n){case"dialog":ee("cancel",e),ee("close",e),o=r;break;case"iframe":case"object":case"embed":ee("load",e),o=r;break;case"video":case"audio":for(o=0;o<Er.length;o++)ee(Er[o],e);o=r;break;case"source":ee("error",e),o=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),o=r;break;case"details":ee("toggle",e),o=r;break;case"input":Vs(e,r),o=Ea(e,r),ee("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=le({},r,{value:void 0}),ee("invalid",e);break;case"textarea":Js(e,r),o=Ma(e,r),ee("invalid",e);break;default:o=r}Ia(n,o),u=o;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?ac(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&oc(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Dr(e,s):typeof s=="number"&&Dr(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ar.hasOwnProperty(i)?s!=null&&i==="onScroll"&&ee("scroll",e):s!=null&&ml(e,i,s,a))}switch(n){case"input":yo(e),Ks(e,r,!1);break;case"textarea":yo(e),Qs(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Zt(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?jn(e,!!r.multiple,i,!1):r.defaultValue!=null&&jn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ei)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)Td(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=cn(Qr.current),cn(bt.current),Fo(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(i=r.nodeValue!==n)&&(e=Ke,e!==null))switch(e.tag){case 3:Mo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mo(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return Ce(t),null;case 13:if(te(ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ne&&Ve!==null&&t.mode&1&&!(t.flags&128))Kc(),Kn(),t.flags|=98560,i=!1;else if(i=Fo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[kt]=t}else Kn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),i=!1}else dt!==null&&(fl(dt),dt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ie.current&1?ge===0&&(ge=3):ql())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return Qn(),il(e,t),e===null&&$r(t.stateNode.containerInfo),Ce(t),null;case 10:return Ll(t.type._context),Ce(t),null;case 17:return je(t.type)&&ti(),Ce(t),null;case 19:if(te(ie),i=t.memoizedState,i===null)return Ce(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)kr(i,!1);else{if(ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=si(e),a!==null){for(t.flags|=128,kr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(ie,ie.current&1|2),t.child}e=e.sibling}i.tail!==null&&de()>Xn&&(t.flags|=128,r=!0,kr(i,!1),t.lanes=4194304)}else{if(!r)if(e=si(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ne)return Ce(t),null}else 2*de()-i.renderingStartTime>Xn&&n!==1073741824&&(t.flags|=128,r=!0,kr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=de(),t.sibling=null,n=ie.current,X(ie,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return Xl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Rg(e,t){switch(Fl(t),t.tag){case 1:return je(t.type)&&ti(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),te(De),te(Pe),Ul(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jl(t),null;case 13:if(te(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ie),null;case 4:return Qn(),null;case 10:return Ll(t.type._context),null;case 22:case 23:return Xl(),null;case 24:return null;default:return null}}var Oo=!1,Ee=!1,Og=typeof WeakSet=="function"?WeakSet:Set,T=null;function An(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){se(e,t,r)}else n.current=null}function al(e,t,n){try{n()}catch(r){se(e,t,r)}}var ju=!1;function Lg(e,t){if(Ha=Xo,e=Oc(),Tl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,c=0,d=0,g=e,m=null;t:for(;;){for(var y;g!==n||o!==0&&g.nodeType!==3||(u=a+o),g!==i||r!==0&&g.nodeType!==3||(s=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(y=g.firstChild)!==null;)m=g,g=y;for(;;){if(g===e)break t;if(m===n&&++c===o&&(u=a),m===i&&++d===r&&(s=a),(y=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=y}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ga={focusedElem:e,selectionRange:n},Xo=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var S=k.memoizedProps,B=k.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:ut(t.type,S),B);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(x){se(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return k=ju,ju=!1,k}function Or(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&al(t,n,i)}o=o.next}while(o!==r)}}function Si(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ll(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[Kr],delete t[Ka],delete t[vg],delete t[yg])),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 Fd(e){return e.tag===5||e.tag===3||e.tag===4}function Uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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 sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ei));else if(r!==4&&(e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}var we=null,ct=!1;function Dt(e,t,n){for(n=n.child;n!==null;)Id(e,t,n),n=n.sibling}function Id(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(mi,n)}catch{}switch(n.tag){case 5:Ee||An(n,t);case 6:var r=we,o=ct;we=null,Dt(e,t,n),we=r,ct=o,we!==null&&(ct?(e=we,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):we.removeChild(n.stateNode));break;case 18:we!==null&&(ct?(e=we,n=n.stateNode,e.nodeType===8?pa(e.parentNode,n):e.nodeType===1&&pa(e,n),Br(e)):pa(we,n.stateNode));break;case 4:r=we,o=ct,we=n.stateNode.containerInfo,ct=!0,Dt(e,t,n),we=r,ct=o;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&al(n,t,a),o=o.next}while(o!==r)}Dt(e,t,n);break;case 1:if(!Ee&&(An(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){se(n,t,u)}Dt(e,t,n);break;case 21:Dt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Dt(e,t,n),Ee=r):Dt(e,t,n);break;default:Dt(e,t,n)}}function Wu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Og),t.forEach(function(r){var o=Gg.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function st(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:we=u.stateNode,ct=!1;break e;case 3:we=u.stateNode.containerInfo,ct=!0;break e;case 4:we=u.stateNode.containerInfo,ct=!0;break e}u=u.return}if(we===null)throw Error(_(160));Id(i,a,o),we=null,ct=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(c){se(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rd(t,e),t=t.sibling}function Rd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(st(t,e),xt(e),r&4){try{Or(3,e,e.return),Si(3,e)}catch(S){se(e,e.return,S)}try{Or(5,e,e.return)}catch(S){se(e,e.return,S)}}break;case 1:st(t,e),xt(e),r&512&&n!==null&&An(n,n.return);break;case 5:if(st(t,e),xt(e),r&512&&n!==null&&An(n,n.return),e.flags&32){var o=e.stateNode;try{Dr(o,"")}catch(S){se(e,e.return,S)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&tc(o,i),Ra(u,a);var c=Ra(u,i);for(a=0;a<s.length;a+=2){var d=s[a],g=s[a+1];d==="style"?ac(o,g):d==="dangerouslySetInnerHTML"?oc(o,g):d==="children"?Dr(o,g):ml(o,d,g,c)}switch(u){case"input":Pa(o,i);break;case"textarea":nc(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?jn(o,!!i.multiple,y,!1):m!==!!i.multiple&&(i.defaultValue!=null?jn(o,!!i.multiple,i.defaultValue,!0):jn(o,!!i.multiple,i.multiple?[]:"",!1))}o[Kr]=i}catch(S){se(e,e.return,S)}}break;case 6:if(st(t,e),xt(e),r&4){if(e.stateNode===null)throw Error(_(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(S){se(e,e.return,S)}}break;case 3:if(st(t,e),xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Br(t.containerInfo)}catch(S){se(e,e.return,S)}break;case 4:st(t,e),xt(e);break;case 13:st(t,e),xt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Ql=de())),r&4&&Wu(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(c=Ee)||d,st(t,e),Ee=c):st(t,e),xt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(T=e,d=e.child;d!==null;){for(g=T=d;T!==null;){switch(m=T,y=m.child,m.tag){case 0:case 11:case 14:case 15:Or(4,m,m.return);break;case 1:An(m,m.return);var k=m.stateNode;if(typeof k.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(S){se(r,n,S)}}break;case 5:An(m,m.return);break;case 22:if(m.memoizedState!==null){Hu(g);continue}}y!==null?(y.return=m,T=y):Hu(g)}d=d.sibling}e:for(d=null,g=e;;){if(g.tag===5){if(d===null){d=g;try{o=g.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=g.stateNode,s=g.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=ic("display",a))}catch(S){se(e,e.return,S)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(S){se(e,e.return,S)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;d===g&&(d=null),g=g.return}d===g&&(d=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:st(t,e),xt(e),r&4&&Wu(e);break;case 21:break;default:st(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Dr(o,""),r.flags&=-33);var i=Uu(e);ul(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,u=Uu(e);sl(e,u,a);break;default:throw Error(_(161))}}catch(s){se(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zg(e,t,n){T=e,Od(e,t,n)}function Od(e,t,n){for(var r=(e.mode&1)!==0;T!==null;){var o=T,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Oo;if(!a){var u=o.alternate,s=u!==null&&u.memoizedState!==null||Ee;u=Oo;var c=Ee;if(Oo=a,(Ee=s)&&!c)for(T=o;T!==null;)a=T,s=a.child,a.tag===22&&a.memoizedState!==null?Gu(o):s!==null?(s.return=a,T=s):Gu(o);for(;i!==null;)T=i,Od(i,t,n),i=i.sibling;T=o,Oo=u,Ee=c}Bu(e,t,n)}else o.subtreeFlags&8772&&i!==null?(i.return=o,T=i):Bu(e,t,n)}}function Bu(e){for(;T!==null;){var t=T;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||Si(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ut(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Cu(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Cu(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&Br(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ee||t.flags&512&&ll(t)}catch(m){se(t,t.return,m)}}if(t===e){T=null;break}if(n=t.sibling,n!==null){n.return=t.return,T=n;break}T=t.return}}function Hu(e){for(;T!==null;){var t=T;if(t===e){T=null;break}var n=t.sibling;if(n!==null){n.return=t.return,T=n;break}T=t.return}}function Gu(e){for(;T!==null;){var t=T;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Si(4,t)}catch(s){se(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){se(t,o,s)}}var i=t.return;try{ll(t)}catch(s){se(t,i,s)}break;case 5:var a=t.return;try{ll(t)}catch(s){se(t,a,s)}}}catch(s){se(t,t.return,s)}if(t===e){T=null;break}var u=t.sibling;if(u!==null){u.return=t.return,T=u;break}T=t.return}}var Ag=Math.ceil,di=zt.ReactCurrentDispatcher,Kl=zt.ReactCurrentOwner,rt=zt.ReactCurrentBatchConfig,G=0,me=null,pe=null,ke=0,$e=0,Dn=nn(0),ge=0,Zr=null,mn=0,Ni=0,Jl=0,Lr=null,ze=null,Ql=0,Xn=1/0,Et=null,pi=!1,cl=null,Yt=null,Lo=!1,Gt=null,fi=0,zr=0,dl=null,Ho=-1,Go=0;function Re(){return G&6?de():Ho!==-1?Ho:Ho=de()}function Xt(e){return e.mode&1?G&2&&ke!==0?ke&-ke:wg.transition!==null?(Go===0&&(Go=yc()),Go):(e=Q,e!==0||(e=window.event,e=e===void 0?16:Nc(e.type)),e):1}function ft(e,t,n,r){if(50<zr)throw zr=0,dl=null,Error(_(185));eo(e,n,r),(!(G&2)||e!==me)&&(e===me&&(!(G&2)&&(Ni|=n),ge===4&&Bt(e,ke)),Ue(e,r),n===1&&G===0&&!(t.mode&1)&&(Xn=de()+500,ki&&rn()))}function Ue(e,t){var n=e.callbackNode;_f(e,t);var r=Yo(e,e===me?ke:0);if(r===0)n!==null&&qs(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qs(n),t===1)e.tag===0?xg($u.bind(null,e)):Gc($u.bind(null,e)),hg(function(){!(G&6)&&rn()}),n=null;else{switch(xc(r)){case 1:n=kl;break;case 4:n=mc;break;case 16:n=Qo;break;case 536870912:n=vc;break;default:n=Qo}n=Bd(n,Ld.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ld(e,t){if(Ho=-1,Go=0,G&6)throw Error(_(327));var n=e.callbackNode;if(Gn()&&e.callbackNode!==n)return null;var r=Yo(e,e===me?ke:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gi(e,r);else{t=r;var o=G;G|=2;var i=Ad();(me!==e||ke!==t)&&(Et=null,Xn=de()+500,dn(e,t));do try{Ug();break}catch(u){zd(e,u)}while(1);Ol(),di.current=i,G=o,pe!==null?t=0:(me=null,ke=0,t=ge)}if(t!==0){if(t===2&&(o=Da(e),o!==0&&(r=o,t=pl(e,o))),t===1)throw n=Zr,dn(e,0),Bt(e,r),Ue(e,de()),n;if(t===6)Bt(e,r);else{if(o=e.current.alternate,!(r&30)&&!Dg(o)&&(t=gi(e,r),t===2&&(i=Da(e),i!==0&&(r=i,t=pl(e,i))),t===1))throw n=Zr,dn(e,0),Bt(e,r),Ue(e,de()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:ln(e,ze,Et);break;case 3:if(Bt(e,r),(r&130023424)===r&&(t=Ql+500-de(),10<t)){if(Yo(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Re(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Va(ln.bind(null,e,ze,Et),t);break}ln(e,ze,Et);break;case 4:if(Bt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-pt(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=de()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ag(r/1960))-r,10<r){e.timeoutHandle=Va(ln.bind(null,e,ze,Et),r);break}ln(e,ze,Et);break;case 5:ln(e,ze,Et);break;default:throw Error(_(329))}}}return Ue(e,de()),e.callbackNode===n?Ld.bind(null,e):null}function pl(e,t){var n=Lr;return e.current.memoizedState.isDehydrated&&(dn(e,t).flags|=256),e=gi(e,t),e!==2&&(t=ze,ze=n,t!==null&&fl(t)),e}function fl(e){ze===null?ze=e:ze.push.apply(ze,e)}function Dg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!gt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bt(e,t){for(t&=~Jl,t&=~Ni,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pt(t),r=1<<n;e[n]=-1,t&=~r}}function $u(e){if(G&6)throw Error(_(327));Gn();var t=Yo(e,0);if(!(t&1))return Ue(e,de()),null;var n=gi(e,t);if(e.tag!==0&&n===2){var r=Da(e);r!==0&&(t=r,n=pl(e,r))}if(n===1)throw n=Zr,dn(e,0),Bt(e,t),Ue(e,de()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ln(e,ze,Et),Ue(e,de()),null}function Yl(e,t){var n=G;G|=1;try{return e(t)}finally{G=n,G===0&&(Xn=de()+500,ki&&rn())}}function vn(e){Gt!==null&&Gt.tag===0&&!(G&6)&&Gn();var t=G;G|=1;var n=rt.transition,r=Q;try{if(rt.transition=null,Q=1,e)return e()}finally{Q=r,rt.transition=n,G=t,!(G&6)&&rn()}}function Xl(){$e=Dn.current,te(Dn)}function dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gg(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(Fl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ti();break;case 3:Qn(),te(De),te(Pe),Ul();break;case 5:jl(r);break;case 4:Qn();break;case 13:te(ie);break;case 19:te(ie);break;case 10:Ll(r.type._context);break;case 22:case 23:Xl()}n=n.return}if(me=e,pe=e=qt(e.current,null),ke=$e=t,ge=0,Zr=null,Jl=Ni=mn=0,ze=Lr=null,un!==null){for(t=0;t<un.length;t++)if(n=un[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}un=null}return e}function zd(e,t){do{var n=pe;try{if(Ol(),Uo.current=ci,ui){for(var r=ae.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ui=!1}if(hn=0,he=fe=ae=null,Rr=!1,Yr=0,Kl.current=null,n===null||n.return===null){ge=1,Zr=t,pe=null;break}e:{var i=e,a=n.return,u=n,s=t;if(t=ke,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,d=u,g=d.tag;if(!(d.mode&1)&&(g===0||g===11||g===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=Iu(a);if(y!==null){y.flags&=-257,Ru(y,a,u,i,t),y.mode&1&&Fu(i,c,t),t=y,s=c;var k=t.updateQueue;if(k===null){var S=new Set;S.add(s),t.updateQueue=S}else k.add(s);break e}else{if(!(t&1)){Fu(i,c,t),ql();break e}s=Error(_(426))}}else if(ne&&u.mode&1){var B=Iu(a);if(B!==null){!(B.flags&65536)&&(B.flags|=256),Ru(B,a,u,i,t),Il(Yn(s,u));break e}}i=s=Yn(s,u),ge!==4&&(ge=2),Lr===null?Lr=[i]:Lr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=xd(i,s,t);Nu(i,f);break e;case 1:u=s;var p=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Yt===null||!Yt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=wd(i,u,t);Nu(i,x);break e}}i=i.return}while(i!==null)}jd(n)}catch(C){t=C,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(1)}function Ad(){var e=di.current;return di.current=ci,e===null?ci:e}function ql(){(ge===0||ge===3||ge===2)&&(ge=4),me===null||!(mn&268435455)&&!(Ni&268435455)||Bt(me,ke)}function gi(e,t){var n=G;G|=2;var r=Ad();(me!==e||ke!==t)&&(Et=null,dn(e,t));do try{jg();break}catch(o){zd(e,o)}while(1);if(Ol(),G=n,di.current=r,pe!==null)throw Error(_(261));return me=null,ke=0,ge}function jg(){for(;pe!==null;)Dd(pe)}function Ug(){for(;pe!==null&&!ff();)Dd(pe)}function Dd(e){var t=Wd(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?jd(e):pe=t,Kl.current=null}function jd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Rg(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ge=6,pe=null;return}}else if(n=Ig(n,t,$e),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);ge===0&&(ge=5)}function ln(e,t,n){var r=Q,o=rt.transition;try{rt.transition=null,Q=1,Wg(e,t,n,r)}finally{rt.transition=o,Q=r}return null}function Wg(e,t,n,r){do Gn();while(Gt!==null);if(G&6)throw Error(_(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(bf(e,i),e===me&&(pe=me=null,ke=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Lo||(Lo=!0,Bd(Qo,function(){return Gn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=rt.transition,rt.transition=null;var a=Q;Q=1;var u=G;G|=4,Kl.current=null,Lg(e,n),Rd(n,e),ug(Ga),Xo=!!Ha,Ga=Ha=null,e.current=n,zg(n,e,o),gf(),G=u,Q=a,rt.transition=i}else e.current=n;if(Lo&&(Lo=!1,Gt=e,fi=o),i=e.pendingLanes,i===0&&(Yt=null),vf(n.stateNode,r),Ue(e,de()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(pi)throw pi=!1,e=cl,cl=null,e;return fi&1&&e.tag!==0&&Gn(),i=e.pendingLanes,i&1?e===dl?zr++:(zr=0,dl=e):zr=0,rn(),null}function Gn(){if(Gt!==null){var e=xc(fi),t=rt.transition,n=Q;try{if(rt.transition=null,Q=16>e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,fi=0,G&6)throw Error(_(331));var o=G;for(G|=4,T=e.current;T!==null;){var i=T,a=i.child;if(T.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(T=c;T!==null;){var d=T;switch(d.tag){case 0:case 11:case 15:Or(8,d,i)}var g=d.child;if(g!==null)g.return=d,T=g;else for(;T!==null;){d=T;var m=d.sibling,y=d.return;if(Md(d),d===c){T=null;break}if(m!==null){m.return=y,T=m;break}T=y}}}var k=i.alternate;if(k!==null){var S=k.child;if(S!==null){k.child=null;do{var B=S.sibling;S.sibling=null,S=B}while(S!==null)}}T=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,T=a;else e:for(;T!==null;){if(i=T,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Or(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,T=f;break e}T=i.return}}var p=e.current;for(T=p;T!==null;){a=T;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,T=h;else e:for(a=p;T!==null;){if(u=T,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Si(9,u)}}catch(C){se(u,u.return,C)}if(u===a){T=null;break e}var x=u.sibling;if(x!==null){x.return=u.return,T=x;break e}T=u.return}}if(G=o,rn(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(mi,e)}catch{}r=!0}return r}finally{Q=n,rt.transition=t}}return!1}function Vu(e,t,n){t=Yn(n,t),t=xd(e,t,1),e=Qt(e,t,1),t=Re(),e!==null&&(eo(e,1,t),Ue(e,t))}function se(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Yn(n,e),e=wd(t,e,1),t=Qt(t,e,1),e=Re(),t!==null&&(eo(t,1,e),Ue(t,e));break}}t=t.return}}function Bg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,me===e&&(ke&n)===n&&(ge===4||ge===3&&(ke&130023424)===ke&&500>de()-Ql?dn(e,0):Jl|=n),Ue(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):t=1);var n=Re();e=Ot(e,t),e!==null&&(eo(e,t,n),Ue(e,n))}function Hg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function Gg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Ud(e,n)}var Wd;Wd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||De.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,Fg(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,ne&&t.flags&1048576&&$c(t,oi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bo(e,t),e=t.pendingProps;var o=Vn(t,Pe.current);Hn(t,n),o=Bl(null,t,r,e,o,n);var i=Hl();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,je(r)?(i=!0,ni(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Al(t),o.updater=bi,t.stateNode=o,o._reactInternals=t,Za(t,r,e,n),t=nl(null,t,r,!0,i,n)):(t.tag=0,ne&&i&&Ml(t),Ie(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Vg(r),e=ut(r,e),o){case 0:t=tl(null,t,r,e,n);break e;case 1:t=zu(null,t,r,e,n);break e;case 11:t=Ou(null,t,r,e,n);break e;case 14:t=Lu(null,t,r,ut(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),tl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),zu(e,t,r,o,n);case 3:e:{if(Sd(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Xc(e,t),li(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Yn(Error(_(423)),t),t=Au(e,t,r,n,o);break e}else if(r!==o){o=Yn(Error(_(424)),t),t=Au(e,t,r,n,o);break e}else for(Ve=Jt(t.stateNode.containerInfo.firstChild),Ke=t,ne=!0,dt=null,n=Qc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kn(),r===o){t=Lt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return qc(t),e===null&&Ya(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,$a(r,o)?a=null:i!==null&&$a(r,i)&&(t.flags|=32),bd(e,t),Ie(e,t,a,n),t.child;case 6:return e===null&&Ya(t),null;case 13:return Nd(e,t,n);case 4:return Dl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jn(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Ou(e,t,r,o,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,X(ii,r._currentValue),r._currentValue=a,i!==null)if(gt(i.value,a)){if(i.children===o.children&&!De.current){t=Lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){a=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Ft(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?s.next=s:(s.next=d.next,d.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Xa(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(_(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Xa(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ie(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hn(t,n),o=ot(o),r=r(o),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,o=ut(r,t.pendingProps),o=ut(r.type,o),Lu(e,t,r,o,n);case 15:return kd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Bo(e,t),t.tag=1,je(r)?(e=!0,ni(t)):e=!1,Hn(t,n),yd(t,r,o),Za(t,r,o,n),nl(null,t,r,!0,e,n);case 19:return Cd(e,t,n);case 22:return _d(e,t,n)}throw Error(_(156,t.tag))};function Bd(e,t){return hc(e,t)}function $g(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nt(e,t,n,r){return new $g(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vg(e){if(typeof e=="function")return Zl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yl)return 11;if(e===xl)return 14}return 2}function qt(e,t){var n=e.alternate;return n===null?(n=nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $o(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Zl(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Pn:return pn(n.children,o,i,t);case vl:a=8,o|=8;break;case ba:return e=nt(12,n,t,o|2),e.elementType=ba,e.lanes=i,e;case Sa:return e=nt(13,n,t,o),e.elementType=Sa,e.lanes=i,e;case Na:return e=nt(19,n,t,o),e.elementType=Na,e.lanes=i,e;case qu:return Ci(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yu:a=10;break e;case Xu:a=9;break e;case yl:a=11;break e;case xl:a=14;break e;case jt:a=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=nt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function pn(e,t,n,r){return e=nt(7,e,r,t),e.lanes=n,e}function Ci(e,t,n,r){return e=nt(22,e,r,t),e.elementType=qu,e.lanes=n,e.stateNode={isHidden:!1},e}function wa(e,t,n){return e=nt(6,e,null,t),e.lanes=n,e}function ka(e,t,n){return t=nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kg(e,t,n,r,o){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=oa(0),this.expirationTimes=oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function es(e,t,n,r,o,i,a,u,s){return e=new Kg(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=nt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Al(i),e}function Jg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:En,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hd(e){if(!e)return en;e=e._reactInternals;e:{if(xn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(je(n))return Hc(e,n,t)}return t}function Gd(e,t,n,r,o,i,a,u,s){return e=es(n,r,!0,e,o,i,a,u,s),e.context=Hd(null),n=e.current,r=Re(),o=Xt(n),i=Ft(r,o),i.callback=t??null,Qt(n,i,o),e.current.lanes=o,eo(e,o,r),Ue(e,r),e}function Ei(e,t,n,r){var o=t.current,i=Re(),a=Xt(o);return n=Hd(n),t.context===null?t.context=n:t.pendingContext=n,t=Ft(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qt(o,t,a),e!==null&&(ft(e,o,a,i),jo(e,o,a)),a}function hi(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 Ku(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ts(e,t){Ku(e,t),(e=e.alternate)&&Ku(e,t)}function Qg(){return null}var $d=typeof reportError=="function"?reportError:function(e){console.error(e)};function ns(e){this._internalRoot=e}Pi.prototype.render=ns.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));Ei(e,t,null,null)};Pi.prototype.unmount=ns.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vn(function(){Ei(null,e,null,null)}),t[Rt]=null}};function Pi(e){this._internalRoot=e}Pi.prototype.unstable_scheduleHydration=function(e){if(e){var t=_c();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&Sc(e)}};function rs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ti(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ju(){}function Yg(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=hi(a);i.call(c)}}var a=Gd(t,r,e,0,null,!1,!1,"",Ju);return e._reactRootContainer=a,e[Rt]=a.current,$r(e.nodeType===8?e.parentNode:e),vn(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var u=r;r=function(){var c=hi(s);u.call(c)}}var s=es(e,0,!1,null,null,!1,!1,"",Ju);return e._reactRootContainer=s,e[Rt]=s.current,$r(e.nodeType===8?e.parentNode:e),vn(function(){Ei(t,s,n,r)}),s}function Mi(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var u=o;o=function(){var s=hi(a);u.call(s)}}Ei(t,a,e,o)}else a=Yg(n,t,e,o,r);return hi(a)}wc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cr(t.pendingLanes);n!==0&&(_l(t,n|1),Ue(t,de()),!(G&6)&&(Xn=de()+500,rn()))}break;case 13:vn(function(){var r=Ot(e,1);if(r!==null){var o=Re();ft(r,e,1,o)}}),ts(e,1)}};bl=function(e){if(e.tag===13){var t=Ot(e,134217728);if(t!==null){var n=Re();ft(t,e,134217728,n)}ts(e,134217728)}};kc=function(e){if(e.tag===13){var t=Xt(e),n=Ot(e,t);if(n!==null){var r=Re();ft(n,e,t,r)}ts(e,t)}};_c=function(){return Q};bc=function(e,t){var n=Q;try{return Q=e,t()}finally{Q=n}};La=function(e,t,n){switch(t){case"input":if(Pa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=wi(r);if(!o)throw Error(_(90));ec(r),Pa(r,o)}}}break;case"textarea":nc(e,n);break;case"select":t=n.value,t!=null&&jn(e,!!n.multiple,t,!1)}};uc=Yl;cc=vn;var Xg={usingClientEntryPoint:!1,Events:[no,In,wi,lc,sc,Yl]},_r={findFiberByHostInstance:sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qg={bundleType:_r.bundleType,version:_r.version,rendererPackageName:_r.rendererPackageName,rendererConfig:_r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fc(e),e===null?null:e.stateNode},findFiberByHostInstance:_r.findFiberByHostInstance||Qg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(br=__REACT_DEVTOOLS_GLOBAL_HOOK__,!br.isDisabled&&br.supportsFiber))try{mi=br.inject(qg),_t=br}catch{}var br;Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xg;Ye.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rs(t))throw Error(_(200));return Jg(e,t,null,n)};Ye.createRoot=function(e,t){if(!rs(e))throw Error(_(299));var n=!1,r="",o=$d;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=es(e,1,!1,null,null,n,!1,r,o),e[Rt]=t.current,$r(e.nodeType===8?e.parentNode:e),new ns(t)};Ye.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(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=fc(t),e=e===null?null:e.stateNode,e};Ye.flushSync=function(e){return vn(e)};Ye.hydrate=function(e,t,n){if(!Ti(t))throw Error(_(200));return Mi(null,e,t,!0,n)};Ye.hydrateRoot=function(e,t,n){if(!rs(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=$d;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Gd(t,null,e,1,n??null,o,!1,i,a),e[Rt]=t.current,$r(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Pi(t)};Ye.render=function(e,t,n){if(!Ti(t))throw Error(_(200));return Mi(null,e,t,!1,n)};Ye.unmountComponentAtNode=function(e){if(!Ti(e))throw Error(_(40));return e._reactRootContainer?(vn(function(){Mi(null,null,e,!1,function(){e._reactRootContainer=null,e[Rt]=null})}),!0):!1};Ye.unstable_batchedUpdates=Yl;Ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ti(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return Mi(e,t,n,!1,r)};Ye.version="18.3.1-next-f1338f8080-20240426"});var Qd=Nt((Um,Jd)=>{"use strict";function Kd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kd)}catch(e){console.error(e)}}Kd(),Jd.exports=Vd()});var Xd=Nt(os=>{"use strict";var Yd=Qd();os.createRoot=Yd.createRoot,os.hydrateRoot=Yd.hydrateRoot;var Wm});var Zd=Nt(Fi=>{"use strict";var Zg=Ct(),eh=Symbol.for("react.element"),th=Symbol.for("react.fragment"),nh=Object.prototype.hasOwnProperty,rh=Zg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oh={key:!0,ref:!0,__self:!0,__source:!0};function qd(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)nh.call(t,r)&&!oh.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:eh,type:e,key:i,ref:a,props:o,_owner:rh.current}}Fi.Fragment=th;Fi.jsx=qd;Fi.jsxs=qd});var be=Nt((Gm,ep)=>{"use strict";ep.exports=Zd()});var vs=`/* ---------------------------------------------------------------
|
|
9
9
|
Workflow Editor \u2014 bold redesign
|
|
10
10
|
Design system:
|
|
11
11
|
- Type: Space Grotesk (UI), JetBrains Mono (identifiers/expr),
|
|
@@ -1250,12 +1250,14 @@ code, .mono {
|
|
|
1250
1250
|
.hstack { display: flex; gap: 8px; align-items: center; }
|
|
1251
1251
|
.vstack { display: flex; flex-direction: column; gap: 8px; }
|
|
1252
1252
|
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
|
|
1253
|
-
`;var Sp=oe(Xd(),1);var O=oe(Ct(),1);var We=oe(Ct(),1);var v=oe(be(),1),D=({children:e,size:t=14,...n})=>(0,v.jsx)("svg",{viewBox:"0 0 16 16",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",...n,children:e}),L={gitlab:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M8 14L2 7l1.2-4.5L5 7h6l1.8-4.5L14 7z"})}),clock:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M8 5v3l2 1.5"})]}),hook:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 3v4a4 4 0 0 0 4 4h4"}),(0,v.jsx)("path",{d:"M10 9l2 2-2 2"})]}),play:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),box:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5"}),(0,v.jsx)("path",{d:"M2.5 6h11M6 2.5v11"})]}),branch:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"4",cy:"4",r:"1.5"}),(0,v.jsx)("circle",{cx:"12",cy:"12",r:"1.5"}),(0,v.jsx)("circle",{cx:"12",cy:"4",r:"1.5"}),(0,v.jsx)("path",{d:"M4 5.5v3a2 2 0 0 0 2 2h4.5"}),(0,v.jsx)("path",{d:"M12 5.5v5"})]}),stop:()=>(0,v.jsx)(D,{children:(0,v.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1"})}),msg:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M2.5 3.5h11v8h-6l-3 2.5v-2.5h-2z"})}),tag:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M8 2h5v5l-6 6-5-5z"}),(0,v.jsx)("circle",{cx:"10.5",cy:"5.5",r:.8,fill:"currentColor"})]}),bell:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 11V7a4 4 0 0 1 8 0v4l1 1.5H3zM6.5 13.5a1.5 1.5 0 0 0 3 0"})}),globe:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M2.5 8h11M8 2.5c2 2 2 9 0 11M8 2.5c-2 2-2 9 0 11"})]}),search:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5"})]}),undo:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 7h6a3 3 0 0 1 0 6H7"}),(0,v.jsx)("path",{d:"M6.5 4.5L4 7l2.5 2.5"})]}),redo:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M12 7H6a3 3 0 0 0 0 6h3"}),(0,v.jsx)("path",{d:"M9.5 4.5L12 7 9.5 9.5"})]}),save:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M3 3h8l2 2v8H3z"}),(0,v.jsx)("path",{d:"M5 3v4h6V3M5 13v-4h6v4"})]}),run:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),stop2:()=>(0,v.jsx)(D,{children:(0,v.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1",fill:"currentColor"})}),sun:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"2.75"}),(0,v.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),moon:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M13 9.5A5.5 5.5 0 0 1 6.5 3 5.5 5.5 0 1 0 13 9.5z"})}),plus:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M8 3v10M3 8h10"})}),trash:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 4.5h10M6 4.5V3h4v1.5M4.5 4.5l.5 8h6l.5-8"})}),chev:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 6l4 4 4-4"})}),x:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})}),more:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"4",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,v.jsx)("circle",{cx:"8",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,v.jsx)("circle",{cx:"12",cy:"8",r:"1",fill:"currentColor",stroke:"none"})]}),check:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 8.5l3 3 7-7"})}),warn:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M8 2l6 11H2z"}),(0,v.jsx)("path",{d:"M8 6.5v3M8 11.2v.3"})]}),err:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M8 5v3.5M8 10.5v.3"})]}),zoomin:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4M7 5v4"})]}),zoomout:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4"})]}),fit:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M3 5V3h2M13 5V3h-2M3 11v2h2M13 11v2h-2"}),(0,v.jsx)("rect",{x:"6",y:"6",width:"4",height:"4",rx:.5})]}),minus:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 8h10"})}),kbd:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"1.5",y:"4",width:"13",height:"8",rx:"1.5"}),(0,v.jsx)("path",{d:"M4 7h.5M6 7h.5M8 7h.5M10 7h.5M4 10h7"})]}),lightning:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M9 2L3 9h4l-1 5 6-7H8z",fill:"currentColor",fillOpacity:.2})}),variable:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 3c-2 3-2 7 0 10M12 3c2 3 2 7 0 10"}),(0,v.jsx)("path",{d:"M6 7.5h.5l1 1 1-1h.5M6 10l1.5-1.5M9 10l-1.5-1.5"})]}),users:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,v.jsx)("path",{d:"M2.5 12c.5-2 2-3 3.5-3s3 1 3.5 3"}),(0,v.jsx)("circle",{cx:"11",cy:"5",r:"1.5"}),(0,v.jsx)("path",{d:"M10 10.5c.5-1 1.2-1.5 2-1.5 1 0 2 .8 2.3 2"})]}),grid:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"2.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"9.5",y:"2.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"2.5",y:"9.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"9.5",y:"9.5",width:"4",height:"4"})]}),eye:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M1.5 8C3 5 5.3 3.5 8 3.5S13 5 14.5 8C13 11 10.7 12.5 8 12.5S3 11 1.5 8z"}),(0,v.jsx)("circle",{cx:"8",cy:"8",r:"1.8"})]}),slide:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),(0,v.jsx)("path",{d:"M5 6h6M5 8.5h4M5 11h5"})]}),gear:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"2"}),(0,v.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),flag:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 13V3h7l-1 2.5L10 8H3"})}),dup:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"}),(0,v.jsx)("path",{d:"M3 9V3h6"})]}),layout:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M2.5 3.5h11v9h-11z"}),(0,v.jsx)("path",{d:"M2.5 7h11M7 7v5.5"})]}),panelLeft:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,v.jsx)("path",{d:"M6 3v10"}),(0,v.jsx)("rect",{x:"2.5",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]}),panelRight:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,v.jsx)("path",{d:"M10 3v10"}),(0,v.jsx)("rect",{x:"10",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]})};var N=oe(be(),1),ih={trigger:220,state:240,branch:260,action:220,end:160,agent:240,checkpoint:220,transform:220},ah={trigger:46,state:118,branch:110,action:78,end:46,agent:118,checkpoint:92,transform:78};function np(e){return e.startsWith("trigger.")?"trigger":e.startsWith("action.")?"action":e}function er(e){let t=np(e.type);return{w:ih[t]??220,h:ah[t]??100}}function tr(e){return e.position?.x??0}function nr(e){return e.position?.y??0}function Ri(e,t){let{w:n,h:r}=er(e),o=tr(e),i=nr(e);return t==="in"?{x:o,y:i+r/2}:t==="out"?{x:o+n,y:i+r/2}:t==="true"?{x:o+n,y:i+r*.3}:t==="false"?{x:o+n,y:i+r*.7}:{x:o+n/2,y:i+r/2}}function tp(e,t){let n=Math.max(40,Math.abs(t.x-e.x)*.45);return`M ${e.x} ${e.y} C ${e.x+n} ${e.y}, ${t.x-n} ${t.y}, ${t.x} ${t.y}`}function lh(e){let{n:t,selected:n,state:r}=e,{w:o}=er(t),i=np(t.type),a=t.config,u=i==="trigger"?a.source==="cron"?"clock":a.source==="webhook"||a.source==="hook"?"hook":a.source==="manual"?"play":"gitlab":i==="agent"?"box":i==="branch"?"branch":i==="action"?t.type==="action.send"?"msg":t.type==="action.setLabel"?"tag":t.type==="action.react"?"bell":t.type==="action.callHTTP"?"globe":t.type==="action.logTime"?"clock":t.type==="action.createIssue"?"plus":"lightning":i==="checkpoint"?"flag":i==="transform"?"variable":"stop",s=L[u]??L.box,c=["node",`t-${i}`,n&&"is-selected",r==="running"&&"is-running",r==="visited"&&"is-visited",r==="error"&&"is-error"].filter(Boolean).join(" "),d={left:tr(t),top:nr(t),width:o},g=a.agentId,m=a.prompt;return(0,N.jsxs)("div",{className:c,style:d,onMouseDown:y=>e.onMouseDown?.(y,t),onClick:y=>e.onClick?.(y,t),onDoubleClick:y=>e.onDoubleClick?.(y,t),children:[(0,N.jsx)("div",{className:"node__stripe"}),(0,N.jsxs)("div",{className:"node__head",children:[(0,N.jsx)("div",{className:"node__icon",children:(0,N.jsx)(s,{})}),(0,N.jsxs)("div",{className:"node__meta",children:[(0,N.jsx)("div",{className:"node__kind",children:t.type}),(0,N.jsx)("div",{className:"node__name",children:t.id})]}),i!=="trigger"&&i!=="end"&&(0,N.jsx)("div",{className:"node__chev",children:(0,N.jsx)(L.more,{})})]}),i==="agent"&&(0,N.jsxs)("div",{className:"node__body",children:[g?(0,N.jsxs)("div",{className:"node__row",children:[(0,N.jsx)(L.users,{}),(0,N.jsx)("span",{className:"mono",children:g})]}):(0,N.jsx)("div",{className:"node__row",style:{color:"var(--muted-2)"},children:"no agent"}),m&&(0,N.jsx)("div",{className:"node__row",style:{alignItems:"flex-start",lineHeight:1.4},children:(0,N.jsx)("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"var(--ink-2)",fontSize:11},children:m})})]}),i==="branch"&&(0,N.jsx)("div",{className:"node__body",children:(0,N.jsx)("div",{className:"node__row",children:(0,N.jsxs)("span",{className:"mono",style:{color:"var(--ink-2)"},children:[Array.isArray(a.cases)?a.cases.length:0," case",Array.isArray(a.cases)&&a.cases.length===1?"":"s"," \xB7 default: ",(0,N.jsx)("span",{className:"node__tag mono",children:String(a.default??"\u2014")})]})})}),i==="action"&&(0,N.jsxs)("div",{className:"node__body",children:[(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{className:"mono",style:{color:"var(--t-action)"},children:t.type.replace(/^action\./,"")})}),(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{style:{fontSize:11,color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:String(a.text??a.body??a.title??a.url??"")})})]}),i==="trigger"&&(0,N.jsx)("div",{className:"node__body",children:(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{className:"mono",style:{color:"var(--t-trigger)"},children:String(a.source??"")})})}),i!=="trigger"&&(0,N.jsx)("div",{className:"handle h-in",onMouseDown:y=>e.onPortDown?.(y,t,"in"),onMouseEnter:()=>e.onPortEnter?.(t,"in"),onMouseLeave:()=>e.onPortLeave?.()}),i==="branch"?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("div",{className:"handle h-true",onMouseDown:y=>e.onPortDown?.(y,t,"true"),onMouseEnter:()=>e.onPortEnter?.(t,"true"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,N.jsx)("span",{className:"handle__label",children:"true"})}),(0,N.jsx)("div",{className:"handle h-false",onMouseDown:y=>e.onPortDown?.(y,t,"false"),onMouseEnter:()=>e.onPortEnter?.(t,"false"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,N.jsx)("span",{className:"handle__label",children:"false"})})]}):i!=="end"&&(0,N.jsx)("div",{className:"handle h-out",onMouseDown:y=>e.onPortDown?.(y,t,"out"),onMouseEnter:()=>e.onPortEnter?.(t,"out"),onMouseLeave:()=>e.onPortLeave?.()})]})}function sh({nodes:e,viewBox:t,selection:n,hostRef:r}){let[o,i]=(0,We.useState)(!1);if(!e.length)return null;let a=60,u=e.map(P=>tr(P)),s=e.map(P=>nr(P)),c=e.map(P=>er(P).w),d=e.map(P=>er(P).h),g=Math.min(...u)-a,m=Math.min(...s)-a,y=Math.max(...u.map((P,K)=>P+c[K]))+a,k=Math.max(...s.map((P,K)=>P+d[K]))+a,S=y-g,B=k-m,f=r.current?.getBoundingClientRect(),p=f?.width??800,h=f?.height??500,x=-t.tx/t.zoom,C=-t.ty/t.zoom,M=p/t.zoom,F=h/t.zoom;return(0,N.jsxs)("div",{className:"cv__mini"+(o?" is-collapsed":""),children:[(0,N.jsxs)("div",{className:"cv__mini-head",children:[(0,N.jsx)("span",{children:"Map"}),(0,N.jsx)("button",{onClick:()=>i(!o),children:(0,N.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:(0,N.jsx)("path",{d:o?"M2 4l3 3 3-3":"M2 6l3-3 3 3",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"})})})]}),!o&&(0,N.jsxs)("svg",{viewBox:`${g} ${m} ${S} ${B}`,preserveAspectRatio:"xMidYMid meet",children:[(0,N.jsx)("rect",{className:"mini-view",x,y:C,width:M,height:F}),e.map(P=>{let K=er(P),W=n?.kind==="node"&&n.id===P.id;return(0,N.jsx)("rect",{className:"mini-node"+(W?" sel":""),x:tr(P),y:nr(P),width:K.w,height:K.h,rx:3},P.id)})]})]})}function rp(e){let{nodes:t,edges:n,selection:r,setSelection:o,onNodeMove:i,onAddNode:a,onConnect:u,runState:s,viewBox:c,setViewBox:d}=e,g=(0,We.useRef)(null),[m,y]=(0,We.useState)(null),[k,S]=(0,We.useState)(null),[B,f]=(0,We.useState)(!1),[p,h]=(0,We.useState)(null),[x,C]=(0,We.useState)(null),[M,F]=(0,We.useState)(null),{zoom:P,tx:K,ty:W}=c,ve=(E,j)=>{let U=g.current;if(!U)return{x:0,y:0};let Q=U.getBoundingClientRect();return{x:(E-Q.left-K)/P,y:(j-Q.top-W)/P}},ir=E=>{let j=E.target;j!==E.currentTarget&&!j.classList.contains("cv__viewport")||E.button!==0&&E.button!==1||(o(null),C({startX:E.clientX,startY:E.clientY,tx:K,ty:W}))},_n=(E,j)=>{if(E.target.classList.contains("handle"))return;E.stopPropagation(),o({kind:"node",id:j.id});let U=ve(E.clientX,E.clientY);y({id:j.id,offX:U.x-tr(j),offY:U.y-nr(j)})},ar=(E,j,U)=>{E.stopPropagation(),E.preventDefault();let Q=Ri(j,U);S({from:{id:j.id,port:U},x:Q.x,y:Q.y})},ao=(E,j)=>{k&&h({id:E.id,port:j})},lr=()=>h(null);(0,We.useEffect)(()=>{let E=U=>{if(m){let Q=ve(U.clientX,U.clientY);i(m.id,Q.x-m.offX,Q.y-m.offY)}else if(k){let Q=ve(U.clientX,U.clientY);S(q=>q&&{...q,x:Q.x,y:Q.y})}else x&&d(Q=>({...Q,tx:x.tx+(U.clientX-x.startX),ty:x.ty+(U.clientY-x.startY)}))},j=()=>{k&&p&&p.id!==k.from.id&&u({from:k.from.id,fromPort:k.from.port,to:p.id,toPort:"in"}),y(null),S(null),C(null),h(null)};return window.addEventListener("mousemove",E),window.addEventListener("mouseup",j),()=>{window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",j)}},[m,k,x,p,u,i,d]);let ht=E=>{if(!E.ctrlKey&&!E.metaKey&&Math.abs(E.deltaY)<30){d(Z=>({...Z,tx:Z.tx-E.deltaX,ty:Z.ty-E.deltaY}));return}E.preventDefault();let j=g.current;if(!j)return;let U=j.getBoundingClientRect(),Q=E.clientX-U.left,q=E.clientY-U.top,Be=-E.deltaY*.0015;d(Z=>{let qe=Math.min(2,Math.max(.3,Z.zoom*(1+Be))),Le=qe/Z.zoom;return{zoom:qe,tx:Q-(Q-Z.tx)*Le,ty:q-(q-Z.ty)*Le}})},mt=()=>d(E=>({...E,zoom:Math.min(2,E.zoom*1.15)})),Li=()=>d(E=>({...E,zoom:Math.max(.3,E.zoom/1.15)})),zi=()=>{let E=g.current;if(!E||!t.length)return;let j=E.getBoundingClientRect(),U=60,Q=1/0,q=1/0,Be=-1/0,Z=-1/0;t.forEach(at=>{let cr=er(at),dr=tr(at),lo=nr(at);Q=Math.min(Q,dr),q=Math.min(q,lo),Be=Math.max(Be,dr+cr.w),Z=Math.max(Z,lo+cr.h)});let qe=Be-Q+U*2,Le=Z-q+U*2,ye=Math.min(1,Math.min(j.width/qe,j.height/Le));d({zoom:ye,tx:(j.width-qe*ye)/2-(Q-U)*ye,ty:(j.height-Le*ye)/2-(q-U)*ye})},sr=E=>{E.preventDefault(),f(!0)},bn=()=>f(!1),ur=E=>{E.preventDefault(),f(!1);let j=E.dataTransfer.getData("application/x-wfe-item");if(j)try{let U=JSON.parse(j),Q=ve(E.clientX,E.clientY);a(U,Q.x-100,Q.y-40)}catch{}},Ai=E=>{let j=E.id??"",U=["wfe-edge"];return r?.kind==="edge"&&r.id===j&&U.push("is-selected"),M===j&&U.push("is-hover"),s?.currentEdgeId===j&&U.push("is-running"),j&&s?.visitedEdges?.has(j)&&U.push("is-visited"),E.fromPort==="true"&&U.push("is-true"),E.fromPort==="false"&&U.push("is-false"),U.join(" ")},Di=E=>s?.currentNodeId===E.id?"running":s?.visitedNodes?.has(E.id)?"visited":null,ji=(0,We.useMemo)(()=>{if(!k)return null;let E=t.find(Q=>Q.id===k.from.id);if(!E)return null;let j=Ri(E,k.from.port),U={x:k.x,y:k.y};return(0,N.jsx)("svg",{className:"cv__ghost-edge",width:"4000",height:"2400",children:(0,N.jsx)("path",{d:tp(j,U)})})},[k,t]);return(0,N.jsxs)("div",{className:"cv"+(x?" is-panning":"")+(B?" is-drop-target":""),ref:g,onWheel:ht,onMouseDown:ir,onDragOver:sr,onDragLeave:bn,onDrop:ur,children:[(0,N.jsxs)("div",{className:"cv__viewport",style:{transform:`translate(${K}px, ${W}px) scale(${P})`},children:[(0,N.jsxs)("svg",{className:"cv__edges",width:"4000",height:"2400",children:[(0,N.jsxs)("defs",{children:[(0,N.jsx)("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"currentColor"})}),(0,N.jsx)("marker",{id:"arr-ok",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--ok)"})}),(0,N.jsx)("marker",{id:"arr-err",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--err)"})}),(0,N.jsx)("marker",{id:"arr-acc",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--accent)"})})]}),n.map((E,j)=>{let U=t.find(at=>at.id===E.from),Q=t.find(at=>at.id===E.to);if(!U||!Q)return null;let q=E.id??`e-${j}`,Be=Ri(U,E.fromPort??"out"),Z=Ri(Q,E.toPort??"in"),qe=tp(Be,Z),Le={x:(Be.x+Z.x)/2,y:(Be.y+Z.y)/2},ye=s?.currentEdgeId===q||s?.visitedEdges?.has(q)?"url(#arr-acc)":E.fromPort==="true"?"url(#arr-ok)":E.fromPort==="false"?"url(#arr-err)":"url(#arr)";return(0,N.jsxs)("g",{children:[(0,N.jsx)("path",{className:"edge-bg",d:qe,onMouseEnter:()=>F(q),onMouseLeave:()=>F(null),onClick:()=>o({kind:"edge",id:q})}),(0,N.jsx)("path",{className:Ai(E),d:qe,markerEnd:ye}),E.label&&(0,N.jsxs)("g",{transform:`translate(${Le.x},${Le.y})`,children:[(0,N.jsx)("rect",{className:"edge-label-bg",x:-E.label.length*3.6-6,y:-9,rx:3,width:E.label.length*7.2+12,height:18}),(0,N.jsx)("text",{className:"edge-label",y:4,textAnchor:"middle",children:E.label})]})]},q)})]}),ji,t.map(E=>(0,N.jsx)(lh,{n:E,selected:r?.kind==="node"&&r.id===E.id,state:Di(E),onMouseDown:_n,onPortDown:ar,onPortEnter:ao,onPortLeave:lr,onClick:(j,U)=>{j.stopPropagation(),o({kind:"node",id:U.id})}},E.id))]}),(0,N.jsxs)("div",{className:"cv__controls",children:[(0,N.jsx)("button",{title:"Zoom out",onClick:Li,children:(0,N.jsx)(L.zoomout,{})}),(0,N.jsxs)("div",{className:"cv__zoom",children:[Math.round(P*100),"%"]}),(0,N.jsx)("button",{title:"Zoom in",onClick:mt,children:(0,N.jsx)(L.zoomin,{})}),(0,N.jsx)("button",{title:"Fit",onClick:zi,children:(0,N.jsx)(L.fit,{})})]}),(0,N.jsx)(sh,{nodes:t,viewBox:c,selection:r,hostRef:g})]})}var re=oe(Ct(),1);var is=[{section:"Triggers",items:[{id:"trigger.channel.whatsapp",type:"trigger.channel",label:"WhatsApp",hint:"On incoming WhatsApp message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.telegram",type:"trigger.channel",label:"Telegram",hint:"On incoming Telegram message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.gitlab",type:"trigger.channel",label:"GitLab",hint:"Issue / pipeline events",glyph:"g-trigger",icon:"gitlab"},{id:"trigger.cron",type:"trigger.cron",label:"Cron",hint:"Fires on a timer",glyph:"g-trigger",icon:"clock"},{id:"trigger.manual",type:"trigger.manual",label:"Manual",hint:"Kick off from UI / CLI",glyph:"g-trigger",icon:"play"},{id:"trigger.form",type:"trigger.form",label:"Form",hint:"Human fills a form to start",glyph:"g-trigger",icon:"plus"}]},{section:"Compute",items:[{id:"node.agent",type:"agent",label:"Agent",hint:"Run an agent with a templated prompt",glyph:"g-state",icon:"box"},{id:"node.transform",type:"transform",label:"Transform",hint:"Derive a bundle from upstream outputs",glyph:"g-state",icon:"variable"}]},{section:"People & composition",items:[{id:"node.userTask",type:"userTask",label:"User task",hint:"Assign a form to an actor / role; pauses the run",glyph:"g-state",icon:"box"},{id:"node.subProcess",type:"subProcess",label:"Sub-process",hint:"Call another workflow; parent resumes on child end",glyph:"g-state",icon:"box"},{id:"node.signal.emit",type:"signal.emit",label:"Emit signal",hint:"Post an event to other workflows",glyph:"g-action",icon:"msg"},{id:"node.signal.wait",type:"signal.wait",label:"Wait for signal",hint:"Pause until a matching signal arrives",glyph:"g-branch",icon:"flag"},{id:"node.timer.boundary",type:"timer.boundary",label:"Timer",hint:"Pause then fire after a duration (PT1H, P1D\u2026)",glyph:"g-branch",icon:"clock"}]},{section:"Flow control",items:[{id:"node.branch",type:"branch",label:"Branch",hint:"Route based on a condition",glyph:"g-branch",icon:"branch"},{id:"node.gateway.parallel",type:"gateway.parallel",label:"Parallel gateway",hint:"Fan out / join branches (mode: fanOut | join)",glyph:"g-branch",icon:"branch"},{id:"node.rule",type:"rule",label:"Decision table",hint:"DMN-style N-input rules; first match wins",glyph:"g-branch",icon:"branch"},{id:"node.checkpoint",type:"checkpoint",label:"Checkpoint",hint:"Persist state, pause for event",glyph:"g-branch",icon:"flag"},{id:"node.end",type:"end",label:"End",hint:"Run completes here",glyph:"g-end",icon:"stop"}]},{section:"Actions",items:[{id:"action.send",type:"action.send",label:"Send message",hint:"Post a message to any channel",glyph:"g-action",icon:"msg"},{id:"action.createIssue",type:"action.createIssue",label:"Create issue",hint:"Open a new GitLab issue",glyph:"g-action",icon:"plus"},{id:"action.setLabel",type:"action.setLabel",label:"Set Label",hint:"Add or remove labels",glyph:"g-action",icon:"tag"},{id:"action.callHTTP",type:"action.callHTTP",label:"HTTP Request",hint:"Call an external service",glyph:"g-action",icon:"globe"},{id:"action.logTime",type:"action.logTime",label:"Log Time",hint:"Record time spent in a state",glyph:"g-action",icon:"clock"}]}],as=[{group:"issue",items:[{path:"issue.title",type:"string"},{path:"issue.labels",type:"string[]"},{path:"issue.assignee",type:"string?"},{path:"issue.author",type:"string"},{path:"issue.body",type:"string"},{path:"issue.iid",type:"number"},{path:"issue.url",type:"string"}]},{group:"run",items:[{path:"run.id",type:"string"},{path:"run.state",type:"string"},{path:"run.workflow",type:"string"},{path:"run.homeNode",type:"string"}]},{group:"pipeline",items:[{path:"pipeline.status",type:"enum"},{path:"pipeline.ref",type:"string"},{path:"pipeline.id",type:"number"}]},{group:"state",items:[{path:"state.previous",type:"string?"},{path:"state.next",type:"string?"}]},{group:"env",items:[{path:"env.GITLAB_TOKEN",type:"secret (allowlist req.)"},{path:"env.GITLAB_HOST",type:"string (allowlist req.)"}]}],ls=[{id:"tpl.gitlab",title:"GitLab issue lifecycle",hint:"Triage \u2192 Review \u2192 QA \u2192 Done \xB7 5 states",dots:3},{id:"tpl.mr",title:"MR review loop",hint:"Agent-driven 3-state review",dots:2},{id:"tpl.blank",title:"Blank canvas",hint:"Start from a single trigger",dots:1}],op=[{id:"triage-agent",name:"Triage Agent",tags:["default"],color:200},{id:"dev-agent",name:"Dev Agent",tags:["default"],color:145},{id:"code-reviewer",name:"Code Reviewer",tags:["default"],color:28}];var uh=[{path:"channel",type:"string",description:"Channel name that received the event.",example:'"whatsapp"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"chatId",type:"string",description:"Stable chat id \u2014 conversation partner JID (WhatsApp) or chat integer (Telegram). Use as `action.send` chatId to reply on the same thread.",example:'"21624309128@s.whatsapp.net"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"accountId",type:"string",description:"Which bot account received the message. Telegram routes this per-account; inherit into `action.send` to reply through the same bot.",example:'"default"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"text",type:"string",description:"Message body (caption for media), lower-cased for routing but the raw text here is verbatim.",example:'"hello"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"fromJid",type:"string",description:"Raw sender JID/id straight from the platform. Use `sender.id` for the normalized form.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.id",type:"string",description:"Normalized sender id.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.name",type:"string",description:"Display name, e.g. WhatsApp pushName or Telegram first_name.",example:'"Anis"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.username",type:"string",description:"Platform-specific handle when available (Telegram @username, ...).",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.id",type:"string",description:"Group chat id when the message came from a group; undefined for DMs.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.name",type:"string",description:"Group display name when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyTo",type:"string",description:"ID of the message this one quoted, when any.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyToText",type:"string",description:"Text of the quoted message when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"media.path",type:"string",description:"Filesystem path of the attached media after download.",sourceFilter:["whatsapp-message","telegram-message"]},{path:"media.type",type:"string",description:"MIME type of the media (`image/jpeg`, `audio/ogg`, ...).",sourceFilter:["whatsapp-message","telegram-message"]},{path:"event.id",type:"string",description:"Platform message id. Use as `action.send` replyTo to thread replies.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"event.timestamp",type:"string",description:"ISO-8601 timestamp of the source message.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"issue.iid",type:"number",description:"GitLab internal issue id (per project).",example:"42",sourceFilter:["gitlab-issue"]},{path:"issue.title",type:"string",description:"Issue title.",sourceFilter:["gitlab-issue"]},{path:"issue.description",type:"string",description:"Issue description body.",sourceFilter:["gitlab-issue"]},{path:"issue.url",type:"string",description:"Web URL of the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.action",type:"string",description:"Action that triggered the event (`open`, `update`, `close`, ...).",sourceFilter:["gitlab-issue"]},{path:"issue.labels",type:"array",description:"Current labels on the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.assignees",type:"array",description:"Assignees on the issue.",sourceFilter:["gitlab-issue"]},{path:"project",type:"string",description:"GitLab project path.",example:'"noqta/web"',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"chatId",type:"string",description:'Stable entity id for GitLab: "<project>:issue:<iid>" (issue) or "<project>:merge_request:<iid>" (pipeline).',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"channel",type:"string",description:'Always `"gitlab"` for GitLab sources.',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"pipeline.id",type:"number",description:"Pipeline id.",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.status",type:"string",description:"Pipeline status (`success`, `failed`, `canceled`, ...).",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.ref",type:"string",description:"Git ref the pipeline ran on.",sourceFilter:["gitlab-pipeline"]}],ch=[{path:"reply",type:"string",description:"Full agent response text. Most common template target (e.g. echoing it back via `action.send`).",example:'"Got it \u2014 routing to..."'},{path:"result",type:"string",description:"Parsed `RESULT: <token>` marker from the agent's reply (lowercased), or `approved`/`rejected`/`done`/`failed` from a `[BRACKET]`. Used by `branch` nodes to route on agent classification.",example:'"approved"'},{path:"json",type:"any",description:"When `resultParser` is `json`, the parsed first fenced ```json ... ``` block. Useful for structured agent outputs."},{path:"taskId",type:"string",description:"Opaque workflow-scoped task id \u2014 mostly for diagnostics.",example:'"wf-<runId>-<suffix>"'},{path:"durationMs",type:"number",description:"Wall-clock duration of the agent call.",example:"14520"}],dh=[{path:"messageId",type:"string",description:"Platform message id of the sent message. `null` when the adapter couldn't capture it (e.g. mesh-forwarded sends may return null)."},{path:"viaMesh",type:"bool",description:"`true` when the send was forwarded over the mesh to a peer that hosts the channel (workflow on one node, channel adapter on another). Absent for local sends."}],ph=[{path:"issue.iid",type:"number",description:"Newly-created issue iid.",example:"123"},{path:"issue.url",type:"string",description:"Web URL of the new issue."},{path:"issue.webUrl",type:"string",description:"Alias of `issue.url`."}],fh=[{path:"labels",type:"array",description:"Label list after the change."},{path:"add",type:"array",description:"Labels that were added in this call."},{path:"remove",type:"array",description:"Labels that were removed in this call."}],gh=[{path:"labels",type:"array",description:"Current label list on the entity. Use with a `branch` node to route on label state."}],hh=[{path:"emoji",type:"string",description:"The emoji reaction that was applied (echoes the input for debugging)."}],mh=[{path:"edited",type:"bool",description:"`true` when the platform accepted the edit. Treat `false` as a soft miss \u2014 text may have been unchanged or the message was too old."}],vh=[{path:"durationMs",type:"number",description:"Duration logged, in milliseconds (echoed for downstream use)."}],yh=[{path:"ok",type:"bool",description:"Response.ok \u2014 `true` for 2xx."},{path:"status",type:"number",description:"HTTP status code.",example:"200"},{path:"body",type:"any",description:"Parsed JSON body when the response was JSON; otherwise the raw text string."}],xh=[{path:"port",type:"string",description:"Which outgoing port matched. Downstream edges with `fromPort` matching this value will fire."}],wh=[{path:"value",type:"any",description:"When config uses `path`, this carries the value picked from context. In `template` mode, keys from the rendered template land at the top level of this node's output (no `.value` prefix)."}],kh=[{path:"event",type:"any",description:"Payload of the event that resumed this checkpoint. Fields mirror whichever trigger source delivered the resume event."}],_h=[{path:"name",type:"string",description:"Name of the signal that resumed the wait."},{path:"payload",type:"any",description:"Payload the emitter attached to the signal."},{path:"receivedAt",type:"string",description:"ISO-8601 time the signal was observed."}],bh=[{path:"emittedAt",type:"string",description:"ISO-8601 time the signal was published."}],Sh=[{path:"firedAt",type:"string",description:"ISO-8601 time the timer elapsed (when resumed)."},{path:"scheduledFor",type:"string",description:"ISO-8601 time the timer was originally scheduled for."}],Nh=[{path:"submission",type:"object",description:"Form values submitted by the assignee, keyed by field id. Shape depends on this userTask's form schema."},{path:"submittedBy",type:"string",description:"Actor id of the user who completed the task."},{path:"submittedAt",type:"string",description:"ISO-8601 submission timestamp."}],Ch=[{path:"childRunId",type:"string",description:"Run id of the spawned child workflow."},{path:"result",type:"any",description:"Output bundle of the child's terminal `end` node (if any)."}],ss={"trigger.channel":{summary:"Raw event payload from the source channel. Shape varies by `source` \u2014 the Context panel filters accordingly.",fields:uh},"trigger.manual":{summary:"Arbitrary payload posted by `agentx workflow run <id>` / POST /workflows/:id/run.",fields:[{path:"",type:"any",description:"Whatever JSON the caller supplied."}]},"trigger.cron":{summary:"Scheduled tick \u2014 no data bundle beyond the firing metadata.",fields:[{path:"firedAt",type:"string",description:"ISO-8601 time the tick fired."},{path:"cronSpec",type:"string",description:"The `spec` from the node's config (echoed for debug)."}]},"trigger.hook":{summary:"Fires when a custom hook event bubbles through the registry. Payload is whatever the hook subscriber chose to emit.",fields:[{path:"",type:"any",description:"Hook-specific payload."}]},"trigger.form":{summary:"Starts when a published form receives a submission.",fields:[{path:"formId",type:"string",description:"Form id that received the submission."},{path:"submission",type:"object",description:"Submitted values keyed by field id."},{path:"submittedBy",type:"string",description:"Actor id of the submitter."}]},agent:{summary:"Agent response after executing the prompt template.",fields:ch},transform:{summary:"Value picked from upstream context (path mode) or rendered template bundle (template mode).",fields:wh},branch:{summary:"Which outgoing port fired. Downstream edges match via `fromPort`.",fields:xh},"gateway.parallel":{summary:"All incoming branches joined here. No output.",fields:[]},rule:{summary:"Evaluates a declarative rule against context; may short-circuit the walk.",fields:[]},"action.send":{summary:"Dispatched an outbound message through the chosen channel.",fields:dh},"action.createIssue":{summary:"Created an issue on GitLab/GitHub.",fields:ph},"action.setLabel":{summary:"Added/removed labels on a GitLab issue or MR.",fields:fh},"action.readLabel":{summary:"Fetched the current label list \u2014 useful before a `branch`.",fields:gh},"action.react":{summary:"Emoji reaction on a message (Telegram/WhatsApp).",fields:hh},"action.editMessage":{summary:"Edited an existing message in place.",fields:mh},"action.logTime":{summary:"Logged time spent on a GitLab issue/MR.",fields:vh},"action.callHTTP":{summary:"Made an outbound HTTP request with templated params.",fields:yh},userTask:{summary:"Paused for a human to submit a form. Resumes with the submission in this node's output.",fields:Nh},subProcess:{summary:"Spawned a child workflow and waited for its completion.",fields:Ch},"signal.emit":{summary:"Published a signal to the bus. Runs elsewhere can resume on it via `signal.wait`.",fields:bh},"signal.wait":{summary:"Paused until a matching signal arrives. Resumes with that signal in this node's output.",fields:_h},"timer.boundary":{summary:"Paused until a timer elapses. Resumes with timing metadata.",fields:Sh},checkpoint:{summary:"Paused until a matching resume event arrives on this entity.",fields:kh},end:{summary:"Terminal node \u2014 closes the run with the configured status. No output downstream.",fields:[]}};function ip(e,t={}){let n=ss[e];if(!n)return[];let r=typeof t.source=="string"?t.source:void 0;return r?n.fields.filter(o=>!o.sourceFilter||o.sourceFilter.includes(r)):n.fields.filter(o=>!o.sourceFilter)}var l=oe(be(),1);function z({title:e,children:t,defaultOpen:n=!0,right:r}){let[o,i]=(0,re.useState)(n);return(0,l.jsxs)("div",{className:"insp__section"+(o?"":" is-collapsed"),children:[(0,l.jsxs)("div",{className:"insp__section-head",onClick:()=>i(!o),children:[(0,l.jsx)("span",{className:"chev",children:(0,l.jsx)(L.chev,{})}),(0,l.jsx)("h4",{children:e}),r]}),(0,l.jsx)("div",{className:"insp__section-body",children:t})]})}function w({label:e,hint:t,err:n,children:r,mono:o}){return(0,l.jsxs)("div",{className:"fld"+(o?" is-mono":"")+(n?" is-err":""),children:[(0,l.jsxs)("div",{className:"fld__label",children:[(0,l.jsx)("span",{children:e}),t&&(0,l.jsx)("span",{className:"fld__hint",children:t})]}),r,n&&(0,l.jsxs)("div",{className:"fld__err",children:[(0,l.jsx)(L.err,{}),n]})]})}function I({value:e,onChange:t,placeholder:n,mono:r,list:o}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e,placeholder:n,list:o,onChange:i=>t(i.target.value)})}function wn({value:e,onChange:t,placeholder:n}){return(0,l.jsx)("input",{className:"fld__input",type:"number",value:e??"",placeholder:n,onChange:r=>{let o=r.target.value.trim();t(o===""?void 0:Number(o))}})}function St({value:e,onChange:t,rows:n=3,placeholder:r,mono:o}){return(0,l.jsx)("textarea",{className:"fld__input"+(o?" mono":""),rows:n,spellCheck:!1,value:e,placeholder:r,onChange:i=>t(i.target.value)})}function ue({value:e,onChange:t,options:n}){return(0,l.jsx)("select",{className:"fld__select",value:e,onChange:r=>t(r.target.value),children:n.map(r=>{let o=typeof r=="string"?r:r.value,i=typeof r=="string"?r:r.label;return(0,l.jsx)("option",{value:o,children:i},o)})})}function cs({checked:e,onChange:t,label:n}){return(0,l.jsxs)("label",{className:"fld__check",style:{display:"flex",gap:8,alignItems:"center",fontSize:12},children:[(0,l.jsx)("input",{type:"checkbox",checked:e,onChange:r=>t(r.target.checked)}),(0,l.jsx)("span",{children:n})]})}function bt({value:e,onChange:t,placeholder:n,mono:r}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e.join(", "),placeholder:n,onChange:o=>t(o.target.value.split(",").map(i=>i.trim()).filter(Boolean))})}function rr({value:e,onChange:t,placeholder:n,rows:r=3}){let[o,i]=(0,re.useState)(!1),[a,u]=(0,re.useState)(0),s=(0,re.useRef)(null),c=(0,re.useMemo)(()=>{let m=[];return as.forEach(y=>y.items.forEach(k=>m.push({group:y.group,...k}))),m},[]),d=m=>{let y=s.current;if(!y)return;let k=y.selectionStart,S=e.slice(0,k),B=e.slice(k),p=S.endsWith("{{")?S:S+"{{",h=p+m+"}}"+B;t(h),i(!1),requestAnimationFrame(()=>{y.focus();let x=p.length+m.length+2;y.setSelectionRange(x,x)})};return(0,l.jsxs)("div",{className:"expr",style:{position:"relative"},children:[(0,l.jsx)("textarea",{ref:s,className:"fld__input mono",rows:r,spellCheck:!1,value:e,placeholder:n,onChange:m=>t(m.target.value),onKeyDown:m=>{if(!o){m.key==="{"&&m.shiftKey&&i(!0);return}m.key==="ArrowDown"?(m.preventDefault(),u(y=>(y+1)%c.length)):m.key==="ArrowUp"?(m.preventDefault(),u(y=>(y-1+c.length)%c.length)):m.key==="Enter"||m.key==="Tab"?(m.preventDefault(),d(c[a].path)):m.key==="Escape"&&i(!1)}}),(0,l.jsxs)("div",{className:"fld__hint",style:{display:"flex",alignItems:"center",gap:6,marginTop:4},children:[(0,l.jsx)(L.variable,{}),"Type ",(0,l.jsx)("code",{children:"{{"})," to insert a variable \xB7 ",(0,l.jsx)("kbd",{children:"\u2191\u2193"})," ",(0,l.jsx)("kbd",{children:"\u21B5"}),(0,l.jsx)("button",{type:"button",style:{marginLeft:"auto",background:"none",border:"none",color:"inherit",cursor:"pointer"},onClick:()=>i(!o),children:(0,l.jsx)(L.plus,{})})]}),o&&(0,l.jsx)("div",{className:"expr__popover",style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,maxHeight:260,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:as.map(m=>(0,l.jsxs)(re.Fragment,{children:[(0,l.jsx)("div",{className:"expr__pop-group",style:{padding:"4px 10px",fontSize:10,color:"var(--muted)",textTransform:"uppercase",letterSpacing:.5},children:m.group}),m.items.map(y=>{let k=c.findIndex(B=>B.path===y.path);return(0,l.jsxs)("div",{onMouseEnter:()=>u(k),onClick:()=>d(y.path),style:{padding:"4px 10px",cursor:"pointer",fontSize:11,display:"flex",justifyContent:"space-between",gap:12,fontFamily:"var(--ax-mono, ui-monospace)",background:k===a?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{children:`{{${y.path}}}`}),(0,l.jsx)("span",{style:{color:"var(--muted)",fontSize:10},children:y.type})]},y.path)})]},m.group))})]})}function Eh({value:e,onChange:t,agents:n}){let[r,o]=(0,re.useState)(!1),[i,a]=(0,re.useState)(""),u=(0,re.useRef)(null);(0,re.useEffect)(()=>{let d=g=>{u.current&&!u.current.contains(g.target)&&o(!1)};return window.addEventListener("mousedown",d),()=>window.removeEventListener("mousedown",d)},[]);let s=n.find(d=>d.id===e),c=n.filter(d=>!i||d.name.toLowerCase().includes(i.toLowerCase())||d.id.includes(i));return(0,l.jsxs)("div",{ref:u,style:{position:"relative"},children:[(0,l.jsxs)("button",{type:"button",className:"fld__input",onClick:()=>o(d=>!d),style:{display:"flex",alignItems:"center",gap:8,textAlign:"left",width:"100%",cursor:"pointer"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${s?.color??260})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:(s?.name??"??").slice(0,2).toUpperCase()}),(0,l.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:s?.name??"Select agent\u2026"}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:s?.id??"\u2014"})]}),(0,l.jsx)(L.chev,{})]}),r&&(0,l.jsxs)("div",{style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,marginTop:4,maxHeight:280,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:[(0,l.jsx)("div",{style:{padding:6,borderBottom:"1px solid var(--line)"},children:(0,l.jsx)("input",{autoFocus:!0,className:"fld__input",value:i,placeholder:"Filter agents\u2026",onChange:d=>a(d.target.value),style:{width:"100%"}})}),(0,l.jsxs)("div",{children:[c.map(d=>(0,l.jsxs)("div",{onClick:()=>{t(d.id),o(!1),a("")},style:{padding:"6px 10px",cursor:"pointer",display:"flex",gap:8,alignItems:"center",background:d.id===e?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${d.color})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:d.name.slice(0,2).toUpperCase()}),(0,l.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:d.name}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:d.id})]}),d.tags.length>0&&(0,l.jsx)("div",{style:{display:"flex",gap:3},children:d.tags.map(g=>(0,l.jsx)("span",{style:{fontSize:9,color:"var(--muted)",background:"var(--surface)",padding:"1px 5px",borderRadius:3},children:g},g))})]},d.id)),c.length===0&&(0,l.jsx)("div",{style:{padding:10,fontSize:11,color:"var(--muted)"},children:"No agents match."})]})]}),(0,l.jsx)(w,{label:"",hint:"Free text \u2014 type an agent id directly if it isn't in the list yet",children:(0,l.jsx)(I,{value:e??"",onChange:t,placeholder:"agent-id",mono:!0})})]})}var Ph=new Set(["whatsapp-message","telegram-message","gitlab-issue","gitlab-pipeline"]);function Th({node:e,patchData:t}){let n=e.config,r=n.filter??{},o=g=>t({filter:{...r,...g}}),i=String(n.source??"whatsapp-message"),a=Ph.has(i),u=i==="whatsapp-message"||i==="telegram-message"||i==="discord-message"||i==="slack-message",s=i==="gitlab-issue"||i==="gitlab-pipeline",c=i==="github-issue"||i==="github-pr",d=s||c;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Source",children:[(0,l.jsx)(w,{label:"Channel event",hint:a?"\u2713 wired end-to-end":"schema-only \u2014 no hook subscriber yet",children:(0,l.jsx)(ue,{value:i,onChange:g=>t({source:g,filter:{}}),options:[{value:"whatsapp-message",label:"WhatsApp message \u2713"},{value:"telegram-message",label:"Telegram message \u2713"},{value:"gitlab-issue",label:"GitLab issue \u2713"},{value:"gitlab-pipeline",label:"GitLab pipeline \u2713"},{value:"github-issue",label:"GitHub issue (not wired)"},{value:"github-pr",label:"GitHub PR (not wired)"},{value:"discord-message",label:"Discord message"},{value:"slack-message",label:"Slack message"}]})}),s&&(0,l.jsx)(w,{label:"Project",hint:'GitLab path (e.g. "noqta/web") or "*" for any',children:(0,l.jsx)(I,{mono:!0,value:String(r.project??""),onChange:g=>o({project:g}),placeholder:"noqta/web"})}),c&&(0,l.jsx)(w,{label:"Repo",hint:'"owner/repo" or "*" for any',children:(0,l.jsx)(I,{mono:!0,value:String(r.repo??""),onChange:g=>o({repo:g}),placeholder:"owner/repo"})}),u&&(0,l.jsx)(w,{label:"Chat",hint:i==="whatsapp-message"?'Contact number or JID (formats like "+216 24 309 128", "21624309128", "...@s.whatsapp.net" all match). "*" for any.':i==="telegram-message"?'Telegram chat id (e.g. "1816212449" for a DM, "-1003861455814" for a group). "*" for any.':'Exact chat id. "*" matches any.',children:(0,l.jsx)(I,{mono:!0,value:String(r.chat??""),onChange:g=>o({chat:g}),placeholder:"*"})}),d&&(0,l.jsx)(w,{label:"Label filter (any of)",hint:"Fires only when at least one of these labels is present on the issue/MR",children:(0,l.jsx)(bt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:g=>o({labels:g}),placeholder:"bug, needs-review"})})]}),u&&(0,l.jsx)(z,{title:"Routing",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Passthrough",hint:"When on, the default agent router ALSO replies alongside this workflow. Use for observability-only workflows (tag, log, forward) that shouldn't own the conversation.",children:(0,l.jsx)(cs,{checked:!!n.passthrough,onChange:g=>t({passthrough:g}),label:"Let the default agent also reply"})})})]})}function Mh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Schedule",children:[(0,l.jsx)(w,{label:"Cron spec",hint:"Standard 5-field cron (minute hour day month weekday)",children:(0,l.jsx)(I,{mono:!0,value:String(n.spec??"0 * * * *"),onChange:r=>t({spec:r}),placeholder:"0 9 * * *"})}),(0,l.jsx)(w,{label:"Timezone",hint:"IANA timezone string \u2014 defaults to UTC",children:(0,l.jsx)(I,{mono:!0,value:String(n.timezone??"UTC"),onChange:r=>t({timezone:r}),placeholder:"Africa/Tunis"})})]})}function Fh({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(z,{title:"Hook subscription",children:(0,l.jsx)(w,{label:"Event",hint:'Any "on:*" hook event fired elsewhere in agentx',children:(0,l.jsx)(I,{mono:!0,value:String(n.event??"on:"),onChange:r=>t({event:r}),placeholder:"on:gitlab-issue"})})})}function Rh(e){return(0,l.jsx)(z,{title:"Manual run",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5},children:["No configuration needed. Fire this workflow via:",(0,l.jsx)("pre",{style:{marginTop:8,padding:8,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,fontSize:11},children:"agentx workflow run <id>"}),"or ",(0,l.jsx)("span",{className:"mono",children:"POST /workflows/<id>/run"}),"."]})})}function Ih({node:e,patchData:t,agents:n}){let r=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Agent",children:[(0,l.jsx)(w,{label:"Which agent runs",children:(0,l.jsx)(Eh,{value:r.agentId,onChange:o=>t({agentId:o}),agents:n})}),(0,l.jsx)(w,{label:"Prompt",hint:"Supports {{nodeId.path}} variables from upstream context",children:(0,l.jsx)(rr,{value:r.prompt??"",onChange:o=>t({prompt:o}),placeholder:"Classify {{trigger.text}} \u2014 reply RESULT: status-check | new-request | other",rows:5})})]}),(0,l.jsxs)(z,{title:"Behavior",defaultOpen:!1,children:[(0,l.jsx)(w,{label:"Result parser",hint:"How to extract a routing token from the agent's reply",children:(0,l.jsx)(ue,{value:String(r.resultParser??"noqta-result-token"),onChange:o=>t({resultParser:o}),options:[{value:"noqta-result-token",label:"RESULT: token (recommended)"},{value:"json",label:"JSON block (```json \u2026```)"},{value:"raw",label:"Raw reply (no parsing)"}]})}),(0,l.jsx)(w,{label:"Timeout (minutes)",children:(0,l.jsx)(wn,{value:r.timeoutMinutes,onChange:o=>t({timeoutMinutes:o}),placeholder:"5"})})]})]})}function Oh({node:e,patchData:t}){let n=e.config,[r,o]=(0,re.useState)(n.template&&typeof n.template=="object"?"template":"path");return(0,l.jsxs)(z,{title:"Transform",children:[(0,l.jsx)(w,{label:"Mode",children:(0,l.jsx)(ue,{value:r,onChange:i=>{let a=i;o(a),t(a==="path"?{path:n.path??"",template:void 0}:{template:n.template??{},path:void 0})},options:[{value:"path",label:"Pick value from context (dotted path)"},{value:"template",label:"Build a bundle (template object)"}]})}),r==="path"&&(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.reply or trigger.contact.name",children:(0,l.jsx)(I,{mono:!0,value:String(n.path??""),onChange:i=>t({path:i}),placeholder:"classify.reply"})}),r==="template"&&(0,l.jsx)(w,{label:"Template (JSON object)",hint:"Each string value is rendered with {{nodeId.path}} variables",children:(0,l.jsx)(St,{mono:!0,rows:6,value:JSON.stringify(n.template??{},null,2),onChange:i=>{try{t({template:JSON.parse(i)})}catch{}},placeholder:`{
|
|
1253
|
+
`;var Sp=oe(Xd(),1);var O=oe(Ct(),1);var We=oe(Ct(),1);var v=oe(be(),1),D=({children:e,size:t=14,...n})=>(0,v.jsx)("svg",{viewBox:"0 0 16 16",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",...n,children:e}),z={gitlab:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M8 14L2 7l1.2-4.5L5 7h6l1.8-4.5L14 7z"})}),clock:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M8 5v3l2 1.5"})]}),hook:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 3v4a4 4 0 0 0 4 4h4"}),(0,v.jsx)("path",{d:"M10 9l2 2-2 2"})]}),play:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),box:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5"}),(0,v.jsx)("path",{d:"M2.5 6h11M6 2.5v11"})]}),branch:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"4",cy:"4",r:"1.5"}),(0,v.jsx)("circle",{cx:"12",cy:"12",r:"1.5"}),(0,v.jsx)("circle",{cx:"12",cy:"4",r:"1.5"}),(0,v.jsx)("path",{d:"M4 5.5v3a2 2 0 0 0 2 2h4.5"}),(0,v.jsx)("path",{d:"M12 5.5v5"})]}),stop:()=>(0,v.jsx)(D,{children:(0,v.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1"})}),msg:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M2.5 3.5h11v8h-6l-3 2.5v-2.5h-2z"})}),tag:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M8 2h5v5l-6 6-5-5z"}),(0,v.jsx)("circle",{cx:"10.5",cy:"5.5",r:.8,fill:"currentColor"})]}),bell:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 11V7a4 4 0 0 1 8 0v4l1 1.5H3zM6.5 13.5a1.5 1.5 0 0 0 3 0"})}),globe:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M2.5 8h11M8 2.5c2 2 2 9 0 11M8 2.5c-2 2-2 9 0 11"})]}),search:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5"})]}),undo:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 7h6a3 3 0 0 1 0 6H7"}),(0,v.jsx)("path",{d:"M6.5 4.5L4 7l2.5 2.5"})]}),redo:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M12 7H6a3 3 0 0 0 0 6h3"}),(0,v.jsx)("path",{d:"M9.5 4.5L12 7 9.5 9.5"})]}),save:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M3 3h8l2 2v8H3z"}),(0,v.jsx)("path",{d:"M5 3v4h6V3M5 13v-4h6v4"})]}),run:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),stop2:()=>(0,v.jsx)(D,{children:(0,v.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1",fill:"currentColor"})}),sun:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"2.75"}),(0,v.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),moon:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M13 9.5A5.5 5.5 0 0 1 6.5 3 5.5 5.5 0 1 0 13 9.5z"})}),plus:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M8 3v10M3 8h10"})}),trash:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 4.5h10M6 4.5V3h4v1.5M4.5 4.5l.5 8h6l.5-8"})}),chev:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 6l4 4 4-4"})}),x:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})}),more:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"4",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,v.jsx)("circle",{cx:"8",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,v.jsx)("circle",{cx:"12",cy:"8",r:"1",fill:"currentColor",stroke:"none"})]}),check:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 8.5l3 3 7-7"})}),warn:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M8 2l6 11H2z"}),(0,v.jsx)("path",{d:"M8 6.5v3M8 11.2v.3"})]}),err:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,v.jsx)("path",{d:"M8 5v3.5M8 10.5v.3"})]}),zoomin:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4M7 5v4"})]}),zoomout:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,v.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4"})]}),fit:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M3 5V3h2M13 5V3h-2M3 11v2h2M13 11v2h-2"}),(0,v.jsx)("rect",{x:"6",y:"6",width:"4",height:"4",rx:.5})]}),minus:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 8h10"})}),kbd:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"1.5",y:"4",width:"13",height:"8",rx:"1.5"}),(0,v.jsx)("path",{d:"M4 7h.5M6 7h.5M8 7h.5M10 7h.5M4 10h7"})]}),lightning:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M9 2L3 9h4l-1 5 6-7H8z",fill:"currentColor",fillOpacity:.2})}),variable:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M4 3c-2 3-2 7 0 10M12 3c2 3 2 7 0 10"}),(0,v.jsx)("path",{d:"M6 7.5h.5l1 1 1-1h.5M6 10l1.5-1.5M9 10l-1.5-1.5"})]}),users:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,v.jsx)("path",{d:"M2.5 12c.5-2 2-3 3.5-3s3 1 3.5 3"}),(0,v.jsx)("circle",{cx:"11",cy:"5",r:"1.5"}),(0,v.jsx)("path",{d:"M10 10.5c.5-1 1.2-1.5 2-1.5 1 0 2 .8 2.3 2"})]}),grid:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"2.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"9.5",y:"2.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"2.5",y:"9.5",width:"4",height:"4"}),(0,v.jsx)("rect",{x:"9.5",y:"9.5",width:"4",height:"4"})]}),eye:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M1.5 8C3 5 5.3 3.5 8 3.5S13 5 14.5 8C13 11 10.7 12.5 8 12.5S3 11 1.5 8z"}),(0,v.jsx)("circle",{cx:"8",cy:"8",r:"1.8"})]}),slide:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),(0,v.jsx)("path",{d:"M5 6h6M5 8.5h4M5 11h5"})]}),gear:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("circle",{cx:"8",cy:"8",r:"2"}),(0,v.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),flag:()=>(0,v.jsx)(D,{children:(0,v.jsx)("path",{d:"M3 13V3h7l-1 2.5L10 8H3"})}),dup:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"}),(0,v.jsx)("path",{d:"M3 9V3h6"})]}),layout:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("path",{d:"M2.5 3.5h11v9h-11z"}),(0,v.jsx)("path",{d:"M2.5 7h11M7 7v5.5"})]}),panelLeft:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,v.jsx)("path",{d:"M6 3v10"}),(0,v.jsx)("rect",{x:"2.5",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]}),panelRight:()=>(0,v.jsxs)(D,{children:[(0,v.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,v.jsx)("path",{d:"M10 3v10"}),(0,v.jsx)("rect",{x:"10",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]})};var N=oe(be(),1),ih={trigger:220,state:240,branch:260,action:220,end:160,agent:240,checkpoint:220,transform:220},ah={trigger:46,state:118,branch:110,action:78,end:46,agent:118,checkpoint:92,transform:78};function np(e){return e.startsWith("trigger.")?"trigger":e.startsWith("action.")?"action":e}function er(e){let t=np(e.type);return{w:ih[t]??220,h:ah[t]??100}}function tr(e){return e.position?.x??0}function nr(e){return e.position?.y??0}function Ii(e,t){let{w:n,h:r}=er(e),o=tr(e),i=nr(e);return t==="in"?{x:o,y:i+r/2}:t==="out"?{x:o+n,y:i+r/2}:t==="true"?{x:o+n,y:i+r*.3}:t==="false"?{x:o+n,y:i+r*.7}:{x:o+n/2,y:i+r/2}}function tp(e,t){let n=Math.max(40,Math.abs(t.x-e.x)*.45);return`M ${e.x} ${e.y} C ${e.x+n} ${e.y}, ${t.x-n} ${t.y}, ${t.x} ${t.y}`}function lh(e){let{n:t,selected:n,state:r}=e,{w:o}=er(t),i=np(t.type),a=t.config,u=i==="trigger"?a.source==="cron"?"clock":a.source==="webhook"||a.source==="hook"?"hook":a.source==="manual"?"play":"gitlab":i==="agent"?"box":i==="branch"?"branch":i==="action"?t.type==="action.send"?"msg":t.type==="action.setLabel"?"tag":t.type==="action.react"?"bell":t.type==="action.callHTTP"?"globe":t.type==="action.logTime"?"clock":t.type==="action.createIssue"?"plus":"lightning":i==="checkpoint"?"flag":i==="transform"?"variable":"stop",s=z[u]??z.box,c=["node",`t-${i}`,n&&"is-selected",r==="running"&&"is-running",r==="visited"&&"is-visited",r==="error"&&"is-error"].filter(Boolean).join(" "),d={left:tr(t),top:nr(t),width:o},g=a.agentId,m=a.prompt;return(0,N.jsxs)("div",{className:c,style:d,onMouseDown:y=>e.onMouseDown?.(y,t),onClick:y=>e.onClick?.(y,t),onDoubleClick:y=>e.onDoubleClick?.(y,t),children:[(0,N.jsx)("div",{className:"node__stripe"}),(0,N.jsxs)("div",{className:"node__head",children:[(0,N.jsx)("div",{className:"node__icon",children:(0,N.jsx)(s,{})}),(0,N.jsxs)("div",{className:"node__meta",children:[(0,N.jsx)("div",{className:"node__kind",children:t.type}),(0,N.jsx)("div",{className:"node__name",children:t.id})]}),i!=="trigger"&&i!=="end"&&(0,N.jsx)("div",{className:"node__chev",children:(0,N.jsx)(z.more,{})})]}),i==="agent"&&(0,N.jsxs)("div",{className:"node__body",children:[g?(0,N.jsxs)("div",{className:"node__row",children:[(0,N.jsx)(z.users,{}),(0,N.jsx)("span",{className:"mono",children:g})]}):(0,N.jsx)("div",{className:"node__row",style:{color:"var(--muted-2)"},children:"no agent"}),m&&(0,N.jsx)("div",{className:"node__row",style:{alignItems:"flex-start",lineHeight:1.4},children:(0,N.jsx)("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"var(--ink-2)",fontSize:11},children:m})})]}),i==="branch"&&(0,N.jsx)("div",{className:"node__body",children:(0,N.jsx)("div",{className:"node__row",children:(0,N.jsxs)("span",{className:"mono",style:{color:"var(--ink-2)"},children:[Array.isArray(a.cases)?a.cases.length:0," case",Array.isArray(a.cases)&&a.cases.length===1?"":"s"," \xB7 default: ",(0,N.jsx)("span",{className:"node__tag mono",children:String(a.default??"\u2014")})]})})}),i==="action"&&(0,N.jsxs)("div",{className:"node__body",children:[(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{className:"mono",style:{color:"var(--t-action)"},children:t.type.replace(/^action\./,"")})}),(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{style:{fontSize:11,color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:String(a.text??a.body??a.title??a.url??"")})})]}),i==="trigger"&&(0,N.jsx)("div",{className:"node__body",children:(0,N.jsx)("div",{className:"node__row",children:(0,N.jsx)("span",{className:"mono",style:{color:"var(--t-trigger)"},children:String(a.source??"")})})}),i!=="trigger"&&(0,N.jsx)("div",{className:"handle h-in",onMouseDown:y=>e.onPortDown?.(y,t,"in"),onMouseEnter:()=>e.onPortEnter?.(t,"in"),onMouseLeave:()=>e.onPortLeave?.()}),i==="branch"?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("div",{className:"handle h-true",onMouseDown:y=>e.onPortDown?.(y,t,"true"),onMouseEnter:()=>e.onPortEnter?.(t,"true"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,N.jsx)("span",{className:"handle__label",children:"true"})}),(0,N.jsx)("div",{className:"handle h-false",onMouseDown:y=>e.onPortDown?.(y,t,"false"),onMouseEnter:()=>e.onPortEnter?.(t,"false"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,N.jsx)("span",{className:"handle__label",children:"false"})})]}):i!=="end"&&(0,N.jsx)("div",{className:"handle h-out",onMouseDown:y=>e.onPortDown?.(y,t,"out"),onMouseEnter:()=>e.onPortEnter?.(t,"out"),onMouseLeave:()=>e.onPortLeave?.()})]})}function sh({nodes:e,viewBox:t,selection:n,hostRef:r}){let[o,i]=(0,We.useState)(!1);if(!e.length)return null;let a=60,u=e.map(P=>tr(P)),s=e.map(P=>nr(P)),c=e.map(P=>er(P).w),d=e.map(P=>er(P).h),g=Math.min(...u)-a,m=Math.min(...s)-a,y=Math.max(...u.map((P,K)=>P+c[K]))+a,k=Math.max(...s.map((P,K)=>P+d[K]))+a,S=y-g,B=k-m,f=r.current?.getBoundingClientRect(),p=f?.width??800,h=f?.height??500,x=-t.tx/t.zoom,C=-t.ty/t.zoom,M=p/t.zoom,F=h/t.zoom;return(0,N.jsxs)("div",{className:"cv__mini"+(o?" is-collapsed":""),children:[(0,N.jsxs)("div",{className:"cv__mini-head",children:[(0,N.jsx)("span",{children:"Map"}),(0,N.jsx)("button",{onClick:()=>i(!o),children:(0,N.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:(0,N.jsx)("path",{d:o?"M2 4l3 3 3-3":"M2 6l3-3 3 3",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"})})})]}),!o&&(0,N.jsxs)("svg",{viewBox:`${g} ${m} ${S} ${B}`,preserveAspectRatio:"xMidYMid meet",children:[(0,N.jsx)("rect",{className:"mini-view",x,y:C,width:M,height:F}),e.map(P=>{let K=er(P),W=n?.kind==="node"&&n.id===P.id;return(0,N.jsx)("rect",{className:"mini-node"+(W?" sel":""),x:tr(P),y:nr(P),width:K.w,height:K.h,rx:3},P.id)})]})]})}function rp(e){let{nodes:t,edges:n,selection:r,setSelection:o,onNodeMove:i,onAddNode:a,onConnect:u,runState:s,viewBox:c,setViewBox:d}=e,g=(0,We.useRef)(null),[m,y]=(0,We.useState)(null),[k,S]=(0,We.useState)(null),[B,f]=(0,We.useState)(!1),[p,h]=(0,We.useState)(null),[x,C]=(0,We.useState)(null),[M,F]=(0,We.useState)(null),{zoom:P,tx:K,ty:W}=c,ve=(E,j)=>{let U=g.current;if(!U)return{x:0,y:0};let J=U.getBoundingClientRect();return{x:(E-J.left-K)/P,y:(j-J.top-W)/P}},ir=E=>{let j=E.target;j!==E.currentTarget&&!j.classList.contains("cv__viewport")||E.button!==0&&E.button!==1||(o(null),C({startX:E.clientX,startY:E.clientY,tx:K,ty:W}))},_n=(E,j)=>{if(E.target.classList.contains("handle"))return;E.stopPropagation(),o({kind:"node",id:j.id});let U=ve(E.clientX,E.clientY);y({id:j.id,offX:U.x-tr(j),offY:U.y-nr(j)})},ar=(E,j,U)=>{E.stopPropagation(),E.preventDefault();let J=Ii(j,U);S({from:{id:j.id,port:U},x:J.x,y:J.y})},ao=(E,j)=>{k&&h({id:E.id,port:j})},lr=()=>h(null);(0,We.useEffect)(()=>{let E=U=>{if(m){let J=ve(U.clientX,U.clientY);i(m.id,J.x-m.offX,J.y-m.offY)}else if(k){let J=ve(U.clientX,U.clientY);S(q=>q&&{...q,x:J.x,y:J.y})}else x&&d(J=>({...J,tx:x.tx+(U.clientX-x.startX),ty:x.ty+(U.clientY-x.startY)}))},j=()=>{k&&p&&p.id!==k.from.id&&u({from:k.from.id,fromPort:k.from.port,to:p.id,toPort:"in"}),y(null),S(null),C(null),h(null)};return window.addEventListener("mousemove",E),window.addEventListener("mouseup",j),()=>{window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",j)}},[m,k,x,p,u,i,d]);let mt=E=>{if(!E.ctrlKey&&!E.metaKey&&Math.abs(E.deltaY)<30){d(Z=>({...Z,tx:Z.tx-E.deltaX,ty:Z.ty-E.deltaY}));return}E.preventDefault();let j=g.current;if(!j)return;let U=j.getBoundingClientRect(),J=E.clientX-U.left,q=E.clientY-U.top,Be=-E.deltaY*.0015;d(Z=>{let qe=Math.min(2,Math.max(.3,Z.zoom*(1+Be))),Le=qe/Z.zoom;return{zoom:qe,tx:J-(J-Z.tx)*Le,ty:q-(q-Z.ty)*Le}})},vt=()=>d(E=>({...E,zoom:Math.min(2,E.zoom*1.15)})),Li=()=>d(E=>({...E,zoom:Math.max(.3,E.zoom/1.15)})),zi=()=>{let E=g.current;if(!E||!t.length)return;let j=E.getBoundingClientRect(),U=60,J=1/0,q=1/0,Be=-1/0,Z=-1/0;t.forEach(at=>{let cr=er(at),dr=tr(at),lo=nr(at);J=Math.min(J,dr),q=Math.min(q,lo),Be=Math.max(Be,dr+cr.w),Z=Math.max(Z,lo+cr.h)});let qe=Be-J+U*2,Le=Z-q+U*2,ye=Math.min(1,Math.min(j.width/qe,j.height/Le));d({zoom:ye,tx:(j.width-qe*ye)/2-(J-U)*ye,ty:(j.height-Le*ye)/2-(q-U)*ye})},sr=E=>{E.preventDefault(),f(!0)},bn=()=>f(!1),ur=E=>{E.preventDefault(),f(!1);let j=E.dataTransfer.getData("application/x-wfe-item");if(j)try{let U=JSON.parse(j),J=ve(E.clientX,E.clientY);a(U,J.x-100,J.y-40)}catch{}},Ai=E=>{let j=E.id??"",U=["wfe-edge"];return r?.kind==="edge"&&r.id===j&&U.push("is-selected"),M===j&&U.push("is-hover"),s?.currentEdgeId===j&&U.push("is-running"),j&&s?.visitedEdges?.has(j)&&U.push("is-visited"),E.fromPort==="true"&&U.push("is-true"),E.fromPort==="false"&&U.push("is-false"),U.join(" ")},Di=E=>s?.currentNodeId===E.id?"running":s?.visitedNodes?.has(E.id)?"visited":null,ji=(0,We.useMemo)(()=>{if(!k)return null;let E=t.find(J=>J.id===k.from.id);if(!E)return null;let j=Ii(E,k.from.port),U={x:k.x,y:k.y};return(0,N.jsx)("svg",{className:"cv__ghost-edge",width:"4000",height:"2400",children:(0,N.jsx)("path",{d:tp(j,U)})})},[k,t]);return(0,N.jsxs)("div",{className:"cv"+(x?" is-panning":"")+(B?" is-drop-target":""),ref:g,onWheel:mt,onMouseDown:ir,onDragOver:sr,onDragLeave:bn,onDrop:ur,children:[(0,N.jsxs)("div",{className:"cv__viewport",style:{transform:`translate(${K}px, ${W}px) scale(${P})`},children:[(0,N.jsxs)("svg",{className:"cv__edges",width:"4000",height:"2400",children:[(0,N.jsxs)("defs",{children:[(0,N.jsx)("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"currentColor"})}),(0,N.jsx)("marker",{id:"arr-ok",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--ok)"})}),(0,N.jsx)("marker",{id:"arr-err",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--err)"})}),(0,N.jsx)("marker",{id:"arr-acc",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,N.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--accent)"})})]}),n.map((E,j)=>{let U=t.find(at=>at.id===E.from),J=t.find(at=>at.id===E.to);if(!U||!J)return null;let q=E.id??`e-${j}`,Be=Ii(U,E.fromPort??"out"),Z=Ii(J,E.toPort??"in"),qe=tp(Be,Z),Le={x:(Be.x+Z.x)/2,y:(Be.y+Z.y)/2},ye=s?.currentEdgeId===q||s?.visitedEdges?.has(q)?"url(#arr-acc)":E.fromPort==="true"?"url(#arr-ok)":E.fromPort==="false"?"url(#arr-err)":"url(#arr)";return(0,N.jsxs)("g",{children:[(0,N.jsx)("path",{className:"edge-bg",d:qe,onMouseEnter:()=>F(q),onMouseLeave:()=>F(null),onClick:()=>o({kind:"edge",id:q})}),(0,N.jsx)("path",{className:Ai(E),d:qe,markerEnd:ye}),E.label&&(0,N.jsxs)("g",{transform:`translate(${Le.x},${Le.y})`,children:[(0,N.jsx)("rect",{className:"edge-label-bg",x:-E.label.length*3.6-6,y:-9,rx:3,width:E.label.length*7.2+12,height:18}),(0,N.jsx)("text",{className:"edge-label",y:4,textAnchor:"middle",children:E.label})]})]},q)})]}),ji,t.map(E=>(0,N.jsx)(lh,{n:E,selected:r?.kind==="node"&&r.id===E.id,state:Di(E),onMouseDown:_n,onPortDown:ar,onPortEnter:ao,onPortLeave:lr,onClick:(j,U)=>{j.stopPropagation(),o({kind:"node",id:U.id})}},E.id))]}),(0,N.jsxs)("div",{className:"cv__controls",children:[(0,N.jsx)("button",{title:"Zoom out",onClick:Li,children:(0,N.jsx)(z.zoomout,{})}),(0,N.jsxs)("div",{className:"cv__zoom",children:[Math.round(P*100),"%"]}),(0,N.jsx)("button",{title:"Zoom in",onClick:vt,children:(0,N.jsx)(z.zoomin,{})}),(0,N.jsx)("button",{title:"Fit",onClick:zi,children:(0,N.jsx)(z.fit,{})})]}),(0,N.jsx)(sh,{nodes:t,viewBox:c,selection:r,hostRef:g})]})}var re=oe(Ct(),1);var is=[{section:"Triggers",items:[{id:"trigger.channel.whatsapp",type:"trigger.channel",label:"WhatsApp",hint:"On incoming WhatsApp message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.telegram",type:"trigger.channel",label:"Telegram",hint:"On incoming Telegram message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.gitlab",type:"trigger.channel",label:"GitLab",hint:"Issue / pipeline events",glyph:"g-trigger",icon:"gitlab"},{id:"trigger.cron",type:"trigger.cron",label:"Cron",hint:"Fires on a timer",glyph:"g-trigger",icon:"clock"},{id:"trigger.manual",type:"trigger.manual",label:"Manual",hint:"Kick off from UI / CLI",glyph:"g-trigger",icon:"play"},{id:"trigger.form",type:"trigger.form",label:"Form",hint:"Human fills a form to start",glyph:"g-trigger",icon:"plus"}]},{section:"Compute",items:[{id:"node.agent",type:"agent",label:"Agent",hint:"Run an agent with a templated prompt",glyph:"g-state",icon:"box"},{id:"node.transform",type:"transform",label:"Transform",hint:"Derive a bundle from upstream outputs",glyph:"g-state",icon:"variable"}]},{section:"People & composition",items:[{id:"node.userTask",type:"userTask",label:"User task",hint:"Assign a form to an actor / role; pauses the run",glyph:"g-state",icon:"box"},{id:"node.subProcess",type:"subProcess",label:"Sub-process",hint:"Call another workflow; parent resumes on child end",glyph:"g-state",icon:"box"},{id:"node.signal.emit",type:"signal.emit",label:"Emit signal",hint:"Post an event to other workflows",glyph:"g-action",icon:"msg"},{id:"node.signal.wait",type:"signal.wait",label:"Wait for signal",hint:"Pause until a matching signal arrives",glyph:"g-branch",icon:"flag"},{id:"node.timer.boundary",type:"timer.boundary",label:"Timer",hint:"Pause then fire after a duration (PT1H, P1D\u2026)",glyph:"g-branch",icon:"clock"}]},{section:"Flow control",items:[{id:"node.branch",type:"branch",label:"Branch",hint:"Route based on a condition",glyph:"g-branch",icon:"branch"},{id:"node.gateway.parallel",type:"gateway.parallel",label:"Parallel gateway",hint:"Fan out / join branches (mode: fanOut | join)",glyph:"g-branch",icon:"branch"},{id:"node.rule",type:"rule",label:"Decision table",hint:"DMN-style N-input rules; first match wins",glyph:"g-branch",icon:"branch"},{id:"node.checkpoint",type:"checkpoint",label:"Checkpoint",hint:"Persist state, pause for event",glyph:"g-branch",icon:"flag"},{id:"node.end",type:"end",label:"End",hint:"Run completes here",glyph:"g-end",icon:"stop"}]},{section:"Actions",items:[{id:"action.send",type:"action.send",label:"Send message",hint:"Post a message to any channel",glyph:"g-action",icon:"msg"},{id:"action.createIssue",type:"action.createIssue",label:"Create issue",hint:"Open a new GitLab issue",glyph:"g-action",icon:"plus"},{id:"action.setLabel",type:"action.setLabel",label:"Set Label",hint:"Add or remove labels",glyph:"g-action",icon:"tag"},{id:"action.callHTTP",type:"action.callHTTP",label:"HTTP Request",hint:"Call an external service",glyph:"g-action",icon:"globe"},{id:"action.run",type:"action.run",label:"Registered action",hint:"Invoke a shell/http action from the registry",glyph:"g-action",icon:"lightning"},{id:"action.logTime",type:"action.logTime",label:"Log Time",hint:"Record time spent in a state",glyph:"g-action",icon:"clock"}]}],as=[{group:"issue",items:[{path:"issue.title",type:"string"},{path:"issue.labels",type:"string[]"},{path:"issue.assignee",type:"string?"},{path:"issue.author",type:"string"},{path:"issue.body",type:"string"},{path:"issue.iid",type:"number"},{path:"issue.url",type:"string"}]},{group:"run",items:[{path:"run.id",type:"string"},{path:"run.state",type:"string"},{path:"run.workflow",type:"string"},{path:"run.homeNode",type:"string"}]},{group:"pipeline",items:[{path:"pipeline.status",type:"enum"},{path:"pipeline.ref",type:"string"},{path:"pipeline.id",type:"number"}]},{group:"state",items:[{path:"state.previous",type:"string?"},{path:"state.next",type:"string?"}]},{group:"env",items:[{path:"env.GITLAB_TOKEN",type:"secret (allowlist req.)"},{path:"env.GITLAB_HOST",type:"string (allowlist req.)"}]}],ls=[{id:"tpl.gitlab",title:"GitLab issue lifecycle",hint:"Triage \u2192 Review \u2192 QA \u2192 Done \xB7 5 states",dots:3},{id:"tpl.mr",title:"MR review loop",hint:"Agent-driven 3-state review",dots:2},{id:"tpl.blank",title:"Blank canvas",hint:"Start from a single trigger",dots:1}],op=[{id:"triage-agent",name:"Triage Agent",tags:["default"],color:200},{id:"dev-agent",name:"Dev Agent",tags:["default"],color:145},{id:"code-reviewer",name:"Code Reviewer",tags:["default"],color:28}];var uh=[{path:"channel",type:"string",description:"Channel name that received the event.",example:'"whatsapp"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"chatId",type:"string",description:"Stable chat id \u2014 conversation partner JID (WhatsApp) or chat integer (Telegram). Use as `action.send` chatId to reply on the same thread.",example:'"21624309128@s.whatsapp.net"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"accountId",type:"string",description:"Which bot account received the message. Telegram routes this per-account; inherit into `action.send` to reply through the same bot.",example:'"default"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"text",type:"string",description:"Message body (caption for media), lower-cased for routing but the raw text here is verbatim.",example:'"hello"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"fromJid",type:"string",description:"Raw sender JID/id straight from the platform. Use `sender.id` for the normalized form.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.id",type:"string",description:"Normalized sender id.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.name",type:"string",description:"Display name, e.g. WhatsApp pushName or Telegram first_name.",example:'"Anis"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.username",type:"string",description:"Platform-specific handle when available (Telegram @username, ...).",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.id",type:"string",description:"Group chat id when the message came from a group; undefined for DMs.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.name",type:"string",description:"Group display name when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyTo",type:"string",description:"ID of the message this one quoted, when any.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyToText",type:"string",description:"Text of the quoted message when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"media.path",type:"string",description:"Filesystem path of the attached media after download.",sourceFilter:["whatsapp-message","telegram-message"]},{path:"media.type",type:"string",description:"MIME type of the media (`image/jpeg`, `audio/ogg`, ...).",sourceFilter:["whatsapp-message","telegram-message"]},{path:"event.id",type:"string",description:"Platform message id. Use as `action.send` replyTo to thread replies.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"event.timestamp",type:"string",description:"ISO-8601 timestamp of the source message.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"issue.iid",type:"number",description:"GitLab internal issue id (per project).",example:"42",sourceFilter:["gitlab-issue"]},{path:"issue.title",type:"string",description:"Issue title.",sourceFilter:["gitlab-issue"]},{path:"issue.description",type:"string",description:"Issue description body.",sourceFilter:["gitlab-issue"]},{path:"issue.url",type:"string",description:"Web URL of the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.action",type:"string",description:"Action that triggered the event (`open`, `update`, `close`, ...).",sourceFilter:["gitlab-issue"]},{path:"issue.labels",type:"array",description:"Current labels on the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.assignees",type:"array",description:"Assignees on the issue.",sourceFilter:["gitlab-issue"]},{path:"project",type:"string",description:"GitLab project path.",example:'"noqta/web"',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"chatId",type:"string",description:'Stable entity id for GitLab: "<project>:issue:<iid>" (issue) or "<project>:merge_request:<iid>" (pipeline).',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"channel",type:"string",description:'Always `"gitlab"` for GitLab sources.',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"pipeline.id",type:"number",description:"Pipeline id.",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.status",type:"string",description:"Pipeline status (`success`, `failed`, `canceled`, ...).",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.ref",type:"string",description:"Git ref the pipeline ran on.",sourceFilter:["gitlab-pipeline"]}],ch=[{path:"reply",type:"string",description:"Full agent response text. Most common template target (e.g. echoing it back via `action.send`).",example:'"Got it \u2014 routing to..."'},{path:"result",type:"string",description:"Parsed `RESULT: <token>` marker from the agent's reply (lowercased), or `approved`/`rejected`/`done`/`failed` from a `[BRACKET]`. Used by `branch` nodes to route on agent classification.",example:'"approved"'},{path:"json",type:"any",description:"When `resultParser` is `json`, the parsed first fenced ```json ... ``` block. Useful for structured agent outputs."},{path:"taskId",type:"string",description:"Opaque workflow-scoped task id \u2014 mostly for diagnostics.",example:'"wf-<runId>-<suffix>"'},{path:"durationMs",type:"number",description:"Wall-clock duration of the agent call.",example:"14520"}],dh=[{path:"messageId",type:"string",description:"Platform message id of the sent message. `null` when the adapter couldn't capture it (e.g. mesh-forwarded sends may return null)."},{path:"viaMesh",type:"bool",description:"`true` when the send was forwarded over the mesh to a peer that hosts the channel (workflow on one node, channel adapter on another). Absent for local sends."}],ph=[{path:"issue.iid",type:"number",description:"Newly-created issue iid.",example:"123"},{path:"issue.url",type:"string",description:"Web URL of the new issue."},{path:"issue.webUrl",type:"string",description:"Alias of `issue.url`."}],fh=[{path:"labels",type:"array",description:"Label list after the change."},{path:"add",type:"array",description:"Labels that were added in this call."},{path:"remove",type:"array",description:"Labels that were removed in this call."}],gh=[{path:"labels",type:"array",description:"Current label list on the entity. Use with a `branch` node to route on label state."}],hh=[{path:"emoji",type:"string",description:"The emoji reaction that was applied (echoes the input for debugging)."}],mh=[{path:"edited",type:"bool",description:"`true` when the platform accepted the edit. Treat `false` as a soft miss \u2014 text may have been unchanged or the message was too old."}],vh=[{path:"durationMs",type:"number",description:"Duration logged, in milliseconds (echoed for downstream use)."}],yh=[{path:"ok",type:"bool",description:"Response.ok \u2014 `true` for 2xx."},{path:"status",type:"number",description:"HTTP status code.",example:"200"},{path:"body",type:"any",description:"Parsed JSON body when the response was JSON; otherwise the raw text string."}],xh=[{path:"ok",type:"bool",description:"`true` when the action exited 0 (shell) or returned 2xx (http)."},{path:"status",type:"number",description:"Exit code (shell) or HTTP status (http)."},{path:"output",type:"string",description:"stdout (shell) or response body text (http). Capped at 32KB."},{path:"errors",type:"string",description:"stderr (shell) or transport error (http). Empty when none."},{path:"durationMs",type:"number",description:"Wall time of the invocation, in milliseconds."}],wh=[{path:"port",type:"string",description:"Which outgoing port matched. Downstream edges with `fromPort` matching this value will fire."}],kh=[{path:"value",type:"any",description:"When config uses `path`, this carries the value picked from context. In `template` mode, keys from the rendered template land at the top level of this node's output (no `.value` prefix)."}],_h=[{path:"event",type:"any",description:"Payload of the event that resumed this checkpoint. Fields mirror whichever trigger source delivered the resume event."}],bh=[{path:"name",type:"string",description:"Name of the signal that resumed the wait."},{path:"payload",type:"any",description:"Payload the emitter attached to the signal."},{path:"receivedAt",type:"string",description:"ISO-8601 time the signal was observed."}],Sh=[{path:"emittedAt",type:"string",description:"ISO-8601 time the signal was published."}],Nh=[{path:"firedAt",type:"string",description:"ISO-8601 time the timer elapsed (when resumed)."},{path:"scheduledFor",type:"string",description:"ISO-8601 time the timer was originally scheduled for."}],Ch=[{path:"submission",type:"object",description:"Form values submitted by the assignee, keyed by field id. Shape depends on this userTask's form schema."},{path:"submittedBy",type:"string",description:"Actor id of the user who completed the task."},{path:"submittedAt",type:"string",description:"ISO-8601 submission timestamp."}],Eh=[{path:"childRunId",type:"string",description:"Run id of the spawned child workflow."},{path:"result",type:"any",description:"Output bundle of the child's terminal `end` node (if any)."}],ss={"trigger.channel":{summary:"Raw event payload from the source channel. Shape varies by `source` \u2014 the Context panel filters accordingly.",fields:uh},"trigger.manual":{summary:"Arbitrary payload posted by `agentx workflow run <id>` / POST /workflows/:id/run.",fields:[{path:"",type:"any",description:"Whatever JSON the caller supplied."}]},"trigger.cron":{summary:"Scheduled tick \u2014 no data bundle beyond the firing metadata.",fields:[{path:"firedAt",type:"string",description:"ISO-8601 time the tick fired."},{path:"cronSpec",type:"string",description:"The `spec` from the node's config (echoed for debug)."}]},"trigger.hook":{summary:"Fires when a custom hook event bubbles through the registry. Payload is whatever the hook subscriber chose to emit.",fields:[{path:"",type:"any",description:"Hook-specific payload."}]},"trigger.form":{summary:"Starts when a published form receives a submission.",fields:[{path:"formId",type:"string",description:"Form id that received the submission."},{path:"submission",type:"object",description:"Submitted values keyed by field id."},{path:"submittedBy",type:"string",description:"Actor id of the submitter."}]},agent:{summary:"Agent response after executing the prompt template.",fields:ch},transform:{summary:"Value picked from upstream context (path mode) or rendered template bundle (template mode).",fields:kh},branch:{summary:"Which outgoing port fired. Downstream edges match via `fromPort`.",fields:wh},"gateway.parallel":{summary:"All incoming branches joined here. No output.",fields:[]},rule:{summary:"Evaluates a declarative rule against context; may short-circuit the walk.",fields:[]},"action.send":{summary:"Dispatched an outbound message through the chosen channel.",fields:dh},"action.createIssue":{summary:"Created an issue on GitLab/GitHub.",fields:ph},"action.setLabel":{summary:"Added/removed labels on a GitLab issue or MR.",fields:fh},"action.readLabel":{summary:"Fetched the current label list \u2014 useful before a `branch`.",fields:gh},"action.react":{summary:"Emoji reaction on a message (Telegram/WhatsApp).",fields:hh},"action.editMessage":{summary:"Edited an existing message in place.",fields:mh},"action.logTime":{summary:"Logged time spent on a GitLab issue/MR.",fields:vh},"action.callHTTP":{summary:"Made an outbound HTTP request with templated params.",fields:yh},"action.run":{summary:"Invoked a registered action from the action registry. Output is the full ActionRunResult.",fields:xh},userTask:{summary:"Paused for a human to submit a form. Resumes with the submission in this node's output.",fields:Ch},subProcess:{summary:"Spawned a child workflow and waited for its completion.",fields:Eh},"signal.emit":{summary:"Published a signal to the bus. Runs elsewhere can resume on it via `signal.wait`.",fields:Sh},"signal.wait":{summary:"Paused until a matching signal arrives. Resumes with that signal in this node's output.",fields:bh},"timer.boundary":{summary:"Paused until a timer elapses. Resumes with timing metadata.",fields:Nh},checkpoint:{summary:"Paused until a matching resume event arrives on this entity.",fields:_h},end:{summary:"Terminal node \u2014 closes the run with the configured status. No output downstream.",fields:[]}};function ip(e,t={}){let n=ss[e];if(!n)return[];let r=typeof t.source=="string"?t.source:void 0;return r?n.fields.filter(o=>!o.sourceFilter||o.sourceFilter.includes(r)):n.fields.filter(o=>!o.sourceFilter)}var l=oe(be(),1);function L({title:e,children:t,defaultOpen:n=!0,right:r}){let[o,i]=(0,re.useState)(n);return(0,l.jsxs)("div",{className:"insp__section"+(o?"":" is-collapsed"),children:[(0,l.jsxs)("div",{className:"insp__section-head",onClick:()=>i(!o),children:[(0,l.jsx)("span",{className:"chev",children:(0,l.jsx)(z.chev,{})}),(0,l.jsx)("h4",{children:e}),r]}),(0,l.jsx)("div",{className:"insp__section-body",children:t})]})}function w({label:e,hint:t,err:n,children:r,mono:o}){return(0,l.jsxs)("div",{className:"fld"+(o?" is-mono":"")+(n?" is-err":""),children:[(0,l.jsxs)("div",{className:"fld__label",children:[(0,l.jsx)("span",{children:e}),t&&(0,l.jsx)("span",{className:"fld__hint",children:t})]}),r,n&&(0,l.jsxs)("div",{className:"fld__err",children:[(0,l.jsx)(z.err,{}),n]})]})}function R({value:e,onChange:t,placeholder:n,mono:r,list:o}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e,placeholder:n,list:o,onChange:i=>t(i.target.value)})}function wn({value:e,onChange:t,placeholder:n}){return(0,l.jsx)("input",{className:"fld__input",type:"number",value:e??"",placeholder:n,onChange:r=>{let o=r.target.value.trim();t(o===""?void 0:Number(o))}})}function ht({value:e,onChange:t,rows:n=3,placeholder:r,mono:o}){return(0,l.jsx)("textarea",{className:"fld__input"+(o?" mono":""),rows:n,spellCheck:!1,value:e,placeholder:r,onChange:i=>t(i.target.value)})}function ue({value:e,onChange:t,options:n}){return(0,l.jsx)("select",{className:"fld__select",value:e,onChange:r=>t(r.target.value),children:n.map(r=>{let o=typeof r=="string"?r:r.value,i=typeof r=="string"?r:r.label;return(0,l.jsx)("option",{value:o,children:i},o)})})}function cs({checked:e,onChange:t,label:n}){return(0,l.jsxs)("label",{className:"fld__check",style:{display:"flex",gap:8,alignItems:"center",fontSize:12},children:[(0,l.jsx)("input",{type:"checkbox",checked:e,onChange:r=>t(r.target.checked)}),(0,l.jsx)("span",{children:n})]})}function St({value:e,onChange:t,placeholder:n,mono:r}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e.join(", "),placeholder:n,onChange:o=>t(o.target.value.split(",").map(i=>i.trim()).filter(Boolean))})}function rr({value:e,onChange:t,placeholder:n,rows:r=3}){let[o,i]=(0,re.useState)(!1),[a,u]=(0,re.useState)(0),s=(0,re.useRef)(null),c=(0,re.useMemo)(()=>{let m=[];return as.forEach(y=>y.items.forEach(k=>m.push({group:y.group,...k}))),m},[]),d=m=>{let y=s.current;if(!y)return;let k=y.selectionStart,S=e.slice(0,k),B=e.slice(k),p=S.endsWith("{{")?S:S+"{{",h=p+m+"}}"+B;t(h),i(!1),requestAnimationFrame(()=>{y.focus();let x=p.length+m.length+2;y.setSelectionRange(x,x)})};return(0,l.jsxs)("div",{className:"expr",style:{position:"relative"},children:[(0,l.jsx)("textarea",{ref:s,className:"fld__input mono",rows:r,spellCheck:!1,value:e,placeholder:n,onChange:m=>t(m.target.value),onKeyDown:m=>{if(!o){m.key==="{"&&m.shiftKey&&i(!0);return}m.key==="ArrowDown"?(m.preventDefault(),u(y=>(y+1)%c.length)):m.key==="ArrowUp"?(m.preventDefault(),u(y=>(y-1+c.length)%c.length)):m.key==="Enter"||m.key==="Tab"?(m.preventDefault(),d(c[a].path)):m.key==="Escape"&&i(!1)}}),(0,l.jsxs)("div",{className:"fld__hint",style:{display:"flex",alignItems:"center",gap:6,marginTop:4},children:[(0,l.jsx)(z.variable,{}),"Type ",(0,l.jsx)("code",{children:"{{"})," to insert a variable \xB7 ",(0,l.jsx)("kbd",{children:"\u2191\u2193"})," ",(0,l.jsx)("kbd",{children:"\u21B5"}),(0,l.jsx)("button",{type:"button",style:{marginLeft:"auto",background:"none",border:"none",color:"inherit",cursor:"pointer"},onClick:()=>i(!o),children:(0,l.jsx)(z.plus,{})})]}),o&&(0,l.jsx)("div",{className:"expr__popover",style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,maxHeight:260,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:as.map(m=>(0,l.jsxs)(re.Fragment,{children:[(0,l.jsx)("div",{className:"expr__pop-group",style:{padding:"4px 10px",fontSize:10,color:"var(--muted)",textTransform:"uppercase",letterSpacing:.5},children:m.group}),m.items.map(y=>{let k=c.findIndex(B=>B.path===y.path);return(0,l.jsxs)("div",{onMouseEnter:()=>u(k),onClick:()=>d(y.path),style:{padding:"4px 10px",cursor:"pointer",fontSize:11,display:"flex",justifyContent:"space-between",gap:12,fontFamily:"var(--ax-mono, ui-monospace)",background:k===a?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{children:`{{${y.path}}}`}),(0,l.jsx)("span",{style:{color:"var(--muted)",fontSize:10},children:y.type})]},y.path)})]},m.group))})]})}function Ph({value:e,onChange:t,agents:n}){let[r,o]=(0,re.useState)(!1),[i,a]=(0,re.useState)(""),u=(0,re.useRef)(null);(0,re.useEffect)(()=>{let d=g=>{u.current&&!u.current.contains(g.target)&&o(!1)};return window.addEventListener("mousedown",d),()=>window.removeEventListener("mousedown",d)},[]);let s=n.find(d=>d.id===e),c=n.filter(d=>!i||d.name.toLowerCase().includes(i.toLowerCase())||d.id.includes(i));return(0,l.jsxs)("div",{ref:u,style:{position:"relative"},children:[(0,l.jsxs)("button",{type:"button",className:"fld__input",onClick:()=>o(d=>!d),style:{display:"flex",alignItems:"center",gap:8,textAlign:"left",width:"100%",cursor:"pointer"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${s?.color??260})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:(s?.name??"??").slice(0,2).toUpperCase()}),(0,l.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:s?.name??"Select agent\u2026"}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:s?.id??"\u2014"})]}),(0,l.jsx)(z.chev,{})]}),r&&(0,l.jsxs)("div",{style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,marginTop:4,maxHeight:280,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:[(0,l.jsx)("div",{style:{padding:6,borderBottom:"1px solid var(--line)"},children:(0,l.jsx)("input",{autoFocus:!0,className:"fld__input",value:i,placeholder:"Filter agents\u2026",onChange:d=>a(d.target.value),style:{width:"100%"}})}),(0,l.jsxs)("div",{children:[c.map(d=>(0,l.jsxs)("div",{onClick:()=>{t(d.id),o(!1),a("")},style:{padding:"6px 10px",cursor:"pointer",display:"flex",gap:8,alignItems:"center",background:d.id===e?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${d.color})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:d.name.slice(0,2).toUpperCase()}),(0,l.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:d.name}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:d.id})]}),d.tags.length>0&&(0,l.jsx)("div",{style:{display:"flex",gap:3},children:d.tags.map(g=>(0,l.jsx)("span",{style:{fontSize:9,color:"var(--muted)",background:"var(--surface)",padding:"1px 5px",borderRadius:3},children:g},g))})]},d.id)),c.length===0&&(0,l.jsx)("div",{style:{padding:10,fontSize:11,color:"var(--muted)"},children:"No agents match."})]})]}),(0,l.jsx)(w,{label:"",hint:"Free text \u2014 type an agent id directly if it isn't in the list yet",children:(0,l.jsx)(R,{value:e??"",onChange:t,placeholder:"agent-id",mono:!0})})]})}var Th=new Set(["whatsapp-message","telegram-message","gitlab-issue","gitlab-pipeline"]);function Mh({node:e,patchData:t}){let n=e.config,r=n.filter??{},o=g=>t({filter:{...r,...g}}),i=String(n.source??"whatsapp-message"),a=Th.has(i),u=i==="whatsapp-message"||i==="telegram-message"||i==="discord-message"||i==="slack-message",s=i==="gitlab-issue"||i==="gitlab-pipeline",c=i==="github-issue"||i==="github-pr",d=s||c;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Source",children:[(0,l.jsx)(w,{label:"Channel event",hint:a?"\u2713 wired end-to-end":"schema-only \u2014 no hook subscriber yet",children:(0,l.jsx)(ue,{value:i,onChange:g=>t({source:g,filter:{}}),options:[{value:"whatsapp-message",label:"WhatsApp message \u2713"},{value:"telegram-message",label:"Telegram message \u2713"},{value:"gitlab-issue",label:"GitLab issue \u2713"},{value:"gitlab-pipeline",label:"GitLab pipeline \u2713"},{value:"github-issue",label:"GitHub issue (not wired)"},{value:"github-pr",label:"GitHub PR (not wired)"},{value:"discord-message",label:"Discord message"},{value:"slack-message",label:"Slack message"}]})}),s&&(0,l.jsx)(w,{label:"Project",hint:'GitLab path (e.g. "noqta/web") or "*" for any',children:(0,l.jsx)(R,{mono:!0,value:String(r.project??""),onChange:g=>o({project:g}),placeholder:"noqta/web"})}),c&&(0,l.jsx)(w,{label:"Repo",hint:'"owner/repo" or "*" for any',children:(0,l.jsx)(R,{mono:!0,value:String(r.repo??""),onChange:g=>o({repo:g}),placeholder:"owner/repo"})}),u&&(0,l.jsx)(w,{label:"Chat",hint:i==="whatsapp-message"?'Contact number or JID (formats like "+216 24 309 128", "21624309128", "...@s.whatsapp.net" all match). "*" for any.':i==="telegram-message"?'Telegram chat id (e.g. "1816212449" for a DM, "-1003861455814" for a group). "*" for any.':'Exact chat id. "*" matches any.',children:(0,l.jsx)(R,{mono:!0,value:String(r.chat??""),onChange:g=>o({chat:g}),placeholder:"*"})}),d&&(0,l.jsx)(w,{label:"Label filter (any of)",hint:"Fires only when at least one of these labels is present on the issue/MR",children:(0,l.jsx)(St,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:g=>o({labels:g}),placeholder:"bug, needs-review"})})]}),u&&(0,l.jsx)(L,{title:"Routing",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Passthrough",hint:"When on, the default agent router ALSO replies alongside this workflow. Use for observability-only workflows (tag, log, forward) that shouldn't own the conversation.",children:(0,l.jsx)(cs,{checked:!!n.passthrough,onChange:g=>t({passthrough:g}),label:"Let the default agent also reply"})})})]})}function Fh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Schedule",children:[(0,l.jsx)(w,{label:"Cron spec",hint:"Standard 5-field cron (minute hour day month weekday)",children:(0,l.jsx)(R,{mono:!0,value:String(n.spec??"0 * * * *"),onChange:r=>t({spec:r}),placeholder:"0 9 * * *"})}),(0,l.jsx)(w,{label:"Timezone",hint:"IANA timezone string \u2014 defaults to UTC",children:(0,l.jsx)(R,{mono:!0,value:String(n.timezone??"UTC"),onChange:r=>t({timezone:r}),placeholder:"Africa/Tunis"})})]})}function Ih({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(L,{title:"Hook subscription",children:(0,l.jsx)(w,{label:"Event",hint:'Any "on:*" hook event fired elsewhere in agentx',children:(0,l.jsx)(R,{mono:!0,value:String(n.event??"on:"),onChange:r=>t({event:r}),placeholder:"on:gitlab-issue"})})})}function Rh(e){return(0,l.jsx)(L,{title:"Manual run",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5},children:["No configuration needed. Fire this workflow via:",(0,l.jsx)("pre",{style:{marginTop:8,padding:8,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,fontSize:11},children:"agentx workflow run <id>"}),"or ",(0,l.jsx)("span",{className:"mono",children:"POST /workflows/<id>/run"}),"."]})})}function Oh({node:e,patchData:t,agents:n}){let r=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Agent",children:[(0,l.jsx)(w,{label:"Which agent runs",children:(0,l.jsx)(Ph,{value:r.agentId,onChange:o=>t({agentId:o}),agents:n})}),(0,l.jsx)(w,{label:"Prompt",hint:"Supports {{nodeId.path}} variables from upstream context",children:(0,l.jsx)(rr,{value:r.prompt??"",onChange:o=>t({prompt:o}),placeholder:"Classify {{trigger.text}} \u2014 reply RESULT: status-check | new-request | other",rows:5})})]}),(0,l.jsxs)(L,{title:"Behavior",defaultOpen:!1,children:[(0,l.jsx)(w,{label:"Result parser",hint:"How to extract a routing token from the agent's reply",children:(0,l.jsx)(ue,{value:String(r.resultParser??"noqta-result-token"),onChange:o=>t({resultParser:o}),options:[{value:"noqta-result-token",label:"RESULT: token (recommended)"},{value:"json",label:"JSON block (```json \u2026```)"},{value:"raw",label:"Raw reply (no parsing)"}]})}),(0,l.jsx)(w,{label:"Timeout (minutes)",children:(0,l.jsx)(wn,{value:r.timeoutMinutes,onChange:o=>t({timeoutMinutes:o}),placeholder:"5"})})]})]})}function Lh({node:e,patchData:t}){let n=e.config,[r,o]=(0,re.useState)(n.template&&typeof n.template=="object"?"template":"path");return(0,l.jsxs)(L,{title:"Transform",children:[(0,l.jsx)(w,{label:"Mode",children:(0,l.jsx)(ue,{value:r,onChange:i=>{let a=i;o(a),t(a==="path"?{path:n.path??"",template:void 0}:{template:n.template??{},path:void 0})},options:[{value:"path",label:"Pick value from context (dotted path)"},{value:"template",label:"Build a bundle (template object)"}]})}),r==="path"&&(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.reply or trigger.contact.name",children:(0,l.jsx)(R,{mono:!0,value:String(n.path??""),onChange:i=>t({path:i}),placeholder:"classify.reply"})}),r==="template"&&(0,l.jsx)(w,{label:"Template (JSON object)",hint:"Each string value is rendered with {{nodeId.path}} variables",children:(0,l.jsx)(ht,{mono:!0,rows:6,value:JSON.stringify(n.template??{},null,2),onChange:i=>{try{t({template:JSON.parse(i)})}catch{}},placeholder:`{
|
|
1254
1254
|
"greeting": "hi {{trigger.sender.name}}"
|
|
1255
|
-
}`})})]})}function Lh({node:e,patchData:t}){let n=e.config,r=n.cases??[],o=s=>t({cases:s}),i=(s,c)=>o(r.map((d,g)=>g===s?c:d)),a=(s,c)=>i(s,{...r[s],when:{...r[s].when,...c}}),u=(s,c)=>i(s,{...r[s],when:{...r[s].when,params:{...r[s].when.params,...c}}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Cases",right:(0,l.jsx)("span",{className:"card__kind",children:r.length}),children:[r.map((s,c)=>{let d=s.when.params??{};return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:4,padding:10,marginBottom:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,l.jsxs)("strong",{style:{fontSize:11},children:["Case #",c+1]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:()=>o(r.filter((g,m)=>m!==c)),children:(0,l.jsx)(L.trash,{})})]}),(0,l.jsx)(w,{label:"If",children:(0,l.jsx)(ue,{value:s.when.kind,onChange:g=>a(c,{kind:g,params:{}}),options:[{value:"equals",label:"Path equals value"},{value:"contains",label:"Path contains value"},{value:"matches",label:"Path matches regex"},{value:"exists",label:"Path exists (non-empty)"}]})}),(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.result",children:(0,l.jsx)(I,{mono:!0,value:String(d.path??""),onChange:g=>u(c,{path:g}),placeholder:"classify.result"})}),(s.when.kind==="equals"||s.when.kind==="contains")&&(0,l.jsx)(w,{label:"Value",children:(0,l.jsx)(I,{mono:!0,value:String(d.value??""),onChange:g=>u(c,{value:g})})}),s.when.kind==="matches"&&(0,l.jsx)(w,{label:"Regex",children:(0,l.jsx)(I,{mono:!0,value:String(d.regex??""),onChange:g=>u(c,{regex:g}),placeholder:"^(approved|done)$"})}),(0,l.jsx)(w,{label:"Port",hint:"Outgoing edge's `fromPort` must match this",children:(0,l.jsx)(I,{mono:!0,value:s.to,onChange:g=>i(c,{...s,to:g}),placeholder:"approved"})})]},c)}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",style:{width:"100%",padding:8,justifyContent:"center"},onClick:()=>o([...r,{when:{kind:"equals",params:{path:"",value:""}},to:`case${r.length+1}`}]),children:[(0,l.jsx)(L.plus,{})," Add case"]})]}),(0,l.jsx)(z,{title:"Fallback",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Default port",hint:"Used when no case matches. Leave blank to drop the event.",children:(0,l.jsx)(I,{mono:!0,value:String(n.default??"fallback"),onChange:s=>t({default:s})})})})]})}function zh({node:e,patchData:t}){let n=e.config,r=n.waitFor??{},o=a=>t({waitFor:{...r,...a}}),i=n.resumeMatch??{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z,{title:"Checkpoint",children:(0,l.jsx)(w,{label:"Name",hint:"Human label shown in logs + run timelines",children:(0,l.jsx)(I,{value:String(n.name??e.id),onChange:a=>t({name:a}),placeholder:"await-label-change"})})}),(0,l.jsxs)(z,{title:"Wait for",children:[(0,l.jsx)(w,{label:"Source",hint:"Which kind of event unpauses this run",children:(0,l.jsx)(ue,{value:String(r.source??""),onChange:a=>o({source:a||void 0}),options:[{value:"",label:"Any (same entity)"},{value:"gitlab-issue",label:"GitLab issue update"},{value:"gitlab-pipeline",label:"GitLab pipeline event"},{value:"whatsapp-message",label:"WhatsApp reply"},{value:"telegram-message",label:"Telegram reply"},{value:"manual",label:"Manual poke"}]})}),(0,l.jsx)(w,{label:"Labels (any of)",hint:"e.g. a label change to one of these resumes the run",children:(0,l.jsx)(bt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:a=>o({labels:a.length?a:void 0})})})]}),(0,l.jsx)(z,{title:"Advanced match",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Event id contains",hint:"Optional substring match on the incoming event's id",children:(0,l.jsx)(I,{mono:!0,value:String(i.eventIdLike??""),onChange:a=>t({resumeMatch:{...i,eventIdLike:a||void 0}})})})})]})}function Ah({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Terminal",children:[(0,l.jsx)(w,{label:"Status",children:(0,l.jsx)(ue,{value:String(n.status??"completed"),onChange:r=>t({status:r}),options:[{value:"completed",label:"Completed (success)"},{value:"failed",label:"Failed"},{value:"canceled",label:"Canceled"}]})}),(0,l.jsx)(w,{label:"Summary (optional)",hint:"Surfaced in run history + notifications",children:(0,l.jsx)(St,{value:String(n.summary??""),onChange:r=>t({summary:r}),rows:2})})]})}var Dh=["gitlab","github","whatsapp","telegram","discord","slack"],us=new Map,ap=6e4;function jh(e){let[t,n]=(0,re.useState)(()=>{let r=us.get(e);return r&&Date.now()-r.at<ap?{chats:r.chats,source:r.source,loading:!1}:{chats:[],source:"",loading:!0}});return(0,re.useEffect)(()=>{let r=!1,o=us.get(e);if(o&&Date.now()-o.at<ap){n({chats:o.chats,source:o.source,loading:!1});return}return n(i=>({...i,loading:!0})),fetch(`/channels/${encodeURIComponent(e)}/chats`).then(i=>i.ok?i.json():{chats:[],source:""}).then(i=>{if(r)return;let a=Array.isArray(i.chats)?i.chats:[],u=typeof i.source=="string"?i.source:"";us.set(e,{at:Date.now(),chats:a,source:u}),n({chats:a,source:u,loading:!1})}).catch(()=>{r||n({chats:[],source:"",loading:!1})}),()=>{r=!0}},[e]),t}function Uh({node:e,patchData:t,nodes:n}){let r=e.config,o=n.find(c=>c.type.startsWith("trigger."))?.id??"trigger",i=c=>`{{${o}.${c}}}`,a=String(r.channel??"whatsapp"),u=jh(a),s=`chats-${a}`;return(0,l.jsxs)(z,{title:"Send message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:a,onChange:c=>t({channel:c}),options:Dh})}),(0,l.jsxs)(w,{label:"Chat id",hint:u.chats.length>0?`Use ${i("chatId")} to reply to the trigger's chat, or pick one of the ${u.chats.length} known chat(s) ${u.source==="local"?"on this node":`from ${u.source}`} (click the field to see the list).`:u.loading?`Loading known chats for "${a}"\u2026`:`Use ${i("chatId")} to reply to the trigger's chat. For a different destination, paste the channel-specific id (no discovered chats for "${a}" yet).`,children:[(0,l.jsx)(I,{mono:!0,value:String(r.chatId??""),onChange:c=>t({chatId:c}),placeholder:i("chatId"),list:u.chats.length>0?s:void 0}),u.chats.length>0&&(0,l.jsx)("datalist",{id:s,children:u.chats.map(c=>(0,l.jsx)("option",{value:c.id,children:c.name?`${c.name} \u2014 ${c.id}${c.kind==="group"?" (group)":""}`:`${c.id}${c.kind==="group"?" (group)":""}`},c.id))})]}),(0,l.jsx)(w,{label:"Text",hint:"Supports {{nodeId.path}} templates from any upstream node",children:(0,l.jsx)(rr,{value:String(r.text??""),onChange:c=>t({text:c}),rows:4,placeholder:`Thanks ${i("sender.name")} \u2014 working on it.`})}),(0,l.jsx)(w,{label:"Account id",hint:"Telegram only: which bot account sends. Leave empty to inherit from the trigger's account (recommended).",children:(0,l.jsx)(I,{mono:!0,value:String(r.accountId??""),onChange:c=>t({accountId:c}),placeholder:`(inherit from ${i("accountId")})`})}),(0,l.jsx)(w,{label:"Reply to message id",hint:"Optional. When set, the platform threads this reply under the referenced message.",children:(0,l.jsx)(I,{mono:!0,value:String(r.replyTo??""),onChange:c=>t({replyTo:c}),placeholder:i("event.id")})}),(0,l.jsx)(w,{label:"Parse mode",hint:r.channel==="telegram"?'Telegram default is "markdown" (Telegram-flavoured HTML conversion). Use "plain" to send raw text without escaping.':"Platform-specific. WhatsApp ignores; Telegram supports markdown/html.",children:(0,l.jsx)(ue,{value:String(r.parseMode??"markdown"),onChange:c=>t({parseMode:c}),options:["markdown","plain","html"]})})]})}function Wh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Project",hint:'GitLab "group/project" or GitHub "owner/repo"',children:(0,l.jsx)(I,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"noqta/web"})})]}),(0,l.jsxs)(z,{title:"Issue",children:[(0,l.jsx)(w,{label:"Title",children:(0,l.jsx)(rr,{rows:1,value:String(n.title??""),onChange:r=>t({title:r}),placeholder:"From WhatsApp: {{trigger.sender.name}}"})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(rr,{rows:6,value:String(n.description??""),onChange:r=>t({description:r}),placeholder:"Reported by {{trigger.sender.name}}\\n\\n{{trigger.text}}"})}),(0,l.jsx)(w,{label:"Labels",children:(0,l.jsx)(bt,{mono:!0,value:Array.isArray(n.labels)?n.labels:[],onChange:r=>t({labels:r}),placeholder:"Triage, source::whatsapp"})}),(0,l.jsx)(w,{label:"Assignees",hint:"GitLab usernames (resolved to ids at runtime)",children:(0,l.jsx)(bt,{mono:!0,value:Array.isArray(n.assignees)?n.assignees:[],onChange:r=>t({assignees:r}),placeholder:"alice, bob"})})]})]})}function Bh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(I,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"{{trigger.project}}"})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(I,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r}),placeholder:"{{trigger.issue.iid}}"})})]}),(0,l.jsxs)(z,{title:"Labels",children:[(0,l.jsx)(w,{label:"Add",hint:"Comma-separated list",children:(0,l.jsx)(bt,{value:Array.isArray(n.add)?n.add:[],onChange:r=>t({add:r}),placeholder:"In review"})}),(0,l.jsx)(w,{label:"Remove",children:(0,l.jsx)(bt,{value:Array.isArray(n.remove)?n.remove:[],onChange:r=>t({remove:r}),placeholder:"Triage"})})]})]})}function Hh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Read labels",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(I,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r})})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(I,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8},children:["Output bundle: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.labels }}"})," = string[]"]})]})}function Gh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"React",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(I,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(I,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r}),placeholder:"{{trigger.event.id}}"})}),(0,l.jsx)(w,{label:"Emoji",children:(0,l.jsx)(I,{value:String(n.emoji??"\u{1F440}"),onChange:r=>t({emoji:r})})})]})}function $h({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Edit message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp","gitlab","github","discord","slack"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(I,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r})})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(I,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r})})}),(0,l.jsx)(w,{label:"New text",children:(0,l.jsx)(rr,{value:String(n.text??""),onChange:r=>t({text:r}),rows:3})}),(0,l.jsx)(w,{label:"Parse mode",children:(0,l.jsx)(ue,{value:String(n.parseMode??"plain"),onChange:r=>t({parseMode:r}),options:["plain","markdown","html"]})})]})}function Vh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Log time",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab"]})}),(0,l.jsx)(w,{label:"Chat id",hint:'"project:issue:42" or "project:merge_request:7"',children:(0,l.jsx)(I,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Duration (ms)",children:(0,l.jsx)(wn,{value:n.durationMs,onChange:r=>t({durationMs:r}),placeholder:"900000"})})]})}function Kh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Request",children:[(0,l.jsx)(w,{label:"URL",children:(0,l.jsx)(I,{mono:!0,value:String(n.url??""),onChange:r=>t({url:r}),placeholder:"https://example.com/webhook"})}),(0,l.jsx)(w,{label:"Method",children:(0,l.jsx)(ue,{value:String(n.method??"POST"),onChange:r=>t({method:r}),options:["GET","POST","PUT","PATCH","DELETE"]})})]}),(0,l.jsx)(z,{title:"Body",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Body",hint:"String \u2014 rendered with {{nodeId.path}}. Server parses as JSON when possible.",children:(0,l.jsx)(rr,{rows:5,value:typeof n.body=="string"?n.body:n.body?JSON.stringify(n.body,null,2):"",onChange:r=>t({body:r})})})}),(0,l.jsx)(z,{title:"Headers",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Headers (JSON object)",children:(0,l.jsx)(St,{mono:!0,rows:3,value:JSON.stringify(n.headers??{},null,2),onChange:r=>{try{t({headers:JSON.parse(r)})}catch{}},placeholder:'{"Authorization": "Bearer {{env.TOKEN}}"}'})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8,padding:"0 10px"},children:["Output: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.ok / .status / .body }}"})]})]})}var Qh=["text","long-text","number","boolean","date","select","multi-select","file"];function lp({form:e,patch:t}){let n=e.fields??[],r=(s,c)=>{let d=[...n];d[s]={...d[s],...c},t({...e,fields:d})},o=(s,c)=>{let d=[...n];d[s]={...d[s],validate:{...d[s].validate??{},...c}},t({...e,fields:d})},i=s=>t({...e,fields:n.filter((c,d)=>d!==s)}),a=(s,c)=>{let d=s+c;if(d<0||d>=n.length)return;let g=[...n];[g[s],g[d]]=[g[d],g[s]],t({...e,fields:g})},u=()=>t({...e,fields:[...n,{key:`field_${n.length+1}`,label:"New field",type:"text"}]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Form",children:[(0,l.jsx)(w,{label:"Title",hint:"Header shown to the assignee above the form",children:(0,l.jsx)(I,{value:e.title??"",onChange:s=>t({...e,title:s}),placeholder:"Review application"})}),(0,l.jsx)(w,{label:"Description",hint:"Optional one-line context shown under the title",children:(0,l.jsx)(I,{value:e.description??"",onChange:s=>t({...e,description:s}),placeholder:""})}),(0,l.jsx)(w,{label:"Primary button",hint:"Label on the submit button; default: Submit",children:(0,l.jsx)(I,{value:e.submitLabel??"Submit",onChange:s=>t({...e,submitLabel:s})})}),(0,l.jsx)(w,{label:"Secondary action",hint:"Optional reject/hold button. Submissions carry action='secondary'.",children:(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[(0,l.jsx)(I,{value:e.secondaryAction?.key??"",onChange:s=>t({...e,secondaryAction:s?{key:s,label:e.secondaryAction?.label??s}:void 0}),placeholder:"key (e.g. reject)",mono:!0}),(0,l.jsx)(I,{value:e.secondaryAction?.label??"",onChange:s=>t({...e,secondaryAction:{key:e.secondaryAction?.key??"secondary",label:s}}),placeholder:"label (e.g. Reject)"})]})})]}),(0,l.jsxs)(z,{title:`Fields (${n.length})`,children:[n.length===0&&(0,l.jsx)("div",{className:"hint",style:{fontSize:12,color:"var(--ax-muted)"},children:"No fields \u2014 approve/reject form with no input."}),n.map((s,c)=>(0,l.jsxs)("div",{className:"fld__field-row",style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Key",hint:"Stored under values.<key>",children:(0,l.jsx)(I,{mono:!0,value:s.key,onChange:d=>r(c,{key:d})})}),(0,l.jsx)(w,{label:"Label",children:(0,l.jsx)(I,{value:s.label,onChange:d=>r(c,{label:d})})}),(0,l.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,-1),title:"Move up",children:"\u2191"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,1),title:"Move down",children:"\u2193"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>i(c),title:"Remove",children:"\u2715"})]})]}),(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6,marginTop:6},children:[(0,l.jsx)(w,{label:"Type",children:(0,l.jsx)(ue,{value:s.type,onChange:d=>r(c,{type:d}),options:Qh.slice()})}),(0,l.jsx)(w,{label:"",children:(0,l.jsx)(cs,{checked:!!s.required,onChange:d=>r(c,{required:d}),label:"Required"})})]}),(s.type==="select"||s.type==="multi-select")&&(0,l.jsx)(w,{label:"Options",hint:"Comma-separated list of allowed values",children:(0,l.jsx)(bt,{value:s.options??[],onChange:d=>r(c,{options:d}),placeholder:"low, medium, high"})}),(0,l.jsx)(w,{label:"Hint",hint:"Helper text shown under the input",children:(0,l.jsx)(I,{value:s.hint??"",onChange:d=>r(c,{hint:d})})}),(s.type==="text"||s.type==="long-text"||s.type==="number")&&(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:s.type==="number"?"1fr 1fr":"1fr 1fr 1fr",gap:6},children:[(0,l.jsx)(w,{label:"Min",children:(0,l.jsx)(wn,{value:s.validate?.min,onChange:d=>o(c,{min:d})})}),(0,l.jsx)(w,{label:"Max",children:(0,l.jsx)(wn,{value:s.validate?.max,onChange:d=>o(c,{max:d})})}),s.type!=="number"&&(0,l.jsx)(w,{label:"Pattern",hint:"Regex \u2014 optional",children:(0,l.jsx)(I,{mono:!0,value:s.validate?.pattern??"",onChange:d=>o(c,{pattern:d})})})]})]},c)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,style:{marginTop:4},children:"+ Add field"})]})]})}function Jh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(z,{title:"Assignment",children:[(0,l.jsx)(w,{label:"Assignee",hint:"actor:<id> or role:<id> \u2014 managed via `agentx actor` / `agentx role`",children:(0,l.jsx)(I,{mono:!0,value:String(n.assignTo??""),onChange:o=>t({assignTo:o}),placeholder:"role:reviewers"})}),(0,l.jsx)(w,{label:"Title",hint:"Shown in the inbox + notification",children:(0,l.jsx)(I,{value:String(n.title??""),onChange:o=>t({title:o})})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(St,{value:String(n.description??""),onChange:o=>t({description:o}),rows:2})}),(0,l.jsx)(w,{label:"Due in",hint:"ISO-8601 duration (PT2H, P1D) or number of minutes",children:(0,l.jsx)(I,{mono:!0,value:String(n.dueIn??""),onChange:o=>t({dueIn:o}),placeholder:"P2D"})})]}),(0,l.jsx)(lp,{form:r,patch:o=>t({form:o})})]})}function Yh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z,{title:"Start conditions",children:(0,l.jsx)(w,{label:"Startable by",hint:"actor:<id> or role:<id> \u2014 who is allowed to initiate a new run",children:(0,l.jsx)(I,{mono:!0,value:String(n.startableBy??""),onChange:o=>t({startableBy:o}),placeholder:"role:public"})})}),(0,l.jsx)(lp,{form:r,patch:o=>t({form:o})})]})}function Xh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Sub-process",children:[(0,l.jsx)(w,{label:"Workflow id",hint:"id of another workflow definition \u2014 it runs to completion, then parent resumes",children:(0,l.jsx)(I,{mono:!0,value:String(n.workflowId??""),onChange:r=>t({workflowId:r}),placeholder:"child-workflow-id"})}),(0,l.jsx)(w,{label:"Input map (JSON)",hint:'Object mapping child-context keys to templated values; "*" for full inheritance',children:(0,l.jsx)(St,{mono:!0,rows:4,value:JSON.stringify(n.inputMap??{},null,2),onChange:r=>{try{t({inputMap:JSON.parse(r)})}catch{}}})})]})}function qh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Emit signal",children:[(0,l.jsx)(w,{label:"Name",hint:"Signal identifier; other workflows' signal.wait nodes subscribe by this",children:(0,l.jsx)(I,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",hint:"workflow = only same-workflow waiters; global = every waiter",children:(0,l.jsx)(ue,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Payload (JSON)",hint:"Templated object delivered with the signal",children:(0,l.jsx)(St,{mono:!0,rows:4,value:JSON.stringify(n.payload??{},null,2),onChange:r=>{try{t({payload:JSON.parse(r)})}catch{}}})})]})}function Zh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(z,{title:"Wait for signal",children:[(0,l.jsx)(w,{label:"Name",children:(0,l.jsx)(I,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",children:(0,l.jsx)(ue,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Match filter (JSON)",hint:"Only resume when the emitted payload matches every key here",children:(0,l.jsx)(St,{mono:!0,rows:3,value:JSON.stringify(n.match??{},null,2),onChange:r=>{try{t({match:JSON.parse(r)})}catch{}}})})]})}function em({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(z,{title:"Timer",children:(0,l.jsx)(w,{label:"After",hint:"ISO-8601 duration (PT30M, PT2H, P1D) or minutes as a number",children:(0,l.jsx)(I,{mono:!0,value:String(n.after??""),onChange:r=>t({after:r}),placeholder:"PT1H"})})})}function tm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(z,{title:"Parallel gateway",children:(0,l.jsx)(w,{label:"Mode",hint:"fanOut = send to all outgoing edges; join = wait for every incoming edge",children:(0,l.jsx)(ue,{value:String(n.mode??"fanOut"),onChange:r=>t({mode:r}),options:["fanOut","join"]})})})}function nm({node:e,patchData:t}){let n=e.config,r=Array.isArray(n.inputs)?n.inputs.map(String):[],o=Array.isArray(n.rules)?n.rules:[],i=c=>t({inputs:c,rules:o.map(d=>({...d,when:(Array.isArray(d.when)?d.when.slice(0,c.length):[]).concat(Array(Math.max(0,c.length-(d.when?.length??0))).fill("*"))}))}),a=(c,d)=>{let g=[...o];g[c]={...g[c],...d},t({rules:g})},u=()=>t({rules:[...o,{when:r.map(()=>"*"),to:"port",output:{}}]}),s=c=>t({rules:o.filter((d,g)=>g!==c)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z,{title:"Inputs",children:(0,l.jsx)(w,{label:"Input expressions",hint:"Comma-separated; each is a template evaluated per-run against the run context",children:(0,l.jsx)(bt,{mono:!0,value:r,onChange:i,placeholder:"{{classify.result}}, {{trigger.values.amount}}"})})}),(0,l.jsxs)(z,{title:`Rules (${o.length})`,children:[o.map((c,d)=>(0,l.jsxs)("div",{style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Port (to)",hint:"Outgoing edge port taken when this row matches",children:(0,l.jsx)(I,{mono:!0,value:String(c.to??""),onChange:g=>a(d,{to:g})})}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>s(d),children:"\u2715"})]}),(0,l.jsx)(w,{label:"When (per-input cells)",hint:'One per input. "*" wildcard, "x" equals, ">10" numeric, "!=x", "/regex/"',children:(0,l.jsx)(bt,{mono:!0,value:(Array.isArray(c.when)?c.when:[]).map(String),onChange:g=>a(d,{when:g}),placeholder:"gold, >100"})}),(0,l.jsx)(w,{label:"Output (JSON)",children:(0,l.jsx)(St,{mono:!0,rows:2,value:JSON.stringify(c.output??{},null,2),onChange:g=>{try{a(d,{output:JSON.parse(g)})}catch{}}})})]},d)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,children:"+ Add rule"})]}),(0,l.jsx)(z,{title:"Default",children:(0,l.jsx)(w,{label:"Port (to)",children:(0,l.jsx)(I,{mono:!0,value:String(n.default?.to??"fallback"),onChange:c=>t({default:{...n.default??{},to:c}})})})})]})}var rm={"trigger.channel":e=>(0,l.jsx)(Th,{...e}),"trigger.cron":e=>(0,l.jsx)(Mh,{...e}),"trigger.hook":e=>(0,l.jsx)(Fh,{...e}),"trigger.manual":e=>(0,l.jsx)(Rh,{...e}),"trigger.form":e=>(0,l.jsx)(Yh,{...e}),agent:e=>(0,l.jsx)(Ih,{...e}),transform:e=>(0,l.jsx)(Oh,{...e}),branch:e=>(0,l.jsx)(Lh,{...e}),"gateway.parallel":e=>(0,l.jsx)(tm,{...e}),rule:e=>(0,l.jsx)(nm,{...e}),checkpoint:e=>(0,l.jsx)(zh,{...e}),userTask:e=>(0,l.jsx)(Jh,{...e}),subProcess:e=>(0,l.jsx)(Xh,{...e}),"signal.emit":e=>(0,l.jsx)(qh,{...e}),"signal.wait":e=>(0,l.jsx)(Zh,{...e}),"timer.boundary":e=>(0,l.jsx)(em,{...e}),end:e=>(0,l.jsx)(Ah,{...e}),"action.send":e=>(0,l.jsx)(Uh,{...e}),"action.createIssue":e=>(0,l.jsx)(Wh,{...e}),"action.setLabel":e=>(0,l.jsx)(Bh,{...e}),"action.readLabel":e=>(0,l.jsx)(Hh,{...e}),"action.react":e=>(0,l.jsx)(Gh,{...e}),"action.editMessage":e=>(0,l.jsx)($h,{...e}),"action.logTime":e=>(0,l.jsx)(Vh,{...e}),"action.callHTTP":e=>(0,l.jsx)(Kh,{...e})};function sp(e){let{selection:t,nodes:n,edges:r,patch:o,patchData:i,onDelete:a,onDuplicate:u,validation:s,runState:c,agents:d,meta:g,patchMeta:m,onDeleteWorkflow:y,isNew:k}=e;if(!t)return(0,l.jsx)(cm,{meta:g,patchMeta:m,onDeleteWorkflow:y,isNew:k});if(t.kind==="edge"){let B=r.find(f=>f.id===t.id);return B?(0,l.jsx)(dm,{edge:{...B,id:B.id??""},patch:o,onDelete:()=>a(t)}):null}let S=n.find(B=>B.id===t.id);return S?(0,l.jsx)(om,{node:S,nodes:n,edges:r,patch:o,patchData:i,onDelete:()=>a(t),onDuplicate:()=>u(t),validation:s,runOutput:c?.outputs?.[S.id],agents:d}):null}function om({node:e,nodes:t,edges:n,patch:r,patchData:o,onDelete:i,onDuplicate:a,validation:u,runOutput:s,agents:c}){let[d,g]=(0,re.useState)("config"),m=rm[e.type];return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsxs)("div",{className:"insp__head",children:[(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:e.type}),(0,l.jsx)("input",{className:"insp__name",value:e.id,onChange:y=>r({id:y.target.value})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Duplicate",onClick:a,children:(0,l.jsx)(L.dup,{})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Delete",onClick:i,children:(0,l.jsx)(L.trash,{})})]}),(0,l.jsxs)("div",{className:"insp__tabs",children:[(0,l.jsxs)("button",{className:"insp__tab"+(d==="config"?" is-active":""),onClick:()=>g("config"),children:[(0,l.jsx)(L.gear,{})," Config"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="advanced"?" is-active":""),onClick:()=>g("advanced"),children:[(0,l.jsx)(L.layout,{})," Advanced"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="preview"?" is-active":""),onClick:()=>g("preview"),children:[(0,l.jsx)(L.eye,{})," Preview ",s&&(0,l.jsx)("span",{className:"count",children:"\u25CF"})]})]})]}),(0,l.jsxs)("div",{className:"insp__body",children:[d==="config"&&(0,l.jsxs)(l.Fragment,{children:[m?m({node:e,nodes:t,patch:r,patchData:o,agents:c}):(0,l.jsx)(z,{title:"Config",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",marginBottom:8},children:["No typed form yet for ",(0,l.jsx)("span",{className:"mono",children:e.type}),". Use the Advanced tab to edit raw JSON."]})}),(0,l.jsx)(am,{node:e,nodes:t,edges:n})]}),d==="advanced"&&(0,l.jsx)(um,{node:e,patchData:o}),d==="preview"&&(0,l.jsx)(z,{title:"Latest run output",children:s?(0,l.jsx)("pre",{style:{fontSize:11,color:"var(--ink-2)",padding:8,background:"var(--bg)",borderRadius:4,border:"1px solid var(--line)"},dangerouslySetInnerHTML:{__html:s}}):(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)"},children:"No run data for this node yet."})}),u&&u.length>0&&(0,l.jsx)(z,{title:"Issues",right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--err)"},children:u.length}),children:u.map((y,k)=>(0,l.jsxs)("div",{className:"fld__err",style:{padding:"6px 0"},children:[(0,l.jsx)(L.warn,{})," ",y.message]},k))})]})]})}function im(e,t,n){let r=new Map(t.map(u=>[u.id,u])),o=new Set,i=[],a=u=>{if(!o.has(u)){o.add(u);for(let s of n)s.to===u&&a(s.from);if(u!==e){let s=r.get(u);s&&i.push(s)}}};a(e);for(let u of t)u.type.startsWith("trigger.")&&!o.has(u.id)&&u.id!==e&&i.push(u);return i}function am({node:e,nodes:t,edges:n}){let r=(0,re.useMemo)(()=>im(e.id,t,n),[e.id,t,n]);return r.length===0?(0,l.jsx)(z,{title:"Available inputs",defaultOpen:!1,children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)"},children:["No upstream nodes yet \u2014 connect a trigger or upstream node to make its outputs available as ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," templates here."]})}):(0,l.jsx)(z,{title:`Available inputs (${r.length})`,defaultOpen:!1,right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--muted)"},children:"click to copy"}),children:(0,l.jsx)("div",{style:{display:"grid",gap:10},children:r.map(o=>(0,l.jsx)(lm,{node:o},o.id))})})}function lm({node:e}){let t=ss[e.type],n=t?ip(e.type,e.config):[];return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:6,padding:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,l.jsx)("span",{className:"mono",style:{fontSize:11,color:"var(--ink-2)"},children:e.id}),(0,l.jsx)("span",{className:"insp__type-pill",style:{fontSize:10},children:e.type})]}),t?.summary&&(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)",marginBottom:6},children:t.summary}),n.length===0?(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)"},children:"No declared outputs."}):(0,l.jsx)("div",{style:{display:"grid",gap:2},children:n.map(r=>(0,l.jsx)(sm,{nodeId:e.id,field:r},r.path))})]})}function sm({nodeId:e,field:t}){let[n,r]=(0,re.useState)(!1),o=t.path?`{{${e}.${t.path}}}`:`{{${e}}}`;return(0,l.jsxs)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(o),r(!0),window.setTimeout(()=>r(!1),900)}catch{}},title:t.description,style:{textAlign:"left",display:"grid",gridTemplateColumns:"1fr auto",gap:6,padding:"4px 6px",background:n?"var(--ok-soft, rgba(0, 200, 100, 0.12))":"transparent",border:"1px solid transparent",borderRadius:4,cursor:"pointer",color:"var(--ink-1)",fontSize:11,lineHeight:1.35},children:[(0,l.jsx)("span",{className:"mono",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),(0,l.jsx)("span",{style:{color:n?"var(--ok, #2ea043)":"var(--muted)",fontSize:10},children:n?"copied":t.type})]})}function um({node:e,patchData:t}){let[n,r]=(0,re.useState)(()=>JSON.stringify(e.config,null,2)),[o,i]=(0,re.useState)(null);return(0,re.useMemo)(()=>{r(JSON.stringify(e.config,null,2)),i(null)},[e.id]),(0,l.jsxs)(z,{title:"Raw config JSON",children:[(0,l.jsx)(St,{mono:!0,rows:14,value:n,onChange:r}),(0,l.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>{try{let u=JSON.parse(n);u&&typeof u=="object"&&!Array.isArray(u)?(t(u),i(null)):i("config must be a JSON object")}catch(u){i(u.message)}},children:[(0,l.jsx)(L.check,{})," Apply"]}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>r(JSON.stringify(e.config,null,2)),children:[(0,l.jsx)(L.undo,{})," Reset"]})]}),o&&(0,l.jsxs)("div",{className:"fld__err",style:{color:"var(--err)",fontSize:11,marginTop:4},children:[(0,l.jsx)(L.err,{})," ",o]})]})}function cm({meta:e,patchMeta:t,onDeleteWorkflow:n,isNew:r}){let o=e.retention??{maxRuns:500,maxDays:90};return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsx)("div",{className:"insp__head",children:(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:"workflow"}),(0,l.jsx)("input",{className:"insp__name",value:e.title,placeholder:"Untitled workflow",onChange:i=>t({title:i.target.value})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsxs)(z,{title:"Identity",children:[(0,l.jsx)(w,{label:"ID",hint:r?"URL slug \u2014 set once on first save":"URL slug \u2014 read-only after creation",children:(0,l.jsx)(I,{mono:!0,value:e.id,onChange:i=>r&&t({id:i})})}),(0,l.jsx)(w,{label:"Title",children:(0,l.jsx)(I,{value:e.title,onChange:i=>t({title:i})})}),(0,l.jsx)(w,{label:"Description",hint:"Optional one-liner shown on the workflows index",children:(0,l.jsx)(St,{rows:2,value:e.description??"",onChange:i=>t({description:i})})})]}),(0,l.jsxs)(z,{title:"Execution",children:[(0,l.jsx)(w,{label:"Priority",hint:"Higher numbers run before lower ones when multiple workflows match the same trigger",children:(0,l.jsx)(wn,{value:e.priority,onChange:i=>t({priority:i??0}),placeholder:"0"})}),(0,l.jsx)(w,{label:"",children:(0,l.jsx)(cs,{checked:!!e.fanOut,onChange:i=>t({fanOut:i}),label:"Fan out \u2014 let multiple workflows match the same trigger event"})}),(0,l.jsx)(w,{label:"Allowed env vars",hint:"Comma-separated. Only these env names are exposed to actions/agents in this flow.",children:(0,l.jsx)(bt,{mono:!0,value:e.envAllow??[],onChange:i=>t({envAllow:i}),placeholder:"GITLAB_TOKEN, SLACK_WEBHOOK"})})]}),(0,l.jsxs)(z,{title:"Retention",defaultOpen:!1,children:[(0,l.jsx)(w,{label:"Max runs to keep",children:(0,l.jsx)(wn,{value:o.maxRuns,onChange:i=>t({retention:{...o,maxRuns:i??0}}),placeholder:"500"})}),(0,l.jsx)(w,{label:"Max age (days)",children:(0,l.jsx)(wn,{value:o.maxDays,onChange:i=>t({retention:{...o,maxDays:i??0}}),placeholder:"90"})})]}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",padding:"4px 16px 14px",borderTop:"1px solid var(--line-soft)",marginTop:4},children:["Tip: pick a node or edge on the canvas to edit its config. Each node's output becomes available as"," ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," to downstream nodes."]}),n&&!r&&(0,l.jsx)("div",{className:"insp__danger",children:(0,l.jsxs)("button",{className:"btn btn--ghost-icon insp__delete-wf",onClick:n,title:"Delete this workflow permanently",children:[(0,l.jsx)(L.trash,{})," Delete workflow"]})})]})]})}function dm({edge:e,patch:t,onDelete:n}){return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsx)("div",{className:"insp__head",children:(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:"edge"}),(0,l.jsxs)("div",{className:"insp__name",style:{padding:0,fontSize:13,color:"var(--ink-2)"},children:[(0,l.jsx)("span",{className:"mono",children:e.from}),e.fromPort?(0,l.jsxs)("span",{className:"mono",children:[" :",e.fromPort]}):null," \u2192 ",(0,l.jsx)("span",{className:"mono",children:e.to})]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:n,children:(0,l.jsx)(L.trash,{})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsx)(z,{title:"Label",children:(0,l.jsx)(w,{label:"Label",hint:"Shown on the edge (cosmetic only)",children:(0,l.jsx)(I,{mono:!0,value:e.label??"",onChange:r=>t({label:r})})})}),(0,l.jsx)(z,{title:"Port",defaultOpen:!1,children:(0,l.jsx)(w,{label:"fromPort",hint:"Set when the source is a branch node. Must match a case's `to` field or the default port.",children:(0,l.jsx)(I,{mono:!0,value:e.fromPort??"",onChange:r=>t({fromPort:r||void 0})})})})]})]})}var or=oe(Ct(),1);var $=oe(be(),1);function up({onLoadTemplate:e}){let[t,n]=(0,or.useState)(""),r=(0,or.useMemo)(()=>{if(!t.trim())return is;let o=t.toLowerCase();return is.map(i=>({...i,items:i.items.filter(a=>a.label.toLowerCase().includes(o)||a.hint.toLowerCase().includes(o)||a.type.includes(o))})).filter(i=>i.items.length>0)},[t]);return(0,$.jsxs)("aside",{className:"pal",children:[(0,$.jsxs)("div",{className:"pal__search",children:[(0,$.jsx)(L.search,{}),(0,$.jsx)("input",{value:t,onChange:o=>n(o.target.value),placeholder:"Search nodes\u2026"}),(0,$.jsx)("kbd",{children:"/"})]}),(0,$.jsxs)("div",{className:"pal__scroll",children:[r.map(o=>(0,$.jsxs)(or.Fragment,{children:[(0,$.jsxs)("div",{className:"pal__section",children:[(0,$.jsx)("span",{children:o.section}),(0,$.jsx)("span",{className:"pal__section-count",children:o.items.length.toString().padStart(2,"0")})]}),o.items.map(i=>(0,$.jsx)(pm,{item:i},i.id))]},o.section)),!t&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"pal__section",children:[(0,$.jsx)("span",{children:"Templates"}),(0,$.jsx)("span",{className:"pal__section-count",children:ls.length.toString().padStart(2,"0")})]}),ls.map(o=>(0,$.jsxs)("div",{className:"pal__tpl",onClick:()=>e(o),children:[(0,$.jsx)("div",{className:"pal__tpl-dots",children:[0,1,2].map(i=>(0,$.jsx)("span",{className:i<o.dots?"on":""},i))}),(0,$.jsx)("div",{className:"pal__tpl-title",children:o.title}),(0,$.jsx)("div",{className:"pal__tpl-hint",children:o.hint})]},o.id))]})]}),(0,$.jsxs)("div",{className:"pal__foot",children:[(0,$.jsx)(L.lightning,{}),(0,$.jsx)("span",{children:"Drag items onto the canvas"})]})]})}function pm({item:e}){let t=L[e.icon]??L.box;return(0,$.jsxs)("div",{className:"pal__item",draggable:!0,onDragStart:r=>{r.dataTransfer.setData("application/x-wfe-item",JSON.stringify(e)),r.dataTransfer.effectAllowed="copy";let o=document.createElement("div");o.textContent=e.label,o.style.cssText="position:absolute;top:-1000px;padding:6px 10px;background:var(--accent);color:#fff;border-radius:6px;font:500 12px 'Space Grotesk';",document.body.appendChild(o),r.dataTransfer.setDragImage(o,10,10),setTimeout(()=>document.body.removeChild(o),0)},children:[(0,$.jsx)("div",{className:"pal__glyph "+e.glyph,children:(0,$.jsx)(t,{})}),(0,$.jsxs)("div",{className:"pal__meta",children:[(0,$.jsx)("div",{className:"pal__label",children:e.label}),(0,$.jsx)("div",{className:"pal__hint",children:e.hint})]})]})}var ds=oe(Ct(),1);var b=oe(be(),1);function cp(e){return(0,b.jsxs)("div",{className:"tb",children:[(0,b.jsxs)("div",{className:"tb__brand",children:[(0,b.jsx)("div",{className:"tb__mark",children:"\u2726"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"tb__brand-label",children:"Workflow Editor"}),(0,b.jsx)("div",{className:"tb__brand-sub",children:e.workflowIdLabel})]})]}),(0,b.jsxs)("div",{className:"tb__main",children:[(0,b.jsxs)("div",{className:"tb__crumbs",children:[(0,b.jsx)("a",{href:"/workflows",children:"Workflows"}),(0,b.jsx)("span",{className:"sep",children:"/"}),(0,b.jsx)("input",{value:e.title,onChange:t=>e.setTitle(t.target.value)})]}),(0,b.jsx)("span",{className:"tb__sep"}),(0,b.jsxs)("div",{className:"tb__status "+e.status,children:[(0,b.jsx)("span",{className:"dot"}),e.statusLabel??(e.status==="is-dirty"?"unsaved":e.status==="is-running"?"running":e.status==="is-validating"?"validating\u2026":"saved")]}),(0,b.jsx)("div",{className:"tb__spacer"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.paletteOpen?" is-active":""),title:e.paletteOpen?"Hide palette":"Show palette",onClick:()=>e.setPaletteOpen(!e.paletteOpen),children:(0,b.jsx)(L.panelLeft,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.inspectorOpen?" is-active":""),title:e.inspectorOpen?"Hide inspector":"Show inspector",onClick:()=>e.setInspectorOpen(!e.inspectorOpen),children:(0,b.jsx)(L.panelRight,{})}),(0,b.jsx)("span",{className:"tb__sep"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Undo (\u2318Z)",onClick:e.onUndo,disabled:!e.canUndo,children:(0,b.jsx)(L.undo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Redo (\u2318\u21E7Z)",onClick:e.onRedo,disabled:!e.canRedo,children:(0,b.jsx)(L.redo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Auto layout",onClick:e.onLayout,children:(0,b.jsx)(L.layout,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Keyboard shortcuts",onClick:e.onHelp,children:(0,b.jsx)(L.kbd,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.tweaksOpen?" is-active":""),title:"Tweaks",onClick:()=>e.setTweaksOpen(!e.tweaksOpen),children:(0,b.jsx)(L.gear,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Toggle theme",onClick:()=>e.setTheme(e.theme==="dark"?"light":"dark"),children:e.theme==="dark"?(0,b.jsx)(L.sun,{}):(0,b.jsx)(L.moon,{})})]}),(0,b.jsxs)("div",{className:"tb__actions",children:[(0,b.jsxs)("button",{className:"btn btn--outline",onClick:e.onSave,children:[(0,b.jsx)(L.save,{})," Save"]}),(0,b.jsx)("button",{className:"btn btn--primary",onClick:e.onRun,children:e.running?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(L.stop2,{})," Stop"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(L.run,{})," Run preview"]})})]})]})}function dp({running:e,script:t,cursor:n,onStop:r}){if(!e)return null;let o=t.filter(i=>i.nodeId);return(0,b.jsxs)("div",{className:"run",children:[(0,b.jsxs)("div",{className:"run__head",children:[(0,b.jsx)(L.lightning,{}),(0,b.jsx)("div",{className:"run__title",children:"Live run"}),(0,b.jsxs)("span",{className:"run__chip",children:[(0,b.jsx)("span",{className:"dot"})," streaming"]}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",onClick:r,style:{height:24,width:24},children:(0,b.jsx)(L.x,{})})]}),(0,b.jsx)("div",{className:"run__body",children:o.map((i,a)=>{let u=t.indexOf(i),s=u<n,c=["run__step"];return s&&c.push("is-done"),u===n&&c.push("is-current"),(0,b.jsxs)("div",{className:c.join(" "),children:[(0,b.jsx)("div",{className:"run__marker",children:s?(0,b.jsx)(L.check,{}):a+1}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{className:"run__step-title",children:i.title}),i.body&&(0,b.jsx)("div",{className:"run__step-body",dangerouslySetInnerHTML:{__html:i.body}})]})]},a)})}),(0,b.jsxs)("div",{className:"run__foot",children:[(0,b.jsxs)("span",{children:[Math.min(n+1,t.length),"/",t.length]}),(0,b.jsxs)("span",{children:[t.length?Math.round((n+1)/t.length*100):0,"%"]})]})]})}var fm=[{h:255,name:"indigo"},{h:220,name:"blue"},{h:180,name:"teal"},{h:145,name:"green"},{h:70,name:"amber"},{h:28,name:"orange"},{h:330,name:"pink"}];function pp(e){return e.open?(0,b.jsxs)("div",{className:"tweaks",children:[(0,b.jsxs)("div",{className:"tweaks__head",children:[(0,b.jsx)("span",{children:"Tweaks"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",style:{height:22,width:22},onClick:()=>e.setOpen(!1),children:(0,b.jsx)(L.x,{})})]}),(0,b.jsxs)("div",{className:"tweaks__body",children:[(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Theme"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["dark","light"].map(t=>(0,b.jsx)("button",{className:e.theme===t?"on":"",onClick:()=>e.setTheme(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Density"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["compact","cozy","roomy"].map(t=>(0,b.jsx)("button",{className:e.density===t?"on":"",onClick:()=>e.setDensity(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",style:{alignItems:"flex-start",flexDirection:"column",gap:6},children:[(0,b.jsx)("label",{children:"Accent hue"}),(0,b.jsx)("div",{className:"tweaks__hue",children:fm.map(t=>(0,b.jsx)("button",{title:t.name,className:e.hue===t.h?"on":"",style:{background:`oklch(0.70 0.16 ${t.h})`},onClick:()=>e.setHue(t.h)},t.h))})]})]})]}):null}function fp({open:e,onClose:t}){return e?(0,b.jsx)("div",{className:"kbd-overlay",onClick:t,children:(0,b.jsxs)("div",{className:"kbd-card",onClick:r=>r.stopPropagation(),children:[(0,b.jsx)("h3",{children:"Keyboard shortcuts"}),[["Save workflow","\u2318S"],["Undo / Redo","\u2318Z / \u2318\u21E7Z"],["Delete selection","Delete"],["Duplicate node","\u2318D"],["Run preview","\u2318\u23CE"],["Focus search","/"],["Fit view","F"],["Close panels","Esc"]].map(([r,o])=>(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("span",{children:r}),(0,b.jsx)("span",{children:o.split(" ").map((i,a)=>(0,b.jsxs)(ds.Fragment,{children:[i.includes("/")?i.split("/").map((u,s)=>(0,b.jsxs)(ds.Fragment,{children:[s>0&&" / ",(0,b.jsx)("kbd",{children:u.trim()})]},s)):(0,b.jsx)("kbd",{children:i})," "]},a))})]},r))]})}):null}var Te=oe(Ct(),1),V=oe(be(),1),fs="agentx.editor.chat.v1";function gp({currentWorkflow:e,onApplyWorkflow:t,agentId:n}){let[r,o]=(0,Te.useState)(!1),[i,a]=(0,Te.useState)(()=>vm()),[u,s]=(0,Te.useState)(""),[c,d]=(0,Te.useState)(!1),g=(0,Te.useRef)(null),m=(0,Te.useRef)(null);(0,Te.useEffect)(()=>{let f=i.filter(p=>!p.pending).map(p=>({role:p.role,content:p.content}));try{sessionStorage.setItem(fs,JSON.stringify(f))}catch{}},[i]),(0,Te.useEffect)(()=>{let f=g.current;f&&(f.scrollTop=f.scrollHeight)},[i,r]),(0,Te.useEffect)(()=>{r&&m.current?.focus()},[r]);let y=(0,Te.useCallback)(async()=>{let f=u.trim();if(!f||c)return;let p=i.filter(x=>!x.pending).map(x=>({role:x.role,content:x.content})),h=[...i,{role:"user",content:f},{role:"assistant",content:"\u2026",pending:!0}];a(h),s(""),d(!0);try{let x=await fetch("/api/workflows/editor/chat",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"agentx-board"},body:JSON.stringify({messages:[...p,{role:"user",content:f}],currentWorkflow:e,agentId:n})}),C=await x.json().catch(()=>({}));x.ok?a(M=>ps(M,{role:"assistant",content:C.reply||"",workflow:C.workflow||void 0})):a(M=>ps(M,{role:"assistant",content:"",error:C.error||`HTTP ${x.status}`}))}catch(x){a(C=>ps(C,{role:"assistant",content:"",error:x?.message||"network error"}))}finally{d(!1)}},[n,c,e,u,i]),k=()=>{a([]);try{sessionStorage.removeItem(fs)}catch{}},S=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),y())},B=(0,Te.useMemo)(()=>["Describe the process you want \u2014 I'll generate the workflow.","","Examples:",'\u2022 "Expense approval: employee submits form, manager approves over $500 otherwise auto-approve"','\u2022 "Telegram bot that classifies messages as billing/bug/other and routes to the right agent"',`\u2022 "Triage a GitLab issue: label 'bug' \u2192 dev agent; label 'feature' \u2192 product agent; otherwise close"`].join(`
|
|
1256
|
-
|
|
1255
|
+
}`})})]})}function zh({node:e,patchData:t}){let n=e.config,r=n.cases??[],o=s=>t({cases:s}),i=(s,c)=>o(r.map((d,g)=>g===s?c:d)),a=(s,c)=>i(s,{...r[s],when:{...r[s].when,...c}}),u=(s,c)=>i(s,{...r[s],when:{...r[s].when,params:{...r[s].when.params,...c}}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Cases",right:(0,l.jsx)("span",{className:"card__kind",children:r.length}),children:[r.map((s,c)=>{let d=s.when.params??{};return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:4,padding:10,marginBottom:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,l.jsxs)("strong",{style:{fontSize:11},children:["Case #",c+1]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:()=>o(r.filter((g,m)=>m!==c)),children:(0,l.jsx)(z.trash,{})})]}),(0,l.jsx)(w,{label:"If",children:(0,l.jsx)(ue,{value:s.when.kind,onChange:g=>a(c,{kind:g,params:{}}),options:[{value:"equals",label:"Path equals value"},{value:"contains",label:"Path contains value"},{value:"matches",label:"Path matches regex"},{value:"exists",label:"Path exists (non-empty)"}]})}),(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.result",children:(0,l.jsx)(R,{mono:!0,value:String(d.path??""),onChange:g=>u(c,{path:g}),placeholder:"classify.result"})}),(s.when.kind==="equals"||s.when.kind==="contains")&&(0,l.jsx)(w,{label:"Value",children:(0,l.jsx)(R,{mono:!0,value:String(d.value??""),onChange:g=>u(c,{value:g})})}),s.when.kind==="matches"&&(0,l.jsx)(w,{label:"Regex",children:(0,l.jsx)(R,{mono:!0,value:String(d.regex??""),onChange:g=>u(c,{regex:g}),placeholder:"^(approved|done)$"})}),(0,l.jsx)(w,{label:"Port",hint:"Outgoing edge's `fromPort` must match this",children:(0,l.jsx)(R,{mono:!0,value:s.to,onChange:g=>i(c,{...s,to:g}),placeholder:"approved"})})]},c)}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",style:{width:"100%",padding:8,justifyContent:"center"},onClick:()=>o([...r,{when:{kind:"equals",params:{path:"",value:""}},to:`case${r.length+1}`}]),children:[(0,l.jsx)(z.plus,{})," Add case"]})]}),(0,l.jsx)(L,{title:"Fallback",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Default port",hint:"Used when no case matches. Leave blank to drop the event.",children:(0,l.jsx)(R,{mono:!0,value:String(n.default??"fallback"),onChange:s=>t({default:s})})})})]})}function Ah({node:e,patchData:t}){let n=e.config,r=n.waitFor??{},o=a=>t({waitFor:{...r,...a}}),i=n.resumeMatch??{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Checkpoint",children:(0,l.jsx)(w,{label:"Name",hint:"Human label shown in logs + run timelines",children:(0,l.jsx)(R,{value:String(n.name??e.id),onChange:a=>t({name:a}),placeholder:"await-label-change"})})}),(0,l.jsxs)(L,{title:"Wait for",children:[(0,l.jsx)(w,{label:"Source",hint:"Which kind of event unpauses this run",children:(0,l.jsx)(ue,{value:String(r.source??""),onChange:a=>o({source:a||void 0}),options:[{value:"",label:"Any (same entity)"},{value:"gitlab-issue",label:"GitLab issue update"},{value:"gitlab-pipeline",label:"GitLab pipeline event"},{value:"whatsapp-message",label:"WhatsApp reply"},{value:"telegram-message",label:"Telegram reply"},{value:"manual",label:"Manual poke"}]})}),(0,l.jsx)(w,{label:"Labels (any of)",hint:"e.g. a label change to one of these resumes the run",children:(0,l.jsx)(St,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:a=>o({labels:a.length?a:void 0})})})]}),(0,l.jsx)(L,{title:"Advanced match",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Event id contains",hint:"Optional substring match on the incoming event's id",children:(0,l.jsx)(R,{mono:!0,value:String(i.eventIdLike??""),onChange:a=>t({resumeMatch:{...i,eventIdLike:a||void 0}})})})})]})}function Dh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Terminal",children:[(0,l.jsx)(w,{label:"Status",children:(0,l.jsx)(ue,{value:String(n.status??"completed"),onChange:r=>t({status:r}),options:[{value:"completed",label:"Completed (success)"},{value:"failed",label:"Failed"},{value:"canceled",label:"Canceled"}]})}),(0,l.jsx)(w,{label:"Summary (optional)",hint:"Surfaced in run history + notifications",children:(0,l.jsx)(ht,{value:String(n.summary??""),onChange:r=>t({summary:r}),rows:2})})]})}var jh=["gitlab","github","whatsapp","telegram","discord","slack"],us=new Map,ap=6e4;function Uh(e){let[t,n]=(0,re.useState)(()=>{let r=us.get(e);return r&&Date.now()-r.at<ap?{chats:r.chats,source:r.source,loading:!1}:{chats:[],source:"",loading:!0}});return(0,re.useEffect)(()=>{let r=!1,o=us.get(e);if(o&&Date.now()-o.at<ap){n({chats:o.chats,source:o.source,loading:!1});return}return n(i=>({...i,loading:!0})),fetch(`/channels/${encodeURIComponent(e)}/chats`).then(i=>i.ok?i.json():{chats:[],source:""}).then(i=>{if(r)return;let a=Array.isArray(i.chats)?i.chats:[],u=typeof i.source=="string"?i.source:"";us.set(e,{at:Date.now(),chats:a,source:u}),n({chats:a,source:u,loading:!1})}).catch(()=>{r||n({chats:[],source:"",loading:!1})}),()=>{r=!0}},[e]),t}function Wh({node:e,patchData:t,nodes:n}){let r=e.config,o=n.find(c=>c.type.startsWith("trigger."))?.id??"trigger",i=c=>`{{${o}.${c}}}`,a=String(r.channel??"whatsapp"),u=Uh(a),s=`chats-${a}`;return(0,l.jsxs)(L,{title:"Send message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:a,onChange:c=>t({channel:c}),options:jh})}),(0,l.jsxs)(w,{label:"Chat id",hint:u.chats.length>0?`Use ${i("chatId")} to reply to the trigger's chat, or pick one of the ${u.chats.length} known chat(s) ${u.source==="local"?"on this node":`from ${u.source}`} (click the field to see the list).`:u.loading?`Loading known chats for "${a}"\u2026`:`Use ${i("chatId")} to reply to the trigger's chat. For a different destination, paste the channel-specific id (no discovered chats for "${a}" yet).`,children:[(0,l.jsx)(R,{mono:!0,value:String(r.chatId??""),onChange:c=>t({chatId:c}),placeholder:i("chatId"),list:u.chats.length>0?s:void 0}),u.chats.length>0&&(0,l.jsx)("datalist",{id:s,children:u.chats.map(c=>(0,l.jsx)("option",{value:c.id,children:c.name?`${c.name} \u2014 ${c.id}${c.kind==="group"?" (group)":""}`:`${c.id}${c.kind==="group"?" (group)":""}`},c.id))})]}),(0,l.jsx)(w,{label:"Text",hint:"Supports {{nodeId.path}} templates from any upstream node",children:(0,l.jsx)(rr,{value:String(r.text??""),onChange:c=>t({text:c}),rows:4,placeholder:`Thanks ${i("sender.name")} \u2014 working on it.`})}),(0,l.jsx)(w,{label:"Account id",hint:"Telegram only: which bot account sends. Leave empty to inherit from the trigger's account (recommended).",children:(0,l.jsx)(R,{mono:!0,value:String(r.accountId??""),onChange:c=>t({accountId:c}),placeholder:`(inherit from ${i("accountId")})`})}),(0,l.jsx)(w,{label:"Reply to message id",hint:"Optional. When set, the platform threads this reply under the referenced message.",children:(0,l.jsx)(R,{mono:!0,value:String(r.replyTo??""),onChange:c=>t({replyTo:c}),placeholder:i("event.id")})}),(0,l.jsx)(w,{label:"Parse mode",hint:r.channel==="telegram"?'Telegram default is "markdown" (Telegram-flavoured HTML conversion). Use "plain" to send raw text without escaping.':"Platform-specific. WhatsApp ignores; Telegram supports markdown/html.",children:(0,l.jsx)(ue,{value:String(r.parseMode??"markdown"),onChange:c=>t({parseMode:c}),options:["markdown","plain","html"]})})]})}function Bh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Project",hint:'GitLab "group/project" or GitHub "owner/repo"',children:(0,l.jsx)(R,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"noqta/web"})})]}),(0,l.jsxs)(L,{title:"Issue",children:[(0,l.jsx)(w,{label:"Title",children:(0,l.jsx)(rr,{rows:1,value:String(n.title??""),onChange:r=>t({title:r}),placeholder:"From WhatsApp: {{trigger.sender.name}}"})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(rr,{rows:6,value:String(n.description??""),onChange:r=>t({description:r}),placeholder:"Reported by {{trigger.sender.name}}\\n\\n{{trigger.text}}"})}),(0,l.jsx)(w,{label:"Labels",children:(0,l.jsx)(St,{mono:!0,value:Array.isArray(n.labels)?n.labels:[],onChange:r=>t({labels:r}),placeholder:"Triage, source::whatsapp"})}),(0,l.jsx)(w,{label:"Assignees",hint:"GitLab usernames (resolved to ids at runtime)",children:(0,l.jsx)(St,{mono:!0,value:Array.isArray(n.assignees)?n.assignees:[],onChange:r=>t({assignees:r}),placeholder:"alice, bob"})})]})]})}function Hh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(R,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"{{trigger.project}}"})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(R,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r}),placeholder:"{{trigger.issue.iid}}"})})]}),(0,l.jsxs)(L,{title:"Labels",children:[(0,l.jsx)(w,{label:"Add",hint:"Comma-separated list",children:(0,l.jsx)(St,{value:Array.isArray(n.add)?n.add:[],onChange:r=>t({add:r}),placeholder:"In review"})}),(0,l.jsx)(w,{label:"Remove",children:(0,l.jsx)(St,{value:Array.isArray(n.remove)?n.remove:[],onChange:r=>t({remove:r}),placeholder:"Triage"})})]})]})}function Gh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Read labels",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(R,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r})})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(R,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8},children:["Output bundle: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.labels }}"})," = string[]"]})]})}function $h({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"React",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(R,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(R,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r}),placeholder:"{{trigger.event.id}}"})}),(0,l.jsx)(w,{label:"Emoji",children:(0,l.jsx)(R,{value:String(n.emoji??"\u{1F440}"),onChange:r=>t({emoji:r})})})]})}function Vh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Edit message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp","gitlab","github","discord","slack"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(R,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r})})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(R,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r})})}),(0,l.jsx)(w,{label:"New text",children:(0,l.jsx)(rr,{value:String(n.text??""),onChange:r=>t({text:r}),rows:3})}),(0,l.jsx)(w,{label:"Parse mode",children:(0,l.jsx)(ue,{value:String(n.parseMode??"plain"),onChange:r=>t({parseMode:r}),options:["plain","markdown","html"]})})]})}function Kh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Log time",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab"]})}),(0,l.jsx)(w,{label:"Chat id",hint:'"project:issue:42" or "project:merge_request:7"',children:(0,l.jsx)(R,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Duration (ms)",children:(0,l.jsx)(wn,{value:n.durationMs,onChange:r=>t({durationMs:r}),placeholder:"900000"})})]})}function Jh({node:e,patchData:t}){let n=e.config,r=JSON.stringify(n.inputs??{},null,2);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Action",children:(0,l.jsx)(w,{label:"Action id",hint:"Slug of a registered action (.agentx/actions/<id>.json). Manage in Settings \u2192 Actions or via `agentx actions`.",children:(0,l.jsx)(R,{mono:!0,value:String(n.actionId??""),onChange:o=>t({actionId:o}),placeholder:"deploy-staging"})})}),(0,l.jsx)(L,{title:"Inputs",defaultOpen:!0,children:(0,l.jsx)(w,{label:"Inputs (JSON object)",hint:'Values templated into the action. Strings support {{nodeId.path}} \u2014 e.g. {"version": "{{trigger.tag}}"}',children:(0,l.jsx)(ht,{mono:!0,rows:5,value:r,onChange:o=>{try{t({inputs:JSON.parse(o)})}catch{}},placeholder:`{
|
|
1256
|
+
"version": "{{trigger.tag}}"
|
|
1257
|
+
}`})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8,padding:"0 10px"},children:["Output: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.ok / .status / .output / .errors / .durationMs }}"})]})]})}function Qh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Request",children:[(0,l.jsx)(w,{label:"URL",children:(0,l.jsx)(R,{mono:!0,value:String(n.url??""),onChange:r=>t({url:r}),placeholder:"https://example.com/webhook"})}),(0,l.jsx)(w,{label:"Method",children:(0,l.jsx)(ue,{value:String(n.method??"POST"),onChange:r=>t({method:r}),options:["GET","POST","PUT","PATCH","DELETE"]})})]}),(0,l.jsx)(L,{title:"Body",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Body",hint:"String \u2014 rendered with {{nodeId.path}}. Server parses as JSON when possible.",children:(0,l.jsx)(rr,{rows:5,value:typeof n.body=="string"?n.body:n.body?JSON.stringify(n.body,null,2):"",onChange:r=>t({body:r})})})}),(0,l.jsx)(L,{title:"Headers",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Headers (JSON object)",children:(0,l.jsx)(ht,{mono:!0,rows:3,value:JSON.stringify(n.headers??{},null,2),onChange:r=>{try{t({headers:JSON.parse(r)})}catch{}},placeholder:'{"Authorization": "Bearer {{env.TOKEN}}"}'})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8,padding:"0 10px"},children:["Output: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.ok / .status / .body }}"})]})]})}var Yh=["text","long-text","number","boolean","date","select","multi-select","file"];function lp({form:e,patch:t}){let n=e.fields??[],r=(s,c)=>{let d=[...n];d[s]={...d[s],...c},t({...e,fields:d})},o=(s,c)=>{let d=[...n];d[s]={...d[s],validate:{...d[s].validate??{},...c}},t({...e,fields:d})},i=s=>t({...e,fields:n.filter((c,d)=>d!==s)}),a=(s,c)=>{let d=s+c;if(d<0||d>=n.length)return;let g=[...n];[g[s],g[d]]=[g[d],g[s]],t({...e,fields:g})},u=()=>t({...e,fields:[...n,{key:`field_${n.length+1}`,label:"New field",type:"text"}]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Form",children:[(0,l.jsx)(w,{label:"Title",hint:"Header shown to the assignee above the form",children:(0,l.jsx)(R,{value:e.title??"",onChange:s=>t({...e,title:s}),placeholder:"Review application"})}),(0,l.jsx)(w,{label:"Description",hint:"Optional one-line context shown under the title",children:(0,l.jsx)(R,{value:e.description??"",onChange:s=>t({...e,description:s}),placeholder:""})}),(0,l.jsx)(w,{label:"Primary button",hint:"Label on the submit button; default: Submit",children:(0,l.jsx)(R,{value:e.submitLabel??"Submit",onChange:s=>t({...e,submitLabel:s})})}),(0,l.jsx)(w,{label:"Secondary action",hint:"Optional reject/hold button. Submissions carry action='secondary'.",children:(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[(0,l.jsx)(R,{value:e.secondaryAction?.key??"",onChange:s=>t({...e,secondaryAction:s?{key:s,label:e.secondaryAction?.label??s}:void 0}),placeholder:"key (e.g. reject)",mono:!0}),(0,l.jsx)(R,{value:e.secondaryAction?.label??"",onChange:s=>t({...e,secondaryAction:{key:e.secondaryAction?.key??"secondary",label:s}}),placeholder:"label (e.g. Reject)"})]})})]}),(0,l.jsxs)(L,{title:`Fields (${n.length})`,children:[n.length===0&&(0,l.jsx)("div",{className:"hint",style:{fontSize:12,color:"var(--ax-muted)"},children:"No fields \u2014 approve/reject form with no input."}),n.map((s,c)=>(0,l.jsxs)("div",{className:"fld__field-row",style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Key",hint:"Stored under values.<key>",children:(0,l.jsx)(R,{mono:!0,value:s.key,onChange:d=>r(c,{key:d})})}),(0,l.jsx)(w,{label:"Label",children:(0,l.jsx)(R,{value:s.label,onChange:d=>r(c,{label:d})})}),(0,l.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,-1),title:"Move up",children:"\u2191"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,1),title:"Move down",children:"\u2193"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>i(c),title:"Remove",children:"\u2715"})]})]}),(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6,marginTop:6},children:[(0,l.jsx)(w,{label:"Type",children:(0,l.jsx)(ue,{value:s.type,onChange:d=>r(c,{type:d}),options:Yh.slice()})}),(0,l.jsx)(w,{label:"",children:(0,l.jsx)(cs,{checked:!!s.required,onChange:d=>r(c,{required:d}),label:"Required"})})]}),(s.type==="select"||s.type==="multi-select")&&(0,l.jsx)(w,{label:"Options",hint:"Comma-separated list of allowed values",children:(0,l.jsx)(St,{value:s.options??[],onChange:d=>r(c,{options:d}),placeholder:"low, medium, high"})}),(0,l.jsx)(w,{label:"Hint",hint:"Helper text shown under the input",children:(0,l.jsx)(R,{value:s.hint??"",onChange:d=>r(c,{hint:d})})}),(s.type==="text"||s.type==="long-text"||s.type==="number")&&(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:s.type==="number"?"1fr 1fr":"1fr 1fr 1fr",gap:6},children:[(0,l.jsx)(w,{label:"Min",children:(0,l.jsx)(wn,{value:s.validate?.min,onChange:d=>o(c,{min:d})})}),(0,l.jsx)(w,{label:"Max",children:(0,l.jsx)(wn,{value:s.validate?.max,onChange:d=>o(c,{max:d})})}),s.type!=="number"&&(0,l.jsx)(w,{label:"Pattern",hint:"Regex \u2014 optional",children:(0,l.jsx)(R,{mono:!0,value:s.validate?.pattern??"",onChange:d=>o(c,{pattern:d})})})]})]},c)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,style:{marginTop:4},children:"+ Add field"})]})]})}function Xh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Assignment",children:[(0,l.jsx)(w,{label:"Assignee",hint:"actor:<id> or role:<id> \u2014 managed via `agentx actor` / `agentx role`",children:(0,l.jsx)(R,{mono:!0,value:String(n.assignTo??""),onChange:o=>t({assignTo:o}),placeholder:"role:reviewers"})}),(0,l.jsx)(w,{label:"Title",hint:"Shown in the inbox + notification",children:(0,l.jsx)(R,{value:String(n.title??""),onChange:o=>t({title:o})})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(ht,{value:String(n.description??""),onChange:o=>t({description:o}),rows:2})}),(0,l.jsx)(w,{label:"Due in",hint:"ISO-8601 duration (PT2H, P1D) or number of minutes",children:(0,l.jsx)(R,{mono:!0,value:String(n.dueIn??""),onChange:o=>t({dueIn:o}),placeholder:"P2D"})})]}),(0,l.jsx)(lp,{form:r,patch:o=>t({form:o})})]})}function qh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Start conditions",children:(0,l.jsx)(w,{label:"Startable by",hint:"actor:<id> or role:<id> \u2014 who is allowed to initiate a new run",children:(0,l.jsx)(R,{mono:!0,value:String(n.startableBy??""),onChange:o=>t({startableBy:o}),placeholder:"role:public"})})}),(0,l.jsx)(lp,{form:r,patch:o=>t({form:o})})]})}function Zh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Sub-process",children:[(0,l.jsx)(w,{label:"Workflow id",hint:"id of another workflow definition \u2014 it runs to completion, then parent resumes",children:(0,l.jsx)(R,{mono:!0,value:String(n.workflowId??""),onChange:r=>t({workflowId:r}),placeholder:"child-workflow-id"})}),(0,l.jsx)(w,{label:"Input map (JSON)",hint:'Object mapping child-context keys to templated values; "*" for full inheritance',children:(0,l.jsx)(ht,{mono:!0,rows:4,value:JSON.stringify(n.inputMap??{},null,2),onChange:r=>{try{t({inputMap:JSON.parse(r)})}catch{}}})})]})}function em({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Emit signal",children:[(0,l.jsx)(w,{label:"Name",hint:"Signal identifier; other workflows' signal.wait nodes subscribe by this",children:(0,l.jsx)(R,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",hint:"workflow = only same-workflow waiters; global = every waiter",children:(0,l.jsx)(ue,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Payload (JSON)",hint:"Templated object delivered with the signal",children:(0,l.jsx)(ht,{mono:!0,rows:4,value:JSON.stringify(n.payload??{},null,2),onChange:r=>{try{t({payload:JSON.parse(r)})}catch{}}})})]})}function tm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Wait for signal",children:[(0,l.jsx)(w,{label:"Name",children:(0,l.jsx)(R,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",children:(0,l.jsx)(ue,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Match filter (JSON)",hint:"Only resume when the emitted payload matches every key here",children:(0,l.jsx)(ht,{mono:!0,rows:3,value:JSON.stringify(n.match??{},null,2),onChange:r=>{try{t({match:JSON.parse(r)})}catch{}}})})]})}function nm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(L,{title:"Timer",children:(0,l.jsx)(w,{label:"After",hint:"ISO-8601 duration (PT30M, PT2H, P1D) or minutes as a number",children:(0,l.jsx)(R,{mono:!0,value:String(n.after??""),onChange:r=>t({after:r}),placeholder:"PT1H"})})})}function rm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(L,{title:"Parallel gateway",children:(0,l.jsx)(w,{label:"Mode",hint:"fanOut = send to all outgoing edges; join = wait for every incoming edge",children:(0,l.jsx)(ue,{value:String(n.mode??"fanOut"),onChange:r=>t({mode:r}),options:["fanOut","join"]})})})}function om({node:e,patchData:t}){let n=e.config,r=Array.isArray(n.inputs)?n.inputs.map(String):[],o=Array.isArray(n.rules)?n.rules:[],i=c=>t({inputs:c,rules:o.map(d=>({...d,when:(Array.isArray(d.when)?d.when.slice(0,c.length):[]).concat(Array(Math.max(0,c.length-(d.when?.length??0))).fill("*"))}))}),a=(c,d)=>{let g=[...o];g[c]={...g[c],...d},t({rules:g})},u=()=>t({rules:[...o,{when:r.map(()=>"*"),to:"port",output:{}}]}),s=c=>t({rules:o.filter((d,g)=>g!==c)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Inputs",children:(0,l.jsx)(w,{label:"Input expressions",hint:"Comma-separated; each is a template evaluated per-run against the run context",children:(0,l.jsx)(St,{mono:!0,value:r,onChange:i,placeholder:"{{classify.result}}, {{trigger.values.amount}}"})})}),(0,l.jsxs)(L,{title:`Rules (${o.length})`,children:[o.map((c,d)=>(0,l.jsxs)("div",{style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Port (to)",hint:"Outgoing edge port taken when this row matches",children:(0,l.jsx)(R,{mono:!0,value:String(c.to??""),onChange:g=>a(d,{to:g})})}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>s(d),children:"\u2715"})]}),(0,l.jsx)(w,{label:"When (per-input cells)",hint:'One per input. "*" wildcard, "x" equals, ">10" numeric, "!=x", "/regex/"',children:(0,l.jsx)(St,{mono:!0,value:(Array.isArray(c.when)?c.when:[]).map(String),onChange:g=>a(d,{when:g}),placeholder:"gold, >100"})}),(0,l.jsx)(w,{label:"Output (JSON)",children:(0,l.jsx)(ht,{mono:!0,rows:2,value:JSON.stringify(c.output??{},null,2),onChange:g=>{try{a(d,{output:JSON.parse(g)})}catch{}}})})]},d)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,children:"+ Add rule"})]}),(0,l.jsx)(L,{title:"Default",children:(0,l.jsx)(w,{label:"Port (to)",children:(0,l.jsx)(R,{mono:!0,value:String(n.default?.to??"fallback"),onChange:c=>t({default:{...n.default??{},to:c}})})})})]})}var im={"trigger.channel":e=>(0,l.jsx)(Mh,{...e}),"trigger.cron":e=>(0,l.jsx)(Fh,{...e}),"trigger.hook":e=>(0,l.jsx)(Ih,{...e}),"trigger.manual":e=>(0,l.jsx)(Rh,{...e}),"trigger.form":e=>(0,l.jsx)(qh,{...e}),agent:e=>(0,l.jsx)(Oh,{...e}),transform:e=>(0,l.jsx)(Lh,{...e}),branch:e=>(0,l.jsx)(zh,{...e}),"gateway.parallel":e=>(0,l.jsx)(rm,{...e}),rule:e=>(0,l.jsx)(om,{...e}),checkpoint:e=>(0,l.jsx)(Ah,{...e}),userTask:e=>(0,l.jsx)(Xh,{...e}),subProcess:e=>(0,l.jsx)(Zh,{...e}),"signal.emit":e=>(0,l.jsx)(em,{...e}),"signal.wait":e=>(0,l.jsx)(tm,{...e}),"timer.boundary":e=>(0,l.jsx)(nm,{...e}),end:e=>(0,l.jsx)(Dh,{...e}),"action.send":e=>(0,l.jsx)(Wh,{...e}),"action.createIssue":e=>(0,l.jsx)(Bh,{...e}),"action.setLabel":e=>(0,l.jsx)(Hh,{...e}),"action.readLabel":e=>(0,l.jsx)(Gh,{...e}),"action.react":e=>(0,l.jsx)($h,{...e}),"action.editMessage":e=>(0,l.jsx)(Vh,{...e}),"action.logTime":e=>(0,l.jsx)(Kh,{...e}),"action.callHTTP":e=>(0,l.jsx)(Qh,{...e}),"action.run":e=>(0,l.jsx)(Jh,{...e})};function sp(e){let{selection:t,nodes:n,edges:r,patch:o,patchData:i,onDelete:a,onDuplicate:u,validation:s,runState:c,agents:d,meta:g,patchMeta:m,onDeleteWorkflow:y,isNew:k}=e;if(!t)return(0,l.jsx)(pm,{meta:g,patchMeta:m,onDeleteWorkflow:y,isNew:k});if(t.kind==="edge"){let B=r.find(f=>f.id===t.id);return B?(0,l.jsx)(fm,{edge:{...B,id:B.id??""},patch:o,onDelete:()=>a(t)}):null}let S=n.find(B=>B.id===t.id);return S?(0,l.jsx)(am,{node:S,nodes:n,edges:r,patch:o,patchData:i,onDelete:()=>a(t),onDuplicate:()=>u(t),validation:s,runOutput:c?.outputs?.[S.id],agents:d}):null}function am({node:e,nodes:t,edges:n,patch:r,patchData:o,onDelete:i,onDuplicate:a,validation:u,runOutput:s,agents:c}){let[d,g]=(0,re.useState)("config"),m=im[e.type];return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsxs)("div",{className:"insp__head",children:[(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:e.type}),(0,l.jsx)("input",{className:"insp__name",value:e.id,onChange:y=>r({id:y.target.value})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Duplicate",onClick:a,children:(0,l.jsx)(z.dup,{})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Delete",onClick:i,children:(0,l.jsx)(z.trash,{})})]}),(0,l.jsxs)("div",{className:"insp__tabs",children:[(0,l.jsxs)("button",{className:"insp__tab"+(d==="config"?" is-active":""),onClick:()=>g("config"),children:[(0,l.jsx)(z.gear,{})," Config"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="advanced"?" is-active":""),onClick:()=>g("advanced"),children:[(0,l.jsx)(z.layout,{})," Advanced"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="preview"?" is-active":""),onClick:()=>g("preview"),children:[(0,l.jsx)(z.eye,{})," Preview ",s&&(0,l.jsx)("span",{className:"count",children:"\u25CF"})]})]})]}),(0,l.jsxs)("div",{className:"insp__body",children:[d==="config"&&(0,l.jsxs)(l.Fragment,{children:[m?m({node:e,nodes:t,patch:r,patchData:o,agents:c}):(0,l.jsx)(L,{title:"Config",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",marginBottom:8},children:["No typed form yet for ",(0,l.jsx)("span",{className:"mono",children:e.type}),". Use the Advanced tab to edit raw JSON."]})}),(0,l.jsx)(sm,{node:e,nodes:t,edges:n})]}),d==="advanced"&&(0,l.jsx)(dm,{node:e,patchData:o}),d==="preview"&&(0,l.jsx)(L,{title:"Latest run output",children:s?(0,l.jsx)("pre",{style:{fontSize:11,color:"var(--ink-2)",padding:8,background:"var(--bg)",borderRadius:4,border:"1px solid var(--line)"},dangerouslySetInnerHTML:{__html:s}}):(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)"},children:"No run data for this node yet."})}),u&&u.length>0&&(0,l.jsx)(L,{title:"Issues",right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--err)"},children:u.length}),children:u.map((y,k)=>(0,l.jsxs)("div",{className:"fld__err",style:{padding:"6px 0"},children:[(0,l.jsx)(z.warn,{})," ",y.message]},k))})]})]})}function lm(e,t,n){let r=new Map(t.map(u=>[u.id,u])),o=new Set,i=[],a=u=>{if(!o.has(u)){o.add(u);for(let s of n)s.to===u&&a(s.from);if(u!==e){let s=r.get(u);s&&i.push(s)}}};a(e);for(let u of t)u.type.startsWith("trigger.")&&!o.has(u.id)&&u.id!==e&&i.push(u);return i}function sm({node:e,nodes:t,edges:n}){let r=(0,re.useMemo)(()=>lm(e.id,t,n),[e.id,t,n]);return r.length===0?(0,l.jsx)(L,{title:"Available inputs",defaultOpen:!1,children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)"},children:["No upstream nodes yet \u2014 connect a trigger or upstream node to make its outputs available as ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," templates here."]})}):(0,l.jsx)(L,{title:`Available inputs (${r.length})`,defaultOpen:!1,right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--muted)"},children:"click to copy"}),children:(0,l.jsx)("div",{style:{display:"grid",gap:10},children:r.map(o=>(0,l.jsx)(um,{node:o},o.id))})})}function um({node:e}){let t=ss[e.type],n=t?ip(e.type,e.config):[];return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:6,padding:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,l.jsx)("span",{className:"mono",style:{fontSize:11,color:"var(--ink-2)"},children:e.id}),(0,l.jsx)("span",{className:"insp__type-pill",style:{fontSize:10},children:e.type})]}),t?.summary&&(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)",marginBottom:6},children:t.summary}),n.length===0?(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)"},children:"No declared outputs."}):(0,l.jsx)("div",{style:{display:"grid",gap:2},children:n.map(r=>(0,l.jsx)(cm,{nodeId:e.id,field:r},r.path))})]})}function cm({nodeId:e,field:t}){let[n,r]=(0,re.useState)(!1),o=t.path?`{{${e}.${t.path}}}`:`{{${e}}}`;return(0,l.jsxs)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(o),r(!0),window.setTimeout(()=>r(!1),900)}catch{}},title:t.description,style:{textAlign:"left",display:"grid",gridTemplateColumns:"1fr auto",gap:6,padding:"4px 6px",background:n?"var(--ok-soft, rgba(0, 200, 100, 0.12))":"transparent",border:"1px solid transparent",borderRadius:4,cursor:"pointer",color:"var(--ink-1)",fontSize:11,lineHeight:1.35},children:[(0,l.jsx)("span",{className:"mono",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),(0,l.jsx)("span",{style:{color:n?"var(--ok, #2ea043)":"var(--muted)",fontSize:10},children:n?"copied":t.type})]})}function dm({node:e,patchData:t}){let[n,r]=(0,re.useState)(()=>JSON.stringify(e.config,null,2)),[o,i]=(0,re.useState)(null);return(0,re.useMemo)(()=>{r(JSON.stringify(e.config,null,2)),i(null)},[e.id]),(0,l.jsxs)(L,{title:"Raw config JSON",children:[(0,l.jsx)(ht,{mono:!0,rows:14,value:n,onChange:r}),(0,l.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>{try{let u=JSON.parse(n);u&&typeof u=="object"&&!Array.isArray(u)?(t(u),i(null)):i("config must be a JSON object")}catch(u){i(u.message)}},children:[(0,l.jsx)(z.check,{})," Apply"]}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>r(JSON.stringify(e.config,null,2)),children:[(0,l.jsx)(z.undo,{})," Reset"]})]}),o&&(0,l.jsxs)("div",{className:"fld__err",style:{color:"var(--err)",fontSize:11,marginTop:4},children:[(0,l.jsx)(z.err,{})," ",o]})]})}function pm({meta:e,patchMeta:t,onDeleteWorkflow:n,isNew:r}){let o=e.retention??{maxRuns:500,maxDays:90};return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsx)("div",{className:"insp__head",children:(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:"workflow"}),(0,l.jsx)("input",{className:"insp__name",value:e.title,placeholder:"Untitled workflow",onChange:i=>t({title:i.target.value})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsxs)(L,{title:"Identity",children:[(0,l.jsx)(w,{label:"ID",hint:r?"URL slug \u2014 set once on first save":"URL slug \u2014 read-only after creation",children:(0,l.jsx)(R,{mono:!0,value:e.id,onChange:i=>r&&t({id:i})})}),(0,l.jsx)(w,{label:"Title",children:(0,l.jsx)(R,{value:e.title,onChange:i=>t({title:i})})}),(0,l.jsx)(w,{label:"Description",hint:"Optional one-liner shown on the workflows index",children:(0,l.jsx)(ht,{rows:2,value:e.description??"",onChange:i=>t({description:i})})})]}),(0,l.jsxs)(L,{title:"Execution",children:[(0,l.jsx)(w,{label:"Priority",hint:"Higher numbers run before lower ones when multiple workflows match the same trigger",children:(0,l.jsx)(wn,{value:e.priority,onChange:i=>t({priority:i??0}),placeholder:"0"})}),(0,l.jsx)(w,{label:"",children:(0,l.jsx)(cs,{checked:!!e.fanOut,onChange:i=>t({fanOut:i}),label:"Fan out \u2014 let multiple workflows match the same trigger event"})}),(0,l.jsx)(w,{label:"Allowed env vars",hint:"Comma-separated. Only these env names are exposed to actions/agents in this flow.",children:(0,l.jsx)(St,{mono:!0,value:e.envAllow??[],onChange:i=>t({envAllow:i}),placeholder:"GITLAB_TOKEN, SLACK_WEBHOOK"})})]}),(0,l.jsxs)(L,{title:"Retention",defaultOpen:!1,children:[(0,l.jsx)(w,{label:"Max runs to keep",children:(0,l.jsx)(wn,{value:o.maxRuns,onChange:i=>t({retention:{...o,maxRuns:i??0}}),placeholder:"500"})}),(0,l.jsx)(w,{label:"Max age (days)",children:(0,l.jsx)(wn,{value:o.maxDays,onChange:i=>t({retention:{...o,maxDays:i??0}}),placeholder:"90"})})]}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",padding:"4px 16px 14px",borderTop:"1px solid var(--line-soft)",marginTop:4},children:["Tip: pick a node or edge on the canvas to edit its config. Each node's output becomes available as"," ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," to downstream nodes."]}),n&&!r&&(0,l.jsx)("div",{className:"insp__danger",children:(0,l.jsxs)("button",{className:"btn btn--ghost-icon insp__delete-wf",onClick:n,title:"Delete this workflow permanently",children:[(0,l.jsx)(z.trash,{})," Delete workflow"]})})]})]})}function fm({edge:e,patch:t,onDelete:n}){return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsx)("div",{className:"insp__head",children:(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:"edge"}),(0,l.jsxs)("div",{className:"insp__name",style:{padding:0,fontSize:13,color:"var(--ink-2)"},children:[(0,l.jsx)("span",{className:"mono",children:e.from}),e.fromPort?(0,l.jsxs)("span",{className:"mono",children:[" :",e.fromPort]}):null," \u2192 ",(0,l.jsx)("span",{className:"mono",children:e.to})]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:n,children:(0,l.jsx)(z.trash,{})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsx)(L,{title:"Label",children:(0,l.jsx)(w,{label:"Label",hint:"Shown on the edge (cosmetic only)",children:(0,l.jsx)(R,{mono:!0,value:e.label??"",onChange:r=>t({label:r})})})}),(0,l.jsx)(L,{title:"Port",defaultOpen:!1,children:(0,l.jsx)(w,{label:"fromPort",hint:"Set when the source is a branch node. Must match a case's `to` field or the default port.",children:(0,l.jsx)(R,{mono:!0,value:e.fromPort??"",onChange:r=>t({fromPort:r||void 0})})})})]})]})}var or=oe(Ct(),1);var $=oe(be(),1);function up({onLoadTemplate:e}){let[t,n]=(0,or.useState)(""),r=(0,or.useMemo)(()=>{if(!t.trim())return is;let o=t.toLowerCase();return is.map(i=>({...i,items:i.items.filter(a=>a.label.toLowerCase().includes(o)||a.hint.toLowerCase().includes(o)||a.type.includes(o))})).filter(i=>i.items.length>0)},[t]);return(0,$.jsxs)("aside",{className:"pal",children:[(0,$.jsxs)("div",{className:"pal__search",children:[(0,$.jsx)(z.search,{}),(0,$.jsx)("input",{value:t,onChange:o=>n(o.target.value),placeholder:"Search nodes\u2026"}),(0,$.jsx)("kbd",{children:"/"})]}),(0,$.jsxs)("div",{className:"pal__scroll",children:[r.map(o=>(0,$.jsxs)(or.Fragment,{children:[(0,$.jsxs)("div",{className:"pal__section",children:[(0,$.jsx)("span",{children:o.section}),(0,$.jsx)("span",{className:"pal__section-count",children:o.items.length.toString().padStart(2,"0")})]}),o.items.map(i=>(0,$.jsx)(gm,{item:i},i.id))]},o.section)),!t&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"pal__section",children:[(0,$.jsx)("span",{children:"Templates"}),(0,$.jsx)("span",{className:"pal__section-count",children:ls.length.toString().padStart(2,"0")})]}),ls.map(o=>(0,$.jsxs)("div",{className:"pal__tpl",onClick:()=>e(o),children:[(0,$.jsx)("div",{className:"pal__tpl-dots",children:[0,1,2].map(i=>(0,$.jsx)("span",{className:i<o.dots?"on":""},i))}),(0,$.jsx)("div",{className:"pal__tpl-title",children:o.title}),(0,$.jsx)("div",{className:"pal__tpl-hint",children:o.hint})]},o.id))]})]}),(0,$.jsxs)("div",{className:"pal__foot",children:[(0,$.jsx)(z.lightning,{}),(0,$.jsx)("span",{children:"Drag items onto the canvas"})]})]})}function gm({item:e}){let t=z[e.icon]??z.box;return(0,$.jsxs)("div",{className:"pal__item",draggable:!0,onDragStart:r=>{r.dataTransfer.setData("application/x-wfe-item",JSON.stringify(e)),r.dataTransfer.effectAllowed="copy";let o=document.createElement("div");o.textContent=e.label,o.style.cssText="position:absolute;top:-1000px;padding:6px 10px;background:var(--accent);color:#fff;border-radius:6px;font:500 12px 'Space Grotesk';",document.body.appendChild(o),r.dataTransfer.setDragImage(o,10,10),setTimeout(()=>document.body.removeChild(o),0)},children:[(0,$.jsx)("div",{className:"pal__glyph "+e.glyph,children:(0,$.jsx)(t,{})}),(0,$.jsxs)("div",{className:"pal__meta",children:[(0,$.jsx)("div",{className:"pal__label",children:e.label}),(0,$.jsx)("div",{className:"pal__hint",children:e.hint})]})]})}var ds=oe(Ct(),1);var b=oe(be(),1);function cp(e){return(0,b.jsxs)("div",{className:"tb",children:[(0,b.jsxs)("div",{className:"tb__brand",children:[(0,b.jsx)("div",{className:"tb__mark",children:"\u2726"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"tb__brand-label",children:"Workflow Editor"}),(0,b.jsx)("div",{className:"tb__brand-sub",children:e.workflowIdLabel})]})]}),(0,b.jsxs)("div",{className:"tb__main",children:[(0,b.jsxs)("div",{className:"tb__crumbs",children:[(0,b.jsx)("a",{href:"/workflows",children:"Workflows"}),(0,b.jsx)("span",{className:"sep",children:"/"}),(0,b.jsx)("input",{value:e.title,onChange:t=>e.setTitle(t.target.value)})]}),(0,b.jsx)("span",{className:"tb__sep"}),(0,b.jsxs)("div",{className:"tb__status "+e.status,children:[(0,b.jsx)("span",{className:"dot"}),e.statusLabel??(e.status==="is-dirty"?"unsaved":e.status==="is-running"?"running":e.status==="is-validating"?"validating\u2026":"saved")]}),(0,b.jsx)("div",{className:"tb__spacer"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.paletteOpen?" is-active":""),title:e.paletteOpen?"Hide palette":"Show palette",onClick:()=>e.setPaletteOpen(!e.paletteOpen),children:(0,b.jsx)(z.panelLeft,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.inspectorOpen?" is-active":""),title:e.inspectorOpen?"Hide inspector":"Show inspector",onClick:()=>e.setInspectorOpen(!e.inspectorOpen),children:(0,b.jsx)(z.panelRight,{})}),(0,b.jsx)("span",{className:"tb__sep"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Undo (\u2318Z)",onClick:e.onUndo,disabled:!e.canUndo,children:(0,b.jsx)(z.undo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Redo (\u2318\u21E7Z)",onClick:e.onRedo,disabled:!e.canRedo,children:(0,b.jsx)(z.redo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Auto layout",onClick:e.onLayout,children:(0,b.jsx)(z.layout,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Keyboard shortcuts",onClick:e.onHelp,children:(0,b.jsx)(z.kbd,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.tweaksOpen?" is-active":""),title:"Tweaks",onClick:()=>e.setTweaksOpen(!e.tweaksOpen),children:(0,b.jsx)(z.gear,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Toggle theme",onClick:()=>e.setTheme(e.theme==="dark"?"light":"dark"),children:e.theme==="dark"?(0,b.jsx)(z.sun,{}):(0,b.jsx)(z.moon,{})})]}),(0,b.jsxs)("div",{className:"tb__actions",children:[(0,b.jsxs)("button",{className:"btn btn--outline",onClick:e.onSave,children:[(0,b.jsx)(z.save,{})," Save"]}),(0,b.jsx)("button",{className:"btn btn--primary",onClick:e.onRun,children:e.running?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.stop2,{})," Stop"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z.run,{})," Run preview"]})})]})]})}function dp({running:e,script:t,cursor:n,onStop:r}){if(!e)return null;let o=t.filter(i=>i.nodeId);return(0,b.jsxs)("div",{className:"run",children:[(0,b.jsxs)("div",{className:"run__head",children:[(0,b.jsx)(z.lightning,{}),(0,b.jsx)("div",{className:"run__title",children:"Live run"}),(0,b.jsxs)("span",{className:"run__chip",children:[(0,b.jsx)("span",{className:"dot"})," streaming"]}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",onClick:r,style:{height:24,width:24},children:(0,b.jsx)(z.x,{})})]}),(0,b.jsx)("div",{className:"run__body",children:o.map((i,a)=>{let u=t.indexOf(i),s=u<n,c=["run__step"];return s&&c.push("is-done"),u===n&&c.push("is-current"),(0,b.jsxs)("div",{className:c.join(" "),children:[(0,b.jsx)("div",{className:"run__marker",children:s?(0,b.jsx)(z.check,{}):a+1}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{className:"run__step-title",children:i.title}),i.body&&(0,b.jsx)("div",{className:"run__step-body",dangerouslySetInnerHTML:{__html:i.body}})]})]},a)})}),(0,b.jsxs)("div",{className:"run__foot",children:[(0,b.jsxs)("span",{children:[Math.min(n+1,t.length),"/",t.length]}),(0,b.jsxs)("span",{children:[t.length?Math.round((n+1)/t.length*100):0,"%"]})]})]})}var hm=[{h:255,name:"indigo"},{h:220,name:"blue"},{h:180,name:"teal"},{h:145,name:"green"},{h:70,name:"amber"},{h:28,name:"orange"},{h:330,name:"pink"}];function pp(e){return e.open?(0,b.jsxs)("div",{className:"tweaks",children:[(0,b.jsxs)("div",{className:"tweaks__head",children:[(0,b.jsx)("span",{children:"Tweaks"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",style:{height:22,width:22},onClick:()=>e.setOpen(!1),children:(0,b.jsx)(z.x,{})})]}),(0,b.jsxs)("div",{className:"tweaks__body",children:[(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Theme"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["dark","light"].map(t=>(0,b.jsx)("button",{className:e.theme===t?"on":"",onClick:()=>e.setTheme(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Density"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["compact","cozy","roomy"].map(t=>(0,b.jsx)("button",{className:e.density===t?"on":"",onClick:()=>e.setDensity(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",style:{alignItems:"flex-start",flexDirection:"column",gap:6},children:[(0,b.jsx)("label",{children:"Accent hue"}),(0,b.jsx)("div",{className:"tweaks__hue",children:hm.map(t=>(0,b.jsx)("button",{title:t.name,className:e.hue===t.h?"on":"",style:{background:`oklch(0.70 0.16 ${t.h})`},onClick:()=>e.setHue(t.h)},t.h))})]})]})]}):null}function fp({open:e,onClose:t}){return e?(0,b.jsx)("div",{className:"kbd-overlay",onClick:t,children:(0,b.jsxs)("div",{className:"kbd-card",onClick:r=>r.stopPropagation(),children:[(0,b.jsx)("h3",{children:"Keyboard shortcuts"}),[["Save workflow","\u2318S"],["Undo / Redo","\u2318Z / \u2318\u21E7Z"],["Delete selection","Delete"],["Duplicate node","\u2318D"],["Run preview","\u2318\u23CE"],["Focus search","/"],["Fit view","F"],["Close panels","Esc"]].map(([r,o])=>(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("span",{children:r}),(0,b.jsx)("span",{children:o.split(" ").map((i,a)=>(0,b.jsxs)(ds.Fragment,{children:[i.includes("/")?i.split("/").map((u,s)=>(0,b.jsxs)(ds.Fragment,{children:[s>0&&" / ",(0,b.jsx)("kbd",{children:u.trim()})]},s)):(0,b.jsx)("kbd",{children:i})," "]},a))})]},r))]})}):null}var Te=oe(Ct(),1),V=oe(be(),1),fs="agentx.editor.chat.v1";function gp({currentWorkflow:e,onApplyWorkflow:t,agentId:n}){let[r,o]=(0,Te.useState)(!1),[i,a]=(0,Te.useState)(()=>xm()),[u,s]=(0,Te.useState)(""),[c,d]=(0,Te.useState)(!1),g=(0,Te.useRef)(null),m=(0,Te.useRef)(null);(0,Te.useEffect)(()=>{let f=i.filter(p=>!p.pending).map(p=>({role:p.role,content:p.content}));try{sessionStorage.setItem(fs,JSON.stringify(f))}catch{}},[i]),(0,Te.useEffect)(()=>{let f=g.current;f&&(f.scrollTop=f.scrollHeight)},[i,r]),(0,Te.useEffect)(()=>{r&&m.current?.focus()},[r]);let y=(0,Te.useCallback)(async()=>{let f=u.trim();if(!f||c)return;let p=i.filter(x=>!x.pending).map(x=>({role:x.role,content:x.content})),h=[...i,{role:"user",content:f},{role:"assistant",content:"\u2026",pending:!0}];a(h),s(""),d(!0);try{let x=await fetch("/api/workflows/editor/chat",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"agentx-board"},body:JSON.stringify({messages:[...p,{role:"user",content:f}],currentWorkflow:e,agentId:n})}),C=await x.json().catch(()=>({}));x.ok?a(M=>ps(M,{role:"assistant",content:C.reply||"",workflow:C.workflow||void 0})):a(M=>ps(M,{role:"assistant",content:"",error:C.error||`HTTP ${x.status}`}))}catch(x){a(C=>ps(C,{role:"assistant",content:"",error:x?.message||"network error"}))}finally{d(!1)}},[n,c,e,u,i]),k=()=>{a([]);try{sessionStorage.removeItem(fs)}catch{}},S=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),y())},B=(0,Te.useMemo)(()=>["Describe the process you want \u2014 I'll generate the workflow.","","Examples:",'\u2022 "Expense approval: employee submits form, manager approves over $500 otherwise auto-approve"','\u2022 "Telegram bot that classifies messages as billing/bug/other and routes to the right agent"',`\u2022 "Triage a GitLab issue: label 'bug' \u2192 dev agent; label 'feature' \u2192 product agent; otherwise close"`].join(`
|
|
1258
|
+
`),[]);return(0,V.jsxs)(V.Fragment,{children:[!r&&(0,V.jsxs)("button",{className:"ax-chat__pill","aria-label":"Open workflow assistant",onClick:()=>o(!0),children:[(0,V.jsx)("span",{className:"ax-chat__pill-glyph",children:"\u2728"}),(0,V.jsx)("span",{className:"ax-chat__pill-text",children:"Ask AI to build\u2026"})]}),r&&(0,V.jsxs)("div",{className:"ax-chat__panel",role:"dialog","aria-label":"Workflow assistant",children:[(0,V.jsxs)("header",{className:"ax-chat__head",children:[(0,V.jsxs)("div",{className:"ax-chat__title",children:[(0,V.jsx)("span",{className:"ax-chat__dot"})," Workflow assistant"]}),(0,V.jsxs)("div",{className:"ax-chat__head-actions",children:[(0,V.jsx)("button",{className:"ax-chat__iconbtn",onClick:k,title:"Clear conversation",children:"\u232B"}),(0,V.jsx)("button",{className:"ax-chat__iconbtn",onClick:()=>o(!1),title:"Collapse",children:"\u25BC"})]})]}),(0,V.jsxs)("div",{className:"ax-chat__body",ref:g,children:[i.length===0&&(0,V.jsx)("pre",{className:"ax-chat__empty",children:B}),i.map((f,p)=>(0,V.jsx)(mm,{m:f,onApply:t},p))]}),(0,V.jsxs)("footer",{className:"ax-chat__foot",children:[(0,V.jsx)("textarea",{ref:m,className:"ax-chat__input",value:u,onChange:f=>s(f.target.value),onKeyDown:S,placeholder:"Describe the workflow you want\u2026 (Enter to send, Shift+Enter for newline)",rows:2,disabled:c}),(0,V.jsx)("button",{className:"ax-chat__send",onClick:()=>void y(),disabled:c||!u.trim(),children:c?"\u2026":"Send"})]})]}),(0,V.jsx)("style",{children:wm})]})}function mm({m:e,onApply:t}){if(e.error)return(0,V.jsxs)("div",{className:"ax-chat__msg ax-chat__msg--err",children:["\u26A0 ",e.error]});if(e.pending)return(0,V.jsx)("div",{className:"ax-chat__msg ax-chat__msg--assistant ax-chat__msg--pending",children:(0,V.jsxs)("span",{className:"ax-chat__typing",children:[(0,V.jsx)("span",{}),(0,V.jsx)("span",{}),(0,V.jsx)("span",{})]})});let n=e.role==="user"?"ax-chat__msg ax-chat__msg--user":"ax-chat__msg ax-chat__msg--assistant",r=vm(e.content,!!e.workflow),o=e.role==="assistant"?ym(r):Ri(r);return(0,V.jsxs)("div",{className:n,children:[(0,V.jsx)("div",{className:"ax-chat__text",dangerouslySetInnerHTML:{__html:o}}),e.workflow&&(0,V.jsxs)("div",{className:"ax-chat__apply",children:[(0,V.jsx)("button",{className:"ax-chat__applybtn",onClick:()=>t(e.workflow),children:"Apply to canvas"}),(0,V.jsx)("span",{className:"ax-chat__apply-hint",children:"replaces the current workflow"})]})]})}function vm(e,t){return t?e.replace(/```(?:json)?\s*\n[\s\S]*?```/g,"").trim():e}function Ri(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ym(e){let t=[],n=e.replace(/```([a-zA-Z0-9_-]*)\n([\s\S]*?)```/g,(d,g,m)=>{let y=Ri(m.replace(/\n+$/,"")),k=g?` class="lang-${Ri(g)}"`:"";return t.push(`<pre><code${k}>${y}</code></pre>`),`\0CODE${t.length-1}\0`});n=Ri(n),n=n.replace(/`([^`\n]+)`/g,(d,g)=>`<code>${g}</code>`),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(d,g,m)=>`<a href="${/^https?:\/\/|^\//.test(m)?m:"#"}" target="_blank" rel="noopener noreferrer">${g}</a>`),n=n.replace(/\*\*([^*\n]+)\*\*/g,"<strong>$1</strong>"),n=n.replace(/(?<!\*)\*([^*\n]+)\*(?!\*)/g,"<em>$1</em>");let r=n.split(`
|
|
1257
1259
|
`),o=[],i=null,a=()=>{i&&(o.push(`</${i}>`),i=null)},u=[],s=()=>{if(!u.length)return;let d=u.join(" ").trim();d&&o.push(`<p>${d}</p>`),u=[]};for(let d of r){let g=d.trimEnd();if(/^\s*$/.test(g)){s(),a();continue}let m=/^(#{1,3})\s+(.+)/.exec(g);if(m){s(),a();let S=m[1].length+2;o.push(`<h${S}>${m[2]}</h${S}>`);continue}let y=/^\s*[-*]\s+(.+)/.exec(g);if(y){s(),i!=="ul"&&(a(),o.push("<ul>"),i="ul"),o.push(`<li>${y[1]}</li>`);continue}let k=/^\s*\d+\.\s+(.+)/.exec(g);if(k){s(),i!=="ol"&&(a(),o.push("<ol>"),i="ol"),o.push(`<li>${k[1]}</li>`);continue}a(),u.push(g)}s(),a();let c=o.join(`
|
|
1258
|
-
`);return c=c.replace(/CODE(\d+)/g,(d,g)=>t[Number(g)]||""),c}function ps(e,t){let n=[...e];for(let r=n.length-1;r>=0;r--)if(n[r].pending||n[r].role==="assistant")return n[r]=t,n;return n.push(t),n}function
|
|
1260
|
+
`);return c=c.replace(/CODE(\d+)/g,(d,g)=>t[Number(g)]||""),c}function ps(e,t){let n=[...e];for(let r=n.length-1;r>=0;r--)if(n[r].pending||n[r].role==="assistant")return n[r]=t,n;return n.push(t),n}function xm(){try{let e=sessionStorage.getItem(fs);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>n&&(n.role==="user"||n.role==="assistant")&&typeof n.content=="string"):[]}catch{return[]}}var wm=`
|
|
1259
1261
|
.ax-chat__pill {
|
|
1260
1262
|
position: fixed; bottom: 18px; right: 18px; z-index: 40;
|
|
1261
1263
|
display: flex; align-items: center; gap: 8px;
|
|
@@ -1398,9 +1400,9 @@ code, .mono {
|
|
|
1398
1400
|
.ax-chat__head { background: linear-gradient(135deg, rgba(107,91,255,0.15), rgba(139,92,246,0.08)); }
|
|
1399
1401
|
.ax-chat__input { background: #2a2a2a; color: #eee; border-color: rgba(255,255,255,0.15); }
|
|
1400
1402
|
}
|
|
1401
|
-
`;function oo(e,t){let n=t?.nodes??{},r=e.nodes.map(i=>({...i,position:i.position??n[i.id]??void 0})),o=e.edges.map((i,a)=>({...i,id:xm(i,a)}));return{meta:{id:e.id,version:2,title:e.title,description:e.description,priority:e.priority,fanOut:e.fanOut,envAllow:e.envAllow,retention:e.retention,mesh:e.mesh},nodes:r,edges:o}}function gs(e){let t={id:e.meta.id,version:2,title:e.meta.title,description:e.meta.description,priority:e.meta.priority,fanOut:e.meta.fanOut,nodes:e.nodes.map(r=>({id:r.id,type:r.type,config:r.config??{},position:r.position})),edges:e.edges.map(r=>{let{id:o,...i}=r;return i}),envAllow:e.meta.envAllow,retention:e.meta.retention,mesh:e.meta.mesh??{allowRemote:!1}},n={version:1,nodes:Object.fromEntries(e.nodes.filter(r=>r.position).map(r=>[r.id,{x:r.position.x,y:r.position.y}]))};return{workflow:t,layout:n}}function io(e){return{meta:{id:/^[a-z0-9][a-z0-9_-]*$/.test(e)?e:"new-workflow",version:2,title:"New workflow",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90},mesh:{allowRemote:!1}},nodes:[{id:"trigger",type:"trigger.manual",config:{},position:{x:40,y:80}},{id:"end",type:"end",config:{status:"completed"},position:{x:400,y:80}}],edges:[{id:"e-trigger-end",from:"trigger",to:"end"}]}}function xm(e,t){let n=o=>o.replace(/[^a-zA-Z0-9._-]/g,"_");return`e-${[n(e.from),e.fromPort?n(e.fromPort):"out",n(e.to),String(t)].join("-")}`}var hs="__trigger__";function wm(){try{return localStorage.getItem("ax_token")||""}catch{return""}}function kn(){let e={"Content-Type":"application/json","X-Requested-With":"agentx-board"},t=wm();return t&&(e.Authorization="Bearer "+t),e}async function hp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e),{headers:kn()});if(!t.ok)throw new Error("fetch workflow "+e+": "+t.status);return(await t.json()).workflow}async function mp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{headers:kn()});return t.ok?(await t.json()).layout:null}async function vp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e.id)+"/validate",{method:"POST",headers:kn(),body:JSON.stringify(e)});return t.ok?await t.json():{ok:!1,issues:[{path:"",message:"HTTP "+t.status}]}}async function yp(e,t){let n=t.create?"/api/workflows":"/api/workflows/"+encodeURIComponent(e.id),r=t.create?"POST":"PUT",o=await fetch(n,{method:r,headers:kn(),body:JSON.stringify(e)});if(o.ok)return{ok:!0};let i=await o.json().catch(()=>({}));return{ok:!1,issues:i.issues||[{path:"",message:i.error||"HTTP "+o.status}]}}async function xp(e,t){await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{method:"PUT",headers:kn(),body:JSON.stringify(t)})}async function wp(e){return(await fetch("/api/workflows/"+encodeURIComponent(e),{method:"DELETE",headers:kn()})).ok}async function kp(){try{let e=await fetch("/api/agents",{headers:kn()});if(!e.ok)return[];let t=await e.json();if(Array.isArray(t))return t.map(n=>typeof n=="string"?{id:n,name:n}:n&&typeof n=="object"&&"id"in n?{id:String(n.id),name:String(n.name??n.id)}:null).filter(n=>n!==null);if(t&&typeof t=="object"&&"agents"in t){let n=t.agents;if(Array.isArray(n))return n.map(r=>({id:String(r.id??r),name:String(r.name??r.id??r)}))}return[]}catch{return[]}}var Xe=oe(be(),1);function km(e,t){switch(t.type){case"hydrate":return{meta:t.graph.meta,nodes:t.graph.nodes,edges:t.graph.edges,selection:null,isNew:t.isNew};case"setTitle":return{...e,meta:{...e.meta,title:t.title}};case"patchMeta":return{...e,meta:{...e.meta,...t.patch}};case"select":return{...e,selection:t.selection};case"moveNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,position:{x:t.x,y:t.y}}:n)};case"patchNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"patchNodeData":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,config:{...n.config,...t.patch}}:n)};case"patchEdge":return{...e,edges:e.edges.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"addNode":{let n="n-"+Math.random().toString(36).slice(2,8),r={id:n,type:t.item.type,position:{x:t.x,y:t.y},config:_m(t.item)};return{...e,nodes:[...e.nodes,r],selection:{kind:"node",id:n}}}case"connect":{if(t.conn.from===t.conn.to)return e;let n="e-"+Math.random().toString(36).slice(2,8),r=e.nodes.find(a=>a.id===t.conn.from),o=t.conn.fromPort==="true"||t.conn.fromPort==="false"?t.conn.fromPort:"",i={id:n,from:t.conn.from,fromPort:t.conn.fromPort,to:t.conn.to,toPort:"in",label:o||(r?.type?.startsWith("trigger.")?"start":"")};return e.edges.some(a=>a.from===i.from&&a.fromPort===i.fromPort&&a.to===i.to)?e:{...e,edges:[...e.edges,i]}}case"delete":{let n=t.selection??e.selection;return n?n.kind==="node"?n.id===hs?e:{...e,nodes:e.nodes.filter(r=>r.id!==n.id),edges:e.edges.filter(r=>r.from!==n.id&&r.to!==n.id),selection:null}:n.kind==="edge"?{...e,edges:e.edges.filter(r=>r.id!==n.id),selection:null}:e:e}case"duplicate":{let n=t.selection??e.selection;if(!n||n.kind!=="node")return e;let r=e.nodes.find(u=>u.id===n.id);if(!r||r.id===hs)return e;let o="n-"+Math.random().toString(36).slice(2,8),i=r.position??{x:0,y:0},a={...r,id:o,position:{x:i.x+40,y:i.y+40}};return{...e,nodes:[...e.nodes,a],selection:{kind:"node",id:o}}}case"layout":{let n=bm(e.nodes,e.edges);return{...e,nodes:e.nodes.map(r=>({...r,...n[r.id]??{}}))}}case"setAll":return t.state}}function _m(e){switch(e.type){case"trigger.channel":return{source:e.id.endsWith("whatsapp")?"whatsapp-message":e.id.endsWith("telegram")?"telegram-message":e.id.endsWith("gitlab")?"gitlab-issue":"whatsapp-message",filter:{chat:"*"}};case"trigger.cron":return{spec:"0 * * * *"};case"trigger.manual":return{};case"trigger.hook":return{event:"on:hook"};case"trigger.form":return{form:{title:"New request",fields:[],submitLabel:"Submit"}};case"agent":return{agentId:"",prompt:"",resultParser:"noqta-result-token"};case"transform":return{expr:""};case"branch":return{cases:[{when:{kind:"equals",params:{path:"",value:""}},to:"case1"}],default:"fallback"};case"gateway.parallel":return{mode:"fanOut"};case"rule":return{inputs:[""],rules:[{when:["*"],to:"match",output:{}}],default:{to:"fallback",output:{}}};case"checkpoint":return{name:"wait",waitFor:{source:"manual"},resumeMatch:{}};case"userTask":return{assignTo:"role:reviewers",title:"",form:{title:"Review",fields:[],submitLabel:"Approve",secondaryAction:{key:"reject",label:"Reject"}}};case"subProcess":return{workflowId:"",inputMap:{},awaitCompletion:!0};case"signal.emit":return{name:"",scope:"workflow",payload:{}};case"signal.wait":return{name:"",scope:"workflow",match:{}};case"timer.boundary":return{after:"PT1H"};case"action.send":return{channel:"gitlab",chatId:"",text:""};case"action.createIssue":return{channel:"gitlab",project:"",title:"",description:"",labels:[]};case"action.setLabel":return{channel:"gitlab",add:[],remove:[]};case"action.readLabel":return{channel:"gitlab"};case"action.react":return{channel:"gitlab",emoji:"\u{1F440}"};case"action.editMessage":return{channel:"gitlab",messageId:"",text:""};case"action.logTime":return{channel:"gitlab"};case"action.callHTTP":return{url:"",method:"POST"};case"end":return{status:"completed"}}return{}}function bm(e,t){let n=Object.fromEntries(e.map(s=>[s.id,s])),r={};e.forEach(s=>{r[s.id]=0}),t.forEach(s=>{n[s.to]&&(r[s.to]=(r[s.to]??0)+1)});let o={},i=(s,c)=>{o[s]=Math.max(o[s]??0,c),t.filter(d=>d.from===s).forEach(d=>i(d.to,c+1))};e.filter(s=>(r[s.id]??0)===0).forEach(s=>i(s.id,0));let a={};Object.entries(o).forEach(([s,c])=>{(a[c]??(a[c]=[])).push(s)});let u={};return Object.entries(a).forEach(([s,c])=>{c.forEach((d,g)=>{u[d]={x:80+Number(s)*280,y:120+g*170}})}),u}function Sm(e){let[t,n]=(0,O.useReducer)(km,e),r=(0,O.useRef)([]),o=(0,O.useRef)([]),i=(0,O.useRef)(t);(0,O.useEffect)(()=>{i.current=t},[t]);let a=(0,O.useCallback)(d=>{d.type==="select"||d.type==="moveNode"||(r.current.push(i.current),r.current.length>50&&r.current.shift(),o.current=[]),n(d)},[]),u=(0,O.useCallback)(()=>{let d=r.current.pop();d&&(o.current.push(i.current),n({type:"setAll",state:d}))},[]),s=(0,O.useCallback)(()=>{let d=o.current.pop();d&&(r.current.push(i.current),n({type:"setAll",state:d}))},[]),c=(0,O.useCallback)(d=>{r.current=[],o.current=[],n({type:"setAll",state:d})},[]);return{state:t,dispatch:a,undo:u,redo:s,forceReset:c,canUndo:r.current.length>0,canRedo:o.current.length>0}}function Nm(e){let t={},n=(r,o)=>{(t[r]??(t[r]=[])).push({message:o})};for(let r of e.nodes){let o=r.config;r.type==="agent"&&!o.agentId&&n(r.id,"Agent node has no agentId selected."),r.type==="branch"&&(!Array.isArray(o.cases)||o.cases.length===0)&&n(r.id,"Branch has no cases \u2014 add at least one.");let i=r.type==="end",a=r.type.startsWith("trigger.");!i&&!a&&!e.edges.some(u=>u.from===r.id)&&n(r.id,"No outgoing connection \u2014 the flow dead-ends here.")}return t}function Cm(e){let t=[],n=Object.fromEntries(e.nodes.map(a=>[a.id,a])),r=new Set,o=a=>{if(r.has(a))return;r.add(a);let u=n[a];if(!u)return;let s=u.config;t.push({nodeId:u.id,edgeId:null,title:`${u.id}${s.agentId?` \u2192 ${String(s.agentId)}`:""}`,body:s.prompt?`<span class="mono">${String(s.prompt).slice(0,200)}</span>`:null});let c=e.edges.filter(d=>d.from===a);for(let d of c){let g=d.id??"";t.push({nodeId:null,edgeId:g,title:null,body:null}),o(d.to)}},i=e.nodes.find(a=>a.type.startsWith("trigger."))?.id;return i&&o(i),t}function _p(){let{state:e,dispatch:t,undo:n,redo:r,forceReset:o,canUndo:i,canRedo:a}=Sm({meta:{id:"loading",version:2,title:"Loading\u2026",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90}},nodes:[],edges:[],selection:null,isNew:!0}),{meta:u,nodes:s,edges:c,selection:d,isNew:g}=e,m=(0,O.useRef)(e);(0,O.useEffect)(()=>{m.current=e},[e]);let[y,k]=(0,O.useState)(()=>localStorage.getItem("wfe.theme")??"dark"),[S,B]=(0,O.useState)(()=>localStorage.getItem("wfe.density")??"cozy"),[f,p]=(0,O.useState)(()=>Number(localStorage.getItem("wfe.hue")??255)),[h,x]=(0,O.useState)(()=>localStorage.getItem("wfe.paletteOpen")!=="0"),[C,M]=(0,O.useState)(()=>localStorage.getItem("wfe.inspectorOpen")!=="0"),[F,P]=(0,O.useState)({zoom:.75,tx:40,ty:60});(0,O.useEffect)(()=>{document.documentElement.dataset.theme=y,localStorage.setItem("wfe.theme",y)},[y]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.density",S)},[S]),(0,O.useEffect)(()=>{document.documentElement.style.setProperty("--accent-hue",String(f)),localStorage.setItem("wfe.hue",String(f))},[f]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.paletteOpen",h?"1":"0")},[h]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.inspectorOpen",C?"1":"0")},[C]);let K=R=>k(R),[W,ve]=(0,O.useState)(!1),[ir,_n]=(0,O.useState)(!1),[ar,ao]=(0,O.useState)(null),[lr,ht]=(0,O.useState)("is-saved"),mt=(R,A="ok")=>{ao({msg:R,kind:A}),setTimeout(()=>ao(null),2e3)},[Li,zi]=(0,O.useState)(op);(0,O.useEffect)(()=>{(async()=>{let R=await kp();if(!R.length)return;let A=R.map((ce,xe)=>({id:ce.id,name:ce.name||ce.id,tags:[],color:xe*37%360}));zi(A)})()},[]),(0,O.useEffect)(()=>{let R=new URLSearchParams(location.search),A=R.get("new")==="1",ce=R.get("id")||"new-workflow";if(A){o(Oi(io(ce),!0));return}(async()=>{try{let[xe,He]=await Promise.all([hp(ce),mp(ce)]),Me=oo(xe,He);o(Oi(Me,!1))}catch(xe){mt(`Failed to load "${ce}": ${xe.message}`,"err"),o(Oi(io(ce),!0))}})()},[]),(0,O.useEffect)(()=>{u.id!=="loading"&&ht("is-dirty")},[s,c,u]);let sr=(0,O.useCallback)(async()=>{let R=m.current,{workflow:A,layout:ce}=gs({meta:R.meta,nodes:R.nodes,edges:R.edges});ht("is-validating");let xe=await vp(A);if(!xe.ok){ht("is-dirty"),mt(`${xe.issues.length} validation issue${xe.issues.length===1?"":"s"}`,"err");return}let He=await yp(A,{create:R.isNew});if(!He.ok){ht("is-dirty"),mt(He.issues?.[0]?.message??"Save failed","err");return}try{await xp(A.id,ce)}catch{}if(ht("is-saved"),mt("Saved","ok"),R.isNew){t({type:"patchMeta",patch:{}});let Me=new URL(location.href);Me.searchParams.delete("new"),Me.searchParams.set("id",A.id),history.replaceState(null,"",Me.toString()),o({...R,isNew:!1})}},[t,o]),bn=(0,O.useCallback)(R=>t({type:"delete",selection:R}),[t]),ur=(0,O.useCallback)(R=>t({type:"duplicate",selection:R}),[t]),Ai=(0,O.useCallback)((R,A,ce)=>t({type:"addNode",item:R,x:A,y:ce}),[t]),Di=(0,O.useCallback)(R=>t({type:"connect",conn:R}),[t]),ji=(0,O.useCallback)((R,A,ce)=>t({type:"moveNode",id:R,x:A,y:ce}),[t]),E=(0,O.useCallback)(R=>t({type:"select",selection:R,commit:!0}),[t]),j=R=>{d&&(d.kind==="node"&&t({type:"patchNode",id:d.id,patch:R}),d.kind==="edge"&&t({type:"patchEdge",id:d.id,patch:R}))},U=R=>{!d||d.kind!=="node"||t({type:"patchNodeData",id:d.id,patch:R})},Q=async R=>{if(!confirm(`Replace the current workflow with the "${R.title}" template? (Undoable)`))return;let A=await Em(R.id,u.id);o(Oi(A,g)),mt(`Loaded ${R.title}`,"ok")},[q,Be]=(0,O.useState)(!1),[Z,qe]=(0,O.useState)(-1),Le=(0,O.useMemo)(()=>Cm(e),[e]),ye=(0,O.useRef)(null),at=()=>{ye.current&&window.clearInterval(ye.current),Be(!1),ht("is-saved")},cr=()=>{Be(!0),qe(0),ht("is-running"),ye.current&&window.clearInterval(ye.current),ye.current=window.setInterval(()=>{qe(R=>R>=Le.length-1?(ye.current&&window.clearInterval(ye.current),Be(!1),ht("is-saved"),R):R+1)},900)};(0,O.useEffect)(()=>()=>{ye.current&&window.clearInterval(ye.current)},[]);let dr=(0,O.useMemo)(()=>{if(!q&&Z<0)return null;let R=new Set,A=new Set,ce=null,xe=null;for(let Me=0;Me<=Z;Me++){let Ge=Le[Me];Ge&&(Ge.nodeId&&(Me===Z?ce=Ge.nodeId:R.add(Ge.nodeId)),Ge.edgeId&&(Me===Z?xe=Ge.edgeId:A.add(Ge.edgeId)))}let He={};for(let Me=0;Me<=Z;Me++){let Ge=Le[Me];!Ge||!Ge.nodeId||!Ge.body||(He[Ge.nodeId]=Ge.body)}return{visitedNodes:R,visitedEdges:A,currentNodeId:ce,currentEdgeId:xe,outputs:He}},[q,Z,Le]),lo=(0,O.useMemo)(()=>Nm(e),[e]),Cp=d?.kind==="node"?lo[d.id]:void 0;(0,O.useEffect)(()=>{let R=A=>{let ce=document.activeElement,xe=!!ce&&/^(INPUT|TEXTAREA|SELECT)$/.test(ce.tagName);A.key==="?"&&!xe&&_n(!0),A.key==="Escape"&&(_n(!1),ve(!1));let He=A.metaKey||A.ctrlKey;He&&A.key.toLowerCase()==="z"&&!A.shiftKey?(A.preventDefault(),n()):He&&(A.key.toLowerCase()==="y"||A.shiftKey&&A.key.toLowerCase()==="z")?(A.preventDefault(),r()):He&&A.key.toLowerCase()==="s"?(A.preventDefault(),sr()):He&&A.key==="Enter"?(A.preventDefault(),q?at():cr()):He&&A.key.toLowerCase()==="d"&&!xe&&d?(A.preventDefault(),ur(d)):(A.key==="Delete"||A.key==="Backspace")&&!xe&&d?bn(d):A.key==="/"&&!xe&&(A.preventDefault(),document.querySelector(".pal__search input")?.focus())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[d,q,n,r,sr,bn,ur]),(0,O.useEffect)(()=>{let R=A=>{lr==="is-dirty"&&(A.preventDefault(),A.returnValue="")};return window.addEventListener("beforeunload",R),()=>window.removeEventListener("beforeunload",R)},[lr]);let Ep=async()=>{if(g||!confirm(`Delete workflow "${u.id}"? This cannot be undone.`))return;await wp(u.id)?(mt("Deleted","ok"),setTimeout(()=>{location.href="/workflows"},500)):mt("Delete failed","err")};return(0,Xe.jsxs)("div",{className:"app","data-density":S,"data-palette":h?"open":"closed","data-inspector":C?"open":"closed",children:[(0,Xe.jsx)(cp,{title:u.title,setTitle:R=>t({type:"setTitle",title:R}),status:lr,theme:y,setTheme:K,canUndo:i,canRedo:a,onUndo:n,onRedo:r,onSave:()=>void sr(),onRun:()=>q?at():cr(),running:q,tweaksOpen:W,setTweaksOpen:ve,onHelp:()=>_n(!0),onLayout:()=>t({type:"layout"}),workflowIdLabel:`/workflows/${u.id}`,paletteOpen:h,setPaletteOpen:x,inspectorOpen:C,setInspectorOpen:M}),h&&(0,Xe.jsx)(up,{onLoadTemplate:Q}),(0,Xe.jsx)(rp,{nodes:s,edges:c,selection:d,setSelection:E,onNodeMove:ji,onAddNode:Ai,onConnect:Di,onDelete:bn,runState:dr,viewBox:F,setViewBox:P}),C&&(0,Xe.jsx)(sp,{selection:d,nodes:s,edges:c,patch:j,patchData:U,onDelete:bn,onDuplicate:ur,validation:Cp,runState:dr,agents:Li,meta:u,patchMeta:R=>t({type:"patchMeta",patch:R}),onDeleteWorkflow:Ep,isNew:g}),(0,Xe.jsx)(dp,{running:q||Z>=0,script:Le,cursor:Z,onStop:()=>{at(),qe(-1)}}),(0,Xe.jsx)(pp,{open:W,setOpen:ve,theme:y,setTheme:K,density:S,setDensity:B,hue:f,setHue:p}),(0,Xe.jsx)(fp,{open:ir,onClose:()=>_n(!1)}),(0,Xe.jsx)(gp,{currentWorkflow:gs({meta:u,nodes:s,edges:c}).workflow,onApplyWorkflow:R=>{let A=oo(R);t({type:"setAll",state:{meta:A.meta,nodes:A.nodes,edges:A.edges,selection:null,isNew:!1}}),mt("Applied workflow from chat","ok")}}),ar&&(0,Xe.jsxs)("div",{className:"toast"+(ar.kind==="err"?" err":""),children:[(0,Xe.jsx)("span",{className:"dot"}),ar.msg]})]})}function Oi(e,t){return{meta:e.meta,nodes:e.nodes,edges:e.edges,selection:null,isNew:t}}async function Em(e,t){return e==="tpl.blank"?io(t||"new-workflow"):e==="tpl.whatsapp"?oo(Pm(t)):e==="tpl.mr"?oo(Tm(t)):io(t||"new-workflow")}function Pm(e){return{id:e||"whatsapp-client-support",version:2,title:"WhatsApp client support triage",priority:10,fanOut:!1,envAllow:["GITLAB_TOKEN"],nodes:[{id:"trigger",type:"trigger.channel",config:{source:"whatsapp-message",filter:{chat:"*"}}},{id:"classify",type:"agent",config:{agentId:"intent-classifier",prompt:"Classify this message from {{trigger.sender.name}}:\n{{trigger.text}}\nReply with `RESULT: status-check`, `RESULT: new-request`, or `RESULT: other`."}},{id:"route",type:"branch",config:{cases:[{when:{kind:"equals",params:{path:"classify.result",value:"status-check"}},to:"status"},{when:{kind:"equals",params:{path:"classify.result",value:"new-request"}},to:"new"}],default:"fallback"}},{id:"lookup_ticket",type:"agent",config:{agentId:"gitlab-ticket-lookup",prompt:"Find related issues for {{trigger.sender.name}}. Summarise."}},{id:"reply_status",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"{{lookup_ticket.reply}}"}},{id:"create_issue",type:"action.createIssue",config:{channel:"gitlab",project:"noqta/web",title:"WhatsApp: {{trigger.sender.name}}",description:`From: {{trigger.sender.name}} ({{trigger.fromJid}})
|
|
1403
|
+
`;function oo(e,t){let n=t?.nodes??{},r=e.nodes.map(i=>({...i,position:i.position??n[i.id]??void 0})),o=e.edges.map((i,a)=>({...i,id:km(i,a)}));return{meta:{id:e.id,version:2,title:e.title,description:e.description,priority:e.priority,fanOut:e.fanOut,envAllow:e.envAllow,retention:e.retention,mesh:e.mesh},nodes:r,edges:o}}function gs(e){let t={id:e.meta.id,version:2,title:e.meta.title,description:e.meta.description,priority:e.meta.priority,fanOut:e.meta.fanOut,nodes:e.nodes.map(r=>({id:r.id,type:r.type,config:r.config??{},position:r.position})),edges:e.edges.map(r=>{let{id:o,...i}=r;return i}),envAllow:e.meta.envAllow,retention:e.meta.retention,mesh:e.meta.mesh??{allowRemote:!1}},n={version:1,nodes:Object.fromEntries(e.nodes.filter(r=>r.position).map(r=>[r.id,{x:r.position.x,y:r.position.y}]))};return{workflow:t,layout:n}}function io(e){return{meta:{id:/^[a-z0-9][a-z0-9_-]*$/.test(e)?e:"new-workflow",version:2,title:"New workflow",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90},mesh:{allowRemote:!1}},nodes:[{id:"trigger",type:"trigger.manual",config:{},position:{x:40,y:80}},{id:"end",type:"end",config:{status:"completed"},position:{x:400,y:80}}],edges:[{id:"e-trigger-end",from:"trigger",to:"end"}]}}function km(e,t){let n=o=>o.replace(/[^a-zA-Z0-9._-]/g,"_");return`e-${[n(e.from),e.fromPort?n(e.fromPort):"out",n(e.to),String(t)].join("-")}`}var hs="__trigger__";function _m(){try{return localStorage.getItem("ax_token")||""}catch{return""}}function kn(){let e={"Content-Type":"application/json","X-Requested-With":"agentx-board"},t=_m();return t&&(e.Authorization="Bearer "+t),e}async function hp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e),{headers:kn()});if(!t.ok)throw new Error("fetch workflow "+e+": "+t.status);return(await t.json()).workflow}async function mp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{headers:kn()});return t.ok?(await t.json()).layout:null}async function vp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e.id)+"/validate",{method:"POST",headers:kn(),body:JSON.stringify(e)});return t.ok?await t.json():{ok:!1,issues:[{path:"",message:"HTTP "+t.status}]}}async function yp(e,t){let n=t.create?"/api/workflows":"/api/workflows/"+encodeURIComponent(e.id),r=t.create?"POST":"PUT",o=await fetch(n,{method:r,headers:kn(),body:JSON.stringify(e)});if(o.ok)return{ok:!0};let i=await o.json().catch(()=>({}));return{ok:!1,issues:i.issues||[{path:"",message:i.error||"HTTP "+o.status}]}}async function xp(e,t){await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{method:"PUT",headers:kn(),body:JSON.stringify(t)})}async function wp(e){return(await fetch("/api/workflows/"+encodeURIComponent(e),{method:"DELETE",headers:kn()})).ok}async function kp(){try{let e=await fetch("/api/agents",{headers:kn()});if(!e.ok)return[];let t=await e.json();if(Array.isArray(t))return t.map(n=>typeof n=="string"?{id:n,name:n}:n&&typeof n=="object"&&"id"in n?{id:String(n.id),name:String(n.name??n.id)}:null).filter(n=>n!==null);if(t&&typeof t=="object"&&"agents"in t){let n=t.agents;if(Array.isArray(n))return n.map(r=>({id:String(r.id??r),name:String(r.name??r.id??r)}))}return[]}catch{return[]}}var Xe=oe(be(),1);function bm(e,t){switch(t.type){case"hydrate":return{meta:t.graph.meta,nodes:t.graph.nodes,edges:t.graph.edges,selection:null,isNew:t.isNew};case"setTitle":return{...e,meta:{...e.meta,title:t.title}};case"patchMeta":return{...e,meta:{...e.meta,...t.patch}};case"select":return{...e,selection:t.selection};case"moveNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,position:{x:t.x,y:t.y}}:n)};case"patchNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"patchNodeData":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,config:{...n.config,...t.patch}}:n)};case"patchEdge":return{...e,edges:e.edges.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"addNode":{let n="n-"+Math.random().toString(36).slice(2,8),r={id:n,type:t.item.type,position:{x:t.x,y:t.y},config:Sm(t.item)};return{...e,nodes:[...e.nodes,r],selection:{kind:"node",id:n}}}case"connect":{if(t.conn.from===t.conn.to)return e;let n="e-"+Math.random().toString(36).slice(2,8),r=e.nodes.find(a=>a.id===t.conn.from),o=t.conn.fromPort==="true"||t.conn.fromPort==="false"?t.conn.fromPort:"",i={id:n,from:t.conn.from,fromPort:t.conn.fromPort,to:t.conn.to,toPort:"in",label:o||(r?.type?.startsWith("trigger.")?"start":"")};return e.edges.some(a=>a.from===i.from&&a.fromPort===i.fromPort&&a.to===i.to)?e:{...e,edges:[...e.edges,i]}}case"delete":{let n=t.selection??e.selection;return n?n.kind==="node"?n.id===hs?e:{...e,nodes:e.nodes.filter(r=>r.id!==n.id),edges:e.edges.filter(r=>r.from!==n.id&&r.to!==n.id),selection:null}:n.kind==="edge"?{...e,edges:e.edges.filter(r=>r.id!==n.id),selection:null}:e:e}case"duplicate":{let n=t.selection??e.selection;if(!n||n.kind!=="node")return e;let r=e.nodes.find(u=>u.id===n.id);if(!r||r.id===hs)return e;let o="n-"+Math.random().toString(36).slice(2,8),i=r.position??{x:0,y:0},a={...r,id:o,position:{x:i.x+40,y:i.y+40}};return{...e,nodes:[...e.nodes,a],selection:{kind:"node",id:o}}}case"layout":{let n=Nm(e.nodes,e.edges);return{...e,nodes:e.nodes.map(r=>({...r,...n[r.id]??{}}))}}case"setAll":return t.state}}function Sm(e){switch(e.type){case"trigger.channel":return{source:e.id.endsWith("whatsapp")?"whatsapp-message":e.id.endsWith("telegram")?"telegram-message":e.id.endsWith("gitlab")?"gitlab-issue":"whatsapp-message",filter:{chat:"*"}};case"trigger.cron":return{spec:"0 * * * *"};case"trigger.manual":return{};case"trigger.hook":return{event:"on:hook"};case"trigger.form":return{form:{title:"New request",fields:[],submitLabel:"Submit"}};case"agent":return{agentId:"",prompt:"",resultParser:"noqta-result-token"};case"transform":return{expr:""};case"branch":return{cases:[{when:{kind:"equals",params:{path:"",value:""}},to:"case1"}],default:"fallback"};case"gateway.parallel":return{mode:"fanOut"};case"rule":return{inputs:[""],rules:[{when:["*"],to:"match",output:{}}],default:{to:"fallback",output:{}}};case"checkpoint":return{name:"wait",waitFor:{source:"manual"},resumeMatch:{}};case"userTask":return{assignTo:"role:reviewers",title:"",form:{title:"Review",fields:[],submitLabel:"Approve",secondaryAction:{key:"reject",label:"Reject"}}};case"subProcess":return{workflowId:"",inputMap:{},awaitCompletion:!0};case"signal.emit":return{name:"",scope:"workflow",payload:{}};case"signal.wait":return{name:"",scope:"workflow",match:{}};case"timer.boundary":return{after:"PT1H"};case"action.send":return{channel:"gitlab",chatId:"",text:""};case"action.createIssue":return{channel:"gitlab",project:"",title:"",description:"",labels:[]};case"action.setLabel":return{channel:"gitlab",add:[],remove:[]};case"action.readLabel":return{channel:"gitlab"};case"action.react":return{channel:"gitlab",emoji:"\u{1F440}"};case"action.editMessage":return{channel:"gitlab",messageId:"",text:""};case"action.logTime":return{channel:"gitlab"};case"action.callHTTP":return{url:"",method:"POST"};case"action.run":return{actionId:"",inputs:{}};case"end":return{status:"completed"}}return{}}function Nm(e,t){let n=Object.fromEntries(e.map(s=>[s.id,s])),r={};e.forEach(s=>{r[s.id]=0}),t.forEach(s=>{n[s.to]&&(r[s.to]=(r[s.to]??0)+1)});let o={},i=(s,c)=>{o[s]=Math.max(o[s]??0,c),t.filter(d=>d.from===s).forEach(d=>i(d.to,c+1))};e.filter(s=>(r[s.id]??0)===0).forEach(s=>i(s.id,0));let a={};Object.entries(o).forEach(([s,c])=>{(a[c]??(a[c]=[])).push(s)});let u={};return Object.entries(a).forEach(([s,c])=>{c.forEach((d,g)=>{u[d]={x:80+Number(s)*280,y:120+g*170}})}),u}function Cm(e){let[t,n]=(0,O.useReducer)(bm,e),r=(0,O.useRef)([]),o=(0,O.useRef)([]),i=(0,O.useRef)(t);(0,O.useEffect)(()=>{i.current=t},[t]);let a=(0,O.useCallback)(d=>{d.type==="select"||d.type==="moveNode"||(r.current.push(i.current),r.current.length>50&&r.current.shift(),o.current=[]),n(d)},[]),u=(0,O.useCallback)(()=>{let d=r.current.pop();d&&(o.current.push(i.current),n({type:"setAll",state:d}))},[]),s=(0,O.useCallback)(()=>{let d=o.current.pop();d&&(r.current.push(i.current),n({type:"setAll",state:d}))},[]),c=(0,O.useCallback)(d=>{r.current=[],o.current=[],n({type:"setAll",state:d})},[]);return{state:t,dispatch:a,undo:u,redo:s,forceReset:c,canUndo:r.current.length>0,canRedo:o.current.length>0}}function Em(e){let t={},n=(r,o)=>{(t[r]??(t[r]=[])).push({message:o})};for(let r of e.nodes){let o=r.config;r.type==="agent"&&!o.agentId&&n(r.id,"Agent node has no agentId selected."),r.type==="branch"&&(!Array.isArray(o.cases)||o.cases.length===0)&&n(r.id,"Branch has no cases \u2014 add at least one.");let i=r.type==="end",a=r.type.startsWith("trigger.");!i&&!a&&!e.edges.some(u=>u.from===r.id)&&n(r.id,"No outgoing connection \u2014 the flow dead-ends here.")}return t}function Pm(e){let t=[],n=Object.fromEntries(e.nodes.map(a=>[a.id,a])),r=new Set,o=a=>{if(r.has(a))return;r.add(a);let u=n[a];if(!u)return;let s=u.config;t.push({nodeId:u.id,edgeId:null,title:`${u.id}${s.agentId?` \u2192 ${String(s.agentId)}`:""}`,body:s.prompt?`<span class="mono">${String(s.prompt).slice(0,200)}</span>`:null});let c=e.edges.filter(d=>d.from===a);for(let d of c){let g=d.id??"";t.push({nodeId:null,edgeId:g,title:null,body:null}),o(d.to)}},i=e.nodes.find(a=>a.type.startsWith("trigger."))?.id;return i&&o(i),t}function _p(){let{state:e,dispatch:t,undo:n,redo:r,forceReset:o,canUndo:i,canRedo:a}=Cm({meta:{id:"loading",version:2,title:"Loading\u2026",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90}},nodes:[],edges:[],selection:null,isNew:!0}),{meta:u,nodes:s,edges:c,selection:d,isNew:g}=e,m=(0,O.useRef)(e);(0,O.useEffect)(()=>{m.current=e},[e]);let[y,k]=(0,O.useState)(()=>localStorage.getItem("wfe.theme")??"dark"),[S,B]=(0,O.useState)(()=>localStorage.getItem("wfe.density")??"cozy"),[f,p]=(0,O.useState)(()=>Number(localStorage.getItem("wfe.hue")??255)),[h,x]=(0,O.useState)(()=>localStorage.getItem("wfe.paletteOpen")!=="0"),[C,M]=(0,O.useState)(()=>localStorage.getItem("wfe.inspectorOpen")!=="0"),[F,P]=(0,O.useState)({zoom:.75,tx:40,ty:60});(0,O.useEffect)(()=>{document.documentElement.dataset.theme=y,localStorage.setItem("wfe.theme",y)},[y]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.density",S)},[S]),(0,O.useEffect)(()=>{document.documentElement.style.setProperty("--accent-hue",String(f)),localStorage.setItem("wfe.hue",String(f))},[f]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.paletteOpen",h?"1":"0")},[h]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.inspectorOpen",C?"1":"0")},[C]);let K=I=>k(I),[W,ve]=(0,O.useState)(!1),[ir,_n]=(0,O.useState)(!1),[ar,ao]=(0,O.useState)(null),[lr,mt]=(0,O.useState)("is-saved"),vt=(I,A="ok")=>{ao({msg:I,kind:A}),setTimeout(()=>ao(null),2e3)},[Li,zi]=(0,O.useState)(op);(0,O.useEffect)(()=>{(async()=>{let I=await kp();if(!I.length)return;let A=I.map((ce,xe)=>({id:ce.id,name:ce.name||ce.id,tags:[],color:xe*37%360}));zi(A)})()},[]),(0,O.useEffect)(()=>{let I=new URLSearchParams(location.search),A=I.get("new")==="1",ce=I.get("id")||"new-workflow";if(A){o(Oi(io(ce),!0));return}(async()=>{try{let[xe,He]=await Promise.all([hp(ce),mp(ce)]),Me=oo(xe,He);o(Oi(Me,!1))}catch(xe){vt(`Failed to load "${ce}": ${xe.message}`,"err"),o(Oi(io(ce),!0))}})()},[]),(0,O.useEffect)(()=>{u.id!=="loading"&&mt("is-dirty")},[s,c,u]);let sr=(0,O.useCallback)(async()=>{let I=m.current,{workflow:A,layout:ce}=gs({meta:I.meta,nodes:I.nodes,edges:I.edges});mt("is-validating");let xe=await vp(A);if(!xe.ok){mt("is-dirty"),vt(`${xe.issues.length} validation issue${xe.issues.length===1?"":"s"}`,"err");return}let He=await yp(A,{create:I.isNew});if(!He.ok){mt("is-dirty"),vt(He.issues?.[0]?.message??"Save failed","err");return}try{await xp(A.id,ce)}catch{}if(mt("is-saved"),vt("Saved","ok"),I.isNew){t({type:"patchMeta",patch:{}});let Me=new URL(location.href);Me.searchParams.delete("new"),Me.searchParams.set("id",A.id),history.replaceState(null,"",Me.toString()),o({...I,isNew:!1})}},[t,o]),bn=(0,O.useCallback)(I=>t({type:"delete",selection:I}),[t]),ur=(0,O.useCallback)(I=>t({type:"duplicate",selection:I}),[t]),Ai=(0,O.useCallback)((I,A,ce)=>t({type:"addNode",item:I,x:A,y:ce}),[t]),Di=(0,O.useCallback)(I=>t({type:"connect",conn:I}),[t]),ji=(0,O.useCallback)((I,A,ce)=>t({type:"moveNode",id:I,x:A,y:ce}),[t]),E=(0,O.useCallback)(I=>t({type:"select",selection:I,commit:!0}),[t]),j=I=>{d&&(d.kind==="node"&&t({type:"patchNode",id:d.id,patch:I}),d.kind==="edge"&&t({type:"patchEdge",id:d.id,patch:I}))},U=I=>{!d||d.kind!=="node"||t({type:"patchNodeData",id:d.id,patch:I})},J=async I=>{if(!confirm(`Replace the current workflow with the "${I.title}" template? (Undoable)`))return;let A=await Tm(I.id,u.id);o(Oi(A,g)),vt(`Loaded ${I.title}`,"ok")},[q,Be]=(0,O.useState)(!1),[Z,qe]=(0,O.useState)(-1),Le=(0,O.useMemo)(()=>Pm(e),[e]),ye=(0,O.useRef)(null),at=()=>{ye.current&&window.clearInterval(ye.current),Be(!1),mt("is-saved")},cr=()=>{Be(!0),qe(0),mt("is-running"),ye.current&&window.clearInterval(ye.current),ye.current=window.setInterval(()=>{qe(I=>I>=Le.length-1?(ye.current&&window.clearInterval(ye.current),Be(!1),mt("is-saved"),I):I+1)},900)};(0,O.useEffect)(()=>()=>{ye.current&&window.clearInterval(ye.current)},[]);let dr=(0,O.useMemo)(()=>{if(!q&&Z<0)return null;let I=new Set,A=new Set,ce=null,xe=null;for(let Me=0;Me<=Z;Me++){let Ge=Le[Me];Ge&&(Ge.nodeId&&(Me===Z?ce=Ge.nodeId:I.add(Ge.nodeId)),Ge.edgeId&&(Me===Z?xe=Ge.edgeId:A.add(Ge.edgeId)))}let He={};for(let Me=0;Me<=Z;Me++){let Ge=Le[Me];!Ge||!Ge.nodeId||!Ge.body||(He[Ge.nodeId]=Ge.body)}return{visitedNodes:I,visitedEdges:A,currentNodeId:ce,currentEdgeId:xe,outputs:He}},[q,Z,Le]),lo=(0,O.useMemo)(()=>Em(e),[e]),Cp=d?.kind==="node"?lo[d.id]:void 0;(0,O.useEffect)(()=>{let I=A=>{let ce=document.activeElement,xe=!!ce&&/^(INPUT|TEXTAREA|SELECT)$/.test(ce.tagName);A.key==="?"&&!xe&&_n(!0),A.key==="Escape"&&(_n(!1),ve(!1));let He=A.metaKey||A.ctrlKey;He&&A.key.toLowerCase()==="z"&&!A.shiftKey?(A.preventDefault(),n()):He&&(A.key.toLowerCase()==="y"||A.shiftKey&&A.key.toLowerCase()==="z")?(A.preventDefault(),r()):He&&A.key.toLowerCase()==="s"?(A.preventDefault(),sr()):He&&A.key==="Enter"?(A.preventDefault(),q?at():cr()):He&&A.key.toLowerCase()==="d"&&!xe&&d?(A.preventDefault(),ur(d)):(A.key==="Delete"||A.key==="Backspace")&&!xe&&d?bn(d):A.key==="/"&&!xe&&(A.preventDefault(),document.querySelector(".pal__search input")?.focus())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[d,q,n,r,sr,bn,ur]),(0,O.useEffect)(()=>{let I=A=>{lr==="is-dirty"&&(A.preventDefault(),A.returnValue="")};return window.addEventListener("beforeunload",I),()=>window.removeEventListener("beforeunload",I)},[lr]);let Ep=async()=>{if(g||!confirm(`Delete workflow "${u.id}"? This cannot be undone.`))return;await wp(u.id)?(vt("Deleted","ok"),setTimeout(()=>{location.href="/workflows"},500)):vt("Delete failed","err")};return(0,Xe.jsxs)("div",{className:"app","data-density":S,"data-palette":h?"open":"closed","data-inspector":C?"open":"closed",children:[(0,Xe.jsx)(cp,{title:u.title,setTitle:I=>t({type:"setTitle",title:I}),status:lr,theme:y,setTheme:K,canUndo:i,canRedo:a,onUndo:n,onRedo:r,onSave:()=>void sr(),onRun:()=>q?at():cr(),running:q,tweaksOpen:W,setTweaksOpen:ve,onHelp:()=>_n(!0),onLayout:()=>t({type:"layout"}),workflowIdLabel:`/workflows/${u.id}`,paletteOpen:h,setPaletteOpen:x,inspectorOpen:C,setInspectorOpen:M}),h&&(0,Xe.jsx)(up,{onLoadTemplate:J}),(0,Xe.jsx)(rp,{nodes:s,edges:c,selection:d,setSelection:E,onNodeMove:ji,onAddNode:Ai,onConnect:Di,onDelete:bn,runState:dr,viewBox:F,setViewBox:P}),C&&(0,Xe.jsx)(sp,{selection:d,nodes:s,edges:c,patch:j,patchData:U,onDelete:bn,onDuplicate:ur,validation:Cp,runState:dr,agents:Li,meta:u,patchMeta:I=>t({type:"patchMeta",patch:I}),onDeleteWorkflow:Ep,isNew:g}),(0,Xe.jsx)(dp,{running:q||Z>=0,script:Le,cursor:Z,onStop:()=>{at(),qe(-1)}}),(0,Xe.jsx)(pp,{open:W,setOpen:ve,theme:y,setTheme:K,density:S,setDensity:B,hue:f,setHue:p}),(0,Xe.jsx)(fp,{open:ir,onClose:()=>_n(!1)}),(0,Xe.jsx)(gp,{currentWorkflow:gs({meta:u,nodes:s,edges:c}).workflow,onApplyWorkflow:I=>{let A=oo(I);t({type:"setAll",state:{meta:A.meta,nodes:A.nodes,edges:A.edges,selection:null,isNew:!1}}),vt("Applied workflow from chat","ok")}}),ar&&(0,Xe.jsxs)("div",{className:"toast"+(ar.kind==="err"?" err":""),children:[(0,Xe.jsx)("span",{className:"dot"}),ar.msg]})]})}function Oi(e,t){return{meta:e.meta,nodes:e.nodes,edges:e.edges,selection:null,isNew:t}}async function Tm(e,t){return e==="tpl.blank"?io(t||"new-workflow"):e==="tpl.whatsapp"?oo(Mm(t)):e==="tpl.mr"?oo(Fm(t)):io(t||"new-workflow")}function Mm(e){return{id:e||"whatsapp-client-support",version:2,title:"WhatsApp client support triage",priority:10,fanOut:!1,envAllow:["GITLAB_TOKEN"],nodes:[{id:"trigger",type:"trigger.channel",config:{source:"whatsapp-message",filter:{chat:"*"}}},{id:"classify",type:"agent",config:{agentId:"intent-classifier",prompt:"Classify this message from {{trigger.sender.name}}:\n{{trigger.text}}\nReply with `RESULT: status-check`, `RESULT: new-request`, or `RESULT: other`."}},{id:"route",type:"branch",config:{cases:[{when:{kind:"equals",params:{path:"classify.result",value:"status-check"}},to:"status"},{when:{kind:"equals",params:{path:"classify.result",value:"new-request"}},to:"new"}],default:"fallback"}},{id:"lookup_ticket",type:"agent",config:{agentId:"gitlab-ticket-lookup",prompt:"Find related issues for {{trigger.sender.name}}. Summarise."}},{id:"reply_status",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"{{lookup_ticket.reply}}"}},{id:"create_issue",type:"action.createIssue",config:{channel:"gitlab",project:"noqta/web",title:"WhatsApp: {{trigger.sender.name}}",description:`From: {{trigger.sender.name}} ({{trigger.fromJid}})
|
|
1402
1404
|
|
|
1403
|
-
{{trigger.text}}`,labels:["source::whatsapp","Triage"]}},{id:"confirm_new",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Thanks \u2014 ticket {{create_issue.issue.webUrl}} opened."}},{id:"fallback",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Got it \u2014 a human will reply shortly."}},{id:"done",type:"end",config:{status:"completed"}}],edges:[{from:"trigger",to:"classify"},{from:"classify",to:"route"},{from:"route",fromPort:"status",to:"lookup_ticket"},{from:"route",fromPort:"new",to:"create_issue"},{from:"route",fromPort:"fallback",to:"fallback"},{from:"lookup_ticket",to:"reply_status"},{from:"create_issue",to:"confirm_new"},{from:"reply_status",to:"done"},{from:"confirm_new",to:"done"},{from:"fallback",to:"done"}],retention:{maxRuns:500,maxDays:90}}}function
|
|
1405
|
+
{{trigger.text}}`,labels:["source::whatsapp","Triage"]}},{id:"confirm_new",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Thanks \u2014 ticket {{create_issue.issue.webUrl}} opened."}},{id:"fallback",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Got it \u2014 a human will reply shortly."}},{id:"done",type:"end",config:{status:"completed"}}],edges:[{from:"trigger",to:"classify"},{from:"classify",to:"route"},{from:"route",fromPort:"status",to:"lookup_ticket"},{from:"route",fromPort:"new",to:"create_issue"},{from:"route",fromPort:"fallback",to:"fallback"},{from:"lookup_ticket",to:"reply_status"},{from:"create_issue",to:"confirm_new"},{from:"reply_status",to:"done"},{from:"confirm_new",to:"done"},{from:"fallback",to:"done"}],retention:{maxRuns:500,maxDays:90}}}function Fm(e){return{id:e||"mr-review",version:2,title:"MR review loop",priority:5,fanOut:!1,envAllow:["GITLAB_TOKEN"],nodes:[{id:"trigger",type:"trigger.channel",config:{source:"gitlab-pipeline",filter:{project:"noqta/web"}}},{id:"review",type:"agent",config:{agentId:"code-reviewer",prompt:"Review MR #{{trigger.pipeline.id}}. Reply `RESULT: approved` or `RESULT: changes-requested`."}},{id:"route",type:"branch",config:{cases:[{when:{kind:"equals",params:{path:"review.result",value:"approved"}},to:"approved"},{when:{kind:"equals",params:{path:"review.result",value:"changes-requested"}},to:"rejected"}],default:"done"}},{id:"approved",type:"action.send",config:{channel:"gitlab",chatId:"{{trigger.chatId}}",text:"\u2705 Approved by reviewer"}},{id:"rejected",type:"action.send",config:{channel:"gitlab",chatId:"{{trigger.chatId}}",text:"\u274C Changes requested"}},{id:"done",type:"end",config:{status:"completed"}}],edges:[{from:"trigger",to:"review"},{from:"review",to:"route"},{from:"route",fromPort:"approved",to:"approved"},{from:"route",fromPort:"rejected",to:"rejected"},{from:"route",fromPort:"done",to:"done"},{from:"approved",to:"done"},{from:"rejected",to:"done"}],retention:{maxRuns:500,maxDays:90}}}var Np=oe(be(),1);function Im(e,t){if(document.getElementById(e))return;let n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)}function bp(){Im("wfe-redesign-css",vs);let e=document.getElementById("wfe-root");if(!e){console.error("[wfe] #wfe-root missing \u2014 editor cannot mount");return}(0,Sp.createRoot)(e).render((0,Np.jsx)(_p,{}))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",bp):bp();})();
|
|
1404
1406
|
/*! Bundled license information:
|
|
1405
1407
|
|
|
1406
1408
|
react/cjs/react.production.min.js:
|