lua-cli 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/compile.js +42 -2
- package/dist/custom-data-api.d.ts +72 -0
- package/dist/custom-data-api.js +174 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/product-api.d.ts +141 -0
- package/dist/product-api.js +81 -1
- package/dist/services/api.d.ts +268 -0
- package/dist/services/api.js +268 -0
- package/dist/utils/sandbox.js +78 -6
- package/dist/web/app.css +58 -4
- package/dist/web/app.js +13 -13
- package/dist/web/index.html +2 -1
- package/package.json +3 -2
- package/template/lua.skill.yaml +14 -2
- package/template/package.json +1 -1
- package/template/src/index.ts +27 -2
- package/template/src/tools/CustomDataTool.ts +116 -0
- package/template/src/tools/ProductsTool.ts +117 -2
package/dist/web/app.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";var LuaApp=(()=>{var wE=Object.create;var Vl=Object.defineProperty,AE=Object.defineProperties,CE=Object.getOwnPropertyDescriptor,RE=Object.getOwnPropertyDescriptors,_E=Object.getOwnPropertyNames,Bl=Object.getOwnPropertySymbols,DE=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,uh=Object.prototype.propertyIsEnumerable;var dh=Math.pow,ch=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ee=(e,t)=>{for(var n in t||(t={}))du.call(t,n)&&ch(e,n,t[n]);if(Bl)for(var n of Bl(t))uh.call(t,n)&&ch(e,n,t[n]);return e},tt=(e,t)=>AE(e,RE(t));var fh=(e,t)=>{var n={};for(var a in e)du.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&Bl)for(var a of Bl(e))t.indexOf(a)<0&&uh.call(e,a)&&(n[a]=e[a]);return n};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var n in t)Vl(e,n,{get:t[n],enumerable:!0})},OE=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _E(t))!du.call(e,r)&&r!==n&&Vl(e,r,{get:()=>t[r],enumerable:!(a=CE(t,r))||a.enumerable});return e};var Z=(e,t,n)=>(n=e!=null?wE(DE(e)):{},OE(t||!e||!e.__esModule?Vl(n,"default",{value:e,enumerable:!0}):n,e));var O=(e,t,n)=>new Promise((a,r)=>{var i=o=>{try{l(n.next(o))}catch(c){r(c)}},s=o=>{try{l(n.throw(o))}catch(c){r(c)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(i,s);l((n=n.apply(e,t)).next())});var kh=Bt(ge=>{"use strict";var mu=Symbol.for("react.transitional.element"),LE=Symbol.for("react.portal"),zE=Symbol.for("react.fragment"),ME=Symbol.for("react.strict_mode"),UE=Symbol.for("react.profiler"),PE=Symbol.for("react.consumer"),BE=Symbol.for("react.context"),VE=Symbol.for("react.forward_ref"),HE=Symbol.for("react.suspense"),qE=Symbol.for("react.memo"),yh=Symbol.for("react.lazy"),ph=Symbol.iterator;function jE(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xh=Object.assign,Sh={};function Ir(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}Ir.prototype.isReactComponent={};Ir.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=Ir.prototype;function hu(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}var gu=hu.prototype=new Nh;gu.constructor=hu;xh(gu,Ir.prototype);gu.isPureReactComponent=!0;var mh=Array.isArray,Ze={H:null,A:null,T:null,S:null,V:null},Eh=Object.prototype.hasOwnProperty;function vu(e,t,n,a,r,i){return n=i.ref,{$$typeof:mu,type:e,key:t,ref:n!==void 0?n:null,props:i}}function IE(e,t){return vu(e.type,t,void 0,void 0,void 0,e.props)}function yu(e){return typeof e=="object"&&e!==null&&e.$$typeof===mu}function YE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hh=/\/+/g;function pu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?YE(""+e.key):t.toString(36)}function gh(){}function GE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(gh,gh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function jr(e,t,n,a,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case mu:case LE:s=!0;break;case yh:return s=e._init,jr(s(e._payload),t,n,a,r)}}if(s)return r=r(e),s=a===""?"."+pu(e,0):a,mh(r)?(n="",s!=null&&(n=s.replace(hh,"$&/")+"/"),jr(r,t,n,"",function(c){return c})):r!=null&&(yu(r)&&(r=IE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(hh,"$&/")+"/")+s)),t.push(r)),1;s=0;var l=a===""?".":a+":";if(mh(e))for(var o=0;o<e.length;o++)a=e[o],i=l+pu(a,o),s+=jr(a,t,n,i,r);else if(o=jE(e),typeof o=="function")for(e=o.call(e),o=0;!(a=e.next()).done;)a=a.value,i=l+pu(a,o++),s+=jr(a,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return jr(GE(e),t,n,a,r);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 s}function Hl(e,t,n){if(e==null)return e;var a=[],r=0;return jr(e,a,"","",function(i){return t.call(n,i,r++)}),a}function XE(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 vh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function QE(){}ge.Children={map:Hl,forEach:function(e,t,n){Hl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hl(e,function(){t++}),t},toArray:function(e){return Hl(e,function(t){return t})||[]},only:function(e){if(!yu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=Ir;ge.Fragment=zE;ge.Profiler=UE;ge.PureComponent=hu;ge.StrictMode=ME;ge.Suspense=HE;ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;ge.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};ge.cache=function(e){return function(){return e.apply(null,arguments)}};ge.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=xh({},e.props),r=e.key,i=void 0;if(t!=null)for(s in t.ref!==void 0&&(i=void 0),t.key!==void 0&&(r=""+t.key),t)!Eh.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];a.children=l}return vu(e.type,r,void 0,void 0,i,a)};ge.createContext=function(e){return e={$$typeof:BE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:PE,_context:e},e};ge.createElement=function(e,t,n){var a,r={},i=null;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)Eh.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];r.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)r[a]===void 0&&(r[a]=s[a]);return vu(e,i,void 0,void 0,null,r)};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:VE,render:e}};ge.isValidElement=yu;ge.lazy=function(e){return{$$typeof:yh,_payload:{_status:-1,_result:e},_init:XE}};ge.memo=function(e,t){return{$$typeof:qE,type:e,compare:t===void 0?null:t}};ge.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var a=e(),r=Ze.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(QE,vh)}catch(i){vh(i)}finally{Ze.T=t}};ge.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};ge.use=function(e){return Ze.H.use(e)};ge.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};ge.useCallback=function(e,t){return Ze.H.useCallback(e,t)};ge.useContext=function(e){return Ze.H.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};ge.useEffect=function(e,t,n){var a=Ze.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};ge.useId=function(){return Ze.H.useId()};ge.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};ge.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};ge.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};ge.useMemo=function(e,t){return Ze.H.useMemo(e,t)};ge.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};ge.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};ge.useRef=function(e){return Ze.H.useRef(e)};ge.useState=function(e){return Ze.H.useState(e)};ge.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};ge.useTransition=function(){return Ze.H.useTransition()};ge.version="19.1.1"});var $e=Bt((gR,Th)=>{"use strict";Th.exports=kh()});var Mh=Bt(Je=>{"use strict";function Nu(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,r=e[a];if(0<ql(r,t))e[a]=t,e[n]=r,n=a;else break e}}function Gn(e){return e.length===0?null:e[0]}function Il(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,r=e.length,i=r>>>1;a<i;){var s=2*(a+1)-1,l=e[s],o=s+1,c=e[o];if(0>ql(l,n))o<r&&0>ql(c,l)?(e[a]=c,e[o]=n,a=o):(e[a]=l,e[s]=n,a=s);else if(o<r&&0>ql(c,n))e[a]=c,e[o]=n,a=o;else break e}}return t}function ql(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Je.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(wh=performance,Je.unstable_now=function(){return wh.now()}):(bu=Date,Ah=bu.now(),Je.unstable_now=function(){return bu.now()-Ah});var wh,bu,Ah,na=[],ka=[],FE=1,Tn=null,Vt=3,Eu=!1,es=!1,ts=!1,ku=!1,_h=typeof setTimeout=="function"?setTimeout:null,Dh=typeof clearTimeout=="function"?clearTimeout:null,Ch=typeof setImmediate!="undefined"?setImmediate:null;function jl(e){for(var t=Gn(ka);t!==null;){if(t.callback===null)Il(ka);else if(t.startTime<=e)Il(ka),t.sortIndex=t.expirationTime,Nu(na,t);else break;t=Gn(ka)}}function Tu(e){if(ts=!1,jl(e),!es)if(Gn(na)!==null)es=!0,Gr||(Gr=!0,Yr());else{var t=Gn(ka);t!==null&&wu(Tu,t.startTime-e)}}var Gr=!1,ns=-1,Oh=5,Lh=-1;function zh(){return ku?!0:!(Je.unstable_now()-Lh<Oh)}function xu(){if(ku=!1,Gr){var e=Je.unstable_now();Lh=e;var t=!0;try{e:{es=!1,ts&&(ts=!1,Dh(ns),ns=-1),Eu=!0;var n=Vt;try{t:{for(jl(e),Tn=Gn(na);Tn!==null&&!(Tn.expirationTime>e&&zh());){var a=Tn.callback;if(typeof a=="function"){Tn.callback=null,Vt=Tn.priorityLevel;var r=a(Tn.expirationTime<=e);if(e=Je.unstable_now(),typeof r=="function"){Tn.callback=r,jl(e),t=!0;break t}Tn===Gn(na)&&Il(na),jl(e)}else Il(na);Tn=Gn(na)}if(Tn!==null)t=!0;else{var i=Gn(ka);i!==null&&wu(Tu,i.startTime-e),t=!1}}break e}finally{Tn=null,Vt=n,Eu=!1}t=void 0}}finally{t?Yr():Gr=!1}}}var Yr;typeof Ch=="function"?Yr=function(){Ch(xu)}:typeof MessageChannel!="undefined"?(Su=new MessageChannel,Rh=Su.port2,Su.port1.onmessage=xu,Yr=function(){Rh.postMessage(null)}):Yr=function(){_h(xu,0)};var Su,Rh;function wu(e,t){ns=_h(function(){e(Je.unstable_now())},t)}Je.unstable_IdlePriority=5;Je.unstable_ImmediatePriority=1;Je.unstable_LowPriority=4;Je.unstable_NormalPriority=3;Je.unstable_Profiling=null;Je.unstable_UserBlockingPriority=2;Je.unstable_cancelCallback=function(e){e.callback=null};Je.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"):Oh=0<e?Math.floor(1e3/e):5};Je.unstable_getCurrentPriorityLevel=function(){return Vt};Je.unstable_next=function(e){switch(Vt){case 1:case 2:case 3:var t=3;break;default:t=Vt}var n=Vt;Vt=t;try{return e()}finally{Vt=n}};Je.unstable_requestPaint=function(){ku=!0};Je.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Vt;Vt=e;try{return t()}finally{Vt=n}};Je.unstable_scheduleCallback=function(e,t,n){var a=Je.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?a+n:a):n=a,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:FE++,callback:t,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>a?(e.sortIndex=n,Nu(ka,e),Gn(na)===null&&e===Gn(ka)&&(ts?(Dh(ns),ns=-1):ts=!0,wu(Tu,n-a))):(e.sortIndex=r,Nu(na,e),es||Eu||(es=!0,Gr||(Gr=!0,Yr()))),e};Je.unstable_shouldYield=zh;Je.unstable_wrapCallback=function(e){var t=Vt;return function(){var n=Vt;Vt=t;try{return e.apply(this,arguments)}finally{Vt=n}}}});var Ph=Bt((yR,Uh)=>{"use strict";Uh.exports=Mh()});var Vh=Bt(Xt=>{"use strict";var ZE=$e();function Bh(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ta(){}var Gt={d:{f:Ta,r:function(){throw Error(Bh(522))},D:Ta,C:Ta,L:Ta,m:Ta,X:Ta,S:Ta,M:Ta},p:0,findDOMNode:null},$E=Symbol.for("react.portal");function JE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$E,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var as=ZE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Yl(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gt;Xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Bh(299));return JE(e,t,null,n)};Xt.flushSync=function(e){var t=as.T,n=Gt.p;try{if(as.T=null,Gt.p=2,e)return e()}finally{as.T=t,Gt.p=n,Gt.d.f()}};Xt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gt.d.C(e,t))};Xt.prefetchDNS=function(e){typeof e=="string"&&Gt.d.D(e)};Xt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Gt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:i}):n==="script"&&Gt.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Xt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Yl(t.as,t.crossOrigin);Gt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gt.d.M(e)};Xt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin);Gt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Xt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Yl(t.as,t.crossOrigin);Gt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gt.d.m(e)};Xt.requestFormReset=function(e){Gt.d.r(e)};Xt.unstable_batchedUpdates=function(e,t){return e(t)};Xt.useFormState=function(e,t,n){return as.H.useFormState(e,t,n)};Xt.useFormStatus=function(){return as.H.useHostTransitionStatus()};Xt.version="19.1.1"});var jh=Bt((xR,qh)=>{"use strict";function Hh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hh)}catch(e){console.error(e)}}Hh(),qh.exports=Vh()});var Yb=Bt(pc=>{"use strict";var xt=Ph(),uv=$e(),KE=jh();function M(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function dv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function fv(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 Ih(e){if(Ys(e)!==e)throw Error(M(188))}function WE(e){var t=e.alternate;if(!t){if(t=Ys(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return Ih(r),e;if(i===a)return Ih(r),t;i=i.sibling}throw Error(M(188))}if(n.return!==a.return)n=r,a=i;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,a=i;break}if(l===a){s=!0,a=r,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,a=r;break}if(l===a){s=!0,a=i,n=r;break}l=l.sibling}if(!s)throw Error(M(189))}}if(n.alternate!==a)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function pv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=pv(e),t!==null)return t;e=e.sibling}return null}var Qe=Object.assign,ek=Symbol.for("react.element"),Gl=Symbol.for("react.transitional.element"),fs=Symbol.for("react.portal"),Kr=Symbol.for("react.fragment"),mv=Symbol.for("react.strict_mode"),rd=Symbol.for("react.profiler"),tk=Symbol.for("react.provider"),hv=Symbol.for("react.consumer"),la=Symbol.for("react.context"),Wd=Symbol.for("react.forward_ref"),id=Symbol.for("react.suspense"),sd=Symbol.for("react.suspense_list"),ef=Symbol.for("react.memo"),Ca=Symbol.for("react.lazy");Symbol.for("react.scope");var ld=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var nk=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Yh=Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=Yh&&e[Yh]||e["@@iterator"],typeof e=="function"?e:null)}var ak=Symbol.for("react.client.reference");function od(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ak?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kr:return"Fragment";case rd:return"Profiler";case mv:return"StrictMode";case id:return"Suspense";case sd:return"SuspenseList";case ld:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case fs:return"Portal";case la:return(e.displayName||"Context")+".Provider";case hv:return(e._context.displayName||"Context")+".Consumer";case Wd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ef:return t=e.displayName||null,t!==null?t:od(e.type)||"Memo";case Ca:t=e._payload,e=e._init;try{return od(e(t))}catch(n){}}return null}var ps=Array.isArray,ue=uv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce=KE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dr={pending:!1,data:null,method:null,action:null},cd=[],Wr=-1;function Kn(e){return{current:e}}function kt(e){0>Wr||(e.current=cd[Wr],cd[Wr]=null,Wr--)}function We(e,t){Wr++,cd[Wr]=e.current,e.current=t}var Zn=Kn(null),_s=Kn(null),Ba=Kn(null),No=Kn(null);function Eo(e,t){switch(We(Ba,t),We(_s,e),We(Zn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$g(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$g(t),e=Ob(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}kt(Zn),We(Zn,e)}function yi(){kt(Zn),kt(_s),kt(Ba)}function ud(e){e.memoizedState!==null&&We(No,e);var t=Zn.current,n=Ob(t,e.type);t!==n&&(We(_s,e),We(Zn,n))}function ko(e){_s.current===e&&(kt(Zn),kt(_s)),No.current===e&&(kt(No),Hs._currentValue=dr)}var dd=Object.prototype.hasOwnProperty,tf=xt.unstable_scheduleCallback,Au=xt.unstable_cancelCallback,rk=xt.unstable_shouldYield,ik=xt.unstable_requestPaint,$n=xt.unstable_now,sk=xt.unstable_getCurrentPriorityLevel,gv=xt.unstable_ImmediatePriority,vv=xt.unstable_UserBlockingPriority,To=xt.unstable_NormalPriority,lk=xt.unstable_LowPriority,yv=xt.unstable_IdlePriority,ok=xt.log,ck=xt.unstable_setDisableYieldValue,Gs=null,vn=null;function za(e){if(typeof ok=="function"&&ck(e),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(Gs,e)}catch(t){}}var yn=Math.clz32?Math.clz32:fk,uk=Math.log,dk=Math.LN2;function fk(e){return e>>>=0,e===0?32:31-(uk(e)/dk|0)|0}var Xl=256,Ql=4194304;function or(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ko(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var l=a&134217727;return l!==0?(a=l&~i,a!==0?r=or(a):(s&=l,s!==0?r=or(s):n||(n=l&~e,n!==0&&(r=or(n))))):(l=a&~i,l!==0?r=or(l):s!==0?r=or(s):n||(n=a&~e,n!==0&&(r=or(n)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Xs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pk(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bv(){var e=Xl;return Xl<<=1,(Xl&4194048)===0&&(Xl=256),e}function xv(){var e=Ql;return Ql<<=1,(Ql&62914560)===0&&(Ql=4194304),e}function Cu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mk(e,t,n,a,r,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-yn(n),p=1<<u;l[u]=0,o[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var d=f[u];d!==null&&(d.lane&=-536870913)}n&=~p}a!==0&&Sv(e,a,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function Sv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-yn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Nv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-yn(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function nf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function af(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ev(){var e=Ce.p;return e!==0?e:(e=window.event,e===void 0?32:jb(e.type))}function hk(e,t){var n=Ce.p;try{return Ce.p=e,t()}finally{Ce.p=n}}var Za=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Za,rn="__reactProps$"+Za,Ri="__reactContainer$"+Za,fd="__reactEvents$"+Za,gk="__reactListeners$"+Za,vk="__reactHandles$"+Za,Gh="__reactResources$"+Za,Fs="__reactMarker$"+Za;function rf(e){delete e[Ht],delete e[rn],delete e[fd],delete e[gk],delete e[vk]}function ei(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wg(e);e!==null;){if(n=e[Ht])return n;e=Wg(e)}return t}e=n,n=e.parentNode}return null}function _i(e){if(e=e[Ht]||e[Ri]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(M(33))}function ui(e){var t=e[Gh];return t||(t=e[Gh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[Fs]=!0}var kv=new Set,Tv={};function Nr(e,t){bi(e,t),bi(e+"Capture",t)}function bi(e,t){for(Tv[e]=t,e=0;e<t.length;e++)kv.add(t[e])}var yk=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Xh={},Qh={};function bk(e){return dd.call(Qh,e)?!0:dd.call(Xh,e)?!1:yk.test(e)?Qh[e]=!0:(Xh[e]=!0,!1)}function oo(e,t,n){if(bk(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Fl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function aa(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var Ru,Fh;function Zr(e){if(Ru===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ru=t&&t[1]||"",Fh=-1<n.stack.indexOf(`
|
|
1
|
+
"use strict";var LuaApp=(()=>{var wE=Object.create;var Vl=Object.defineProperty,AE=Object.defineProperties,CE=Object.getOwnPropertyDescriptor,RE=Object.getOwnPropertyDescriptors,_E=Object.getOwnPropertyNames,Bl=Object.getOwnPropertySymbols,DE=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,uh=Object.prototype.propertyIsEnumerable;var dh=Math.pow,ch=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ee=(e,t)=>{for(var n in t||(t={}))du.call(t,n)&&ch(e,n,t[n]);if(Bl)for(var n of Bl(t))uh.call(t,n)&&ch(e,n,t[n]);return e},at=(e,t)=>AE(e,RE(t));var fh=(e,t)=>{var n={};for(var a in e)du.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&Bl)for(var a of Bl(e))t.indexOf(a)<0&&uh.call(e,a)&&(n[a]=e[a]);return n};var S=(e,t)=>()=>(e&&(t=e(e=0)),t);var Vt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var n in t)Vl(e,n,{get:t[n],enumerable:!0})},OE=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _E(t))!du.call(e,r)&&r!==n&&Vl(e,r,{get:()=>t[r],enumerable:!(a=CE(t,r))||a.enumerable});return e};var Z=(e,t,n)=>(n=e!=null?wE(DE(e)):{},OE(t||!e||!e.__esModule?Vl(n,"default",{value:e,enumerable:!0}):n,e));var O=(e,t,n)=>new Promise((a,r)=>{var i=o=>{try{l(n.next(o))}catch(c){r(c)}},s=o=>{try{l(n.throw(o))}catch(c){r(c)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(i,s);l((n=n.apply(e,t)).next())});var kh=Vt(ge=>{"use strict";var mu=Symbol.for("react.transitional.element"),LE=Symbol.for("react.portal"),zE=Symbol.for("react.fragment"),ME=Symbol.for("react.strict_mode"),UE=Symbol.for("react.profiler"),PE=Symbol.for("react.consumer"),BE=Symbol.for("react.context"),VE=Symbol.for("react.forward_ref"),HE=Symbol.for("react.suspense"),qE=Symbol.for("react.memo"),yh=Symbol.for("react.lazy"),ph=Symbol.iterator;function jE(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xh=Object.assign,Sh={};function Ir(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}Ir.prototype.isReactComponent={};Ir.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=Ir.prototype;function hu(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}var gu=hu.prototype=new Nh;gu.constructor=hu;xh(gu,Ir.prototype);gu.isPureReactComponent=!0;var mh=Array.isArray,Ze={H:null,A:null,T:null,S:null,V:null},Eh=Object.prototype.hasOwnProperty;function vu(e,t,n,a,r,i){return n=i.ref,{$$typeof:mu,type:e,key:t,ref:n!==void 0?n:null,props:i}}function IE(e,t){return vu(e.type,t,void 0,void 0,void 0,e.props)}function yu(e){return typeof e=="object"&&e!==null&&e.$$typeof===mu}function YE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hh=/\/+/g;function pu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?YE(""+e.key):t.toString(36)}function gh(){}function GE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(gh,gh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function jr(e,t,n,a,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case mu:case LE:s=!0;break;case yh:return s=e._init,jr(s(e._payload),t,n,a,r)}}if(s)return r=r(e),s=a===""?"."+pu(e,0):a,mh(r)?(n="",s!=null&&(n=s.replace(hh,"$&/")+"/"),jr(r,t,n,"",function(c){return c})):r!=null&&(yu(r)&&(r=IE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(hh,"$&/")+"/")+s)),t.push(r)),1;s=0;var l=a===""?".":a+":";if(mh(e))for(var o=0;o<e.length;o++)a=e[o],i=l+pu(a,o),s+=jr(a,t,n,i,r);else if(o=jE(e),typeof o=="function")for(e=o.call(e),o=0;!(a=e.next()).done;)a=a.value,i=l+pu(a,o++),s+=jr(a,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return jr(GE(e),t,n,a,r);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 s}function Hl(e,t,n){if(e==null)return e;var a=[],r=0;return jr(e,a,"","",function(i){return t.call(n,i,r++)}),a}function XE(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 vh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function QE(){}ge.Children={map:Hl,forEach:function(e,t,n){Hl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hl(e,function(){t++}),t},toArray:function(e){return Hl(e,function(t){return t})||[]},only:function(e){if(!yu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=Ir;ge.Fragment=zE;ge.Profiler=UE;ge.PureComponent=hu;ge.StrictMode=ME;ge.Suspense=HE;ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;ge.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};ge.cache=function(e){return function(){return e.apply(null,arguments)}};ge.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=xh({},e.props),r=e.key,i=void 0;if(t!=null)for(s in t.ref!==void 0&&(i=void 0),t.key!==void 0&&(r=""+t.key),t)!Eh.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];a.children=l}return vu(e.type,r,void 0,void 0,i,a)};ge.createContext=function(e){return e={$$typeof:BE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:PE,_context:e},e};ge.createElement=function(e,t,n){var a,r={},i=null;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)Eh.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];r.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)r[a]===void 0&&(r[a]=s[a]);return vu(e,i,void 0,void 0,null,r)};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:VE,render:e}};ge.isValidElement=yu;ge.lazy=function(e){return{$$typeof:yh,_payload:{_status:-1,_result:e},_init:XE}};ge.memo=function(e,t){return{$$typeof:qE,type:e,compare:t===void 0?null:t}};ge.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var a=e(),r=Ze.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(QE,vh)}catch(i){vh(i)}finally{Ze.T=t}};ge.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};ge.use=function(e){return Ze.H.use(e)};ge.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};ge.useCallback=function(e,t){return Ze.H.useCallback(e,t)};ge.useContext=function(e){return Ze.H.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};ge.useEffect=function(e,t,n){var a=Ze.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};ge.useId=function(){return Ze.H.useId()};ge.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};ge.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};ge.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};ge.useMemo=function(e,t){return Ze.H.useMemo(e,t)};ge.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};ge.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};ge.useRef=function(e){return Ze.H.useRef(e)};ge.useState=function(e){return Ze.H.useState(e)};ge.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};ge.useTransition=function(){return Ze.H.useTransition()};ge.version="19.1.1"});var $e=Vt((gR,Th)=>{"use strict";Th.exports=kh()});var Mh=Vt(Je=>{"use strict";function Nu(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,r=e[a];if(0<ql(r,t))e[a]=t,e[n]=r,n=a;else break e}}function Gn(e){return e.length===0?null:e[0]}function Il(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,r=e.length,i=r>>>1;a<i;){var s=2*(a+1)-1,l=e[s],o=s+1,c=e[o];if(0>ql(l,n))o<r&&0>ql(c,l)?(e[a]=c,e[o]=n,a=o):(e[a]=l,e[s]=n,a=s);else if(o<r&&0>ql(c,n))e[a]=c,e[o]=n,a=o;else break e}}return t}function ql(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Je.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(wh=performance,Je.unstable_now=function(){return wh.now()}):(bu=Date,Ah=bu.now(),Je.unstable_now=function(){return bu.now()-Ah});var wh,bu,Ah,na=[],ka=[],FE=1,wn=null,Ht=3,Eu=!1,es=!1,ts=!1,ku=!1,_h=typeof setTimeout=="function"?setTimeout:null,Dh=typeof clearTimeout=="function"?clearTimeout:null,Ch=typeof setImmediate!="undefined"?setImmediate:null;function jl(e){for(var t=Gn(ka);t!==null;){if(t.callback===null)Il(ka);else if(t.startTime<=e)Il(ka),t.sortIndex=t.expirationTime,Nu(na,t);else break;t=Gn(ka)}}function Tu(e){if(ts=!1,jl(e),!es)if(Gn(na)!==null)es=!0,Gr||(Gr=!0,Yr());else{var t=Gn(ka);t!==null&&wu(Tu,t.startTime-e)}}var Gr=!1,ns=-1,Oh=5,Lh=-1;function zh(){return ku?!0:!(Je.unstable_now()-Lh<Oh)}function xu(){if(ku=!1,Gr){var e=Je.unstable_now();Lh=e;var t=!0;try{e:{es=!1,ts&&(ts=!1,Dh(ns),ns=-1),Eu=!0;var n=Ht;try{t:{for(jl(e),wn=Gn(na);wn!==null&&!(wn.expirationTime>e&&zh());){var a=wn.callback;if(typeof a=="function"){wn.callback=null,Ht=wn.priorityLevel;var r=a(wn.expirationTime<=e);if(e=Je.unstable_now(),typeof r=="function"){wn.callback=r,jl(e),t=!0;break t}wn===Gn(na)&&Il(na),jl(e)}else Il(na);wn=Gn(na)}if(wn!==null)t=!0;else{var i=Gn(ka);i!==null&&wu(Tu,i.startTime-e),t=!1}}break e}finally{wn=null,Ht=n,Eu=!1}t=void 0}}finally{t?Yr():Gr=!1}}}var Yr;typeof Ch=="function"?Yr=function(){Ch(xu)}:typeof MessageChannel!="undefined"?(Su=new MessageChannel,Rh=Su.port2,Su.port1.onmessage=xu,Yr=function(){Rh.postMessage(null)}):Yr=function(){_h(xu,0)};var Su,Rh;function wu(e,t){ns=_h(function(){e(Je.unstable_now())},t)}Je.unstable_IdlePriority=5;Je.unstable_ImmediatePriority=1;Je.unstable_LowPriority=4;Je.unstable_NormalPriority=3;Je.unstable_Profiling=null;Je.unstable_UserBlockingPriority=2;Je.unstable_cancelCallback=function(e){e.callback=null};Je.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"):Oh=0<e?Math.floor(1e3/e):5};Je.unstable_getCurrentPriorityLevel=function(){return Ht};Je.unstable_next=function(e){switch(Ht){case 1:case 2:case 3:var t=3;break;default:t=Ht}var n=Ht;Ht=t;try{return e()}finally{Ht=n}};Je.unstable_requestPaint=function(){ku=!0};Je.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ht;Ht=e;try{return t()}finally{Ht=n}};Je.unstable_scheduleCallback=function(e,t,n){var a=Je.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?a+n:a):n=a,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:FE++,callback:t,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>a?(e.sortIndex=n,Nu(ka,e),Gn(na)===null&&e===Gn(ka)&&(ts?(Dh(ns),ns=-1):ts=!0,wu(Tu,n-a))):(e.sortIndex=r,Nu(na,e),es||Eu||(es=!0,Gr||(Gr=!0,Yr()))),e};Je.unstable_shouldYield=zh;Je.unstable_wrapCallback=function(e){var t=Ht;return function(){var n=Ht;Ht=t;try{return e.apply(this,arguments)}finally{Ht=n}}}});var Ph=Vt((yR,Uh)=>{"use strict";Uh.exports=Mh()});var Vh=Vt(Qt=>{"use strict";var ZE=$e();function Bh(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ta(){}var Xt={d:{f:Ta,r:function(){throw Error(Bh(522))},D:Ta,C:Ta,L:Ta,m:Ta,X:Ta,S:Ta,M:Ta},p:0,findDOMNode:null},$E=Symbol.for("react.portal");function JE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$E,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var as=ZE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Yl(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Xt;Qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Bh(299));return JE(e,t,null,n)};Qt.flushSync=function(e){var t=as.T,n=Xt.p;try{if(as.T=null,Xt.p=2,e)return e()}finally{as.T=t,Xt.p=n,Xt.d.f()}};Qt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Xt.d.C(e,t))};Qt.prefetchDNS=function(e){typeof e=="string"&&Xt.d.D(e)};Qt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Xt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:i}):n==="script"&&Xt.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Qt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Yl(t.as,t.crossOrigin);Xt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Xt.d.M(e)};Qt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin);Xt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Qt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Yl(t.as,t.crossOrigin);Xt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Xt.d.m(e)};Qt.requestFormReset=function(e){Xt.d.r(e)};Qt.unstable_batchedUpdates=function(e,t){return e(t)};Qt.useFormState=function(e,t,n){return as.H.useFormState(e,t,n)};Qt.useFormStatus=function(){return as.H.useHostTransitionStatus()};Qt.version="19.1.1"});var jh=Vt((xR,qh)=>{"use strict";function Hh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hh)}catch(e){console.error(e)}}Hh(),qh.exports=Vh()});var Yb=Vt(pc=>{"use strict";var xt=Ph(),uv=$e(),KE=jh();function M(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function dv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function fv(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 Ih(e){if(Ys(e)!==e)throw Error(M(188))}function WE(e){var t=e.alternate;if(!t){if(t=Ys(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return Ih(r),e;if(i===a)return Ih(r),t;i=i.sibling}throw Error(M(188))}if(n.return!==a.return)n=r,a=i;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,a=i;break}if(l===a){s=!0,a=r,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,a=r;break}if(l===a){s=!0,a=i,n=r;break}l=l.sibling}if(!s)throw Error(M(189))}}if(n.alternate!==a)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function pv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=pv(e),t!==null)return t;e=e.sibling}return null}var Qe=Object.assign,ek=Symbol.for("react.element"),Gl=Symbol.for("react.transitional.element"),fs=Symbol.for("react.portal"),Kr=Symbol.for("react.fragment"),mv=Symbol.for("react.strict_mode"),rd=Symbol.for("react.profiler"),tk=Symbol.for("react.provider"),hv=Symbol.for("react.consumer"),la=Symbol.for("react.context"),Wd=Symbol.for("react.forward_ref"),id=Symbol.for("react.suspense"),sd=Symbol.for("react.suspense_list"),ef=Symbol.for("react.memo"),Ca=Symbol.for("react.lazy");Symbol.for("react.scope");var ld=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var nk=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Yh=Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=Yh&&e[Yh]||e["@@iterator"],typeof e=="function"?e:null)}var ak=Symbol.for("react.client.reference");function od(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ak?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kr:return"Fragment";case rd:return"Profiler";case mv:return"StrictMode";case id:return"Suspense";case sd:return"SuspenseList";case ld:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case fs:return"Portal";case la:return(e.displayName||"Context")+".Provider";case hv:return(e._context.displayName||"Context")+".Consumer";case Wd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ef:return t=e.displayName||null,t!==null?t:od(e.type)||"Memo";case Ca:t=e._payload,e=e._init;try{return od(e(t))}catch(n){}}return null}var ps=Array.isArray,ue=uv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re=KE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dr={pending:!1,data:null,method:null,action:null},cd=[],Wr=-1;function Kn(e){return{current:e}}function Tt(e){0>Wr||(e.current=cd[Wr],cd[Wr]=null,Wr--)}function We(e,t){Wr++,cd[Wr]=e.current,e.current=t}var Zn=Kn(null),_s=Kn(null),Ba=Kn(null),No=Kn(null);function Eo(e,t){switch(We(Ba,t),We(_s,e),We(Zn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$g(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$g(t),e=Ob(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Tt(Zn),We(Zn,e)}function yi(){Tt(Zn),Tt(_s),Tt(Ba)}function ud(e){e.memoizedState!==null&&We(No,e);var t=Zn.current,n=Ob(t,e.type);t!==n&&(We(_s,e),We(Zn,n))}function ko(e){_s.current===e&&(Tt(Zn),Tt(_s)),No.current===e&&(Tt(No),Hs._currentValue=dr)}var dd=Object.prototype.hasOwnProperty,tf=xt.unstable_scheduleCallback,Au=xt.unstable_cancelCallback,rk=xt.unstable_shouldYield,ik=xt.unstable_requestPaint,$n=xt.unstable_now,sk=xt.unstable_getCurrentPriorityLevel,gv=xt.unstable_ImmediatePriority,vv=xt.unstable_UserBlockingPriority,To=xt.unstable_NormalPriority,lk=xt.unstable_LowPriority,yv=xt.unstable_IdlePriority,ok=xt.log,ck=xt.unstable_setDisableYieldValue,Gs=null,vn=null;function za(e){if(typeof ok=="function"&&ck(e),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(Gs,e)}catch(t){}}var yn=Math.clz32?Math.clz32:fk,uk=Math.log,dk=Math.LN2;function fk(e){return e>>>=0,e===0?32:31-(uk(e)/dk|0)|0}var Xl=256,Ql=4194304;function or(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ko(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var l=a&134217727;return l!==0?(a=l&~i,a!==0?r=or(a):(s&=l,s!==0?r=or(s):n||(n=l&~e,n!==0&&(r=or(n))))):(l=a&~i,l!==0?r=or(l):s!==0?r=or(s):n||(n=a&~e,n!==0&&(r=or(n)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Xs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pk(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bv(){var e=Xl;return Xl<<=1,(Xl&4194048)===0&&(Xl=256),e}function xv(){var e=Ql;return Ql<<=1,(Ql&62914560)===0&&(Ql=4194304),e}function Cu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mk(e,t,n,a,r,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-yn(n),p=1<<u;l[u]=0,o[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var d=f[u];d!==null&&(d.lane&=-536870913)}n&=~p}a!==0&&Sv(e,a,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function Sv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-yn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Nv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-yn(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function nf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function af(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ev(){var e=Re.p;return e!==0?e:(e=window.event,e===void 0?32:jb(e.type))}function hk(e,t){var n=Re.p;try{return Re.p=e,t()}finally{Re.p=n}}var Za=Math.random().toString(36).slice(2),qt="__reactFiber$"+Za,sn="__reactProps$"+Za,Ri="__reactContainer$"+Za,fd="__reactEvents$"+Za,gk="__reactListeners$"+Za,vk="__reactHandles$"+Za,Gh="__reactResources$"+Za,Fs="__reactMarker$"+Za;function rf(e){delete e[qt],delete e[sn],delete e[fd],delete e[gk],delete e[vk]}function ei(e){var t=e[qt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wg(e);e!==null;){if(n=e[qt])return n;e=Wg(e)}return t}e=n,n=e.parentNode}return null}function _i(e){if(e=e[qt]||e[Ri]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(M(33))}function ui(e){var t=e[Gh];return t||(t=e[Gh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[Fs]=!0}var kv=new Set,Tv={};function Nr(e,t){bi(e,t),bi(e+"Capture",t)}function bi(e,t){for(Tv[e]=t,e=0;e<t.length;e++)kv.add(t[e])}var yk=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Xh={},Qh={};function bk(e){return dd.call(Qh,e)?!0:dd.call(Xh,e)?!1:yk.test(e)?Qh[e]=!0:(Xh[e]=!0,!1)}function oo(e,t,n){if(bk(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Fl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function aa(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var Ru,Fh;function Zr(e){if(Ru===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ru=t&&t[1]||"",Fh=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+Ru+e+Fh}var _u=!1;function Du(e,t){if(!e||_u)return"";_u=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(d){var f=d}Reflect.construct(e,[],p)}else{try{p.call()}catch(d){f=d}e.call(p.prototype)}}else{try{throw Error()}catch(d){f=d}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(d){if(d&&f&&typeof d.stack=="string")return[d.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),s=i[0],l=i[1];if(s&&l){var o=s.split(`
|
|
4
4
|
`),c=l.split(`
|
|
5
5
|
`);for(r=a=0;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(a===o.length||r===c.length)for(a=o.length-1,r=c.length-1;1<=a&&0<=r&&o[a]!==c[r];)r--;for(;1<=a&&0<=r;a--,r--)if(o[a]!==c[r]){if(a!==1||r!==1)do if(a--,r--,0>r||o[a]!==c[r]){var u=`
|
|
6
6
|
`+o[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=r);break}}}finally{_u=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Zr(n):""}function xk(e){switch(e.tag){case 26:case 27:case 5:return Zr(e.type);case 16:return Zr("Lazy");case 13:return Zr("Suspense");case 19:return Zr("SuspenseList");case 0:case 15:return Du(e.type,!1);case 11:return Du(e.type.render,!1);case 1:return Du(e.type,!0);case 31:return Zr("Activity");default:return""}}function Zh(e){try{var t="";do t+=xk(e),e=e.return;while(e);return t}catch(n){return`
|
|
7
7
|
Error generating stack: `+n.message+`
|
|
8
|
-
`+n.stack}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sk(e){var t=wv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){a=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(s){a=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wo(e){e._valueTracker||(e._valueTracker=Sk(e))}function Av(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ao(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Nk=/[\n"\\]/g;function _n(e){return e.replace(Nk,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pd(e,t,n,a,r,i,s,l){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+An(t)):e.value!==""+An(t)&&(e.value=""+An(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?md(e,s,An(t)):n!=null?md(e,s,An(n)):a!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+An(l):e.removeAttribute("name")}function Cv(e,t,n,a,r,i,s,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+An(n):"",t=t!=null?""+An(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}a=a!=null?a:r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=l?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function md(e,t,n){t==="number"&&Ao(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function di(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+An(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Rv(e,t,n){if(t!=null&&(t=""+An(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+An(n):""}function _v(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(M(92));if(ps(a)){if(1<a.length)throw Error(M(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=An(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ek=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $h(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Ek.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Dv(e,t,n){if(t!=null&&typeof t!="object")throw Error(M(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&$h(e,r,a)}else for(var i in t)t.hasOwnProperty(i)&&$h(e,i,t[i])}function sf(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kk=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Tk=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function co(e){return Tk.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var hd=null;function lf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,fi=null;function Jh(e){var t=_i(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(pd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+_n(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[rn]||null;if(!r)throw Error(M(90));pd(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Av(a)}break e;case"textarea":Rv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&di(e,!!n.multiple,t,!1)}}}var Ou=!1;function Ov(e,t,n){if(Ou)return e(t,n);Ou=!0;try{var a=e(t);return a}finally{if(Ou=!1,(ti!==null||fi!==null)&&(oc(),ti&&(t=ti,e=fi,fi=ti=null,Jh(t),e)))for(t=0;t<e.length;t++)Jh(e[t])}}function Ds(e,t){var n=e.stateNode;if(n===null)return null;var a=n[rn]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var ma=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),gd=!1;if(ma)try{Xr={},Object.defineProperty(Xr,"passive",{get:function(){gd=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch(e){gd=!1}var Xr,Ma=null,of=null,uo=null;function Lv(){if(uo)return uo;var e,t=of,n=t.length,a,r="value"in Ma?Ma.value:Ma.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var s=n-e;for(a=1;a<=s&&t[n-a]===r[i-a];a++);return uo=r.slice(e,1<a?1-a:void 0)}function fo(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 Zl(){return!0}function Kh(){return!1}function sn(e){function t(n,a,r,i,s){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zl:Kh,this.isPropagationStopped=Kh,this}return Qe(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=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wo=sn(Er),Zs=Qe({},Er,{view:0,detail:0}),wk=sn(Zs),Lu,zu,is,ec=Qe({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cf,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!==is&&(is&&e.type==="mousemove"?(Lu=e.screenX-is.screenX,zu=e.screenY-is.screenY):zu=Lu=0,is=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),Wh=sn(ec),Ak=Qe({},ec,{dataTransfer:0}),Ck=sn(Ak),Rk=Qe({},Zs,{relatedTarget:0}),Mu=sn(Rk),_k=Qe({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),Dk=sn(_k),Ok=Qe({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lk=sn(Ok),zk=Qe({},Er,{data:0}),eg=sn(zk),Mk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Uk={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"},Pk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pk[e])?!!t[e]:!1}function cf(){return Bk}var Vk=Qe({},Zs,{key:function(e){if(e.key){var t=Mk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Uk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cf,charCode:function(e){return e.type==="keypress"?fo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hk=sn(Vk),qk=Qe({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=sn(qk),jk=Qe({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cf}),Ik=sn(jk),Yk=Qe({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gk=sn(Yk),Xk=Qe({},ec,{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}),Qk=sn(Xk),Fk=Qe({},Er,{newState:0,oldState:0}),Zk=sn(Fk),$k=[9,13,27,32],uf=ma&&"CompositionEvent"in window,gs=null;ma&&"documentMode"in document&&(gs=document.documentMode);var Jk=ma&&"TextEvent"in window&&!gs,zv=ma&&(!uf||gs&&8<gs&&11>=gs),ng=" ",ag=!1;function Mv(e,t){switch(e){case"keyup":return $k.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function Kk(e,t){switch(e){case"compositionend":return Uv(t);case"keypress":return t.which!==32?null:(ag=!0,ng);case"textInput":return e=t.data,e===ng&&ag?null:e;default:return null}}function Wk(e,t){if(ni)return e==="compositionend"||!uf&&Mv(e,t)?(e=Lv(),uo=of=Ma=null,ni=!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 zv&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 rg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function Pv(e,t,n,a){ti?fi?fi.push(a):fi=[a]:ti=a,t=Go(t,"onChange"),0<t.length&&(n=new Wo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var vs=null,Os=null;function tT(e){Rb(e,0)}function tc(e){var t=ms(e);if(Av(t))return e}function ig(e,t){if(e==="change")return t}var Bv=!1;ma&&(ma?(Jl="oninput"in document,Jl||(Uu=document.createElement("div"),Uu.setAttribute("oninput","return;"),Jl=typeof Uu.oninput=="function"),$l=Jl):$l=!1,Bv=$l&&(!document.documentMode||9<document.documentMode));var $l,Jl,Uu;function sg(){vs&&(vs.detachEvent("onpropertychange",Vv),Os=vs=null)}function Vv(e){if(e.propertyName==="value"&&tc(Os)){var t=[];Pv(t,Os,e,lf(e)),Ov(tT,t)}}function nT(e,t,n){e==="focusin"?(sg(),vs=t,Os=n,vs.attachEvent("onpropertychange",Vv)):e==="focusout"&&sg()}function aT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tc(Os)}function rT(e,t){if(e==="click")return tc(t)}function iT(e,t){if(e==="input"||e==="change")return tc(t)}function sT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:sT;function Ls(e,t){if(Sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!dd.call(t,r)||!Sn(e[r],t[r]))return!1}return!0}function lg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function og(e,t){var n=lg(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lg(n)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ao(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(a){n=!1}if(n)e=t.contentWindow;else break;t=Ao(e.document)}return t}function df(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lT=ma&&"documentMode"in document&&11>=document.documentMode,ai=null,vd=null,ys=null,yd=!1;function cg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yd||ai==null||ai!==Ao(a)||(a=ai,"selectionStart"in a&&df(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ys&&Ls(ys,a)||(ys=a,a=Go(vd,"onSelect"),0<a.length&&(t=new Wo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ai)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ri={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},Pu={},jv={};ma&&(jv=document.createElement("div").style,"AnimationEvent"in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),"TransitionEvent"in window||delete ri.transitionend.transition);function kr(e){if(Pu[e])return Pu[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jv)return Pu[e]=t[n];return e}var Iv=kr("animationend"),Yv=kr("animationiteration"),Gv=kr("animationstart"),oT=kr("transitionrun"),cT=kr("transitionstart"),uT=kr("transitioncancel"),Xv=kr("transitionend"),Qv=new Map,bd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");bd.push("scrollEnd");function jn(e,t){Qv.set(e,t),Nr(t,[e])}var ug=new WeakMap;function Dn(e,t){if(typeof e=="object"&&e!==null){var n=ug.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zh(t)},ug.set(e,t),t)}return{value:e,source:t,stack:Zh(t)}}var wn=[],ii=0,ff=0;function nc(){for(var e=ii,t=ff=ii=0;t<e;){var n=wn[t];wn[t++]=null;var a=wn[t];wn[t++]=null;var r=wn[t];wn[t++]=null;var i=wn[t];if(wn[t++]=null,a!==null&&r!==null){var s=a.pending;s===null?r.next=r:(r.next=s.next,s.next=r),a.pending=r}i!==0&&Fv(n,r,i)}}function ac(e,t,n,a){wn[ii++]=e,wn[ii++]=t,wn[ii++]=n,wn[ii++]=a,ff|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function pf(e,t,n,a){return ac(e,t,n,a),Co(e)}function Di(e,t){return ac(e,null,null,t),Co(e)}function Fv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-yn(n),e=i.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),i):null}function Co(e){if(50<Cs)throw Cs=0,Hd=null,Error(M(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function dT(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,a){return new dT(e,t,n,a)}function mf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var n=e.alternate;return n===null?(n=gn(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&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Zv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,n,a,r,i){var s=0;if(a=e,typeof e=="function")mf(e)&&(s=1);else if(typeof e=="string")s=dw(e,n,Zn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ld:return e=gn(31,n,t,r),e.elementType=ld,e.lanes=i,e;case Kr:return fr(n.children,r,i,t);case mv:s=8,r|=24;break;case rd:return e=gn(12,n,t,r|2),e.elementType=rd,e.lanes=i,e;case id:return e=gn(13,n,t,r),e.elementType=id,e.lanes=i,e;case sd:return e=gn(19,n,t,r),e.elementType=sd,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tk:case la:s=10;break e;case hv:s=9;break e;case Wd:s=11;break e;case ef:s=14;break e;case Ca:s=16,a=null;break e}s=29,n=Error(M(130,e===null?"null":typeof e,"")),a=null}return t=gn(s,n,t,r),t.elementType=e,t.type=a,t.lanes=i,t}function fr(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function Bu(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function Vu(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=[],oi=0,Ro=null,_o=0,Cn=[],Rn=0,pr=null,oa=1,ca="";function cr(e,t){li[oi++]=_o,li[oi++]=Ro,Ro=e,_o=t}function $v(e,t,n){Cn[Rn++]=oa,Cn[Rn++]=ca,Cn[Rn++]=pr,pr=e;var a=oa;e=ca;var r=32-yn(a)-1;a&=~(1<<r),n+=1;var i=32-yn(t)+r;if(30<i){var s=r-r%5;i=(a&(1<<s)-1).toString(32),a>>=s,r-=s,oa=1<<32-yn(t)+r|n<<r|a,ca=i+e}else oa=1<<i|n<<r|a,ca=e}function hf(e){e.return!==null&&(cr(e,1),$v(e,1,0))}function gf(e){for(;e===Ro;)Ro=li[--oi],li[oi]=null,_o=li[--oi],li[oi]=null;for(;e===pr;)pr=Cn[--Rn],Cn[Rn]=null,ca=Cn[--Rn],Cn[Rn]=null,oa=Cn[--Rn],Cn[Rn]=null}var Qt=null,nt=null,Ae=!1,mr=null,Qn=!1,xd=Error(M(519));function yr(e){var t=Error(M(418,""));throw zs(Dn(t,e)),xd}function dg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ht]=e,t[rn]=a,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Ps.length;n++)xe(Ps[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Cv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),wo(t);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),_v(t,a.value,a.defaultValue,a.children),wo(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Db(t.textContent,n)?(a.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),a.onScroll!=null&&xe("scroll",t),a.onScrollEnd!=null&&xe("scrollend",t),a.onClick!=null&&(t.onclick=dc),t=!0):t=!1,t||yr(e)}function fg(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Qt=Qt.return}}function ss(e){if(e!==Qt)return!1;if(!Ae)return fg(e),Ae=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Xd(e.type,e.memoizedProps)),n=!n),n&&nt&&yr(e),fg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){nt=qn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,$a(e.type)?(e=Zd,Zd=null,nt=e):nt=t):nt=Qt?qn(e.stateNode.nextSibling):null;return!0}function $s(){nt=Qt=null,Ae=!1}function pg(){var e=mr;return e!==null&&(an===null?an=e:an.push.apply(an,e),mr=null),e}function zs(e){mr===null?mr=[e]:mr.push(e)}var Sd=Kn(null),Tr=null,ua=null;function _a(e,t,n){We(Sd,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=Sd.current,kt(Sd)}function Nd(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Ed(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var s=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var o=0;o<t.length;o++)if(l.context===t[o]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Nd(i.return,n,e),a||(s=null);break e}i=l.next}}else if(r.tag===18){if(s=r.return,s===null)throw Error(M(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),Nd(s,n,e),s=null}else s=r.child;if(s!==null)s.return=r;else for(s=r;s!==null;){if(s===e){s=null;break}if(r=s.sibling,r!==null){r.return=s.return,s=r;break}s=s.return}r=s}}function Js(e,t,n,a){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var s=r.alternate;if(s===null)throw Error(M(387));if(s=s.memoizedProps,s!==null){var l=r.type;Sn(r.pendingProps.value,s.value)||(e!==null?e.push(l):e=[l])}}else if(r===No.current){if(s=r.alternate,s===null)throw Error(M(387));s.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Hs):e=[Hs])}r=r.return}e!==null&&Ed(t,e,n,a),t.flags|=262144}function Do(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function br(e){Tr=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Jv(Tr,e)}function Kl(e,t){return Tr===null&&br(e),Jv(e,t)}function Jv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ua===null){if(e===null)throw Error(M(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return n}var fT=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},pT=xt.unstable_scheduleCallback,mT=xt.unstable_NormalPriority,yt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new fT,data:new Map,refCount:0}}function Ks(e){e.refCount--,e.refCount===0&&pT(mT,function(){e.controller.abort()})}var bs=null,kd=0,Si=0,pi=null;function hT(e,t){if(bs===null){var n=bs=[];kd=0,Si=Hf(),pi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return kd++,t.then(mg,mg),t}function mg(){if(--kd===0&&bs!==null){pi!==null&&(pi.status="fulfilled");var e=bs;bs=null,Si=0,pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gT(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var hg=ue.S;ue.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&hT(e,t),hg!==null&&hg(e,t)};var hr=Kn(null);function yf(){var e=hr.current;return e!==null?e:Ye.pooledCache}function mo(e,t){t===null?We(hr,hr.current):We(hr,t.pool)}function Kv(){var e=yf();return e===null?null:{parent:yt._currentValue,pool:e}}var Ws=Error(M(460)),Wv=Error(M(474)),rc=Error(M(542)),Td={then:function(){}};function gg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wl(){}function ey(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Wl,Wl),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e;default:if(typeof t.status=="string")t.then(Wl,Wl);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(M(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e}throw xs=t,Ws}}var xs=null;function vg(){if(xs===null)throw Error(M(459));var e=xs;return xs=null,e}function yg(e){if(e===Ws||e===rc)throw Error(M(483))}var Ra=!1;function bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=Co(e),Fv(e,null,n),t}return ac(e,a,t,n),Co(e)}function Ss(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Nv(e,n)}}function Hu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ad=!1;function Ns(){if(Ad){var e=pi;if(e!==null)throw e}}function Es(e,t,n,a){Ad=!1;var r=e.updateQueue;Ra=!1;var i=r.firstBaseUpdate,s=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var o=l,c=o.next;o.next=null,s===null?i=c:s.next=c,s=o;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==s&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=o))}if(i!==null){var p=r.baseState;s=0,u=c=o=null,l=i;do{var f=l.lane&-536870913,d=f!==l.lane;if(d?(ke&f)===f:(a&f)===f){f!==0&&f===Si&&(Ad=!0),u!==null&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var x=e,y=l;f=t;var k=n;switch(y.tag){case 1:if(x=y.payload,typeof x=="function"){p=x.call(k,p,f);break e}p=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,f=typeof x=="function"?x.call(k,p,f):x,f==null)break e;p=Qe({},p,f);break e;case 2:Ra=!0}}f=l.callback,f!==null&&(e.flags|=64,d&&(e.flags|=8192),d=r.callbacks,d===null?r.callbacks=[f]:d.push(f))}else d={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=d,o=p):u=u.next=d,s|=f;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;d=l,l=d.next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}while(!0);u===null&&(o=p),r.baseState=o,r.firstBaseUpdate=c,r.lastBaseUpdate=u,i===null&&(r.shared.lanes=0),Fa|=s,e.lanes=s,e.memoizedState=p}}function ty(e,t){if(typeof e!="function")throw Error(M(191,e));e.call(t)}function ny(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ty(n[e],t)}var Ni=Kn(null),Oo=Kn(0);function bg(e,t){e=va,We(Oo,e),We(Ni,t),va=e|t.baseLanes}function Cd(){We(Oo,va),We(Ni,Ni.current)}function xf(){va=Oo.current,kt(Ni),kt(Oo)}var Xa=0,ye=null,Be=null,pt=null,Lo=!1,mi=!1,xr=!1,zo=0,Ms=0,hi=null,vT=0;function ot(){throw Error(M(321))}function Sf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function Nf(e,t,n,a,r,i){return Xa=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Ly:zy,xr=!1,i=n(a,r),xr=!1,mi&&(i=ry(t,n,a,r)),ay(e),i}function ay(e){ue.H=Mo;var t=Be!==null&&Be.next!==null;if(Xa=0,pt=Be=ye=null,Lo=!1,Ms=0,hi=null,t)throw Error(M(300));e===null||Et||(e=e.dependencies,e!==null&&Do(e)&&(Et=!0))}function ry(e,t,n,a){ye=e;var r=0;do{if(mi&&(hi=null),Ms=0,mi=!1,25<=r)throw Error(M(301));if(r+=1,pt=Be=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ue.H=kT,i=t(n,a)}while(mi);return i}function yT(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?el(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(ye.flags|=1024),t}function Ef(){var e=zo!==0;return zo=0,e}function kf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Tf(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}Xa=0,pt=Be=ye=null,mi=!1,Ms=zo=0,hi=null}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?ye.memoizedState=pt=e:pt=pt.next=e,pt}function mt(){if(Be===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=pt===null?ye.memoizedState:pt.next;if(t!==null)pt=t,Be=e;else{if(e===null)throw ye.alternate===null?Error(M(467)):Error(M(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},pt===null?ye.memoizedState=pt=e:pt=pt.next=e}return pt}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(e){var t=Ms;return Ms+=1,hi===null&&(hi=[]),e=ey(hi,e,t),t=ye,(pt===null?t.memoizedState:pt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Ly:zy),e}function ic(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return el(e);if(e.$$typeof===la)return qt(e)}throw Error(M(438,String(e)))}function Af(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ye.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wf(),ye.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=nk;return t.index++,n}function ha(e,t){return typeof t=="function"?t(e):t}function ho(e){var t=mt();return Cf(t,Be,e)}function Cf(e,t,n){var a=e.queue;if(a===null)throw Error(M(311));a.lastRenderedReducer=n;var r=e.baseQueue,i=a.pending;if(i!==null){if(r!==null){var s=r.next;r.next=i.next,i.next=s}t.baseQueue=r=i,a.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=s=null,o=null,c=t,u=!1;do{var p=c.lane&-536870913;if(p!==c.lane?(ke&p)===p:(Xa&p)===p){var f=c.revertLane;if(f===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),p===Si&&(u=!0);else if((Xa&f)===f){c=c.next,f===Si&&(u=!0);continue}else p={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=p,s=i):o=o.next=p,ye.lanes|=f,Fa|=f;p=c.action,xr&&n(i,p),i=c.hasEagerState?c.eagerState:n(i,p)}else f={lane:p,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=f,s=i):o=o.next=f,ye.lanes|=p,Fa|=p;c=c.next}while(c!==null&&c!==t);if(o===null?s=i:o.next=l,!Sn(i,e.memoizedState)&&(Et=!0,u&&(n=pi,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=o,a.lastRenderedState=i}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qu(e){var t=mt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var s=r=r.next;do i=e(i,s.action),s=s.next;while(s!==r);Sn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function iy(e,t,n){var a=ye,r=mt(),i=Ae;if(i){if(n===void 0)throw Error(M(407));n=n()}else n=t();var s=!Sn((Be||r).memoizedState,n);s&&(r.memoizedState=n,Et=!0),r=r.queue;var l=oy.bind(null,a,r,e);if(tl(2048,8,l,[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(a.flags|=2048,Ei(9,sc(),ly.bind(null,a,r,n,t),null),Ye===null)throw Error(M(349));i||(Xa&124)!==0||sy(a,t,n)}return n}function sy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=wf(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ly(e,t,n,a){t.value=n,t.getSnapshot=a,cy(t)&&uy(e)}function oy(e,t,n){return n(function(){cy(t)&&uy(e)})}function cy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sn(e,n)}catch(a){return!0}}function uy(e){var t=Di(e,2);t!==null&&xn(t,e,2)}function Rd(e){var t=tn();if(typeof e=="function"){var n=e;if(e=n(),xr){za(!0);try{n()}finally{za(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function dy(e,t,n,a){return e.baseState=n,Cf(e,Be,typeof a=="function"?a:ha)}function bT(e,t,n,a,r){if(lc(e))throw Error(M(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};ue.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,fy(t,i)):(i.next=n.next,t.pending=n.next=i)}}function fy(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var i=ue.T,s={};ue.T=s;try{var l=n(r,a),o=ue.S;o!==null&&o(s,l),xg(e,t,l)}catch(c){_d(e,t,c)}finally{ue.T=i}}else try{i=n(r,a),xg(e,t,i)}catch(c){_d(e,t,c)}}function xg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Sg(e,t,a)},function(a){return _d(e,t,a)}):Sg(e,t,n)}function Sg(e,t,n){t.status="fulfilled",t.value=n,py(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,fy(e,n)))}function _d(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,py(t),t=t.next;while(t!==a)}e.action=null}function py(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function my(e,t){return t}function Ng(e,t){if(Ae){var n=Ye.formState;if(n!==null){e:{var a=ye;if(Ae){if(nt){t:{for(var r=nt,i=Qn;r.nodeType!==8;){if(!i){r=null;break t}if(r=qn(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){nt=qn(r.nextSibling),a=r.data==="F!";break e}}yr(a)}a=!1}a&&(t=n[0])}}return n=tn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:my,lastRenderedState:t},n.queue=a,n=_y.bind(null,ye,a),a.dispatch=n,a=Rd(!1),i=Of.bind(null,ye,!1,a.queue),a=tn(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=bT.bind(null,ye,r,i,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function Eg(e){var t=mt();return hy(t,Be,e)}function hy(e,t,n){if(t=Cf(e,t,my)[0],e=ho(ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=el(t)}catch(s){throw s===Ws?rc:s}else a=t;t=mt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,Ei(9,sc(),xT.bind(null,r,n),null)),[a,i,e]}function xT(e,t){e.action=t}function kg(e){var t=mt(),n=Be;if(n!==null)return hy(t,n,e);mt(),t=t.memoizedState,n=mt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ei(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ye.updateQueue,t===null&&(t=wf(),ye.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function sc(){return{destroy:void 0,resource:void 0}}function gy(){return mt().memoizedState}function go(e,t,n,a){var r=tn();a=a===void 0?null:a,ye.flags|=e,r.memoizedState=Ei(1|t,sc(),n,a)}function tl(e,t,n,a){var r=mt();a=a===void 0?null:a;var i=r.memoizedState.inst;Be!==null&&a!==null&&Sf(a,Be.memoizedState.deps)?r.memoizedState=Ei(t,i,n,a):(ye.flags|=e,r.memoizedState=Ei(1|t,i,n,a))}function Tg(e,t){go(8390656,8,e,t)}function vy(e,t){tl(2048,8,e,t)}function yy(e,t){return tl(4,2,e,t)}function by(e,t){return tl(4,4,e,t)}function xy(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sy(e,t,n){n=n!=null?n.concat([e]):null,tl(4,4,xy.bind(null,t,e),n)}function Rf(){}function Ny(e,t){var n=mt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Sf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Ey(e,t){var n=mt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Sf(t,a[1]))return a[0];if(a=e(),xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a}function _f(e,t,n){return n===void 0||(Xa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=pb(),ye.lanes|=e,Fa|=e,n)}function ky(e,t,n,a){return Sn(n,t)?n:Ni.current!==null?(e=_f(e,n,a),Sn(e,t)||(Et=!0),e):(Xa&42)===0?(Et=!0,e.memoizedState=n):(e=pb(),ye.lanes|=e,Fa|=e,t)}function Ty(e,t,n,a,r){var i=Ce.p;Ce.p=i!==0&&8>i?i:8;var s=ue.T,l={};ue.T=l,Of(e,!1,t,n);try{var o=r(),c=ue.S;if(c!==null&&c(l,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=gT(o,a);ks(e,t,u,bn(e))}else ks(e,t,a,bn(e))}catch(p){ks(e,t,{then:function(){},status:"rejected",reason:p},bn())}finally{Ce.p=i,ue.T=s}}function ST(){}function Dd(e,t,n,a){if(e.tag!==5)throw Error(M(476));var r=wy(e).queue;Ty(e,r,t,dr,n===null?ST:function(){return Ay(e),n(a)})}function wy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:dr,baseState:dr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:dr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ay(e){var t=wy(e).next.queue;ks(e,t,{},bn())}function Df(){return qt(Hs)}function Cy(){return mt().memoizedState}function Ry(){return mt().memoizedState}function NT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bn();e=Va(n);var a=Ha(t,e,n);a!==null&&(xn(a,t,n),Ss(a,t,n)),t={cache:vf()},e.payload=t;return}t=t.return}}function ET(e,t,n){var a=bn();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?Dy(t,n):(n=pf(e,t,n,a),n!==null&&(xn(n,e,a),Oy(n,t,a)))}function _y(e,t,n){var a=bn();ks(e,t,n,a)}function ks(e,t,n,a){var r={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))Dy(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(r.hasEagerState=!0,r.eagerState=l,Sn(l,s))return ac(e,t,r,0),Ye===null&&nc(),!1}catch(o){}finally{}if(n=pf(e,t,r,a),n!==null)return xn(n,e,a),Oy(n,t,a),!0}return!1}function Of(e,t,n,a){if(a={lane:2,revertLane:Hf(),action:a,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(M(479))}else t=pf(e,n,a,2),t!==null&&xn(t,e,2)}function lc(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Dy(e,t){mi=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Oy(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Nv(e,n)}}var Mo={readContext:qt,use:ic,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot},Ly={readContext:qt,use:ic,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Tg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,go(4194308,4,xy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return go(4194308,4,e,t)},useInsertionEffect:function(e,t){go(4,2,e,t)},useMemo:function(e,t){var n=tn();t=t===void 0?null:t;var a=e();if(xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=tn();if(n!==void 0){var r=n(t);if(xr){za(!0);try{n(t)}finally{za(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=ET.bind(null,ye,e),[a.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:function(e){e=Rd(e);var t=e.queue,n=_y.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Rf,useDeferredValue:function(e,t){var n=tn();return _f(n,e,t)},useTransition:function(){var e=Rd(!1);return e=Ty.bind(null,ye,e.queue,!0,!1),tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ye,r=tn();if(Ae){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Ye===null)throw Error(M(349));(ke&124)!==0||sy(a,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,Tg(oy.bind(null,a,i,e),[e]),a.flags|=2048,Ei(9,sc(),ly.bind(null,a,i,n,t),null),n},useId:function(){var e=tn(),t=Ye.identifierPrefix;if(Ae){var n=ca,a=oa;n=(a&~(1<<32-yn(a)-1)).toString(32)+n,t="\xAB"+t+"R"+n,n=zo++,0<n&&(t+="H"+n.toString(32)),t+="\xBB"}else n=vT++,t="\xAB"+t+"r"+n.toString(32)+"\xBB";return e.memoizedState=t},useHostTransitionStatus:Df,useFormState:Ng,useActionState:Ng,useOptimistic:function(e){var t=tn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Of.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:Af,useCacheRefresh:function(){return tn().memoizedState=NT.bind(null,ye)}},zy={readContext:qt,use:ic,useCallback:Ny,useContext:qt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:ho,useRef:gy,useState:function(){return ho(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=mt();return ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=ho(ha)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:Eg,useActionState:Eg,useOptimistic:function(e,t){var n=mt();return dy(n,Be,e,t)},useMemoCache:Af,useCacheRefresh:Ry},kT={readContext:qt,use:ic,useCallback:Ny,useContext:qt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:qu,useRef:gy,useState:function(){return qu(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=mt();return Be===null?_f(n,e,t):ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=qu(ha)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:kg,useActionState:kg,useOptimistic:function(e,t){var n=mt();return Be!==null?dy(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Af,useCacheRefresh:Ry},gi=null,Us=0;function eo(e){var t=Us;return Us+=1,gi===null&&(gi=[]),ey(gi,e,t)}function ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===ek?Error(M(525)):(e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wg(e){var t=e._init;return t(e._payload)}function My(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function a(m){for(var h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function r(m,h){return m=fa(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=67108866,h):g):(m.flags|=67108866,h)):(m.flags|=1048576,h)}function s(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function l(m,h,g,S){return h===null||h.tag!==6?(h=Bu(g,m.mode,S),h.return=m,h):(h=r(h,g),h.return=m,h)}function o(m,h,g,S){var T=g.type;return T===Kr?u(m,h,g.props.children,S,g.key):h!==null&&(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ca&&wg(T)===h.type)?(h=r(h,g.props),ls(h,g),h.return=m,h):(h=po(g.type,g.key,g.props,null,m.mode,S),ls(h,g),h.return=m,h)}function c(m,h,g,S){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Vu(g,m.mode,S),h.return=m,h):(h=r(h,g.children||[]),h.return=m,h)}function u(m,h,g,S,T){return h===null||h.tag!==7?(h=fr(g,m.mode,S,T),h.return=m,h):(h=r(h,g),h.return=m,h)}function p(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Bu(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Gl:return g=po(h.type,h.key,h.props,null,m.mode,g),ls(g,h),g.return=m,g;case fs:return h=Vu(h,m.mode,g),h.return=m,h;case Ca:var S=h._init;return h=S(h._payload),p(m,h,g)}if(ps(h)||rs(h))return h=fr(h,m.mode,g,null),h.return=m,h;if(typeof h.then=="function")return p(m,eo(h),g);if(h.$$typeof===la)return p(m,Kl(m,h),g);to(m,h)}return null}function f(m,h,g,S){var T=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return T!==null?null:l(m,h,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:return g.key===T?o(m,h,g,S):null;case fs:return g.key===T?c(m,h,g,S):null;case Ca:return T=g._init,g=T(g._payload),f(m,h,g,S)}if(ps(g)||rs(g))return T!==null?null:u(m,h,g,S,null);if(typeof g.then=="function")return f(m,h,eo(g),S);if(g.$$typeof===la)return f(m,h,Kl(m,g),S);to(m,g)}return null}function d(m,h,g,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return m=m.get(g)||null,l(h,m,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Gl:return m=m.get(S.key===null?g:S.key)||null,o(h,m,S,T);case fs:return m=m.get(S.key===null?g:S.key)||null,c(h,m,S,T);case Ca:var E=S._init;return S=E(S._payload),d(m,h,g,S,T)}if(ps(S)||rs(S))return m=m.get(g)||null,u(h,m,S,T,null);if(typeof S.then=="function")return d(m,h,g,eo(S),T);if(S.$$typeof===la)return d(m,h,g,Kl(h,S),T);to(h,S)}return null}function x(m,h,g,S){for(var T=null,E=null,w=h,C=h=0,U=null;w!==null&&C<g.length;C++){w.index>C?(U=w,w=null):U=w.sibling;var H=f(m,w,g[C],S);if(H===null){w===null&&(w=U);break}e&&w&&H.alternate===null&&t(m,w),h=i(H,h,C),E===null?T=H:E.sibling=H,E=H,w=U}if(C===g.length)return n(m,w),Ae&&cr(m,C),T;if(w===null){for(;C<g.length;C++)w=p(m,g[C],S),w!==null&&(h=i(w,h,C),E===null?T=w:E.sibling=w,E=w);return Ae&&cr(m,C),T}for(w=a(w);C<g.length;C++)U=d(w,m,C,g[C],S),U!==null&&(e&&U.alternate!==null&&w.delete(U.key===null?C:U.key),h=i(U,h,C),E===null?T=U:E.sibling=U,E=U);return e&&w.forEach(function(_){return t(m,_)}),Ae&&cr(m,C),T}function y(m,h,g,S){if(g==null)throw Error(M(151));for(var T=null,E=null,w=h,C=h=0,U=null,H=g.next();w!==null&&!H.done;C++,H=g.next()){w.index>C?(U=w,w=null):U=w.sibling;var _=f(m,w,H.value,S);if(_===null){w===null&&(w=U);break}e&&w&&_.alternate===null&&t(m,w),h=i(_,h,C),E===null?T=_:E.sibling=_,E=_,w=U}if(H.done)return n(m,w),Ae&&cr(m,C),T;if(w===null){for(;!H.done;C++,H=g.next())H=p(m,H.value,S),H!==null&&(h=i(H,h,C),E===null?T=H:E.sibling=H,E=H);return Ae&&cr(m,C),T}for(w=a(w);!H.done;C++,H=g.next())H=d(w,m,C,H.value,S),H!==null&&(e&&H.alternate!==null&&w.delete(H.key===null?C:H.key),h=i(H,h,C),E===null?T=H:E.sibling=H,E=H);return e&&w.forEach(function(R){return t(m,R)}),Ae&&cr(m,C),T}function k(m,h,g,S){if(typeof g=="object"&&g!==null&&g.type===Kr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:e:{for(var T=g.key;h!==null;){if(h.key===T){if(T=g.type,T===Kr){if(h.tag===7){n(m,h.sibling),S=r(h,g.props.children),S.return=m,m=S;break e}}else if(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ca&&wg(T)===h.type){n(m,h.sibling),S=r(h,g.props),ls(S,g),S.return=m,m=S;break e}n(m,h);break}else t(m,h);h=h.sibling}g.type===Kr?(S=fr(g.props.children,m.mode,S,g.key),S.return=m,m=S):(S=po(g.type,g.key,g.props,null,m.mode,S),ls(S,g),S.return=m,m=S)}return s(m);case fs:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),S=r(h,g.children||[]),S.return=m,m=S;break e}else{n(m,h);break}else t(m,h);h=h.sibling}S=Vu(g,m.mode,S),S.return=m,m=S}return s(m);case Ca:return T=g._init,g=T(g._payload),k(m,h,g,S)}if(ps(g))return x(m,h,g,S);if(rs(g)){if(T=rs(g),typeof T!="function")throw Error(M(150));return g=T.call(g),y(m,h,g,S)}if(typeof g.then=="function")return k(m,h,eo(g),S);if(g.$$typeof===la)return k(m,h,Kl(m,g),S);to(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),S=r(h,g),S.return=m,m=S):(n(m,h),S=Bu(g,m.mode,S),S.return=m,m=S),s(m)):n(m,h)}return function(m,h,g,S){try{Us=0;var T=k(m,h,g,S);return gi=null,T}catch(w){if(w===Ws||w===rc)throw w;var E=gn(29,w,null,m.mode);return E.lanes=S,E.return=m,E}finally{}}}var ki=My(!0),Uy=My(!1),Ln=Kn(null),Jn=null;function Da(e){var t=e.alternate;We(bt,bt.current&1),We(Ln,e),Jn===null&&(t===null||Ni.current!==null||t.memoizedState!==null)&&(Jn=e)}function Py(e){if(e.tag===22){if(We(bt,bt.current),We(Ln,e),Jn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Jn=e)}}else Oa(e)}function Oa(){We(bt,bt.current),We(Ln,Ln.current)}function da(e){kt(Ln),Jn===e&&(Jn=null),kt(bt)}var bt=Kn(0);function Uo(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==="$?"||Fd(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ju(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Od={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bn(),a=Va(n);a.tag=2,t!=null&&(a.callback=t),t=Ha(e,a,n),t!==null&&(xn(t,e,n),Ss(t,e,n))}};function Ag(e,t,n,a,r,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ls(n,a)||!Ls(r,i):!0}function Cg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Od.enqueueReplaceState(t,t.state,null)}function Sr(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Qe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}var Po=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function By(e){Po(e)}function Vy(e){console.error(e)}function Hy(e){Po(e)}function Bo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Rg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Ld(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Bo(e,t)},n}function qy(e){return e=Va(e),e.tag=3,e}function jy(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=a.value;e.payload=function(){return r(i)},e.callback=function(){Rg(t,n,a)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Rg(t,n,a),typeof r!="function"&&(qa===null?qa=new Set([this]):qa.add(this));var l=a.stack;this.componentDidCatch(a.value,{componentStack:l!==null?l:""})})}function TT(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Js(t,n,r,!0),n=Ln.current,n!==null){switch(n.tag){case 13:return Jn===null?qd():n.alternate===null&&at===0&&(at=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Td?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Wu(e,a,r)),!1;case 22:return n.flags|=65536,a===Td?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Wu(e,a,r)),!1}throw Error(M(435,n.tag))}return Wu(e,a,r),qd(),!1}if(Ae)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==xd&&(e=Error(M(422),{cause:a}),zs(Dn(e,n)))):(a!==xd&&(t=Error(M(423),{cause:a}),zs(Dn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=Dn(a,n),r=Ld(e.stateNode,a,r),Hu(e,r),at!==4&&(at=2)),!1;var i=Error(M(520),{cause:a});if(i=Dn(i,n),As===null?As=[i]:As.push(i),at!==4&&(at=2),t===null)return!0;a=Dn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Ld(n.stateNode,a,e),Hu(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(qa===null||!qa.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=qy(r),jy(r,e,n,a),Hu(n,r),!1}n=n.return}while(n!==null);return!1}var Iy=Error(M(461)),Et=!1;function Dt(e,t,n,a){t.child=e===null?Uy(t,null,n,a):ki(t,e.child,n,a)}function _g(e,t,n,a,r){n=n.render;var i=t.ref;if("ref"in a){var s={};for(var l in a)l!=="ref"&&(s[l]=a[l])}else s=a;return br(t),a=Nf(e,t,n,s,i,r),l=Ef(),e!==null&&!Et?(kf(e,t,r),ga(e,t,r)):(Ae&&l&&hf(t),t.flags|=1,Dt(e,t,a,r),t.child)}function Dg(e,t,n,a,r){if(e===null){var i=n.type;return typeof i=="function"&&!mf(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,Yy(e,t,i,a,r)):(e=po(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Lf(e,r)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ls,n(s,a)&&e.ref===t.ref)return ga(e,t,r)}return t.flags|=1,e=fa(i,a),e.ref=t.ref,e.return=t,t.child=e}function Yy(e,t,n,a,r){if(e!==null){var i=e.memoizedProps;if(Ls(i,a)&&e.ref===t.ref)if(Et=!1,t.pendingProps=a=i,Lf(e,r))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,ga(e,t,r)}return zd(e,t,n,a,r)}function Gy(e,t,n){var a=t.pendingProps,r=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;t.childLanes=i&~a}else t.childLanes=0,t.child=null;return Og(e,t,a,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mo(t,i!==null?i.cachePool:null),i!==null?bg(t,i):Cd(),Py(t);else return t.lanes=t.childLanes=536870912,Og(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(mo(t,i.cachePool),bg(t,i),Oa(t),t.memoizedState=null):(e!==null&&mo(t,null),Cd(),Oa(t));return Dt(e,t,r,n),t.child}function Og(e,t,n,a){var r=yf();return r=r===null?null:{parent:yt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&mo(t,null),Cd(),Py(t),e!==null&&Js(e,t,a,!0),null}function vo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(M(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zd(e,t,n,a,r){return br(t),n=Nf(e,t,n,a,void 0,r),a=Ef(),e!==null&&!Et?(kf(e,t,r),ga(e,t,r)):(Ae&&a&&hf(t),t.flags|=1,Dt(e,t,n,r),t.child)}function Lg(e,t,n,a,r,i){return br(t),t.updateQueue=null,n=ry(t,a,n,r),ay(e),a=Ef(),e!==null&&!Et?(kf(e,t,i),ga(e,t,i)):(Ae&&a&&hf(t),t.flags|=1,Dt(e,t,n,i),t.child)}function zg(e,t,n,a,r){if(br(t),t.stateNode===null){var i=si,s=n.contextType;typeof s=="object"&&s!==null&&(i=qt(s)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Od,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},bf(t),s=n.contextType,i.context=typeof s=="object"&&s!==null?qt(s):si,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(ju(t,n,s,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&Od.enqueueReplaceState(i,i.state,null),Es(t,a,i,r),Ns(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,o=Sr(n,l);i.props=o;var c=i.context,u=n.contextType;s=si,typeof u=="object"&&u!==null&&(s=qt(u));var p=n.getDerivedStateFromProps;u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||c!==s)&&Cg(t,i,a,s),Ra=!1;var f=t.memoizedState;i.state=f,Es(t,a,i,r),Ns(),c=t.memoizedState,l||f!==c||Ra?(typeof p=="function"&&(ju(t,n,p,a),c=t.memoizedState),(o=Ra||Ag(t,n,o,a,f,c,s))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,a=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,wd(e,t),s=t.memoizedProps,u=Sr(n,s),i.props=u,p=t.pendingProps,f=i.context,c=n.contextType,o=si,typeof c=="object"&&c!==null&&(o=qt(c)),l=n.getDerivedStateFromProps,(c=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==p||f!==o)&&Cg(t,i,a,o),Ra=!1,f=t.memoizedState,i.state=f,Es(t,a,i,r),Ns();var d=t.memoizedState;s!==p||f!==d||Ra||e!==null&&e.dependencies!==null&&Do(e.dependencies)?(typeof l=="function"&&(ju(t,n,l,a),d=t.memoizedState),(u=Ra||Ag(t,n,u,a,f,d,o)||e!==null&&e.dependencies!==null&&Do(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,d,o),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,d,o)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=d),i.props=a,i.state=d,i.context=o,a=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,vo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ki(t,e.child,null,r),t.child=ki(t,null,n,r)):Dt(e,t,n,r),t.memoizedState=i.state,e=t.child):e=ga(e,t,r),e}function Mg(e,t,n,a){return $s(),t.flags|=256,Dt(e,t,n,a),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(e){return{baseLanes:e,cachePool:Kv()}}function Gu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=On),e}function Xy(e,t,n){var a=t.pendingProps,r=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),s&&(r=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(r?Da(t):Oa(t),Ae){var l=nt,o;if(o=l){e:{for(o=l,l=Qn;o.nodeType!==8;){if(!l){l=null;break e}if(o=qn(o.nextSibling),o===null){l=null;break e}}l=o}l!==null?(t.memoizedState={dehydrated:l,treeContext:pr!==null?{id:oa,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},o=gn(18,null,null,0),o.stateNode=l,o.return=t,t.child=o,Qt=t,nt=null,o=!0):o=!1}o||yr(t)}if(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null))return Fd(l)?t.lanes=32:t.lanes=536870912,null;da(t)}return l=a.children,a=a.fallback,r?(Oa(t),r=t.mode,l=Vo({mode:"hidden",children:l},r),a=fr(a,r,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,r=t.child,r.memoizedState=Yu(n),r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),Md(t,l))}if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null)){if(i)t.flags&256?(Da(t),t.flags&=-257,t=Xu(e,t,n)):t.memoizedState!==null?(Oa(t),t.child=e.child,t.flags|=128,t=null):(Oa(t),r=a.fallback,l=t.mode,a=Vo({mode:"visible",children:a.children},l),r=fr(r,l,n,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,ki(t,e.child,null,n),a=t.child,a.memoizedState=Yu(n),a.childLanes=Gu(e,s,n),t.memoizedState=Iu,t=r);else if(Da(t),Fd(l)){if(s=l.nextSibling&&l.nextSibling.dataset,s)var c=s.dgst;s=c,a=Error(M(419)),a.stack="",a.digest=s,zs({value:a,source:null,stack:null}),t=Xu(e,t,n)}else if(Et||Js(e,t,n,!1),s=(n&e.childLanes)!==0,Et||s){if(s=Ye,s!==null&&(a=n&-n,a=(a&42)!==0?1:nf(a),a=(a&(s.suspendedLanes|n))!==0?0:a,a!==0&&a!==o.retryLane))throw o.retryLane=a,Di(e,a),xn(s,e,a),Iy;l.data==="$?"||qd(),t=Xu(e,t,n)}else l.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,nt=qn(l.nextSibling),Qt=t,Ae=!0,mr=null,Qn=!1,e!==null&&(Cn[Rn++]=oa,Cn[Rn++]=ca,Cn[Rn++]=pr,oa=e.id,ca=e.overflow,pr=t),t=Md(t,a.children),t.flags|=4096);return t}return r?(Oa(t),r=a.fallback,l=t.mode,o=e.child,c=o.sibling,a=fa(o,{mode:"hidden",children:a.children}),a.subtreeFlags=o.subtreeFlags&65011712,c!==null?r=fa(c,r):(r=fr(r,l,n,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,a=r,r=t.child,l=e.child.memoizedState,l===null?l=Yu(n):(o=l.cachePool,o!==null?(c=yt._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=Kv(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),n=e.child,e=n.sibling,n=fa(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Md(e,t){return t=Vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vo(e,t){return e=gn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xu(e,t,n){return ki(t,e.child,null,n),e=Md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ug(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Nd(e.return,t,n)}function Qu(e,t,n,a,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=r)}function Qy(e,t,n){var a=t.pendingProps,r=a.revealOrder,i=a.tail;if(Dt(e,t,a.children,n),a=bt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ug(e,n,t);else if(e.tag===19)Ug(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}a&=1}switch(We(bt,a),r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Uo(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Qu(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Uo(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Qu(t,!0,n,null,i);break;case"together":Qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Js(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=fa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Do(e)))}function wT(e,t,n){switch(t.tag){case 3:Eo(t,t.stateNode.containerInfo),_a(t,yt,e.memoizedState.cache),$s();break;case 27:case 5:ud(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Xy(e,t,n):(Da(t),e=ga(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Js(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return Qy(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),We(bt,bt.current),a)break;return null;case 22:case 23:return t.lanes=0,Gy(e,t,n);case 24:_a(t,yt,e.memoizedState.cache)}return ga(e,t,n)}function Fy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!Lf(e,n)&&(t.flags&128)===0)return Et=!1,wT(e,t,n);Et=(e.flags&131072)!==0}else Et=!1,Ae&&(t.flags&1048576)!==0&&$v(t,_o,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,r=a._init;if(a=r(a._payload),t.type=a,typeof a=="function")mf(a)?(e=Sr(a,e),t.tag=1,t=zg(null,t,a,e,n)):(t.tag=0,t=zd(null,t,a,e,n));else{if(a!=null){if(r=a.$$typeof,r===Wd){t.tag=11,t=_g(null,t,a,e,n);break e}else if(r===ef){t.tag=14,t=Dg(null,t,a,e,n);break e}}throw t=od(a)||a,Error(M(306,t,""))}}return t;case 0:return zd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Sr(a,t.pendingProps),zg(e,t,a,r,n);case 3:e:{if(Eo(t,t.stateNode.containerInfo),e===null)throw Error(M(387));a=t.pendingProps;var i=t.memoizedState;r=i.element,wd(e,t),Es(t,a,null,n);var s=t.memoizedState;if(a=s.cache,_a(t,yt,a),a!==i.cache&&Ed(t,[yt],n,!0),Ns(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Mg(e,t,a,n);break e}else if(a!==r){r=Dn(Error(M(424)),t),zs(r),t=Mg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=qn(e.firstChild),Qt=t,Ae=!0,mr=null,Qn=!0,n=Uy(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($s(),a===r){t=ga(e,t,n);break e}Dt(e,t,a,n)}t=t.child}return t;case 26:return vo(e,t),e===null?(n=tv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ae||(n=t.type,e=t.pendingProps,a=Xo(Ba.current).createElement(n),a[Ht]=t,a[rn]=e,Lt(a,n,e),Nt(a),t.stateNode=a):t.memoizedState=tv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ud(t),e===null&&Ae&&(a=t.stateNode=zb(t.type,t.pendingProps,Ba.current),Qt=t,Qn=!0,r=nt,$a(t.type)?(Zd=r,nt=qn(a.firstChild)):nt=r),Dt(e,t,t.pendingProps.children,n),vo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((r=a=nt)&&(a=KT(a,t.type,t.pendingProps,Qn),a!==null?(t.stateNode=a,Qt=t,nt=qn(a.firstChild),Qn=!1,r=!0):r=!1),r||yr(t)),ud(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Xd(r,i)?a=null:s!==null&&Xd(r,s)&&(t.flags|=32),t.memoizedState!==null&&(r=Nf(e,t,yT,null,null,n),Hs._currentValue=r),vo(e,t),Dt(e,t,a,n),t.child;case 6:return e===null&&Ae&&((e=n=nt)&&(n=WT(n,t.pendingProps,Qn),n!==null?(t.stateNode=n,Qt=t,nt=null,e=!0):e=!1),e||yr(t)),null;case 13:return Xy(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ki(t,null,a,n):Dt(e,t,a,n),t.child;case 11:return _g(e,t,t.type,t.pendingProps,n);case 7:return Dt(e,t,t.pendingProps,n),t.child;case 8:return Dt(e,t,t.pendingProps.children,n),t.child;case 12:return Dt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,_a(t,t.type,a.value),Dt(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,br(t),r=qt(r),a=a(r),t.flags|=1,Dt(e,t,a,n),t.child;case 14:return Dg(e,t,t.type,t.pendingProps,n);case 15:return Yy(e,t,t.type,t.pendingProps,n);case 19:return Qy(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=Vo(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=fa(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Gy(e,t,n);case 24:return br(t),a=qt(yt),e===null?(r=yf(),r===null&&(r=Ye,i=vf(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:a,cache:r},bf(t),_a(t,yt,r)):((e.lanes&n)!==0&&(wd(e,t),Es(t,null,null,n),Ns()),r=e.memoizedState,i=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),_a(t,yt,a)):(a=i.cache,_a(t,yt,a),a!==r.cache&&Ed(t,[yt],n,!0))),Dt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(M(156,t.tag))}function ra(e){e.flags|=4}function Pg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pb(t)){if(t=Ln.current,t!==null&&((ke&4194048)===ke?Jn!==null:(ke&62914560)!==ke&&(ke&536870912)===0||t!==Jn))throw xs=Td,Wv;e.flags|=8192}}function no(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xv():536870912,e.lanes|=t,Ti|=t)}function os(e,t){if(!Ae)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 a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function AT(e,t,n){var a=t.pendingProps;switch(gf(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pa(yt),yi(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ss(t)?ra(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,pg())),et(t),null;case 26:return n=t.memoizedState,e===null?(ra(t),n!==null?(et(t),Pg(t,n)):(et(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ra(t),et(t),Pg(t,n)):(et(t),t.flags&=-16777217):(e.memoizedProps!==a&&ra(t),et(t),t.flags&=-16777217),null;case 27:ko(t),n=Ba.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}e=Zn.current,ss(t)?dg(t,e):(e=zb(r,a,n),t.stateNode=e,ra(t))}return et(t),null;case 5:if(ko(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}if(e=Zn.current,ss(t))dg(t,e);else{switch(r=Xo(Ba.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}e[Ht]=t,e[rn]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(Lt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ra(t)}}return et(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(M(166));if(e=Ba.current,ss(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Qt,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[Ht]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Db(e.nodeValue,n)),e||yr(t)}else e=Xo(e).createTextNode(a),e[Ht]=t,t.stateNode=e}return et(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ss(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(M(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(M(317));r[Ht]=t}else $s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),r=!1}else r=pg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(da(t),t):(da(t),null)}if(da(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool);var i=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==r&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),no(t,t.updateQueue),et(t),null;case 4:return yi(),e===null&&qf(t.stateNode.containerInfo),et(t),null;case 10:return pa(t.type),et(t),null;case 19:if(kt(bt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)os(r,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Uo(e),i!==null){for(t.flags|=128,os(r,!1),e=i.updateQueue,t.updateQueue=e,no(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zv(n,e),n=n.sibling;return We(bt,bt.current&1|2),t.child}e=e.sibling}r.tail!==null&&$n()>qo&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304)}else{if(!a)if(e=Uo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,no(t,e),os(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ae)return et(t),null}else 2*$n()-r.renderingStartTime>qo&&n!==536870912&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=$n(),t.sibling=null,e=bt.current,We(bt,a?e&1|2:e&1),t):(et(t),null);case 22:case 23:return da(t),xf(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&no(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&kt(hr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(yt),et(t),null;case 25:return null;case 30:return null}throw Error(M(156,t.tag))}function CT(e,t){switch(gf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(yt),yi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ko(t),null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(bt),null;case 4:return yi(),null;case 10:return pa(t.type),null;case 22:case 23:return da(t),xf(),e!==null&&kt(hr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(yt),null;case 25:return null;default:return null}}function Zy(e,t){switch(gf(t),t.tag){case 3:pa(yt),yi();break;case 26:case 27:case 5:ko(t);break;case 4:yi();break;case 13:da(t);break;case 19:kt(bt);break;case 10:pa(t.type);break;case 22:case 23:da(t),xf(),e!==null&&kt(hr);break;case 24:pa(yt)}}function nl(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var i=n.create,s=n.inst;a=i(),s.destroy=a}n=n.next}while(n!==r)}}catch(l){je(t,t.return,l)}}function Qa(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var i=r.next;a=i;do{if((a.tag&e)===e){var s=a.inst,l=s.destroy;if(l!==void 0){s.destroy=void 0,r=t;var o=n,c=l;try{c()}catch(u){je(r,o,u)}}}a=a.next}while(a!==i)}}catch(u){je(t,t.return,u)}}function $y(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ny(t,n)}catch(a){je(e,e.return,a)}}}function Jy(e,t,n){n.props=Sr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){je(e,t,a)}}function Ts(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){je(e,t,r)}}function Fn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){je(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Ky(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){je(e,e.return,r)}}function Fu(e,t,n){try{var a=e.stateNode;QT(a,e.type,n,t),a[rn]=t}catch(r){je(e,e.return,r)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$a(e.type)||e.tag===4}function Zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ud(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dc));else if(a!==4&&(a===27&&$a(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ud(e,t,n),e=e.sibling;e!==null;)Ud(e,t,n),e=e.sibling}function Ho(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&$a(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}function eb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Lt(t,a,n),t[Ht]=e,t[rn]=n}catch(i){je(e,e.return,i)}}var sa=!1,ct=!1,$u=!1,Bg=typeof WeakSet=="function"?WeakSet:Set,St=null;function RT(e,t){if(e=e.containerInfo,Yd=$o,e=qv(e),df(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch(y){n=null;break e}var s=0,l=-1,o=-1,c=0,u=0,p=e,f=null;t:for(;;){for(var d;p!==n||r!==0&&p.nodeType!==3||(l=s+r),p!==i||a!==0&&p.nodeType!==3||(o=s+a),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===n&&++c===r&&(l=s),f===i&&++u===a&&(o=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}n=l===-1||o===-1?null:{start:l,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},$o=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,r=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var x=Sr(n.type,r,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(x,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){je(n,n.return,y)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Qd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(M(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function tb(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:wa(e,n),a&4&&nl(5,n);break;case 1:if(wa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){je(n,n.return,s)}else{var r=Sr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){je(n,n.return,s)}}a&64&&$y(n),a&512&&Ts(n,n.return);break;case 3:if(wa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ny(e,t)}catch(s){je(n,n.return,s)}}break;case 27:t===null&&a&4&&eb(n);case 26:case 5:wa(e,n),t===null&&a&4&&Ky(n),a&512&&Ts(n,n.return);break;case 12:wa(e,n);break;case 13:wa(e,n),a&4&&rb(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=BT.bind(null,n),ew(e,n))));break;case 22:if(a=n.memoizedState!==null||sa,!a){t=t!==null&&t.memoizedState!==null||ct,r=sa;var i=ct;sa=a,(ct=t)&&!i?Aa(e,n,(n.subtreeFlags&8772)!==0):wa(e,n),sa=r,ct=i}break;case 30:break;default:wa(e,n)}}function nb(e){var t=e.alternate;t!==null&&(e.alternate=null,nb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,nn=!1;function ia(e,t,n){for(n=n.child;n!==null;)ab(e,t,n),n=n.sibling}function ab(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Gs,n)}catch(i){}switch(n.tag){case 26:ct||Fn(n,t),ia(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ct||Fn(n,t);var a=Ke,r=nn;$a(n.type)&&(Ke=n.stateNode,nn=!1),ia(e,t,n),Rs(n.stateNode),Ke=a,nn=r;break;case 5:ct||Fn(n,t);case 6:if(a=Ke,r=nn,Ke=null,ia(e,t,n),Ke=a,nn=r,Ke!==null)if(nn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(i){je(n,t,i)}else try{Ke.removeChild(n.stateNode)}catch(i){je(n,t,i)}break;case 18:Ke!==null&&(nn?(e=Ke,Kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Is(e)):Kg(Ke,n.stateNode));break;case 4:a=Ke,r=nn,Ke=n.stateNode.containerInfo,nn=!0,ia(e,t,n),Ke=a,nn=r;break;case 0:case 11:case 14:case 15:ct||Qa(2,n,t),ct||Qa(4,n,t),ia(e,t,n);break;case 1:ct||(Fn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Jy(n,t,a)),ia(e,t,n);break;case 21:ia(e,t,n);break;case 22:ct=(a=ct)||n.memoizedState!==null,ia(e,t,n),ct=a;break;default:ia(e,t,n)}}function rb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Is(e)}catch(n){je(t,t.return,n)}}function _T(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bg),t;default:throw Error(M(435,e.tag))}}function Ju(e,t){var n=_T(e);t.forEach(function(a){var r=VT.bind(null,e,a);n.has(a)||(n.add(a),a.then(r,r))})}function pn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 27:if($a(l.type)){Ke=l.stateNode,nn=!1;break e}break;case 5:Ke=l.stateNode,nn=!1;break e;case 3:case 4:Ke=l.stateNode.containerInfo,nn=!0;break e}l=l.return}if(Ke===null)throw Error(M(160));ab(i,s,r),Ke=null,nn=!1,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ib(t,e),t=t.sibling}var Hn=null;function ib(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),mn(e),a&4&&(Qa(3,e,e.return),nl(3,e),Qa(5,e,e.return));break;case 1:pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),a&64&&sa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=Hn;if(pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":i=r.getElementsByTagName("title")[0],(!i||i[Fs]||i[Ht]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=r.createElement(a),r.head.insertBefore(i,r.querySelector("head > title"))),Lt(i,a,n),i[Ht]=e,Nt(i),a=i;break e;case"link":var s=av("link","href",r).get(a+(n.href||""));if(s){for(var l=0;l<s.length;l++)if(i=s[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(l,1);break t}}i=r.createElement(a),Lt(i,a,n),r.head.appendChild(i);break;case"meta":if(s=av("meta","content",r).get(a+(n.content||""))){for(l=0;l<s.length;l++)if(i=s[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(l,1);break t}}i=r.createElement(a),Lt(i,a,n),r.head.appendChild(i);break;default:throw Error(M(468,a))}i[Ht]=e,Nt(i),a=i}e.stateNode=a}else rv(r,e.type,e.stateNode);else e.stateNode=nv(r,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?rv(r,e.type,e.stateNode):nv(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Fu(e,e.memoizedProps,n.memoizedProps)}break;case 27:pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),n!==null&&a&4&&Fu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),e.flags&32){r=e.stateNode;try{xi(r,"")}catch(d){je(e,e.return,d)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Fu(e,r,n!==null?n.memoizedProps:r)),a&1024&&($u=!0);break;case 6:if(pn(t,e),mn(e),a&4){if(e.stateNode===null)throw Error(M(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(d){je(e,e.return,d)}}break;case 3:if(xo=null,r=Hn,Hn=Qo(t.containerInfo),pn(t,e),Hn=r,mn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Is(t.containerInfo)}catch(d){je(e,e.return,d)}$u&&($u=!1,sb(e));break;case 4:a=Hn,Hn=Qo(e.stateNode.containerInfo),pn(t,e),mn(e),Hn=a;break;case 12:pn(t,e),mn(e);break;case 13:pn(t,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Bf=$n()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 22:r=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,c=sa,u=ct;if(sa=c||r,ct=u||o,pn(t,e),ct=u,sa=c,mn(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||o||sa||ct||ur(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(i=o.stateNode,r)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{l=o.stateNode;var p=o.memoizedProps.style,f=p!=null&&p.hasOwnProperty("display")?p.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(d){je(o,o.return,d)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=r?"":o.memoizedProps}catch(d){je(o,o.return,d)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Ju(e,n))));break;case 19:pn(t,e),mn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 30:break;case 21:break;default:pn(t,e),mn(e)}}function mn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Wy(a)){n=a;break}a=a.return}if(n==null)throw Error(M(160));switch(n.tag){case 27:var r=n.stateNode,i=Zu(e);Ho(e,i,r);break;case 5:var s=n.stateNode;n.flags&32&&(xi(s,""),n.flags&=-33);var l=Zu(e);Ho(e,l,s);break;case 3:case 4:var o=n.stateNode.containerInfo,c=Zu(e);Ud(e,c,o);break;default:throw Error(M(161))}}catch(u){je(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tb(e,t.alternate,t),t=t.sibling}function ur(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qa(4,t,t.return),ur(t);break;case 1:Fn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Jy(t,t.return,n),ur(t);break;case 27:Rs(t.stateNode);case 26:case 5:Fn(t,t.return),ur(t);break;case 22:t.memoizedState===null&&ur(t);break;case 30:ur(t);break;default:ur(t)}e=e.sibling}}function Aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Aa(r,i,n),nl(4,i);break;case 1:if(Aa(r,i,n),a=i,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(c){je(a,a.return,c)}if(a=i,r=a.updateQueue,r!==null){var l=a.stateNode;try{var o=r.shared.hiddenCallbacks;if(o!==null)for(r.shared.hiddenCallbacks=null,r=0;r<o.length;r++)ty(o[r],l)}catch(c){je(a,a.return,c)}}n&&s&64&&$y(i),Ts(i,i.return);break;case 27:eb(i);case 26:case 5:Aa(r,i,n),n&&a===null&&s&4&&Ky(i),Ts(i,i.return);break;case 12:Aa(r,i,n);break;case 13:Aa(r,i,n),n&&s&4&&rb(r,i);break;case 22:i.memoizedState===null&&Aa(r,i,n),Ts(i,i.return);break;case 30:break;default:Aa(r,i,n)}t=t.sibling}}function zf(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ks(n))}function Mf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e))}function Xn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lb(e,t,n,a),t=t.sibling}function lb(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,n,a),r&2048&&nl(9,t);break;case 1:Xn(e,t,n,a);break;case 3:Xn(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e)));break;case 12:if(r&2048){Xn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,l=i.onPostCommit;typeof l=="function"&&l(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){je(t,t.return,o)}}else Xn(e,t,n,a);break;case 13:Xn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?Xn(e,t,n,a):ws(e,t):i._visibility&2?Xn(e,t,n,a):(i._visibility|=2,$r(e,t,n,a,(t.subtreeFlags&10256)!==0)),r&2048&&zf(s,t);break;case 24:Xn(e,t,n,a),r&2048&&Mf(t.alternate,t);break;default:Xn(e,t,n,a)}}function $r(e,t,n,a,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,s=t,l=n,o=a,c=s.flags;switch(s.tag){case 0:case 11:case 15:$r(i,s,l,o,r),nl(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?$r(i,s,l,o,r):ws(i,s):(u._visibility|=2,$r(i,s,l,o,r)),r&&c&2048&&zf(s.alternate,s);break;case 24:$r(i,s,l,o,r),r&&c&2048&&Mf(s.alternate,s);break;default:$r(i,s,l,o,r)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:ws(n,a),r&2048&&zf(a.alternate,a);break;case 24:ws(n,a),r&2048&&Mf(a.alternate,a);break;default:ws(n,a)}t=t.sibling}}var hs=8192;function Qr(e){if(e.subtreeFlags&hs)for(e=e.child;e!==null;)ob(e),e=e.sibling}function ob(e){switch(e.tag){case 26:Qr(e),e.flags&hs&&e.memoizedState!==null&&pw(Hn,e.memoizedState,e.memoizedProps);break;case 5:Qr(e);break;case 3:case 4:var t=Hn;Hn=Qo(e.stateNode.containerInfo),Qr(e),Hn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=hs,hs=16777216,Qr(e),hs=t):Qr(e));break;default:Qr(e)}}function cb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];St=a,db(a,e)}cb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ub(e),e=e.sibling}function ub(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,yo(e)):cs(e);break;default:cs(e)}}function yo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];St=a,db(a,e)}cb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qa(8,t,t.return),yo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,yo(t));break;default:yo(t)}e=e.sibling}}function db(e,t){for(;St!==null;){var n=St;switch(n.tag){case 0:case 11:case 15:Qa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ks(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,St=a;else e:for(n=e;St!==null;){a=St;var r=a.sibling,i=a.return;if(nb(a),a===n){St=null;break e}if(r!==null){r.return=i,St=r;break e}St=i}}}var DT={getCacheForType:function(e){var t=qt(yt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},OT=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Ye=null,Se=null,ke=0,De=0,hn=null,Ua=!1,Oi=!1,Uf=!1,va=0,at=0,Fa=0,gr=0,Pf=0,On=0,Ti=0,As=null,an=null,Pd=!1,Bf=0,qo=1/0,jo=null,qa=null,Ot=0,ja=null,wi=null,vi=0,Bd=0,Vd=null,fb=null,Cs=0,Hd=null;function bn(){if((Oe&2)!==0&&ke!==0)return ke&-ke;if(ue.T!==null){var e=Si;return e!==0?e:Hf()}return Ev()}function pb(){On===0&&(On=(ke&536870912)===0||Ae?bv():536870912);var e=Ln.current;return e!==null&&(e.flags|=32),On}function xn(e,t,n){(e===Ye&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Ai(e,0),Pa(e,ke,On,!1)),Qs(e,n),((Oe&2)===0||e!==Ye)&&(e===Ye&&((Oe&2)===0&&(gr|=n),at===4&&Pa(e,ke,On,!1)),Wn(e))}function mb(e,t,n){if((Oe&6)!==0)throw Error(M(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Xs(e,t),r=a?MT(e,t):Ku(e,t,!0),i=a;do{if(r===0){Oi&&!a&&Pa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!LT(n)){r=Ku(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var l=e;r=As;var o=l.current.memoizedState.isDehydrated;if(o&&(Ai(l,s).flags|=256),s=Ku(l,s,!1),s!==2){if(Uf&&!o){l.errorRecoveryDisabledLanes|=i,gr|=i,r=4;break e}i=an,an=r,i!==null&&(an===null?an=i:an.push.apply(an,i))}r=s}if(i=!1,r!==2)continue}}if(r===1){Ai(e,0),Pa(e,t,0,!0);break}e:{switch(a=e,i=r,i){case 0:case 1:throw Error(M(345));case 4:if((t&4194048)!==t)break;case 6:Pa(a,t,On,!Ua);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(M(329))}if((t&62914560)===t&&(r=Bf+300-$n(),10<r)){if(Pa(a,t,On,!Ua),Ko(a,0,!0)!==0)break e;a.timeoutHandle=Lb(Vg.bind(null,a,n,an,jo,Pd,t,On,gr,Ti,Ua,i,2,-0,0),r);break e}Vg(a,n,an,jo,Pd,t,On,gr,Ti,Ua,i,0,-0,0)}}break}while(!0);Wn(e)}function Vg(e,t,n,a,r,i,s,l,o,c,u,p,f,d){if(e.timeoutHandle=-1,p=t.subtreeFlags,(p&8192||(p&16785408)===16785408)&&(Vs={stylesheets:null,count:0,unsuspend:fw},ob(t),p=mw(),p!==null)){e.cancelPendingCommit=p(qg.bind(null,e,t,i,n,a,r,s,l,o,u,1,f,d)),Pa(e,i,s,!c);return}qg(e,t,i,n,a,r,s,l,o)}function LT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var r=n[a],i=r.getSnapshot;r=r.value;try{if(!Sn(i(),r))return!1}catch(s){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 Pa(e,t,n,a){t&=~Pf,t&=~gr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var i=31-yn(r),s=1<<i;a[i]=-1,r&=~s}n!==0&&Sv(e,n,t)}function oc(){return(Oe&6)===0?(al(0,!1),!1):!0}function Vf(){if(Se!==null){if(De===0)var e=Se.return;else e=Se,ua=Tr=null,Tf(e),gi=null,Us=0,e=Se;for(;e!==null;)Zy(e.alternate,e),e=e.return;Se=null}}function Ai(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ZT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Vf(),Ye=e,Se=n=fa(e.current,null),ke=t,De=0,hn=null,Ua=!1,Oi=Xs(e,t),Uf=!1,Ti=On=Pf=gr=Fa=at=0,an=As=null,Pd=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-yn(a),i=1<<r;t|=e[r],a&=~i}return va=t,nc(),n}function hb(e,t){ye=null,ue.H=Mo,t===Ws||t===rc?(t=vg(),De=3):t===Wv?(t=vg(),De=4):De=t===Iy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,Se===null&&(at=1,Bo(e,Dn(t,e.current)))}function gb(){var e=ue.H;return ue.H=Mo,e===null?Mo:e}function vb(){var e=ue.A;return ue.A=DT,e}function qd(){at=4,Ua||(ke&4194048)!==ke&&Ln.current!==null||(Oi=!0),(Fa&134217727)===0&&(gr&134217727)===0||Ye===null||Pa(Ye,ke,On,!1)}function Ku(e,t,n){var a=Oe;Oe|=2;var r=gb(),i=vb();(Ye!==e||ke!==t)&&(jo=null,Ai(e,t)),t=!1;var s=at;e:do try{if(De!==0&&Se!==null){var l=Se,o=hn;switch(De){case 8:Vf(),s=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var c=De;if(De=0,hn=null,ci(e,l,o,c),n&&Oi){s=0;break e}break;default:c=De,De=0,hn=null,ci(e,l,o,c)}}zT(),s=at;break}catch(u){hb(e,u)}while(!0);return t&&e.shellSuspendCounter++,ua=Tr=null,Oe=a,ue.H=r,ue.A=i,Se===null&&(Ye=null,ke=0,nc()),s}function zT(){for(;Se!==null;)yb(Se)}function MT(e,t){var n=Oe;Oe|=2;var a=gb(),r=vb();Ye!==e||ke!==t?(jo=null,qo=$n()+500,Ai(e,t)):Oi=Xs(e,t);e:do try{if(De!==0&&Se!==null){t=Se;var i=hn;t:switch(De){case 1:De=0,hn=null,ci(e,t,i,1);break;case 2:case 9:if(gg(i)){De=0,hn=null,Hg(t);break}t=function(){De!==2&&De!==9||Ye!==e||(De=7),Wn(e)},i.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:gg(i)?(De=0,hn=null,Hg(t)):(De=0,hn=null,ci(e,t,i,7));break;case 5:var s=null;switch(Se.tag){case 26:s=Se.memoizedState;case 5:case 27:var l=Se;if(!s||Pb(s)){De=0,hn=null;var o=l.sibling;if(o!==null)Se=o;else{var c=l.return;c!==null?(Se=c,cc(c)):Se=null}break t}}De=0,hn=null,ci(e,t,i,5);break;case 6:De=0,hn=null,ci(e,t,i,6);break;case 8:Vf(),at=6;break e;default:throw Error(M(462))}}UT();break}catch(u){hb(e,u)}while(!0);return ua=Tr=null,ue.H=a,ue.A=r,Oe=n,Se!==null?0:(Ye=null,ke=0,nc(),at)}function UT(){for(;Se!==null&&!rk();)yb(Se)}function yb(e){var t=Fy(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function Hg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Lg(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Lg(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Tf(t);default:Zy(n,t),t=Se=Zv(t,va),t=Fy(n,t,va)}e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function ci(e,t,n,a){ua=Tr=null,Tf(t),gi=null,Us=0;var r=t.return;try{if(TT(e,r,t,n,ke)){at=1,Bo(e,Dn(n,e.current)),Se=null;return}}catch(i){if(r!==null)throw Se=r,i;at=1,Bo(e,Dn(n,e.current)),Se=null;return}t.flags&32768?(Ae||a===1?e=!0:Oi||(ke&536870912)!==0?e=!1:(Ua=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),bb(t,e)):cc(t)}function cc(e){var t=e;do{if((t.flags&32768)!==0){bb(t,Ua);return}e=t.return;var n=AT(t.alternate,t,va);if(n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);at===0&&(at=5)}function bb(e,t){do{var n=CT(e.alternate,e);if(n!==null){n.flags&=32767,Se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=n}while(e!==null);at=6,Se=null}function qg(e,t,n,a,r,i,s,l,o){e.cancelPendingCommit=null;do uc();while(Ot!==0);if((Oe&6)!==0)throw Error(M(327));if(t!==null){if(t===e.current)throw Error(M(177));if(i=t.lanes|t.childLanes,i|=ff,mk(e,n,i,s,l,o),e===Ye&&(Se=Ye=null,ke=0),wi=t,ja=e,vi=n,Bd=i,Vd=r,fb=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,HT(To,function(){return kb(!0),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ue.T,ue.T=null,r=Ce.p,Ce.p=2,s=Oe,Oe|=4;try{RT(e,t,n)}finally{Oe=s,Ce.p=r,ue.T=a}}Ot=1,xb(),Sb(),Nb()}}function xb(){if(Ot===1){Ot=0;var e=ja,t=wi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var a=Ce.p;Ce.p=2;var r=Oe;Oe|=4;try{ib(t,e);var i=Gd,s=qv(e.containerInfo),l=i.focusedElem,o=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&Hv(l.ownerDocument.documentElement,l)){if(o!==null&&df(l)){var c=o.start,u=o.end;if(u===void 0&&(u=c),"selectionStart"in l)l.selectionStart=c,l.selectionEnd=Math.min(u,l.value.length);else{var p=l.ownerDocument||document,f=p&&p.defaultView||window;if(f.getSelection){var d=f.getSelection(),x=l.textContent.length,y=Math.min(o.start,x),k=o.end===void 0?y:Math.min(o.end,x);!d.extend&&y>k&&(s=k,k=y,y=s);var m=og(l,y),h=og(l,k);if(m&&h&&(d.rangeCount!==1||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==h.node||d.focusOffset!==h.offset)){var g=p.createRange();g.setStart(m.node,m.offset),d.removeAllRanges(),y>k?(d.addRange(g),d.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),d.addRange(g))}}}}for(p=[],d=l;d=d.parentNode;)d.nodeType===1&&p.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<p.length;l++){var S=p[l];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}$o=!!Yd,Gd=Yd=null}finally{Oe=r,Ce.p=a,ue.T=n}}e.current=t,Ot=2}}function Sb(){if(Ot===2){Ot=0;var e=ja,t=wi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var a=Ce.p;Ce.p=2;var r=Oe;Oe|=4;try{tb(e,t.alternate,t)}finally{Oe=r,Ce.p=a,ue.T=n}}Ot=3}}function Nb(){if(Ot===4||Ot===3){Ot=0,ik();var e=ja,t=wi,n=vi,a=fb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,wi=ja=null,Eb(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(qa=null),af(n),t=t.stateNode,vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Gs,t,void 0,(t.current.flags&128)===128)}catch(o){}if(a!==null){t=ue.T,r=Ce.p,Ce.p=2,ue.T=null;try{for(var i=e.onRecoverableError,s=0;s<a.length;s++){var l=a[s];i(l.value,{componentStack:l.stack})}}finally{ue.T=t,Ce.p=r}}(vi&3)!==0&&uc(),Wn(e),r=e.pendingLanes,(n&4194090)!==0&&(r&42)!==0?e===Hd?Cs++:(Cs=0,Hd=e):Cs=0,al(0,!1)}}function Eb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ks(t)))}function uc(e){return xb(),Sb(),Nb(),kb(e)}function kb(){if(Ot!==5)return!1;var e=ja,t=Bd;Bd=0;var n=af(vi),a=ue.T,r=Ce.p;try{Ce.p=32>n?32:n,ue.T=null,n=Vd,Vd=null;var i=ja,s=vi;if(Ot=0,wi=ja=null,vi=0,(Oe&6)!==0)throw Error(M(331));var l=Oe;if(Oe|=4,ub(i.current),lb(i,i.current,s,n),Oe=l,al(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Gs,i)}catch(o){}return!0}finally{Ce.p=r,ue.T=a,Eb(e,t)}}function jg(e,t,n){t=Dn(n,t),t=Ld(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Qs(e,2),Wn(e))}function je(e,t,n){if(e.tag===3)jg(e,e,n);else for(;t!==null;){if(t.tag===3){jg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(qa===null||!qa.has(a))){e=Dn(n,e),n=qy(2),a=Ha(t,n,2),a!==null&&(jy(n,a,t,e),Qs(a,2),Wn(a));break}}t=t.return}}function Wu(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new OT;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Uf=!0,r.add(n),e=PT.bind(null,e,t,n),t.then(e,e))}function PT(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(ke&n)===n&&(at===4||at===3&&(ke&62914560)===ke&&300>$n()-Bf?(Oe&2)===0&&Ai(e,0):Pf|=n,Ti===ke&&(Ti=0)),Wn(e)}function Tb(e,t){t===0&&(t=xv()),e=Di(e,t),e!==null&&(Qs(e,t),Wn(e))}function BT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tb(e,n)}function VT(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(M(314))}a!==null&&a.delete(t),Tb(e,n)}function HT(e,t){return tf(e,t)}var Io=null,Jr=null,jd=!1,Yo=!1,ed=!1,vr=0;function Wn(e){e!==Jr&&e.next===null&&(Jr===null?Io=Jr=e:Jr=Jr.next=e),Yo=!0,jd||(jd=!0,jT())}function al(e,t){if(!ed&&Yo){ed=!0;do for(var n=!1,a=Io;a!==null;){if(!t)if(e!==0){var r=a.pendingLanes;if(r===0)var i=0;else{var s=a.suspendedLanes,l=a.pingedLanes;i=(1<<31-yn(42|e)+1)-1,i&=r&~(s&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Ig(a,i))}else i=ke,i=Ko(a,a===Ye?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Xs(a,i)||(n=!0,Ig(a,i));a=a.next}while(n);ed=!1}}function qT(){wb()}function wb(){Yo=jd=!1;var e=0;vr!==0&&(FT()&&(e=vr),vr=0);for(var t=$n(),n=null,a=Io;a!==null;){var r=a.next,i=Ab(a,t);i===0?(a.next=null,n===null?Io=r:n.next=r,r===null&&(Jr=n)):(n=a,(e!==0||(i&3)!==0)&&(Yo=!0)),a=r}al(e,!1)}function Ab(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-yn(i),l=1<<s,o=r[s];o===-1?((l&n)===0||(l&a)!==0)&&(r[s]=pk(l,t)):o<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ye,n=ke,n=Ko(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Au(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Xs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Au(a),af(n)){case 2:case 8:n=vv;break;case 32:n=To;break;case 268435456:n=yv;break;default:n=To}return a=Cb.bind(null,e),n=tf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Au(a),e.callbackPriority=2,e.callbackNode=null,2}function Cb(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uc(!0)&&e.callbackNode!==n)return null;var a=ke;return a=Ko(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(mb(e,a,t),Ab(e,$n()),e.callbackNode!=null&&e.callbackNode===n?Cb.bind(null,e):null)}function Ig(e,t){if(uc())return null;mb(e,t,!0)}function jT(){$T(function(){(Oe&6)!==0?tf(gv,qT):wb()})}function Hf(){return vr===0&&(vr=bv()),vr}function Yg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:co(""+e)}function Gg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function IT(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var i=Yg((r[rn]||null).action),s=a.submitter;s&&(t=(t=s[rn]||null)?Yg(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var l=new Wo("action","action",null,a,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(vr!==0){var o=s?Gg(r,s):new FormData(r);Dd(n,{pending:!0,data:o,method:r.method,action:i},null,o)}}else typeof i=="function"&&(l.preventDefault(),o=s?Gg(r,s):new FormData(r),Dd(n,{pending:!0,data:o,method:r.method,action:i},i,o))},currentTarget:r}]})}}for(ao=0;ao<bd.length;ao++)ro=bd[ao],Xg=ro.toLowerCase(),Qg=ro[0].toUpperCase()+ro.slice(1),jn(Xg,"on"+Qg);var ro,Xg,Qg,ao;jn(Iv,"onAnimationEnd");jn(Yv,"onAnimationIteration");jn(Gv,"onAnimationStart");jn("dblclick","onDoubleClick");jn("focusin","onFocus");jn("focusout","onBlur");jn(oT,"onTransitionRun");jn(cT,"onTransitionStart");jn(uT,"onTransitionCancel");jn(Xv,"onTransitionEnd");bi("onMouseEnter",["mouseout","mouseover"]);bi("onMouseLeave",["mouseout","mouseover"]);bi("onPointerEnter",["pointerout","pointerover"]);bi("onPointerLeave",["pointerout","pointerover"]);Nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),YT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Rb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var s=a.length-1;0<=s;s--){var l=a[s],o=l.instance,c=l.currentTarget;if(l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}else for(s=0;s<a.length;s++){if(l=a[s],o=l.instance,c=l.currentTarget,l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}}}}function xe(e,t){var n=t[fd];n===void 0&&(n=t[fd]=new Set);var a=e+"__bubble";n.has(a)||(_b(t,e,2,!1),n.add(a))}function td(e,t,n){var a=0;t&&(a|=4),_b(n,e,a,t)}var io="_reactListening"+Math.random().toString(36).slice(2);function qf(e){if(!e[io]){e[io]=!0,kv.forEach(function(n){n!=="selectionchange"&&(YT.has(n)||td(n,!1,e),td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[io]||(t[io]=!0,td("selectionchange",!1,t))}}function _b(e,t,n,a){switch(jb(t)){case 2:var r=vw;break;case 8:r=yw;break;default:r=Gf}n=r.bind(null,t,n,e),r=void 0,!gd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function nd(e,t,n,a,r){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var l=a.stateNode.containerInfo;if(l===r)break;if(s===4)for(s=a.return;s!==null;){var o=s.tag;if((o===3||o===4)&&s.stateNode.containerInfo===r)return;s=s.return}for(;l!==null;){if(s=ei(l),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){a=i=s;continue e}l=l.parentNode}}a=a.return}Ov(function(){var c=i,u=lf(n),p=[];e:{var f=Qv.get(e);if(f!==void 0){var d=Wo,x=e;switch(e){case"keypress":if(fo(n)===0)break e;case"keydown":case"keyup":d=Hk;break;case"focusin":x="focus",d=Mu;break;case"focusout":x="blur",d=Mu;break;case"beforeblur":case"afterblur":d=Mu;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":d=Wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Ik;break;case Iv:case Yv:case Gv:d=Dk;break;case Xv:d=Gk;break;case"scroll":case"scrollend":d=wk;break;case"wheel":d=Qk;break;case"copy":case"cut":case"paste":d=Lk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=tg;break;case"toggle":case"beforetoggle":d=Zk}var y=(t&4)!==0,k=!y&&(e==="scroll"||e==="scrollend"),m=y?f!==null?f+"Capture":null:f;y=[];for(var h=c,g;h!==null;){var S=h;if(g=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||g===null||m===null||(S=Ds(h,m),S!=null&&y.push(Bs(h,S,g))),k)break;h=h.return}0<y.length&&(f=new d(f,x,null,n,u),p.push({event:f,listeners:y}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&n!==hd&&(x=n.relatedTarget||n.fromElement)&&(ei(x)||x[Ri]))break e;if((d||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,d?(x=n.relatedTarget||n.toElement,d=c,x=x?ei(x):null,x!==null&&(k=Ys(x),y=x.tag,x!==k||y!==5&&y!==27&&y!==6)&&(x=null)):(d=null,x=c),d!==x)){if(y=Wh,S="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=tg,S="onPointerLeave",m="onPointerEnter",h="pointer"),k=d==null?f:ms(d),g=x==null?f:ms(x),f=new y(S,h+"leave",d,n,u),f.target=k,f.relatedTarget=g,S=null,ei(u)===c&&(y=new y(m,h+"enter",x,n,u),y.target=g,y.relatedTarget=k,S=y),k=S,d&&x)t:{for(y=d,m=x,h=0,g=y;g;g=Fr(g))h++;for(g=0,S=m;S;S=Fr(S))g++;for(;0<h-g;)y=Fr(y),h--;for(;0<g-h;)m=Fr(m),g--;for(;h--;){if(y===m||m!==null&&y===m.alternate)break t;y=Fr(y),m=Fr(m)}y=null}else y=null;d!==null&&Fg(p,f,d,y,!1),x!==null&&k!==null&&Fg(p,k,x,y,!0)}}e:{if(f=c?ms(c):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var T=ig;else if(rg(f))if(Bv)T=iT;else{T=aT;var E=nT}else d=f.nodeName,!d||d.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&sf(c.elementType)&&(T=ig):T=rT;if(T&&(T=T(e,c))){Pv(p,T,n,u);break e}E&&E(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&md(f,"number",f.value)}switch(E=c?ms(c):window,e){case"focusin":(rg(E)||E.contentEditable==="true")&&(ai=E,vd=c,ys=null);break;case"focusout":ys=vd=ai=null;break;case"mousedown":yd=!0;break;case"contextmenu":case"mouseup":case"dragend":yd=!1,cg(p,n,u);break;case"selectionchange":if(lT)break;case"keydown":case"keyup":cg(p,n,u)}var w;if(uf)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ni?Mv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(zv&&n.locale!=="ko"&&(ni||C!=="onCompositionStart"?C==="onCompositionEnd"&&ni&&(w=Lv()):(Ma=u,of="value"in Ma?Ma.value:Ma.textContent,ni=!0)),E=Go(c,C),0<E.length&&(C=new eg(C,e,null,n,u),p.push({event:C,listeners:E}),w?C.data=w:(w=Uv(n),w!==null&&(C.data=w)))),(w=Jk?Kk(e,n):Wk(e,n))&&(C=Go(c,"onBeforeInput"),0<C.length&&(E=new eg("onBeforeInput","beforeinput",null,n,u),p.push({event:E,listeners:C}),E.data=w)),IT(p,e,c,n,u)}Rb(p,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Go(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Ds(e,n),r!=null&&a.unshift(Bs(e,r,i)),r=Ds(e,t),r!=null&&a.push(Bs(e,r,i))),e.tag===3)return a;e=e.return}return[]}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fg(e,t,n,a,r){for(var i=t._reactName,s=[];n!==null&&n!==a;){var l=n,o=l.alternate,c=l.stateNode;if(l=l.tag,o!==null&&o===a)break;l!==5&&l!==26&&l!==27||c===null||(o=c,r?(c=Ds(n,i),c!=null&&s.unshift(Bs(n,c,o))):r||(c=Ds(n,i),c!=null&&s.push(Bs(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var GT=/\r\n?/g,XT=/\u0000|\uFFFD/g;function Zg(e){return(typeof e=="string"?e:""+e).replace(GT,`
|
|
9
|
-
`).replace(XT,"")}function Db(e,t){return t=Zg(t),Zg(e)===t}function dc(){}function Pe(e,t,n,a,r,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||xi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&xi(e,""+a);break;case"className":Fl(e,"class",a);break;case"tabIndex":Fl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(e,n,a);break;case"style":Dv(e,a,i);break;case"data":if(t!=="object"){Fl(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=co(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",r.name,r,null),Pe(e,t,"formEncType",r.formEncType,r,null),Pe(e,t,"formMethod",r.formMethod,r,null),Pe(e,t,"formTarget",r.formTarget,r,null)):(Pe(e,t,"encType",r.encType,r,null),Pe(e,t,"method",r.method,r,null),Pe(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=co(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=dc);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=co(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":xe("beforetoggle",e),xe("toggle",e),oo(e,"popover",a);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=kk.get(n)||n,oo(e,n,a))}}function Id(e,t,n,a,r,i){switch(n){case"style":Dv(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"children":typeof a=="string"?xi(e,a):(typeof a=="number"||typeof a=="bigint")&&xi(e,""+a);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=dc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),i=e[rn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):oo(e,n,a)}}}function Lt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var a=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,i,s,n,null)}}r&&Pe(e,t,"srcSet",n.srcSet,n,null),a&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var l=i=s=r=null,o=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var u=n[a];if(u!=null)switch(a){case"name":r=u;break;case"type":s=u;break;case"checked":o=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":l=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(M(137,t));break;default:Pe(e,t,a,u,n,null)}}Cv(e,i,l,o,c,s,r,!1),wo(e);return;case"select":xe("invalid",e),a=s=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":a=l;default:Pe(e,t,r,l,n,null)}t=i,n=s,e.multiple=!!a,t!=null?di(e,!!a,t,!1):n!=null&&di(e,!!a,n,!0);return;case"textarea":xe("invalid",e),i=r=a=null;for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"value":a=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(M(91));break;default:Pe(e,t,s,l,n,null)}_v(e,a,r,i),wo(e);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Pe(e,t,o,a,n,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(a=0;a<Ps.length;a++)xe(Ps[a],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,c,a,n,null)}return;default:if(sf(t)){for(u in n)n.hasOwnProperty(u)&&(a=n[u],a!==void 0&&Id(e,t,u,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(a=n[l],a!=null&&Pe(e,t,l,a,n,null))}function QT(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,s=null,l=null,o=null,c=null,u=null;for(d in n){var p=n[d];if(n.hasOwnProperty(d)&&p!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":o=p;default:a.hasOwnProperty(d)||Pe(e,t,d,null,a,p)}}for(var f in a){var d=a[f];if(p=n[f],a.hasOwnProperty(f)&&(d!=null||p!=null))switch(f){case"type":i=d;break;case"name":r=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(M(137,t));break;default:d!==p&&Pe(e,t,f,d,a,p)}}pd(e,s,l,o,c,u,i,r);return;case"select":d=s=l=f=null;for(i in n)if(o=n[i],n.hasOwnProperty(i)&&o!=null)switch(i){case"value":break;case"multiple":d=o;default:a.hasOwnProperty(i)||Pe(e,t,i,null,a,o)}for(r in a)if(i=a[r],o=n[r],a.hasOwnProperty(r)&&(i!=null||o!=null))switch(r){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":s=i;default:i!==o&&Pe(e,t,r,i,a,o)}t=l,n=s,a=d,f!=null?di(e,!!n,f,!1):!!a!=!!n&&(t!=null?di(e,!!n,t,!0):di(e,!!n,n?[]:"",!1));return;case"textarea":d=f=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!a.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Pe(e,t,l,null,a,r)}for(s in a)if(r=a[s],i=n[s],a.hasOwnProperty(s)&&(r!=null||i!=null))switch(s){case"value":f=r;break;case"defaultValue":d=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(M(91));break;default:r!==i&&Pe(e,t,s,r,a,i)}Rv(e,f,d);return;case"option":for(var x in n)if(f=n[x],n.hasOwnProperty(x)&&f!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:Pe(e,t,x,null,a,f)}for(o in a)if(f=a[o],d=n[o],a.hasOwnProperty(o)&&f!==d&&(f!=null||d!=null))switch(o){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Pe(e,t,o,f,a,d)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var y in n)f=n[y],n.hasOwnProperty(y)&&f!=null&&!a.hasOwnProperty(y)&&Pe(e,t,y,null,a,f);for(c in a)if(f=a[c],d=n[c],a.hasOwnProperty(c)&&f!==d&&(f!=null||d!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(M(137,t));break;default:Pe(e,t,c,f,a,d)}return;default:if(sf(t)){for(var k in n)f=n[k],n.hasOwnProperty(k)&&f!==void 0&&!a.hasOwnProperty(k)&&Id(e,t,k,void 0,a,f);for(u in a)f=a[u],d=n[u],!a.hasOwnProperty(u)||f===d||f===void 0&&d===void 0||Id(e,t,u,f,a,d);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!a.hasOwnProperty(m)&&Pe(e,t,m,null,a,f);for(p in a)f=a[p],d=n[p],!a.hasOwnProperty(p)||f===d||f==null&&d==null||Pe(e,t,p,f,a,d)}var Yd=null,Gd=null;function Xo(e){return e.nodeType===9?e:e.ownerDocument}function $g(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ob(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Xd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ad=null;function FT(){var e=window.event;return e&&e.type==="popstate"?e===ad?!1:(ad=e,!0):(ad=null,!1)}var Lb=typeof setTimeout=="function"?setTimeout:void 0,ZT=typeof clearTimeout=="function"?clearTimeout:void 0,Jg=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof Jg!="undefined"?function(e){return Jg.resolve(null).then(e).catch(JT)}:Lb;function JT(e){setTimeout(function(){throw e})}function $a(e){return e==="head"}function Kg(e,t){var n=t,a=0,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<a&&8>a){n=a;var s=e.ownerDocument;if(n&1&&Rs(s.documentElement),n&2&&Rs(s.body),n&4)for(n=s.head,Rs(n),s=n.firstChild;s;){var l=s.nextSibling,o=s.nodeName;s[Fs]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=l}}if(r===0){e.removeChild(i),Is(t);return}r--}else n==="$"||n==="$?"||n==="$!"?r++:a=n.charCodeAt(0)-48;else a=0;n=i}while(n);Is(t)}function Qd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Qd(n),rf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function KT(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Fs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function WT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function ew(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Zd=null;function Wg(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}function zb(e,t,n){switch(t=Xo(n),e){case"html":if(e=t.documentElement,!e)throw Error(M(452));return e;case"head":if(e=t.head,!e)throw Error(M(453));return e;case"body":if(e=t.body,!e)throw Error(M(454));return e;default:throw Error(M(451))}}function Rs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rf(e)}var zn=new Map,ev=new Set;function Qo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=Ce.d;Ce.d={f:tw,r:nw,D:aw,C:rw,L:iw,m:sw,X:ow,S:lw,M:cw};function tw(){var e=ya.f(),t=oc();return e||t}function nw(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?Ay(t):ya.r(e)}var Li=typeof document=="undefined"?null:document;function Mb(e,t,n){var a=Li;if(a&&typeof t=="string"&&t){var r=_n(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),ev.has(r)||(ev.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),Lt(t,"link",e),Nt(t),a.head.appendChild(t)))}}function aw(e){ya.D(e),Mb("dns-prefetch",e,null)}function rw(e,t){ya.C(e,t),Mb("preconnect",e,t)}function iw(e,t,n){ya.L(e,t,n);var a=Li;if(a&&e&&t){var r='link[rel="preload"][as="'+_n(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+_n(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+_n(n.imageSizes)+'"]')):r+='[href="'+_n(e)+'"]';var i=r;switch(t){case"style":i=Ci(e);break;case"script":i=zi(e)}zn.has(i)||(e=Qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zn.set(i,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(rl(i))||t==="script"&&a.querySelector(il(i))||(t=a.createElement("link"),Lt(t,"link",e),Nt(t),a.head.appendChild(t)))}}function sw(e,t){ya.m(e,t);var n=Li;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+_n(a)+'"][href="'+_n(e)+'"]',i=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=zi(e)}if(!zn.has(i)&&(e=Qe({rel:"modulepreload",href:e},t),zn.set(i,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(il(i)))return}a=n.createElement("link"),Lt(a,"link",e),Nt(a),n.head.appendChild(a)}}}function lw(e,t,n){ya.S(e,t,n);var a=Li;if(a&&e){var r=ui(a).hoistableStyles,i=Ci(e);t=t||"default";var s=r.get(i);if(!s){var l={loading:0,preload:null};if(s=a.querySelector(rl(i)))l.loading=5;else{e=Qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zn.get(i))&&jf(e,n);var o=s=a.createElement("link");Nt(o),Lt(o,"link",e),o._p=new Promise(function(c,u){o.onload=c,o.onerror=u}),o.addEventListener("load",function(){l.loading|=1}),o.addEventListener("error",function(){l.loading|=2}),l.loading|=4,bo(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:l},r.set(i,s)}}}function ow(e,t){ya.X(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0},t),(t=zn.get(r))&&If(e,t),i=n.createElement("script"),Nt(i),Lt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function cw(e,t){ya.M(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0,type:"module"},t),(t=zn.get(r))&&If(e,t),i=n.createElement("script"),Nt(i),Lt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function tv(e,t,n,a){var r=(r=Ba.current)?Qo(r):null;if(!r)throw Error(M(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ci(n.href),n=ui(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ci(n.href);var i=ui(r).hoistableStyles,s=i.get(e);if(s||(r=r.ownerDocument||r,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=r.querySelector(rl(e)))&&!i._p&&(s.instance=i,s.state.loading=5),zn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zn.set(e,n),i||uw(r,e,n,s.state))),t&&a===null)throw Error(M(528,""));return s}if(t&&a!==null)throw Error(M(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=zi(n),n=ui(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(M(444,e))}}function Ci(e){return'href="'+_n(e)+'"'}function rl(e){return'link[rel="stylesheet"]['+e+"]"}function Ub(e){return Qe({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Lt(t,"link",n),Nt(t),e.head.appendChild(t))}function zi(e){return'[src="'+_n(e)+'"]'}function il(e){return"script[async]"+e}function nv(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+_n(n.href)+'"]');if(a)return t.instance=a,Nt(a),a;var r=Qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Nt(a),Lt(a,"style",r),bo(a,n.precedence,e),t.instance=a;case"stylesheet":r=Ci(n.href);var i=e.querySelector(rl(r));if(i)return t.state.loading|=4,t.instance=i,Nt(i),i;a=Ub(n),(r=zn.get(r))&&jf(a,r),i=(e.ownerDocument||e).createElement("link"),Nt(i);var s=i;return s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),Lt(i,"link",a),t.state.loading|=4,bo(i,n.precedence,e),t.instance=i;case"script":return i=zi(n.src),(r=e.querySelector(il(i)))?(t.instance=r,Nt(r),r):(a=n,(r=zn.get(i))&&(a=Qe({},n),If(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),Nt(r),Lt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(M(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,bo(a,n.precedence,e));return t.instance}function bo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,i=r,s=0;s<a.length;s++){var l=a[s];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xo=null;function av(e,t,n){if(xo===null){var a=new Map,r=xo=new Map;r.set(n,a)}else r=xo,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[Fs]||i[Ht]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var l=a.get(s);l?l.push(i):a.set(s,[i])}}return a}function rv(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function dw(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Vs=null;function fw(){}function pw(e,t,n){if(Vs===null)throw Error(M(475));var a=Vs;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=Ci(n.href),i=e.querySelector(rl(r));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Fo.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=i,Nt(i);return}i=e.ownerDocument||e,n=Ub(n),(r=zn.get(r))&&jf(n,r),i=i.createElement("link"),Nt(i);var s=i;s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),Lt(i,"link",n),t.instance=i}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(a.count++,t=Fo.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function mw(){if(Vs===null)throw Error(M(475));var e=Vs;return e.stylesheets&&e.count===0&&$d(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&$d(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Fo(){if(this.count--,this.count===0){if(this.stylesheets)$d(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zo=null;function $d(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zo=new Map,t.forEach(hw,e),Zo=null,Fo.call(e))}function hw(e,t){if(!(t.state.loading&4)){var n=Zo.get(e);if(n)var a=n.get(null);else{n=new Map,Zo.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var s=r[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),a=s)}a&&n.set(null,a)}r=t.instance,s=r.getAttribute("data-precedence"),i=n.get(s)||a,i===a&&n.set(null,r),n.set(s,r),this.count++,a=Fo.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Hs={$$typeof:la,Provider:null,Consumer:null,_currentValue:dr,_currentValue2:dr,_threadCount:0};function gw(e,t,n,a,r,i,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.hiddenUpdates=Cu(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Bb(e,t,n,a,r,i,s,l,o,c,u,p){return e=new gw(e,t,n,s,l,o,c,p),t=1,i===!0&&(t|=24),i=gn(3,null,null,t),e.current=i,i.stateNode=e,t=vf(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},bf(i),e}function Vb(e){return e?(e=si,e):si}function Hb(e,t,n,a,r,i){r=Vb(r),a.context===null?a.context=r:a.pendingContext=r,a=Va(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ha(e,a,t),n!==null&&(xn(n,e,t),Ss(n,e,t))}function iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yf(e,t){iv(e,t),(e=e.alternate)&&iv(e,t)}function qb(e){if(e.tag===13){var t=Di(e,67108864);t!==null&&xn(t,e,67108864),Yf(e,67108864)}}var $o=!0;function vw(e,t,n,a){var r=ue.T;ue.T=null;var i=Ce.p;try{Ce.p=2,Gf(e,t,n,a)}finally{Ce.p=i,ue.T=r}}function yw(e,t,n,a){var r=ue.T;ue.T=null;var i=Ce.p;try{Ce.p=8,Gf(e,t,n,a)}finally{Ce.p=i,ue.T=r}}function Gf(e,t,n,a){if($o){var r=Jd(a);if(r===null)nd(e,t,a,Jo,n),sv(e,a);else if(xw(r,e,t,n,a))a.stopPropagation();else if(sv(e,a),t&4&&-1<bw.indexOf(e)){for(;r!==null;){var i=_i(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=or(i.pendingLanes);if(s!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;s;){var o=1<<31-yn(s);l.entanglements[1]|=o,s&=~o}Wn(i),(Oe&6)===0&&(qo=$n()+500,al(0,!1))}}break;case 13:l=Di(i,2),l!==null&&xn(l,i,2),oc(),Yf(i,2)}if(i=Jd(a),i===null&&nd(e,t,a,Jo,n),i===r)break;r=i}r!==null&&a.stopPropagation()}else nd(e,t,a,null,n)}}function Jd(e){return e=lf(e),Xf(e)}var Jo=null;function Xf(e){if(Jo=null,e=ei(e),e!==null){var t=Ys(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=fv(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 Jo=e,null}function jb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sk()){case gv:return 2;case vv:return 8;case To:case lk:return 32;case yv:return 268435456;default:return 32}default:return 32}}var Kd=!1,Ia=null,Ya=null,Ga=null,qs=new Map,js=new Map,La=[],bw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sv(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function us(e,t,n,a,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[r]},t!==null&&(t=_i(t),t!==null&&qb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function xw(e,t,n,a,r){switch(t){case"focusin":return Ia=us(Ia,e,t,n,a,r),!0;case"dragenter":return Ya=us(Ya,e,t,n,a,r),!0;case"mouseover":return Ga=us(Ga,e,t,n,a,r),!0;case"pointerover":var i=r.pointerId;return qs.set(i,us(qs.get(i)||null,e,t,n,a,r)),!0;case"gotpointercapture":return i=r.pointerId,js.set(i,us(js.get(i)||null,e,t,n,a,r)),!0}return!1}function Ib(e){var t=ei(e.target);if(t!==null){var n=Ys(t);if(n!==null){if(t=n.tag,t===13){if(t=fv(n),t!==null){e.blockedOn=t,hk(e.priority,function(){if(n.tag===13){var a=bn();a=nf(a);var r=Di(n,a);r!==null&&xn(r,n,a),Yf(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function So(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);hd=a,n.target.dispatchEvent(a),hd=null}else return t=_i(n),t!==null&&qb(t),e.blockedOn=n,!1;t.shift()}return!0}function lv(e,t,n){So(e)&&n.delete(t)}function Sw(){Kd=!1,Ia!==null&&So(Ia)&&(Ia=null),Ya!==null&&So(Ya)&&(Ya=null),Ga!==null&&So(Ga)&&(Ga=null),qs.forEach(lv),js.forEach(lv)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,Sw)))}var lo=null;function ov(e){lo!==e&&(lo=e,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(Xf(a||n)===null)continue;break}var i=_i(n);i!==null&&(e.splice(t,3),t-=3,Dd(i,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function Is(e){function t(o){return so(o,e)}Ia!==null&&so(Ia,e),Ya!==null&&so(Ya,e),Ga!==null&&so(Ga,e),qs.forEach(t),js.forEach(t);for(var n=0;n<La.length;n++){var a=La[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<La.length&&(n=La[0],n.blockedOn===null);)Ib(n),n.blockedOn===null&&La.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],i=n[a+1],s=r[rn]||null;if(typeof i=="function")s||ov(n);else if(s){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,s=i[rn]||null)l=s.formAction;else if(Xf(r)!==null)continue}else l=s.action;typeof l=="function"?n[a+1]=l:(n.splice(a,3),a-=3),ov(n)}}}function Qf(e){this._internalRoot=e}fc.prototype.render=Qf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));var n=t.current,a=bn();Hb(n,a,e,t,null,null)};fc.prototype.unmount=Qf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hb(e.current,2,null,e,null,null),oc(),t[Ri]=null}};function fc(e){this._internalRoot=e}fc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ev();e={blockedOn:null,target:e,priority:t};for(var n=0;n<La.length&&t!==0&&t<La[n].priority;n++);La.splice(n,0,e),n===0&&Ib(e)}};var cv=uv.version;if(cv!=="19.1.1")throw Error(M(527,cv,"19.1.1"));Ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=WE(t),e=e!==null?pv(e):null,e=e===null?null:e.stateNode,e};var Nw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Gs=ds.inject(Nw),vn=ds}catch(e){}var ds;pc.createRoot=function(e,t){if(!dv(e))throw Error(M(299));var n=!1,a="",r=By,i=Vy,s=Hy,l=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(l=t.unstable_transitionCallbacks)),t=Bb(e,1,!1,null,null,n,a,r,i,s,l,null),e[Ri]=t.current,qf(e),new Qf(t)};pc.hydrateRoot=function(e,t,n){if(!dv(e))throw Error(M(299));var a=!1,r="",i=By,s=Vy,l=Hy,o=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(o=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=Bb(e,1,!0,t,n!=null?n:null,a,r,i,s,l,o,c),t.context=Vb(null),n=t.current,a=bn(),a=nf(a),r=Va(a),r.callback=null,Ha(n,r,a),n=a,t.current.lanes=n,Qs(t,n),Wn(t),e[Ri]=t.current,qf(e),new fc(t)};pc.version="19.1.1"});var Qb=Bt((NR,Xb)=>{"use strict";function Gb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gb)}catch(e){console.error(e)}}Gb(),Xb.exports=Yb()});function Fb(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Zb=N(()=>{});function mc(e,t){return((t||Tw).jsx?kw:Ew).test(e)}var Ew,kw,Tw,$b=N(()=>{Ew=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tw={}});var Jb=N(()=>{$b()});function Ff(e){return typeof e=="object"?e.type==="text"?Kb(e.value):!1:Kb(e)}function Kb(e){return e.replace(ww,"")===""}var ww,Wb=N(()=>{ww=/[ \t\n\f\r]/g});var e0=N(()=>{Wb()});var ba,Zf=N(()=>{ba=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};ba.prototype.normal={};ba.prototype.property={};ba.prototype.space=void 0});function $f(e,t){let n={},a={};for(let r of e)Object.assign(n,r.property),Object.assign(a,r.normal);return new ba(n,a,t)}var t0=N(()=>{Zf()});function sl(e){return e.toLowerCase()}var Jf=N(()=>{});var Tt,Kf=N(()=>{Tt=class{constructor(t,n){this.attribute=n,this.property=t}};Tt.prototype.attribute="";Tt.prototype.booleanish=!1;Tt.prototype.boolean=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.defined=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.number=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.property="";Tt.prototype.spaceSeparated=!1;Tt.prototype.space=void 0});var ll={};fu(ll,{boolean:()=>pe,booleanish:()=>rt,commaOrSpaceSeparated:()=>ln,commaSeparated:()=>Ja,number:()=>j,overloadedBoolean:()=>hc,spaceSeparated:()=>Le});function wr(){return dh(2,++Aw)}var Aw,pe,rt,hc,j,Le,Ja,ln,ol=N(()=>{Aw=0,pe=wr(),rt=wr(),hc=wr(),j=wr(),Le=wr(),Ja=wr(),ln=wr()});function n0(e,t,n){n&&(e[t]=n)}var Wf,Ar,ep=N(()=>{Kf();ol();Wf=Object.keys(ll),Ar=class extends Tt{constructor(t,n,a,r){let i=-1;if(super(t,n),n0(this,"space",r),typeof a=="number")for(;++i<Wf.length;){let s=Wf[i];n0(this,Wf[i],(a&ll[s])===ll[s])}}};Ar.prototype.defined=!0});function Mn(e){let t={},n={};for(let[a,r]of Object.entries(e.properties)){let i=new Ar(a,e.transform(e.attributes||{},a),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),t[a]=i,n[sl(a)]=a,n[sl(i.attribute)]=a}return new ba(t,n,e.space)}var Cr=N(()=>{Jf();ep();Zf()});var tp,a0=N(()=>{Cr();ol();tp=Mn({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:Le,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:j,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:Le,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:rt,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function gc(e,t){return t in e?e[t]:t}var np=N(()=>{});function vc(e,t){return gc(e,t.toLowerCase())}var ap=N(()=>{np()});var r0,i0=N(()=>{ap();Cr();ol();r0=Mn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ja,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Le,autoFocus:pe,autoPlay:pe,blocking:Le,capture:null,charSet:null,checked:pe,cite:null,className:Le,cols:j,colSpan:null,content:null,contentEditable:rt,controls:pe,controlsList:Le,coords:j|Ja,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:hc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Le,height:j,hidden:hc,high:j,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Le,itemRef:Le,itemScope:pe,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:j,pattern:null,ping:Le,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Le,required:pe,reversed:pe,rows:j,rowSpan:j,sandbox:Le,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:rt,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:vc})});var s0,l0=N(()=>{np();Cr();ol();s0=Mn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ln,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ja,g2:Ja,glyphName:Ja,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gc})});var rp,o0=N(()=>{Cr();rp=Mn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var ip,c0=N(()=>{Cr();ap();ip=Mn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vc})});var sp,u0=N(()=>{Cr();sp=Mn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var lp,d0=N(()=>{lp={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function op(e,t){let n=sl(t),a=t,r=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rw.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(f0,Dw);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!f0.test(i)){let s=i.replace(Cw,_w);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}r=Ar}return new r(a,t)}function _w(e){return"-"+e.toLowerCase()}function Dw(e){return e.charAt(1).toUpperCase()}var Cw,f0,Rw,p0=N(()=>{ep();Kf();Jf();Cw=/[A-Z]/g,f0=/-[a-z]/g,Rw=/^data[-\w.:]+$/i});var m0,yc,h0=N(()=>{t0();a0();i0();l0();o0();c0();u0();d0();p0();m0=$f([tp,r0,rp,ip,sp],"html"),yc=$f([tp,s0,rp,ip,sp],"svg")});function g0(e){return e.join(" ").trim()}var v0=N(()=>{});var E0=Bt((A_,N0)=>{var y0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ow=/\n/g,Lw=/^\s*/,zw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Mw=/^:\s*/,Uw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Pw=/^[;\s]*/,Bw=/^\s+|\s+$/g,Vw=`
|
|
10
|
-
`,b0="/",x0="*",Rr="",Hw="comment",qw="declaration";N0.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,a=1;function r(y){var k=y.match(Ow);k&&(n+=k.length);var m=y.lastIndexOf(Vw);a=~m?y.length-m:a+y.length}function i(){var y={line:n,column:a};return function(k){return k.position=new s(y),u(),k}}function s(y){this.start=y,this.end={line:n,column:a},this.source=t.source}s.prototype.content=e;var l=[];function o(y){var k=new Error(t.source+":"+n+":"+a+": "+y);if(k.reason=y,k.filename=t.source,k.line=n,k.column=a,k.source=e,t.silent)l.push(k);else throw k}function c(y){var k=y.exec(e);if(k){var m=k[0];return r(m),e=e.slice(m.length),k}}function u(){c(Lw)}function p(y){var k;for(y=y||[];k=f();)k!==!1&&y.push(k);return y}function f(){var y=i();if(!(b0!=e.charAt(0)||x0!=e.charAt(1))){for(var k=2;Rr!=e.charAt(k)&&(x0!=e.charAt(k)||b0!=e.charAt(k+1));)++k;if(k+=2,Rr===e.charAt(k-1))return o("End of comment missing");var m=e.slice(2,k-2);return a+=2,r(m),e=e.slice(k),a+=2,y({type:Hw,comment:m})}}function d(){var y=i(),k=c(zw);if(k){if(f(),!c(Mw))return o("property missing ':'");var m=c(Uw),h=y({type:qw,property:S0(k[0].replace(y0,Rr)),value:m?S0(m[0].replace(y0,Rr)):Rr});return c(Pw),h}}function x(){var y=[];p(y);for(var k;k=d();)k!==!1&&(y.push(k),p(y));return y}return u(),x()};function S0(e){return e?e.replace(Bw,Rr):Rr}});var k0=Bt(cl=>{"use strict";var jw=cl&&cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cl,"__esModule",{value:!0});cl.default=Yw;var Iw=jw(E0());function Yw(e,t){var n=null;if(!e||typeof e!="string")return n;var a=(0,Iw.default)(e),r=typeof t=="function";return a.forEach(function(i){if(i.type==="declaration"){var s=i.property,l=i.value;r?t(s,l,i):l&&(n=n||{},n[s]=l)}}),n}});var w0=Bt(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.camelCase=void 0;var Gw=/^--[a-zA-Z0-9_-]+$/,Xw=/-([a-z])/g,Qw=/^[^-]+$/,Fw=/^-(webkit|moz|ms|o|khtml)-/,Zw=/^-(ms)-/,$w=function(e){return!e||Qw.test(e)||Gw.test(e)},Jw=function(e,t){return t.toUpperCase()},T0=function(e,t){return"".concat(t,"-")},Kw=function(e,t){return t===void 0&&(t={}),$w(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Zw,T0):e=e.replace(Fw,T0),e.replace(Xw,Jw))};bc.camelCase=Kw});var C0=Bt((up,A0)=>{"use strict";var Ww=up&&up.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eA=Ww(k0()),tA=w0();function cp(e,t){var n={};return!e||typeof e!="string"||(0,eA.default)(e,function(a,r){a&&r&&(n[(0,tA.camelCase)(a,t)]=r)}),n}cp.default=cp;A0.exports=cp});function R0(e){return t;function t(n){let a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function dp(e){let t=Mi(e),n=xc(e);if(t&&n)return{start:t,end:n}}var xc,Mi,_0=N(()=>{xc=R0("end"),Mi=R0("start")});var Sc=N(()=>{_0()});function Ka(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?D0(e.position):"start"in e||"end"in e?D0(e):"line"in e||"column"in e?fp(e):""}function fp(e){return O0(e&&e.line)+":"+O0(e&&e.column)}function D0(e){return fp(e&&e.start)+"-"+fp(e&&e.end)}function O0(e){return e&&typeof e=="number"?e:1}var L0=N(()=>{});var pp=N(()=>{L0()});var ut,z0=N(()=>{pp();ut=class extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let r="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i=ee({},n)),typeof t=="string"?r=t:!i.cause&&t&&(s=!0,r=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof a=="string"){let o=a.indexOf(":");o===-1?i.ruleId=a:(i.source=a.slice(0,o),i.ruleId=a.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){let o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}let l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ka(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ut.prototype.file="";ut.prototype.name="";ut.prototype.reason="";ut.prototype.message="";ut.prototype.stack="";ut.prototype.column=void 0;ut.prototype.line=void 0;ut.prototype.ancestors=void 0;ut.prototype.cause=void 0;ut.prototype.fatal=void 0;ut.prototype.place=void 0;ut.prototype.ruleId=void 0;ut.prototype.source=void 0});var mp=N(()=>{z0()});function gp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=pA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=fA(n,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yc:m0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=P0(r,e,void 0);return i&&typeof i!="string"?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function P0(e,t,n){if(t.type==="element")return sA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cA(e,t,n);if(t.type==="mdxjsEsm")return oA(e,t);if(t.type==="root")return uA(e,t,n);if(t.type==="text")return dA(e,t)}function sA(e,t,n){let a=e.schema,r=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=V0(e,t.tagName,!1),s=mA(e,t),l=yp(e,t);return rA.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Ff(o):!0})),B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function lA(e,t){if(t.data&&t.data.estree&&e.evaluater){let a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}ul(e,t.position)}function oA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ul(e,t.position)}function cA(e,t,n){let a=e.schema,r=a;t.name==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=t.name===null?e.Fragment:V0(e,t.name,!0),s=hA(e,t),l=yp(e,t);return B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function uA(e,t,n){let a={};return vp(a,yp(e,t)),e.create(t,e.Fragment,a,n)}function dA(e,t){return t.value}function B0(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function vp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fA(e,t,n){return a;function a(r,i,s,l){let c=Array.isArray(s.children)?n:t;return l?c(i,s,l):c(i,s)}}function pA(e,t){return n;function n(a,r,i,s){let l=Array.isArray(i.children),o=Mi(a);return t(r,i,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function mA(e,t){let n={},a,r;for(r in t.properties)if(r!=="children"&&hp.call(t.properties,r)){let i=gA(e,r,t.properties[r]);if(i){let[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&iA.has(t.tagName)?a=l:n[s]=l}}if(a){let i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function hA(e,t){let n={};for(let a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){let i=a.data.estree.body[0];i.type;let s=i.expression;s.type;let l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ul(e,t.position);else{let r=a.name,i;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){let l=a.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else ul(e,t.position);else i=a.value===null?!0:a.value;n[r]=i}return n}function yp(e,t){let n=[],a=-1,r=e.passKeys?new Map:nA;for(;++a<t.children.length;){let i=t.children[a],s;if(e.passKeys){let o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){let c=r.get(o)||0;s=o+"-"+c,r.set(o,c+1)}}let l=P0(e,i,s);l!==void 0&&n.push(l)}return n}function gA(e,t,n){let a=op(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Fb(n):g0(n)),a.property==="style"){let r=typeof n=="object"?n:vA(e,String(n));return e.stylePropertyNameCase==="css"&&(r=yA(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&a.space?lp[a.property]||a.property:a.attribute,n]}}function vA(e,t){try{return(0,M0.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let a=n,r=new ut("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=U0+"#cannot-parse-style-attribute",r}}function V0(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),i=-1,s;for(;++i<r.length;){let l=mc(r[i])?{type:"Identifier",name:r[i]}:{type:"Literal",value:r[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}a=s}else a=mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){let r=a.value;return hp.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(a);ul(e)}function ul(e,t){let n=new ut("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=U0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yA(e){let t={},n;for(n in e)hp.call(e,n)&&(t[bA(n)]=e[n]);return t}function bA(e){let t=e.replace(aA,xA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function xA(e){return"-"+e.toLowerCase()}var M0,hp,nA,aA,rA,iA,U0,H0=N(()=>{Zb();Jb();e0();h0();v0();M0=Z(C0(),1);Sc();mp();hp={}.hasOwnProperty,nA=new Map,aA=/[A-Z]/g,rA=new Set(["table","tbody","thead","tfoot","tr"]),iA=new Set(["td","th"]),U0="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var q0=N(()=>{H0()});var dl,j0=N(()=>{dl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]}});var I0=N(()=>{j0()});var G0=Bt(Nc=>{"use strict";var SA=Symbol.for("react.transitional.element"),NA=Symbol.for("react.fragment");function Y0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:SA,type:e,key:a,ref:t!==void 0?t:null,props:n}}Nc.Fragment=NA;Nc.jsx=Y0;Nc.jsxs=Y0});var oe=Bt((tD,X0)=>{"use strict";X0.exports=G0()});function bp(e,t){let n=t||EA,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F0(e,a,r)}function F0(e,t,n){if(kA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Q0(e.children,t,n)}return Array.isArray(e)?Q0(e,t,n):""}function Q0(e,t,n){let a=[],r=-1;for(;++r<e.length;)a[r]=F0(e[r],t,n);return a.join("")}function kA(e){return!!(e&&typeof e=="object")}var EA,Z0=N(()=>{EA={}});var $0=N(()=>{Z0()});function Ui(e){let t="&"+e+";";J0.innerHTML=t;let n=J0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}var J0,Ec=N(()=>{J0=document.createElement("i")});function zt(e,t,n,a){let r=e.length,i=0,s;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,a.length<1e4)s=Array.from(a),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<a.length;)s=a.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Ft(e,t){return e.length>0?(zt(e,e.length,0,t),e):t}var Wa=N(()=>{});function W0(e){let t={},n=-1;for(;++n<e.length;)TA(t,e[n]);return t}function TA(e,t){let n;for(n in t){let r=(K0.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],s;if(i)for(s in i){K0.call(r,s)||(r[s]=[]);let l=i[s];wA(r[s],Array.isArray(l)?l:l?[l]:[])}}}function wA(e,t){let n=-1,a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);zt(e,0,0,a)}var K0,ex=N(()=>{Wa();K0={}.hasOwnProperty});function kc(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var xp=N(()=>{});function xa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Tc=N(()=>{});function fl(e){return e!==null&&(e<32||e===127)}function te(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}function er(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var Nn,wt,tx,pl,nx,ax,rx,ix,ze=N(()=>{Nn=er(/[A-Za-z]/),wt=er(/[\dA-Za-z]/),tx=er(/[#-'*+\--9=?A-Z^-~]/);pl=er(/\d/),nx=er(/[\dA-Fa-f]/),ax=er(/[!-/:-@[-`{-~]/);rx=er(new RegExp("\\p{P}|\\p{S}","u")),ix=er(/\s/)});function Un(e){let t=[],n=-1,a=0,r=0;for(;++n<e.length;){let i=e.charCodeAt(n),s="";if(i===37&&wt(e.charCodeAt(n+1))&&wt(e.charCodeAt(n+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){let l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),r=1):s="\uFFFD"}else s=String.fromCharCode(i);s&&(t.push(e.slice(a,n),encodeURIComponent(s)),a=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(a)}var _r=N(()=>{ze()});function me(e,t,n,a){let r=a?a-1:Number.POSITIVE_INFINITY,i=0;return s;function s(o){return de(o)?(e.enter(n),l(o)):t(o)}function l(o){return de(o)&&i++<r?(e.consume(o),l):(e.exit(n),t(o))}}var At=N(()=>{ze()});function AA(e){let t=e.attempt(this.parser.constructs.contentInitial,a,r),n;return t;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),me(e,t,"linePrefix")}function r(l){return e.enter("paragraph"),i(l)}function i(l){let o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}var sx,lx=N(()=>{At();ze();sx={tokenize:AA}});function CA(e){let t=this,n=[],a=0,r,i,s;return l;function l(g){if(a<n.length){let S=n[a];return t.containerState=S[1],e.attempt(S[0].continuation,o,c)(g)}return c(g)}function o(g){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&h();let S=t.events.length,T=S,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){E=t.events[T][1].end;break}m(a);let w=S;for(;w<t.events.length;)t.events[w][1].end=ee({},E),w++;return zt(t.events,T+1,0,t.events.slice(S)),t.events.length=w,c(g)}return l(g)}function c(g){if(a===n.length){if(!r)return f(g);if(r.currentConstruct&&r.currentConstruct.concrete)return x(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ox,u,p)(g)}function u(g){return r&&h(),m(a),f(g)}function p(g){return t.parser.lazy[t.now().line]=a!==n.length,s=t.now().offset,x(g)}function f(g){return t.containerState={},e.attempt(ox,d,x)(g)}function d(g){return a++,n.push([t.currentConstruct,t.containerState]),f(g)}function x(g){if(g===null){r&&h(),m(0),e.consume(g);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),y(g)}function y(g){if(g===null){k(e.exit("chunkFlow"),!0),m(0),e.consume(g);return}return te(g)?(e.consume(g),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(g),y)}function k(g,S){let T=t.sliceStream(g);if(S&&T.push(null),g.previous=i,i&&(i.next=g),i=g,r.defineSkip(g.start),r.write(T),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<s&&(!r.events[E][1].end||r.events[E][1].end.offset>s))return;let w=t.events.length,C=w,U,H;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(U){H=t.events[C][1].end;break}U=!0}for(m(a),E=w;E<t.events.length;)t.events[E][1].end=ee({},H),E++;zt(t.events,C+1,0,t.events.slice(w)),t.events.length=E}}function m(g){let S=n.length;for(;S-- >g;){let T=n[S];t.containerState=T[1],T[0].exit.call(t,e)}n.length=g}function h(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}function RA(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var cx,ox,ux=N(()=>{At();ze();Wa();cx={tokenize:CA},ox={tokenize:RA}});function Sp(e){if(e===null||dt(e)||ix(e))return 1;if(rx(e))return 2}var dx=N(()=>{ze()});function Pi(e,t,n){let a=[],r=-1;for(;++r<e.length;){let i=e[r].resolveAll;i&&!a.includes(i)&&(t=i(t,n),a.push(i))}return t}var wc=N(()=>{});function _A(e,t){let n=-1,a,r,i,s,l,o,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p=ee({},e[a][1].end),f=ee({},e[n][1].start);fx(p,-o),fx(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:ee({},e[a][1].end)},l={type:o>1?"strongSequence":"emphasisSequence",start:ee({},e[n][1].start),end:f},i={type:o>1?"strongText":"emphasisText",start:ee({},e[a][1].end),end:ee({},e[n][1].start)},r={type:o>1?"strong":"emphasis",start:ee({},s.start),end:ee({},l.end)},e[a][1].end=ee({},s.start),e[n][1].start=ee({},l.end),c=[],e[a][1].end.offset-e[a][1].start.offset&&(c=Ft(c,[["enter",e[a][1],t],["exit",e[a][1],t]])),c=Ft(c,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=Ft(c,Pi(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),c=Ft(c,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Ft(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,zt(e,a-1,n-a+3,c),n=a+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DA(e,t){let n=this.parser.constructs.attentionMarkers.null,a=this.previous,r=Sp(a),i;return s;function s(o){return i=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===i)return e.consume(o),l;let c=e.exit("attentionSequence"),u=Sp(o),p=!u||u===2&&r||n.includes(o),f=!r||r===2&&u||n.includes(a);return c._open=!!(i===42?p:p&&(r||!f)),c._close=!!(i===42?f:f&&(u||!p)),t(o)}}function fx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ml,px=N(()=>{Wa();dx();wc();ml={name:"attention",resolveAll:_A,tokenize:DA}});function OA(e,t,n){let a=0;return r;function r(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return Nn(d)?(e.consume(d),s):d===64?n(d):c(d)}function s(d){return d===43||d===45||d===46||wt(d)?(a=1,l(d)):c(d)}function l(d){return d===58?(e.consume(d),a=0,o):(d===43||d===45||d===46||wt(d))&&a++<32?(e.consume(d),l):(a=0,c(d))}function o(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||fl(d)?n(d):(e.consume(d),o)}function c(d){return d===64?(e.consume(d),u):tx(d)?(e.consume(d),c):n(d)}function u(d){return wt(d)?p(d):n(d)}function p(d){return d===46?(e.consume(d),a=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||wt(d))&&a++<63){let x=d===45?f:p;return e.consume(d),x}return n(d)}}var Np,mx=N(()=>{ze();Np={name:"autolink",tokenize:OA}});function LA(e,t,n){return a;function a(i){return de(i)?me(e,r,"linePrefix")(i):r(i)}function r(i){return i===null||te(i)?t(i):n(i)}}var tr,Ac=N(()=>{At();ze();tr={partial:!0,tokenize:LA}});function zA(e,t,n){let a=this;return r;function r(s){if(s===62){let l=a.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function MA(e,t,n){let a=this;return r;function r(s){return de(s)?me(e,i,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Cc,t,n)(s)}}function UA(e){e.exit("blockQuote")}var Cc,hx=N(()=>{At();ze();Cc={continuation:{tokenize:MA},exit:UA,name:"blockQuote",tokenize:zA}});function PA(e,t,n){return a;function a(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),r}function r(i){return ax(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}var Rc,gx=N(()=>{ze();Rc={name:"characterEscape",tokenize:PA}});function BA(e,t,n){let a=this,r=0,i,s;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=wt,u(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=nx,u):(e.enter("characterReferenceValue"),i=7,s=pl,u(p))}function u(p){if(p===59&&r){let f=e.exit("characterReferenceValue");return s===wt&&!Ui(a.sliceSerialize(f))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&r++<i?(e.consume(p),u):n(p)}}var _c,vx=N(()=>{Ec();ze();_c={name:"characterReference",tokenize:BA}});function VA(e,t,n){let a=this,r={partial:!0,tokenize:T},i=0,s=0,l;return o;function o(E){return c(E)}function c(E){let w=a.events[a.events.length-1];return i=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===l?(s++,e.consume(E),u):s<3?n(E):(e.exit("codeFencedFenceSequence"),de(E)?me(e,p,"whitespace")(E):p(E))}function p(E){return E===null||te(E)?(e.exit("codeFencedFence"),a.interrupt?t(E):e.check(yx,y,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===null||te(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(E)):de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,d,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),f)}function d(E){return E===null||te(E)?p(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===null||te(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(E)):E===96&&E===l?n(E):(e.consume(E),x)}function y(E){return e.attempt(r,S,k)(E)}function k(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return i>0&&de(E)?me(e,h,"linePrefix",i+1)(E):h(E)}function h(E){return E===null||te(E)?e.check(yx,y,S)(E):(e.enter("codeFlowValue"),g(E))}function g(E){return E===null||te(E)?(e.exit("codeFlowValue"),h(E)):(e.consume(E),g)}function S(E){return e.exit("codeFenced"),t(E)}function T(E,w,C){let U=0;return H;function H(P){return E.enter("lineEnding"),E.consume(P),E.exit("lineEnding"),_}function _(P){return E.enter("codeFencedFence"),de(P)?me(E,R,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):R(P)}function R(P){return P===l?(E.enter("codeFencedFenceSequence"),L(P)):C(P)}function L(P){return P===l?(U++,E.consume(P),L):U>=s?(E.exit("codeFencedFenceSequence"),de(P)?me(E,G,"whitespace")(P):G(P)):C(P)}function G(P){return P===null||te(P)?(E.exit("codeFencedFence"),w(P)):C(P)}}}function HA(e,t,n){let a=this;return r;function r(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}var yx,Dc,bx=N(()=>{At();ze();yx={partial:!0,tokenize:HA},Dc={concrete:!0,name:"codeFenced",tokenize:VA}});function jA(e,t,n){let a=this;return r;function r(c){return e.enter("codeIndented"),me(e,i,"linePrefix",5)(c)}function i(c){let u=a.events[a.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):te(c)?e.attempt(qA,s,o)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function o(c){return e.exit("codeIndented"),t(c)}}function IA(e,t,n){let a=this;return r;function r(s){return a.parser.lazy[a.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r):me(e,i,"linePrefix",5)(s)}function i(s){let l=a.events[a.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):te(s)?r(s):n(s)}}var hl,qA,xx=N(()=>{At();ze();hl={name:"codeIndented",tokenize:jA},qA={partial:!0,tokenize:IA}});function YA(e){let t=e.length-4,n=3,a,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)r===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(r=a):(a===t||e[a][1].type==="lineEnding")&&(e[r][1].type="codeTextData",a!==r+2&&(e[r][1].end=e[a-1][1].end,e.splice(r+2,a-r-2),t-=a-r-2,a=r+2),r=void 0);return e}function GA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XA(e,t,n){let a=this,r=0,i,s;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,p(f)):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||te(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function p(f){return f===96?(e.consume(f),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}var Ep,Sx=N(()=>{ze();Ep={name:"codeText",previous:GA,resolve:YA,tokenize:XA}});function gl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var Oc,Nx=N(()=>{Oc=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let a=n==null?Number.POSITIVE_INFINITY:n;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){let r=n||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return a&&gl(this.left,a),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);gl(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gl(this.left,n.reverse())}}}});function Lc(e){let t={},n=-1,a,r,i,s,l,o,c,u=new Oc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(a=u.get(n),n&&a[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(o=a[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,QA(u,n)),n=t[n],c=!0);else if(a[1]._container){for(i=n,r=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),s[1].type="lineEnding",r=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;r&&(a[1].end=ee({},u.get(r)[1].start),l=u.slice(r,n),l.unshift(a),u.splice(r,n-r+1,l))}}return zt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function QA(e,t){let n=e.get(t)[1],a=e.get(t)[2],r=t-1,i=[],s=n._tokenizer;s||(s=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let l=s.events,o=[],c={},u,p,f=-1,d=n,x=0,y=0,k=[y];for(;d;){for(;e.get(++r)[1]!==d;);i.push(r),d._tokenizer||(u=a.sliceStream(d),d.next||u.push(null),p&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=d,d=d.next}for(d=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(y=f+1,k.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):k.pop(),f=k.length;f--;){let m=l.slice(k[f],k[f+1]),h=i.pop();o.push([h,h+m.length-1]),e.splice(h,2,m)}for(o.reverse(),f=-1;++f<o.length;)c[x+o[f][0]]=x+o[f][1],x+=o[f][1]-o[f][0]-1;return c}var kp=N(()=>{Wa();Nx()});function ZA(e){return Lc(e),e}function $A(e,t){let n;return a;function a(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)}function r(l){return l===null?i(l):te(l)?e.check(FA,s,i)(l):(e.consume(l),r)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function JA(e,t,n){let a=this;return r;function r(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,i,"linePrefix")}function i(s){if(s===null||te(s))return n(s);let l=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(a.parser.constructs.flow,n,t)(s)}}var Tp,FA,Ex=N(()=>{At();ze();kp();Tp={resolve:ZA,tokenize:$A},FA={partial:!0,tokenize:JA}});function zc(e,t,n,a,r,i,s,l,o){let c=o||Number.POSITIVE_INFINITY,u=0;return p;function p(m){return m===60?(e.enter(a),e.enter(r),e.enter(i),e.consume(m),e.exit(i),f):m===null||m===32||m===41||fl(m)?n(m):(e.enter(a),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(m))}function f(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),e.exit(a),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(l),f(m)):m===null||m===60||te(m)?n(m):(e.consume(m),m===92?x:d)}function x(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function y(m){return!u&&(m===null||m===41||dt(m))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(a),t(m)):u<c&&m===40?(e.consume(m),u++,y):m===41?(e.consume(m),u--,y):m===null||m===32||m===40||fl(m)?n(m):(e.consume(m),m===92?k:y)}function k(m){return m===40||m===41||m===92?(e.consume(m),y):y(m)}}var wp=N(()=>{ze()});function Mc(e,t,n,a,r,i){let s=this,l=0,o;return c;function c(d){return e.enter(a),e.enter(r),e.consume(d),e.exit(r),e.enter(i),u}function u(d){return l>999||d===null||d===91||d===93&&!o||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(i),e.enter(r),e.consume(d),e.exit(r),e.exit(a),t):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(d))}function p(d){return d===null||d===91||d===93||te(d)||l++>999?(e.exit("chunkString"),u(d)):(e.consume(d),o||(o=!de(d)),d===92?f:p)}function f(d){return d===91||d===92||d===93?(e.consume(d),l++,p):p(d)}}var Ap=N(()=>{ze()});function Uc(e,t,n,a,r,i){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(a),e.enter(r),e.consume(f),e.exit(r),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(r),e.consume(f),e.exit(r),e.exit(a),t):(e.enter(i),c(f))}function c(f){return f===s?(e.exit(i),o(s)):f===null?n(f):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),me(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||te(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?p:u)}function p(f){return f===s||f===92?(e.consume(f),u):u(f)}}var Cp=N(()=>{At();ze()});function Dr(e,t){let n;return a;function a(r){return te(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,a):de(r)?me(e,a,n?"linePrefix":"lineSuffix")(r):t(r)}}var Rp=N(()=>{At();ze()});function WA(e,t,n){let a=this,r;return i;function i(d){return e.enter("definition"),s(d)}function s(d){return Mc.call(a,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return r=xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),o):n(d)}function o(d){return dt(d)?Dr(e,c)(d):c(d)}function c(d){return zc(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(KA,p,p)(d)}function p(d){return de(d)?me(e,f,"whitespace")(d):f(d)}function f(d){return d===null||te(d)?(e.exit("definition"),a.parser.defined.push(r),t(d)):n(d)}}function eC(e,t,n){return a;function a(l){return dt(l)?Dr(e,r)(l):n(l)}function r(l){return Uc(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return de(l)?me(e,s,"whitespace")(l):s(l)}function s(l){return l===null||te(l)?t(l):n(l)}}var _p,KA,kx=N(()=>{wp();Ap();At();Cp();Rp();ze();Tc();_p={name:"definition",tokenize:WA},KA={partial:!0,tokenize:eC}});function tC(e,t,n){return a;function a(i){return e.enter("hardBreakEscape"),e.consume(i),r}function r(i){return te(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}var Dp,Tx=N(()=>{ze();Dp={name:"hardBreakEscape",tokenize:tC}});function nC(e,t){let n=e.length-2,a=3,r,i;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},i={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},zt(e,a,n-a+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}function aC(e,t,n){let a=0;return r;function r(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&a++<6?(e.consume(u),s):u===null||dt(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),o(u)):u===null||te(u)?(e.exit("atxHeading"),t(u)):de(u)?me(e,l,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function o(u){return u===35?(e.consume(u),o):(e.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||dt(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),c)}}var Op,wx=N(()=>{At();ze();Wa();Op={name:"headingAtx",resolve:nC,tokenize:aC}});var Ax,Lp,Cx=N(()=>{Ax=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Lp=["pre","script","style","textarea"]});function sC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lC(e,t,n){let a=this,r,i,s,l,o;return c;function c(b){return u(b)}function u(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),p}function p(b){return b===33?(e.consume(b),f):b===47?(e.consume(b),i=!0,y):b===63?(e.consume(b),r=3,a.interrupt?t:v):Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function f(b){return b===45?(e.consume(b),r=2,d):b===91?(e.consume(b),r=5,l=0,x):Nn(b)?(e.consume(b),r=4,a.interrupt?t:v):n(b)}function d(b){return b===45?(e.consume(b),a.interrupt?t:v):n(b)}function x(b){let Fe="CDATA[";return b===Fe.charCodeAt(l++)?(e.consume(b),l===Fe.length?a.interrupt?t:R:x):n(b)}function y(b){return Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function k(b){if(b===null||b===47||b===62||dt(b)){let Fe=b===47,vt=s.toLowerCase();return!Fe&&!i&&Lp.includes(vt)?(r=1,a.interrupt?t(b):R(b)):Ax.includes(s.toLowerCase())?(r=6,Fe?(e.consume(b),m):a.interrupt?t(b):R(b)):(r=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(b):i?h(b):g(b))}return b===45||wt(b)?(e.consume(b),s+=String.fromCharCode(b),k):n(b)}function m(b){return b===62?(e.consume(b),a.interrupt?t:R):n(b)}function h(b){return de(b)?(e.consume(b),h):H(b)}function g(b){return b===47?(e.consume(b),H):b===58||b===95||Nn(b)?(e.consume(b),S):de(b)?(e.consume(b),g):H(b)}function S(b){return b===45||b===46||b===58||b===95||wt(b)?(e.consume(b),S):T(b)}function T(b){return b===61?(e.consume(b),E):de(b)?(e.consume(b),T):g(b)}function E(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,w):de(b)?(e.consume(b),E):C(b)}function w(b){return b===o?(e.consume(b),o=null,U):b===null||te(b)?n(b):(e.consume(b),w)}function C(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||dt(b)?T(b):(e.consume(b),C)}function U(b){return b===47||b===62||de(b)?g(b):n(b)}function H(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||te(b)?R(b):de(b)?(e.consume(b),_):n(b)}function R(b){return b===45&&r===2?(e.consume(b),W):b===60&&r===1?(e.consume(b),ie):b===62&&r===4?(e.consume(b),_e):b===63&&r===3?(e.consume(b),v):b===93&&r===5?(e.consume(b),Ue):te(b)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(rC,lt,L)(b)):b===null||te(b)?(e.exit("htmlFlowData"),L(b)):(e.consume(b),R)}function L(b){return e.check(iC,G,lt)(b)}function G(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),P}function P(b){return b===null||te(b)?L(b):(e.enter("htmlFlowData"),R(b))}function W(b){return b===45?(e.consume(b),v):R(b)}function ie(b){return b===47?(e.consume(b),s="",we):R(b)}function we(b){if(b===62){let Fe=s.toLowerCase();return Lp.includes(Fe)?(e.consume(b),_e):R(b)}return Nn(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),we):R(b)}function Ue(b){return b===93?(e.consume(b),v):R(b)}function v(b){return b===62?(e.consume(b),_e):b===45&&r===2?(e.consume(b),v):R(b)}function _e(b){return b===null||te(b)?(e.exit("htmlFlowData"),lt(b)):(e.consume(b),_e)}function lt(b){return e.exit("htmlFlow"),t(b)}}function oC(e,t,n){let a=this;return r;function r(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}function cC(e,t,n){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(tr,t,n)}}var zp,rC,iC,Rx=N(()=>{ze();Cx();Ac();zp={concrete:!0,name:"htmlFlow",resolveTo:sC,tokenize:lC},rC={partial:!0,tokenize:cC},iC={partial:!0,tokenize:oC}});function uC(e,t,n){let a=this,r,i,s;return l;function l(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),o}function o(v){return v===33?(e.consume(v),c):v===47?(e.consume(v),T):v===63?(e.consume(v),g):Nn(v)?(e.consume(v),C):n(v)}function c(v){return v===45?(e.consume(v),u):v===91?(e.consume(v),i=0,x):Nn(v)?(e.consume(v),h):n(v)}function u(v){return v===45?(e.consume(v),d):n(v)}function p(v){return v===null?n(v):v===45?(e.consume(v),f):te(v)?(s=p,ie(v)):(e.consume(v),p)}function f(v){return v===45?(e.consume(v),d):p(v)}function d(v){return v===62?W(v):v===45?f(v):p(v)}function x(v){let _e="CDATA[";return v===_e.charCodeAt(i++)?(e.consume(v),i===_e.length?y:x):n(v)}function y(v){return v===null?n(v):v===93?(e.consume(v),k):te(v)?(s=y,ie(v)):(e.consume(v),y)}function k(v){return v===93?(e.consume(v),m):y(v)}function m(v){return v===62?W(v):v===93?(e.consume(v),m):y(v)}function h(v){return v===null||v===62?W(v):te(v)?(s=h,ie(v)):(e.consume(v),h)}function g(v){return v===null?n(v):v===63?(e.consume(v),S):te(v)?(s=g,ie(v)):(e.consume(v),g)}function S(v){return v===62?W(v):g(v)}function T(v){return Nn(v)?(e.consume(v),E):n(v)}function E(v){return v===45||wt(v)?(e.consume(v),E):w(v)}function w(v){return te(v)?(s=w,ie(v)):de(v)?(e.consume(v),w):W(v)}function C(v){return v===45||wt(v)?(e.consume(v),C):v===47||v===62||dt(v)?U(v):n(v)}function U(v){return v===47?(e.consume(v),W):v===58||v===95||Nn(v)?(e.consume(v),H):te(v)?(s=U,ie(v)):de(v)?(e.consume(v),U):W(v)}function H(v){return v===45||v===46||v===58||v===95||wt(v)?(e.consume(v),H):_(v)}function _(v){return v===61?(e.consume(v),R):te(v)?(s=_,ie(v)):de(v)?(e.consume(v),_):U(v)}function R(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),r=v,L):te(v)?(s=R,ie(v)):de(v)?(e.consume(v),R):(e.consume(v),G)}function L(v){return v===r?(e.consume(v),r=void 0,P):v===null?n(v):te(v)?(s=L,ie(v)):(e.consume(v),L)}function G(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||dt(v)?U(v):(e.consume(v),G)}function P(v){return v===47||v===62||dt(v)?U(v):n(v)}function W(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function ie(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),we}function we(v){return de(v)?me(e,Ue,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):Ue(v)}function Ue(v){return e.enter("htmlTextData"),s(v)}}var Mp,_x=N(()=>{At();ze();Mp={name:"htmlText",tokenize:uC}});function mC(e){let t=-1,n=[];for(;++t<e.length;){let a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){let r=a.type==="labelImage"?4:2;a.type="data",t+=r}}return e.length!==n.length&&zt(e,0,e.length,n),e}function hC(e,t){let n=e.length,a=0,r,i,s,l;for(;n--;)if(r=e[n][1],i){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(i=n,r.type!=="labelLink")){a=2;break}}else r.type==="labelEnd"&&(s=n);let o={type:e[i][1].type==="labelLink"?"link":"image",start:ee({},e[i][1].start),end:ee({},e[e.length-1][1].end)},c={type:"label",start:ee({},e[i][1].start),end:ee({},e[s][1].end)},u={type:"labelText",start:ee({},e[i+a+2][1].end),end:ee({},e[s-2][1].start)};return l=[["enter",o,t],["enter",c,t]],l=Ft(l,e.slice(i+1,i+a+3)),l=Ft(l,[["enter",u,t]]),l=Ft(l,Pi(t.parser.constructs.insideSpan.null,e.slice(i+a+4,s-3),t)),l=Ft(l,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),l=Ft(l,e.slice(s+1)),l=Ft(l,[["exit",o,t]]),zt(e,i,e.length,l),e}function gC(e,t,n){let a=this,r=a.events.length,i,s;for(;r--;)if((a.events[r][1].type==="labelImage"||a.events[r][1].type==="labelLink")&&!a.events[r][1]._balanced){i=a.events[r][1];break}return l;function l(f){return i?i._inactive?p(f):(s=a.parser.defined.includes(xa(a.sliceSerialize({start:i.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(dC,u,s?u:p)(f):f===91?e.attempt(fC,u,s?c:p)(f):s?u(f):p(f)}function c(f){return e.attempt(pC,u,p)(f)}function u(f){return t(f)}function p(f){return i._balanced=!0,n(f)}}function vC(e,t,n){return a;function a(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),r}function r(p){return dt(p)?Dr(e,i)(p):i(p)}function i(p){return p===41?u(p):zc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return dt(p)?Dr(e,o)(p):u(p)}function l(p){return n(p)}function o(p){return p===34||p===39||p===40?Uc(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function c(p){return dt(p)?Dr(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function yC(e,t,n){let a=this;return r;function r(l){return Mc.call(a,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return a.parser.defined.includes(xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function bC(e,t,n){return a;function a(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),r}function r(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}var Or,dC,fC,pC,Pc=N(()=>{wp();Ap();Cp();Rp();ze();Wa();Tc();wc();Or={name:"labelEnd",resolveAll:mC,resolveTo:hC,tokenize:gC},dC={tokenize:vC},fC={tokenize:yC},pC={tokenize:bC}});function xC(e,t,n){let a=this;return r;function r(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(l):t(l)}}var Up,Dx=N(()=>{Pc();Up={name:"labelStartImage",resolveAll:Or.resolveAll,tokenize:xC}});function SC(e,t,n){let a=this;return r;function r(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(s):t(s)}}var Pp,Ox=N(()=>{Pc();Pp={name:"labelStartLink",resolveAll:Or.resolveAll,tokenize:SC}});function NC(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),me(e,t,"linePrefix")}}var vl,Lx=N(()=>{At();vl={name:"lineEnding",tokenize:NC}});function EC(e,t,n){let a=0,r;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return r=c,l(c)}function l(c){return c===r?(e.enter("thematicBreakSequence"),o(c)):a>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===r?(e.consume(c),a++,o):(e.exit("thematicBreakSequence"),de(c)?me(e,l,"whitespace")(c):l(c))}}var Lr,Bp=N(()=>{At();ze();Lr={name:"thematicBreak",tokenize:EC}});function wC(e,t,n){let a=this,r=a.events[a.events.length-1],i=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return l;function l(d){let x=a.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!a.containerState.marker||d===a.containerState.marker:pl(d)){if(a.containerState.type||(a.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Lr,n,c)(d):c(d);if(!a.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(d)}return n(d)}function o(d){return pl(d)&&++s<10?(e.consume(d),o):(!a.interrupt||s<2)&&(a.containerState.marker?d===a.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||d,e.check(tr,a.interrupt?n:u,e.attempt(kC,f,p))}function u(d){return a.containerState.initialBlankLine=!0,i++,f(d)}function p(d){return de(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):n(d)}function f(d){return a.containerState.size=i+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function AC(e,t,n){let a=this;return a.containerState._closeFlow=void 0,e.check(tr,r,i);function r(l){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,me(e,t,"listItemIndent",a.containerState.size+1)(l)}function i(l){return a.containerState.furtherBlankLines||!de(l)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,s(l)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(TC,t,s)(l))}function s(l){return a.containerState._closeFlow=!0,a.interrupt=void 0,me(e,e.attempt(jt,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function CC(e,t,n){let a=this;return me(e,r,"listItemIndent",a.containerState.size+1);function r(i){let s=a.events[a.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===a.containerState.size?t(i):n(i)}}function RC(e){e.exit(this.containerState.type)}function _C(e,t,n){let a=this;return me(e,r,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(i){let s=a.events[a.events.length-1];return!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}var jt,kC,TC,zx=N(()=>{At();ze();Ac();Bp();jt={continuation:{tokenize:AC},exit:RC,name:"list",tokenize:wC},kC={partial:!0,tokenize:_C},TC={partial:!0,tokenize:CC}});function DC(e,t){let n=e.length,a,r,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:ee({},e[a][1].start),end:ee({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[a][1],t]),e[a][1].end=ee({},e[i][1].end)):e[a][1]=s,e.push(["exit",s,t]),e}function OC(e,t,n){let a=this,r;return i;function i(c){let u=a.events.length,p;for(;u--;)if(a.events[u][1].type!=="lineEnding"&&a.events[u][1].type!=="linePrefix"&&a.events[u][1].type!=="content"){p=a.events[u][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),r=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),de(c)?me(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var Bc,Mx=N(()=>{At();ze();Bc={name:"setextUnderline",resolveTo:DC,tokenize:OC}});var Vp=N(()=>{px();mx();Ac();hx();gx();vx();bx();xx();Sx();Ex();kx();Tx();wx();Rx();_x();Pc();Dx();Ox();Lx();zx();Mx();Bp()});function LC(e){let t=this,n=e.attempt(tr,a,e.attempt(this.parser.constructs.flowInitial,r,me(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Tp,r)),"linePrefix")));return n;function a(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Ux,Px=N(()=>{Vp();At();Ux={tokenize:LC}});function qx(e){return{resolveAll:jx(e==="text"?zC:void 0),tokenize:t};function t(n){let a=this,r=this.parser.constructs[e],i=n.attempt(r,s,l);return s;function s(u){return c(u)?i(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),o}function o(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),o)}function c(u){if(u===null)return!0;let p=r[u],f=-1;if(p)for(;++f<p.length;){let d=p[f];if(!d.previous||d.previous.call(a,a.previous))return!0}return!1}}}function jx(e){return t;function t(n,a){let r=-1,i;for(;++r<=n.length;)i===void 0?n[r]&&n[r][1].type==="data"&&(i=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(n,a):n}}function zC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let a=e[n-1][1],r=t.sliceStream(a),i=r.length,s=-1,l=0,o;for(;i--;){let c=r[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)o=!0,l++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let c={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:a.start._bufferIndex+s,_index:a.start._index+i,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:ee({},a.end)};a.end=ee({},c.start),a.start.offset===a.end.offset?Object.assign(a,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}var Bx,Vx,Hx,Hp=N(()=>{Bx={resolveAll:jx()},Vx=qx("string"),Hx=qx("text")});var qp={};fu(qp,{attentionMarkers:()=>jC,contentInitial:()=>UC,disable:()=>IC,document:()=>MC,flow:()=>BC,flowInitial:()=>PC,insideSpan:()=>qC,string:()=>VC,text:()=>HC});var MC,UC,PC,BC,VC,HC,qC,jC,IC,Ix=N(()=>{Vp();Hp();MC={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:Cc},UC={91:_p},PC={[-2]:hl,[-1]:hl,32:hl},BC={35:Op,42:Lr,45:[Bc,Lr],60:zp,61:Bc,95:Lr,96:Dc,126:Dc},VC={38:_c,92:Rc},HC={[-5]:vl,[-4]:vl,[-3]:vl,33:Up,38:_c,42:ml,60:[Np,Mp],91:Pp,92:[Dp,Rc],93:Or,95:ml,96:Ep},qC={null:[ml,Bx]},jC={null:[42,95]},IC={null:[]}});function Yx(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},r={},i=[],s=[],l=[],o=!0,c={attempt:U(w),check:U(C),consume:S,enter:T,exit:E,interrupt:U(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:k,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:d},p=t.tokenize.call(u,c),f;return t.resolveAll&&i.push(t),u;function d(L){return s=Ft(s,L),h(),s[s.length-1]!==null?[]:(H(t,0),u.events=Pi(i,u.events,u),u.events)}function x(L,G){return GC(y(L),G)}function y(L){return YC(s,L)}function k(){let{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}=a;return{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}}function m(L){r[L.line]=L.column,R()}function h(){let L;for(;a._index<s.length;){let G=s[a._index];if(typeof G=="string")for(L=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===L&&a._bufferIndex<G.length;)g(G.charCodeAt(a._bufferIndex));else g(G)}}function g(L){o=void 0,f=L,p=p(L)}function S(L){te(L)?(a.line++,a.column=1,a.offset+=L===-3?2:1,R()):L!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===s[a._index].length&&(a._bufferIndex=-1,a._index++)),u.previous=L,o=!0}function T(L,G){let P=G||{};return P.type=L,P.start=k(),u.events.push(["enter",P,u]),l.push(P),P}function E(L){let G=l.pop();return G.end=k(),u.events.push(["exit",G,u]),G}function w(L,G){H(L,G.from)}function C(L,G){G.restore()}function U(L,G){return P;function P(W,ie,we){let Ue,v,_e,lt;return Array.isArray(W)?Fe(W):"tokenize"in W?Fe([W]):b(W);function b(F){return V;function V(B){let J=B!==null&&F[B],he=B!==null&&F.null,Xe=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(he)?he:he?[he]:[]];return Fe(Xe)(B)}}function Fe(F){return Ue=F,v=0,F.length===0?we:vt(F[v])}function vt(F){return V;function V(B){return lt=_(),_e=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?Q(B):F.tokenize.call(G?Object.assign(Object.create(u),G):u,c,ce,Q)(B)}}function ce(F){return o=!0,L(_e,lt),ie}function Q(F){return o=!0,lt.restore(),++v<Ue.length?vt(Ue[v]):we}}}function H(L,G){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&zt(u.events,G,u.events.length-G,L.resolve(u.events.slice(G),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function _(){let L=k(),G=u.previous,P=u.currentConstruct,W=u.events.length,ie=Array.from(l);return{from:W,restore:we};function we(){a=L,u.previous=G,u.currentConstruct=P,u.events.length=W,l=ie,R()}}function R(){a.line in r&&a.column<2&&(a.column=r[a.line],a.offset+=r[a.line]-1)}}function YC(e,t){let n=t.start._index,a=t.start._bufferIndex,r=t.end._index,i=t.end._bufferIndex,s;if(n===r)s=[e[n].slice(a,i)];else{if(s=e.slice(n,r),a>-1){let l=s[0];typeof l=="string"?s[0]=l.slice(a):s.shift()}i>0&&s.push(e[r].slice(0,i))}return s}function GC(e,t){let n=-1,a=[],r;for(;++n<e.length;){let i=e[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
8
|
+
`+n.stack}}function Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sk(e){var t=wv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){a=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(s){a=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wo(e){e._valueTracker||(e._valueTracker=Sk(e))}function Av(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ao(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Nk=/[\n"\\]/g;function Dn(e){return e.replace(Nk,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pd(e,t,n,a,r,i,s,l){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Cn(t)):e.value!==""+Cn(t)&&(e.value=""+Cn(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?md(e,s,Cn(t)):n!=null?md(e,s,Cn(n)):a!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Cn(l):e.removeAttribute("name")}function Cv(e,t,n,a,r,i,s,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+Cn(n):"",t=t!=null?""+Cn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}a=a!=null?a:r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=l?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function md(e,t,n){t==="number"&&Ao(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function di(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Cn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Rv(e,t,n){if(t!=null&&(t=""+Cn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Cn(n):""}function _v(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(M(92));if(ps(a)){if(1<a.length)throw Error(M(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Cn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ek=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $h(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Ek.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Dv(e,t,n){if(t!=null&&typeof t!="object")throw Error(M(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&$h(e,r,a)}else for(var i in t)t.hasOwnProperty(i)&&$h(e,i,t[i])}function sf(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kk=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Tk=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function co(e){return Tk.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var hd=null;function lf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,fi=null;function Jh(e){var t=_i(e);if(t&&(e=t.stateNode)){var n=e[sn]||null;e:switch(e=t.stateNode,t.type){case"input":if(pd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Dn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[sn]||null;if(!r)throw Error(M(90));pd(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Av(a)}break e;case"textarea":Rv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&di(e,!!n.multiple,t,!1)}}}var Ou=!1;function Ov(e,t,n){if(Ou)return e(t,n);Ou=!0;try{var a=e(t);return a}finally{if(Ou=!1,(ti!==null||fi!==null)&&(oc(),ti&&(t=ti,e=fi,fi=ti=null,Jh(t),e)))for(t=0;t<e.length;t++)Jh(e[t])}}function Ds(e,t){var n=e.stateNode;if(n===null)return null;var a=n[sn]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var ma=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),gd=!1;if(ma)try{Xr={},Object.defineProperty(Xr,"passive",{get:function(){gd=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch(e){gd=!1}var Xr,Ma=null,of=null,uo=null;function Lv(){if(uo)return uo;var e,t=of,n=t.length,a,r="value"in Ma?Ma.value:Ma.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var s=n-e;for(a=1;a<=s&&t[n-a]===r[i-a];a++);return uo=r.slice(e,1<a?1-a:void 0)}function fo(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 Zl(){return!0}function Kh(){return!1}function ln(e){function t(n,a,r,i,s){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zl:Kh,this.isPropagationStopped=Kh,this}return Qe(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=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wo=ln(Er),Zs=Qe({},Er,{view:0,detail:0}),wk=ln(Zs),Lu,zu,is,ec=Qe({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cf,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!==is&&(is&&e.type==="mousemove"?(Lu=e.screenX-is.screenX,zu=e.screenY-is.screenY):zu=Lu=0,is=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),Wh=ln(ec),Ak=Qe({},ec,{dataTransfer:0}),Ck=ln(Ak),Rk=Qe({},Zs,{relatedTarget:0}),Mu=ln(Rk),_k=Qe({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),Dk=ln(_k),Ok=Qe({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lk=ln(Ok),zk=Qe({},Er,{data:0}),eg=ln(zk),Mk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Uk={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"},Pk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pk[e])?!!t[e]:!1}function cf(){return Bk}var Vk=Qe({},Zs,{key:function(e){if(e.key){var t=Mk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Uk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cf,charCode:function(e){return e.type==="keypress"?fo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hk=ln(Vk),qk=Qe({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=ln(qk),jk=Qe({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cf}),Ik=ln(jk),Yk=Qe({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gk=ln(Yk),Xk=Qe({},ec,{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}),Qk=ln(Xk),Fk=Qe({},Er,{newState:0,oldState:0}),Zk=ln(Fk),$k=[9,13,27,32],uf=ma&&"CompositionEvent"in window,gs=null;ma&&"documentMode"in document&&(gs=document.documentMode);var Jk=ma&&"TextEvent"in window&&!gs,zv=ma&&(!uf||gs&&8<gs&&11>=gs),ng=" ",ag=!1;function Mv(e,t){switch(e){case"keyup":return $k.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function Kk(e,t){switch(e){case"compositionend":return Uv(t);case"keypress":return t.which!==32?null:(ag=!0,ng);case"textInput":return e=t.data,e===ng&&ag?null:e;default:return null}}function Wk(e,t){if(ni)return e==="compositionend"||!uf&&Mv(e,t)?(e=Lv(),uo=of=Ma=null,ni=!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 zv&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 rg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function Pv(e,t,n,a){ti?fi?fi.push(a):fi=[a]:ti=a,t=Go(t,"onChange"),0<t.length&&(n=new Wo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var vs=null,Os=null;function tT(e){Rb(e,0)}function tc(e){var t=ms(e);if(Av(t))return e}function ig(e,t){if(e==="change")return t}var Bv=!1;ma&&(ma?(Jl="oninput"in document,Jl||(Uu=document.createElement("div"),Uu.setAttribute("oninput","return;"),Jl=typeof Uu.oninput=="function"),$l=Jl):$l=!1,Bv=$l&&(!document.documentMode||9<document.documentMode));var $l,Jl,Uu;function sg(){vs&&(vs.detachEvent("onpropertychange",Vv),Os=vs=null)}function Vv(e){if(e.propertyName==="value"&&tc(Os)){var t=[];Pv(t,Os,e,lf(e)),Ov(tT,t)}}function nT(e,t,n){e==="focusin"?(sg(),vs=t,Os=n,vs.attachEvent("onpropertychange",Vv)):e==="focusout"&&sg()}function aT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tc(Os)}function rT(e,t){if(e==="click")return tc(t)}function iT(e,t){if(e==="input"||e==="change")return tc(t)}function sT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:sT;function Ls(e,t){if(Sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!dd.call(t,r)||!Sn(e[r],t[r]))return!1}return!0}function lg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function og(e,t){var n=lg(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lg(n)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ao(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(a){n=!1}if(n)e=t.contentWindow;else break;t=Ao(e.document)}return t}function df(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lT=ma&&"documentMode"in document&&11>=document.documentMode,ai=null,vd=null,ys=null,yd=!1;function cg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yd||ai==null||ai!==Ao(a)||(a=ai,"selectionStart"in a&&df(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ys&&Ls(ys,a)||(ys=a,a=Go(vd,"onSelect"),0<a.length&&(t=new Wo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ai)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ri={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},Pu={},jv={};ma&&(jv=document.createElement("div").style,"AnimationEvent"in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),"TransitionEvent"in window||delete ri.transitionend.transition);function kr(e){if(Pu[e])return Pu[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jv)return Pu[e]=t[n];return e}var Iv=kr("animationend"),Yv=kr("animationiteration"),Gv=kr("animationstart"),oT=kr("transitionrun"),cT=kr("transitionstart"),uT=kr("transitioncancel"),Xv=kr("transitionend"),Qv=new Map,bd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");bd.push("scrollEnd");function jn(e,t){Qv.set(e,t),Nr(t,[e])}var ug=new WeakMap;function On(e,t){if(typeof e=="object"&&e!==null){var n=ug.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zh(t)},ug.set(e,t),t)}return{value:e,source:t,stack:Zh(t)}}var An=[],ii=0,ff=0;function nc(){for(var e=ii,t=ff=ii=0;t<e;){var n=An[t];An[t++]=null;var a=An[t];An[t++]=null;var r=An[t];An[t++]=null;var i=An[t];if(An[t++]=null,a!==null&&r!==null){var s=a.pending;s===null?r.next=r:(r.next=s.next,s.next=r),a.pending=r}i!==0&&Fv(n,r,i)}}function ac(e,t,n,a){An[ii++]=e,An[ii++]=t,An[ii++]=n,An[ii++]=a,ff|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function pf(e,t,n,a){return ac(e,t,n,a),Co(e)}function Di(e,t){return ac(e,null,null,t),Co(e)}function Fv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-yn(n),e=i.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),i):null}function Co(e){if(50<Cs)throw Cs=0,Hd=null,Error(M(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function dT(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,a){return new dT(e,t,n,a)}function mf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var n=e.alternate;return n===null?(n=gn(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&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Zv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,n,a,r,i){var s=0;if(a=e,typeof e=="function")mf(e)&&(s=1);else if(typeof e=="string")s=dw(e,n,Zn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ld:return e=gn(31,n,t,r),e.elementType=ld,e.lanes=i,e;case Kr:return fr(n.children,r,i,t);case mv:s=8,r|=24;break;case rd:return e=gn(12,n,t,r|2),e.elementType=rd,e.lanes=i,e;case id:return e=gn(13,n,t,r),e.elementType=id,e.lanes=i,e;case sd:return e=gn(19,n,t,r),e.elementType=sd,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tk:case la:s=10;break e;case hv:s=9;break e;case Wd:s=11;break e;case ef:s=14;break e;case Ca:s=16,a=null;break e}s=29,n=Error(M(130,e===null?"null":typeof e,"")),a=null}return t=gn(s,n,t,r),t.elementType=e,t.type=a,t.lanes=i,t}function fr(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function Bu(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function Vu(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=[],oi=0,Ro=null,_o=0,Rn=[],_n=0,pr=null,oa=1,ca="";function cr(e,t){li[oi++]=_o,li[oi++]=Ro,Ro=e,_o=t}function $v(e,t,n){Rn[_n++]=oa,Rn[_n++]=ca,Rn[_n++]=pr,pr=e;var a=oa;e=ca;var r=32-yn(a)-1;a&=~(1<<r),n+=1;var i=32-yn(t)+r;if(30<i){var s=r-r%5;i=(a&(1<<s)-1).toString(32),a>>=s,r-=s,oa=1<<32-yn(t)+r|n<<r|a,ca=i+e}else oa=1<<i|n<<r|a,ca=e}function hf(e){e.return!==null&&(cr(e,1),$v(e,1,0))}function gf(e){for(;e===Ro;)Ro=li[--oi],li[oi]=null,_o=li[--oi],li[oi]=null;for(;e===pr;)pr=Rn[--_n],Rn[_n]=null,ca=Rn[--_n],Rn[_n]=null,oa=Rn[--_n],Rn[_n]=null}var Ft=null,rt=null,Ce=!1,mr=null,Qn=!1,xd=Error(M(519));function yr(e){var t=Error(M(418,""));throw zs(On(t,e)),xd}function dg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[qt]=e,t[sn]=a,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Ps.length;n++)xe(Ps[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Cv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),wo(t);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),_v(t,a.value,a.defaultValue,a.children),wo(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Db(t.textContent,n)?(a.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),a.onScroll!=null&&xe("scroll",t),a.onScrollEnd!=null&&xe("scrollend",t),a.onClick!=null&&(t.onclick=dc),t=!0):t=!1,t||yr(e)}function fg(e){for(Ft=e.return;Ft;)switch(Ft.tag){case 5:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Ft=Ft.return}}function ss(e){if(e!==Ft)return!1;if(!Ce)return fg(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Xd(e.type,e.memoizedProps)),n=!n),n&&rt&&yr(e),fg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){rt=qn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}rt=null}}else t===27?(t=rt,$a(e.type)?(e=Zd,Zd=null,rt=e):rt=t):rt=Ft?qn(e.stateNode.nextSibling):null;return!0}function $s(){rt=Ft=null,Ce=!1}function pg(){var e=mr;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),mr=null),e}function zs(e){mr===null?mr=[e]:mr.push(e)}var Sd=Kn(null),Tr=null,ua=null;function _a(e,t,n){We(Sd,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=Sd.current,Tt(Sd)}function Nd(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Ed(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var s=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var o=0;o<t.length;o++)if(l.context===t[o]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Nd(i.return,n,e),a||(s=null);break e}i=l.next}}else if(r.tag===18){if(s=r.return,s===null)throw Error(M(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),Nd(s,n,e),s=null}else s=r.child;if(s!==null)s.return=r;else for(s=r;s!==null;){if(s===e){s=null;break}if(r=s.sibling,r!==null){r.return=s.return,s=r;break}s=s.return}r=s}}function Js(e,t,n,a){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var s=r.alternate;if(s===null)throw Error(M(387));if(s=s.memoizedProps,s!==null){var l=r.type;Sn(r.pendingProps.value,s.value)||(e!==null?e.push(l):e=[l])}}else if(r===No.current){if(s=r.alternate,s===null)throw Error(M(387));s.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Hs):e=[Hs])}r=r.return}e!==null&&Ed(t,e,n,a),t.flags|=262144}function Do(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function br(e){Tr=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return Jv(Tr,e)}function Kl(e,t){return Tr===null&&br(e),Jv(e,t)}function Jv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ua===null){if(e===null)throw Error(M(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return n}var fT=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},pT=xt.unstable_scheduleCallback,mT=xt.unstable_NormalPriority,yt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new fT,data:new Map,refCount:0}}function Ks(e){e.refCount--,e.refCount===0&&pT(mT,function(){e.controller.abort()})}var bs=null,kd=0,Si=0,pi=null;function hT(e,t){if(bs===null){var n=bs=[];kd=0,Si=Hf(),pi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return kd++,t.then(mg,mg),t}function mg(){if(--kd===0&&bs!==null){pi!==null&&(pi.status="fulfilled");var e=bs;bs=null,Si=0,pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gT(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var hg=ue.S;ue.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&hT(e,t),hg!==null&&hg(e,t)};var hr=Kn(null);function yf(){var e=hr.current;return e!==null?e:Ye.pooledCache}function mo(e,t){t===null?We(hr,hr.current):We(hr,t.pool)}function Kv(){var e=yf();return e===null?null:{parent:yt._currentValue,pool:e}}var Ws=Error(M(460)),Wv=Error(M(474)),rc=Error(M(542)),Td={then:function(){}};function gg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wl(){}function ey(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Wl,Wl),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e;default:if(typeof t.status=="string")t.then(Wl,Wl);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(M(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e}throw xs=t,Ws}}var xs=null;function vg(){if(xs===null)throw Error(M(459));var e=xs;return xs=null,e}function yg(e){if(e===Ws||e===rc)throw Error(M(483))}var Ra=!1;function bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Le&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=Co(e),Fv(e,null,n),t}return ac(e,a,t,n),Co(e)}function Ss(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Nv(e,n)}}function Hu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ad=!1;function Ns(){if(Ad){var e=pi;if(e!==null)throw e}}function Es(e,t,n,a){Ad=!1;var r=e.updateQueue;Ra=!1;var i=r.firstBaseUpdate,s=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var o=l,c=o.next;o.next=null,s===null?i=c:s.next=c,s=o;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==s&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=o))}if(i!==null){var p=r.baseState;s=0,u=c=o=null,l=i;do{var f=l.lane&-536870913,d=f!==l.lane;if(d?(Te&f)===f:(a&f)===f){f!==0&&f===Si&&(Ad=!0),u!==null&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var E=e,v=l;f=t;var k=n;switch(v.tag){case 1:if(E=v.payload,typeof E=="function"){p=E.call(k,p,f);break e}p=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=v.payload,f=typeof E=="function"?E.call(k,p,f):E,f==null)break e;p=Qe({},p,f);break e;case 2:Ra=!0}}f=l.callback,f!==null&&(e.flags|=64,d&&(e.flags|=8192),d=r.callbacks,d===null?r.callbacks=[f]:d.push(f))}else d={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=d,o=p):u=u.next=d,s|=f;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;d=l,l=d.next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}while(!0);u===null&&(o=p),r.baseState=o,r.firstBaseUpdate=c,r.lastBaseUpdate=u,i===null&&(r.shared.lanes=0),Fa|=s,e.lanes=s,e.memoizedState=p}}function ty(e,t){if(typeof e!="function")throw Error(M(191,e));e.call(t)}function ny(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ty(n[e],t)}var Ni=Kn(null),Oo=Kn(0);function bg(e,t){e=va,We(Oo,e),We(Ni,t),va=e|t.baseLanes}function Cd(){We(Oo,va),We(Ni,Ni.current)}function xf(){va=Oo.current,Tt(Ni),Tt(Oo)}var Xa=0,ye=null,Be=null,mt=null,Lo=!1,mi=!1,xr=!1,zo=0,Ms=0,hi=null,vT=0;function ct(){throw Error(M(321))}function Sf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function Nf(e,t,n,a,r,i){return Xa=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Ly:zy,xr=!1,i=n(a,r),xr=!1,mi&&(i=ry(t,n,a,r)),ay(e),i}function ay(e){ue.H=Mo;var t=Be!==null&&Be.next!==null;if(Xa=0,mt=Be=ye=null,Lo=!1,Ms=0,hi=null,t)throw Error(M(300));e===null||kt||(e=e.dependencies,e!==null&&Do(e)&&(kt=!0))}function ry(e,t,n,a){ye=e;var r=0;do{if(mi&&(hi=null),Ms=0,mi=!1,25<=r)throw Error(M(301));if(r+=1,mt=Be=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ue.H=kT,i=t(n,a)}while(mi);return i}function yT(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?el(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(ye.flags|=1024),t}function Ef(){var e=zo!==0;return zo=0,e}function kf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Tf(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}Xa=0,mt=Be=ye=null,mi=!1,Ms=zo=0,hi=null}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?ye.memoizedState=mt=e:mt=mt.next=e,mt}function ht(){if(Be===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=mt===null?ye.memoizedState:mt.next;if(t!==null)mt=t,Be=e;else{if(e===null)throw ye.alternate===null?Error(M(467)):Error(M(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},mt===null?ye.memoizedState=mt=e:mt=mt.next=e}return mt}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(e){var t=Ms;return Ms+=1,hi===null&&(hi=[]),e=ey(hi,e,t),t=ye,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Ly:zy),e}function ic(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return el(e);if(e.$$typeof===la)return jt(e)}throw Error(M(438,String(e)))}function Af(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ye.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wf(),ye.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=nk;return t.index++,n}function ha(e,t){return typeof t=="function"?t(e):t}function ho(e){var t=ht();return Cf(t,Be,e)}function Cf(e,t,n){var a=e.queue;if(a===null)throw Error(M(311));a.lastRenderedReducer=n;var r=e.baseQueue,i=a.pending;if(i!==null){if(r!==null){var s=r.next;r.next=i.next,i.next=s}t.baseQueue=r=i,a.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=s=null,o=null,c=t,u=!1;do{var p=c.lane&-536870913;if(p!==c.lane?(Te&p)===p:(Xa&p)===p){var f=c.revertLane;if(f===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),p===Si&&(u=!0);else if((Xa&f)===f){c=c.next,f===Si&&(u=!0);continue}else p={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=p,s=i):o=o.next=p,ye.lanes|=f,Fa|=f;p=c.action,xr&&n(i,p),i=c.hasEagerState?c.eagerState:n(i,p)}else f={lane:p,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=f,s=i):o=o.next=f,ye.lanes|=p,Fa|=p;c=c.next}while(c!==null&&c!==t);if(o===null?s=i:o.next=l,!Sn(i,e.memoizedState)&&(kt=!0,u&&(n=pi,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=o,a.lastRenderedState=i}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qu(e){var t=ht(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var s=r=r.next;do i=e(i,s.action),s=s.next;while(s!==r);Sn(i,t.memoizedState)||(kt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function iy(e,t,n){var a=ye,r=ht(),i=Ce;if(i){if(n===void 0)throw Error(M(407));n=n()}else n=t();var s=!Sn((Be||r).memoizedState,n);s&&(r.memoizedState=n,kt=!0),r=r.queue;var l=oy.bind(null,a,r,e);if(tl(2048,8,l,[e]),r.getSnapshot!==t||s||mt!==null&&mt.memoizedState.tag&1){if(a.flags|=2048,Ei(9,sc(),ly.bind(null,a,r,n,t),null),Ye===null)throw Error(M(349));i||(Xa&124)!==0||sy(a,t,n)}return n}function sy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=wf(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ly(e,t,n,a){t.value=n,t.getSnapshot=a,cy(t)&&uy(e)}function oy(e,t,n){return n(function(){cy(t)&&uy(e)})}function cy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sn(e,n)}catch(a){return!0}}function uy(e){var t=Di(e,2);t!==null&&xn(t,e,2)}function Rd(e){var t=nn();if(typeof e=="function"){var n=e;if(e=n(),xr){za(!0);try{n()}finally{za(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function dy(e,t,n,a){return e.baseState=n,Cf(e,Be,typeof a=="function"?a:ha)}function bT(e,t,n,a,r){if(lc(e))throw Error(M(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};ue.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,fy(t,i)):(i.next=n.next,t.pending=n.next=i)}}function fy(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var i=ue.T,s={};ue.T=s;try{var l=n(r,a),o=ue.S;o!==null&&o(s,l),xg(e,t,l)}catch(c){_d(e,t,c)}finally{ue.T=i}}else try{i=n(r,a),xg(e,t,i)}catch(c){_d(e,t,c)}}function xg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Sg(e,t,a)},function(a){return _d(e,t,a)}):Sg(e,t,n)}function Sg(e,t,n){t.status="fulfilled",t.value=n,py(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,fy(e,n)))}function _d(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,py(t),t=t.next;while(t!==a)}e.action=null}function py(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function my(e,t){return t}function Ng(e,t){if(Ce){var n=Ye.formState;if(n!==null){e:{var a=ye;if(Ce){if(rt){t:{for(var r=rt,i=Qn;r.nodeType!==8;){if(!i){r=null;break t}if(r=qn(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){rt=qn(r.nextSibling),a=r.data==="F!";break e}}yr(a)}a=!1}a&&(t=n[0])}}return n=nn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:my,lastRenderedState:t},n.queue=a,n=_y.bind(null,ye,a),a.dispatch=n,a=Rd(!1),i=Of.bind(null,ye,!1,a.queue),a=nn(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=bT.bind(null,ye,r,i,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function Eg(e){var t=ht();return hy(t,Be,e)}function hy(e,t,n){if(t=Cf(e,t,my)[0],e=ho(ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=el(t)}catch(s){throw s===Ws?rc:s}else a=t;t=ht();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,Ei(9,sc(),xT.bind(null,r,n),null)),[a,i,e]}function xT(e,t){e.action=t}function kg(e){var t=ht(),n=Be;if(n!==null)return hy(t,n,e);ht(),t=t.memoizedState,n=ht();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ei(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ye.updateQueue,t===null&&(t=wf(),ye.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function sc(){return{destroy:void 0,resource:void 0}}function gy(){return ht().memoizedState}function go(e,t,n,a){var r=nn();a=a===void 0?null:a,ye.flags|=e,r.memoizedState=Ei(1|t,sc(),n,a)}function tl(e,t,n,a){var r=ht();a=a===void 0?null:a;var i=r.memoizedState.inst;Be!==null&&a!==null&&Sf(a,Be.memoizedState.deps)?r.memoizedState=Ei(t,i,n,a):(ye.flags|=e,r.memoizedState=Ei(1|t,i,n,a))}function Tg(e,t){go(8390656,8,e,t)}function vy(e,t){tl(2048,8,e,t)}function yy(e,t){return tl(4,2,e,t)}function by(e,t){return tl(4,4,e,t)}function xy(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sy(e,t,n){n=n!=null?n.concat([e]):null,tl(4,4,xy.bind(null,t,e),n)}function Rf(){}function Ny(e,t){var n=ht();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Sf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Ey(e,t){var n=ht();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Sf(t,a[1]))return a[0];if(a=e(),xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a}function _f(e,t,n){return n===void 0||(Xa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=pb(),ye.lanes|=e,Fa|=e,n)}function ky(e,t,n,a){return Sn(n,t)?n:Ni.current!==null?(e=_f(e,n,a),Sn(e,t)||(kt=!0),e):(Xa&42)===0?(kt=!0,e.memoizedState=n):(e=pb(),ye.lanes|=e,Fa|=e,t)}function Ty(e,t,n,a,r){var i=Re.p;Re.p=i!==0&&8>i?i:8;var s=ue.T,l={};ue.T=l,Of(e,!1,t,n);try{var o=r(),c=ue.S;if(c!==null&&c(l,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=gT(o,a);ks(e,t,u,bn(e))}else ks(e,t,a,bn(e))}catch(p){ks(e,t,{then:function(){},status:"rejected",reason:p},bn())}finally{Re.p=i,ue.T=s}}function ST(){}function Dd(e,t,n,a){if(e.tag!==5)throw Error(M(476));var r=wy(e).queue;Ty(e,r,t,dr,n===null?ST:function(){return Ay(e),n(a)})}function wy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:dr,baseState:dr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:dr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ay(e){var t=wy(e).next.queue;ks(e,t,{},bn())}function Df(){return jt(Hs)}function Cy(){return ht().memoizedState}function Ry(){return ht().memoizedState}function NT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bn();e=Va(n);var a=Ha(t,e,n);a!==null&&(xn(a,t,n),Ss(a,t,n)),t={cache:vf()},e.payload=t;return}t=t.return}}function ET(e,t,n){var a=bn();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?Dy(t,n):(n=pf(e,t,n,a),n!==null&&(xn(n,e,a),Oy(n,t,a)))}function _y(e,t,n){var a=bn();ks(e,t,n,a)}function ks(e,t,n,a){var r={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))Dy(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(r.hasEagerState=!0,r.eagerState=l,Sn(l,s))return ac(e,t,r,0),Ye===null&&nc(),!1}catch(o){}finally{}if(n=pf(e,t,r,a),n!==null)return xn(n,e,a),Oy(n,t,a),!0}return!1}function Of(e,t,n,a){if(a={lane:2,revertLane:Hf(),action:a,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(M(479))}else t=pf(e,n,a,2),t!==null&&xn(t,e,2)}function lc(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Dy(e,t){mi=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Oy(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Nv(e,n)}}var Mo={readContext:jt,use:ic,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct},Ly={readContext:jt,use:ic,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:Tg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,go(4194308,4,xy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return go(4194308,4,e,t)},useInsertionEffect:function(e,t){go(4,2,e,t)},useMemo:function(e,t){var n=nn();t=t===void 0?null:t;var a=e();if(xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=nn();if(n!==void 0){var r=n(t);if(xr){za(!0);try{n(t)}finally{za(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=ET.bind(null,ye,e),[a.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:function(e){e=Rd(e);var t=e.queue,n=_y.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Rf,useDeferredValue:function(e,t){var n=nn();return _f(n,e,t)},useTransition:function(){var e=Rd(!1);return e=Ty.bind(null,ye,e.queue,!0,!1),nn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ye,r=nn();if(Ce){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Ye===null)throw Error(M(349));(Te&124)!==0||sy(a,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,Tg(oy.bind(null,a,i,e),[e]),a.flags|=2048,Ei(9,sc(),ly.bind(null,a,i,n,t),null),n},useId:function(){var e=nn(),t=Ye.identifierPrefix;if(Ce){var n=ca,a=oa;n=(a&~(1<<32-yn(a)-1)).toString(32)+n,t="\xAB"+t+"R"+n,n=zo++,0<n&&(t+="H"+n.toString(32)),t+="\xBB"}else n=vT++,t="\xAB"+t+"r"+n.toString(32)+"\xBB";return e.memoizedState=t},useHostTransitionStatus:Df,useFormState:Ng,useActionState:Ng,useOptimistic:function(e){var t=nn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Of.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:Af,useCacheRefresh:function(){return nn().memoizedState=NT.bind(null,ye)}},zy={readContext:jt,use:ic,useCallback:Ny,useContext:jt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:ho,useRef:gy,useState:function(){return ho(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=ht();return ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=ho(ha)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:Eg,useActionState:Eg,useOptimistic:function(e,t){var n=ht();return dy(n,Be,e,t)},useMemoCache:Af,useCacheRefresh:Ry},kT={readContext:jt,use:ic,useCallback:Ny,useContext:jt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:qu,useRef:gy,useState:function(){return qu(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=ht();return Be===null?_f(n,e,t):ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=qu(ha)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:kg,useActionState:kg,useOptimistic:function(e,t){var n=ht();return Be!==null?dy(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Af,useCacheRefresh:Ry},gi=null,Us=0;function eo(e){var t=Us;return Us+=1,gi===null&&(gi=[]),ey(gi,e,t)}function ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===ek?Error(M(525)):(e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wg(e){var t=e._init;return t(e._payload)}function My(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function a(m){for(var h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function r(m,h){return m=fa(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=67108866,h):g):(m.flags|=67108866,h)):(m.flags|=1048576,h)}function s(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function l(m,h,g,x){return h===null||h.tag!==6?(h=Bu(g,m.mode,x),h.return=m,h):(h=r(h,g),h.return=m,h)}function o(m,h,g,x){var w=g.type;return w===Kr?u(m,h,g.props.children,x,g.key):h!==null&&(h.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Ca&&wg(w)===h.type)?(h=r(h,g.props),ls(h,g),h.return=m,h):(h=po(g.type,g.key,g.props,null,m.mode,x),ls(h,g),h.return=m,h)}function c(m,h,g,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Vu(g,m.mode,x),h.return=m,h):(h=r(h,g.children||[]),h.return=m,h)}function u(m,h,g,x,w){return h===null||h.tag!==7?(h=fr(g,m.mode,x,w),h.return=m,h):(h=r(h,g),h.return=m,h)}function p(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Bu(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Gl:return g=po(h.type,h.key,h.props,null,m.mode,g),ls(g,h),g.return=m,g;case fs:return h=Vu(h,m.mode,g),h.return=m,h;case Ca:var x=h._init;return h=x(h._payload),p(m,h,g)}if(ps(h)||rs(h))return h=fr(h,m.mode,g,null),h.return=m,h;if(typeof h.then=="function")return p(m,eo(h),g);if(h.$$typeof===la)return p(m,Kl(m,h),g);to(m,h)}return null}function f(m,h,g,x){var w=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return w!==null?null:l(m,h,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:return g.key===w?o(m,h,g,x):null;case fs:return g.key===w?c(m,h,g,x):null;case Ca:return w=g._init,g=w(g._payload),f(m,h,g,x)}if(ps(g)||rs(g))return w!==null?null:u(m,h,g,x,null);if(typeof g.then=="function")return f(m,h,eo(g),x);if(g.$$typeof===la)return f(m,h,Kl(m,g),x);to(m,g)}return null}function d(m,h,g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return m=m.get(g)||null,l(h,m,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Gl:return m=m.get(x.key===null?g:x.key)||null,o(h,m,x,w);case fs:return m=m.get(x.key===null?g:x.key)||null,c(h,m,x,w);case Ca:var N=x._init;return x=N(x._payload),d(m,h,g,x,w)}if(ps(x)||rs(x))return m=m.get(g)||null,u(h,m,x,w,null);if(typeof x.then=="function")return d(m,h,g,eo(x),w);if(x.$$typeof===la)return d(m,h,g,Kl(h,x),w);to(h,x)}return null}function E(m,h,g,x){for(var w=null,N=null,T=h,A=h=0,U=null;T!==null&&A<g.length;A++){T.index>A?(U=T,T=null):U=T.sibling;var H=f(m,T,g[A],x);if(H===null){T===null&&(T=U);break}e&&T&&H.alternate===null&&t(m,T),h=i(H,h,A),N===null?w=H:N.sibling=H,N=H,T=U}if(A===g.length)return n(m,T),Ce&&cr(m,A),w;if(T===null){for(;A<g.length;A++)T=p(m,g[A],x),T!==null&&(h=i(T,h,A),N===null?w=T:N.sibling=T,N=T);return Ce&&cr(m,A),w}for(T=a(T);A<g.length;A++)U=d(T,m,A,g[A],x),U!==null&&(e&&U.alternate!==null&&T.delete(U.key===null?A:U.key),h=i(U,h,A),N===null?w=U:N.sibling=U,N=U);return e&&T.forEach(function(_){return t(m,_)}),Ce&&cr(m,A),w}function v(m,h,g,x){if(g==null)throw Error(M(151));for(var w=null,N=null,T=h,A=h=0,U=null,H=g.next();T!==null&&!H.done;A++,H=g.next()){T.index>A?(U=T,T=null):U=T.sibling;var _=f(m,T,H.value,x);if(_===null){T===null&&(T=U);break}e&&T&&_.alternate===null&&t(m,T),h=i(_,h,A),N===null?w=_:N.sibling=_,N=_,T=U}if(H.done)return n(m,T),Ce&&cr(m,A),w;if(T===null){for(;!H.done;A++,H=g.next())H=p(m,H.value,x),H!==null&&(h=i(H,h,A),N===null?w=H:N.sibling=H,N=H);return Ce&&cr(m,A),w}for(T=a(T);!H.done;A++,H=g.next())H=d(T,m,A,H.value,x),H!==null&&(e&&H.alternate!==null&&T.delete(H.key===null?A:H.key),h=i(H,h,A),N===null?w=H:N.sibling=H,N=H);return e&&T.forEach(function(R){return t(m,R)}),Ce&&cr(m,A),w}function k(m,h,g,x){if(typeof g=="object"&&g!==null&&g.type===Kr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:e:{for(var w=g.key;h!==null;){if(h.key===w){if(w=g.type,w===Kr){if(h.tag===7){n(m,h.sibling),x=r(h,g.props.children),x.return=m,m=x;break e}}else if(h.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Ca&&wg(w)===h.type){n(m,h.sibling),x=r(h,g.props),ls(x,g),x.return=m,m=x;break e}n(m,h);break}else t(m,h);h=h.sibling}g.type===Kr?(x=fr(g.props.children,m.mode,x,g.key),x.return=m,m=x):(x=po(g.type,g.key,g.props,null,m.mode,x),ls(x,g),x.return=m,m=x)}return s(m);case fs:e:{for(w=g.key;h!==null;){if(h.key===w)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),x=r(h,g.children||[]),x.return=m,m=x;break e}else{n(m,h);break}else t(m,h);h=h.sibling}x=Vu(g,m.mode,x),x.return=m,m=x}return s(m);case Ca:return w=g._init,g=w(g._payload),k(m,h,g,x)}if(ps(g))return E(m,h,g,x);if(rs(g)){if(w=rs(g),typeof w!="function")throw Error(M(150));return g=w.call(g),v(m,h,g,x)}if(typeof g.then=="function")return k(m,h,eo(g),x);if(g.$$typeof===la)return k(m,h,Kl(m,g),x);to(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),x=r(h,g),x.return=m,m=x):(n(m,h),x=Bu(g,m.mode,x),x.return=m,m=x),s(m)):n(m,h)}return function(m,h,g,x){try{Us=0;var w=k(m,h,g,x);return gi=null,w}catch(T){if(T===Ws||T===rc)throw T;var N=gn(29,T,null,m.mode);return N.lanes=x,N.return=m,N}finally{}}}var ki=My(!0),Uy=My(!1),zn=Kn(null),Jn=null;function Da(e){var t=e.alternate;We(bt,bt.current&1),We(zn,e),Jn===null&&(t===null||Ni.current!==null||t.memoizedState!==null)&&(Jn=e)}function Py(e){if(e.tag===22){if(We(bt,bt.current),We(zn,e),Jn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Jn=e)}}else Oa(e)}function Oa(){We(bt,bt.current),We(zn,zn.current)}function da(e){Tt(zn),Jn===e&&(Jn=null),Tt(bt)}var bt=Kn(0);function Uo(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==="$?"||Fd(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ju(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Od={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bn(),a=Va(n);a.tag=2,t!=null&&(a.callback=t),t=Ha(e,a,n),t!==null&&(xn(t,e,n),Ss(t,e,n))}};function Ag(e,t,n,a,r,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ls(n,a)||!Ls(r,i):!0}function Cg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Od.enqueueReplaceState(t,t.state,null)}function Sr(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Qe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}var Po=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function By(e){Po(e)}function Vy(e){console.error(e)}function Hy(e){Po(e)}function Bo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Rg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Ld(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Bo(e,t)},n}function qy(e){return e=Va(e),e.tag=3,e}function jy(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=a.value;e.payload=function(){return r(i)},e.callback=function(){Rg(t,n,a)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Rg(t,n,a),typeof r!="function"&&(qa===null?qa=new Set([this]):qa.add(this));var l=a.stack;this.componentDidCatch(a.value,{componentStack:l!==null?l:""})})}function TT(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Js(t,n,r,!0),n=zn.current,n!==null){switch(n.tag){case 13:return Jn===null?qd():n.alternate===null&&it===0&&(it=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Td?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Wu(e,a,r)),!1;case 22:return n.flags|=65536,a===Td?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Wu(e,a,r)),!1}throw Error(M(435,n.tag))}return Wu(e,a,r),qd(),!1}if(Ce)return t=zn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==xd&&(e=Error(M(422),{cause:a}),zs(On(e,n)))):(a!==xd&&(t=Error(M(423),{cause:a}),zs(On(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=On(a,n),r=Ld(e.stateNode,a,r),Hu(e,r),it!==4&&(it=2)),!1;var i=Error(M(520),{cause:a});if(i=On(i,n),As===null?As=[i]:As.push(i),it!==4&&(it=2),t===null)return!0;a=On(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Ld(n.stateNode,a,e),Hu(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(qa===null||!qa.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=qy(r),jy(r,e,n,a),Hu(n,r),!1}n=n.return}while(n!==null);return!1}var Iy=Error(M(461)),kt=!1;function Ot(e,t,n,a){t.child=e===null?Uy(t,null,n,a):ki(t,e.child,n,a)}function _g(e,t,n,a,r){n=n.render;var i=t.ref;if("ref"in a){var s={};for(var l in a)l!=="ref"&&(s[l]=a[l])}else s=a;return br(t),a=Nf(e,t,n,s,i,r),l=Ef(),e!==null&&!kt?(kf(e,t,r),ga(e,t,r)):(Ce&&l&&hf(t),t.flags|=1,Ot(e,t,a,r),t.child)}function Dg(e,t,n,a,r){if(e===null){var i=n.type;return typeof i=="function"&&!mf(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,Yy(e,t,i,a,r)):(e=po(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Lf(e,r)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ls,n(s,a)&&e.ref===t.ref)return ga(e,t,r)}return t.flags|=1,e=fa(i,a),e.ref=t.ref,e.return=t,t.child=e}function Yy(e,t,n,a,r){if(e!==null){var i=e.memoizedProps;if(Ls(i,a)&&e.ref===t.ref)if(kt=!1,t.pendingProps=a=i,Lf(e,r))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,ga(e,t,r)}return zd(e,t,n,a,r)}function Gy(e,t,n){var a=t.pendingProps,r=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;t.childLanes=i&~a}else t.childLanes=0,t.child=null;return Og(e,t,a,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mo(t,i!==null?i.cachePool:null),i!==null?bg(t,i):Cd(),Py(t);else return t.lanes=t.childLanes=536870912,Og(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(mo(t,i.cachePool),bg(t,i),Oa(t),t.memoizedState=null):(e!==null&&mo(t,null),Cd(),Oa(t));return Ot(e,t,r,n),t.child}function Og(e,t,n,a){var r=yf();return r=r===null?null:{parent:yt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&mo(t,null),Cd(),Py(t),e!==null&&Js(e,t,a,!0),null}function vo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(M(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zd(e,t,n,a,r){return br(t),n=Nf(e,t,n,a,void 0,r),a=Ef(),e!==null&&!kt?(kf(e,t,r),ga(e,t,r)):(Ce&&a&&hf(t),t.flags|=1,Ot(e,t,n,r),t.child)}function Lg(e,t,n,a,r,i){return br(t),t.updateQueue=null,n=ry(t,a,n,r),ay(e),a=Ef(),e!==null&&!kt?(kf(e,t,i),ga(e,t,i)):(Ce&&a&&hf(t),t.flags|=1,Ot(e,t,n,i),t.child)}function zg(e,t,n,a,r){if(br(t),t.stateNode===null){var i=si,s=n.contextType;typeof s=="object"&&s!==null&&(i=jt(s)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Od,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},bf(t),s=n.contextType,i.context=typeof s=="object"&&s!==null?jt(s):si,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(ju(t,n,s,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&Od.enqueueReplaceState(i,i.state,null),Es(t,a,i,r),Ns(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,o=Sr(n,l);i.props=o;var c=i.context,u=n.contextType;s=si,typeof u=="object"&&u!==null&&(s=jt(u));var p=n.getDerivedStateFromProps;u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||c!==s)&&Cg(t,i,a,s),Ra=!1;var f=t.memoizedState;i.state=f,Es(t,a,i,r),Ns(),c=t.memoizedState,l||f!==c||Ra?(typeof p=="function"&&(ju(t,n,p,a),c=t.memoizedState),(o=Ra||Ag(t,n,o,a,f,c,s))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,a=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,wd(e,t),s=t.memoizedProps,u=Sr(n,s),i.props=u,p=t.pendingProps,f=i.context,c=n.contextType,o=si,typeof c=="object"&&c!==null&&(o=jt(c)),l=n.getDerivedStateFromProps,(c=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==p||f!==o)&&Cg(t,i,a,o),Ra=!1,f=t.memoizedState,i.state=f,Es(t,a,i,r),Ns();var d=t.memoizedState;s!==p||f!==d||Ra||e!==null&&e.dependencies!==null&&Do(e.dependencies)?(typeof l=="function"&&(ju(t,n,l,a),d=t.memoizedState),(u=Ra||Ag(t,n,u,a,f,d,o)||e!==null&&e.dependencies!==null&&Do(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,d,o),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,d,o)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=d),i.props=a,i.state=d,i.context=o,a=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,vo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ki(t,e.child,null,r),t.child=ki(t,null,n,r)):Ot(e,t,n,r),t.memoizedState=i.state,e=t.child):e=ga(e,t,r),e}function Mg(e,t,n,a){return $s(),t.flags|=256,Ot(e,t,n,a),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(e){return{baseLanes:e,cachePool:Kv()}}function Gu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ln),e}function Xy(e,t,n){var a=t.pendingProps,r=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),s&&(r=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(r?Da(t):Oa(t),Ce){var l=rt,o;if(o=l){e:{for(o=l,l=Qn;o.nodeType!==8;){if(!l){l=null;break e}if(o=qn(o.nextSibling),o===null){l=null;break e}}l=o}l!==null?(t.memoizedState={dehydrated:l,treeContext:pr!==null?{id:oa,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},o=gn(18,null,null,0),o.stateNode=l,o.return=t,t.child=o,Ft=t,rt=null,o=!0):o=!1}o||yr(t)}if(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null))return Fd(l)?t.lanes=32:t.lanes=536870912,null;da(t)}return l=a.children,a=a.fallback,r?(Oa(t),r=t.mode,l=Vo({mode:"hidden",children:l},r),a=fr(a,r,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,r=t.child,r.memoizedState=Yu(n),r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),Md(t,l))}if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null)){if(i)t.flags&256?(Da(t),t.flags&=-257,t=Xu(e,t,n)):t.memoizedState!==null?(Oa(t),t.child=e.child,t.flags|=128,t=null):(Oa(t),r=a.fallback,l=t.mode,a=Vo({mode:"visible",children:a.children},l),r=fr(r,l,n,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,ki(t,e.child,null,n),a=t.child,a.memoizedState=Yu(n),a.childLanes=Gu(e,s,n),t.memoizedState=Iu,t=r);else if(Da(t),Fd(l)){if(s=l.nextSibling&&l.nextSibling.dataset,s)var c=s.dgst;s=c,a=Error(M(419)),a.stack="",a.digest=s,zs({value:a,source:null,stack:null}),t=Xu(e,t,n)}else if(kt||Js(e,t,n,!1),s=(n&e.childLanes)!==0,kt||s){if(s=Ye,s!==null&&(a=n&-n,a=(a&42)!==0?1:nf(a),a=(a&(s.suspendedLanes|n))!==0?0:a,a!==0&&a!==o.retryLane))throw o.retryLane=a,Di(e,a),xn(s,e,a),Iy;l.data==="$?"||qd(),t=Xu(e,t,n)}else l.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,rt=qn(l.nextSibling),Ft=t,Ce=!0,mr=null,Qn=!1,e!==null&&(Rn[_n++]=oa,Rn[_n++]=ca,Rn[_n++]=pr,oa=e.id,ca=e.overflow,pr=t),t=Md(t,a.children),t.flags|=4096);return t}return r?(Oa(t),r=a.fallback,l=t.mode,o=e.child,c=o.sibling,a=fa(o,{mode:"hidden",children:a.children}),a.subtreeFlags=o.subtreeFlags&65011712,c!==null?r=fa(c,r):(r=fr(r,l,n,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,a=r,r=t.child,l=e.child.memoizedState,l===null?l=Yu(n):(o=l.cachePool,o!==null?(c=yt._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=Kv(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),n=e.child,e=n.sibling,n=fa(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Md(e,t){return t=Vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vo(e,t){return e=gn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xu(e,t,n){return ki(t,e.child,null,n),e=Md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ug(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Nd(e.return,t,n)}function Qu(e,t,n,a,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=r)}function Qy(e,t,n){var a=t.pendingProps,r=a.revealOrder,i=a.tail;if(Ot(e,t,a.children,n),a=bt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ug(e,n,t);else if(e.tag===19)Ug(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}a&=1}switch(We(bt,a),r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Uo(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Qu(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Uo(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Qu(t,!0,n,null,i);break;case"together":Qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Js(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=fa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Do(e)))}function wT(e,t,n){switch(t.tag){case 3:Eo(t,t.stateNode.containerInfo),_a(t,yt,e.memoizedState.cache),$s();break;case 27:case 5:ud(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Xy(e,t,n):(Da(t),e=ga(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Js(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return Qy(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),We(bt,bt.current),a)break;return null;case 22:case 23:return t.lanes=0,Gy(e,t,n);case 24:_a(t,yt,e.memoizedState.cache)}return ga(e,t,n)}function Fy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Lf(e,n)&&(t.flags&128)===0)return kt=!1,wT(e,t,n);kt=(e.flags&131072)!==0}else kt=!1,Ce&&(t.flags&1048576)!==0&&$v(t,_o,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,r=a._init;if(a=r(a._payload),t.type=a,typeof a=="function")mf(a)?(e=Sr(a,e),t.tag=1,t=zg(null,t,a,e,n)):(t.tag=0,t=zd(null,t,a,e,n));else{if(a!=null){if(r=a.$$typeof,r===Wd){t.tag=11,t=_g(null,t,a,e,n);break e}else if(r===ef){t.tag=14,t=Dg(null,t,a,e,n);break e}}throw t=od(a)||a,Error(M(306,t,""))}}return t;case 0:return zd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Sr(a,t.pendingProps),zg(e,t,a,r,n);case 3:e:{if(Eo(t,t.stateNode.containerInfo),e===null)throw Error(M(387));a=t.pendingProps;var i=t.memoizedState;r=i.element,wd(e,t),Es(t,a,null,n);var s=t.memoizedState;if(a=s.cache,_a(t,yt,a),a!==i.cache&&Ed(t,[yt],n,!0),Ns(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Mg(e,t,a,n);break e}else if(a!==r){r=On(Error(M(424)),t),zs(r),t=Mg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=qn(e.firstChild),Ft=t,Ce=!0,mr=null,Qn=!0,n=Uy(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($s(),a===r){t=ga(e,t,n);break e}Ot(e,t,a,n)}t=t.child}return t;case 26:return vo(e,t),e===null?(n=tv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,a=Xo(Ba.current).createElement(n),a[qt]=t,a[sn]=e,zt(a,n,e),Et(a),t.stateNode=a):t.memoizedState=tv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ud(t),e===null&&Ce&&(a=t.stateNode=zb(t.type,t.pendingProps,Ba.current),Ft=t,Qn=!0,r=rt,$a(t.type)?(Zd=r,rt=qn(a.firstChild)):rt=r),Ot(e,t,t.pendingProps.children,n),vo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((r=a=rt)&&(a=KT(a,t.type,t.pendingProps,Qn),a!==null?(t.stateNode=a,Ft=t,rt=qn(a.firstChild),Qn=!1,r=!0):r=!1),r||yr(t)),ud(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Xd(r,i)?a=null:s!==null&&Xd(r,s)&&(t.flags|=32),t.memoizedState!==null&&(r=Nf(e,t,yT,null,null,n),Hs._currentValue=r),vo(e,t),Ot(e,t,a,n),t.child;case 6:return e===null&&Ce&&((e=n=rt)&&(n=WT(n,t.pendingProps,Qn),n!==null?(t.stateNode=n,Ft=t,rt=null,e=!0):e=!1),e||yr(t)),null;case 13:return Xy(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ki(t,null,a,n):Ot(e,t,a,n),t.child;case 11:return _g(e,t,t.type,t.pendingProps,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,_a(t,t.type,a.value),Ot(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,br(t),r=jt(r),a=a(r),t.flags|=1,Ot(e,t,a,n),t.child;case 14:return Dg(e,t,t.type,t.pendingProps,n);case 15:return Yy(e,t,t.type,t.pendingProps,n);case 19:return Qy(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=Vo(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=fa(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Gy(e,t,n);case 24:return br(t),a=jt(yt),e===null?(r=yf(),r===null&&(r=Ye,i=vf(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:a,cache:r},bf(t),_a(t,yt,r)):((e.lanes&n)!==0&&(wd(e,t),Es(t,null,null,n),Ns()),r=e.memoizedState,i=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),_a(t,yt,a)):(a=i.cache,_a(t,yt,a),a!==r.cache&&Ed(t,[yt],n,!0))),Ot(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(M(156,t.tag))}function ra(e){e.flags|=4}function Pg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pb(t)){if(t=zn.current,t!==null&&((Te&4194048)===Te?Jn!==null:(Te&62914560)!==Te&&(Te&536870912)===0||t!==Jn))throw xs=Td,Wv;e.flags|=8192}}function no(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xv():536870912,e.lanes|=t,Ti|=t)}function os(e,t){if(!Ce)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 a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function AT(e,t,n){var a=t.pendingProps;switch(gf(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pa(yt),yi(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ss(t)?ra(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,pg())),et(t),null;case 26:return n=t.memoizedState,e===null?(ra(t),n!==null?(et(t),Pg(t,n)):(et(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ra(t),et(t),Pg(t,n)):(et(t),t.flags&=-16777217):(e.memoizedProps!==a&&ra(t),et(t),t.flags&=-16777217),null;case 27:ko(t),n=Ba.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}e=Zn.current,ss(t)?dg(t,e):(e=zb(r,a,n),t.stateNode=e,ra(t))}return et(t),null;case 5:if(ko(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}if(e=Zn.current,ss(t))dg(t,e);else{switch(r=Xo(Ba.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}e[qt]=t,e[sn]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(zt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ra(t)}}return et(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(M(166));if(e=Ba.current,ss(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Ft,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[qt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Db(e.nodeValue,n)),e||yr(t)}else e=Xo(e).createTextNode(a),e[qt]=t,t.stateNode=e}return et(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ss(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(M(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(M(317));r[qt]=t}else $s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),r=!1}else r=pg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(da(t),t):(da(t),null)}if(da(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool);var i=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==r&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),no(t,t.updateQueue),et(t),null;case 4:return yi(),e===null&&qf(t.stateNode.containerInfo),et(t),null;case 10:return pa(t.type),et(t),null;case 19:if(Tt(bt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)os(r,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Uo(e),i!==null){for(t.flags|=128,os(r,!1),e=i.updateQueue,t.updateQueue=e,no(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zv(n,e),n=n.sibling;return We(bt,bt.current&1|2),t.child}e=e.sibling}r.tail!==null&&$n()>qo&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304)}else{if(!a)if(e=Uo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,no(t,e),os(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return et(t),null}else 2*$n()-r.renderingStartTime>qo&&n!==536870912&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=$n(),t.sibling=null,e=bt.current,We(bt,a?e&1|2:e&1),t):(et(t),null);case 22:case 23:return da(t),xf(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&no(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Tt(hr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(yt),et(t),null;case 25:return null;case 30:return null}throw Error(M(156,t.tag))}function CT(e,t){switch(gf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(yt),yi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ko(t),null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Tt(bt),null;case 4:return yi(),null;case 10:return pa(t.type),null;case 22:case 23:return da(t),xf(),e!==null&&Tt(hr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(yt),null;case 25:return null;default:return null}}function Zy(e,t){switch(gf(t),t.tag){case 3:pa(yt),yi();break;case 26:case 27:case 5:ko(t);break;case 4:yi();break;case 13:da(t);break;case 19:Tt(bt);break;case 10:pa(t.type);break;case 22:case 23:da(t),xf(),e!==null&&Tt(hr);break;case 24:pa(yt)}}function nl(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var i=n.create,s=n.inst;a=i(),s.destroy=a}n=n.next}while(n!==r)}}catch(l){je(t,t.return,l)}}function Qa(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var i=r.next;a=i;do{if((a.tag&e)===e){var s=a.inst,l=s.destroy;if(l!==void 0){s.destroy=void 0,r=t;var o=n,c=l;try{c()}catch(u){je(r,o,u)}}}a=a.next}while(a!==i)}}catch(u){je(t,t.return,u)}}function $y(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ny(t,n)}catch(a){je(e,e.return,a)}}}function Jy(e,t,n){n.props=Sr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){je(e,t,a)}}function Ts(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){je(e,t,r)}}function Fn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){je(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Ky(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){je(e,e.return,r)}}function Fu(e,t,n){try{var a=e.stateNode;QT(a,e.type,n,t),a[sn]=t}catch(r){je(e,e.return,r)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$a(e.type)||e.tag===4}function Zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ud(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dc));else if(a!==4&&(a===27&&$a(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ud(e,t,n),e=e.sibling;e!==null;)Ud(e,t,n),e=e.sibling}function Ho(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&$a(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}function eb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);zt(t,a,n),t[qt]=e,t[sn]=n}catch(i){je(e,e.return,i)}}var sa=!1,ut=!1,$u=!1,Bg=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function RT(e,t){if(e=e.containerInfo,Yd=$o,e=qv(e),df(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch(v){n=null;break e}var s=0,l=-1,o=-1,c=0,u=0,p=e,f=null;t:for(;;){for(var d;p!==n||r!==0&&p.nodeType!==3||(l=s+r),p!==i||a!==0&&p.nodeType!==3||(o=s+a),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===n&&++c===r&&(l=s),f===i&&++u===a&&(o=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}n=l===-1||o===-1?null:{start:l,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},$o=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,r=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var E=Sr(n.type,r,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(E,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(v){je(n,n.return,v)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Qd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(M(163))}if(e=t.sibling,e!==null){e.return=t.return,Nt=e;break}Nt=t.return}}function tb(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:wa(e,n),a&4&&nl(5,n);break;case 1:if(wa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){je(n,n.return,s)}else{var r=Sr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){je(n,n.return,s)}}a&64&&$y(n),a&512&&Ts(n,n.return);break;case 3:if(wa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ny(e,t)}catch(s){je(n,n.return,s)}}break;case 27:t===null&&a&4&&eb(n);case 26:case 5:wa(e,n),t===null&&a&4&&Ky(n),a&512&&Ts(n,n.return);break;case 12:wa(e,n);break;case 13:wa(e,n),a&4&&rb(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=BT.bind(null,n),ew(e,n))));break;case 22:if(a=n.memoizedState!==null||sa,!a){t=t!==null&&t.memoizedState!==null||ut,r=sa;var i=ut;sa=a,(ut=t)&&!i?Aa(e,n,(n.subtreeFlags&8772)!==0):wa(e,n),sa=r,ut=i}break;case 30:break;default:wa(e,n)}}function nb(e){var t=e.alternate;t!==null&&(e.alternate=null,nb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,an=!1;function ia(e,t,n){for(n=n.child;n!==null;)ab(e,t,n),n=n.sibling}function ab(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Gs,n)}catch(i){}switch(n.tag){case 26:ut||Fn(n,t),ia(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||Fn(n,t);var a=Ke,r=an;$a(n.type)&&(Ke=n.stateNode,an=!1),ia(e,t,n),Rs(n.stateNode),Ke=a,an=r;break;case 5:ut||Fn(n,t);case 6:if(a=Ke,r=an,Ke=null,ia(e,t,n),Ke=a,an=r,Ke!==null)if(an)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(i){je(n,t,i)}else try{Ke.removeChild(n.stateNode)}catch(i){je(n,t,i)}break;case 18:Ke!==null&&(an?(e=Ke,Kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Is(e)):Kg(Ke,n.stateNode));break;case 4:a=Ke,r=an,Ke=n.stateNode.containerInfo,an=!0,ia(e,t,n),Ke=a,an=r;break;case 0:case 11:case 14:case 15:ut||Qa(2,n,t),ut||Qa(4,n,t),ia(e,t,n);break;case 1:ut||(Fn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Jy(n,t,a)),ia(e,t,n);break;case 21:ia(e,t,n);break;case 22:ut=(a=ut)||n.memoizedState!==null,ia(e,t,n),ut=a;break;default:ia(e,t,n)}}function rb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Is(e)}catch(n){je(t,t.return,n)}}function _T(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bg),t;default:throw Error(M(435,e.tag))}}function Ju(e,t){var n=_T(e);t.forEach(function(a){var r=VT.bind(null,e,a);n.has(a)||(n.add(a),a.then(r,r))})}function pn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 27:if($a(l.type)){Ke=l.stateNode,an=!1;break e}break;case 5:Ke=l.stateNode,an=!1;break e;case 3:case 4:Ke=l.stateNode.containerInfo,an=!0;break e}l=l.return}if(Ke===null)throw Error(M(160));ab(i,s,r),Ke=null,an=!1,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ib(t,e),t=t.sibling}var Hn=null;function ib(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),mn(e),a&4&&(Qa(3,e,e.return),nl(3,e),Qa(5,e,e.return));break;case 1:pn(t,e),mn(e),a&512&&(ut||n===null||Fn(n,n.return)),a&64&&sa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=Hn;if(pn(t,e),mn(e),a&512&&(ut||n===null||Fn(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":i=r.getElementsByTagName("title")[0],(!i||i[Fs]||i[qt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=r.createElement(a),r.head.insertBefore(i,r.querySelector("head > title"))),zt(i,a,n),i[qt]=e,Et(i),a=i;break e;case"link":var s=av("link","href",r).get(a+(n.href||""));if(s){for(var l=0;l<s.length;l++)if(i=s[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(l,1);break t}}i=r.createElement(a),zt(i,a,n),r.head.appendChild(i);break;case"meta":if(s=av("meta","content",r).get(a+(n.content||""))){for(l=0;l<s.length;l++)if(i=s[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(l,1);break t}}i=r.createElement(a),zt(i,a,n),r.head.appendChild(i);break;default:throw Error(M(468,a))}i[qt]=e,Et(i),a=i}e.stateNode=a}else rv(r,e.type,e.stateNode);else e.stateNode=nv(r,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?rv(r,e.type,e.stateNode):nv(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Fu(e,e.memoizedProps,n.memoizedProps)}break;case 27:pn(t,e),mn(e),a&512&&(ut||n===null||Fn(n,n.return)),n!==null&&a&4&&Fu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pn(t,e),mn(e),a&512&&(ut||n===null||Fn(n,n.return)),e.flags&32){r=e.stateNode;try{xi(r,"")}catch(d){je(e,e.return,d)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Fu(e,r,n!==null?n.memoizedProps:r)),a&1024&&($u=!0);break;case 6:if(pn(t,e),mn(e),a&4){if(e.stateNode===null)throw Error(M(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(d){je(e,e.return,d)}}break;case 3:if(xo=null,r=Hn,Hn=Qo(t.containerInfo),pn(t,e),Hn=r,mn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Is(t.containerInfo)}catch(d){je(e,e.return,d)}$u&&($u=!1,sb(e));break;case 4:a=Hn,Hn=Qo(e.stateNode.containerInfo),pn(t,e),mn(e),Hn=a;break;case 12:pn(t,e),mn(e);break;case 13:pn(t,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Bf=$n()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 22:r=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,c=sa,u=ut;if(sa=c||r,ut=u||o,pn(t,e),ut=u,sa=c,mn(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||o||sa||ut||ur(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(i=o.stateNode,r)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{l=o.stateNode;var p=o.memoizedProps.style,f=p!=null&&p.hasOwnProperty("display")?p.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(d){je(o,o.return,d)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=r?"":o.memoizedProps}catch(d){je(o,o.return,d)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Ju(e,n))));break;case 19:pn(t,e),mn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 30:break;case 21:break;default:pn(t,e),mn(e)}}function mn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Wy(a)){n=a;break}a=a.return}if(n==null)throw Error(M(160));switch(n.tag){case 27:var r=n.stateNode,i=Zu(e);Ho(e,i,r);break;case 5:var s=n.stateNode;n.flags&32&&(xi(s,""),n.flags&=-33);var l=Zu(e);Ho(e,l,s);break;case 3:case 4:var o=n.stateNode.containerInfo,c=Zu(e);Ud(e,c,o);break;default:throw Error(M(161))}}catch(u){je(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tb(e,t.alternate,t),t=t.sibling}function ur(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qa(4,t,t.return),ur(t);break;case 1:Fn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Jy(t,t.return,n),ur(t);break;case 27:Rs(t.stateNode);case 26:case 5:Fn(t,t.return),ur(t);break;case 22:t.memoizedState===null&&ur(t);break;case 30:ur(t);break;default:ur(t)}e=e.sibling}}function Aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Aa(r,i,n),nl(4,i);break;case 1:if(Aa(r,i,n),a=i,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(c){je(a,a.return,c)}if(a=i,r=a.updateQueue,r!==null){var l=a.stateNode;try{var o=r.shared.hiddenCallbacks;if(o!==null)for(r.shared.hiddenCallbacks=null,r=0;r<o.length;r++)ty(o[r],l)}catch(c){je(a,a.return,c)}}n&&s&64&&$y(i),Ts(i,i.return);break;case 27:eb(i);case 26:case 5:Aa(r,i,n),n&&a===null&&s&4&&Ky(i),Ts(i,i.return);break;case 12:Aa(r,i,n);break;case 13:Aa(r,i,n),n&&s&4&&rb(r,i);break;case 22:i.memoizedState===null&&Aa(r,i,n),Ts(i,i.return);break;case 30:break;default:Aa(r,i,n)}t=t.sibling}}function zf(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ks(n))}function Mf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e))}function Xn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lb(e,t,n,a),t=t.sibling}function lb(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,n,a),r&2048&&nl(9,t);break;case 1:Xn(e,t,n,a);break;case 3:Xn(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e)));break;case 12:if(r&2048){Xn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,l=i.onPostCommit;typeof l=="function"&&l(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){je(t,t.return,o)}}else Xn(e,t,n,a);break;case 13:Xn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?Xn(e,t,n,a):ws(e,t):i._visibility&2?Xn(e,t,n,a):(i._visibility|=2,$r(e,t,n,a,(t.subtreeFlags&10256)!==0)),r&2048&&zf(s,t);break;case 24:Xn(e,t,n,a),r&2048&&Mf(t.alternate,t);break;default:Xn(e,t,n,a)}}function $r(e,t,n,a,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,s=t,l=n,o=a,c=s.flags;switch(s.tag){case 0:case 11:case 15:$r(i,s,l,o,r),nl(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?$r(i,s,l,o,r):ws(i,s):(u._visibility|=2,$r(i,s,l,o,r)),r&&c&2048&&zf(s.alternate,s);break;case 24:$r(i,s,l,o,r),r&&c&2048&&Mf(s.alternate,s);break;default:$r(i,s,l,o,r)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:ws(n,a),r&2048&&zf(a.alternate,a);break;case 24:ws(n,a),r&2048&&Mf(a.alternate,a);break;default:ws(n,a)}t=t.sibling}}var hs=8192;function Qr(e){if(e.subtreeFlags&hs)for(e=e.child;e!==null;)ob(e),e=e.sibling}function ob(e){switch(e.tag){case 26:Qr(e),e.flags&hs&&e.memoizedState!==null&&pw(Hn,e.memoizedState,e.memoizedProps);break;case 5:Qr(e);break;case 3:case 4:var t=Hn;Hn=Qo(e.stateNode.containerInfo),Qr(e),Hn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=hs,hs=16777216,Qr(e),hs=t):Qr(e));break;default:Qr(e)}}function cb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Nt=a,db(a,e)}cb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ub(e),e=e.sibling}function ub(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,yo(e)):cs(e);break;default:cs(e)}}function yo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Nt=a,db(a,e)}cb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qa(8,t,t.return),yo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,yo(t));break;default:yo(t)}e=e.sibling}}function db(e,t){for(;Nt!==null;){var n=Nt;switch(n.tag){case 0:case 11:case 15:Qa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ks(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Nt=a;else e:for(n=e;Nt!==null;){a=Nt;var r=a.sibling,i=a.return;if(nb(a),a===n){Nt=null;break e}if(r!==null){r.return=i,Nt=r;break e}Nt=i}}}var DT={getCacheForType:function(e){var t=jt(yt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},OT=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ye=null,Se=null,Te=0,Oe=0,hn=null,Ua=!1,Oi=!1,Uf=!1,va=0,it=0,Fa=0,gr=0,Pf=0,Ln=0,Ti=0,As=null,rn=null,Pd=!1,Bf=0,qo=1/0,jo=null,qa=null,Lt=0,ja=null,wi=null,vi=0,Bd=0,Vd=null,fb=null,Cs=0,Hd=null;function bn(){if((Le&2)!==0&&Te!==0)return Te&-Te;if(ue.T!==null){var e=Si;return e!==0?e:Hf()}return Ev()}function pb(){Ln===0&&(Ln=(Te&536870912)===0||Ce?bv():536870912);var e=zn.current;return e!==null&&(e.flags|=32),Ln}function xn(e,t,n){(e===Ye&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Ai(e,0),Pa(e,Te,Ln,!1)),Qs(e,n),((Le&2)===0||e!==Ye)&&(e===Ye&&((Le&2)===0&&(gr|=n),it===4&&Pa(e,Te,Ln,!1)),Wn(e))}function mb(e,t,n){if((Le&6)!==0)throw Error(M(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Xs(e,t),r=a?MT(e,t):Ku(e,t,!0),i=a;do{if(r===0){Oi&&!a&&Pa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!LT(n)){r=Ku(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var l=e;r=As;var o=l.current.memoizedState.isDehydrated;if(o&&(Ai(l,s).flags|=256),s=Ku(l,s,!1),s!==2){if(Uf&&!o){l.errorRecoveryDisabledLanes|=i,gr|=i,r=4;break e}i=rn,rn=r,i!==null&&(rn===null?rn=i:rn.push.apply(rn,i))}r=s}if(i=!1,r!==2)continue}}if(r===1){Ai(e,0),Pa(e,t,0,!0);break}e:{switch(a=e,i=r,i){case 0:case 1:throw Error(M(345));case 4:if((t&4194048)!==t)break;case 6:Pa(a,t,Ln,!Ua);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(M(329))}if((t&62914560)===t&&(r=Bf+300-$n(),10<r)){if(Pa(a,t,Ln,!Ua),Ko(a,0,!0)!==0)break e;a.timeoutHandle=Lb(Vg.bind(null,a,n,rn,jo,Pd,t,Ln,gr,Ti,Ua,i,2,-0,0),r);break e}Vg(a,n,rn,jo,Pd,t,Ln,gr,Ti,Ua,i,0,-0,0)}}break}while(!0);Wn(e)}function Vg(e,t,n,a,r,i,s,l,o,c,u,p,f,d){if(e.timeoutHandle=-1,p=t.subtreeFlags,(p&8192||(p&16785408)===16785408)&&(Vs={stylesheets:null,count:0,unsuspend:fw},ob(t),p=mw(),p!==null)){e.cancelPendingCommit=p(qg.bind(null,e,t,i,n,a,r,s,l,o,u,1,f,d)),Pa(e,i,s,!c);return}qg(e,t,i,n,a,r,s,l,o)}function LT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var r=n[a],i=r.getSnapshot;r=r.value;try{if(!Sn(i(),r))return!1}catch(s){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 Pa(e,t,n,a){t&=~Pf,t&=~gr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var i=31-yn(r),s=1<<i;a[i]=-1,r&=~s}n!==0&&Sv(e,n,t)}function oc(){return(Le&6)===0?(al(0,!1),!1):!0}function Vf(){if(Se!==null){if(Oe===0)var e=Se.return;else e=Se,ua=Tr=null,Tf(e),gi=null,Us=0,e=Se;for(;e!==null;)Zy(e.alternate,e),e=e.return;Se=null}}function Ai(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ZT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Vf(),Ye=e,Se=n=fa(e.current,null),Te=t,Oe=0,hn=null,Ua=!1,Oi=Xs(e,t),Uf=!1,Ti=Ln=Pf=gr=Fa=it=0,rn=As=null,Pd=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-yn(a),i=1<<r;t|=e[r],a&=~i}return va=t,nc(),n}function hb(e,t){ye=null,ue.H=Mo,t===Ws||t===rc?(t=vg(),Oe=3):t===Wv?(t=vg(),Oe=4):Oe=t===Iy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,Se===null&&(it=1,Bo(e,On(t,e.current)))}function gb(){var e=ue.H;return ue.H=Mo,e===null?Mo:e}function vb(){var e=ue.A;return ue.A=DT,e}function qd(){it=4,Ua||(Te&4194048)!==Te&&zn.current!==null||(Oi=!0),(Fa&134217727)===0&&(gr&134217727)===0||Ye===null||Pa(Ye,Te,Ln,!1)}function Ku(e,t,n){var a=Le;Le|=2;var r=gb(),i=vb();(Ye!==e||Te!==t)&&(jo=null,Ai(e,t)),t=!1;var s=it;e:do try{if(Oe!==0&&Se!==null){var l=Se,o=hn;switch(Oe){case 8:Vf(),s=6;break e;case 3:case 2:case 9:case 6:zn.current===null&&(t=!0);var c=Oe;if(Oe=0,hn=null,ci(e,l,o,c),n&&Oi){s=0;break e}break;default:c=Oe,Oe=0,hn=null,ci(e,l,o,c)}}zT(),s=it;break}catch(u){hb(e,u)}while(!0);return t&&e.shellSuspendCounter++,ua=Tr=null,Le=a,ue.H=r,ue.A=i,Se===null&&(Ye=null,Te=0,nc()),s}function zT(){for(;Se!==null;)yb(Se)}function MT(e,t){var n=Le;Le|=2;var a=gb(),r=vb();Ye!==e||Te!==t?(jo=null,qo=$n()+500,Ai(e,t)):Oi=Xs(e,t);e:do try{if(Oe!==0&&Se!==null){t=Se;var i=hn;t:switch(Oe){case 1:Oe=0,hn=null,ci(e,t,i,1);break;case 2:case 9:if(gg(i)){Oe=0,hn=null,Hg(t);break}t=function(){Oe!==2&&Oe!==9||Ye!==e||(Oe=7),Wn(e)},i.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:gg(i)?(Oe=0,hn=null,Hg(t)):(Oe=0,hn=null,ci(e,t,i,7));break;case 5:var s=null;switch(Se.tag){case 26:s=Se.memoizedState;case 5:case 27:var l=Se;if(!s||Pb(s)){Oe=0,hn=null;var o=l.sibling;if(o!==null)Se=o;else{var c=l.return;c!==null?(Se=c,cc(c)):Se=null}break t}}Oe=0,hn=null,ci(e,t,i,5);break;case 6:Oe=0,hn=null,ci(e,t,i,6);break;case 8:Vf(),it=6;break e;default:throw Error(M(462))}}UT();break}catch(u){hb(e,u)}while(!0);return ua=Tr=null,ue.H=a,ue.A=r,Le=n,Se!==null?0:(Ye=null,Te=0,nc(),it)}function UT(){for(;Se!==null&&!rk();)yb(Se)}function yb(e){var t=Fy(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function Hg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Lg(n,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Lg(n,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:Tf(t);default:Zy(n,t),t=Se=Zv(t,va),t=Fy(n,t,va)}e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function ci(e,t,n,a){ua=Tr=null,Tf(t),gi=null,Us=0;var r=t.return;try{if(TT(e,r,t,n,Te)){it=1,Bo(e,On(n,e.current)),Se=null;return}}catch(i){if(r!==null)throw Se=r,i;it=1,Bo(e,On(n,e.current)),Se=null;return}t.flags&32768?(Ce||a===1?e=!0:Oi||(Te&536870912)!==0?e=!1:(Ua=e=!0,(a===2||a===9||a===3||a===6)&&(a=zn.current,a!==null&&a.tag===13&&(a.flags|=16384))),bb(t,e)):cc(t)}function cc(e){var t=e;do{if((t.flags&32768)!==0){bb(t,Ua);return}e=t.return;var n=AT(t.alternate,t,va);if(n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);it===0&&(it=5)}function bb(e,t){do{var n=CT(e.alternate,e);if(n!==null){n.flags&=32767,Se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=n}while(e!==null);it=6,Se=null}function qg(e,t,n,a,r,i,s,l,o){e.cancelPendingCommit=null;do uc();while(Lt!==0);if((Le&6)!==0)throw Error(M(327));if(t!==null){if(t===e.current)throw Error(M(177));if(i=t.lanes|t.childLanes,i|=ff,mk(e,n,i,s,l,o),e===Ye&&(Se=Ye=null,Te=0),wi=t,ja=e,vi=n,Bd=i,Vd=r,fb=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,HT(To,function(){return kb(!0),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ue.T,ue.T=null,r=Re.p,Re.p=2,s=Le,Le|=4;try{RT(e,t,n)}finally{Le=s,Re.p=r,ue.T=a}}Lt=1,xb(),Sb(),Nb()}}function xb(){if(Lt===1){Lt=0;var e=ja,t=wi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var a=Re.p;Re.p=2;var r=Le;Le|=4;try{ib(t,e);var i=Gd,s=qv(e.containerInfo),l=i.focusedElem,o=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&Hv(l.ownerDocument.documentElement,l)){if(o!==null&&df(l)){var c=o.start,u=o.end;if(u===void 0&&(u=c),"selectionStart"in l)l.selectionStart=c,l.selectionEnd=Math.min(u,l.value.length);else{var p=l.ownerDocument||document,f=p&&p.defaultView||window;if(f.getSelection){var d=f.getSelection(),E=l.textContent.length,v=Math.min(o.start,E),k=o.end===void 0?v:Math.min(o.end,E);!d.extend&&v>k&&(s=k,k=v,v=s);var m=og(l,v),h=og(l,k);if(m&&h&&(d.rangeCount!==1||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==h.node||d.focusOffset!==h.offset)){var g=p.createRange();g.setStart(m.node,m.offset),d.removeAllRanges(),v>k?(d.addRange(g),d.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),d.addRange(g))}}}}for(p=[],d=l;d=d.parentNode;)d.nodeType===1&&p.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<p.length;l++){var x=p[l];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}$o=!!Yd,Gd=Yd=null}finally{Le=r,Re.p=a,ue.T=n}}e.current=t,Lt=2}}function Sb(){if(Lt===2){Lt=0;var e=ja,t=wi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var a=Re.p;Re.p=2;var r=Le;Le|=4;try{tb(e,t.alternate,t)}finally{Le=r,Re.p=a,ue.T=n}}Lt=3}}function Nb(){if(Lt===4||Lt===3){Lt=0,ik();var e=ja,t=wi,n=vi,a=fb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,wi=ja=null,Eb(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(qa=null),af(n),t=t.stateNode,vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Gs,t,void 0,(t.current.flags&128)===128)}catch(o){}if(a!==null){t=ue.T,r=Re.p,Re.p=2,ue.T=null;try{for(var i=e.onRecoverableError,s=0;s<a.length;s++){var l=a[s];i(l.value,{componentStack:l.stack})}}finally{ue.T=t,Re.p=r}}(vi&3)!==0&&uc(),Wn(e),r=e.pendingLanes,(n&4194090)!==0&&(r&42)!==0?e===Hd?Cs++:(Cs=0,Hd=e):Cs=0,al(0,!1)}}function Eb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ks(t)))}function uc(e){return xb(),Sb(),Nb(),kb(e)}function kb(){if(Lt!==5)return!1;var e=ja,t=Bd;Bd=0;var n=af(vi),a=ue.T,r=Re.p;try{Re.p=32>n?32:n,ue.T=null,n=Vd,Vd=null;var i=ja,s=vi;if(Lt=0,wi=ja=null,vi=0,(Le&6)!==0)throw Error(M(331));var l=Le;if(Le|=4,ub(i.current),lb(i,i.current,s,n),Le=l,al(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Gs,i)}catch(o){}return!0}finally{Re.p=r,ue.T=a,Eb(e,t)}}function jg(e,t,n){t=On(n,t),t=Ld(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Qs(e,2),Wn(e))}function je(e,t,n){if(e.tag===3)jg(e,e,n);else for(;t!==null;){if(t.tag===3){jg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(qa===null||!qa.has(a))){e=On(n,e),n=qy(2),a=Ha(t,n,2),a!==null&&(jy(n,a,t,e),Qs(a,2),Wn(a));break}}t=t.return}}function Wu(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new OT;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Uf=!0,r.add(n),e=PT.bind(null,e,t,n),t.then(e,e))}function PT(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Te&n)===n&&(it===4||it===3&&(Te&62914560)===Te&&300>$n()-Bf?(Le&2)===0&&Ai(e,0):Pf|=n,Ti===Te&&(Ti=0)),Wn(e)}function Tb(e,t){t===0&&(t=xv()),e=Di(e,t),e!==null&&(Qs(e,t),Wn(e))}function BT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tb(e,n)}function VT(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(M(314))}a!==null&&a.delete(t),Tb(e,n)}function HT(e,t){return tf(e,t)}var Io=null,Jr=null,jd=!1,Yo=!1,ed=!1,vr=0;function Wn(e){e!==Jr&&e.next===null&&(Jr===null?Io=Jr=e:Jr=Jr.next=e),Yo=!0,jd||(jd=!0,jT())}function al(e,t){if(!ed&&Yo){ed=!0;do for(var n=!1,a=Io;a!==null;){if(!t)if(e!==0){var r=a.pendingLanes;if(r===0)var i=0;else{var s=a.suspendedLanes,l=a.pingedLanes;i=(1<<31-yn(42|e)+1)-1,i&=r&~(s&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Ig(a,i))}else i=Te,i=Ko(a,a===Ye?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Xs(a,i)||(n=!0,Ig(a,i));a=a.next}while(n);ed=!1}}function qT(){wb()}function wb(){Yo=jd=!1;var e=0;vr!==0&&(FT()&&(e=vr),vr=0);for(var t=$n(),n=null,a=Io;a!==null;){var r=a.next,i=Ab(a,t);i===0?(a.next=null,n===null?Io=r:n.next=r,r===null&&(Jr=n)):(n=a,(e!==0||(i&3)!==0)&&(Yo=!0)),a=r}al(e,!1)}function Ab(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-yn(i),l=1<<s,o=r[s];o===-1?((l&n)===0||(l&a)!==0)&&(r[s]=pk(l,t)):o<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ye,n=Te,n=Ko(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Au(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Xs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Au(a),af(n)){case 2:case 8:n=vv;break;case 32:n=To;break;case 268435456:n=yv;break;default:n=To}return a=Cb.bind(null,e),n=tf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Au(a),e.callbackPriority=2,e.callbackNode=null,2}function Cb(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uc(!0)&&e.callbackNode!==n)return null;var a=Te;return a=Ko(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(mb(e,a,t),Ab(e,$n()),e.callbackNode!=null&&e.callbackNode===n?Cb.bind(null,e):null)}function Ig(e,t){if(uc())return null;mb(e,t,!0)}function jT(){$T(function(){(Le&6)!==0?tf(gv,qT):wb()})}function Hf(){return vr===0&&(vr=bv()),vr}function Yg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:co(""+e)}function Gg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function IT(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var i=Yg((r[sn]||null).action),s=a.submitter;s&&(t=(t=s[sn]||null)?Yg(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var l=new Wo("action","action",null,a,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(vr!==0){var o=s?Gg(r,s):new FormData(r);Dd(n,{pending:!0,data:o,method:r.method,action:i},null,o)}}else typeof i=="function"&&(l.preventDefault(),o=s?Gg(r,s):new FormData(r),Dd(n,{pending:!0,data:o,method:r.method,action:i},i,o))},currentTarget:r}]})}}for(ao=0;ao<bd.length;ao++)ro=bd[ao],Xg=ro.toLowerCase(),Qg=ro[0].toUpperCase()+ro.slice(1),jn(Xg,"on"+Qg);var ro,Xg,Qg,ao;jn(Iv,"onAnimationEnd");jn(Yv,"onAnimationIteration");jn(Gv,"onAnimationStart");jn("dblclick","onDoubleClick");jn("focusin","onFocus");jn("focusout","onBlur");jn(oT,"onTransitionRun");jn(cT,"onTransitionStart");jn(uT,"onTransitionCancel");jn(Xv,"onTransitionEnd");bi("onMouseEnter",["mouseout","mouseover"]);bi("onMouseLeave",["mouseout","mouseover"]);bi("onPointerEnter",["pointerout","pointerover"]);bi("onPointerLeave",["pointerout","pointerover"]);Nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),YT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Rb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var s=a.length-1;0<=s;s--){var l=a[s],o=l.instance,c=l.currentTarget;if(l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}else for(s=0;s<a.length;s++){if(l=a[s],o=l.instance,c=l.currentTarget,l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}}}}function xe(e,t){var n=t[fd];n===void 0&&(n=t[fd]=new Set);var a=e+"__bubble";n.has(a)||(_b(t,e,2,!1),n.add(a))}function td(e,t,n){var a=0;t&&(a|=4),_b(n,e,a,t)}var io="_reactListening"+Math.random().toString(36).slice(2);function qf(e){if(!e[io]){e[io]=!0,kv.forEach(function(n){n!=="selectionchange"&&(YT.has(n)||td(n,!1,e),td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[io]||(t[io]=!0,td("selectionchange",!1,t))}}function _b(e,t,n,a){switch(jb(t)){case 2:var r=vw;break;case 8:r=yw;break;default:r=Gf}n=r.bind(null,t,n,e),r=void 0,!gd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function nd(e,t,n,a,r){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var l=a.stateNode.containerInfo;if(l===r)break;if(s===4)for(s=a.return;s!==null;){var o=s.tag;if((o===3||o===4)&&s.stateNode.containerInfo===r)return;s=s.return}for(;l!==null;){if(s=ei(l),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){a=i=s;continue e}l=l.parentNode}}a=a.return}Ov(function(){var c=i,u=lf(n),p=[];e:{var f=Qv.get(e);if(f!==void 0){var d=Wo,E=e;switch(e){case"keypress":if(fo(n)===0)break e;case"keydown":case"keyup":d=Hk;break;case"focusin":E="focus",d=Mu;break;case"focusout":E="blur",d=Mu;break;case"beforeblur":case"afterblur":d=Mu;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":d=Wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Ik;break;case Iv:case Yv:case Gv:d=Dk;break;case Xv:d=Gk;break;case"scroll":case"scrollend":d=wk;break;case"wheel":d=Qk;break;case"copy":case"cut":case"paste":d=Lk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=tg;break;case"toggle":case"beforetoggle":d=Zk}var v=(t&4)!==0,k=!v&&(e==="scroll"||e==="scrollend"),m=v?f!==null?f+"Capture":null:f;v=[];for(var h=c,g;h!==null;){var x=h;if(g=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||g===null||m===null||(x=Ds(h,m),x!=null&&v.push(Bs(h,x,g))),k)break;h=h.return}0<v.length&&(f=new d(f,E,null,n,u),p.push({event:f,listeners:v}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&n!==hd&&(E=n.relatedTarget||n.fromElement)&&(ei(E)||E[Ri]))break e;if((d||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,d?(E=n.relatedTarget||n.toElement,d=c,E=E?ei(E):null,E!==null&&(k=Ys(E),v=E.tag,E!==k||v!==5&&v!==27&&v!==6)&&(E=null)):(d=null,E=c),d!==E)){if(v=Wh,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=tg,x="onPointerLeave",m="onPointerEnter",h="pointer"),k=d==null?f:ms(d),g=E==null?f:ms(E),f=new v(x,h+"leave",d,n,u),f.target=k,f.relatedTarget=g,x=null,ei(u)===c&&(v=new v(m,h+"enter",E,n,u),v.target=g,v.relatedTarget=k,x=v),k=x,d&&E)t:{for(v=d,m=E,h=0,g=v;g;g=Fr(g))h++;for(g=0,x=m;x;x=Fr(x))g++;for(;0<h-g;)v=Fr(v),h--;for(;0<g-h;)m=Fr(m),g--;for(;h--;){if(v===m||m!==null&&v===m.alternate)break t;v=Fr(v),m=Fr(m)}v=null}else v=null;d!==null&&Fg(p,f,d,v,!1),E!==null&&k!==null&&Fg(p,k,E,v,!0)}}e:{if(f=c?ms(c):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var w=ig;else if(rg(f))if(Bv)w=iT;else{w=aT;var N=nT}else d=f.nodeName,!d||d.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&sf(c.elementType)&&(w=ig):w=rT;if(w&&(w=w(e,c))){Pv(p,w,n,u);break e}N&&N(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&md(f,"number",f.value)}switch(N=c?ms(c):window,e){case"focusin":(rg(N)||N.contentEditable==="true")&&(ai=N,vd=c,ys=null);break;case"focusout":ys=vd=ai=null;break;case"mousedown":yd=!0;break;case"contextmenu":case"mouseup":case"dragend":yd=!1,cg(p,n,u);break;case"selectionchange":if(lT)break;case"keydown":case"keyup":cg(p,n,u)}var T;if(uf)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else ni?Mv(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(zv&&n.locale!=="ko"&&(ni||A!=="onCompositionStart"?A==="onCompositionEnd"&&ni&&(T=Lv()):(Ma=u,of="value"in Ma?Ma.value:Ma.textContent,ni=!0)),N=Go(c,A),0<N.length&&(A=new eg(A,e,null,n,u),p.push({event:A,listeners:N}),T?A.data=T:(T=Uv(n),T!==null&&(A.data=T)))),(T=Jk?Kk(e,n):Wk(e,n))&&(A=Go(c,"onBeforeInput"),0<A.length&&(N=new eg("onBeforeInput","beforeinput",null,n,u),p.push({event:N,listeners:A}),N.data=T)),IT(p,e,c,n,u)}Rb(p,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Go(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Ds(e,n),r!=null&&a.unshift(Bs(e,r,i)),r=Ds(e,t),r!=null&&a.push(Bs(e,r,i))),e.tag===3)return a;e=e.return}return[]}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fg(e,t,n,a,r){for(var i=t._reactName,s=[];n!==null&&n!==a;){var l=n,o=l.alternate,c=l.stateNode;if(l=l.tag,o!==null&&o===a)break;l!==5&&l!==26&&l!==27||c===null||(o=c,r?(c=Ds(n,i),c!=null&&s.unshift(Bs(n,c,o))):r||(c=Ds(n,i),c!=null&&s.push(Bs(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var GT=/\r\n?/g,XT=/\u0000|\uFFFD/g;function Zg(e){return(typeof e=="string"?e:""+e).replace(GT,`
|
|
9
|
+
`).replace(XT,"")}function Db(e,t){return t=Zg(t),Zg(e)===t}function dc(){}function Pe(e,t,n,a,r,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||xi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&xi(e,""+a);break;case"className":Fl(e,"class",a);break;case"tabIndex":Fl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(e,n,a);break;case"style":Dv(e,a,i);break;case"data":if(t!=="object"){Fl(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=co(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",r.name,r,null),Pe(e,t,"formEncType",r.formEncType,r,null),Pe(e,t,"formMethod",r.formMethod,r,null),Pe(e,t,"formTarget",r.formTarget,r,null)):(Pe(e,t,"encType",r.encType,r,null),Pe(e,t,"method",r.method,r,null),Pe(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=co(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=dc);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=co(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":xe("beforetoggle",e),xe("toggle",e),oo(e,"popover",a);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=kk.get(n)||n,oo(e,n,a))}}function Id(e,t,n,a,r,i){switch(n){case"style":Dv(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"children":typeof a=="string"?xi(e,a):(typeof a=="number"||typeof a=="bigint")&&xi(e,""+a);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=dc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),i=e[sn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):oo(e,n,a)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var a=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,i,s,n,null)}}r&&Pe(e,t,"srcSet",n.srcSet,n,null),a&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var l=i=s=r=null,o=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var u=n[a];if(u!=null)switch(a){case"name":r=u;break;case"type":s=u;break;case"checked":o=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":l=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(M(137,t));break;default:Pe(e,t,a,u,n,null)}}Cv(e,i,l,o,c,s,r,!1),wo(e);return;case"select":xe("invalid",e),a=s=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":a=l;default:Pe(e,t,r,l,n,null)}t=i,n=s,e.multiple=!!a,t!=null?di(e,!!a,t,!1):n!=null&&di(e,!!a,n,!0);return;case"textarea":xe("invalid",e),i=r=a=null;for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"value":a=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(M(91));break;default:Pe(e,t,s,l,n,null)}_v(e,a,r,i),wo(e);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Pe(e,t,o,a,n,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(a=0;a<Ps.length;a++)xe(Ps[a],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,c,a,n,null)}return;default:if(sf(t)){for(u in n)n.hasOwnProperty(u)&&(a=n[u],a!==void 0&&Id(e,t,u,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(a=n[l],a!=null&&Pe(e,t,l,a,n,null))}function QT(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,s=null,l=null,o=null,c=null,u=null;for(d in n){var p=n[d];if(n.hasOwnProperty(d)&&p!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":o=p;default:a.hasOwnProperty(d)||Pe(e,t,d,null,a,p)}}for(var f in a){var d=a[f];if(p=n[f],a.hasOwnProperty(f)&&(d!=null||p!=null))switch(f){case"type":i=d;break;case"name":r=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(M(137,t));break;default:d!==p&&Pe(e,t,f,d,a,p)}}pd(e,s,l,o,c,u,i,r);return;case"select":d=s=l=f=null;for(i in n)if(o=n[i],n.hasOwnProperty(i)&&o!=null)switch(i){case"value":break;case"multiple":d=o;default:a.hasOwnProperty(i)||Pe(e,t,i,null,a,o)}for(r in a)if(i=a[r],o=n[r],a.hasOwnProperty(r)&&(i!=null||o!=null))switch(r){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":s=i;default:i!==o&&Pe(e,t,r,i,a,o)}t=l,n=s,a=d,f!=null?di(e,!!n,f,!1):!!a!=!!n&&(t!=null?di(e,!!n,t,!0):di(e,!!n,n?[]:"",!1));return;case"textarea":d=f=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!a.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Pe(e,t,l,null,a,r)}for(s in a)if(r=a[s],i=n[s],a.hasOwnProperty(s)&&(r!=null||i!=null))switch(s){case"value":f=r;break;case"defaultValue":d=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(M(91));break;default:r!==i&&Pe(e,t,s,r,a,i)}Rv(e,f,d);return;case"option":for(var E in n)if(f=n[E],n.hasOwnProperty(E)&&f!=null&&!a.hasOwnProperty(E))switch(E){case"selected":e.selected=!1;break;default:Pe(e,t,E,null,a,f)}for(o in a)if(f=a[o],d=n[o],a.hasOwnProperty(o)&&f!==d&&(f!=null||d!=null))switch(o){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Pe(e,t,o,f,a,d)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!a.hasOwnProperty(v)&&Pe(e,t,v,null,a,f);for(c in a)if(f=a[c],d=n[c],a.hasOwnProperty(c)&&f!==d&&(f!=null||d!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(M(137,t));break;default:Pe(e,t,c,f,a,d)}return;default:if(sf(t)){for(var k in n)f=n[k],n.hasOwnProperty(k)&&f!==void 0&&!a.hasOwnProperty(k)&&Id(e,t,k,void 0,a,f);for(u in a)f=a[u],d=n[u],!a.hasOwnProperty(u)||f===d||f===void 0&&d===void 0||Id(e,t,u,f,a,d);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!a.hasOwnProperty(m)&&Pe(e,t,m,null,a,f);for(p in a)f=a[p],d=n[p],!a.hasOwnProperty(p)||f===d||f==null&&d==null||Pe(e,t,p,f,a,d)}var Yd=null,Gd=null;function Xo(e){return e.nodeType===9?e:e.ownerDocument}function $g(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ob(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Xd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ad=null;function FT(){var e=window.event;return e&&e.type==="popstate"?e===ad?!1:(ad=e,!0):(ad=null,!1)}var Lb=typeof setTimeout=="function"?setTimeout:void 0,ZT=typeof clearTimeout=="function"?clearTimeout:void 0,Jg=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof Jg!="undefined"?function(e){return Jg.resolve(null).then(e).catch(JT)}:Lb;function JT(e){setTimeout(function(){throw e})}function $a(e){return e==="head"}function Kg(e,t){var n=t,a=0,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<a&&8>a){n=a;var s=e.ownerDocument;if(n&1&&Rs(s.documentElement),n&2&&Rs(s.body),n&4)for(n=s.head,Rs(n),s=n.firstChild;s;){var l=s.nextSibling,o=s.nodeName;s[Fs]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=l}}if(r===0){e.removeChild(i),Is(t);return}r--}else n==="$"||n==="$?"||n==="$!"?r++:a=n.charCodeAt(0)-48;else a=0;n=i}while(n);Is(t)}function Qd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Qd(n),rf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function KT(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Fs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function WT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function ew(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Zd=null;function Wg(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}function zb(e,t,n){switch(t=Xo(n),e){case"html":if(e=t.documentElement,!e)throw Error(M(452));return e;case"head":if(e=t.head,!e)throw Error(M(453));return e;case"body":if(e=t.body,!e)throw Error(M(454));return e;default:throw Error(M(451))}}function Rs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rf(e)}var Mn=new Map,ev=new Set;function Qo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=Re.d;Re.d={f:tw,r:nw,D:aw,C:rw,L:iw,m:sw,X:ow,S:lw,M:cw};function tw(){var e=ya.f(),t=oc();return e||t}function nw(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?Ay(t):ya.r(e)}var Li=typeof document=="undefined"?null:document;function Mb(e,t,n){var a=Li;if(a&&typeof t=="string"&&t){var r=Dn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),ev.has(r)||(ev.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),zt(t,"link",e),Et(t),a.head.appendChild(t)))}}function aw(e){ya.D(e),Mb("dns-prefetch",e,null)}function rw(e,t){ya.C(e,t),Mb("preconnect",e,t)}function iw(e,t,n){ya.L(e,t,n);var a=Li;if(a&&e&&t){var r='link[rel="preload"][as="'+Dn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+Dn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+Dn(n.imageSizes)+'"]')):r+='[href="'+Dn(e)+'"]';var i=r;switch(t){case"style":i=Ci(e);break;case"script":i=zi(e)}Mn.has(i)||(e=Qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Mn.set(i,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(rl(i))||t==="script"&&a.querySelector(il(i))||(t=a.createElement("link"),zt(t,"link",e),Et(t),a.head.appendChild(t)))}}function sw(e,t){ya.m(e,t);var n=Li;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Dn(a)+'"][href="'+Dn(e)+'"]',i=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=zi(e)}if(!Mn.has(i)&&(e=Qe({rel:"modulepreload",href:e},t),Mn.set(i,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(il(i)))return}a=n.createElement("link"),zt(a,"link",e),Et(a),n.head.appendChild(a)}}}function lw(e,t,n){ya.S(e,t,n);var a=Li;if(a&&e){var r=ui(a).hoistableStyles,i=Ci(e);t=t||"default";var s=r.get(i);if(!s){var l={loading:0,preload:null};if(s=a.querySelector(rl(i)))l.loading=5;else{e=Qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Mn.get(i))&&jf(e,n);var o=s=a.createElement("link");Et(o),zt(o,"link",e),o._p=new Promise(function(c,u){o.onload=c,o.onerror=u}),o.addEventListener("load",function(){l.loading|=1}),o.addEventListener("error",function(){l.loading|=2}),l.loading|=4,bo(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:l},r.set(i,s)}}}function ow(e,t){ya.X(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0},t),(t=Mn.get(r))&&If(e,t),i=n.createElement("script"),Et(i),zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function cw(e,t){ya.M(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0,type:"module"},t),(t=Mn.get(r))&&If(e,t),i=n.createElement("script"),Et(i),zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function tv(e,t,n,a){var r=(r=Ba.current)?Qo(r):null;if(!r)throw Error(M(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ci(n.href),n=ui(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ci(n.href);var i=ui(r).hoistableStyles,s=i.get(e);if(s||(r=r.ownerDocument||r,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=r.querySelector(rl(e)))&&!i._p&&(s.instance=i,s.state.loading=5),Mn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Mn.set(e,n),i||uw(r,e,n,s.state))),t&&a===null)throw Error(M(528,""));return s}if(t&&a!==null)throw Error(M(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=zi(n),n=ui(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(M(444,e))}}function Ci(e){return'href="'+Dn(e)+'"'}function rl(e){return'link[rel="stylesheet"]['+e+"]"}function Ub(e){return Qe({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),zt(t,"link",n),Et(t),e.head.appendChild(t))}function zi(e){return'[src="'+Dn(e)+'"]'}function il(e){return"script[async]"+e}function nv(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Dn(n.href)+'"]');if(a)return t.instance=a,Et(a),a;var r=Qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Et(a),zt(a,"style",r),bo(a,n.precedence,e),t.instance=a;case"stylesheet":r=Ci(n.href);var i=e.querySelector(rl(r));if(i)return t.state.loading|=4,t.instance=i,Et(i),i;a=Ub(n),(r=Mn.get(r))&&jf(a,r),i=(e.ownerDocument||e).createElement("link"),Et(i);var s=i;return s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),zt(i,"link",a),t.state.loading|=4,bo(i,n.precedence,e),t.instance=i;case"script":return i=zi(n.src),(r=e.querySelector(il(i)))?(t.instance=r,Et(r),r):(a=n,(r=Mn.get(i))&&(a=Qe({},n),If(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),Et(r),zt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(M(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,bo(a,n.precedence,e));return t.instance}function bo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,i=r,s=0;s<a.length;s++){var l=a[s];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xo=null;function av(e,t,n){if(xo===null){var a=new Map,r=xo=new Map;r.set(n,a)}else r=xo,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[Fs]||i[qt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var l=a.get(s);l?l.push(i):a.set(s,[i])}}return a}function rv(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function dw(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Vs=null;function fw(){}function pw(e,t,n){if(Vs===null)throw Error(M(475));var a=Vs;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=Ci(n.href),i=e.querySelector(rl(r));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Fo.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=i,Et(i);return}i=e.ownerDocument||e,n=Ub(n),(r=Mn.get(r))&&jf(n,r),i=i.createElement("link"),Et(i);var s=i;s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),zt(i,"link",n),t.instance=i}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(a.count++,t=Fo.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function mw(){if(Vs===null)throw Error(M(475));var e=Vs;return e.stylesheets&&e.count===0&&$d(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&$d(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Fo(){if(this.count--,this.count===0){if(this.stylesheets)$d(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zo=null;function $d(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zo=new Map,t.forEach(hw,e),Zo=null,Fo.call(e))}function hw(e,t){if(!(t.state.loading&4)){var n=Zo.get(e);if(n)var a=n.get(null);else{n=new Map,Zo.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var s=r[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),a=s)}a&&n.set(null,a)}r=t.instance,s=r.getAttribute("data-precedence"),i=n.get(s)||a,i===a&&n.set(null,r),n.set(s,r),this.count++,a=Fo.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Hs={$$typeof:la,Provider:null,Consumer:null,_currentValue:dr,_currentValue2:dr,_threadCount:0};function gw(e,t,n,a,r,i,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.hiddenUpdates=Cu(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Bb(e,t,n,a,r,i,s,l,o,c,u,p){return e=new gw(e,t,n,s,l,o,c,p),t=1,i===!0&&(t|=24),i=gn(3,null,null,t),e.current=i,i.stateNode=e,t=vf(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},bf(i),e}function Vb(e){return e?(e=si,e):si}function Hb(e,t,n,a,r,i){r=Vb(r),a.context===null?a.context=r:a.pendingContext=r,a=Va(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ha(e,a,t),n!==null&&(xn(n,e,t),Ss(n,e,t))}function iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yf(e,t){iv(e,t),(e=e.alternate)&&iv(e,t)}function qb(e){if(e.tag===13){var t=Di(e,67108864);t!==null&&xn(t,e,67108864),Yf(e,67108864)}}var $o=!0;function vw(e,t,n,a){var r=ue.T;ue.T=null;var i=Re.p;try{Re.p=2,Gf(e,t,n,a)}finally{Re.p=i,ue.T=r}}function yw(e,t,n,a){var r=ue.T;ue.T=null;var i=Re.p;try{Re.p=8,Gf(e,t,n,a)}finally{Re.p=i,ue.T=r}}function Gf(e,t,n,a){if($o){var r=Jd(a);if(r===null)nd(e,t,a,Jo,n),sv(e,a);else if(xw(r,e,t,n,a))a.stopPropagation();else if(sv(e,a),t&4&&-1<bw.indexOf(e)){for(;r!==null;){var i=_i(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=or(i.pendingLanes);if(s!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;s;){var o=1<<31-yn(s);l.entanglements[1]|=o,s&=~o}Wn(i),(Le&6)===0&&(qo=$n()+500,al(0,!1))}}break;case 13:l=Di(i,2),l!==null&&xn(l,i,2),oc(),Yf(i,2)}if(i=Jd(a),i===null&&nd(e,t,a,Jo,n),i===r)break;r=i}r!==null&&a.stopPropagation()}else nd(e,t,a,null,n)}}function Jd(e){return e=lf(e),Xf(e)}var Jo=null;function Xf(e){if(Jo=null,e=ei(e),e!==null){var t=Ys(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=fv(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 Jo=e,null}function jb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sk()){case gv:return 2;case vv:return 8;case To:case lk:return 32;case yv:return 268435456;default:return 32}default:return 32}}var Kd=!1,Ia=null,Ya=null,Ga=null,qs=new Map,js=new Map,La=[],bw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sv(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function us(e,t,n,a,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[r]},t!==null&&(t=_i(t),t!==null&&qb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function xw(e,t,n,a,r){switch(t){case"focusin":return Ia=us(Ia,e,t,n,a,r),!0;case"dragenter":return Ya=us(Ya,e,t,n,a,r),!0;case"mouseover":return Ga=us(Ga,e,t,n,a,r),!0;case"pointerover":var i=r.pointerId;return qs.set(i,us(qs.get(i)||null,e,t,n,a,r)),!0;case"gotpointercapture":return i=r.pointerId,js.set(i,us(js.get(i)||null,e,t,n,a,r)),!0}return!1}function Ib(e){var t=ei(e.target);if(t!==null){var n=Ys(t);if(n!==null){if(t=n.tag,t===13){if(t=fv(n),t!==null){e.blockedOn=t,hk(e.priority,function(){if(n.tag===13){var a=bn();a=nf(a);var r=Di(n,a);r!==null&&xn(r,n,a),Yf(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function So(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);hd=a,n.target.dispatchEvent(a),hd=null}else return t=_i(n),t!==null&&qb(t),e.blockedOn=n,!1;t.shift()}return!0}function lv(e,t,n){So(e)&&n.delete(t)}function Sw(){Kd=!1,Ia!==null&&So(Ia)&&(Ia=null),Ya!==null&&So(Ya)&&(Ya=null),Ga!==null&&So(Ga)&&(Ga=null),qs.forEach(lv),js.forEach(lv)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,Sw)))}var lo=null;function ov(e){lo!==e&&(lo=e,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(Xf(a||n)===null)continue;break}var i=_i(n);i!==null&&(e.splice(t,3),t-=3,Dd(i,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function Is(e){function t(o){return so(o,e)}Ia!==null&&so(Ia,e),Ya!==null&&so(Ya,e),Ga!==null&&so(Ga,e),qs.forEach(t),js.forEach(t);for(var n=0;n<La.length;n++){var a=La[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<La.length&&(n=La[0],n.blockedOn===null);)Ib(n),n.blockedOn===null&&La.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],i=n[a+1],s=r[sn]||null;if(typeof i=="function")s||ov(n);else if(s){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,s=i[sn]||null)l=s.formAction;else if(Xf(r)!==null)continue}else l=s.action;typeof l=="function"?n[a+1]=l:(n.splice(a,3),a-=3),ov(n)}}}function Qf(e){this._internalRoot=e}fc.prototype.render=Qf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));var n=t.current,a=bn();Hb(n,a,e,t,null,null)};fc.prototype.unmount=Qf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hb(e.current,2,null,e,null,null),oc(),t[Ri]=null}};function fc(e){this._internalRoot=e}fc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ev();e={blockedOn:null,target:e,priority:t};for(var n=0;n<La.length&&t!==0&&t<La[n].priority;n++);La.splice(n,0,e),n===0&&Ib(e)}};var cv=uv.version;if(cv!=="19.1.1")throw Error(M(527,cv,"19.1.1"));Re.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=WE(t),e=e!==null?pv(e):null,e=e===null?null:e.stateNode,e};var Nw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Gs=ds.inject(Nw),vn=ds}catch(e){}var ds;pc.createRoot=function(e,t){if(!dv(e))throw Error(M(299));var n=!1,a="",r=By,i=Vy,s=Hy,l=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(l=t.unstable_transitionCallbacks)),t=Bb(e,1,!1,null,null,n,a,r,i,s,l,null),e[Ri]=t.current,qf(e),new Qf(t)};pc.hydrateRoot=function(e,t,n){if(!dv(e))throw Error(M(299));var a=!1,r="",i=By,s=Vy,l=Hy,o=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(o=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=Bb(e,1,!0,t,n!=null?n:null,a,r,i,s,l,o,c),t.context=Vb(null),n=t.current,a=bn(),a=nf(a),r=Va(a),r.callback=null,Ha(n,r,a),n=a,t.current.lanes=n,Qs(t,n),Wn(t),e[Ri]=t.current,qf(e),new fc(t)};pc.version="19.1.1"});var Qb=Vt((NR,Xb)=>{"use strict";function Gb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gb)}catch(e){console.error(e)}}Gb(),Xb.exports=Yb()});function Fb(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Zb=S(()=>{});function mc(e,t){return((t||Tw).jsx?kw:Ew).test(e)}var Ew,kw,Tw,$b=S(()=>{Ew=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tw={}});var Jb=S(()=>{$b()});function Ff(e){return typeof e=="object"?e.type==="text"?Kb(e.value):!1:Kb(e)}function Kb(e){return e.replace(ww,"")===""}var ww,Wb=S(()=>{ww=/[ \t\n\f\r]/g});var e0=S(()=>{Wb()});var ba,Zf=S(()=>{ba=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};ba.prototype.normal={};ba.prototype.property={};ba.prototype.space=void 0});function $f(e,t){let n={},a={};for(let r of e)Object.assign(n,r.property),Object.assign(a,r.normal);return new ba(n,a,t)}var t0=S(()=>{Zf()});function sl(e){return e.toLowerCase()}var Jf=S(()=>{});var wt,Kf=S(()=>{wt=class{constructor(t,n){this.attribute=n,this.property=t}};wt.prototype.attribute="";wt.prototype.booleanish=!1;wt.prototype.boolean=!1;wt.prototype.commaOrSpaceSeparated=!1;wt.prototype.commaSeparated=!1;wt.prototype.defined=!1;wt.prototype.mustUseProperty=!1;wt.prototype.number=!1;wt.prototype.overloadedBoolean=!1;wt.prototype.property="";wt.prototype.spaceSeparated=!1;wt.prototype.space=void 0});var ll={};fu(ll,{boolean:()=>pe,booleanish:()=>st,commaOrSpaceSeparated:()=>on,commaSeparated:()=>Ja,number:()=>j,overloadedBoolean:()=>hc,spaceSeparated:()=>ze});function wr(){return dh(2,++Aw)}var Aw,pe,st,hc,j,ze,Ja,on,ol=S(()=>{Aw=0,pe=wr(),st=wr(),hc=wr(),j=wr(),ze=wr(),Ja=wr(),on=wr()});function n0(e,t,n){n&&(e[t]=n)}var Wf,Ar,ep=S(()=>{Kf();ol();Wf=Object.keys(ll),Ar=class extends wt{constructor(t,n,a,r){let i=-1;if(super(t,n),n0(this,"space",r),typeof a=="number")for(;++i<Wf.length;){let s=Wf[i];n0(this,Wf[i],(a&ll[s])===ll[s])}}};Ar.prototype.defined=!0});function Un(e){let t={},n={};for(let[a,r]of Object.entries(e.properties)){let i=new Ar(a,e.transform(e.attributes||{},a),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),t[a]=i,n[sl(a)]=a,n[sl(i.attribute)]=a}return new ba(t,n,e.space)}var Cr=S(()=>{Jf();ep();Zf()});var tp,a0=S(()=>{Cr();ol();tp=Un({properties:{ariaActiveDescendant:null,ariaAtomic:st,ariaAutoComplete:null,ariaBusy:st,ariaChecked:st,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:st,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:st,ariaFlowTo:ze,ariaGrabbed:st,ariaHasPopup:null,ariaHidden:st,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:j,ariaLive:null,ariaModal:st,ariaMultiLine:st,ariaMultiSelectable:st,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:st,ariaReadOnly:st,ariaRelevant:null,ariaRequired:st,ariaRoleDescription:ze,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:st,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function gc(e,t){return t in e?e[t]:t}var np=S(()=>{});function vc(e,t){return gc(e,t.toLowerCase())}var ap=S(()=>{np()});var r0,i0=S(()=>{ap();Cr();ol();r0=Un({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ja,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:ze,autoFocus:pe,autoPlay:pe,blocking:ze,capture:null,charSet:null,checked:pe,cite:null,className:ze,cols:j,colSpan:null,content:null,contentEditable:st,controls:pe,controlsList:ze,coords:j|Ja,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:hc,draggable:st,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:ze,height:j,hidden:hc,high:j,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:ze,itemRef:ze,itemScope:pe,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:j,pattern:null,ping:ze,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:ze,required:pe,reversed:pe,rows:j,rowSpan:j,sandbox:ze,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:st,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:st,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:st,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:vc})});var s0,l0=S(()=>{np();Cr();ol();s0=Un({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:on,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ja,g2:Ja,glyphName:Ja,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gc})});var rp,o0=S(()=>{Cr();rp=Un({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var ip,c0=S(()=>{Cr();ap();ip=Un({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vc})});var sp,u0=S(()=>{Cr();sp=Un({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var lp,d0=S(()=>{lp={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function op(e,t){let n=sl(t),a=t,r=wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rw.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(f0,Dw);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!f0.test(i)){let s=i.replace(Cw,_w);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}r=Ar}return new r(a,t)}function _w(e){return"-"+e.toLowerCase()}function Dw(e){return e.charAt(1).toUpperCase()}var Cw,f0,Rw,p0=S(()=>{ep();Kf();Jf();Cw=/[A-Z]/g,f0=/-[a-z]/g,Rw=/^data[-\w.:]+$/i});var m0,yc,h0=S(()=>{t0();a0();i0();l0();o0();c0();u0();d0();p0();m0=$f([tp,r0,rp,ip,sp],"html"),yc=$f([tp,s0,rp,ip,sp],"svg")});function g0(e){return e.join(" ").trim()}var v0=S(()=>{});var E0=Vt((A_,N0)=>{var y0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ow=/\n/g,Lw=/^\s*/,zw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Mw=/^:\s*/,Uw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Pw=/^[;\s]*/,Bw=/^\s+|\s+$/g,Vw=`
|
|
10
|
+
`,b0="/",x0="*",Rr="",Hw="comment",qw="declaration";N0.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,a=1;function r(v){var k=v.match(Ow);k&&(n+=k.length);var m=v.lastIndexOf(Vw);a=~m?v.length-m:a+v.length}function i(){var v={line:n,column:a};return function(k){return k.position=new s(v),u(),k}}function s(v){this.start=v,this.end={line:n,column:a},this.source=t.source}s.prototype.content=e;var l=[];function o(v){var k=new Error(t.source+":"+n+":"+a+": "+v);if(k.reason=v,k.filename=t.source,k.line=n,k.column=a,k.source=e,t.silent)l.push(k);else throw k}function c(v){var k=v.exec(e);if(k){var m=k[0];return r(m),e=e.slice(m.length),k}}function u(){c(Lw)}function p(v){var k;for(v=v||[];k=f();)k!==!1&&v.push(k);return v}function f(){var v=i();if(!(b0!=e.charAt(0)||x0!=e.charAt(1))){for(var k=2;Rr!=e.charAt(k)&&(x0!=e.charAt(k)||b0!=e.charAt(k+1));)++k;if(k+=2,Rr===e.charAt(k-1))return o("End of comment missing");var m=e.slice(2,k-2);return a+=2,r(m),e=e.slice(k),a+=2,v({type:Hw,comment:m})}}function d(){var v=i(),k=c(zw);if(k){if(f(),!c(Mw))return o("property missing ':'");var m=c(Uw),h=v({type:qw,property:S0(k[0].replace(y0,Rr)),value:m?S0(m[0].replace(y0,Rr)):Rr});return c(Pw),h}}function E(){var v=[];p(v);for(var k;k=d();)k!==!1&&(v.push(k),p(v));return v}return u(),E()};function S0(e){return e?e.replace(Bw,Rr):Rr}});var k0=Vt(cl=>{"use strict";var jw=cl&&cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cl,"__esModule",{value:!0});cl.default=Yw;var Iw=jw(E0());function Yw(e,t){var n=null;if(!e||typeof e!="string")return n;var a=(0,Iw.default)(e),r=typeof t=="function";return a.forEach(function(i){if(i.type==="declaration"){var s=i.property,l=i.value;r?t(s,l,i):l&&(n=n||{},n[s]=l)}}),n}});var w0=Vt(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.camelCase=void 0;var Gw=/^--[a-zA-Z0-9_-]+$/,Xw=/-([a-z])/g,Qw=/^[^-]+$/,Fw=/^-(webkit|moz|ms|o|khtml)-/,Zw=/^-(ms)-/,$w=function(e){return!e||Qw.test(e)||Gw.test(e)},Jw=function(e,t){return t.toUpperCase()},T0=function(e,t){return"".concat(t,"-")},Kw=function(e,t){return t===void 0&&(t={}),$w(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Zw,T0):e=e.replace(Fw,T0),e.replace(Xw,Jw))};bc.camelCase=Kw});var C0=Vt((up,A0)=>{"use strict";var Ww=up&&up.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eA=Ww(k0()),tA=w0();function cp(e,t){var n={};return!e||typeof e!="string"||(0,eA.default)(e,function(a,r){a&&r&&(n[(0,tA.camelCase)(a,t)]=r)}),n}cp.default=cp;A0.exports=cp});function R0(e){return t;function t(n){let a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function dp(e){let t=Mi(e),n=xc(e);if(t&&n)return{start:t,end:n}}var xc,Mi,_0=S(()=>{xc=R0("end"),Mi=R0("start")});var Sc=S(()=>{_0()});function Ka(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?D0(e.position):"start"in e||"end"in e?D0(e):"line"in e||"column"in e?fp(e):""}function fp(e){return O0(e&&e.line)+":"+O0(e&&e.column)}function D0(e){return fp(e&&e.start)+"-"+fp(e&&e.end)}function O0(e){return e&&typeof e=="number"?e:1}var L0=S(()=>{});var pp=S(()=>{L0()});var dt,z0=S(()=>{pp();dt=class extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let r="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i=ee({},n)),typeof t=="string"?r=t:!i.cause&&t&&(s=!0,r=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof a=="string"){let o=a.indexOf(":");o===-1?i.ruleId=a:(i.source=a.slice(0,o),i.ruleId=a.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){let o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}let l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ka(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};dt.prototype.file="";dt.prototype.name="";dt.prototype.reason="";dt.prototype.message="";dt.prototype.stack="";dt.prototype.column=void 0;dt.prototype.line=void 0;dt.prototype.ancestors=void 0;dt.prototype.cause=void 0;dt.prototype.fatal=void 0;dt.prototype.place=void 0;dt.prototype.ruleId=void 0;dt.prototype.source=void 0});var mp=S(()=>{z0()});function gp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=pA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=fA(n,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yc:m0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=P0(r,e,void 0);return i&&typeof i!="string"?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function P0(e,t,n){if(t.type==="element")return sA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cA(e,t,n);if(t.type==="mdxjsEsm")return oA(e,t);if(t.type==="root")return uA(e,t,n);if(t.type==="text")return dA(e,t)}function sA(e,t,n){let a=e.schema,r=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=V0(e,t.tagName,!1),s=mA(e,t),l=yp(e,t);return rA.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Ff(o):!0})),B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function lA(e,t){if(t.data&&t.data.estree&&e.evaluater){let a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}ul(e,t.position)}function oA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ul(e,t.position)}function cA(e,t,n){let a=e.schema,r=a;t.name==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=t.name===null?e.Fragment:V0(e,t.name,!0),s=hA(e,t),l=yp(e,t);return B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function uA(e,t,n){let a={};return vp(a,yp(e,t)),e.create(t,e.Fragment,a,n)}function dA(e,t){return t.value}function B0(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function vp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fA(e,t,n){return a;function a(r,i,s,l){let c=Array.isArray(s.children)?n:t;return l?c(i,s,l):c(i,s)}}function pA(e,t){return n;function n(a,r,i,s){let l=Array.isArray(i.children),o=Mi(a);return t(r,i,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function mA(e,t){let n={},a,r;for(r in t.properties)if(r!=="children"&&hp.call(t.properties,r)){let i=gA(e,r,t.properties[r]);if(i){let[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&iA.has(t.tagName)?a=l:n[s]=l}}if(a){let i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function hA(e,t){let n={};for(let a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){let i=a.data.estree.body[0];i.type;let s=i.expression;s.type;let l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ul(e,t.position);else{let r=a.name,i;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){let l=a.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else ul(e,t.position);else i=a.value===null?!0:a.value;n[r]=i}return n}function yp(e,t){let n=[],a=-1,r=e.passKeys?new Map:nA;for(;++a<t.children.length;){let i=t.children[a],s;if(e.passKeys){let o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){let c=r.get(o)||0;s=o+"-"+c,r.set(o,c+1)}}let l=P0(e,i,s);l!==void 0&&n.push(l)}return n}function gA(e,t,n){let a=op(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Fb(n):g0(n)),a.property==="style"){let r=typeof n=="object"?n:vA(e,String(n));return e.stylePropertyNameCase==="css"&&(r=yA(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&a.space?lp[a.property]||a.property:a.attribute,n]}}function vA(e,t){try{return(0,M0.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let a=n,r=new dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=U0+"#cannot-parse-style-attribute",r}}function V0(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),i=-1,s;for(;++i<r.length;){let l=mc(r[i])?{type:"Identifier",name:r[i]}:{type:"Literal",value:r[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}a=s}else a=mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){let r=a.value;return hp.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(a);ul(e)}function ul(e,t){let n=new dt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=U0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yA(e){let t={},n;for(n in e)hp.call(e,n)&&(t[bA(n)]=e[n]);return t}function bA(e){let t=e.replace(aA,xA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function xA(e){return"-"+e.toLowerCase()}var M0,hp,nA,aA,rA,iA,U0,H0=S(()=>{Zb();Jb();e0();h0();v0();M0=Z(C0(),1);Sc();mp();hp={}.hasOwnProperty,nA=new Map,aA=/[A-Z]/g,rA=new Set(["table","tbody","thead","tfoot","tr"]),iA=new Set(["td","th"]),U0="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var q0=S(()=>{H0()});var dl,j0=S(()=>{dl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]}});var I0=S(()=>{j0()});var G0=Vt(Nc=>{"use strict";var SA=Symbol.for("react.transitional.element"),NA=Symbol.for("react.fragment");function Y0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:SA,type:e,key:a,ref:t!==void 0?t:null,props:n}}Nc.Fragment=NA;Nc.jsx=Y0;Nc.jsxs=Y0});var oe=Vt((tD,X0)=>{"use strict";X0.exports=G0()});function bp(e,t){let n=t||EA,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F0(e,a,r)}function F0(e,t,n){if(kA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Q0(e.children,t,n)}return Array.isArray(e)?Q0(e,t,n):""}function Q0(e,t,n){let a=[],r=-1;for(;++r<e.length;)a[r]=F0(e[r],t,n);return a.join("")}function kA(e){return!!(e&&typeof e=="object")}var EA,Z0=S(()=>{EA={}});var $0=S(()=>{Z0()});function Ui(e){let t="&"+e+";";J0.innerHTML=t;let n=J0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}var J0,Ec=S(()=>{J0=document.createElement("i")});function Mt(e,t,n,a){let r=e.length,i=0,s;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,a.length<1e4)s=Array.from(a),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<a.length;)s=a.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Zt(e,t){return e.length>0?(Mt(e,e.length,0,t),e):t}var Wa=S(()=>{});function W0(e){let t={},n=-1;for(;++n<e.length;)TA(t,e[n]);return t}function TA(e,t){let n;for(n in t){let r=(K0.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],s;if(i)for(s in i){K0.call(r,s)||(r[s]=[]);let l=i[s];wA(r[s],Array.isArray(l)?l:l?[l]:[])}}}function wA(e,t){let n=-1,a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Mt(e,0,0,a)}var K0,ex=S(()=>{Wa();K0={}.hasOwnProperty});function kc(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var xp=S(()=>{});function xa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Tc=S(()=>{});function fl(e){return e!==null&&(e<32||e===127)}function te(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}function er(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var Nn,At,tx,pl,nx,ax,rx,ix,Me=S(()=>{Nn=er(/[A-Za-z]/),At=er(/[\dA-Za-z]/),tx=er(/[#-'*+\--9=?A-Z^-~]/);pl=er(/\d/),nx=er(/[\dA-Fa-f]/),ax=er(/[!-/:-@[-`{-~]/);rx=er(new RegExp("\\p{P}|\\p{S}","u")),ix=er(/\s/)});function Pn(e){let t=[],n=-1,a=0,r=0;for(;++n<e.length;){let i=e.charCodeAt(n),s="";if(i===37&&At(e.charCodeAt(n+1))&&At(e.charCodeAt(n+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){let l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),r=1):s="\uFFFD"}else s=String.fromCharCode(i);s&&(t.push(e.slice(a,n),encodeURIComponent(s)),a=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(a)}var _r=S(()=>{Me()});function me(e,t,n,a){let r=a?a-1:Number.POSITIVE_INFINITY,i=0;return s;function s(o){return de(o)?(e.enter(n),l(o)):t(o)}function l(o){return de(o)&&i++<r?(e.consume(o),l):(e.exit(n),t(o))}}var Ct=S(()=>{Me()});function AA(e){let t=e.attempt(this.parser.constructs.contentInitial,a,r),n;return t;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),me(e,t,"linePrefix")}function r(l){return e.enter("paragraph"),i(l)}function i(l){let o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}var sx,lx=S(()=>{Ct();Me();sx={tokenize:AA}});function CA(e){let t=this,n=[],a=0,r,i,s;return l;function l(g){if(a<n.length){let x=n[a];return t.containerState=x[1],e.attempt(x[0].continuation,o,c)(g)}return c(g)}function o(g){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&h();let x=t.events.length,w=x,N;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){N=t.events[w][1].end;break}m(a);let T=x;for(;T<t.events.length;)t.events[T][1].end=ee({},N),T++;return Mt(t.events,w+1,0,t.events.slice(x)),t.events.length=T,c(g)}return l(g)}function c(g){if(a===n.length){if(!r)return f(g);if(r.currentConstruct&&r.currentConstruct.concrete)return E(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ox,u,p)(g)}function u(g){return r&&h(),m(a),f(g)}function p(g){return t.parser.lazy[t.now().line]=a!==n.length,s=t.now().offset,E(g)}function f(g){return t.containerState={},e.attempt(ox,d,E)(g)}function d(g){return a++,n.push([t.currentConstruct,t.containerState]),f(g)}function E(g){if(g===null){r&&h(),m(0),e.consume(g);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),v(g)}function v(g){if(g===null){k(e.exit("chunkFlow"),!0),m(0),e.consume(g);return}return te(g)?(e.consume(g),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(g),v)}function k(g,x){let w=t.sliceStream(g);if(x&&w.push(null),g.previous=i,i&&(i.next=g),i=g,r.defineSkip(g.start),r.write(w),t.parser.lazy[g.start.line]){let N=r.events.length;for(;N--;)if(r.events[N][1].start.offset<s&&(!r.events[N][1].end||r.events[N][1].end.offset>s))return;let T=t.events.length,A=T,U,H;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(U){H=t.events[A][1].end;break}U=!0}for(m(a),N=T;N<t.events.length;)t.events[N][1].end=ee({},H),N++;Mt(t.events,A+1,0,t.events.slice(T)),t.events.length=N}}function m(g){let x=n.length;for(;x-- >g;){let w=n[x];t.containerState=w[1],w[0].exit.call(t,e)}n.length=g}function h(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}function RA(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var cx,ox,ux=S(()=>{Ct();Me();Wa();cx={tokenize:CA},ox={tokenize:RA}});function Sp(e){if(e===null||ft(e)||ix(e))return 1;if(rx(e))return 2}var dx=S(()=>{Me()});function Pi(e,t,n){let a=[],r=-1;for(;++r<e.length;){let i=e[r].resolveAll;i&&!a.includes(i)&&(t=i(t,n),a.push(i))}return t}var wc=S(()=>{});function _A(e,t){let n=-1,a,r,i,s,l,o,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p=ee({},e[a][1].end),f=ee({},e[n][1].start);fx(p,-o),fx(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:ee({},e[a][1].end)},l={type:o>1?"strongSequence":"emphasisSequence",start:ee({},e[n][1].start),end:f},i={type:o>1?"strongText":"emphasisText",start:ee({},e[a][1].end),end:ee({},e[n][1].start)},r={type:o>1?"strong":"emphasis",start:ee({},s.start),end:ee({},l.end)},e[a][1].end=ee({},s.start),e[n][1].start=ee({},l.end),c=[],e[a][1].end.offset-e[a][1].start.offset&&(c=Zt(c,[["enter",e[a][1],t],["exit",e[a][1],t]])),c=Zt(c,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=Zt(c,Pi(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),c=Zt(c,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Zt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Mt(e,a-1,n-a+3,c),n=a+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DA(e,t){let n=this.parser.constructs.attentionMarkers.null,a=this.previous,r=Sp(a),i;return s;function s(o){return i=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===i)return e.consume(o),l;let c=e.exit("attentionSequence"),u=Sp(o),p=!u||u===2&&r||n.includes(o),f=!r||r===2&&u||n.includes(a);return c._open=!!(i===42?p:p&&(r||!f)),c._close=!!(i===42?f:f&&(u||!p)),t(o)}}function fx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ml,px=S(()=>{Wa();dx();wc();ml={name:"attention",resolveAll:_A,tokenize:DA}});function OA(e,t,n){let a=0;return r;function r(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return Nn(d)?(e.consume(d),s):d===64?n(d):c(d)}function s(d){return d===43||d===45||d===46||At(d)?(a=1,l(d)):c(d)}function l(d){return d===58?(e.consume(d),a=0,o):(d===43||d===45||d===46||At(d))&&a++<32?(e.consume(d),l):(a=0,c(d))}function o(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||fl(d)?n(d):(e.consume(d),o)}function c(d){return d===64?(e.consume(d),u):tx(d)?(e.consume(d),c):n(d)}function u(d){return At(d)?p(d):n(d)}function p(d){return d===46?(e.consume(d),a=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||At(d))&&a++<63){let E=d===45?f:p;return e.consume(d),E}return n(d)}}var Np,mx=S(()=>{Me();Np={name:"autolink",tokenize:OA}});function LA(e,t,n){return a;function a(i){return de(i)?me(e,r,"linePrefix")(i):r(i)}function r(i){return i===null||te(i)?t(i):n(i)}}var tr,Ac=S(()=>{Ct();Me();tr={partial:!0,tokenize:LA}});function zA(e,t,n){let a=this;return r;function r(s){if(s===62){let l=a.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function MA(e,t,n){let a=this;return r;function r(s){return de(s)?me(e,i,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Cc,t,n)(s)}}function UA(e){e.exit("blockQuote")}var Cc,hx=S(()=>{Ct();Me();Cc={continuation:{tokenize:MA},exit:UA,name:"blockQuote",tokenize:zA}});function PA(e,t,n){return a;function a(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),r}function r(i){return ax(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}var Rc,gx=S(()=>{Me();Rc={name:"characterEscape",tokenize:PA}});function BA(e,t,n){let a=this,r=0,i,s;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=At,u(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=nx,u):(e.enter("characterReferenceValue"),i=7,s=pl,u(p))}function u(p){if(p===59&&r){let f=e.exit("characterReferenceValue");return s===At&&!Ui(a.sliceSerialize(f))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&r++<i?(e.consume(p),u):n(p)}}var _c,vx=S(()=>{Ec();Me();_c={name:"characterReference",tokenize:BA}});function VA(e,t,n){let a=this,r={partial:!0,tokenize:w},i=0,s=0,l;return o;function o(N){return c(N)}function c(N){let T=a.events[a.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===l?(s++,e.consume(N),u):s<3?n(N):(e.exit("codeFencedFenceSequence"),de(N)?me(e,p,"whitespace")(N):p(N))}function p(N){return N===null||te(N)?(e.exit("codeFencedFence"),a.interrupt?t(N):e.check(yx,v,x)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(N))}function f(N){return N===null||te(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(N)):de(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,d,"whitespace")(N)):N===96&&N===l?n(N):(e.consume(N),f)}function d(N){return N===null||te(N)?p(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(N))}function E(N){return N===null||te(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(N)):N===96&&N===l?n(N):(e.consume(N),E)}function v(N){return e.attempt(r,x,k)(N)}function k(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),m}function m(N){return i>0&&de(N)?me(e,h,"linePrefix",i+1)(N):h(N)}function h(N){return N===null||te(N)?e.check(yx,v,x)(N):(e.enter("codeFlowValue"),g(N))}function g(N){return N===null||te(N)?(e.exit("codeFlowValue"),h(N)):(e.consume(N),g)}function x(N){return e.exit("codeFenced"),t(N)}function w(N,T,A){let U=0;return H;function H(P){return N.enter("lineEnding"),N.consume(P),N.exit("lineEnding"),_}function _(P){return N.enter("codeFencedFence"),de(P)?me(N,R,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):R(P)}function R(P){return P===l?(N.enter("codeFencedFenceSequence"),L(P)):A(P)}function L(P){return P===l?(U++,N.consume(P),L):U>=s?(N.exit("codeFencedFenceSequence"),de(P)?me(N,G,"whitespace")(P):G(P)):A(P)}function G(P){return P===null||te(P)?(N.exit("codeFencedFence"),T(P)):A(P)}}}function HA(e,t,n){let a=this;return r;function r(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}var yx,Dc,bx=S(()=>{Ct();Me();yx={partial:!0,tokenize:HA},Dc={concrete:!0,name:"codeFenced",tokenize:VA}});function jA(e,t,n){let a=this;return r;function r(c){return e.enter("codeIndented"),me(e,i,"linePrefix",5)(c)}function i(c){let u=a.events[a.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):te(c)?e.attempt(qA,s,o)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function o(c){return e.exit("codeIndented"),t(c)}}function IA(e,t,n){let a=this;return r;function r(s){return a.parser.lazy[a.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r):me(e,i,"linePrefix",5)(s)}function i(s){let l=a.events[a.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):te(s)?r(s):n(s)}}var hl,qA,xx=S(()=>{Ct();Me();hl={name:"codeIndented",tokenize:jA},qA={partial:!0,tokenize:IA}});function YA(e){let t=e.length-4,n=3,a,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)r===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(r=a):(a===t||e[a][1].type==="lineEnding")&&(e[r][1].type="codeTextData",a!==r+2&&(e[r][1].end=e[a-1][1].end,e.splice(r+2,a-r-2),t-=a-r-2,a=r+2),r=void 0);return e}function GA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XA(e,t,n){let a=this,r=0,i,s;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,p(f)):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||te(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function p(f){return f===96?(e.consume(f),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}var Ep,Sx=S(()=>{Me();Ep={name:"codeText",previous:GA,resolve:YA,tokenize:XA}});function gl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var Oc,Nx=S(()=>{Oc=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let a=n==null?Number.POSITIVE_INFINITY:n;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){let r=n||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return a&&gl(this.left,a),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);gl(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gl(this.left,n.reverse())}}}});function Lc(e){let t={},n=-1,a,r,i,s,l,o,c,u=new Oc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(a=u.get(n),n&&a[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(o=a[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,QA(u,n)),n=t[n],c=!0);else if(a[1]._container){for(i=n,r=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),s[1].type="lineEnding",r=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;r&&(a[1].end=ee({},u.get(r)[1].start),l=u.slice(r,n),l.unshift(a),u.splice(r,n-r+1,l))}}return Mt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function QA(e,t){let n=e.get(t)[1],a=e.get(t)[2],r=t-1,i=[],s=n._tokenizer;s||(s=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let l=s.events,o=[],c={},u,p,f=-1,d=n,E=0,v=0,k=[v];for(;d;){for(;e.get(++r)[1]!==d;);i.push(r),d._tokenizer||(u=a.sliceStream(d),d.next||u.push(null),p&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=d,d=d.next}for(d=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(v=f+1,k.push(v),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):k.pop(),f=k.length;f--;){let m=l.slice(k[f],k[f+1]),h=i.pop();o.push([h,h+m.length-1]),e.splice(h,2,m)}for(o.reverse(),f=-1;++f<o.length;)c[E+o[f][0]]=E+o[f][1],E+=o[f][1]-o[f][0]-1;return c}var kp=S(()=>{Wa();Nx()});function ZA(e){return Lc(e),e}function $A(e,t){let n;return a;function a(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)}function r(l){return l===null?i(l):te(l)?e.check(FA,s,i)(l):(e.consume(l),r)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function JA(e,t,n){let a=this;return r;function r(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,i,"linePrefix")}function i(s){if(s===null||te(s))return n(s);let l=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(a.parser.constructs.flow,n,t)(s)}}var Tp,FA,Ex=S(()=>{Ct();Me();kp();Tp={resolve:ZA,tokenize:$A},FA={partial:!0,tokenize:JA}});function zc(e,t,n,a,r,i,s,l,o){let c=o||Number.POSITIVE_INFINITY,u=0;return p;function p(m){return m===60?(e.enter(a),e.enter(r),e.enter(i),e.consume(m),e.exit(i),f):m===null||m===32||m===41||fl(m)?n(m):(e.enter(a),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(m))}function f(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),e.exit(a),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(l),f(m)):m===null||m===60||te(m)?n(m):(e.consume(m),m===92?E:d)}function E(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function v(m){return!u&&(m===null||m===41||ft(m))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(a),t(m)):u<c&&m===40?(e.consume(m),u++,v):m===41?(e.consume(m),u--,v):m===null||m===32||m===40||fl(m)?n(m):(e.consume(m),m===92?k:v)}function k(m){return m===40||m===41||m===92?(e.consume(m),v):v(m)}}var wp=S(()=>{Me()});function Mc(e,t,n,a,r,i){let s=this,l=0,o;return c;function c(d){return e.enter(a),e.enter(r),e.consume(d),e.exit(r),e.enter(i),u}function u(d){return l>999||d===null||d===91||d===93&&!o||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(i),e.enter(r),e.consume(d),e.exit(r),e.exit(a),t):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(d))}function p(d){return d===null||d===91||d===93||te(d)||l++>999?(e.exit("chunkString"),u(d)):(e.consume(d),o||(o=!de(d)),d===92?f:p)}function f(d){return d===91||d===92||d===93?(e.consume(d),l++,p):p(d)}}var Ap=S(()=>{Me()});function Uc(e,t,n,a,r,i){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(a),e.enter(r),e.consume(f),e.exit(r),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(r),e.consume(f),e.exit(r),e.exit(a),t):(e.enter(i),c(f))}function c(f){return f===s?(e.exit(i),o(s)):f===null?n(f):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),me(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||te(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?p:u)}function p(f){return f===s||f===92?(e.consume(f),u):u(f)}}var Cp=S(()=>{Ct();Me()});function Dr(e,t){let n;return a;function a(r){return te(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,a):de(r)?me(e,a,n?"linePrefix":"lineSuffix")(r):t(r)}}var Rp=S(()=>{Ct();Me()});function WA(e,t,n){let a=this,r;return i;function i(d){return e.enter("definition"),s(d)}function s(d){return Mc.call(a,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return r=xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),o):n(d)}function o(d){return ft(d)?Dr(e,c)(d):c(d)}function c(d){return zc(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(KA,p,p)(d)}function p(d){return de(d)?me(e,f,"whitespace")(d):f(d)}function f(d){return d===null||te(d)?(e.exit("definition"),a.parser.defined.push(r),t(d)):n(d)}}function eC(e,t,n){return a;function a(l){return ft(l)?Dr(e,r)(l):n(l)}function r(l){return Uc(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return de(l)?me(e,s,"whitespace")(l):s(l)}function s(l){return l===null||te(l)?t(l):n(l)}}var _p,KA,kx=S(()=>{wp();Ap();Ct();Cp();Rp();Me();Tc();_p={name:"definition",tokenize:WA},KA={partial:!0,tokenize:eC}});function tC(e,t,n){return a;function a(i){return e.enter("hardBreakEscape"),e.consume(i),r}function r(i){return te(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}var Dp,Tx=S(()=>{Me();Dp={name:"hardBreakEscape",tokenize:tC}});function nC(e,t){let n=e.length-2,a=3,r,i;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},i={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Mt(e,a,n-a+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}function aC(e,t,n){let a=0;return r;function r(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&a++<6?(e.consume(u),s):u===null||ft(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),o(u)):u===null||te(u)?(e.exit("atxHeading"),t(u)):de(u)?me(e,l,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function o(u){return u===35?(e.consume(u),o):(e.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||ft(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),c)}}var Op,wx=S(()=>{Ct();Me();Wa();Op={name:"headingAtx",resolve:nC,tokenize:aC}});var Ax,Lp,Cx=S(()=>{Ax=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Lp=["pre","script","style","textarea"]});function sC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lC(e,t,n){let a=this,r,i,s,l,o;return c;function c(b){return u(b)}function u(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),p}function p(b){return b===33?(e.consume(b),f):b===47?(e.consume(b),i=!0,v):b===63?(e.consume(b),r=3,a.interrupt?t:y):Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function f(b){return b===45?(e.consume(b),r=2,d):b===91?(e.consume(b),r=5,l=0,E):Nn(b)?(e.consume(b),r=4,a.interrupt?t:y):n(b)}function d(b){return b===45?(e.consume(b),a.interrupt?t:y):n(b)}function E(b){let Fe="CDATA[";return b===Fe.charCodeAt(l++)?(e.consume(b),l===Fe.length?a.interrupt?t:R:E):n(b)}function v(b){return Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function k(b){if(b===null||b===47||b===62||ft(b)){let Fe=b===47,vt=s.toLowerCase();return!Fe&&!i&&Lp.includes(vt)?(r=1,a.interrupt?t(b):R(b)):Ax.includes(s.toLowerCase())?(r=6,Fe?(e.consume(b),m):a.interrupt?t(b):R(b)):(r=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(b):i?h(b):g(b))}return b===45||At(b)?(e.consume(b),s+=String.fromCharCode(b),k):n(b)}function m(b){return b===62?(e.consume(b),a.interrupt?t:R):n(b)}function h(b){return de(b)?(e.consume(b),h):H(b)}function g(b){return b===47?(e.consume(b),H):b===58||b===95||Nn(b)?(e.consume(b),x):de(b)?(e.consume(b),g):H(b)}function x(b){return b===45||b===46||b===58||b===95||At(b)?(e.consume(b),x):w(b)}function w(b){return b===61?(e.consume(b),N):de(b)?(e.consume(b),w):g(b)}function N(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,T):de(b)?(e.consume(b),N):A(b)}function T(b){return b===o?(e.consume(b),o=null,U):b===null||te(b)?n(b):(e.consume(b),T)}function A(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||ft(b)?w(b):(e.consume(b),A)}function U(b){return b===47||b===62||de(b)?g(b):n(b)}function H(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||te(b)?R(b):de(b)?(e.consume(b),_):n(b)}function R(b){return b===45&&r===2?(e.consume(b),W):b===60&&r===1?(e.consume(b),ie):b===62&&r===4?(e.consume(b),De):b===63&&r===3?(e.consume(b),y):b===93&&r===5?(e.consume(b),Ue):te(b)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(rC,ot,L)(b)):b===null||te(b)?(e.exit("htmlFlowData"),L(b)):(e.consume(b),R)}function L(b){return e.check(iC,G,ot)(b)}function G(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),P}function P(b){return b===null||te(b)?L(b):(e.enter("htmlFlowData"),R(b))}function W(b){return b===45?(e.consume(b),y):R(b)}function ie(b){return b===47?(e.consume(b),s="",Ae):R(b)}function Ae(b){if(b===62){let Fe=s.toLowerCase();return Lp.includes(Fe)?(e.consume(b),De):R(b)}return Nn(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),Ae):R(b)}function Ue(b){return b===93?(e.consume(b),y):R(b)}function y(b){return b===62?(e.consume(b),De):b===45&&r===2?(e.consume(b),y):R(b)}function De(b){return b===null||te(b)?(e.exit("htmlFlowData"),ot(b)):(e.consume(b),De)}function ot(b){return e.exit("htmlFlow"),t(b)}}function oC(e,t,n){let a=this;return r;function r(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}function cC(e,t,n){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(tr,t,n)}}var zp,rC,iC,Rx=S(()=>{Me();Cx();Ac();zp={concrete:!0,name:"htmlFlow",resolveTo:sC,tokenize:lC},rC={partial:!0,tokenize:cC},iC={partial:!0,tokenize:oC}});function uC(e,t,n){let a=this,r,i,s;return l;function l(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),o}function o(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),w):y===63?(e.consume(y),g):Nn(y)?(e.consume(y),A):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),i=0,E):Nn(y)?(e.consume(y),h):n(y)}function u(y){return y===45?(e.consume(y),d):n(y)}function p(y){return y===null?n(y):y===45?(e.consume(y),f):te(y)?(s=p,ie(y)):(e.consume(y),p)}function f(y){return y===45?(e.consume(y),d):p(y)}function d(y){return y===62?W(y):y===45?f(y):p(y)}function E(y){let De="CDATA[";return y===De.charCodeAt(i++)?(e.consume(y),i===De.length?v:E):n(y)}function v(y){return y===null?n(y):y===93?(e.consume(y),k):te(y)?(s=v,ie(y)):(e.consume(y),v)}function k(y){return y===93?(e.consume(y),m):v(y)}function m(y){return y===62?W(y):y===93?(e.consume(y),m):v(y)}function h(y){return y===null||y===62?W(y):te(y)?(s=h,ie(y)):(e.consume(y),h)}function g(y){return y===null?n(y):y===63?(e.consume(y),x):te(y)?(s=g,ie(y)):(e.consume(y),g)}function x(y){return y===62?W(y):g(y)}function w(y){return Nn(y)?(e.consume(y),N):n(y)}function N(y){return y===45||At(y)?(e.consume(y),N):T(y)}function T(y){return te(y)?(s=T,ie(y)):de(y)?(e.consume(y),T):W(y)}function A(y){return y===45||At(y)?(e.consume(y),A):y===47||y===62||ft(y)?U(y):n(y)}function U(y){return y===47?(e.consume(y),W):y===58||y===95||Nn(y)?(e.consume(y),H):te(y)?(s=U,ie(y)):de(y)?(e.consume(y),U):W(y)}function H(y){return y===45||y===46||y===58||y===95||At(y)?(e.consume(y),H):_(y)}function _(y){return y===61?(e.consume(y),R):te(y)?(s=_,ie(y)):de(y)?(e.consume(y),_):U(y)}function R(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),r=y,L):te(y)?(s=R,ie(y)):de(y)?(e.consume(y),R):(e.consume(y),G)}function L(y){return y===r?(e.consume(y),r=void 0,P):y===null?n(y):te(y)?(s=L,ie(y)):(e.consume(y),L)}function G(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||ft(y)?U(y):(e.consume(y),G)}function P(y){return y===47||y===62||ft(y)?U(y):n(y)}function W(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function ie(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ae}function Ae(y){return de(y)?me(e,Ue,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):Ue(y)}function Ue(y){return e.enter("htmlTextData"),s(y)}}var Mp,_x=S(()=>{Ct();Me();Mp={name:"htmlText",tokenize:uC}});function mC(e){let t=-1,n=[];for(;++t<e.length;){let a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){let r=a.type==="labelImage"?4:2;a.type="data",t+=r}}return e.length!==n.length&&Mt(e,0,e.length,n),e}function hC(e,t){let n=e.length,a=0,r,i,s,l;for(;n--;)if(r=e[n][1],i){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(i=n,r.type!=="labelLink")){a=2;break}}else r.type==="labelEnd"&&(s=n);let o={type:e[i][1].type==="labelLink"?"link":"image",start:ee({},e[i][1].start),end:ee({},e[e.length-1][1].end)},c={type:"label",start:ee({},e[i][1].start),end:ee({},e[s][1].end)},u={type:"labelText",start:ee({},e[i+a+2][1].end),end:ee({},e[s-2][1].start)};return l=[["enter",o,t],["enter",c,t]],l=Zt(l,e.slice(i+1,i+a+3)),l=Zt(l,[["enter",u,t]]),l=Zt(l,Pi(t.parser.constructs.insideSpan.null,e.slice(i+a+4,s-3),t)),l=Zt(l,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),l=Zt(l,e.slice(s+1)),l=Zt(l,[["exit",o,t]]),Mt(e,i,e.length,l),e}function gC(e,t,n){let a=this,r=a.events.length,i,s;for(;r--;)if((a.events[r][1].type==="labelImage"||a.events[r][1].type==="labelLink")&&!a.events[r][1]._balanced){i=a.events[r][1];break}return l;function l(f){return i?i._inactive?p(f):(s=a.parser.defined.includes(xa(a.sliceSerialize({start:i.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(dC,u,s?u:p)(f):f===91?e.attempt(fC,u,s?c:p)(f):s?u(f):p(f)}function c(f){return e.attempt(pC,u,p)(f)}function u(f){return t(f)}function p(f){return i._balanced=!0,n(f)}}function vC(e,t,n){return a;function a(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),r}function r(p){return ft(p)?Dr(e,i)(p):i(p)}function i(p){return p===41?u(p):zc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return ft(p)?Dr(e,o)(p):u(p)}function l(p){return n(p)}function o(p){return p===34||p===39||p===40?Uc(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function c(p){return ft(p)?Dr(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function yC(e,t,n){let a=this;return r;function r(l){return Mc.call(a,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return a.parser.defined.includes(xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function bC(e,t,n){return a;function a(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),r}function r(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}var Or,dC,fC,pC,Pc=S(()=>{wp();Ap();Cp();Rp();Me();Wa();Tc();wc();Or={name:"labelEnd",resolveAll:mC,resolveTo:hC,tokenize:gC},dC={tokenize:vC},fC={tokenize:yC},pC={tokenize:bC}});function xC(e,t,n){let a=this;return r;function r(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(l):t(l)}}var Up,Dx=S(()=>{Pc();Up={name:"labelStartImage",resolveAll:Or.resolveAll,tokenize:xC}});function SC(e,t,n){let a=this;return r;function r(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(s):t(s)}}var Pp,Ox=S(()=>{Pc();Pp={name:"labelStartLink",resolveAll:Or.resolveAll,tokenize:SC}});function NC(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),me(e,t,"linePrefix")}}var vl,Lx=S(()=>{Ct();vl={name:"lineEnding",tokenize:NC}});function EC(e,t,n){let a=0,r;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return r=c,l(c)}function l(c){return c===r?(e.enter("thematicBreakSequence"),o(c)):a>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===r?(e.consume(c),a++,o):(e.exit("thematicBreakSequence"),de(c)?me(e,l,"whitespace")(c):l(c))}}var Lr,Bp=S(()=>{Ct();Me();Lr={name:"thematicBreak",tokenize:EC}});function wC(e,t,n){let a=this,r=a.events[a.events.length-1],i=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return l;function l(d){let E=a.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||d===a.containerState.marker:pl(d)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Lr,n,c)(d):c(d);if(!a.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(d)}return n(d)}function o(d){return pl(d)&&++s<10?(e.consume(d),o):(!a.interrupt||s<2)&&(a.containerState.marker?d===a.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||d,e.check(tr,a.interrupt?n:u,e.attempt(kC,f,p))}function u(d){return a.containerState.initialBlankLine=!0,i++,f(d)}function p(d){return de(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):n(d)}function f(d){return a.containerState.size=i+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function AC(e,t,n){let a=this;return a.containerState._closeFlow=void 0,e.check(tr,r,i);function r(l){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,me(e,t,"listItemIndent",a.containerState.size+1)(l)}function i(l){return a.containerState.furtherBlankLines||!de(l)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,s(l)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(TC,t,s)(l))}function s(l){return a.containerState._closeFlow=!0,a.interrupt=void 0,me(e,e.attempt(It,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function CC(e,t,n){let a=this;return me(e,r,"listItemIndent",a.containerState.size+1);function r(i){let s=a.events[a.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===a.containerState.size?t(i):n(i)}}function RC(e){e.exit(this.containerState.type)}function _C(e,t,n){let a=this;return me(e,r,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(i){let s=a.events[a.events.length-1];return!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}var It,kC,TC,zx=S(()=>{Ct();Me();Ac();Bp();It={continuation:{tokenize:AC},exit:RC,name:"list",tokenize:wC},kC={partial:!0,tokenize:_C},TC={partial:!0,tokenize:CC}});function DC(e,t){let n=e.length,a,r,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:ee({},e[a][1].start),end:ee({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[a][1],t]),e[a][1].end=ee({},e[i][1].end)):e[a][1]=s,e.push(["exit",s,t]),e}function OC(e,t,n){let a=this,r;return i;function i(c){let u=a.events.length,p;for(;u--;)if(a.events[u][1].type!=="lineEnding"&&a.events[u][1].type!=="linePrefix"&&a.events[u][1].type!=="content"){p=a.events[u][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),r=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),de(c)?me(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var Bc,Mx=S(()=>{Ct();Me();Bc={name:"setextUnderline",resolveTo:DC,tokenize:OC}});var Vp=S(()=>{px();mx();Ac();hx();gx();vx();bx();xx();Sx();Ex();kx();Tx();wx();Rx();_x();Pc();Dx();Ox();Lx();zx();Mx();Bp()});function LC(e){let t=this,n=e.attempt(tr,a,e.attempt(this.parser.constructs.flowInitial,r,me(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Tp,r)),"linePrefix")));return n;function a(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Ux,Px=S(()=>{Vp();Ct();Ux={tokenize:LC}});function qx(e){return{resolveAll:jx(e==="text"?zC:void 0),tokenize:t};function t(n){let a=this,r=this.parser.constructs[e],i=n.attempt(r,s,l);return s;function s(u){return c(u)?i(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),o}function o(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),o)}function c(u){if(u===null)return!0;let p=r[u],f=-1;if(p)for(;++f<p.length;){let d=p[f];if(!d.previous||d.previous.call(a,a.previous))return!0}return!1}}}function jx(e){return t;function t(n,a){let r=-1,i;for(;++r<=n.length;)i===void 0?n[r]&&n[r][1].type==="data"&&(i=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(n,a):n}}function zC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let a=e[n-1][1],r=t.sliceStream(a),i=r.length,s=-1,l=0,o;for(;i--;){let c=r[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)o=!0,l++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let c={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:a.start._bufferIndex+s,_index:a.start._index+i,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:ee({},a.end)};a.end=ee({},c.start),a.start.offset===a.end.offset?Object.assign(a,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}var Bx,Vx,Hx,Hp=S(()=>{Bx={resolveAll:jx()},Vx=qx("string"),Hx=qx("text")});var qp={};fu(qp,{attentionMarkers:()=>jC,contentInitial:()=>UC,disable:()=>IC,document:()=>MC,flow:()=>BC,flowInitial:()=>PC,insideSpan:()=>qC,string:()=>VC,text:()=>HC});var MC,UC,PC,BC,VC,HC,qC,jC,IC,Ix=S(()=>{Vp();Hp();MC={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:Cc},UC={91:_p},PC={[-2]:hl,[-1]:hl,32:hl},BC={35:Op,42:Lr,45:[Bc,Lr],60:zp,61:Bc,95:Lr,96:Dc,126:Dc},VC={38:_c,92:Rc},HC={[-5]:vl,[-4]:vl,[-3]:vl,33:Up,38:_c,42:ml,60:[Np,Mp],91:Pp,92:[Dp,Rc],93:Or,95:ml,96:Ep},qC={null:[ml,Bx]},jC={null:[42,95]},IC={null:[]}});function Yx(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},r={},i=[],s=[],l=[],o=!0,c={attempt:U(T),check:U(A),consume:x,enter:w,exit:N,interrupt:U(A,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:k,parser:e,previous:null,sliceSerialize:E,sliceStream:v,write:d},p=t.tokenize.call(u,c),f;return t.resolveAll&&i.push(t),u;function d(L){return s=Zt(s,L),h(),s[s.length-1]!==null?[]:(H(t,0),u.events=Pi(i,u.events,u),u.events)}function E(L,G){return GC(v(L),G)}function v(L){return YC(s,L)}function k(){let{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}=a;return{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}}function m(L){r[L.line]=L.column,R()}function h(){let L;for(;a._index<s.length;){let G=s[a._index];if(typeof G=="string")for(L=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===L&&a._bufferIndex<G.length;)g(G.charCodeAt(a._bufferIndex));else g(G)}}function g(L){o=void 0,f=L,p=p(L)}function x(L){te(L)?(a.line++,a.column=1,a.offset+=L===-3?2:1,R()):L!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===s[a._index].length&&(a._bufferIndex=-1,a._index++)),u.previous=L,o=!0}function w(L,G){let P=G||{};return P.type=L,P.start=k(),u.events.push(["enter",P,u]),l.push(P),P}function N(L){let G=l.pop();return G.end=k(),u.events.push(["exit",G,u]),G}function T(L,G){H(L,G.from)}function A(L,G){G.restore()}function U(L,G){return P;function P(W,ie,Ae){let Ue,y,De,ot;return Array.isArray(W)?Fe(W):"tokenize"in W?Fe([W]):b(W);function b(F){return V;function V(B){let J=B!==null&&F[B],he=B!==null&&F.null,Xe=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(he)?he:he?[he]:[]];return Fe(Xe)(B)}}function Fe(F){return Ue=F,y=0,F.length===0?Ae:vt(F[y])}function vt(F){return V;function V(B){return ot=_(),De=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?Q(B):F.tokenize.call(G?Object.assign(Object.create(u),G):u,c,ce,Q)(B)}}function ce(F){return o=!0,L(De,ot),ie}function Q(F){return o=!0,ot.restore(),++y<Ue.length?vt(Ue[y]):Ae}}}function H(L,G){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&Mt(u.events,G,u.events.length-G,L.resolve(u.events.slice(G),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function _(){let L=k(),G=u.previous,P=u.currentConstruct,W=u.events.length,ie=Array.from(l);return{from:W,restore:Ae};function Ae(){a=L,u.previous=G,u.currentConstruct=P,u.events.length=W,l=ie,R()}}function R(){a.line in r&&a.column<2&&(a.column=r[a.line],a.offset+=r[a.line]-1)}}function YC(e,t){let n=t.start._index,a=t.start._bufferIndex,r=t.end._index,i=t.end._bufferIndex,s;if(n===r)s=[e[n].slice(a,i)];else{if(s=e.slice(n,r),a>-1){let l=s[0];typeof l=="string"?s[0]=l.slice(a):s.shift()}i>0&&s.push(e[r].slice(0,i))}return s}function GC(e,t){let n=-1,a=[],r;for(;++n<e.length;){let i=e[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
11
11
|
`;break}case-3:{s=`\r
|
|
12
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,a.push(s)}return a.join("")}var Gx=N(()=>{ze();Wa();wc()});function jp(e){let a={constructs:W0([qp,...(e||{}).extensions||[]]),content:r(sx),defined:[],document:r(cx),flow:r(Ux),lazy:{},string:r(Vx),text:r(Hx)};return a;function r(i){return s;function s(l){return Yx(a,i,l)}}}var Xx=N(()=>{ex();lx();ux();Px();Hp();Ix();Gx()});function Ip(e){for(;!Lc(e););return e}var Qx=N(()=>{kp()});function Yp(){let e=1,t="",n=!0,a;return r;function r(i,s,l){let o=[],c,u,p,f,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Fx.lastIndex=p,c=Fx.exec(i),f=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(f),!c){t=i.slice(p);break}if(d===10&&p===f&&a)o.push(-3),a=void 0;else switch(a&&(o.push(-5),a=void 0),p<f&&(o.push(i.slice(p,f)),e+=f-p),d){case 0:{o.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,o.push(-2);e++<u;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:a=!0,e=1}p=f+1}return l&&(a&&o.push(-5),t&&o.push(t),o.push(null)),o}}var Fx,Zx=N(()=>{Fx=/[\0\t\n\r]/g});var $x=N(()=>{Xx();Qx();Zx()});function Jx(e){return e.replace(XC,QC)}function QC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let r=n.charCodeAt(1),i=r===120||r===88;return kc(n.slice(i?2:1),i?16:10)}return Ui(n)||e}var XC,Kx=N(()=>{Ec();xp();XC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Gp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FC(n)(Ip(jp(n).document().write(Yp()(e,t,!0))))}function FC(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(le),autolinkProtocol:U,autolinkEmail:U,atxHeading:i($i),blockQuote:i(B),characterEscape:U,characterReference:U,codeFenced:i(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(J,s),codeText:i(he,s),codeTextData:U,data:U,codeFlowValue:U,definition:i(Xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Pl),hardBreakEscape:i(Ji),hardBreakTrailing:i(Ji),htmlFlow:i(I,s),htmlFlowData:U,htmlText:i(I,s),htmlTextData:U,image:i(Y),label:s,link:i(le),listItem:i(Pt),listItemValue:f,listOrdered:i(He,p),listUnordered:i(He),paragraph:i(dn),reference:b,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i($i),strong:i(_t),thematicBreak:i(ft)},exit:{atxHeading:o(),atxHeadingSequence:T,autolink:o(),autolinkEmail:V,autolinkProtocol:F,blockQuote:o(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:vt,characterReferenceMarkerNumeric:vt,characterReferenceValue:ce,characterReference:Q,codeFenced:o(k),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:o(m),codeText:o(P),codeTextData:H,data:H,definition:o(),definitionDestinationString:S,definitionLabelString:h,definitionTitleString:g,emphasis:o(),hardBreakEscape:o(R),hardBreakTrailing:o(R),htmlFlow:o(L),htmlFlowData:H,htmlText:o(G),htmlTextData:H,image:o(ie),label:Ue,labelText:we,lineEnding:_,link:o(W),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Fe,resourceDestinationString:v,resourceTitleString:_e,resource:lt,setextHeading:o(C),setextHeadingLineSequence:w,setextHeadingText:E,strong:o(),thematicBreak:o()}};t1(t,(e||{}).mdastExtensions||[]);let n={};return a;function a(D){let X={type:"root",children:[]},fe={stack:[X],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:u,data:n},Ee=[],qe=-1;for(;++qe<D.length;)if(D[qe][1].type==="listOrdered"||D[qe][1].type==="listUnordered")if(D[qe][0]==="enter")Ee.push(qe);else{let Vn=Ee.pop();qe=r(D,Vn,qe)}for(qe=-1;++qe<D.length;){let Vn=t[D[qe][0]];e1.call(Vn,D[qe][1].type)&&Vn[D[qe][1].type].call(Object.assign({sliceSerialize:D[qe][2].sliceSerialize},fe),D[qe][1])}if(fe.tokenStack.length>0){let Vn=fe.tokenStack[fe.tokenStack.length-1];(Vn[1]||Wx).call(fe,void 0,Vn[0])}for(X.position={start:nr(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:nr(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)X=t.transforms[qe](X)||X;return X}function r(D,X,fe){let Ee=X-1,qe=-1,Vn=!1,sr,ea,Ki,Wi;for(;++Ee<=fe;){let fn=D[Ee];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?qe++:qe--,Wi=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(sr&&!Wi&&!qe&&!Ki&&(Ki=Ee),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!qe&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||qe===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(sr){let qr=Ee;for(ea=void 0;qr--;){let ta=D[qr];if(ta[1].type==="lineEnding"||ta[1].type==="lineEndingBlank"){if(ta[0]==="exit")continue;ea&&(D[ea][1].type="lineEndingBlank",Vn=!0),ta[1].type="lineEnding",ea=qr}else if(!(ta[1].type==="linePrefix"||ta[1].type==="blockQuotePrefix"||ta[1].type==="blockQuotePrefixWhitespace"||ta[1].type==="blockQuoteMarker"||ta[1].type==="listItemIndent"))break}Ki&&(!ea||Ki<ea)&&(sr._spread=!0),sr.end=Object.assign({},ea?D[ea][1].start:fn[1].end),D.splice(ea||Ee,0,["exit",sr,fn[2]]),Ee++,fe++}if(fn[1].type==="listItemPrefix"){let qr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};sr=qr,D.splice(Ee,0,["enter",qr,fn[2]]),Ee++,fe++,Ki=void 0,Wi=!0}}}return D[X][1]._spread=Vn,fe}function i(D,X){return fe;function fe(Ee){l.call(this,D(Ee),Ee),X&&X.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,X,fe){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([X,fe||void 0]),D.position={start:nr(X.start),end:void 0}}function o(D){return X;function X(fe){D&&D.call(this,fe),c.call(this,fe)}}function c(D,X){let fe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==D.type&&(X?X.call(this,D,Ee[0]):(Ee[1]||Wx).call(this,D,Ee[0]));else throw new Error("Cannot close `"+D.type+"` ("+Ka({start:D.start,end:D.end})+"): it\u2019s not open");fe.position.end=nr(D.end)}function u(){return bp(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){let X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function d(){let D=this.resume(),X=this.stack[this.stack.length-1];X.lang=D}function x(){let D=this.resume(),X=this.stack[this.stack.length-1];X.meta=D}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase()}function g(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function S(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function T(D){let X=this.stack[this.stack.length-1];if(!X.depth){let fe=this.sliceSerialize(D).length;X.depth=fe}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function w(D){let X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function U(D){let fe=this.stack[this.stack.length-1].children,Ee=fe[fe.length-1];(!Ee||Ee.type!=="text")&&(Ee=en(),Ee.position={start:nr(D.start),end:void 0},fe.push(Ee)),this.stack.push(Ee)}function H(D){let X=this.stack.pop();X.value+=this.sliceSerialize(D),X.position.end=nr(D.end)}function _(D){let X=this.stack[this.stack.length-1];if(this.data.atHardBreak){let fe=X.children[X.children.length-1];fe.position.end=nr(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(U.call(this,D),H.call(this,D))}function R(){this.data.atHardBreak=!0}function L(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function G(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function P(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function W(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ie(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function we(D){let X=this.sliceSerialize(D),fe=this.stack[this.stack.length-2];fe.label=Jx(X),fe.identifier=xa(X).toLowerCase()}function Ue(){let D=this.stack[this.stack.length-1],X=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){let Ee=D.children;fe.children=Ee}else fe.alt=X}function v(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function _e(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function lt(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function Fe(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function vt(D){this.data.characterReferenceType=D.type}function ce(D){let X=this.sliceSerialize(D),fe=this.data.characterReferenceType,Ee;fe?(Ee=kc(X,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Ui(X);let qe=this.stack[this.stack.length-1];qe.value+=Ee}function Q(D){let X=this.stack.pop();X.position.end=nr(D.end)}function F(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(D)}function V(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(D)}function B(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pl(){return{type:"emphasis",children:[]}}function $i(){return{type:"heading",depth:0,children:[]}}function Ji(){return{type:"break"}}function I(){return{type:"html",value:""}}function Y(){return{type:"image",title:null,url:"",alt:null}}function le(){return{type:"link",title:null,url:"",children:[]}}function He(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Pt(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function dn(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function en(){return{type:"text",value:""}}function ft(){return{type:"thematicBreak"}}}function nr(e){return{line:e.line,column:e.column,offset:e.offset}}function t1(e,t){let n=-1;for(;++n<t.length;){let a=t[n];Array.isArray(a)?t1(e,a):ZC(e,a)}}function ZC(e,t){let n;for(n in t)if(e1.call(t,n))switch(n){case"canContainEols":{let a=t[n];a&&e[n].push(...a);break}case"transforms":{let a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{let a=t[n];a&&Object.assign(e[n],a);break}}}function Wx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ka({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is still open")}var e1,n1=N(()=>{$0();$x();xp();Kx();Tc();Ec();pp();e1={}.hasOwnProperty});var a1=N(()=>{n1()});function Vc(e){let t=this;t.parser=n;function n(a){return Gp(a,tt(ee(ee({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}var r1=N(()=>{a1()});var i1=N(()=>{r1()});function s1(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var l1=N(()=>{""});function o1(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
13
|
-
`}]}var c1=
|
|
14
|
-
`:"",a={};t.lang&&(a.className=["language-"+t.lang]);let r={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}var d1=
|
|
12
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,a.push(s)}return a.join("")}var Gx=S(()=>{Me();Wa();wc()});function jp(e){let a={constructs:W0([qp,...(e||{}).extensions||[]]),content:r(sx),defined:[],document:r(cx),flow:r(Ux),lazy:{},string:r(Vx),text:r(Hx)};return a;function r(i){return s;function s(l){return Yx(a,i,l)}}}var Xx=S(()=>{ex();lx();ux();Px();Hp();Ix();Gx()});function Ip(e){for(;!Lc(e););return e}var Qx=S(()=>{kp()});function Yp(){let e=1,t="",n=!0,a;return r;function r(i,s,l){let o=[],c,u,p,f,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Fx.lastIndex=p,c=Fx.exec(i),f=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(f),!c){t=i.slice(p);break}if(d===10&&p===f&&a)o.push(-3),a=void 0;else switch(a&&(o.push(-5),a=void 0),p<f&&(o.push(i.slice(p,f)),e+=f-p),d){case 0:{o.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,o.push(-2);e++<u;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:a=!0,e=1}p=f+1}return l&&(a&&o.push(-5),t&&o.push(t),o.push(null)),o}}var Fx,Zx=S(()=>{Fx=/[\0\t\n\r]/g});var $x=S(()=>{Xx();Qx();Zx()});function Jx(e){return e.replace(XC,QC)}function QC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let r=n.charCodeAt(1),i=r===120||r===88;return kc(n.slice(i?2:1),i?16:10)}return Ui(n)||e}var XC,Kx=S(()=>{Ec();xp();XC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Gp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FC(n)(Ip(jp(n).document().write(Yp()(e,t,!0))))}function FC(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(le),autolinkProtocol:U,autolinkEmail:U,atxHeading:i($i),blockQuote:i(B),characterEscape:U,characterReference:U,codeFenced:i(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(J,s),codeText:i(he,s),codeTextData:U,data:U,codeFlowValue:U,definition:i(Xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Pl),hardBreakEscape:i(Ji),hardBreakTrailing:i(Ji),htmlFlow:i(I,s),htmlFlowData:U,htmlText:i(I,s),htmlTextData:U,image:i(Y),label:s,link:i(le),listItem:i(Bt),listItemValue:f,listOrdered:i(He,p),listUnordered:i(He),paragraph:i(dn),reference:b,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i($i),strong:i(Dt),thematicBreak:i(pt)},exit:{atxHeading:o(),atxHeadingSequence:w,autolink:o(),autolinkEmail:V,autolinkProtocol:F,blockQuote:o(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:vt,characterReferenceMarkerNumeric:vt,characterReferenceValue:ce,characterReference:Q,codeFenced:o(k),codeFencedFence:v,codeFencedFenceInfo:d,codeFencedFenceMeta:E,codeFlowValue:H,codeIndented:o(m),codeText:o(P),codeTextData:H,data:H,definition:o(),definitionDestinationString:x,definitionLabelString:h,definitionTitleString:g,emphasis:o(),hardBreakEscape:o(R),hardBreakTrailing:o(R),htmlFlow:o(L),htmlFlowData:H,htmlText:o(G),htmlTextData:H,image:o(ie),label:Ue,labelText:Ae,lineEnding:_,link:o(W),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Fe,resourceDestinationString:y,resourceTitleString:De,resource:ot,setextHeading:o(A),setextHeadingLineSequence:T,setextHeadingText:N,strong:o(),thematicBreak:o()}};t1(t,(e||{}).mdastExtensions||[]);let n={};return a;function a(D){let X={type:"root",children:[]},fe={stack:[X],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:u,data:n},Ee=[],qe=-1;for(;++qe<D.length;)if(D[qe][1].type==="listOrdered"||D[qe][1].type==="listUnordered")if(D[qe][0]==="enter")Ee.push(qe);else{let Vn=Ee.pop();qe=r(D,Vn,qe)}for(qe=-1;++qe<D.length;){let Vn=t[D[qe][0]];e1.call(Vn,D[qe][1].type)&&Vn[D[qe][1].type].call(Object.assign({sliceSerialize:D[qe][2].sliceSerialize},fe),D[qe][1])}if(fe.tokenStack.length>0){let Vn=fe.tokenStack[fe.tokenStack.length-1];(Vn[1]||Wx).call(fe,void 0,Vn[0])}for(X.position={start:nr(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:nr(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)X=t.transforms[qe](X)||X;return X}function r(D,X,fe){let Ee=X-1,qe=-1,Vn=!1,sr,ea,Ki,Wi;for(;++Ee<=fe;){let fn=D[Ee];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?qe++:qe--,Wi=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(sr&&!Wi&&!qe&&!Ki&&(Ki=Ee),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!qe&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||qe===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(sr){let qr=Ee;for(ea=void 0;qr--;){let ta=D[qr];if(ta[1].type==="lineEnding"||ta[1].type==="lineEndingBlank"){if(ta[0]==="exit")continue;ea&&(D[ea][1].type="lineEndingBlank",Vn=!0),ta[1].type="lineEnding",ea=qr}else if(!(ta[1].type==="linePrefix"||ta[1].type==="blockQuotePrefix"||ta[1].type==="blockQuotePrefixWhitespace"||ta[1].type==="blockQuoteMarker"||ta[1].type==="listItemIndent"))break}Ki&&(!ea||Ki<ea)&&(sr._spread=!0),sr.end=Object.assign({},ea?D[ea][1].start:fn[1].end),D.splice(ea||Ee,0,["exit",sr,fn[2]]),Ee++,fe++}if(fn[1].type==="listItemPrefix"){let qr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};sr=qr,D.splice(Ee,0,["enter",qr,fn[2]]),Ee++,fe++,Ki=void 0,Wi=!0}}}return D[X][1]._spread=Vn,fe}function i(D,X){return fe;function fe(Ee){l.call(this,D(Ee),Ee),X&&X.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,X,fe){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([X,fe||void 0]),D.position={start:nr(X.start),end:void 0}}function o(D){return X;function X(fe){D&&D.call(this,fe),c.call(this,fe)}}function c(D,X){let fe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==D.type&&(X?X.call(this,D,Ee[0]):(Ee[1]||Wx).call(this,D,Ee[0]));else throw new Error("Cannot close `"+D.type+"` ("+Ka({start:D.start,end:D.end})+"): it\u2019s not open");fe.position.end=nr(D.end)}function u(){return bp(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){let X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function d(){let D=this.resume(),X=this.stack[this.stack.length-1];X.lang=D}function E(){let D=this.resume(),X=this.stack[this.stack.length-1];X.meta=D}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase()}function g(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function x(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function w(D){let X=this.stack[this.stack.length-1];if(!X.depth){let fe=this.sliceSerialize(D).length;X.depth=fe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function T(D){let X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function U(D){let fe=this.stack[this.stack.length-1].children,Ee=fe[fe.length-1];(!Ee||Ee.type!=="text")&&(Ee=tn(),Ee.position={start:nr(D.start),end:void 0},fe.push(Ee)),this.stack.push(Ee)}function H(D){let X=this.stack.pop();X.value+=this.sliceSerialize(D),X.position.end=nr(D.end)}function _(D){let X=this.stack[this.stack.length-1];if(this.data.atHardBreak){let fe=X.children[X.children.length-1];fe.position.end=nr(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(U.call(this,D),H.call(this,D))}function R(){this.data.atHardBreak=!0}function L(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function G(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function P(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function W(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ie(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function Ae(D){let X=this.sliceSerialize(D),fe=this.stack[this.stack.length-2];fe.label=Jx(X),fe.identifier=xa(X).toLowerCase()}function Ue(){let D=this.stack[this.stack.length-1],X=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){let Ee=D.children;fe.children=Ee}else fe.alt=X}function y(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function De(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function ot(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function Fe(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function vt(D){this.data.characterReferenceType=D.type}function ce(D){let X=this.sliceSerialize(D),fe=this.data.characterReferenceType,Ee;fe?(Ee=kc(X,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Ui(X);let qe=this.stack[this.stack.length-1];qe.value+=Ee}function Q(D){let X=this.stack.pop();X.position.end=nr(D.end)}function F(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(D)}function V(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(D)}function B(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pl(){return{type:"emphasis",children:[]}}function $i(){return{type:"heading",depth:0,children:[]}}function Ji(){return{type:"break"}}function I(){return{type:"html",value:""}}function Y(){return{type:"image",title:null,url:"",alt:null}}function le(){return{type:"link",title:null,url:"",children:[]}}function He(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Bt(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function dn(){return{type:"paragraph",children:[]}}function Dt(){return{type:"strong",children:[]}}function tn(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function nr(e){return{line:e.line,column:e.column,offset:e.offset}}function t1(e,t){let n=-1;for(;++n<t.length;){let a=t[n];Array.isArray(a)?t1(e,a):ZC(e,a)}}function ZC(e,t){let n;for(n in t)if(e1.call(t,n))switch(n){case"canContainEols":{let a=t[n];a&&e[n].push(...a);break}case"transforms":{let a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{let a=t[n];a&&Object.assign(e[n],a);break}}}function Wx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ka({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is still open")}var e1,n1=S(()=>{$0();$x();xp();Kx();Tc();Ec();pp();e1={}.hasOwnProperty});var a1=S(()=>{n1()});function Vc(e){let t=this;t.parser=n;function n(a){return Gp(a,at(ee(ee({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}var r1=S(()=>{a1()});var i1=S(()=>{r1()});function s1(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var l1=S(()=>{""});function o1(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
13
|
+
`}]}var c1=S(()=>{""});function u1(e,t){let n=t.value?t.value+`
|
|
14
|
+
`:"",a={};t.lang&&(a.className=["language-"+t.lang]);let r={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}var d1=S(()=>{""});function f1(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var p1=S(()=>{""});function m1(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var h1=S(()=>{""});function g1(e,t){let n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),r=Pn(a.toLowerCase()),i=e.footnoteOrder.indexOf(a),s,l=e.footnoteCounts.get(a);l===void 0?(l=0,e.footnoteOrder.push(a),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(a,l);let o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);let c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}var v1=S(()=>{_r()});function y1(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var b1=S(()=>{""});function x1(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}var S1=S(()=>{""});function Hc(e,t){let n=t.referenceType,a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];let r=e.all(t),i=r[0];i&&i.type==="text"?i.value="["+i.value:r.unshift({type:"text",value:"["});let s=r[r.length-1];return s&&s.type==="text"?s.value+=a:r.push({type:"text",value:a}),r}var Xp=S(()=>{""});function N1(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Hc(e,t);let r={src:Pn(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(r.title=a.title);let i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}var E1=S(()=>{_r();Xp()});function k1(e,t){let n={src:Pn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}var T1=S(()=>{_r()});function w1(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}var A1=S(()=>{""});function C1(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Hc(e,t);let r={href:Pn(a.url||"")};a.title!==null&&a.title!==void 0&&(r.title=a.title);let i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}var R1=S(()=>{_r();Xp()});function _1(e,t){let n={href:Pn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var D1=S(()=>{_r()});function O1(e,t,n){let a=e.all(t),r=n?$C(n):L1(t),i={},s=[];if(typeof t.checked=="boolean"){let u=a[0],p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},a.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<a.length;){let u=a[l];(r||l!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
15
15
|
`}),u.type==="element"&&u.tagName==="p"&&!r?s.push(...u.children):s.push(u)}let o=a[a.length-1];o&&(r||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
16
|
-
`});let c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)}function $C(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let n=e.children,a=-1;for(;!t&&++a<n.length;)t=L1(n[a])}return t}function L1(e){let t=e.spread;return t==null?e.children.length>1:t}var z1=
|
|
16
|
+
`});let c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)}function $C(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let n=e.children,a=-1;for(;!t&&++a<n.length;)t=L1(n[a])}return t}function L1(e){let t=e.spread;return t==null?e.children.length>1:t}var z1=S(()=>{""});function M1(e,t){let n={},a=e.all(t),r=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++r<a.length;){let s=a[r];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}var U1=S(()=>{""});function P1(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var B1=S(()=>{""});function V1(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}var H1=S(()=>{""});function q1(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var j1=S(()=>{""});function I1(e,t){let n=e.all(t),a=n.shift(),r=[];if(a){let s={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],s),r.push(s)}if(n.length>0){let s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Mi(t.children[1]),o=xc(t.children[t.children.length-1]);l&&o&&(s.position={start:l,end:o}),r.push(s)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}var Y1=S(()=>{Sc()});function G1(e,t,n){let a=n?n.children:void 0,i=(a?a.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length,o=-1,c=[];for(;++o<l;){let p=t.children[o],f={},d=s?s[o]:void 0;d&&(f.align=d);let E={type:"element",tagName:i,properties:f,children:[]};p&&(E.children=e.all(p),e.patch(p,E),E=e.applyData(p,E)),c.push(E)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}var X1=S(()=>{""});function Q1(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var F1=S(()=>{""});function $1(e){let t=String(e),n=/\r?\n|\r/g,a=n.exec(t),r=0,i=[];for(;a;)i.push(Z1(t.slice(r,a.index),r>0,!0),a[0]),r=a.index+a[0].length,a=n.exec(t);return i.push(Z1(t.slice(r),r>0,!1)),i.join("")}function Z1(e,t,n){let a=0,r=e.length;if(t){let i=e.codePointAt(a);for(;i===9||i===32;)a++,i=e.codePointAt(a)}if(n){let i=e.codePointAt(r-1);for(;i===9||i===32;)r--,i=e.codePointAt(r-1)}return r>a?e.slice(a,r):""}var J1=S(()=>{});function K1(e,t){let n={type:"text",value:$1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}var W1=S(()=>{J1()});function eS(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var tS=S(()=>{""});function qc(){}var nS,aS=S(()=>{l1();c1();d1();p1();h1();v1();b1();S1();E1();T1();A1();R1();D1();z1();U1();B1();H1();j1();Y1();X1();F1();W1();tS();nS={blockquote:s1,break:o1,code:u1,delete:f1,emphasis:m1,footnoteReference:g1,heading:y1,html:x1,imageReference:N1,image:k1,inlineCode:w1,linkReference:C1,link:_1,listItem:O1,list:M1,paragraph:P1,root:V1,strong:q1,table:I1,tableCell:Q1,tableRow:G1,text:K1,thematicBreak:eS,toml:qc,yaml:qc,definition:qc,footnoteDefinition:qc}});var rS,e2,Zp,cS=S(()=>{rS=typeof self=="object"?self:globalThis,e2=(e,t)=>{let n=(r,i)=>(e.set(i,r),r),a=r=>{if(e.has(r))return e.get(r);let[i,s]=t[r];switch(i){case 0:case-1:return n(s,r);case 1:{let l=n([],r);for(let o of s)l.push(a(o));return l}case 2:{let l=n({},r);for(let[o,c]of s)l[a(o)]=a(c);return l}case 3:return n(new Date(s),r);case 4:{let{source:l,flags:o}=s;return n(new RegExp(l,o),r)}case 5:{let l=n(new Map,r);for(let[o,c]of s)l.set(a(o),a(c));return l}case 6:{let l=n(new Set,r);for(let o of s)l.add(a(o));return l}case 7:{let{name:l,message:o}=s;return n(new rS[l](o),r)}case 8:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new rS[i](s),r)};return a},Zp=e=>e2(new Map,e)(0)});var Bi,t2,n2,yl,Ic,a2,$p,uS=S(()=>{Bi="",{toString:t2}={},{keys:n2}=Object,yl=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let n=t2.call(e).slice(8,-1);switch(n){case"Array":return[1,Bi];case"Object":return[2,Bi];case"Date":return[3,Bi];case"RegExp":return[4,Bi];case"Map":return[5,Bi];case"Set":return[6,Bi];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Ic=([e,t])=>e===0&&(t==="function"||t==="symbol"),a2=(e,t,n,a)=>{let r=(s,l)=>{let o=a.push(s)-1;return n.set(l,o),o},i=s=>{if(n.has(s))return n.get(s);let[l,o]=yl(s);switch(l){case 0:{let u=s;switch(o){case"bigint":l=8,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);u=null;break;case"undefined":return r([-1],s)}return r([l,u],s)}case 1:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),r([o,[...f]],s)}let u=[],p=r([l,u],s);for(let f of s)u.push(i(f));return p}case 2:{if(o)switch(o){case"BigInt":return r([o,s.toString()],s);case"Boolean":case"Number":case"String":return r([o,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());let u=[],p=r([l,u],s);for(let f of n2(s))(e||!Ic(yl(s[f])))&&u.push([i(f),i(s[f])]);return p}case 3:return r([l,s.toISOString()],s);case 4:{let{source:u,flags:p}=s;return r([l,{source:u,flags:p}],s)}case 5:{let u=[],p=r([l,u],s);for(let[f,d]of s)(e||!(Ic(yl(f))||Ic(yl(d))))&&u.push([i(f),i(d)]);return p}case 6:{let u=[],p=r([l,u],s);for(let f of s)(e||!Ic(yl(f)))&&u.push(i(f));return p}}let{message:c}=s;return r([l,{name:o,message:c}],s)};return i},$p=(e,{json:t,lossy:n}={})=>{let a=[];return a2(!(t||n),!!t,new Map,a)(e),a}});var Vi,Jp=S(()=>{cS();uS();Vi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zp($p(e,t)):structuredClone(e):(e,t)=>Zp($p(e,t))});function r2(e,t){let n=[{type:"text",value:"\u21A9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function i2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dS(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||r2,a=e.options.footnoteBackLabel||i2,r=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],o=-1;for(;++o<e.footnoteOrder.length;){let c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;let u=e.all(c),p=String(c.identifier).toUpperCase(),f=Pn(p.toLowerCase()),d=0,E=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++d<=v;){E.length>0&&E.push({type:"text",value:" "});let h=typeof n=="string"?n:n(o,d);typeof h=="string"&&(h={type:"text",value:h}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(o,d),className:["data-footnote-backref"]},children:Array.isArray(h)?h:[h]})}let k=u[u.length-1];if(k&&k.type==="element"&&k.tagName==="p"){let h=k.children[k.children.length-1];h&&h.type==="text"?h.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else u.push(...E);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,m),l.push(m)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:at(ee({},Vi(s)),{id:"footnote-label"}),children:[{type:"text",value:r}]},{type:"text",value:`
|
|
17
17
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
18
|
-
`}]}}var fS=
|
|
18
|
+
`}]}}var fS=S(()=>{Jp();_r()});function s2(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yc(e[n]);return Gc(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function l2(e){let t=e;return Gc(n);function n(a){let r=a,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function o2(e){return Gc(t);function t(n){return n&&n.type===e}}function Gc(e){return t;function t(n,a,r){return!!(u2(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function c2(){return!0}function u2(e){return e!==null&&typeof e=="object"&&"type"in e}var Yc,pS=S(()=>{Yc=(function(e){if(e==null)return c2;if(typeof e=="function")return Gc(e);if(typeof e=="object")return Array.isArray(e)?s2(e):l2(e);if(typeof e=="string")return o2(e);throw new Error("Expected function, string, or object as test")})});var mS=S(()=>{pS()});function em(e,t,n,a){let r;typeof t=="function"&&typeof n!="function"?(a=n,n=t):r=t;let i=Yc(r),s=a?-1:1;l(e,void 0,[])();function l(o,c,u){let p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){let d=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=hS,E,v,k;if((!t||i(o,c,u[u.length-1]||void 0))&&(d=d2(n(o,u)),d[0]===Xc))return d;if("children"in o&&o.children){let m=o;if(m.children&&d[0]!==Wp)for(v=(a?m.children.length:-1)+s,k=u.concat(m);v>-1&&v<m.children.length;){let h=m.children[v];if(E=l(h,v,k)(),E[0]===Xc)return E;v=typeof E[1]=="number"?E[1]:v+s}}return d}}}function d2(e){return Array.isArray(e)?e:typeof e=="number"?[Kp,e]:e==null?hS:[e]}var hS,Kp,Xc,Wp,gS=S(()=>{mS();hS=[],Kp=!0,Xc=!1,Wp="skip"});var vS=S(()=>{gS()});function bl(e,t,n,a){let r,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,r=n):(i=t,s=n,r=a),em(e,i,l,r);function l(o,c){let u=c[c.length-1],p=u?u.children.indexOf(o):void 0;return s(o,p,u)}}var yS=S(()=>{vS()});var tm=S(()=>{yS()});function xS(e,t){let n=t||f2,a=new Map,r=new Map,i=new Map,s=ee(ee({},nS),n.handlers),l={all:c,applyData:m2,definitionById:a,footnoteById:r,footnoteCounts:i,footnoteOrder:[],handlers:s,one:o,options:n,patch:p2,wrap:g2};return bl(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){let p=u.type==="definition"?a:r,f=String(u.identifier).toUpperCase();p.has(f)||p.set(f,u)}}),l;function o(u,p){let f=u.type,d=l.handlers[f];if(nm.call(l.handlers,f)&&d)return d(l,u,p);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in u){let v=u,{children:k}=v,m=fh(v,["children"]),h=Vi(m);return h.children=l.all(u),h}return Vi(u)}return(l.options.unknownHandler||h2)(l,u,p)}function c(u){let p=[];if("children"in u){let f=u.children,d=-1;for(;++d<f.length;){let E=l.one(f[d],u);if(E){if(d&&f[d-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=bS(E.value)),!Array.isArray(E)&&E.type==="element")){let v=E.children[0];v&&v.type==="text"&&(v.value=bS(v.value))}Array.isArray(E)?p.push(...E):p.push(E)}}}return p}}function p2(e,t){e.position&&(t.position=dp(e))}function m2(e,t){let n=t;if(e&&e.data){let a=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{let s="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,Vi(i)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function h2(e,t){let n=t.data||{},a="value"in t&&!(nm.call(n,"hProperties")||nm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function g2(e,t){let n=[],a=-1;for(t&&n.push({type:"text",value:`
|
|
19
19
|
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
20
20
|
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
21
|
-
`}),n}function bS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var nm,f2,SS=
|
|
22
|
-
`},r)),i}var NS=N(()=>{fS();SS()});var ES=N(()=>{NS()});function Fc(e,t){return e&&"run"in e?function(n,a){return O(this,null,function*(){let r=Qc(n,ee({file:a},t));yield e.run(r,a)})}:function(n,a){return Qc(n,ee({file:a},e||t))}}var kS=N(()=>{ES()});var TS=N(()=>{kS()});function am(e){if(e)throw e}var wS=N(()=>{});var MS=Bt((hz,zS)=>{"use strict";var Zc=Object.prototype.hasOwnProperty,LS=Object.prototype.toString,AS=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,RS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):LS.call(t)==="[object Array]"},_S=function(t){if(!t||LS.call(t)!=="[object Object]")return!1;var n=Zc.call(t,"constructor"),a=t.constructor&&t.constructor.prototype&&Zc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!a)return!1;var r;for(r in t);return typeof r=="undefined"||Zc.call(t,r)},DS=function(t,n){AS&&n.name==="__proto__"?AS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},OS=function(t,n){if(n==="__proto__")if(Zc.call(t,n)){if(CS)return CS(t,n).value}else return;return t[n]};zS.exports=function e(){var t,n,a,r,i,s,l=arguments[0],o=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},o=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)a=OS(l,n),r=OS(t,n),l!==r&&(u&&r&&(_S(r)||(i=RS(r)))?(i?(i=!1,s=a&&RS(a)?a:[]):s=a&&_S(a)?a:{},DS(l,{name:n,newValue:e(u,s,r)})):typeof r!="undefined"&&DS(l,{name:n,newValue:r}));return l}});function xl(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var US=N(()=>{});function rm(){let e=[],t={run:n,use:a};return t;function n(...r){let i=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...r);function l(o,...c){let u=e[++i],p=-1;if(o){s(o);return}for(;++p<r.length;)(c[p]===null||c[p]===void 0)&&(c[p]=r[p]);r=c,u?PS(u,l)(...c):s(null,...c)}}function a(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function PS(e,t){let n;return a;function a(...s){let l=e.length>s.length,o;l&&s.push(r);try{o=e.apply(this,s)}catch(c){let u=c;if(l&&n)throw u;return r(u)}l||(o&&o.then&&typeof o.then=="function"?o.then(i,r):o instanceof Error?r(o):i(o))}function r(s,...l){n||(n=!0,t(s,...l))}function i(s){r(null,s)}}var BS=N(()=>{});var VS=N(()=>{BS()});function v2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Sl(e);let n=0,a=-1,r=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else a<0&&(i=!0,a=r+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let s=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else s<0&&(i=!0,s=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(a=r):(l=-1,a=s));return n===a?a=s:a<0&&(a=e.length),e.slice(n,a)}function y2(e){if(Sl(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b2(e){Sl(e);let t=e.length,n=-1,a=0,r=-1,i=0,s;for(;t--;){let l=e.codePointAt(t);if(l===47){if(s){a=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?r<0?r=t:i!==1&&(i=1):r>-1&&(i=-1)}return r<0||n<0||i===0||i===1&&r===n-1&&r===a+1?"":e.slice(r,n)}function x2(...e){let t=-1,n;for(;++t<e.length;)Sl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":S2(n)}function S2(e){Sl(e);let t=e.codePointAt(0)===47,n=N2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function N2(e,t){let n="",a=0,r=-1,i=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(r===s-1||i===1))if(r!==s-1&&i===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",a=0):(n=n.slice(0,o),a=n.length-1-n.lastIndexOf("/")),r=s,i=0;continue}}else if(n.length>0){n="",a=0,r=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(r+1,s):n=e.slice(r+1,s),a=s-r-1;r=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Sl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var In,HS=N(()=>{In={basename:v2,dirname:y2,extname:b2,join:x2,sep:"/"}});function E2(){return"/"}var qS,jS=N(()=>{qS={cwd:E2}});function Hi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var im=N(()=>{});function IS(e){if(typeof e=="string")e=new URL(e);else if(!Hi(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return k2(e)}function k2(e){if(e.hostname!==""){let a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let a=t.codePointAt(n+2);if(a===70||a===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var YS=N(()=>{im();im()});function lm(e,t){if(e&&e.includes(In.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+In.sep+"`")}function om(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function T2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var sm,zr,XS=N(()=>{mp();HS();jS();YS();sm=["history","path","basename","stem","extname","dirname"],zr=class{constructor(t){let n;t?Hi(t)?n={path:t}:typeof t=="string"||T2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<sm.length;){let i=sm[a];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)sm.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?In.basename(this.path):void 0}set basename(t){om(t,"basename"),lm(t,"basename"),this.path=In.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?In.dirname(this.path):void 0}set dirname(t){GS(this.basename,"dirname"),this.path=In.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?In.extname(this.path):void 0}set extname(t){if(lm(t,"extname"),GS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=In.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hi(t)&&(t=IS(t)),om(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?In.basename(this.path,this.extname):void 0}set stem(t){om(t,"stem"),lm(t,"stem"),this.path=In.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){let r=this.message(t,n,a);throw r.fatal=!0,r}info(t,n,a){let r=this.message(t,n,a);return r.fatal=void 0,r}message(t,n,a){let r=new ut(t,n,a);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var cm=N(()=>{XS()});var QS,FS=N(()=>{QS=(function(e){let a=this.constructor.prototype,r=a[e],i=function(){return r.apply(i,arguments)};return Object.setPrototypeOf(i,a),i})});function um(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZS(e){if(!xl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $S(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $c(e){return A2(e)?e:new zr(e)}function A2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function C2(e){return typeof e=="string"||R2(e)}function R2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Jc,w2,pm,mm,JS=N(()=>{wS();Jc=Z(MS(),1);US();VS();cm();FS();w2={}.hasOwnProperty,pm=class e extends QS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let a=this.attachers[n];t.use(...a)}return t.data((0,Jc.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fm("data",this.frozen),this.namespace[t]=n,this):w2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);let r=n.call(t,...a);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=$c(t),a=this.parser||this.Parser;return um("parse",a),a(String(n),n)}process(t,n){let a=this;return this.freeze(),um("process",this.parser||this.Parser),dm("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(i,s){let l=$c(t),o=a.parse(l);a.run(o,l,function(u,p,f){if(u||!p||!f)return c(u);let d=p,x=a.stringify(d,f);C2(x)?f.value=x:f.result=x,c(u,f)});function c(u,p){u||!p?s(u):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,a;return this.freeze(),um("processSync",this.parser||this.Parser),dm("processSync",this.compiler||this.Compiler),this.process(t,r),$S("processSync","process",n),a;function r(i,s){n=!0,am(i),a=s}}run(t,n,a){ZS(t),this.freeze();let r=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?i(void 0,a):new Promise(i);function i(s,l){let o=$c(n);r.run(t,o,c);function c(u,p,f){let d=p||t;u?l(u):s?s(d):a(void 0,d,f)}}}runSync(t,n){let a=!1,r;return this.run(t,n,i),$S("runSync","run",a),r;function i(s,l){am(s),r=l,a=!0}}stringify(t,n){this.freeze();let a=$c(n),r=this.compiler||this.Compiler;return dm("stringify",r),ZS(t),r(t,a)}use(t,...n){let a=this.attachers,r=this.namespace;if(fm("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...p]=c;o(u,p)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(r.settings=(0,Jc.default)(!0,r.settings,c.settings))}function l(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let p=c[u];i(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,u){let p=-1,f=-1;for(;++p<a.length;)if(a[p][0]===c){f=p;break}if(f===-1)a.push([c,...u]);else if(u.length>0){let[d,...x]=u,y=a[f][1];xl(y)&&xl(d)&&(d=(0,Jc.default)(!0,y,d)),a[f]=[c,d,...x]}}}},mm=new pm().freeze()});var KS=N(()=>{JS()});function Nl(e){let t=L2(e),n=z2(e);return M2(t.runSync(t.parse(n),n),e)}function L2(e){let t=e.rehypePlugins||WS,n=e.remarkPlugins||WS,a=e.remarkRehypeOptions?ee(ee({},e.remarkRehypeOptions),eN):eN;return mm().use(Vc).use(n).use(Fc,a).use(t)}function z2(e){let t=e.children||"",n=new zr;return typeof t=="string"?n.value=t:(""+t,void 0),n}function M2(e,t){let n=t.allowedElements,a=t.allowElement,r=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,o=t.urlTransform||nN;for(let u of O2)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+_2+u.id,void 0);return n&&i&&void 0,bl(e,c),gp(e,{Fragment:qi.Fragment,components:r,ignoreInvalidStyle:!0,jsx:qi.jsx,jsxs:qi.jsxs,passKeys:!0,passNode:!0});function c(u,p,f){if(u.type==="raw"&&f&&typeof p=="number")return s?f.children.splice(p,1):f.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let d;for(d in dl)if(Object.hasOwn(dl,d)&&Object.hasOwn(u.properties,d)){let x=u.properties[d],y=dl[d];(y===null||y.includes(u.tagName))&&(u.properties[d]=o(String(x||""),d,u))}}if(u.type==="element"){let d=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!d&&a&&typeof p=="number"&&(d=!a(u,p,f)),d&&f&&typeof p=="number")return l&&u.children?f.children.splice(p,1,...u.children):f.children.splice(p,1),p}}}function nN(e){let t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||n!==-1&&t>n||a!==-1&&t>a||D2.test(e.slice(0,t))?e:""}var qi,tN,_2,WS,eN,D2,O2,aN=N(()=>{q0();I0();qi=Z(oe(),1),tN=Z($e(),1);i1();TS();KS();tm();cm();_2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",WS=[],eN={allowDangerousHtml:!0},D2=/^(https?|ircs?|mailto|xmpp)$/i,O2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}]});var hm=N(()=>{aN()});var Re,ve,gm,re,Zt=N(()=>{"use strict";Re={LUA_API:"https://api.heylua.ai",DEV_SERVER:"https://api.heylua.ai",LOCAL_DEV:""},ve={CHAT_GENERATE:e=>`${Re.LUA_API}/chat/generate/${e}?channel=dev`,TOOLS_TEST:e=>`${Re.LUA_API}/tools/test/${e}`,CHAT_HISTORY:e=>`${Re.LUA_API}/chat/history/${e}`,AGENT_TYPES:`${Re.LUA_API}/agents/self-serve/types`,CREATE_AGENT:`${Re.LUA_API}/agents/self-serve/create`,AGENT_DETAILS:e=>`${Re.LUA_API}/admin/agents/${e}`,SKILL_VERSIONS:(e,t)=>`${Re.DEV_SERVER}/developer/skills/${e}/${t}/versions`,PERSONA_VERSIONS:e=>`${Re.LUA_API}/developer/agents/${e}/persona/versions`,DEPLOY_PERSONA_VERSION:(e,t)=>`${Re.LUA_API}/developer/agents/${e}/persona/version/${t}`,AGENT_RESOURCES:e=>`${Re.LUA_API}/admin/agents/${e}/resources`,AGENT_RESOURCE:(e,t)=>`${Re.LUA_API}/admin/agents/${e}/resources/${t}`,AGENT_SKILLS:e=>`${Re.LUA_API}/developer/skills/${e}`,ACTIVATE_SKILL:(e,t)=>`${Re.LUA_API}/developer/skills/${e}/${t}`,PUBLISH_SKILL_VERSION:(e,t,n)=>`${Re.LUA_API}/developer/skills/${e}/${t}/${n}/publish`,PRODUCTION_LOGS:e=>`${Re.LUA_API}/developer/agents/${e}/logs`,PRODUCTION_ENV:e=>`${Re.LUA_API}/developer/agents/${e}/env`,AGENT_PRODUCTS:e=>`${Re.LUA_API}/developer/agents/${e}/products`,AGENT_PRODUCT:(e,t)=>`${Re.LUA_API}/developer/agents/${e}/products/${t}`,SEARCH_PRODUCTS:e=>`${Re.LUA_API}/developer/agents/${e}/products/search`,CREATE_SKILL:e=>`${Re.DEV_SERVER}/developer/skills/${e}`,DEVELOPER_LOGS:(e,t)=>`${Re.DEV_SERVER}/developer/skills/${e}/${t}/logs`,USER_DATA:e=>`${Re.DEV_SERVER}/developer/user/data/agent/${e}`,LOCAL_CHAT:`${Re.LOCAL_DEV}/chat`,LOCAL_PERSONA:`${Re.LOCAL_DEV}/persona`,LOCAL_TOOLS:`${Re.LOCAL_DEV}/tools`,LOCAL_TOOLS_TEST:`${Re.LOCAL_DEV}/tools/test`,LOCAL_ENV:`${Re.LOCAL_DEV}/env`},gm=class{constructor(t=""){this.baseUrl=t}getAllSkillOverrides(){return O(this,null,function*(){try{let n=yield(yield fetch("/api/skills")).json();return n.success&&n.skills&&Array.isArray(n.skills)?n.skills.map(a=>({skillId:a.skillId,sandboxId:a.sandboxId||a.skillId})).filter(a=>a.skillId&&a.sandboxId):[]}catch(t){return console.error("Error getting skill overrides:",t),[]}})}sendChatMessage(t,n,a,r,i,s){return O(this,null,function*(){try{let l=yield this.getAllSkillOverrides(),o=l.length>0?l:[{skillId:a,sandboxId:r}],c=ee({messages:[{type:"text",text:t}],navigate:!0,skillOverride:o},s&&{personaOverride:s}),u=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(c)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return{success:!0,text:(yield u.json()).text||"No response received"}}catch(l){return console.error("Chat API error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}sendProductionChatMessage(t,n,a){return O(this,null,function*(){try{let r={messages:[{type:"text",text:t}],navigate:!0,skillOverride:[]},i=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,text:(yield i.json()).text||"No response received"}}catch(r){return console.error("Production chat API error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}sendLocalChatMessage(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_CHAT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,persona:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local chat API error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadPersona(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_PERSONA);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load persona error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load persona"}}})}savePersona(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_PERSONA,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({persona:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save persona error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save persona"}}})}loadTools(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_TOOLS);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load tools error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load tools"}}})}testTool(t,n,a,r,i,s){return O(this,null,function*(){try{let l={toolName:t,inputs:n,skillOverride:[{skillId:r,sandboxId:i}]},o=yield fetch(ve.TOOLS_TEST(a),{method:"POST",headers:{"Content-Type":"application/json",Authorization:s},body:JSON.stringify(l)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);let c=yield o.json();return{success:!0,result:c.result||c}}catch(l){return console.error("Tool test error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}getSkillVersions(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.SKILL_VERSIONS(n,t),{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,versions:(yield r.json()).versions||[]}}catch(r){return console.error("Error fetching skill versions:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(`${Re.DEV_SERVER}/developer/agents/${t}/persona/versions`,{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}getProductionPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.PERSONA_VERSIONS(t),{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching production persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}deployPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.DEPLOY_PERSONA_VERSION(t,a),{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({})});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error deploying persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${Re.DEV_SERVER}/developer/agents/${t}/persona/version`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({persona:a})});if(!r.ok){let s=yield r.text();throw new Error(`HTTP error! status: ${r.status}, message: ${s}`)}return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createSkillVersion(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(`${Re.DEV_SERVER}/developer/skills/${n}/${t}/version`,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){let l=yield i.text();throw new Error(`HTTP error! status: ${i.status}, message: ${l}`)}return{success:!0,data:yield i.json()}}catch(i){return console.error("Error creating skill version:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadEnvContent(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_ENV);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load env error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load environment variables"}}})}saveEnvContent(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_ENV,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save env error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save environment variables"}}})}testLocalTool(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_TOOLS_TEST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:t,inputs:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local tool test error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Response status:",a.status),console.log("ApiService: Response headers:",a.headers),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Chat history load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0}}catch(a){return console.error("Clear chat history error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearSandboxLogs(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Clearing sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let r=yield fetch(ve.DEVELOPER_LOGS(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear logs response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Clear logs response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Clear sandbox logs error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadAllSandboxLogs(t,n,a=20){return O(this,null,function*(){try{let r=yield this.getAllSkillOverrides();if(r.length===0)return{success:!0,data:{logs:[]}};let i=r.map(o=>O(this,null,function*(){try{let c=yield this.loadSandboxLogs(t,n,o.sandboxId,a);return c.success&&c.data&&c.data.logs?c.data.logs.map(u=>tt(ee({},u),{skillName:o.skillId,sandboxId:o.sandboxId})):[]}catch(c){return console.error(`Error loading logs for skill ${o.skillId}:`,c),[]}}));return{success:!0,data:{logs:(yield Promise.all(i)).flat().sort((o,c)=>new Date(c.timestamp).getTime()-new Date(o.timestamp).getTime()).slice(0,a)}}}catch(r){return console.error("Error loading all sandbox logs:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred",data:{logs:[]}}}})}loadSandboxLogs(t,n,a,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let i=yield fetch(`${ve.DEVELOPER_LOGS(n,a)}?limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Received logs data:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Sandbox logs load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading user data with API key:",t,"agentId:",n),console.log("ApiService: API key length:",t==null?void 0:t.length),console.log("ApiService: API key starts with:",t==null?void 0:t.substring(0,10));let a=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: User data response status:",a.status),console.log("ApiService: Response headers:",Object.fromEntries(a.headers.entries())),!a.ok){let i=yield a.text();if(console.error("ApiService: HTTP error response:",i),a.status===401){console.log("ApiService: Trying alternative authentication method...");let s=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:t}});if(s.ok){let l=yield s.json();return console.log("ApiService: Alternative auth successful:",l),{success:!0,data:l}}}throw new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received user data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: User data load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}saveUserData(t,n,a){return O(this,null,function*(){return this.updateUserData(t,n,a)})}getUserData(t,n){return O(this,null,function*(){return this.loadUserData(t,n)})}updateUserData(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating user data with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.USER_DATA(n),{method:"PUT",headers:{accept:"*/*",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update user data response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Updated user data response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update user data error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadResources(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading resources with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_RESOURCES(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Resources response status:",a.status),!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let r=yield a.json();return console.log("ApiService: Resources data:",r),{success:!0,data:r||[]}}catch(a){return console.error("ApiService: Error loading resources:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCES(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateResource(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("Error updating resource:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}deleteResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0}}catch(r){return console.error("Error deleting resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}clearUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing user data with API key:",t,"agentId:",n);let a=yield fetch(ve.USER_DATA(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear user data response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Clear user data response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Clear user data error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createSkill(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.CREATE_SKILL(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({name:a.name,description:a.description||`A Lua skill for ${a.name}`,context:a.context||""})});if(!r.ok){let s=yield r.text();return{success:!1,error:{message:`HTTP ${r.status}: ${s}`}}}return{success:!0,data:yield r.json()}}catch(r){return{success:!1,error:{message:r instanceof Error?r.message:"Unknown error"}}}})}getAgentTypes(t){return O(this,null,function*(){try{let n=yield fetch(ve.AGENT_TYPES,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Error fetching agent types:",n),[]}})}createAgent(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.CREATE_AGENT,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(n)});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getAgentDetails(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.AGENT_DETAILS(n),{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getSkills(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading skills with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_SKILLS(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Skills response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received skills data:",r),{success:!0,skills:r.skills||[]}}catch(a){return console.error("ApiService: Skills load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}activateSkill(t,n,a,r){return O(this,null,function*(){try{console.log(`ApiService: ${r?"Activating":"Deactivating"} skill:`,a,"for agent:",n);let i=yield fetch(ve.ACTIVATE_SKILL(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({active:r})});if(console.log("ApiService: Activate skill response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Activate skill response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Activate skill error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}publishSkillVersion(t,n,a,r){return O(this,null,function*(){try{console.log("ApiService: Publishing skill version:",r,"for skill:",a,"agent:",n);let i=yield fetch(ve.PUBLISH_SKILL_VERSION(n,a,r),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Publish skill version response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Publish skill version response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Publish skill version error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionLogs(t,n,a=1,r=100){return O(this,null,function*(){try{console.log("ApiService: Loading production logs with API key:",t,"agentId:",n,"page:",a,"limit:",r);let i=yield fetch(`${ve.PRODUCTION_LOGS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Production logs response:",s),{success:!0,logs:s.logs||[],pagination:s.pagination}}catch(i){return console.error("ApiService: Production logs error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionEnv(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading production env with API key:",t,"agentId:",n);let a=yield fetch(ve.PRODUCTION_ENV(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production env response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Production env response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Production env error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}updateProductionEnv(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating production env with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.PRODUCTION_ENV(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update production env response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Update production env response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update production env error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getProducts(t,n,a=1,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading products with API key:",t,"agentId:",n);let i=yield fetch(`${ve.AGENT_PRODUCTS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("ApiService: Products load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}createProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Create product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Update product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}deleteProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCT(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Delete product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}searchProducts(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${ve.SEARCH_PRODUCTS(n)}?searchQuery=${encodeURIComponent(a)}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Search products error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}},re=new gm});var ji,ht,vm,rN=N(()=>{"use strict";ji=Z($e());hm();Zt();ht=Z(oe()),vm=({apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:r,sharedChatMessages:i,onSharedSendMessage:s,onSharedClearHistory:l,isChatLoading:o,setIsChatLoading:c})=>{let[u,p]=(0,ji.useState)(""),f=(0,ji.useRef)(null),d=()=>{var h;(h=f.current)==null||h.scrollIntoView({behavior:"smooth"})};(0,ji.useEffect)(()=>{d()},[i]);let x=i.length>0?i.map(h=>({text:h.text,isUser:h.sender==="user",timestamp:h.timestamp})):[{text:"\u{1F44B} Welcome! Start chatting to test your Lua skill. Your messages will be sent to the sandbox environment.",isUser:!1,timestamp:new Date}],y=h=>O(null,null,function*(){if(!h.trim())return;let g={id:Date.now().toString(),text:h,sender:"user",timestamp:new Date};s(g),p(""),c(!0);try{let S=yield re.sendLocalChatMessage(h,r),T={id:(Date.now()+1).toString(),text:S.success?S.text||"No response received":`\u274C ${S.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};s(T)}catch(S){let T={id:(Date.now()+2).toString(),text:`\u274C Error: ${S instanceof Error?S.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};s(T)}finally{c(!1)}}),k=h=>{h.preventDefault(),y(u)},m=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),y(u))};return(0,ht.jsxs)("div",{className:"chat-container",children:[(0,ht.jsxs)("div",{className:"chat-header",children:[(0,ht.jsx)("div",{className:"chat-header-content",children:(0,ht.jsxs)("div",{children:[(0,ht.jsx)("h1",{children:"Chat to your Agent [Sandbox]"}),(0,ht.jsx)("p",{children:"Test your sandbox skill in real-time"})]})}),(0,ht.jsx)("button",{className:"clear-chat-button",onClick:l,disabled:o,title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,ht.jsxs)("div",{className:"chat-messages",children:[x.map((h,g)=>(0,ht.jsx)("div",{className:`message ${h.isUser?"user":"assistant"}`,children:(0,ht.jsx)("div",{className:"message-bubble",children:(0,ht.jsx)(Nl,{children:h.text})})},g)),o&&(0,ht.jsx)("div",{className:"loading",children:(0,ht.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}),(0,ht.jsx)("div",{ref:f})]}),(0,ht.jsx)("div",{className:"chat-input-container",children:(0,ht.jsxs)("form",{className:"chat-input-form",onSubmit:k,children:[(0,ht.jsx)("input",{type:"text",id:"chat-input",name:"chatMessage",className:"chat-input",value:u,onChange:h=>p(h.target.value),onKeyDown:m,placeholder:"Type your message...",disabled:o,autoComplete:"off"}),(0,ht.jsx)("button",{type:"submit",className:"send-button",disabled:o||!u.trim(),children:"Send"})]})})]})}});var Pn,K,ym,bm=N(()=>{"use strict";Pn=Z($e());Zt();K=Z(oe()),ym=({persona:e,onSavePersona:t,apiKey:n,agentId:a})=>{let[r,i]=(0,Pn.useState)(e),[s,l]=(0,Pn.useState)(!1),[o,c]=(0,Pn.useState)([]),[u,p]=(0,Pn.useState)(!1),[f,d]=(0,Pn.useState)("current"),[x,y]=(0,Pn.useState)(null),[k,m]=(0,Pn.useState)(!1),[h,g]=(0,Pn.useState)(!1);(0,Pn.useEffect)(()=>{i(e)},[e]),(0,Pn.useEffect)(()=>{S()},[]);let S=()=>O(null,null,function*(){p(!0);try{let R=yield re.getPersonaVersions(a,n);if(R.success&&R.versions){let L=R.versions.sort((G,P)=>P.createdDate-G.createdDate);c(L)}else console.error("Failed to load persona versions:",R.error),c([])}catch(R){console.error("Error loading persona versions:",R),c([])}finally{p(!1)}}),T=R=>{d(R),x&&y(null)},E=R=>{y(R)},w=()=>{y(null)},C=()=>{if(!r.trim()){alert("Please enter a persona before creating a version");return}g(!0)},U=()=>O(null,null,function*(){m(!0);try{let R=yield re.createPersonaVersion(a,n,r.trim());if(R.success)console.log("\u2705 Persona version created successfully:",R.data),yield S(),d("versions"),alert("\u2705 Persona version created successfully! You can deploy it from the Production tab.");else throw new Error(R.error||"Failed to create persona version")}catch(R){console.error("\u274C Error creating persona version:",R),alert(`\u274C Failed to create persona version: ${R instanceof Error?R.message:"Unknown error"}`)}finally{m(!1),g(!1)}}),H=()=>{g(!1)},_=()=>O(null,null,function*(){let R=r.trim();if(!R){alert("Persona cannot be empty");return}l(!0);try{(yield t(R))&&i(R)}finally{l(!1)}});return x?(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsxs)("div",{className:"header-left",children:[(0,K.jsx)("button",{className:"back-button",onClick:w,children:"\u2190"}),(0,K.jsxs)("h3",{children:["Persona v",x.version]})]})}),(0,K.jsxs)("div",{className:"persona-version-details",children:[(0,K.jsx)("div",{className:"version-metadata",children:(0,K.jsxs)("div",{className:"metadata-grid",children:[(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created By"}),(0,K.jsx)("span",{className:"metadata-value",children:x.createdBy})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Status"}),(0,K.jsx)("span",{className:`version-status ${x.isCurrent?"active":"available"}`,children:x.isCurrent?"Active (Deployed)":"Available"})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created Date"}),(0,K.jsx)("span",{className:"metadata-value",children:new Date(x.createdDate).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})}),(0,K.jsxs)("div",{className:"persona-content",children:[(0,K.jsx)("h4",{children:"Persona Content"}),(0,K.jsx)("div",{className:"persona-display",children:(0,K.jsx)("pre",{children:x.persona})})]})]})]}):(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsx)("h3",{children:"Agent Persona"})}),(0,K.jsxs)("div",{className:"persona-tabs",children:[(0,K.jsxs)("div",{className:"tabs-header",children:[(0,K.jsx)("button",{className:`tab-button ${f==="current"?"active":""}`,onClick:()=>T("current"),children:"Current"}),(0,K.jsxs)("button",{className:`tab-button ${f==="versions"?"active":""}`,onClick:()=>T("versions"),children:["Versions (",o.length,")"]})]}),(0,K.jsx)("div",{className:"tab-content",children:f==="current"?(0,K.jsxs)("div",{className:"current-persona-tab",children:[(0,K.jsxs)("div",{className:"persona-edit-header",children:[(0,K.jsx)("h4",{children:"Edit Current Persona"}),(0,K.jsxs)("div",{className:"persona-actions",children:[(0,K.jsx)("button",{className:"save-btn",onClick:_,disabled:s,title:"Save persona to YAML",children:s?"\u27F3":"\u{1F4BE}"}),(0,K.jsx)("button",{className:"create-version-btn",onClick:C,disabled:k||!r.trim(),title:"Create new persona version",children:k?"Creating...":"Create Version"})]})]}),(0,K.jsx)("div",{className:"persona-edit",children:(0,K.jsx)("textarea",{value:r,onChange:R=>i(R.target.value),placeholder:"Enter agent persona...",className:"persona-textarea"})}),(0,K.jsx)("div",{className:"persona-help",children:(0,K.jsxs)("p",{children:["This persona is stored in your ",(0,K.jsx)("code",{children:"lua.skill.yaml"})," file and used for local development."]})})]}):(0,K.jsx)("div",{className:"versions-persona-tab",children:u?(0,K.jsx)("div",{className:"versions-loading",children:(0,K.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):o.length>0?(0,K.jsx)("div",{className:"versions-list",children:o.map((R,L)=>(0,K.jsxs)("div",{className:`version-item ${R.isCurrent?"active":"available"}`,onClick:()=>E(R),children:[(0,K.jsxs)("div",{className:"version-info",children:[(0,K.jsxs)("div",{className:"version-header",children:[(0,K.jsxs)("span",{className:"version-number",children:["v",R.version]}),(0,K.jsx)("span",{className:`version-status ${R.isCurrent?"active":"available"}`,children:R.isCurrent?"Active":"Available"})]}),(0,K.jsx)("div",{className:"version-date",children:new Date(R.createdDate).toLocaleDateString()})]}),(0,K.jsx)("div",{className:"version-arrow",children:"\u2192"})]},L))}):(0,K.jsxs)("div",{className:"no-versions",children:[(0,K.jsx)("div",{className:"no-versions-icon",children:"\u{1F464}"}),(0,K.jsx)("div",{className:"no-versions-text",children:"No persona versions found"}),(0,K.jsx)("div",{className:"no-versions-subtext",children:"Persona versions will appear here when available"})]})})})]}),h&&(0,K.jsx)("div",{className:"version-modal-overlay",children:(0,K.jsxs)("div",{className:"version-modal",children:[(0,K.jsx)("div",{className:"version-modal-header",children:(0,K.jsx)("h3",{children:"Create Persona Version"})}),(0,K.jsxs)("div",{className:"version-modal-body",children:[(0,K.jsx)("p",{children:"This will create a new persona version that can be deployed to production."}),(0,K.jsxs)("p",{children:[(0,K.jsx)("strong",{children:"Note:"})," The version will be created but not automatically released. You can deploy it from the Production tab."]}),(0,K.jsxs)("div",{className:"persona-preview-box",children:[(0,K.jsx)("h4",{children:"Persona Content:"}),(0,K.jsxs)("div",{className:"persona-preview-content",children:[r.substring(0,300),r.length>300?"...":""]})]})]}),(0,K.jsxs)("div",{className:"version-modal-actions",children:[(0,K.jsx)("button",{className:"cancel-button",onClick:H,disabled:k,children:"Cancel"}),(0,K.jsx)("button",{className:"create-button",onClick:U,disabled:k,children:k?"Creating...":"Create Version"})]})]})})]})}});var Ct,A,xm,Sm=N(()=>{"use strict";Ct=Z($e());Zt();A=Z(oe()),xm=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{var Ji;let[r,i]=(0,Ct.useState)([]),[s,l]=(0,Ct.useState)(null),[o,c]=(0,Ct.useState)(null),[u,p]=(0,Ct.useState)([]),[f,d]=(0,Ct.useState)(!1),[x,y]=(0,Ct.useState)("current"),[k,m]=(0,Ct.useState)(!1),[h,g]=(0,Ct.useState)(!1),[S,T]=(0,Ct.useState)(""),[E,w]=(0,Ct.useState)({}),[C,U]=(0,Ct.useState)(null),[H,_]=(0,Ct.useState)(!0),[R,L]=(0,Ct.useState)(!1),[G,P]=(0,Ct.useState)(null),[W,ie]=(0,Ct.useState)([]);(0,Ct.useEffect)(()=>{we(),Ue()},[]);let we=()=>O(null,null,function*(){_(!0),P(null);try{console.log("Loading skills from /api/skills...");let I=yield fetch("/api/skills");if(console.log("Skills API response status:",I.status),!I.ok)throw new Error(`HTTP ${I.status}: ${I.statusText}`);let Y=yield I.json();console.log("Skills API response data:",Y),Y.success&&Y.skills&&Array.isArray(Y.skills)?(console.log("Skills loaded successfully:",Y.skills),i(Y.skills),P(null)):(console.error("Failed to load skills:",Y.error),P(Y.error||"Failed to load skills - invalid data format"),i([]))}catch(I){console.error("Error loading skills:",I),P(I instanceof Error?I.message:"Failed to load skills"),i([])}finally{_(!1)}}),Ue=()=>O(null,null,function*(){try{let Y=yield(yield fetch("/tools")).json();if(Y.success&&Y.tools){let le=[];Array.isArray(Y.tools)?le=Y.tools:typeof Y.tools=="object"&&(le=Object.entries(Y.tools).map(([He,Pt])=>ee({name:He},Pt))),ie(le)}else console.error("Failed to load tools:",Y.error),ie([])}catch(I){console.error("Error loading tools:",I),ie([])}}),v=I=>{let Y={};I.inputSchema.properties&&Object.keys(I.inputSchema.properties).forEach(le=>{let He=I.inputSchema.properties[le];Y[le]=_e(He)}),w(Y)},_e=I=>{if(I.type==="object"&&I.properties){let Y={};return Object.keys(I.properties).forEach(le=>{Y[le]=_e(I.properties[le])}),Y}else return I.type==="number"?0:I.type==="boolean"?!1:""},lt=I=>{let Y=W.find(le=>le.name===I);Y&&(c(Y),v(Y),U(null))},b=I=>O(null,null,function*(){d(!0);try{let Y=yield re.getSkillVersions(I.skillId,t,e);if(Y.success&&Y.versions){let le=Y.versions.sort((He,Pt)=>new Date(Pt.createdDate||Pt.createdAt).getTime()-new Date(He.createdDate||He.createdAt).getTime());p(le)}else console.error("Failed to load skill versions:",Y.error),p([])}catch(Y){console.error("Error loading skill versions:",Y),p([])}finally{d(!1)}}),Fe=I=>{let Y=r.find(le=>le.name===I);Y&&(l(I),y("current"),b(Y))},vt=()=>{l(null),y("current"),p([]),c(null),U(null)},ce=I=>{y(I),o&&(c(null),U(null))},Q=()=>{c(null),U(null)},F=()=>O(null,null,function*(){if(!s)return;let I=r.find(le=>le.name===s);if(!I)return;u.some(le=>le.version===I.version)?(T(I.version),g(!0)):yield V(I.version)}),V=I=>O(null,null,function*(){if(!s)return;let Y=r.find(le=>le.name===s);if(Y){m(!0);try{let He=yield(yield fetch("/tools")).json();if(!He.success||!He.tools)throw new Error("Failed to load current tools data");let Pt=[];Array.isArray(He.tools)?Pt=He.tools:typeof He.tools=="object"&&(Pt=Object.entries(He.tools).map(([ft,D])=>({name:ft,description:D.description||"",inputSchema:D.inputSchema||{type:"object"},execute:D.execute||""})));let dn=Pt.filter(ft=>Y.tools.includes(ft.name)),_t={name:Y.name,version:I,description:Y.description,context:Y.context,tools:dn};console.log("Creating version with data:",_t);let en=yield re.createSkillVersion(Y.skillId,t,e,_t);if(en.success)console.log("\u2705 Version created successfully:",en.data),yield b(Y),alert(`\u2705 Version ${I} created successfully!`);else throw new Error(en.error||"Failed to create version")}catch(le){console.error("\u274C Error creating version:",le),alert(`\u274C Failed to create version: ${le instanceof Error?le.message:"Unknown error"}`)}finally{m(!1),g(!1)}}}),B=()=>O(null,null,function*(){if(!S.trim()){alert("Please enter a version number");return}if(u.some(Y=>Y.version===S.trim())){alert("This version already exists. Please enter a different version number.");return}yield V(S.trim())}),J=()=>{g(!1),T("")},he=(I,Y,le)=>{w(He=>le?tt(ee({},He),{[I]:tt(ee({},He[I]),{[le]:Y})}):tt(ee({},He),{[I]:Y}))},Xe=()=>O(null,null,function*(){if(o){L(!0),U(null);try{let I=Pl(E,o.inputSchema),Y=yield re.testLocalTool(o.name,I);U(Y)}catch(I){U({success:!1,error:I instanceof Error?I.message:"Unknown error occurred"})}finally{L(!1)}}}),Pl=(I,Y)=>{var He,Pt;let le={};for(let[dn,_t]of Object.entries(I))if(_t&&typeof _t=="object"&&!Array.isArray(_t)){let en=(He=Y.properties)==null?void 0:He[dn];if(en&&en.type==="object"&&en.properties){let ft=Pl(_t,en);Object.keys(ft).length>0&&(le[dn]=ft)}else le[dn]=_t}else{let en=(Pt=Y.properties)==null?void 0:Pt[dn];if((!Y.required||!Y.required.includes(dn))&&(_t===""||_t===null||_t===void 0))continue;le[dn]=_t}return le},$i=(I,Y,le)=>{var dn,_t,en;let He=le?((dn=E[I])==null?void 0:dn[le])||"":E[I]||"",Pt=le?(_t=Y.required)==null?void 0:_t.includes(le):(en=o==null?void 0:o.inputSchema.required)==null?void 0:en.includes(I);if(Y.type==="object"&&Y.properties)return(0,A.jsxs)("div",{className:"nested-object",children:[(0,A.jsx)("div",{className:"nested-object-label",children:I}),(0,A.jsx)("div",{className:"nested-fields",children:Object.entries(Y.properties).map(([ft,D])=>{var X;return(0,A.jsxs)("div",{className:"nested-field",children:[(0,A.jsxs)("label",{className:"nested-label",children:[ft,((X=Y.required)==null?void 0:X.includes(ft))&&(0,A.jsx)("span",{className:"required",children:"*"})]}),$i(I,D,ft),D.description&&(0,A.jsx)("div",{className:"input-description",children:D.description})]},ft)})})]});switch(Y.type){case"number":return(0,A.jsx)("input",{type:"number",value:He,onChange:ft=>he(I,parseFloat(ft.target.value)||0,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Pt});case"boolean":return(0,A.jsx)("input",{type:"checkbox",checked:He,onChange:ft=>he(I,ft.target.checked,le),className:"tool-checkbox"});case"string":default:return(0,A.jsx)("input",{type:"text",value:He,onChange:ft=>he(I,ft.target.value,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Pt})}};if(H)return(0,A.jsx)("div",{className:"skills-page",children:(0,A.jsx)("div",{className:"skills-loading",children:(0,A.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})});if(o)return(0,A.jsx)("div",{className:"skills-page",children:(0,A.jsxs)("div",{className:"tool-form",children:[(0,A.jsxs)("div",{className:"tool-form-header",children:[(0,A.jsx)("button",{className:"back-button",onClick:Q,title:"Back to skill",children:"\u2190"}),(0,A.jsx)("h3",{children:o.name})]}),(0,A.jsxs)("div",{className:"tool-form-content",children:[(0,A.jsx)("div",{className:"tool-info",children:(0,A.jsx)("p",{children:o.description})}),(0,A.jsxs)("div",{className:"tool-inputs",children:[(0,A.jsx)("h4",{children:"Input Parameters"}),Object.keys(o.inputSchema.properties||{}).length>0?(0,A.jsx)("div",{className:"input-fields",children:Object.entries(o.inputSchema.properties).map(([I,Y])=>{var le;return(0,A.jsxs)("div",{className:"input-field",children:[(0,A.jsxs)("label",{children:[I,((le=o.inputSchema.required)==null?void 0:le.includes(I))&&(0,A.jsx)("span",{className:"required",children:"*"})]}),$i(I,Y),Y.description&&(0,A.jsx)("div",{className:"input-description",children:Y.description})]},I)})}):(0,A.jsx)("p",{className:"no-inputs",children:"This tool requires no input parameters."})]}),(0,A.jsx)("div",{className:"tool-actions",children:(0,A.jsx)("button",{onClick:Xe,disabled:R,className:"test-button",children:R?"Testing...":"Test Tool"})}),C&&(0,A.jsxs)("div",{className:"test-result",children:[(0,A.jsx)("h4",{children:"Test Result"}),(0,A.jsx)("div",{className:`result-content ${C.success?"success":"error"}`,children:C.success?(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"result-label",children:"\u2705 Success"}),(0,A.jsx)("pre",{className:"result-data",children:JSON.stringify(C.result,null,2)})]}):(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"result-label",children:"\u274C Error"}),(0,A.jsx)("div",{className:"result-error",children:C.error})]})})]})]})]})});if(s){let I=r.find(Y=>Y.name===s);return I?(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsxs)("div",{className:"skills-header",children:[(0,A.jsxs)("div",{className:"header-left",children:[(0,A.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,A.jsx)("h4",{children:I.name})]}),(0,A.jsx)("button",{className:"create-version-button",onClick:F,disabled:k,title:"Create new version",children:k?"Creating...":"Create Version"})]}),(0,A.jsxs)("div",{className:"skill-tabs",children:[(0,A.jsxs)("div",{className:"tabs-header",children:[(0,A.jsx)("button",{className:`tab-button ${x==="current"?"active":""}`,onClick:()=>ce("current"),children:"Current"}),(0,A.jsxs)("button",{className:`tab-button ${x==="versions"?"active":""}`,onClick:()=>ce("versions"),children:["Versions (",u.length,")"]})]}),(0,A.jsx)("div",{className:"tab-content",children:x==="current"?(0,A.jsxs)("div",{className:"current-skill-tab",children:[(0,A.jsx)("div",{className:"skill-details",children:(0,A.jsxs)("div",{className:"skill-info-section",children:[(0,A.jsxs)("div",{className:"skill-meta",children:[(0,A.jsxs)("span",{className:"skill-version",children:["v",I.version]}),(0,A.jsxs)("span",{className:"skill-tools-count",children:[I.tools.length," tools"]})]}),I.description&&(0,A.jsxs)("div",{className:"skill-description-section",children:[(0,A.jsx)("h5",{children:"Description"}),(0,A.jsx)("p",{children:I.description})]}),I.context&&(0,A.jsxs)("div",{className:"skill-context-section",children:[(0,A.jsx)("h5",{children:"Context"}),(0,A.jsx)("p",{children:I.context})]})]})}),(0,A.jsxs)("div",{className:"tools-section",children:[(0,A.jsx)("div",{className:"tools-header",children:(0,A.jsxs)("h5",{children:["Available Tools (",I.tools.length,")"]})}),I.tools&&I.tools.length>0?(0,A.jsx)("div",{className:"tools-grid",children:I.tools.map((Y,le)=>(0,A.jsxs)("div",{className:"tool-card",onClick:()=>lt(Y),children:[(0,A.jsx)("div",{className:"tool-card-header",children:(0,A.jsx)("h4",{children:Y})}),(0,A.jsx)("div",{className:"tool-card-body",children:(0,A.jsx)("span",{className:"skill-badge",children:I.name})})]},le))}):(0,A.jsxs)("div",{className:"no-tools",children:[(0,A.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,A.jsx)("div",{className:"no-tools-text",children:"No tools in this skill"}),(0,A.jsx)("div",{className:"no-tools-subtext",children:"This skill doesn't have any tools defined"})]})]}),(0,A.jsx)("div",{className:"skills-help",children:(0,A.jsx)("p",{children:"This skill is compiled from your local code and updates automatically when you make changes. Use the tools above to test your skill's functionality."})})]}):(0,A.jsx)("div",{className:"versions-skill-tab",children:f?(0,A.jsx)("div",{className:"versions-loading",children:(0,A.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):u.length>0?(0,A.jsx)("div",{className:"versions-list",children:u.map((Y,le)=>(0,A.jsxs)("div",{className:`version-item ${Y.status}`,onClick:()=>{console.log("Selected version:",Y.version)},children:[(0,A.jsxs)("div",{className:"version-info",children:[(0,A.jsxs)("div",{className:"version-header",children:[(0,A.jsxs)("span",{className:"version-number",children:["v",Y.version]}),(0,A.jsx)("span",{className:`version-status ${Y.status}`,children:Y.status})]}),(0,A.jsxs)("div",{className:"version-meta",children:[(0,A.jsx)("span",{className:"version-date",children:new Date(Y.createdDate||Y.createdAt).toLocaleDateString()}),(0,A.jsxs)("span",{className:"version-author",children:["by ",Y.createdByEmail||Y.createdBy]})]})]}),(0,A.jsx)("div",{className:"version-arrow",children:"\u2192"})]},le))}):(0,A.jsxs)("div",{className:"no-versions",children:[(0,A.jsx)("div",{className:"no-versions-icon",children:"\u{1F4E6}"}),(0,A.jsx)("div",{className:"no-versions-text",children:"No versions found"}),(0,A.jsx)("div",{className:"no-versions-subtext",children:"Create your first version to get started"})]})})})]}),h&&(0,A.jsx)("div",{className:"version-modal-overlay",children:(0,A.jsxs)("div",{className:"version-modal",children:[(0,A.jsx)("div",{className:"version-modal-header",children:(0,A.jsx)("h3",{children:"Create New Version"})}),(0,A.jsxs)("div",{className:"version-modal-body",children:[(0,A.jsxs)("p",{children:["Version ",(0,A.jsx)("strong",{children:(Ji=r.find(Y=>Y.name===s))==null?void 0:Ji.version})," already exists."]}),(0,A.jsx)("p",{children:"Please enter a new version number:"}),(0,A.jsx)("input",{type:"text",value:S,onChange:Y=>T(Y.target.value),placeholder:"e.g., 1.0.1",className:"version-input",autoFocus:!0})]}),(0,A.jsxs)("div",{className:"version-modal-actions",children:[(0,A.jsx)("button",{className:"cancel-button",onClick:J,disabled:k,children:"Cancel"}),(0,A.jsx)("button",{className:"create-button",onClick:B,disabled:k||!S.trim(),children:k?"Creating...":"Create Version"})]})]})})]}):(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsx)("div",{className:"skills-header",children:(0,A.jsxs)("div",{className:"header-left",children:[(0,A.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,A.jsx)("h4",{children:"Skill Not Found"})]})}),(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,A.jsx)("div",{className:"no-skills-text",children:"Skill not found"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"The selected skill could not be loaded"})]})]})}return(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsxs)("div",{className:"skills-header",children:[(0,A.jsx)("h3",{children:"Available Skills"}),(0,A.jsx)("button",{className:"refresh-button",onClick:we,title:"Refresh skills",children:"\u21BB"})]}),(0,A.jsx)("div",{className:"skills-content",children:G?(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,A.jsx)("div",{className:"no-skills-text",children:"Error loading skills"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:G}),(0,A.jsx)("button",{className:"retry-button",onClick:we,style:{marginTop:"16px"},children:"Retry"})]}):r.length===0?(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,A.jsx)("div",{className:"no-skills-text",children:"No skills found"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"Skills will appear here when available in your project"})]}):Array.isArray(r)&&r.length>0?(0,A.jsx)("div",{className:"skills-list",children:r.map(I=>(0,A.jsxs)("div",{className:"skill-item",onClick:()=>Fe(I.name),children:[(0,A.jsxs)("div",{className:"skill-info",children:[(0,A.jsx)("div",{className:"skill-name",children:I.name}),(0,A.jsx)("div",{className:"skill-description",children:I.description}),(0,A.jsxs)("div",{className:"skill-stats",children:[(0,A.jsxs)("span",{className:"skill-stat",children:["v",I.version]}),(0,A.jsxs)("span",{className:"skill-stat",children:[I.tools.length," tools"]})]})]}),(0,A.jsx)("div",{className:"skill-arrow",children:"\u2192"})]},I.name))}):(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,A.jsx)("div",{className:"no-skills-text",children:"No skills available"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"No valid skills data received"})]})})]})}});var iN=N(()=>{});var gt,$,El,Kc=N(()=>{"use strict";gt=Z($e());Zt();iN();$=Z(oe()),El=({apiKey:e,agentId:t,isProduction:n=!1})=>{let[a,r]=(0,gt.useState)([]),[i,s]=(0,gt.useState)(!0),[l,o]=(0,gt.useState)(""),[c,u]=(0,gt.useState)([]),[p,f]=(0,gt.useState)(null),[d,x]=(0,gt.useState)(!1),[y,k]=(0,gt.useState)(!1),[m,h]=(0,gt.useState)({}),[g,S]=(0,gt.useState)(null),[T,E]=(0,gt.useState)(null),[w,C]=(0,gt.useState)(!1),[U,H]=(0,gt.useState)(!1),[_,R]=(0,gt.useState)(1),[L,G]=(0,gt.useState)(1),[P,W]=(0,gt.useState)(0);(0,gt.useEffect)(()=>{ie()},[e,t,_]),(0,gt.useEffect)(()=>{if(l.trim()){let V=a.filter(B=>Object.values(B).some(J=>String(J).toLowerCase().includes(l.toLowerCase())));u(V)}else u(a)},[a,l]),(0,gt.useEffect)(()=>{if(g||T){let V=setTimeout(()=>{S(null),E(null)},5e3);return()=>clearTimeout(V)}},[g,T]);let ie=()=>O(null,null,function*(){var V,B;s(!0);try{let J=yield re.getProducts(e,t,_,20);J.success&&J.data?(r(J.data.data||[]),G(((V=J.data.pagination)==null?void 0:V.totalPages)||1),W(((B=J.data.pagination)==null?void 0:B.totalCount)||0)):(console.error("Failed to load products:",J.error),r([]),S("Failed to load products"))}catch(J){console.error("Error loading products:",J),r([]),S("Failed to load products")}finally{s(!1)}}),we=()=>O(null,null,function*(){if(!l.trim()){u(a);return}try{let V=yield re.searchProducts(e,t,l);V.success&&V.data?u(V.data.data||[]):S("Search failed")}catch(V){console.error("Search error:",V),S("Search failed")}}),Ue=V=>{f(V),h(ee({},V)),x(!1)},v=()=>{f(null),h({id:"",name:"",description:"",price:""}),k(!0),x(!0)},_e=()=>{x(!0)},lt=()=>O(null,null,function*(){var V,B;if(!((V=m.id)!=null&&V.trim())){S("Product ID is required");return}C(!0);try{let J;y?J=yield re.createProduct(e,t,m):J=yield re.updateProduct(e,t,m),J.success?(E(y?"Product created successfully":"Product updated successfully"),x(!1),k(!1),f(((B=J.data)==null?void 0:B.product)||m),yield ie()):S(`Failed to ${y?"create":"update"} product`)}catch(J){console.error("Save error:",J),S(`Failed to ${y?"create":"update"} product`)}finally{C(!1)}}),b=()=>O(null,null,function*(){if(!(!p||!p.id)&&confirm(`Are you sure you want to delete "${p.name||p.id}"?`)){H(!0);try{(yield re.deleteProduct(e,t,p.id)).success?(E("Product deleted successfully"),f(null),yield ie()):S("Failed to delete product")}catch(V){console.error("Delete error:",V),S("Failed to delete product")}finally{H(!1)}}}),Fe=()=>{x(!1),k(!1),p?h(ee({},p)):f(null)},vt=()=>{f(null),x(!1),k(!1)},ce=(V,B)=>{h(J=>tt(ee({},J),{[V]:B}))},Q=()=>{var J;let V=["id","name","description","price"],B=new Set([...V,...Object.keys(m)]);return(0,$.jsxs)("div",{className:"product-form",children:[(0,$.jsxs)("div",{className:"form-fields",children:[Array.from(B).map(he=>(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:`product-${he}`,children:he}),(0,$.jsx)("input",{id:`product-${he}`,type:he==="price"?"number":"text",value:m[he]||"",onChange:Xe=>ce(he,Xe.target.value),placeholder:`Enter ${he}...`,disabled:w,required:he==="id"})]},he)),(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:"add-field",children:"Add Custom Field"}),(0,$.jsxs)("div",{className:"add-field-container",children:[(0,$.jsx)("input",{id:"add-field-key",type:"text",placeholder:"Field name",onKeyPress:he=>{if(he.key==="Enter"){let Xe=he.target.value.trim();Xe&&!m.hasOwnProperty(Xe)&&(ce(Xe,""),he.target.value="")}}}),(0,$.jsx)("span",{className:"field-hint",children:"Press Enter to add"})]})]})]}),(0,$.jsxs)("div",{className:"form-actions",children:[(0,$.jsx)("button",{className:"cancel-button",onClick:Fe,disabled:w,children:"Cancel"}),(0,$.jsx)("button",{className:"save-button",onClick:lt,disabled:w||!((J=m.id)!=null&&J.trim()),children:w?"Saving...":y?"Create Product":"Update Product"})]})]})},F=()=>p?(0,$.jsxs)("div",{className:"product-detail",children:[(0,$.jsxs)("div",{className:"product-detail-header",children:[(0,$.jsx)("button",{className:"back-button",onClick:vt,title:"Back to products",children:"\u2190"}),(0,$.jsx)("h4",{children:p.name||p.id}),(0,$.jsx)("div",{className:"product-actions",children:!d&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("button",{className:"edit-button",onClick:_e,disabled:U,children:"\u270F\uFE0F"}),(0,$.jsx)("button",{className:"delete-button",onClick:b,disabled:U,children:U?"\u27F3":"\u{1F5D1}\uFE0F"})]})})]}),d?Q():(0,$.jsx)("div",{className:"product-info",children:Object.entries(p).map(([V,B])=>(0,$.jsxs)("div",{className:"product-field",children:[(0,$.jsx)("div",{className:"field-label",children:V}),(0,$.jsx)("div",{className:"field-value",children:String(B)})]},V))})]}):null;return i&&a.length===0?(0,$.jsx)("div",{className:"product-management",children:(0,$.jsx)("div",{className:"loading-container",children:(0,$.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,$.jsxs)("div",{className:"product-management",children:[(0,$.jsx)("div",{className:"product-header",children:p||y?(0,$.jsx)("div",{className:"detail-header",children:(0,$.jsx)("h3",{children:y?"Create Product":"Product Details"})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"header-content",children:[(0,$.jsxs)("h3",{children:["Products ",n?"(Production)":"(Sandbox)"]}),P>0&&(0,$.jsxs)("span",{className:"product-count",children:[P," products"]})]}),(0,$.jsxs)("div",{className:"header-actions",children:[(0,$.jsx)("button",{className:"create-button",onClick:v,children:"\u2795"}),(0,$.jsx)("button",{className:"refresh-button",onClick:ie,disabled:i,children:i?"\u27F3":"\u21BB"})]})]})}),g&&(0,$.jsx)("div",{className:"error-message",children:g}),T&&(0,$.jsx)("div",{className:"success-message",children:T}),(0,$.jsx)("div",{className:"product-content",children:p||y?F():(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"product-search",children:(0,$.jsxs)("div",{className:"search-container",children:[(0,$.jsx)("input",{type:"text",placeholder:"Search products...",value:l,onChange:V=>o(V.target.value),className:"search-input"}),(0,$.jsx)("button",{className:"search-button",onClick:we,children:"\u{1F50D}"})]})}),(0,$.jsx)("div",{className:"products-list",children:c.length>0?c.map(V=>(0,$.jsxs)("div",{className:"product-item",onClick:()=>Ue(V),children:[(0,$.jsxs)("div",{className:"product-info",children:[(0,$.jsx)("div",{className:"product-name",children:V.name||V.id}),(0,$.jsx)("div",{className:"product-description",children:V.description||"No description"}),(0,$.jsxs)("div",{className:"product-meta",children:["ID: ",V.id,V.price&&(0,$.jsxs)("span",{children:[" \u2022 Price: ",V.price]})]})]}),(0,$.jsx)("div",{className:"product-arrow",children:"\u2192"})]},V.id)):l?(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F50D}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products found"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Try a different search term"})]}):(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F4E6}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products yet"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Create your first product to get started"})]})}),L>1&&(0,$.jsxs)("div",{className:"product-pagination",children:[(0,$.jsxs)("div",{className:"pagination-info",children:["Page ",_," of ",L]}),(0,$.jsxs)("div",{className:"pagination-controls",children:[(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.max(1,V-1)),disabled:_<=1||i,children:"\u2190"}),(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.min(L,V+1)),disabled:_>=L||i,children:"\u2192"})]})]})]})})]})}});var Ie,z,kl,U2,Nm,P2,Em=N(()=>{"use strict";Ie=Z($e());Zt();Kc();z=Z(oe()),kl=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},U2=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"orders",name:"Orders",description:"Coming soon",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Coming soon",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Coming soon",icon:"\u2699\uFE0F"}],Nm=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ie.useState)(null),[r,i]=(0,Ie.useState)(null),[s,l]=(0,Ie.useState)(null),[o,c]=(0,Ie.useState)(!1),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),[x,y]=(0,Ie.useState)(""),[k,m]=(0,Ie.useState)(null),[h,g]=(0,Ie.useState)(null),[S,T]=(0,Ie.useState)(!1),[E,w]=(0,Ie.useState)("list"),C=(0,Ie.useRef)(null),U=(0,Ie.useRef)(null),[H,_]=(0,Ie.useState)(!1),[R,L]=(0,Ie.useState)(""),[G,P]=(0,Ie.useState)(""),[W,ie]=(0,Ie.useState)(!1);(0,Ie.useEffect)(()=>{we()},[e,t]),(0,Ie.useEffect)(()=>{if(console.log("JSON text changed:",x),console.log("Is editing:",S),console.log("Highlight ref exists:",!!U.current),U.current&&x&&!S){let B=kl(x);console.log("Applying highlighting:",B.substring(0,100)+"..."),U.current.innerHTML=B}},[x,S]);let we=()=>O(null,null,function*(){try{if(console.log("Loading user data with API key:",e,"agentId:",t),c(!0),m(null),!e||!t){console.error("Missing API key or agentId:",{apiKey:!!e,agentId:!!t}),m("Missing API key or agent ID"),y("{}");return}let B=yield re.loadUserData(e,t);if(console.log("User data response:",B),B.success&&B.data){a(B.data);let J=B.data,he=JSON.stringify(J,null,2);y(he),setTimeout(()=>{U.current&&(U.current.innerHTML=kl(he))},0),console.log("User data loaded successfully:",B.data),console.log("Data to display:",J)}else console.log("No user data or error:",B.error),m(B.error||"No user data found"),y("{}")}catch(B){console.error("Failed to load user data:",B),m(`Failed to load user data: ${B instanceof Error?B.message:"Unknown error"}`),y("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){try{console.log("Saving user data:",x),p(!0),m(null),g(null);let B=JSON.parse(x),J=yield re.updateUserData(e,t,B);console.log("Save user data response:",J),J.success&&J.data?(a(J.data),y(JSON.stringify(J.data.data,null,2)),g("User data saved successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to save user data: "+(J.error||"Unknown error"))}catch(B){console.error("Failed to save user data:",B),B instanceof SyntaxError?m("Invalid JSON format. Please check your syntax."):m("Failed to save user data")}finally{p(!1)}}),v=()=>O(null,null,function*(){try{console.log("Clearing user data"),d(!0),m(null),g(null);let B=yield re.clearUserData(e,t);console.log("Clear user data response:",B),B.success?(a(null),y("{}"),w("list"),g("User data cleared successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to clear user data: "+(B.error||"Unknown error"))}catch(B){console.error("Failed to clear user data:",B),m("Failed to clear user data")}finally{d(!1)}}),_e=B=>O(null,null,function*(){if(i(B),w("detail"),T(!1),m(null),B.id==="user"){c(!0);try{let J=yield re.loadUserData(e,t);if(J.success&&J.data){l(J.data);let he=JSON.stringify(J.data,null,2);y(he),console.log("Setting JSON text for user data:",he)}else l(null),y("{}"),console.log("No user data found, setting empty JSON")}catch(J){console.error("Failed to load user data:",J),l(null),y("{}")}finally{c(!1)}}else if(B.id==="resources"){c(!0);try{let J=yield re.loadResources(e,t);J.success&&J.data?(l(J.data),console.log("Loaded resources:",J.data)):(l([]),console.log("No resources found"))}catch(J){console.error("Failed to load resources:",J),l([])}finally{c(!1)}}else B.id==="products"?l(null):(l(null),y("{}"))}),lt=()=>{w("list"),i(null),l(null),T(!1)},b=()=>{r&&(r.id==="resources"?(_(!0),L(""),P("")):console.log(`Add new item to ${r==null?void 0:r.name}`))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){alert("Name and content cannot be empty");return}ie(!0);try{let B=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});B.success?(_(!1),L(""),P(""),r&&_e(r)):alert("Failed to create resource: "+(B.error||"Unknown error"))}catch(B){console.error("Error creating resource:",B),alert("Failed to create resource")}finally{ie(!1)}}),vt=()=>{_(!1),L(""),P("")},ce=()=>O(null,null,function*(){r&&console.log(`Delete all ${r.name} data`)}),Q=B=>{y(B),T(!0),m(null),g(null),U.current&&(U.current.innerHTML=kl(B))},F=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)},V=()=>{C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)};return o?(0,z.jsx)("div",{className:"user-data-panel",children:(0,z.jsx)("div",{className:"user-data-loading",children:(0,z.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,z.jsxs)("div",{className:"user-data-panel",children:[(0,z.jsxs)("div",{className:"user-data-header",children:[(0,z.jsxs)("div",{className:"header-left",children:[E==="detail"&&(0,z.jsx)("button",{className:"back-button",onClick:lt,title:"Back to data categories",children:"\u2190"}),(0,z.jsx)("h3",{children:E==="list"?"Data":(r==null?void 0:r.name)||"Data Detail"})]}),(0,z.jsxs)("div",{className:"user-data-actions",children:[E==="detail"&&(r==null?void 0:r.id)!=="user"&&(r==null?void 0:r.description)!=="Coming soon"&&(0,z.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,z.jsx)("button",{className:"refresh-button",onClick:E==="detail"&&r?()=>_e(r):we,disabled:o,title:`Refresh ${E==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),E==="detail"&&(r==null?void 0:r.id)==="user"&&(0,z.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),E==="detail"&&(0,z.jsx)("button",{className:"delete-button",onClick:ce,disabled:f,title:`Delete all ${r==null?void 0:r.name.toLowerCase()}`,children:"\u{1F5D1}\uFE0F"})]})]}),k&&(0,z.jsxs)("div",{className:"error-message",children:["\u274C ",k]}),h&&(0,z.jsxs)("div",{className:"success-message",children:["\u2705 ",h]}),(0,z.jsx)("div",{className:"user-data-content",children:E==="list"?(0,z.jsx)("div",{className:"data-list",children:(0,z.jsx)("div",{className:"data-categories",children:U2.map(B=>(0,z.jsxs)("div",{className:"data-category",onClick:()=>_e(B),children:[(0,z.jsx)("div",{className:"category-icon",children:B.icon}),(0,z.jsxs)("div",{className:"category-info",children:[(0,z.jsx)("div",{className:"category-name",children:B.name}),(0,z.jsx)("div",{className:"category-description",children:B.description})]}),(0,z.jsx)("div",{className:"category-arrow",children:"\u2192"})]},B.id))})}):(0,z.jsx)("div",{className:"data-detail",children:(r==null?void 0:r.id)==="user"&&s?(0,z.jsx)("div",{className:"json-editor",children:S?(0,z.jsxs)("div",{className:"json-editor-container",children:[(0,z.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:kl(x)}}),(0,z.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:x,onChange:B=>Q(B.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,z.jsx)("div",{className:"json-display",onClick:F,dangerouslySetInnerHTML:{__html:kl(x)}})}):(r==null?void 0:r.id)==="resources"&&s?(0,z.jsxs)("div",{className:"resources-container",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Resources:"})," Changes to resources will propagate to production and affect live users."]})]}),(0,z.jsx)("div",{className:"resources-list",children:Array.isArray(s)&&s.length>0?s.map(B=>(0,z.jsx)(P2,{resource:B,apiKey:e,agentId:t,onUpdate:()=>_e(r)},B.id)):(0,z.jsxs)("div",{className:"no-resources",children:[(0,z.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,z.jsx)("h4",{children:"No resources yet"}),(0,z.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})]}):(r==null?void 0:r.id)==="products"?(0,z.jsx)(El,{apiKey:e,agentId:t,isProduction:!1}):(0,z.jsxs)("div",{className:"category-empty-state",children:[(0,z.jsx)("div",{className:"empty-icon",children:r==null?void 0:r.icon}),(r==null?void 0:r.description)==="Coming soon"?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("h3",{children:"Coming Soon"}),(0,z.jsxs)("p",{children:[r.name," management will be available in a future update"]}),(0,z.jsx)("div",{className:"coming-soon-badge",children:"\u{1F6A7} Under Development"})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("h3",{children:["No ",r==null?void 0:r.name.toLowerCase()," yet"]}),(0,z.jsxs)("p",{children:["Start by adding your first ",r==null?void 0:r.name.toLowerCase()," entry"]}),(0,z.jsx)("div",{className:"empty-actions",children:(0,z.jsx)("button",{className:"add-button",onClick:b,children:"\u2795"})})]})]})})}),H&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Create New Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:vt,disabled:W,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," This resource will be available in production and affect live users."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:B=>L(B.target.value),placeholder:"e.g., FAQ, return-policy, user-guide",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"resource-content",value:G,onChange:B=>P(B.target.value),placeholder:"Paste your content here... This can be a large text file, FAQ content, documentation, etc.",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[G.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:vt,disabled:W,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},P2=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ie.useState)(!1),[s,l]=(0,Ie.useState)(e.name),[o,c]=(0,Ie.useState)(e.content),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),x=()=>{i(!0),l(e.name),c(e.content)},y=()=>{i(!1),l(e.name),c(e.content)},k=()=>O(null,null,function*(){if(!s.trim()||!o.trim()){alert("Name and content cannot be empty");return}p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}),m=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"? This will affect production.`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}});return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"resource-item",children:(0,z.jsxs)("div",{className:"resource-display",children:[(0,z.jsxs)("div",{className:"resource-header",children:[(0,z.jsx)("h4",{className:"resource-name",children:e.name}),(0,z.jsx)("div",{className:"resource-meta",children:(0,z.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,z.jsx)("div",{className:"resource-content",children:(0,z.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,z.jsxs)("div",{className:"resource-actions",children:[(0,z.jsx)("button",{className:"edit-btn",onClick:x,title:"Edit resource",children:"\u270F\uFE0F"}),(0,z.jsx)("button",{className:"delete-btn",onClick:m,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Edit Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:y,disabled:u,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," Changes to this resource will affect live users immediately."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Resource name",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Resource content",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[o.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:y,disabled:u,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:k,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Mt,ne,km,B2,Tm=N(()=>{"use strict";Mt=Z($e());Zt();ne=Z(oe()),km=({apiKey:e,agentId:t})=>{let[n,a]=(0,Mt.useState)([]),[r,i]=(0,Mt.useState)(!0),[s,l]=(0,Mt.useState)(!1),[o,c]=(0,Mt.useState)(null),[u,p]=(0,Mt.useState)(null),[f,d]=(0,Mt.useState)(null),[x,y]=(0,Mt.useState)(""),[k,m]=(0,Mt.useState)(""),[h,g]=(0,Mt.useState)(!1);(0,Mt.useEffect)(()=>{C()},[]);let[S,T]=(0,Mt.useState)(!0);(0,Mt.useEffect)(()=>{if(S)return;O(null,null,function*(){console.log("Environment variables changed, auto-saving..."),l(!0),c(null),p(null);try{let W=w(n);console.log("Generated .env content:",W);let ie=yield re.saveEnvContent(W);console.log("Save env response:",ie),ie.success?(p("Environment variables saved successfully!"),setTimeout(()=>p(null),3e3)):(console.error("Failed to save env variables:",ie.error),c(ie.error||"Failed to save environment variables"))}catch(W){console.error("Error saving env variables:",W),c("Failed to save environment variables")}finally{l(!1)}})},[n]);let E=P=>P.trim()?P.split(`
|
|
23
|
-
`).map((W,ie)=>W.trim()).filter(W=>W&&!W.startsWith("#")).map((W,ie)=>{let[
|
|
24
|
-
`),C=()=>O(null,null,function*(){i(!0),c(null);try{let P=yield re.loadEnvContent();if(P.success){let W=P.content||"",ie=E(W);a(ie),T(!1)}else c(P.error||"Failed to load environment variables"),a([]),T(!1)}catch(P){console.error("Error loading env content:",P),c("Failed to load environment variables"),a([])}finally{i(!1)}}),U=()=>{if(!x.trim()){c("Please enter a variable name");return}if(n.some(W=>W.key===x.trim())){c("Variable name already exists");return}let P={id:`env_new_${Date.now()}`,key:x.trim(),value:k};a([...n,P]),y(""),m(""),g(!1),c(null)},H=(P,W,ie)=>{a(we=>we.map(Ue=>Ue.id===P?tt(ee({},Ue),{key:W.trim(),value:ie}):Ue)),d(null)},_=P=>{a(W=>W.filter(ie=>ie.id!==P))},R=P=>{d(P),c(null),p(null)},L=()=>{d(null),C()},G=()=>{g(!1),y(""),m(""),c(null)};return r?(0,ne.jsx)("div",{className:"env-panel",children:(0,ne.jsx)("div",{className:"env-loading",children:(0,ne.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ne.jsxs)("div",{className:"env-panel",children:[(0,ne.jsxs)("div",{className:"env-header",children:[(0,ne.jsx)("h3",{children:"Environment Variables"}),(0,ne.jsxs)("div",{className:"env-actions",children:[(0,ne.jsx)("button",{className:"refresh-btn",onClick:C,disabled:r,title:"Refresh environment variables",children:r?"\u27F3":"\u21BB"}),(0,ne.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ne.jsxs)("div",{className:"env-content",children:[o&&(0,ne.jsxs)("div",{className:"error-message",children:[(0,ne.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ne.jsxs)("div",{className:"success-message",children:[(0,ne.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ne.jsxs)("div",{className:"env-add-form",children:[(0,ne.jsxs)("div",{className:"env-form-header",children:[(0,ne.jsx)("h4",{children:"Add New Variable"}),(0,ne.jsx)("button",{className:"form-cancel-btn",onClick:G,title:"Cancel",children:"\u2715"})]}),(0,ne.jsxs)("div",{className:"env-form-fields",children:[(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Variable Name"}),(0,ne.jsx)("input",{type:"text",value:x,onChange:P=>y(P.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0})]}),(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Value"}),(0,ne.jsx)("input",{type:"text",value:k,onChange:P=>m(P.target.value),placeholder:"your_api_key_here",className:"env-input"})]}),(0,ne.jsx)("div",{className:"env-form-actions",children:(0,ne.jsx)("button",{className:"add-variable-btn",onClick:U,disabled:!x.trim(),children:"Add Variable"})})]})]}),(0,ne.jsx)("div",{className:"env-variables",children:n.length>0?(0,ne.jsx)("div",{className:"env-list",children:n.map(P=>(0,ne.jsx)(B2,{variable:P,isEditing:f===P.id,onEdit:()=>R(P.id),onSave:(W,ie)=>H(P.id,W,ie),onCancel:L,onDelete:()=>_(P.id)},P.id))}):(0,ne.jsxs)("div",{className:"env-empty-state",children:[(0,ne.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ne.jsx)("h4",{children:"No environment variables"}),(0,ne.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ne.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ne.jsxs)("div",{className:"env-help",children:[(0,ne.jsxs)("p",{children:["Environment variables are stored in your ",(0,ne.jsx)("code",{children:".env"})," file and automatically included in tool execution and chat messages."]}),(0,ne.jsxs)("p",{children:[(0,ne.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},B2=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i})=>{let[s,l]=(0,Mt.useState)(e.key),[o,c]=(0,Mt.useState)(e.value),[u,p]=(0,Mt.useState)(!1),f=e.value.length>60,d=u||!f?e.value:e.value.substring(0,60)+"...";return(0,ne.jsx)("div",{className:"env-variable-item",children:t?(0,ne.jsxs)("div",{className:"env-variable-edit",children:[(0,ne.jsxs)("div",{className:"env-edit-fields",children:[(0,ne.jsx)("input",{type:"text",value:s,onChange:k=>l(k.target.value),className:"env-key-input",placeholder:"Variable name"}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsx)("textarea",{value:o,onChange:k=>c(k.target.value),className:"env-value-input",placeholder:"Value",rows:1})]}),(0,ne.jsxs)("div",{className:"env-edit-actions",children:[(0,ne.jsx)("button",{className:"save-edit-btn",onClick:()=>{if(!s.trim()){alert("Variable name cannot be empty");return}a(s,o)},title:"Save changes",children:"\u2713"}),(0,ne.jsx)("button",{className:"cancel-edit-btn",onClick:()=>{l(e.key),c(e.value),r()},title:"Cancel editing",children:"\u2715"})]})]}):(0,ne.jsxs)("div",{className:"env-variable-display",children:[(0,ne.jsxs)("div",{className:"env-variable-content",children:[(0,ne.jsx)("span",{className:"env-key",children:e.key}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsxs)("div",{className:"env-value-container",children:[(0,ne.jsx)("span",{className:"env-value",onClick:()=>f&&p(!u),style:{cursor:f?"pointer":"default"},title:f?"Click to expand/collapse":e.value,children:d||"<empty>"}),f&&(0,ne.jsx)("button",{className:"expand-btn",onClick:()=>p(!u),title:u?"Collapse":"Expand",children:u?"\u25B2":"\u25BC"})]})]}),(0,ne.jsxs)("div",{className:"env-variable-actions",children:[(0,ne.jsx)("button",{className:"edit-variable-btn",onClick:n,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ne.jsx)("button",{className:"delete-variable-btn",onClick:i,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var Rt,wm,sN=N(()=>{"use strict";bm();Sm();Em();Tm();Rt=Z(oe()),wm=({activeTab:e,onTabChange:t,persona:n,onSavePersona:a,apiKey:r,agentId:i,skillId:s,sandboxId:l,width:o})=>(0,Rt.jsx)("div",{className:"log-container",style:{width:`${o}px`},children:(0,Rt.jsxs)("div",{className:"top-section",children:[(0,Rt.jsx)("div",{className:"log-header",children:(0,Rt.jsxs)("div",{className:"tab-buttons",children:[(0,Rt.jsx)("button",{className:`tab-button ${e==="persona"?"active":""}`,onClick:()=>t("persona"),children:"Persona"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="skills"?"active":""}`,onClick:()=>t("skills"),children:"Skills"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="userdata"?"active":""}`,onClick:()=>t("userdata"),children:"Data"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="env"?"active":""}`,onClick:()=>t("env"),children:"Env"})]})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="persona"?"active":"inactive"}`,children:(0,Rt.jsx)(ym,{persona:n,onSavePersona:a,apiKey:r,agentId:i})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="skills"?"active":"inactive"}`,children:(0,Rt.jsx)(xm,{apiKey:r,agentId:i,skillId:s,sandboxId:l})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="userdata"?"active":"inactive"}`,children:(0,Rt.jsx)(Nm,{apiKey:r,agentId:i})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="env"?"active":"inactive"}`,children:(0,Rt.jsx)(km,{apiKey:r,agentId:i})})]})})});var Yn,Tl,wl,Wc=N(()=>{Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";Tl=Object.create(null);Object.keys(Yn).forEach(e=>{Tl[Yn[e]]=e});wl={type:"error",data:"parser error"}});function oN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function fN(e,t){if(cN&&e.data instanceof Blob)return e.data.arrayBuffer().then(oN).then(t);if(uN&&(e.data instanceof ArrayBuffer||dN(e.data)))return t(oN(e.data));Al(e,!1,n=>{Am||(Am=new TextEncoder),t(Am.encode(n))})}var cN,uN,dN,Al,lN,Am,pN=N(()=>{Wc();cN=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",uN=typeof ArrayBuffer=="function",dN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Al=({type:e,data:t},n,a)=>cN&&t instanceof Blob?n?a(t):lN(t,a):uN&&(t instanceof ArrayBuffer||dN(t))?n?a(t):lN(new Blob([t]),a):a(Yn[e]+(t||"")),lN=(e,t)=>{let n=new FileReader;return n.onload=function(){let a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)}});var mN,Cl,hN,gN=N(()=>{mN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cl=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<mN.length;e++)Cl[mN.charCodeAt(e)]=e;hN=e=>{let t=e.length*.75,n=e.length,a,r=0,i,s,l,o;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<n;a+=4)i=Cl[e.charCodeAt(a)],s=Cl[e.charCodeAt(a+1)],l=Cl[e.charCodeAt(a+2)],o=Cl[e.charCodeAt(a+3)],u[r++]=i<<2|s>>4,u[r++]=(s&15)<<4|l>>2,u[r++]=(l&3)<<6|o&63;return c}});var V2,Rl,H2,vN,yN=N(()=>{Wc();gN();V2=typeof ArrayBuffer=="function",Rl=(e,t)=>{if(typeof e!="string")return{type:"message",data:vN(e,t)};let n=e.charAt(0);return n==="b"?{type:"message",data:H2(e.substring(1),t)}:Tl[n]?e.length>1?{type:Tl[n],data:e.substring(1)}:{type:Tl[n]}:wl},H2=(e,t)=>{if(V2){let n=hN(e);return vN(n,t)}else return{base64:!0,data:e}},vN=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}}});function NN(){return new TransformStream({transform(e,t){fN(e,n=>{let a=n.length,r;if(a<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,a);else if(a<65536){r=new Uint8Array(3);let i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,a)}else{r=new Uint8Array(9);let i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})}function eu(e){return e.reduce((t,n)=>t+n.length,0)}function tu(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),a=0;for(let r=0;r<t;r++)n[r]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function EN(e,t){Cm||(Cm=new TextDecoder);let n=[],a=0,r=-1,i=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(a===0){if(eu(n)<1)break;let o=tu(n,1);i=(o[0]&128)===128,r=o[0]&127,r<126?a=3:r===126?a=1:a=2}else if(a===1){if(eu(n)<2)break;let o=tu(n,2);r=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),a=3}else if(a===2){if(eu(n)<8)break;let o=tu(n,8),c=new DataView(o.buffer,o.byteOffset,o.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(wl);break}r=u*Math.pow(2,32)+c.getUint32(4),a=3}else{if(eu(n)<r)break;let o=tu(n,r);l.enqueue(Rl(i?o:Cm.decode(o),t)),a=0}if(r===0||r>e){l.enqueue(wl);break}}}})}var bN,xN,SN,Cm,Rm,Ii=N(()=>{pN();yN();Wc();bN="",xN=(e,t)=>{let n=e.length,a=new Array(n),r=0;e.forEach((i,s)=>{Al(i,!1,l=>{a[s]=l,++r===n&&t(a.join(bN))})})},SN=(e,t)=>{let n=e.split(bN),a=[];for(let r=0;r<n.length;r++){let i=Rl(n[r],t);if(a.push(i),i.type==="error")break}return a};Rm=4});function Ge(e){if(e)return q2(e)}function q2(e){for(var t in Ge.prototype)e[t]=Ge.prototype[t];return e}var Mr=N(()=>{Ge.prototype.on=Ge.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ge.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ge.prototype.off=Ge.prototype.removeListener=Ge.prototype.removeAllListeners=Ge.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,r=0;r<n.length;r++)if(a=n[r],a===t||a.fn===t){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ge.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,r=n.length;a<r;++a)n[a].apply(this,t)}return this};Ge.prototype.emitReserved=Ge.prototype.emit;Ge.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ge.prototype.hasListeners=function(e){return!!this.listeners(e).length}});var Sa,$t,kN,Ur=N(()=>{Sa=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$t=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),kN="arraybuffer"});function nu(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}function Na(e,t){t.useNativeTimers?(e.setTimeoutFn=j2.bind($t),e.clearTimeoutFn=I2.bind($t)):(e.setTimeoutFn=$t.setTimeout.bind($t),e.clearTimeoutFn=$t.clearTimeout.bind($t))}function TN(e){return typeof e=="string"?G2(e):Math.ceil((e.byteLength||e.size)*Y2)}function G2(e){let t=0,n=0;for(let a=0,r=e.length;a<r;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function au(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var j2,I2,Y2,Pr=N(()=>{Ur();j2=$t.setTimeout,I2=$t.clearTimeout;Y2=1.33});function wN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function AN(e){let t={},n=e.split("&");for(let a=0,r=n.length;a<r;a++){let i=n[a].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var _m=N(()=>{});var ru,Ea,_l=N(()=>{Ii();Mr();Pr();_m();ru=class extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}},Ea=class extends Ge{constructor(t){super(),this.writable=!1,Na(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new ru(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let n=Rl(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let n=wN(t);return n.length?"?"+n:""}}});var Dl,Dm=N(()=>{_l();Pr();Ii();Dl=class extends Ea{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};SN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,xN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=au()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}});var CN,RN,_N=N(()=>{CN=!1;try{CN=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}RN=CN});function X2(){}function DN(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}function ON(e){let t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RN))return new XMLHttpRequest}catch(n){}if(!t)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}var Om,ar,Q2,rr,iu=N(()=>{Dm();Mr();Pr();Ur();_N();Om=class extends Dl{constructor(t){if(super(t),typeof location!="undefined"){let n=location.protocol==="https:",a=location.port;a||(a=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){let a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}},ar=class e extends Ge{constructor(t,n,a){super(),this.createRequest=t,Na(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;let n=nu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&a.setRequestHeader(r,this._opts.extraHeaders[r])}}catch(r){}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{a.setRequestHeader("Accept","*/*")}catch(r){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var r;a.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document!="undefined"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=X2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ar.requestsCount=0;ar.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",DN);else if(typeof addEventListener=="function"){let e="onpagehide"in $t?"pagehide":"unload";addEventListener(e,DN,!1)}}Q2=(function(){let e=ON({xdomain:!1});return e&&e.responseType!==null})(),rr=class extends Om{constructor(t){super(t);let n=t&&t.forceBase64;this.supportsBinary=Q2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(ON,this.uri(),t)}}});var LN,zm,Lm,ir,su=N(()=>{_l();Pr();Ii();Ur();LN=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",zm=class extends Ea{get name(){return"websocket"}doOpen(){let t=this.uri(),n=this.opts.protocols,a=LN?{}:nu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;Al(a,this.supportsBinary,i=>{try{this.doWrite(a,i)}catch(s){}r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=au()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}},Lm=$t.WebSocket||$t.MozWebSocket,ir=class extends zm{createSocket(t,n,a){return LN?new Lm(t,n,a):n?new Lm(t,n):new Lm(t)}doWrite(t,n){this.ws.send(n)}}});var Yi,Mm=N(()=>{_l();Ur();Ii();Yi=class extends Ea{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let n=EN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),r=NN();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let i=()=>{a.read().then(({done:l,value:o})=>{l||(this.onPacket(o),i())}).catch(l=>{})};i();let s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;this._writer.write(a).then(()=>{r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}});var Um,Pm=N(()=>{iu();su();Mm();Um={websocket:ir,webtransport:Yi,polling:rr}});function Gi(e){if(e.length>8e3)throw"URI too long";let t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let r=F2.exec(e||""),i={},s=14;for(;s--;)i[Z2[s]]=r[s]||"";return n!=-1&&a!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=$2(i,i.path),i.queryKey=J2(i,i.query),i}function $2(e,t){let n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function J2(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,r,i){r&&(n[r]=i)}),n}var F2,Z2,Bm=N(()=>{F2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var Vm,lu,Br,ou,Xi,Hm=N(()=>{Pm();Pr();_m();Bm();Mr();Ii();Ur();Vm=typeof addEventListener=="function"&&typeof removeEventListener=="function",lu=[];Vm&&addEventListener("offline",()=>{lu.forEach(e=>e())},!1);Br=class e extends Ge{constructor(t,n){if(super(),this.binaryType=kN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){let a=Gi(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=Gi(n.host).host);Na(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{let r=a.prototype.name;this.transports.push(r),this._transportsByName[r]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=AN(this.opts.query)),Vm&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let n=Object.assign({},this.opts.query);n.EIO=Rm,n.transport=t,this.id&&(n.sid=this.id);let a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){let r=this.writeBuffer[a].data;if(r&&(n+=TN(r)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Sa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,r){if(typeof n=="function"&&(r=n,n=void 0),typeof a=="function"&&(r=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;let i={type:t,data:n,options:a};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vm&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=lu.indexOf(this._offlineEventListener);a!==-1&&lu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}};Br.protocol=Rm;ou=class extends Br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;Br.priorWebsocketSuccess=!1;let r=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!a)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Br.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){a||(a=!0,u(),n.close(),n=null)}let s=p=>{let f=new Error("probe error: "+p);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function l(){s("transport closed")}function o(){s("socket closed")}function c(p){n&&p.name!==n.name&&i()}let u=()=>{n.removeListener("open",r),n.removeListener("error",s),n.removeListener("close",l),this.off("close",o),this.off("upgrading",c)};n.once("open",r),n.once("error",s),n.once("close",l),this.once("close",o),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}},Xi=class extends ou{constructor(t,n={}){let a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(r=>Um[r]).filter(r=>!!r)),super(t,a)}}});var zN=N(()=>{Dm()});var YU,cu=N(()=>{Hm();Hm();_l();Pm();Pr();Bm();Ur();zN();iu();iu();su();su();Mm();YU=Xi.protocol});function MN(e,t="",n){let a=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),a=Gi(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";let i=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+i+":"+a.port+t,a.href=a.protocol+"://"+i+(n&&n.port===a.port?"":":"+a.port),a}var UN=N(()=>{cu()});function Ll(e){return W2&&(e instanceof ArrayBuffer||eR(e))||tR&&e instanceof Blob||nR&&e instanceof File}function Ol(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(Ol(e[n]))return!0;return!1}if(Ll(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ol(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ol(e[n]))return!0;return!1}var W2,eR,PN,tR,nR,qm=N(()=>{W2=typeof ArrayBuffer=="function",eR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PN=Object.prototype.toString,tR=typeof Blob=="function"||typeof Blob!="undefined"&&PN.call(Blob)==="[object BlobConstructor]",nR=typeof File=="function"||typeof File!="undefined"&&PN.call(File)==="[object FileConstructor]"});function BN(e){let t=[],n=e.data,a=e;return a.data=jm(n,t),a.attachments=t.length,{packet:a,buffers:t}}function jm(e,t){if(!e)return e;if(Ll(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=jm(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){let n={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=jm(e[a],t));return n}return e}function VN(e,t){return e.data=Im(e.data,t),delete e.attachments,e}function Im(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Im(e[n],t);else if(typeof e=="object")for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Im(e[n],t));return e}var HN=N(()=>{qm()});var Qm={};fu(Qm,{Decoder:()=>Gm,Encoder:()=>Ym,PacketType:()=>Ne,protocol:()=>jN});function qN(e){return Object.prototype.toString.call(e)==="[object Object]"}var aR,jN,Ne,Ym,Gm,Xm,uu=N(()=>{Mr();HN();qm();aR=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],jN=5;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));Ym=class{constructor(t){this.replacer=t}encode(t){return(t.type===Ne.EVENT||t.type===Ne.ACK)&&Ol(t)?this.encodeAsBinary({type:t.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ne.BINARY_EVENT||t.type===Ne.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){let n=BN(t),a=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(a),r}};Gm=class e extends Ge{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);let a=n.type===Ne.BINARY_EVENT;a||n.type===Ne.BINARY_ACK?(n.type=a?Ne.EVENT:Ne.ACK,this.reconstructor=new Xm(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ll(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0,a={type:Number(t.charAt(0))};if(Ne[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Ne.BINARY_EVENT||a.type===Ne.BINARY_ACK){let i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);let s=t.substring(i,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");a.attachments=Number(s)}if(t.charAt(n+1)==="/"){let i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(i,n)}else a.nsp="/";let r=t.charAt(n+1);if(r!==""&&Number(r)==r){let i=n+1;for(;++n;){let s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}a.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(a.type,i))a.data=i;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ne.CONNECT:return qN(n);case Ne.DISCONNECT:return n===void 0;case Ne.CONNECT_ERROR:return typeof n=="string"||qN(n);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&aR.indexOf(n[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Xm=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let n=VN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}});function En(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Fm=N(()=>{});var rR,Qi,Zm=N(()=>{uu();Fm();Mr();rR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qi=class extends Ge{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[En(t,"open",this.onopen.bind(this)),En(t,"packet",this.onpacket.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,r,i;if(rR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let s={type:Ne.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let u=this.ids++,p=n.pop();this._registerAckCallback(u,p),s.id=u}let l=(r=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||r===void 0?void 0:r.writable,o=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var a;let r=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(r===void 0){this.acks[t]=n;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},r),s=(...l)=>{this.io.clearTimeoutFn(i),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((a,r)=>{let i=(s,l)=>s?r(s):a(l);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());let a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...i)=>a!==this._queue[0]?void 0:(r!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...i)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){let a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();let a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){let n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let n=this,a=!1;return function(...r){a||(a=!0,n.packet({type:Ne.ACK,id:t,data:r}))}}onack(t){let n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let a of n)a.apply(this,t.data)}}}});function Vr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}var IN=N(()=>{Vr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Vr.prototype.reset=function(){this.attempts=0};Vr.prototype.setMin=function(e){this.ms=e};Vr.prototype.setMax=function(e){this.max=e};Vr.prototype.setJitter=function(e){this.jitter=e}});var Fi,YN=N(()=>{cu();Zm();uu();Fm();IN();Mr();Fi=class extends Ge{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Na(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Vr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;let r=n.parser||Qm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Xi(this.uri,this.opts);let n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;let r=En(n,"open",function(){a.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=En(n,"error",i);if(this._timeout!==!1){let l=this._timeout,o=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(En(t,"ping",this.onping.bind(this)),En(t,"data",this.ondata.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this)),En(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Sa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new Qi(this,t,n),this.nsps[t]=a),a}_destroy(t){let n=Object.keys(this.nsps);for(let a of n)if(this.nsps[a].active)return;this._close()}_packet(t){let n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}});function Ml(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let n=MN(e,t.path||"/socket.io"),a=n.source,r=n.id,i=n.path,s=zl[r]&&i in zl[r].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s,o;return l?o=new Fi(a,t):(zl[r]||(zl[r]=new Fi(a,t)),o=zl[r]),n.query&&!t.query&&(t.query=n.queryKey),o.socket(n.path,t)}var zl,GN=N(()=>{UN();YN();Zm();uu();cu();zl={};Object.assign(Ml,{Manager:Fi,Socket:Qi,io:Ml,connect:Ml})});var on,be,$m,XN=N(()=>{"use strict";on=Z($e());GN();Zt();be=Z(oe()),$m=({apiKey:e,agentId:t,sandboxId:n})=>{let[a,r]=(0,on.useState)([]),[i,s]=(0,on.useState)(!1),[l,o]=(0,on.useState)(new Set),[c,u]=(0,on.useState)(!0),[p,f]=(0,on.useState)(!1),d=(0,on.useRef)(null),x=(0,on.useRef)(null),y=(0,on.useRef)(null),k=()=>{var g;(g=d.current)==null||g.scrollIntoView({behavior:"smooth"})},m=g=>{o(S=>{let T=new Set(S);return T.has(g)?T.delete(g):T.add(g),T})},h=()=>O(null,null,function*(){try{console.log("Clearing logs from all sandbox skills with API key:",e,"agentId:",t),f(!0);let g=yield re.getAllSkillOverrides();if(g.length===0){console.log("No skills found to clear logs from"),r([]),o(new Set);return}let S=g.map(w=>O(null,null,function*(){try{return yield re.clearSandboxLogs(e,t,w.sandboxId)}catch(C){return console.error(`Error clearing logs for skill ${w.skillId}:`,C),{success:!1,error:"Failed to clear logs"}}}));(yield Promise.all(S)).every(w=>w.success)?(r([]),o(new Set),console.log("All logs cleared successfully")):(console.error("Some log clearing operations failed"),alert("Some logs could not be cleared. Check console for details."))}catch(g){console.error("Failed to clear logs:",g),alert("Failed to clear logs")}finally{f(!1)}});return(0,on.useEffect)(()=>{k()},[a]),(0,on.useEffect)(()=>{e&&t&&O(null,null,function*(){try{console.log("Loading logs from all sandbox skills with API key:",e,"agentId:",t),u(!0);let S=yield re.loadAllSandboxLogs(e,t,100);if(console.log("All sandbox logs response:",S),S.success&&S.data){let T=S.data.logs.map(E=>({_id:E._id,id:E.id,timestamp:new Date(E.timestamp).toLocaleTimeString(),type:E.type,subType:E.subType,message:E.message,duration:E.duration,error:E.error,metadata:E.metadata,skillName:E.skillName,sandboxId:E.sandboxId}));console.log("Converted logs from all skills:",T),r(T)}else console.log("No logs or error:",S.error)}catch(S){console.error("Failed to load logs from all skills:",S)}finally{u(!1)}})},[e,t]),(0,on.useEffect)(()=>{let g=()=>{try{let E=new WebSocket("ws://localhost:3000");x.current=E,E.onopen=()=>{console.log("Connected to CLI dev server"),s(!0)},E.onclose=()=>{console.log("Disconnected from CLI dev server")},E.onmessage=w=>{try{let C=JSON.parse(w.data);if(console.log("Received message from CLI:",C),C.type==="log"){let U={id:C.id||Date.now().toString(),timestamp:new Date(C.timestamp||Date.now()).toLocaleTimeString(),type:C.type||"log",subType:C.subType||"info",message:C.message||"No message",metadata:C.metadata||{},error:C.error};r(H=>[...H,U])}}catch(C){console.error("Failed to parse CLI WebSocket message:",C)}},E.onerror=w=>{console.error("CLI WebSocket error:",w)}}catch(E){console.error("Failed to connect to CLI dev server:",E)}},S=()=>{try{let E=Ml("wss://api.heylua.ai/feed",{query:{apiKey:e,channel:"logs"}});y.current=E,E.on("connect",()=>{console.log("Connected to server log feed"),s(!0),T("\u{1F7E2} Connected to log feed","connected")}),E.on("disconnect",()=>{console.log("Disconnected from server log feed"),s(!1),T("\u{1F534} Disconnected from log feed","disconnected")}),E.on("log",w=>{let C="info",U="No message",H={},_="";if(w&&typeof w=="object"){let L=w.data||w;C=L.subType||"info",U=L.message||"No message",H=L.metadata||{},_=L.error||L.details||"",_&&typeof _=="object"&&(_=JSON.stringify(_,null,2))}else typeof w=="string"&&(U=w,C="info");let R={id:Date.now().toString(),timestamp:new Date().toLocaleTimeString(),type:"log",subType:C,message:U,metadata:H,error:_};r(L=>[...L,R])}),E.on("connect_error",w=>{T("\u{1F534} Connection failed","disconnected")})}catch(E){T("\u{1F534} Connection error","disconnected")}},T=(E,w)=>{let C=document.getElementById("logConnectionStatus");C&&(C.textContent=E,C.className=`log-connection-status ${w}`)};return g(),e&&t&&n&&S(),()=>{x.current&&x.current.close(),y.current&&y.current.disconnect()}},[e,t,n]),(0,be.jsxs)("div",{className:"log-messages",children:[(0,be.jsxs)("div",{className:"logs-header",children:[(0,be.jsxs)("div",{className:"logs-title",children:["Console Logs (",a.length,")"]}),(0,be.jsx)("div",{className:"logs-actions",children:(0,be.jsx)("button",{className:"clear-logs-button",onClick:h,disabled:p,title:"Clear all logs",children:p?"\u27F3":"\u{1F5D1}\uFE0F"})})]}),(0,be.jsxs)("div",{className:"log-content",children:[c?(0,be.jsx)("div",{className:"no-logs",children:(0,be.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):a.length===0?(0,be.jsxs)("div",{className:"no-logs",children:[(0,be.jsx)("div",{className:"no-logs-icon",children:"\u{1F4CB}"}),(0,be.jsx)("div",{className:"no-logs-text",children:"No logs yet"}),(0,be.jsx)("div",{className:"no-logs-subtext",children:"Console logs will appear here when your skill runs"})]}):(0,be.jsx)(be.Fragment,{children:a.map(g=>{let S=l.has(g.id),T=g.metadata&&Object.keys(g.metadata).length>0,E=g.error&&typeof g.error=="string"&&g.error.trim()!=="",w=T||E;return(0,be.jsxs)("div",{className:`log-entry ${g.subType}`,children:[(0,be.jsxs)("div",{className:"log-main",onClick:()=>m(g.id),children:[(0,be.jsxs)("span",{className:"log-timestamp",children:["[",g.timestamp,"]"]}),(0,be.jsxs)("span",{className:"log-type",children:["[",g.subType.toUpperCase(),"]"]}),g.skillName&&(0,be.jsxs)("span",{className:"log-skill",children:["[",g.skillName,"]"]}),(0,be.jsx)("span",{className:`log-message ${S?"expanded":"ellipsed"}`,children:g.message}),(0,be.jsx)("span",{className:`expand-arrow ${S?"expanded":""}`,children:"\u25B6"})]}),S&&(0,be.jsxs)("div",{className:"log-details",children:[(0,be.jsxs)("div",{className:"full-message",children:[(0,be.jsx)("div",{className:"detail-label",children:"Message:"}),(0,be.jsx)("div",{className:"detail-content",children:g.message})]}),E&&(0,be.jsxs)("div",{className:"error-details",children:[(0,be.jsx)("div",{className:"detail-label",children:"Error:"}),(0,be.jsx)("div",{className:"detail-content",children:typeof g.error=="string"?g.error:JSON.stringify(g.error)})]}),T&&(0,be.jsxs)("div",{className:"metadata",children:[(0,be.jsx)("div",{className:"detail-label",children:"Metadata:"}),Object.entries(g.metadata).map(([C,U])=>(0,be.jsxs)("div",{className:"metadata-item",children:[(0,be.jsxs)("span",{className:"metadata-key",children:[C,":"]}),(0,be.jsx)("span",{className:"metadata-value",children:String(U)})]},C))]})]})]},g.id)})}),(0,be.jsx)("div",{ref:d})]}),(0,be.jsx)("div",{className:"log-footer-status",children:(0,be.jsx)("div",{id:"logConnectionStatus",className:"log-connection-status",children:"\u{1F7E1} Connecting..."})})]})}});var QN=N(()=>{});var FN,ZN,$N=N(()=>{"use strict";FN=Z($e());Zt();QN();ZN=Z(oe())});var JN=N(()=>{"use strict";rN();sN();XN();bm();Em();Tm();$N();Sm();Kc()});var kn,Bn,KN,WN=N(()=>{"use strict";kn=Z($e());JN();Zt();Bn=Z(oe()),KN=({apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,kn.useState)("persona"),[p,f]=(0,kn.useState)(""),[d,x]=(0,kn.useState)(window.innerWidth/2),[y,k]=(0,kn.useState)(250),m=(0,kn.useRef)(!1),h=(0,kn.useRef)(!1),g=(0,kn.useRef)(null),S=(0,kn.useRef)(null);(0,kn.useEffect)(()=>{T()},[]),(0,kn.useEffect)(()=>{let w=H=>{var R,L;let _=H.target;_===g.current||(R=g.current)!=null&&R.contains(_)?(m.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none",H.preventDefault()):(_===S.current||(L=S.current)!=null&&L.contains(_))&&(h.current=!0,document.body.style.cursor="row-resize",document.body.style.userSelect="none",H.preventDefault())},C=H=>{if(m.current){let _=window.innerWidth,R=_-H.clientX,L=500,G=_-300;R>=L&&R<=G&&x(R)}else if(h.current){let _=window.innerHeight-60,R=_-H.clientY+60,L=150,G=_-300;R>=L&&R<=G&&k(R)}},U=()=>{m.current?(m.current=!1,document.body.style.cursor="",document.body.style.userSelect=""):h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousedown",w),document.addEventListener("mousemove",C),document.addEventListener("mouseup",U),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",U)}},[]);let T=()=>O(null,null,function*(){try{let w=yield re.loadPersona();w.success&&f(w.persona||"")}catch(w){console.error("Failed to load persona:",w)}}),E=w=>O(null,null,function*(){try{let C=yield re.savePersona(w);return C.success?(f(w),!0):(alert("Failed to save persona: "+(C.error||"Unknown error")),!1)}catch(C){return console.error("Failed to save persona:",C),alert("Failed to save persona"),!1}});return(0,Bn.jsxs)("div",{className:"sandbox-page",children:[(0,Bn.jsxs)("div",{className:"left-side",style:{width:`calc(100% - ${d}px)`},children:[(0,Bn.jsx)("div",{className:"chat-container",style:{height:`calc(100% - ${y}px)`},children:(0,Bn.jsx)(vm,{apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:p,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})}),(0,Bn.jsx)("div",{ref:S,className:"logs-resize-handle",children:(0,Bn.jsx)("div",{className:"resize-line"})}),(0,Bn.jsx)("div",{className:"logs-container",style:{height:`${y}px`},children:(0,Bn.jsx)($m,{apiKey:e,agentId:t,sandboxId:a})})]}),(0,Bn.jsx)("div",{ref:g,className:"resize-handle"}),(0,Bn.jsx)(wm,{activeTab:c,onTabChange:u,persona:p,onSavePersona:E,apiKey:e,agentId:t,skillId:n,sandboxId:a,width:d})]})}});var eE,It,Jm,tE=N(()=>{"use strict";eE=Z($e());hm();It=Z(oe()),Jm=({messages:e,onSendMessage:t,onClearHistory:n,isLoading:a})=>{let[r,i]=(0,eE.useState)(""),s=e.length>0?e:[{id:"welcome",text:"Welcome to Production Management! I can help you monitor deployments, analyze performance, and manage your live environment. How can I assist you today?",sender:"assistant",timestamp:new Date}],l=()=>{!r.trim()||a||(t(r),i(""))},o=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),l())};return(0,It.jsxs)("div",{className:"production-chat",children:[(0,It.jsxs)("div",{className:"chat-header",children:[(0,It.jsx)("h3",{children:"Production Chat"}),(0,It.jsx)("button",{onClick:n,className:"clear-history-button",title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,It.jsxs)("div",{className:"chat-messages",children:[s.map(c=>(0,It.jsx)("div",{className:`message ${c.sender}`,children:(0,It.jsx)("div",{className:"message-bubble",children:(0,It.jsx)(Nl,{children:c.text})})},c.id)),a&&(0,It.jsx)("div",{className:"loading",children:(0,It.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})]}),(0,It.jsx)("div",{className:"chat-input-container",children:(0,It.jsxs)("div",{className:"chat-input-form",children:[(0,It.jsx)("input",{type:"text",id:"production-chat-input",name:"productionChatMessage",value:r,onChange:c=>i(c.target.value),onKeyPress:o,placeholder:"Type your message...",className:"chat-input",disabled:a,autoComplete:"off"}),(0,It.jsx)("button",{onClick:l,disabled:a||!r.trim(),className:"send-button",children:"Send"})]})})]})}});var iR,nE,aE=N(()=>{"use strict";iR=Z($e()),nE=Z(oe())});var sR,rE,Km=N(()=>{"use strict";sR=Z($e()),rE=Z(oe())});var oR,iE,sE=N(()=>{"use strict";oR=Z($e());Km();iE=Z(oe())});var cn,se,Wm,lE=N(()=>{"use strict";cn=Z($e());Zt();se=Z(oe()),Wm=({apiKey:e,agentId:t})=>{let[n,a]=(0,cn.useState)([]),[r,i]=(0,cn.useState)(!0),[s,l]=(0,cn.useState)(new Set),[o,c]=(0,cn.useState)(1),[u,p]=(0,cn.useState)(1),[f,d]=(0,cn.useState)(0),[x,y]=(0,cn.useState)(!1),[k,m]=(0,cn.useState)(!1),h=(0,cn.useRef)(null),g=()=>{var _;(_=h.current)==null||_.scrollIntoView({behavior:"smooth"})},S=_=>{l(R=>{let L=new Set(R);return L.has(_)?L.delete(_):L.add(_),L})},T=(_=1)=>O(null,null,function*(){i(!0);try{console.log("Loading production logs for page:",_);let R=yield re.loadProductionLogs(e,t,_,20);if(R.success&&R.logs){let L=[...R.logs].reverse();a(L),R.pagination&&(c(R.pagination.currentPage),p(R.pagination.totalPages),d(R.pagination.totalCount),y(R.pagination.hasNextPage),m(R.pagination.hasPrevPage))}else console.error("Failed to load production logs:",R.error),a([])}catch(R){console.error("Error loading production logs:",R),a([])}finally{i(!1)}}),E=()=>{T(o)},w=_=>{_>=1&&_<=u&&(c(_),T(_))},C=()=>{x&&w(o+1)},U=()=>{k&&w(o-1)};(0,cn.useEffect)(()=>{e&&t&&T(1)},[e,t]),(0,cn.useEffect)(()=>{g()},[n]);let H=_=>new Date(_).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return r&&n.length===0?(0,se.jsx)("div",{className:"logs-panel",children:(0,se.jsx)("div",{className:"logs-loading",children:(0,se.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,se.jsxs)("div",{className:"logs-panel",children:[(0,se.jsxs)("div",{className:"logs-header",children:[(0,se.jsxs)("div",{className:"logs-header-content",children:[(0,se.jsx)("h3",{children:"Production Logs"}),(0,se.jsx)("div",{className:"logs-info",children:f>0&&(0,se.jsxs)("span",{className:"logs-count",children:[f," total logs"]})})]}),(0,se.jsx)("div",{className:"logs-actions",children:(0,se.jsx)("button",{className:"refresh-logs-button",onClick:E,disabled:r,title:"Refresh logs",children:r?(0,se.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"})})]}),(0,se.jsx)("div",{className:"logs-content",children:n.length===0?(0,se.jsxs)("div",{className:"no-logs",children:[(0,se.jsx)("div",{className:"no-logs-icon",children:"\u{1F4DD}"}),(0,se.jsx)("div",{className:"no-logs-text",children:"No logs found"}),(0,se.jsx)("div",{className:"no-logs-subtext",children:"Production logs will appear here when your skills are used"})]}):(0,se.jsxs)("div",{className:"logs-list",children:[n.map(_=>{var G,P,W,ie;let R=s.has(_.id),L=_.metadata&&(_.metadata.toolId||_.metadata.skillName);return(0,se.jsxs)("div",{className:`log-entry ${_.subType} ${R?"expanded":""}`,children:[(0,se.jsxs)("div",{className:"log-main",onClick:()=>L&&S(_.id),style:{cursor:L?"pointer":"default"},children:[(0,se.jsx)("span",{className:"log-timestamp",children:H(_.timestamp)}),(0,se.jsx)("span",{className:`log-level ${_.subType}`,children:_.subType.toUpperCase()}),(0,se.jsx)("span",{className:"log-message",children:_.message}),((G=_.metadata)==null?void 0:G.skillName)&&(0,se.jsx)("span",{className:"log-skill",children:_.metadata.skillName}),L&&(0,se.jsx)("span",{className:`expand-arrow ${R?"expanded":""}`,children:"\u25B6"})]}),R&&L&&(0,se.jsxs)("div",{className:"log-details",children:[((P=_.metadata)==null?void 0:P.toolId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Tool:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.toolId})]}),((W=_.metadata)==null?void 0:W.skillName)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Skill:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.skillName})]}),((ie=_.metadata)==null?void 0:ie.userId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"User:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.userId})]})]})]},_.id)}),(0,se.jsx)("div",{ref:h})]})}),u>1&&(0,se.jsxs)("div",{className:"logs-pagination",children:[(0,se.jsxs)("div",{className:"pagination-info",children:["Page ",o," of ",u]}),(0,se.jsxs)("div",{className:"pagination-controls",children:[(0,se.jsx)("button",{className:"pagination-button",onClick:U,disabled:!k||r,title:"Previous page",children:"\u2190"}),(0,se.jsxs)("span",{className:"page-numbers",children:[o>2&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("button",{className:"page-number",onClick:()=>w(1),disabled:r,children:"1"}),o>3&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."})]}),o>1&&(0,se.jsx)("button",{className:"page-number",onClick:()=>w(o-1),disabled:r,children:o-1}),(0,se.jsx)("button",{className:"page-number active",disabled:!0,children:o}),o<u&&(0,se.jsx)("button",{className:"page-number",onClick:()=>w(o+1),disabled:r,children:o+1}),o<u-1&&(0,se.jsxs)(se.Fragment,{children:[o<u-2&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."}),(0,se.jsx)("button",{className:"page-number",onClick:()=>w(u),disabled:r,children:u})]})]}),(0,se.jsx)("button",{className:"pagination-button",onClick:C,disabled:!x||r,title:"Next page",children:"\u2192"})]})]})]})}});var Ve,q,eh,cR,th,uR,oE=N(()=>{"use strict";Ve=Z($e());Zt();Kc();q=Z(oe()),eh=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},cR=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"baskets",name:"Baskets",description:"Shopping carts and baskets",icon:"\u{1F6D2}"},{id:"orders",name:"Orders",description:"Order history and transactions",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Reservations and appointments",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Custom application data",icon:"\u2699\uFE0F"}],th=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ve.useState)(null),[r,i]=(0,Ve.useState)(null),[s,l]=(0,Ve.useState)(null),[o,c]=(0,Ve.useState)(!1),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),[x,y]=(0,Ve.useState)(""),[k,m]=(0,Ve.useState)(null),[h,g]=(0,Ve.useState)(null),[S,T]=(0,Ve.useState)(!1),[E,w]=(0,Ve.useState)("list"),C=(0,Ve.useRef)(null),U=(0,Ve.useRef)(null),[H,_]=(0,Ve.useState)(!1),[R,L]=(0,Ve.useState)(""),[G,P]=(0,Ve.useState)(""),[W,ie]=(0,Ve.useState)(!1);(0,Ve.useEffect)(()=>{we()},[e,t]),(0,Ve.useEffect)(()=>{if(console.log("JSON text changed:",x),U.current&&C.current){let Q=eh(x);U.current.innerHTML=Q,U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft}},[x]),(0,Ve.useEffect)(()=>{if(k||h){let Q=setTimeout(()=>{m(null),g(null)},5e3);return()=>clearTimeout(Q)}},[k,h]);let we=()=>O(null,null,function*(){c(!0);try{let Q=yield re.loadUserData(e,t);console.log("User data response:",Q),Q.success&&Q.data?(console.log("User data loaded successfully:",Q.data),a(Q.data),y(JSON.stringify(Q.data,null,2))):(console.error("Failed to load user data:",Q.error),a(null),y("{}"))}catch(Q){console.error("Error loading user data:",Q),a(null),y("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){if(x.trim()){p(!0);try{let Q;try{Q=JSON.parse(x)}catch(V){m("Invalid JSON format. Please check your syntax.");return}let F=yield re.updateUserData(e,t,Q);F.success?(a(F.data||null),T(!1),g("User data saved successfully"),console.log("User data saved successfully")):m("Failed to save user data: "+(F.error||"Unknown error"))}catch(Q){console.error("Error saving user data:",Q),m("Failed to save user data")}finally{p(!1)}}}),v=()=>O(null,null,function*(){d(!0);try{let Q=yield re.clearUserData(e,t);Q.success?(a(null),y("{}"),T(!1),g("User data cleared successfully"),console.log("User data cleared successfully")):m("Failed to clear user data: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error clearing user data:",Q),m("Failed to clear user data")}finally{d(!1)}}),_e=Q=>O(null,null,function*(){if(i(Q),w("detail"),T(!1),m(null),Q.id==="user"){c(!0);try{let F=yield re.loadUserData(e,t);if(F.success&&F.data){l(F.data);let V=JSON.stringify(F.data,null,2);y(V),console.log("Setting JSON text for user data:",V)}else l(null),y("{}"),console.log("No user data found, setting empty JSON")}catch(F){console.error("Failed to load user data:",F),l(null),y("{}")}finally{c(!1)}}else if(Q.id==="resources"){c(!0);try{let F=yield re.loadResources(e,t);F.success&&F.data?(l(F.data),console.log("Loaded resources:",F.data)):(l([]),console.log("No resources found"))}catch(F){console.error("Failed to load resources:",F),l([])}finally{c(!1)}}else l(null),y("{}")}),lt=()=>{w("list"),i(null),l(null),T(!1)},b=()=>{(r==null?void 0:r.id)==="resources"?(_(!0),L(""),P("")):(y("{}"),T(!0))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){m("Please provide both name and content for the resource");return}ie(!0);try{let Q=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});Q.success?(_(!1),L(""),P(""),g("Resource created successfully"),(r==null?void 0:r.id)==="resources"&&(yield _e(r))):m("Failed to create resource: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error creating resource:",Q),m("Failed to create resource")}finally{ie(!1)}}),vt=Q=>{y(Q),C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)},ce=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)};return o&&E==="list"?(0,q.jsx)("div",{className:"user-data-panel",children:(0,q.jsx)("div",{className:"user-data-loading",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,q.jsxs)("div",{className:"user-data-panel",children:[(0,q.jsxs)("div",{className:"user-data-header",children:[E==="detail"&&r?(0,q.jsxs)("div",{className:"header-with-back",children:[(0,q.jsx)("button",{className:"back-button",onClick:lt,title:"Back to Data",children:"\u2190"}),(0,q.jsxs)("h3",{children:[r.name," Data"]})]}):(0,q.jsx)("h3",{children:"Data Management"}),(0,q.jsxs)("div",{className:"user-data-actions",children:[E==="detail"&&(r==null?void 0:r.id)!=="user"&&(0,q.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,q.jsx)("button",{className:"refresh-button",onClick:E==="detail"&&r?()=>_e(r):we,disabled:o,title:`Refresh ${E==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),E==="detail"&&(r==null?void 0:r.id)==="user"&&(0,q.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),E==="detail"&&(0,q.jsx)("button",{className:"delete-button",onClick:v,disabled:u,title:`Clear ${r==null?void 0:r.name.toLowerCase()} data`,children:"\u{1F5D1}\uFE0F"})]})]}),(0,q.jsx)("div",{className:"user-data-content",children:E==="list"?(0,q.jsx)("div",{className:"data-list",children:(0,q.jsx)("div",{className:"data-categories",children:cR.map(Q=>(0,q.jsxs)("div",{className:"data-category",onClick:()=>_e(Q),children:[(0,q.jsx)("div",{className:"category-icon",children:Q.icon}),(0,q.jsxs)("div",{className:"category-info",children:[(0,q.jsx)("div",{className:"category-name",children:Q.name}),(0,q.jsx)("div",{className:"category-description",children:Q.description})]}),(0,q.jsx)("div",{className:"category-arrow",children:"\u2192"})]},Q.id))})}):(r==null?void 0:r.id)==="user"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"json-editor",children:S?(0,q.jsxs)("div",{className:"json-editor-container",children:[(0,q.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:eh(x)}}),(0,q.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:x,onChange:Q=>vt(Q.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,q.jsx)("div",{className:"json-display",onClick:ce,dangerouslySetInnerHTML:{__html:eh(x)}})})}):(r==null?void 0:r.id)==="resources"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"resources-container",children:s&&s.length>0?(0,q.jsx)("div",{className:"resources-list",children:s.map(Q=>(0,q.jsx)(uR,{resource:Q,apiKey:e,agentId:t,onUpdate:()=>_e(r)},Q.id))}):(0,q.jsxs)("div",{className:"no-resources",children:[(0,q.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,q.jsx)("h4",{children:"No resources yet"}),(0,q.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})}):(r==null?void 0:r.id)==="products"?(0,q.jsx)(El,{apiKey:e,agentId:t,isProduction:!0}):(0,q.jsx)("div",{className:"data-detail",children:(0,q.jsxs)("div",{className:"coming-soon",children:[(0,q.jsx)("div",{className:"coming-soon-icon",children:r==null?void 0:r.icon}),(0,q.jsxs)("div",{className:"coming-soon-text",children:[r==null?void 0:r.name," management"]}),(0,q.jsx)("div",{className:"coming-soon-subtext",children:"This feature is coming soon"})]})})}),k&&(0,q.jsx)("div",{className:"error-message",children:k}),h&&(0,q.jsx)("div",{className:"success-message",children:h}),H&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Create New Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:()=>_(!1),disabled:W,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:Q=>L(Q.target.value),placeholder:"Enter resource name...",disabled:W})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"resource-content",value:G,onChange:Q=>P(Q.target.value),placeholder:"Enter resource content...",rows:10,disabled:W})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:()=>_(!1),disabled:W,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},uR=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ve.useState)(!1),[s,l]=(0,Ve.useState)(e.name),[o,c]=(0,Ve.useState)(e.content),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),x=()=>{l(e.name),c(e.content),i(!0)},y=()=>O(null,null,function*(){if(!(!s.trim()||!o.trim())){p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}}),k=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"?`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}}),m=()=>{i(!1),l(e.name),c(e.content)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{className:"resource-item",children:(0,q.jsxs)("div",{className:"resource-display",children:[(0,q.jsxs)("div",{className:"resource-header",children:[(0,q.jsx)("h4",{className:"resource-name",children:e.name}),(0,q.jsx)("div",{className:"resource-meta",children:(0,q.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,q.jsx)("div",{className:"resource-content",children:(0,q.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,q.jsxs)("div",{className:"resource-actions",children:[(0,q.jsx)("button",{className:"edit-btn",onClick:x,disabled:f,title:"Edit resource",children:"\u270F\uFE0F"}),(0,q.jsx)("button",{className:"delete-btn",onClick:k,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Edit Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:m,disabled:u,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Enter resource name...",disabled:u})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Enter resource content...",rows:10,disabled:u})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:m,disabled:u,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:y,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Jt,nh,cE=N(()=>{"use strict";Jt=Z(oe()),nh=({personaVersions:e,onSelectVersion:t,onDeployVersion:n,deployingVersionId:a})=>(0,Jt.jsxs)("div",{className:"persona-panel",children:[(0,Jt.jsx)("div",{className:"panel-header",children:(0,Jt.jsx)("h3",{children:"Persona Management"})}),(0,Jt.jsx)("div",{className:"panel-content",children:(0,Jt.jsxs)("div",{className:"versions-list",children:[e.map(r=>(0,Jt.jsxs)("div",{className:`version-item ${r.isDeployed?"deployed":""} clickable`,onClick:()=>t(r),children:[(0,Jt.jsxs)("div",{className:"version-info",children:[(0,Jt.jsx)("div",{className:"version-number",children:r.version}),(0,Jt.jsx)("div",{className:"version-date",children:r.deployedAt||"No date"}),r.isDeployed&&(0,Jt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!r.isDeployed&&r.status==="available"&&(0,Jt.jsx)("button",{className:`deploy-button ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id)},disabled:a===r.id,children:a===r.id?(0,Jt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},r.id)),e.length===0&&(0,Jt.jsx)("div",{className:"no-versions",children:"No persona versions found"})]})})]})});var it,ah,uE=N(()=>{"use strict";it=Z(oe()),ah=({skills:e,onSelectSkill:t,onActivateSkill:n,activatingSkillId:a})=>(0,it.jsxs)("div",{className:"skills-panel",children:[(0,it.jsx)("div",{className:"panel-header",children:(0,it.jsx)("h3",{children:"Skills Management"})}),(0,it.jsx)("div",{className:"panel-content",children:(0,it.jsx)("div",{className:"skills-list",children:e.map(r=>(0,it.jsxs)("div",{className:`skill-item ${r.active?"active":"inactive"}`,children:[(0,it.jsxs)("div",{className:"skill-main-content",onClick:()=>t(r.name),children:[(0,it.jsxs)("div",{className:"skill-info",children:[(0,it.jsxs)("div",{className:"skill-header",children:[(0,it.jsx)("div",{className:"skill-name",children:r.name}),(0,it.jsx)("div",{className:`skill-status ${r.active?"active":"inactive"}`,children:r.active?"Active":"Inactive"})]}),(0,it.jsx)("div",{className:"skill-description",children:r.description}),(0,it.jsxs)("div",{className:"skill-stats",children:[(0,it.jsxs)("span",{className:"skill-stat",children:[r.versionsCount," versions"]}),(0,it.jsxs)("span",{className:"skill-stat",children:["Latest: ",r.latestVersion]}),r.deployedVersion&&(0,it.jsxs)("span",{className:"skill-stat deployed",children:["Deployed: ",r.deployedVersion]})]})]}),(0,it.jsx)("div",{className:"skill-arrow",children:"\u2192"})]}),(0,it.jsx)("div",{className:"skill-actions",children:(0,it.jsx)("button",{className:`activate-button ${r.active?"deactivate":"activate"} ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id,r.active)},disabled:a===r.id,children:a===r.id?(0,it.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):r.active?"Deactivate":"Activate"})})]},r.id))})})]})});var Kt,rh,dE=N(()=>{"use strict";Kt=Z(oe()),rh=({selectedPersonaVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Kt.jsxs)("div",{className:"persona-detail",children:[(0,Kt.jsxs)("div",{className:"persona-detail-header",children:[(0,Kt.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Kt.jsxs)("h4",{children:["Persona ",e.version]})]}),(0,Kt.jsxs)("div",{className:"persona-section",children:[(0,Kt.jsxs)("div",{className:"persona-header",children:[(0,Kt.jsx)("h3",{children:"Agent Persona"}),(0,Kt.jsx)("div",{className:"persona-actions",children:e.isDeployed?(0,Kt.jsx)("span",{className:"deployed-badge",children:"Deployed"}):e.status==="available"?(0,Kt.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Kt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"}):null})]}),(0,Kt.jsx)("div",{className:"persona-content",children:(0,Kt.jsx)("div",{className:"persona-display",children:e.personaContent})})]})]})});var Te,ih,fE=N(()=>{"use strict";Te=Z(oe()),ih=({selectedSkillVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Te.jsxs)("div",{className:"skill-detail",children:[(0,Te.jsx)("div",{className:"skill-detail-header",children:(0,Te.jsxs)("div",{className:"header-left",children:[(0,Te.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Te.jsxs)("h4",{children:[e.skillName," ",e.version]})]})}),(0,Te.jsx)("div",{className:"skill-details",children:(0,Te.jsxs)("div",{className:"skill-info-section",children:[(0,Te.jsxs)("div",{className:"skill-meta",children:[(0,Te.jsxs)("span",{className:"skill-version",children:["v",e.version]}),e.isDeployed&&(0,Te.jsx)("span",{className:"deployed-badge",children:"Deployed"})]}),e.skillDescription&&(0,Te.jsxs)("div",{className:"skill-description-section",children:[(0,Te.jsx)("h5",{children:"Description"}),(0,Te.jsx)("p",{children:e.skillDescription})]}),e.skillContext&&(0,Te.jsxs)("div",{className:"skill-context-section",children:[(0,Te.jsx)("h5",{children:"Context"}),(0,Te.jsx)("p",{children:e.skillContext})]}),!e.isDeployed&&e.status==="available"&&(0,Te.jsx)("div",{className:"skill-actions",children:(0,Te.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Te.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy This Version"})})]})}),(0,Te.jsxs)("div",{className:"tools-section",children:[(0,Te.jsx)("div",{className:"tools-header",children:(0,Te.jsx)("h5",{children:"Available Tools"})}),(0,Te.jsx)("div",{className:"tools-list",children:e.tools&&e.tools.length>0?e.tools.map((r,i)=>(0,Te.jsxs)("div",{className:"tool-item",children:[(0,Te.jsx)("div",{className:"tool-name",children:r.name}),(0,Te.jsx)("div",{className:"tool-description",children:r.description})]},i)):(0,Te.jsxs)("div",{className:"no-tools",children:[(0,Te.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,Te.jsx)("div",{className:"no-tools-text",children:"No tools available"}),(0,Te.jsx)("div",{className:"no-tools-subtext",children:"This version doesn't have any tools configured"})]})})]})]})});var Wt,sh,pE=N(()=>{"use strict";Wt=Z(oe()),sh=({selectedSkill:e,versions:t,onBack:n,onSelectVersion:a,onDeployVersion:r,formatDate:i,deployingVersionId:s})=>(0,Wt.jsxs)("div",{className:"skill-versions",children:[(0,Wt.jsx)("div",{className:"skill-versions-header",children:(0,Wt.jsxs)("div",{className:"header-left",children:[(0,Wt.jsx)("button",{className:"back-button",onClick:n,children:"\u2190"}),(0,Wt.jsx)("h4",{children:e})]})}),(0,Wt.jsx)("div",{className:"versions-list",children:t.filter(l=>l.type==="skill"&&l.skillName===e).map(l=>(0,Wt.jsxs)("div",{className:`version-item ${l.isDeployed?"deployed":""} clickable`,onClick:()=>a(l),children:[(0,Wt.jsxs)("div",{className:"version-info",children:[(0,Wt.jsx)("div",{className:"version-number",children:l.version}),(0,Wt.jsx)("div",{className:"version-date",children:i(l.deployedAt)}),l.isDeployed&&(0,Wt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!l.isDeployed&&l.status==="available"&&(0,Wt.jsx)("button",{className:`deploy-button ${s===l.id?"loading":""}`,onClick:o=>{o.stopPropagation(),r(l.id)},disabled:s===l.id,children:s===l.id?(0,Wt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},l.id))})]})});var Yt,ae,lh,dR,mE=N(()=>{"use strict";Yt=Z($e());Zt();ae=Z(oe()),lh=({apiKey:e,agentId:t})=>{let[n,a]=(0,Yt.useState)([]),[r,i]=(0,Yt.useState)(!0),[s,l]=(0,Yt.useState)(!1),[o,c]=(0,Yt.useState)(null),[u,p]=(0,Yt.useState)(null),[f,d]=(0,Yt.useState)(null),[x,y]=(0,Yt.useState)(""),[k,m]=(0,Yt.useState)(""),[h,g]=(0,Yt.useState)(!1);(0,Yt.useEffect)(()=>{S()},[e,t]),(0,Yt.useEffect)(()=>{if(o||u){let _=setTimeout(()=>{c(null),p(null)},5e3);return()=>clearTimeout(_)}},[o,u]);let S=()=>O(null,null,function*(){i(!0);try{let _=yield re.loadProductionEnv(e,t);if(_.success&&_.data){let R=Object.entries(_.data.data||{}).map(([L,G],P)=>({id:`${P}-${L}`,key:L,value:G}));a(R)}else console.error("Failed to load production env:",_.error),a([])}catch(_){console.error("Error loading production env:",_),a([])}finally{i(!1)}}),T=_=>O(null,null,function*(){l(!0),c(null),p(null);try{let R={};_.forEach(G=>{G.key.trim()&&(R[G.key.trim()]=G.value)});let L=yield re.updateProductionEnv(e,t,R);L.success?(p("Environment variables saved successfully!"),yield S()):c(L.error||"Failed to save environment variables")}catch(R){console.error("Error saving production env:",R),c("Failed to save environment variables")}finally{l(!1)}}),E=()=>O(null,null,function*(){if(!x.trim()){c("Variable name is required");return}let _={id:Date.now().toString(),key:x.trim(),value:k},R=[...n,_];a(R),yield T(R),y(""),m(""),g(!1)}),w=(_,R,L)=>O(null,null,function*(){let G=n.map(P=>P.id===_?tt(ee({},P),{key:R.trim(),value:L}):P);a(G),d(null),yield T(G)}),C=_=>O(null,null,function*(){let R=n.filter(L=>L.id!==_);a(R),yield T(R)}),U=_=>{d(_)},H=()=>{d(null)};return r?(0,ae.jsx)("div",{className:"env-panel",children:(0,ae.jsx)("div",{className:"env-loading",children:(0,ae.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ae.jsxs)("div",{className:"env-panel",children:[(0,ae.jsxs)("div",{className:"env-header",children:[(0,ae.jsx)("h3",{children:"Environment Variables"}),(0,ae.jsxs)("div",{className:"env-actions",children:[(0,ae.jsx)("button",{className:"refresh-btn",onClick:S,disabled:r,title:"Refresh environment variables",children:r?(0,ae.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"}),(0,ae.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ae.jsxs)("div",{className:"env-content",children:[o&&(0,ae.jsxs)("div",{className:"error-message",children:[(0,ae.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ae.jsxs)("div",{className:"success-message",children:[(0,ae.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ae.jsxs)("div",{className:"env-add-form",children:[(0,ae.jsxs)("div",{className:"env-form-header",children:[(0,ae.jsx)("h4",{children:"Add New Variable"}),(0,ae.jsx)("button",{className:"form-cancel-btn",onClick:()=>{g(!1),y(""),m("")},title:"Cancel",children:"\u2715"})]}),(0,ae.jsxs)("div",{className:"env-form-fields",children:[(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Variable Name"}),(0,ae.jsx)("input",{type:"text",value:x,onChange:_=>y(_.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Value"}),(0,ae.jsx)("input",{type:"text",value:k,onChange:_=>m(_.target.value),placeholder:"your_api_key_here",className:"env-input",autoComplete:"off"})]}),(0,ae.jsx)("div",{className:"env-form-actions",children:(0,ae.jsx)("button",{className:"add-variable-btn",onClick:E,disabled:!x.trim()||s,children:s?"Adding...":"Add Variable"})})]})]}),(0,ae.jsx)("div",{className:"env-variables",children:n.length>0?(0,ae.jsx)("div",{className:"env-list",children:n.map(_=>(0,ae.jsx)(dR,{variable:_,isEditing:f===_.id,onEdit:()=>U(_.id),onSave:(R,L)=>w(_.id,R,L),onCancel:H,onDelete:()=>C(_.id),isSaving:s},_.id))}):(0,ae.jsxs)("div",{className:"env-empty-state",children:[(0,ae.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ae.jsx)("h4",{children:"No environment variables"}),(0,ae.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ae.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ae.jsxs)("div",{className:"env-help",children:[(0,ae.jsx)("p",{children:"Environment variables are used by your production skills and are securely stored."}),(0,ae.jsxs)("p",{children:[(0,ae.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},dR=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i,isSaving:s})=>{let[l,o]=(0,Yt.useState)(e.key),[c,u]=(0,Yt.useState)(e.value),p=()=>{l.trim()&&a(l,c)},f=()=>{o(e.key),u(e.value),r()},d=h=>{h.key==="Enter"&&!h.shiftKey?(h.preventDefault(),p()):h.key==="Escape"&&f()},[x,y]=(0,Yt.useState)(!1),k=e.value.length>60,m=x||!k?e.value:e.value.substring(0,60)+"...";return(0,ae.jsx)("div",{className:"env-variable-item",children:t?(0,ae.jsxs)("div",{className:"env-variable-edit",children:[(0,ae.jsxs)("div",{className:"env-edit-fields",children:[(0,ae.jsx)("input",{type:"text",value:l,onChange:h=>o(h.target.value),onKeyPress:d,className:"env-key-input",placeholder:"Variable name",disabled:s,autoComplete:"off"}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsx)("textarea",{value:c,onChange:h=>u(h.target.value),className:"env-value-input",placeholder:"Value",rows:1,disabled:s,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-edit-actions",children:[(0,ae.jsx)("button",{className:"save-edit-btn",onClick:p,disabled:!l.trim()||s,title:"Save changes",children:"\u2713"}),(0,ae.jsx)("button",{className:"cancel-edit-btn",onClick:f,disabled:s,title:"Cancel editing",children:"\u2715"})]})]}):(0,ae.jsxs)("div",{className:"env-variable-display",children:[(0,ae.jsxs)("div",{className:"env-variable-content",children:[(0,ae.jsx)("span",{className:"env-key",children:e.key}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsxs)("div",{className:"env-value-container",children:[(0,ae.jsx)("span",{className:"env-value",onClick:()=>k&&y(!x),style:{cursor:k?"pointer":"default"},title:k?"Click to expand/collapse":e.value,children:m||"<empty>"}),k&&(0,ae.jsx)("button",{className:"expand-btn",onClick:()=>y(!x),title:x?"Collapse":"Expand",children:x?"\u25B2":"\u25BC"})]})]}),(0,ae.jsxs)("div",{className:"env-variable-actions",children:[(0,ae.jsx)("button",{className:"edit-variable-btn",onClick:n,disabled:s,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ae.jsx)("button",{className:"delete-variable-btn",onClick:i,disabled:s,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var hE=N(()=>{"use strict";tE();aE();sE();lE();oE();Km();cE();uE();dE();fE();pE();mE()});var Ut,Me,gE,vE=N(()=>{"use strict";Ut=Z($e());hE();Zt();Me=Z(oe()),gE=({apiKey:e,agentId:t,skillId:n,isActive:a=!1,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,Ut.useState)("persona"),[p,f]=(0,Ut.useState)([]),[d,x]=(0,Ut.useState)([]),[y,k]=(0,Ut.useState)([]),[m,h]=(0,Ut.useState)(null),[g,S]=(0,Ut.useState)(null),[T,E]=(0,Ut.useState)(500),[w,C]=(0,Ut.useState)(!1),[U,H]=(0,Ut.useState)(null),[_,R]=(0,Ut.useState)(null),[L,G]=(0,Ut.useState)(null),P=ce=>O(null,null,function*(){if(!ce.trim())return;let Q={id:Date.now().toString(),text:ce,sender:"user",timestamp:new Date};i(Q),o(!0);try{let F=yield re.sendProductionChatMessage(ce,t,e),V={id:(Date.now()+1).toString(),text:F.success?F.text||"No response received":`\u274C ${F.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};i(V)}catch(F){let V={id:(Date.now()+1).toString(),text:`\u274C Error: ${F instanceof Error?F.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};i(V)}finally{o(!1)}}),W=(ce,Q)=>O(null,null,function*(){S(ce);try{let F=!Q;console.log(`${F?"Activating":"Deactivating"} skill:`,ce);let V=yield re.activateSkill(e,t,ce,F);V.success?(k(B=>B.map(J=>J.id===ce?tt(ee({},J),{active:F}):J)),yield lt(),console.log(`\u2705 Skill ${F?"activated":"deactivated"} successfully`)):(console.error(`\u274C Failed to ${F?"activate":"deactivate"} skill:`,V.error),alert(`Failed to ${F?"activate":"deactivate"} skill: ${V.error}`))}catch(F){console.error("Error activating skill:",F),alert("Failed to change skill activation status")}finally{S(null)}}),ie=ce=>O(null,null,function*(){h(ce);try{let Q=d.find(V=>V.id===ce);if(Q){console.log("Deploying persona version:",Q),yield vt(Q);return}let F=p.find(V=>V.id===ce);if(F){console.log("Publishing skill version:",F.version,"for skill:",F.skillName);let V=y.find(he=>he.name===F.skillName);if(!V)throw new Error("Could not find skill for deployment");let B=F.version.replace("v",""),J=yield re.publishSkillVersion(e,t,V.id,B);if(J.success&&J.data)f(he=>he.map(Xe=>Xe.id===ce?tt(ee({},Xe),{isDeployed:!0}):Xe.type===F.type&&Xe.skillName===F.skillName?tt(ee({},Xe),{isDeployed:!1}):Xe)),k(he=>he.map(Xe=>Xe.name===F.skillName?tt(ee({},Xe),{deployedVersion:F.version}):Xe)),yield lt(),console.log(`\u2705 ${J.data.message}`),alert(`\u2705 ${J.data.message}`);else throw new Error(J.error||"Failed to publish skill version")}}finally{h(null)}}),we=ce=>{C(!0),ce.preventDefault()},Ue=ce=>{if(!w)return;let Q=document.querySelector(".production-layout-new");if(!Q)return;let F=Q.getBoundingClientRect(),V=F.right-ce.clientX,B=500,J=F.width*.6;V>=B&&V<=J&&E(V)},v=()=>{C(!1)};Ut.default.useEffect(()=>(w?(document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",v),document.body.style.cursor="col-resize",document.body.style.userSelect="none"):(document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""),()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""}),[w]);let _e=ce=>new Date(ce).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});(0,Ut.useEffect)(()=>{b()},[e,t]),(0,Ut.useEffect)(()=>{a&&b()},[a]);let lt=()=>O(null,null,function*(){try{console.log("Loading skills data with apiKey:",e,"agentId:",t);let ce=yield re.getSkills(e,t);if(ce.success&&ce.skills){let Q=ce.skills.map(V=>{let B=V.versions.length>0?V.versions.reduce((he,Xe)=>he.version>Xe.version?he:Xe):null,J=V.versions.find(he=>he.active);return{id:V.id,name:V.name,description:V.description,versionsCount:V.versions.length,latestVersion:B?`v${B.version}`:"No versions",deployedVersion:J?`v${J.version}`:void 0,active:V.active}});k(Q);let F=[];ce.skills.forEach(V=>{V.versions.forEach(B=>{F.push({id:B.id,version:`v${B.version}`,type:"skill",skillName:V.name,skillDescription:B.description,skillContext:B.context,deployedAt:V.updatedAt,isDeployed:B.active,status:B.active?"deployed":"available",tools:B.tools})})}),f(F)}else console.error("Failed to load skills:",ce.error),k([]),f([])}catch(ce){console.error("Error loading skills data:",ce),k([]),f([])}}),b=()=>O(null,null,function*(){try{console.log("Loading persona versions with apiKey:",e,"agentId:",t),yield Fe(),yield lt()}catch(ce){console.error("Error loading production data:",ce)}}),Fe=()=>O(null,null,function*(){try{let ce=yield re.getProductionPersonaVersions(t,e);if(ce.success&&ce.versions){let F=ce.versions.map(V=>({id:`persona_${V.version}`,version:`v${V.version}`,type:"persona",deployedAt:new Date(V.createdDate).toISOString(),isDeployed:V.isCurrent,status:V.isCurrent?"deployed":"available",personaContent:V.persona})).sort((V,B)=>new Date(B.deployedAt).getTime()-new Date(V.deployedAt).getTime());x(F)}else console.error("Failed to load persona versions:",ce.error)}catch(ce){console.error("Error loading persona versions:",ce)}}),vt=ce=>O(null,null,function*(){try{let Q=parseInt(ce.version.replace("v",""));console.log(`Deploying persona version ${Q} to production...`);let F=yield re.deployPersonaVersion(t,e,Q);console.log("Deploy persona response:",F),F.success?(yield Fe(),alert(`\u2705 Persona version ${ce.version} deployed successfully!`)):alert(`\u274C Failed to deploy persona version: ${F.error||"Unknown error"}`)}catch(Q){console.error("Error deploying persona version:",Q),alert("\u274C Failed to deploy persona version")}});return(0,Me.jsx)("div",{className:"production-page",children:(0,Me.jsxs)("div",{className:"production-layout-new",children:[(0,Me.jsx)("div",{className:"production-left",style:{width:`calc(100% - ${T}px)`},children:(0,Me.jsx)(Jm,{messages:r,onSendMessage:P,onClearHistory:s,isLoading:l})}),(0,Me.jsx)("div",{className:"production-resize-handle",onMouseDown:we}),(0,Me.jsxs)("div",{className:"production-right",children:[(0,Me.jsxs)("div",{className:"right-panel-tabs",children:[(0,Me.jsx)("button",{className:`tab-button ${c==="persona"?"active":""}`,onClick:()=>{u("persona"),R(null),H(null),G(null)},children:"Persona"}),(0,Me.jsx)("button",{className:`tab-button ${c==="skills"?"active":""}`,onClick:()=>{u("skills"),R(null),H(null),G(null),G(null)},children:"Skills"}),(0,Me.jsx)("button",{className:`tab-button ${c==="stats"?"active":""}`,onClick:()=>{u("stats"),R(null),H(null),G(null)},children:"Stats"}),(0,Me.jsx)("button",{className:`tab-button ${c==="logs"?"active":""}`,onClick:()=>{u("logs"),R(null),H(null),G(null)},children:"Logs"}),(0,Me.jsx)("button",{className:`tab-button ${c==="data"?"active":""}`,onClick:()=>{u("data"),R(null),H(null),G(null)},children:"Data"}),(0,Me.jsx)("button",{className:`tab-button ${c==="env"?"active":""}`,onClick:()=>{u("env"),R(null),H(null),G(null)},children:"Env"})]}),(0,Me.jsxs)("div",{className:"right-panel-content",children:[c==="persona"&&(_?(0,Me.jsx)(rh,{selectedPersonaVersion:_,onBack:()=>R(null),onDeployVersion:ie,deployingVersionId:m}):(0,Me.jsx)(nh,{personaVersions:d,onSelectVersion:R,onDeployVersion:ie,deployingVersionId:m})),c==="skills"&&(L?(0,Me.jsx)(ih,{selectedSkillVersion:L,onBack:()=>G(null),onDeployVersion:ie,deployingVersionId:m}):U?(0,Me.jsx)(sh,{selectedSkill:U,versions:p,onBack:()=>H(null),onSelectVersion:G,onDeployVersion:ie,formatDate:_e,deployingVersionId:m}):(0,Me.jsx)(ah,{skills:y,onSelectSkill:H,onActivateSkill:W,activatingSkillId:g})),c==="stats"&&(0,Me.jsx)("div",{className:"coming-soon-panel",children:(0,Me.jsxs)("div",{className:"coming-soon",children:[(0,Me.jsx)("div",{className:"coming-soon-icon",children:"\u{1F4CA}"}),(0,Me.jsx)("div",{className:"coming-soon-text",children:"Statistics & Analytics"}),(0,Me.jsx)("div",{className:"coming-soon-subtext",children:"Performance metrics and analytics dashboard coming soon"})]})}),c==="logs"&&(0,Me.jsx)(Wm,{apiKey:e,agentId:t}),c==="data"&&(0,Me.jsx)(th,{apiKey:e,agentId:t}),c==="env"&&(0,Me.jsx)(lh,{apiKey:e,agentId:t})]})]})]})})}});var Hr,un,yE,bE=N(()=>{"use strict";Hr=Z($e()),un=Z(oe()),yE=({apiKey:e,agentId:t})=>{let[n,a]=(0,Hr.useState)(""),[r,i]=(0,Hr.useState)(!0),[s,l]=(0,Hr.useState)(""),[o,c]=(0,Hr.useState)("");(0,Hr.useEffect)(()=>{u()},[]);let u=()=>O(null,null,function*(){var p;try{i(!0);let f=yield fetch("/api/config");if(f.ok){let d=yield f.json(),x=(p=d==null?void 0:d.agent)==null?void 0:p.orgId;if(x){a(x);let y=`https://admin.heylua.ai/validate-token/${e}?redirect=/admin/usage?&agentId=${t}&orgId=${x}&hideToolBar=true`;c(y)}else l("No orgId found in configuration")}else l("Failed to load configuration")}catch(f){console.error("Failed to load orgId:",f),l("Failed to load configuration")}finally{i(!1)}});return r?(0,un.jsx)("div",{className:"admin-page",children:(0,un.jsx)("div",{className:"loading-container",children:(0,un.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):s?(0,un.jsx)("div",{className:"admin-page",children:(0,un.jsxs)("div",{className:"error-container",children:[(0,un.jsx)("h3",{children:"Error Loading Admin Dashboard"}),(0,un.jsx)("p",{children:s}),(0,un.jsx)("button",{onClick:u,className:"retry-button",children:"Retry"})]})}):(0,un.jsx)("div",{className:"admin-page",children:o?(0,un.jsx)("iframe",{src:o,className:"admin-iframe",title:"Lua Admin Dashboard",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-top-navigation"}):(0,un.jsx)("div",{className:"loading-container",children:(0,un.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})})}});var xE=N(()=>{});var Zi,st,SE,NE=N(()=>{"use strict";Zi=Z($e());WN();vE();bE();Zt();xE();st=Z(oe()),SE=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{let[r,i]=(0,Zi.useState)("sandbox"),[s,l]=(0,Zi.useState)([]),[o,c]=(0,Zi.useState)(!1);(0,Zi.useEffect)(()=>{u()},[e,t]);let u=()=>O(null,null,function*(){try{console.log("Loading shared chat history with API key:",e,"agentId:",t);let x=yield re.loadChatHistory(e,t);if(x.success&&x.data&&x.data.length>0){let y=x.data.map(k=>{var m;return{id:k.id||Date.now().toString(),text:((m=k.content[0])==null?void 0:m.text)||"",sender:k.role==="user"?"user":"assistant",timestamp:new Date(k.createdAt)}});l(y)}else l([])}catch(x){console.error("Failed to load shared chat history:",x),l([])}}),p=()=>O(null,null,function*(){try{let x=yield re.clearChatHistory(e,t);x.success?l([]):alert("Failed to clear chat history: "+(x.error||"Unknown error"))}catch(x){console.error("Failed to clear shared chat history:",x),alert("Failed to clear chat history")}}),f=x=>{l(y=>[...y,x])};return(0,st.jsxs)("div",{className:"main-container",children:[(0,st.jsx)("div",{className:"page-navigation",children:(0,st.jsxs)("div",{className:"nav-logo",children:[(0,st.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Lua",className:"logo-icon"}),(0,st.jsxs)("span",{className:"logo-text",children:[(0,st.jsx)("strong",{children:"Lua"})," : Developer Console"]})]})}),(0,st.jsxs)("div",{className:"page-tabs",children:[(0,st.jsx)("button",{className:`page-tab ${r==="sandbox"?"active":""}`,onClick:()=>i("sandbox"),children:"Sandbox"}),(0,st.jsx)("button",{className:`page-tab ${r==="production"?"active":""}`,onClick:()=>i("production"),children:"Production"}),(0,st.jsx)("button",{className:`page-tab ${r==="admin"?"active":""}`,onClick:()=>i("admin"),children:"Admin"})]}),(0,st.jsx)("div",{className:"page-container",children:(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("div",{className:`page-content ${r==="sandbox"?"active":"hidden"}`,children:(0,st.jsx)(KN,{apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:s,onSharedSendMessage:f,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:c})}),(0,st.jsx)("div",{className:`page-content ${r==="production"?"active":"hidden"}`,children:(0,st.jsx)(gE,{apiKey:e,agentId:t,skillId:n,isActive:r==="production",sharedChatMessages:s,onSharedSendMessage:f,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:c})}),(0,st.jsx)("div",{className:`page-content ${r==="admin"?"active":"hidden"}`,children:(0,st.jsx)(yE,{apiKey:e,agentId:t})})]})})]})}});var pR=Bt(()=>{var EE=Z($e()),kE=Z(Qb());NE();var oh=Z(oe()),Ul=window.__LUA_CONFIG__;if(!Ul)throw new Error("Lua configuration not found");var TE=document.getElementById("root");if(!TE)throw new Error("Root container not found");var fR=(0,kE.createRoot)(TE);fR.render((0,oh.jsx)(EE.default.StrictMode,{children:(0,oh.jsx)(SE,{apiKey:Ul.apiKey,agentId:Ul.agentId,skillId:Ul.skillId,sandboxId:Ul.sandboxId})}))});return pR();})();
|
|
21
|
+
`}),n}function bS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var nm,f2,SS=S(()=>{Jp();tm();Sc();aS();nm={}.hasOwnProperty,f2={}});function Qc(e,t){let n=xS(e,t),a=n.one(e,void 0),r=dS(n),i=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return r&&("children"in i,i.children.push({type:"text",value:`
|
|
22
|
+
`},r)),i}var NS=S(()=>{fS();SS()});var ES=S(()=>{NS()});function Fc(e,t){return e&&"run"in e?function(n,a){return O(this,null,function*(){let r=Qc(n,ee({file:a},t));yield e.run(r,a)})}:function(n,a){return Qc(n,ee({file:a},e||t))}}var kS=S(()=>{ES()});var TS=S(()=>{kS()});function am(e){if(e)throw e}var wS=S(()=>{});var MS=Vt((hz,zS)=>{"use strict";var Zc=Object.prototype.hasOwnProperty,LS=Object.prototype.toString,AS=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,RS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):LS.call(t)==="[object Array]"},_S=function(t){if(!t||LS.call(t)!=="[object Object]")return!1;var n=Zc.call(t,"constructor"),a=t.constructor&&t.constructor.prototype&&Zc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!a)return!1;var r;for(r in t);return typeof r=="undefined"||Zc.call(t,r)},DS=function(t,n){AS&&n.name==="__proto__"?AS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},OS=function(t,n){if(n==="__proto__")if(Zc.call(t,n)){if(CS)return CS(t,n).value}else return;return t[n]};zS.exports=function e(){var t,n,a,r,i,s,l=arguments[0],o=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},o=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)a=OS(l,n),r=OS(t,n),l!==r&&(u&&r&&(_S(r)||(i=RS(r)))?(i?(i=!1,s=a&&RS(a)?a:[]):s=a&&_S(a)?a:{},DS(l,{name:n,newValue:e(u,s,r)})):typeof r!="undefined"&&DS(l,{name:n,newValue:r}));return l}});function xl(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var US=S(()=>{});function rm(){let e=[],t={run:n,use:a};return t;function n(...r){let i=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...r);function l(o,...c){let u=e[++i],p=-1;if(o){s(o);return}for(;++p<r.length;)(c[p]===null||c[p]===void 0)&&(c[p]=r[p]);r=c,u?PS(u,l)(...c):s(null,...c)}}function a(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function PS(e,t){let n;return a;function a(...s){let l=e.length>s.length,o;l&&s.push(r);try{o=e.apply(this,s)}catch(c){let u=c;if(l&&n)throw u;return r(u)}l||(o&&o.then&&typeof o.then=="function"?o.then(i,r):o instanceof Error?r(o):i(o))}function r(s,...l){n||(n=!0,t(s,...l))}function i(s){r(null,s)}}var BS=S(()=>{});var VS=S(()=>{BS()});function v2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Sl(e);let n=0,a=-1,r=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else a<0&&(i=!0,a=r+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let s=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else s<0&&(i=!0,s=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(a=r):(l=-1,a=s));return n===a?a=s:a<0&&(a=e.length),e.slice(n,a)}function y2(e){if(Sl(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b2(e){Sl(e);let t=e.length,n=-1,a=0,r=-1,i=0,s;for(;t--;){let l=e.codePointAt(t);if(l===47){if(s){a=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?r<0?r=t:i!==1&&(i=1):r>-1&&(i=-1)}return r<0||n<0||i===0||i===1&&r===n-1&&r===a+1?"":e.slice(r,n)}function x2(...e){let t=-1,n;for(;++t<e.length;)Sl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":S2(n)}function S2(e){Sl(e);let t=e.codePointAt(0)===47,n=N2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function N2(e,t){let n="",a=0,r=-1,i=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(r===s-1||i===1))if(r!==s-1&&i===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",a=0):(n=n.slice(0,o),a=n.length-1-n.lastIndexOf("/")),r=s,i=0;continue}}else if(n.length>0){n="",a=0,r=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(r+1,s):n=e.slice(r+1,s),a=s-r-1;r=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Sl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var In,HS=S(()=>{In={basename:v2,dirname:y2,extname:b2,join:x2,sep:"/"}});function E2(){return"/"}var qS,jS=S(()=>{qS={cwd:E2}});function Hi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var im=S(()=>{});function IS(e){if(typeof e=="string")e=new URL(e);else if(!Hi(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return k2(e)}function k2(e){if(e.hostname!==""){let a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let a=t.codePointAt(n+2);if(a===70||a===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var YS=S(()=>{im();im()});function lm(e,t){if(e&&e.includes(In.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+In.sep+"`")}function om(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function T2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var sm,zr,XS=S(()=>{mp();HS();jS();YS();sm=["history","path","basename","stem","extname","dirname"],zr=class{constructor(t){let n;t?Hi(t)?n={path:t}:typeof t=="string"||T2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<sm.length;){let i=sm[a];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)sm.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?In.basename(this.path):void 0}set basename(t){om(t,"basename"),lm(t,"basename"),this.path=In.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?In.dirname(this.path):void 0}set dirname(t){GS(this.basename,"dirname"),this.path=In.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?In.extname(this.path):void 0}set extname(t){if(lm(t,"extname"),GS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=In.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hi(t)&&(t=IS(t)),om(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?In.basename(this.path,this.extname):void 0}set stem(t){om(t,"stem"),lm(t,"stem"),this.path=In.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){let r=this.message(t,n,a);throw r.fatal=!0,r}info(t,n,a){let r=this.message(t,n,a);return r.fatal=void 0,r}message(t,n,a){let r=new dt(t,n,a);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var cm=S(()=>{XS()});var QS,FS=S(()=>{QS=(function(e){let a=this.constructor.prototype,r=a[e],i=function(){return r.apply(i,arguments)};return Object.setPrototypeOf(i,a),i})});function um(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZS(e){if(!xl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $S(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $c(e){return A2(e)?e:new zr(e)}function A2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function C2(e){return typeof e=="string"||R2(e)}function R2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Jc,w2,pm,mm,JS=S(()=>{wS();Jc=Z(MS(),1);US();VS();cm();FS();w2={}.hasOwnProperty,pm=class e extends QS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let a=this.attachers[n];t.use(...a)}return t.data((0,Jc.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fm("data",this.frozen),this.namespace[t]=n,this):w2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);let r=n.call(t,...a);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=$c(t),a=this.parser||this.Parser;return um("parse",a),a(String(n),n)}process(t,n){let a=this;return this.freeze(),um("process",this.parser||this.Parser),dm("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(i,s){let l=$c(t),o=a.parse(l);a.run(o,l,function(u,p,f){if(u||!p||!f)return c(u);let d=p,E=a.stringify(d,f);C2(E)?f.value=E:f.result=E,c(u,f)});function c(u,p){u||!p?s(u):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,a;return this.freeze(),um("processSync",this.parser||this.Parser),dm("processSync",this.compiler||this.Compiler),this.process(t,r),$S("processSync","process",n),a;function r(i,s){n=!0,am(i),a=s}}run(t,n,a){ZS(t),this.freeze();let r=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?i(void 0,a):new Promise(i);function i(s,l){let o=$c(n);r.run(t,o,c);function c(u,p,f){let d=p||t;u?l(u):s?s(d):a(void 0,d,f)}}}runSync(t,n){let a=!1,r;return this.run(t,n,i),$S("runSync","run",a),r;function i(s,l){am(s),r=l,a=!0}}stringify(t,n){this.freeze();let a=$c(n),r=this.compiler||this.Compiler;return dm("stringify",r),ZS(t),r(t,a)}use(t,...n){let a=this.attachers,r=this.namespace;if(fm("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...p]=c;o(u,p)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(r.settings=(0,Jc.default)(!0,r.settings,c.settings))}function l(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let p=c[u];i(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,u){let p=-1,f=-1;for(;++p<a.length;)if(a[p][0]===c){f=p;break}if(f===-1)a.push([c,...u]);else if(u.length>0){let[d,...E]=u,v=a[f][1];xl(v)&&xl(d)&&(d=(0,Jc.default)(!0,v,d)),a[f]=[c,d,...E]}}}},mm=new pm().freeze()});var KS=S(()=>{JS()});function Nl(e){let t=L2(e),n=z2(e);return M2(t.runSync(t.parse(n),n),e)}function L2(e){let t=e.rehypePlugins||WS,n=e.remarkPlugins||WS,a=e.remarkRehypeOptions?ee(ee({},e.remarkRehypeOptions),eN):eN;return mm().use(Vc).use(n).use(Fc,a).use(t)}function z2(e){let t=e.children||"",n=new zr;return typeof t=="string"?n.value=t:(""+t,void 0),n}function M2(e,t){let n=t.allowedElements,a=t.allowElement,r=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,o=t.urlTransform||nN;for(let u of O2)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+_2+u.id,void 0);return n&&i&&void 0,bl(e,c),gp(e,{Fragment:qi.Fragment,components:r,ignoreInvalidStyle:!0,jsx:qi.jsx,jsxs:qi.jsxs,passKeys:!0,passNode:!0});function c(u,p,f){if(u.type==="raw"&&f&&typeof p=="number")return s?f.children.splice(p,1):f.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let d;for(d in dl)if(Object.hasOwn(dl,d)&&Object.hasOwn(u.properties,d)){let E=u.properties[d],v=dl[d];(v===null||v.includes(u.tagName))&&(u.properties[d]=o(String(E||""),d,u))}}if(u.type==="element"){let d=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!d&&a&&typeof p=="number"&&(d=!a(u,p,f)),d&&f&&typeof p=="number")return l&&u.children?f.children.splice(p,1,...u.children):f.children.splice(p,1),p}}}function nN(e){let t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||n!==-1&&t>n||a!==-1&&t>a||D2.test(e.slice(0,t))?e:""}var qi,tN,_2,WS,eN,D2,O2,aN=S(()=>{q0();I0();qi=Z(oe(),1),tN=Z($e(),1);i1();TS();KS();tm();cm();_2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",WS=[],eN={allowDangerousHtml:!0},D2=/^(https?|ircs?|mailto|xmpp)$/i,O2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}]});var hm=S(()=>{aN()});var _e,ve,gm,re,$t=S(()=>{"use strict";_e={LUA_API:"https://api.heylua.ai",DEV_SERVER:"https://api.heylua.ai",LOCAL_DEV:""},ve={CHAT_GENERATE:e=>`${_e.LUA_API}/chat/generate/${e}?channel=dev`,TOOLS_TEST:e=>`${_e.LUA_API}/tools/test/${e}`,CHAT_HISTORY:e=>`${_e.LUA_API}/chat/history/${e}`,AGENT_TYPES:`${_e.LUA_API}/agents/self-serve/types`,CREATE_AGENT:`${_e.LUA_API}/agents/self-serve/create`,AGENT_DETAILS:e=>`${_e.LUA_API}/admin/agents/${e}`,SKILL_VERSIONS:(e,t)=>`${_e.DEV_SERVER}/developer/skills/${e}/${t}/versions`,PERSONA_VERSIONS:e=>`${_e.LUA_API}/developer/agents/${e}/persona/versions`,DEPLOY_PERSONA_VERSION:(e,t)=>`${_e.LUA_API}/developer/agents/${e}/persona/version/${t}`,AGENT_RESOURCES:e=>`${_e.LUA_API}/admin/agents/${e}/resources`,AGENT_RESOURCE:(e,t)=>`${_e.LUA_API}/admin/agents/${e}/resources/${t}`,AGENT_SKILLS:e=>`${_e.LUA_API}/developer/skills/${e}`,ACTIVATE_SKILL:(e,t)=>`${_e.LUA_API}/developer/skills/${e}/${t}`,PUBLISH_SKILL_VERSION:(e,t,n)=>`${_e.LUA_API}/developer/skills/${e}/${t}/${n}/publish`,PRODUCTION_LOGS:e=>`${_e.LUA_API}/developer/agents/${e}/logs`,PRODUCTION_ENV:e=>`${_e.LUA_API}/developer/agents/${e}/env`,AGENT_PRODUCTS:e=>`${_e.LUA_API}/developer/agents/${e}/products`,AGENT_PRODUCT:(e,t)=>`${_e.LUA_API}/developer/agents/${e}/products/${t}`,SEARCH_PRODUCTS:e=>`${_e.LUA_API}/developer/agents/${e}/products/search`,CREATE_SKILL:e=>`${_e.DEV_SERVER}/developer/skills/${e}`,DEVELOPER_LOGS:(e,t)=>`${_e.DEV_SERVER}/developer/skills/${e}/${t}/logs`,USER_DATA:e=>`${_e.DEV_SERVER}/developer/user/data/agent/${e}`,LOCAL_CHAT:`${_e.LOCAL_DEV}/chat`,LOCAL_PERSONA:`${_e.LOCAL_DEV}/persona`,LOCAL_TOOLS:`${_e.LOCAL_DEV}/tools`,LOCAL_TOOLS_TEST:`${_e.LOCAL_DEV}/tools/test`,LOCAL_ENV:`${_e.LOCAL_DEV}/env`},gm=class{constructor(t=""){this.baseUrl=t}getAllSkillOverrides(){return O(this,null,function*(){try{let n=yield(yield fetch("/api/skills")).json();return n.success&&n.skills&&Array.isArray(n.skills)?n.skills.map(a=>({skillId:a.skillId,sandboxId:a.sandboxId||a.skillId})).filter(a=>a.skillId&&a.sandboxId):[]}catch(t){return console.error("Error getting skill overrides:",t),[]}})}sendChatMessage(t,n,a,r,i,s){return O(this,null,function*(){try{let l=yield this.getAllSkillOverrides(),o=l.length>0?l:[{skillId:a,sandboxId:r}],c=ee({messages:[{type:"text",text:t}],navigate:!0,skillOverride:o},s&&{personaOverride:s}),u=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(c)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return{success:!0,text:(yield u.json()).text||"No response received"}}catch(l){return console.error("Chat API error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}sendProductionChatMessage(t,n,a){return O(this,null,function*(){try{let r={messages:[{type:"text",text:t}],navigate:!0,skillOverride:[]},i=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,text:(yield i.json()).text||"No response received"}}catch(r){return console.error("Production chat API error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}sendLocalChatMessage(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_CHAT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,persona:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local chat API error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadPersona(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_PERSONA);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load persona error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load persona"}}})}savePersona(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_PERSONA,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({persona:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save persona error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save persona"}}})}loadTools(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_TOOLS);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load tools error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load tools"}}})}testTool(t,n,a,r,i,s){return O(this,null,function*(){try{let l={toolName:t,inputs:n,skillOverride:[{skillId:r,sandboxId:i}]},o=yield fetch(ve.TOOLS_TEST(a),{method:"POST",headers:{"Content-Type":"application/json",Authorization:s},body:JSON.stringify(l)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);let c=yield o.json();return{success:!0,result:c.result||c}}catch(l){return console.error("Tool test error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}getSkillVersions(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.SKILL_VERSIONS(n,t),{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,versions:(yield r.json()).versions||[]}}catch(r){return console.error("Error fetching skill versions:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(`${_e.DEV_SERVER}/developer/agents/${t}/persona/versions`,{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}getProductionPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.PERSONA_VERSIONS(t),{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching production persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}deployPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.DEPLOY_PERSONA_VERSION(t,a),{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({})});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error deploying persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${_e.DEV_SERVER}/developer/agents/${t}/persona/version`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({persona:a})});if(!r.ok){let s=yield r.text();throw new Error(`HTTP error! status: ${r.status}, message: ${s}`)}return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createSkillVersion(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(`${_e.DEV_SERVER}/developer/skills/${n}/${t}/version`,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){let l=yield i.text();throw new Error(`HTTP error! status: ${i.status}, message: ${l}`)}return{success:!0,data:yield i.json()}}catch(i){return console.error("Error creating skill version:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadEnvContent(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_ENV);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load env error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load environment variables"}}})}saveEnvContent(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_ENV,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save env error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save environment variables"}}})}testLocalTool(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_TOOLS_TEST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:t,inputs:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local tool test error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Response status:",a.status),console.log("ApiService: Response headers:",a.headers),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Chat history load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0}}catch(a){return console.error("Clear chat history error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearSandboxLogs(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Clearing sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let r=yield fetch(ve.DEVELOPER_LOGS(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear logs response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Clear logs response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Clear sandbox logs error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadAllSandboxLogs(t,n,a=20){return O(this,null,function*(){try{let r=yield this.getAllSkillOverrides();if(r.length===0)return{success:!0,data:{logs:[]}};let i=r.map(o=>O(this,null,function*(){try{let c=yield this.loadSandboxLogs(t,n,o.sandboxId,a);return c.success&&c.data&&c.data.logs?c.data.logs.map(u=>at(ee({},u),{skillName:o.skillId,sandboxId:o.sandboxId})):[]}catch(c){return console.error(`Error loading logs for skill ${o.skillId}:`,c),[]}}));return{success:!0,data:{logs:(yield Promise.all(i)).flat().sort((o,c)=>new Date(c.timestamp).getTime()-new Date(o.timestamp).getTime()).slice(0,a)}}}catch(r){return console.error("Error loading all sandbox logs:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred",data:{logs:[]}}}})}loadSandboxLogs(t,n,a,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let i=yield fetch(`${ve.DEVELOPER_LOGS(n,a)}?limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Received logs data:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Sandbox logs load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading user data with API key:",t,"agentId:",n),console.log("ApiService: API key length:",t==null?void 0:t.length),console.log("ApiService: API key starts with:",t==null?void 0:t.substring(0,10));let a=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: User data response status:",a.status),console.log("ApiService: Response headers:",Object.fromEntries(a.headers.entries())),!a.ok){let i=yield a.text();if(console.error("ApiService: HTTP error response:",i),a.status===401){console.log("ApiService: Trying alternative authentication method...");let s=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:t}});if(s.ok){let l=yield s.json();return console.log("ApiService: Alternative auth successful:",l),{success:!0,data:l}}}throw new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received user data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: User data load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}saveUserData(t,n,a){return O(this,null,function*(){return this.updateUserData(t,n,a)})}getUserData(t,n){return O(this,null,function*(){return this.loadUserData(t,n)})}updateUserData(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating user data with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.USER_DATA(n),{method:"PUT",headers:{accept:"*/*",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update user data response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Updated user data response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update user data error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadResources(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading resources with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_RESOURCES(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Resources response status:",a.status),!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let r=yield a.json();return console.log("ApiService: Resources data:",r),{success:!0,data:r||[]}}catch(a){return console.error("ApiService: Error loading resources:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCES(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateResource(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("Error updating resource:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}deleteResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0}}catch(r){return console.error("Error deleting resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}clearUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing user data with API key:",t,"agentId:",n);let a=yield fetch(ve.USER_DATA(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear user data response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Clear user data response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Clear user data error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createSkill(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.CREATE_SKILL(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({name:a.name,description:a.description||`A Lua skill for ${a.name}`,context:a.context||""})});if(!r.ok){let s=yield r.text();return{success:!1,error:{message:`HTTP ${r.status}: ${s}`}}}return{success:!0,data:yield r.json()}}catch(r){return{success:!1,error:{message:r instanceof Error?r.message:"Unknown error"}}}})}getAgentTypes(t){return O(this,null,function*(){try{let n=yield fetch(ve.AGENT_TYPES,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Error fetching agent types:",n),[]}})}createAgent(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.CREATE_AGENT,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(n)});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getAgentDetails(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.AGENT_DETAILS(n),{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getSkills(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading skills with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_SKILLS(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Skills response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received skills data:",r),{success:!0,skills:r.skills||[]}}catch(a){return console.error("ApiService: Skills load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}activateSkill(t,n,a,r){return O(this,null,function*(){try{console.log(`ApiService: ${r?"Activating":"Deactivating"} skill:`,a,"for agent:",n);let i=yield fetch(ve.ACTIVATE_SKILL(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({active:r})});if(console.log("ApiService: Activate skill response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Activate skill response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Activate skill error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}publishSkillVersion(t,n,a,r){return O(this,null,function*(){try{console.log("ApiService: Publishing skill version:",r,"for skill:",a,"agent:",n);let i=yield fetch(ve.PUBLISH_SKILL_VERSION(n,a,r),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Publish skill version response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Publish skill version response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Publish skill version error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionLogs(t,n,a=1,r=100){return O(this,null,function*(){try{console.log("ApiService: Loading production logs with API key:",t,"agentId:",n,"page:",a,"limit:",r);let i=yield fetch(`${ve.PRODUCTION_LOGS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Production logs response:",s),{success:!0,logs:s.logs||[],pagination:s.pagination}}catch(i){return console.error("ApiService: Production logs error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionEnv(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading production env with API key:",t,"agentId:",n);let a=yield fetch(ve.PRODUCTION_ENV(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production env response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Production env response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Production env error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}updateProductionEnv(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating production env with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.PRODUCTION_ENV(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update production env response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Update production env response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update production env error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getProducts(t,n,a=1,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading products with API key:",t,"agentId:",n);let i=yield fetch(`${ve.AGENT_PRODUCTS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("ApiService: Products load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}createProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Create product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Update product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}deleteProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCT(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Delete product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}searchProducts(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${ve.SEARCH_PRODUCTS(n)}?searchQuery=${encodeURIComponent(a)}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Search products error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}},re=new gm});var ji,tt,vm,rN=S(()=>{"use strict";ji=Z($e());hm();$t();tt=Z(oe()),vm=({apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:r,sharedChatMessages:i,onSharedSendMessage:s,onSharedClearHistory:l,isChatLoading:o,setIsChatLoading:c})=>{let[u,p]=(0,ji.useState)(""),f=(0,ji.useRef)(null),d=()=>{var h;(h=f.current)==null||h.scrollIntoView({behavior:"smooth"})};(0,ji.useEffect)(()=>{d()},[i]);let E=i.length>0?i.map(h=>({text:h.text,isUser:h.sender==="user",timestamp:h.timestamp})):[{text:"\u{1F44B} Welcome! Start chatting to test your Lua skill. Your messages will be sent to the sandbox environment.",isUser:!1,timestamp:new Date}],v=h=>O(null,null,function*(){if(!h.trim())return;let g={id:Date.now().toString(),text:h,sender:"user",timestamp:new Date};s(g),p(""),c(!0);try{let x=yield re.sendLocalChatMessage(h,r),w={id:(Date.now()+1).toString(),text:x.success?x.text||"No response received":`\u274C ${x.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};s(w)}catch(x){let w={id:(Date.now()+2).toString(),text:`\u274C Error: ${x instanceof Error?x.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};s(w)}finally{c(!1)}}),k=h=>{h.preventDefault(),v(u)},m=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),v(u))};return(0,tt.jsxs)("section",{className:"chat-container",role:"region","aria-label":"Chat interface",children:[(0,tt.jsxs)("header",{className:"chat-header",children:[(0,tt.jsx)("div",{className:"chat-header-content",children:(0,tt.jsxs)("div",{children:[(0,tt.jsx)("h2",{children:"Chat to your Agent [Sandbox]"}),(0,tt.jsx)("p",{children:"Test your sandbox skill in real-time"})]})}),(0,tt.jsx)("button",{className:"clear-chat-button",onClick:l,disabled:o,title:"Clear chat history","aria-label":"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,tt.jsxs)("div",{className:"chat-messages",role:"log","aria-live":"polite","aria-label":"Chat messages",tabIndex:0,children:[E.map((h,g)=>(0,tt.jsx)("div",{className:`message ${h.isUser?"user":"assistant"}`,role:"article","aria-label":`${h.isUser?"User":"Assistant"} message`,children:(0,tt.jsx)("div",{className:"message-bubble",children:(0,tt.jsx)(Nl,{children:h.text})})},g)),o&&(0,tt.jsxs)("div",{className:"loading",role:"status","aria-label":"Loading response",children:[(0,tt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"",className:"loading-logo"}),(0,tt.jsx)("span",{className:"sr-only",children:"Loading response..."})]}),(0,tt.jsx)("div",{ref:f})]}),(0,tt.jsx)("div",{className:"chat-input-container",children:(0,tt.jsxs)("form",{className:"chat-input-form",onSubmit:k,role:"form","aria-label":"Send message",children:[(0,tt.jsx)("label",{htmlFor:"chat-input",className:"sr-only",children:"Type your message"}),(0,tt.jsx)("input",{type:"text",id:"chat-input",name:"chatMessage",className:"chat-input",value:u,onChange:h=>p(h.target.value),onKeyDown:m,placeholder:"Type your message...",disabled:o,autoComplete:"off","aria-describedby":"chat-input-help"}),(0,tt.jsx)("div",{id:"chat-input-help",className:"sr-only",children:"Press Enter to send, Shift+Enter for new line"}),(0,tt.jsx)("button",{type:"submit",className:"send-button",disabled:o||!u.trim(),"aria-label":o?"Sending message...":"Send message",children:o?"Sending...":"Send"})]})})]})}});var Bn,K,ym,bm=S(()=>{"use strict";Bn=Z($e());$t();K=Z(oe()),ym=({persona:e,onSavePersona:t,apiKey:n,agentId:a})=>{let[r,i]=(0,Bn.useState)(e),[s,l]=(0,Bn.useState)(!1),[o,c]=(0,Bn.useState)([]),[u,p]=(0,Bn.useState)(!1),[f,d]=(0,Bn.useState)("current"),[E,v]=(0,Bn.useState)(null),[k,m]=(0,Bn.useState)(!1),[h,g]=(0,Bn.useState)(!1);(0,Bn.useEffect)(()=>{i(e)},[e]),(0,Bn.useEffect)(()=>{x()},[]);let x=()=>O(null,null,function*(){p(!0);try{let R=yield re.getPersonaVersions(a,n);if(R.success&&R.versions){let L=R.versions.sort((G,P)=>P.createdDate-G.createdDate);c(L)}else console.error("Failed to load persona versions:",R.error),c([])}catch(R){console.error("Error loading persona versions:",R),c([])}finally{p(!1)}}),w=R=>{d(R),E&&v(null)},N=R=>{v(R)},T=()=>{v(null)},A=()=>{if(!r.trim()){alert("Please enter a persona before creating a version");return}g(!0)},U=()=>O(null,null,function*(){m(!0);try{let R=yield re.createPersonaVersion(a,n,r.trim());if(R.success)console.log("\u2705 Persona version created successfully:",R.data),yield x(),d("versions"),alert("\u2705 Persona version created successfully! You can deploy it from the Production tab.");else throw new Error(R.error||"Failed to create persona version")}catch(R){console.error("\u274C Error creating persona version:",R),alert(`\u274C Failed to create persona version: ${R instanceof Error?R.message:"Unknown error"}`)}finally{m(!1),g(!1)}}),H=()=>{g(!1)},_=()=>O(null,null,function*(){let R=r.trim();if(!R){alert("Persona cannot be empty");return}l(!0);try{(yield t(R))&&i(R)}finally{l(!1)}});return E?(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsxs)("div",{className:"header-left",children:[(0,K.jsx)("button",{className:"back-button",onClick:T,children:"\u2190"}),(0,K.jsxs)("h3",{children:["Persona v",E.version]})]})}),(0,K.jsxs)("div",{className:"persona-version-details",children:[(0,K.jsx)("div",{className:"version-metadata",children:(0,K.jsxs)("div",{className:"metadata-grid",children:[(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created By"}),(0,K.jsx)("span",{className:"metadata-value",children:E.createdBy})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Status"}),(0,K.jsx)("span",{className:`version-status ${E.isCurrent?"active":"available"}`,children:E.isCurrent?"Active (Deployed)":"Available"})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created Date"}),(0,K.jsx)("span",{className:"metadata-value",children:new Date(E.createdDate).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})}),(0,K.jsxs)("div",{className:"persona-content",children:[(0,K.jsx)("h4",{children:"Persona Content"}),(0,K.jsx)("div",{className:"persona-display",children:(0,K.jsx)("pre",{children:E.persona})})]})]})]}):(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsx)("h3",{children:"Agent Persona"})}),(0,K.jsxs)("div",{className:"persona-tabs",children:[(0,K.jsxs)("div",{className:"tabs-header",children:[(0,K.jsx)("button",{className:`tab-button ${f==="current"?"active":""}`,onClick:()=>w("current"),children:"Current"}),(0,K.jsxs)("button",{className:`tab-button ${f==="versions"?"active":""}`,onClick:()=>w("versions"),children:["Versions (",o.length,")"]})]}),(0,K.jsx)("div",{className:"tab-content",children:f==="current"?(0,K.jsxs)("div",{className:"current-persona-tab",children:[(0,K.jsxs)("div",{className:"persona-edit-header",children:[(0,K.jsx)("h4",{children:"Edit Current Persona"}),(0,K.jsxs)("div",{className:"persona-actions",children:[(0,K.jsx)("button",{className:"save-btn",onClick:_,disabled:s,title:"Save persona to YAML",children:s?"\u27F3":"\u{1F4BE}"}),(0,K.jsx)("button",{className:"create-version-btn",onClick:A,disabled:k||!r.trim(),title:"Create new persona version",children:k?"Creating...":"Create Version"})]})]}),(0,K.jsx)("div",{className:"persona-edit",children:(0,K.jsx)("textarea",{value:r,onChange:R=>i(R.target.value),placeholder:"Enter agent persona...",className:"persona-textarea"})}),(0,K.jsx)("div",{className:"persona-help",children:(0,K.jsxs)("p",{children:["This persona is stored in your ",(0,K.jsx)("code",{children:"lua.skill.yaml"})," file and used for local development."]})})]}):(0,K.jsx)("div",{className:"versions-persona-tab",children:u?(0,K.jsx)("div",{className:"versions-loading",children:(0,K.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):o.length>0?(0,K.jsx)("div",{className:"versions-list",children:o.map((R,L)=>(0,K.jsxs)("div",{className:`version-item ${R.isCurrent?"active":"available"}`,onClick:()=>N(R),children:[(0,K.jsxs)("div",{className:"version-info",children:[(0,K.jsxs)("div",{className:"version-header",children:[(0,K.jsxs)("span",{className:"version-number",children:["v",R.version]}),(0,K.jsx)("span",{className:`version-status ${R.isCurrent?"active":"available"}`,children:R.isCurrent?"Active":"Available"})]}),(0,K.jsx)("div",{className:"version-date",children:new Date(R.createdDate).toLocaleDateString()})]}),(0,K.jsx)("div",{className:"version-arrow",children:"\u2192"})]},L))}):(0,K.jsxs)("div",{className:"no-versions",children:[(0,K.jsx)("div",{className:"no-versions-icon",children:"\u{1F464}"}),(0,K.jsx)("div",{className:"no-versions-text",children:"No persona versions found"}),(0,K.jsx)("div",{className:"no-versions-subtext",children:"Persona versions will appear here when available"})]})})})]}),h&&(0,K.jsx)("div",{className:"version-modal-overlay",children:(0,K.jsxs)("div",{className:"version-modal",children:[(0,K.jsx)("div",{className:"version-modal-header",children:(0,K.jsx)("h3",{children:"Create Persona Version"})}),(0,K.jsxs)("div",{className:"version-modal-body",children:[(0,K.jsx)("p",{children:"This will create a new persona version that can be deployed to production."}),(0,K.jsxs)("p",{children:[(0,K.jsx)("strong",{children:"Note:"})," The version will be created but not automatically released. You can deploy it from the Production tab."]}),(0,K.jsxs)("div",{className:"persona-preview-box",children:[(0,K.jsx)("h4",{children:"Persona Content:"}),(0,K.jsxs)("div",{className:"persona-preview-content",children:[r.substring(0,300),r.length>300?"...":""]})]})]}),(0,K.jsxs)("div",{className:"version-modal-actions",children:[(0,K.jsx)("button",{className:"cancel-button",onClick:H,disabled:k,children:"Cancel"}),(0,K.jsx)("button",{className:"create-button",onClick:U,disabled:k,children:k?"Creating...":"Create Version"})]})]})})]})}});var Rt,C,xm,Sm=S(()=>{"use strict";Rt=Z($e());$t();C=Z(oe()),xm=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{var Ji;let[r,i]=(0,Rt.useState)([]),[s,l]=(0,Rt.useState)(null),[o,c]=(0,Rt.useState)(null),[u,p]=(0,Rt.useState)([]),[f,d]=(0,Rt.useState)(!1),[E,v]=(0,Rt.useState)("current"),[k,m]=(0,Rt.useState)(!1),[h,g]=(0,Rt.useState)(!1),[x,w]=(0,Rt.useState)(""),[N,T]=(0,Rt.useState)({}),[A,U]=(0,Rt.useState)(null),[H,_]=(0,Rt.useState)(!0),[R,L]=(0,Rt.useState)(!1),[G,P]=(0,Rt.useState)(null),[W,ie]=(0,Rt.useState)([]);(0,Rt.useEffect)(()=>{Ae(),Ue()},[]);let Ae=()=>O(null,null,function*(){_(!0),P(null);try{console.log("Loading skills from /api/skills...");let I=yield fetch("/api/skills");if(console.log("Skills API response status:",I.status),!I.ok)throw new Error(`HTTP ${I.status}: ${I.statusText}`);let Y=yield I.json();console.log("Skills API response data:",Y),Y.success&&Y.skills&&Array.isArray(Y.skills)?(console.log("Skills loaded successfully:",Y.skills),i(Y.skills),P(null)):(console.error("Failed to load skills:",Y.error),P(Y.error||"Failed to load skills - invalid data format"),i([]))}catch(I){console.error("Error loading skills:",I),P(I instanceof Error?I.message:"Failed to load skills"),i([])}finally{_(!1)}}),Ue=()=>O(null,null,function*(){try{let Y=yield(yield fetch("/tools")).json();if(Y.success&&Y.tools){let le=[];Array.isArray(Y.tools)?le=Y.tools:typeof Y.tools=="object"&&(le=Object.entries(Y.tools).map(([He,Bt])=>ee({name:He},Bt))),ie(le)}else console.error("Failed to load tools:",Y.error),ie([])}catch(I){console.error("Error loading tools:",I),ie([])}}),y=I=>{let Y={};I.inputSchema.properties&&Object.keys(I.inputSchema.properties).forEach(le=>{let He=I.inputSchema.properties[le];Y[le]=De(He)}),T(Y)},De=I=>{if(I.type==="object"&&I.properties){let Y={};return Object.keys(I.properties).forEach(le=>{Y[le]=De(I.properties[le])}),Y}else return I.type==="number"?0:I.type==="boolean"?!1:""},ot=I=>{let Y=W.find(le=>le.name===I);Y&&(c(Y),y(Y),U(null))},b=I=>O(null,null,function*(){d(!0);try{let Y=yield re.getSkillVersions(I.skillId,t,e);if(Y.success&&Y.versions){let le=Y.versions.sort((He,Bt)=>new Date(Bt.createdDate||Bt.createdAt).getTime()-new Date(He.createdDate||He.createdAt).getTime());p(le)}else console.error("Failed to load skill versions:",Y.error),p([])}catch(Y){console.error("Error loading skill versions:",Y),p([])}finally{d(!1)}}),Fe=I=>{let Y=r.find(le=>le.name===I);Y&&(l(I),v("current"),b(Y))},vt=()=>{l(null),v("current"),p([]),c(null),U(null)},ce=I=>{v(I),o&&(c(null),U(null))},Q=()=>{c(null),U(null)},F=()=>O(null,null,function*(){if(!s)return;let I=r.find(le=>le.name===s);if(!I)return;u.some(le=>le.version===I.version)?(w(I.version),g(!0)):yield V(I.version)}),V=I=>O(null,null,function*(){if(!s)return;let Y=r.find(le=>le.name===s);if(Y){m(!0);try{let He=yield(yield fetch("/tools")).json();if(!He.success||!He.tools)throw new Error("Failed to load current tools data");let Bt=[];Array.isArray(He.tools)?Bt=He.tools:typeof He.tools=="object"&&(Bt=Object.entries(He.tools).map(([pt,D])=>({name:pt,description:D.description||"",inputSchema:D.inputSchema||{type:"object"},execute:D.execute||""})));let dn=Bt.filter(pt=>Y.tools.includes(pt.name)),Dt={name:Y.name,version:I,description:Y.description,context:Y.context,tools:dn};console.log("Creating version with data:",Dt);let tn=yield re.createSkillVersion(Y.skillId,t,e,Dt);if(tn.success)console.log("\u2705 Version created successfully:",tn.data),yield b(Y),alert(`\u2705 Version ${I} created successfully!`);else throw new Error(tn.error||"Failed to create version")}catch(le){console.error("\u274C Error creating version:",le),alert(`\u274C Failed to create version: ${le instanceof Error?le.message:"Unknown error"}`)}finally{m(!1),g(!1)}}}),B=()=>O(null,null,function*(){if(!x.trim()){alert("Please enter a version number");return}if(u.some(Y=>Y.version===x.trim())){alert("This version already exists. Please enter a different version number.");return}yield V(x.trim())}),J=()=>{g(!1),w("")},he=(I,Y,le)=>{T(He=>le?at(ee({},He),{[I]:at(ee({},He[I]),{[le]:Y})}):at(ee({},He),{[I]:Y}))},Xe=()=>O(null,null,function*(){if(o){L(!0),U(null);try{let I=Pl(N,o.inputSchema),Y=yield re.testLocalTool(o.name,I);U(Y)}catch(I){U({success:!1,error:I instanceof Error?I.message:"Unknown error occurred"})}finally{L(!1)}}}),Pl=(I,Y)=>{var He,Bt;let le={};for(let[dn,Dt]of Object.entries(I))if(Dt&&typeof Dt=="object"&&!Array.isArray(Dt)){let tn=(He=Y.properties)==null?void 0:He[dn];if(tn&&tn.type==="object"&&tn.properties){let pt=Pl(Dt,tn);Object.keys(pt).length>0&&(le[dn]=pt)}else le[dn]=Dt}else{let tn=(Bt=Y.properties)==null?void 0:Bt[dn];if((!Y.required||!Y.required.includes(dn))&&(Dt===""||Dt===null||Dt===void 0))continue;le[dn]=Dt}return le},$i=(I,Y,le)=>{var dn,Dt,tn;let He=le?((dn=N[I])==null?void 0:dn[le])||"":N[I]||"",Bt=le?(Dt=Y.required)==null?void 0:Dt.includes(le):(tn=o==null?void 0:o.inputSchema.required)==null?void 0:tn.includes(I);if(Y.type==="object"&&Y.properties)return(0,C.jsxs)("div",{className:"nested-object",children:[(0,C.jsx)("div",{className:"nested-object-label",children:I}),(0,C.jsx)("div",{className:"nested-fields",children:Object.entries(Y.properties).map(([pt,D])=>{var X;return(0,C.jsxs)("div",{className:"nested-field",children:[(0,C.jsxs)("label",{className:"nested-label",children:[pt,((X=Y.required)==null?void 0:X.includes(pt))&&(0,C.jsx)("span",{className:"required",children:"*"})]}),$i(I,D,pt),D.description&&(0,C.jsx)("div",{className:"input-description",children:D.description})]},pt)})})]});switch(Y.type){case"number":return(0,C.jsx)("input",{type:"number",value:He,onChange:pt=>he(I,parseFloat(pt.target.value)||0,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Bt});case"boolean":return(0,C.jsx)("input",{type:"checkbox",checked:He,onChange:pt=>he(I,pt.target.checked,le),className:"tool-checkbox"});case"string":default:return(0,C.jsx)("input",{type:"text",value:He,onChange:pt=>he(I,pt.target.value,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Bt})}};if(H)return(0,C.jsx)("div",{className:"skills-page",children:(0,C.jsx)("div",{className:"skills-loading",children:(0,C.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})});if(o)return(0,C.jsx)("div",{className:"skills-page",children:(0,C.jsxs)("div",{className:"tool-form",children:[(0,C.jsxs)("div",{className:"tool-form-header",children:[(0,C.jsx)("button",{className:"back-button",onClick:Q,title:"Back to skill",children:"\u2190"}),(0,C.jsx)("h3",{children:o.name})]}),(0,C.jsxs)("div",{className:"tool-form-content",children:[(0,C.jsx)("div",{className:"tool-info",children:(0,C.jsx)("p",{children:o.description})}),(0,C.jsxs)("div",{className:"tool-inputs",children:[(0,C.jsx)("h4",{children:"Input Parameters"}),Object.keys(o.inputSchema.properties||{}).length>0?(0,C.jsx)("div",{className:"input-fields",children:Object.entries(o.inputSchema.properties).map(([I,Y])=>{var le;return(0,C.jsxs)("div",{className:"input-field",children:[(0,C.jsxs)("label",{children:[I,((le=o.inputSchema.required)==null?void 0:le.includes(I))&&(0,C.jsx)("span",{className:"required",children:"*"})]}),$i(I,Y),Y.description&&(0,C.jsx)("div",{className:"input-description",children:Y.description})]},I)})}):(0,C.jsx)("p",{className:"no-inputs",children:"This tool requires no input parameters."})]}),(0,C.jsx)("div",{className:"tool-actions",children:(0,C.jsx)("button",{onClick:Xe,disabled:R,className:"test-button",children:R?"Testing...":"Test Tool"})}),A&&(0,C.jsxs)("div",{className:"test-result",children:[(0,C.jsx)("h4",{children:"Test Result"}),(0,C.jsx)("div",{className:`result-content ${A.success?"success":"error"}`,children:A.success?(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"result-label",children:"\u2705 Success"}),(0,C.jsx)("pre",{className:"result-data",children:JSON.stringify(A.result,null,2)})]}):(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"result-label",children:"\u274C Error"}),(0,C.jsx)("div",{className:"result-error",children:A.error})]})})]})]})]})});if(s){let I=r.find(Y=>Y.name===s);return I?(0,C.jsxs)("div",{className:"skills-page",children:[(0,C.jsxs)("div",{className:"skills-header",children:[(0,C.jsxs)("div",{className:"header-left",children:[(0,C.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,C.jsx)("h4",{children:I.name})]}),(0,C.jsx)("button",{className:"create-version-button",onClick:F,disabled:k,title:"Create new version",children:k?"Creating...":"Create Version"})]}),(0,C.jsxs)("div",{className:"skill-tabs",children:[(0,C.jsxs)("div",{className:"tabs-header",children:[(0,C.jsx)("button",{className:`tab-button ${E==="current"?"active":""}`,onClick:()=>ce("current"),children:"Current"}),(0,C.jsxs)("button",{className:`tab-button ${E==="versions"?"active":""}`,onClick:()=>ce("versions"),children:["Versions (",u.length,")"]})]}),(0,C.jsx)("div",{className:"tab-content",children:E==="current"?(0,C.jsxs)("div",{className:"current-skill-tab",children:[(0,C.jsx)("div",{className:"skill-details",children:(0,C.jsxs)("div",{className:"skill-info-section",children:[(0,C.jsxs)("div",{className:"skill-meta",children:[(0,C.jsxs)("span",{className:"skill-version",children:["v",I.version]}),(0,C.jsxs)("span",{className:"skill-tools-count",children:[I.tools.length," tools"]})]}),I.description&&(0,C.jsxs)("div",{className:"skill-description-section",children:[(0,C.jsx)("h5",{children:"Description"}),(0,C.jsx)("p",{children:I.description})]}),I.context&&(0,C.jsxs)("div",{className:"skill-context-section",children:[(0,C.jsx)("h5",{children:"Context"}),(0,C.jsx)("p",{children:I.context})]})]})}),(0,C.jsxs)("div",{className:"tools-section",children:[(0,C.jsx)("div",{className:"tools-header",children:(0,C.jsxs)("h5",{children:["Available Tools (",I.tools.length,")"]})}),I.tools&&I.tools.length>0?(0,C.jsx)("div",{className:"tools-grid",children:I.tools.map((Y,le)=>(0,C.jsxs)("div",{className:"tool-card",onClick:()=>ot(Y),children:[(0,C.jsx)("div",{className:"tool-card-header",children:(0,C.jsx)("h4",{children:Y})}),(0,C.jsx)("div",{className:"tool-card-body",children:(0,C.jsx)("span",{className:"skill-badge",children:I.name})})]},le))}):(0,C.jsxs)("div",{className:"no-tools",children:[(0,C.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,C.jsx)("div",{className:"no-tools-text",children:"No tools in this skill"}),(0,C.jsx)("div",{className:"no-tools-subtext",children:"This skill doesn't have any tools defined"})]})]}),(0,C.jsx)("div",{className:"skills-help",children:(0,C.jsx)("p",{children:"This skill is compiled from your local code and updates automatically when you make changes. Use the tools above to test your skill's functionality."})})]}):(0,C.jsx)("div",{className:"versions-skill-tab",children:f?(0,C.jsx)("div",{className:"versions-loading",children:(0,C.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):u.length>0?(0,C.jsx)("div",{className:"versions-list",children:u.map((Y,le)=>(0,C.jsxs)("div",{className:`version-item ${Y.status}`,onClick:()=>{console.log("Selected version:",Y.version)},children:[(0,C.jsxs)("div",{className:"version-info",children:[(0,C.jsxs)("div",{className:"version-header",children:[(0,C.jsxs)("span",{className:"version-number",children:["v",Y.version]}),(0,C.jsx)("span",{className:`version-status ${Y.status}`,children:Y.status})]}),(0,C.jsxs)("div",{className:"version-meta",children:[(0,C.jsx)("span",{className:"version-date",children:new Date(Y.createdDate||Y.createdAt).toLocaleDateString()}),(0,C.jsxs)("span",{className:"version-author",children:["by ",Y.createdByEmail||Y.createdBy]})]})]}),(0,C.jsx)("div",{className:"version-arrow",children:"\u2192"})]},le))}):(0,C.jsxs)("div",{className:"no-versions",children:[(0,C.jsx)("div",{className:"no-versions-icon",children:"\u{1F4E6}"}),(0,C.jsx)("div",{className:"no-versions-text",children:"No versions found"}),(0,C.jsx)("div",{className:"no-versions-subtext",children:"Create your first version to get started"})]})})})]}),h&&(0,C.jsx)("div",{className:"version-modal-overlay",children:(0,C.jsxs)("div",{className:"version-modal",children:[(0,C.jsx)("div",{className:"version-modal-header",children:(0,C.jsx)("h3",{children:"Create New Version"})}),(0,C.jsxs)("div",{className:"version-modal-body",children:[(0,C.jsxs)("p",{children:["Version ",(0,C.jsx)("strong",{children:(Ji=r.find(Y=>Y.name===s))==null?void 0:Ji.version})," already exists."]}),(0,C.jsx)("p",{children:"Please enter a new version number:"}),(0,C.jsx)("input",{type:"text",value:x,onChange:Y=>w(Y.target.value),placeholder:"e.g., 1.0.1",className:"version-input",autoFocus:!0})]}),(0,C.jsxs)("div",{className:"version-modal-actions",children:[(0,C.jsx)("button",{className:"cancel-button",onClick:J,disabled:k,children:"Cancel"}),(0,C.jsx)("button",{className:"create-button",onClick:B,disabled:k||!x.trim(),children:k?"Creating...":"Create Version"})]})]})})]}):(0,C.jsxs)("div",{className:"skills-page",children:[(0,C.jsx)("div",{className:"skills-header",children:(0,C.jsxs)("div",{className:"header-left",children:[(0,C.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,C.jsx)("h4",{children:"Skill Not Found"})]})}),(0,C.jsxs)("div",{className:"no-skills",children:[(0,C.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,C.jsx)("div",{className:"no-skills-text",children:"Skill not found"}),(0,C.jsx)("div",{className:"no-skills-subtext",children:"The selected skill could not be loaded"})]})]})}return(0,C.jsxs)("div",{className:"skills-page",children:[(0,C.jsxs)("div",{className:"skills-header",children:[(0,C.jsx)("h3",{children:"Available Skills"}),(0,C.jsx)("button",{className:"refresh-button",onClick:Ae,title:"Refresh skills",children:"\u21BB"})]}),(0,C.jsx)("div",{className:"skills-content",children:G?(0,C.jsxs)("div",{className:"no-skills",children:[(0,C.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,C.jsx)("div",{className:"no-skills-text",children:"Error loading skills"}),(0,C.jsx)("div",{className:"no-skills-subtext",children:G}),(0,C.jsx)("button",{className:"retry-button",onClick:Ae,style:{marginTop:"16px"},children:"Retry"})]}):r.length===0?(0,C.jsxs)("div",{className:"no-skills",children:[(0,C.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,C.jsx)("div",{className:"no-skills-text",children:"No skills found"}),(0,C.jsx)("div",{className:"no-skills-subtext",children:"Skills will appear here when available in your project"})]}):Array.isArray(r)&&r.length>0?(0,C.jsx)("div",{className:"skills-list",children:r.map(I=>(0,C.jsxs)("div",{className:"skill-item",onClick:()=>Fe(I.name),children:[(0,C.jsxs)("div",{className:"skill-info",children:[(0,C.jsx)("div",{className:"skill-name",children:I.name}),(0,C.jsx)("div",{className:"skill-description",children:I.description}),(0,C.jsxs)("div",{className:"skill-stats",children:[(0,C.jsxs)("span",{className:"skill-stat",children:["v",I.version]}),(0,C.jsxs)("span",{className:"skill-stat",children:[I.tools.length," tools"]})]})]}),(0,C.jsx)("div",{className:"skill-arrow",children:"\u2192"})]},I.name))}):(0,C.jsxs)("div",{className:"no-skills",children:[(0,C.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,C.jsx)("div",{className:"no-skills-text",children:"No skills available"}),(0,C.jsx)("div",{className:"no-skills-subtext",children:"No valid skills data received"})]})})]})}});var iN=S(()=>{});var gt,$,El,Kc=S(()=>{"use strict";gt=Z($e());$t();iN();$=Z(oe()),El=({apiKey:e,agentId:t,isProduction:n=!1})=>{let[a,r]=(0,gt.useState)([]),[i,s]=(0,gt.useState)(!0),[l,o]=(0,gt.useState)(""),[c,u]=(0,gt.useState)([]),[p,f]=(0,gt.useState)(null),[d,E]=(0,gt.useState)(!1),[v,k]=(0,gt.useState)(!1),[m,h]=(0,gt.useState)({}),[g,x]=(0,gt.useState)(null),[w,N]=(0,gt.useState)(null),[T,A]=(0,gt.useState)(!1),[U,H]=(0,gt.useState)(!1),[_,R]=(0,gt.useState)(1),[L,G]=(0,gt.useState)(1),[P,W]=(0,gt.useState)(0);(0,gt.useEffect)(()=>{ie()},[e,t,_]),(0,gt.useEffect)(()=>{if(l.trim()){let V=a.filter(B=>Object.values(B).some(J=>String(J).toLowerCase().includes(l.toLowerCase())));u(V)}else u(a)},[a,l]),(0,gt.useEffect)(()=>{if(g||w){let V=setTimeout(()=>{x(null),N(null)},5e3);return()=>clearTimeout(V)}},[g,w]);let ie=()=>O(null,null,function*(){var V,B;s(!0);try{let J=yield re.getProducts(e,t,_,20);J.success&&J.data?(r(J.data.data||[]),G(((V=J.data.pagination)==null?void 0:V.totalPages)||1),W(((B=J.data.pagination)==null?void 0:B.totalCount)||0)):(console.error("Failed to load products:",J.error),r([]),x("Failed to load products"))}catch(J){console.error("Error loading products:",J),r([]),x("Failed to load products")}finally{s(!1)}}),Ae=()=>O(null,null,function*(){if(!l.trim()){u(a);return}try{let V=yield re.searchProducts(e,t,l);V.success&&V.data?u(V.data.data||[]):x("Search failed")}catch(V){console.error("Search error:",V),x("Search failed")}}),Ue=V=>{f(V),h(ee({},V)),E(!1)},y=()=>{f(null),h({id:"",name:"",description:"",price:""}),k(!0),E(!0)},De=()=>{E(!0)},ot=()=>O(null,null,function*(){var V,B;if(!((V=m.id)!=null&&V.trim())){x("Product ID is required");return}A(!0);try{let J;v?J=yield re.createProduct(e,t,m):J=yield re.updateProduct(e,t,m),J.success?(N(v?"Product created successfully":"Product updated successfully"),E(!1),k(!1),f(((B=J.data)==null?void 0:B.product)||m),yield ie()):x(`Failed to ${v?"create":"update"} product`)}catch(J){console.error("Save error:",J),x(`Failed to ${v?"create":"update"} product`)}finally{A(!1)}}),b=()=>O(null,null,function*(){if(!(!p||!p.id)&&confirm(`Are you sure you want to delete "${p.name||p.id}"?`)){H(!0);try{(yield re.deleteProduct(e,t,p.id)).success?(N("Product deleted successfully"),f(null),yield ie()):x("Failed to delete product")}catch(V){console.error("Delete error:",V),x("Failed to delete product")}finally{H(!1)}}}),Fe=()=>{E(!1),k(!1),p?h(ee({},p)):f(null)},vt=()=>{f(null),E(!1),k(!1)},ce=(V,B)=>{h(J=>at(ee({},J),{[V]:B}))},Q=()=>{var J;let V=["id","name","description","price"],B=new Set([...V,...Object.keys(m)]);return(0,$.jsxs)("div",{className:"product-form",children:[(0,$.jsxs)("div",{className:"form-fields",children:[Array.from(B).map(he=>(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:`product-${he}`,children:he}),(0,$.jsx)("input",{id:`product-${he}`,type:he==="price"?"number":"text",value:m[he]||"",onChange:Xe=>ce(he,Xe.target.value),placeholder:`Enter ${he}...`,disabled:T,required:he==="id"})]},he)),(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:"add-field",children:"Add Custom Field"}),(0,$.jsxs)("div",{className:"add-field-container",children:[(0,$.jsx)("input",{id:"add-field-key",type:"text",placeholder:"Field name",onKeyPress:he=>{if(he.key==="Enter"){let Xe=he.target.value.trim();Xe&&!m.hasOwnProperty(Xe)&&(ce(Xe,""),he.target.value="")}}}),(0,$.jsx)("span",{className:"field-hint",children:"Press Enter to add"})]})]})]}),(0,$.jsxs)("div",{className:"form-actions",children:[(0,$.jsx)("button",{className:"cancel-button",onClick:Fe,disabled:T,children:"Cancel"}),(0,$.jsx)("button",{className:"save-button",onClick:ot,disabled:T||!((J=m.id)!=null&&J.trim()),children:T?"Saving...":v?"Create Product":"Update Product"})]})]})},F=()=>p?(0,$.jsxs)("div",{className:"product-detail",children:[(0,$.jsxs)("div",{className:"product-detail-header",children:[(0,$.jsx)("button",{className:"back-button",onClick:vt,title:"Back to products",children:"\u2190"}),(0,$.jsx)("h4",{children:p.name||p.id}),(0,$.jsx)("div",{className:"product-actions",children:!d&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("button",{className:"edit-button",onClick:De,disabled:U,children:"\u270F\uFE0F"}),(0,$.jsx)("button",{className:"delete-button",onClick:b,disabled:U,children:U?"\u27F3":"\u{1F5D1}\uFE0F"})]})})]}),d?Q():(0,$.jsx)("div",{className:"product-info",children:Object.entries(p).map(([V,B])=>(0,$.jsxs)("div",{className:"product-field",children:[(0,$.jsx)("div",{className:"field-label",children:V}),(0,$.jsx)("div",{className:"field-value",children:String(B)})]},V))})]}):null;return i&&a.length===0?(0,$.jsx)("div",{className:"product-management",children:(0,$.jsx)("div",{className:"loading-container",children:(0,$.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,$.jsxs)("div",{className:"product-management",children:[(0,$.jsx)("div",{className:"product-header",children:p||v?(0,$.jsx)("div",{className:"detail-header",children:(0,$.jsx)("h3",{children:v?"Create Product":"Product Details"})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"header-content",children:[(0,$.jsxs)("h3",{children:["Products ",n?"(Production)":"(Sandbox)"]}),P>0&&(0,$.jsxs)("span",{className:"product-count",children:[P," products"]})]}),(0,$.jsxs)("div",{className:"header-actions",children:[(0,$.jsx)("button",{className:"create-button",onClick:y,children:"\u2795"}),(0,$.jsx)("button",{className:"refresh-button",onClick:ie,disabled:i,children:i?"\u27F3":"\u21BB"})]})]})}),g&&(0,$.jsx)("div",{className:"error-message",children:g}),w&&(0,$.jsx)("div",{className:"success-message",children:w}),(0,$.jsx)("div",{className:"product-content",children:p||v?F():(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"product-search",children:(0,$.jsxs)("div",{className:"search-container",children:[(0,$.jsx)("input",{type:"text",placeholder:"Search products...",value:l,onChange:V=>o(V.target.value),className:"search-input"}),(0,$.jsx)("button",{className:"search-button",onClick:Ae,children:"\u{1F50D}"})]})}),(0,$.jsx)("div",{className:"products-list",children:c.length>0?c.map(V=>(0,$.jsxs)("div",{className:"product-item",onClick:()=>Ue(V),children:[(0,$.jsxs)("div",{className:"product-info",children:[(0,$.jsx)("div",{className:"product-name",children:V.name||V.id}),(0,$.jsx)("div",{className:"product-description",children:V.description||"No description"}),(0,$.jsxs)("div",{className:"product-meta",children:["ID: ",V.id,V.price&&(0,$.jsxs)("span",{children:[" \u2022 Price: ",V.price]})]})]}),(0,$.jsx)("div",{className:"product-arrow",children:"\u2192"})]},V.id)):l?(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F50D}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products found"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Try a different search term"})]}):(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F4E6}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products yet"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Create your first product to get started"})]})}),L>1&&(0,$.jsxs)("div",{className:"product-pagination",children:[(0,$.jsxs)("div",{className:"pagination-info",children:["Page ",_," of ",L]}),(0,$.jsxs)("div",{className:"pagination-controls",children:[(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.max(1,V-1)),disabled:_<=1||i,children:"\u2190"}),(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.min(L,V+1)),disabled:_>=L||i,children:"\u2192"})]})]})]})})]})}});var Ie,z,kl,U2,Nm,P2,Em=S(()=>{"use strict";Ie=Z($e());$t();Kc();z=Z(oe()),kl=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},U2=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"orders",name:"Orders",description:"Coming soon",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Coming soon",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Coming soon",icon:"\u2699\uFE0F"}],Nm=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ie.useState)(null),[r,i]=(0,Ie.useState)(null),[s,l]=(0,Ie.useState)(null),[o,c]=(0,Ie.useState)(!1),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),[E,v]=(0,Ie.useState)(""),[k,m]=(0,Ie.useState)(null),[h,g]=(0,Ie.useState)(null),[x,w]=(0,Ie.useState)(!1),[N,T]=(0,Ie.useState)("list"),A=(0,Ie.useRef)(null),U=(0,Ie.useRef)(null),[H,_]=(0,Ie.useState)(!1),[R,L]=(0,Ie.useState)(""),[G,P]=(0,Ie.useState)(""),[W,ie]=(0,Ie.useState)(!1);(0,Ie.useEffect)(()=>{Ae()},[e,t]),(0,Ie.useEffect)(()=>{if(console.log("JSON text changed:",E),console.log("Is editing:",x),console.log("Highlight ref exists:",!!U.current),U.current&&E&&!x){let B=kl(E);console.log("Applying highlighting:",B.substring(0,100)+"..."),U.current.innerHTML=B}},[E,x]);let Ae=()=>O(null,null,function*(){try{if(console.log("Loading user data with API key:",e,"agentId:",t),c(!0),m(null),!e||!t){console.error("Missing API key or agentId:",{apiKey:!!e,agentId:!!t}),m("Missing API key or agent ID"),v("{}");return}let B=yield re.loadUserData(e,t);if(console.log("User data response:",B),B.success&&B.data){a(B.data);let J=B.data,he=JSON.stringify(J,null,2);v(he),setTimeout(()=>{U.current&&(U.current.innerHTML=kl(he))},0),console.log("User data loaded successfully:",B.data),console.log("Data to display:",J)}else console.log("No user data or error:",B.error),m(B.error||"No user data found"),v("{}")}catch(B){console.error("Failed to load user data:",B),m(`Failed to load user data: ${B instanceof Error?B.message:"Unknown error"}`),v("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){try{console.log("Saving user data:",E),p(!0),m(null),g(null);let B=JSON.parse(E),J=yield re.updateUserData(e,t,B);console.log("Save user data response:",J),J.success&&J.data?(a(J.data),v(JSON.stringify(J.data.data,null,2)),g("User data saved successfully!"),w(!1),setTimeout(()=>g(null),3e3)):m("Failed to save user data: "+(J.error||"Unknown error"))}catch(B){console.error("Failed to save user data:",B),B instanceof SyntaxError?m("Invalid JSON format. Please check your syntax."):m("Failed to save user data")}finally{p(!1)}}),y=()=>O(null,null,function*(){try{console.log("Clearing user data"),d(!0),m(null),g(null);let B=yield re.clearUserData(e,t);console.log("Clear user data response:",B),B.success?(a(null),v("{}"),T("list"),g("User data cleared successfully!"),w(!1),setTimeout(()=>g(null),3e3)):m("Failed to clear user data: "+(B.error||"Unknown error"))}catch(B){console.error("Failed to clear user data:",B),m("Failed to clear user data")}finally{d(!1)}}),De=B=>O(null,null,function*(){if(i(B),T("detail"),w(!1),m(null),B.id==="user"){c(!0);try{let J=yield re.loadUserData(e,t);if(J.success&&J.data){l(J.data);let he=JSON.stringify(J.data,null,2);v(he),console.log("Setting JSON text for user data:",he)}else l(null),v("{}"),console.log("No user data found, setting empty JSON")}catch(J){console.error("Failed to load user data:",J),l(null),v("{}")}finally{c(!1)}}else if(B.id==="resources"){c(!0);try{let J=yield re.loadResources(e,t);J.success&&J.data?(l(J.data),console.log("Loaded resources:",J.data)):(l([]),console.log("No resources found"))}catch(J){console.error("Failed to load resources:",J),l([])}finally{c(!1)}}else B.id==="products"?l(null):(l(null),v("{}"))}),ot=()=>{T("list"),i(null),l(null),w(!1)},b=()=>{r&&(r.id==="resources"?(_(!0),L(""),P("")):console.log(`Add new item to ${r==null?void 0:r.name}`))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){alert("Name and content cannot be empty");return}ie(!0);try{let B=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});B.success?(_(!1),L(""),P(""),r&&De(r)):alert("Failed to create resource: "+(B.error||"Unknown error"))}catch(B){console.error("Error creating resource:",B),alert("Failed to create resource")}finally{ie(!1)}}),vt=()=>{_(!1),L(""),P("")},ce=()=>O(null,null,function*(){r&&console.log(`Delete all ${r.name} data`)}),Q=B=>{v(B),w(!0),m(null),g(null),U.current&&(U.current.innerHTML=kl(B))},F=()=>{w(!0),setTimeout(()=>{A.current&&A.current.focus()},0)},V=()=>{A.current&&U.current&&(U.current.scrollTop=A.current.scrollTop,U.current.scrollLeft=A.current.scrollLeft)};return o?(0,z.jsx)("div",{className:"user-data-panel",children:(0,z.jsx)("div",{className:"user-data-loading",children:(0,z.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,z.jsxs)("div",{className:"user-data-panel",children:[(0,z.jsxs)("div",{className:"user-data-header",children:[(0,z.jsxs)("div",{className:"header-left",children:[N==="detail"&&(0,z.jsx)("button",{className:"back-button",onClick:ot,title:"Back to data categories",children:"\u2190"}),(0,z.jsx)("h3",{children:N==="list"?"Data":(r==null?void 0:r.name)||"Data Detail"})]}),(0,z.jsxs)("div",{className:"user-data-actions",children:[N==="detail"&&(r==null?void 0:r.id)!=="user"&&(r==null?void 0:r.description)!=="Coming soon"&&(0,z.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,z.jsx)("button",{className:"refresh-button",onClick:N==="detail"&&r?()=>De(r):Ae,disabled:o,title:`Refresh ${N==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),N==="detail"&&(r==null?void 0:r.id)==="user"&&(0,z.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),N==="detail"&&(0,z.jsx)("button",{className:"delete-button",onClick:ce,disabled:f,title:`Delete all ${r==null?void 0:r.name.toLowerCase()}`,children:"\u{1F5D1}\uFE0F"})]})]}),k&&(0,z.jsxs)("div",{className:"error-message",children:["\u274C ",k]}),h&&(0,z.jsxs)("div",{className:"success-message",children:["\u2705 ",h]}),(0,z.jsx)("div",{className:"user-data-content",children:N==="list"?(0,z.jsx)("div",{className:"data-list",children:(0,z.jsx)("div",{className:"data-categories",children:U2.map(B=>(0,z.jsxs)("div",{className:"data-category",onClick:()=>De(B),children:[(0,z.jsx)("div",{className:"category-icon",children:B.icon}),(0,z.jsxs)("div",{className:"category-info",children:[(0,z.jsx)("div",{className:"category-name",children:B.name}),(0,z.jsx)("div",{className:"category-description",children:B.description})]}),(0,z.jsx)("div",{className:"category-arrow",children:"\u2192"})]},B.id))})}):(0,z.jsx)("div",{className:"data-detail",children:(r==null?void 0:r.id)==="user"&&s?(0,z.jsx)("div",{className:"json-editor",children:x?(0,z.jsxs)("div",{className:"json-editor-container",children:[(0,z.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:kl(E)}}),(0,z.jsx)("textarea",{ref:A,id:"user-data-json",name:"userDataJson",value:E,onChange:B=>Q(B.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,z.jsx)("div",{className:"json-display",onClick:F,dangerouslySetInnerHTML:{__html:kl(E)}})}):(r==null?void 0:r.id)==="resources"&&s?(0,z.jsxs)("div",{className:"resources-container",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Resources:"})," Changes to resources will propagate to production and affect live users."]})]}),(0,z.jsx)("div",{className:"resources-list",children:Array.isArray(s)&&s.length>0?s.map(B=>(0,z.jsx)(P2,{resource:B,apiKey:e,agentId:t,onUpdate:()=>De(r)},B.id)):(0,z.jsxs)("div",{className:"no-resources",children:[(0,z.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,z.jsx)("h4",{children:"No resources yet"}),(0,z.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})]}):(r==null?void 0:r.id)==="products"?(0,z.jsx)(El,{apiKey:e,agentId:t,isProduction:!1}):(0,z.jsxs)("div",{className:"category-empty-state",children:[(0,z.jsx)("div",{className:"empty-icon",children:r==null?void 0:r.icon}),(r==null?void 0:r.description)==="Coming soon"?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("h3",{children:"Coming Soon"}),(0,z.jsxs)("p",{children:[r.name," management will be available in a future update"]}),(0,z.jsx)("div",{className:"coming-soon-badge",children:"\u{1F6A7} Under Development"})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("h3",{children:["No ",r==null?void 0:r.name.toLowerCase()," yet"]}),(0,z.jsxs)("p",{children:["Start by adding your first ",r==null?void 0:r.name.toLowerCase()," entry"]}),(0,z.jsx)("div",{className:"empty-actions",children:(0,z.jsx)("button",{className:"add-button",onClick:b,children:"\u2795"})})]})]})})}),H&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Create New Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:vt,disabled:W,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," This resource will be available in production and affect live users."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:B=>L(B.target.value),placeholder:"e.g., FAQ, return-policy, user-guide",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"resource-content",value:G,onChange:B=>P(B.target.value),placeholder:"Paste your content here... This can be a large text file, FAQ content, documentation, etc.",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[G.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:vt,disabled:W,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},P2=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ie.useState)(!1),[s,l]=(0,Ie.useState)(e.name),[o,c]=(0,Ie.useState)(e.content),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),E=()=>{i(!0),l(e.name),c(e.content)},v=()=>{i(!1),l(e.name),c(e.content)},k=()=>O(null,null,function*(){if(!s.trim()||!o.trim()){alert("Name and content cannot be empty");return}p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}),m=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"? This will affect production.`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}});return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"resource-item",children:(0,z.jsxs)("div",{className:"resource-display",children:[(0,z.jsxs)("div",{className:"resource-header",children:[(0,z.jsx)("h4",{className:"resource-name",children:e.name}),(0,z.jsx)("div",{className:"resource-meta",children:(0,z.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,z.jsx)("div",{className:"resource-content",children:(0,z.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,z.jsxs)("div",{className:"resource-actions",children:[(0,z.jsx)("button",{className:"edit-btn",onClick:E,title:"Edit resource",children:"\u270F\uFE0F"}),(0,z.jsx)("button",{className:"delete-btn",onClick:m,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Edit Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:v,disabled:u,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," Changes to this resource will affect live users immediately."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Resource name",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Resource content",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[o.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:v,disabled:u,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:k,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Ut,ne,km,B2,Tm=S(()=>{"use strict";Ut=Z($e());$t();ne=Z(oe()),km=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ut.useState)([]),[r,i]=(0,Ut.useState)(!0),[s,l]=(0,Ut.useState)(!1),[o,c]=(0,Ut.useState)(null),[u,p]=(0,Ut.useState)(null),[f,d]=(0,Ut.useState)(null),[E,v]=(0,Ut.useState)(""),[k,m]=(0,Ut.useState)(""),[h,g]=(0,Ut.useState)(!1);(0,Ut.useEffect)(()=>{A()},[]);let[x,w]=(0,Ut.useState)(!0);(0,Ut.useEffect)(()=>{if(x)return;O(null,null,function*(){console.log("Environment variables changed, auto-saving..."),l(!0),c(null),p(null);try{let W=T(n);console.log("Generated .env content:",W);let ie=yield re.saveEnvContent(W);console.log("Save env response:",ie),ie.success?(p("Environment variables saved successfully!"),setTimeout(()=>p(null),3e3)):(console.error("Failed to save env variables:",ie.error),c(ie.error||"Failed to save environment variables"))}catch(W){console.error("Error saving env variables:",W),c("Failed to save environment variables")}finally{l(!1)}})},[n]);let N=P=>P.trim()?P.split(`
|
|
23
|
+
`).map((W,ie)=>W.trim()).filter(W=>W&&!W.startsWith("#")).map((W,ie)=>{let[Ae,...Ue]=W.split("=");return{id:`env_${ie}_${Date.now()}`,key:(Ae==null?void 0:Ae.trim())||"",value:Ue.join("=")||""}}).filter(W=>W.key):[],T=P=>P.map(W=>`${W.key}=${W.value}`).join(`
|
|
24
|
+
`),A=()=>O(null,null,function*(){i(!0),c(null);try{let P=yield re.loadEnvContent();if(P.success){let W=P.content||"",ie=N(W);a(ie),w(!1)}else c(P.error||"Failed to load environment variables"),a([]),w(!1)}catch(P){console.error("Error loading env content:",P),c("Failed to load environment variables"),a([])}finally{i(!1)}}),U=()=>{if(!E.trim()){c("Please enter a variable name");return}if(n.some(W=>W.key===E.trim())){c("Variable name already exists");return}let P={id:`env_new_${Date.now()}`,key:E.trim(),value:k};a([...n,P]),v(""),m(""),g(!1),c(null)},H=(P,W,ie)=>{a(Ae=>Ae.map(Ue=>Ue.id===P?at(ee({},Ue),{key:W.trim(),value:ie}):Ue)),d(null)},_=P=>{a(W=>W.filter(ie=>ie.id!==P))},R=P=>{d(P),c(null),p(null)},L=()=>{d(null),A()},G=()=>{g(!1),v(""),m(""),c(null)};return r?(0,ne.jsx)("div",{className:"env-panel",children:(0,ne.jsx)("div",{className:"env-loading",children:(0,ne.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ne.jsxs)("div",{className:"env-panel",children:[(0,ne.jsxs)("div",{className:"env-header",children:[(0,ne.jsx)("h3",{children:"Environment Variables"}),(0,ne.jsxs)("div",{className:"env-actions",children:[(0,ne.jsx)("button",{className:"refresh-btn",onClick:A,disabled:r,title:"Refresh environment variables",children:r?"\u27F3":"\u21BB"}),(0,ne.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ne.jsxs)("div",{className:"env-content",children:[o&&(0,ne.jsxs)("div",{className:"error-message",children:[(0,ne.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ne.jsxs)("div",{className:"success-message",children:[(0,ne.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ne.jsxs)("div",{className:"env-add-form",children:[(0,ne.jsxs)("div",{className:"env-form-header",children:[(0,ne.jsx)("h4",{children:"Add New Variable"}),(0,ne.jsx)("button",{className:"form-cancel-btn",onClick:G,title:"Cancel",children:"\u2715"})]}),(0,ne.jsxs)("div",{className:"env-form-fields",children:[(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Variable Name"}),(0,ne.jsx)("input",{type:"text",value:E,onChange:P=>v(P.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0})]}),(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Value"}),(0,ne.jsx)("input",{type:"text",value:k,onChange:P=>m(P.target.value),placeholder:"your_api_key_here",className:"env-input"})]}),(0,ne.jsx)("div",{className:"env-form-actions",children:(0,ne.jsx)("button",{className:"add-variable-btn",onClick:U,disabled:!E.trim(),children:"Add Variable"})})]})]}),(0,ne.jsx)("div",{className:"env-variables",children:n.length>0?(0,ne.jsx)("div",{className:"env-list",children:n.map(P=>(0,ne.jsx)(B2,{variable:P,isEditing:f===P.id,onEdit:()=>R(P.id),onSave:(W,ie)=>H(P.id,W,ie),onCancel:L,onDelete:()=>_(P.id)},P.id))}):(0,ne.jsxs)("div",{className:"env-empty-state",children:[(0,ne.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ne.jsx)("h4",{children:"No environment variables"}),(0,ne.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ne.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ne.jsxs)("div",{className:"env-help",children:[(0,ne.jsxs)("p",{children:["Environment variables are stored in your ",(0,ne.jsx)("code",{children:".env"})," file and automatically included in tool execution and chat messages."]}),(0,ne.jsxs)("p",{children:[(0,ne.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},B2=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i})=>{let[s,l]=(0,Ut.useState)(e.key),[o,c]=(0,Ut.useState)(e.value),[u,p]=(0,Ut.useState)(!1),f=e.value.length>60,d=u||!f?e.value:e.value.substring(0,60)+"...";return(0,ne.jsx)("div",{className:"env-variable-item",children:t?(0,ne.jsxs)("div",{className:"env-variable-edit",children:[(0,ne.jsxs)("div",{className:"env-edit-fields",children:[(0,ne.jsx)("input",{type:"text",value:s,onChange:k=>l(k.target.value),className:"env-key-input",placeholder:"Variable name"}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsx)("textarea",{value:o,onChange:k=>c(k.target.value),className:"env-value-input",placeholder:"Value",rows:1})]}),(0,ne.jsxs)("div",{className:"env-edit-actions",children:[(0,ne.jsx)("button",{className:"save-edit-btn",onClick:()=>{if(!s.trim()){alert("Variable name cannot be empty");return}a(s,o)},title:"Save changes",children:"\u2713"}),(0,ne.jsx)("button",{className:"cancel-edit-btn",onClick:()=>{l(e.key),c(e.value),r()},title:"Cancel editing",children:"\u2715"})]})]}):(0,ne.jsxs)("div",{className:"env-variable-display",children:[(0,ne.jsxs)("div",{className:"env-variable-content",children:[(0,ne.jsx)("span",{className:"env-key",children:e.key}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsxs)("div",{className:"env-value-container",children:[(0,ne.jsx)("span",{className:"env-value",onClick:()=>f&&p(!u),style:{cursor:f?"pointer":"default"},title:f?"Click to expand/collapse":e.value,children:d||"<empty>"}),f&&(0,ne.jsx)("button",{className:"expand-btn",onClick:()=>p(!u),title:u?"Collapse":"Expand",children:u?"\u25B2":"\u25BC"})]})]}),(0,ne.jsxs)("div",{className:"env-variable-actions",children:[(0,ne.jsx)("button",{className:"edit-variable-btn",onClick:n,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ne.jsx)("button",{className:"delete-variable-btn",onClick:i,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var _t,wm,sN=S(()=>{"use strict";bm();Sm();Em();Tm();_t=Z(oe()),wm=({activeTab:e,onTabChange:t,persona:n,onSavePersona:a,apiKey:r,agentId:i,skillId:s,sandboxId:l,width:o})=>(0,_t.jsx)("div",{className:"log-container",style:{width:`${o}px`},children:(0,_t.jsxs)("div",{className:"top-section",children:[(0,_t.jsx)("div",{className:"log-header",children:(0,_t.jsxs)("div",{className:"tab-buttons",children:[(0,_t.jsx)("button",{className:`tab-button ${e==="persona"?"active":""}`,onClick:()=>t("persona"),children:"Persona"}),(0,_t.jsx)("button",{className:`tab-button ${e==="skills"?"active":""}`,onClick:()=>t("skills"),children:"Skills"}),(0,_t.jsx)("button",{className:`tab-button ${e==="userdata"?"active":""}`,onClick:()=>t("userdata"),children:"Data"}),(0,_t.jsx)("button",{className:`tab-button ${e==="env"?"active":""}`,onClick:()=>t("env"),children:"Env"})]})}),(0,_t.jsx)("div",{className:`tab-content ${e==="persona"?"active":"inactive"}`,children:(0,_t.jsx)(ym,{persona:n,onSavePersona:a,apiKey:r,agentId:i})}),(0,_t.jsx)("div",{className:`tab-content ${e==="skills"?"active":"inactive"}`,children:(0,_t.jsx)(xm,{apiKey:r,agentId:i,skillId:s,sandboxId:l})}),(0,_t.jsx)("div",{className:`tab-content ${e==="userdata"?"active":"inactive"}`,children:(0,_t.jsx)(Nm,{apiKey:r,agentId:i})}),(0,_t.jsx)("div",{className:`tab-content ${e==="env"?"active":"inactive"}`,children:(0,_t.jsx)(km,{apiKey:r,agentId:i})})]})})});var Yn,Tl,wl,Wc=S(()=>{Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";Tl=Object.create(null);Object.keys(Yn).forEach(e=>{Tl[Yn[e]]=e});wl={type:"error",data:"parser error"}});function oN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function fN(e,t){if(cN&&e.data instanceof Blob)return e.data.arrayBuffer().then(oN).then(t);if(uN&&(e.data instanceof ArrayBuffer||dN(e.data)))return t(oN(e.data));Al(e,!1,n=>{Am||(Am=new TextEncoder),t(Am.encode(n))})}var cN,uN,dN,Al,lN,Am,pN=S(()=>{Wc();cN=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",uN=typeof ArrayBuffer=="function",dN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Al=({type:e,data:t},n,a)=>cN&&t instanceof Blob?n?a(t):lN(t,a):uN&&(t instanceof ArrayBuffer||dN(t))?n?a(t):lN(new Blob([t]),a):a(Yn[e]+(t||"")),lN=(e,t)=>{let n=new FileReader;return n.onload=function(){let a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)}});var mN,Cl,hN,gN=S(()=>{mN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cl=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<mN.length;e++)Cl[mN.charCodeAt(e)]=e;hN=e=>{let t=e.length*.75,n=e.length,a,r=0,i,s,l,o;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<n;a+=4)i=Cl[e.charCodeAt(a)],s=Cl[e.charCodeAt(a+1)],l=Cl[e.charCodeAt(a+2)],o=Cl[e.charCodeAt(a+3)],u[r++]=i<<2|s>>4,u[r++]=(s&15)<<4|l>>2,u[r++]=(l&3)<<6|o&63;return c}});var V2,Rl,H2,vN,yN=S(()=>{Wc();gN();V2=typeof ArrayBuffer=="function",Rl=(e,t)=>{if(typeof e!="string")return{type:"message",data:vN(e,t)};let n=e.charAt(0);return n==="b"?{type:"message",data:H2(e.substring(1),t)}:Tl[n]?e.length>1?{type:Tl[n],data:e.substring(1)}:{type:Tl[n]}:wl},H2=(e,t)=>{if(V2){let n=hN(e);return vN(n,t)}else return{base64:!0,data:e}},vN=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}}});function NN(){return new TransformStream({transform(e,t){fN(e,n=>{let a=n.length,r;if(a<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,a);else if(a<65536){r=new Uint8Array(3);let i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,a)}else{r=new Uint8Array(9);let i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})}function eu(e){return e.reduce((t,n)=>t+n.length,0)}function tu(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),a=0;for(let r=0;r<t;r++)n[r]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function EN(e,t){Cm||(Cm=new TextDecoder);let n=[],a=0,r=-1,i=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(a===0){if(eu(n)<1)break;let o=tu(n,1);i=(o[0]&128)===128,r=o[0]&127,r<126?a=3:r===126?a=1:a=2}else if(a===1){if(eu(n)<2)break;let o=tu(n,2);r=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),a=3}else if(a===2){if(eu(n)<8)break;let o=tu(n,8),c=new DataView(o.buffer,o.byteOffset,o.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(wl);break}r=u*Math.pow(2,32)+c.getUint32(4),a=3}else{if(eu(n)<r)break;let o=tu(n,r);l.enqueue(Rl(i?o:Cm.decode(o),t)),a=0}if(r===0||r>e){l.enqueue(wl);break}}}})}var bN,xN,SN,Cm,Rm,Ii=S(()=>{pN();yN();Wc();bN="",xN=(e,t)=>{let n=e.length,a=new Array(n),r=0;e.forEach((i,s)=>{Al(i,!1,l=>{a[s]=l,++r===n&&t(a.join(bN))})})},SN=(e,t)=>{let n=e.split(bN),a=[];for(let r=0;r<n.length;r++){let i=Rl(n[r],t);if(a.push(i),i.type==="error")break}return a};Rm=4});function Ge(e){if(e)return q2(e)}function q2(e){for(var t in Ge.prototype)e[t]=Ge.prototype[t];return e}var Mr=S(()=>{Ge.prototype.on=Ge.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ge.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ge.prototype.off=Ge.prototype.removeListener=Ge.prototype.removeAllListeners=Ge.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,r=0;r<n.length;r++)if(a=n[r],a===t||a.fn===t){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ge.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,r=n.length;a<r;++a)n[a].apply(this,t)}return this};Ge.prototype.emitReserved=Ge.prototype.emit;Ge.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ge.prototype.hasListeners=function(e){return!!this.listeners(e).length}});var Sa,Jt,kN,Ur=S(()=>{Sa=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Jt=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),kN="arraybuffer"});function nu(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}function Na(e,t){t.useNativeTimers?(e.setTimeoutFn=j2.bind(Jt),e.clearTimeoutFn=I2.bind(Jt)):(e.setTimeoutFn=Jt.setTimeout.bind(Jt),e.clearTimeoutFn=Jt.clearTimeout.bind(Jt))}function TN(e){return typeof e=="string"?G2(e):Math.ceil((e.byteLength||e.size)*Y2)}function G2(e){let t=0,n=0;for(let a=0,r=e.length;a<r;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function au(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var j2,I2,Y2,Pr=S(()=>{Ur();j2=Jt.setTimeout,I2=Jt.clearTimeout;Y2=1.33});function wN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function AN(e){let t={},n=e.split("&");for(let a=0,r=n.length;a<r;a++){let i=n[a].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var _m=S(()=>{});var ru,Ea,_l=S(()=>{Ii();Mr();Pr();_m();ru=class extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}},Ea=class extends Ge{constructor(t){super(),this.writable=!1,Na(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new ru(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let n=Rl(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let n=wN(t);return n.length?"?"+n:""}}});var Dl,Dm=S(()=>{_l();Pr();Ii();Dl=class extends Ea{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};SN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,xN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=au()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}});var CN,RN,_N=S(()=>{CN=!1;try{CN=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}RN=CN});function X2(){}function DN(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}function ON(e){let t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RN))return new XMLHttpRequest}catch(n){}if(!t)try{return new Jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}var Om,ar,Q2,rr,iu=S(()=>{Dm();Mr();Pr();Ur();_N();Om=class extends Dl{constructor(t){if(super(t),typeof location!="undefined"){let n=location.protocol==="https:",a=location.port;a||(a=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){let a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}},ar=class e extends Ge{constructor(t,n,a){super(),this.createRequest=t,Na(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;let n=nu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&a.setRequestHeader(r,this._opts.extraHeaders[r])}}catch(r){}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{a.setRequestHeader("Accept","*/*")}catch(r){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var r;a.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document!="undefined"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=X2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ar.requestsCount=0;ar.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",DN);else if(typeof addEventListener=="function"){let e="onpagehide"in Jt?"pagehide":"unload";addEventListener(e,DN,!1)}}Q2=(function(){let e=ON({xdomain:!1});return e&&e.responseType!==null})(),rr=class extends Om{constructor(t){super(t);let n=t&&t.forceBase64;this.supportsBinary=Q2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(ON,this.uri(),t)}}});var LN,zm,Lm,ir,su=S(()=>{_l();Pr();Ii();Ur();LN=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",zm=class extends Ea{get name(){return"websocket"}doOpen(){let t=this.uri(),n=this.opts.protocols,a=LN?{}:nu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;Al(a,this.supportsBinary,i=>{try{this.doWrite(a,i)}catch(s){}r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=au()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}},Lm=Jt.WebSocket||Jt.MozWebSocket,ir=class extends zm{createSocket(t,n,a){return LN?new Lm(t,n,a):n?new Lm(t,n):new Lm(t)}doWrite(t,n){this.ws.send(n)}}});var Yi,Mm=S(()=>{_l();Ur();Ii();Yi=class extends Ea{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let n=EN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),r=NN();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let i=()=>{a.read().then(({done:l,value:o})=>{l||(this.onPacket(o),i())}).catch(l=>{})};i();let s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;this._writer.write(a).then(()=>{r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}});var Um,Pm=S(()=>{iu();su();Mm();Um={websocket:ir,webtransport:Yi,polling:rr}});function Gi(e){if(e.length>8e3)throw"URI too long";let t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let r=F2.exec(e||""),i={},s=14;for(;s--;)i[Z2[s]]=r[s]||"";return n!=-1&&a!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=$2(i,i.path),i.queryKey=J2(i,i.query),i}function $2(e,t){let n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function J2(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,r,i){r&&(n[r]=i)}),n}var F2,Z2,Bm=S(()=>{F2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var Vm,lu,Br,ou,Xi,Hm=S(()=>{Pm();Pr();_m();Bm();Mr();Ii();Ur();Vm=typeof addEventListener=="function"&&typeof removeEventListener=="function",lu=[];Vm&&addEventListener("offline",()=>{lu.forEach(e=>e())},!1);Br=class e extends Ge{constructor(t,n){if(super(),this.binaryType=kN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){let a=Gi(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=Gi(n.host).host);Na(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{let r=a.prototype.name;this.transports.push(r),this._transportsByName[r]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=AN(this.opts.query)),Vm&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let n=Object.assign({},this.opts.query);n.EIO=Rm,n.transport=t,this.id&&(n.sid=this.id);let a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){let r=this.writeBuffer[a].data;if(r&&(n+=TN(r)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Sa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,r){if(typeof n=="function"&&(r=n,n=void 0),typeof a=="function"&&(r=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;let i={type:t,data:n,options:a};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vm&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=lu.indexOf(this._offlineEventListener);a!==-1&&lu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}};Br.protocol=Rm;ou=class extends Br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;Br.priorWebsocketSuccess=!1;let r=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!a)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Br.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){a||(a=!0,u(),n.close(),n=null)}let s=p=>{let f=new Error("probe error: "+p);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function l(){s("transport closed")}function o(){s("socket closed")}function c(p){n&&p.name!==n.name&&i()}let u=()=>{n.removeListener("open",r),n.removeListener("error",s),n.removeListener("close",l),this.off("close",o),this.off("upgrading",c)};n.once("open",r),n.once("error",s),n.once("close",l),this.once("close",o),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}},Xi=class extends ou{constructor(t,n={}){let a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(r=>Um[r]).filter(r=>!!r)),super(t,a)}}});var zN=S(()=>{Dm()});var YU,cu=S(()=>{Hm();Hm();_l();Pm();Pr();Bm();Ur();zN();iu();iu();su();su();Mm();YU=Xi.protocol});function MN(e,t="",n){let a=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),a=Gi(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";let i=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+i+":"+a.port+t,a.href=a.protocol+"://"+i+(n&&n.port===a.port?"":":"+a.port),a}var UN=S(()=>{cu()});function Ll(e){return W2&&(e instanceof ArrayBuffer||eR(e))||tR&&e instanceof Blob||nR&&e instanceof File}function Ol(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(Ol(e[n]))return!0;return!1}if(Ll(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ol(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ol(e[n]))return!0;return!1}var W2,eR,PN,tR,nR,qm=S(()=>{W2=typeof ArrayBuffer=="function",eR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PN=Object.prototype.toString,tR=typeof Blob=="function"||typeof Blob!="undefined"&&PN.call(Blob)==="[object BlobConstructor]",nR=typeof File=="function"||typeof File!="undefined"&&PN.call(File)==="[object FileConstructor]"});function BN(e){let t=[],n=e.data,a=e;return a.data=jm(n,t),a.attachments=t.length,{packet:a,buffers:t}}function jm(e,t){if(!e)return e;if(Ll(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=jm(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){let n={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=jm(e[a],t));return n}return e}function VN(e,t){return e.data=Im(e.data,t),delete e.attachments,e}function Im(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Im(e[n],t);else if(typeof e=="object")for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Im(e[n],t));return e}var HN=S(()=>{qm()});var Qm={};fu(Qm,{Decoder:()=>Gm,Encoder:()=>Ym,PacketType:()=>Ne,protocol:()=>jN});function qN(e){return Object.prototype.toString.call(e)==="[object Object]"}var aR,jN,Ne,Ym,Gm,Xm,uu=S(()=>{Mr();HN();qm();aR=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],jN=5;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));Ym=class{constructor(t){this.replacer=t}encode(t){return(t.type===Ne.EVENT||t.type===Ne.ACK)&&Ol(t)?this.encodeAsBinary({type:t.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ne.BINARY_EVENT||t.type===Ne.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){let n=BN(t),a=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(a),r}};Gm=class e extends Ge{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);let a=n.type===Ne.BINARY_EVENT;a||n.type===Ne.BINARY_ACK?(n.type=a?Ne.EVENT:Ne.ACK,this.reconstructor=new Xm(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ll(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0,a={type:Number(t.charAt(0))};if(Ne[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Ne.BINARY_EVENT||a.type===Ne.BINARY_ACK){let i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);let s=t.substring(i,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");a.attachments=Number(s)}if(t.charAt(n+1)==="/"){let i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(i,n)}else a.nsp="/";let r=t.charAt(n+1);if(r!==""&&Number(r)==r){let i=n+1;for(;++n;){let s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}a.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(a.type,i))a.data=i;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ne.CONNECT:return qN(n);case Ne.DISCONNECT:return n===void 0;case Ne.CONNECT_ERROR:return typeof n=="string"||qN(n);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&aR.indexOf(n[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Xm=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let n=VN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}});function En(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Fm=S(()=>{});var rR,Qi,Zm=S(()=>{uu();Fm();Mr();rR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qi=class extends Ge{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[En(t,"open",this.onopen.bind(this)),En(t,"packet",this.onpacket.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,r,i;if(rR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let s={type:Ne.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let u=this.ids++,p=n.pop();this._registerAckCallback(u,p),s.id=u}let l=(r=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||r===void 0?void 0:r.writable,o=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var a;let r=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(r===void 0){this.acks[t]=n;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},r),s=(...l)=>{this.io.clearTimeoutFn(i),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((a,r)=>{let i=(s,l)=>s?r(s):a(l);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());let a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...i)=>a!==this._queue[0]?void 0:(r!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...i)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){let a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();let a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){let n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let n=this,a=!1;return function(...r){a||(a=!0,n.packet({type:Ne.ACK,id:t,data:r}))}}onack(t){let n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let a of n)a.apply(this,t.data)}}}});function Vr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}var IN=S(()=>{Vr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Vr.prototype.reset=function(){this.attempts=0};Vr.prototype.setMin=function(e){this.ms=e};Vr.prototype.setMax=function(e){this.max=e};Vr.prototype.setJitter=function(e){this.jitter=e}});var Fi,YN=S(()=>{cu();Zm();uu();Fm();IN();Mr();Fi=class extends Ge{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Na(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Vr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;let r=n.parser||Qm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Xi(this.uri,this.opts);let n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;let r=En(n,"open",function(){a.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=En(n,"error",i);if(this._timeout!==!1){let l=this._timeout,o=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(En(t,"ping",this.onping.bind(this)),En(t,"data",this.ondata.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this)),En(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Sa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new Qi(this,t,n),this.nsps[t]=a),a}_destroy(t){let n=Object.keys(this.nsps);for(let a of n)if(this.nsps[a].active)return;this._close()}_packet(t){let n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}});function Ml(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let n=MN(e,t.path||"/socket.io"),a=n.source,r=n.id,i=n.path,s=zl[r]&&i in zl[r].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s,o;return l?o=new Fi(a,t):(zl[r]||(zl[r]=new Fi(a,t)),o=zl[r]),n.query&&!t.query&&(t.query=n.queryKey),o.socket(n.path,t)}var zl,GN=S(()=>{UN();YN();Zm();uu();cu();zl={};Object.assign(Ml,{Manager:Fi,Socket:Qi,io:Ml,connect:Ml})});var cn,be,$m,XN=S(()=>{"use strict";cn=Z($e());GN();$t();be=Z(oe()),$m=({apiKey:e,agentId:t,sandboxId:n})=>{let[a,r]=(0,cn.useState)([]),[i,s]=(0,cn.useState)(!1),[l,o]=(0,cn.useState)(new Set),[c,u]=(0,cn.useState)(!0),[p,f]=(0,cn.useState)(!1),d=(0,cn.useRef)(null),E=(0,cn.useRef)(null),v=(0,cn.useRef)(null),k=()=>{var g;(g=d.current)==null||g.scrollIntoView({behavior:"smooth"})},m=g=>{o(x=>{let w=new Set(x);return w.has(g)?w.delete(g):w.add(g),w})},h=()=>O(null,null,function*(){try{console.log("Clearing logs from all sandbox skills with API key:",e,"agentId:",t),f(!0);let g=yield re.getAllSkillOverrides();if(g.length===0){console.log("No skills found to clear logs from"),r([]),o(new Set);return}let x=g.map(T=>O(null,null,function*(){try{return yield re.clearSandboxLogs(e,t,T.sandboxId)}catch(A){return console.error(`Error clearing logs for skill ${T.skillId}:`,A),{success:!1,error:"Failed to clear logs"}}}));(yield Promise.all(x)).every(T=>T.success)?(r([]),o(new Set),console.log("All logs cleared successfully")):(console.error("Some log clearing operations failed"),alert("Some logs could not be cleared. Check console for details."))}catch(g){console.error("Failed to clear logs:",g),alert("Failed to clear logs")}finally{f(!1)}});return(0,cn.useEffect)(()=>{k()},[a]),(0,cn.useEffect)(()=>{e&&t&&O(null,null,function*(){try{console.log("Loading logs from all sandbox skills with API key:",e,"agentId:",t),u(!0);let x=yield re.loadAllSandboxLogs(e,t,100);if(console.log("All sandbox logs response:",x),x.success&&x.data){let w=x.data.logs.map(N=>({_id:N._id,id:N.id,timestamp:new Date(N.timestamp).toLocaleTimeString(),type:N.type,subType:N.subType,message:N.message,duration:N.duration,error:N.error,metadata:N.metadata,skillName:N.skillName,sandboxId:N.sandboxId}));console.log("Converted logs from all skills:",w),r(w)}else console.log("No logs or error:",x.error)}catch(x){console.error("Failed to load logs from all skills:",x)}finally{u(!1)}})},[e,t]),(0,cn.useEffect)(()=>{let g=()=>{try{let N=new WebSocket("ws://localhost:3000");E.current=N,N.onopen=()=>{console.log("Connected to CLI dev server"),s(!0)},N.onclose=()=>{console.log("Disconnected from CLI dev server")},N.onmessage=T=>{try{let A=JSON.parse(T.data);if(console.log("Received message from CLI:",A),A.type==="log"){let U={id:A.id||Date.now().toString(),timestamp:new Date(A.timestamp||Date.now()).toLocaleTimeString(),type:A.type||"log",subType:A.subType||"info",message:A.message||"No message",metadata:A.metadata||{},error:A.error};r(H=>[...H,U])}}catch(A){console.error("Failed to parse CLI WebSocket message:",A)}},N.onerror=T=>{console.error("CLI WebSocket error:",T)}}catch(N){console.error("Failed to connect to CLI dev server:",N)}},x=()=>{try{let N=Ml("wss://api.heylua.ai/feed",{query:{apiKey:e,channel:"logs"}});v.current=N,N.on("connect",()=>{console.log("Connected to server log feed"),s(!0),w("\u{1F7E2} Connected to log feed","connected")}),N.on("disconnect",()=>{console.log("Disconnected from server log feed"),s(!1),w("\u{1F534} Disconnected from log feed","disconnected")}),N.on("log",T=>{let A="info",U="No message",H={},_="";if(T&&typeof T=="object"){let L=T.data||T;A=L.subType||"info",U=L.message||"No message",H=L.metadata||{},_=L.error||L.details||"",_&&typeof _=="object"&&(_=JSON.stringify(_,null,2))}else typeof T=="string"&&(U=T,A="info");let R={id:Date.now().toString(),timestamp:new Date().toLocaleTimeString(),type:"log",subType:A,message:U,metadata:H,error:_};r(L=>[...L,R])}),N.on("connect_error",T=>{w("\u{1F534} Connection failed","disconnected")})}catch(N){w("\u{1F534} Connection error","disconnected")}},w=(N,T)=>{let A=document.getElementById("logConnectionStatus");A&&(A.textContent=N,A.className=`log-connection-status ${T}`)};return g(),e&&t&&n&&x(),()=>{E.current&&E.current.close(),v.current&&v.current.disconnect()}},[e,t,n]),(0,be.jsxs)("div",{className:"log-messages",children:[(0,be.jsxs)("div",{className:"logs-header",children:[(0,be.jsxs)("div",{className:"logs-title",children:["Console Logs (",a.length,")"]}),(0,be.jsx)("div",{className:"logs-actions",children:(0,be.jsx)("button",{className:"clear-logs-button",onClick:h,disabled:p,title:"Clear all logs",children:p?"\u27F3":"\u{1F5D1}\uFE0F"})})]}),(0,be.jsxs)("div",{className:"log-content",children:[c?(0,be.jsx)("div",{className:"no-logs",children:(0,be.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):a.length===0?(0,be.jsxs)("div",{className:"no-logs",children:[(0,be.jsx)("div",{className:"no-logs-icon",children:"\u{1F4CB}"}),(0,be.jsx)("div",{className:"no-logs-text",children:"No logs yet"}),(0,be.jsx)("div",{className:"no-logs-subtext",children:"Console logs will appear here when your skill runs"})]}):(0,be.jsx)(be.Fragment,{children:a.map(g=>{let x=l.has(g.id),w=g.metadata&&Object.keys(g.metadata).length>0,N=g.error&&typeof g.error=="string"&&g.error.trim()!=="",T=w||N;return(0,be.jsxs)("div",{className:`log-entry ${g.subType}`,children:[(0,be.jsxs)("div",{className:"log-main",onClick:()=>m(g.id),children:[(0,be.jsxs)("span",{className:"log-timestamp",children:["[",g.timestamp,"]"]}),(0,be.jsxs)("span",{className:"log-type",children:["[",g.subType.toUpperCase(),"]"]}),g.skillName&&(0,be.jsxs)("span",{className:"log-skill",children:["[",g.skillName,"]"]}),(0,be.jsx)("span",{className:`log-message ${x?"expanded":"ellipsed"}`,children:g.message}),(0,be.jsx)("span",{className:`expand-arrow ${x?"expanded":""}`,children:"\u25B6"})]}),x&&(0,be.jsxs)("div",{className:"log-details",children:[(0,be.jsxs)("div",{className:"full-message",children:[(0,be.jsx)("div",{className:"detail-label",children:"Message:"}),(0,be.jsx)("div",{className:"detail-content",children:g.message})]}),N&&(0,be.jsxs)("div",{className:"error-details",children:[(0,be.jsx)("div",{className:"detail-label",children:"Error:"}),(0,be.jsx)("div",{className:"detail-content",children:typeof g.error=="string"?g.error:JSON.stringify(g.error)})]}),w&&(0,be.jsxs)("div",{className:"metadata",children:[(0,be.jsx)("div",{className:"detail-label",children:"Metadata:"}),Object.entries(g.metadata).map(([A,U])=>(0,be.jsxs)("div",{className:"metadata-item",children:[(0,be.jsxs)("span",{className:"metadata-key",children:[A,":"]}),(0,be.jsx)("span",{className:"metadata-value",children:String(U)})]},A))]})]})]},g.id)})}),(0,be.jsx)("div",{ref:d})]}),(0,be.jsx)("div",{className:"log-footer-status",children:(0,be.jsx)("div",{id:"logConnectionStatus",className:"log-connection-status",children:"\u{1F7E1} Connecting..."})})]})}});var QN=S(()=>{});var FN,ZN,$N=S(()=>{"use strict";FN=Z($e());$t();QN();ZN=Z(oe())});var JN=S(()=>{"use strict";rN();sN();XN();bm();Em();Tm();$N();Sm();Kc()});var Tn,kn,KN,WN=S(()=>{"use strict";Tn=Z($e());JN();$t();kn=Z(oe()),KN=({apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,Tn.useState)("persona"),[p,f]=(0,Tn.useState)(""),[d,E]=(0,Tn.useState)(window.innerWidth/2),[v,k]=(0,Tn.useState)(250),m=(0,Tn.useRef)(!1),h=(0,Tn.useRef)(!1),g=(0,Tn.useRef)(null),x=(0,Tn.useRef)(null);(0,Tn.useEffect)(()=>{w()},[]),(0,Tn.useEffect)(()=>{let T=H=>{var R,L;let _=H.target;_===g.current||(R=g.current)!=null&&R.contains(_)?(m.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none",H.preventDefault()):(_===x.current||(L=x.current)!=null&&L.contains(_))&&(h.current=!0,document.body.style.cursor="row-resize",document.body.style.userSelect="none",H.preventDefault())},A=H=>{if(m.current){let _=window.innerWidth,R=_-H.clientX,L=500,G=_-300;R>=L&&R<=G&&E(R)}else if(h.current){let _=window.innerHeight-60,R=_-H.clientY+60,L=150,G=_-300;R>=L&&R<=G&&k(R)}},U=()=>{m.current?(m.current=!1,document.body.style.cursor="",document.body.style.userSelect=""):h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousedown",T),document.addEventListener("mousemove",A),document.addEventListener("mouseup",U),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",U)}},[]);let w=()=>O(null,null,function*(){try{let T=yield re.loadPersona();T.success&&f(T.persona||"")}catch(T){console.error("Failed to load persona:",T)}}),N=T=>O(null,null,function*(){try{let A=yield re.savePersona(T);return A.success?(f(T),!0):(alert("Failed to save persona: "+(A.error||"Unknown error")),!1)}catch(A){return console.error("Failed to save persona:",A),alert("Failed to save persona"),!1}});return(0,kn.jsxs)("div",{className:"sandbox-page",role:"region","aria-label":"Sandbox development environment",children:[(0,kn.jsxs)("div",{className:"left-side",style:{width:`calc(100% - ${d}px)`},children:[(0,kn.jsx)("div",{className:"chat-container",style:{height:`calc(100% - ${v}px)`},children:(0,kn.jsx)(vm,{apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:p,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})}),(0,kn.jsx)("div",{ref:x,className:"logs-resize-handle",role:"separator","aria-label":"Resize logs panel",tabIndex:0,onKeyDown:T=>{if(T.key==="ArrowUp"||T.key==="ArrowDown"){T.preventDefault();let A=T.key==="ArrowUp"?-10:10,U=Math.max(150,Math.min(window.innerHeight*.4,v+A));k(U)}},children:(0,kn.jsx)("div",{className:"resize-line"})}),(0,kn.jsx)("section",{className:"logs-container",style:{height:`${v}px`},"aria-label":"Console logs",children:(0,kn.jsx)($m,{apiKey:e,agentId:t,sandboxId:a})})]}),(0,kn.jsx)("div",{ref:g,className:"resize-handle",role:"separator","aria-label":"Resize right panel",tabIndex:0,onKeyDown:T=>{if(T.key==="ArrowLeft"||T.key==="ArrowRight"){T.preventDefault();let A=T.key==="ArrowLeft"?10:-10,U=500,H=window.innerWidth-300,_=Math.max(U,Math.min(H,d+A));E(_)}}}),(0,kn.jsx)("aside",{role:"complementary","aria-label":"Development tools panel",children:(0,kn.jsx)(wm,{activeTab:c,onTabChange:u,persona:p,onSavePersona:N,apiKey:e,agentId:t,skillId:n,sandboxId:a,width:d})})]})}});var eE,St,Jm,tE=S(()=>{"use strict";eE=Z($e());hm();St=Z(oe()),Jm=({messages:e,onSendMessage:t,onClearHistory:n,isLoading:a})=>{let[r,i]=(0,eE.useState)(""),s=e.length>0?e:[{id:"welcome",text:"Welcome to Production Management! I can help you monitor deployments, analyze performance, and manage your live environment. How can I assist you today?",sender:"assistant",timestamp:new Date}],l=()=>{!r.trim()||a||(t(r),i(""))},o=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),l())};return(0,St.jsxs)("section",{className:"production-chat",role:"region","aria-label":"Production chat interface",children:[(0,St.jsxs)("header",{className:"chat-header",children:[(0,St.jsx)("h2",{children:"Production Chat"}),(0,St.jsx)("button",{onClick:n,className:"clear-history-button",title:"Clear chat history","aria-label":"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,St.jsxs)("div",{className:"chat-messages",role:"log","aria-live":"polite","aria-label":"Production chat messages",tabIndex:0,children:[s.map(c=>(0,St.jsx)("div",{className:`message ${c.sender}`,role:"article","aria-label":`${c.sender==="user"?"User":"Assistant"} message`,children:(0,St.jsx)("div",{className:"message-bubble",children:(0,St.jsx)(Nl,{children:c.text})})},c.id)),a&&(0,St.jsxs)("div",{className:"loading",role:"status","aria-label":"Loading response",children:[(0,St.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"",className:"loading-logo"}),(0,St.jsx)("span",{className:"sr-only",children:"Loading response..."})]})]}),(0,St.jsx)("div",{className:"chat-input-container",children:(0,St.jsxs)("form",{className:"chat-input-form",onSubmit:c=>{c.preventDefault(),l()},children:[(0,St.jsx)("label",{htmlFor:"production-chat-input",className:"sr-only",children:"Type your production message"}),(0,St.jsx)("input",{type:"text",id:"production-chat-input",name:"productionChatMessage",value:r,onChange:c=>i(c.target.value),onKeyPress:o,placeholder:"Type your message...",className:"chat-input",disabled:a,autoComplete:"off","aria-describedby":"production-chat-help"}),(0,St.jsx)("div",{id:"production-chat-help",className:"sr-only",children:"Press Enter to send message"}),(0,St.jsx)("button",{type:"submit",onClick:l,disabled:a||!r.trim(),className:"send-button","aria-label":a?"Sending message...":"Send message",children:a?"Sending...":"Send"})]})})]})}});var iR,nE,aE=S(()=>{"use strict";iR=Z($e()),nE=Z(oe())});var sR,rE,Km=S(()=>{"use strict";sR=Z($e()),rE=Z(oe())});var oR,iE,sE=S(()=>{"use strict";oR=Z($e());Km();iE=Z(oe())});var un,se,Wm,lE=S(()=>{"use strict";un=Z($e());$t();se=Z(oe()),Wm=({apiKey:e,agentId:t})=>{let[n,a]=(0,un.useState)([]),[r,i]=(0,un.useState)(!0),[s,l]=(0,un.useState)(new Set),[o,c]=(0,un.useState)(1),[u,p]=(0,un.useState)(1),[f,d]=(0,un.useState)(0),[E,v]=(0,un.useState)(!1),[k,m]=(0,un.useState)(!1),h=(0,un.useRef)(null),g=()=>{var _;(_=h.current)==null||_.scrollIntoView({behavior:"smooth"})},x=_=>{l(R=>{let L=new Set(R);return L.has(_)?L.delete(_):L.add(_),L})},w=(_=1)=>O(null,null,function*(){i(!0);try{console.log("Loading production logs for page:",_);let R=yield re.loadProductionLogs(e,t,_,20);if(R.success&&R.logs){let L=[...R.logs].reverse();a(L),R.pagination&&(c(R.pagination.currentPage),p(R.pagination.totalPages),d(R.pagination.totalCount),v(R.pagination.hasNextPage),m(R.pagination.hasPrevPage))}else console.error("Failed to load production logs:",R.error),a([])}catch(R){console.error("Error loading production logs:",R),a([])}finally{i(!1)}}),N=()=>{w(o)},T=_=>{_>=1&&_<=u&&(c(_),w(_))},A=()=>{E&&T(o+1)},U=()=>{k&&T(o-1)};(0,un.useEffect)(()=>{e&&t&&w(1)},[e,t]),(0,un.useEffect)(()=>{g()},[n]);let H=_=>new Date(_).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return r&&n.length===0?(0,se.jsx)("div",{className:"logs-panel",children:(0,se.jsx)("div",{className:"logs-loading",children:(0,se.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,se.jsxs)("div",{className:"logs-panel",children:[(0,se.jsxs)("div",{className:"logs-header",children:[(0,se.jsxs)("div",{className:"logs-header-content",children:[(0,se.jsx)("h3",{children:"Production Logs"}),(0,se.jsx)("div",{className:"logs-info",children:f>0&&(0,se.jsxs)("span",{className:"logs-count",children:[f," total logs"]})})]}),(0,se.jsx)("div",{className:"logs-actions",children:(0,se.jsx)("button",{className:"refresh-logs-button",onClick:N,disabled:r,title:"Refresh logs",children:r?(0,se.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"})})]}),(0,se.jsx)("div",{className:"logs-content",children:n.length===0?(0,se.jsxs)("div",{className:"no-logs",children:[(0,se.jsx)("div",{className:"no-logs-icon",children:"\u{1F4DD}"}),(0,se.jsx)("div",{className:"no-logs-text",children:"No logs found"}),(0,se.jsx)("div",{className:"no-logs-subtext",children:"Production logs will appear here when your skills are used"})]}):(0,se.jsxs)("div",{className:"logs-list",children:[n.map(_=>{var G,P,W,ie;let R=s.has(_.id),L=_.metadata&&(_.metadata.toolId||_.metadata.skillName);return(0,se.jsxs)("div",{className:`log-entry ${_.subType} ${R?"expanded":""}`,children:[(0,se.jsxs)("div",{className:"log-main",onClick:()=>L&&x(_.id),style:{cursor:L?"pointer":"default"},children:[(0,se.jsx)("span",{className:"log-timestamp",children:H(_.timestamp)}),(0,se.jsx)("span",{className:`log-level ${_.subType}`,children:_.subType.toUpperCase()}),(0,se.jsx)("span",{className:"log-message",children:_.message}),((G=_.metadata)==null?void 0:G.skillName)&&(0,se.jsx)("span",{className:"log-skill",children:_.metadata.skillName}),L&&(0,se.jsx)("span",{className:`expand-arrow ${R?"expanded":""}`,children:"\u25B6"})]}),R&&L&&(0,se.jsxs)("div",{className:"log-details",children:[((P=_.metadata)==null?void 0:P.toolId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Tool:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.toolId})]}),((W=_.metadata)==null?void 0:W.skillName)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Skill:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.skillName})]}),((ie=_.metadata)==null?void 0:ie.userId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"User:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.userId})]})]})]},_.id)}),(0,se.jsx)("div",{ref:h})]})}),u>1&&(0,se.jsxs)("div",{className:"logs-pagination",children:[(0,se.jsxs)("div",{className:"pagination-info",children:["Page ",o," of ",u]}),(0,se.jsxs)("div",{className:"pagination-controls",children:[(0,se.jsx)("button",{className:"pagination-button",onClick:U,disabled:!k||r,title:"Previous page",children:"\u2190"}),(0,se.jsxs)("span",{className:"page-numbers",children:[o>2&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("button",{className:"page-number",onClick:()=>T(1),disabled:r,children:"1"}),o>3&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."})]}),o>1&&(0,se.jsx)("button",{className:"page-number",onClick:()=>T(o-1),disabled:r,children:o-1}),(0,se.jsx)("button",{className:"page-number active",disabled:!0,children:o}),o<u&&(0,se.jsx)("button",{className:"page-number",onClick:()=>T(o+1),disabled:r,children:o+1}),o<u-1&&(0,se.jsxs)(se.Fragment,{children:[o<u-2&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."}),(0,se.jsx)("button",{className:"page-number",onClick:()=>T(u),disabled:r,children:u})]})]}),(0,se.jsx)("button",{className:"pagination-button",onClick:A,disabled:!E||r,title:"Next page",children:"\u2192"})]})]})]})}});var Ve,q,eh,cR,th,uR,oE=S(()=>{"use strict";Ve=Z($e());$t();Kc();q=Z(oe()),eh=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},cR=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"baskets",name:"Baskets",description:"Shopping carts and baskets",icon:"\u{1F6D2}"},{id:"orders",name:"Orders",description:"Order history and transactions",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Reservations and appointments",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Custom application data",icon:"\u2699\uFE0F"}],th=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ve.useState)(null),[r,i]=(0,Ve.useState)(null),[s,l]=(0,Ve.useState)(null),[o,c]=(0,Ve.useState)(!1),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),[E,v]=(0,Ve.useState)(""),[k,m]=(0,Ve.useState)(null),[h,g]=(0,Ve.useState)(null),[x,w]=(0,Ve.useState)(!1),[N,T]=(0,Ve.useState)("list"),A=(0,Ve.useRef)(null),U=(0,Ve.useRef)(null),[H,_]=(0,Ve.useState)(!1),[R,L]=(0,Ve.useState)(""),[G,P]=(0,Ve.useState)(""),[W,ie]=(0,Ve.useState)(!1);(0,Ve.useEffect)(()=>{Ae()},[e,t]),(0,Ve.useEffect)(()=>{if(console.log("JSON text changed:",E),U.current&&A.current){let Q=eh(E);U.current.innerHTML=Q,U.current.scrollTop=A.current.scrollTop,U.current.scrollLeft=A.current.scrollLeft}},[E]),(0,Ve.useEffect)(()=>{if(k||h){let Q=setTimeout(()=>{m(null),g(null)},5e3);return()=>clearTimeout(Q)}},[k,h]);let Ae=()=>O(null,null,function*(){c(!0);try{let Q=yield re.loadUserData(e,t);console.log("User data response:",Q),Q.success&&Q.data?(console.log("User data loaded successfully:",Q.data),a(Q.data),v(JSON.stringify(Q.data,null,2))):(console.error("Failed to load user data:",Q.error),a(null),v("{}"))}catch(Q){console.error("Error loading user data:",Q),a(null),v("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){if(E.trim()){p(!0);try{let Q;try{Q=JSON.parse(E)}catch(V){m("Invalid JSON format. Please check your syntax.");return}let F=yield re.updateUserData(e,t,Q);F.success?(a(F.data||null),w(!1),g("User data saved successfully"),console.log("User data saved successfully")):m("Failed to save user data: "+(F.error||"Unknown error"))}catch(Q){console.error("Error saving user data:",Q),m("Failed to save user data")}finally{p(!1)}}}),y=()=>O(null,null,function*(){d(!0);try{let Q=yield re.clearUserData(e,t);Q.success?(a(null),v("{}"),w(!1),g("User data cleared successfully"),console.log("User data cleared successfully")):m("Failed to clear user data: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error clearing user data:",Q),m("Failed to clear user data")}finally{d(!1)}}),De=Q=>O(null,null,function*(){if(i(Q),T("detail"),w(!1),m(null),Q.id==="user"){c(!0);try{let F=yield re.loadUserData(e,t);if(F.success&&F.data){l(F.data);let V=JSON.stringify(F.data,null,2);v(V),console.log("Setting JSON text for user data:",V)}else l(null),v("{}"),console.log("No user data found, setting empty JSON")}catch(F){console.error("Failed to load user data:",F),l(null),v("{}")}finally{c(!1)}}else if(Q.id==="resources"){c(!0);try{let F=yield re.loadResources(e,t);F.success&&F.data?(l(F.data),console.log("Loaded resources:",F.data)):(l([]),console.log("No resources found"))}catch(F){console.error("Failed to load resources:",F),l([])}finally{c(!1)}}else l(null),v("{}")}),ot=()=>{T("list"),i(null),l(null),w(!1)},b=()=>{(r==null?void 0:r.id)==="resources"?(_(!0),L(""),P("")):(v("{}"),w(!0))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){m("Please provide both name and content for the resource");return}ie(!0);try{let Q=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});Q.success?(_(!1),L(""),P(""),g("Resource created successfully"),(r==null?void 0:r.id)==="resources"&&(yield De(r))):m("Failed to create resource: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error creating resource:",Q),m("Failed to create resource")}finally{ie(!1)}}),vt=Q=>{v(Q),A.current&&U.current&&(U.current.scrollTop=A.current.scrollTop,U.current.scrollLeft=A.current.scrollLeft)},ce=()=>{w(!0),setTimeout(()=>{A.current&&A.current.focus()},0)};return o&&N==="list"?(0,q.jsx)("div",{className:"user-data-panel",children:(0,q.jsx)("div",{className:"user-data-loading",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,q.jsxs)("div",{className:"user-data-panel",children:[(0,q.jsxs)("div",{className:"user-data-header",children:[N==="detail"&&r?(0,q.jsxs)("div",{className:"header-with-back",children:[(0,q.jsx)("button",{className:"back-button",onClick:ot,title:"Back to Data",children:"\u2190"}),(0,q.jsxs)("h3",{children:[r.name," Data"]})]}):(0,q.jsx)("h3",{children:"Data Management"}),(0,q.jsxs)("div",{className:"user-data-actions",children:[N==="detail"&&(r==null?void 0:r.id)!=="user"&&(0,q.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,q.jsx)("button",{className:"refresh-button",onClick:N==="detail"&&r?()=>De(r):Ae,disabled:o,title:`Refresh ${N==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),N==="detail"&&(r==null?void 0:r.id)==="user"&&(0,q.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),N==="detail"&&(0,q.jsx)("button",{className:"delete-button",onClick:y,disabled:u,title:`Clear ${r==null?void 0:r.name.toLowerCase()} data`,children:"\u{1F5D1}\uFE0F"})]})]}),(0,q.jsx)("div",{className:"user-data-content",children:N==="list"?(0,q.jsx)("div",{className:"data-list",children:(0,q.jsx)("div",{className:"data-categories",children:cR.map(Q=>(0,q.jsxs)("div",{className:"data-category",onClick:()=>De(Q),children:[(0,q.jsx)("div",{className:"category-icon",children:Q.icon}),(0,q.jsxs)("div",{className:"category-info",children:[(0,q.jsx)("div",{className:"category-name",children:Q.name}),(0,q.jsx)("div",{className:"category-description",children:Q.description})]}),(0,q.jsx)("div",{className:"category-arrow",children:"\u2192"})]},Q.id))})}):(r==null?void 0:r.id)==="user"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"json-editor",children:x?(0,q.jsxs)("div",{className:"json-editor-container",children:[(0,q.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:eh(E)}}),(0,q.jsx)("textarea",{ref:A,id:"user-data-json",name:"userDataJson",value:E,onChange:Q=>vt(Q.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,q.jsx)("div",{className:"json-display",onClick:ce,dangerouslySetInnerHTML:{__html:eh(E)}})})}):(r==null?void 0:r.id)==="resources"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"resources-container",children:s&&s.length>0?(0,q.jsx)("div",{className:"resources-list",children:s.map(Q=>(0,q.jsx)(uR,{resource:Q,apiKey:e,agentId:t,onUpdate:()=>De(r)},Q.id))}):(0,q.jsxs)("div",{className:"no-resources",children:[(0,q.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,q.jsx)("h4",{children:"No resources yet"}),(0,q.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})}):(r==null?void 0:r.id)==="products"?(0,q.jsx)(El,{apiKey:e,agentId:t,isProduction:!0}):(0,q.jsx)("div",{className:"data-detail",children:(0,q.jsxs)("div",{className:"coming-soon",children:[(0,q.jsx)("div",{className:"coming-soon-icon",children:r==null?void 0:r.icon}),(0,q.jsxs)("div",{className:"coming-soon-text",children:[r==null?void 0:r.name," management"]}),(0,q.jsx)("div",{className:"coming-soon-subtext",children:"This feature is coming soon"})]})})}),k&&(0,q.jsx)("div",{className:"error-message",children:k}),h&&(0,q.jsx)("div",{className:"success-message",children:h}),H&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Create New Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:()=>_(!1),disabled:W,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:Q=>L(Q.target.value),placeholder:"Enter resource name...",disabled:W})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"resource-content",value:G,onChange:Q=>P(Q.target.value),placeholder:"Enter resource content...",rows:10,disabled:W})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:()=>_(!1),disabled:W,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},uR=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ve.useState)(!1),[s,l]=(0,Ve.useState)(e.name),[o,c]=(0,Ve.useState)(e.content),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),E=()=>{l(e.name),c(e.content),i(!0)},v=()=>O(null,null,function*(){if(!(!s.trim()||!o.trim())){p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}}),k=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"?`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}}),m=()=>{i(!1),l(e.name),c(e.content)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{className:"resource-item",children:(0,q.jsxs)("div",{className:"resource-display",children:[(0,q.jsxs)("div",{className:"resource-header",children:[(0,q.jsx)("h4",{className:"resource-name",children:e.name}),(0,q.jsx)("div",{className:"resource-meta",children:(0,q.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,q.jsx)("div",{className:"resource-content",children:(0,q.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,q.jsxs)("div",{className:"resource-actions",children:[(0,q.jsx)("button",{className:"edit-btn",onClick:E,disabled:f,title:"Edit resource",children:"\u270F\uFE0F"}),(0,q.jsx)("button",{className:"delete-btn",onClick:k,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Edit Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:m,disabled:u,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Enter resource name...",disabled:u})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Enter resource content...",rows:10,disabled:u})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:m,disabled:u,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:v,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Kt,nh,cE=S(()=>{"use strict";Kt=Z(oe()),nh=({personaVersions:e,onSelectVersion:t,onDeployVersion:n,deployingVersionId:a})=>(0,Kt.jsxs)("div",{className:"persona-panel",children:[(0,Kt.jsx)("div",{className:"panel-header",children:(0,Kt.jsx)("h3",{children:"Persona Management"})}),(0,Kt.jsx)("div",{className:"panel-content",children:(0,Kt.jsxs)("div",{className:"versions-list",children:[e.map(r=>(0,Kt.jsxs)("div",{className:`version-item ${r.isDeployed?"deployed":""} clickable`,onClick:()=>t(r),children:[(0,Kt.jsxs)("div",{className:"version-info",children:[(0,Kt.jsx)("div",{className:"version-number",children:r.version}),(0,Kt.jsx)("div",{className:"version-date",children:r.deployedAt||"No date"}),r.isDeployed&&(0,Kt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!r.isDeployed&&r.status==="available"&&(0,Kt.jsx)("button",{className:`deploy-button ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id)},disabled:a===r.id,children:a===r.id?(0,Kt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},r.id)),e.length===0&&(0,Kt.jsx)("div",{className:"no-versions",children:"No persona versions found"})]})})]})});var lt,ah,uE=S(()=>{"use strict";lt=Z(oe()),ah=({skills:e,onSelectSkill:t,onActivateSkill:n,activatingSkillId:a})=>(0,lt.jsxs)("div",{className:"skills-panel",children:[(0,lt.jsx)("div",{className:"panel-header",children:(0,lt.jsx)("h3",{children:"Skills Management"})}),(0,lt.jsx)("div",{className:"panel-content",children:(0,lt.jsx)("div",{className:"skills-list",children:e.map(r=>(0,lt.jsxs)("div",{className:`skill-item ${r.active?"active":"inactive"}`,children:[(0,lt.jsxs)("div",{className:"skill-main-content",onClick:()=>t(r.name),children:[(0,lt.jsxs)("div",{className:"skill-info",children:[(0,lt.jsxs)("div",{className:"skill-header",children:[(0,lt.jsx)("div",{className:"skill-name",children:r.name}),(0,lt.jsx)("div",{className:`skill-status ${r.active?"active":"inactive"}`,children:r.active?"Active":"Inactive"})]}),(0,lt.jsx)("div",{className:"skill-description",children:r.description}),(0,lt.jsxs)("div",{className:"skill-stats",children:[(0,lt.jsxs)("span",{className:"skill-stat",children:[r.versionsCount," versions"]}),(0,lt.jsxs)("span",{className:"skill-stat",children:["Latest: ",r.latestVersion]}),r.deployedVersion&&(0,lt.jsxs)("span",{className:"skill-stat deployed",children:["Deployed: ",r.deployedVersion]})]})]}),(0,lt.jsx)("div",{className:"skill-arrow",children:"\u2192"})]}),(0,lt.jsx)("div",{className:"skill-actions",children:(0,lt.jsx)("button",{className:`activate-button ${r.active?"deactivate":"activate"} ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id,r.active)},disabled:a===r.id,children:a===r.id?(0,lt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):r.active?"Deactivate":"Activate"})})]},r.id))})})]})});var Wt,rh,dE=S(()=>{"use strict";Wt=Z(oe()),rh=({selectedPersonaVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Wt.jsxs)("div",{className:"persona-detail",children:[(0,Wt.jsxs)("div",{className:"persona-detail-header",children:[(0,Wt.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Wt.jsxs)("h4",{children:["Persona ",e.version]})]}),(0,Wt.jsxs)("div",{className:"persona-section",children:[(0,Wt.jsxs)("div",{className:"persona-header",children:[(0,Wt.jsx)("h3",{children:"Agent Persona"}),(0,Wt.jsx)("div",{className:"persona-actions",children:e.isDeployed?(0,Wt.jsx)("span",{className:"deployed-badge",children:"Deployed"}):e.status==="available"?(0,Wt.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Wt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"}):null})]}),(0,Wt.jsx)("div",{className:"persona-content",children:(0,Wt.jsx)("div",{className:"persona-display",children:e.personaContent})})]})]})});var we,ih,fE=S(()=>{"use strict";we=Z(oe()),ih=({selectedSkillVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,we.jsxs)("div",{className:"skill-detail",children:[(0,we.jsx)("div",{className:"skill-detail-header",children:(0,we.jsxs)("div",{className:"header-left",children:[(0,we.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,we.jsxs)("h4",{children:[e.skillName," ",e.version]})]})}),(0,we.jsx)("div",{className:"skill-details",children:(0,we.jsxs)("div",{className:"skill-info-section",children:[(0,we.jsxs)("div",{className:"skill-meta",children:[(0,we.jsxs)("span",{className:"skill-version",children:["v",e.version]}),e.isDeployed&&(0,we.jsx)("span",{className:"deployed-badge",children:"Deployed"})]}),e.skillDescription&&(0,we.jsxs)("div",{className:"skill-description-section",children:[(0,we.jsx)("h5",{children:"Description"}),(0,we.jsx)("p",{children:e.skillDescription})]}),e.skillContext&&(0,we.jsxs)("div",{className:"skill-context-section",children:[(0,we.jsx)("h5",{children:"Context"}),(0,we.jsx)("p",{children:e.skillContext})]}),!e.isDeployed&&e.status==="available"&&(0,we.jsx)("div",{className:"skill-actions",children:(0,we.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,we.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy This Version"})})]})}),(0,we.jsxs)("div",{className:"tools-section",children:[(0,we.jsx)("div",{className:"tools-header",children:(0,we.jsx)("h5",{children:"Available Tools"})}),(0,we.jsx)("div",{className:"tools-list",children:e.tools&&e.tools.length>0?e.tools.map((r,i)=>(0,we.jsxs)("div",{className:"tool-item",children:[(0,we.jsx)("div",{className:"tool-name",children:r.name}),(0,we.jsx)("div",{className:"tool-description",children:r.description})]},i)):(0,we.jsxs)("div",{className:"no-tools",children:[(0,we.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,we.jsx)("div",{className:"no-tools-text",children:"No tools available"}),(0,we.jsx)("div",{className:"no-tools-subtext",children:"This version doesn't have any tools configured"})]})})]})]})});var en,sh,pE=S(()=>{"use strict";en=Z(oe()),sh=({selectedSkill:e,versions:t,onBack:n,onSelectVersion:a,onDeployVersion:r,formatDate:i,deployingVersionId:s})=>(0,en.jsxs)("div",{className:"skill-versions",children:[(0,en.jsx)("div",{className:"skill-versions-header",children:(0,en.jsxs)("div",{className:"header-left",children:[(0,en.jsx)("button",{className:"back-button",onClick:n,children:"\u2190"}),(0,en.jsx)("h4",{children:e})]})}),(0,en.jsx)("div",{className:"versions-list",children:t.filter(l=>l.type==="skill"&&l.skillName===e).map(l=>(0,en.jsxs)("div",{className:`version-item ${l.isDeployed?"deployed":""} clickable`,onClick:()=>a(l),children:[(0,en.jsxs)("div",{className:"version-info",children:[(0,en.jsx)("div",{className:"version-number",children:l.version}),(0,en.jsx)("div",{className:"version-date",children:i(l.deployedAt)}),l.isDeployed&&(0,en.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!l.isDeployed&&l.status==="available"&&(0,en.jsx)("button",{className:`deploy-button ${s===l.id?"loading":""}`,onClick:o=>{o.stopPropagation(),r(l.id)},disabled:s===l.id,children:s===l.id?(0,en.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},l.id))})]})});var Yt,ae,lh,dR,mE=S(()=>{"use strict";Yt=Z($e());$t();ae=Z(oe()),lh=({apiKey:e,agentId:t})=>{let[n,a]=(0,Yt.useState)([]),[r,i]=(0,Yt.useState)(!0),[s,l]=(0,Yt.useState)(!1),[o,c]=(0,Yt.useState)(null),[u,p]=(0,Yt.useState)(null),[f,d]=(0,Yt.useState)(null),[E,v]=(0,Yt.useState)(""),[k,m]=(0,Yt.useState)(""),[h,g]=(0,Yt.useState)(!1);(0,Yt.useEffect)(()=>{x()},[e,t]),(0,Yt.useEffect)(()=>{if(o||u){let _=setTimeout(()=>{c(null),p(null)},5e3);return()=>clearTimeout(_)}},[o,u]);let x=()=>O(null,null,function*(){i(!0);try{let _=yield re.loadProductionEnv(e,t);if(_.success&&_.data){let R=Object.entries(_.data.data||{}).map(([L,G],P)=>({id:`${P}-${L}`,key:L,value:G}));a(R)}else console.error("Failed to load production env:",_.error),a([])}catch(_){console.error("Error loading production env:",_),a([])}finally{i(!1)}}),w=_=>O(null,null,function*(){l(!0),c(null),p(null);try{let R={};_.forEach(G=>{G.key.trim()&&(R[G.key.trim()]=G.value)});let L=yield re.updateProductionEnv(e,t,R);L.success?(p("Environment variables saved successfully!"),yield x()):c(L.error||"Failed to save environment variables")}catch(R){console.error("Error saving production env:",R),c("Failed to save environment variables")}finally{l(!1)}}),N=()=>O(null,null,function*(){if(!E.trim()){c("Variable name is required");return}let _={id:Date.now().toString(),key:E.trim(),value:k},R=[...n,_];a(R),yield w(R),v(""),m(""),g(!1)}),T=(_,R,L)=>O(null,null,function*(){let G=n.map(P=>P.id===_?at(ee({},P),{key:R.trim(),value:L}):P);a(G),d(null),yield w(G)}),A=_=>O(null,null,function*(){let R=n.filter(L=>L.id!==_);a(R),yield w(R)}),U=_=>{d(_)},H=()=>{d(null)};return r?(0,ae.jsx)("div",{className:"env-panel",children:(0,ae.jsx)("div",{className:"env-loading",children:(0,ae.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ae.jsxs)("div",{className:"env-panel",children:[(0,ae.jsxs)("div",{className:"env-header",children:[(0,ae.jsx)("h3",{children:"Environment Variables"}),(0,ae.jsxs)("div",{className:"env-actions",children:[(0,ae.jsx)("button",{className:"refresh-btn",onClick:x,disabled:r,title:"Refresh environment variables",children:r?(0,ae.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"}),(0,ae.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ae.jsxs)("div",{className:"env-content",children:[o&&(0,ae.jsxs)("div",{className:"error-message",children:[(0,ae.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ae.jsxs)("div",{className:"success-message",children:[(0,ae.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ae.jsxs)("div",{className:"env-add-form",children:[(0,ae.jsxs)("div",{className:"env-form-header",children:[(0,ae.jsx)("h4",{children:"Add New Variable"}),(0,ae.jsx)("button",{className:"form-cancel-btn",onClick:()=>{g(!1),v(""),m("")},title:"Cancel",children:"\u2715"})]}),(0,ae.jsxs)("div",{className:"env-form-fields",children:[(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Variable Name"}),(0,ae.jsx)("input",{type:"text",value:E,onChange:_=>v(_.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Value"}),(0,ae.jsx)("input",{type:"text",value:k,onChange:_=>m(_.target.value),placeholder:"your_api_key_here",className:"env-input",autoComplete:"off"})]}),(0,ae.jsx)("div",{className:"env-form-actions",children:(0,ae.jsx)("button",{className:"add-variable-btn",onClick:N,disabled:!E.trim()||s,children:s?"Adding...":"Add Variable"})})]})]}),(0,ae.jsx)("div",{className:"env-variables",children:n.length>0?(0,ae.jsx)("div",{className:"env-list",children:n.map(_=>(0,ae.jsx)(dR,{variable:_,isEditing:f===_.id,onEdit:()=>U(_.id),onSave:(R,L)=>T(_.id,R,L),onCancel:H,onDelete:()=>A(_.id),isSaving:s},_.id))}):(0,ae.jsxs)("div",{className:"env-empty-state",children:[(0,ae.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ae.jsx)("h4",{children:"No environment variables"}),(0,ae.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ae.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ae.jsxs)("div",{className:"env-help",children:[(0,ae.jsx)("p",{children:"Environment variables are used by your production skills and are securely stored."}),(0,ae.jsxs)("p",{children:[(0,ae.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},dR=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i,isSaving:s})=>{let[l,o]=(0,Yt.useState)(e.key),[c,u]=(0,Yt.useState)(e.value),p=()=>{l.trim()&&a(l,c)},f=()=>{o(e.key),u(e.value),r()},d=h=>{h.key==="Enter"&&!h.shiftKey?(h.preventDefault(),p()):h.key==="Escape"&&f()},[E,v]=(0,Yt.useState)(!1),k=e.value.length>60,m=E||!k?e.value:e.value.substring(0,60)+"...";return(0,ae.jsx)("div",{className:"env-variable-item",children:t?(0,ae.jsxs)("div",{className:"env-variable-edit",children:[(0,ae.jsxs)("div",{className:"env-edit-fields",children:[(0,ae.jsx)("input",{type:"text",value:l,onChange:h=>o(h.target.value),onKeyPress:d,className:"env-key-input",placeholder:"Variable name",disabled:s,autoComplete:"off"}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsx)("textarea",{value:c,onChange:h=>u(h.target.value),className:"env-value-input",placeholder:"Value",rows:1,disabled:s,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-edit-actions",children:[(0,ae.jsx)("button",{className:"save-edit-btn",onClick:p,disabled:!l.trim()||s,title:"Save changes",children:"\u2713"}),(0,ae.jsx)("button",{className:"cancel-edit-btn",onClick:f,disabled:s,title:"Cancel editing",children:"\u2715"})]})]}):(0,ae.jsxs)("div",{className:"env-variable-display",children:[(0,ae.jsxs)("div",{className:"env-variable-content",children:[(0,ae.jsx)("span",{className:"env-key",children:e.key}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsxs)("div",{className:"env-value-container",children:[(0,ae.jsx)("span",{className:"env-value",onClick:()=>k&&v(!E),style:{cursor:k?"pointer":"default"},title:k?"Click to expand/collapse":e.value,children:m||"<empty>"}),k&&(0,ae.jsx)("button",{className:"expand-btn",onClick:()=>v(!E),title:E?"Collapse":"Expand",children:E?"\u25B2":"\u25BC"})]})]}),(0,ae.jsxs)("div",{className:"env-variable-actions",children:[(0,ae.jsx)("button",{className:"edit-variable-btn",onClick:n,disabled:s,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ae.jsx)("button",{className:"delete-variable-btn",onClick:i,disabled:s,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var hE=S(()=>{"use strict";tE();aE();sE();lE();oE();Km();cE();uE();dE();fE();pE();mE()});var Pt,ke,gE,vE=S(()=>{"use strict";Pt=Z($e());hE();$t();ke=Z(oe()),gE=({apiKey:e,agentId:t,skillId:n,isActive:a=!1,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,Pt.useState)("persona"),[p,f]=(0,Pt.useState)([]),[d,E]=(0,Pt.useState)([]),[v,k]=(0,Pt.useState)([]),[m,h]=(0,Pt.useState)(null),[g,x]=(0,Pt.useState)(null),[w,N]=(0,Pt.useState)(500),[T,A]=(0,Pt.useState)(!1),[U,H]=(0,Pt.useState)(null),[_,R]=(0,Pt.useState)(null),[L,G]=(0,Pt.useState)(null),P=ce=>O(null,null,function*(){if(!ce.trim())return;let Q={id:Date.now().toString(),text:ce,sender:"user",timestamp:new Date};i(Q),o(!0);try{let F=yield re.sendProductionChatMessage(ce,t,e),V={id:(Date.now()+1).toString(),text:F.success?F.text||"No response received":`\u274C ${F.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};i(V)}catch(F){let V={id:(Date.now()+1).toString(),text:`\u274C Error: ${F instanceof Error?F.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};i(V)}finally{o(!1)}}),W=(ce,Q)=>O(null,null,function*(){x(ce);try{let F=!Q;console.log(`${F?"Activating":"Deactivating"} skill:`,ce);let V=yield re.activateSkill(e,t,ce,F);V.success?(k(B=>B.map(J=>J.id===ce?at(ee({},J),{active:F}):J)),yield ot(),console.log(`\u2705 Skill ${F?"activated":"deactivated"} successfully`)):(console.error(`\u274C Failed to ${F?"activate":"deactivate"} skill:`,V.error),alert(`Failed to ${F?"activate":"deactivate"} skill: ${V.error}`))}catch(F){console.error("Error activating skill:",F),alert("Failed to change skill activation status")}finally{x(null)}}),ie=ce=>O(null,null,function*(){h(ce);try{let Q=d.find(V=>V.id===ce);if(Q){console.log("Deploying persona version:",Q),yield vt(Q);return}let F=p.find(V=>V.id===ce);if(F){console.log("Publishing skill version:",F.version,"for skill:",F.skillName);let V=v.find(he=>he.name===F.skillName);if(!V)throw new Error("Could not find skill for deployment");let B=F.version.replace("v",""),J=yield re.publishSkillVersion(e,t,V.id,B);if(J.success&&J.data)f(he=>he.map(Xe=>Xe.id===ce?at(ee({},Xe),{isDeployed:!0}):Xe.type===F.type&&Xe.skillName===F.skillName?at(ee({},Xe),{isDeployed:!1}):Xe)),k(he=>he.map(Xe=>Xe.name===F.skillName?at(ee({},Xe),{deployedVersion:F.version}):Xe)),yield ot(),console.log(`\u2705 ${J.data.message}`),alert(`\u2705 ${J.data.message}`);else throw new Error(J.error||"Failed to publish skill version")}}finally{h(null)}}),Ae=ce=>{A(!0),ce.preventDefault()},Ue=ce=>{if(!T)return;let Q=document.querySelector(".production-layout-new");if(!Q)return;let F=Q.getBoundingClientRect(),V=F.right-ce.clientX,B=500,J=F.width*.6;V>=B&&V<=J&&N(V)},y=()=>{A(!1)};Pt.default.useEffect(()=>(T?(document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",y),document.body.style.cursor="col-resize",document.body.style.userSelect="none"):(document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",y),document.body.style.cursor="",document.body.style.userSelect=""),()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",y),document.body.style.cursor="",document.body.style.userSelect=""}),[T]);let De=ce=>new Date(ce).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});(0,Pt.useEffect)(()=>{b()},[e,t]),(0,Pt.useEffect)(()=>{a&&b()},[a]);let ot=()=>O(null,null,function*(){try{console.log("Loading skills data with apiKey:",e,"agentId:",t);let ce=yield re.getSkills(e,t);if(ce.success&&ce.skills){let Q=ce.skills.map(V=>{let B=V.versions.length>0?V.versions.reduce((he,Xe)=>he.version>Xe.version?he:Xe):null,J=V.versions.find(he=>he.active);return{id:V.id,name:V.name,description:V.description,versionsCount:V.versions.length,latestVersion:B?`v${B.version}`:"No versions",deployedVersion:J?`v${J.version}`:void 0,active:V.active}});k(Q);let F=[];ce.skills.forEach(V=>{V.versions.forEach(B=>{F.push({id:B.id,version:`v${B.version}`,type:"skill",skillName:V.name,skillDescription:B.description,skillContext:B.context,deployedAt:V.updatedAt,isDeployed:B.active,status:B.active?"deployed":"available",tools:B.tools})})}),f(F)}else console.error("Failed to load skills:",ce.error),k([]),f([])}catch(ce){console.error("Error loading skills data:",ce),k([]),f([])}}),b=()=>O(null,null,function*(){try{console.log("Loading persona versions with apiKey:",e,"agentId:",t),yield Fe(),yield ot()}catch(ce){console.error("Error loading production data:",ce)}}),Fe=()=>O(null,null,function*(){try{let ce=yield re.getProductionPersonaVersions(t,e);if(ce.success&&ce.versions){let F=ce.versions.map(V=>({id:`persona_${V.version}`,version:`v${V.version}`,type:"persona",deployedAt:new Date(V.createdDate).toISOString(),isDeployed:V.isCurrent,status:V.isCurrent?"deployed":"available",personaContent:V.persona})).sort((V,B)=>new Date(B.deployedAt).getTime()-new Date(V.deployedAt).getTime());E(F)}else console.error("Failed to load persona versions:",ce.error)}catch(ce){console.error("Error loading persona versions:",ce)}}),vt=ce=>O(null,null,function*(){try{let Q=parseInt(ce.version.replace("v",""));console.log(`Deploying persona version ${Q} to production...`);let F=yield re.deployPersonaVersion(t,e,Q);console.log("Deploy persona response:",F),F.success?(yield Fe(),alert(`\u2705 Persona version ${ce.version} deployed successfully!`)):alert(`\u274C Failed to deploy persona version: ${F.error||"Unknown error"}`)}catch(Q){console.error("Error deploying persona version:",Q),alert("\u274C Failed to deploy persona version")}});return(0,ke.jsx)("div",{className:"production-page",children:(0,ke.jsxs)("div",{className:"production-layout-new",children:[(0,ke.jsx)("div",{className:"production-left",style:{width:`calc(100% - ${w}px)`},children:(0,ke.jsx)(Jm,{messages:r,onSendMessage:P,onClearHistory:s,isLoading:l})}),(0,ke.jsx)("div",{className:"production-resize-handle",onMouseDown:Ae}),(0,ke.jsxs)("aside",{className:"production-right",role:"complementary","aria-label":"Production management panel",children:[(0,ke.jsxs)("nav",{className:"right-panel-tabs",role:"tablist","aria-label":"Production management tabs",children:[(0,ke.jsx)("button",{className:`tab-button ${c==="persona"?"active":""}`,onClick:()=>{u("persona"),R(null),H(null),G(null)},role:"tab","aria-selected":c==="persona","aria-controls":"persona-tabpanel",id:"persona-tab",tabIndex:c==="persona"?0:-1,children:"Persona"}),(0,ke.jsx)("button",{className:`tab-button ${c==="skills"?"active":""}`,onClick:()=>{u("skills"),R(null),H(null),G(null),G(null)},role:"tab","aria-selected":c==="skills","aria-controls":"skills-tabpanel",id:"skills-tab",tabIndex:c==="skills"?0:-1,children:"Skills"}),(0,ke.jsx)("button",{className:`tab-button ${c==="stats"?"active":""}`,onClick:()=>{u("stats"),R(null),H(null),G(null)},role:"tab","aria-selected":c==="stats","aria-controls":"stats-tabpanel",id:"stats-tab",tabIndex:c==="stats"?0:-1,children:"Stats"}),(0,ke.jsx)("button",{className:`tab-button ${c==="logs"?"active":""}`,onClick:()=>{u("logs"),R(null),H(null),G(null)},role:"tab","aria-selected":c==="logs","aria-controls":"logs-tabpanel",id:"logs-tab",tabIndex:c==="logs"?0:-1,children:"Logs"}),(0,ke.jsx)("button",{className:`tab-button ${c==="data"?"active":""}`,onClick:()=>{u("data"),R(null),H(null),G(null)},role:"tab","aria-selected":c==="data","aria-controls":"data-tabpanel",id:"data-tab",tabIndex:c==="data"?0:-1,children:"Data"}),(0,ke.jsx)("button",{className:`tab-button ${c==="env"?"active":""}`,onClick:()=>{u("env"),R(null),H(null),G(null)},role:"tab","aria-selected":c==="env","aria-controls":"env-tabpanel",id:"env-tab",tabIndex:c==="env"?0:-1,children:"Env"})]}),(0,ke.jsxs)("div",{className:"right-panel-content",children:[c==="persona"&&(0,ke.jsx)("div",{role:"tabpanel",id:"persona-tabpanel","aria-labelledby":"persona-tab","aria-hidden":c!=="persona",children:_?(0,ke.jsx)(rh,{selectedPersonaVersion:_,onBack:()=>R(null),onDeployVersion:ie,deployingVersionId:m}):(0,ke.jsx)(nh,{personaVersions:d,onSelectVersion:R,onDeployVersion:ie,deployingVersionId:m})}),c==="skills"&&(0,ke.jsx)("div",{role:"tabpanel",id:"skills-tabpanel","aria-labelledby":"skills-tab","aria-hidden":c!=="skills",children:L?(0,ke.jsx)(ih,{selectedSkillVersion:L,onBack:()=>G(null),onDeployVersion:ie,deployingVersionId:m}):U?(0,ke.jsx)(sh,{selectedSkill:U,versions:p,onBack:()=>H(null),onSelectVersion:G,onDeployVersion:ie,formatDate:De,deployingVersionId:m}):(0,ke.jsx)(ah,{skills:v,onSelectSkill:H,onActivateSkill:W,activatingSkillId:g})}),c==="stats"&&(0,ke.jsx)("div",{role:"tabpanel",id:"stats-tabpanel","aria-labelledby":"stats-tab","aria-hidden":c!=="stats",children:(0,ke.jsx)("div",{className:"coming-soon-panel",children:(0,ke.jsxs)("div",{className:"coming-soon",children:[(0,ke.jsx)("div",{className:"coming-soon-icon",children:"\u{1F4CA}"}),(0,ke.jsx)("div",{className:"coming-soon-text",children:"Statistics & Analytics"}),(0,ke.jsx)("div",{className:"coming-soon-subtext",children:"Performance metrics and analytics dashboard coming soon"})]})})}),c==="logs"&&(0,ke.jsx)("div",{role:"tabpanel",id:"logs-tabpanel","aria-labelledby":"logs-tab","aria-hidden":c!=="logs",children:(0,ke.jsx)(Wm,{apiKey:e,agentId:t})}),c==="data"&&(0,ke.jsx)("div",{role:"tabpanel",id:"data-tabpanel","aria-labelledby":"data-tab","aria-hidden":c!=="data",children:(0,ke.jsx)(th,{apiKey:e,agentId:t})}),c==="env"&&(0,ke.jsx)("div",{role:"tabpanel",id:"env-tabpanel","aria-labelledby":"env-tab","aria-hidden":c!=="env",children:(0,ke.jsx)(lh,{apiKey:e,agentId:t})})]})]})]})})}});var Hr,Gt,yE,bE=S(()=>{"use strict";Hr=Z($e()),Gt=Z(oe()),yE=({apiKey:e,agentId:t})=>{let[n,a]=(0,Hr.useState)(""),[r,i]=(0,Hr.useState)(!0),[s,l]=(0,Hr.useState)(""),[o,c]=(0,Hr.useState)("");(0,Hr.useEffect)(()=>{u()},[]);let u=()=>O(null,null,function*(){var p;try{i(!0);let f=yield fetch("/api/config");if(f.ok){let d=yield f.json(),E=(p=d==null?void 0:d.agent)==null?void 0:p.orgId;if(E){a(E);let v=`https://admin.heylua.ai/validate-token/${e}?redirect=/admin/usage?&agentId=${t}&orgId=${E}&hideToolBar=true`;c(v)}else l("No orgId found in configuration")}else l("Failed to load configuration")}catch(f){console.error("Failed to load orgId:",f),l("Failed to load configuration")}finally{i(!1)}});return r?(0,Gt.jsx)("section",{className:"admin-page",role:"region","aria-label":"Admin dashboard",children:(0,Gt.jsxs)("div",{className:"loading-container",role:"status","aria-label":"Loading admin dashboard",children:[(0,Gt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"",className:"loading-logo"}),(0,Gt.jsx)("span",{className:"sr-only",children:"Loading admin dashboard..."})]})}):s?(0,Gt.jsx)("section",{className:"admin-page",role:"region","aria-label":"Admin dashboard",children:(0,Gt.jsxs)("div",{className:"error-container",role:"alert",children:[(0,Gt.jsx)("h2",{children:"Error Loading Admin Dashboard"}),(0,Gt.jsx)("p",{children:s}),(0,Gt.jsx)("button",{onClick:u,className:"retry-button","aria-label":"Retry loading admin dashboard",children:"Retry"})]})}):(0,Gt.jsx)("section",{className:"admin-page",role:"region","aria-label":"Admin dashboard",children:o?(0,Gt.jsx)("iframe",{src:o,className:"admin-iframe",title:"Lua Admin Dashboard",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-top-navigation","aria-label":"Lua admin dashboard interface"}):(0,Gt.jsxs)("div",{className:"loading-container",role:"status","aria-label":"Loading admin dashboard",children:[(0,Gt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"",className:"loading-logo"}),(0,Gt.jsx)("span",{className:"sr-only",children:"Loading admin dashboard..."})]})})}});var xE=S(()=>{});var Zi,nt,SE,NE=S(()=>{"use strict";Zi=Z($e());WN();vE();bE();$t();xE();nt=Z(oe()),SE=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{let[r,i]=(0,Zi.useState)("sandbox"),[s,l]=(0,Zi.useState)([]),[o,c]=(0,Zi.useState)(!1),u=(v,k)=>{if(v.key==="Enter"||v.key===" ")v.preventDefault(),i(k);else if(v.key==="ArrowLeft"||v.key==="ArrowRight"){v.preventDefault();let m=["sandbox","production","admin"],h=m.indexOf(r),g;v.key==="ArrowLeft"?g=h>0?h-1:m.length-1:g=h<m.length-1?h+1:0,i(m[g]);let x=`${m[g]}-tab`;setTimeout(()=>{var w;(w=document.getElementById(x))==null||w.focus()},0)}};(0,Zi.useEffect)(()=>{p()},[e,t]);let p=()=>O(null,null,function*(){try{console.log("Loading shared chat history with API key:",e,"agentId:",t);let v=yield re.loadChatHistory(e,t);if(v.success&&v.data&&v.data.length>0){let k=v.data.map(m=>{var h;return{id:m.id||Date.now().toString(),text:((h=m.content[0])==null?void 0:h.text)||"",sender:m.role==="user"?"user":"assistant",timestamp:new Date(m.createdAt)}});l(k)}else l([])}catch(v){console.error("Failed to load shared chat history:",v),l([])}}),f=()=>O(null,null,function*(){try{let v=yield re.clearChatHistory(e,t);v.success?l([]):alert("Failed to clear chat history: "+(v.error||"Unknown error"))}catch(v){console.error("Failed to clear shared chat history:",v),alert("Failed to clear chat history")}}),d=v=>{l(k=>[...k,v])};return(0,nt.jsxs)("div",{className:"main-container",role:"application","aria-label":"Lua Developer Console",children:[(0,nt.jsx)("a",{href:"#main-content",className:"skip-link",children:"Skip to main content"}),(0,nt.jsx)("header",{className:"page-navigation",role:"banner",children:(0,nt.jsxs)("div",{className:"nav-logo",children:[(0,nt.jsx)("img",{src:"https://admin.heylua.ai/images/logo.svg",alt:"Lua Logo",className:"logo-icon"}),(0,nt.jsxs)("h1",{className:"logo-text",children:[(0,nt.jsx)("strong",{children:"Lua"})," : Developer Console"]})]})}),(0,nt.jsxs)("nav",{className:"page-tabs",role:"tablist","aria-label":"Main navigation",children:[(0,nt.jsx)("button",{className:`page-tab ${r==="sandbox"?"active":""}`,onClick:()=>i("sandbox"),onKeyDown:v=>u(v,"sandbox"),role:"tab","aria-selected":r==="sandbox","aria-controls":"sandbox-panel",id:"sandbox-tab",tabIndex:r==="sandbox"?0:-1,children:"Sandbox"}),(0,nt.jsx)("button",{className:`page-tab ${r==="production"?"active":""}`,onClick:()=>i("production"),onKeyDown:v=>u(v,"production"),role:"tab","aria-selected":r==="production","aria-controls":"production-panel",id:"production-tab",tabIndex:r==="production"?0:-1,children:"Production"}),(0,nt.jsx)("button",{className:`page-tab ${r==="admin"?"active":""}`,onClick:()=>i("admin"),onKeyDown:v=>u(v,"admin"),role:"tab","aria-selected":r==="admin","aria-controls":"admin-panel",id:"admin-tab",tabIndex:r==="admin"?0:-1,children:"Admin"})]}),(0,nt.jsx)("main",{className:"page-container",role:"main",id:"main-content",children:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)("div",{className:`page-content ${r==="sandbox"?"active":"hidden"}`,role:"tabpanel",id:"sandbox-panel","aria-labelledby":"sandbox-tab","aria-hidden":r!=="sandbox",children:(0,nt.jsx)(KN,{apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:s,onSharedSendMessage:d,onSharedClearHistory:f,isChatLoading:o,setIsChatLoading:c})}),(0,nt.jsx)("div",{className:`page-content ${r==="production"?"active":"hidden"}`,role:"tabpanel",id:"production-panel","aria-labelledby":"production-tab","aria-hidden":r!=="production",children:(0,nt.jsx)(gE,{apiKey:e,agentId:t,skillId:n,isActive:r==="production",sharedChatMessages:s,onSharedSendMessage:d,onSharedClearHistory:f,isChatLoading:o,setIsChatLoading:c})}),(0,nt.jsx)("div",{className:`page-content ${r==="admin"?"active":"hidden"}`,role:"tabpanel",id:"admin-panel","aria-labelledby":"admin-tab","aria-hidden":r!=="admin",children:(0,nt.jsx)(yE,{apiKey:e,agentId:t})})]})})]})}});var pR=Vt(()=>{var EE=Z($e()),kE=Z(Qb());NE();var oh=Z(oe()),Ul=window.__LUA_CONFIG__;if(!Ul)throw new Error("Lua configuration not found");var TE=document.getElementById("root");if(!TE)throw new Error("Root container not found");var fR=(0,kE.createRoot)(TE);fR.render((0,oh.jsx)(EE.default.StrictMode,{children:(0,oh.jsx)(SE,{apiKey:Ul.apiKey,agentId:Ul.agentId,skillId:Ul.skillId,sandboxId:Ul.sandboxId})}))});return pR();})();
|
|
25
25
|
/*! Bundled license information:
|
|
26
26
|
|
|
27
27
|
react/cjs/react.production.js:
|