agentix-cli 0.189.0 → 0.190.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/{board-dashboard-WCRDEXEC.js → board-dashboard-3CNZ3R6T.js} +428 -338
- package/dist/board-dashboard-3CNZ3R6T.js.map +1 -0
- package/dist/{chunk-XWDLRABN.js → chunk-UU77SLIS.js} +103 -103
- package/dist/chunk-UU77SLIS.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-YLA7BKIE.js → program-5LBTVRBW.js} +4 -4
- package/dist/web/workflow-editor.global.js +457 -328
- package/dist/web/workflow-editor.global.js.map +1 -1
- package/package.json +1 -1
- package/dist/board-dashboard-WCRDEXEC.js.map +0 -1
- package/dist/chunk-XWDLRABN.js.map +0 -1
- /package/dist/{program-YLA7BKIE.js.map → program-5LBTVRBW.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";(()=>{var Rp=Object.create;var xs=Object.defineProperty;var Lp=Object.getOwnPropertyDescriptor;var Op=Object.getOwnPropertyNames;var zp=Object.getPrototypeOf,Ap=Object.prototype.hasOwnProperty;var Ct=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Op(t))!Ap.call(e,o)&&o!==n&&xs(e,o,{get:()=>t[o],enumerable:!(r=Lp(t,o))||r.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?Rp(zp(e)):{},Dp(t||!e||!e.__esModule?xs(n,"default",{value:e,enumerable:!0}):n,e));var Rs=Ct(B=>{"use strict";var pr=Symbol.for("react.element"),Up=Symbol.for("react.portal"),Wp=Symbol.for("react.fragment"),Hp=Symbol.for("react.strict_mode"),Bp=Symbol.for("react.profiler"),Gp=Symbol.for("react.provider"),$p=Symbol.for("react.context"),Vp=Symbol.for("react.forward_ref"),Kp=Symbol.for("react.suspense"),Yp=Symbol.for("react.memo"),Qp=Symbol.for("react.lazy"),bs=Symbol.iterator;function Jp(e){return e===null||typeof e!="object"?null:(e=bs&&e[bs]||e["@@iterator"],typeof e=="function"?e:null)}var Cs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ns=Object.assign,Es={};function Nn(e,t,n){this.props=e,this.context=t,this.refs=Es,this.updater=n||Cs}Nn.prototype.isReactComponent={};Nn.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")};Nn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ts(){}Ts.prototype=Nn.prototype;function Bi(e,t,n){this.props=e,this.context=t,this.refs=Es,this.updater=n||Cs}var Gi=Bi.prototype=new Ts;Gi.constructor=Bi;Ns(Gi,Nn.prototype);Gi.isPureReactComponent=!0;var _s=Array.isArray,Ps=Object.prototype.hasOwnProperty,$i={current:null},Fs={key:!0,ref:!0,__self:!0,__source:!0};function Ms(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)Ps.call(t,r)&&!Fs.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:$i.current}}function Xp(e,t){return{$$typeof:pr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vi(e){return typeof e=="object"&&e!==null&&e.$$typeof===pr}function qp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ss=/\/+/g;function Hi(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qp(""+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 Up:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Hi(a,0):r,_s(o)?(n="",e!=null&&(n=e.replace(Ss,"$&/")+"/"),uo(o,t,n,"",function(c){return c})):o!=null&&(Vi(o)&&(o=Xp(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Ss,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",_s(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Hi(i,u);a+=uo(i,t,n,s,o)}else if(s=Jp(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Hi(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 Zp(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 Ie={current:null},co={transition:null},ef={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:co,ReactCurrentOwner:$i};function Is(){throw Error("act(...) is not supported in production builds of React.")}B.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(!Vi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};B.Component=Nn;B.Fragment=Wp;B.Profiler=Bp;B.PureComponent=Bi;B.StrictMode=Hp;B.Suspense=Kp;B.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ef;B.act=Is;B.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=Ns({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=$i.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)Ps.call(t,s)&&!Fs.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}};B.createContext=function(e){return e={$$typeof:$p,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Gp,_context:e},e.Consumer=e};B.createElement=Ms;B.createFactory=function(e){var t=Ms.bind(null,e);return t.type=e,t};B.createRef=function(){return{current:null}};B.forwardRef=function(e){return{$$typeof:Vp,render:e}};B.isValidElement=Vi;B.lazy=function(e){return{$$typeof:Qp,_payload:{_status:-1,_result:e},_init:Zp}};B.memo=function(e,t){return{$$typeof:Yp,type:e,compare:t===void 0?null:t}};B.startTransition=function(e){var t=co.transition;co.transition={};try{e()}finally{co.transition=t}};B.unstable_act=Is;B.useCallback=function(e,t){return Ie.current.useCallback(e,t)};B.useContext=function(e){return Ie.current.useContext(e)};B.useDebugValue=function(){};B.useDeferredValue=function(e){return Ie.current.useDeferredValue(e)};B.useEffect=function(e,t){return Ie.current.useEffect(e,t)};B.useId=function(){return Ie.current.useId()};B.useImperativeHandle=function(e,t,n){return Ie.current.useImperativeHandle(e,t,n)};B.useInsertionEffect=function(e,t){return Ie.current.useInsertionEffect(e,t)};B.useLayoutEffect=function(e,t){return Ie.current.useLayoutEffect(e,t)};B.useMemo=function(e,t){return Ie.current.useMemo(e,t)};B.useReducer=function(e,t,n){return Ie.current.useReducer(e,t,n)};B.useRef=function(e){return Ie.current.useRef(e)};B.useState=function(e){return Ie.current.useState(e)};B.useSyncExternalStore=function(e,t,n){return Ie.current.useSyncExternalStore(e,t,n)};B.useTransition=function(){return Ie.current.useTransition()};B.version="18.3.1"});var Nt=Ct(($m,Ls)=>{"use strict";Ls.exports=Rs()});var Gs=Ct(J=>{"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 ut(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"?(Os=performance,J.unstable_now=function(){return Os.now()}):(Ki=Date,zs=Ki.now(),J.unstable_now=function(){return Ki.now()-zs});var Os,Ki,zs,yt=[],At=[],tf=1,Ze=null,Ne=3,ho=!1,an=!1,gr=!1,js=typeof setTimeout=="function"?setTimeout:null,Us=typeof clearTimeout=="function"?clearTimeout:null,As=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Xi(e){for(var t=ut(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=ut(At)}}function qi(e){if(gr=!1,Xi(e),!an)if(ut(yt)!==null)an=!0,ea(Zi);else{var t=ut(At);t!==null&&ta(qi,t.startTime-e)}}function Zi(e,t){an=!1,gr&&(gr=!1,Us(hr),hr=-1),ho=!0;var n=Ne;try{for(Xi(t),Ze=ut(yt);Ze!==null&&(!(Ze.expirationTime>t)||e&&!Bs());){var r=Ze.callback;if(typeof r=="function"){Ze.callback=null,Ne=Ze.priorityLevel;var o=r(Ze.expirationTime<=t);t=J.unstable_now(),typeof o=="function"?Ze.callback=o:Ze===ut(yt)&&go(yt),Xi(t)}else go(yt);Ze=ut(yt)}if(Ze!==null)var i=!0;else{var a=ut(At);a!==null&&ta(qi,a.startTime-t),i=!1}return i}finally{Ze=null,Ne=n,ho=!1}}var mo=!1,fo=null,hr=-1,Ws=5,Hs=-1;function Bs(){return!(J.unstable_now()-Hs<Ws)}function Yi(){if(fo!==null){var e=J.unstable_now();Hs=e;var t=!0;try{t=fo(!0,e)}finally{t?fr():(mo=!1,fo=null)}}else mo=!1}var fr;typeof As=="function"?fr=function(){As(Yi)}:typeof MessageChannel<"u"?(Qi=new MessageChannel,Ds=Qi.port2,Qi.port1.onmessage=Yi,fr=function(){Ds.postMessage(null)}):fr=function(){js(Yi,0)};var Qi,Ds;function ea(e){fo=e,mo||(mo=!0,fr())}function ta(e,t){hr=js(function(){e(J.unstable_now())},t)}J.unstable_IdlePriority=5;J.unstable_ImmediatePriority=1;J.unstable_LowPriority=4;J.unstable_NormalPriority=3;J.unstable_Profiling=null;J.unstable_UserBlockingPriority=2;J.unstable_cancelCallback=function(e){e.callback=null};J.unstable_continueExecution=function(){an||ho||(an=!0,ea(Zi))};J.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"):Ws=0<e?Math.floor(1e3/e):5};J.unstable_getCurrentPriorityLevel=function(){return Ne};J.unstable_getFirstCallbackNode=function(){return ut(yt)};J.unstable_next=function(e){switch(Ne){case 1:case 2:case 3:var t=3;break;default:t=Ne}var n=Ne;Ne=t;try{return e()}finally{Ne=n}};J.unstable_pauseExecution=function(){};J.unstable_requestPaint=function(){};J.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ne;Ne=e;try{return t()}finally{Ne=n}};J.unstable_scheduleCallback=function(e,t,n){var r=J.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:tf++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Ji(At,e),ut(yt)===null&&e===ut(At)&&(gr?(Us(hr),hr=-1):gr=!0,ta(qi,n-r))):(e.sortIndex=o,Ji(yt,e),an||ho||(an=!0,ea(Zi))),e};J.unstable_shouldYield=Bs;J.unstable_wrapCallback=function(e){var t=Ne;return function(){var n=Ne;Ne=t;try{return e.apply(this,arguments)}finally{Ne=n}}}});var Vs=Ct((Km,$s)=>{"use strict";$s.exports=Gs()});var Jd=Ct(Je=>{"use strict";var nf=Nt(),Ye=Vs();function b(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 Zu=new Set,Ar={};function wn(e,t){Kn(e,t),Kn(e+"Capture",t)}function Kn(e,t){for(Ar[e]=t,e=0;e<t.length;e++)Zu.add(t[e])}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sa=Object.prototype.hasOwnProperty,rf=/^[: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]*$/,Ks={},Ys={};function of(e){return Sa.call(Ys,e)?!0:Sa.call(Ks,e)?!1:rf.test(e)?Ys[e]=!0:(Ks[e]=!0,!1)}function af(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 lf(e,t,n,r){if(t===null||typeof t>"u"||af(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 Se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Se[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];Se[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Se[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Se[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){Se[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Se[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Se[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Se[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Se[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ml=/[\-:]([a-z])/g;function vl(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(ml,vl);Se[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(ml,vl);Se[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(ml,vl);Se[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Se[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Se.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Se[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function yl(e,t,n,r){var o=Se.hasOwnProperty(t)?Se[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(lf(t,n,o,r)&&(n=null),r||o===null?of(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=nf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vo=Symbol.for("react.element"),Pn=Symbol.for("react.portal"),Fn=Symbol.for("react.fragment"),wl=Symbol.for("react.strict_mode"),Ca=Symbol.for("react.profiler"),ec=Symbol.for("react.provider"),tc=Symbol.for("react.context"),xl=Symbol.for("react.forward_ref"),Na=Symbol.for("react.suspense"),Ea=Symbol.for("react.suspense_list"),kl=Symbol.for("react.memo"),jt=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var nc=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Qs=Symbol.iterator;function mr(e){return e===null||typeof e!="object"?null:(e=Qs&&e[Qs]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,na;function Sr(e){if(na===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);na=t&&t[1]||""}return`
|
|
2
|
-
`+
|
|
1
|
+
"use strict";(()=>{var af=Object.create;var js=Object.defineProperty;var lf=Object.getOwnPropertyDescriptor;var sf=Object.getOwnPropertyNames;var uf=Object.getPrototypeOf,cf=Object.prototype.hasOwnProperty;var jt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var df=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sf(t))!cf.call(e,o)&&o!==n&&js(e,o,{get:()=>t[o],enumerable:!(r=lf(t,o))||r.enumerable});return e};var ge=(e,t,n)=>(n=e!=null?af(uf(e)):{},df(t||!e||!e.__esModule?js(n,"default",{value:e,enumerable:!0}):n,e));var Zs=jt(X=>{"use strict";var Sr=Symbol.for("react.element"),ff=Symbol.for("react.portal"),hf=Symbol.for("react.fragment"),gf=Symbol.for("react.strict_mode"),mf=Symbol.for("react.profiler"),vf=Symbol.for("react.provider"),yf=Symbol.for("react.context"),wf=Symbol.for("react.forward_ref"),xf=Symbol.for("react.suspense"),kf=Symbol.for("react.memo"),bf=Symbol.for("react.lazy"),$s=Symbol.iterator;function _f(e){return e===null||typeof e!="object"?null:(e=$s&&e[$s]||e["@@iterator"],typeof e=="function"?e:null)}var Gs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vs=Object.assign,Ks={};function Vn(e,t,n){this.props=e,this.context=t,this.refs=Ks,this.updater=n||Gs}Vn.prototype.isReactComponent={};Vn.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")};Vn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ys(){}Ys.prototype=Vn.prototype;function ea(e,t,n){this.props=e,this.context=t,this.refs=Ks,this.updater=n||Gs}var ta=ea.prototype=new Ys;ta.constructor=ea;Vs(ta,Vn.prototype);ta.isPureReactComponent=!0;var Hs=Array.isArray,Qs=Object.prototype.hasOwnProperty,na={current:null},Xs={key:!0,ref:!0,__self:!0,__source:!0};function Js(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)Qs.call(t,r)&&!Xs.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:Sr,type:e,key:i,ref:a,props:o,_owner:na.current}}function Sf(e,t){return{$$typeof:Sr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ra(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sr}function Cf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Bs=/\/+/g;function Zi(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Cf(""+e.key):t.toString(36)}function ko(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 Sr:case ff:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Zi(a,0):r,Hs(o)?(n="",e!=null&&(n=e.replace(Bs,"$&/")+"/"),ko(o,t,n,"",function(c){return c})):o!=null&&(ra(o)&&(o=Sf(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Bs,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",Hs(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Zi(i,u);a+=ko(i,t,n,s,o)}else if(s=_f(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Zi(i,u++),a+=ko(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 xo(e,t,n){if(e==null)return e;var r=[],o=0;return ko(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Nf(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 Ge={current:null},bo={transition:null},Ef={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:bo,ReactCurrentOwner:na};function qs(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:xo,forEach:function(e,t,n){xo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xo(e,function(){t++}),t},toArray:function(e){return xo(e,function(t){return t})||[]},only:function(e){if(!ra(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Vn;X.Fragment=hf;X.Profiler=mf;X.PureComponent=ea;X.StrictMode=gf;X.Suspense=xf;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ef;X.act=qs;X.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=Vs({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=na.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)Qs.call(t,s)&&!Xs.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:Sr,type:e.type,key:o,ref:i,props:r,_owner:a}};X.createContext=function(e){return e={$$typeof:yf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vf,_context:e},e.Consumer=e};X.createElement=Js;X.createFactory=function(e){var t=Js.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:wf,render:e}};X.isValidElement=ra;X.lazy=function(e){return{$$typeof:bf,_payload:{_status:-1,_result:e},_init:Nf}};X.memo=function(e,t){return{$$typeof:kf,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=bo.transition;bo.transition={};try{e()}finally{bo.transition=t}};X.unstable_act=qs;X.useCallback=function(e,t){return Ge.current.useCallback(e,t)};X.useContext=function(e){return Ge.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};X.useEffect=function(e,t){return Ge.current.useEffect(e,t)};X.useId=function(){return Ge.current.useId()};X.useImperativeHandle=function(e,t,n){return Ge.current.useImperativeHandle(e,t,n)};X.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return Ge.current.useMemo(e,t)};X.useReducer=function(e,t,n){return Ge.current.useReducer(e,t,n)};X.useRef=function(e){return Ge.current.useRef(e)};X.useState=function(e){return Ge.current.useState(e)};X.useSyncExternalStore=function(e,t,n){return Ge.current.useSyncExternalStore(e,t,n)};X.useTransition=function(){return Ge.current.useTransition()};X.version="18.3.1"});var Ut=jt((_v,eu)=>{"use strict";eu.exports=Zs()});var cu=jt(ue=>{"use strict";function la(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<_o(o,t))e[r]=t,e[n]=o,n=r;else break e}}function wt(e){return e.length===0?null:e[0]}function Co(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>_o(u,n))s<o&&0>_o(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[a]=n,r=a);else if(s<o&&0>_o(c,n))e[r]=c,e[s]=n,r=s;else break e}}return t}function _o(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(tu=performance,ue.unstable_now=function(){return tu.now()}):(oa=Date,nu=oa.now(),ue.unstable_now=function(){return oa.now()-nu});var tu,oa,nu,Mt=[],en=[],Tf=1,ct=null,We=3,No=!1,Cn=!1,Nr=!1,iu=typeof setTimeout=="function"?setTimeout:null,au=typeof clearTimeout=="function"?clearTimeout:null,ru=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function sa(e){for(var t=wt(en);t!==null;){if(t.callback===null)Co(en);else if(t.startTime<=e)Co(en),t.sortIndex=t.expirationTime,la(Mt,t);else break;t=wt(en)}}function ua(e){if(Nr=!1,sa(e),!Cn)if(wt(Mt)!==null)Cn=!0,da(ca);else{var t=wt(en);t!==null&&pa(ua,t.startTime-e)}}function ca(e,t){Cn=!1,Nr&&(Nr=!1,au(Er),Er=-1),No=!0;var n=We;try{for(sa(t),ct=wt(Mt);ct!==null&&(!(ct.expirationTime>t)||e&&!uu());){var r=ct.callback;if(typeof r=="function"){ct.callback=null,We=ct.priorityLevel;var o=r(ct.expirationTime<=t);t=ue.unstable_now(),typeof o=="function"?ct.callback=o:ct===wt(Mt)&&Co(Mt),sa(t)}else Co(Mt);ct=wt(Mt)}if(ct!==null)var i=!0;else{var a=wt(en);a!==null&&pa(ua,a.startTime-t),i=!1}return i}finally{ct=null,We=n,No=!1}}var Eo=!1,So=null,Er=-1,lu=5,su=-1;function uu(){return!(ue.unstable_now()-su<lu)}function ia(){if(So!==null){var e=ue.unstable_now();su=e;var t=!0;try{t=So(!0,e)}finally{t?Cr():(Eo=!1,So=null)}}else Eo=!1}var Cr;typeof ru=="function"?Cr=function(){ru(ia)}:typeof MessageChannel<"u"?(aa=new MessageChannel,ou=aa.port2,aa.port1.onmessage=ia,Cr=function(){ou.postMessage(null)}):Cr=function(){iu(ia,0)};var aa,ou;function da(e){So=e,Eo||(Eo=!0,Cr())}function pa(e,t){Er=iu(function(){e(ue.unstable_now())},t)}ue.unstable_IdlePriority=5;ue.unstable_ImmediatePriority=1;ue.unstable_LowPriority=4;ue.unstable_NormalPriority=3;ue.unstable_Profiling=null;ue.unstable_UserBlockingPriority=2;ue.unstable_cancelCallback=function(e){e.callback=null};ue.unstable_continueExecution=function(){Cn||No||(Cn=!0,da(ca))};ue.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"):lu=0<e?Math.floor(1e3/e):5};ue.unstable_getCurrentPriorityLevel=function(){return We};ue.unstable_getFirstCallbackNode=function(){return wt(Mt)};ue.unstable_next=function(e){switch(We){case 1:case 2:case 3:var t=3;break;default:t=We}var n=We;We=t;try{return e()}finally{We=n}};ue.unstable_pauseExecution=function(){};ue.unstable_requestPaint=function(){};ue.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=We;We=e;try{return t()}finally{We=n}};ue.unstable_scheduleCallback=function(e,t,n){var r=ue.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:Tf++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,la(en,e),wt(Mt)===null&&e===wt(en)&&(Nr?(au(Er),Er=-1):Nr=!0,pa(ua,n-r))):(e.sortIndex=o,la(Mt,e),Cn||No||(Cn=!0,da(ca))),e};ue.unstable_shouldYield=uu;ue.unstable_wrapCallback=function(e){var t=We;return function(){var n=We;We=t;try{return e.apply(this,arguments)}finally{We=n}}}});var pu=jt((Cv,du)=>{"use strict";du.exports=cu()});var mp=jt(ut=>{"use strict";var Pf=Ut(),lt=pu();function S(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 wc=new Set,Qr={};function Dn(e,t){fr(e,t),fr(e+"Capture",t)}function fr(e,t){for(Qr[e]=t,e=0;e<t.length;e++)wc.add(t[e])}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oa=Object.prototype.hasOwnProperty,Mf=/^[: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]*$/,fu={},hu={};function Ff(e){return Oa.call(hu,e)?!0:Oa.call(fu,e)?!1:Mf.test(e)?hu[e]=!0:(fu[e]=!0,!1)}function Lf(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 If(e,t,n,r){if(t===null||typeof t>"u"||Lf(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 Ye(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 ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Ye(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){ze[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var El=/[\-:]([a-z])/g;function Tl(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(El,Tl);ze[t]=new Ye(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(El,Tl);ze[t]=new Ye(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(El,Tl);ze[t]=new Ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Ye(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pl(e,t,n,r){var o=ze.hasOwnProperty(t)?ze[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(If(t,n,o,r)&&(n=null),r||o===null?Ff(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 Jt=Pf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,To=Symbol.for("react.element"),Qn=Symbol.for("react.portal"),Xn=Symbol.for("react.fragment"),Ml=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),xc=Symbol.for("react.provider"),kc=Symbol.for("react.context"),Fl=Symbol.for("react.forward_ref"),za=Symbol.for("react.suspense"),Da=Symbol.for("react.suspense_list"),Ll=Symbol.for("react.memo"),nn=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var bc=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var gu=Symbol.iterator;function Tr(e){return e===null||typeof e!="object"?null:(e=gu&&e[gu]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,fa;function Ar(e){if(fa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fa=t&&t[1]||""}return`
|
|
2
|
+
`+fa+e}var ha=!1;function ga(e,t){if(!e||ha)return"";ha=!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{ra=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sr(e):""}function sf(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=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function Ta(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 Fn:return"Fragment";case Pn:return"Portal";case Ca:return"Profiler";case wl:return"StrictMode";case Na:return"Suspense";case Ea:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tc:return(e.displayName||"Context")+".Consumer";case ec:return(e._context.displayName||"Context")+".Provider";case xl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kl:return t=e.displayName||null,t!==null?t:Ta(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Ta(e(t))}catch{}}return null}function uf(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 Ta(t);case 8:return t===wl?"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 rc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cf(e){var t=rc(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=cf(e))}function oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=rc(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 Pa(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Js(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 ic(e,t){t=t.checked,t!=null&&yl(e,"checked",t,!1)}function Fa(e,t){ic(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")?Ma(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ma(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xs(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 Ma(e,t,n){(t!=="number"||Vo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cr=Array.isArray;function Wn(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 Ia(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(b(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(b(92));if(Cr(n)){if(1<n.length)throw Error(b(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Zt(n)}}function ac(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 Zs(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function lc(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 Ra(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wo,sc=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(wo=wo||document.createElement("div"),wo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wo.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 Tr={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},df=["Webkit","ms","Moz","O"];Object.keys(Tr).forEach(function(e){df.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tr[t]=Tr[e]})});function uc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tr.hasOwnProperty(e)&&Tr[e]?(""+t).trim():t+"px"}function cc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var pf=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 La(e,t){if(t){if(pf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Oa(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 za=null;function bl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Aa=null,Hn=null,Bn=null;function eu(e){if(e=no(e)){if(typeof Aa!="function")throw Error(b(280));var t=e.stateNode;t&&(t=xi(t),Aa(e.stateNode,e.type,t))}}function dc(e){Hn?Bn?Bn.push(e):Bn=[e]:Hn=e}function pc(){if(Hn){var e=Hn,t=Bn;if(Bn=Hn=null,eu(e),t)for(e=0;e<t.length;e++)eu(t[e])}}function fc(e,t){return e(t)}function gc(){}var ia=!1;function hc(e,t,n){if(ia)return e(t,n);ia=!0;try{return fc(e,t,n)}finally{ia=!1,(Hn!==null||Bn!==null)&&(gc(),pc())}}function jr(e,t){var n=e.stateNode;if(n===null)return null;var r=xi(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(b(231,t,typeof n));return n}var Da=!1;if(It)try{En={},Object.defineProperty(En,"passive",{get:function(){Da=!0}}),window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{Da=!1}var En;function ff(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 Pr=!1,Ko=null,Yo=!1,ja=null,gf={onError:function(e){Pr=!0,Ko=e}};function hf(e,t,n,r,o,i,a,u,s){Pr=!1,Ko=null,ff.apply(gf,arguments)}function mf(e,t,n,r,o,i,a,u,s){if(hf.apply(this,arguments),Pr){if(Pr){var c=Ko;Pr=!1,Ko=null}else throw Error(b(198));Yo||(Yo=!0,ja=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 mc(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 tu(e){if(xn(e)!==e)throw Error(b(188))}function vf(e){var t=e.alternate;if(!t){if(t=xn(e),t===null)throw Error(b(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 tu(o),e;if(i===r)return tu(o),t;i=i.sibling}throw Error(b(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(b(189))}}if(n.alternate!==r)throw Error(b(190))}if(n.tag!==3)throw Error(b(188));return n.stateNode.current===n?e:t}function vc(e){return e=vf(e),e!==null?yc(e):null}function yc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=yc(e);if(t!==null)return t;e=e.sibling}return null}var wc=Ye.unstable_scheduleCallback,nu=Ye.unstable_cancelCallback,yf=Ye.unstable_shouldYield,wf=Ye.unstable_requestPaint,de=Ye.unstable_now,xf=Ye.unstable_getCurrentPriorityLevel,_l=Ye.unstable_ImmediatePriority,xc=Ye.unstable_UserBlockingPriority,Qo=Ye.unstable_NormalPriority,kf=Ye.unstable_LowPriority,kc=Ye.unstable_IdlePriority,mi=null,bt=null;function bf(e){if(bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(mi,e,void 0,(e.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:Cf,_f=Math.log,Sf=Math.LN2;function Cf(e){return e>>>=0,e===0?32:31-(_f(e)/Sf|0)|0}var xo=64,ko=4194304;function Nr(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 Jo(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=Nr(u):(i&=a,i!==0&&(r=Nr(i)))}else a=n&~o,a!==0?r=Nr(a):i!==0&&(r=Nr(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-gt(t),o=1<<n,r|=e[n],t&=~o;return r}function Nf(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 Ef(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-gt(i),u=1<<a,s=o[a];s===-1?(!(u&n)||u&r)&&(o[a]=Nf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function Ua(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bc(){var e=xo;return xo<<=1,!(xo&4194240)&&(xo=64),e}function aa(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-gt(t),e[t]=n}function Tf(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-gt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Sl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Q=0;function _c(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Sc,Cl,Cc,Nc,Ec,Wa=!1,bo=[],$t=null,Vt=null,Kt=null,Ur=new Map,Wr=new Map,Wt=[],Pf="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 ru(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&&Cl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Ff(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 Tc(e){var t=un(e.target);if(t!==null){var n=xn(t);if(n!==null){if(t=n.tag,t===13){if(t=mc(n),t!==null){e.blockedOn=t,Ec(e.priority,function(){Cc(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=Ha(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);za=r,n.target.dispatchEvent(r),za=null}else return t=no(n),t!==null&&Cl(t),e.blockedOn=n,!1;t.shift()}return!0}function ou(e,t,n){zo(e)&&n.delete(t)}function Mf(){Wa=!1,$t!==null&&zo($t)&&($t=null),Vt!==null&&zo(Vt)&&(Vt=null),Kt!==null&&zo(Kt)&&(Kt=null),Ur.forEach(ou),Wr.forEach(ou)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,Wa||(Wa=!0,Ye.unstable_scheduleCallback(Ye.unstable_NormalPriority,Mf)))}function Hr(e){function t(o){return yr(o,e)}if(0<bo.length){yr(bo[0],e);for(var n=1;n<bo.length;n++){var r=bo[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);)Tc(n),n.blockedOn===null&&Wt.shift()}var Gn=zt.ReactCurrentBatchConfig,Xo=!0;function If(e,t,n,r){var o=Q,i=Gn.transition;Gn.transition=null;try{Q=1,Nl(e,t,n,r)}finally{Q=o,Gn.transition=i}}function Rf(e,t,n,r){var o=Q,i=Gn.transition;Gn.transition=null;try{Q=4,Nl(e,t,n,r)}finally{Q=o,Gn.transition=i}}function Nl(e,t,n,r){if(Xo){var o=Ha(e,t,n,r);if(o===null)fa(e,t,r,qo,n),ru(e,r);else if(Ff(o,e,t,n,r))r.stopPropagation();else if(ru(e,r),t&4&&-1<Pf.indexOf(e)){for(;o!==null;){var i=no(o);if(i!==null&&Sc(i),i=Ha(e,t,n,r),i===null&&fa(e,t,r,qo,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else fa(e,t,r,null,n)}}var qo=null;function Ha(e,t,n,r){if(qo=null,e=bl(r),e=un(e),e!==null)if(t=xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mc(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 Pc(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(xf()){case _l:return 1;case xc:return 4;case Qo:case kf:return 16;case kc:return 536870912;default:return 16}default:return 16}}var Bt=null,El=null,Ao=null;function Fc(){if(Ao)return Ao;var e,t=El,n=t.length,r,o="value"in Bt?Bt.value:Bt.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 _o(){return!0}function iu(){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)?_o:iu,this.isPropagationStopped=iu,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=_o)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_o)},persist:function(){},isPersistent:_o}),t}var er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tl=Qe(er),to=le({},er,{view:0,detail:0}),Lf=Qe(to),la,sa,wr,vi=le({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pl,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!==wr&&(wr&&e.type==="mousemove"?(la=e.screenX-wr.screenX,sa=e.screenY-wr.screenY):sa=la=0,wr=e),la)},movementY:function(e){return"movementY"in e?e.movementY:sa}}),au=Qe(vi),Of=le({},vi,{dataTransfer:0}),zf=Qe(Of),Af=le({},to,{relatedTarget:0}),ua=Qe(Af),Df=le({},er,{animationName:0,elapsedTime:0,pseudoElement:0}),jf=Qe(Df),Uf=le({},er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wf=Qe(Uf),Hf=le({},er,{data:0}),lu=Qe(Hf),Bf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gf={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"},$f={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$f[e])?!!t[e]:!1}function Pl(){return Vf}var Kf=le({},to,{key:function(e){if(e.key){var t=Bf[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"?Gf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pl,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}}),Yf=Qe(Kf),Qf=le({},vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),su=Qe(Qf),Jf=le({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pl}),Xf=Qe(Jf),qf=le({},er,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zf=Qe(qf),eg=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}),tg=Qe(eg),ng=[9,13,27,32],Fl=It&&"CompositionEvent"in window,Fr=null;It&&"documentMode"in document&&(Fr=document.documentMode);var rg=It&&"TextEvent"in window&&!Fr,Mc=It&&(!Fl||Fr&&8<Fr&&11>=Fr),uu=String.fromCharCode(32),cu=!1;function Ic(e,t){switch(e){case"keyup":return ng.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mn=!1;function og(e,t){switch(e){case"compositionend":return Rc(t);case"keypress":return t.which!==32?null:(cu=!0,uu);case"textInput":return e=t.data,e===uu&&cu?null:e;default:return null}}function ig(e,t){if(Mn)return e==="compositionend"||!Fl&&Ic(e,t)?(e=Fc(),Ao=El=Bt=null,Mn=!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 Mc&&t.locale!=="ko"?null:t.data;default:return null}}var ag={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 du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ag[e.type]:t==="textarea"}function Lc(e,t,n,r){dc(r),t=Zo(t,"onChange"),0<t.length&&(n=new Tl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mr=null,Br=null;function lg(e){$c(e,0)}function yi(e){var t=Ln(e);if(oc(t))return e}function sg(e,t){if(e==="change")return t}var Oc=!1;It&&(It?(Co="oninput"in document,Co||(ca=document.createElement("div"),ca.setAttribute("oninput","return;"),Co=typeof ca.oninput=="function"),So=Co):So=!1,Oc=So&&(!document.documentMode||9<document.documentMode));var So,Co,ca;function pu(){Mr&&(Mr.detachEvent("onpropertychange",zc),Br=Mr=null)}function zc(e){if(e.propertyName==="value"&&yi(Br)){var t=[];Lc(t,Br,e,bl(e)),hc(lg,t)}}function ug(e,t,n){e==="focusin"?(pu(),Mr=t,Br=n,Mr.attachEvent("onpropertychange",zc)):e==="focusout"&&pu()}function cg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(Br)}function dg(e,t){if(e==="click")return yi(t)}function pg(e,t){if(e==="input"||e==="change")return yi(t)}function fg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:fg;function Gr(e,t){if(mt(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(!Sa.call(t,o)||!mt(e[o],t[o]))return!1}return!0}function fu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gu(e,t){var n=fu(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=fu(n)}}function Ac(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ac(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dc(){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 Ml(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 gg(e){var t=Dc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ac(n.ownerDocument.documentElement,n)){if(r!==null&&Ml(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=gu(n,i);var a=gu(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 hg=It&&"documentMode"in document&&11>=document.documentMode,In=null,Ba=null,Ir=null,Ga=!1;function hu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ga||In==null||In!==Vo(r)||(r=In,"selectionStart"in r&&Ml(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(Ba,"onSelect"),0<r.length&&(t=new Tl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=In)))}function No(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Rn={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},da={},jc={};It&&(jc=document.createElement("div").style,"AnimationEvent"in window||(delete Rn.animationend.animation,delete Rn.animationiteration.animation,delete Rn.animationstart.animation),"TransitionEvent"in window||delete Rn.transitionend.transition);function wi(e){if(da[e])return da[e];if(!Rn[e])return e;var t=Rn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jc)return da[e]=t[n];return e}var Uc=wi("animationend"),Wc=wi("animationiteration"),Hc=wi("animationstart"),Bc=wi("transitionend"),Gc=new Map,mu="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){Gc.set(e,t),wn(t,[e])}for(Eo=0;Eo<mu.length;Eo++)To=mu[Eo],vu=To.toLowerCase(),yu=To[0].toUpperCase()+To.slice(1),tn(vu,"on"+yu);var To,vu,yu,Eo;tn(Uc,"onAnimationEnd");tn(Wc,"onAnimationIteration");tn(Hc,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(Bc,"onTransitionEnd");Kn("onMouseEnter",["mouseout","mouseover"]);Kn("onMouseLeave",["mouseout","mouseover"]);Kn("onPointerEnter",["pointerout","pointerover"]);Kn("onPointerLeave",["pointerout","pointerover"]);wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));wn("onBeforeInput",["compositionend","keypress","textInput","paste"]);wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));wn("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(" "),mg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function wu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mf(r,t,void 0,e),e.currentTarget=null}function $c(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;wu(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;wu(o,u,c),i=s}}}if(Yo)throw e=ja,Yo=!1,ja=null,e}function ee(e,t){var n=t[Qa];n===void 0&&(n=t[Qa]=new Set);var r=e+"__bubble";n.has(r)||(Vc(t,e,2,!1),n.add(r))}function pa(e,t,n){var r=0;t&&(r|=4),Vc(n,e,r,t)}var Po="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[Po]){e[Po]=!0,Zu.forEach(function(n){n!=="selectionchange"&&(mg.has(n)||pa(n,!1,e),pa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Po]||(t[Po]=!0,pa("selectionchange",!1,t))}}function Vc(e,t,n,r){switch(Pc(t)){case 1:var o=If;break;case 4:o=Rf;break;default:o=Nl}n=o.bind(null,t,n,e),o=void 0,!Da||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 fa(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=un(u),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}u=u.parentNode}}r=r.return}hc(function(){var c=i,d=bl(n),p=[];e:{var m=Gc.get(e);if(m!==void 0){var y=Tl,w=e;switch(e){case"keypress":if(Do(n)===0)break e;case"keydown":case"keyup":y=Yf;break;case"focusin":w="focus",y=ua;break;case"focusout":w="blur",y=ua;break;case"beforeblur":case"afterblur":y=ua;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=au;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=zf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Xf;break;case Uc:case Wc:case Hc:y=jf;break;case Bc:y=Zf;break;case"scroll":y=Lf;break;case"wheel":y=tg;break;case"copy":case"cut":case"paste":y=Wf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=su}var S=(t&4)!==0,H=!S&&e==="scroll",g=S?m!==null?m+"Capture":null:m;S=[];for(var f=c,h;f!==null;){h=f;var x=h.stateNode;if(h.tag===5&&x!==null&&(h=x,g!==null&&(x=jr(f,g),x!=null&&S.push(Vr(f,x,h)))),H)break;f=f.return}0<S.length&&(m=new y(m,w,null,n,d),p.push({event:m,listeners:S}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&n!==za&&(w=n.relatedTarget||n.fromElement)&&(un(w)||w[Rt]))break e;if((y||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,y?(w=n.relatedTarget||n.toElement,y=c,w=w?un(w):null,w!==null&&(H=xn(w),w!==H||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=c),y!==w)){if(S=au,x="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(S=su,x="onPointerLeave",g="onPointerEnter",f="pointer"),H=y==null?m:Ln(y),h=w==null?m:Ln(w),m=new S(x,f+"leave",y,n,d),m.target=H,m.relatedTarget=h,x=null,un(d)===c&&(S=new S(g,f+"enter",w,n,d),S.target=h,S.relatedTarget=H,x=S),H=x,y&&w)t:{for(S=y,g=w,f=0,h=S;h;h=Tn(h))f++;for(h=0,x=g;x;x=Tn(x))h++;for(;0<f-h;)S=Tn(S),f--;for(;0<h-f;)g=Tn(g),h--;for(;f--;){if(S===g||g!==null&&S===g.alternate)break t;S=Tn(S),g=Tn(g)}S=null}else S=null;y!==null&&xu(p,m,y,S,!1),w!==null&&H!==null&&xu(p,H,w,S,!0)}}e:{if(m=c?Ln(c):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var C=sg;else if(du(m))if(Oc)C=pg;else{C=cg;var P=ug}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(C=dg);if(C&&(C=C(e,c))){Lc(p,C,n,d);break e}P&&P(e,m,c),e==="focusout"&&(P=m._wrapperState)&&P.controlled&&m.type==="number"&&Ma(m,"number",m.value)}switch(P=c?Ln(c):window,e){case"focusin":(du(P)||P.contentEditable==="true")&&(In=P,Ba=c,Ir=null);break;case"focusout":Ir=Ba=In=null;break;case"mousedown":Ga=!0;break;case"contextmenu":case"mouseup":case"dragend":Ga=!1,hu(p,n,d);break;case"selectionchange":if(hg)break;case"keydown":case"keyup":hu(p,n,d)}var M;if(Fl)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Mn?Ic(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Mc&&n.locale!=="ko"&&(Mn||E!=="onCompositionStart"?E==="onCompositionEnd"&&Mn&&(M=Fc()):(Bt=d,El="value"in Bt?Bt.value:Bt.textContent,Mn=!0)),P=Zo(c,E),0<P.length&&(E=new lu(E,e,null,n,d),p.push({event:E,listeners:P}),M?E.data=M:(M=Rc(n),M!==null&&(E.data=M)))),(M=rg?og(e,n):ig(e,n))&&(c=Zo(c,"onBeforeInput"),0<c.length&&(d=new lu("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:c}),d.data=M))}$c(p,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 Tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function xu(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 vg=/\r\n?/g,yg=/\u0000|\uFFFD/g;function ku(e){return(typeof e=="string"?e:""+e).replace(vg,`
|
|
6
|
-
`).replace(yg,"")}function Fo(e,t,n){if(t=ku(t),ku(e)!==t&&n)throw Error(b(425))}function ei(){}var $a=null,Va=null;function Ka(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 Ya=typeof setTimeout=="function"?setTimeout:void 0,wg=typeof clearTimeout=="function"?clearTimeout:void 0,bu=typeof Promise=="function"?Promise:void 0,xg=typeof queueMicrotask=="function"?queueMicrotask:typeof bu<"u"?function(e){return bu.resolve(null).then(e).catch(kg)}:Ya;function kg(e){setTimeout(function(){throw e})}function ga(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),Hr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Hr(t)}function Yt(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 _u(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 tr=Math.random().toString(36).slice(2),kt="__reactFiber$"+tr,Kr="__reactProps$"+tr,Rt="__reactContainer$"+tr,Qa="__reactEvents$"+tr,bg="__reactListeners$"+tr,_g="__reactHandles$"+tr;function un(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=_u(e);e!==null;){if(n=e[kt])return n;e=_u(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 Ln(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(b(33))}function xi(e){return e[Kr]||null}var Ja=[],On=-1;function nn(e){return{current:e}}function te(e){0>On||(e.current=Ja[On],Ja[On]=null,On--)}function X(e,t){On++,Ja[On]=e.current,e.current=t}var en={},Fe=nn(en),Ue=nn(!1),gn=en;function Yn(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 We(e){return e=e.childContextTypes,e!=null}function ti(){te(Ue),te(Fe)}function Su(e,t,n){if(Fe.current!==en)throw Error(b(168));X(Fe,t),X(Ue,n)}function Kc(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(b(108,uf(e)||"Unknown",o));return le({},n,r)}function ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,gn=Fe.current,X(Fe,e),X(Ue,Ue.current),!0}function Cu(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=Kc(e,t,gn),r.__reactInternalMemoizedMergedChildContext=e,te(Ue),te(Fe),X(Fe,e)):te(Ue),X(Ue,n)}var Tt=null,ki=!1,ha=!1;function Yc(e){Tt===null?Tt=[e]:Tt.push(e)}function Sg(e){ki=!0,Yc(e)}function rn(){if(!ha&&Tt!==null){ha=!0;var e=0,t=Q;try{var n=Tt;for(Q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Tt=null,ki=!1}catch(o){throw Tt!==null&&(Tt=Tt.slice(e+1)),wc(_l,rn),o}finally{Q=t,ha=!1}}return null}var zn=[],An=0,ri=null,oi=0,et=[],tt=0,hn=null,Pt=1,Ft="";function ln(e,t){zn[An++]=oi,zn[An++]=ri,ri=e,oi=t}function Qc(e,t,n){et[tt++]=Pt,et[tt++]=Ft,et[tt++]=hn,hn=e;var r=Pt;e=Ft;var o=32-gt(r)-1;r&=~(1<<o),n+=1;var i=32-gt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Pt=1<<32-gt(t)+o|n<<o|r,Ft=i+e}else Pt=1<<i|n<<o|r,Ft=e}function Il(e){e.return!==null&&(ln(e,1),Qc(e,1,0))}function Rl(e){for(;e===ri;)ri=zn[--An],zn[An]=null,oi=zn[--An],zn[An]=null;for(;e===hn;)hn=et[--tt],et[tt]=null,Ft=et[--tt],et[tt]=null,Pt=et[--tt],et[tt]=null}var Ke=null,Ve=null,re=!1,ft=null;function Jc(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 Nu(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=Yt(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=hn!==null?{id:Pt,overflow:Ft}: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 Xa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qa(e){if(re){var t=Ve;if(t){var n=t;if(!Nu(e,t)){if(Xa(e))throw Error(b(418));t=Yt(n.nextSibling);var r=Ke;t&&Nu(e,t)?Jc(r,n):(e.flags=e.flags&-4097|2,re=!1,Ke=e)}}else{if(Xa(e))throw Error(b(418));e.flags=e.flags&-4097|2,re=!1,Ke=e}}}function Eu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ke=e}function Mo(e){if(e!==Ke)return!1;if(!re)return Eu(e),re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ka(e.type,e.memoizedProps)),t&&(t=Ve)){if(Xa(e))throw Xc(),Error(b(418));for(;t;)Jc(e,t),t=Yt(t.nextSibling)}if(Eu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ve=Yt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ve=null}}else Ve=Ke?Yt(e.stateNode.nextSibling):null;return!0}function Xc(){for(var e=Ve;e;)e=Yt(e.nextSibling)}function Qn(){Ve=Ke=null,re=!1}function Ll(e){ft===null?ft=[e]:ft.push(e)}var Cg=zt.ReactCurrentBatchConfig;function xr(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(b(309));var r=n.stateNode}if(!r)throw Error(b(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(b(284));if(!n._owner)throw Error(b(290,e))}return e}function Io(e,t){throw e=Object.prototype.toString.call(t),Error(b(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Tu(e){var t=e._init;return t(e._payload)}function qc(e){function t(g,f){if(e){var h=g.deletions;h===null?(g.deletions=[f],g.flags|=16):h.push(f)}}function n(g,f){if(!e)return null;for(;f!==null;)t(g,f),f=f.sibling;return null}function r(g,f){for(g=new Map;f!==null;)f.key!==null?g.set(f.key,f):g.set(f.index,f),f=f.sibling;return g}function o(g,f){return g=qt(g,f),g.index=0,g.sibling=null,g}function i(g,f,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<f?(g.flags|=2,f):h):(g.flags|=2,f)):(g.flags|=1048576,f)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function u(g,f,h,x){return f===null||f.tag!==6?(f=ba(h,g.mode,x),f.return=g,f):(f=o(f,h),f.return=g,f)}function s(g,f,h,x){var C=h.type;return C===Fn?d(g,f,h.props.children,x,h.key):f!==null&&(f.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Tu(C)===f.type)?(x=o(f,h.props),x.ref=xr(g,f,h),x.return=g,x):(x=$o(h.type,h.key,h.props,null,g.mode,x),x.ref=xr(g,f,h),x.return=g,x)}function c(g,f,h,x){return f===null||f.tag!==4||f.stateNode.containerInfo!==h.containerInfo||f.stateNode.implementation!==h.implementation?(f=_a(h,g.mode,x),f.return=g,f):(f=o(f,h.children||[]),f.return=g,f)}function d(g,f,h,x,C){return f===null||f.tag!==7?(f=fn(h,g.mode,x,C),f.return=g,f):(f=o(f,h),f.return=g,f)}function p(g,f,h){if(typeof f=="string"&&f!==""||typeof f=="number")return f=ba(""+f,g.mode,h),f.return=g,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case vo:return h=$o(f.type,f.key,f.props,null,g.mode,h),h.ref=xr(g,null,f),h.return=g,h;case Pn:return f=_a(f,g.mode,h),f.return=g,f;case jt:var x=f._init;return p(g,x(f._payload),h)}if(Cr(f)||mr(f))return f=fn(f,g.mode,h,null),f.return=g,f;Io(g,f)}return null}function m(g,f,h,x){var C=f!==null?f.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return C!==null?null:u(g,f,""+h,x);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:return h.key===C?s(g,f,h,x):null;case Pn:return h.key===C?c(g,f,h,x):null;case jt:return C=h._init,m(g,f,C(h._payload),x)}if(Cr(h)||mr(h))return C!==null?null:d(g,f,h,x,null);Io(g,h)}return null}function y(g,f,h,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(h)||null,u(f,g,""+x,C);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case vo:return g=g.get(x.key===null?h:x.key)||null,s(f,g,x,C);case Pn:return g=g.get(x.key===null?h:x.key)||null,c(f,g,x,C);case jt:var P=x._init;return y(g,f,h,P(x._payload),C)}if(Cr(x)||mr(x))return g=g.get(h)||null,d(f,g,x,C,null);Io(f,x)}return null}function w(g,f,h,x){for(var C=null,P=null,M=f,E=f=0,K=null;M!==null&&E<h.length;E++){M.index>E?(K=M,M=null):K=M.sibling;var W=m(g,M,h[E],x);if(W===null){M===null&&(M=K);break}e&&M&&W.alternate===null&&t(g,M),f=i(W,f,E),P===null?C=W:P.sibling=W,P=W,M=K}if(E===h.length)return n(g,M),re&&ln(g,E),C;if(M===null){for(;E<h.length;E++)M=p(g,h[E],x),M!==null&&(f=i(M,f,E),P===null?C=M:P.sibling=M,P=M);return re&&ln(g,E),C}for(M=r(g,M);E<h.length;E++)K=y(M,g,E,h[E],x),K!==null&&(e&&K.alternate!==null&&M.delete(K.key===null?E:K.key),f=i(K,f,E),P===null?C=K:P.sibling=K,P=K);return e&&M.forEach(function(ve){return t(g,ve)}),re&&ln(g,E),C}function S(g,f,h,x){var C=mr(h);if(typeof C!="function")throw Error(b(150));if(h=C.call(h),h==null)throw Error(b(151));for(var P=C=null,M=f,E=f=0,K=null,W=h.next();M!==null&&!W.done;E++,W=h.next()){M.index>E?(K=M,M=null):K=M.sibling;var ve=m(g,M,W.value,x);if(ve===null){M===null&&(M=K);break}e&&M&&ve.alternate===null&&t(g,M),f=i(ve,f,E),P===null?C=ve:P.sibling=ve,P=ve,M=K}if(W.done)return n(g,M),re&&ln(g,E),C;if(M===null){for(;!W.done;E++,W=h.next())W=p(g,W.value,x),W!==null&&(f=i(W,f,E),P===null?C=W:P.sibling=W,P=W);return re&&ln(g,E),C}for(M=r(g,M);!W.done;E++,W=h.next())W=y(M,g,E,W.value,x),W!==null&&(e&&W.alternate!==null&&M.delete(W.key===null?E:W.key),f=i(W,f,E),P===null?C=W:P.sibling=W,P=W);return e&&M.forEach(function(ir){return t(g,ir)}),re&&ln(g,E),C}function H(g,f,h,x){if(typeof h=="object"&&h!==null&&h.type===Fn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case vo:e:{for(var C=h.key,P=f;P!==null;){if(P.key===C){if(C=h.type,C===Fn){if(P.tag===7){n(g,P.sibling),f=o(P,h.props.children),f.return=g,g=f;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jt&&Tu(C)===P.type){n(g,P.sibling),f=o(P,h.props),f.ref=xr(g,P,h),f.return=g,g=f;break e}n(g,P);break}else t(g,P);P=P.sibling}h.type===Fn?(f=fn(h.props.children,g.mode,x,h.key),f.return=g,g=f):(x=$o(h.type,h.key,h.props,null,g.mode,x),x.ref=xr(g,f,h),x.return=g,g=x)}return a(g);case Pn:e:{for(P=h.key;f!==null;){if(f.key===P)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(g,f.sibling),f=o(f,h.children||[]),f.return=g,g=f;break e}else{n(g,f);break}else t(g,f);f=f.sibling}f=_a(h,g.mode,x),f.return=g,g=f}return a(g);case jt:return P=h._init,H(g,f,P(h._payload),x)}if(Cr(h))return w(g,f,h,x);if(mr(h))return S(g,f,h,x);Io(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(g,f.sibling),f=o(f,h),f.return=g,g=f):(n(g,f),f=ba(h,g.mode,x),f.return=g,g=f),a(g)):n(g,f)}return H}var Jn=qc(!0),Zc=qc(!1),ii=nn(null),ai=null,Dn=null,Ol=null;function zl(){Ol=Dn=ai=null}function Al(e){var t=ii.current;te(ii),e._currentValue=t}function Za(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 $n(e,t){ai=e,Ol=Dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(je=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Ol!==e)if(e={context:e,memoizedValue:t,next:null},Dn===null){if(ai===null)throw Error(b(308));Dn=e,ai.dependencies={lanes:0,firstContext:e}}else Dn=Dn.next=e;return t}var cn=null;function Dl(e){cn===null?cn=[e]:cn.push(e)}function ed(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Dl(t)):(n.next=o.next,o.next=n),t.interleaved=n,Lt(e,r)}function Lt(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 jl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function td(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 Mt(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,Lt(e,n)}return o=r.interleaved,o===null?(t.next=t,Dl(r)):(t.next=o.next,o.next=t),r.interleaved=t,Lt(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,Sl(e,n)}}function Pu(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 p=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 w=e,S=u;switch(m=t,y=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){p=w.call(y,p,m);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,m=typeof w=="function"?w.call(y,p,m):w,m==null)break e;p=le({},p,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=p):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=p),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);vn|=a,e.lanes=a,e.memoizedState=p}}function Fu(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(b(191,o));o.call(r)}}}var ro={},_t=nn(ro),Yr=nn(ro),Qr=nn(ro);function dn(e){if(e===ro)throw Error(b(174));return e}function Ul(e,t){switch(X(Qr,t),X(Yr,e),X(_t,ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ra(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ra(t,e)}te(_t),X(_t,t)}function Xn(){te(_t),te(Yr),te(Qr)}function nd(e){dn(Qr.current);var t=dn(_t.current),n=Ra(t,e.type);t!==n&&(X(Yr,e),X(_t,n))}function Wl(e){Yr.current===e&&(te(_t),te(Yr))}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 ma=[];function Hl(){for(var e=0;e<ma.length;e++)ma[e]._workInProgressVersionPrimary=null;ma.length=0}var Uo=zt.ReactCurrentDispatcher,va=zt.ReactCurrentBatchConfig,mn=0,ae=null,fe=null,he=null,ui=!1,Rr=!1,Jr=0,Ng=0;function Ee(){throw Error(b(321))}function Bl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function Gl(e,t,n,r,o,i){if(mn=i,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Uo.current=e===null||e.memoizedState===null?Fg:Mg,e=n(r,o),Rr){i=0;do{if(Rr=!1,Jr=0,25<=i)throw Error(b(301));i+=1,he=fe=null,t.updateQueue=null,Uo.current=Ig,e=n(r,o)}while(Rr)}if(Uo.current=ci,t=fe!==null&&fe.next!==null,mn=0,he=fe=ae=null,ui=!1,t)throw Error(b(300));return e}function $l(){var e=Jr!==0;return Jr=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(b(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 ya(e){var t=it(),n=t.queue;if(n===null)throw Error(b(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((mn&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 p={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=p,a=r):s=s.next=p,ae.lanes|=d,vn|=d}c=c.next}while(c!==null&&c!==i);s===null?a=r:s.next=u,mt(r,t.memoizedState)||(je=!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,vn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(e){var t=it(),n=t.queue;if(n===null)throw Error(b(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);mt(i,t.memoizedState)||(je=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function rd(){}function od(e,t){var n=ae,r=it(),o=t(),i=!mt(r.memoizedState,o);if(i&&(r.memoizedState=o,je=!0),r=r.queue,Vl(ld.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,qr(9,ad.bind(null,n,r,o,t),void 0,null),me===null)throw Error(b(349));mn&30||id(n,t,o)}return o}function id(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 ad(e,t,n,r){t.value=n,t.getSnapshot=r,sd(t)&&ud(e)}function ld(e,t,n){return n(function(){sd(t)&&ud(e)})}function sd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function ud(e){var t=Lt(e,1);t!==null&&ht(t,e,1,-1)}function Mu(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=Pg.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 cd(){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 bi(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&&Bl(r,a.deps)){o.memoizedState=qr(t,n,i,r);return}}ae.flags|=e,o.memoizedState=qr(1|t,n,i,r)}function Iu(e,t){return Wo(8390656,8,e,t)}function Vl(e,t){return bi(2048,8,e,t)}function dd(e,t){return bi(4,2,e,t)}function pd(e,t){return bi(4,4,e,t)}function fd(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 gd(e,t,n){return n=n!=null?n.concat([e]):null,bi(4,4,fd.bind(null,t,e),n)}function Kl(){}function hd(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function md(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vd(e,t,n){return mn&21?(mt(n,t)||(n=bc(),ae.lanes|=n,vn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,je=!0),e.memoizedState=n)}function Eg(e,t){var n=Q;Q=n!==0&&4>n?n:4,e(!0);var r=va.transition;va.transition={};try{e(!1),t()}finally{Q=n,va.transition=r}}function yd(){return it().memoizedState}function Tg(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wd(e))xd(t,n);else if(n=ed(e,t,n,r),n!==null){var o=Le();ht(n,e,r,o),kd(n,t,r)}}function Pg(e,t,n){var r=Xt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wd(e))xd(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,mt(u,a)){var s=t.interleaved;s===null?(o.next=o,Dl(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=ed(e,t,o,r),n!==null&&(o=Le(),ht(n,e,r,o),kd(n,t,r))}}function wd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function xd(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 kd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Sl(e,n)}}var ci={readContext:ot,useCallback:Ee,useContext:Ee,useEffect:Ee,useImperativeHandle:Ee,useInsertionEffect:Ee,useLayoutEffect:Ee,useMemo:Ee,useReducer:Ee,useRef:Ee,useState:Ee,useDebugValue:Ee,useDeferredValue:Ee,useTransition:Ee,useMutableSource:Ee,useSyncExternalStore:Ee,useId:Ee,unstable_isNewReconciler:!1},Fg={readContext:ot,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Iu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wo(4194308,4,fd.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=Tg.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Mu,useDebugValue:Kl,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Mu(!1),t=e[0];return e=Eg.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,o=xt();if(re){if(n===void 0)throw Error(b(407));n=n()}else{if(n=t(),me===null)throw Error(b(349));mn&30||id(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Iu(ld.bind(null,r,i,e),[e]),r.flags|=2048,qr(9,ad.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=xt(),t=me.identifierPrefix;if(re){var n=Ft,r=Pt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ng++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Mg={readContext:ot,useCallback:hd,useContext:ot,useEffect:Vl,useImperativeHandle:gd,useInsertionEffect:dd,useLayoutEffect:pd,useMemo:md,useReducer:ya,useRef:cd,useState:function(){return ya(Xr)},useDebugValue:Kl,useDeferredValue:function(e){var t=it();return vd(t,fe.memoizedState,e)},useTransition:function(){var e=ya(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:rd,useSyncExternalStore:od,useId:yd,unstable_isNewReconciler:!1},Ig={readContext:ot,useCallback:hd,useContext:ot,useEffect:Vl,useImperativeHandle:gd,useInsertionEffect:dd,useLayoutEffect:pd,useMemo:md,useReducer:wa,useRef:cd,useState:function(){return wa(Xr)},useDebugValue:Kl,useDeferredValue:function(e){var t=it();return fe===null?t.memoizedState=e:vd(t,fe.memoizedState,e)},useTransition:function(){var e=wa(Xr)[0],t=it().memoizedState;return[e,t]},useMutableSource:rd,useSyncExternalStore:od,useId:yd,unstable_isNewReconciler:!1};function dt(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 el(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 _i={isMounted:function(e){return(e=e._reactInternals)?xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Le(),o=Xt(e),i=Mt(r,o);i.payload=t,n!=null&&(i.callback=n),t=Qt(e,i,o),t!==null&&(ht(t,e,o,r),jo(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Le(),o=Xt(e),i=Mt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Qt(e,i,o),t!==null&&(ht(t,e,o,r),jo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Le(),r=Xt(e),o=Mt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Qt(e,o,r),t!==null&&(ht(t,e,r,n),jo(t,e,r))}};function Ru(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 bd(e,t,n){var r=!1,o=en,i=t.contextType;return typeof i=="object"&&i!==null?i=ot(i):(o=We(t)?gn:Fe.current,r=t.contextTypes,i=(r=r!=null)?Yn(e,o):en),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_i,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Lu(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&&_i.enqueueReplaceState(t,t.state,null)}function tl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},jl(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ot(i):(i=We(t)?gn:Fe.current,o.context=Yn(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(el(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&&_i.enqueueReplaceState(o,o.state,null),li(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function qn(e,t){try{var n="",r=t;do n+=sf(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{ha=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ar(e):""}function Rf(e){switch(e.tag){case 5:return Ar(e.type);case 16:return Ar("Lazy");case 13:return Ar("Suspense");case 19:return Ar("SuspenseList");case 0:case 2:case 15:return e=ga(e.type,!1),e;case 11:return e=ga(e.type.render,!1),e;case 1:return e=ga(e.type,!0),e;default:return""}}function Wa(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 Xn:return"Fragment";case Qn:return"Portal";case Aa:return"Profiler";case Ml:return"StrictMode";case za:return"Suspense";case Da:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kc:return(e.displayName||"Context")+".Consumer";case xc:return(e._context.displayName||"Context")+".Provider";case Fl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ll:return t=e.displayName||null,t!==null?t:Wa(e.type)||"Memo";case nn:t=e._payload,e=e._init;try{return Wa(e(t))}catch{}}return null}function Of(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 Wa(t);case 8:return t===Ml?"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 vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _c(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Af(e){var t=_c(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 Po(e){e._valueTracker||(e._valueTracker=Af(e))}function Sc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_c(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ri(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 ja(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vn(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 Cc(e,t){t=t.checked,t!=null&&Pl(e,"checked",t,!1)}function Ua(e,t){Cc(e,t);var n=vn(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")?$a(e,t.type,n):t.hasOwnProperty("defaultValue")&&$a(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vu(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 $a(e,t,n){(t!=="number"||ri(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zr=Array.isArray;function lr(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=""+vn(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 Ha(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(zr(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:vn(n)}}function Nc(e,t){var n=vn(t.value),r=vn(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 wu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ec(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 Ba(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ec(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mo,Tc=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(Mo=Mo||document.createElement("div"),Mo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jr={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},zf=["Webkit","ms","Moz","O"];Object.keys(jr).forEach(function(e){zf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jr[t]=jr[e]})});function Pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jr.hasOwnProperty(e)&&jr[e]?(""+t).trim():t+"px"}function Mc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Df=ye({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 Ga(e,t){if(t){if(Df[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function Va(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 Ka=null;function Il(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ya=null,sr=null,ur=null;function xu(e){if(e=go(e)){if(typeof Ya!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Fi(t),Ya(e.stateNode,e.type,t))}}function Fc(e){sr?ur?ur.push(e):ur=[e]:sr=e}function Lc(){if(sr){var e=sr,t=ur;if(ur=sr=null,xu(e),t)for(e=0;e<t.length;e++)xu(t[e])}}function Ic(e,t){return e(t)}function Rc(){}var ma=!1;function Oc(e,t,n){if(ma)return e(t,n);ma=!0;try{return Ic(e,t,n)}finally{ma=!1,(sr!==null||ur!==null)&&(Rc(),Lc())}}function Jr(e,t){var n=e.stateNode;if(n===null)return null;var r=Fi(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(S(231,t,typeof n));return n}var Qa=!1;if(Kt)try{Kn={},Object.defineProperty(Kn,"passive",{get:function(){Qa=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{Qa=!1}var Kn;function Wf(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 Ur=!1,oi=null,ii=!1,Xa=null,jf={onError:function(e){Ur=!0,oi=e}};function Uf(e,t,n,r,o,i,a,u,s){Ur=!1,oi=null,Wf.apply(jf,arguments)}function $f(e,t,n,r,o,i,a,u,s){if(Uf.apply(this,arguments),Ur){if(Ur){var c=oi;Ur=!1,oi=null}else throw Error(S(198));ii||(ii=!0,Xa=c)}}function Wn(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 Ac(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 ku(e){if(Wn(e)!==e)throw Error(S(188))}function Hf(e){var t=e.alternate;if(!t){if(t=Wn(e),t===null)throw Error(S(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 ku(o),e;if(i===r)return ku(o),t;i=i.sibling}throw Error(S(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(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function zc(e){return e=Hf(e),e!==null?Dc(e):null}function Dc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Dc(e);if(t!==null)return t;e=e.sibling}return null}var Wc=lt.unstable_scheduleCallback,bu=lt.unstable_cancelCallback,Bf=lt.unstable_shouldYield,Gf=lt.unstable_requestPaint,_e=lt.unstable_now,Vf=lt.unstable_getCurrentPriorityLevel,Rl=lt.unstable_ImmediatePriority,jc=lt.unstable_UserBlockingPriority,ai=lt.unstable_NormalPriority,Kf=lt.unstable_LowPriority,Uc=lt.unstable_IdlePriority,Ei=null,Rt=null;function Yf(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Ei,e,void 0,(e.current.flags&128)===128)}catch{}}var St=Math.clz32?Math.clz32:Jf,Qf=Math.log,Xf=Math.LN2;function Jf(e){return e>>>=0,e===0?32:31-(Qf(e)/Xf|0)|0}var Fo=64,Lo=4194304;function Dr(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 li(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=Dr(u):(i&=a,i!==0&&(r=Dr(i)))}else a=n&~o,a!==0?r=Dr(a):i!==0&&(r=Dr(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-St(t),o=1<<n,r|=e[n],t&=~o;return r}function qf(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 Zf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-St(i),u=1<<a,s=o[a];s===-1?(!(u&n)||u&r)&&(o[a]=qf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function Ja(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $c(){var e=Fo;return Fo<<=1,!(Fo&4194240)&&(Fo=64),e}function va(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=n}function eh(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-St(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Ol(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-St(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ie=0;function Hc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Bc,Al,Gc,Vc,Kc,qa=!1,Io=[],un=null,cn=null,dn=null,qr=new Map,Zr=new Map,on=[],th="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 _u(e,t){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":dn=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zr.delete(t.pointerId)}}function Pr(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=go(t),t!==null&&Al(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function nh(e,t,n,r,o){switch(t){case"focusin":return un=Pr(un,e,t,n,r,o),!0;case"dragenter":return cn=Pr(cn,e,t,n,r,o),!0;case"mouseover":return dn=Pr(dn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return qr.set(i,Pr(qr.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Zr.set(i,Pr(Zr.get(i)||null,e,t,n,r,o)),!0}return!1}function Yc(e){var t=Tn(e.target);if(t!==null){var n=Wn(t);if(n!==null){if(t=n.tag,t===13){if(t=Ac(n),t!==null){e.blockedOn=t,Kc(e.priority,function(){Gc(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 Ko(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Za(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ka=r,n.target.dispatchEvent(r),Ka=null}else return t=go(n),t!==null&&Al(t),e.blockedOn=n,!1;t.shift()}return!0}function Su(e,t,n){Ko(e)&&n.delete(t)}function rh(){qa=!1,un!==null&&Ko(un)&&(un=null),cn!==null&&Ko(cn)&&(cn=null),dn!==null&&Ko(dn)&&(dn=null),qr.forEach(Su),Zr.forEach(Su)}function Mr(e,t){e.blockedOn===t&&(e.blockedOn=null,qa||(qa=!0,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,rh)))}function eo(e){function t(o){return Mr(o,e)}if(0<Io.length){Mr(Io[0],e);for(var n=1;n<Io.length;n++){var r=Io[n];r.blockedOn===e&&(r.blockedOn=null)}}for(un!==null&&Mr(un,e),cn!==null&&Mr(cn,e),dn!==null&&Mr(dn,e),qr.forEach(t),Zr.forEach(t),n=0;n<on.length;n++)r=on[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<on.length&&(n=on[0],n.blockedOn===null);)Yc(n),n.blockedOn===null&&on.shift()}var cr=Jt.ReactCurrentBatchConfig,si=!0;function oh(e,t,n,r){var o=ie,i=cr.transition;cr.transition=null;try{ie=1,zl(e,t,n,r)}finally{ie=o,cr.transition=i}}function ih(e,t,n,r){var o=ie,i=cr.transition;cr.transition=null;try{ie=4,zl(e,t,n,r)}finally{ie=o,cr.transition=i}}function zl(e,t,n,r){if(si){var o=Za(e,t,n,r);if(o===null)Sa(e,t,r,ui,n),_u(e,r);else if(nh(o,e,t,n,r))r.stopPropagation();else if(_u(e,r),t&4&&-1<th.indexOf(e)){for(;o!==null;){var i=go(o);if(i!==null&&Bc(i),i=Za(e,t,n,r),i===null&&Sa(e,t,r,ui,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Sa(e,t,r,null,n)}}var ui=null;function Za(e,t,n,r){if(ui=null,e=Il(r),e=Tn(e),e!==null)if(t=Wn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ac(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 ui=e,null}function Qc(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(Vf()){case Rl:return 1;case jc:return 4;case ai:case Kf:return 16;case Uc:return 536870912;default:return 16}default:return 16}}var ln=null,Dl=null,Yo=null;function Xc(){if(Yo)return Yo;var e,t=Dl,n=t.length,r,o="value"in ln?ln.value:ln.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 Yo=o.slice(e,1<r?1-r:void 0)}function Qo(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 Ro(){return!0}function Cu(){return!1}function st(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)?Ro:Cu,this.isPropagationStopped=Cu,this}return ye(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=Ro)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ro)},persist:function(){},isPersistent:Ro}),t}var xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wl=st(xr),ho=ye({},xr,{view:0,detail:0}),ah=st(ho),ya,wa,Fr,Ti=ye({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jl,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!==Fr&&(Fr&&e.type==="mousemove"?(ya=e.screenX-Fr.screenX,wa=e.screenY-Fr.screenY):wa=ya=0,Fr=e),ya)},movementY:function(e){return"movementY"in e?e.movementY:wa}}),Nu=st(Ti),lh=ye({},Ti,{dataTransfer:0}),sh=st(lh),uh=ye({},ho,{relatedTarget:0}),xa=st(uh),ch=ye({},xr,{animationName:0,elapsedTime:0,pseudoElement:0}),dh=st(ch),ph=ye({},xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fh=st(ph),hh=ye({},xr,{data:0}),Eu=st(hh),gh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mh={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"},vh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vh[e])?!!t[e]:!1}function jl(){return yh}var wh=ye({},ho,{key:function(e){if(e.key){var t=gh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jl,charCode:function(e){return e.type==="keypress"?Qo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xh=st(wh),kh=ye({},Ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tu=st(kh),bh=ye({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jl}),_h=st(bh),Sh=ye({},xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ch=st(Sh),Nh=ye({},Ti,{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}),Eh=st(Nh),Th=[9,13,27,32],Ul=Kt&&"CompositionEvent"in window,$r=null;Kt&&"documentMode"in document&&($r=document.documentMode);var Ph=Kt&&"TextEvent"in window&&!$r,Jc=Kt&&(!Ul||$r&&8<$r&&11>=$r),Pu=String.fromCharCode(32),Mu=!1;function qc(e,t){switch(e){case"keyup":return Th.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jn=!1;function Mh(e,t){switch(e){case"compositionend":return Zc(t);case"keypress":return t.which!==32?null:(Mu=!0,Pu);case"textInput":return e=t.data,e===Pu&&Mu?null:e;default:return null}}function Fh(e,t){if(Jn)return e==="compositionend"||!Ul&&qc(e,t)?(e=Xc(),Yo=Dl=ln=null,Jn=!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 Jc&&t.locale!=="ko"?null:t.data;default:return null}}var Lh={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 Fu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Lh[e.type]:t==="textarea"}function ed(e,t,n,r){Fc(r),t=ci(t,"onChange"),0<t.length&&(n=new Wl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hr=null,to=null;function Ih(e){dd(e,0)}function Pi(e){var t=er(e);if(Sc(t))return e}function Rh(e,t){if(e==="change")return t}var td=!1;Kt&&(Kt?(Ao="oninput"in document,Ao||(ka=document.createElement("div"),ka.setAttribute("oninput","return;"),Ao=typeof ka.oninput=="function"),Oo=Ao):Oo=!1,td=Oo&&(!document.documentMode||9<document.documentMode));var Oo,Ao,ka;function Lu(){Hr&&(Hr.detachEvent("onpropertychange",nd),to=Hr=null)}function nd(e){if(e.propertyName==="value"&&Pi(to)){var t=[];ed(t,to,e,Il(e)),Oc(Ih,t)}}function Oh(e,t,n){e==="focusin"?(Lu(),Hr=t,to=n,Hr.attachEvent("onpropertychange",nd)):e==="focusout"&&Lu()}function Ah(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pi(to)}function zh(e,t){if(e==="click")return Pi(t)}function Dh(e,t){if(e==="input"||e==="change")return Pi(t)}function Wh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:Wh;function no(e,t){if(Nt(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(!Oa.call(t,o)||!Nt(e[o],t[o]))return!1}return!0}function Iu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ru(e,t){var n=Iu(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=Iu(n)}}function rd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function od(){for(var e=window,t=ri();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ri(e.document)}return t}function $l(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 jh(e){var t=od(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rd(n.ownerDocument.documentElement,n)){if(r!==null&&$l(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=Ru(n,i);var a=Ru(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 Uh=Kt&&"documentMode"in document&&11>=document.documentMode,qn=null,el=null,Br=null,tl=!1;function Ou(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tl||qn==null||qn!==ri(r)||(r=qn,"selectionStart"in r&&$l(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}),Br&&no(Br,r)||(Br=r,r=ci(el,"onSelect"),0<r.length&&(t=new Wl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qn)))}function zo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zn={animationend:zo("Animation","AnimationEnd"),animationiteration:zo("Animation","AnimationIteration"),animationstart:zo("Animation","AnimationStart"),transitionend:zo("Transition","TransitionEnd")},ba={},id={};Kt&&(id=document.createElement("div").style,"AnimationEvent"in window||(delete Zn.animationend.animation,delete Zn.animationiteration.animation,delete Zn.animationstart.animation),"TransitionEvent"in window||delete Zn.transitionend.transition);function Mi(e){if(ba[e])return ba[e];if(!Zn[e])return e;var t=Zn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in id)return ba[e]=t[n];return e}var ad=Mi("animationend"),ld=Mi("animationiteration"),sd=Mi("animationstart"),ud=Mi("transitionend"),cd=new Map,Au="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 wn(e,t){cd.set(e,t),Dn(t,[e])}for(Do=0;Do<Au.length;Do++)Wo=Au[Do],zu=Wo.toLowerCase(),Du=Wo[0].toUpperCase()+Wo.slice(1),wn(zu,"on"+Du);var Wo,zu,Du,Do;wn(ad,"onAnimationEnd");wn(ld,"onAnimationIteration");wn(sd,"onAnimationStart");wn("dblclick","onDoubleClick");wn("focusin","onFocus");wn("focusout","onBlur");wn(ud,"onTransitionEnd");fr("onMouseEnter",["mouseout","mouseover"]);fr("onMouseLeave",["mouseout","mouseover"]);fr("onPointerEnter",["pointerout","pointerover"]);fr("onPointerLeave",["pointerout","pointerover"]);Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wr="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(" "),$h=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wr));function Wu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,$f(r,t,void 0,e),e.currentTarget=null}function dd(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;Wu(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;Wu(o,u,c),i=s}}}if(ii)throw e=Xa,ii=!1,Xa=null,e}function de(e,t){var n=t[al];n===void 0&&(n=t[al]=new Set);var r=e+"__bubble";n.has(r)||(pd(t,e,2,!1),n.add(r))}function _a(e,t,n){var r=0;t&&(r|=4),pd(n,e,r,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[jo]){e[jo]=!0,wc.forEach(function(n){n!=="selectionchange"&&($h.has(n)||_a(n,!1,e),_a(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,_a("selectionchange",!1,t))}}function pd(e,t,n,r){switch(Qc(t)){case 1:var o=oh;break;case 4:o=ih;break;default:o=zl}n=o.bind(null,t,n,e),o=void 0,!Qa||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 Sa(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=Tn(u),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}u=u.parentNode}}r=r.return}Oc(function(){var c=i,d=Il(n),p=[];e:{var g=cd.get(e);if(g!==void 0){var v=Wl,b=e;switch(e){case"keypress":if(Qo(n)===0)break e;case"keydown":case"keyup":v=xh;break;case"focusin":b="focus",v=xa;break;case"focusout":b="blur",v=xa;break;case"beforeblur":case"afterblur":v=xa;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":v=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=sh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=_h;break;case ad:case ld:case sd:v=dh;break;case ud:v=Ch;break;case"scroll":v=ah;break;case"wheel":v=Eh;break;case"copy":case"cut":case"paste":v=fh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Tu}var w=(t&4)!==0,G=!w&&e==="scroll",f=w?g!==null?g+"Capture":null:g;w=[];for(var h=c,m;h!==null;){m=h;var x=m.stateNode;if(m.tag===5&&x!==null&&(m=x,f!==null&&(x=Jr(h,f),x!=null&&w.push(oo(h,x,m)))),G)break;h=h.return}0<w.length&&(g=new v(g,b,null,n,d),p.push({event:g,listeners:w}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",g&&n!==Ka&&(b=n.relatedTarget||n.fromElement)&&(Tn(b)||b[Yt]))break e;if((v||g)&&(g=d.window===d?d:(g=d.ownerDocument)?g.defaultView||g.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=c,b=b?Tn(b):null,b!==null&&(G=Wn(b),b!==G||b.tag!==5&&b.tag!==6)&&(b=null)):(v=null,b=c),v!==b)){if(w=Nu,x="onMouseLeave",f="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(w=Tu,x="onPointerLeave",f="onPointerEnter",h="pointer"),G=v==null?g:er(v),m=b==null?g:er(b),g=new w(x,h+"leave",v,n,d),g.target=G,g.relatedTarget=m,x=null,Tn(d)===c&&(w=new w(f,h+"enter",b,n,d),w.target=m,w.relatedTarget=G,x=w),G=x,v&&b)t:{for(w=v,f=b,h=0,m=w;m;m=Yn(m))h++;for(m=0,x=f;x;x=Yn(x))m++;for(;0<h-m;)w=Yn(w),h--;for(;0<m-h;)f=Yn(f),m--;for(;h--;){if(w===f||f!==null&&w===f.alternate)break t;w=Yn(w),f=Yn(f)}w=null}else w=null;v!==null&&ju(p,g,v,w,!1),b!==null&&G!==null&&ju(p,G,b,w,!0)}}e:{if(g=c?er(c):window,v=g.nodeName&&g.nodeName.toLowerCase(),v==="select"||v==="input"&&g.type==="file")var C=Rh;else if(Fu(g))if(td)C=Dh;else{C=Ah;var F=Oh}else(v=g.nodeName)&&v.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(C=zh);if(C&&(C=C(e,c))){ed(p,C,n,d);break e}F&&F(e,g,c),e==="focusout"&&(F=g._wrapperState)&&F.controlled&&g.type==="number"&&$a(g,"number",g.value)}switch(F=c?er(c):window,e){case"focusin":(Fu(F)||F.contentEditable==="true")&&(qn=F,el=c,Br=null);break;case"focusout":Br=el=qn=null;break;case"mousedown":tl=!0;break;case"contextmenu":case"mouseup":case"dragend":tl=!1,Ou(p,n,d);break;case"selectionchange":if(Uh)break;case"keydown":case"keyup":Ou(p,n,d)}var L;if(Ul)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Jn?qc(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Jc&&n.locale!=="ko"&&(Jn||R!=="onCompositionStart"?R==="onCompositionEnd"&&Jn&&(L=Xc()):(ln=d,Dl="value"in ln?ln.value:ln.textContent,Jn=!0)),F=ci(c,R),0<F.length&&(R=new Eu(R,e,null,n,d),p.push({event:R,listeners:F}),L?R.data=L:(L=Zc(n),L!==null&&(R.data=L)))),(L=Ph?Mh(e,n):Fh(e,n))&&(c=ci(c,"onBeforeInput"),0<c.length&&(d=new Eu("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:c}),d.data=L))}dd(p,t)})}function oo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ci(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(oo(e,i,o)),i=Jr(e,t),i!=null&&r.push(oo(e,i,o))),e=e.return}return r}function Yn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ju(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(oo(n,s,u))):o||(s=Jr(n,i),s!=null&&a.push(oo(n,s,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Hh=/\r\n?/g,Bh=/\u0000|\uFFFD/g;function Uu(e){return(typeof e=="string"?e:""+e).replace(Hh,`
|
|
6
|
+
`).replace(Bh,"")}function Uo(e,t,n){if(t=Uu(t),Uu(e)!==t&&n)throw Error(S(425))}function di(){}var nl=null,rl=null;function ol(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 il=typeof setTimeout=="function"?setTimeout:void 0,Gh=typeof clearTimeout=="function"?clearTimeout:void 0,$u=typeof Promise=="function"?Promise:void 0,Vh=typeof queueMicrotask=="function"?queueMicrotask:typeof $u<"u"?function(e){return $u.resolve(null).then(e).catch(Kh)}:il;function Kh(e){setTimeout(function(){throw e})}function Ca(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),eo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);eo(t)}function pn(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 Hu(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 kr=Math.random().toString(36).slice(2),It="__reactFiber$"+kr,io="__reactProps$"+kr,Yt="__reactContainer$"+kr,al="__reactEvents$"+kr,Yh="__reactListeners$"+kr,Qh="__reactHandles$"+kr;function Tn(e){var t=e[It];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yt]||n[It]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hu(e);e!==null;){if(n=e[It])return n;e=Hu(e)}return t}e=n,n=e.parentNode}return null}function go(e){return e=e[It]||e[Yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function Fi(e){return e[io]||null}var ll=[],tr=-1;function xn(e){return{current:e}}function pe(e){0>tr||(e.current=ll[tr],ll[tr]=null,tr--)}function ce(e,t){tr++,ll[tr]=e.current,e.current=t}var yn={},He=xn(yn),Je=xn(!1),In=yn;function hr(e,t){var n=e.type.contextTypes;if(!n)return yn;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 qe(e){return e=e.childContextTypes,e!=null}function pi(){pe(Je),pe(He)}function Bu(e,t,n){if(He.current!==yn)throw Error(S(168));ce(He,t),ce(Je,n)}function fd(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(S(108,Of(e)||"Unknown",o));return ye({},n,r)}function fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,In=He.current,ce(He,e),ce(Je,Je.current),!0}function Gu(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=fd(e,t,In),r.__reactInternalMemoizedMergedChildContext=e,pe(Je),pe(He),ce(He,e)):pe(Je),ce(Je,n)}var Ht=null,Li=!1,Na=!1;function hd(e){Ht===null?Ht=[e]:Ht.push(e)}function Xh(e){Li=!0,hd(e)}function kn(){if(!Na&&Ht!==null){Na=!0;var e=0,t=ie;try{var n=Ht;for(ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ht=null,Li=!1}catch(o){throw Ht!==null&&(Ht=Ht.slice(e+1)),Wc(Rl,kn),o}finally{ie=t,Na=!1}}return null}var nr=[],rr=0,hi=null,gi=0,dt=[],pt=0,Rn=null,Bt=1,Gt="";function Nn(e,t){nr[rr++]=gi,nr[rr++]=hi,hi=e,gi=t}function gd(e,t,n){dt[pt++]=Bt,dt[pt++]=Gt,dt[pt++]=Rn,Rn=e;var r=Bt;e=Gt;var o=32-St(r)-1;r&=~(1<<o),n+=1;var i=32-St(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Bt=1<<32-St(t)+o|n<<o|r,Gt=i+e}else Bt=1<<i|n<<o|r,Gt=e}function Hl(e){e.return!==null&&(Nn(e,1),gd(e,1,0))}function Bl(e){for(;e===hi;)hi=nr[--rr],nr[rr]=null,gi=nr[--rr],nr[rr]=null;for(;e===Rn;)Rn=dt[--pt],dt[pt]=null,Gt=dt[--pt],dt[pt]=null,Bt=dt[--pt],dt[pt]=null}var at=null,it=null,he=!1,_t=null;function md(e,t){var n=ft(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 Vu(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,at=e,it=pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,it=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Rn!==null?{id:Bt,overflow:Gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,at=e,it=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ul(e){if(he){var t=it;if(t){var n=t;if(!Vu(e,t)){if(sl(e))throw Error(S(418));t=pn(n.nextSibling);var r=at;t&&Vu(e,t)?md(r,n):(e.flags=e.flags&-4097|2,he=!1,at=e)}}else{if(sl(e))throw Error(S(418));e.flags=e.flags&-4097|2,he=!1,at=e}}}function Ku(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function $o(e){if(e!==at)return!1;if(!he)return Ku(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ol(e.type,e.memoizedProps)),t&&(t=it)){if(sl(e))throw vd(),Error(S(418));for(;t;)md(e,t),t=pn(t.nextSibling)}if(Ku(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){it=pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}it=null}}else it=at?pn(e.stateNode.nextSibling):null;return!0}function vd(){for(var e=it;e;)e=pn(e.nextSibling)}function gr(){it=at=null,he=!1}function Gl(e){_t===null?_t=[e]:_t.push(e)}var Jh=Jt.ReactCurrentBatchConfig;function Lr(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(S(309));var r=n.stateNode}if(!r)throw Error(S(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(S(284));if(!n._owner)throw Error(S(290,e))}return e}function Ho(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yu(e){var t=e._init;return t(e._payload)}function yd(e){function t(f,h){if(e){var m=f.deletions;m===null?(f.deletions=[h],f.flags|=16):m.push(h)}}function n(f,h){if(!e)return null;for(;h!==null;)t(f,h),h=h.sibling;return null}function r(f,h){for(f=new Map;h!==null;)h.key!==null?f.set(h.key,h):f.set(h.index,h),h=h.sibling;return f}function o(f,h){return f=mn(f,h),f.index=0,f.sibling=null,f}function i(f,h,m){return f.index=m,e?(m=f.alternate,m!==null?(m=m.index,m<h?(f.flags|=2,h):m):(f.flags|=2,h)):(f.flags|=1048576,h)}function a(f){return e&&f.alternate===null&&(f.flags|=2),f}function u(f,h,m,x){return h===null||h.tag!==6?(h=Ia(m,f.mode,x),h.return=f,h):(h=o(h,m),h.return=f,h)}function s(f,h,m,x){var C=m.type;return C===Xn?d(f,h,m.props.children,x,m.key):h!==null&&(h.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===nn&&Yu(C)===h.type)?(x=o(h,m.props),x.ref=Lr(f,h,m),x.return=f,x):(x=ni(m.type,m.key,m.props,null,f.mode,x),x.ref=Lr(f,h,m),x.return=f,x)}function c(f,h,m,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=Ra(m,f.mode,x),h.return=f,h):(h=o(h,m.children||[]),h.return=f,h)}function d(f,h,m,x,C){return h===null||h.tag!==7?(h=Ln(m,f.mode,x,C),h.return=f,h):(h=o(h,m),h.return=f,h)}function p(f,h,m){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Ia(""+h,f.mode,m),h.return=f,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case To:return m=ni(h.type,h.key,h.props,null,f.mode,m),m.ref=Lr(f,null,h),m.return=f,m;case Qn:return h=Ra(h,f.mode,m),h.return=f,h;case nn:var x=h._init;return p(f,x(h._payload),m)}if(zr(h)||Tr(h))return h=Ln(h,f.mode,m,null),h.return=f,h;Ho(f,h)}return null}function g(f,h,m,x){var C=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return C!==null?null:u(f,h,""+m,x);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case To:return m.key===C?s(f,h,m,x):null;case Qn:return m.key===C?c(f,h,m,x):null;case nn:return C=m._init,g(f,h,C(m._payload),x)}if(zr(m)||Tr(m))return C!==null?null:d(f,h,m,x,null);Ho(f,m)}return null}function v(f,h,m,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return f=f.get(m)||null,u(h,f,""+x,C);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case To:return f=f.get(x.key===null?m:x.key)||null,s(h,f,x,C);case Qn:return f=f.get(x.key===null?m:x.key)||null,c(h,f,x,C);case nn:var F=x._init;return v(f,h,m,F(x._payload),C)}if(zr(x)||Tr(x))return f=f.get(m)||null,d(h,f,x,C,null);Ho(h,x)}return null}function b(f,h,m,x){for(var C=null,F=null,L=h,R=h=0,H=null;L!==null&&R<m.length;R++){L.index>R?(H=L,L=null):H=L.sibling;var z=g(f,L,m[R],x);if(z===null){L===null&&(L=H);break}e&&L&&z.alternate===null&&t(f,L),h=i(z,h,R),F===null?C=z:F.sibling=z,F=z,L=H}if(R===m.length)return n(f,L),he&&Nn(f,R),C;if(L===null){for(;R<m.length;R++)L=p(f,m[R],x),L!==null&&(h=i(L,h,R),F===null?C=L:F.sibling=L,F=L);return he&&Nn(f,R),C}for(L=r(f,L);R<m.length;R++)H=v(L,f,R,m[R],x),H!==null&&(e&&H.alternate!==null&&L.delete(H.key===null?R:H.key),h=i(H,h,R),F===null?C=H:F.sibling=H,F=H);return e&&L.forEach(function(Se){return t(f,Se)}),he&&Nn(f,R),C}function w(f,h,m,x){var C=Tr(m);if(typeof C!="function")throw Error(S(150));if(m=C.call(m),m==null)throw Error(S(151));for(var F=C=null,L=h,R=h=0,H=null,z=m.next();L!==null&&!z.done;R++,z=m.next()){L.index>R?(H=L,L=null):H=L.sibling;var Se=g(f,L,z.value,x);if(Se===null){L===null&&(L=H);break}e&&L&&Se.alternate===null&&t(f,L),h=i(Se,h,R),F===null?C=Se:F.sibling=Se,F=Se,L=H}if(z.done)return n(f,L),he&&Nn(f,R),C;if(L===null){for(;!z.done;R++,z=m.next())z=p(f,z.value,x),z!==null&&(h=i(z,h,R),F===null?C=z:F.sibling=z,F=z);return he&&Nn(f,R),C}for(L=r(f,L);!z.done;R++,z=m.next())z=v(L,f,R,z.value,x),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?R:z.key),h=i(z,h,R),F===null?C=z:F.sibling=z,F=z);return e&&L.forEach(function(tt){return t(f,tt)}),he&&Nn(f,R),C}function G(f,h,m,x){if(typeof m=="object"&&m!==null&&m.type===Xn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case To:e:{for(var C=m.key,F=h;F!==null;){if(F.key===C){if(C=m.type,C===Xn){if(F.tag===7){n(f,F.sibling),h=o(F,m.props.children),h.return=f,f=h;break e}}else if(F.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===nn&&Yu(C)===F.type){n(f,F.sibling),h=o(F,m.props),h.ref=Lr(f,F,m),h.return=f,f=h;break e}n(f,F);break}else t(f,F);F=F.sibling}m.type===Xn?(h=Ln(m.props.children,f.mode,x,m.key),h.return=f,f=h):(x=ni(m.type,m.key,m.props,null,f.mode,x),x.ref=Lr(f,h,m),x.return=f,f=x)}return a(f);case Qn:e:{for(F=m.key;h!==null;){if(h.key===F)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(f,h.sibling),h=o(h,m.children||[]),h.return=f,f=h;break e}else{n(f,h);break}else t(f,h);h=h.sibling}h=Ra(m,f.mode,x),h.return=f,f=h}return a(f);case nn:return F=m._init,G(f,h,F(m._payload),x)}if(zr(m))return b(f,h,m,x);if(Tr(m))return w(f,h,m,x);Ho(f,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(f,h.sibling),h=o(h,m),h.return=f,f=h):(n(f,h),h=Ia(m,f.mode,x),h.return=f,f=h),a(f)):n(f,h)}return G}var mr=yd(!0),wd=yd(!1),mi=xn(null),vi=null,or=null,Vl=null;function Kl(){Vl=or=vi=null}function Yl(e){var t=mi.current;pe(mi),e._currentValue=t}function cl(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 dr(e,t){vi=e,Vl=or=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Vl!==e)if(e={context:e,memoizedValue:t,next:null},or===null){if(vi===null)throw Error(S(308));or=e,vi.dependencies={lanes:0,firstContext:e}}else or=or.next=e;return t}var Pn=null;function Ql(e){Pn===null?Pn=[e]:Pn.push(e)}function xd(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ql(t)):(n.next=o.next,o.next=n),t.interleaved=n,Qt(e,r)}function Qt(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 rn=!1;function Xl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kd(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 Vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Qt(e,n)}return o=r.interleaved,o===null?(t.next=t,Ql(r)):(t.next=o.next,o.next=t),r.interleaved=t,Qt(e,n)}function Xo(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,Ol(e,n)}}function Qu(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 yi(e,t,n,r){var o=e.updateQueue;rn=!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 p=o.baseState;a=0,d=c=s=null,u=i;do{var g=u.lane,v=u.eventTime;if((r&g)===g){d!==null&&(d=d.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var b=e,w=u;switch(g=t,v=n,w.tag){case 1:if(b=w.payload,typeof b=="function"){p=b.call(v,p,g);break e}p=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=w.payload,g=typeof b=="function"?b.call(v,p,g):b,g==null)break e;p=ye({},p,g);break e;case 2:rn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[u]:g.push(u))}else v={eventTime:v,lane:g,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(c=d=v,s=p):d=d.next=v,a|=g;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;g=u,u=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(1);if(d===null&&(s=p),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);An|=a,e.lanes=a,e.memoizedState=p}}function Xu(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(S(191,o));o.call(r)}}}var mo={},Ot=xn(mo),ao=xn(mo),lo=xn(mo);function Mn(e){if(e===mo)throw Error(S(174));return e}function Jl(e,t){switch(ce(lo,t),ce(ao,e),ce(Ot,mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ba(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ba(t,e)}pe(Ot),ce(Ot,t)}function vr(){pe(Ot),pe(ao),pe(lo)}function bd(e){Mn(lo.current);var t=Mn(Ot.current),n=Ba(t,e.type);t!==n&&(ce(ao,e),ce(Ot,n))}function ql(e){ao.current===e&&(pe(Ot),pe(ao))}var me=xn(0);function wi(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 Ea=[];function Zl(){for(var e=0;e<Ea.length;e++)Ea[e]._workInProgressVersionPrimary=null;Ea.length=0}var Jo=Jt.ReactCurrentDispatcher,Ta=Jt.ReactCurrentBatchConfig,On=0,ve=null,Me=null,Ie=null,xi=!1,Gr=!1,so=0,qh=0;function je(){throw Error(S(321))}function es(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,o,i){if(On=i,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Jo.current=e===null||e.memoizedState===null?ng:rg,e=n(r,o),Gr){i=0;do{if(Gr=!1,so=0,25<=i)throw Error(S(301));i+=1,Ie=Me=null,t.updateQueue=null,Jo.current=og,e=n(r,o)}while(Gr)}if(Jo.current=ki,t=Me!==null&&Me.next!==null,On=0,Ie=Me=ve=null,xi=!1,t)throw Error(S(300));return e}function ns(){var e=so!==0;return so=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ve.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function mt(){if(Me===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Ie===null?ve.memoizedState:Ie.next;if(t!==null)Ie=t,Me=e;else{if(e===null)throw Error(S(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ie===null?ve.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function uo(e,t){return typeof t=="function"?t(e):t}function Pa(e){var t=mt(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=Me,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((On&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 p={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=p,a=r):s=s.next=p,ve.lanes|=d,An|=d}c=c.next}while(c!==null&&c!==i);s===null?a=r:s.next=u,Nt(r,t.memoizedState)||(Xe=!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,ve.lanes|=i,An|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ma(e){var t=mt(),n=t.queue;if(n===null)throw Error(S(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);Nt(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function _d(){}function Sd(e,t){var n=ve,r=mt(),o=t(),i=!Nt(r.memoizedState,o);if(i&&(r.memoizedState=o,Xe=!0),r=r.queue,rs(Ed.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,co(9,Nd.bind(null,n,r,o,t),void 0,null),Re===null)throw Error(S(349));On&30||Cd(n,t,o)}return o}function Cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.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,Td(t)&&Pd(e)}function Ed(e,t,n){return n(function(){Td(t)&&Pd(e)})}function Td(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nt(e,n)}catch{return!0}}function Pd(e){var t=Qt(e,1);t!==null&&Ct(t,e,1,-1)}function Ju(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:e},t.queue=e,e=e.dispatch=tg.bind(null,ve,e),[t.memoizedState,e]}function co(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.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 Md(){return mt().memoizedState}function qo(e,t,n,r){var o=Lt();ve.flags|=e,o.memoizedState=co(1|t,n,void 0,r===void 0?null:r)}function Ii(e,t,n,r){var o=mt();r=r===void 0?null:r;var i=void 0;if(Me!==null){var a=Me.memoizedState;if(i=a.destroy,r!==null&&es(r,a.deps)){o.memoizedState=co(t,n,i,r);return}}ve.flags|=e,o.memoizedState=co(1|t,n,i,r)}function qu(e,t){return qo(8390656,8,e,t)}function rs(e,t){return Ii(2048,8,e,t)}function Fd(e,t){return Ii(4,2,e,t)}function Ld(e,t){return Ii(4,4,e,t)}function Id(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 Rd(e,t,n){return n=n!=null?n.concat([e]):null,Ii(4,4,Id.bind(null,t,e),n)}function os(){}function Od(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ad(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&es(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function zd(e,t,n){return On&21?(Nt(n,t)||(n=$c(),ve.lanes|=n,An|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=n)}function Zh(e,t){var n=ie;ie=n!==0&&4>n?n:4,e(!0);var r=Ta.transition;Ta.transition={};try{e(!1),t()}finally{ie=n,Ta.transition=r}}function Dd(){return mt().memoizedState}function eg(e,t,n){var r=gn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wd(e))jd(t,n);else if(n=xd(e,t,n,r),n!==null){var o=Ke();Ct(n,e,r,o),Ud(n,t,r)}}function tg(e,t,n){var r=gn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wd(e))jd(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,Nt(u,a)){var s=t.interleaved;s===null?(o.next=o,Ql(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=xd(e,t,o,r),n!==null&&(o=Ke(),Ct(n,e,r,o),Ud(n,t,r))}}function Wd(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function jd(e,t){Gr=xi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ud(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ol(e,n)}}var ki={readContext:gt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},ng={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qo(4194308,4,Id.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return qo(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();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=eg.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Ju,useDebugValue:os,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Ju(!1),t=e[0];return e=Zh.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,o=Lt();if(he){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),Re===null)throw Error(S(349));On&30||Cd(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,qu(Ed.bind(null,r,i,e),[e]),r.flags|=2048,co(9,Nd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Re.identifierPrefix;if(he){var n=Gt,r=Bt;n=(r&~(1<<32-St(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=so++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=qh++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rg={readContext:gt,useCallback:Od,useContext:gt,useEffect:rs,useImperativeHandle:Rd,useInsertionEffect:Fd,useLayoutEffect:Ld,useMemo:Ad,useReducer:Pa,useRef:Md,useState:function(){return Pa(uo)},useDebugValue:os,useDeferredValue:function(e){var t=mt();return zd(t,Me.memoizedState,e)},useTransition:function(){var e=Pa(uo)[0],t=mt().memoizedState;return[e,t]},useMutableSource:_d,useSyncExternalStore:Sd,useId:Dd,unstable_isNewReconciler:!1},og={readContext:gt,useCallback:Od,useContext:gt,useEffect:rs,useImperativeHandle:Rd,useInsertionEffect:Fd,useLayoutEffect:Ld,useMemo:Ad,useReducer:Ma,useRef:Md,useState:function(){return Ma(uo)},useDebugValue:os,useDeferredValue:function(e){var t=mt();return Me===null?t.memoizedState=e:zd(t,Me.memoizedState,e)},useTransition:function(){var e=Ma(uo)[0],t=mt().memoizedState;return[e,t]},useMutableSource:_d,useSyncExternalStore:Sd,useId:Dd,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function dl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ri={isMounted:function(e){return(e=e._reactInternals)?Wn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ke(),o=gn(e),i=Vt(r,o);i.payload=t,n!=null&&(i.callback=n),t=fn(e,i,o),t!==null&&(Ct(t,e,o,r),Xo(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ke(),o=gn(e),i=Vt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fn(e,i,o),t!==null&&(Ct(t,e,o,r),Xo(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ke(),r=gn(e),o=Vt(n,r);o.tag=2,t!=null&&(o.callback=t),t=fn(e,o,r),t!==null&&(Ct(t,e,r,n),Xo(t,e,r))}};function Zu(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?!no(n,r)||!no(o,i):!0}function $d(e,t,n){var r=!1,o=yn,i=t.contextType;return typeof i=="object"&&i!==null?i=gt(i):(o=qe(t)?In:He.current,r=t.contextTypes,i=(r=r!=null)?hr(e,o):yn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ri,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ec(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&&Ri.enqueueReplaceState(t,t.state,null)}function pl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Xl(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=gt(i):(i=qe(t)?In:He.current,o.context=hr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(dl(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&&Ri.enqueueReplaceState(o,o.state,null),yi(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function yr(e,t){try{var n="",r=t;do n+=Rf(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 xa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function nl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rg=typeof WeakMap=="function"?WeakMap:Map;function _d(e,t,n){n=Mt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pi||(pi=!0,pl=r),nl(e,t)},n}function Sd(e,t,n){n=Mt(-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(){nl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){nl(e,t),typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ou(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rg;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=Kg.bind(null,e,t,n),t.then(e,e))}function zu(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 Au(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=Mt(-1,1),t.tag=2,Qt(n,t,1))),n.lanes|=1),e)}var Lg=zt.ReactCurrentOwner,je=!1;function Re(e,t,n,r){t.child=e===null?Zc(t,null,n,r):Jn(t,e.child,n,r)}function Du(e,t,n,r,o){n=n.render;var i=t.ref;return $n(t,o),r=Gl(e,t,n,r,i,o),n=$l(),e!==null&&!je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ot(e,t,o)):(re&&n&&Il(t),t.flags|=1,Re(e,t,r,o),t.child)}function ju(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!ts(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Cd(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 Ot(e,t,o)}return t.flags|=1,e=qt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Cd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Gr(i,r)&&e.ref===t.ref)if(je=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(je=!0);else return t.lanes=e.lanes,Ot(e,t,o)}return rl(e,t,n,r,o)}function Nd(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(Un,$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(Un,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(Un,$e),$e|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(Un,$e),$e|=r;return Re(e,t,o,n),t.child}function Ed(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rl(e,t,n,r,o){var i=We(n)?gn:Fe.current;return i=Yn(t,i),$n(t,o),n=Gl(e,t,n,r,i,o),r=$l(),e!==null&&!je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ot(e,t,o)):(re&&r&&Il(t),t.flags|=1,Re(e,t,n,o),t.child)}function Uu(e,t,n,r,o){if(We(n)){var i=!0;ni(t)}else i=!1;if($n(t,o),t.stateNode===null)Ho(e,t),bd(t,n,r),tl(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=We(n)?gn:Fe.current,c=Yn(t,c));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==c)&&Lu(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||Ue.current||Ut?(typeof d=="function"&&(el(t,n,d,r),s=t.memoizedState),(u=Ut||Ru(t,n,u,r,m,s,c))?(p||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,td(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:dt(t.type,u),a.props=c,p=t.pendingProps,m=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=ot(s):(s=We(n)?gn:Fe.current,s=Yn(t,s));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==p||m!==s)&&Lu(t,a,r,s),Ut=!1,m=t.memoizedState,a.state=m,li(t,r,a,o);var w=t.memoizedState;u!==p||m!==w||Ue.current||Ut?(typeof y=="function"&&(el(t,n,y,r),w=t.memoizedState),(c=Ut||Ru(t,n,c,r,m,w,s)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,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=w),a.props=r,a.state=w,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 ol(e,t,n,r,i,o)}function ol(e,t,n,r,o,i){Ed(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Cu(t,n,!1),Ot(e,t,i);r=t.stateNode,Lg.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)):Re(e,t,u,i),t.memoizedState=r.state,o&&Cu(t,n,!0),t.child}function Td(e){var t=e.stateNode;t.pendingContext?Su(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Su(e,t.context,!1),Ul(e,t.containerInfo)}function Wu(e,t,n,r,o){return Qn(),Ll(o),t.flags|=256,Re(e,t,n,r),t.child}var il={dehydrated:null,treeContext:null,retryLane:0};function al(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pd(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 qa(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=Ni(a,r,0,null),e=fn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=al(n),t.memoizedState=il,e):Yl(t,a));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return Og(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=fn(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?al(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=il,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 Yl(e,t){return t=Ni({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ro(e,t,n,r){return r!==null&&Ll(r),Jn(t,e.child,null,n),e=Yl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Og(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=xa(Error(b(422))),Ro(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ni({mode:"visible",children:r.children},o,0,null),i=fn(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=al(a),t.memoizedState=il,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(b(419)),r=xa(i,r,void 0),Ro(e,t,a,r)}if(u=(a&e.childLanes)!==0,je||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,Lt(e,o),ht(r,e,o,-1))}return es(),r=xa(Error(b(421))),Ro(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Yg.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ve=Yt(o.nextSibling),Ke=t,re=!0,ft=null,e!==null&&(et[tt++]=Pt,et[tt++]=Ft,et[tt++]=hn,Pt=e.id,Ft=e.overflow,hn=t),t=Yl(t,r.children),t.flags|=4096,t)}function Hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Za(e.return,t,n)}function ka(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 Fd(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&&Hu(e,n,t);else if(e.tag===19)Hu(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),ka(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}ka(t,!0,n,null,i);break;case"together":ka(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ho(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ot(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(b(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 zg(e,t,n){switch(t.tag){case 3:Td(t),Qn();break;case 5:nd(t);break;case 1:We(t.type)&&ni(t);break;case 4:Ul(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?Pd(e,t,n):(X(ie,ie.current&1),e=Ot(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 Fd(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,Nd(e,t,n)}return Ot(e,t,n)}var Md,ll,Id,Rd;Md=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}};ll=function(){};Id=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,dn(_t.current);var i=null;switch(n){case"input":o=Pa(e,o),r=Pa(e,r),i=[];break;case"select":o=le({},o,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":o=Ia(e,o),r=Ia(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ei)}La(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)}};Rd=function(e,t,n,r){n!==r&&(t.flags|=4)};function kr(e,t){if(!re)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 Te(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 Ag(e,t,n){var r=t.pendingProps;switch(Rl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Te(t),null;case 1:return We(t.type)&&ti(),Te(t),null;case 3:return r=t.stateNode,Xn(),te(Ue),te(Fe),Hl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Mo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ft!==null&&(hl(ft),ft=null))),ll(e,t),Te(t),null;case 5:Wl(t);var o=dn(Qr.current);if(n=t.type,e!==null&&t.stateNode!=null)Id(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(b(166));return Te(t),null}if(e=dn(_t.current),Mo(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":Js(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)}La(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&&Fo(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Fo(r.textContent,u,e),o=["children",""+u]):Ar.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&ee("scroll",r)}switch(n){case"input":yo(r),Xs(r,i,!0);break;case"textarea":yo(r),Zs(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=lc(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,Md(e,t,!1,!1),t.stateNode=e;e:{switch(a=Oa(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":Js(e,r),o=Pa(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=Ia(e,r),ee("invalid",e);break;default:o=r}La(n,o),u=o;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?cc(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&sc(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&&yl(e,i,s,a))}switch(n){case"input":yo(e),Xs(e,r,!1);break;case"textarea":yo(e),Zs(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?Wn(e,!!r.multiple,i,!1):r.defaultValue!=null&&Wn(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 Te(t),null;case 6:if(e&&t.stateNode!=null)Rd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(b(166));if(n=dn(Qr.current),dn(_t.current),Mo(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(i=r.nodeValue!==n)&&(e=Ke,e!==null))switch(e.tag){case 3:Fo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fo(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 Te(t),null;case 13:if(te(ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(re&&Ve!==null&&t.mode&1&&!(t.flags&128))Xc(),Qn(),t.flags|=98560,i=!1;else if(i=Mo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(b(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(b(317));i[kt]=t}else Qn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Te(t),i=!1}else ft!==null&&(hl(ft),ft=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):es())),t.updateQueue!==null&&(t.flags|=4),Te(t),null);case 4:return Xn(),ll(e,t),e===null&&$r(t.stateNode.containerInfo),Te(t),null;case 10:return Al(t.type._context),Te(t),null;case 17:return We(t.type)&&ti(),Te(t),null;case 19:if(te(ie),i=t.memoizedState,i===null)return Te(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()>Zn&&(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&&!re)return Te(t),null}else 2*de()-i.renderingStartTime>Zn&&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):(Te(t),null);case 22:case 23:return Zl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Te(t),t.subtreeFlags&6&&(t.flags|=8192)):Te(t),null;case 24:return null;case 25:return null}throw Error(b(156,t.tag))}function Dg(e,t){switch(Rl(t),t.tag){case 1:return We(t.type)&&ti(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),te(Ue),te(Fe),Hl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wl(t),null;case 13:if(te(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ie),null;case 4:return Xn(),null;case 10:return Al(t.type._context),null;case 22:case 23:return Zl(),null;case 24:return null;default:return null}}var Lo=!1,Pe=!1,jg=typeof WeakSet=="function"?WeakSet:Set,T=null;function jn(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 sl(e,t,n){try{n()}catch(r){se(e,t,r)}}var Bu=!1;function Ug(e,t){if($a=Xo,e=Dc(),Ml(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,p=e,m=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(u=a+o),p!==i||r!==0&&p.nodeType!==3||(s=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(y=p.firstChild)!==null;)m=p,p=y;for(;;){if(p===e)break t;if(m===n&&++c===o&&(u=a),m===i&&++d===r&&(s=a),(y=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=y}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={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 w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,H=w.memoizedState,g=t.stateNode,f=g.getSnapshotBeforeUpdate(t.elementType===t.type?S:dt(t.type,S),H);g.__reactInternalSnapshotBeforeUpdate=f}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(b(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 w=Bu,Bu=!1,w}function Lr(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&&sl(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 ul(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 Ld(e){var t=e.alternate;t!==null&&(e.alternate=null,Ld(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[Qa],delete t[bg],delete t[_g])),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 Od(e){return e.tag===5||e.tag===3||e.tag===4}function Gu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Od(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 cl(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(cl(e,t,n),e=e.sibling;e!==null;)cl(e,t,n),e=e.sibling}function dl(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(dl(e,t,n),e=e.sibling;e!==null;)dl(e,t,n),e=e.sibling}var be=null,pt=!1;function Dt(e,t,n){for(n=n.child;n!==null;)zd(e,t,n),n=n.sibling}function zd(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(mi,n)}catch{}switch(n.tag){case 5:Pe||jn(n,t);case 6:var r=be,o=pt;be=null,Dt(e,t,n),be=r,pt=o,be!==null&&(pt?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(pt?(e=be,n=n.stateNode,e.nodeType===8?ga(e.parentNode,n):e.nodeType===1&&ga(e,n),Hr(e)):ga(be,n.stateNode));break;case 4:r=be,o=pt,be=n.stateNode.containerInfo,pt=!0,Dt(e,t,n),be=r,pt=o;break;case 0:case 11:case 14:case 15:if(!Pe&&(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)&&sl(n,t,a),o=o.next}while(o!==r)}Dt(e,t,n);break;case 1:if(!Pe&&(jn(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?(Pe=(r=Pe)||n.memoizedState!==null,Dt(e,t,n),Pe=r):Dt(e,t,n);break;default:Dt(e,t,n)}}function $u(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jg),t.forEach(function(r){var o=Qg.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ct(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:be=u.stateNode,pt=!1;break e;case 3:be=u.stateNode.containerInfo,pt=!0;break e;case 4:be=u.stateNode.containerInfo,pt=!0;break e}u=u.return}if(be===null)throw Error(b(160));zd(i,a,o),be=null,pt=!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;)Ad(t,e),t=t.sibling}function Ad(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),wt(e),r&4){try{Lr(3,e,e.return),Si(3,e)}catch(S){se(e,e.return,S)}try{Lr(5,e,e.return)}catch(S){se(e,e.return,S)}}break;case 1:ct(t,e),wt(e),r&512&&n!==null&&jn(n,n.return);break;case 5:if(ct(t,e),wt(e),r&512&&n!==null&&jn(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&&ic(o,i),Oa(u,a);var c=Oa(u,i);for(a=0;a<s.length;a+=2){var d=s[a],p=s[a+1];d==="style"?cc(o,p):d==="dangerouslySetInnerHTML"?sc(o,p):d==="children"?Dr(o,p):yl(o,d,p,c)}switch(u){case"input":Fa(o,i);break;case"textarea":ac(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?Wn(o,!!i.multiple,y,!1):m!==!!i.multiple&&(i.defaultValue!=null?Wn(o,!!i.multiple,i.defaultValue,!0):Wn(o,!!i.multiple,i.multiple?[]:"",!1))}o[Kr]=i}catch(S){se(e,e.return,S)}}break;case 6:if(ct(t,e),wt(e),r&4){if(e.stateNode===null)throw Error(b(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(S){se(e,e.return,S)}}break;case 3:if(ct(t,e),wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(S){se(e,e.return,S)}break;case 4:ct(t,e),wt(e);break;case 13:ct(t,e),wt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Xl=de())),r&4&&$u(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Pe=(c=Pe)||d,ct(t,e),Pe=c):ct(t,e),wt(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(p=T=d;T!==null;){switch(m=T,y=m.child,m.tag){case 0:case 11:case 14:case 15:Lr(4,m,m.return);break;case 1:jn(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){se(r,n,S)}}break;case 5:jn(m,m.return);break;case 22:if(m.memoizedState!==null){Ku(p);continue}}y!==null?(y.return=m,T=y):Ku(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=p.stateNode,s=p.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=uc("display",a))}catch(S){se(e,e.return,S)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(S){se(e,e.return,S)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:ct(t,e),wt(e),r&4&&$u(e);break;case 21:break;default:ct(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Od(n)){var r=n;break e}n=n.return}throw Error(b(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Dr(o,""),r.flags&=-33);var i=Gu(e);dl(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,u=Gu(e);cl(e,u,a);break;default:throw Error(b(161))}}catch(s){se(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wg(e,t,n){T=e,Dd(e,t,n)}function Dd(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||Lo;if(!a){var u=o.alternate,s=u!==null&&u.memoizedState!==null||Pe;u=Lo;var c=Pe;if(Lo=a,(Pe=s)&&!c)for(T=o;T!==null;)a=T,s=a.child,a.tag===22&&a.memoizedState!==null?Yu(o):s!==null?(s.return=a,T=s):Yu(o);for(;i!==null;)T=i,Dd(i,t,n),i=i.sibling;T=o,Lo=u,Pe=c}Vu(e,t,n)}else o.subtreeFlags&8772&&i!==null?(i.return=o,T=i):Vu(e,t,n)}}function Vu(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:Pe||Si(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Pe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:dt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Fu(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}Fu(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 p=d.dehydrated;p!==null&&Hr(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(b(163))}Pe||t.flags&512&&ul(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 Ku(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 Yu(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{ul(t)}catch(s){se(t,i,s)}break;case 5:var a=t.return;try{ul(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 Hg=Math.ceil,di=zt.ReactCurrentDispatcher,Ql=zt.ReactCurrentOwner,rt=zt.ReactCurrentBatchConfig,G=0,me=null,pe=null,_e=0,$e=0,Un=nn(0),ge=0,Zr=null,vn=0,Ci=0,Jl=0,Or=null,De=null,Xl=0,Zn=1/0,Et=null,pi=!1,pl=null,Jt=null,Oo=!1,Gt=null,fi=0,zr=0,fl=null,Bo=-1,Go=0;function Le(){return G&6?de():Bo!==-1?Bo:Bo=de()}function Xt(e){return e.mode&1?G&2&&_e!==0?_e&-_e:Cg.transition!==null?(Go===0&&(Go=bc()),Go):(e=Q,e!==0||(e=window.event,e=e===void 0?16:Pc(e.type)),e):1}function ht(e,t,n,r){if(50<zr)throw zr=0,fl=null,Error(b(185));eo(e,n,r),(!(G&2)||e!==me)&&(e===me&&(!(G&2)&&(Ci|=n),ge===4&&Ht(e,_e)),He(e,r),n===1&&G===0&&!(t.mode&1)&&(Zn=de()+500,ki&&rn()))}function He(e,t){var n=e.callbackNode;Ef(e,t);var r=Jo(e,e===me?_e:0);if(r===0)n!==null&&nu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nu(n),t===1)e.tag===0?Sg(Qu.bind(null,e)):Yc(Qu.bind(null,e)),xg(function(){!(G&6)&&rn()}),n=null;else{switch(_c(r)){case 1:n=_l;break;case 4:n=xc;break;case 16:n=Qo;break;case 536870912:n=kc;break;default:n=Qo}n=Vd(n,jd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function jd(e,t){if(Bo=-1,Go=0,G&6)throw Error(b(327));var n=e.callbackNode;if(Vn()&&e.callbackNode!==n)return null;var r=Jo(e,e===me?_e: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=Wd();(me!==e||_e!==t)&&(Et=null,Zn=de()+500,pn(e,t));do try{$g();break}catch(u){Ud(e,u)}while(1);zl(),di.current=i,G=o,pe!==null?t=0:(me=null,_e=0,t=ge)}if(t!==0){if(t===2&&(o=Ua(e),o!==0&&(r=o,t=gl(e,o))),t===1)throw n=Zr,pn(e,0),Ht(e,r),He(e,de()),n;if(t===6)Ht(e,r);else{if(o=e.current.alternate,!(r&30)&&!Bg(o)&&(t=gi(e,r),t===2&&(i=Ua(e),i!==0&&(r=i,t=gl(e,i))),t===1))throw n=Zr,pn(e,0),Ht(e,r),He(e,de()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(b(345));case 2:sn(e,De,Et);break;case 3:if(Ht(e,r),(r&130023424)===r&&(t=Xl+500-de(),10<t)){if(Jo(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Le(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ya(sn.bind(null,e,De,Et),t);break}sn(e,De,Et);break;case 4:if(Ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-gt(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*Hg(r/1960))-r,10<r){e.timeoutHandle=Ya(sn.bind(null,e,De,Et),r);break}sn(e,De,Et);break;case 5:sn(e,De,Et);break;default:throw Error(b(329))}}}return He(e,de()),e.callbackNode===n?jd.bind(null,e):null}function gl(e,t){var n=Or;return e.current.memoizedState.isDehydrated&&(pn(e,t).flags|=256),e=gi(e,t),e!==2&&(t=De,De=n,t!==null&&hl(t)),e}function hl(e){De===null?De=e:De.push.apply(De,e)}function Bg(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(!mt(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 Ht(e,t){for(t&=~Jl,t&=~Ci,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gt(t),r=1<<n;e[n]=-1,t&=~r}}function Qu(e){if(G&6)throw Error(b(327));Vn();var t=Jo(e,0);if(!(t&1))return He(e,de()),null;var n=gi(e,t);if(e.tag!==0&&n===2){var r=Ua(e);r!==0&&(t=r,n=gl(e,r))}if(n===1)throw n=Zr,pn(e,0),Ht(e,t),He(e,de()),n;if(n===6)throw Error(b(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sn(e,De,Et),He(e,de()),null}function ql(e,t){var n=G;G|=1;try{return e(t)}finally{G=n,G===0&&(Zn=de()+500,ki&&rn())}}function yn(e){Gt!==null&&Gt.tag===0&&!(G&6)&&Vn();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 Zl(){$e=Un.current,te(Un)}function pn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wg(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(Rl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ti();break;case 3:Xn(),te(Ue),te(Fe),Hl();break;case 5:Wl(r);break;case 4:Xn();break;case 13:te(ie);break;case 19:te(ie);break;case 10:Al(r.type._context);break;case 22:case 23:Zl()}n=n.return}if(me=e,pe=e=qt(e.current,null),_e=$e=t,ge=0,Zr=null,Jl=Ci=vn=0,De=Or=null,cn!==null){for(t=0;t<cn.length;t++)if(n=cn[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}cn=null}return e}function Ud(e,t){do{var n=pe;try{if(zl(),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(mn=0,he=fe=ae=null,Rr=!1,Jr=0,Ql.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=_e,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,d=u,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===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=zu(a);if(y!==null){y.flags&=-257,Au(y,a,u,i,t),y.mode&1&&Ou(i,c,t),t=y,s=c;var w=t.updateQueue;if(w===null){var S=new Set;S.add(s),t.updateQueue=S}else w.add(s);break e}else{if(!(t&1)){Ou(i,c,t),es();break e}s=Error(b(426))}}else if(re&&u.mode&1){var H=zu(a);if(H!==null){!(H.flags&65536)&&(H.flags|=256),Au(H,a,u,i,t),Ll(qn(s,u));break e}}i=s=qn(s,u),ge!==4&&(ge=2),Or===null?Or=[i]:Or.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=_d(i,s,t);Pu(i,g);break e;case 1:u=s;var f=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Jt===null||!Jt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=Sd(i,u,t);Pu(i,x);break e}}i=i.return}while(i!==null)}Bd(n)}catch(C){t=C,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(1)}function Wd(){var e=di.current;return di.current=ci,e===null?ci:e}function es(){(ge===0||ge===3||ge===2)&&(ge=4),me===null||!(vn&268435455)&&!(Ci&268435455)||Ht(me,_e)}function gi(e,t){var n=G;G|=2;var r=Wd();(me!==e||_e!==t)&&(Et=null,pn(e,t));do try{Gg();break}catch(o){Ud(e,o)}while(1);if(zl(),G=n,di.current=r,pe!==null)throw Error(b(261));return me=null,_e=0,ge}function Gg(){for(;pe!==null;)Hd(pe)}function $g(){for(;pe!==null&&!yf();)Hd(pe)}function Hd(e){var t=$d(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?Bd(e):pe=t,Ql.current=null}function Bd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Dg(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=Ag(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 sn(e,t,n){var r=Q,o=rt.transition;try{rt.transition=null,Q=1,Vg(e,t,n,r)}finally{rt.transition=o,Q=r}return null}function Vg(e,t,n,r){do Vn();while(Gt!==null);if(G&6)throw Error(b(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(b(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Tf(e,i),e===me&&(pe=me=null,_e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Oo||(Oo=!0,Vd(Qo,function(){return Vn(),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,Ql.current=null,Ug(e,n),Ad(n,e),gg(Va),Xo=!!$a,Va=$a=null,e.current=n,Wg(n,e,o),wf(),G=u,Q=a,rt.transition=i}else e.current=n;if(Oo&&(Oo=!1,Gt=e,fi=o),i=e.pendingLanes,i===0&&(Jt=null),bf(n.stateNode,r),He(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=pl,pl=null,e;return fi&1&&e.tag!==0&&Vn(),i=e.pendingLanes,i&1?e===fl?zr++:(zr=0,fl=e):zr=0,rn(),null}function Vn(){if(Gt!==null){var e=_c(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(b(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:Lr(8,d,i)}var p=d.child;if(p!==null)p.return=d,T=p;else for(;T!==null;){d=T;var m=d.sibling,y=d.return;if(Ld(d),d===c){T=null;break}if(m!==null){m.return=y,T=m;break}T=y}}}var w=i.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var H=S.sibling;S.sibling=null,S=H}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:Lr(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,T=g;break e}T=i.return}}var f=e.current;for(T=f;T!==null;){a=T;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,T=h;else e:for(a=f;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(),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(mi,e)}catch{}r=!0}return r}finally{Q=n,rt.transition=t}}return!1}function Ju(e,t,n){t=qn(n,t),t=_d(e,t,1),e=Qt(e,t,1),t=Le(),e!==null&&(eo(e,1,t),He(e,t))}function se(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=qn(n,e),e=Sd(t,e,1),t=Qt(t,e,1),e=Le(),t!==null&&(eo(t,1,e),He(t,e));break}}t=t.return}}function Kg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Le(),e.pingedLanes|=e.suspendedLanes&n,me===e&&(_e&n)===n&&(ge===4||ge===3&&(_e&130023424)===_e&&500>de()-Xl?pn(e,0):Jl|=n),He(e,t)}function Gd(e,t){t===0&&(e.mode&1?(t=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):t=1);var n=Le();e=Lt(e,t),e!==null&&(eo(e,t,n),He(e,n))}function Yg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gd(e,n)}function Qg(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(b(314))}r!==null&&r.delete(t),Gd(e,n)}var $d;$d=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return je=!1,zg(e,t,n);je=!!(e.flags&131072)}else je=!1,re&&t.flags&1048576&&Qc(t,oi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ho(e,t),e=t.pendingProps;var o=Yn(t,Fe.current);$n(t,n),o=Gl(null,t,r,e,o,n);var i=$l();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,We(r)?(i=!0,ni(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jl(t),o.updater=_i,t.stateNode=o,o._reactInternals=t,tl(t,r,e,n),t=ol(null,t,r,!0,i,n)):(t.tag=0,re&&i&&Il(t),Re(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ho(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Xg(r),e=dt(r,e),o){case 0:t=rl(null,t,r,e,n);break e;case 1:t=Uu(null,t,r,e,n);break e;case 11:t=Du(null,t,r,e,n);break e;case 14:t=ju(null,t,r,dt(r.type,e),n);break e}throw Error(b(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),rl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Uu(e,t,r,o,n);case 3:e:{if(Td(t),e===null)throw Error(b(387));r=t.pendingProps,i=t.memoizedState,o=i.element,td(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=qn(Error(b(423)),t),t=Wu(e,t,r,n,o);break e}else if(r!==o){o=qn(Error(b(424)),t),t=Wu(e,t,r,n,o);break e}else for(Ve=Yt(t.stateNode.containerInfo.firstChild),Ke=t,re=!0,ft=null,n=Zc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qn(),r===o){t=Ot(e,t,n);break e}Re(e,t,r,n)}t=t.child}return t;case 5:return nd(t),e===null&&qa(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Ka(r,o)?a=null:i!==null&&Ka(r,i)&&(t.flags|=32),Ed(e,t),Re(e,t,a,n),t.child;case 6:return e===null&&qa(t),null;case 13:return Pd(e,t,n);case 4:return Ul(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jn(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:dt(r,o),Du(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(mt(i.value,a)){if(i.children===o.children&&!Ue.current){t=Ot(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=Mt(-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),Za(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(b(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Za(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,$n(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=dt(r,t.pendingProps),o=dt(r.type,o),ju(e,t,r,o,n);case 15:return Cd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Ho(e,t),t.tag=1,We(r)?(e=!0,ni(t)):e=!1,$n(t,n),bd(t,r,o),tl(t,r,o,n),ol(null,t,r,!0,e,n);case 19:return Fd(e,t,n);case 22:return Nd(e,t,n)}throw Error(b(156,t.tag))};function Vd(e,t){return wc(e,t)}function Jg(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 Jg(e,t,n,r)}function ts(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xg(e){if(typeof e=="function")return ts(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xl)return 11;if(e===kl)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")ts(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Fn:return fn(n.children,o,i,t);case wl:a=8,o|=8;break;case Ca:return e=nt(12,n,t,o|2),e.elementType=Ca,e.lanes=i,e;case Na:return e=nt(13,n,t,o),e.elementType=Na,e.lanes=i,e;case Ea:return e=nt(19,n,t,o),e.elementType=Ea,e.lanes=i,e;case nc:return Ni(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ec:a=10;break e;case tc:a=9;break e;case xl:a=11;break e;case kl:a=14;break e;case jt:a=16,r=null;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=nt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function fn(e,t,n,r){return e=nt(7,e,r,t),e.lanes=n,e}function Ni(e,t,n,r){return e=nt(22,e,r,t),e.elementType=nc,e.lanes=n,e.stateNode={isHidden:!1},e}function ba(e,t,n){return e=nt(6,e,null,t),e.lanes=n,e}function _a(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 qg(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=aa(0),this.expirationTimes=aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ns(e,t,n,r,o,i,a,u,s){return e=new qg(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},jl(i),e}function Zg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Kd(e){if(!e)return en;e=e._reactInternals;e:{if(xn(e)!==e||e.tag!==1)throw Error(b(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(b(171))}if(e.tag===1){var n=e.type;if(We(n))return Kc(e,n,t)}return t}function Yd(e,t,n,r,o,i,a,u,s){return e=ns(n,r,!0,e,o,i,a,u,s),e.context=Kd(null),n=e.current,r=Le(),o=Xt(n),i=Mt(r,o),i.callback=t??null,Qt(n,i,o),e.current.lanes=o,eo(e,o,r),He(e,r),e}function Ei(e,t,n,r){var o=t.current,i=Le(),a=Xt(o);return n=Kd(n),t.context===null?t.context=n:t.pendingContext=n,t=Mt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qt(o,t,a),e!==null&&(ht(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 Xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rs(e,t){Xu(e,t),(e=e.alternate)&&Xu(e,t)}function eh(){return null}var Qd=typeof reportError=="function"?reportError:function(e){console.error(e)};function os(e){this._internalRoot=e}Ti.prototype.render=os.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(b(409));Ei(e,t,null,null)};Ti.prototype.unmount=os.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yn(function(){Ei(null,e,null,null)}),t[Rt]=null}};function Ti(e){this._internalRoot=e}Ti.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nc();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&&Tc(e)}};function is(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function qu(){}function th(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=Yd(t,r,e,0,null,!1,!1,"",qu);return e._reactRootContainer=a,e[Rt]=a.current,$r(e.nodeType===8?e.parentNode:e),yn(),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=ns(e,0,!1,null,null,!1,!1,"",qu);return e._reactRootContainer=s,e[Rt]=s.current,$r(e.nodeType===8?e.parentNode:e),yn(function(){Ei(t,s,n,r)}),s}function Fi(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=th(n,t,e,o,r);return hi(a)}Sc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Nr(t.pendingLanes);n!==0&&(Sl(t,n|1),He(t,de()),!(G&6)&&(Zn=de()+500,rn()))}break;case 13:yn(function(){var r=Lt(e,1);if(r!==null){var o=Le();ht(r,e,1,o)}}),rs(e,1)}};Cl=function(e){if(e.tag===13){var t=Lt(e,134217728);if(t!==null){var n=Le();ht(t,e,134217728,n)}rs(e,134217728)}};Cc=function(e){if(e.tag===13){var t=Xt(e),n=Lt(e,t);if(n!==null){var r=Le();ht(n,e,t,r)}rs(e,t)}};Nc=function(){return Q};Ec=function(e,t){var n=Q;try{return Q=e,t()}finally{Q=n}};Aa=function(e,t,n){switch(t){case"input":if(Fa(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=xi(r);if(!o)throw Error(b(90));oc(r),Fa(r,o)}}}break;case"textarea":ac(e,n);break;case"select":t=n.value,t!=null&&Wn(e,!!n.multiple,t,!1)}};fc=ql;gc=yn;var nh={usingClientEntryPoint:!1,Events:[no,Ln,xi,dc,pc,ql]},br={findFiberByHostInstance:un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rh={bundleType:br.bundleType,version:br.version,rendererPackageName:br.rendererPackageName,rendererConfig:br.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=vc(e),e===null?null:e.stateNode},findFiberByHostInstance:br.findFiberByHostInstance||eh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(_r=__REACT_DEVTOOLS_GLOBAL_HOOK__,!_r.isDisabled&&_r.supportsFiber))try{mi=_r.inject(rh),bt=_r}catch{}var _r;Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nh;Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!is(t))throw Error(b(200));return Zg(e,t,null,n)};Je.createRoot=function(e,t){if(!is(e))throw Error(b(299));var n=!1,r="",o=Qd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ns(e,1,!1,null,null,n,!1,r,o),e[Rt]=t.current,$r(e.nodeType===8?e.parentNode:e),new os(t)};Je.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(b(188)):(e=Object.keys(e).join(","),Error(b(268,e)));return e=vc(t),e=e===null?null:e.stateNode,e};Je.flushSync=function(e){return yn(e)};Je.hydrate=function(e,t,n){if(!Pi(t))throw Error(b(200));return Fi(null,e,t,!0,n)};Je.hydrateRoot=function(e,t,n){if(!is(e))throw Error(b(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=Qd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Yd(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 Ti(t)};Je.render=function(e,t,n){if(!Pi(t))throw Error(b(200));return Fi(null,e,t,!1,n)};Je.unmountComponentAtNode=function(e){if(!Pi(e))throw Error(b(40));return e._reactRootContainer?(yn(function(){Fi(null,null,e,!1,function(){e._reactRootContainer=null,e[Rt]=null})}),!0):!1};Je.unstable_batchedUpdates=ql;Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Pi(n))throw Error(b(200));if(e==null||e._reactInternals===void 0)throw Error(b(38));return Fi(e,t,n,!1,r)};Je.version="18.3.1-next-f1338f8080-20240426"});var Zd=Ct((Qm,qd)=>{"use strict";function Xd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xd)}catch(e){console.error(e)}}Xd(),qd.exports=Jd()});var tp=Ct(as=>{"use strict";var ep=Zd();as.createRoot=ep.createRoot,as.hydrateRoot=ep.hydrateRoot;var Jm});var rp=Ct(Mi=>{"use strict";var oh=Nt(),ih=Symbol.for("react.element"),ah=Symbol.for("react.fragment"),lh=Object.prototype.hasOwnProperty,sh=oh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uh={key:!0,ref:!0,__self:!0,__source:!0};function np(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)lh.call(t,r)&&!uh.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:ih,type:e,key:i,ref:a,props:o,_owner:sh.current}}Mi.Fragment=ah;Mi.jsx=np;Mi.jsxs=np});var Ce=Ct((Zm,op)=>{"use strict";op.exports=rp()});var ks=`/* ---------------------------------------------------------------
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Fa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ig=typeof WeakMap=="function"?WeakMap:Map;function Hd(e,t,n){n=Vt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_i||(_i=!0,_l=r),fl(e,t)},n}function Bd(e,t,n){n=Vt(-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(){fl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fl(e,t),typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function tc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ig;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=wg.bind(null,e,t,n),t.then(e,e))}function nc(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 rc(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=Vt(-1,1),t.tag=2,fn(n,t,1))),n.lanes|=1),e)}var ag=Jt.ReactCurrentOwner,Xe=!1;function Ve(e,t,n,r){t.child=e===null?wd(t,null,n,r):mr(t,e.child,n,r)}function oc(e,t,n,r,o){n=n.render;var i=t.ref;return dr(t,o),r=ts(e,t,n,r,i,o),n=ns(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xt(e,t,o)):(he&&n&&Hl(t),t.flags|=1,Ve(e,t,r,o),t.child)}function ic(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!ps(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Gd(e,t,i,r,o)):(e=ni(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:no,n(a,r)&&e.ref===t.ref)return Xt(e,t,o)}return t.flags|=1,e=mn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Gd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(no(i,r)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,Xt(e,t,o)}return hl(e,t,n,r,o)}function Vd(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},ce(ar,ot),ot|=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,ce(ar,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(ar,ot),ot|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ce(ar,ot),ot|=r;return Ve(e,t,o,n),t.child}function Kd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hl(e,t,n,r,o){var i=qe(n)?In:He.current;return i=hr(t,i),dr(t,o),n=ts(e,t,n,r,i,o),r=ns(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xt(e,t,o)):(he&&r&&Hl(t),t.flags|=1,Ve(e,t,n,o),t.child)}function ac(e,t,n,r,o){if(qe(n)){var i=!0;fi(t)}else i=!1;if(dr(t,o),t.stateNode===null)Zo(e,t),$d(t,n,r),pl(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=gt(c):(c=qe(n)?In:He.current,c=hr(t,c));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==c)&&ec(t,a,r,c),rn=!1;var g=t.memoizedState;a.state=g,yi(t,r,a,o),s=t.memoizedState,u!==r||g!==s||Je.current||rn?(typeof d=="function"&&(dl(t,n,d,r),s=t.memoizedState),(u=rn||Zu(t,n,u,r,g,s,c))?(p||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,kd(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:kt(t.type,u),a.props=c,p=t.pendingProps,g=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=gt(s):(s=qe(n)?In:He.current,s=hr(t,s));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==p||g!==s)&&ec(t,a,r,s),rn=!1,g=t.memoizedState,a.state=g,yi(t,r,a,o);var b=t.memoizedState;u!==p||g!==b||Je.current||rn?(typeof v=="function"&&(dl(t,n,v,r),b=t.memoizedState),(c=rn||Zu(t,n,c,r,g,b,s)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=s,r=c):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return gl(e,t,n,r,i,o)}function gl(e,t,n,r,o,i){Kd(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Gu(t,n,!1),Xt(e,t,i);r=t.stateNode,ag.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=mr(t,e.child,null,i),t.child=mr(t,null,u,i)):Ve(e,t,u,i),t.memoizedState=r.state,o&&Gu(t,n,!0),t.child}function Yd(e){var t=e.stateNode;t.pendingContext?Bu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bu(e,t.context,!1),Jl(e,t.containerInfo)}function lc(e,t,n,r,o){return gr(),Gl(o),t.flags|=256,Ve(e,t,n,r),t.child}var ml={dehydrated:null,treeContext:null,retryLane:0};function vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qd(e,t,n){var r=t.pendingProps,o=me.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),ce(me,o&1),e===null)return ul(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=zi(a,r,0,null),e=Ln(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=vl(n),t.memoizedState=ml,e):is(t,a));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return lg(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=mn(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?i=mn(u,i):(i=Ln(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?vl(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ml,r}return i=e.child,e=i.sibling,r=mn(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 is(e,t){return t=zi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Bo(e,t,n,r){return r!==null&&Gl(r),mr(t,e.child,null,n),e=is(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lg(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Fa(Error(S(422))),Bo(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=zi({mode:"visible",children:r.children},o,0,null),i=Ln(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&mr(t,e.child,null,a),t.child.memoizedState=vl(a),t.memoizedState=ml,i);if(!(t.mode&1))return Bo(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(S(419)),r=Fa(i,r,void 0),Bo(e,t,a,r)}if(u=(a&e.childLanes)!==0,Xe||u){if(r=Re,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,Qt(e,o),Ct(r,e,o,-1))}return ds(),r=Fa(Error(S(421))),Bo(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=xg.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,it=pn(o.nextSibling),at=t,he=!0,_t=null,e!==null&&(dt[pt++]=Bt,dt[pt++]=Gt,dt[pt++]=Rn,Bt=e.id,Gt=e.overflow,Rn=t),t=is(t,r.children),t.flags|=4096,t)}function sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cl(e.return,t,n)}function La(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 Xd(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ve(e,t,r.children,n),r=me.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&&sc(e,n,t);else if(e.tag===19)sc(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(ce(me,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&&wi(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),La(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&&wi(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}La(t,!0,n,null,i);break;case"together":La(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),An|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sg(e,t,n){switch(t.tag){case 3:Yd(t),gr();break;case 5:bd(t);break;case 1:qe(t.type)&&fi(t);break;case 4:Jl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ce(mi,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?Qd(e,t,n):(ce(me,me.current&1),e=Xt(e,t,n),e!==null?e.sibling:null);ce(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Xd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ce(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,Vd(e,t,n)}return Xt(e,t,n)}var Jd,yl,qd,Zd;Jd=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}};yl=function(){};qd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Mn(Ot.current);var i=null;switch(n){case"input":o=ja(e,o),r=ja(e,r),i=[];break;case"select":o=ye({},o,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":o=Ha(e,o),r=Ha(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=di)}Ga(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"&&(Qr.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"&&(Qr.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&de("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)}};Zd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ir(e,t){if(!he)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 Ue(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 ug(e,t,n){var r=t.pendingProps;switch(Bl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return qe(t.type)&&pi(),Ue(t),null;case 3:return r=t.stateNode,vr(),pe(Je),pe(He),Zl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($o(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(Nl(_t),_t=null))),yl(e,t),Ue(t),null;case 5:ql(t);var o=Mn(lo.current);if(n=t.type,e!==null&&t.stateNode!=null)qd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return Ue(t),null}if(e=Mn(Ot.current),$o(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[It]=t,r[io]=i,e=(t.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(o=0;o<Wr.length;o++)de(Wr[o],r);break;case"source":de("error",r);break;case"img":case"image":case"link":de("error",r),de("load",r);break;case"details":de("toggle",r);break;case"input":mu(r,i),de("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},de("invalid",r);break;case"textarea":yu(r,i),de("invalid",r)}Ga(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&&Uo(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Uo(r.textContent,u,e),o=["children",""+u]):Qr.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&de("scroll",r)}switch(n){case"input":Po(r),vu(r,i,!0);break;case"textarea":Po(r),wu(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=di)}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=Ec(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[It]=t,e[io]=r,Jd(e,t,!1,!1),t.stateNode=e;e:{switch(a=Va(n,r),n){case"dialog":de("cancel",e),de("close",e),o=r;break;case"iframe":case"object":case"embed":de("load",e),o=r;break;case"video":case"audio":for(o=0;o<Wr.length;o++)de(Wr[o],e);o=r;break;case"source":de("error",e),o=r;break;case"img":case"image":case"link":de("error",e),de("load",e),o=r;break;case"details":de("toggle",e),o=r;break;case"input":mu(e,r),o=ja(e,r),de("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ye({},r,{value:void 0}),de("invalid",e);break;case"textarea":yu(e,r),o=Ha(e,r),de("invalid",e);break;default:o=r}Ga(n,o),u=o;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?Mc(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Tc(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Xr(e,s):typeof s=="number"&&Xr(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qr.hasOwnProperty(i)?s!=null&&i==="onScroll"&&de("scroll",e):s!=null&&Pl(e,i,s,a))}switch(n){case"input":Po(e),vu(e,r,!1);break;case"textarea":Po(e),wu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+vn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?lr(e,!!r.multiple,i,!1):r.defaultValue!=null&&lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=di)}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 Ue(t),null;case 6:if(e&&t.stateNode!=null)Zd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=Mn(lo.current),Mn(Ot.current),$o(t)){if(r=t.stateNode,n=t.memoizedProps,r[It]=t,(i=r.nodeValue!==n)&&(e=at,e!==null))switch(e.tag){case 3:Uo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Uo(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[It]=t,t.stateNode=r}return Ue(t),null;case 13:if(pe(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&it!==null&&t.mode&1&&!(t.flags&128))vd(),gr(),t.flags|=98560,i=!1;else if(i=$o(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(S(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(S(317));i[It]=t}else gr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else _t!==null&&(Nl(_t),_t=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||me.current&1?Fe===0&&(Fe=3):ds())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return vr(),yl(e,t),e===null&&ro(t.stateNode.containerInfo),Ue(t),null;case 10:return Yl(t.type._context),Ue(t),null;case 17:return qe(t.type)&&pi(),Ue(t),null;case 19:if(pe(me),i=t.memoizedState,i===null)return Ue(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Ir(i,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=wi(e),a!==null){for(t.flags|=128,Ir(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 ce(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&_e()>wr&&(t.flags|=128,r=!0,Ir(i,!1),t.lanes=4194304)}else{if(!r)if(e=wi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ir(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!he)return Ue(t),null}else 2*_e()-i.renderingStartTime>wr&&n!==1073741824&&(t.flags|=128,r=!0,Ir(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=_e(),t.sibling=null,n=me.current,ce(me,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return cs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function cg(e,t){switch(Bl(t),t.tag){case 1:return qe(t.type)&&pi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vr(),pe(Je),pe(He),Zl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ql(t),null;case 13:if(pe(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(me),null;case 4:return vr(),null;case 10:return Yl(t.type._context),null;case 22:case 23:return cs(),null;case 24:return null;default:return null}}var Go=!1,$e=!1,dg=typeof WeakSet=="function"?WeakSet:Set,P=null;function ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function wl(e,t,n){try{n()}catch(r){xe(e,t,r)}}var uc=!1;function pg(e,t){if(nl=si,e=od(),$l(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,p=e,g=null;t:for(;;){for(var v;p!==n||o!==0&&p.nodeType!==3||(u=a+o),p!==i||r!==0&&p.nodeType!==3||(s=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===e)break t;if(g===n&&++c===o&&(u=a),g===i&&++d===r&&(s=a),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(rl={focusedElem:e,selectionRange:n},si=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,G=b.memoizedState,f=t.stateNode,h=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:kt(t.type,w),G);f.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(x){xe(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return b=uc,uc=!1,b}function Vr(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&&wl(t,n,i)}o=o.next}while(o!==r)}}function Oi(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 xl(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 ep(e){var t=e.alternate;t!==null&&(e.alternate=null,ep(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[io],delete t[al],delete t[Yh],delete t[Qh])),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 tp(e){return e.tag===5||e.tag===3||e.tag===4}function cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tp(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 kl(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=di));else if(r!==4&&(e=e.child,e!==null))for(kl(e,t,n),e=e.sibling;e!==null;)kl(e,t,n),e=e.sibling}function bl(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(bl(e,t,n),e=e.sibling;e!==null;)bl(e,t,n),e=e.sibling}var Oe=null,bt=!1;function tn(e,t,n){for(n=n.child;n!==null;)np(e,t,n),n=n.sibling}function np(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Ei,n)}catch{}switch(n.tag){case 5:$e||ir(n,t);case 6:var r=Oe,o=bt;Oe=null,tn(e,t,n),Oe=r,bt=o,Oe!==null&&(bt?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(bt?(e=Oe,n=n.stateNode,e.nodeType===8?Ca(e.parentNode,n):e.nodeType===1&&Ca(e,n),eo(e)):Ca(Oe,n.stateNode));break;case 4:r=Oe,o=bt,Oe=n.stateNode.containerInfo,bt=!0,tn(e,t,n),Oe=r,bt=o;break;case 0:case 11:case 14:case 15:if(!$e&&(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)&&wl(n,t,a),o=o.next}while(o!==r)}tn(e,t,n);break;case 1:if(!$e&&(ir(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){xe(n,t,u)}tn(e,t,n);break;case 21:tn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,tn(e,t,n),$e=r):tn(e,t,n);break;default:tn(e,t,n)}}function dc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dg),t.forEach(function(r){var o=kg.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xt(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:Oe=u.stateNode,bt=!1;break e;case 3:Oe=u.stateNode.containerInfo,bt=!0;break e;case 4:Oe=u.stateNode.containerInfo,bt=!0;break e}u=u.return}if(Oe===null)throw Error(S(160));np(i,a,o),Oe=null,bt=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(c){xe(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)rp(t,e),t=t.sibling}function rp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xt(t,e),Ft(e),r&4){try{Vr(3,e,e.return),Oi(3,e)}catch(w){xe(e,e.return,w)}try{Vr(5,e,e.return)}catch(w){xe(e,e.return,w)}}break;case 1:xt(t,e),Ft(e),r&512&&n!==null&&ir(n,n.return);break;case 5:if(xt(t,e),Ft(e),r&512&&n!==null&&ir(n,n.return),e.flags&32){var o=e.stateNode;try{Xr(o,"")}catch(w){xe(e,e.return,w)}}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&&Cc(o,i),Va(u,a);var c=Va(u,i);for(a=0;a<s.length;a+=2){var d=s[a],p=s[a+1];d==="style"?Mc(o,p):d==="dangerouslySetInnerHTML"?Tc(o,p):d==="children"?Xr(o,p):Pl(o,d,p,c)}switch(u){case"input":Ua(o,i);break;case"textarea":Nc(o,i);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?lr(o,!!i.multiple,v,!1):g!==!!i.multiple&&(i.defaultValue!=null?lr(o,!!i.multiple,i.defaultValue,!0):lr(o,!!i.multiple,i.multiple?[]:"",!1))}o[io]=i}catch(w){xe(e,e.return,w)}}break;case 6:if(xt(t,e),Ft(e),r&4){if(e.stateNode===null)throw Error(S(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){xe(e,e.return,w)}}break;case 3:if(xt(t,e),Ft(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(w){xe(e,e.return,w)}break;case 4:xt(t,e),Ft(e);break;case 13:xt(t,e),Ft(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ss=_e())),r&4&&dc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?($e=(c=$e)||d,xt(t,e),$e=c):xt(t,e),Ft(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(P=e,d=e.child;d!==null;){for(p=P=d;P!==null;){switch(g=P,v=g.child,g.tag){case 0:case 11:case 14:case 15:Vr(4,g,g.return);break;case 1:ir(g,g.return);var b=g.stateNode;if(typeof b.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(w){xe(r,n,w)}}break;case 5:ir(g,g.return);break;case 22:if(g.memoizedState!==null){fc(p);continue}}v!==null?(v.return=g,P=v):fc(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=p.stateNode,s=p.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=Pc("display",a))}catch(w){xe(e,e.return,w)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(w){xe(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:xt(t,e),Ft(e),r&4&&dc(e);break;case 21:break;default:xt(t,e),Ft(e)}}function Ft(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(tp(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Xr(o,""),r.flags&=-33);var i=cc(e);bl(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,u=cc(e);kl(e,u,a);break;default:throw Error(S(161))}}catch(s){xe(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fg(e,t,n){P=e,op(e,t,n)}function op(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var o=P,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Go;if(!a){var u=o.alternate,s=u!==null&&u.memoizedState!==null||$e;u=Go;var c=$e;if(Go=a,($e=s)&&!c)for(P=o;P!==null;)a=P,s=a.child,a.tag===22&&a.memoizedState!==null?hc(o):s!==null?(s.return=a,P=s):hc(o);for(;i!==null;)P=i,op(i,t,n),i=i.sibling;P=o,Go=u,$e=c}pc(e,t,n)}else o.subtreeFlags&8772&&i!==null?(i.return=o,P=i):pc(e,t,n)}}function pc(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:$e||Oi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$e)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Xu(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}Xu(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 p=d.dehydrated;p!==null&&eo(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}$e||t.flags&512&&xl(t)}catch(g){xe(t,t.return,g)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function fc(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function hc(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Oi(4,t)}catch(s){xe(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){xe(t,o,s)}}var i=t.return;try{xl(t)}catch(s){xe(t,i,s)}break;case 5:var a=t.return;try{xl(t)}catch(s){xe(t,a,s)}}}catch(s){xe(t,t.return,s)}if(t===e){P=null;break}var u=t.sibling;if(u!==null){u.return=t.return,P=u;break}P=t.return}}var hg=Math.ceil,bi=Jt.ReactCurrentDispatcher,as=Jt.ReactCurrentOwner,ht=Jt.ReactCurrentBatchConfig,te=0,Re=null,Ne=null,Ae=0,ot=0,ar=xn(0),Fe=0,po=null,An=0,Ai=0,ls=0,Kr=null,Qe=null,ss=0,wr=1/0,$t=null,_i=!1,_l=null,hn=null,Vo=!1,sn=null,Si=0,Yr=0,Sl=null,ei=-1,ti=0;function Ke(){return te&6?_e():ei!==-1?ei:ei=_e()}function gn(e){return e.mode&1?te&2&&Ae!==0?Ae&-Ae:Jh.transition!==null?(ti===0&&(ti=$c()),ti):(e=ie,e!==0||(e=window.event,e=e===void 0?16:Qc(e.type)),e):1}function Ct(e,t,n,r){if(50<Yr)throw Yr=0,Sl=null,Error(S(185));fo(e,n,r),(!(te&2)||e!==Re)&&(e===Re&&(!(te&2)&&(Ai|=n),Fe===4&&an(e,Ae)),Ze(e,r),n===1&&te===0&&!(t.mode&1)&&(wr=_e()+500,Li&&kn()))}function Ze(e,t){var n=e.callbackNode;Zf(e,t);var r=li(e,e===Re?Ae:0);if(r===0)n!==null&&bu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bu(n),t===1)e.tag===0?Xh(gc.bind(null,e)):hd(gc.bind(null,e)),Vh(function(){!(te&6)&&kn()}),n=null;else{switch(Hc(r)){case 1:n=Rl;break;case 4:n=jc;break;case 16:n=ai;break;case 536870912:n=Uc;break;default:n=ai}n=pp(n,ip.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ip(e,t){if(ei=-1,ti=0,te&6)throw Error(S(327));var n=e.callbackNode;if(pr()&&e.callbackNode!==n)return null;var r=li(e,e===Re?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ci(e,r);else{t=r;var o=te;te|=2;var i=lp();(Re!==e||Ae!==t)&&($t=null,wr=_e()+500,Fn(e,t));do try{vg();break}catch(u){ap(e,u)}while(1);Kl(),bi.current=i,te=o,Ne!==null?t=0:(Re=null,Ae=0,t=Fe)}if(t!==0){if(t===2&&(o=Ja(e),o!==0&&(r=o,t=Cl(e,o))),t===1)throw n=po,Fn(e,0),an(e,r),Ze(e,_e()),n;if(t===6)an(e,r);else{if(o=e.current.alternate,!(r&30)&&!gg(o)&&(t=Ci(e,r),t===2&&(i=Ja(e),i!==0&&(r=i,t=Cl(e,i))),t===1))throw n=po,Fn(e,0),an(e,r),Ze(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:En(e,Qe,$t);break;case 3:if(an(e,r),(r&130023424)===r&&(t=ss+500-_e(),10<t)){if(li(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ke(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=il(En.bind(null,e,Qe,$t),t);break}En(e,Qe,$t);break;case 4:if(an(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-St(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hg(r/1960))-r,10<r){e.timeoutHandle=il(En.bind(null,e,Qe,$t),r);break}En(e,Qe,$t);break;case 5:En(e,Qe,$t);break;default:throw Error(S(329))}}}return Ze(e,_e()),e.callbackNode===n?ip.bind(null,e):null}function Cl(e,t){var n=Kr;return e.current.memoizedState.isDehydrated&&(Fn(e,t).flags|=256),e=Ci(e,t),e!==2&&(t=Qe,Qe=n,t!==null&&Nl(t)),e}function Nl(e){Qe===null?Qe=e:Qe.push.apply(Qe,e)}function gg(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(!Nt(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 an(e,t){for(t&=~ls,t&=~Ai,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function gc(e){if(te&6)throw Error(S(327));pr();var t=li(e,0);if(!(t&1))return Ze(e,_e()),null;var n=Ci(e,t);if(e.tag!==0&&n===2){var r=Ja(e);r!==0&&(t=r,n=Cl(e,r))}if(n===1)throw n=po,Fn(e,0),an(e,t),Ze(e,_e()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,En(e,Qe,$t),Ze(e,_e()),null}function us(e,t){var n=te;te|=1;try{return e(t)}finally{te=n,te===0&&(wr=_e()+500,Li&&kn())}}function zn(e){sn!==null&&sn.tag===0&&!(te&6)&&pr();var t=te;te|=1;var n=ht.transition,r=ie;try{if(ht.transition=null,ie=1,e)return e()}finally{ie=r,ht.transition=n,te=t,!(te&6)&&kn()}}function cs(){ot=ar.current,pe(ar)}function Fn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Gh(n)),Ne!==null)for(n=Ne.return;n!==null;){var r=n;switch(Bl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&pi();break;case 3:vr(),pe(Je),pe(He),Zl();break;case 5:ql(r);break;case 4:vr();break;case 13:pe(me);break;case 19:pe(me);break;case 10:Yl(r.type._context);break;case 22:case 23:cs()}n=n.return}if(Re=e,Ne=e=mn(e.current,null),Ae=ot=t,Fe=0,po=null,ls=Ai=An=0,Qe=Kr=null,Pn!==null){for(t=0;t<Pn.length;t++)if(n=Pn[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}Pn=null}return e}function ap(e,t){do{var n=Ne;try{if(Kl(),Jo.current=ki,xi){for(var r=ve.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}xi=!1}if(On=0,Ie=Me=ve=null,Gr=!1,so=0,as.current=null,n===null||n.return===null){Fe=1,po=t,Ne=null;break}e:{var i=e,a=n.return,u=n,s=t;if(t=Ae,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,d=u,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===15)){var g=d.alternate;g?(d.updateQueue=g.updateQueue,d.memoizedState=g.memoizedState,d.lanes=g.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=nc(a);if(v!==null){v.flags&=-257,rc(v,a,u,i,t),v.mode&1&&tc(i,c,t),t=v,s=c;var b=t.updateQueue;if(b===null){var w=new Set;w.add(s),t.updateQueue=w}else b.add(s);break e}else{if(!(t&1)){tc(i,c,t),ds();break e}s=Error(S(426))}}else if(he&&u.mode&1){var G=nc(a);if(G!==null){!(G.flags&65536)&&(G.flags|=256),rc(G,a,u,i,t),Gl(yr(s,u));break e}}i=s=yr(s,u),Fe!==4&&(Fe=2),Kr===null?Kr=[i]:Kr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=Hd(i,s,t);Qu(i,f);break e;case 1:u=s;var h=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(hn===null||!hn.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=Bd(i,u,t);Qu(i,x);break e}}i=i.return}while(i!==null)}up(n)}catch(C){t=C,Ne===n&&n!==null&&(Ne=n=n.return);continue}break}while(1)}function lp(){var e=bi.current;return bi.current=ki,e===null?ki:e}function ds(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Re===null||!(An&268435455)&&!(Ai&268435455)||an(Re,Ae)}function Ci(e,t){var n=te;te|=2;var r=lp();(Re!==e||Ae!==t)&&($t=null,Fn(e,t));do try{mg();break}catch(o){ap(e,o)}while(1);if(Kl(),te=n,bi.current=r,Ne!==null)throw Error(S(261));return Re=null,Ae=0,Fe}function mg(){for(;Ne!==null;)sp(Ne)}function vg(){for(;Ne!==null&&!Bf();)sp(Ne)}function sp(e){var t=dp(e.alternate,e,ot);e.memoizedProps=e.pendingProps,t===null?up(e):Ne=t,as.current=null}function up(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cg(n,t),n!==null){n.flags&=32767,Ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Ne=null;return}}else if(n=ug(n,t,ot),n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Fe===0&&(Fe=5)}function En(e,t,n){var r=ie,o=ht.transition;try{ht.transition=null,ie=1,yg(e,t,n,r)}finally{ht.transition=o,ie=r}return null}function yg(e,t,n,r){do pr();while(sn!==null);if(te&6)throw Error(S(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(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(eh(e,i),e===Re&&(Ne=Re=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Vo||(Vo=!0,pp(ai,function(){return pr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ht.transition,ht.transition=null;var a=ie;ie=1;var u=te;te|=4,as.current=null,pg(e,n),rp(n,e),jh(rl),si=!!nl,rl=nl=null,e.current=n,fg(n,e,o),Gf(),te=u,ie=a,ht.transition=i}else e.current=n;if(Vo&&(Vo=!1,sn=e,Si=o),i=e.pendingLanes,i===0&&(hn=null),Yf(n.stateNode,r),Ze(e,_e()),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(_i)throw _i=!1,e=_l,_l=null,e;return Si&1&&e.tag!==0&&pr(),i=e.pendingLanes,i&1?e===Sl?Yr++:(Yr=0,Sl=e):Yr=0,kn(),null}function pr(){if(sn!==null){var e=Hc(Si),t=ht.transition,n=ie;try{if(ht.transition=null,ie=16>e?16:e,sn===null)var r=!1;else{if(e=sn,sn=null,Si=0,te&6)throw Error(S(331));var o=te;for(te|=4,P=e.current;P!==null;){var i=P,a=i.child;if(P.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(P=c;P!==null;){var d=P;switch(d.tag){case 0:case 11:case 15:Vr(8,d,i)}var p=d.child;if(p!==null)p.return=d,P=p;else for(;P!==null;){d=P;var g=d.sibling,v=d.return;if(ep(d),d===c){P=null;break}if(g!==null){g.return=v,P=g;break}P=v}}}var b=i.alternate;if(b!==null){var w=b.child;if(w!==null){b.child=null;do{var G=w.sibling;w.sibling=null,w=G}while(w!==null)}}P=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,P=a;else e:for(;P!==null;){if(i=P,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Vr(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,P=f;break e}P=i.return}}var h=e.current;for(P=h;P!==null;){a=P;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,P=m;else e:for(a=h;P!==null;){if(u=P,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Oi(9,u)}}catch(C){xe(u,u.return,C)}if(u===a){P=null;break e}var x=u.sibling;if(x!==null){x.return=u.return,P=x;break e}P=u.return}}if(te=o,kn(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Ei,e)}catch{}r=!0}return r}finally{ie=n,ht.transition=t}}return!1}function mc(e,t,n){t=yr(n,t),t=Hd(e,t,1),e=fn(e,t,1),t=Ke(),e!==null&&(fo(e,1,t),Ze(e,t))}function xe(e,t,n){if(e.tag===3)mc(e,e,n);else for(;t!==null;){if(t.tag===3){mc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=yr(n,e),e=Bd(t,e,1),t=fn(t,e,1),e=Ke(),t!==null&&(fo(t,1,e),Ze(t,e));break}}t=t.return}}function wg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ke(),e.pingedLanes|=e.suspendedLanes&n,Re===e&&(Ae&n)===n&&(Fe===4||Fe===3&&(Ae&130023424)===Ae&&500>_e()-ss?Fn(e,0):ls|=n),Ze(e,t)}function cp(e,t){t===0&&(e.mode&1?(t=Lo,Lo<<=1,!(Lo&130023424)&&(Lo=4194304)):t=1);var n=Ke();e=Qt(e,t),e!==null&&(fo(e,t,n),Ze(e,n))}function xg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cp(e,n)}function kg(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(S(314))}r!==null&&r.delete(t),cp(e,n)}var dp;dp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,sg(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,he&&t.flags&1048576&&gd(t,gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zo(e,t),e=t.pendingProps;var o=hr(t,He.current);dr(t,n),o=ts(null,t,r,e,o,n);var i=ns();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,qe(r)?(i=!0,fi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Xl(t),o.updater=Ri,t.stateNode=o,o._reactInternals=t,pl(t,r,e,n),t=gl(null,t,r,!0,i,n)):(t.tag=0,he&&i&&Hl(t),Ve(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=_g(r),e=kt(r,e),o){case 0:t=hl(null,t,r,e,n);break e;case 1:t=ac(null,t,r,e,n);break e;case 11:t=oc(null,t,r,e,n);break e;case 14:t=ic(null,t,r,kt(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),hl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),ac(e,t,r,o,n);case 3:e:{if(Yd(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,o=i.element,kd(e,t),yi(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=yr(Error(S(423)),t),t=lc(e,t,r,n,o);break e}else if(r!==o){o=yr(Error(S(424)),t),t=lc(e,t,r,n,o);break e}else for(it=pn(t.stateNode.containerInfo.firstChild),at=t,he=!0,_t=null,n=wd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gr(),r===o){t=Xt(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return bd(t),e===null&&ul(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,ol(r,o)?a=null:i!==null&&ol(r,i)&&(t.flags|=32),Kd(e,t),Ve(e,t,a,n),t.child;case 6:return e===null&&ul(t),null;case 13:return Qd(e,t,n);case 4:return Jl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mr(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),oc(e,t,r,o,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(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,ce(mi,r._currentValue),r._currentValue=a,i!==null)if(Nt(i.value,a)){if(i.children===o.children&&!Je.current){t=Xt(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=Vt(-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),cl(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(S(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),cl(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}Ve(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,dr(t,n),o=gt(o),r=r(o),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,o=kt(r,t.pendingProps),o=kt(r.type,o),ic(e,t,r,o,n);case 15:return Gd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),Zo(e,t),t.tag=1,qe(r)?(e=!0,fi(t)):e=!1,dr(t,n),$d(t,r,o),pl(t,r,o,n),gl(null,t,r,!0,e,n);case 19:return Xd(e,t,n);case 22:return Vd(e,t,n)}throw Error(S(156,t.tag))};function pp(e,t){return Wc(e,t)}function bg(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 ft(e,t,n,r){return new bg(e,t,n,r)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _g(e){if(typeof e=="function")return ps(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fl)return 11;if(e===Ll)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=ft(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 ni(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")ps(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xn:return Ln(n.children,o,i,t);case Ml:a=8,o|=8;break;case Aa:return e=ft(12,n,t,o|2),e.elementType=Aa,e.lanes=i,e;case za:return e=ft(13,n,t,o),e.elementType=za,e.lanes=i,e;case Da:return e=ft(19,n,t,o),e.elementType=Da,e.lanes=i,e;case bc:return zi(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xc:a=10;break e;case kc:a=9;break e;case Fl:a=11;break e;case Ll:a=14;break e;case nn:a=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ft(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ln(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function zi(e,t,n,r){return e=ft(22,e,r,t),e.elementType=bc,e.lanes=n,e.stateNode={isHidden:!1},e}function Ia(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Ra(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sg(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=va(0),this.expirationTimes=va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function fs(e,t,n,r,o,i,a,u,s){return e=new Sg(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xl(i),e}function Cg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fp(e){if(!e)return yn;e=e._reactInternals;e:{if(Wn(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(qe(n))return fd(e,n,t)}return t}function hp(e,t,n,r,o,i,a,u,s){return e=fs(n,r,!0,e,o,i,a,u,s),e.context=fp(null),n=e.current,r=Ke(),o=gn(n),i=Vt(r,o),i.callback=t??null,fn(n,i,o),e.current.lanes=o,fo(e,o,r),Ze(e,r),e}function Di(e,t,n,r){var o=t.current,i=Ke(),a=gn(o);return n=fp(n),t.context===null?t.context=n:t.pendingContext=n,t=Vt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fn(o,t,a),e!==null&&(Ct(e,o,a,i),Xo(e,o,a)),a}function Ni(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 vc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hs(e,t){vc(e,t),(e=e.alternate)&&vc(e,t)}function Ng(){return null}var gp=typeof reportError=="function"?reportError:function(e){console.error(e)};function gs(e){this._internalRoot=e}Wi.prototype.render=gs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));Di(e,t,null,null)};Wi.prototype.unmount=gs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zn(function(){Di(null,e,null,null)}),t[Yt]=null}};function Wi(e){this._internalRoot=e}Wi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<on.length&&t!==0&&t<on[n].priority;n++);on.splice(n,0,e),n===0&&Yc(e)}};function ms(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ji(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yc(){}function Eg(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=Ni(a);i.call(c)}}var a=hp(t,r,e,0,null,!1,!1,"",yc);return e._reactRootContainer=a,e[Yt]=a.current,ro(e.nodeType===8?e.parentNode:e),zn(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var u=r;r=function(){var c=Ni(s);u.call(c)}}var s=fs(e,0,!1,null,null,!1,!1,"",yc);return e._reactRootContainer=s,e[Yt]=s.current,ro(e.nodeType===8?e.parentNode:e),zn(function(){Di(t,s,n,r)}),s}function Ui(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=Ni(a);u.call(s)}}Di(t,a,e,o)}else a=Eg(n,t,e,o,r);return Ni(a)}Bc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dr(t.pendingLanes);n!==0&&(Ol(t,n|1),Ze(t,_e()),!(te&6)&&(wr=_e()+500,kn()))}break;case 13:zn(function(){var r=Qt(e,1);if(r!==null){var o=Ke();Ct(r,e,1,o)}}),hs(e,1)}};Al=function(e){if(e.tag===13){var t=Qt(e,134217728);if(t!==null){var n=Ke();Ct(t,e,134217728,n)}hs(e,134217728)}};Gc=function(e){if(e.tag===13){var t=gn(e),n=Qt(e,t);if(n!==null){var r=Ke();Ct(n,e,t,r)}hs(e,t)}};Vc=function(){return ie};Kc=function(e,t){var n=ie;try{return ie=e,t()}finally{ie=n}};Ya=function(e,t,n){switch(t){case"input":if(Ua(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=Fi(r);if(!o)throw Error(S(90));Sc(r),Ua(r,o)}}}break;case"textarea":Nc(e,n);break;case"select":t=n.value,t!=null&&lr(e,!!n.multiple,t,!1)}};Ic=us;Rc=zn;var Tg={usingClientEntryPoint:!1,Events:[go,er,Fi,Fc,Lc,us]},Rr={findFiberByHostInstance:Tn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Pg={bundleType:Rr.bundleType,version:Rr.version,rendererPackageName:Rr.rendererPackageName,rendererConfig:Rr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zc(e),e===null?null:e.stateNode},findFiberByHostInstance:Rr.findFiberByHostInstance||Ng,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Or=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Or.isDisabled&&Or.supportsFiber))try{Ei=Or.inject(Pg),Rt=Or}catch{}var Or;ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tg;ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ms(t))throw Error(S(200));return Cg(e,t,null,n)};ut.createRoot=function(e,t){if(!ms(e))throw Error(S(299));var n=!1,r="",o=gp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=fs(e,1,!1,null,null,n,!1,r,o),e[Yt]=t.current,ro(e.nodeType===8?e.parentNode:e),new gs(t)};ut.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(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=zc(t),e=e===null?null:e.stateNode,e};ut.flushSync=function(e){return zn(e)};ut.hydrate=function(e,t,n){if(!ji(t))throw Error(S(200));return Ui(null,e,t,!0,n)};ut.hydrateRoot=function(e,t,n){if(!ms(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=gp;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=hp(t,null,e,1,n??null,o,!1,i,a),e[Yt]=t.current,ro(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 Wi(t)};ut.render=function(e,t,n){if(!ji(t))throw Error(S(200));return Ui(null,e,t,!1,n)};ut.unmountComponentAtNode=function(e){if(!ji(e))throw Error(S(40));return e._reactRootContainer?(zn(function(){Ui(null,null,e,!1,function(){e._reactRootContainer=null,e[Yt]=null})}),!0):!1};ut.unstable_batchedUpdates=us;ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ji(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return Ui(e,t,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426"});var wp=jt((Ev,yp)=>{"use strict";function vp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vp)}catch(e){console.error(e)}}vp(),yp.exports=mp()});var kp=jt(vs=>{"use strict";var xp=wp();vs.createRoot=xp.createRoot,vs.hydrateRoot=xp.hydrateRoot;var Tv});var _p=jt($i=>{"use strict";var Mg=Ut(),Fg=Symbol.for("react.element"),Lg=Symbol.for("react.fragment"),Ig=Object.prototype.hasOwnProperty,Rg=Mg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Og={key:!0,ref:!0,__self:!0,__source:!0};function bp(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)Ig.call(t,r)&&!Og.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:Fg,type:e,key:i,ref:a,props:o,_owner:Rg.current}}$i.Fragment=Lg;$i.jsx=bp;$i.jsxs=bp});var De=jt((Fv,Sp)=>{"use strict";Sp.exports=_p()});var Us=`/* ---------------------------------------------------------------
|
|
9
9
|
Workflow Editor \u2014 bold redesign
|
|
10
10
|
Design system:
|
|
11
11
|
- Type: Space Grotesk (UI), JetBrains Mono (identifiers/expr),
|
|
@@ -16,7 +16,7 @@ Error generating stack: `+i.message+`
|
|
|
16
16
|
card, branch diamond-sliced card, action chip).
|
|
17
17
|
--------------------------------------------------------------- */
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
#wfe-root {
|
|
20
20
|
--accent-hue: 255; /* tweakable */
|
|
21
21
|
--accent: oklch(0.70 0.16 var(--accent-hue));
|
|
22
22
|
--accent-ink: oklch(0.22 0.08 var(--accent-hue));
|
|
@@ -46,7 +46,7 @@ Error generating stack: `+i.message+`
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/* DARK (default) */
|
|
49
|
-
:root[data-theme="dark"] {
|
|
49
|
+
:root[data-theme="dark"] #wfe-root {
|
|
50
50
|
--bg: oklch(0.18 0.014 265);
|
|
51
51
|
--bg-deep: oklch(0.14 0.014 265);
|
|
52
52
|
--surface: oklch(0.22 0.014 265);
|
|
@@ -67,7 +67,7 @@ Error generating stack: `+i.message+`
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/* LIGHT */
|
|
70
|
-
:root[data-theme="light"] {
|
|
70
|
+
:root[data-theme="light"] #wfe-root {
|
|
71
71
|
--bg: oklch(0.985 0.003 265);
|
|
72
72
|
--bg-deep: oklch(0.96 0.004 265);
|
|
73
73
|
--surface: oklch(1 0 0);
|
|
@@ -87,17 +87,17 @@ Error generating stack: `+i.message+`
|
|
|
87
87
|
0 2px 6px -3px oklch(0.2 0.02 265 / 0.12);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
#wfe-root,
|
|
91
|
+
#wfe-root * { box-sizing: border-box; }
|
|
92
|
+
/* Everything is scoped to the editor's root (#1524): it runs inside the
|
|
93
|
+
Wall's document now, and a bare body or .btn rule would restyle the Wall. */
|
|
94
|
+
#wfe-root {
|
|
94
95
|
color: var(--ink);
|
|
95
96
|
font: 13px/1.5 "Space Grotesk", system-ui, -apple-system, sans-serif;
|
|
96
97
|
font-feature-settings: "ss01", "cv01";
|
|
97
98
|
-webkit-font-smoothing: antialiased;
|
|
98
|
-
overflow: hidden;
|
|
99
99
|
}
|
|
100
|
-
kbd {
|
|
100
|
+
#wfe-root kbd {
|
|
101
101
|
font: 500 10.5px/1 "JetBrains Mono", ui-monospace, monospace;
|
|
102
102
|
background: var(--surface-2);
|
|
103
103
|
border: 1px solid var(--line);
|
|
@@ -106,7 +106,8 @@ kbd {
|
|
|
106
106
|
border-radius: 4px;
|
|
107
107
|
color: var(--ink-2);
|
|
108
108
|
}
|
|
109
|
-
code,
|
|
109
|
+
#wfe-root code,
|
|
110
|
+
#wfe-root .mono {
|
|
110
111
|
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
111
112
|
font-size: 0.92em;
|
|
112
113
|
letter-spacing: -0.005em;
|
|
@@ -115,25 +116,51 @@ code, .mono {
|
|
|
115
116
|
/* ============================================================
|
|
116
117
|
APP SHELL
|
|
117
118
|
============================================================ */
|
|
118
|
-
.app {
|
|
119
|
+
#wfe-root .app {
|
|
120
|
+
/* Two columns (#1524): the side menu and the canvas, under one toolbar.
|
|
121
|
+
The menu folds away and the canvas takes its room. */
|
|
122
|
+
--menu-w: 340px;
|
|
119
123
|
display: grid;
|
|
120
|
-
grid-template-rows: 52px 1fr;
|
|
121
|
-
grid-template-columns:
|
|
122
|
-
height:
|
|
124
|
+
grid-template-rows: 52px minmax(0, 1fr);
|
|
125
|
+
grid-template-columns: var(--menu-w) minmax(0, 1fr);
|
|
126
|
+
height: 100%;
|
|
127
|
+
position: relative;
|
|
123
128
|
background: var(--bg);
|
|
129
|
+
transition: grid-template-columns .16s ease;
|
|
124
130
|
}
|
|
125
|
-
.app[data-
|
|
126
|
-
.app
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
#wfe-root .app[data-menu="closed"] { grid-template-columns: 0 minmax(0, 1fr); }
|
|
132
|
+
#wfe-root .app > .cv { grid-column: 2; grid-row: 2; touch-action: none; }
|
|
133
|
+
|
|
134
|
+
/* The side menu: Add a step, or the settings of what is selected. */
|
|
135
|
+
#wfe-root .menu {
|
|
136
|
+
grid-column: 1; grid-row: 2;
|
|
137
|
+
display: flex; flex-direction: column;
|
|
138
|
+
min-width: 0; min-height: 0;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
background: var(--surface);
|
|
141
|
+
border-right: 1px solid var(--line);
|
|
142
|
+
}
|
|
143
|
+
#wfe-root .menu[hidden] { display: none; }
|
|
144
|
+
#wfe-root .menu__tabs { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); flex: none; }
|
|
145
|
+
#wfe-root .menu__tabs [role="tab"] {
|
|
146
|
+
flex: 1 1 auto; min-width: 0;
|
|
147
|
+
font: inherit; font-weight: 600; font-size: 13px;
|
|
148
|
+
background: none; border: 0; border-bottom: 3px solid transparent;
|
|
149
|
+
color: var(--muted); padding: 12px 10px 9px; cursor: pointer;
|
|
150
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
151
|
+
}
|
|
152
|
+
#wfe-root .menu__tabs [role="tab"]:hover { color: var(--ink); background: var(--surface-2); }
|
|
153
|
+
#wfe-root .menu__tabs [role="tab"].is-on { color: var(--ink); border-bottom-color: var(--accent); }
|
|
154
|
+
#wfe-root .menu__close { align-self: center; margin: 0 6px; }
|
|
155
|
+
#wfe-root .menu__note { margin: 0; padding: 10px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
|
|
156
|
+
#wfe-root .menu__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
157
|
+
#wfe-root .menu__body > .pal, #wfe-root .menu__body > .insp { flex: 1; min-height: 0; border: 0; }
|
|
131
158
|
|
|
132
159
|
/* ============================================================
|
|
133
160
|
TOOLBAR
|
|
134
161
|
============================================================ */
|
|
135
|
-
.tb {
|
|
136
|
-
grid-column: 1 /
|
|
162
|
+
#wfe-root .tb {
|
|
163
|
+
grid-column: 1 / 3;
|
|
137
164
|
display: flex;
|
|
138
165
|
align-items: stretch;
|
|
139
166
|
background: var(--surface);
|
|
@@ -141,13 +168,13 @@ code, .mono {
|
|
|
141
168
|
position: relative;
|
|
142
169
|
z-index: 5;
|
|
143
170
|
}
|
|
144
|
-
.tb__brand {
|
|
171
|
+
#wfe-root .tb__brand {
|
|
145
172
|
display: flex; align-items: center; gap: 10px;
|
|
146
173
|
padding: 0 16px;
|
|
147
174
|
border-right: 1px solid var(--line);
|
|
148
175
|
width: 288px;
|
|
149
176
|
}
|
|
150
|
-
.tb__mark {
|
|
177
|
+
#wfe-root .tb__mark {
|
|
151
178
|
width: 26px; height: 26px;
|
|
152
179
|
border-radius: 7px;
|
|
153
180
|
background: linear-gradient(140deg, var(--accent) 0%, var(--t-action) 100%);
|
|
@@ -157,28 +184,28 @@ code, .mono {
|
|
|
157
184
|
font-weight: 700;
|
|
158
185
|
box-shadow: 0 2px 8px -2px var(--accent-line), inset 0 0 0 1px oklch(1 0 0 / 0.2);
|
|
159
186
|
}
|
|
160
|
-
.tb__mark::after {
|
|
187
|
+
#wfe-root .tb__mark::after {
|
|
161
188
|
content: "";
|
|
162
189
|
position: absolute; inset: 3px;
|
|
163
190
|
border-radius: 5px;
|
|
164
191
|
background: radial-gradient(circle at 30% 30%, oklch(1 0 0 / 0.35), transparent 60%);
|
|
165
192
|
pointer-events: none;
|
|
166
193
|
}
|
|
167
|
-
.tb__brand-label { font-weight: 600; letter-spacing: -0.01em; font-size: 13px; }
|
|
168
|
-
.tb__brand-sub
|
|
194
|
+
#wfe-root .tb__brand-label { font-weight: 600; letter-spacing: -0.01em; font-size: 13px; }
|
|
195
|
+
#wfe-root .tb__brand-sub { font-size: 10px; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0; }
|
|
169
196
|
|
|
170
|
-
.tb__main {
|
|
197
|
+
#wfe-root .tb__main {
|
|
171
198
|
flex: 1;
|
|
172
199
|
display: flex; align-items: center; gap: 4px;
|
|
173
200
|
padding: 0 14px;
|
|
174
201
|
min-width: 0;
|
|
175
202
|
}
|
|
176
|
-
.tb__crumbs {
|
|
203
|
+
#wfe-root .tb__crumbs {
|
|
177
204
|
display: flex; align-items: center; gap: 8px;
|
|
178
205
|
font-size: 12px; color: var(--muted);
|
|
179
206
|
min-width: 0;
|
|
180
207
|
}
|
|
181
|
-
.tb__crumbs b {
|
|
208
|
+
#wfe-root .tb__crumbs b {
|
|
182
209
|
color: var(--ink);
|
|
183
210
|
font-weight: 600;
|
|
184
211
|
max-width: 320px;
|
|
@@ -186,7 +213,7 @@ code, .mono {
|
|
|
186
213
|
font-size: 13px;
|
|
187
214
|
letter-spacing: -0.005em;
|
|
188
215
|
}
|
|
189
|
-
.tb__crumbs input {
|
|
216
|
+
#wfe-root .tb__crumbs input {
|
|
190
217
|
font: inherit;
|
|
191
218
|
font-weight: 600;
|
|
192
219
|
color: var(--ink);
|
|
@@ -197,9 +224,9 @@ code, .mono {
|
|
|
197
224
|
min-width: 240px;
|
|
198
225
|
letter-spacing: -0.005em;
|
|
199
226
|
}
|
|
200
|
-
.tb__crumbs input:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
|
|
201
|
-
.tb__crumbs .sep { color: var(--muted-2); }
|
|
202
|
-
.tb__status {
|
|
227
|
+
#wfe-root .tb__crumbs input:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
|
|
228
|
+
#wfe-root .tb__crumbs .sep { color: var(--muted-2); }
|
|
229
|
+
#wfe-root .tb__status {
|
|
203
230
|
font: 500 10.5px/1 "JetBrains Mono", monospace;
|
|
204
231
|
color: var(--muted);
|
|
205
232
|
display: inline-flex; align-items: center; gap: 6px;
|
|
@@ -208,23 +235,23 @@ code, .mono {
|
|
|
208
235
|
background: var(--surface-2);
|
|
209
236
|
border: 1px solid var(--line-soft);
|
|
210
237
|
}
|
|
211
|
-
.tb__status .dot {
|
|
238
|
+
#wfe-root .tb__status .dot {
|
|
212
239
|
width: 6px; height: 6px; border-radius: 50%;
|
|
213
240
|
background: var(--muted);
|
|
214
241
|
}
|
|
215
|
-
.tb__status.is-dirty .dot { background: var(--warn); box-shadow: 0 0 0 3px oklch(from var(--warn) l c h / 0.25); }
|
|
216
|
-
.tb__status.is-saved .dot { background: var(--ok); }
|
|
217
|
-
.tb__status.is-running .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
242
|
+
#wfe-root .tb__status.is-dirty .dot { background: var(--warn); box-shadow: 0 0 0 3px oklch(from var(--warn) l c h / 0.25); }
|
|
243
|
+
#wfe-root .tb__status.is-saved .dot { background: var(--ok); }
|
|
244
|
+
#wfe-root .tb__status.is-running .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
218
245
|
|
|
219
|
-
.tb__sep { width: 1px; background: var(--line); margin: 10px 6px; }
|
|
220
|
-
.tb__spacer { flex: 1; }
|
|
246
|
+
#wfe-root .tb__sep { width: 1px; background: var(--line); margin: 10px 6px; }
|
|
247
|
+
#wfe-root .tb__spacer { flex: 1; }
|
|
221
248
|
|
|
222
|
-
.tb__actions { display: flex; align-items: center; gap: 4px; padding: 0 12px; border-left: 1px solid var(--line); }
|
|
249
|
+
#wfe-root .tb__actions { display: flex; align-items: center; gap: 4px; padding: 0 12px; border-left: 1px solid var(--line); }
|
|
223
250
|
|
|
224
251
|
/* ============================================================
|
|
225
252
|
BUTTONS
|
|
226
253
|
============================================================ */
|
|
227
|
-
.btn {
|
|
254
|
+
#wfe-root .btn {
|
|
228
255
|
font: 500 12px/1 "Space Grotesk", sans-serif;
|
|
229
256
|
color: var(--ink-2);
|
|
230
257
|
background: transparent;
|
|
@@ -237,51 +264,51 @@ code, .mono {
|
|
|
237
264
|
transition: background .12s ease, border-color .12s ease, color .12s ease;
|
|
238
265
|
white-space: nowrap;
|
|
239
266
|
}
|
|
240
|
-
.btn:hover { background: var(--surface-2); color: var(--ink); }
|
|
241
|
-
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
242
|
-
.btn svg { width: 14px; height: 14px; }
|
|
267
|
+
#wfe-root .btn:hover { background: var(--surface-2); color: var(--ink); }
|
|
268
|
+
#wfe-root .btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
269
|
+
#wfe-root .btn svg { width: 14px; height: 14px; }
|
|
243
270
|
|
|
244
|
-
.btn--outline { border-color: var(--line); background: var(--surface); }
|
|
245
|
-
.btn--outline:hover { border-color: var(--line); background: var(--node-hi); }
|
|
271
|
+
#wfe-root .btn--outline { border-color: var(--line); background: var(--surface); }
|
|
272
|
+
#wfe-root .btn--outline:hover { border-color: var(--line); background: var(--node-hi); }
|
|
246
273
|
|
|
247
|
-
.btn--primary {
|
|
274
|
+
#wfe-root .btn--primary {
|
|
248
275
|
background: var(--accent);
|
|
249
276
|
color: var(--accent-ink);
|
|
250
277
|
border-color: var(--accent);
|
|
251
278
|
font-weight: 600;
|
|
252
279
|
}
|
|
253
|
-
.btn--primary:hover { filter: brightness(1.08); color: var(--accent-ink); background: var(--accent); }
|
|
280
|
+
#wfe-root .btn--primary:hover { filter: brightness(1.08); color: var(--accent-ink); background: var(--accent); }
|
|
254
281
|
|
|
255
|
-
.btn--ghost-icon {
|
|
282
|
+
#wfe-root .btn--ghost-icon {
|
|
256
283
|
width: 30px; padding: 0; justify-content: center;
|
|
257
284
|
color: var(--muted);
|
|
258
285
|
}
|
|
259
|
-
.btn--ghost-icon:hover { color: var(--ink); background: var(--surface-2); }
|
|
260
|
-
.btn--ghost-icon.is-active { color: var(--accent); background: var(--accent-soft); }
|
|
286
|
+
#wfe-root .btn--ghost-icon:hover { color: var(--ink); background: var(--surface-2); }
|
|
287
|
+
#wfe-root .btn--ghost-icon.is-active { color: var(--accent); background: var(--accent-soft); }
|
|
261
288
|
|
|
262
|
-
.btn--danger {
|
|
289
|
+
#wfe-root .btn--danger {
|
|
263
290
|
color: var(--err);
|
|
264
291
|
background: oklch(from var(--err) l c h / 0.08);
|
|
265
292
|
border-color: oklch(from var(--err) l c h / 0.3);
|
|
266
293
|
}
|
|
267
|
-
.btn--danger:hover { background: oklch(from var(--err) l c h / 0.16); }
|
|
294
|
+
#wfe-root .btn--danger:hover { background: oklch(from var(--err) l c h / 0.16); }
|
|
268
295
|
|
|
269
296
|
/* ============================================================
|
|
270
297
|
PALETTE (left)
|
|
271
298
|
============================================================ */
|
|
272
|
-
.pal {
|
|
299
|
+
#wfe-root .pal {
|
|
273
300
|
border-right: 1px solid var(--line);
|
|
274
301
|
background: var(--surface);
|
|
275
302
|
display: flex; flex-direction: column;
|
|
276
303
|
overflow: hidden;
|
|
277
304
|
min-width: 0;
|
|
278
305
|
}
|
|
279
|
-
.pal__search {
|
|
306
|
+
#wfe-root .pal__search {
|
|
280
307
|
position: relative;
|
|
281
308
|
padding: 12px 14px 8px;
|
|
282
309
|
border-bottom: 1px solid var(--line-soft);
|
|
283
310
|
}
|
|
284
|
-
.pal__search input {
|
|
311
|
+
#wfe-root .pal__search input {
|
|
285
312
|
width: 100%;
|
|
286
313
|
font: 13px "Space Grotesk", sans-serif;
|
|
287
314
|
background: var(--bg);
|
|
@@ -290,22 +317,22 @@ code, .mono {
|
|
|
290
317
|
padding: 8px 12px 8px 32px;
|
|
291
318
|
color: var(--ink);
|
|
292
319
|
}
|
|
293
|
-
.pal__search input::placeholder { color: var(--muted-2); }
|
|
294
|
-
.pal__search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
295
|
-
.pal__search svg {
|
|
320
|
+
#wfe-root .pal__search input::placeholder { color: var(--muted-2); }
|
|
321
|
+
#wfe-root .pal__search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
322
|
+
#wfe-root .pal__search svg {
|
|
296
323
|
position: absolute; left: 24px; top: 50%;
|
|
297
324
|
width: 14px; height: 14px;
|
|
298
325
|
transform: translateY(-4px);
|
|
299
326
|
color: var(--muted);
|
|
300
327
|
pointer-events: none;
|
|
301
328
|
}
|
|
302
|
-
.pal__search kbd { position: absolute; right: 22px; top: 20px; }
|
|
329
|
+
#wfe-root .pal__search kbd { position: absolute; right: 22px; top: 20px; }
|
|
303
330
|
|
|
304
|
-
.pal__scroll { flex: 1; overflow-y: auto; padding: 14px 10px 18px; }
|
|
305
|
-
.pal__scroll::-webkit-scrollbar { width: 8px; }
|
|
306
|
-
.pal__scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
|
|
331
|
+
#wfe-root .pal__scroll { flex: 1; overflow-y: auto; padding: 14px 10px 18px; }
|
|
332
|
+
#wfe-root .pal__scroll::-webkit-scrollbar { width: 8px; }
|
|
333
|
+
#wfe-root .pal__scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
|
|
307
334
|
|
|
308
|
-
.pal__section {
|
|
335
|
+
#wfe-root .pal__section {
|
|
309
336
|
display: flex; align-items: center; justify-content: space-between;
|
|
310
337
|
padding: 14px 6px 6px;
|
|
311
338
|
font-size: 10px; font-weight: 600;
|
|
@@ -313,13 +340,13 @@ code, .mono {
|
|
|
313
340
|
text-transform: uppercase;
|
|
314
341
|
color: var(--muted);
|
|
315
342
|
}
|
|
316
|
-
.pal__section:first-child { padding-top: 4px; }
|
|
317
|
-
.pal__section-count {
|
|
343
|
+
#wfe-root .pal__section:first-child { padding-top: 4px; }
|
|
344
|
+
#wfe-root .pal__section-count {
|
|
318
345
|
font-size: 10px; font-family: "JetBrains Mono", monospace;
|
|
319
346
|
color: var(--muted-2);
|
|
320
347
|
}
|
|
321
348
|
|
|
322
|
-
.pal__item {
|
|
349
|
+
#wfe-root .pal__item {
|
|
323
350
|
display: flex; align-items: flex-start; gap: 10px;
|
|
324
351
|
padding: 9px 10px;
|
|
325
352
|
margin: 2px 0;
|
|
@@ -330,11 +357,11 @@ code, .mono {
|
|
|
330
357
|
position: relative;
|
|
331
358
|
transition: background .12s, border-color .12s;
|
|
332
359
|
}
|
|
333
|
-
.pal__item:hover { background: var(--surface-2); border-color: var(--line-soft); }
|
|
334
|
-
.pal__item:active { cursor: grabbing; }
|
|
335
|
-
.pal__item.is-dragging { opacity: 0.35; }
|
|
360
|
+
#wfe-root .pal__item:hover { background: var(--surface-2); border-color: var(--line-soft); }
|
|
361
|
+
#wfe-root .pal__item:active { cursor: grabbing; }
|
|
362
|
+
#wfe-root .pal__item.is-dragging { opacity: 0.35; }
|
|
336
363
|
|
|
337
|
-
.pal__glyph {
|
|
364
|
+
#wfe-root .pal__glyph {
|
|
338
365
|
flex-shrink: 0;
|
|
339
366
|
width: 30px; height: 30px;
|
|
340
367
|
display: grid; place-items: center;
|
|
@@ -342,19 +369,19 @@ code, .mono {
|
|
|
342
369
|
background: var(--gbg, var(--surface-2));
|
|
343
370
|
border: 1px solid var(--gbor, var(--line));
|
|
344
371
|
}
|
|
345
|
-
.pal__glyph.g-trigger { --gcol: var(--t-trigger); --gbg: var(--t-trigger-soft); --gbor: oklch(from var(--t-trigger) l c h / 0.3); border-radius: 15px; }
|
|
346
|
-
.pal__glyph.g-state
|
|
347
|
-
.pal__glyph.g-branch
|
|
348
|
-
.pal__glyph.g-branch svg { transform: rotate(-45deg); }
|
|
349
|
-
.pal__glyph.g-action
|
|
350
|
-
.pal__glyph.g-end
|
|
351
|
-
.pal__glyph svg { width: 14px; height: 14px; }
|
|
372
|
+
#wfe-root .pal__glyph.g-trigger { --gcol: var(--t-trigger); --gbg: var(--t-trigger-soft); --gbor: oklch(from var(--t-trigger) l c h / 0.3); border-radius: 15px; }
|
|
373
|
+
#wfe-root .pal__glyph.g-state { --gcol: var(--t-state); --gbg: var(--t-state-soft); --gbor: oklch(from var(--t-state) l c h / 0.3); border-radius: 6px; }
|
|
374
|
+
#wfe-root .pal__glyph.g-branch { --gcol: var(--t-branch); --gbg: var(--t-branch-soft); --gbor: oklch(from var(--t-branch) l c h / 0.3); border-radius: 4px; transform: rotate(45deg); }
|
|
375
|
+
#wfe-root .pal__glyph.g-branch svg { transform: rotate(-45deg); }
|
|
376
|
+
#wfe-root .pal__glyph.g-action { --gcol: var(--t-action); --gbg: var(--t-action-soft); --gbor: oklch(from var(--t-action) l c h / 0.3); border-radius: 4px 10px 10px 4px; }
|
|
377
|
+
#wfe-root .pal__glyph.g-end { --gcol: var(--t-end); --gbg: var(--t-end-soft); --gbor: oklch(from var(--t-end) l c h / 0.3); border-radius: 15px; border-style: dashed; }
|
|
378
|
+
#wfe-root .pal__glyph svg { width: 14px; height: 14px; }
|
|
352
379
|
|
|
353
|
-
.pal__meta { min-width: 0; flex: 1; padding-top: 2px; }
|
|
354
|
-
.pal__label { font-size: 12.5px; font-weight: 500; color: var(--ink); letter-spacing: -0.005em; }
|
|
355
|
-
.pal__hint
|
|
380
|
+
#wfe-root .pal__meta { min-width: 0; flex: 1; padding-top: 2px; }
|
|
381
|
+
#wfe-root .pal__label { font-size: 12.5px; font-weight: 500; color: var(--ink); letter-spacing: -0.005em; }
|
|
382
|
+
#wfe-root .pal__hint { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
|
|
356
383
|
|
|
357
|
-
.pal__tpl {
|
|
384
|
+
#wfe-root .pal__tpl {
|
|
358
385
|
display: block;
|
|
359
386
|
padding: 12px 14px;
|
|
360
387
|
background: var(--bg);
|
|
@@ -366,20 +393,20 @@ code, .mono {
|
|
|
366
393
|
overflow: hidden;
|
|
367
394
|
transition: border-color .12s, transform .12s;
|
|
368
395
|
}
|
|
369
|
-
.pal__tpl:hover { border-color: var(--accent-line); transform: translateY(-1px); }
|
|
370
|
-
.pal__tpl-title { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; }
|
|
371
|
-
.pal__tpl-hint
|
|
372
|
-
.pal__tpl-dots
|
|
396
|
+
#wfe-root .pal__tpl:hover { border-color: var(--accent-line); transform: translateY(-1px); }
|
|
397
|
+
#wfe-root .pal__tpl-title { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; }
|
|
398
|
+
#wfe-root .pal__tpl-hint { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
|
|
399
|
+
#wfe-root .pal__tpl-dots {
|
|
373
400
|
position: absolute; right: 10px; top: 10px;
|
|
374
401
|
display: flex; gap: 3px;
|
|
375
402
|
}
|
|
376
|
-
.pal__tpl-dots span {
|
|
403
|
+
#wfe-root .pal__tpl-dots span {
|
|
377
404
|
width: 5px; height: 5px; border-radius: 50%;
|
|
378
405
|
background: var(--line);
|
|
379
406
|
}
|
|
380
|
-
.pal__tpl-dots span.on { background: var(--accent); }
|
|
407
|
+
#wfe-root .pal__tpl-dots span.on { background: var(--accent); }
|
|
381
408
|
|
|
382
|
-
.pal__foot {
|
|
409
|
+
#wfe-root .pal__foot {
|
|
383
410
|
border-top: 1px solid var(--line);
|
|
384
411
|
padding: 10px 14px;
|
|
385
412
|
font-size: 10.5px; color: var(--muted);
|
|
@@ -390,7 +417,7 @@ code, .mono {
|
|
|
390
417
|
/* ============================================================
|
|
391
418
|
CANVAS
|
|
392
419
|
============================================================ */
|
|
393
|
-
.cv {
|
|
420
|
+
#wfe-root .cv {
|
|
394
421
|
position: relative;
|
|
395
422
|
overflow: hidden;
|
|
396
423
|
background: var(--bg);
|
|
@@ -402,8 +429,8 @@ code, .mono {
|
|
|
402
429
|
background-position: 0 0, 0 0, 0 0;
|
|
403
430
|
cursor: default;
|
|
404
431
|
}
|
|
405
|
-
.cv.is-panning { cursor: grabbing; }
|
|
406
|
-
.cv.is-drop-target::before {
|
|
432
|
+
#wfe-root .cv.is-panning { cursor: grabbing; }
|
|
433
|
+
#wfe-root .cv.is-drop-target::before {
|
|
407
434
|
content: "";
|
|
408
435
|
position: absolute; inset: 8px;
|
|
409
436
|
border: 2px dashed var(--accent);
|
|
@@ -413,47 +440,47 @@ code, .mono {
|
|
|
413
440
|
z-index: 0;
|
|
414
441
|
}
|
|
415
442
|
|
|
416
|
-
.cv__viewport {
|
|
443
|
+
#wfe-root .cv__viewport {
|
|
417
444
|
position: absolute;
|
|
418
445
|
left: 0; top: 0;
|
|
419
446
|
width: 100%; height: 100%;
|
|
420
447
|
transform-origin: 0 0;
|
|
421
448
|
}
|
|
422
449
|
|
|
423
|
-
.cv__edges {
|
|
450
|
+
#wfe-root .cv__edges {
|
|
424
451
|
position: absolute; inset: 0;
|
|
425
452
|
pointer-events: none;
|
|
426
453
|
overflow: visible;
|
|
427
454
|
z-index: 1;
|
|
428
455
|
}
|
|
429
|
-
.cv__edges path {
|
|
456
|
+
#wfe-root .cv__edges path {
|
|
430
457
|
fill: none;
|
|
431
458
|
stroke: var(--line);
|
|
432
459
|
stroke-width: 1.6;
|
|
433
460
|
pointer-events: stroke;
|
|
434
461
|
cursor: pointer;
|
|
435
462
|
}
|
|
436
|
-
.cv__edges path.edge-bg {
|
|
463
|
+
#wfe-root .cv__edges path.edge-bg {
|
|
437
464
|
stroke: transparent;
|
|
438
465
|
stroke-width: 14;
|
|
439
466
|
pointer-events: stroke;
|
|
440
467
|
}
|
|
441
|
-
.cv__edges path.is-hover { stroke: var(--ink-2); }
|
|
442
|
-
.cv__edges path.is-selected { stroke: var(--accent); stroke-width: 2; }
|
|
443
|
-
.cv__edges path.is-running {
|
|
468
|
+
#wfe-root .cv__edges path.is-hover { stroke: var(--ink-2); }
|
|
469
|
+
#wfe-root .cv__edges path.is-selected { stroke: var(--accent); stroke-width: 2; }
|
|
470
|
+
#wfe-root .cv__edges path.is-running {
|
|
444
471
|
stroke: var(--accent);
|
|
445
472
|
stroke-width: 2;
|
|
446
473
|
stroke-dasharray: 6 4;
|
|
447
474
|
animation: dash 0.6s linear infinite;
|
|
448
475
|
}
|
|
449
|
-
.cv__edges path.is-visited { stroke: var(--accent); stroke-width: 1.8; }
|
|
450
|
-
.cv__edges path.is-true
|
|
451
|
-
.cv__edges path.is-false { stroke: var(--err); }
|
|
452
|
-
.cv__edges .edge-label {
|
|
476
|
+
#wfe-root .cv__edges path.is-visited { stroke: var(--accent); stroke-width: 1.8; }
|
|
477
|
+
#wfe-root .cv__edges path.is-true { stroke: var(--ok); }
|
|
478
|
+
#wfe-root .cv__edges path.is-false { stroke: var(--err); }
|
|
479
|
+
#wfe-root .cv__edges .edge-label {
|
|
453
480
|
font: 500 10.5px "JetBrains Mono", monospace;
|
|
454
481
|
fill: var(--ink-2);
|
|
455
482
|
}
|
|
456
|
-
.cv__edges .edge-label-bg {
|
|
483
|
+
#wfe-root .cv__edges .edge-label-bg {
|
|
457
484
|
fill: var(--surface);
|
|
458
485
|
stroke: var(--line);
|
|
459
486
|
stroke-width: 1;
|
|
@@ -465,7 +492,7 @@ code, .mono {
|
|
|
465
492
|
}
|
|
466
493
|
|
|
467
494
|
/* ---------- NODE base ---------- */
|
|
468
|
-
.node {
|
|
495
|
+
#wfe-root .node {
|
|
469
496
|
position: absolute;
|
|
470
497
|
--c: var(--t-state);
|
|
471
498
|
--c-soft: var(--t-state-soft);
|
|
@@ -481,36 +508,36 @@ code, .mono {
|
|
|
481
508
|
transition: border-color .12s, box-shadow .12s, transform .12s;
|
|
482
509
|
z-index: 2;
|
|
483
510
|
}
|
|
484
|
-
.node.t-trigger { --c: var(--t-trigger); --c-soft: var(--t-trigger-soft); }
|
|
485
|
-
.node.t-state
|
|
486
|
-
.node.t-branch
|
|
487
|
-
.node.t-action
|
|
488
|
-
.node.t-end
|
|
511
|
+
#wfe-root .node.t-trigger { --c: var(--t-trigger); --c-soft: var(--t-trigger-soft); }
|
|
512
|
+
#wfe-root .node.t-state { --c: var(--t-state); --c-soft: var(--t-state-soft); }
|
|
513
|
+
#wfe-root .node.t-branch { --c: var(--t-branch); --c-soft: var(--t-branch-soft); }
|
|
514
|
+
#wfe-root .node.t-action { --c: var(--t-action); --c-soft: var(--t-action-soft); }
|
|
515
|
+
#wfe-root .node.t-end { --c: var(--t-end); --c-soft: var(--t-end-soft); }
|
|
489
516
|
|
|
490
|
-
.node:active { cursor: grabbing; }
|
|
491
|
-
.node.is-selected { border-color: var(--c-line); box-shadow: var(--shadow), 0 0 0 2px oklch(from var(--c) l c h / 0.4); z-index: 4; }
|
|
492
|
-
.node.is-running { box-shadow: var(--shadow), 0 0 0 2px var(--c-line), 0 0 22px 2px oklch(from var(--c) l c h / 0.4); border-color: var(--c-line); }
|
|
493
|
-
.node.is-visited { border-color: var(--c-line); }
|
|
494
|
-
.node.is-error
|
|
517
|
+
#wfe-root .node:active { cursor: grabbing; }
|
|
518
|
+
#wfe-root .node.is-selected { border-color: var(--c-line); box-shadow: var(--shadow), 0 0 0 2px oklch(from var(--c) l c h / 0.4); z-index: 4; }
|
|
519
|
+
#wfe-root .node.is-running { box-shadow: var(--shadow), 0 0 0 2px var(--c-line), 0 0 22px 2px oklch(from var(--c) l c h / 0.4); border-color: var(--c-line); }
|
|
520
|
+
#wfe-root .node.is-visited { border-color: var(--c-line); }
|
|
521
|
+
#wfe-root .node.is-error { border-color: var(--err); box-shadow: var(--shadow), 0 0 0 2px oklch(from var(--err) l c h / 0.35); }
|
|
495
522
|
|
|
496
|
-
.node__stripe {
|
|
523
|
+
#wfe-root .node__stripe {
|
|
497
524
|
height: 4px;
|
|
498
525
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
499
526
|
background: linear-gradient(90deg, var(--c) 0%, oklch(from var(--c) l c h / 0.5) 100%);
|
|
500
527
|
position: relative;
|
|
501
528
|
overflow: hidden;
|
|
502
529
|
}
|
|
503
|
-
.node__stripe::after {
|
|
530
|
+
#wfe-root .node__stripe::after {
|
|
504
531
|
content: "";
|
|
505
532
|
position: absolute; inset: 0;
|
|
506
533
|
background: repeating-linear-gradient(90deg, oklch(1 0 0 / 0.15) 0 2px, transparent 2px 4px);
|
|
507
534
|
mix-blend-mode: overlay;
|
|
508
535
|
}
|
|
509
|
-
.node__head {
|
|
536
|
+
#wfe-root .node__head {
|
|
510
537
|
display: flex; align-items: center; gap: 10px;
|
|
511
538
|
padding: 10px 12px 6px;
|
|
512
539
|
}
|
|
513
|
-
.node__icon {
|
|
540
|
+
#wfe-root .node__icon {
|
|
514
541
|
width: 22px; height: 22px;
|
|
515
542
|
border-radius: 5px;
|
|
516
543
|
background: var(--c-soft);
|
|
@@ -519,38 +546,38 @@ code, .mono {
|
|
|
519
546
|
display: grid; place-items: center;
|
|
520
547
|
flex-shrink: 0;
|
|
521
548
|
}
|
|
522
|
-
.node__icon svg { width: 12px; height: 12px; }
|
|
523
|
-
.node__meta { min-width: 0; flex: 1; }
|
|
524
|
-
.node__kind {
|
|
549
|
+
#wfe-root .node__icon svg { width: 12px; height: 12px; }
|
|
550
|
+
#wfe-root .node__meta { min-width: 0; flex: 1; }
|
|
551
|
+
#wfe-root .node__kind {
|
|
525
552
|
font: 600 9px/1 "JetBrains Mono", monospace;
|
|
526
553
|
letter-spacing: 0.12em;
|
|
527
554
|
text-transform: uppercase;
|
|
528
555
|
color: var(--c);
|
|
529
556
|
}
|
|
530
|
-
.node__name {
|
|
557
|
+
#wfe-root .node__name {
|
|
531
558
|
font-weight: 600; font-size: 13.5px;
|
|
532
559
|
letter-spacing: -0.01em;
|
|
533
560
|
margin-top: 2px;
|
|
534
561
|
color: var(--ink);
|
|
535
562
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
536
563
|
}
|
|
537
|
-
.node__chev {
|
|
564
|
+
#wfe-root .node__chev {
|
|
538
565
|
color: var(--muted-2);
|
|
539
566
|
display: grid; place-items: center;
|
|
540
567
|
}
|
|
541
|
-
.node__body {
|
|
568
|
+
#wfe-root .node__body {
|
|
542
569
|
padding: 0 12px 12px;
|
|
543
570
|
display: flex; flex-direction: column; gap: 6px;
|
|
544
571
|
}
|
|
545
|
-
.node__row {
|
|
572
|
+
#wfe-root .node__row {
|
|
546
573
|
display: flex; align-items: center; gap: 6px;
|
|
547
574
|
font-size: 11.5px;
|
|
548
575
|
color: var(--ink-2);
|
|
549
576
|
min-height: 18px;
|
|
550
577
|
}
|
|
551
|
-
.node__row .mono { color: var(--muted); }
|
|
552
|
-
.node__row svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
|
|
553
|
-
.node__tag {
|
|
578
|
+
#wfe-root .node__row .mono { color: var(--muted); }
|
|
579
|
+
#wfe-root .node__row svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
|
|
580
|
+
#wfe-root .node__tag {
|
|
554
581
|
font: 500 10px "JetBrains Mono", monospace;
|
|
555
582
|
padding: 2px 6px;
|
|
556
583
|
background: var(--surface-2);
|
|
@@ -559,15 +586,15 @@ code, .mono {
|
|
|
559
586
|
border: 1px solid var(--line-soft);
|
|
560
587
|
}
|
|
561
588
|
|
|
562
|
-
.node__foot {
|
|
589
|
+
#wfe-root .node__foot {
|
|
563
590
|
padding: 8px 12px;
|
|
564
591
|
border-top: 1px dashed var(--line-soft);
|
|
565
592
|
display: flex; align-items: center; justify-content: space-between;
|
|
566
593
|
font-size: 10.5px;
|
|
567
594
|
color: var(--muted);
|
|
568
595
|
}
|
|
569
|
-
.node__badges { display: flex; gap: 4px; }
|
|
570
|
-
.node__badge {
|
|
596
|
+
#wfe-root .node__badges { display: flex; gap: 4px; }
|
|
597
|
+
#wfe-root .node__badge {
|
|
571
598
|
font: 600 9px/1 "JetBrains Mono", monospace;
|
|
572
599
|
letter-spacing: 0.08em;
|
|
573
600
|
padding: 3px 5px;
|
|
@@ -577,21 +604,21 @@ code, .mono {
|
|
|
577
604
|
text-transform: uppercase;
|
|
578
605
|
border: 1px solid var(--line-soft);
|
|
579
606
|
}
|
|
580
|
-
.node__badge.ok
|
|
581
|
-
.node__badge.warn { color: var(--warn); background: oklch(from var(--warn) l c h / 0.12); border-color: oklch(from var(--warn) l c h / 0.3); }
|
|
582
|
-
.node__badge.err
|
|
607
|
+
#wfe-root .node__badge.ok { color: var(--ok); background: oklch(from var(--ok) l c h / 0.12); border-color: oklch(from var(--ok) l c h / 0.3); }
|
|
608
|
+
#wfe-root .node__badge.warn { color: var(--warn); background: oklch(from var(--warn) l c h / 0.12); border-color: oklch(from var(--warn) l c h / 0.3); }
|
|
609
|
+
#wfe-root .node__badge.err { color: var(--err); background: oklch(from var(--err) l c h / 0.12); border-color: oklch(from var(--err) l c h / 0.3); }
|
|
583
610
|
|
|
584
611
|
/* ---------- NODE: Trigger (pill) ---------- */
|
|
585
|
-
.node.t-trigger {
|
|
612
|
+
#wfe-root .node.t-trigger {
|
|
586
613
|
border-radius: 999px;
|
|
587
614
|
min-width: 200px;
|
|
588
615
|
padding: 10px 18px 10px 14px;
|
|
589
616
|
}
|
|
590
|
-
.node.t-trigger .node__stripe { display: none; }
|
|
591
|
-
.node.t-trigger .node__head { padding: 0; gap: 10px; }
|
|
592
|
-
.node.t-trigger .node__body { display: none; }
|
|
593
|
-
.node.t-trigger .node__foot { display: none; }
|
|
594
|
-
.node.t-trigger::before {
|
|
617
|
+
#wfe-root .node.t-trigger .node__stripe { display: none; }
|
|
618
|
+
#wfe-root .node.t-trigger .node__head { padding: 0; gap: 10px; }
|
|
619
|
+
#wfe-root .node.t-trigger .node__body { display: none; }
|
|
620
|
+
#wfe-root .node.t-trigger .node__foot { display: none; }
|
|
621
|
+
#wfe-root .node.t-trigger::before {
|
|
595
622
|
content: "";
|
|
596
623
|
position: absolute;
|
|
597
624
|
left: -6px; top: 50%;
|
|
@@ -603,22 +630,22 @@ code, .mono {
|
|
|
603
630
|
}
|
|
604
631
|
|
|
605
632
|
/* ---------- NODE: Branch (diamond-clipped card) ---------- */
|
|
606
|
-
.node.t-branch {
|
|
633
|
+
#wfe-root .node.t-branch {
|
|
607
634
|
min-width: 240px;
|
|
608
635
|
clip-path: polygon(0% 14px, 14px 0%, calc(100% - 14px) 0%, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0% calc(100% - 14px));
|
|
609
636
|
}
|
|
610
637
|
|
|
611
638
|
/* ---------- NODE: Action (chip, smaller) ---------- */
|
|
612
|
-
.node.t-action {
|
|
639
|
+
#wfe-root .node.t-action {
|
|
613
640
|
min-width: 200px;
|
|
614
641
|
border-radius: 4px 14px 14px 4px;
|
|
615
642
|
border-left: 3px solid var(--c);
|
|
616
643
|
}
|
|
617
|
-
.node.t-action .node__stripe { display: none; }
|
|
618
|
-
.node.t-action .node__head { padding-top: 10px; }
|
|
644
|
+
#wfe-root .node.t-action .node__stripe { display: none; }
|
|
645
|
+
#wfe-root .node.t-action .node__head { padding-top: 10px; }
|
|
619
646
|
|
|
620
647
|
/* ---------- HANDLES (ports) ---------- */
|
|
621
|
-
.handle {
|
|
648
|
+
#wfe-root .handle {
|
|
622
649
|
position: absolute;
|
|
623
650
|
width: 12px; height: 12px;
|
|
624
651
|
border-radius: 50%;
|
|
@@ -629,15 +656,16 @@ code, .mono {
|
|
|
629
656
|
z-index: 5;
|
|
630
657
|
transition: transform .1s, background .12s;
|
|
631
658
|
}
|
|
632
|
-
.handle:hover,
|
|
659
|
+
#wfe-root .handle:hover,
|
|
660
|
+
#wfe-root .handle.is-active {
|
|
633
661
|
background: var(--c);
|
|
634
662
|
transform: translate(-50%, -50%) scale(1.35);
|
|
635
663
|
}
|
|
636
|
-
.handle.h-in
|
|
637
|
-
.handle.h-out { left: 100%; top: 50%; }
|
|
638
|
-
.handle.h-true
|
|
639
|
-
.handle.h-false { left: 100%; top: 70%; border-color: var(--err); }
|
|
640
|
-
.handle__label {
|
|
664
|
+
#wfe-root .handle.h-in { left: 0; top: 50%; }
|
|
665
|
+
#wfe-root .handle.h-out { left: 100%; top: 50%; }
|
|
666
|
+
#wfe-root .handle.h-true { left: 100%; top: 30%; border-color: var(--ok); }
|
|
667
|
+
#wfe-root .handle.h-false { left: 100%; top: 70%; border-color: var(--err); }
|
|
668
|
+
#wfe-root .handle__label {
|
|
641
669
|
position: absolute;
|
|
642
670
|
left: 14px; top: 50%;
|
|
643
671
|
transform: translateY(-50%);
|
|
@@ -648,11 +676,11 @@ code, .mono {
|
|
|
648
676
|
white-space: nowrap;
|
|
649
677
|
pointer-events: none;
|
|
650
678
|
}
|
|
651
|
-
.handle.h-true .handle__label
|
|
652
|
-
.handle.h-false .handle__label { color: var(--err); }
|
|
679
|
+
#wfe-root .handle.h-true .handle__label { color: var(--ok); }
|
|
680
|
+
#wfe-root .handle.h-false .handle__label { color: var(--err); }
|
|
653
681
|
|
|
654
682
|
/* ---------- Canvas overlays ---------- */
|
|
655
|
-
.cv__controls {
|
|
683
|
+
#wfe-root .cv__controls {
|
|
656
684
|
position: absolute;
|
|
657
685
|
left: 14px; bottom: 14px;
|
|
658
686
|
display: flex; gap: 6px;
|
|
@@ -663,7 +691,7 @@ code, .mono {
|
|
|
663
691
|
box-shadow: var(--shadow);
|
|
664
692
|
z-index: 10;
|
|
665
693
|
}
|
|
666
|
-
.cv__controls button {
|
|
694
|
+
#wfe-root .cv__controls button {
|
|
667
695
|
width: 28px; height: 28px;
|
|
668
696
|
background: transparent;
|
|
669
697
|
border: 0;
|
|
@@ -672,10 +700,10 @@ code, .mono {
|
|
|
672
700
|
cursor: pointer;
|
|
673
701
|
display: grid; place-items: center;
|
|
674
702
|
}
|
|
675
|
-
.cv__controls button:hover { background: var(--surface-2); color: var(--ink); }
|
|
676
|
-
.cv__zoom { padding: 0 8px; font: 500 11px "JetBrains Mono", monospace; color: var(--muted); display: grid; place-items: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 56px; }
|
|
703
|
+
#wfe-root .cv__controls button:hover { background: var(--surface-2); color: var(--ink); }
|
|
704
|
+
#wfe-root .cv__zoom { padding: 0 8px; font: 500 11px "JetBrains Mono", monospace; color: var(--muted); display: grid; place-items: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 56px; }
|
|
677
705
|
|
|
678
|
-
.cv__mini {
|
|
706
|
+
#wfe-root .cv__mini {
|
|
679
707
|
position: absolute;
|
|
680
708
|
right: 14px; bottom: 14px;
|
|
681
709
|
width: 200px; height: 140px;
|
|
@@ -687,8 +715,8 @@ code, .mono {
|
|
|
687
715
|
box-shadow: var(--shadow);
|
|
688
716
|
transition: height .16s, width .16s;
|
|
689
717
|
}
|
|
690
|
-
.cv__mini.is-collapsed { height: 32px; width: 140px; }
|
|
691
|
-
.cv__mini-head {
|
|
718
|
+
#wfe-root .cv__mini.is-collapsed { height: 32px; width: 140px; }
|
|
719
|
+
#wfe-root .cv__mini-head {
|
|
692
720
|
height: 28px;
|
|
693
721
|
display: flex; align-items: center; justify-content: space-between;
|
|
694
722
|
padding: 0 10px;
|
|
@@ -696,15 +724,15 @@ code, .mono {
|
|
|
696
724
|
color: var(--muted);
|
|
697
725
|
border-bottom: 1px solid var(--line-soft);
|
|
698
726
|
}
|
|
699
|
-
.cv__mini-head button { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; display: grid; place-items: center; }
|
|
700
|
-
.cv__mini-head button:hover { color: var(--ink); background: var(--surface-2); }
|
|
701
|
-
.cv__mini svg { width: 100%; height: calc(100% - 28px); display: block; }
|
|
702
|
-
.cv__mini .mini-node { fill: var(--muted-2); }
|
|
703
|
-
.cv__mini .mini-node.sel { fill: var(--accent); }
|
|
704
|
-
.cv__mini .mini-view { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
|
|
727
|
+
#wfe-root .cv__mini-head button { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; display: grid; place-items: center; }
|
|
728
|
+
#wfe-root .cv__mini-head button:hover { color: var(--ink); background: var(--surface-2); }
|
|
729
|
+
#wfe-root .cv__mini svg { width: 100%; height: calc(100% - 28px); display: block; }
|
|
730
|
+
#wfe-root .cv__mini .mini-node { fill: var(--muted-2); }
|
|
731
|
+
#wfe-root .cv__mini .mini-node.sel { fill: var(--accent); }
|
|
732
|
+
#wfe-root .cv__mini .mini-view { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
|
|
705
733
|
|
|
706
734
|
/* ---------- Run panel ---------- */
|
|
707
|
-
.run {
|
|
735
|
+
#wfe-root .run {
|
|
708
736
|
position: absolute;
|
|
709
737
|
top: 14px; left: 14px;
|
|
710
738
|
width: 320px;
|
|
@@ -717,13 +745,13 @@ code, .mono {
|
|
|
717
745
|
overflow: hidden;
|
|
718
746
|
display: flex; flex-direction: column;
|
|
719
747
|
}
|
|
720
|
-
.run__head {
|
|
748
|
+
#wfe-root .run__head {
|
|
721
749
|
display: flex; align-items: center; gap: 10px;
|
|
722
750
|
padding: 10px 12px;
|
|
723
751
|
border-bottom: 1px solid var(--line-soft);
|
|
724
752
|
}
|
|
725
|
-
.run__title { font-weight: 600; font-size: 12.5px; letter-spacing: -0.005em; }
|
|
726
|
-
.run__chip {
|
|
753
|
+
#wfe-root .run__title { font-weight: 600; font-size: 12.5px; letter-spacing: -0.005em; }
|
|
754
|
+
#wfe-root .run__chip {
|
|
727
755
|
font: 600 10px "JetBrains Mono", monospace;
|
|
728
756
|
padding: 3px 7px;
|
|
729
757
|
border-radius: 20px;
|
|
@@ -732,9 +760,9 @@ code, .mono {
|
|
|
732
760
|
border: 1px solid var(--accent-line);
|
|
733
761
|
display: inline-flex; align-items: center; gap: 5px;
|
|
734
762
|
}
|
|
735
|
-
.run__chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
736
|
-
.run__body { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
|
|
737
|
-
.run__step {
|
|
763
|
+
#wfe-root .run__chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
764
|
+
#wfe-root .run__body { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
|
|
765
|
+
#wfe-root .run__step {
|
|
738
766
|
display: flex; gap: 10px;
|
|
739
767
|
padding: 9px 10px;
|
|
740
768
|
background: var(--bg);
|
|
@@ -743,10 +771,10 @@ code, .mono {
|
|
|
743
771
|
font-size: 11.5px;
|
|
744
772
|
position: relative;
|
|
745
773
|
}
|
|
746
|
-
.run__step.is-current { border-color: var(--accent-line); background: var(--accent-soft); }
|
|
747
|
-
.run__step.is-done .run__marker { background: var(--ok); color: var(--bg); border-color: var(--ok); }
|
|
748
|
-
.run__step.is-current .run__marker { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
749
|
-
.run__marker {
|
|
774
|
+
#wfe-root .run__step.is-current { border-color: var(--accent-line); background: var(--accent-soft); }
|
|
775
|
+
#wfe-root .run__step.is-done .run__marker { background: var(--ok); color: var(--bg); border-color: var(--ok); }
|
|
776
|
+
#wfe-root .run__step.is-current .run__marker { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); animation: pulse 1s ease-in-out infinite; }
|
|
777
|
+
#wfe-root .run__marker {
|
|
750
778
|
width: 20px; height: 20px; flex-shrink: 0;
|
|
751
779
|
border-radius: 50%;
|
|
752
780
|
display: grid; place-items: center;
|
|
@@ -754,10 +782,10 @@ code, .mono {
|
|
|
754
782
|
color: var(--muted);
|
|
755
783
|
border: 1.5px solid var(--line);
|
|
756
784
|
}
|
|
757
|
-
.run__step-title { font-weight: 600; font-size: 11.5px; }
|
|
758
|
-
.run__step-body { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.4; }
|
|
759
|
-
.run__step-body code { color: var(--ink-2); }
|
|
760
|
-
.run__foot {
|
|
785
|
+
#wfe-root .run__step-title { font-weight: 600; font-size: 11.5px; }
|
|
786
|
+
#wfe-root .run__step-body { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.4; }
|
|
787
|
+
#wfe-root .run__step-body code { color: var(--ink-2); }
|
|
788
|
+
#wfe-root .run__foot {
|
|
761
789
|
padding: 8px 12px;
|
|
762
790
|
border-top: 1px solid var(--line-soft);
|
|
763
791
|
display: flex; align-items: center; justify-content: space-between;
|
|
@@ -766,14 +794,14 @@ code, .mono {
|
|
|
766
794
|
}
|
|
767
795
|
|
|
768
796
|
/* ---------- Empty state ---------- */
|
|
769
|
-
.cv__empty {
|
|
797
|
+
#wfe-root .cv__empty {
|
|
770
798
|
position: absolute;
|
|
771
799
|
inset: 0;
|
|
772
800
|
display: grid; place-items: center;
|
|
773
801
|
color: var(--muted);
|
|
774
802
|
pointer-events: none;
|
|
775
803
|
}
|
|
776
|
-
.cv__empty-card {
|
|
804
|
+
#wfe-root .cv__empty-card {
|
|
777
805
|
background: var(--surface);
|
|
778
806
|
border: 1px dashed var(--line);
|
|
779
807
|
border-radius: 14px;
|
|
@@ -783,28 +811,28 @@ code, .mono {
|
|
|
783
811
|
max-width: 360px;
|
|
784
812
|
box-shadow: var(--shadow);
|
|
785
813
|
}
|
|
786
|
-
.cv__empty-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 26px; margin: 8px 0 4px; color: var(--ink); letter-spacing: -0.01em; }
|
|
787
|
-
.cv__empty-card p
|
|
814
|
+
#wfe-root .cv__empty-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 26px; margin: 8px 0 4px; color: var(--ink); letter-spacing: -0.01em; }
|
|
815
|
+
#wfe-root .cv__empty-card p { font-size: 12px; line-height: 1.5; margin: 0 0 14px; }
|
|
788
816
|
|
|
789
817
|
/* ============================================================
|
|
790
818
|
INSPECTOR (right)
|
|
791
819
|
============================================================ */
|
|
792
|
-
.insp {
|
|
820
|
+
#wfe-root .insp {
|
|
793
821
|
border-left: 1px solid var(--line);
|
|
794
822
|
background: var(--surface);
|
|
795
823
|
display: flex; flex-direction: column;
|
|
796
824
|
overflow: hidden;
|
|
797
825
|
}
|
|
798
|
-
.insp__head {
|
|
826
|
+
#wfe-root .insp__head {
|
|
799
827
|
padding: 12px 16px 0;
|
|
800
828
|
border-bottom: 1px solid var(--line-soft);
|
|
801
829
|
background: var(--surface);
|
|
802
830
|
}
|
|
803
|
-
.insp__top {
|
|
831
|
+
#wfe-root .insp__top {
|
|
804
832
|
display: flex; align-items: center; gap: 8px;
|
|
805
833
|
padding-bottom: 12px;
|
|
806
834
|
}
|
|
807
|
-
.insp__type-pill {
|
|
835
|
+
#wfe-root .insp__type-pill {
|
|
808
836
|
font: 600 9px "JetBrains Mono", monospace;
|
|
809
837
|
letter-spacing: 0.1em;
|
|
810
838
|
text-transform: uppercase;
|
|
@@ -814,7 +842,7 @@ code, .mono {
|
|
|
814
842
|
color: var(--c, var(--ink-2));
|
|
815
843
|
border: 1px solid oklch(from var(--c, var(--line)) l c h / 0.3);
|
|
816
844
|
}
|
|
817
|
-
.insp__name {
|
|
845
|
+
#wfe-root .insp__name {
|
|
818
846
|
font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
|
|
819
847
|
flex: 1; min-width: 0;
|
|
820
848
|
background: transparent; border: 1px solid transparent;
|
|
@@ -823,12 +851,12 @@ code, .mono {
|
|
|
823
851
|
border-radius: 5px;
|
|
824
852
|
font-family: inherit;
|
|
825
853
|
}
|
|
826
|
-
.insp__name:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
|
|
827
|
-
.insp__tabs {
|
|
854
|
+
#wfe-root .insp__name:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
|
|
855
|
+
#wfe-root .insp__tabs {
|
|
828
856
|
display: flex; gap: 2px;
|
|
829
857
|
margin-top: 6px;
|
|
830
858
|
}
|
|
831
|
-
.insp__tab {
|
|
859
|
+
#wfe-root .insp__tab {
|
|
832
860
|
font: 500 11.5px "Space Grotesk";
|
|
833
861
|
color: var(--muted);
|
|
834
862
|
background: transparent;
|
|
@@ -839,31 +867,31 @@ code, .mono {
|
|
|
839
867
|
display: inline-flex; align-items: center; gap: 6px;
|
|
840
868
|
margin-bottom: -1px;
|
|
841
869
|
}
|
|
842
|
-
.insp__tab:hover { color: var(--ink-2); }
|
|
843
|
-
.insp__tab.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
|
|
844
|
-
.insp__tab .count {
|
|
870
|
+
#wfe-root .insp__tab:hover { color: var(--ink-2); }
|
|
871
|
+
#wfe-root .insp__tab.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
|
|
872
|
+
#wfe-root .insp__tab .count {
|
|
845
873
|
font: 600 9.5px "JetBrains Mono", monospace;
|
|
846
874
|
background: var(--surface-2);
|
|
847
875
|
color: var(--muted);
|
|
848
876
|
padding: 2px 5px;
|
|
849
877
|
border-radius: 10px;
|
|
850
878
|
}
|
|
851
|
-
.insp__tab.is-active .count { background: var(--accent-soft); color: var(--accent); }
|
|
879
|
+
#wfe-root .insp__tab.is-active .count { background: var(--accent-soft); color: var(--accent); }
|
|
852
880
|
|
|
853
|
-
.insp__body { overflow-y: auto; flex: 1; padding-bottom: 24px; }
|
|
854
|
-
.insp__body::-webkit-scrollbar { width: 8px; }
|
|
855
|
-
.insp__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
|
|
881
|
+
#wfe-root .insp__body { overflow-y: auto; flex: 1; padding-bottom: 24px; }
|
|
882
|
+
#wfe-root .insp__body::-webkit-scrollbar { width: 8px; }
|
|
883
|
+
#wfe-root .insp__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
|
|
856
884
|
|
|
857
|
-
.insp__section {
|
|
885
|
+
#wfe-root .insp__section {
|
|
858
886
|
border-bottom: 1px solid var(--line-soft);
|
|
859
887
|
}
|
|
860
|
-
.insp__section-head {
|
|
888
|
+
#wfe-root .insp__section-head {
|
|
861
889
|
display: flex; align-items: center; gap: 8px;
|
|
862
890
|
padding: 14px 16px 8px;
|
|
863
891
|
cursor: pointer;
|
|
864
892
|
user-select: none;
|
|
865
893
|
}
|
|
866
|
-
.insp__section-head h4 {
|
|
894
|
+
#wfe-root .insp__section-head h4 {
|
|
867
895
|
margin: 0;
|
|
868
896
|
font: 600 10.5px "Space Grotesk";
|
|
869
897
|
letter-spacing: 0.1em;
|
|
@@ -871,25 +899,25 @@ code, .mono {
|
|
|
871
899
|
color: var(--muted);
|
|
872
900
|
flex: 1;
|
|
873
901
|
}
|
|
874
|
-
.insp__section-head .chev { color: var(--muted-2); transition: transform .16s; }
|
|
875
|
-
.insp__section.is-collapsed .insp__section-body { display: none; }
|
|
876
|
-
.insp__section.is-collapsed .chev { transform: rotate(-90deg); }
|
|
877
|
-
.insp__section-body {
|
|
902
|
+
#wfe-root .insp__section-head .chev { color: var(--muted-2); transition: transform .16s; }
|
|
903
|
+
#wfe-root .insp__section.is-collapsed .insp__section-body { display: none; }
|
|
904
|
+
#wfe-root .insp__section.is-collapsed .chev { transform: rotate(-90deg); }
|
|
905
|
+
#wfe-root .insp__section-body {
|
|
878
906
|
padding: 4px 16px 16px;
|
|
879
907
|
display: flex; flex-direction: column; gap: 10px;
|
|
880
908
|
}
|
|
881
909
|
|
|
882
910
|
/* ---------- Form fields ---------- */
|
|
883
|
-
.fld { display: flex; flex-direction: column; gap: 5px; }
|
|
884
|
-
.fld__label {
|
|
911
|
+
#wfe-root .fld { display: flex; flex-direction: column; gap: 5px; }
|
|
912
|
+
#wfe-root .fld__label {
|
|
885
913
|
font: 500 11px "Space Grotesk";
|
|
886
914
|
color: var(--muted);
|
|
887
915
|
display: flex; align-items: center; justify-content: space-between;
|
|
888
916
|
}
|
|
889
|
-
.fld__hint { font-size: 10.5px; color: var(--muted-2); }
|
|
890
|
-
.fld__input,
|
|
891
|
-
.fld__select,
|
|
892
|
-
.fld__textarea {
|
|
917
|
+
#wfe-root .fld__hint { font-size: 10.5px; color: var(--muted-2); }
|
|
918
|
+
#wfe-root .fld__input,
|
|
919
|
+
#wfe-root .fld__select,
|
|
920
|
+
#wfe-root .fld__textarea {
|
|
893
921
|
font-family: "Space Grotesk", sans-serif;
|
|
894
922
|
font-size: 12.5px;
|
|
895
923
|
background: var(--bg);
|
|
@@ -900,24 +928,26 @@ code, .mono {
|
|
|
900
928
|
width: 100%;
|
|
901
929
|
transition: border-color .12s, box-shadow .12s;
|
|
902
930
|
}
|
|
903
|
-
.fld.is-mono .fld__input,
|
|
904
|
-
.fld.is-mono .fld__textarea { font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
|
|
905
|
-
.fld__input:focus,
|
|
906
|
-
.fld__select:focus,
|
|
907
|
-
.fld__textarea:focus {
|
|
931
|
+
#wfe-root .fld.is-mono .fld__input,
|
|
932
|
+
#wfe-root .fld.is-mono .fld__textarea { font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
|
|
933
|
+
#wfe-root .fld__input:focus,
|
|
934
|
+
#wfe-root .fld__select:focus,
|
|
935
|
+
#wfe-root .fld__textarea:focus {
|
|
908
936
|
outline: none;
|
|
909
937
|
border-color: var(--accent-line);
|
|
910
938
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
911
939
|
}
|
|
912
|
-
.fld__textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
|
|
913
|
-
.fld__select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
.
|
|
940
|
+
#wfe-root .fld__textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
|
|
941
|
+
#wfe-root .fld__select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
|
|
942
|
+
#wfe-root .fld.is-err .fld__input,
|
|
943
|
+
#wfe-root .fld.is-err .fld__select,
|
|
944
|
+
#wfe-root .fld.is-err .fld__textarea { border-color: var(--err); box-shadow: 0 0 0 3px oklch(from var(--err) l c h / 0.15); }
|
|
945
|
+
#wfe-root .fld__err { font-size: 10.5px; color: var(--err); display: flex; align-items: center; gap: 4px; }
|
|
946
|
+
#wfe-root .fld__ok { font-size: 10.5px; color: var(--ok); display: flex; align-items: center; gap: 4px; }
|
|
917
947
|
|
|
918
948
|
/* ---------- Agent picker (combo) ---------- */
|
|
919
|
-
.combo { position: relative; }
|
|
920
|
-
.combo__btn {
|
|
949
|
+
#wfe-root .combo { position: relative; }
|
|
950
|
+
#wfe-root .combo__btn {
|
|
921
951
|
width: 100%;
|
|
922
952
|
display: flex; align-items: center; gap: 8px;
|
|
923
953
|
background: var(--bg);
|
|
@@ -930,9 +960,9 @@ code, .mono {
|
|
|
930
960
|
color: var(--ink);
|
|
931
961
|
text-align: left;
|
|
932
962
|
}
|
|
933
|
-
.combo__btn:hover { border-color: var(--line); background: var(--node-hi); }
|
|
934
|
-
.combo__btn:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
935
|
-
.combo__avatar {
|
|
963
|
+
#wfe-root .combo__btn:hover { border-color: var(--line); background: var(--node-hi); }
|
|
964
|
+
#wfe-root .combo__btn:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
965
|
+
#wfe-root .combo__avatar {
|
|
936
966
|
width: 22px; height: 22px;
|
|
937
967
|
border-radius: 5px;
|
|
938
968
|
display: grid; place-items: center;
|
|
@@ -941,11 +971,11 @@ code, .mono {
|
|
|
941
971
|
color: oklch(0.25 0.04 265);
|
|
942
972
|
flex-shrink: 0;
|
|
943
973
|
}
|
|
944
|
-
.combo__main { min-width: 0; flex: 1; }
|
|
945
|
-
.combo__name { font-weight: 500; font-size: 12px; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
946
|
-
.combo__id { font: 10.5px "JetBrains Mono", monospace; color: var(--muted); }
|
|
947
|
-
.combo__chev { color: var(--muted); }
|
|
948
|
-
.combo__menu {
|
|
974
|
+
#wfe-root .combo__main { min-width: 0; flex: 1; }
|
|
975
|
+
#wfe-root .combo__name { font-weight: 500; font-size: 12px; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
976
|
+
#wfe-root .combo__id { font: 10.5px "JetBrains Mono", monospace; color: var(--muted); }
|
|
977
|
+
#wfe-root .combo__chev { color: var(--muted); }
|
|
978
|
+
#wfe-root .combo__menu {
|
|
949
979
|
position: absolute;
|
|
950
980
|
top: calc(100% + 4px);
|
|
951
981
|
left: 0; right: 0;
|
|
@@ -958,11 +988,11 @@ code, .mono {
|
|
|
958
988
|
overflow: hidden;
|
|
959
989
|
display: flex; flex-direction: column;
|
|
960
990
|
}
|
|
961
|
-
.combo__menu-search {
|
|
991
|
+
#wfe-root .combo__menu-search {
|
|
962
992
|
padding: 8px;
|
|
963
993
|
border-bottom: 1px solid var(--line-soft);
|
|
964
994
|
}
|
|
965
|
-
.combo__menu-search input {
|
|
995
|
+
#wfe-root .combo__menu-search input {
|
|
966
996
|
width: 100%;
|
|
967
997
|
background: var(--bg);
|
|
968
998
|
border: 1px solid var(--line);
|
|
@@ -971,19 +1001,20 @@ code, .mono {
|
|
|
971
1001
|
font: 12px "Space Grotesk";
|
|
972
1002
|
color: var(--ink);
|
|
973
1003
|
}
|
|
974
|
-
.combo__menu-search input:focus { outline: none; border-color: var(--accent-line); }
|
|
975
|
-
.combo__menu-list { overflow-y: auto; padding: 4px; flex: 1; }
|
|
976
|
-
.combo__opt {
|
|
1004
|
+
#wfe-root .combo__menu-search input:focus { outline: none; border-color: var(--accent-line); }
|
|
1005
|
+
#wfe-root .combo__menu-list { overflow-y: auto; padding: 4px; flex: 1; }
|
|
1006
|
+
#wfe-root .combo__opt {
|
|
977
1007
|
display: flex; align-items: center; gap: 10px;
|
|
978
1008
|
padding: 6px 8px;
|
|
979
1009
|
border-radius: 5px;
|
|
980
1010
|
cursor: pointer;
|
|
981
1011
|
}
|
|
982
|
-
.combo__opt:hover,
|
|
983
|
-
.combo__opt-
|
|
984
|
-
.combo__opt-
|
|
985
|
-
.combo__opt-
|
|
986
|
-
.combo__opt-
|
|
1012
|
+
#wfe-root .combo__opt:hover,
|
|
1013
|
+
#wfe-root .combo__opt.is-active { background: var(--accent-soft); }
|
|
1014
|
+
#wfe-root .combo__opt-name { font-weight: 500; font-size: 12px; letter-spacing: -0.005em; }
|
|
1015
|
+
#wfe-root .combo__opt-id { font: 10.5px "JetBrains Mono", monospace; color: var(--muted); }
|
|
1016
|
+
#wfe-root .combo__opt-tags { display: flex; gap: 3px; margin-left: auto; }
|
|
1017
|
+
#wfe-root .combo__opt-tag {
|
|
987
1018
|
font: 500 9.5px "JetBrains Mono", monospace;
|
|
988
1019
|
padding: 1px 5px;
|
|
989
1020
|
border-radius: 3px;
|
|
@@ -993,10 +1024,10 @@ code, .mono {
|
|
|
993
1024
|
}
|
|
994
1025
|
|
|
995
1026
|
/* ---------- Expression editor ---------- */
|
|
996
|
-
.expr {
|
|
1027
|
+
#wfe-root .expr {
|
|
997
1028
|
position: relative;
|
|
998
1029
|
}
|
|
999
|
-
.expr__box {
|
|
1030
|
+
#wfe-root .expr__box {
|
|
1000
1031
|
font-family: "JetBrains Mono", monospace;
|
|
1001
1032
|
font-size: 11.5px;
|
|
1002
1033
|
line-height: 1.55;
|
|
@@ -1009,20 +1040,20 @@ code, .mono {
|
|
|
1009
1040
|
resize: vertical;
|
|
1010
1041
|
width: 100%;
|
|
1011
1042
|
}
|
|
1012
|
-
.expr__box:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
1013
|
-
.expr__hint {
|
|
1043
|
+
#wfe-root .expr__box:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
1044
|
+
#wfe-root .expr__hint {
|
|
1014
1045
|
font: 500 10.5px "Space Grotesk";
|
|
1015
1046
|
color: var(--muted);
|
|
1016
1047
|
display: flex; gap: 4px; align-items: center; margin-top: 2px;
|
|
1017
1048
|
}
|
|
1018
|
-
.expr__hint code {
|
|
1049
|
+
#wfe-root .expr__hint code {
|
|
1019
1050
|
background: var(--surface-2);
|
|
1020
1051
|
padding: 1px 5px;
|
|
1021
1052
|
border-radius: 3px;
|
|
1022
1053
|
color: var(--accent);
|
|
1023
1054
|
border: 1px solid var(--line-soft);
|
|
1024
1055
|
}
|
|
1025
|
-
.expr__popover {
|
|
1056
|
+
#wfe-root .expr__popover {
|
|
1026
1057
|
position: absolute;
|
|
1027
1058
|
left: 0; top: calc(100% + 4px);
|
|
1028
1059
|
background: var(--surface);
|
|
@@ -1035,23 +1066,24 @@ code, .mono {
|
|
|
1035
1066
|
z-index: 30;
|
|
1036
1067
|
box-shadow: var(--shadow);
|
|
1037
1068
|
}
|
|
1038
|
-
.expr__pop-group {
|
|
1069
|
+
#wfe-root .expr__pop-group {
|
|
1039
1070
|
font: 600 9.5px "JetBrains Mono", monospace;
|
|
1040
1071
|
letter-spacing: 0.08em;
|
|
1041
1072
|
text-transform: uppercase;
|
|
1042
1073
|
color: var(--muted);
|
|
1043
1074
|
padding: 8px 8px 4px;
|
|
1044
1075
|
}
|
|
1045
|
-
.expr__pop-opt {
|
|
1076
|
+
#wfe-root .expr__pop-opt {
|
|
1046
1077
|
display: flex; gap: 10px; align-items: center;
|
|
1047
1078
|
padding: 5px 8px;
|
|
1048
1079
|
border-radius: 5px;
|
|
1049
1080
|
cursor: pointer;
|
|
1050
1081
|
font: 11.5px "JetBrains Mono", monospace;
|
|
1051
1082
|
}
|
|
1052
|
-
.expr__pop-opt:hover,
|
|
1053
|
-
.expr__pop-opt
|
|
1054
|
-
.expr__pop-opt
|
|
1083
|
+
#wfe-root .expr__pop-opt:hover,
|
|
1084
|
+
#wfe-root .expr__pop-opt.is-active { background: var(--accent-soft); }
|
|
1085
|
+
#wfe-root .expr__pop-opt b { color: var(--accent); font-weight: 600; }
|
|
1086
|
+
#wfe-root .expr__pop-opt .typ {
|
|
1055
1087
|
margin-left: auto;
|
|
1056
1088
|
font: 500 9.5px "Space Grotesk";
|
|
1057
1089
|
color: var(--muted);
|
|
@@ -1062,27 +1094,27 @@ code, .mono {
|
|
|
1062
1094
|
}
|
|
1063
1095
|
|
|
1064
1096
|
/* ---------- Cards inside inspector ---------- */
|
|
1065
|
-
.card {
|
|
1097
|
+
#wfe-root .card {
|
|
1066
1098
|
background: var(--bg);
|
|
1067
1099
|
border: 1px solid var(--line);
|
|
1068
1100
|
border-radius: 8px;
|
|
1069
1101
|
padding: 10px;
|
|
1070
1102
|
display: flex; flex-direction: column; gap: 8px;
|
|
1071
1103
|
}
|
|
1072
|
-
.card__head {
|
|
1104
|
+
#wfe-root .card__head {
|
|
1073
1105
|
display: flex; align-items: center; gap: 8px;
|
|
1074
1106
|
justify-content: space-between;
|
|
1075
1107
|
}
|
|
1076
|
-
.card__title {
|
|
1108
|
+
#wfe-root .card__title {
|
|
1077
1109
|
display: flex; align-items: center; gap: 6px;
|
|
1078
1110
|
font-weight: 600; font-size: 11.5px; letter-spacing: -0.005em;
|
|
1079
1111
|
}
|
|
1080
|
-
.card__del {
|
|
1112
|
+
#wfe-root .card__del {
|
|
1081
1113
|
background: transparent; border: 0; padding: 3px;
|
|
1082
1114
|
border-radius: 4px; color: var(--muted); cursor: pointer;
|
|
1083
1115
|
}
|
|
1084
|
-
.card__del:hover { color: var(--err); background: oklch(from var(--err) l c h / 0.12); }
|
|
1085
|
-
.card__kind {
|
|
1116
|
+
#wfe-root .card__del:hover { color: var(--err); background: oklch(from var(--err) l c h / 0.12); }
|
|
1117
|
+
#wfe-root .card__kind {
|
|
1086
1118
|
font: 600 9.5px "JetBrains Mono", monospace;
|
|
1087
1119
|
letter-spacing: 0.08em;
|
|
1088
1120
|
text-transform: uppercase;
|
|
@@ -1092,7 +1124,7 @@ code, .mono {
|
|
|
1092
1124
|
color: var(--muted);
|
|
1093
1125
|
border: 1px solid var(--line-soft);
|
|
1094
1126
|
}
|
|
1095
|
-
.card__add {
|
|
1127
|
+
#wfe-root .card__add {
|
|
1096
1128
|
background: transparent;
|
|
1097
1129
|
border: 1px dashed var(--line);
|
|
1098
1130
|
border-radius: 6px;
|
|
@@ -1103,38 +1135,38 @@ code, .mono {
|
|
|
1103
1135
|
cursor: pointer;
|
|
1104
1136
|
display: flex; align-items: center; justify-content: center; gap: 6px;
|
|
1105
1137
|
}
|
|
1106
|
-
.card__add:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
|
|
1138
|
+
#wfe-root .card__add:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
|
|
1107
1139
|
|
|
1108
1140
|
/* ---------- Empty inspector state ---------- */
|
|
1109
|
-
.insp__empty {
|
|
1141
|
+
#wfe-root .insp__empty {
|
|
1110
1142
|
padding: 40px 24px;
|
|
1111
1143
|
text-align: center;
|
|
1112
1144
|
color: var(--muted);
|
|
1113
1145
|
}
|
|
1114
|
-
.insp__empty h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 24px; margin: 4px 0 2px; color: var(--ink); letter-spacing: -0.005em; }
|
|
1115
|
-
.insp__empty p { font-size: 12px; line-height: 1.5; margin: 0; }
|
|
1116
|
-
.insp__empty-shortcuts { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; font-size: 11.5px; color: var(--ink-2); text-align: left; }
|
|
1117
|
-
.insp__empty-shortcuts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
|
|
1118
|
-
.insp__empty-shortcuts div:last-child { border: 0; }
|
|
1119
|
-
.insp__empty-shortcuts div > span:first-child { flex: 1; min-width: 0; text-align: left; white-space: nowrap; color: var(--ink-2); }
|
|
1120
|
-
.insp__empty-shortcuts div > *:not(:first-child) { flex-shrink: 0; display: inline-flex; gap: 4px; }
|
|
1146
|
+
#wfe-root .insp__empty h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 24px; margin: 4px 0 2px; color: var(--ink); letter-spacing: -0.005em; }
|
|
1147
|
+
#wfe-root .insp__empty p { font-size: 12px; line-height: 1.5; margin: 0; }
|
|
1148
|
+
#wfe-root .insp__empty-shortcuts { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; font-size: 11.5px; color: var(--ink-2); text-align: left; }
|
|
1149
|
+
#wfe-root .insp__empty-shortcuts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
|
|
1150
|
+
#wfe-root .insp__empty-shortcuts div:last-child { border: 0; }
|
|
1151
|
+
#wfe-root .insp__empty-shortcuts div > span:first-child { flex: 1; min-width: 0; text-align: left; white-space: nowrap; color: var(--ink-2); }
|
|
1152
|
+
#wfe-root .insp__empty-shortcuts div > *:not(:first-child) { flex-shrink: 0; display: inline-flex; gap: 4px; }
|
|
1121
1153
|
|
|
1122
1154
|
/* ---------- Delete-workflow zone (in WorkflowPane) ---------- */
|
|
1123
|
-
.insp__danger {
|
|
1155
|
+
#wfe-root .insp__danger {
|
|
1124
1156
|
display: flex;
|
|
1125
1157
|
justify-content: center;
|
|
1126
1158
|
padding: 18px 16px 24px;
|
|
1127
1159
|
margin-top: 6px;
|
|
1128
1160
|
border-top: 1px solid var(--line-soft);
|
|
1129
1161
|
}
|
|
1130
|
-
.insp__delete-wf {
|
|
1162
|
+
#wfe-root .insp__delete-wf {
|
|
1131
1163
|
height: 30px;
|
|
1132
1164
|
padding: 0 14px;
|
|
1133
1165
|
font-size: 11.5px;
|
|
1134
1166
|
color: var(--err);
|
|
1135
1167
|
border-color: color-mix(in oklch, var(--err) 35%, var(--line));
|
|
1136
1168
|
}
|
|
1137
|
-
.insp__delete-wf:hover {
|
|
1169
|
+
#wfe-root .insp__delete-wf:hover {
|
|
1138
1170
|
background: color-mix(in oklch, var(--err) 10%, transparent);
|
|
1139
1171
|
border-color: color-mix(in oklch, var(--err) 55%, var(--line));
|
|
1140
1172
|
}
|
|
@@ -1142,7 +1174,7 @@ code, .mono {
|
|
|
1142
1174
|
/* ============================================================
|
|
1143
1175
|
Tweaks panel
|
|
1144
1176
|
============================================================ */
|
|
1145
|
-
.tweaks {
|
|
1177
|
+
#wfe-root .tweaks {
|
|
1146
1178
|
position: fixed;
|
|
1147
1179
|
right: 396px;
|
|
1148
1180
|
bottom: 16px;
|
|
@@ -1155,18 +1187,18 @@ code, .mono {
|
|
|
1155
1187
|
font-size: 12px;
|
|
1156
1188
|
overflow: hidden;
|
|
1157
1189
|
}
|
|
1158
|
-
.tweaks__head {
|
|
1190
|
+
#wfe-root .tweaks__head {
|
|
1159
1191
|
padding: 10px 12px;
|
|
1160
1192
|
border-bottom: 1px solid var(--line-soft);
|
|
1161
1193
|
font: 600 10.5px "Space Grotesk"; letter-spacing: 0.1em; text-transform: uppercase;
|
|
1162
1194
|
color: var(--muted);
|
|
1163
1195
|
display: flex; justify-content: space-between; align-items: center;
|
|
1164
1196
|
}
|
|
1165
|
-
.tweaks__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
|
|
1166
|
-
.tweaks__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11.5px; }
|
|
1167
|
-
.tweaks__row label { color: var(--muted); }
|
|
1168
|
-
.tweaks__opts { display: flex; gap: 4px; }
|
|
1169
|
-
.tweaks__opts button {
|
|
1197
|
+
#wfe-root .tweaks__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
|
|
1198
|
+
#wfe-root .tweaks__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11.5px; }
|
|
1199
|
+
#wfe-root .tweaks__row label { color: var(--muted); }
|
|
1200
|
+
#wfe-root .tweaks__opts { display: flex; gap: 4px; }
|
|
1201
|
+
#wfe-root .tweaks__opts button {
|
|
1170
1202
|
font: 500 11px "Space Grotesk";
|
|
1171
1203
|
background: transparent;
|
|
1172
1204
|
border: 1px solid var(--line);
|
|
@@ -1175,30 +1207,30 @@ code, .mono {
|
|
|
1175
1207
|
cursor: pointer;
|
|
1176
1208
|
color: var(--ink-2);
|
|
1177
1209
|
}
|
|
1178
|
-
.tweaks__opts button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
|
|
1179
|
-
.tweaks__hue {
|
|
1210
|
+
#wfe-root .tweaks__opts button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
|
|
1211
|
+
#wfe-root .tweaks__hue {
|
|
1180
1212
|
display: flex; gap: 6px; flex-wrap: wrap;
|
|
1181
1213
|
}
|
|
1182
|
-
.tweaks__hue button {
|
|
1214
|
+
#wfe-root .tweaks__hue button {
|
|
1183
1215
|
width: 22px; height: 22px;
|
|
1184
1216
|
border-radius: 50%;
|
|
1185
1217
|
border: 2px solid transparent;
|
|
1186
1218
|
cursor: pointer;
|
|
1187
1219
|
padding: 0;
|
|
1188
1220
|
}
|
|
1189
|
-
.tweaks__hue button.on { border-color: var(--ink); }
|
|
1221
|
+
#wfe-root .tweaks__hue button.on { border-color: var(--ink); }
|
|
1190
1222
|
|
|
1191
1223
|
/* ============================================================
|
|
1192
1224
|
Keyboard overlay
|
|
1193
1225
|
============================================================ */
|
|
1194
|
-
.kbd-overlay {
|
|
1226
|
+
#wfe-root .kbd-overlay {
|
|
1195
1227
|
position: fixed; inset: 0;
|
|
1196
1228
|
background: oklch(0 0 0 / 0.5);
|
|
1197
1229
|
z-index: 200;
|
|
1198
1230
|
display: grid; place-items: center;
|
|
1199
1231
|
backdrop-filter: blur(4px);
|
|
1200
1232
|
}
|
|
1201
|
-
.kbd-card {
|
|
1233
|
+
#wfe-root .kbd-card {
|
|
1202
1234
|
background: var(--surface);
|
|
1203
1235
|
border: 1px solid var(--line);
|
|
1204
1236
|
border-radius: 14px;
|
|
@@ -1206,15 +1238,15 @@ code, .mono {
|
|
|
1206
1238
|
width: 520px;
|
|
1207
1239
|
box-shadow: var(--shadow);
|
|
1208
1240
|
}
|
|
1209
|
-
.kbd-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; margin: 0 0 16px; letter-spacing: -0.01em; }
|
|
1210
|
-
.kbd-card .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
|
|
1211
|
-
.kbd-card .row:last-child { border: 0; }
|
|
1212
|
-
.kbd-card .row span:first-child { color: var(--ink-2); }
|
|
1241
|
+
#wfe-root .kbd-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; margin: 0 0 16px; letter-spacing: -0.01em; }
|
|
1242
|
+
#wfe-root .kbd-card .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
|
|
1243
|
+
#wfe-root .kbd-card .row:last-child { border: 0; }
|
|
1244
|
+
#wfe-root .kbd-card .row span:first-child { color: var(--ink-2); }
|
|
1213
1245
|
|
|
1214
1246
|
/* ============================================================
|
|
1215
1247
|
Toast
|
|
1216
1248
|
============================================================ */
|
|
1217
|
-
.toast {
|
|
1249
|
+
#wfe-root .toast {
|
|
1218
1250
|
position: fixed;
|
|
1219
1251
|
bottom: 20px; left: 50%;
|
|
1220
1252
|
transform: translateX(-50%);
|
|
@@ -1227,18 +1259,18 @@ code, .mono {
|
|
|
1227
1259
|
box-shadow: var(--shadow);
|
|
1228
1260
|
display: inline-flex; align-items: center; gap: 8px;
|
|
1229
1261
|
}
|
|
1230
|
-
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
|
|
1231
|
-
.toast.err .dot { background: var(--err); }
|
|
1262
|
+
#wfe-root .toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
|
|
1263
|
+
#wfe-root .toast.err .dot { background: var(--err); }
|
|
1232
1264
|
|
|
1233
1265
|
/* ============================================================
|
|
1234
1266
|
Connecting-edge ghost
|
|
1235
1267
|
============================================================ */
|
|
1236
|
-
.cv__ghost-edge {
|
|
1268
|
+
#wfe-root .cv__ghost-edge {
|
|
1237
1269
|
position: absolute; inset: 0;
|
|
1238
1270
|
pointer-events: none;
|
|
1239
1271
|
z-index: 8;
|
|
1240
1272
|
}
|
|
1241
|
-
.cv__ghost-edge path {
|
|
1273
|
+
#wfe-root .cv__ghost-edge path {
|
|
1242
1274
|
fill: none;
|
|
1243
1275
|
stroke: var(--accent);
|
|
1244
1276
|
stroke-width: 2;
|
|
@@ -1247,50 +1279,50 @@ code, .mono {
|
|
|
1247
1279
|
}
|
|
1248
1280
|
|
|
1249
1281
|
/* Utilities */
|
|
1250
|
-
.hstack { display: flex; gap: 8px; align-items: center; }
|
|
1251
|
-
.vstack { display: flex; flex-direction: column; gap: 8px; }
|
|
1252
|
-
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
|
|
1282
|
+
#wfe-root .hstack { display: flex; gap: 8px; align-items: center; }
|
|
1283
|
+
#wfe-root .vstack { display: flex; flex-direction: column; gap: 8px; }
|
|
1284
|
+
#wfe-root .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
|
|
1253
1285
|
|
|
1254
1286
|
/* KeyValueEditor \u2014 friendly object editor (replaces JSON textareas
|
|
1255
1287
|
* for headers, inputs, payloads, match filters, output maps). */
|
|
1256
|
-
.kv-editor { display: flex; flex-direction: column; gap: 6px; }
|
|
1257
|
-
.kv-editor__empty {
|
|
1288
|
+
#wfe-root .kv-editor { display: flex; flex-direction: column; gap: 6px; }
|
|
1289
|
+
#wfe-root .kv-editor__empty {
|
|
1258
1290
|
font-size: 11px; color: var(--muted);
|
|
1259
1291
|
padding: 6px 4px;
|
|
1260
1292
|
}
|
|
1261
|
-
.kv-editor__row {
|
|
1293
|
+
#wfe-root .kv-editor__row {
|
|
1262
1294
|
display: grid;
|
|
1263
1295
|
grid-template-columns: minmax(110px, 1.4fr) auto minmax(150px, 2.4fr) auto;
|
|
1264
1296
|
gap: 6px;
|
|
1265
1297
|
align-items: start;
|
|
1266
1298
|
}
|
|
1267
|
-
.kv-editor__key { min-width: 0; }
|
|
1268
|
-
.kv-editor__type {
|
|
1299
|
+
#wfe-root .kv-editor__key { min-width: 0; }
|
|
1300
|
+
#wfe-root .kv-editor__type {
|
|
1269
1301
|
font-size: 11px; padding: 4px 6px;
|
|
1270
1302
|
background: var(--surface); color: var(--ink);
|
|
1271
1303
|
border: 1px solid var(--line); border-radius: 4px;
|
|
1272
1304
|
}
|
|
1273
|
-
.kv-editor__val { min-width: 0; }
|
|
1274
|
-
.kv-editor__val > * { width: 100%; }
|
|
1275
|
-
.kv-editor__json { resize: vertical; min-height: 28px; }
|
|
1276
|
-
.kv-editor__remove {
|
|
1305
|
+
#wfe-root .kv-editor__val { min-width: 0; }
|
|
1306
|
+
#wfe-root .kv-editor__val > * { width: 100%; }
|
|
1307
|
+
#wfe-root .kv-editor__json { resize: vertical; min-height: 28px; }
|
|
1308
|
+
#wfe-root .kv-editor__remove {
|
|
1277
1309
|
background: transparent; border: 1px solid transparent;
|
|
1278
1310
|
color: var(--muted); padding: 4px 8px;
|
|
1279
1311
|
border-radius: 4px; cursor: pointer; font-size: 14px;
|
|
1280
1312
|
align-self: start;
|
|
1281
1313
|
}
|
|
1282
|
-
.kv-editor__remove:hover {
|
|
1314
|
+
#wfe-root .kv-editor__remove:hover {
|
|
1283
1315
|
color: var(--err);
|
|
1284
1316
|
border-color: var(--err);
|
|
1285
1317
|
}
|
|
1286
|
-
.kv-editor__add {
|
|
1318
|
+
#wfe-root .kv-editor__add {
|
|
1287
1319
|
align-self: flex-start;
|
|
1288
1320
|
background: transparent; color: var(--accent);
|
|
1289
1321
|
border: 1px dashed var(--accent); border-radius: 4px;
|
|
1290
1322
|
padding: 4px 10px; cursor: pointer; font-size: 12px;
|
|
1291
1323
|
margin-top: 2px;
|
|
1292
1324
|
}
|
|
1293
|
-
.kv-editor__add:hover { background: var(--surface); }
|
|
1325
|
+
#wfe-root .kv-editor__add:hover { background: var(--surface); }
|
|
1294
1326
|
|
|
1295
1327
|
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1296
1328
|
AgentX design system bridge.
|
|
@@ -1304,7 +1336,8 @@ code, .mono {
|
|
|
1304
1336
|
Specificity has to beat :root[data-theme="dark"] and ...="light" above,
|
|
1305
1337
|
hence the doubled attribute selector.
|
|
1306
1338
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
1307
|
-
|
|
1339
|
+
#wfe-root,
|
|
1340
|
+
:root[data-theme][data-theme] #wfe-root {
|
|
1308
1341
|
--bg: var(--ax-bg);
|
|
1309
1342
|
--bg-deep: var(--ax-bg-elev);
|
|
1310
1343
|
--surface: var(--ax-surface);
|
|
@@ -1334,14 +1367,110 @@ code, .mono {
|
|
|
1334
1367
|
|
|
1335
1368
|
/* The dashboard's type stack, so the canvas is not the one surface in the
|
|
1336
1369
|
product using a different face. */
|
|
1337
|
-
#wfe-root,
|
|
1370
|
+
#wfe-root,
|
|
1371
|
+
#wfe-root button,
|
|
1372
|
+
#wfe-root input,
|
|
1373
|
+
#wfe-root select,
|
|
1374
|
+
#wfe-root textarea {
|
|
1338
1375
|
font-family: var(--ax-font);
|
|
1339
1376
|
}
|
|
1340
|
-
#wfe-root code,
|
|
1341
|
-
`;var Pp=oe(tp(),1);var O=oe(Nt(),1);var Be=oe(Nt(),1);var v=oe(Ce(),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}),A={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 ls=[{section:"What starts it",items:[{id:"trigger.channel.whatsapp",type:"trigger.channel",label:"A WhatsApp message",hint:"Someone messages you on WhatsApp",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.telegram",type:"trigger.channel",label:"A Telegram message",hint:"Someone messages you on Telegram",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.gitlab",type:"trigger.channel",label:"Something on GitLab",hint:"An issue, merge request or pipeline changes",glyph:"g-trigger",icon:"gitlab"},{id:"trigger.hook.n8n",type:"trigger.hook",label:"n8n hands work over",hint:"n8n calls this workflow \u2014 it keeps the connectors, you keep the agents",glyph:"g-trigger",icon:"hook"},{id:"trigger.hook",type:"trigger.hook",label:"Something calls in",hint:"Any service that can POST a webhook",glyph:"g-trigger",icon:"hook"},{id:"trigger.cron",type:"trigger.cron",label:"A time of day",hint:"Runs on a schedule you set",glyph:"g-trigger",icon:"clock"},{id:"trigger.poll",type:"trigger.poll",label:"Something new shows up",hint:"Checks a command every so often; runs once per new item",glyph:"g-trigger",icon:"clock"},{id:"trigger.manual",type:"trigger.manual",label:"You start it",hint:"Only runs when you press run",glyph:"g-trigger",icon:"play"},{id:"trigger.form",type:"trigger.form",label:"Someone fills a form",hint:"A person submits a form to begin",glyph:"g-trigger",icon:"plus"}]},{section:"Put an agent on it",items:[{id:"node.agent",type:"agent",label:"Ask an agent",hint:"Give an agent the job, in your own words",glyph:"g-state",icon:"box"},{id:"node.transform",type:"transform",label:"Reshape the data",hint:"Build a value out of earlier steps",glyph:"g-state",icon:"variable"}]},{section:"Bring in a person",items:[{id:"node.userTask",type:"userTask",label:"Ask a person",hint:"Send someone a form and wait for their answer",glyph:"g-state",icon:"box"},{id:"node.checkpoint",type:"checkpoint",label:"Wait for approval",hint:"Hold here until someone says go",glyph:"g-branch",icon:"flag"},{id:"node.timer.boundary",type:"timer.boundary",label:"Wait a while",hint:"Pause for an hour, a day, however long",glyph:"g-branch",icon:"clock"},{id:"node.owner.notify",type:"owner.notify",label:"Tell me",hint:"Send yourself a note through your notifications",glyph:"g-action",icon:"msg"},{id:"node.owner.ask",type:"owner.ask",label:"Ask me to decide",hint:"A decision card; goes on with yes, no or no answer",glyph:"g-branch",icon:"flag"},{id:"node.person.message",type:"person.message",label:"Message someone",hint:"Write to an employee or a client, once you approve the text",glyph:"g-action",icon:"msg"},{id:"node.person.wait",type:"person.wait",label:"Wait for their reply",hint:"Hold until they answer or send a file, with a deadline and reminders",glyph:"g-branch",icon:"clock"}]},{section:"Decide what happens next",items:[{id:"node.classify",type:"classify",label:"Sort it into buckets",hint:"Pick one of your labels \u2014 and take the \u201Cnot sure\u201D path when it cannot tell",glyph:"g-branch",icon:"branch"},{id:"node.branch",type:"branch",label:"If this, then that",hint:"Send the run down one path or another",glyph:"g-branch",icon:"branch"},{id:"node.rule",type:"rule",label:"A table of rules",hint:"Several conditions at once; first match wins",glyph:"g-branch",icon:"branch"},{id:"node.gateway.parallel",type:"gateway.parallel",label:"Do several at once",hint:"Split into parallel paths, then join them",glyph:"g-branch",icon:"branch"},{id:"node.end",type:"end",label:"Finish",hint:"The run ends here",glyph:"g-end",icon:"stop"}]},{section:"Do something",items:[{id:"action.send",type:"action.send",label:"Send a message",hint:"Post to WhatsApp, Telegram, GitLab \u2014 anywhere you have a channel",glyph:"g-action",icon:"msg"},{id:"action.createIssue",type:"action.createIssue",label:"Open an issue",hint:"Create a new GitLab issue",glyph:"g-action",icon:"plus"},{id:"action.setLabel",type:"action.setLabel",label:"Change a label",hint:"Add or remove labels",glyph:"g-action",icon:"tag"},{id:"action.react",type:"action.react",label:"React to a message",hint:"Add an emoji reaction",glyph:"g-action",icon:"msg"},{id:"action.editMessage",type:"action.editMessage",label:"Edit a message",hint:"Change a message you already sent",glyph:"g-action",icon:"msg"},{id:"action.readLabel",type:"action.readLabel",label:"Read a label",hint:"Look at the labels on an issue before deciding",glyph:"g-action",icon:"tag"},{id:"action.callHTTP",type:"action.callHTTP",label:"Call a web address",hint:"Hand work to n8n, or any service with a URL",glyph:"g-action",icon:"globe"},{id:"action.builtin",type:"action.builtin",label:"Use a built-in step",hint:"Fetch a page, extract fields, and other bundled helpers",glyph:"g-action",icon:"lightning"},{id:"action.run",type:"action.run",label:"Run a saved action",hint:"Invoke something from your action registry",glyph:"g-action",icon:"lightning"},{id:"action.logTime",type:"action.logTime",label:"Log time spent",hint:"Record how long this took",glyph:"g-action",icon:"clock"}]},{section:"Talk to other workflows",items:[{id:"node.subProcess",type:"subProcess",label:"Run another workflow",hint:"Call one, and carry on when it finishes",glyph:"g-state",icon:"box"},{id:"node.signal.emit",type:"signal.emit",label:"Tell other workflows",hint:"Announce that something happened",glyph:"g-action",icon:"msg"},{id:"node.signal.wait",type:"signal.wait",label:"Wait to be told",hint:"Hold until another workflow announces it",glyph:"g-branch",icon:"flag"}]}],ss=[{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.)"}]}],us=[{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}],ip=[{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}];function ap(e){for(let t of ls){let n=t.items.find(r=>r.type===e);if(n)return n.label}return e}function lp(e,t){let n=o=>typeof t[o]=="string"?t[o].trim():"",r=(o,i=70)=>o.length>i?o.slice(0,i-1)+"\u2026":o;switch(e){case"trigger.channel":return n("source")?`when ${n("source")} has activity`:"";case"trigger.cron":return n("schedule")?`at ${n("schedule")}`:"";case"trigger.hook":return n("event")==="on:n8n"?"when n8n calls":n("event")?`on ${n("event")}`:"";case"trigger.poll":return n("actionId")?`new items from ${n("actionId")}`:"";case"trigger.form":return n("formId")?`form: ${n("formId")}`:"";case"agent":{let o=n("agentId")||n("agent"),i=n("prompt")||n("message");return[o&&`ask ${o}`,i&&r(i)].filter(Boolean).join(" \u2014 ")}case"action.send":return r(n("text")||n("body"))||n("channel")&&`to ${n("channel")}`;case"action.callHTTP":return r(n("url"));case"action.builtin":return n("name");case"action.run":return n("action")||n("name");case"action.createIssue":return r(n("title"));case"action.setLabel":return n("label")?`label: ${n("label")}`:"";case"subProcess":return n("workflowId")?`runs ${n("workflowId")}`:"";case"signal.emit":case"signal.wait":return n("signal")?`signal: ${n("signal")}`:"";case"timer.boundary":return n("duration")?`waits ${n("duration")}`:"";case"userTask":return n("assignTo")?`asks ${n("assignTo")}`:"";case"owner.notify":return r(n("text"));case"owner.ask":return r(n("ask"));case"person.message":return[n("to")&&`to ${n("to")}`,r(n("text"))].filter(Boolean).join(" \u2014 ");case"person.wait":return n("timeout")?`waits up to ${n("timeout")}`:"";case"branch":{let o=Array.isArray(t.cases)?t.cases.length:0;return o?`${o} way${o===1?"":"s"} out`:""}default:return""}}var F=oe(Ce(),1),ch={trigger:220,state:240,branch:260,action:220,end:160,agent:240,checkpoint:220,transform:220},dh={trigger:46,state:118,branch:110,action:78,end:46,agent:118,checkpoint:92,transform:78};function up(e){return e.startsWith("trigger.")?"trigger":e.startsWith("action.")?"action":e}function nr(e){let t=up(e.type);return{w:ch[t]??220,h:dh[t]??100}}function rr(e){return e.position?.x??0}function or(e){return e.position?.y??0}function Ii(e,t){let{w:n,h:r}=nr(e),o=rr(e),i=or(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 sp(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 ph(e){let{n:t,selected:n,state:r}=e,{w:o}=nr(t),i=up(t.type),a=lp(t.type,t.config??{}),u=t.config,s=i==="trigger"?u.source==="cron"?"clock":u.source==="webhook"||u.source==="hook"?"hook":u.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",c=A[s]??A.box,d=["node",`t-${i}`,n&&"is-selected",r==="running"&&"is-running",r==="visited"&&"is-visited",r==="error"&&"is-error"].filter(Boolean).join(" "),p={left:rr(t),top:or(t),width:o},m=u.agentId,y=u.prompt;return(0,F.jsxs)("div",{className:d,style:p,onMouseDown:w=>e.onMouseDown?.(w,t),onClick:w=>e.onClick?.(w,t),onDoubleClick:w=>e.onDoubleClick?.(w,t),children:[(0,F.jsx)("div",{className:"node__stripe"}),(0,F.jsxs)("div",{className:"node__head",children:[(0,F.jsx)("div",{className:"node__icon",children:(0,F.jsx)(c,{})}),(0,F.jsxs)("div",{className:"node__meta",children:[(0,F.jsx)("div",{className:"node__kind",children:ap(t.type)}),(0,F.jsx)("div",{className:"node__name",children:t.id})]}),i!=="trigger"&&i!=="end"&&(0,F.jsx)("div",{className:"node__chev",children:(0,F.jsx)(A.more,{})})]}),a&&(0,F.jsx)("div",{className:"node__body",children:(0,F.jsx)("div",{className:"node__row node__row--summary",children:a})}),i!=="trigger"&&(0,F.jsx)("div",{className:"handle h-in",onMouseDown:w=>e.onPortDown?.(w,t,"in"),onMouseEnter:()=>e.onPortEnter?.(t,"in"),onMouseLeave:()=>e.onPortLeave?.()}),i==="branch"?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"handle h-true",onMouseDown:w=>e.onPortDown?.(w,t,"true"),onMouseEnter:()=>e.onPortEnter?.(t,"true"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,F.jsx)("span",{className:"handle__label",children:"true"})}),(0,F.jsx)("div",{className:"handle h-false",onMouseDown:w=>e.onPortDown?.(w,t,"false"),onMouseEnter:()=>e.onPortEnter?.(t,"false"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,F.jsx)("span",{className:"handle__label",children:"false"})})]}):i!=="end"&&(0,F.jsx)("div",{className:"handle h-out",onMouseDown:w=>e.onPortDown?.(w,t,"out"),onMouseEnter:()=>e.onPortEnter?.(t,"out"),onMouseLeave:()=>e.onPortLeave?.()})]})}function fh({nodes:e,viewBox:t,selection:n,hostRef:r}){let[o,i]=(0,Be.useState)(!1);if(!e.length)return null;let a=60,u=e.map(E=>rr(E)),s=e.map(E=>or(E)),c=e.map(E=>nr(E).w),d=e.map(E=>nr(E).h),p=Math.min(...u)-a,m=Math.min(...s)-a,y=Math.max(...u.map((E,K)=>E+c[K]))+a,w=Math.max(...s.map((E,K)=>E+d[K]))+a,S=y-p,H=w-m,g=r.current?.getBoundingClientRect(),f=g?.width??800,h=g?.height??500,x=-t.tx/t.zoom,C=-t.ty/t.zoom,P=f/t.zoom,M=h/t.zoom;return(0,F.jsxs)("div",{className:"cv__mini"+(o?" is-collapsed":""),children:[(0,F.jsxs)("div",{className:"cv__mini-head",children:[(0,F.jsx)("span",{children:"Map"}),(0,F.jsx)("button",{onClick:()=>i(!o),children:(0,F.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:(0,F.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,F.jsxs)("svg",{viewBox:`${p} ${m} ${S} ${H}`,preserveAspectRatio:"xMidYMid meet",children:[(0,F.jsx)("rect",{className:"mini-view",x,y:C,width:P,height:M}),e.map(E=>{let K=nr(E),W=n?.kind==="node"&&n.id===E.id;return(0,F.jsx)("rect",{className:"mini-node"+(W?" sel":""),x:rr(E),y:or(E),width:K.w,height:K.h,rx:3},E.id)})]})]})}function cp(e){let{nodes:t,edges:n,selection:r,setSelection:o,onNodeMove:i,onAddNode:a,onConnect:u,runState:s,viewBox:c,setViewBox:d}=e,p=(0,Be.useRef)(null),[m,y]=(0,Be.useState)(null),[w,S]=(0,Be.useState)(null),[H,g]=(0,Be.useState)(!1),[f,h]=(0,Be.useState)(null),[x,C]=(0,Be.useState)(null),[P,M]=(0,Be.useState)(null),{zoom:E,tx:K,ty:W}=c,ve=(N,j)=>{let U=p.current;if(!U)return{x:0,y:0};let Y=U.getBoundingClientRect();return{x:(N-Y.left-K)/E,y:(j-Y.top-W)/E}},ir=N=>{let j=N.target;j!==N.currentTarget&&!j.classList.contains("cv__viewport")||N.button!==0&&N.button!==1||(o(null),C({startX:N.clientX,startY:N.clientY,tx:K,ty:W}))},Sn=(N,j)=>{if(N.target.classList.contains("handle"))return;N.stopPropagation(),o({kind:"node",id:j.id});let U=ve(N.clientX,N.clientY);y({id:j.id,offX:U.x-rr(j),offY:U.y-or(j)})},ar=(N,j,U)=>{N.stopPropagation(),N.preventDefault();let Y=Ii(j,U);S({from:{id:j.id,port:U},x:Y.x,y:Y.y})},ao=(N,j)=>{w&&h({id:N.id,port:j})},lr=()=>h(null);(0,Be.useEffect)(()=>{let N=U=>{if(m){let Y=ve(U.clientX,U.clientY);i(m.id,Y.x-m.offX,Y.y-m.offY)}else if(w){let Y=ve(U.clientX,U.clientY);S(q=>q&&{...q,x:Y.x,y:Y.y})}else x&&d(Y=>({...Y,tx:x.tx+(U.clientX-x.startX),ty:x.ty+(U.clientY-x.startY)}))},j=()=>{w&&f&&f.id!==w.from.id&&u({from:w.from.id,fromPort:w.from.port,to:f.id,toPort:"in"}),y(null),S(null),C(null),h(null)};return window.addEventListener("mousemove",N),window.addEventListener("mouseup",j),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",j)}},[m,w,x,f,u,i,d]);let at=N=>{if(!N.ctrlKey&&!N.metaKey&&Math.abs(N.deltaY)<30){d(Z=>({...Z,tx:Z.tx-N.deltaX,ty:Z.ty-N.deltaY}));return}N.preventDefault();let j=p.current;if(!j)return;let U=j.getBoundingClientRect(),Y=N.clientX-U.left,q=N.clientY-U.top,Ge=-N.deltaY*.0015;d(Z=>{let qe=Math.min(2,Math.max(.3,Z.zoom*(1+Ge))),ze=qe/Z.zoom;return{zoom:qe,tx:Y-(Y-Z.tx)*ze,ty:q-(q-Z.ty)*ze}})},lt=()=>d(N=>({...N,zoom:Math.min(2,N.zoom*1.15)})),Ai=()=>d(N=>({...N,zoom:Math.max(.3,N.zoom/1.15)})),Di=()=>{let N=p.current;if(!N||!t.length)return;let j=N.getBoundingClientRect(),U=60,Y=1/0,q=1/0,Ge=-1/0,Z=-1/0;t.forEach(st=>{let cr=nr(st),dr=rr(st),lo=or(st);Y=Math.min(Y,dr),q=Math.min(q,lo),Ge=Math.max(Ge,dr+cr.w),Z=Math.max(Z,lo+cr.h)});let qe=Ge-Y+U*2,ze=Z-q+U*2,ye=Math.min(1,Math.min(j.width/qe,j.height/ze));d({zoom:ye,tx:(j.width-qe*ye)/2-(Y-U)*ye,ty:(j.height-ze*ye)/2-(q-U)*ye})},sr=N=>{N.preventDefault(),g(!0)},Cn=()=>g(!1),ur=N=>{N.preventDefault(),g(!1);let j=N.dataTransfer.getData("application/x-wfe-item");if(j)try{let U=JSON.parse(j),Y=ve(N.clientX,N.clientY);a(U,Y.x-100,Y.y-40)}catch{}},ji=N=>{let j=N.id??"",U=["wfe-edge"];return r?.kind==="edge"&&r.id===j&&U.push("is-selected"),P===j&&U.push("is-hover"),s?.currentEdgeId===j&&U.push("is-running"),j&&s?.visitedEdges?.has(j)&&U.push("is-visited"),N.fromPort==="true"&&U.push("is-true"),N.fromPort==="false"&&U.push("is-false"),U.join(" ")},Ui=N=>s?.currentNodeId===N.id?"running":s?.visitedNodes?.has(N.id)?"visited":null,Wi=(0,Be.useMemo)(()=>{if(!w)return null;let N=t.find(Y=>Y.id===w.from.id);if(!N)return null;let j=Ii(N,w.from.port),U={x:w.x,y:w.y};return(0,F.jsx)("svg",{className:"cv__ghost-edge",width:"4000",height:"2400",children:(0,F.jsx)("path",{d:sp(j,U)})})},[w,t]);return(0,F.jsxs)("div",{className:"cv"+(x?" is-panning":"")+(H?" is-drop-target":""),ref:p,onWheel:at,onMouseDown:ir,onDragOver:sr,onDragLeave:Cn,onDrop:ur,children:[(0,F.jsxs)("div",{className:"cv__viewport",style:{transform:`translate(${K}px, ${W}px) scale(${E})`},children:[(0,F.jsxs)("svg",{className:"cv__edges",width:"4000",height:"2400",children:[(0,F.jsxs)("defs",{children:[(0,F.jsx)("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,F.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"currentColor"})}),(0,F.jsx)("marker",{id:"arr-ok",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,F.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--ok)"})}),(0,F.jsx)("marker",{id:"arr-err",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,F.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--err)"})}),(0,F.jsx)("marker",{id:"arr-acc",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,F.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--accent)"})})]}),n.map((N,j)=>{let U=t.find(st=>st.id===N.from),Y=t.find(st=>st.id===N.to);if(!U||!Y)return null;let q=N.id??`e-${j}`,Ge=Ii(U,N.fromPort??"out"),Z=Ii(Y,N.toPort??"in"),qe=sp(Ge,Z),ze={x:(Ge.x+Z.x)/2,y:(Ge.y+Z.y)/2},ye=s?.currentEdgeId===q||s?.visitedEdges?.has(q)?"url(#arr-acc)":N.fromPort==="true"?"url(#arr-ok)":N.fromPort==="false"?"url(#arr-err)":"url(#arr)";return(0,F.jsxs)("g",{children:[(0,F.jsx)("path",{className:"edge-bg",d:qe,onMouseEnter:()=>M(q),onMouseLeave:()=>M(null),onClick:()=>o({kind:"edge",id:q})}),(0,F.jsx)("path",{className:ji(N),d:qe,markerEnd:ye}),N.label&&(0,F.jsxs)("g",{transform:`translate(${ze.x},${ze.y})`,children:[(0,F.jsx)("rect",{className:"edge-label-bg",x:-N.label.length*3.6-6,y:-9,rx:3,width:N.label.length*7.2+12,height:18}),(0,F.jsx)("text",{className:"edge-label",y:4,textAnchor:"middle",children:N.label})]})]},q)})]}),Wi,t.map(N=>(0,F.jsx)(ph,{n:N,selected:r?.kind==="node"&&r.id===N.id,state:Ui(N),onMouseDown:Sn,onPortDown:ar,onPortEnter:ao,onPortLeave:lr,onClick:(j,U)=>{j.stopPropagation(),o({kind:"node",id:U.id})}},N.id))]}),(0,F.jsxs)("div",{className:"cv__controls",children:[(0,F.jsx)("button",{title:"Zoom out",onClick:Ai,children:(0,F.jsx)(A.zoomout,{})}),(0,F.jsxs)("div",{className:"cv__zoom",children:[Math.round(E*100),"%"]}),(0,F.jsx)("button",{title:"Zoom in",onClick:lt,children:(0,F.jsx)(A.zoomin,{})}),(0,F.jsx)("button",{title:"Fit",onClick:Di,children:(0,F.jsx)(A.fit,{})})]}),(0,F.jsx)(fh,{nodes:t,viewBox:c,selection:r,hostRef:p})]})}var ne=oe(Nt(),1);var gh=[{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:'"10000000000@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:'"Alex"',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:'"acme/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"]}],hh=[{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"}],mh=[{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."}],vh=[{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`."}],yh=[{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."}],wh=[{path:"labels",type:"array",description:"Current label list on the entity. Use with a `branch` node to route on label state."}],xh=[{path:"emoji",type:"string",description:"The emoji reaction that was applied (echoes the input for debugging)."}],kh=[{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."}],bh=[{path:"durationMs",type:"number",description:"Duration logged, in milliseconds (echoed for downstream use)."}],_h=[{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."}],Sh=[{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."}],Ch=[{path:"*",type:"any",description:"The built-in's typed response. Shape depends on the action \u2014 e.g. http.fetch returns {status, statusText, headers, body, truncated, url}; mesh.delegate returns {peer, agent, response}; extract.structured returns {data, model, usage}. See GET /api/actions/builtin for each action's schema."}],Nh=[{path:"port",type:"string",description:"Which outgoing port matched. Downstream edges with `fromPort` matching this value will fire."}],Eh=[{path:"label",type:"string",description:"The label chosen. Also the port that fires.",example:'"bug"'},{path:"result",type:"string",description:"Alias of `label`, so a workflow migrating off an `agent` + RESULT-token node keeps its existing {{node.result}} references working.",example:'"bug"'},{path:"confidence",type:"number",description:"How peaked the distribution was, 0-1. Compare against the node's minConfidence.",example:"0.93"},{path:"probabilities",type:"object",description:"The full distribution over labels \u2014 every label with its probability.",example:'{"bug":0.93,"feature":0.05,"question":0.02}'},{path:"unsure",type:"bool",description:"True when confidence fell below minConfidence and the `unsure` port fired instead of a label port.",example:"false"},{path:"port",type:"string",description:"The port that fired: the chosen label, or `unsure`.",example:'"bug"'}],Th=[{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)."}],Ph=[{path:"event",type:"any",description:"Payload of the event that resumed this checkpoint. Fields mirror whichever trigger source delivered the resume event."}],Fh=[{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."}],Mh=[{path:"emittedAt",type:"string",description:"ISO-8601 time the signal was published."}],Ih=[{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."}],Rh=[{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)."}],cs={"trigger.channel":{summary:"Raw event payload from the source channel. Shape varies by `source` \u2014 the Context panel filters accordingly.",fields:gh},"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."}]},"trigger.poll":{summary:"Runs a registered action on an interval and starts one run per new item it prints (one JSON object per line). The item is the payload.",fields:[{path:"",type:"any",description:"The item's own fields, e.g. `{{trigger.msgId}}`, `{{trigger.text}}`. Whatever the poll command printed for this item."}]},agent:{summary:"Agent response after executing the prompt template.",fields:hh},classify:{summary:"A typed classification with a full probability distribution. Branches on its own result: the port named after the winning label fires, or `unsure` when nothing clears minConfidence.",fields:Eh},transform:{summary:"Value picked from upstream context (path mode) or rendered template bundle (template mode).",fields:Th},branch:{summary:"Which outgoing port fired. Downstream edges match via `fromPort`.",fields:Nh},"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:mh},"action.createIssue":{summary:"Created an issue on GitLab/GitHub.",fields:vh},"action.setLabel":{summary:"Added/removed labels on a GitLab issue or MR.",fields:yh},"action.readLabel":{summary:"Fetched the current label list \u2014 useful before a `branch`.",fields:wh},"action.react":{summary:"Emoji reaction on a message (Telegram/WhatsApp).",fields:xh},"action.editMessage":{summary:"Edited an existing message in place.",fields:kh},"action.logTime":{summary:"Logged time spent on a GitLab issue/MR.",fields:bh},"action.callHTTP":{summary:"Made an outbound HTTP request with templated params.",fields:_h},"action.run":{summary:"Invoked a registered action from the action registry. Output is the full ActionRunResult.",fields:Sh},"action.builtin":{summary:"Invoked a daemon-shipped typed built-in action (improvement plan #6) by name. Output is the built-in's validated response.",fields:Ch},subProcess:{summary:"Spawned a child workflow and waited for its completion.",fields:Rh},"signal.emit":{summary:"Published a signal to the bus. Runs elsewhere can resume on it via `signal.wait`.",fields:Mh},"signal.wait":{summary:"Paused until a matching signal arrives. Resumes with that signal in this node's output.",fields:Fh},"timer.boundary":{summary:"Paused until a timer elapses. Resumes with timing metadata.",fields:Ih},checkpoint:{summary:"Paused until a matching resume event arrives on this entity.",fields:Ph},end:{summary:"Terminal node \u2014 closes the run with the configured status. No output downstream.",fields:[]},"owner.notify":{summary:"Told the owner, through the node's notifications.",fields:[{path:"text",type:"string",description:"What the owner was told."},{path:"sentAt",type:"string",description:"When (ISO time)."}]},"owner.ask":{summary:"The owner's answer on a decision card. Leaves on port yes, no or expired.",fields:[{path:"port",type:"string",description:"yes, no or expired.",example:'"yes"'},{path:"choice",type:"string",description:"The option the owner picked, when the card offered choices."},{path:"text",type:"string",description:"The draft as the owner approved it, after any edit."},{path:"note",type:"string",description:"The owner's note on the card."},{path:"cardId",type:"string",description:"The decision card's id."}]},"person.message":{summary:"A message to a person, sent once the owner approved it. Leaves on port sent or declined.",fields:[{path:"text",type:"string",description:"The text that was sent (the owner may have edited it)."},{path:"channel",type:"string",description:"Channel it went out on."},{path:"chatId",type:"string",description:"The person's chat."},{path:"messageId",type:"string",description:"Id of the sent message, when the channel gives one."},{path:"approved",type:"string",description:"start (approved with the run) or step (on its own card)."}]},"person.wait":{summary:"A person's reply. Leaves on port reply, or timeout when the deadline passed.",fields:[{path:"text",type:"string",description:"What the person wrote."},{path:"from",type:"string",description:"Sender id."},{path:"media",type:"any",description:"Attached file, when they sent one."},{path:"reminders",type:"number",description:"Reminders sent before the reply came."},{path:"timedOut",type:"bool",description:"True on the timeout port."}]}};function dp(e,t={}){let n=cs[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(Ce(),1);function L({title:e,children:t,defaultOpen:n=!0,right:r}){let[o,i]=(0,ne.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)(A.chev,{})}),(0,l.jsx)("h4",{children:e}),r]}),(0,l.jsx)("div",{className:"insp__section-body",children:t})]})}function k({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)(A.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 on({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 Ri({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 Li({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 vt({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 Lh(e){return typeof e=="boolean"?"boolean":typeof e=="number"?"number":Array.isArray(e)?"list":e&&typeof e=="object"?"json":"string"}function bn({value:e,onChange:t,keyPlaceholder:n="key",valuePlaceholder:r="value",allowedTypes:o=["string","number","boolean","list","json"],emptyHint:i}){let a=Object.entries(e||{}),u=s=>{let c={};for(let[d,p]of s)d&&(c[d]=p);t(c)};return(0,l.jsxs)("div",{className:"kv-editor",children:[a.length===0&&i&&(0,l.jsx)("div",{className:"kv-editor__empty",children:i}),a.map(([s,c],d)=>(0,l.jsx)(Oh,{k:s,v:c,allowedTypes:o,keyPlaceholder:n,valuePlaceholder:r,onKey:p=>{let m=a.slice();m[d]=[p,m[d][1]],u(m)},onValue:p=>{let m=a.slice();m[d]=[m[d][0],p],u(m)},onRemove:()=>{let p=a.slice();p.splice(d,1),u(p)}},d)),(0,l.jsx)("button",{type:"button",className:"kv-editor__add",onClick:()=>u([...a,["",""]]),children:"+ Add field"})]})}function Oh({k:e,v:t,allowedTypes:n,keyPlaceholder:r,valuePlaceholder:o,onKey:i,onValue:a,onRemove:u}){let[s,c]=(0,ne.useState)(Lh(t)),d=p=>{c(p),a(p==="boolean"?typeof t=="boolean"?t:!1:p==="number"?typeof t=="number"?t:Number(t)||0:p==="list"?Array.isArray(t)?t:typeof t=="string"&&t?t.split(",").map(m=>m.trim()):[]:p==="json"?typeof t=="object"&&t&&!Array.isArray(t)?t:{}:typeof t=="string"?t:String(t??""))};return(0,l.jsxs)("div",{className:"kv-editor__row",children:[(0,l.jsx)("input",{className:"fld__input mono kv-editor__key",type:"text",value:e,placeholder:r,onChange:p=>i(p.target.value)}),n.length>1&&(0,l.jsx)("select",{className:"fld__input kv-editor__type",value:s,onChange:p=>d(p.target.value),children:n.map(p=>(0,l.jsx)("option",{value:p,children:p},p))}),(0,l.jsxs)("div",{className:"kv-editor__val",children:[s==="string"&&(0,l.jsx)(kn,{rows:1,value:typeof t=="string"?t:"",onChange:p=>a(p),placeholder:o}),s==="number"&&(0,l.jsx)("input",{className:"fld__input",type:"number",value:typeof t=="number"?String(t):"",onChange:p=>a(p.target.value===""?0:Number(p.target.value))}),s==="boolean"&&(0,l.jsx)(Li,{checked:!!t,onChange:p=>a(p),label:String(!!t)}),s==="list"&&(0,l.jsx)(vt,{value:Array.isArray(t)?t.map(String):[],onChange:p=>a(p),placeholder:"comma,separated,values"}),s==="json"&&(0,l.jsx)("textarea",{className:"fld__input mono kv-editor__json",rows:2,value:JSON.stringify(t??{},null,2),onChange:p=>{try{a(JSON.parse(p.target.value))}catch{}}})]}),(0,l.jsx)("button",{type:"button",className:"kv-editor__remove",onClick:u,title:"Remove field",children:"\xD7"})]})}function kn({value:e,onChange:t,placeholder:n,rows:r=3}){let[o,i]=(0,ne.useState)(!1),[a,u]=(0,ne.useState)(0),s=(0,ne.useRef)(null),c=(0,ne.useMemo)(()=>{let m=[];return ss.forEach(y=>y.items.forEach(w=>m.push({group:y.group,...w}))),m},[]),d=m=>{let y=s.current;if(!y)return;let w=y.selectionStart,S=e.slice(0,w),H=e.slice(w),f=S.endsWith("{{")?S:S+"{{",h=f+m+"}}"+H;t(h),i(!1),requestAnimationFrame(()=>{y.focus();let x=f.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)(A.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)(A.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:ss.map(m=>(0,l.jsxs)(ne.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 w=c.findIndex(H=>H.path===y.path);return(0,l.jsxs)("div",{onMouseEnter:()=>u(w),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:w===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 zh({value:e,onChange:t,agents:n}){let[r,o]=(0,ne.useState)(!1),[i,a]=(0,ne.useState)(""),u=(0,ne.useRef)(null);(0,ne.useEffect)(()=>{let d=p=>{u.current&&!u.current.contains(p.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)(A.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(p=>(0,l.jsx)("span",{style:{fontSize:9,color:"var(--muted)",background:"var(--surface)",padding:"1px 5px",borderRadius:3},children:p},p))})]},d.id)),c.length===0&&(0,l.jsx)("div",{style:{padding:10,fontSize:11,color:"var(--muted)"},children:"No agents match."})]})]}),(0,l.jsx)(k,{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 fs={"whatsapp-message":{label:"WhatsApp \u2014 Incoming message",fires:"Fires when a contact or group sends a WhatsApp message to the paired account.",wired:!0,group:"channel-msg",hasLabels:!1},"telegram-message":{label:"Telegram \u2014 Incoming message",fires:"Fires when a Telegram user or group sends a message to the bot.",wired:!0,group:"channel-msg",hasLabels:!1},"discord-message":{label:"Discord \u2014 Incoming message",fires:"Fires when a Discord user posts a message in a watched channel or DM.",wired:!1,group:"channel-msg",hasLabels:!1},"slack-message":{label:"Slack \u2014 Incoming message",fires:"Fires when a Slack user posts a message in a watched channel or DM.",wired:!1,group:"channel-msg",hasLabels:!1},"gitlab-issue":{label:"GitLab \u2014 Issue event",fires:"Fires when a GitLab issue is opened, updated, reopened, or closed.",wired:!0,group:"gitlab",hasLabels:!0},"gitlab-mr":{label:"GitLab \u2014 Merge request event",fires:"Fires when a GitLab merge request is opened, updated, approved, merged, or closed.",wired:!0,group:"gitlab",hasLabels:!0},"gitlab-note":{label:"GitLab \u2014 Comment on issue or MR",fires:"Fires when a comment is posted on a GitLab issue or merge request.",wired:!0,group:"gitlab",hasLabels:!1},"gitlab-pipeline":{label:"GitLab \u2014 Pipeline status change",fires:"Fires when a CI/CD pipeline transitions state (running, success, failed).",wired:!0,group:"gitlab",hasLabels:!1},"github-issue":{label:"GitHub \u2014 Issue event",fires:"Fires when a GitHub issue is opened, updated, or closed (after webhook signature verification).",wired:!0,group:"github",hasLabels:!0},"github-pr":{label:"GitHub \u2014 Pull request event",fires:"Fires when a GitHub pull request is opened, updated, reviewed, merged, or closed.",wired:!0,group:"github",hasLabels:!0},"stripe-event":{label:"Stripe \u2014 Webhook event",fires:"Fires on any Stripe webhook (invoice.paid, customer.subscription.deleted, charge.refunded, etc.). Filter by event type in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1},"sentry-issue":{label:"Sentry \u2014 Issue alert",fires:"Fires when Sentry triggers an issue alert (new issue, regression, threshold breach).",wired:!0,group:"external-webhook",hasLabels:!1},"vercel-deployment":{label:"Vercel \u2014 Deployment event",fires:"Fires when Vercel reports a deployment state change (created, ready, error).",wired:!0,group:"external-webhook",hasLabels:!1},"odoo-event":{label:"Odoo \u2014 ERP/CRM event",fires:"Fires on any Odoo webhook (contact create, lead won, sale confirmed, invoice paid, project task updated, etc.). Filter by event/model in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1},"hubspot-event":{label:"HubSpot \u2014 CRM event",fires:"Fires on any HubSpot v3 webhook (contact.creation, deal.propertyChange, conversation.newMessage, etc.). Filter by subscriptionType in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1}},Ah=Object.entries(fs).map(([e,t])=>({value:e,label:t.wired?`${t.label} \u2713`:`${t.label} \u26A0 schema-only`}));function Dh({node:e,patchData:t}){let n=e.config,r=n.filter??{},o=p=>t({filter:{...r,...p}}),i=String(n.source??"whatsapp-message"),a=fs[i]??fs["whatsapp-message"],u=a.group==="channel-msg",s=a.group==="gitlab",c=a.group==="github",d=u||s||c;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(L,{title:"Source",children:[(0,l.jsx)(k,{label:"Event",hint:a.wired?"\u2713 wired end-to-end":"\u26A0 schema-only \u2014 no webhook subscriber configured for this source yet",children:(0,l.jsx)(ue,{value:i,onChange:p=>t({source:p,filter:{}}),options:Ah})}),(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:-6,marginBottom:12},children:a.fires})]}),d&&(0,l.jsxs)(L,{title:"Match criteria",children:[(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginBottom:8},children:["Limit when this trigger fires. Leave empty or use ",(0,l.jsx)("span",{className:"mono",children:"*"})," to match anything."]}),s&&(0,l.jsx)(k,{label:"Project",hint:'GitLab project path. Empty or "*" matches any.',children:(0,l.jsx)(R,{mono:!0,value:String(r.project??""),onChange:p=>o({project:p}),placeholder:"* (any) or acme/web"})}),c&&(0,l.jsx)(k,{label:"Repo",hint:'GitHub "owner/repo". Empty or "*" matches any.',children:(0,l.jsx)(R,{mono:!0,value:String(r.repo??""),onChange:p=>o({repo:p}),placeholder:"* (any) or owner/repo"})}),u&&(0,l.jsx)(k,{label:"Chat",hint:i==="whatsapp-message"?'Contact number or JID (e.g. "+216 00 000 000", "10000000000@s.whatsapp.net"). Empty or "*" matches any.':i==="telegram-message"?'Telegram chat id ("1816212449" for a DM, "-1003861455814" for a group). Empty or "*" matches any.':'Exact chat id. Empty or "*" matches any.',children:(0,l.jsx)(R,{mono:!0,value:String(r.chat??""),onChange:p=>o({chat:p}),placeholder:"* (any)"})}),a.hasLabels&&(0,l.jsx)(k,{label:"Labels (any of)",hint:"Fires only when at least one of these labels is present on the issue/MR. Empty = no label filter.",children:(0,l.jsx)(vt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:p=>o({labels:p}),placeholder:"bug, needs-review"})})]}),u&&(0,l.jsx)(L,{title:"Routing",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Pass data straight through",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)(Li,{checked:!!n.passthrough,onChange:p=>t({passthrough:p}),label:"Let the default agent also reply"})})})]})}function jh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Schedule",children:[(0,l.jsx)(k,{label:"When it runs",hint:"5 fields: minute hour day month weekday. E.g. '0 9 * * 1-5' = 9am Mon\u2013Fri.",children:(0,l.jsx)(R,{mono:!0,value:String(n.spec??"0 * * * *"),onChange:r=>t({spec:r}),placeholder:"0 9 * * *"})}),(0,l.jsx)(k,{label:"Timezone",hint:"IANA timezone (e.g. Europe/London, America/New_York). Defaults to UTC.",children:(0,l.jsx)(R,{mono:!0,value:String(n.timezone??"UTC"),onChange:r=>t({timezone:r}),placeholder:"Europe/London"})}),(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:4},children:["Fires the workflow on the schedule. The trigger payload is empty \u2014 downstream nodes won't have ",(0,l.jsx)("span",{className:"mono",children:"{{start.*}}"})," data unless you wire it."]})]})}function Uh({node:e,patchData:t}){let n=e.config,r=Array.isArray(n.filter)?n.filter.length:0;return(0,l.jsxs)(L,{title:"Poll",children:[(0,l.jsx)(k,{label:"Which saved action",hint:"Slug of a registered action (.agentx/actions/<id>.json). It must print one JSON object per line.",children:(0,l.jsx)(R,{mono:!0,value:String(n.actionId??""),onChange:o=>t({actionId:o}),placeholder:"list-new-messages"})}),(0,l.jsx)(k,{label:"Every (seconds)",hint:"How often the action runs. 5 or more; defaults to 60.",children:(0,l.jsx)(on,{value:n.everySeconds,onChange:o=>t({everySeconds:o}),placeholder:"60"})}),(0,l.jsx)(k,{label:"Item key",hint:"Field that identifies an item, e.g. msgId. Each key starts one run, once.",children:(0,l.jsx)(R,{mono:!0,value:String(n.key??""),onChange:o=>t({key:o}),placeholder:"id"})}),(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:4},children:["The first poll only records what is already there. After that, each new item starts one run with its fields as ",(0,l.jsx)("span",{className:"mono",children:"{{trigger.*}}"}),"."," ",r>0?`${r} filter condition(s) set.`:"No filter."," Edit ",(0,l.jsx)("span",{className:"mono",children:"filter"})," under Advanced."]})]})}var ds=[{value:"on:gitlab-issue",label:"on:gitlab-issue",fires:"Fires when a GitLab issue is opened, updated, reopened, or closed (after the channel adapter dispatched it)."},{value:"on:gitlab-mr",label:"on:gitlab-mr",fires:"Fires when a GitLab merge request is opened, updated, approved, merged, or closed."},{value:"on:gitlab-note",label:"on:gitlab-note",fires:"Fires when a comment is posted on a GitLab issue or merge request."},{value:"on:gitlab-pipeline",label:"on:gitlab-pipeline",fires:"Fires when a GitLab CI/CD pipeline transitions state."},{value:"on:github-issue",label:"on:github-issue",fires:"Fires when a GitHub issue is opened, updated, or closed (signature-verified webhook)."},{value:"on:github-pr",label:"on:github-pr",fires:"Fires when a GitHub pull request is opened, reviewed, merged, or closed."},{value:"on:github-push",label:"on:github-push",fires:"Fires on any GitHub push event (branch updates)."},{value:"on:stripe-event",label:"on:stripe-event",fires:"Fires on any Stripe webhook (invoice.paid, charge.refunded, subscription.deleted, etc.). Filter by event type inside the workflow."},{value:"on:sentry-issue",label:"on:sentry-issue",fires:"Fires when a Sentry issue alert lands (new issue, regression, error threshold)."},{value:"on:vercel-deployment",label:"on:vercel-deployment",fires:"Fires when a Vercel deployment changes state."},{value:"on:odoo-event",label:"on:odoo-event",fires:"Fires on any Odoo webhook (res.partner.create, sale.order.action_confirm, account.move.paid, etc.). Filter by event/model inside the workflow."},{value:"on:hubspot-event",label:"on:hubspot-event",fires:"Fires on any HubSpot v3 webhook (contact.creation, deal.propertyChange, conversation.newMessage, etc.). Filter by subscriptionType inside the workflow."},{value:"on:error",label:"on:error",fires:"Fires when an agent task fails. Useful for incident-routing workflows."}];function Wh({node:e,patchData:t}){let n=e.config,r=String(n.event??"on:"),i=ds.find(a=>a.value===r)?.fires??(r.startsWith("on:")&&r!=="on:"?"Custom hook event. Fires whenever code in your agentx setup emits this event via the bus. Subscribe responsibly.":'Hook event names must start with "on:" \u2014 e.g. on:gitlab-issue.');return(0,l.jsxs)(L,{title:"Hook subscription",children:[(0,l.jsxs)(k,{label:"Event",hint:"Pick a known event or type your own (must start with on:)",children:[(0,l.jsx)(R,{mono:!0,value:r,onChange:a=>t({event:a}),placeholder:"on:gitlab-issue",list:"hook-events-list"}),(0,l.jsx)("datalist",{id:"hook-events-list",children:ds.map(a=>(0,l.jsx)("option",{value:a.value,children:a.fires},a.value))})]}),(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:-6,marginBottom:4},children:i}),(0,l.jsxs)("details",{style:{marginTop:8},children:[(0,l.jsx)("summary",{style:{cursor:"pointer",fontSize:12,color:"var(--muted)"},children:"Available hook events"}),(0,l.jsx)("ul",{style:{fontSize:11,color:"var(--muted)",paddingLeft:16,marginTop:6},children:ds.map(a=>(0,l.jsxs)("li",{style:{marginBottom:4},children:[(0,l.jsx)("span",{className:"mono",children:a.value})," \u2014 ",a.fires]},a.value))})]})]})}function Hh(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 Bh({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)(k,{label:"Which agent runs",children:(0,l.jsx)(zh,{value:r.agentId,onChange:o=>t({agentId:o}),agents:n})}),(0,l.jsx)(k,{label:"What to ask for",hint:"Supports {{nodeId.path}} variables from upstream context",children:(0,l.jsx)(kn,{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)(k,{label:"How to read the reply",hint:"How to extract a routing token from the agent's reply",children:(0,l.jsx)(ue,{value:String(r.resultParser??"acme-result-token"),onChange:o=>t({resultParser:o}),options:[{value:"acme-result-token",label:"RESULT: token (recommended)"},{value:"json",label:"JSON block (```json \u2026```)"},{value:"raw",label:"Raw reply (no parsing)"}]})}),(0,l.jsx)(k,{label:"Give up after (minutes)",children:(0,l.jsx)(on,{value:r.timeoutMinutes,onChange:o=>t({timeoutMinutes:o}),placeholder:"5"})})]})]})}function Gh({node:e,patchData:t}){let n=e.config,[r,o]=(0,ne.useState)(n.template&&typeof n.template=="object"?"template":"path");return(0,l.jsxs)(L,{title:"Transform",children:[(0,l.jsx)(k,{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)(k,{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)(k,{label:"Template",hint:"One field per output key. String values support {{nodeId.path}} variables.",children:(0,l.jsx)(bn,{value:n.template??{},onChange:i=>t({template:i}),keyPlaceholder:"output key (e.g. greeting)",valuePlaceholder:"hi {{trigger.sender.name}}",emptyHint:"No fields yet \u2014 click + Add field below."})})]})}function $h({node:e,patchData:t}){let n=e.config,r=n.cases??[],o=s=>t({cases:s}),i=(s,c)=>o(r.map((d,p)=>p===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((p,m)=>m!==c)),children:(0,l.jsx)(A.trash,{})})]}),(0,l.jsx)(k,{label:"If",children:(0,l.jsx)(ue,{value:s.when.kind,onChange:p=>a(c,{kind:p,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)(k,{label:"Path",hint:"e.g. classify.result",children:(0,l.jsx)(R,{mono:!0,value:String(d.path??""),onChange:p=>u(c,{path:p}),placeholder:"classify.result"})}),(s.when.kind==="equals"||s.when.kind==="contains")&&(0,l.jsx)(k,{label:"Value",children:(0,l.jsx)(R,{mono:!0,value:String(d.value??""),onChange:p=>u(c,{value:p})})}),s.when.kind==="matches"&&(0,l.jsx)(k,{label:"Regex",children:(0,l.jsx)(R,{mono:!0,value:String(d.regex??""),onChange:p=>u(c,{regex:p}),placeholder:"^(approved|done)$"})}),(0,l.jsx)(k,{label:"Port",hint:"Outgoing edge's `fromPort` must match this",children:(0,l.jsx)(R,{mono:!0,value:s.to,onChange:p=>i(c,{...s,to:p}),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)(A.plus,{})," Add case"]})]}),(0,l.jsx)(L,{title:"Fallback",defaultOpen:!1,children:(0,l.jsx)(k,{label:"If nothing matches, go to",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 Vh({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)(k,{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)(k,{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)(k,{label:"Labels (any of)",hint:"e.g. a label change to one of these resumes the run",children:(0,l.jsx)(vt,{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)(k,{label:"Only if the event mentions",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 Kh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Terminal",children:[(0,l.jsx)(k,{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)(k,{label:"Short summary",hint:"Surfaced in run history + notifications",children:(0,l.jsx)(Ri,{value:String(n.summary??""),onChange:r=>t({summary:r}),rows:2})})]})}var Yh=["gitlab","github","whatsapp","telegram","discord","slack"],ps=new Map,pp=6e4;function Qh(e){let[t,n]=(0,ne.useState)(()=>{let r=ps.get(e);return r&&Date.now()-r.at<pp?{chats:r.chats,source:r.source,loading:!1}:{chats:[],source:"",loading:!0}});return(0,ne.useEffect)(()=>{let r=!1,o=ps.get(e);if(o&&Date.now()-o.at<pp){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:"";ps.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 Jh({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=Qh(a),s=`chats-${a}`;return(0,l.jsxs)(L,{title:"Send message",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:a,onChange:c=>t({channel:c}),options:Yh})}),(0,l.jsxs)(k,{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)(k,{label:"Text",hint:"Supports {{nodeId.path}} templates from any upstream node",children:(0,l.jsx)(kn,{value:String(r.text??""),onChange:c=>t({text:c}),rows:4,placeholder:`Thanks ${i("sender.name")} \u2014 working on it.`})}),(0,l.jsx)(k,{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)(k,{label:"Reply to which message",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)(k,{label:"Text formatting",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 Xh({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)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{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:"acme/web"})})]}),(0,l.jsxs)(L,{title:"Issue",children:[(0,l.jsx)(k,{label:"Title",children:(0,l.jsx)(kn,{rows:1,value:String(n.title??""),onChange:r=>t({title:r}),placeholder:"From WhatsApp: {{trigger.sender.name}}"})}),(0,l.jsx)(k,{label:"Description",children:(0,l.jsx)(kn,{rows:6,value:String(n.description??""),onChange:r=>t({description:r}),placeholder:"Reported by {{trigger.sender.name}}\\n\\n{{trigger.text}}"})}),(0,l.jsx)(k,{label:"Labels",children:(0,l.jsx)(vt,{mono:!0,value:Array.isArray(n.labels)?n.labels:[],onChange:r=>t({labels:r}),placeholder:"Triage, source::whatsapp"})}),(0,l.jsx)(k,{label:"Assignees",hint:"GitLab usernames (resolved to ids at runtime)",children:(0,l.jsx)(vt,{mono:!0,value:Array.isArray(n.assignees)?n.assignees:[],onChange:r=>t({assignees:r}),placeholder:"alice, bob"})})]})]})}function qh({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)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{label:"What it is about",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(k,{label:"Project",children:(0,l.jsx)(R,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"{{trigger.project}}"})}),(0,l.jsx)(k,{label:"Issue number",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)(k,{label:"Add",hint:"Comma-separated list",children:(0,l.jsx)(vt,{value:Array.isArray(n.add)?n.add:[],onChange:r=>t({add:r}),placeholder:"In review"})}),(0,l.jsx)(k,{label:"Remove",children:(0,l.jsx)(vt,{value:Array.isArray(n.remove)?n.remove:[],onChange:r=>t({remove:r}),placeholder:"Triage"})})]})]})}function Zh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Read labels",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{label:"What it is about",children:(0,l.jsx)(ue,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(k,{label:"Project",children:(0,l.jsx)(R,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r})})}),(0,l.jsx)(k,{label:"Issue number",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 em({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"React",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp"]})}),(0,l.jsx)(k,{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)(k,{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)(k,{label:"Emoji",children:(0,l.jsx)(R,{value:String(n.emoji??"\u{1F440}"),onChange:r=>t({emoji:r})})})]})}function tm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Edit message",children:[(0,l.jsx)(k,{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)(k,{label:"Chat id",children:(0,l.jsx)(R,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r})})}),(0,l.jsx)(k,{label:"Message id",children:(0,l.jsx)(R,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r})})}),(0,l.jsx)(k,{label:"Replace the text with",children:(0,l.jsx)(kn,{value:String(n.text??""),onChange:r=>t({text:r}),rows:3})}),(0,l.jsx)(k,{label:"Text formatting",children:(0,l.jsx)(ue,{value:String(n.parseMode??"plain"),onChange:r=>t({parseMode:r}),options:["plain","markdown","html"]})})]})}function nm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Log time",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ue,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab"]})}),(0,l.jsx)(k,{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)(k,{label:"How long to wait",children:(0,l.jsx)(on,{value:n.durationMs,onChange:r=>t({durationMs:r}),placeholder:"900000"})})]})}function rm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Action",children:(0,l.jsx)(k,{label:"Which saved action",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:r=>t({actionId:r}),placeholder:"deploy-staging"})})}),(0,l.jsx)(L,{title:"Inputs",defaultOpen:!0,children:(0,l.jsx)(k,{label:"Inputs",hint:"One field per input key. String values support {{nodeId.path}} variables.",children:(0,l.jsx)(bn,{value:n.inputs??{},onChange:r=>t({inputs:r}),keyPlaceholder:"input name (e.g. version)",valuePlaceholder:"{{trigger.tag}}",emptyHint:"No inputs configured."})})}),(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 om({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)(k,{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)(k,{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)(k,{label:"Body",hint:"String \u2014 rendered with {{nodeId.path}}. Server parses as JSON when possible.",children:(0,l.jsx)(kn,{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)(k,{label:"Headers",hint:"HTTP request headers \u2014 string values support {{env.*}} and {{nodeId.path}}.",children:(0,l.jsx)(bn,{value:n.headers??{},onChange:r=>t({headers:r}),keyPlaceholder:"Header-Name",valuePlaceholder:"Bearer {{env.TOKEN}}",allowedTypes:["string"],emptyHint:"No headers set."})})}),(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 im=["text","long-text","number","boolean","date","select","multi-select","file"];function fp({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 p=[...n];[p[s],p[d]]=[p[d],p[s]],t({...e,fields:p})},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)(k,{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)(k,{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)(k,{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)(k,{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)(k,{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)(k,{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)(k,{label:"Type",children:(0,l.jsx)(ue,{value:s.type,onChange:d=>r(c,{type:d}),options:im.slice()})}),(0,l.jsx)(k,{label:"",children:(0,l.jsx)(Li,{checked:!!s.required,onChange:d=>r(c,{required:d}),label:"Required"})})]}),(s.type==="select"||s.type==="multi-select")&&(0,l.jsx)(k,{label:"Options",hint:"Comma-separated list of allowed values",children:(0,l.jsx)(vt,{value:s.options??[],onChange:d=>r(c,{options:d}),placeholder:"low, medium, high"})}),(0,l.jsx)(k,{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)(k,{label:"Min",children:(0,l.jsx)(on,{value:s.validate?.min,onChange:d=>o(c,{min:d})})}),(0,l.jsx)(k,{label:"Max",children:(0,l.jsx)(on,{value:s.validate?.max,onChange:d=>o(c,{max:d})})}),s.type!=="number"&&(0,l.jsx)(k,{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 am({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)(k,{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)(k,{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)(k,{label:"Description",children:(0,l.jsx)(Ri,{value:String(n.description??""),onChange:o=>t({description:o}),rows:2})}),(0,l.jsx)(k,{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)(fp,{form:r,patch:o=>t({form:o})})]})}function lm({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)(k,{label:"Who can start it",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)(fp,{form:r,patch:o=>t({form:o})})]})}function sm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Sub-process",children:[(0,l.jsx)(k,{label:"Which workflow",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)(k,{label:"Values to pass on",hint:'Map child-context keys \u2192 templated values. Use a single key "*" for full inheritance.',children:(0,l.jsx)(bn,{value:n.inputMap??{},onChange:r=>t({inputMap:r}),keyPlaceholder:"child key",valuePlaceholder:"{{trigger.foo}}",emptyHint:"No mapping \u2014 child workflow runs with no parent context."})})]})}function um({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Emit signal",children:[(0,l.jsx)(k,{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)(k,{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)(k,{label:"Payload",hint:"Object delivered with the signal. String values support {{nodeId.path}}.",children:(0,l.jsx)(bn,{value:n.payload??{},onChange:r=>t({payload:r}),keyPlaceholder:"payload key",valuePlaceholder:"{{trigger.iid}}",emptyHint:"Empty signal payload."})})]})}function cm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(L,{title:"Wait for signal",children:[(0,l.jsx)(k,{label:"Name",children:(0,l.jsx)(R,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(k,{label:"Scope",children:(0,l.jsx)(ue,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(k,{label:"Only when",hint:"Only resume when every key here matches the emitted payload. Empty = match any payload.",children:(0,l.jsx)(bn,{value:n.match??{},onChange:r=>t({match:r}),keyPlaceholder:"payload key",valuePlaceholder:"expected value",emptyHint:"No filter \u2014 matches any payload."})})]})}function dm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(L,{title:"Timer",children:(0,l.jsx)(k,{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 pm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(L,{title:"Parallel gateway",children:(0,l.jsx)(k,{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 fm({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 p=[...o];p[c]={...p[c],...d},t({rules:p})},u=()=>t({rules:[...o,{when:r.map(()=>"*"),to:"port",output:{}}]}),s=c=>t({rules:o.filter((d,p)=>p!==c)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L,{title:"Inputs",children:(0,l.jsx)(k,{label:"Values to read",hint:"Comma-separated; each is a template evaluated per-run against the run context",children:(0,l.jsx)(vt,{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)(k,{label:"Goes to",hint:"Outgoing edge port taken when this row matches",children:(0,l.jsx)(R,{mono:!0,value:String(c.to??""),onChange:p=>a(d,{to:p})})}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>s(d),children:"\u2715"})]}),(0,l.jsx)(k,{label:"When these are true",hint:'One per input. "*" wildcard, "x" equals, ">10" numeric, "!=x", "/regex/"',children:(0,l.jsx)(vt,{mono:!0,value:(Array.isArray(c.when)?c.when:[]).map(String),onChange:p=>a(d,{when:p}),placeholder:"gold, >100"})}),(0,l.jsx)(k,{label:"Output",hint:"Fields written when this rule matches.",children:(0,l.jsx)(bn,{value:c.output??{},onChange:p=>a(d,{output:p}),keyPlaceholder:"output key",valuePlaceholder:"value",emptyHint:"No outputs."})})]},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)(k,{label:"Goes to",children:(0,l.jsx)(R,{mono:!0,value:String(n.default?.to??"fallback"),onChange:c=>t({default:{...n.default??{},to:c}})})})})]})}var gm={"trigger.channel":e=>(0,l.jsx)(Dh,{...e}),"trigger.cron":e=>(0,l.jsx)(jh,{...e}),"trigger.poll":e=>(0,l.jsx)(Uh,{...e}),"trigger.hook":e=>(0,l.jsx)(Wh,{...e}),"trigger.manual":e=>(0,l.jsx)(Hh,{...e}),"trigger.form":e=>(0,l.jsx)(lm,{...e}),agent:e=>(0,l.jsx)(Bh,{...e}),transform:e=>(0,l.jsx)(Gh,{...e}),branch:e=>(0,l.jsx)($h,{...e}),"gateway.parallel":e=>(0,l.jsx)(pm,{...e}),rule:e=>(0,l.jsx)(fm,{...e}),checkpoint:e=>(0,l.jsx)(Vh,{...e}),userTask:e=>(0,l.jsx)(am,{...e}),subProcess:e=>(0,l.jsx)(sm,{...e}),"signal.emit":e=>(0,l.jsx)(um,{...e}),"signal.wait":e=>(0,l.jsx)(cm,{...e}),"timer.boundary":e=>(0,l.jsx)(dm,{...e}),end:e=>(0,l.jsx)(Kh,{...e}),"action.send":e=>(0,l.jsx)(Jh,{...e}),"action.createIssue":e=>(0,l.jsx)(Xh,{...e}),"action.setLabel":e=>(0,l.jsx)(qh,{...e}),"action.readLabel":e=>(0,l.jsx)(Zh,{...e}),"action.react":e=>(0,l.jsx)(em,{...e}),"action.editMessage":e=>(0,l.jsx)(tm,{...e}),"action.logTime":e=>(0,l.jsx)(nm,{...e}),"action.callHTTP":e=>(0,l.jsx)(om,{...e}),"action.run":e=>(0,l.jsx)(rm,{...e})};function gp(e){let{selection:t,nodes:n,edges:r,patch:o,patchData:i,onDelete:a,onDuplicate:u,validation:s,runState:c,agents:d,meta:p,patchMeta:m,onDeleteWorkflow:y,isNew:w}=e;if(!t)return(0,l.jsx)(km,{meta:p,patchMeta:m,onDeleteWorkflow:y,isNew:w});if(t.kind==="edge"){let H=r.find(g=>g.id===t.id);return H?(0,l.jsx)(bm,{edge:{...H,id:H.id??""},patch:o,onDelete:()=>a(t)}):null}let S=n.find(H=>H.id===t.id);return S?(0,l.jsx)(hm,{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 hm({node:e,nodes:t,edges:n,patch:r,patchData:o,onDelete:i,onDuplicate:a,validation:u,runOutput:s,agents:c}){let[d,p]=(0,ne.useState)("config"),m=gm[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)(A.dup,{})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Delete",onClick:i,children:(0,l.jsx)(A.trash,{})})]}),(0,l.jsxs)("div",{className:"insp__tabs",children:[(0,l.jsxs)("button",{className:"insp__tab"+(d==="config"?" is-active":""),onClick:()=>p("config"),children:[(0,l.jsx)(A.gear,{})," Config"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="advanced"?" is-active":""),onClick:()=>p("advanced"),children:[(0,l.jsx)(A.layout,{})," Advanced"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="preview"?" is-active":""),onClick:()=>p("preview"),children:[(0,l.jsx)(A.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)(vm,{node:e,nodes:t,edges:n})]}),d==="advanced"&&(0,l.jsx)(xm,{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,w)=>(0,l.jsxs)("div",{className:"fld__err",style:{padding:"6px 0"},children:[(0,l.jsx)(A.warn,{})," ",y.message]},w))})]})]})}function mm(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 vm({node:e,nodes:t,edges:n}){let r=(0,ne.useMemo)(()=>mm(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)(ym,{node:o},o.id))})})}function ym({node:e}){let t=cs[e.type],n=t?dp(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)(wm,{nodeId:e.id,field:r},r.path))})]})}function wm({nodeId:e,field:t}){let[n,r]=(0,ne.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 xm({node:e,patchData:t}){let[n,r]=(0,ne.useState)(()=>JSON.stringify(e.config,null,2)),[o,i]=(0,ne.useState)(null);return(0,ne.useMemo)(()=>{r(JSON.stringify(e.config,null,2)),i(null)},[e.id]),(0,l.jsxs)(L,{title:"Raw config JSON",children:[(0,l.jsx)(Ri,{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)(A.check,{})," Apply"]}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>r(JSON.stringify(e.config,null,2)),children:[(0,l.jsx)(A.undo,{})," Reset"]})]}),o&&(0,l.jsxs)("div",{className:"fld__err",style:{color:"var(--err)",fontSize:11,marginTop:4},children:[(0,l.jsx)(A.err,{})," ",o]})]})}function km({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)(k,{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)(k,{label:"Title",children:(0,l.jsx)(R,{value:e.title,onChange:i=>t({title:i})})}),(0,l.jsx)(k,{label:"Description",hint:"Optional one-liner shown on the workflows index",children:(0,l.jsx)(Ri,{rows:2,value:e.description??"",onChange:i=>t({description:i})})})]}),(0,l.jsxs)(L,{title:"Execution",children:[(0,l.jsx)(k,{label:"Priority",hint:"Higher numbers run before lower ones when multiple workflows match the same trigger",children:(0,l.jsx)(on,{value:e.priority,onChange:i=>t({priority:i??0}),placeholder:"0"})}),(0,l.jsx)(k,{label:"",children:(0,l.jsx)(Li,{checked:!!e.fanOut,onChange:i=>t({fanOut:i}),label:"Fan out \u2014 let multiple workflows match the same trigger event"})}),(0,l.jsx)(k,{label:"Secrets this flow may use",hint:"Comma-separated. Only these env names are exposed to actions/agents in this flow.",children:(0,l.jsx)(vt,{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)(k,{label:"How many runs to keep",children:(0,l.jsx)(on,{value:o.maxRuns,onChange:i=>t({retention:{...o,maxRuns:i??0}}),placeholder:"500"})}),(0,l.jsx)(k,{label:"Keep runs for (days)",children:(0,l.jsx)(on,{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)(A.trash,{})," Delete workflow"]})})]})]})}function bm({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)(A.trash,{})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsx)(L,{title:"Label",children:(0,l.jsx)(k,{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)(k,{label:"Leaves from",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 St=oe(Nt(),1);var $=oe(Ce(),1);function hp({onLoadTemplate:e}){let[t,n]=(0,St.useState)(""),[r,o]=(0,St.useState)([]);(0,St.useEffect)(()=>{let u=!0;return fetch("/api/n8n/workflows").then(s=>s.json()).then(s=>{if(!u)return;let c=(s.workflows??[]).filter(d=>d.webhookUrl).map(d=>({id:"n8n."+d.id,type:"action.callHTTP",label:d.name,hint:d.active?"Hands this over to n8n":"In n8n, but switched off there",glyph:"g-action",icon:"globe",config:{url:d.webhookUrl,method:"POST",body:"{{trigger}}"}}));o(c.length?[{section:"From your n8n",items:c}]:[])}).catch(()=>{}),()=>{u=!1}},[]);let i=(0,St.useMemo)(()=>[...ls,...r],[r]),a=(0,St.useMemo)(()=>{if(!t.trim())return i;let u=t.toLowerCase();return i.map(s=>({...s,items:s.items.filter(c=>c.label.toLowerCase().includes(u)||c.hint.toLowerCase().includes(u)||c.type.includes(u))})).filter(s=>s.items.length>0)},[t,i]);return(0,$.jsxs)("aside",{className:"pal",children:[(0,$.jsxs)("div",{className:"pal__search",children:[(0,$.jsx)(A.search,{}),(0,$.jsx)("input",{value:t,onChange:u=>n(u.target.value),placeholder:"Search nodes\u2026"}),(0,$.jsx)("kbd",{children:"/"})]}),(0,$.jsxs)("div",{className:"pal__scroll",children:[a.map(u=>(0,$.jsxs)(St.Fragment,{children:[(0,$.jsxs)("div",{className:"pal__section",children:[(0,$.jsx)("span",{children:u.section}),(0,$.jsx)("span",{className:"pal__section-count",children:u.items.length.toString().padStart(2,"0")})]}),u.items.map(s=>(0,$.jsx)(_m,{item:s},s.id))]},u.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:us.length.toString().padStart(2,"0")})]}),us.map(u=>(0,$.jsxs)("div",{className:"pal__tpl",onClick:()=>e(u),children:[(0,$.jsx)("div",{className:"pal__tpl-dots",children:[0,1,2].map(s=>(0,$.jsx)("span",{className:s<u.dots?"on":""},s))}),(0,$.jsx)("div",{className:"pal__tpl-title",children:u.title}),(0,$.jsx)("div",{className:"pal__tpl-hint",children:u.hint})]},u.id))]})]}),(0,$.jsxs)("div",{className:"pal__foot",children:[(0,$.jsx)(A.lightning,{}),(0,$.jsx)("span",{children:"Drag items onto the canvas"})]})]})}function _m({item:e}){let t=A[e.icon]??A.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 gs=oe(Nt(),1);var _=oe(Ce(),1);function mp(e){return(0,_.jsxs)("div",{className:"tb",children:[(0,_.jsxs)("div",{className:"tb__brand",children:[(0,_.jsx)("div",{className:"tb__mark",children:"\u2726"}),(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"tb__brand-label",children:"Workflow Editor"}),(0,_.jsx)("div",{className:"tb__brand-sub",children:e.workflowIdLabel})]})]}),(0,_.jsxs)("div",{className:"tb__main",children:[(0,_.jsxs)("div",{className:"tb__crumbs",children:[(0,_.jsx)("a",{href:"/workflows",children:"Workflows"}),(0,_.jsx)("span",{className:"sep",children:"/"}),(0,_.jsx)("input",{value:e.title,onChange:t=>e.setTitle(t.target.value)})]}),(0,_.jsx)("span",{className:"tb__sep"}),(0,_.jsxs)("div",{className:"tb__status "+e.status,children:[(0,_.jsx)("span",{className:"dot"}),e.statusLabel??(e.status==="is-dirty"?"unsaved":e.status==="is-running"?"running":e.status==="is-validating"?"validating\u2026":"saved")]}),(0,_.jsx)("div",{className:"tb__spacer"}),(0,_.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,_.jsx)(A.panelLeft,{})}),(0,_.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,_.jsx)(A.panelRight,{})}),(0,_.jsx)("span",{className:"tb__sep"}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",title:"Undo (\u2318Z)",onClick:e.onUndo,disabled:!e.canUndo,children:(0,_.jsx)(A.undo,{})}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",title:"Redo (\u2318\u21E7Z)",onClick:e.onRedo,disabled:!e.canRedo,children:(0,_.jsx)(A.redo,{})}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",title:"Auto layout",onClick:e.onLayout,children:(0,_.jsx)(A.layout,{})}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",title:"Keyboard shortcuts",onClick:e.onHelp,children:(0,_.jsx)(A.kbd,{})}),(0,_.jsx)("button",{className:"btn btn--ghost-icon"+(e.tweaksOpen?" is-active":""),title:"Tweaks",onClick:()=>e.setTweaksOpen(!e.tweaksOpen),children:(0,_.jsx)(A.gear,{})}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",title:"Toggle theme",onClick:()=>e.setTheme(e.theme==="dark"?"light":"dark"),children:e.theme==="dark"?(0,_.jsx)(A.sun,{}):(0,_.jsx)(A.moon,{})})]}),(0,_.jsxs)("div",{className:"tb__actions",children:[(0,_.jsxs)("button",{className:"btn btn--outline",onClick:e.onSave,children:[(0,_.jsx)(A.save,{})," Save"]}),(0,_.jsx)("button",{className:"btn btn--primary",onClick:e.onRun,children:e.running?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(A.stop2,{})," Stop"]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(A.run,{})," Run preview"]})})]})]})}function vp({running:e,script:t,cursor:n,onStop:r}){if(!e)return null;let o=t.filter(i=>i.nodeId);return(0,_.jsxs)("div",{className:"run",children:[(0,_.jsxs)("div",{className:"run__head",children:[(0,_.jsx)(A.lightning,{}),(0,_.jsx)("div",{className:"run__title",children:"Live run"}),(0,_.jsxs)("span",{className:"run__chip",children:[(0,_.jsx)("span",{className:"dot"})," streaming"]}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",onClick:r,style:{height:24,width:24},children:(0,_.jsx)(A.x,{})})]}),(0,_.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,_.jsxs)("div",{className:c.join(" "),children:[(0,_.jsx)("div",{className:"run__marker",children:s?(0,_.jsx)(A.check,{}):a+1}),(0,_.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,_.jsx)("div",{className:"run__step-title",children:i.title}),i.body&&(0,_.jsx)("div",{className:"run__step-body",dangerouslySetInnerHTML:{__html:i.body}})]})]},a)})}),(0,_.jsxs)("div",{className:"run__foot",children:[(0,_.jsxs)("span",{children:[Math.min(n+1,t.length),"/",t.length]}),(0,_.jsxs)("span",{children:[t.length?Math.round((n+1)/t.length*100):0,"%"]})]})]})}var Sm=[{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 yp(e){return e.open?(0,_.jsxs)("div",{className:"tweaks",children:[(0,_.jsxs)("div",{className:"tweaks__head",children:[(0,_.jsx)("span",{children:"Tweaks"}),(0,_.jsx)("button",{className:"btn btn--ghost-icon",style:{height:22,width:22},onClick:()=>e.setOpen(!1),children:(0,_.jsx)(A.x,{})})]}),(0,_.jsxs)("div",{className:"tweaks__body",children:[(0,_.jsxs)("div",{className:"tweaks__row",children:[(0,_.jsx)("label",{children:"Theme"}),(0,_.jsx)("div",{className:"tweaks__opts",children:["dark","light"].map(t=>(0,_.jsx)("button",{className:e.theme===t?"on":"",onClick:()=>e.setTheme(t),children:t},t))})]}),(0,_.jsxs)("div",{className:"tweaks__row",children:[(0,_.jsx)("label",{children:"Density"}),(0,_.jsx)("div",{className:"tweaks__opts",children:["compact","cozy","roomy"].map(t=>(0,_.jsx)("button",{className:e.density===t?"on":"",onClick:()=>e.setDensity(t),children:t},t))})]}),(0,_.jsxs)("div",{className:"tweaks__row",style:{alignItems:"flex-start",flexDirection:"column",gap:6},children:[(0,_.jsx)("label",{children:"Accent hue"}),(0,_.jsx)("div",{className:"tweaks__hue",children:Sm.map(t=>(0,_.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 wp({open:e,onClose:t}){return e?(0,_.jsx)("div",{className:"kbd-overlay",onClick:t,children:(0,_.jsxs)("div",{className:"kbd-card",onClick:r=>r.stopPropagation(),children:[(0,_.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,_.jsxs)("div",{className:"row",children:[(0,_.jsx)("span",{children:r}),(0,_.jsx)("span",{children:o.split(" ").map((i,a)=>(0,_.jsxs)(gs.Fragment,{children:[i.includes("/")?i.split("/").map((u,s)=>(0,_.jsxs)(gs.Fragment,{children:[s>0&&" / ",(0,_.jsx)("kbd",{children:u.trim()})]},s)):(0,_.jsx)("kbd",{children:i})," "]},a))})]},r))]})}):null}var Me=oe(Nt(),1),V=oe(Ce(),1),ms="agentx.editor.chat.v1";function xp({currentWorkflow:e,onApplyWorkflow:t,agentId:n}){let[r,o]=(0,Me.useState)(!1),[i,a]=(0,Me.useState)(()=>Tm()),[u,s]=(0,Me.useState)(""),[c,d]=(0,Me.useState)(!1),p=(0,Me.useRef)(null),m=(0,Me.useRef)(null);(0,Me.useEffect)(()=>{let g=i.filter(f=>!f.pending).map(f=>({role:f.role,content:f.content}));try{sessionStorage.setItem(ms,JSON.stringify(g))}catch{}},[i]),(0,Me.useEffect)(()=>{let g=p.current;g&&(g.scrollTop=g.scrollHeight)},[i,r]),(0,Me.useEffect)(()=>{r&&m.current?.focus()},[r]);let y=(0,Me.useCallback)(async()=>{let g=u.trim();if(!g||c)return;let f=i.filter(x=>!x.pending).map(x=>({role:x.role,content:x.content})),h=[...i,{role:"user",content:g},{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:[...f,{role:"user",content:g}],currentWorkflow:e,agentId:n})}),C=await x.json().catch(()=>({}));x.ok?a(P=>hs(P,{role:"assistant",content:C.reply||"",workflow:C.workflow||void 0})):a(P=>hs(P,{role:"assistant",content:"",error:C.error||`HTTP ${x.status}`}))}catch(x){a(C=>hs(C,{role:"assistant",content:"",error:x?.message||"network error"}))}finally{d(!1)}},[n,c,e,u,i]),w=()=>{a([]);try{sessionStorage.removeItem(ms)}catch{}},S=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),y())},H=(0,Me.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(`
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1377
|
+
#wfe-root code,
|
|
1378
|
+
#wfe-root .mono,
|
|
1379
|
+
#wfe-root pre { font-family: var(--ax-mono); }
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
/* ============================================================
|
|
1383
|
+
On the Wall (#1524): ports, sizes, focus, narrow screens
|
|
1384
|
+
============================================================ */
|
|
1385
|
+
/* A box is drawn at the size geometry.ts gives it, so its ports and the
|
|
1386
|
+
edges meet; a long summary is cut rather than pushing the box taller. */
|
|
1387
|
+
#wfe-root .node { min-width: 0; display: flex; flex-direction: column; }
|
|
1388
|
+
#wfe-root .node__body { overflow: hidden; min-height: 0; }
|
|
1389
|
+
#wfe-root .node__row--summary {
|
|
1390
|
+
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
|
|
1391
|
+
overflow: hidden;
|
|
1392
|
+
}
|
|
1393
|
+
#wfe-root .node.t-action .node__row--summary,
|
|
1394
|
+
#wfe-root .node.t-transform .node__row--summary { -webkit-line-clamp: 1; }
|
|
1395
|
+
#wfe-root .node:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
|
|
1396
|
+
#wfe-root .node.is-drop { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft); }
|
|
1397
|
+
/* Each way out is its own port, at the height geometry.ts gives it. */
|
|
1398
|
+
#wfe-root .handle.h-out { left: 100%; }
|
|
1399
|
+
#wfe-root .handle.h-out .handle__label {
|
|
1400
|
+
left: 12px; top: -9px; transform: none;
|
|
1401
|
+
padding: 1px 5px; border-radius: 4px;
|
|
1402
|
+
background: var(--surface); border: 1px solid var(--line-soft);
|
|
1403
|
+
letter-spacing: 0.04em; text-transform: none; font-size: 10px; color: var(--ink-2);
|
|
1404
|
+
}
|
|
1405
|
+
#wfe-root .cv.is-connecting .node:not(.t-trigger) { cursor: copy; }
|
|
1406
|
+
#wfe-root .cv__edges path.is-loop { stroke-dasharray: 5 4; }
|
|
1407
|
+
#wfe-root .cv__ghost-edge { position: absolute; inset: auto; overflow: visible; pointer-events: none; }
|
|
1408
|
+
|
|
1409
|
+
/* Toolbar */
|
|
1410
|
+
#wfe-root .tb__main { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; padding: 0 8px; }
|
|
1411
|
+
#wfe-root .tb__crumbs { min-width: 0; flex: 0 1 auto; }
|
|
1412
|
+
#wfe-root .tb__crumbs input { min-width: 0; text-overflow: ellipsis; }
|
|
1413
|
+
#wfe-root .tb__back { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; white-space: nowrap; }
|
|
1414
|
+
#wfe-root .tb__back:hover { text-decoration: underline; }
|
|
1415
|
+
#wfe-root .tb__arrange { display: inline-flex; gap: 6px; align-items: center; }
|
|
1416
|
+
#wfe-root .btn--ghost { background: transparent; border-color: transparent; }
|
|
1417
|
+
#wfe-root .btn:focus-visible, #wfe-root .pal__item:focus-visible, #wfe-root .pal__tpl:focus-visible,
|
|
1418
|
+
#wfe-root .menu__tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
1419
|
+
#wfe-root .pal__tpl { display: block; width: 100%; text-align: left; font: inherit; color: inherit; }
|
|
1420
|
+
#wfe-root .pal__item { cursor: pointer; }
|
|
1421
|
+
|
|
1422
|
+
/* Fixed overlays sit over the canvas column, not the side menu. */
|
|
1423
|
+
#wfe-root .toast { left: auto; right: 24px; transform: none; bottom: 24px; }
|
|
1424
|
+
|
|
1425
|
+
/* Narrow screens: the menu opens over the canvas instead of beside it. */
|
|
1426
|
+
@media (max-width: 900px) {
|
|
1427
|
+
#wfe-root .app, #wfe-root .app[data-menu="closed"] { grid-template-columns: 0 minmax(0, 1fr); }
|
|
1428
|
+
#wfe-root .menu {
|
|
1429
|
+
position: absolute; z-index: 30;
|
|
1430
|
+
top: 52px; bottom: 0; left: 0;
|
|
1431
|
+
width: min(100%, 380px);
|
|
1432
|
+
box-shadow: var(--shadow);
|
|
1433
|
+
}
|
|
1434
|
+
#wfe-root .tb__opt, #wfe-root .tb__status, #wfe-root .tb__crumbs .sep, #wfe-root .tb__back { display: none; }
|
|
1435
|
+
#wfe-root .tb__actions { padding: 0 8px; }
|
|
1436
|
+
#wfe-root .cv__mini { display: none; }
|
|
1437
|
+
}
|
|
1438
|
+
@media (max-width: 640px) {
|
|
1439
|
+
#wfe-root .tb__arrange span, #wfe-root .tb__run span { display: none; }
|
|
1440
|
+
#wfe-root .tb__actions .btn { padding: 0 10px; }
|
|
1441
|
+
#wfe-root .kbd-card { width: calc(100vw - 32px); }
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
/* The map sits top right, clear of the zoom controls and the chat button. */
|
|
1445
|
+
#wfe-root .cv__mini { top: 14px; bottom: auto; }
|
|
1446
|
+
/* The delete button carries words: the icon button's fixed width cut it. */
|
|
1447
|
+
#wfe-root .insp__delete-wf { width: auto; }
|
|
1448
|
+
/* The branch's cut corners clipped its ports, their names and the selection
|
|
1449
|
+
ring; a plain box with the branch colour on top shows all three. */
|
|
1450
|
+
#wfe-root .node.t-branch { clip-path: none; border-top: 3px solid var(--c); }
|
|
1451
|
+
/* Edges a person can follow in both themes. */
|
|
1452
|
+
#wfe-root .cv__edges path { stroke: var(--muted-2); }
|
|
1453
|
+
#wfe-root .cv__edges path.edge-bg { stroke: transparent; }
|
|
1454
|
+
#wfe-root .cv__edges path.is-hover { stroke: var(--ink-2); }
|
|
1455
|
+
#wfe-root .cv__edges path.is-selected, #wfe-root .cv__edges path.is-visited { stroke: var(--accent); }
|
|
1456
|
+
/* On a phone the chat button sits above the Wall's bottom bar, and its
|
|
1457
|
+
panel takes the width of the screen. */
|
|
1458
|
+
@media (max-width: 640px) {
|
|
1459
|
+
#wfe-root .ax-chat__pill { bottom: 72px; right: 12px; padding: 10px 14px; }
|
|
1460
|
+
#wfe-root .ax-chat__panel { bottom: 64px; right: 8px; left: 8px; width: auto; height: auto; top: 64px; max-height: none; }
|
|
1461
|
+
#wfe-root .cv__controls { bottom: 12px; left: 12px; }
|
|
1462
|
+
}
|
|
1463
|
+
/* The preview's step list sits on the canvas, beside the side menu. */
|
|
1464
|
+
#wfe-root .app > .run { top: 66px; left: 14px; z-index: 20; }
|
|
1465
|
+
#wfe-root .app[data-menu="open"] > .run { left: calc(var(--menu-w) + 14px); }
|
|
1466
|
+
@media (max-width: 900px) {
|
|
1467
|
+
#wfe-root .app[data-menu="open"] > .run { left: 14px; }
|
|
1468
|
+
#wfe-root .app > .run { width: min(320px, calc(100% - 28px)); max-height: 45%; }
|
|
1469
|
+
}
|
|
1470
|
+
`;var Zp=ge(kp(),1);var U=ge(Ut(),1);var Le=ge(Ut(),1);var y=ge(De(),1),Y=({children:e,size:t=14,...n})=>(0,y.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}),K={gitlab:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M8 14L2 7l1.2-4.5L5 7h6l1.8-4.5L14 7z"})}),clock:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M8 5v3l2 1.5"})]}),hook:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M4 3v4a4 4 0 0 0 4 4h4"}),(0,y.jsx)("path",{d:"M10 9l2 2-2 2"})]}),play:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),box:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5"}),(0,y.jsx)("path",{d:"M2.5 6h11M6 2.5v11"})]}),branch:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"4",cy:"4",r:"1.5"}),(0,y.jsx)("circle",{cx:"12",cy:"12",r:"1.5"}),(0,y.jsx)("circle",{cx:"12",cy:"4",r:"1.5"}),(0,y.jsx)("path",{d:"M4 5.5v3a2 2 0 0 0 2 2h4.5"}),(0,y.jsx)("path",{d:"M12 5.5v5"})]}),stop:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1"})}),msg:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M2.5 3.5h11v8h-6l-3 2.5v-2.5h-2z"})}),tag:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M8 2h5v5l-6 6-5-5z"}),(0,y.jsx)("circle",{cx:"10.5",cy:"5.5",r:.8,fill:"currentColor"})]}),bell:()=>(0,y.jsx)(Y,{children:(0,y.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,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M2.5 8h11M8 2.5c2 2 2 9 0 11M8 2.5c-2 2-2 9 0 11"})]}),search:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5"})]}),undo:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M4 7h6a3 3 0 0 1 0 6H7"}),(0,y.jsx)("path",{d:"M6.5 4.5L4 7l2.5 2.5"})]}),redo:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M12 7H6a3 3 0 0 0 0 6h3"}),(0,y.jsx)("path",{d:"M9.5 4.5L12 7 9.5 9.5"})]}),save:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M3 3h8l2 2v8H3z"}),(0,y.jsx)("path",{d:"M5 3v4h6V3M5 13v-4h6v4"})]}),run:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),stop2:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1",fill:"currentColor"})}),sun:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"2.75"}),(0,y.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,y.jsx)(Y,{children:(0,y.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,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M8 3v10M3 8h10"})}),trash:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M3 4.5h10M6 4.5V3h4v1.5M4.5 4.5l.5 8h6l.5-8"})}),chev:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M4 6l4 4 4-4"})}),x:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})}),more:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"4",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,y.jsx)("circle",{cx:"8",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,y.jsx)("circle",{cx:"12",cy:"8",r:"1",fill:"currentColor",stroke:"none"})]}),check:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M3 8.5l3 3 7-7"})}),warn:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M8 2l6 11H2z"}),(0,y.jsx)("path",{d:"M8 6.5v3M8 11.2v.3"})]}),err:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M8 5v3.5M8 10.5v.3"})]}),zoomin:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4M7 5v4"})]}),zoomout:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4"})]}),fit:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M3 5V3h2M13 5V3h-2M3 11v2h2M13 11v2h-2"}),(0,y.jsx)("rect",{x:"6",y:"6",width:"4",height:"4",rx:.5})]}),minus:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M3 8h10"})}),kbd:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"1.5",y:"4",width:"13",height:"8",rx:"1.5"}),(0,y.jsx)("path",{d:"M4 7h.5M6 7h.5M8 7h.5M10 7h.5M4 10h7"})]}),lightning:()=>(0,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M9 2L3 9h4l-1 5 6-7H8z",fill:"currentColor",fillOpacity:.2})}),variable:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M4 3c-2 3-2 7 0 10M12 3c2 3 2 7 0 10"}),(0,y.jsx)("path",{d:"M6 7.5h.5l1 1 1-1h.5M6 10l1.5-1.5M9 10l-1.5-1.5"})]}),users:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,y.jsx)("path",{d:"M2.5 12c.5-2 2-3 3.5-3s3 1 3.5 3"}),(0,y.jsx)("circle",{cx:"11",cy:"5",r:"1.5"}),(0,y.jsx)("path",{d:"M10 10.5c.5-1 1.2-1.5 2-1.5 1 0 2 .8 2.3 2"})]}),grid:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"2.5",y:"2.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"9.5",y:"2.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"2.5",y:"9.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"9.5",y:"9.5",width:"4",height:"4"})]}),eye:()=>(0,y.jsxs)(Y,{children:[(0,y.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,y.jsx)("circle",{cx:"8",cy:"8",r:"1.8"})]}),slide:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),(0,y.jsx)("path",{d:"M5 6h6M5 8.5h4M5 11h5"})]}),gear:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"2"}),(0,y.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,y.jsx)(Y,{children:(0,y.jsx)("path",{d:"M3 13V3h7l-1 2.5L10 8H3"})}),dup:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"}),(0,y.jsx)("path",{d:"M3 9V3h6"})]}),layout:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("path",{d:"M2.5 3.5h11v9h-11z"}),(0,y.jsx)("path",{d:"M2.5 7h11M7 7v5.5"})]}),panelLeft:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,y.jsx)("path",{d:"M6 3v10"}),(0,y.jsx)("rect",{x:"2.5",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]}),panelRight:()=>(0,y.jsxs)(Y,{children:[(0,y.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,y.jsx)("path",{d:"M10 3v10"}),(0,y.jsx)("rect",{x:"10",y:"3.5",width:"3.5",height:"9",fill:"currentColor",fillOpacity:.18,stroke:"none"})]})};var ys=[{section:"What starts it",items:[{id:"trigger.channel.whatsapp",type:"trigger.channel",label:"A WhatsApp message",hint:"Someone messages you on WhatsApp",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.telegram",type:"trigger.channel",label:"A Telegram message",hint:"Someone messages you on Telegram",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.gitlab",type:"trigger.channel",label:"Something on GitLab",hint:"An issue, merge request or pipeline changes",glyph:"g-trigger",icon:"gitlab"},{id:"trigger.hook.n8n",type:"trigger.hook",label:"n8n hands work over",hint:"n8n calls this workflow \u2014 it keeps the connectors, you keep the agents",glyph:"g-trigger",icon:"hook"},{id:"trigger.hook",type:"trigger.hook",label:"Something calls in",hint:"Any service that can POST a webhook",glyph:"g-trigger",icon:"hook"},{id:"trigger.cron",type:"trigger.cron",label:"A time of day",hint:"Runs on a schedule you set",glyph:"g-trigger",icon:"clock"},{id:"trigger.poll",type:"trigger.poll",label:"Something new shows up",hint:"Checks a command every so often; runs once per new item",glyph:"g-trigger",icon:"clock"},{id:"trigger.manual",type:"trigger.manual",label:"You start it",hint:"Only runs when you press run",glyph:"g-trigger",icon:"play"},{id:"trigger.form",type:"trigger.form",label:"Someone fills a form",hint:"A person submits a form to begin",glyph:"g-trigger",icon:"plus"}]},{section:"Put an agent on it",items:[{id:"node.agent",type:"agent",label:"Ask an agent",hint:"Give an agent the job, in your own words",glyph:"g-state",icon:"box"},{id:"node.transform",type:"transform",label:"Reshape the data",hint:"Build a value out of earlier steps",glyph:"g-state",icon:"variable"}]},{section:"Bring in a person",items:[{id:"node.userTask",type:"userTask",label:"Ask a person",hint:"Send someone a form and wait for their answer",glyph:"g-state",icon:"box"},{id:"node.checkpoint",type:"checkpoint",label:"Wait for approval",hint:"Hold here until someone says go",glyph:"g-branch",icon:"flag"},{id:"node.timer.boundary",type:"timer.boundary",label:"Wait a while",hint:"Pause for an hour, a day, however long",glyph:"g-branch",icon:"clock"},{id:"node.owner.notify",type:"owner.notify",label:"Tell me",hint:"Send yourself a note through your notifications",glyph:"g-action",icon:"msg"},{id:"node.owner.ask",type:"owner.ask",label:"Ask me to decide",hint:"A decision card; goes on with yes, no or no answer",glyph:"g-branch",icon:"flag"},{id:"node.person.message",type:"person.message",label:"Message someone",hint:"Write to an employee or a client, once you approve the text",glyph:"g-action",icon:"msg"},{id:"node.person.wait",type:"person.wait",label:"Wait for their reply",hint:"Hold until they answer or send a file, with a deadline and reminders",glyph:"g-branch",icon:"clock"}]},{section:"Decide what happens next",items:[{id:"node.classify",type:"classify",label:"Sort it into buckets",hint:"Pick one of your labels \u2014 and take the \u201Cnot sure\u201D path when it cannot tell",glyph:"g-branch",icon:"branch"},{id:"node.branch",type:"branch",label:"If this, then that",hint:"Send the run down one path or another",glyph:"g-branch",icon:"branch"},{id:"node.rule",type:"rule",label:"A table of rules",hint:"Several conditions at once; first match wins",glyph:"g-branch",icon:"branch"},{id:"node.gateway.parallel",type:"gateway.parallel",label:"Do several at once",hint:"Split into parallel paths, then join them",glyph:"g-branch",icon:"branch"},{id:"node.end",type:"end",label:"Finish",hint:"The run ends here",glyph:"g-end",icon:"stop"}]},{section:"Do something",items:[{id:"action.send",type:"action.send",label:"Send a message",hint:"Post to WhatsApp, Telegram, GitLab \u2014 anywhere you have a channel",glyph:"g-action",icon:"msg"},{id:"action.createIssue",type:"action.createIssue",label:"Open an issue",hint:"Create a new GitLab issue",glyph:"g-action",icon:"plus"},{id:"action.setLabel",type:"action.setLabel",label:"Change a label",hint:"Add or remove labels",glyph:"g-action",icon:"tag"},{id:"action.react",type:"action.react",label:"React to a message",hint:"Add an emoji reaction",glyph:"g-action",icon:"msg"},{id:"action.editMessage",type:"action.editMessage",label:"Edit a message",hint:"Change a message you already sent",glyph:"g-action",icon:"msg"},{id:"action.readLabel",type:"action.readLabel",label:"Read a label",hint:"Look at the labels on an issue before deciding",glyph:"g-action",icon:"tag"},{id:"action.callHTTP",type:"action.callHTTP",label:"Call a web address",hint:"Hand work to n8n, or any service with a URL",glyph:"g-action",icon:"globe"},{id:"action.builtin",type:"action.builtin",label:"Use a built-in step",hint:"Fetch a page, extract fields, and other bundled helpers",glyph:"g-action",icon:"lightning"},{id:"action.run",type:"action.run",label:"Run a saved action",hint:"Invoke something from your action registry",glyph:"g-action",icon:"lightning"},{id:"action.logTime",type:"action.logTime",label:"Log time spent",hint:"Record how long this took",glyph:"g-action",icon:"clock"}]},{section:"Talk to other workflows",items:[{id:"node.subProcess",type:"subProcess",label:"Run another workflow",hint:"Call one, and carry on when it finishes",glyph:"g-state",icon:"box"},{id:"node.signal.emit",type:"signal.emit",label:"Tell other workflows",hint:"Announce that something happened",glyph:"g-action",icon:"msg"},{id:"node.signal.wait",type:"signal.wait",label:"Wait to be told",hint:"Hold until another workflow announces it",glyph:"g-branch",icon:"flag"}]}],ws=[{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.)"}]}],xs=[{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}],Cp=[{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}];function ks(e){for(let t of ys){let n=t.items.find(r=>r.type===e);if(n)return n.label}return e}function Np(e,t){let n=o=>typeof t[o]=="string"?t[o].trim():"",r=(o,i=70)=>o.length>i?o.slice(0,i-1)+"\u2026":o;switch(e){case"trigger.channel":return n("source")?`when ${n("source")} has activity`:"";case"trigger.cron":return n("schedule")?`at ${n("schedule")}`:"";case"trigger.hook":return n("event")==="on:n8n"?"when n8n calls":n("event")?`on ${n("event")}`:"";case"trigger.poll":return n("actionId")?`new items from ${n("actionId")}`:"";case"trigger.form":return n("formId")?`form: ${n("formId")}`:"";case"agent":{let o=n("agentId")||n("agent"),i=n("prompt")||n("message");return[o&&`ask ${o}`,i&&r(i)].filter(Boolean).join(" \u2014 ")}case"action.send":return r(n("text")||n("body"))||n("channel")&&`to ${n("channel")}`;case"action.callHTTP":return r(n("url"));case"action.builtin":return n("name");case"action.run":return n("action")||n("name");case"action.createIssue":return r(n("title"));case"action.setLabel":return n("label")?`label: ${n("label")}`:"";case"subProcess":return n("workflowId")?`runs ${n("workflowId")}`:"";case"signal.emit":case"signal.wait":return n("signal")?`signal: ${n("signal")}`:"";case"timer.boundary":return n("duration")?`waits ${n("duration")}`:"";case"userTask":return n("assignTo")?`asks ${n("assignTo")}`:"";case"owner.notify":return r(n("text"));case"owner.ask":return r(n("ask"));case"person.message":return[n("to")&&`to ${n("to")}`,r(n("text"))].filter(Boolean).join(" \u2014 ");case"person.wait":return n("timeout")?`waits up to ${n("timeout")}`:"";case"branch":{let o=Array.isArray(t.cases)?t.cases.length:0;return o?`${o} way${o===1?"":"s"} out`:""}default:return""}}var Ep={"owner.ask":{main:"yes",other:["no","expired"]},"person.message":{main:"sent",other:["declined"]},"person.wait":{main:"reply",other:["timeout"]}},Ag="unsure";function Hi(e){return typeof e=="string"?e:""}function zg(e){let t=e.config??{};return e.type==="branch"?[...(Array.isArray(t.cases)?t.cases:[]).map(r=>Hi(r?.to)),Hi(t.default)]:e.type==="rule"?[...(Array.isArray(t.rules)?t.rules:[]).map(r=>Hi(r?.to)),Hi(t.default?.to)]:e.type==="classify"?[...Array.isArray(t.labels)?t.labels.map(String):t.labels&&typeof t.labels=="object"?Object.keys(t.labels):[],Ag]:[]}function jn(e,t=[]){if(e.type==="end")return[];let n=Ep[e.type],r=n?[{name:void 0,label:n.main},...n.other.map(i=>({name:i,label:i}))]:zg(e).filter(Boolean).map(i=>({name:i,label:i})),o=new Set(r.map(i=>i.name??""));n&&o.add(n.main);for(let i of t){if(i.from!==e.id)continue;let a=i.fromPort??"";o.has(a)||(o.add(a),r.push({name:i.fromPort,label:i.fromPort??""}))}return r.length||r.push({name:void 0,label:""}),r}function bs(e,t,n){let r=n?Ep[n]:void 0,o=r&&t.fromPort===r.main?void 0:t.fromPort,i=e.findIndex(a=>(a.name??"")===(o??""));return i<0?0:i}function br(e,t,n){return e*(t+1)/(n+1)}function Dg(e,t){let n=new Map(e.map((s,c)=>[s.id,c])),r=e.map(()=>[]),o=e.map(()=>0);t.forEach((s,c)=>{let d=n.get(s.from),p=n.get(s.to);d===void 0||p===void 0||d===p||(r[d].push(c),o[p]++)});for(let s of r)s.sort((c,d)=>t[c].port-t[d].port);let i=new Set,a=e.map(()=>0),u=[...e.keys()].filter(s=>o[s]===0).concat([...e.keys()]);for(let s of u){if(a[s])continue;let c=[[s,0]];for(a[s]=1;c.length;){let d=c[c.length-1],[p,g]=d;if(g>=r[p].length){a[p]=2,c.pop();continue}d[1]++;let v=r[p][g],b=n.get(t[v].to);a[b]===1?i.add(v):a[b]===0&&(a[b]=1,c.push([b,0]))}}return t.forEach((s,c)=>{s.from===s.to&&i.add(c)}),i}function Tp(e,t,n={}){let r=n.gapX??110,o=n.gapY??40,i=n.margin??40;if(!e.length)return{};let a=new Map(e.map((_,O)=>[_.id,O])),u=Dg(e,t),s=e.map(_=>({id:_.id,w:_.w,h:_.h,ports:Math.max(1,_.ports),dummy:!1,layer:0,out:[],inn:[],key:0,pos:0,c:0})),c=[];t.forEach((_,O)=>{if(u.has(O))return;let V=a.get(_.from),B=a.get(_.to);V===void 0||B===void 0||c.push({a:V,b:B,port:_.port})});let d=s.map(()=>0),p=s.map(()=>[]);for(let _ of c)p[_.a].push(_.b),d[_.b]++;let g=[...s.keys()].filter(_=>d[_]===0),v=[];for(;g.length;){let _=g.shift();v.push(_);for(let O of p[_])s[O].layer=Math.max(s[O].layer,s[_].layer+1),--d[O]===0&&g.push(O)}{let _=s.map(()=>[]);for(let $ of c)_[$.a].push({b:$.b,port:$.port});_.forEach($=>$.sort((J,Z)=>J.port-Z.port));let O=0,V=new Set,B=$=>{let J=[$];for(;J.length;){let Z=J.pop();if(!V.has(Z)){V.add(Z),s[Z].key=O++;for(let le=_[Z].length-1;le>=0;le--)J.push(_[Z][le].b)}}};v.forEach($=>{c.some(J=>J.b===$)||B($)}),v.forEach(B)}for(let _ of c){let O=_.a,V=_.port;for(let B=s[_.a].layer+1;B<s[_.b].layer;B++){let $=s.length;s.push({id:"",w:0,h:0,ports:1,dummy:!0,layer:B,out:[],inn:[],key:s[_.a].key+(B-s[_.a].layer)/100,pos:0,c:0}),s[O].out.push({v:$,port:V}),s[$].inn.push({v:O,port:V}),O=$,V=0}s[O].out.push({v:_.b,port:V}),s[_.b].inn.push({v:O,port:V})}let b=Math.max(...s.map(_=>_.layer))+1,w=Array.from({length:b},()=>[]);s.forEach((_,O)=>w[_.layer].push(O)),w.forEach(_=>_.sort((O,V)=>s[O].key-s[V].key));let G=()=>w.forEach(_=>_.forEach((O,V)=>{s[O].pos=V}));G();let f=(_,O)=>(O+1)/(s[_].ports+1)-.5,h=()=>{let _=0;for(let O=0;O+1<b;O++){let V=[];for(let B of w[O])for(let $ of s[B].out)V.push([s[B].pos+f(B,$.port)*.9,s[$.v].pos]);for(let B=0;B<V.length;B++)for(let $=B+1;$<V.length;$++)(V[B][0]-V[$][0])*(V[B][1]-V[$][1])<0&&_++}return _},m=w.map(_=>[..._]),x=h();for(let _=0;_<12&&x>0;_++){let O=_%2===0,V=O?[...Array(b).keys()].slice(1):[...Array(b).keys()].reverse().slice(1);for(let $ of V){let J=new Map;for(let Z of w[$]){let le=O?s[Z].inn.map(we=>s[we.v].pos+f(we.v,we.port)*.9):s[Z].out.map(we=>s[we.v].pos-f(Z,we.port)*.9);J.set(Z,le.length?le.reduce((we,nt)=>we+nt,0)/le.length:s[Z].pos)}w[$].sort((Z,le)=>J.get(Z)-J.get(le)),w[$].forEach((Z,le)=>{s[Z].pos=le})}let B=h();B<x&&(x=B,m=w.map($=>[...$]))}m.forEach((_,O)=>{w[O]=_}),G();let C=_=>s[_].dummy?8:s[_].h,F=(_,O)=>s[_].dummy&&s[O].dummy?12:s[_].dummy||s[O].dummy?o/2:o,L=(_,O)=>C(_)/2+F(_,O)+C(O)/2;for(let _ of w){let O=0;_.forEach((B,$)=>{$&&(O+=L(_[$-1],B)),s[B].c=O});let V=O/2;_.forEach(B=>{s[B].c-=V})}let R=(_,O)=>s[_].c-C(_)/2+(s[_].dummy?C(_)/2:br(C(_),O,s[_].ports)),H=(_,O)=>{let V=[0];for(let J=1;J<_.length;J++)V.push(V[J-1]+L(_[J-1],_[J]));let B=[];_.forEach((J,Z)=>{let le=s[J].dummy?.3:1;for(B.push({sum:(O[Z]-V[Z])*le,w:le,n:1});B.length>1;){let we=B[B.length-1],nt=B[B.length-2];if(nt.sum/nt.w<=we.sum/we.w)break;B.splice(B.length-2,2,{sum:nt.sum+we.sum,w:nt.w+we.w,n:nt.n+we.n})}});let $=0;for(let J of B)for(let Z=0;Z<J.n;Z++,$++)s[_[$]].c=J.sum/J.w+V[$]};for(let _=0;_<8;_++){let O=_%2===0,V=O?[...Array(b).keys()].slice(1):[...Array(b).keys()].reverse().slice(1);for(let B of V){let $=w[B].map(J=>{let Z=O?s[J].inn.map(le=>R(le.v,le.port)):s[J].out.map(le=>s[le.v].c-(R(J,le.port)-s[J].c));return Z.length?Z.reduce((le,we)=>le+we,0)/Z.length:s[J].c});H(w[B],$)}}let z=[],Se=i;for(let _ of w){z.push(Se);let O=Math.max(0,..._.filter(V=>!s[V].dummy).map(V=>s[V].w));Se+=(O||40)+r}let tt=s.filter(_=>!_.dummy),vt=Math.min(...tt.map(_=>_.c-_.h/2)),zt={};for(let _ of tt)zt[_.id]={x:Math.round(z[_.layer]),y:Math.round(_.c-_.h/2-vt+i)};return zt}var Wg={trigger:220,branch:240,action:220,end:160,agent:240,checkpoint:220,transform:220},jg={trigger:46,branch:92,action:78,end:46,agent:104,checkpoint:92,transform:78},Ug=26;function _s(e){return e.startsWith("trigger.")?"trigger":e.startsWith("action.")?"action":e}function et(e,t=[]){let n=_s(e.type),r=jn(e,t).length,o=Math.max(jg[n]??92,r>1?18+Ug*r:0);return{w:Wg[n]??220,h:o}}function Ss(e,t,n){let{w:r,h:o}=et(e,n),i=jn(e,n),a=bs(i,t,e.type);return{x:(e.position?.x??0)+r,y:(e.position?.y??0)+br(o,a,i.length)}}function Pp(e,t){let{h:n}=et(e,t);return{x:e.position?.x??0,y:(e.position?.y??0)+n/2}}function vo(e,t){let n=new Map(e.map(r=>[r.id,r]));return Tp(e.map(r=>({id:r.id,...et(r,t),ports:jn(r,t).length})),t.filter(r=>n.has(r.from)&&n.has(r.to)).map(r=>{let o=n.get(r.from);return{from:r.from,to:r.to,port:bs(jn(o,t),r,o.type)}}))}function Mp(e){return e.some(t=>!t.position)?!0:e.length>1&&new Set(e.map(t=>`${t.position.x},${t.position.y}`)).size===1}var j=ge(De(),1);function bn(e){return e.position?.x??0}function Et(e){return e.position?.y??0}function Fp(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 $g(e,t,n){return`M ${e.x} ${e.y} C ${e.x+28*2} ${e.y}, ${e.x+28*2} ${n}, ${e.x} ${n} L ${t.x} ${n} C ${t.x-28*2} ${n}, ${t.x-28*2} ${t.y}, ${t.x} ${t.y}`}function Hg(e){let{n:t,edges:n,selected:r,state:o}=e,{w:i,h:a}=et(t,n),u=jn(t,n),s=_s(t.type),c=Np(t.type,t.config??{}),d=t.config,p=s==="trigger"?d.source==="cron"?"clock":d.source==="webhook"||d.source==="hook"?"hook":d.source==="manual"?"play":"gitlab":s==="agent"?"box":s==="branch"?"branch":s==="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":s==="checkpoint"?"flag":s==="transform"?"variable":"stop",g=K[p]??K.box,v=["node",`t-${s}`,r&&"is-selected",e.drop&&"is-drop",o==="running"&&"is-running",o==="visited"&&"is-visited",o==="error"&&"is-error"].filter(Boolean).join(" "),b={left:bn(t),top:Et(t),width:i,height:a},w=d.agentId,G=d.prompt;return(0,j.jsxs)("div",{className:v,style:b,tabIndex:0,role:"button","data-node":t.id,"aria-label":`${ks(t.type)} ${t.id}`,"aria-pressed":r,onPointerDown:f=>e.onMouseDown?.(f,t),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),e.onClick?.(f,t))},onClick:f=>e.onClick?.(f,t),onDoubleClick:f=>e.onDoubleClick?.(f,t),children:[(0,j.jsx)("div",{className:"node__stripe"}),(0,j.jsxs)("div",{className:"node__head",children:[(0,j.jsx)("div",{className:"node__icon",children:(0,j.jsx)(g,{})}),(0,j.jsxs)("div",{className:"node__meta",children:[(0,j.jsx)("div",{className:"node__kind",children:ks(t.type)}),(0,j.jsx)("div",{className:"node__name",children:t.id})]}),s!=="trigger"&&s!=="end"&&(0,j.jsx)("div",{className:"node__chev",children:(0,j.jsx)(K.more,{})})]}),c&&(0,j.jsx)("div",{className:"node__body",children:(0,j.jsx)("div",{className:"node__row node__row--summary",children:c})}),s!=="trigger"&&(0,j.jsx)("div",{className:"handle h-in",title:"Drop a connection here",onPointerDown:f=>e.onPortDown?.(f,t,null),onPointerEnter:()=>e.onPortEnter?.(t),onPointerLeave:()=>e.onPortLeave?.()}),u.map((f,h)=>(0,j.jsx)("div",{className:"handle h-out"+(f.label?" has-label":""),style:{top:br(a,h,u.length)},title:f.label?`Leaves here when: ${f.label}`:"Drag to connect",onPointerDown:m=>e.onPortDown?.(m,t,f),children:f.label&&(0,j.jsx)("span",{className:"handle__label",children:f.label})},f.name??""))]})}function Bg({nodes:e,edges:t,viewBox:n,selection:r,hostRef:o}){let[i,a]=(0,Le.useState)(!1);if(!e.length)return null;let u=60,s=e.map(H=>bn(H)),c=e.map(H=>Et(H)),d=e.map(H=>et(H,t).w),p=e.map(H=>et(H,t).h),g=Math.min(...s)-u,v=Math.min(...c)-u,b=Math.max(...s.map((H,z)=>H+d[z]))+u,w=Math.max(...c.map((H,z)=>H+p[z]))+u,G=b-g,f=w-v,h=o.current?.getBoundingClientRect(),m=h?.width??800,x=h?.height??500,C=-n.tx/n.zoom,F=-n.ty/n.zoom,L=m/n.zoom,R=x/n.zoom;return(0,j.jsxs)("div",{className:"cv__mini"+(i?" is-collapsed":""),children:[(0,j.jsxs)("div",{className:"cv__mini-head",children:[(0,j.jsx)("span",{children:"Map"}),(0,j.jsx)("button",{onClick:()=>a(!i),children:(0,j.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:(0,j.jsx)("path",{d:i?"M2 4l3 3 3-3":"M2 6l3-3 3 3",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"})})})]}),!i&&(0,j.jsxs)("svg",{viewBox:`${g} ${v} ${G} ${f}`,preserveAspectRatio:"xMidYMid meet",children:[(0,j.jsx)("rect",{className:"mini-view",x:C,y:F,width:L,height:R}),e.map(H=>{let z=et(H,t),Se=r?.kind==="node"&&r.id===H.id;return(0,j.jsx)("rect",{className:"mini-node"+(Se?" sel":""),x:bn(H),y:Et(H),width:z.w,height:z.h,rx:3},H.id)})]})]})}var Cs=.2,Lp=2,Gg=.6;function Ip(e,t){let n=1/0,r=1/0,o=-1/0,i=-1/0;for(let a of e){let u=et(a,t);n=Math.min(n,bn(a)),r=Math.min(r,Et(a)),o=Math.max(o,bn(a)+u.w),i=Math.max(i,Et(a)+u.h)}return{minX:n,minY:r,maxX:o,maxY:i}}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,p=e.editable!==!1,g=(0,Le.useRef)(null),[v,b]=(0,Le.useState)(null),[w,G]=(0,Le.useState)(null),[f,h]=(0,Le.useState)(!1),[m,x]=(0,Le.useState)(null),[C,F]=(0,Le.useState)(null),[L,R]=(0,Le.useState)(null),{zoom:H,tx:z,ty:Se}=c,tt=(0,Le.useMemo)(()=>new Map(t.map(N=>[N.id,N])),[t]),vt=(N,D)=>{let I=g.current;if(!I)return{x:0,y:0};let Q=I.getBoundingClientRect();return{x:(N-Q.left-z)/H,y:(D-Q.top-Se)/H}},zt=N=>{let D=N.target;D!==N.currentTarget&&!D.classList.contains("cv__viewport")&&!D.classList.contains("cv__edges")||N.button!==0&&N.button!==1||(o(null),F({startX:N.clientX,startY:N.clientY,tx:z,ty:Se}))},_=(N,D)=>{if(N.target.classList.contains("handle")||(N.stopPropagation(),o({kind:"node",id:D.id}),!p))return;let I=vt(N.clientX,N.clientY);b({id:D.id,offX:I.x-bn(D),offY:I.y-Et(D)})},O=(N,D,I)=>{if(N.stopPropagation(),N.preventDefault(),!p||!I)return;let Q=Ss(D,{from:D.id,fromPort:I.name,to:""},n);G({from:{id:D.id,port:I},start:Q,x:Q.x,y:Q.y})},V=N=>{w&&x(N.id)},B=()=>x(null);(0,Le.useEffect)(()=>{if(!v&&!w&&!C)return;let N=I=>{if(v){let Q=vt(I.clientX,I.clientY);i(v.id,Math.round(Q.x-v.offX),Math.round(Q.y-v.offY))}else if(w){let Q=vt(I.clientX,I.clientY);G(se=>se&&{...se,x:Q.x,y:Q.y});let ee=document.elementFromPoint(I.clientX,I.clientY)?.closest("[data-node]");x(ee?ee.dataset.node??null:null)}else C&&d(Q=>({...Q,tx:C.tx+(I.clientX-C.startX),ty:C.ty+(I.clientY-C.startY)}))},D=()=>{w&&m&&m!==w.from.id&&!tt.get(m)?.type.startsWith("trigger.")&&u({from:w.from.id,fromPort:w.from.port.name,to:m}),v&&e.onNodeMoved?.(v.id),b(null),G(null),F(null),x(null)};return window.addEventListener("pointermove",N),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D),()=>{window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D)}},[v,w,C,m,u,i,d,tt]);let $=N=>{if(!N.ctrlKey&&!N.metaKey&&Math.abs(N.deltaY)<30){d(ae=>({...ae,tx:ae.tx-N.deltaX,ty:ae.ty-N.deltaY}));return}let D=g.current;if(!D)return;let I=D.getBoundingClientRect(),Q=N.clientX-I.left,ee=N.clientY-I.top,se=-N.deltaY*.0015;d(ae=>{let yt=Math.min(Lp,Math.max(Cs,ae.zoom*(1+se))),rt=yt/ae.zoom;return{zoom:yt,tx:Q-(Q-ae.tx)*rt,ty:ee-(ee-ae.ty)*rt}})};(0,Le.useEffect)(()=>{let N=g.current;if(!N)return;let D=I=>{(I.ctrlKey||I.metaKey)&&I.preventDefault()};return N.addEventListener("wheel",D,{passive:!1}),()=>N.removeEventListener("wheel",D)},[]);let J=N=>{let D=g.current?.getBoundingClientRect(),I=(D?.width??800)/2,Q=(D?.height??500)/2;d(ee=>{let se=Math.min(Lp,Math.max(Cs,ee.zoom*N)),ae=se/ee.zoom;return{zoom:se,tx:I-(I-ee.tx)*ae,ty:Q-(Q-ee.ty)*ae}})},Z=(N=!1)=>{let D=g.current;if(!D||!t.length)return;let I=D.getBoundingClientRect();if(!I.width||!I.height)return;let Q=48,ee=Ip(t,n),se=ee.maxX-ee.minX+Q*2,ae=ee.maxY-ee.minY+Q*2+40,yt=N?Math.min(Gg,1):Cs,rt=Math.max(yt,Math.min(1,I.width/se,I.height/ae)),Gn=(ee.maxX-ee.minX)*rt,Dt=(ee.maxY-ee.minY)*rt;d({zoom:rt,tx:(Gn+Q*2<=I.width?(I.width-Gn)/2:Q)-ee.minX*rt,ty:(Dt+Q*2<=I.height?(I.height-Dt)/2:Q)-ee.minY*rt})};(0,Le.useEffect)(()=>{e.fitSignal&&requestAnimationFrame(()=>Z(!0))},[e.fitSignal]),(0,Le.useEffect)(()=>{let N=()=>Z(),D=g.current;return D?.addEventListener("wfe:fit",N),()=>D?.removeEventListener("wfe:fit",N)});let le=N=>{p&&(N.preventDefault(),h(!0))},we=()=>h(!1),nt=N=>{if(N.preventDefault(),h(!1),!p)return;let D=N.dataTransfer.getData("application/x-wfe-item");if(D)try{let I=JSON.parse(D),Q=vt(N.clientX,N.clientY);a(I,Q.x-100,Q.y-40)}catch{}},As=N=>{let D=N.id??"",I=["wfe-edge"];return r?.kind==="edge"&&r.id===D&&I.push("is-selected"),L===D&&I.push("is-hover"),s?.currentEdgeId===D&&I.push("is-running"),D&&s?.visitedEdges?.has(D)&&I.push("is-visited"),I.join(" ")},Sn=N=>s?.currentNodeId===N.id?"running":s?.visitedNodes?.has(N.id)?"visited":null,Te=(0,Le.useMemo)(()=>{let N=t.length?Ip(t,n):{minX:0,minY:0,maxX:800,maxY:600};return{x:Math.min(0,N.minX)-400,y:Math.min(0,N.minY)-400,w:Math.max(N.maxX,0)-Math.min(0,N.minX)+800,h:Math.max(N.maxY,0)-Math.min(0,N.minY)+800}},[t,n]),Hn=(N,D,I,Q)=>{let ee=Math.max(I,Q);for(let se of t){let ae=et(se,n);bn(se)+ae.w>=Math.min(N.x,D.x)-40&&bn(se)<=Math.max(N.x,D.x)+40&&(ee=Math.max(ee,Et(se)+ae.h))}return ee+36},Bn=(0,Le.useMemo)(()=>w?(0,j.jsx)("svg",{className:"cv__ghost-edge",style:{left:Te.x,top:Te.y},width:Te.w,height:Te.h,viewBox:`${Te.x} ${Te.y} ${Te.w} ${Te.h}`,children:(0,j.jsx)("path",{d:Fp(w.start,{x:w.x,y:w.y})})}):null,[w,Te]);return(0,j.jsxs)("div",{className:"cv"+(C?" is-panning":"")+(f?" is-drop-target":"")+(w?" is-connecting":""),ref:g,onWheel:$,onPointerDown:zt,onDragOver:le,onDragLeave:we,onDrop:nt,children:[(0,j.jsxs)("div",{className:"cv__viewport",style:{transform:`translate(${z}px, ${Se}px) scale(${H})`},children:[(0,j.jsxs)("svg",{className:"cv__edges",style:{left:Te.x,top:Te.y},width:Te.w,height:Te.h,viewBox:`${Te.x} ${Te.y} ${Te.w} ${Te.h}`,children:[(0,j.jsxs)("defs",{children:[(0,j.jsx)("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,j.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"currentColor"})}),(0,j.jsx)("marker",{id:"arr-acc",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,j.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--accent)"})})]}),n.map((N,D)=>{let I=tt.get(N.from),Q=tt.get(N.to);if(!I||!Q)return null;let ee=N.id??`e-${D}`,se=Ss(I,N,n),ae=Pp(Q,n),yt=ae.x<se.x+24,rt=yt?$g(se,ae,Hn(se,ae,Et(I)+et(I,n).h,Et(Q)+et(Q,n).h)):Fp(se,ae),Gn=s?.currentEdgeId===ee||s?.visitedEdges?.has(ee)?"url(#arr-acc)":"url(#arr)",Dt=N.label&&!(I.type==="branch"||I.type==="rule"||I.type==="classify")?N.label:"",Pt=yt?{x:(se.x+ae.x)/2,y:Hn(se,ae,Et(I)+et(I,n).h,Et(Q)+et(Q,n).h)}:{x:(se.x+ae.x)/2,y:(se.y+ae.y)/2};return(0,j.jsxs)("g",{children:[(0,j.jsx)("path",{className:"edge-bg",d:rt,onPointerEnter:()=>R(ee),onPointerLeave:()=>R(null),onClick:()=>o({kind:"edge",id:ee})}),(0,j.jsx)("path",{className:As(N)+(yt?" is-loop":""),d:rt,markerEnd:Gn}),Dt&&(0,j.jsxs)("g",{transform:`translate(${Pt.x},${Pt.y})`,children:[(0,j.jsx)("rect",{className:"edge-label-bg",x:-Dt.length*3.6-6,y:-9,rx:3,width:Dt.length*7.2+12,height:18}),(0,j.jsx)("text",{className:"edge-label",y:4,textAnchor:"middle",children:Dt})]})]},ee)})]}),Bn,t.map(N=>(0,j.jsx)(Hg,{n:N,edges:n,selected:r?.kind==="node"&&r.id===N.id,state:Sn(N),drop:!!w&&m===N.id,onMouseDown:_,onPortDown:O,onPortEnter:V,onPortLeave:B,onClick:(D,I)=>{D.stopPropagation(),o({kind:"node",id:I.id})}},N.id))]}),(0,j.jsxs)("div",{className:"cv__controls",role:"toolbar","aria-label":"Zoom",children:[(0,j.jsx)("button",{type:"button",title:"Zoom out","aria-label":"Zoom out",onClick:()=>J(1/1.2),children:(0,j.jsx)(K.zoomout,{})}),(0,j.jsxs)("div",{className:"cv__zoom",children:[Math.round(H*100),"%"]}),(0,j.jsx)("button",{type:"button",title:"Zoom in","aria-label":"Zoom in",onClick:()=>J(1.2),children:(0,j.jsx)(K.zoomin,{})}),(0,j.jsx)("button",{type:"button",title:"Fit the workflow in view (F)","aria-label":"Fit",onClick:()=>Z(),children:(0,j.jsx)(K.fit,{})})]}),(0,j.jsx)(Bg,{nodes:t,edges:n,viewBox:c,selection:r,hostRef:g})]})}var fe=ge(Ut(),1);var Vg=[{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:'"10000000000@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:'"Alex"',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:'"acme/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"]}],Kg=[{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"}],Yg=[{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."}],Qg=[{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`."}],Xg=[{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."}],Jg=[{path:"labels",type:"array",description:"Current label list on the entity. Use with a `branch` node to route on label state."}],qg=[{path:"emoji",type:"string",description:"The emoji reaction that was applied (echoes the input for debugging)."}],Zg=[{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."}],em=[{path:"durationMs",type:"number",description:"Duration logged, in milliseconds (echoed for downstream use)."}],tm=[{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."}],nm=[{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."}],rm=[{path:"*",type:"any",description:"The built-in's typed response. Shape depends on the action \u2014 e.g. http.fetch returns {status, statusText, headers, body, truncated, url}; mesh.delegate returns {peer, agent, response}; extract.structured returns {data, model, usage}. See GET /api/actions/builtin for each action's schema."}],om=[{path:"port",type:"string",description:"Which outgoing port matched. Downstream edges with `fromPort` matching this value will fire."}],im=[{path:"label",type:"string",description:"The label chosen. Also the port that fires.",example:'"bug"'},{path:"result",type:"string",description:"Alias of `label`, so a workflow migrating off an `agent` + RESULT-token node keeps its existing {{node.result}} references working.",example:'"bug"'},{path:"confidence",type:"number",description:"How peaked the distribution was, 0-1. Compare against the node's minConfidence.",example:"0.93"},{path:"probabilities",type:"object",description:"The full distribution over labels \u2014 every label with its probability.",example:'{"bug":0.93,"feature":0.05,"question":0.02}'},{path:"unsure",type:"bool",description:"True when confidence fell below minConfidence and the `unsure` port fired instead of a label port.",example:"false"},{path:"port",type:"string",description:"The port that fired: the chosen label, or `unsure`.",example:'"bug"'}],am=[{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)."}],lm=[{path:"event",type:"any",description:"Payload of the event that resumed this checkpoint. Fields mirror whichever trigger source delivered the resume event."}],sm=[{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."}],um=[{path:"emittedAt",type:"string",description:"ISO-8601 time the signal was published."}],cm=[{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."}],dm=[{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)."}],Ns={"trigger.channel":{summary:"Raw event payload from the source channel. Shape varies by `source` \u2014 the Context panel filters accordingly.",fields:Vg},"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."}]},"trigger.poll":{summary:"Runs a registered action on an interval and starts one run per new item it prints (one JSON object per line). The item is the payload.",fields:[{path:"",type:"any",description:"The item's own fields, e.g. `{{trigger.msgId}}`, `{{trigger.text}}`. Whatever the poll command printed for this item."}]},agent:{summary:"Agent response after executing the prompt template.",fields:Kg},classify:{summary:"A typed classification with a full probability distribution. Branches on its own result: the port named after the winning label fires, or `unsure` when nothing clears minConfidence.",fields:im},transform:{summary:"Value picked from upstream context (path mode) or rendered template bundle (template mode).",fields:am},branch:{summary:"Which outgoing port fired. Downstream edges match via `fromPort`.",fields:om},"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:Yg},"action.createIssue":{summary:"Created an issue on GitLab/GitHub.",fields:Qg},"action.setLabel":{summary:"Added/removed labels on a GitLab issue or MR.",fields:Xg},"action.readLabel":{summary:"Fetched the current label list \u2014 useful before a `branch`.",fields:Jg},"action.react":{summary:"Emoji reaction on a message (Telegram/WhatsApp).",fields:qg},"action.editMessage":{summary:"Edited an existing message in place.",fields:Zg},"action.logTime":{summary:"Logged time spent on a GitLab issue/MR.",fields:em},"action.callHTTP":{summary:"Made an outbound HTTP request with templated params.",fields:tm},"action.run":{summary:"Invoked a registered action from the action registry. Output is the full ActionRunResult.",fields:nm},"action.builtin":{summary:"Invoked a daemon-shipped typed built-in action (improvement plan #6) by name. Output is the built-in's validated response.",fields:rm},subProcess:{summary:"Spawned a child workflow and waited for its completion.",fields:dm},"signal.emit":{summary:"Published a signal to the bus. Runs elsewhere can resume on it via `signal.wait`.",fields:um},"signal.wait":{summary:"Paused until a matching signal arrives. Resumes with that signal in this node's output.",fields:sm},"timer.boundary":{summary:"Paused until a timer elapses. Resumes with timing metadata.",fields:cm},checkpoint:{summary:"Paused until a matching resume event arrives on this entity.",fields:lm},end:{summary:"Terminal node \u2014 closes the run with the configured status. No output downstream.",fields:[]},"owner.notify":{summary:"Told the owner, through the node's notifications.",fields:[{path:"text",type:"string",description:"What the owner was told."},{path:"sentAt",type:"string",description:"When (ISO time)."}]},"owner.ask":{summary:"The owner's answer on a decision card. Leaves on port yes, no or expired.",fields:[{path:"port",type:"string",description:"yes, no or expired.",example:'"yes"'},{path:"choice",type:"string",description:"The option the owner picked, when the card offered choices."},{path:"text",type:"string",description:"The draft as the owner approved it, after any edit."},{path:"note",type:"string",description:"The owner's note on the card."},{path:"cardId",type:"string",description:"The decision card's id."}]},"person.message":{summary:"A message to a person, sent once the owner approved it. Leaves on port sent or declined.",fields:[{path:"text",type:"string",description:"The text that was sent (the owner may have edited it)."},{path:"channel",type:"string",description:"Channel it went out on."},{path:"chatId",type:"string",description:"The person's chat."},{path:"messageId",type:"string",description:"Id of the sent message, when the channel gives one."},{path:"approved",type:"string",description:"start (approved with the run) or step (on its own card)."}]},"person.wait":{summary:"A person's reply. Leaves on port reply, or timeout when the deadline passed.",fields:[{path:"text",type:"string",description:"What the person wrote."},{path:"from",type:"string",description:"Sender id."},{path:"media",type:"any",description:"Attached file, when they sent one."},{path:"reminders",type:"number",description:"Reminders sent before the reply came."},{path:"timedOut",type:"bool",description:"True on the timeout port."}]}};function Op(e,t={}){let n=Ns[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=ge(De(),1);function W({title:e,children:t,defaultOpen:n=!0,right:r}){let[o,i]=(0,fe.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)(K.chev,{})}),(0,l.jsx)("h4",{children:e}),r]}),(0,l.jsx)("div",{className:"insp__section-body",children:t})]})}function k({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)(K.err,{}),n]})]})}function A({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 _n({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 Bi({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 ke({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 Gi({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 Tt({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 pm(e){return typeof e=="boolean"?"boolean":typeof e=="number"?"number":Array.isArray(e)?"list":e&&typeof e=="object"?"json":"string"}function $n({value:e,onChange:t,keyPlaceholder:n="key",valuePlaceholder:r="value",allowedTypes:o=["string","number","boolean","list","json"],emptyHint:i}){let a=Object.entries(e||{}),u=s=>{let c={};for(let[d,p]of s)d&&(c[d]=p);t(c)};return(0,l.jsxs)("div",{className:"kv-editor",children:[a.length===0&&i&&(0,l.jsx)("div",{className:"kv-editor__empty",children:i}),a.map(([s,c],d)=>(0,l.jsx)(fm,{k:s,v:c,allowedTypes:o,keyPlaceholder:n,valuePlaceholder:r,onKey:p=>{let g=a.slice();g[d]=[p,g[d][1]],u(g)},onValue:p=>{let g=a.slice();g[d]=[g[d][0],p],u(g)},onRemove:()=>{let p=a.slice();p.splice(d,1),u(p)}},d)),(0,l.jsx)("button",{type:"button",className:"kv-editor__add",onClick:()=>u([...a,["",""]]),children:"+ Add field"})]})}function fm({k:e,v:t,allowedTypes:n,keyPlaceholder:r,valuePlaceholder:o,onKey:i,onValue:a,onRemove:u}){let[s,c]=(0,fe.useState)(pm(t)),d=p=>{c(p),a(p==="boolean"?typeof t=="boolean"?t:!1:p==="number"?typeof t=="number"?t:Number(t)||0:p==="list"?Array.isArray(t)?t:typeof t=="string"&&t?t.split(",").map(g=>g.trim()):[]:p==="json"?typeof t=="object"&&t&&!Array.isArray(t)?t:{}:typeof t=="string"?t:String(t??""))};return(0,l.jsxs)("div",{className:"kv-editor__row",children:[(0,l.jsx)("input",{className:"fld__input mono kv-editor__key",type:"text",value:e,placeholder:r,onChange:p=>i(p.target.value)}),n.length>1&&(0,l.jsx)("select",{className:"fld__input kv-editor__type",value:s,onChange:p=>d(p.target.value),children:n.map(p=>(0,l.jsx)("option",{value:p,children:p},p))}),(0,l.jsxs)("div",{className:"kv-editor__val",children:[s==="string"&&(0,l.jsx)(Un,{rows:1,value:typeof t=="string"?t:"",onChange:p=>a(p),placeholder:o}),s==="number"&&(0,l.jsx)("input",{className:"fld__input",type:"number",value:typeof t=="number"?String(t):"",onChange:p=>a(p.target.value===""?0:Number(p.target.value))}),s==="boolean"&&(0,l.jsx)(Gi,{checked:!!t,onChange:p=>a(p),label:String(!!t)}),s==="list"&&(0,l.jsx)(Tt,{value:Array.isArray(t)?t.map(String):[],onChange:p=>a(p),placeholder:"comma,separated,values"}),s==="json"&&(0,l.jsx)("textarea",{className:"fld__input mono kv-editor__json",rows:2,value:JSON.stringify(t??{},null,2),onChange:p=>{try{a(JSON.parse(p.target.value))}catch{}}})]}),(0,l.jsx)("button",{type:"button",className:"kv-editor__remove",onClick:u,title:"Remove field",children:"\xD7"})]})}function Un({value:e,onChange:t,placeholder:n,rows:r=3}){let[o,i]=(0,fe.useState)(!1),[a,u]=(0,fe.useState)(0),s=(0,fe.useRef)(null),c=(0,fe.useMemo)(()=>{let g=[];return ws.forEach(v=>v.items.forEach(b=>g.push({group:v.group,...b}))),g},[]),d=g=>{let v=s.current;if(!v)return;let b=v.selectionStart,w=e.slice(0,b),G=e.slice(b),h=w.endsWith("{{")?w:w+"{{",m=h+g+"}}"+G;t(m),i(!1),requestAnimationFrame(()=>{v.focus();let x=h.length+g.length+2;v.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:g=>t(g.target.value),onKeyDown:g=>{if(!o){g.key==="{"&&g.shiftKey&&i(!0);return}g.key==="ArrowDown"?(g.preventDefault(),u(v=>(v+1)%c.length)):g.key==="ArrowUp"?(g.preventDefault(),u(v=>(v-1+c.length)%c.length)):g.key==="Enter"||g.key==="Tab"?(g.preventDefault(),d(c[a].path)):g.key==="Escape"&&i(!1)}}),(0,l.jsxs)("div",{className:"fld__hint",style:{display:"flex",alignItems:"center",gap:6,marginTop:4},children:[(0,l.jsx)(K.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)(K.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:ws.map(g=>(0,l.jsxs)(fe.Fragment,{children:[(0,l.jsx)("div",{className:"expr__pop-group",style:{padding:"4px 10px",fontSize:10,color:"var(--muted)",textTransform:"uppercase",letterSpacing:.5},children:g.group}),g.items.map(v=>{let b=c.findIndex(G=>G.path===v.path);return(0,l.jsxs)("div",{onMouseEnter:()=>u(b),onClick:()=>d(v.path),style:{padding:"4px 10px",cursor:"pointer",fontSize:11,display:"flex",justifyContent:"space-between",gap:12,fontFamily:"var(--ax-mono, ui-monospace)",background:b===a?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{children:`{{${v.path}}}`}),(0,l.jsx)("span",{style:{color:"var(--muted)",fontSize:10},children:v.type})]},v.path)})]},g.group))})]})}function hm({value:e,onChange:t,agents:n}){let[r,o]=(0,fe.useState)(!1),[i,a]=(0,fe.useState)(""),u=(0,fe.useRef)(null);(0,fe.useEffect)(()=>{let d=p=>{u.current&&!u.current.contains(p.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)(K.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(p=>(0,l.jsx)("span",{style:{fontSize:9,color:"var(--muted)",background:"var(--surface)",padding:"1px 5px",borderRadius:3},children:p},p))})]},d.id)),c.length===0&&(0,l.jsx)("div",{style:{padding:10,fontSize:11,color:"var(--muted)"},children:"No agents match."})]})]}),(0,l.jsx)(k,{label:"",hint:"Free text \u2014 type an agent id directly if it isn't in the list yet",children:(0,l.jsx)(A,{value:e??"",onChange:t,placeholder:"agent-id",mono:!0})})]})}var Ps={"whatsapp-message":{label:"WhatsApp \u2014 Incoming message",fires:"Fires when a contact or group sends a WhatsApp message to the paired account.",wired:!0,group:"channel-msg",hasLabels:!1},"telegram-message":{label:"Telegram \u2014 Incoming message",fires:"Fires when a Telegram user or group sends a message to the bot.",wired:!0,group:"channel-msg",hasLabels:!1},"discord-message":{label:"Discord \u2014 Incoming message",fires:"Fires when a Discord user posts a message in a watched channel or DM.",wired:!1,group:"channel-msg",hasLabels:!1},"slack-message":{label:"Slack \u2014 Incoming message",fires:"Fires when a Slack user posts a message in a watched channel or DM.",wired:!1,group:"channel-msg",hasLabels:!1},"gitlab-issue":{label:"GitLab \u2014 Issue event",fires:"Fires when a GitLab issue is opened, updated, reopened, or closed.",wired:!0,group:"gitlab",hasLabels:!0},"gitlab-mr":{label:"GitLab \u2014 Merge request event",fires:"Fires when a GitLab merge request is opened, updated, approved, merged, or closed.",wired:!0,group:"gitlab",hasLabels:!0},"gitlab-note":{label:"GitLab \u2014 Comment on issue or MR",fires:"Fires when a comment is posted on a GitLab issue or merge request.",wired:!0,group:"gitlab",hasLabels:!1},"gitlab-pipeline":{label:"GitLab \u2014 Pipeline status change",fires:"Fires when a CI/CD pipeline transitions state (running, success, failed).",wired:!0,group:"gitlab",hasLabels:!1},"github-issue":{label:"GitHub \u2014 Issue event",fires:"Fires when a GitHub issue is opened, updated, or closed (after webhook signature verification).",wired:!0,group:"github",hasLabels:!0},"github-pr":{label:"GitHub \u2014 Pull request event",fires:"Fires when a GitHub pull request is opened, updated, reviewed, merged, or closed.",wired:!0,group:"github",hasLabels:!0},"stripe-event":{label:"Stripe \u2014 Webhook event",fires:"Fires on any Stripe webhook (invoice.paid, customer.subscription.deleted, charge.refunded, etc.). Filter by event type in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1},"sentry-issue":{label:"Sentry \u2014 Issue alert",fires:"Fires when Sentry triggers an issue alert (new issue, regression, threshold breach).",wired:!0,group:"external-webhook",hasLabels:!1},"vercel-deployment":{label:"Vercel \u2014 Deployment event",fires:"Fires when Vercel reports a deployment state change (created, ready, error).",wired:!0,group:"external-webhook",hasLabels:!1},"odoo-event":{label:"Odoo \u2014 ERP/CRM event",fires:"Fires on any Odoo webhook (contact create, lead won, sale confirmed, invoice paid, project task updated, etc.). Filter by event/model in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1},"hubspot-event":{label:"HubSpot \u2014 CRM event",fires:"Fires on any HubSpot v3 webhook (contact.creation, deal.propertyChange, conversation.newMessage, etc.). Filter by subscriptionType in the workflow body.",wired:!0,group:"external-webhook",hasLabels:!1}},gm=Object.entries(Ps).map(([e,t])=>({value:e,label:t.wired?`${t.label} \u2713`:`${t.label} \u26A0 schema-only`}));function mm({node:e,patchData:t}){let n=e.config,r=n.filter??{},o=p=>t({filter:{...r,...p}}),i=String(n.source??"whatsapp-message"),a=Ps[i]??Ps["whatsapp-message"],u=a.group==="channel-msg",s=a.group==="gitlab",c=a.group==="github",d=u||s||c;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{title:"Source",children:[(0,l.jsx)(k,{label:"Event",hint:a.wired?"\u2713 wired end-to-end":"\u26A0 schema-only \u2014 no webhook subscriber configured for this source yet",children:(0,l.jsx)(ke,{value:i,onChange:p=>t({source:p,filter:{}}),options:gm})}),(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:-6,marginBottom:12},children:a.fires})]}),d&&(0,l.jsxs)(W,{title:"Match criteria",children:[(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginBottom:8},children:["Limit when this trigger fires. Leave empty or use ",(0,l.jsx)("span",{className:"mono",children:"*"})," to match anything."]}),s&&(0,l.jsx)(k,{label:"Project",hint:'GitLab project path. Empty or "*" matches any.',children:(0,l.jsx)(A,{mono:!0,value:String(r.project??""),onChange:p=>o({project:p}),placeholder:"* (any) or acme/web"})}),c&&(0,l.jsx)(k,{label:"Repo",hint:'GitHub "owner/repo". Empty or "*" matches any.',children:(0,l.jsx)(A,{mono:!0,value:String(r.repo??""),onChange:p=>o({repo:p}),placeholder:"* (any) or owner/repo"})}),u&&(0,l.jsx)(k,{label:"Chat",hint:i==="whatsapp-message"?'Contact number or JID (e.g. "+216 00 000 000", "10000000000@s.whatsapp.net"). Empty or "*" matches any.':i==="telegram-message"?'Telegram chat id ("1816212449" for a DM, "-1003861455814" for a group). Empty or "*" matches any.':'Exact chat id. Empty or "*" matches any.',children:(0,l.jsx)(A,{mono:!0,value:String(r.chat??""),onChange:p=>o({chat:p}),placeholder:"* (any)"})}),a.hasLabels&&(0,l.jsx)(k,{label:"Labels (any of)",hint:"Fires only when at least one of these labels is present on the issue/MR. Empty = no label filter.",children:(0,l.jsx)(Tt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:p=>o({labels:p}),placeholder:"bug, needs-review"})})]}),u&&(0,l.jsx)(W,{title:"Routing",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Pass data straight through",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)(Gi,{checked:!!n.passthrough,onChange:p=>t({passthrough:p}),label:"Let the default agent also reply"})})})]})}function vm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Schedule",children:[(0,l.jsx)(k,{label:"When it runs",hint:"5 fields: minute hour day month weekday. E.g. '0 9 * * 1-5' = 9am Mon\u2013Fri.",children:(0,l.jsx)(A,{mono:!0,value:String(n.spec??"0 * * * *"),onChange:r=>t({spec:r}),placeholder:"0 9 * * *"})}),(0,l.jsx)(k,{label:"Timezone",hint:"IANA timezone (e.g. Europe/London, America/New_York). Defaults to UTC.",children:(0,l.jsx)(A,{mono:!0,value:String(n.timezone??"UTC"),onChange:r=>t({timezone:r}),placeholder:"Europe/London"})}),(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:4},children:["Fires the workflow on the schedule. The trigger payload is empty \u2014 downstream nodes won't have ",(0,l.jsx)("span",{className:"mono",children:"{{start.*}}"})," data unless you wire it."]})]})}function ym({node:e,patchData:t}){let n=e.config,r=Array.isArray(n.filter)?n.filter.length:0;return(0,l.jsxs)(W,{title:"Poll",children:[(0,l.jsx)(k,{label:"Which saved action",hint:"Slug of a registered action (.agentx/actions/<id>.json). It must print one JSON object per line.",children:(0,l.jsx)(A,{mono:!0,value:String(n.actionId??""),onChange:o=>t({actionId:o}),placeholder:"list-new-messages"})}),(0,l.jsx)(k,{label:"Every (seconds)",hint:"How often the action runs. 5 or more; defaults to 60.",children:(0,l.jsx)(_n,{value:n.everySeconds,onChange:o=>t({everySeconds:o}),placeholder:"60"})}),(0,l.jsx)(k,{label:"Item key",hint:"Field that identifies an item, e.g. msgId. Each key starts one run, once.",children:(0,l.jsx)(A,{mono:!0,value:String(n.key??""),onChange:o=>t({key:o}),placeholder:"id"})}),(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:4},children:["The first poll only records what is already there. After that, each new item starts one run with its fields as ",(0,l.jsx)("span",{className:"mono",children:"{{trigger.*}}"}),"."," ",r>0?`${r} filter condition(s) set.`:"No filter."," Edit ",(0,l.jsx)("span",{className:"mono",children:"filter"})," under Advanced."]})]})}var Es=[{value:"on:gitlab-issue",label:"on:gitlab-issue",fires:"Fires when a GitLab issue is opened, updated, reopened, or closed (after the channel adapter dispatched it)."},{value:"on:gitlab-mr",label:"on:gitlab-mr",fires:"Fires when a GitLab merge request is opened, updated, approved, merged, or closed."},{value:"on:gitlab-note",label:"on:gitlab-note",fires:"Fires when a comment is posted on a GitLab issue or merge request."},{value:"on:gitlab-pipeline",label:"on:gitlab-pipeline",fires:"Fires when a GitLab CI/CD pipeline transitions state."},{value:"on:github-issue",label:"on:github-issue",fires:"Fires when a GitHub issue is opened, updated, or closed (signature-verified webhook)."},{value:"on:github-pr",label:"on:github-pr",fires:"Fires when a GitHub pull request is opened, reviewed, merged, or closed."},{value:"on:github-push",label:"on:github-push",fires:"Fires on any GitHub push event (branch updates)."},{value:"on:stripe-event",label:"on:stripe-event",fires:"Fires on any Stripe webhook (invoice.paid, charge.refunded, subscription.deleted, etc.). Filter by event type inside the workflow."},{value:"on:sentry-issue",label:"on:sentry-issue",fires:"Fires when a Sentry issue alert lands (new issue, regression, error threshold)."},{value:"on:vercel-deployment",label:"on:vercel-deployment",fires:"Fires when a Vercel deployment changes state."},{value:"on:odoo-event",label:"on:odoo-event",fires:"Fires on any Odoo webhook (res.partner.create, sale.order.action_confirm, account.move.paid, etc.). Filter by event/model inside the workflow."},{value:"on:hubspot-event",label:"on:hubspot-event",fires:"Fires on any HubSpot v3 webhook (contact.creation, deal.propertyChange, conversation.newMessage, etc.). Filter by subscriptionType inside the workflow."},{value:"on:error",label:"on:error",fires:"Fires when an agent task fails. Useful for incident-routing workflows."}];function wm({node:e,patchData:t}){let n=e.config,r=String(n.event??"on:"),i=Es.find(a=>a.value===r)?.fires??(r.startsWith("on:")&&r!=="on:"?"Custom hook event. Fires whenever code in your agentx setup emits this event via the bus. Subscribe responsibly.":'Hook event names must start with "on:" \u2014 e.g. on:gitlab-issue.');return(0,l.jsxs)(W,{title:"Hook subscription",children:[(0,l.jsxs)(k,{label:"Event",hint:"Pick a known event or type your own (must start with on:)",children:[(0,l.jsx)(A,{mono:!0,value:r,onChange:a=>t({event:a}),placeholder:"on:gitlab-issue",list:"hook-events-list"}),(0,l.jsx)("datalist",{id:"hook-events-list",children:Es.map(a=>(0,l.jsx)("option",{value:a.value,children:a.fires},a.value))})]}),(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5,marginTop:-6,marginBottom:4},children:i}),(0,l.jsxs)("details",{style:{marginTop:8},children:[(0,l.jsx)("summary",{style:{cursor:"pointer",fontSize:12,color:"var(--muted)"},children:"Available hook events"}),(0,l.jsx)("ul",{style:{fontSize:11,color:"var(--muted)",paddingLeft:16,marginTop:6},children:Es.map(a=>(0,l.jsxs)("li",{style:{marginBottom:4},children:[(0,l.jsx)("span",{className:"mono",children:a.value})," \u2014 ",a.fires]},a.value))})]})]})}function xm(e){return(0,l.jsx)(W,{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 km({node:e,patchData:t,agents:n}){let r=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{title:"Agent",children:[(0,l.jsx)(k,{label:"Which agent runs",children:(0,l.jsx)(hm,{value:r.agentId,onChange:o=>t({agentId:o}),agents:n})}),(0,l.jsx)(k,{label:"What to ask for",hint:"Supports {{nodeId.path}} variables from upstream context",children:(0,l.jsx)(Un,{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)(W,{title:"Behavior",defaultOpen:!1,children:[(0,l.jsx)(k,{label:"How to read the reply",hint:"How to extract a routing token from the agent's reply",children:(0,l.jsx)(ke,{value:String(r.resultParser??"acme-result-token"),onChange:o=>t({resultParser:o}),options:[{value:"acme-result-token",label:"RESULT: token (recommended)"},{value:"json",label:"JSON block (```json \u2026```)"},{value:"raw",label:"Raw reply (no parsing)"}]})}),(0,l.jsx)(k,{label:"Give up after (minutes)",children:(0,l.jsx)(_n,{value:r.timeoutMinutes,onChange:o=>t({timeoutMinutes:o}),placeholder:"5"})})]})]})}function bm({node:e,patchData:t}){let n=e.config,[r,o]=(0,fe.useState)(n.template&&typeof n.template=="object"?"template":"path");return(0,l.jsxs)(W,{title:"Transform",children:[(0,l.jsx)(k,{label:"Mode",children:(0,l.jsx)(ke,{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)(k,{label:"Path",hint:"e.g. classify.reply or trigger.contact.name",children:(0,l.jsx)(A,{mono:!0,value:String(n.path??""),onChange:i=>t({path:i}),placeholder:"classify.reply"})}),r==="template"&&(0,l.jsx)(k,{label:"Template",hint:"One field per output key. String values support {{nodeId.path}} variables.",children:(0,l.jsx)($n,{value:n.template??{},onChange:i=>t({template:i}),keyPlaceholder:"output key (e.g. greeting)",valuePlaceholder:"hi {{trigger.sender.name}}",emptyHint:"No fields yet \u2014 click + Add field below."})})]})}function _m({node:e,patchData:t}){let n=e.config,r=n.cases??[],o=s=>t({cases:s}),i=(s,c)=>o(r.map((d,p)=>p===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)(W,{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((p,g)=>g!==c)),children:(0,l.jsx)(K.trash,{})})]}),(0,l.jsx)(k,{label:"If",children:(0,l.jsx)(ke,{value:s.when.kind,onChange:p=>a(c,{kind:p,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)(k,{label:"Path",hint:"e.g. classify.result",children:(0,l.jsx)(A,{mono:!0,value:String(d.path??""),onChange:p=>u(c,{path:p}),placeholder:"classify.result"})}),(s.when.kind==="equals"||s.when.kind==="contains")&&(0,l.jsx)(k,{label:"Value",children:(0,l.jsx)(A,{mono:!0,value:String(d.value??""),onChange:p=>u(c,{value:p})})}),s.when.kind==="matches"&&(0,l.jsx)(k,{label:"Regex",children:(0,l.jsx)(A,{mono:!0,value:String(d.regex??""),onChange:p=>u(c,{regex:p}),placeholder:"^(approved|done)$"})}),(0,l.jsx)(k,{label:"Port",hint:"Outgoing edge's `fromPort` must match this",children:(0,l.jsx)(A,{mono:!0,value:s.to,onChange:p=>i(c,{...s,to:p}),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)(K.plus,{})," Add case"]})]}),(0,l.jsx)(W,{title:"Fallback",defaultOpen:!1,children:(0,l.jsx)(k,{label:"If nothing matches, go to",hint:"Used when no case matches. Leave blank to drop the event.",children:(0,l.jsx)(A,{mono:!0,value:String(n.default??"fallback"),onChange:s=>t({default:s})})})})]})}function Sm({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)(W,{title:"Checkpoint",children:(0,l.jsx)(k,{label:"Name",hint:"Human label shown in logs + run timelines",children:(0,l.jsx)(A,{value:String(n.name??e.id),onChange:a=>t({name:a}),placeholder:"await-label-change"})})}),(0,l.jsxs)(W,{title:"Wait for",children:[(0,l.jsx)(k,{label:"Source",hint:"Which kind of event unpauses this run",children:(0,l.jsx)(ke,{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)(k,{label:"Labels (any of)",hint:"e.g. a label change to one of these resumes the run",children:(0,l.jsx)(Tt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:a=>o({labels:a.length?a:void 0})})})]}),(0,l.jsx)(W,{title:"Advanced match",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Only if the event mentions",hint:"Optional substring match on the incoming event's id",children:(0,l.jsx)(A,{mono:!0,value:String(i.eventIdLike??""),onChange:a=>t({resumeMatch:{...i,eventIdLike:a||void 0}})})})})]})}function Cm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Terminal",children:[(0,l.jsx)(k,{label:"Status",children:(0,l.jsx)(ke,{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)(k,{label:"Short summary",hint:"Surfaced in run history + notifications",children:(0,l.jsx)(Bi,{value:String(n.summary??""),onChange:r=>t({summary:r}),rows:2})})]})}var Nm=["gitlab","github","whatsapp","telegram","discord","slack"],Ts=new Map,Ap=6e4;function Em(e){let[t,n]=(0,fe.useState)(()=>{let r=Ts.get(e);return r&&Date.now()-r.at<Ap?{chats:r.chats,source:r.source,loading:!1}:{chats:[],source:"",loading:!0}});return(0,fe.useEffect)(()=>{let r=!1,o=Ts.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:"";Ts.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 Tm({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=Em(a),s=`chats-${a}`;return(0,l.jsxs)(W,{title:"Send message",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:a,onChange:c=>t({channel:c}),options:Nm})}),(0,l.jsxs)(k,{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)(A,{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)(k,{label:"Text",hint:"Supports {{nodeId.path}} templates from any upstream node",children:(0,l.jsx)(Un,{value:String(r.text??""),onChange:c=>t({text:c}),rows:4,placeholder:`Thanks ${i("sender.name")} \u2014 working on it.`})}),(0,l.jsx)(k,{label:"Account id",hint:"Telegram only: which bot account sends. Leave empty to inherit from the trigger's account (recommended).",children:(0,l.jsx)(A,{mono:!0,value:String(r.accountId??""),onChange:c=>t({accountId:c}),placeholder:`(inherit from ${i("accountId")})`})}),(0,l.jsx)(k,{label:"Reply to which message",hint:"Optional. When set, the platform threads this reply under the referenced message.",children:(0,l.jsx)(A,{mono:!0,value:String(r.replyTo??""),onChange:c=>t({replyTo:c}),placeholder:i("event.id")})}),(0,l.jsx)(k,{label:"Text formatting",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)(ke,{value:String(r.parseMode??"markdown"),onChange:c=>t({parseMode:c}),options:["markdown","plain","html"]})})]})}function Pm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{title:"Target",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{label:"Project",hint:'GitLab "group/project" or GitHub "owner/repo"',children:(0,l.jsx)(A,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"acme/web"})})]}),(0,l.jsxs)(W,{title:"Issue",children:[(0,l.jsx)(k,{label:"Title",children:(0,l.jsx)(Un,{rows:1,value:String(n.title??""),onChange:r=>t({title:r}),placeholder:"From WhatsApp: {{trigger.sender.name}}"})}),(0,l.jsx)(k,{label:"Description",children:(0,l.jsx)(Un,{rows:6,value:String(n.description??""),onChange:r=>t({description:r}),placeholder:"Reported by {{trigger.sender.name}}\\n\\n{{trigger.text}}"})}),(0,l.jsx)(k,{label:"Labels",children:(0,l.jsx)(Tt,{mono:!0,value:Array.isArray(n.labels)?n.labels:[],onChange:r=>t({labels:r}),placeholder:"Triage, source::whatsapp"})}),(0,l.jsx)(k,{label:"Assignees",hint:"GitLab usernames (resolved to ids at runtime)",children:(0,l.jsx)(Tt,{mono:!0,value:Array.isArray(n.assignees)?n.assignees:[],onChange:r=>t({assignees:r}),placeholder:"alice, bob"})})]})]})}function Mm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{title:"Target",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{label:"What it is about",children:(0,l.jsx)(ke,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(k,{label:"Project",children:(0,l.jsx)(A,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"{{trigger.project}}"})}),(0,l.jsx)(k,{label:"Issue number",children:(0,l.jsx)(A,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r}),placeholder:"{{trigger.issue.iid}}"})})]}),(0,l.jsxs)(W,{title:"Labels",children:[(0,l.jsx)(k,{label:"Add",hint:"Comma-separated list",children:(0,l.jsx)(Tt,{value:Array.isArray(n.add)?n.add:[],onChange:r=>t({add:r}),placeholder:"In review"})}),(0,l.jsx)(k,{label:"Remove",children:(0,l.jsx)(Tt,{value:Array.isArray(n.remove)?n.remove:[],onChange:r=>t({remove:r}),placeholder:"Triage"})})]})]})}function Fm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Read labels",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(k,{label:"What it is about",children:(0,l.jsx)(ke,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(k,{label:"Project",children:(0,l.jsx)(A,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r})})}),(0,l.jsx)(k,{label:"Issue number",children:(0,l.jsx)(A,{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 Lm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"React",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp"]})}),(0,l.jsx)(k,{label:"Chat id",children:(0,l.jsx)(A,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(k,{label:"Message id",children:(0,l.jsx)(A,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r}),placeholder:"{{trigger.event.id}}"})}),(0,l.jsx)(k,{label:"Emoji",children:(0,l.jsx)(A,{value:String(n.emoji??"\u{1F440}"),onChange:r=>t({emoji:r})})})]})}function Im({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Edit message",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp","gitlab","github","discord","slack"]})}),(0,l.jsx)(k,{label:"Chat id",children:(0,l.jsx)(A,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r})})}),(0,l.jsx)(k,{label:"Message id",children:(0,l.jsx)(A,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r})})}),(0,l.jsx)(k,{label:"Replace the text with",children:(0,l.jsx)(Un,{value:String(n.text??""),onChange:r=>t({text:r}),rows:3})}),(0,l.jsx)(k,{label:"Text formatting",children:(0,l.jsx)(ke,{value:String(n.parseMode??"plain"),onChange:r=>t({parseMode:r}),options:["plain","markdown","html"]})})]})}function Rm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Log time",children:[(0,l.jsx)(k,{label:"Channel",children:(0,l.jsx)(ke,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab"]})}),(0,l.jsx)(k,{label:"Chat id",hint:'"project:issue:42" or "project:merge_request:7"',children:(0,l.jsx)(A,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(k,{label:"How long to wait",children:(0,l.jsx)(_n,{value:n.durationMs,onChange:r=>t({durationMs:r}),placeholder:"900000"})})]})}function Om({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(W,{title:"Action",children:(0,l.jsx)(k,{label:"Which saved action",hint:"Slug of a registered action (.agentx/actions/<id>.json). Manage in Settings \u2192 Actions or via `agentx actions`.",children:(0,l.jsx)(A,{mono:!0,value:String(n.actionId??""),onChange:r=>t({actionId:r}),placeholder:"deploy-staging"})})}),(0,l.jsx)(W,{title:"Inputs",defaultOpen:!0,children:(0,l.jsx)(k,{label:"Inputs",hint:"One field per input key. String values support {{nodeId.path}} variables.",children:(0,l.jsx)($n,{value:n.inputs??{},onChange:r=>t({inputs:r}),keyPlaceholder:"input name (e.g. version)",valuePlaceholder:"{{trigger.tag}}",emptyHint:"No inputs configured."})})}),(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 Am({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{title:"Request",children:[(0,l.jsx)(k,{label:"URL",children:(0,l.jsx)(A,{mono:!0,value:String(n.url??""),onChange:r=>t({url:r}),placeholder:"https://example.com/webhook"})}),(0,l.jsx)(k,{label:"Method",children:(0,l.jsx)(ke,{value:String(n.method??"POST"),onChange:r=>t({method:r}),options:["GET","POST","PUT","PATCH","DELETE"]})})]}),(0,l.jsx)(W,{title:"Body",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Body",hint:"String \u2014 rendered with {{nodeId.path}}. Server parses as JSON when possible.",children:(0,l.jsx)(Un,{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)(W,{title:"Headers",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Headers",hint:"HTTP request headers \u2014 string values support {{env.*}} and {{nodeId.path}}.",children:(0,l.jsx)($n,{value:n.headers??{},onChange:r=>t({headers:r}),keyPlaceholder:"Header-Name",valuePlaceholder:"Bearer {{env.TOKEN}}",allowedTypes:["string"],emptyHint:"No headers set."})})}),(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 zm=["text","long-text","number","boolean","date","select","multi-select","file"];function zp({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 p=[...n];[p[s],p[d]]=[p[d],p[s]],t({...e,fields:p})},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)(W,{title:"Form",children:[(0,l.jsx)(k,{label:"Title",hint:"Header shown to the assignee above the form",children:(0,l.jsx)(A,{value:e.title??"",onChange:s=>t({...e,title:s}),placeholder:"Review application"})}),(0,l.jsx)(k,{label:"Description",hint:"Optional one-line context shown under the title",children:(0,l.jsx)(A,{value:e.description??"",onChange:s=>t({...e,description:s}),placeholder:""})}),(0,l.jsx)(k,{label:"Primary button",hint:"Label on the submit button; default: Submit",children:(0,l.jsx)(A,{value:e.submitLabel??"Submit",onChange:s=>t({...e,submitLabel:s})})}),(0,l.jsx)(k,{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)(A,{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)(A,{value:e.secondaryAction?.label??"",onChange:s=>t({...e,secondaryAction:{key:e.secondaryAction?.key??"secondary",label:s}}),placeholder:"label (e.g. Reject)"})]})})]}),(0,l.jsxs)(W,{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)(k,{label:"Key",hint:"Stored under values.<key>",children:(0,l.jsx)(A,{mono:!0,value:s.key,onChange:d=>r(c,{key:d})})}),(0,l.jsx)(k,{label:"Label",children:(0,l.jsx)(A,{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)(k,{label:"Type",children:(0,l.jsx)(ke,{value:s.type,onChange:d=>r(c,{type:d}),options:zm.slice()})}),(0,l.jsx)(k,{label:"",children:(0,l.jsx)(Gi,{checked:!!s.required,onChange:d=>r(c,{required:d}),label:"Required"})})]}),(s.type==="select"||s.type==="multi-select")&&(0,l.jsx)(k,{label:"Options",hint:"Comma-separated list of allowed values",children:(0,l.jsx)(Tt,{value:s.options??[],onChange:d=>r(c,{options:d}),placeholder:"low, medium, high"})}),(0,l.jsx)(k,{label:"Hint",hint:"Helper text shown under the input",children:(0,l.jsx)(A,{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)(k,{label:"Min",children:(0,l.jsx)(_n,{value:s.validate?.min,onChange:d=>o(c,{min:d})})}),(0,l.jsx)(k,{label:"Max",children:(0,l.jsx)(_n,{value:s.validate?.max,onChange:d=>o(c,{max:d})})}),s.type!=="number"&&(0,l.jsx)(k,{label:"Pattern",hint:"Regex \u2014 optional",children:(0,l.jsx)(A,{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 Dm({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)(W,{title:"Assignment",children:[(0,l.jsx)(k,{label:"Assignee",hint:"actor:<id> or role:<id> \u2014 managed via `agentx actor` / `agentx role`",children:(0,l.jsx)(A,{mono:!0,value:String(n.assignTo??""),onChange:o=>t({assignTo:o}),placeholder:"role:reviewers"})}),(0,l.jsx)(k,{label:"Title",hint:"Shown in the inbox + notification",children:(0,l.jsx)(A,{value:String(n.title??""),onChange:o=>t({title:o})})}),(0,l.jsx)(k,{label:"Description",children:(0,l.jsx)(Bi,{value:String(n.description??""),onChange:o=>t({description:o}),rows:2})}),(0,l.jsx)(k,{label:"Due in",hint:"ISO-8601 duration (PT2H, P1D) or number of minutes",children:(0,l.jsx)(A,{mono:!0,value:String(n.dueIn??""),onChange:o=>t({dueIn:o}),placeholder:"P2D"})})]}),(0,l.jsx)(zp,{form:r,patch:o=>t({form:o})})]})}function Wm({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)(W,{title:"Start conditions",children:(0,l.jsx)(k,{label:"Who can start it",hint:"actor:<id> or role:<id> \u2014 who is allowed to initiate a new run",children:(0,l.jsx)(A,{mono:!0,value:String(n.startableBy??""),onChange:o=>t({startableBy:o}),placeholder:"role:public"})})}),(0,l.jsx)(zp,{form:r,patch:o=>t({form:o})})]})}function jm({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Sub-process",children:[(0,l.jsx)(k,{label:"Which workflow",hint:"id of another workflow definition \u2014 it runs to completion, then parent resumes",children:(0,l.jsx)(A,{mono:!0,value:String(n.workflowId??""),onChange:r=>t({workflowId:r}),placeholder:"child-workflow-id"})}),(0,l.jsx)(k,{label:"Values to pass on",hint:'Map child-context keys \u2192 templated values. Use a single key "*" for full inheritance.',children:(0,l.jsx)($n,{value:n.inputMap??{},onChange:r=>t({inputMap:r}),keyPlaceholder:"child key",valuePlaceholder:"{{trigger.foo}}",emptyHint:"No mapping \u2014 child workflow runs with no parent context."})})]})}function Um({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Emit signal",children:[(0,l.jsx)(k,{label:"Name",hint:"Signal identifier; other workflows' signal.wait nodes subscribe by this",children:(0,l.jsx)(A,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(k,{label:"Scope",hint:"workflow = only same-workflow waiters; global = every waiter",children:(0,l.jsx)(ke,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(k,{label:"Payload",hint:"Object delivered with the signal. String values support {{nodeId.path}}.",children:(0,l.jsx)($n,{value:n.payload??{},onChange:r=>t({payload:r}),keyPlaceholder:"payload key",valuePlaceholder:"{{trigger.iid}}",emptyHint:"Empty signal payload."})})]})}function $m({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(W,{title:"Wait for signal",children:[(0,l.jsx)(k,{label:"Name",children:(0,l.jsx)(A,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(k,{label:"Scope",children:(0,l.jsx)(ke,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(k,{label:"Only when",hint:"Only resume when every key here matches the emitted payload. Empty = match any payload.",children:(0,l.jsx)($n,{value:n.match??{},onChange:r=>t({match:r}),keyPlaceholder:"payload key",valuePlaceholder:"expected value",emptyHint:"No filter \u2014 matches any payload."})})]})}function Hm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(W,{title:"Timer",children:(0,l.jsx)(k,{label:"After",hint:"ISO-8601 duration (PT30M, PT2H, P1D) or minutes as a number",children:(0,l.jsx)(A,{mono:!0,value:String(n.after??""),onChange:r=>t({after:r}),placeholder:"PT1H"})})})}function Bm({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(W,{title:"Parallel gateway",children:(0,l.jsx)(k,{label:"Mode",hint:"fanOut = send to all outgoing edges; join = wait for every incoming edge",children:(0,l.jsx)(ke,{value:String(n.mode??"fanOut"),onChange:r=>t({mode:r}),options:["fanOut","join"]})})})}function Gm({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 p=[...o];p[c]={...p[c],...d},t({rules:p})},u=()=>t({rules:[...o,{when:r.map(()=>"*"),to:"port",output:{}}]}),s=c=>t({rules:o.filter((d,p)=>p!==c)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(W,{title:"Inputs",children:(0,l.jsx)(k,{label:"Values to read",hint:"Comma-separated; each is a template evaluated per-run against the run context",children:(0,l.jsx)(Tt,{mono:!0,value:r,onChange:i,placeholder:"{{classify.result}}, {{trigger.values.amount}}"})})}),(0,l.jsxs)(W,{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)(k,{label:"Goes to",hint:"Outgoing edge port taken when this row matches",children:(0,l.jsx)(A,{mono:!0,value:String(c.to??""),onChange:p=>a(d,{to:p})})}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>s(d),children:"\u2715"})]}),(0,l.jsx)(k,{label:"When these are true",hint:'One per input. "*" wildcard, "x" equals, ">10" numeric, "!=x", "/regex/"',children:(0,l.jsx)(Tt,{mono:!0,value:(Array.isArray(c.when)?c.when:[]).map(String),onChange:p=>a(d,{when:p}),placeholder:"gold, >100"})}),(0,l.jsx)(k,{label:"Output",hint:"Fields written when this rule matches.",children:(0,l.jsx)($n,{value:c.output??{},onChange:p=>a(d,{output:p}),keyPlaceholder:"output key",valuePlaceholder:"value",emptyHint:"No outputs."})})]},d)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,children:"+ Add rule"})]}),(0,l.jsx)(W,{title:"Default",children:(0,l.jsx)(k,{label:"Goes to",children:(0,l.jsx)(A,{mono:!0,value:String(n.default?.to??"fallback"),onChange:c=>t({default:{...n.default??{},to:c}})})})})]})}var Vm={"trigger.channel":e=>(0,l.jsx)(mm,{...e}),"trigger.cron":e=>(0,l.jsx)(vm,{...e}),"trigger.poll":e=>(0,l.jsx)(ym,{...e}),"trigger.hook":e=>(0,l.jsx)(wm,{...e}),"trigger.manual":e=>(0,l.jsx)(xm,{...e}),"trigger.form":e=>(0,l.jsx)(Wm,{...e}),agent:e=>(0,l.jsx)(km,{...e}),transform:e=>(0,l.jsx)(bm,{...e}),branch:e=>(0,l.jsx)(_m,{...e}),"gateway.parallel":e=>(0,l.jsx)(Bm,{...e}),rule:e=>(0,l.jsx)(Gm,{...e}),checkpoint:e=>(0,l.jsx)(Sm,{...e}),userTask:e=>(0,l.jsx)(Dm,{...e}),subProcess:e=>(0,l.jsx)(jm,{...e}),"signal.emit":e=>(0,l.jsx)(Um,{...e}),"signal.wait":e=>(0,l.jsx)($m,{...e}),"timer.boundary":e=>(0,l.jsx)(Hm,{...e}),end:e=>(0,l.jsx)(Cm,{...e}),"action.send":e=>(0,l.jsx)(Tm,{...e}),"action.createIssue":e=>(0,l.jsx)(Pm,{...e}),"action.setLabel":e=>(0,l.jsx)(Mm,{...e}),"action.readLabel":e=>(0,l.jsx)(Fm,{...e}),"action.react":e=>(0,l.jsx)(Lm,{...e}),"action.editMessage":e=>(0,l.jsx)(Im,{...e}),"action.logTime":e=>(0,l.jsx)(Rm,{...e}),"action.callHTTP":e=>(0,l.jsx)(Am,{...e}),"action.run":e=>(0,l.jsx)(Om,{...e})};function Dp(e){let{selection:t,nodes:n,edges:r,patch:o,patchData:i,onDelete:a,onDuplicate:u,validation:s,runState:c,agents:d,meta:p,patchMeta:g,onDeleteWorkflow:v,isNew:b}=e;if(!t)return(0,l.jsx)(Zm,{meta:p,patchMeta:g,onDeleteWorkflow:v,isNew:b});if(t.kind==="edge"){let G=r.find(f=>f.id===t.id);return G?(0,l.jsx)(ev,{edge:{...G,id:G.id??""},patch:o,onDelete:()=>a(t)}):null}let w=n.find(G=>G.id===t.id);return w?(0,l.jsx)(Km,{node:w,nodes:n,edges:r,patch:o,patchData:i,onDelete:()=>a(t),onDuplicate:()=>u(t),validation:s,runOutput:c?.outputs?.[w.id],agents:d}):null}function Km({node:e,nodes:t,edges:n,patch:r,patchData:o,onDelete:i,onDuplicate:a,validation:u,runOutput:s,agents:c}){let[d,p]=(0,fe.useState)("config"),g=Vm[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:v=>r({id:v.target.value})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Duplicate",onClick:a,children:(0,l.jsx)(K.dup,{})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Delete",onClick:i,children:(0,l.jsx)(K.trash,{})})]}),(0,l.jsxs)("div",{className:"insp__tabs",children:[(0,l.jsxs)("button",{className:"insp__tab"+(d==="config"?" is-active":""),onClick:()=>p("config"),children:[(0,l.jsx)(K.gear,{})," Config"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="advanced"?" is-active":""),onClick:()=>p("advanced"),children:[(0,l.jsx)(K.layout,{})," Advanced"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="preview"?" is-active":""),onClick:()=>p("preview"),children:[(0,l.jsx)(K.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:[g?g({node:e,nodes:t,patch:r,patchData:o,agents:c}):(0,l.jsx)(W,{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)(Qm,{node:e,nodes:t,edges:n})]}),d==="advanced"&&(0,l.jsx)(qm,{node:e,patchData:o}),d==="preview"&&(0,l.jsx)(W,{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)(W,{title:"Issues",right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--err)"},children:u.length}),children:u.map((v,b)=>(0,l.jsxs)("div",{className:"fld__err",style:{padding:"6px 0"},children:[(0,l.jsx)(K.warn,{})," ",v.message]},b))})]})]})}function Ym(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 Qm({node:e,nodes:t,edges:n}){let r=(0,fe.useMemo)(()=>Ym(e.id,t,n),[e.id,t,n]);return r.length===0?(0,l.jsx)(W,{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)(W,{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)(Xm,{node:o},o.id))})})}function Xm({node:e}){let t=Ns[e.type],n=t?Op(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)(Jm,{nodeId:e.id,field:r},r.path))})]})}function Jm({nodeId:e,field:t}){let[n,r]=(0,fe.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 qm({node:e,patchData:t}){let[n,r]=(0,fe.useState)(()=>JSON.stringify(e.config,null,2)),[o,i]=(0,fe.useState)(null);return(0,fe.useMemo)(()=>{r(JSON.stringify(e.config,null,2)),i(null)},[e.id]),(0,l.jsxs)(W,{title:"Raw config JSON",children:[(0,l.jsx)(Bi,{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)(K.check,{})," Apply"]}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>r(JSON.stringify(e.config,null,2)),children:[(0,l.jsx)(K.undo,{})," Reset"]})]}),o&&(0,l.jsxs)("div",{className:"fld__err",style:{color:"var(--err)",fontSize:11,marginTop:4},children:[(0,l.jsx)(K.err,{})," ",o]})]})}function Zm({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)(W,{title:"Identity",children:[(0,l.jsx)(k,{label:"ID",hint:r?"URL slug \u2014 set once on first save":"URL slug \u2014 read-only after creation",children:(0,l.jsx)(A,{mono:!0,value:e.id,onChange:i=>r&&t({id:i})})}),(0,l.jsx)(k,{label:"Title",children:(0,l.jsx)(A,{value:e.title,onChange:i=>t({title:i})})}),(0,l.jsx)(k,{label:"Description",hint:"Optional one-liner shown on the workflows index",children:(0,l.jsx)(Bi,{rows:2,value:e.description??"",onChange:i=>t({description:i})})})]}),(0,l.jsxs)(W,{title:"Execution",children:[(0,l.jsx)(k,{label:"Priority",hint:"Higher numbers run before lower ones when multiple workflows match the same trigger",children:(0,l.jsx)(_n,{value:e.priority,onChange:i=>t({priority:i??0}),placeholder:"0"})}),(0,l.jsx)(k,{label:"",children:(0,l.jsx)(Gi,{checked:!!e.fanOut,onChange:i=>t({fanOut:i}),label:"Fan out \u2014 let multiple workflows match the same trigger event"})}),(0,l.jsx)(k,{label:"Secrets this flow may use",hint:"Comma-separated. Only these env names are exposed to actions/agents in this flow.",children:(0,l.jsx)(Tt,{mono:!0,value:e.envAllow??[],onChange:i=>t({envAllow:i}),placeholder:"GITLAB_TOKEN, SLACK_WEBHOOK"})})]}),(0,l.jsxs)(W,{title:"Retention",defaultOpen:!1,children:[(0,l.jsx)(k,{label:"How many runs to keep",children:(0,l.jsx)(_n,{value:o.maxRuns,onChange:i=>t({retention:{...o,maxRuns:i??0}}),placeholder:"500"})}),(0,l.jsx)(k,{label:"Keep runs for (days)",children:(0,l.jsx)(_n,{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)(K.trash,{})," Delete workflow"]})})]})]})}function ev({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)(K.trash,{})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsx)(W,{title:"Label",children:(0,l.jsx)(k,{label:"Label",hint:"Shown on the edge (cosmetic only)",children:(0,l.jsx)(A,{mono:!0,value:e.label??"",onChange:r=>t({label:r})})})}),(0,l.jsx)(W,{title:"Port",defaultOpen:!1,children:(0,l.jsx)(k,{label:"Leaves from",hint:"Set when the source is a branch node. Must match a case's `to` field or the default port.",children:(0,l.jsx)(A,{mono:!0,value:e.fromPort??"",onChange:r=>t({fromPort:r||void 0})})})})]})]})}var At=ge(Ut(),1);var ne=ge(De(),1);function Wp({onLoadTemplate:e,onAdd:t}){let[n,r]=(0,At.useState)(""),[o,i]=(0,At.useState)([]);(0,At.useEffect)(()=>{let s=!0;return fetch("/api/n8n/workflows").then(c=>c.json()).then(c=>{if(!s)return;let d=(c.workflows??[]).filter(p=>p.webhookUrl).map(p=>({id:"n8n."+p.id,type:"action.callHTTP",label:p.name,hint:p.active?"Hands this over to n8n":"In n8n, but switched off there",glyph:"g-action",icon:"globe",config:{url:p.webhookUrl,method:"POST",body:"{{trigger}}"}}));i(d.length?[{section:"From your n8n",items:d}]:[])}).catch(()=>{}),()=>{s=!1}},[]);let a=(0,At.useMemo)(()=>[...ys,...o],[o]),u=(0,At.useMemo)(()=>{if(!n.trim())return a;let s=n.toLowerCase();return a.map(c=>({...c,items:c.items.filter(d=>d.label.toLowerCase().includes(s)||d.hint.toLowerCase().includes(s)||d.type.includes(s))})).filter(c=>c.items.length>0)},[n,a]);return(0,ne.jsxs)("div",{className:"pal",children:[(0,ne.jsxs)("div",{className:"pal__search",children:[(0,ne.jsx)(K.search,{}),(0,ne.jsx)("input",{value:n,onChange:s=>r(s.target.value),placeholder:"Find a step\u2026","aria-label":"Find a step to add"}),(0,ne.jsx)("kbd",{children:"/"})]}),(0,ne.jsxs)("div",{className:"pal__scroll",children:[u.map(s=>(0,ne.jsxs)(At.Fragment,{children:[(0,ne.jsxs)("div",{className:"pal__section",children:[(0,ne.jsx)("span",{children:s.section}),(0,ne.jsx)("span",{className:"pal__section-count",children:s.items.length.toString().padStart(2,"0")})]}),s.items.map(c=>(0,ne.jsx)(tv,{item:c,onAdd:t},c.id))]},s.section)),!n&&(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)("div",{className:"pal__section",children:[(0,ne.jsx)("span",{children:"Templates"}),(0,ne.jsx)("span",{className:"pal__section-count",children:xs.length.toString().padStart(2,"0")})]}),xs.map(s=>(0,ne.jsxs)("button",{type:"button",className:"pal__tpl",onClick:()=>e(s),children:[(0,ne.jsx)("div",{className:"pal__tpl-dots",children:[0,1,2].map(c=>(0,ne.jsx)("span",{className:c<s.dots?"on":""},c))}),(0,ne.jsx)("div",{className:"pal__tpl-title",children:s.title}),(0,ne.jsx)("div",{className:"pal__tpl-hint",children:s.hint})]},s.id))]})]}),(0,ne.jsxs)("div",{className:"pal__foot",children:[(0,ne.jsx)(K.lightning,{}),(0,ne.jsx)("span",{children:"Select a step to add it, or drag it onto the canvas"})]})]})}function tv({item:e,onAdd:t}){let n=K[e.icon]??K.box;return(0,ne.jsxs)("div",{className:"pal__item",draggable:!0,onDragStart:o=>{o.dataTransfer.setData("application/x-wfe-item",JSON.stringify(e)),o.dataTransfer.effectAllowed="copy";let i=document.createElement("div");i.textContent=e.label,i.style.cssText="position:absolute;top:-1000px;padding:6px 10px;background:var(--ax-accent);color:var(--ax-bg);border-radius:6px;font:500 12px var(--ax-font);",document.body.appendChild(i),o.dataTransfer.setDragImage(i,10,10),setTimeout(()=>document.body.removeChild(i),0)},role:"button",tabIndex:0,title:`Add \u201C${e.label}\u201D`,onClick:()=>t(e),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t(e))},children:[(0,ne.jsx)("div",{className:"pal__glyph "+e.glyph,children:(0,ne.jsx)(n,{})}),(0,ne.jsxs)("div",{className:"pal__meta",children:[(0,ne.jsx)("div",{className:"pal__label",children:e.label}),(0,ne.jsx)("div",{className:"pal__hint",children:e.hint})]})]})}var Ms=ge(Ut(),1);var M=ge(De(),1);function jp(e){return(0,M.jsxs)("div",{className:"tb",role:"toolbar","aria-label":"Workflow editor",children:[(0,M.jsxs)("div",{className:"tb__main",children:[(0,M.jsx)("button",{type:"button",className:"btn btn--ghost-icon tb__menu"+(e.menuOpen?" is-active":""),"aria-expanded":e.menuOpen,"aria-controls":"wfe-menu",title:(e.menuOpen?"Hide":"Show")+" the side menu ([)","aria-label":(e.menuOpen?"Hide":"Show")+" the side menu",onClick:()=>e.setMenuOpen(!e.menuOpen),children:(0,M.jsx)(K.panelLeft,{})}),(0,M.jsxs)("div",{className:"tb__crumbs",children:[(0,M.jsx)("button",{type:"button",className:"tb__back",onClick:e.onBack,title:"Back to Workflows",children:"Workflows"}),(0,M.jsx)("span",{className:"sep","aria-hidden":"true",children:"/"}),(0,M.jsx)("input",{value:e.title,"aria-label":"Workflow title",onChange:t=>e.setTitle(t.target.value)})]}),(0,M.jsxs)("div",{className:"tb__status "+e.status,role:"status",children:[(0,M.jsx)("span",{className:"dot"}),e.statusLabel??(e.status==="is-dirty"?"unsaved":e.status==="is-running"?"running":e.status==="is-validating"?"checking\u2026":"saved")]}),(0,M.jsx)("div",{className:"tb__spacer"}),(0,M.jsx)("button",{type:"button",className:"btn btn--ghost-icon tb__opt",title:"Undo (\u2318Z)","aria-label":"Undo",onClick:e.onUndo,disabled:!e.canUndo,children:(0,M.jsx)(K.undo,{})}),(0,M.jsx)("button",{type:"button",className:"btn btn--ghost-icon tb__opt",title:"Redo (\u2318\u21E7Z)","aria-label":"Redo",onClick:e.onRedo,disabled:!e.canRedo,children:(0,M.jsx)(K.redo,{})}),(0,M.jsxs)("button",{type:"button",className:"btn btn--ghost tb__arrange",title:"Arrange the steps left to right (L)",onClick:e.onLayout,children:[(0,M.jsx)(K.layout,{}),(0,M.jsx)("span",{children:"Arrange"})]}),(0,M.jsx)("button",{type:"button",className:"btn btn--ghost-icon tb__opt",title:"Fit the workflow in view (F)","aria-label":"Fit in view",onClick:e.onFit,children:(0,M.jsx)(K.fit,{})}),(0,M.jsx)("button",{type:"button",className:"btn btn--ghost-icon tb__opt",title:"Keyboard shortcuts (?)","aria-label":"Keyboard shortcuts",onClick:e.onHelp,children:(0,M.jsx)(K.kbd,{})})]}),(0,M.jsxs)("div",{className:"tb__actions",children:[e.canSave&&(0,M.jsxs)("button",{type:"button",className:"btn btn--outline",onClick:e.onSave,children:[(0,M.jsx)(K.save,{})," ",(0,M.jsx)("span",{children:"Save"})]}),(0,M.jsx)("button",{type:"button",className:"btn btn--primary tb__run",onClick:e.onRun,title:"Walk through the steps without running them",children:e.running?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(K.stop2,{})," ",(0,M.jsx)("span",{children:"Stop"})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(K.run,{})," ",(0,M.jsx)("span",{children:"Preview"})]})})]})]})}function Up({running:e,script:t,cursor:n,onStop:r}){if(!e)return null;let o=t.filter(i=>i.nodeId);return(0,M.jsxs)("div",{className:"run",children:[(0,M.jsxs)("div",{className:"run__head",children:[(0,M.jsx)(K.lightning,{}),(0,M.jsx)("div",{className:"run__title",children:"Live run"}),(0,M.jsxs)("span",{className:"run__chip",children:[(0,M.jsx)("span",{className:"dot"})," streaming"]}),(0,M.jsx)("button",{className:"btn btn--ghost-icon",onClick:r,style:{height:24,width:24},children:(0,M.jsx)(K.x,{})})]}),(0,M.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,M.jsxs)("div",{className:c.join(" "),children:[(0,M.jsx)("div",{className:"run__marker",children:s?(0,M.jsx)(K.check,{}):a+1}),(0,M.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,M.jsx)("div",{className:"run__step-title",children:i.title}),i.body&&(0,M.jsx)("div",{className:"run__step-body",dangerouslySetInnerHTML:{__html:i.body}})]})]},a)})}),(0,M.jsxs)("div",{className:"run__foot",children:[(0,M.jsxs)("span",{children:[Math.min(n+1,t.length),"/",t.length]}),(0,M.jsxs)("span",{children:[t.length?Math.round((n+1)/t.length*100):0,"%"]})]})]})}function $p({open:e,onClose:t}){return e?(0,M.jsx)("div",{className:"kbd-overlay",onClick:t,children:(0,M.jsxs)("div",{className:"kbd-card",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onClick:r=>r.stopPropagation(),children:[(0,M.jsx)("h3",{children:"Keyboard shortcuts"}),[["Save workflow","\u2318S"],["Undo / Redo","\u2318Z / \u2318\u21E7Z"],["Delete selection","Delete"],["Duplicate step","\u2318D"],["Move the selected step","\u2190 \u2192 \u2191 \u2193"],["Arrange the steps","L"],["Fit in view","F"],["Show or hide the side menu","["],["Preview","\u2318\u23CE"],["Find a step to add","/"],["Close this","Esc"]].map(([r,o])=>(0,M.jsxs)("div",{className:"row",children:[(0,M.jsx)("span",{children:r}),(0,M.jsx)("span",{children:o.split(" ").map((i,a)=>(0,M.jsxs)(Ms.Fragment,{children:[i.includes("/")?i.split("/").map((u,s)=>(0,M.jsxs)(Ms.Fragment,{children:[s>0&&" / ",(0,M.jsx)("kbd",{children:u.trim()})]},s)):(0,M.jsx)("kbd",{children:i})," "]},a))})]},r))]})}):null}function nv(){if(window.AX_LOCAL_TOKEN)return window.AX_LOCAL_TOKEN;try{return localStorage.getItem("ax_token")||""}catch{return""}}function qt(){let e={"Content-Type":"application/json","X-Requested-With":"agentx-board"},t=nv();return t&&(e.Authorization="Bearer "+t),e}async function Hp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e),{headers:qt()});if(!t.ok)throw new Error("fetch workflow "+e+": "+t.status);return(await t.json()).workflow}async function Bp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{headers:qt()});return t.ok?(await t.json()).layout:null}async function Gp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e.id)+"/validate",{method:"POST",headers:qt(),body:JSON.stringify(e)});return t.ok?await t.json():{ok:!1,issues:[{path:"",message:"HTTP "+t.status}]}}async function Fs(e,t){let n=t.create?"/api/workflows":"/api/workflows/"+encodeURIComponent(e.id),r=t.convertFromYaml?n+"?convertFromYaml=true":n,o=t.create?"POST":"PUT",i=await fetch(r,{method:o,headers:qt(),body:JSON.stringify(e)});if(i.ok)return{ok:!0};let a=await i.json().catch(()=>({}));return{ok:!1,issues:a.issues||[{path:"",message:a.error||"HTTP "+i.status}],kind:a.kind,path:a.path,error:a.error}}async function Vp(e,t){await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{method:"PUT",headers:qt(),body:JSON.stringify(t)})}async function Kp(e){return(await fetch("/api/workflows/"+encodeURIComponent(e),{method:"DELETE",headers:qt()})).ok}async function Yp(){try{let e=await fetch("/api/agents",{headers:qt()});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 Be=ge(Ut(),1),re=ge(De(),1),Is="agentx.editor.chat.v1";function Qp({currentWorkflow:e,onApplyWorkflow:t,agentId:n}){let[r,o]=(0,Be.useState)(!1),[i,a]=(0,Be.useState)(()=>av()),[u,s]=(0,Be.useState)(""),[c,d]=(0,Be.useState)(!1),p=(0,Be.useRef)(null),g=(0,Be.useRef)(null);(0,Be.useEffect)(()=>{let f=i.filter(h=>!h.pending).map(h=>({role:h.role,content:h.content}));try{sessionStorage.setItem(Is,JSON.stringify(f))}catch{}},[i]),(0,Be.useEffect)(()=>{let f=p.current;f&&(f.scrollTop=f.scrollHeight)},[i,r]),(0,Be.useEffect)(()=>{r&&g.current?.focus()},[r]);let v=(0,Be.useCallback)(async()=>{let f=u.trim();if(!f||c)return;let h=i.filter(x=>!x.pending).map(x=>({role:x.role,content:x.content})),m=[...i,{role:"user",content:f},{role:"assistant",content:"\u2026",pending:!0}];a(m),s(""),d(!0);try{let x=await fetch("/api/workflows/editor/chat",{method:"POST",credentials:"same-origin",headers:qt(),body:JSON.stringify({messages:[...h,{role:"user",content:f}],currentWorkflow:e,agentId:n})}),C=await x.json().catch(()=>({}));x.ok?a(F=>Ls(F,{role:"assistant",content:C.reply||"",workflow:C.workflow||void 0})):a(F=>Ls(F,{role:"assistant",content:"",error:C.error||`HTTP ${x.status}`}))}catch(x){a(C=>Ls(C,{role:"assistant",content:"",error:x?.message||"network error"}))}finally{d(!1)}},[n,c,e,u,i]),b=()=>{a([]);try{sessionStorage.removeItem(Is)}catch{}},w=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),v())},G=(0,Be.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(`
|
|
1471
|
+
`),[]);return(0,re.jsxs)(re.Fragment,{children:[!r&&(0,re.jsxs)("button",{className:"ax-chat__pill","aria-label":"Open workflow assistant",onClick:()=>o(!0),children:[(0,re.jsx)("span",{className:"ax-chat__pill-glyph",children:"\u2728"}),(0,re.jsx)("span",{className:"ax-chat__pill-text",children:"Ask AI to build\u2026"})]}),r&&(0,re.jsxs)("div",{className:"ax-chat__panel",role:"dialog","aria-label":"Workflow assistant",children:[(0,re.jsxs)("header",{className:"ax-chat__head",children:[(0,re.jsxs)("div",{className:"ax-chat__title",children:[(0,re.jsx)("span",{className:"ax-chat__dot"})," Workflow assistant"]}),(0,re.jsxs)("div",{className:"ax-chat__head-actions",children:[(0,re.jsx)("button",{className:"ax-chat__iconbtn",onClick:b,title:"Clear conversation",children:"\u232B"}),(0,re.jsx)("button",{className:"ax-chat__iconbtn",onClick:()=>o(!1),title:"Collapse",children:"\u25BC"})]})]}),(0,re.jsxs)("div",{className:"ax-chat__body",ref:p,children:[i.length===0&&(0,re.jsx)("pre",{className:"ax-chat__empty",children:G}),i.map((f,h)=>(0,re.jsx)(rv,{m:f,onApply:t},h))]}),(0,re.jsxs)("footer",{className:"ax-chat__foot",children:[(0,re.jsx)("textarea",{ref:g,className:"ax-chat__input",value:u,onChange:f=>s(f.target.value),onKeyDown:w,placeholder:"Describe the workflow you want\u2026 (Enter to send, Shift+Enter for newline)",rows:2,disabled:c}),(0,re.jsx)("button",{className:"ax-chat__send",onClick:()=>void v(),disabled:c||!u.trim(),children:c?"\u2026":"Send"})]})]}),(0,re.jsx)("style",{children:lv})]})}function rv({m:e,onApply:t}){if(e.error)return(0,re.jsxs)("div",{className:"ax-chat__msg ax-chat__msg--err",children:["\u26A0 ",e.error]});if(e.pending)return(0,re.jsx)("div",{className:"ax-chat__msg ax-chat__msg--assistant ax-chat__msg--pending",children:(0,re.jsxs)("span",{className:"ax-chat__typing",children:[(0,re.jsx)("span",{}),(0,re.jsx)("span",{}),(0,re.jsx)("span",{})]})});let n=e.role==="user"?"ax-chat__msg ax-chat__msg--user":"ax-chat__msg ax-chat__msg--assistant",r=ov(e.content,!!e.workflow),o=e.role==="assistant"?iv(r):Vi(r);return(0,re.jsxs)("div",{className:n,children:[(0,re.jsx)("div",{className:"ax-chat__text",dangerouslySetInnerHTML:{__html:o}}),e.workflow&&(0,re.jsxs)("div",{className:"ax-chat__apply",children:[(0,re.jsx)("button",{className:"ax-chat__applybtn",onClick:()=>t(e.workflow),children:"Apply to canvas"}),(0,re.jsx)("span",{className:"ax-chat__apply-hint",children:"replaces the current workflow"})]})]})}function ov(e,t){return t?e.replace(/```(?:json)?\s*\n[\s\S]*?```/g,"").trim():e}function Vi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function iv(e){let t=[],n=e.replace(/```([a-zA-Z0-9_-]*)\n([\s\S]*?)```/g,(d,p,g)=>{let v=Vi(g.replace(/\n+$/,"")),b=p?` class="lang-${Vi(p)}"`:"";return t.push(`<pre><code${b}>${v}</code></pre>`),`\0CODE${t.length-1}\0`});n=Vi(n),n=n.replace(/`([^`\n]+)`/g,(d,p)=>`<code>${p}</code>`),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(d,p,g)=>`<a href="${/^https?:\/\/|^\//.test(g)?g:"#"}" target="_blank" rel="noopener noreferrer">${p}</a>`),n=n.replace(/\*\*([^*\n]+)\*\*/g,"<strong>$1</strong>"),n=n.replace(/(?<!\*)\*([^*\n]+)\*(?!\*)/g,"<em>$1</em>");let r=n.split(`
|
|
1472
|
+
`),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 p=d.trimEnd();if(/^\s*$/.test(p)){s(),a();continue}let g=/^(#{1,3})\s+(.+)/.exec(p);if(g){s(),a();let w=g[1].length+2;o.push(`<h${w}>${g[2]}</h${w}>`);continue}let v=/^\s*[-*]\s+(.+)/.exec(p);if(v){s(),i!=="ul"&&(a(),o.push("<ul>"),i="ul"),o.push(`<li>${v[1]}</li>`);continue}let b=/^\s*\d+\.\s+(.+)/.exec(p);if(b){s(),i!=="ol"&&(a(),o.push("<ol>"),i="ol"),o.push(`<li>${b[1]}</li>`);continue}a(),u.push(p)}s(),a();let c=o.join(`
|
|
1473
|
+
`);return c=c.replace(/CODE(\d+)/g,(d,p)=>t[Number(p)]||""),c}function Ls(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 av(){try{let e=sessionStorage.getItem(Is);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 lv=`
|
|
1345
1474
|
.ax-chat__pill {
|
|
1346
1475
|
position: fixed; bottom: 18px; right: 18px; z-index: 40;
|
|
1347
1476
|
display: flex; align-items: center; gap: 8px;
|
|
@@ -1484,15 +1613,15 @@ code, .mono {
|
|
|
1484
1613
|
.ax-chat__head { background: linear-gradient(135deg, rgba(107,91,255,0.15), rgba(139,92,246,0.08)); }
|
|
1485
1614
|
.ax-chat__input { background: #2a2a2a; color: #eee; border-color: rgba(255,255,255,0.15); }
|
|
1486
1615
|
}
|
|
1487
|
-
`;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:Fm(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,project:e.project},nodes:r,edges:o}}function vs(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},project:e.meta.project},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 Fm(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 ys="__trigger__";function Mm(){try{return localStorage.getItem("ax_token")||""}catch{return""}}function _n(){let e={"Content-Type":"application/json","X-Requested-With":"agentx-board"},t=Mm();return t&&(e.Authorization="Bearer "+t),e}async function kp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e),{headers:_n()});if(!t.ok)throw new Error("fetch workflow "+e+": "+t.status);return(await t.json()).workflow}async function bp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{headers:_n()});return t.ok?(await t.json()).layout:null}async function _p(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e.id)+"/validate",{method:"POST",headers:_n(),body:JSON.stringify(e)});return t.ok?await t.json():{ok:!1,issues:[{path:"",message:"HTTP "+t.status}]}}async function ws(e,t){let n=t.create?"/api/workflows":"/api/workflows/"+encodeURIComponent(e.id),r=t.convertFromYaml?n+"?convertFromYaml=true":n,o=t.create?"POST":"PUT",i=await fetch(r,{method:o,headers:_n(),body:JSON.stringify(e)});if(i.ok)return{ok:!0};let a=await i.json().catch(()=>({}));return{ok:!1,issues:a.issues||[{path:"",message:a.error||"HTTP "+i.status}],kind:a.kind,path:a.path,error:a.error}}async function Sp(e,t){await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{method:"PUT",headers:_n(),body:JSON.stringify(t)})}async function Cp(e){return(await fetch("/api/workflows/"+encodeURIComponent(e),{method:"DELETE",headers:_n()})).ok}async function Np(){try{let e=await fetch("/api/agents",{headers:_n()});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(Ce(),1);function Im(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:Rm(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===ys?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===ys)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=Lm(e.nodes,e.edges);return{...e,nodes:e.nodes.map(r=>({...r,...n[r.id]??{}}))}}case"setAll":return t.state}}function Rm(e){if(e.config)return{...e.config};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:e.id.endsWith(".n8n")?"on:n8n":"on:hook"};case"trigger.form":return{form:{title:"New request",fields:[],submitLabel:"Submit"}};case"agent":return{agentId:"",prompt:"",resultParser:"acme-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 Lm(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,p)=>{u[d]={x:80+Number(s)*280,y:120+p*170}})}),u}function Om(e){let[t,n]=(0,O.useReducer)(Im,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 zm(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 Am(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 p=d.id??"";t.push({nodeId:null,edgeId:p,title:null,body:null}),o(d.to)}},i=e.nodes.find(a=>a.type.startsWith("trigger."))?.id;return i&&o(i),t}function Ep(){let{state:e,dispatch:t,undo:n,redo:r,forceReset:o,canUndo:i,canRedo:a}=Om({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:p}=e,m=(0,O.useRef)(e);(0,O.useEffect)(()=>{m.current=e},[e]);let[y,w]=(0,O.useState)(()=>document.documentElement.getAttribute("data-theme")??"dark"),[S,H]=(0,O.useState)(()=>localStorage.getItem("wfe.density")??"cozy"),[g,f]=(0,O.useState)(()=>Number(localStorage.getItem("wfe.hue")??255)),[h,x]=(0,O.useState)(()=>localStorage.getItem("wfe.paletteOpen")!=="0"),[C,P]=(0,O.useState)(()=>localStorage.getItem("wfe.inspectorOpen")!=="0"),[M,E]=(0,O.useState)({zoom:.75,tx:40,ty:60});(0,O.useEffect)(()=>{document.documentElement.dataset.theme=y,localStorage.setItem("ax-theme",y)},[y]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.density",S)},[S]),(0,O.useEffect)(()=>{document.documentElement.style.setProperty("--accent-hue",String(g)),localStorage.setItem("wfe.hue",String(g))},[g]),(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=>w(I),[W,ve]=(0,O.useState)(!1),[ir,Sn]=(0,O.useState)(!1),[ar,ao]=(0,O.useState)(null),[lr,at]=(0,O.useState)("is-saved"),lt=(I,z="ok")=>{ao({msg:I,kind:z}),setTimeout(()=>ao(null),2e3)},[Ai,Di]=(0,O.useState)(ip);(0,O.useEffect)(()=>{(async()=>{let I=await Np();if(!I.length)return;let z=I.map((ce,we)=>({id:ce.id,name:ce.name||ce.id,tags:[],color:we*37%360}));Di(z)})()},[]),(0,O.useEffect)(()=>{let I=new URLSearchParams(location.search),z=I.get("new")==="1",ce=I.get("id")||"new-workflow";if(z){o(zi(io(ce),!0));return}(async()=>{try{let[we,xe]=await Promise.all([kp(ce),bp(ce)]),ke=oo(we,xe);o(zi(ke,!1))}catch(we){lt(`Failed to load "${ce}": ${we.message}`,"err"),o(zi(io(ce),!0))}})()},[]),(0,O.useEffect)(()=>{u.id!=="loading"&&at("is-dirty")},[s,c,u]);let sr=(0,O.useCallback)(async()=>{let I=m.current,{workflow:z,layout:ce}=vs({meta:I.meta,nodes:I.nodes,edges:I.edges});at("is-validating");let we=await _p(z);if(!we.ok){at("is-dirty"),lt(`${we.issues.length} validation issue${we.issues.length===1?"":"s"}`,"err");return}let xe=await ws(z,{create:I.isNew});if(!xe.ok&&xe.kind==="yaml-authored"){let ke=xe.path||"(unknown path)";if(!confirm(`This workflow is YAML-authored on disk:
|
|
1616
|
+
`;function yo(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:sv(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,project:e.project},nodes:r,edges:o}}function Rs(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},project:e.meta.project},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 wo(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 sv(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 Os="__trigger__";var Ee=ge(De(),1);function uv(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:cv(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 r={id:"e-"+Math.random().toString(36).slice(2,8),from:t.conn.from,to:t.conn.to};return t.conn.fromPort!==void 0&&(r.fromPort=t.conn.fromPort),e.edges.some(o=>o.from===r.from&&(o.fromPort??"")===(r.fromPort??"")&&o.to===r.to)?e:{...e,edges:[...e.edges,r]}}case"delete":{let n=t.selection??e.selection;return n?n.kind==="node"?n.id===Os?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===Os)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=vo(e.nodes,e.edges);return{...e,nodes:e.nodes.map(r=>n[r.id]?{...r,position:n[r.id]}:r)}}case"setAll":return t.state}}function cv(e){if(e.config)return{...e.config};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:e.id.endsWith(".n8n")?"on:n8n":"on:hook"};case"trigger.form":return{form:{title:"New request",fields:[],submitLabel:"Submit"}};case"agent":return{agentId:"",prompt:"",resultParser:"acme-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 dv(e){let[t,n]=(0,U.useReducer)(uv,e),r=(0,U.useRef)([]),o=(0,U.useRef)([]),i=(0,U.useRef)(t);(0,U.useEffect)(()=>{i.current=t},[t]);let a=(0,U.useCallback)(v=>{v.type==="select"||v.type==="moveNode"||(r.current.push(i.current),r.current.length>50&&r.current.shift(),o.current=[]),n(v)},[]),u=(0,U.useCallback)(()=>{let v=r.current.pop();v&&(o.current.push(i.current),n({type:"setAll",state:v}))},[]),s=(0,U.useCallback)(()=>{let v=o.current.pop();v&&(r.current.push(i.current),n({type:"setAll",state:v}))},[]),c=(0,U.useRef)(null),d=(0,U.useCallback)(()=>{c.current||(c.current=i.current)},[]),p=(0,U.useCallback)(()=>{let v=c.current;c.current=null,!(!v||v===i.current)&&(r.current.push(v),r.current.length>50&&r.current.shift(),o.current=[])},[]),g=(0,U.useCallback)(v=>{r.current=[],o.current=[],n({type:"setAll",state:v})},[]);return{state:t,dispatch:a,undo:u,redo:s,forceReset:g,beginMove:d,endMove:p,canUndo:r.current.length>0,canRedo:o.current.length>0}}function pv(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 fv(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 p=d.id??"";t.push({nodeId:null,edgeId:p,title:null,body:null}),o(d.to)}},i=e.nodes.find(a=>a.type.startsWith("trigger."))?.id;return i&&o(i),t}var Jp="wfe.menu",Yi="(max-width: 900px)";function hv(){try{let e=localStorage.getItem(Jp);return window.matchMedia(Yi).matches?!1:e!=="closed"}catch{return!0}}function Ki(e){return JSON.stringify([e.meta,e.nodes,e.edges])}function qp(e){let{state:t,dispatch:n,undo:r,redo:o,forceReset:i,beginMove:a,endMove:u,canUndo:s,canRedo:c}=dv({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:d,nodes:p,edges:g,selection:v,isNew:b}=t,w=e.owner,G=(0,U.useRef)(t);(0,U.useEffect)(()=>{G.current=t},[t]);let[f,h]=(0,U.useState)(hv),[m,x]=(0,U.useState)(e.isNew?"add":"edit"),[C,F]=(0,U.useState)({zoom:.75,tx:40,ty:60}),[L,R]=(0,U.useState)(0),H=()=>R(T=>T+1),z=(0,U.useCallback)(T=>{h(T);try{window.matchMedia(Yi).matches||localStorage.setItem(Jp,T?"open":"closed")}catch{}},[]),Se=(0,U.useRef)(!0);(0,U.useEffect)(()=>{if(Se.current){Se.current=!1;return}let T=window.setTimeout(H,180);return()=>window.clearTimeout(T)},[f]);let[tt,vt]=(0,U.useState)(!1),[zt,_]=(0,U.useState)(null),[O,V]=(0,U.useState)(""),B=(0,U.useRef)(null),$=(T,E="ok")=>{_({msg:T,kind:E}),B.current&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>_(null),E==="err"?5e3:2e3)},[J,Z]=(0,U.useState)(Cp);(0,U.useEffect)(()=>{(async()=>{let T=await Yp();if(!T.length)return;let E=T.map((q,oe)=>({id:q.id,name:q.name||q.id,tags:[],color:oe*37%360}));Z(E)})()},[]);let[le,we]=(0,U.useState)(""),nt=(T,E)=>{let q=T;if(Mp(q.nodes)){let Pe=vo(q.nodes,q.edges);q={...q,nodes:q.nodes.map(be=>Pe[be.id]?{...be,position:Pe[be.id]}:be)}}let oe=Xp(q,E);i(oe),we(E?"":Ki(oe)),H()};(0,U.useEffect)(()=>{let T=e.workflowId||"new-workflow";if(e.isNew){nt(wo(T),!0);return}let E=!0;return(async()=>{try{let[q,oe]=await Promise.all([Hp(T),Bp(T)]);E&&nt(yo(q,oe),!1)}catch(q){if(!E)return;$(`Could not open "${T}": ${q.message}`,"err"),nt(wo(T),!0)}})(),()=>{E=!1}},[e.workflowId,e.isNew]);let Sn=d.id!=="loading"&&Ki({meta:d,nodes:p,edges:g})!==le;(0,U.useEffect)(()=>{e.onDirty?.(Sn)},[Sn]);let Te=O||(Sn?"is-dirty":"is-saved"),Hn=(0,U.useCallback)(async()=>{if(!w){$("Only the owner can save a workflow","err");return}let T=G.current,{workflow:E,layout:q}=Rs({meta:T.meta,nodes:T.nodes,edges:T.edges});V("is-validating");let oe=await Gp(E);if(!oe.ok){V(""),$(oe.issues[0]?.message?`Not saved: ${oe.issues[0].message}`:`${oe.issues.length} problem${oe.issues.length===1?"":"s"} to fix first`,"err");return}let Pe=await Fs(E,{create:T.isNew});if(!Pe.ok&&Pe.kind==="yaml-authored"){let Ce=Pe.path||"(unknown path)";if(!confirm(`This workflow is YAML-authored on disk:
|
|
1488
1617
|
|
|
1489
|
-
${
|
|
1618
|
+
${Ce}
|
|
1490
1619
|
|
|
1491
1620
|
Saving from the editor will overwrite the YAML as JSON and discard any comments in the YAML file.
|
|
1492
1621
|
|
|
1493
|
-
Continue and convert to JSON?`)){
|
|
1622
|
+
Continue and convert to JSON?`)){V(""),$("Not saved: the YAML file is kept as it is","err");return}Pe=await Fs(E,{create:T.isNew,convertFromYaml:!0})}if(V(""),!Pe.ok){$(Pe.issues?.[0]?.message??"Save failed","err");return}try{await Vp(E.id,q)}catch{}let be={...T,isNew:!1};we(Ki(be)),$("Saved","ok"),T.isNew&&(i(be),e.onSaved?.(E.id))},[w,i]),Bn=(0,U.useCallback)(T=>n({type:"delete",selection:T}),[n]),N=(0,U.useCallback)(T=>n({type:"duplicate",selection:T}),[n]),D=(0,U.useCallback)((T,E,q)=>{n({type:"addNode",item:T,x:Math.round(E),y:Math.round(q)}),x("edit")},[n]),I=(0,U.useCallback)(T=>n({type:"connect",conn:T}),[n]),Q=(0,U.useCallback)((T,E,q)=>{a(),n({type:"moveNode",id:T,x:E,y:q})},[n,a]),ee=(0,U.useCallback)(T=>{n({type:"select",selection:T,commit:!0}),T&&x("edit")},[n]),se=T=>{let E=document.querySelector("#wfe-root .cv")?.getBoundingClientRect(),q=((E?.width??800)/2-C.tx)/C.zoom,oe=((E?.height??500)/2-C.ty)/C.zoom;D(T,q-110,oe-40),window.matchMedia(Yi).matches&&z(!1)},ae=()=>{n({type:"layout"}),H()},yt=()=>document.querySelector("#wfe-root .cv")?.dispatchEvent(new Event("wfe:fit")),rt=T=>{v&&(v.kind==="node"&&n({type:"patchNode",id:v.id,patch:T}),v.kind==="edge"&&n({type:"patchEdge",id:v.id,patch:T}))},Gn=T=>{!v||v.kind!=="node"||n({type:"patchNodeData",id:v.id,patch:T})},Dt=async T=>{if(!confirm(`Replace the current workflow with the "${T.title}" template?`))return;let E=await gv(T.id,d.id),q=vo(E.nodes,E.edges);n({type:"setAll",state:{...Xp({...E,nodes:E.nodes.map(oe=>({...oe,position:oe.position??q[oe.id]}))},b),isNew:b}}),H(),$(`Loaded ${T.title}`,"ok")},[Pt,Qi]=(0,U.useState)(!1),[Zt,Xi]=(0,U.useState)(-1),_r=(0,U.useMemo)(()=>fv(t),[t]),Wt=(0,U.useRef)(null),Ji=()=>{Wt.current&&window.clearInterval(Wt.current),Qi(!1),V("")},zs=()=>{Qi(!0),Xi(0),V("is-running"),Wt.current&&window.clearInterval(Wt.current),Wt.current=window.setInterval(()=>{Xi(T=>T>=_r.length-1?(Wt.current&&window.clearInterval(Wt.current),Qi(!1),V(""),T):T+1)},900)};(0,U.useEffect)(()=>()=>{Wt.current&&window.clearInterval(Wt.current),B.current&&window.clearTimeout(B.current)},[]);let Ds=(0,U.useMemo)(()=>{if(!Pt&&Zt<0)return null;let T=new Set,E=new Set,q=null,oe=null;for(let be=0;be<=Zt;be++){let Ce=_r[be];Ce&&(Ce.nodeId&&(be===Zt?q=Ce.nodeId:T.add(Ce.nodeId)),Ce.edgeId&&(be===Zt?oe=Ce.edgeId:E.add(Ce.edgeId)))}let Pe={};for(let be=0;be<=Zt;be++){let Ce=_r[be];!Ce||!Ce.nodeId||!Ce.body||(Pe[Ce.nodeId]=Ce.body)}return{visitedNodes:T,visitedEdges:E,currentNodeId:q,currentEdgeId:oe,outputs:Pe}},[Pt,Zt,_r]),tf=(0,U.useMemo)(()=>pv(t),[t]),nf=v?.kind==="node"?tf[v.id]:void 0;(0,U.useEffect)(()=>{let T=E=>{let q=document.activeElement,oe=!!q&&(/^(INPUT|TEXTAREA|SELECT)$/.test(q.tagName)||q.isContentEditable),Pe=E.metaKey||E.ctrlKey;if(E.key==="?"&&!oe){vt(!0);return}if(E.key==="Escape"){tt?vt(!1):f&&window.matchMedia(Yi).matches&&z(!1);return}if(Pe&&E.key.toLowerCase()==="z"&&!E.shiftKey)oe||(E.preventDefault(),r());else if(Pe&&(E.key.toLowerCase()==="y"||E.shiftKey&&E.key.toLowerCase()==="z"))oe||(E.preventDefault(),o());else if(Pe&&E.key.toLowerCase()==="s")E.preventDefault(),Hn();else if(Pe&&E.key==="Enter")E.preventDefault(),Pt?Ji():zs();else if(Pe&&E.key.toLowerCase()==="d"&&!oe&&v)E.preventDefault(),N(v);else{if(Pe||E.altKey||oe)return;if((E.key==="Delete"||E.key==="Backspace")&&v)E.preventDefault(),Bn(v);else if(E.key==="/")E.preventDefault(),z(!0),x("add"),window.setTimeout(()=>document.querySelector("#wfe-root .pal__search input")?.focus(),0);else if(E.key==="[")E.preventDefault(),z(!f);else if(E.key==="f"||E.key==="F")E.preventDefault(),yt();else if(E.key==="l"||E.key==="L")E.preventDefault(),ae();else if(E.key.startsWith("Arrow")&&v?.kind==="node"){let be=G.current.nodes.find(of=>of.id===v.id);if(!be)return;E.preventDefault();let Ce=E.shiftKey?50:10,qi=be.position??{x:0,y:0},Ws={ArrowLeft:[-Ce,0],ArrowRight:[Ce,0],ArrowUp:[0,-Ce],ArrowDown:[0,Ce]}[E.key]??[0,0];n({type:"patchNode",id:be.id,patch:{position:{x:qi.x+Ws[0],y:qi.y+Ws[1]}}})}}};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[v,Pt,r,o,Hn,Bn,N,f,tt,z]),(0,U.useEffect)(()=>{let T=E=>{Sn&&(E.preventDefault(),E.returnValue="")};return window.addEventListener("beforeunload",T),()=>window.removeEventListener("beforeunload",T)},[Sn]);let rf=async()=>{if(b||!confirm(`Delete workflow "${d.id}"? This cannot be undone.`))return;await Kp(d.id)?(we(Ki(G.current)),$("Deleted","ok"),window.setTimeout(()=>e.onBack(!0),500)):$(w?"Delete failed":"Only the owner can delete a workflow","err")};return(0,Ee.jsxs)("div",{className:"app","data-menu":f?"open":"closed",children:[(0,Ee.jsx)(jp,{title:d.title,setTitle:T=>n({type:"setTitle",title:T}),status:Te,canUndo:s,canRedo:c,onUndo:r,onRedo:o,onSave:()=>void Hn(),onRun:()=>Pt?Ji():zs(),running:Pt,onHelp:()=>vt(!0),onLayout:ae,onFit:yt,onBack:()=>e.onBack(),menuOpen:f,setMenuOpen:z,canSave:w}),(0,Ee.jsxs)("aside",{id:"wfe-menu",className:"menu","aria-label":"Side menu",hidden:!f,children:[(0,Ee.jsxs)("div",{className:"menu__tabs",role:"tablist","aria-label":"Side menu",children:[w&&(0,Ee.jsx)("button",{type:"button",role:"tab","aria-selected":m==="add",className:m==="add"?"is-on":"",onClick:()=>x("add"),children:"Add a step"}),(0,Ee.jsx)("button",{type:"button",role:"tab","aria-selected":m==="edit"||!w,className:m==="edit"||!w?"is-on":"",onClick:()=>x("edit"),children:v?.kind==="node"?"This step":v?.kind==="edge"?"This connection":"Workflow"}),(0,Ee.jsx)("button",{type:"button",className:"btn btn--ghost-icon menu__close","aria-label":"Hide the side menu",title:"Hide the side menu ([)",onClick:()=>z(!1),children:(0,Ee.jsx)(K.x,{})})]}),!w&&(0,Ee.jsx)("p",{className:"menu__note",children:"Only the owner can change and save this workflow. You can look around."}),(0,Ee.jsx)("div",{className:"menu__body",children:m==="add"&&w?(0,Ee.jsx)(Wp,{onLoadTemplate:Dt,onAdd:se}):(0,Ee.jsx)(Dp,{selection:v,nodes:p,edges:g,patch:rt,patchData:Gn,onDelete:Bn,onDuplicate:N,validation:nf,runState:Ds,agents:J,meta:d,patchMeta:T=>n({type:"patchMeta",patch:T}),onDeleteWorkflow:w?rf:void 0,isNew:b})})]}),(0,Ee.jsx)(Rp,{nodes:p,edges:g,selection:v,setSelection:ee,onNodeMove:Q,onNodeMoved:u,onAddNode:D,onConnect:I,onDelete:Bn,runState:Ds,viewBox:C,setViewBox:F,fitSignal:L,editable:w}),(0,Ee.jsx)(Up,{running:Pt||Zt>=0,script:_r,cursor:Zt,onStop:()=>{Ji(),Xi(-1)}}),(0,Ee.jsx)($p,{open:tt,onClose:()=>vt(!1)}),w&&(0,Ee.jsx)(Qp,{currentWorkflow:Rs({meta:d,nodes:p,edges:g}).workflow,onApplyWorkflow:T=>{let E=yo(T),q=vo(E.nodes,E.edges);n({type:"setAll",state:{meta:E.meta,nodes:E.nodes.map(oe=>({...oe,position:oe.position??q[oe.id]})),edges:E.edges,selection:null,isNew:b}}),H(),$("Applied the workflow from the chat","ok")}}),zt&&(0,Ee.jsxs)("div",{className:"toast"+(zt.kind==="err"?" err":""),role:zt.kind==="err"?"alert":"status",children:[(0,Ee.jsx)("span",{className:"dot"}),zt.msg]})]})}function Xp(e,t){return{meta:e.meta,nodes:e.nodes,edges:e.edges,selection:null,isNew:t}}async function gv(e,t){return e==="tpl.blank"?wo(t||"new-workflow"):e==="tpl.whatsapp"?yo(mv(t)):e==="tpl.mr"?yo(vv(t)):wo(t||"new-workflow")}function mv(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:"acme/web",title:"WhatsApp: {{trigger.sender.name}}",description:`From: {{trigger.sender.name}} ({{trigger.fromJid}})
|
|
1494
1623
|
|
|
1495
|
-
{{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
|
|
1624
|
+
{{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 vv(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:"acme/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 ef=ge(De(),1);function yv(e,t){if(document.getElementById(e))return;let n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)}function wv(e,t){yv("wfe-redesign-css",Us),e.id="wfe-root";let n=(0,Zp.createRoot)(e);return n.render((0,ef.jsx)(qp,{...t})),{unmount:()=>n.unmount()}}window.AXWorkflowEditor={mount:wv};document.dispatchEvent(new Event("ax:workflow-editor-ready"));})();
|
|
1496
1625
|
/*! Bundled license information:
|
|
1497
1626
|
|
|
1498
1627
|
react/cjs/react.production.min.js:
|