byterover-cli 3.8.2 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +8 -34
  2. package/dist/agent/infra/llm/providers/google.js +1 -1
  3. package/dist/oclif/commands/login.d.ts +15 -2
  4. package/dist/oclif/commands/login.js +106 -29
  5. package/dist/oclif/commands/providers/list.js +3 -0
  6. package/dist/oclif/commands/vc/diff.d.ts +12 -0
  7. package/dist/oclif/commands/vc/diff.js +40 -0
  8. package/dist/oclif/commands/vc/remote/remove.d.ts +9 -0
  9. package/dist/oclif/commands/vc/remote/remove.js +23 -0
  10. package/dist/server/core/domain/entities/brv-config.d.ts +4 -0
  11. package/dist/server/core/domain/entities/brv-config.js +12 -0
  12. package/dist/server/core/domain/entities/provider-registry.js +3 -3
  13. package/dist/server/core/interfaces/services/i-git-service.d.ts +55 -4
  14. package/dist/server/infra/context-tree/summary-frontmatter.js +2 -2
  15. package/dist/server/infra/dream/operations/consolidate.js +5 -4
  16. package/dist/server/infra/dream/operations/synthesize.js +1 -1
  17. package/dist/server/infra/git/isomorphic-git-service.d.ts +24 -1
  18. package/dist/server/infra/git/isomorphic-git-service.js +207 -7
  19. package/dist/server/infra/transport/handlers/config-handler.js +1 -0
  20. package/dist/server/infra/transport/handlers/locations-handler.d.ts +1 -0
  21. package/dist/server/infra/transport/handlers/locations-handler.js +25 -1
  22. package/dist/server/infra/transport/handlers/reveal-command.d.ts +9 -0
  23. package/dist/server/infra/transport/handlers/reveal-command.js +7 -0
  24. package/dist/server/infra/transport/handlers/vc-handler.d.ts +11 -0
  25. package/dist/server/infra/transport/handlers/vc-handler.js +143 -9
  26. package/dist/server/infra/webui/webui-middleware.js +10 -4
  27. package/dist/shared/transport/events/config-events.d.ts +1 -0
  28. package/dist/shared/transport/events/index.d.ts +1 -0
  29. package/dist/shared/transport/events/locations-events.d.ts +7 -0
  30. package/dist/shared/transport/events/locations-events.js +1 -0
  31. package/dist/shared/transport/events/vc-events.d.ts +56 -5
  32. package/dist/shared/transport/events/vc-events.js +7 -0
  33. package/dist/tui/features/commands/definitions/vc-diff.d.ts +2 -0
  34. package/dist/tui/features/commands/definitions/vc-diff.js +23 -0
  35. package/dist/tui/features/commands/definitions/vc-remote.js +16 -7
  36. package/dist/tui/features/commands/definitions/vc.js +2 -0
  37. package/dist/tui/features/vc/diff/api/execute-vc-diff.d.ts +8 -0
  38. package/dist/tui/features/vc/diff/api/execute-vc-diff.js +13 -0
  39. package/dist/tui/features/vc/diff/components/vc-diff-flow.d.ts +8 -0
  40. package/dist/tui/features/vc/diff/components/vc-diff-flow.js +31 -0
  41. package/dist/tui/features/vc/diff/utils/format-diff.d.ts +2 -0
  42. package/dist/tui/features/vc/diff/utils/format-diff.js +83 -0
  43. package/dist/tui/features/vc/diff/utils/parse-mode.d.ts +2 -0
  44. package/dist/tui/features/vc/diff/utils/parse-mode.js +16 -0
  45. package/dist/tui/features/vc/remote/components/vc-remote-flow.js +23 -8
  46. package/dist/webui/assets/index-CvcqpMYn.css +1 -0
  47. package/dist/webui/assets/index-thSZZahh.js +130 -0
  48. package/dist/webui/index.html +3 -3
  49. package/dist/webui/sw.js +1 -1
  50. package/oclif.manifest.json +1009 -933
  51. package/package.json +3 -1
  52. package/dist/webui/assets/index-Cti7S_1o.js +0 -130
  53. package/dist/webui/assets/index-Dpw6osIL.css +0 -1
@@ -1,130 +0,0 @@
1
- function YN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $g={exports:{}},pu={};var y5;function WN(){if(y5)return pu;y5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var l=null;if(a!==void 0&&(l=""+a),o.key!==void 0&&(l=""+o.key),"key"in o){a={};for(var c in o)c!=="key"&&(a[c]=o[c])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:a}}return pu.Fragment=t,pu.jsx=n,pu.jsxs=n,pu}var x5;function KN(){return x5||(x5=1,$g.exports=WN()),$g.exports}var p=KN(),Gg={exports:{}},mu={},Yg={exports:{}},Wg={};var b5;function QN(){return b5||(b5=1,(function(e){function t(B,F){var G=B.length;B.push(F);e:for(;0<G;){var ie=G-1>>>1,M=B[ie];if(0<o(M,F))B[ie]=F,B[G]=M,G=ie;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var F=B[0],G=B.pop();if(G!==F){B[0]=G;e:for(var ie=0,M=B.length,P=M>>>1;ie<P;){var Q=2*(ie+1)-1,_=B[Q],ee=Q+1,J=B[ee];if(0>o(_,G))ee<M&&0>o(J,_)?(B[ie]=J,B[ee]=G,ie=ee):(B[ie]=_,B[Q]=G,ie=Q);else if(ee<M&&0>o(J,G))B[ie]=J,B[ee]=G,ie=ee;else break e}}return F}function o(B,F){var G=B.sortIndex-F.sortIndex;return G!==0?G:B.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],g=1,h=null,y=3,x=!1,v=!1,S=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=B)r(d),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(d)}}function j(B){if(S=!1,L(B),!v)if(n(f)!==null)v=!0,N||(N=!0,$());else{var F=n(d);F!==null&&H(j,F.startTime-B)}}var N=!1,A=-1,D=5,U=-1;function I(){return E?!0:!(e.unstable_now()-U<D)}function q(){if(E=!1,N){var B=e.unstable_now();U=B;var F=!0;try{e:{v=!1,S&&(S=!1,T(A),A=-1),x=!0;var G=y;try{t:{for(L(B),h=n(f);h!==null&&!(h.expirationTime>B&&I());){var ie=h.callback;if(typeof ie=="function"){h.callback=null,y=h.priorityLevel;var M=ie(h.expirationTime<=B);if(B=e.unstable_now(),typeof M=="function"){h.callback=M,L(B),F=!0;break t}h===n(f)&&r(f),L(B)}else r(f);h=n(f)}if(h!==null)F=!0;else{var P=n(d);P!==null&&H(j,P.startTime-B),F=!1}}break e}finally{h=null,y=G,x=!1}F=void 0}}finally{F?$():N=!1}}}var $;if(typeof R=="function")$=function(){R(q)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,Y=V.port2;V.port1.onmessage=q,$=function(){Y.postMessage(null)}}else $=function(){k(q,0)};function H(B,F){A=k(function(){B(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(B){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var G=y;y=F;try{return B()}finally{y=G}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var G=y;y=B;try{return F()}finally{y=G}},e.unstable_scheduleCallback=function(B,F,G){var ie=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ie+G:ie):G=ie,B){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=G+M,B={id:g++,callback:F,priorityLevel:B,startTime:G,expirationTime:M,sortIndex:-1},G>ie?(B.sortIndex=G,t(d,B),n(f)===null&&B===n(d)&&(S?(T(A),A=-1):S=!0,H(j,G-ie))):(B.sortIndex=M,t(f,B),v||x||(v=!0,N||(N=!0,$()))),B},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(B){var F=y;return function(){var G=y;y=F;try{return B.apply(this,arguments)}finally{y=G}}}})(Wg)),Wg}var v5;function XN(){return v5||(v5=1,Yg.exports=QN()),Yg.exports}var Kg={exports:{}},dt={};var w5;function ZN(){if(w5)return dt;w5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function k(P,Q,_){this.props=P,this.context=Q,this.refs=E,this.updater=_||v}k.prototype.isReactComponent={},k.prototype.setState=function(P,Q){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,Q,"setState")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=k.prototype;function R(P,Q,_){this.props=P,this.context=Q,this.refs=E,this.updater=_||v}var L=R.prototype=new T;L.constructor=R,S(L,k.prototype),L.isPureReactComponent=!0;var j=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(P,Q,_){var ee=_.ref;return{$$typeof:e,type:P,key:Q,ref:ee!==void 0?ee:null,props:_}}function I(P,Q){return U(P.type,Q,P.props)}function q(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function $(P){var Q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(_){return Q[_]})}var V=/\/+/g;function Y(P,Q){return typeof P=="object"&&P!==null&&P.key!=null?$(""+P.key):Q.toString(36)}function H(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(N,N):(P.status="pending",P.then(function(Q){P.status==="pending"&&(P.status="fulfilled",P.value=Q)},function(Q){P.status==="pending"&&(P.status="rejected",P.reason=Q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function B(P,Q,_,ee,J){var re=typeof P;(re==="undefined"||re==="boolean")&&(P=null);var pe=!1;if(P===null)pe=!0;else switch(re){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(P.$$typeof){case e:case t:pe=!0;break;case g:return pe=P._init,B(pe(P._payload),Q,_,ee,J)}}if(pe)return J=J(P),pe=ee===""?"."+Y(P,0):ee,j(J)?(_="",pe!=null&&(_=pe.replace(V,"$&/")+"/"),B(J,Q,_,"",function(Ee){return Ee})):J!=null&&(q(J)&&(J=I(J,_+(J.key==null||P&&P.key===J.key?"":(""+J.key).replace(V,"$&/")+"/")+pe)),Q.push(J)),1;pe=0;var fe=ee===""?".":ee+":";if(j(P))for(var Ce=0;Ce<P.length;Ce++)ee=P[Ce],re=fe+Y(ee,Ce),pe+=B(ee,Q,_,re,J);else if(Ce=x(P),typeof Ce=="function")for(P=Ce.call(P),Ce=0;!(ee=P.next()).done;)ee=ee.value,re=fe+Y(ee,Ce++),pe+=B(ee,Q,_,re,J);else if(re==="object"){if(typeof P.then=="function")return B(H(P),Q,_,ee,J);throw Q=String(P),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return pe}function F(P,Q,_){if(P==null)return P;var ee=[],J=0;return B(P,ee,"","",function(re){return Q.call(_,re,J++)}),ee}function G(P){if(P._status===-1){var Q=P._result;Q=Q(),Q.then(function(_){(P._status===0||P._status===-1)&&(P._status=1,P._result=_)},function(_){(P._status===0||P._status===-1)&&(P._status=2,P._result=_)}),P._status===-1&&(P._status=0,P._result=Q)}if(P._status===1)return P._result.default;throw P._result}var ie=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},M={map:F,forEach:function(P,Q,_){F(P,function(){Q.apply(this,arguments)},_)},count:function(P){var Q=0;return F(P,function(){Q++}),Q},toArray:function(P){return F(P,function(Q){return Q})||[]},only:function(P){if(!q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return dt.Activity=h,dt.Children=M,dt.Component=k,dt.Fragment=n,dt.Profiler=o,dt.PureComponent=R,dt.StrictMode=r,dt.Suspense=f,dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,dt.__COMPILER_RUNTIME={__proto__:null,c:function(P){return A.H.useMemoCache(P)}},dt.cache=function(P){return function(){return P.apply(null,arguments)}},dt.cacheSignal=function(){return null},dt.cloneElement=function(P,Q,_){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var ee=S({},P.props),J=P.key;if(Q!=null)for(re in Q.key!==void 0&&(J=""+Q.key),Q)!D.call(Q,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&Q.ref===void 0||(ee[re]=Q[re]);var re=arguments.length-2;if(re===1)ee.children=_;else if(1<re){for(var pe=Array(re),fe=0;fe<re;fe++)pe[fe]=arguments[fe+2];ee.children=pe}return U(P.type,J,ee)},dt.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:a,_context:P},P},dt.createElement=function(P,Q,_){var ee,J={},re=null;if(Q!=null)for(ee in Q.key!==void 0&&(re=""+Q.key),Q)D.call(Q,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(J[ee]=Q[ee]);var pe=arguments.length-2;if(pe===1)J.children=_;else if(1<pe){for(var fe=Array(pe),Ce=0;Ce<pe;Ce++)fe[Ce]=arguments[Ce+2];J.children=fe}if(P&&P.defaultProps)for(ee in pe=P.defaultProps,pe)J[ee]===void 0&&(J[ee]=pe[ee]);return U(P,re,J)},dt.createRef=function(){return{current:null}},dt.forwardRef=function(P){return{$$typeof:c,render:P}},dt.isValidElement=q,dt.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:G}},dt.memo=function(P,Q){return{$$typeof:d,type:P,compare:Q===void 0?null:Q}},dt.startTransition=function(P){var Q=A.T,_={};A.T=_;try{var ee=P(),J=A.S;J!==null&&J(_,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(N,ie)}catch(re){ie(re)}finally{Q!==null&&_.types!==null&&(Q.types=_.types),A.T=Q}},dt.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},dt.use=function(P){return A.H.use(P)},dt.useActionState=function(P,Q,_){return A.H.useActionState(P,Q,_)},dt.useCallback=function(P,Q){return A.H.useCallback(P,Q)},dt.useContext=function(P){return A.H.useContext(P)},dt.useDebugValue=function(){},dt.useDeferredValue=function(P,Q){return A.H.useDeferredValue(P,Q)},dt.useEffect=function(P,Q){return A.H.useEffect(P,Q)},dt.useEffectEvent=function(P){return A.H.useEffectEvent(P)},dt.useId=function(){return A.H.useId()},dt.useImperativeHandle=function(P,Q,_){return A.H.useImperativeHandle(P,Q,_)},dt.useInsertionEffect=function(P,Q){return A.H.useInsertionEffect(P,Q)},dt.useLayoutEffect=function(P,Q){return A.H.useLayoutEffect(P,Q)},dt.useMemo=function(P,Q){return A.H.useMemo(P,Q)},dt.useOptimistic=function(P,Q){return A.H.useOptimistic(P,Q)},dt.useReducer=function(P,Q,_){return A.H.useReducer(P,Q,_)},dt.useRef=function(P){return A.H.useRef(P)},dt.useState=function(P){return A.H.useState(P)},dt.useSyncExternalStore=function(P,Q,_){return A.H.useSyncExternalStore(P,Q,_)},dt.useTransition=function(){return A.H.useTransition()},dt.version="19.2.4",dt}var S5;function Ef(){return S5||(S5=1,Kg.exports=ZN()),Kg.exports}var Qg={exports:{}},pr={};var C5;function JN(){if(C5)return pr;C5=1;var e=Ef();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function a(f,d,g){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:f,containerInfo:d,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pr.createPortal=function(f,d){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return a(f,d,null,g)},pr.flushSync=function(f){var d=l.T,g=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=g,r.d.f()}},pr.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},pr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},pr.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var g=d.as,h=c(g,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;g==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:x}):g==="script"&&r.d.X(f,{crossOrigin:h,integrity:y,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},pr.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var g=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},pr.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var g=d.as,h=c(g,d.crossOrigin);r.d.L(f,g,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},pr.preloadModule=function(f,d){if(typeof f=="string")if(d){var g=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},pr.requestFormReset=function(f){r.d.r(f)},pr.unstable_batchedUpdates=function(f,d){return f(d)},pr.useFormState=function(f,d,g){return l.H.useFormState(f,d,g)},pr.useFormStatus=function(){return l.H.useHostTransitionStatus()},pr.version="19.2.4",pr}var E5;function HE(){if(E5)return Qg.exports;E5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qg.exports=JN(),Qg.exports}var k5;function eO(){if(k5)return mu;k5=1;var e=XN(),t=Ef(),n=HE();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function f(i){if(a(i)!==i)throw Error(r(188))}function d(i){var s=i.alternate;if(!s){if(s=a(i),s===null)throw Error(r(188));return s!==i?null:i}for(var u=i,m=s;;){var b=u.return;if(b===null)break;var w=b.alternate;if(w===null){if(m=b.return,m!==null){u=m;continue}break}if(b.child===w.child){for(w=b.child;w;){if(w===u)return f(b),i;if(w===m)return f(b),s;w=w.sibling}throw Error(r(188))}if(u.return!==m.return)u=b,m=w;else{for(var O=!1,z=b.child;z;){if(z===u){O=!0,u=b,m=w;break}if(z===m){O=!0,m=b,u=w;break}z=z.sibling}if(!O){for(z=w.child;z;){if(z===u){O=!0,u=w,m=b;break}if(z===m){O=!0,m=w,u=b;break}z=z.sibling}if(!O)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:s}function g(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=g(i),s!==null)return s;i=i.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),R=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var V=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===V?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case k:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case N:return"SuspenseList";case U:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case v:return"Portal";case R:return i.displayName||"Context";case T:return(i._context.displayName||"Context")+".Consumer";case L:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case A:return s=i.displayName||null,s!==null?s:Y(i.type)||"Memo";case D:s=i._payload,i=i._init;try{return Y(i(s))}catch{}}return null}var H=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},ie=[],M=-1;function P(i){return{current:i}}function Q(i){0>M||(i.current=ie[M],ie[M]=null,M--)}function _(i,s){M++,ie[M]=i.current,i.current=s}var ee=P(null),J=P(null),re=P(null),pe=P(null);function fe(i,s){switch(_(re,s),_(J,i),_(ee,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?B3(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=B3(s),i=H3(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Q(ee),_(ee,i)}function Ce(){Q(ee),Q(J),Q(re)}function Ee(i){i.memoizedState!==null&&_(pe,i);var s=ee.current,u=H3(s,i.type);s!==u&&(_(J,i),_(ee,u))}function Ie(i){J.current===i&&(Q(ee),Q(J)),pe.current===i&&(Q(pe),uu._currentValue=G)}var Ye,je;function _e(i){if(Ye===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);Ye=s&&s[1]||"",je=-1<u.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ye+i+je}var ye=!1;function We(i,s){if(!i||ye)return"";ye=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ue){var ce=ue}Reflect.construct(i,[],ge)}else{try{ge.call()}catch(ue){ce=ue}i.call(ge.prototype)}}else{try{throw Error()}catch(ue){ce=ue}(ge=i())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ue){if(ue&&ce&&typeof ue.stack=="string")return[ue.stack,ce.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=m.DetermineComponentFrameRoot(),O=w[0],z=w[1];if(O&&z){var K=O.split(`
4
- `),se=z.split(`
5
- `);for(b=m=0;m<K.length&&!K[m].includes("DetermineComponentFrameRoot");)m++;for(;b<se.length&&!se[b].includes("DetermineComponentFrameRoot");)b++;if(m===K.length||b===se.length)for(m=K.length-1,b=se.length-1;1<=m&&0<=b&&K[m]!==se[b];)b--;for(;1<=m&&0<=b;m--,b--)if(K[m]!==se[b]){if(m!==1||b!==1)do if(m--,b--,0>b||K[m]!==se[b]){var de=`
6
- `+K[m].replace(" at new "," at ");return i.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",i.displayName)),de}while(1<=m&&0<=b);break}}}finally{ye=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?_e(u):""}function Te(i,s){switch(i.tag){case 26:case 27:case 5:return _e(i.type);case 16:return _e("Lazy");case 13:return i.child!==s&&s!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return We(i.type,!1);case 11:return We(i.type.render,!1);case 1:return We(i.type,!0);case 31:return _e("Activity");default:return""}}function Re(i){try{var s="",u=null;do s+=Te(i,u),u=i,i=i.return;while(i);return s}catch(m){return`
7
- Error generating stack: `+m.message+`
8
- `+m.stack}}var he=Object.prototype.hasOwnProperty,Se=e.unstable_scheduleCallback,ne=e.unstable_cancelCallback,xe=e.unstable_shouldYield,ze=e.unstable_requestPaint,Ue=e.unstable_now,wt=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Me=e.unstable_LowPriority,He=e.unstable_IdlePriority,kt=e.log,Ft=e.unstable_setDisableYieldValue,Xe=null,Ve=null;function pt(i){if(typeof kt=="function"&&Ft(i),Ve&&typeof Ve.setStrictMode=="function")try{Ve.setStrictMode(Xe,i)}catch{}}var mt=Math.clz32?Math.clz32:Pt,Qe=Math.log,yt=Math.LN2;function Pt(i){return i>>>=0,i===0?32:31-(Qe(i)/yt|0)|0}var Wt=256,yn=262144,fn=4194304;function Dn(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function nt(i,s,u){var m=i.pendingLanes;if(m===0)return 0;var b=0,w=i.suspendedLanes,O=i.pingedLanes;i=i.warmLanes;var z=m&134217727;return z!==0?(m=z&~w,m!==0?b=Dn(m):(O&=z,O!==0?b=Dn(O):u||(u=z&~i,u!==0&&(b=Dn(u))))):(z=m&~w,z!==0?b=Dn(z):O!==0?b=Dn(O):u||(u=m&~i,u!==0&&(b=Dn(u)))),b===0?0:s!==0&&s!==b&&(s&w)===0&&(w=b&-b,u=s&-s,w>=u||w===32&&(u&4194048)!==0)?s:b}function Ut(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function dn(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 hn(){var i=fn;return fn<<=1,(fn&62914560)===0&&(fn=4194304),i}function or(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function Jt(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function In(i,s,u,m,b,w){var O=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var z=i.entanglements,K=i.expirationTimes,se=i.hiddenUpdates;for(u=O&~u;0<u;){var de=31-mt(u),ge=1<<de;z[de]=0,K[de]=-1;var ce=se[de];if(ce!==null)for(se[de]=null,de=0;de<ce.length;de++){var ue=ce[de];ue!==null&&(ue.lane&=-536870913)}u&=~ge}m!==0&&pi(i,m,0),w!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=w&~(O&~s))}function pi(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var m=31-mt(s);i.entangledLanes|=s,i.entanglements[m]=i.entanglements[m]|1073741824|u&261930}function W(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var m=31-mt(u),b=1<<m;b&s|i[m]&s&&(i[m]|=s),u&=~b}}function Z(i,s){var u=s&-s;return u=(u&42)!==0?1:le(u),(u&(i.suspendedLanes|s))!==0?0:u}function le(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function be(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Ne(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:u5(i.type))}function Ze(i,s){var u=F.p;try{return F.p=i,s()}finally{F.p=u}}var Pe=Math.random().toString(36).slice(2),Le="__reactFiber$"+Pe,Fe="__reactProps$"+Pe,et="__reactContainer$"+Pe,lt="__reactEvents$"+Pe,tt="__reactListeners$"+Pe,It="__reactHandles$"+Pe,Ot="__reactResources$"+Pe,Sn="__reactMarker$"+Pe;function En(i){delete i[Le],delete i[Fe],delete i[lt],delete i[tt],delete i[It]}function kn(i){var s=i[Le];if(s)return s;for(var u=i.parentNode;u;){if(s=u[et]||u[Le]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=W3(i);i!==null;){if(u=i[Le])return u;i=W3(i)}return s}i=u,u=i.parentNode}return null}function jt(i){if(i=i[Le]||i[et]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Jn(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Mr(i){var s=i[Ot];return s||(s=i[Ot]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function xn(i){i[Sn]=!0}var _i=new Set,Gr={};function Di(i,s){mi(i,s),mi(i+"Capture",s)}function mi(i,s){for(Gr[i]=s,i=0;i<s.length;i++)_i.add(s[i])}var go=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]*$"),ts={},ns={};function Mt(i){return he.call(ns,i)?!0:he.call(ts,i)?!1:go.test(i)?ns[i]=!0:(ts[i]=!0,!1)}function On(i,s,u){if(Mt(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function Ii(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function ar(i,s,u,m){if(m===null)i.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+m)}}function Lt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function rs(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Qf(i,s,u){var m=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var b=m.get,w=m.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(O){u=""+O,w.call(this,O)}}),Object.defineProperty(i,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(O){u=""+O},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Tc(i){if(!i._valueTracker){var s=rs(i)?"checked":"value";i._valueTracker=Qf(i,s,""+i[s])}}function Lb(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return i&&(m=rs(i)?i.checked?"true":"false":i.value),i=m,i!==u?(s.setValue(i),!0):!1}function Xf(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var H7=/[\n"\\]/g;function gi(i){return i.replace(H7,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function F0(i,s,u,m,b,w,O,z){i.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?i.type=O:i.removeAttribute("type"),s!=null?O==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Lt(s)):i.value!==""+Lt(s)&&(i.value=""+Lt(s)):O!=="submit"&&O!=="reset"||i.removeAttribute("value"),s!=null?B0(i,O,Lt(s)):u!=null?B0(i,O,Lt(u)):m!=null&&i.removeAttribute("value"),b==null&&w!=null&&(i.defaultChecked=!!w),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.name=""+Lt(z):i.removeAttribute("name")}function _b(i,s,u,m,b,w,O,z){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),s!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||s!=null)){Tc(i);return}u=u!=null?""+Lt(u):"",s=s!=null?""+Lt(s):u,z||s===i.value||(i.value=s),i.defaultValue=s}m=m??b,m=typeof m!="function"&&typeof m!="symbol"&&!!m,i.checked=z?i.checked:!!m,i.defaultChecked=!!m,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(i.name=O),Tc(i)}function B0(i,s,u){s==="number"&&Xf(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Zs(i,s,u,m){if(i=i.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=s.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&m&&(i[u].defaultSelected=!0)}else{for(u=""+Lt(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,m&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function Db(i,s,u){if(s!=null&&(s=""+Lt(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+Lt(u):""}function Ib(i,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(r(92));if(H(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=Lt(s),i.defaultValue=u,m=i.textContent,m===u&&m!==""&&m!==null&&(i.value=m),Tc(i)}function Js(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var U7=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 zb(i,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":m?i.setProperty(s,u):typeof u!="number"||u===0||U7.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function Pb(i,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?i.setProperty(m,""):m==="float"?i.cssFloat="":i[m]="");for(var b in s)m=s[b],s.hasOwnProperty(b)&&u[b]!==m&&zb(i,b,m)}else for(var w in s)s.hasOwnProperty(w)&&zb(i,w,s[w])}function H0(i){if(i.indexOf("-")===-1)return!1;switch(i){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 q7=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"]]),V7=/^[\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 Zf(i){return V7.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function yo(){}var U0=null;function q0(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var el=null,tl=null;function Fb(i){var s=jt(i);if(s&&(i=s.stateNode)){var u=i[Fe]||null;e:switch(i=s.stateNode,s.type){case"input":if(F0(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+gi(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==i&&m.form===i.form){var b=m[Fe]||null;if(!b)throw Error(r(90));F0(m,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===i.form&&Lb(m)}break e;case"textarea":Db(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Zs(i,!!u.multiple,s,!1)}}}var V0=!1;function Bb(i,s,u){if(V0)return i(s,u);V0=!0;try{var m=i(s);return m}finally{if(V0=!1,(el!==null||tl!==null)&&(Fd(),el&&(s=el,i=tl,tl=el=null,Fb(s),i)))for(s=0;s<i.length;s++)Fb(i[s])}}function Ac(i,s){var u=i.stateNode;if(u===null)return null;var m=u[Fe]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var xo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$0=!1;if(xo)try{var Rc={};Object.defineProperty(Rc,"passive",{get:function(){$0=!0}}),window.addEventListener("test",Rc,Rc),window.removeEventListener("test",Rc,Rc)}catch{$0=!1}var Jo=null,G0=null,Jf=null;function Hb(){if(Jf)return Jf;var i,s=G0,u=s.length,m,b="value"in Jo?Jo.value:Jo.textContent,w=b.length;for(i=0;i<u&&s[i]===b[i];i++);var O=u-i;for(m=1;m<=O&&s[u-m]===b[w-m];m++);return Jf=b.slice(i,1<m?1-m:void 0)}function ed(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function td(){return!0}function Ub(){return!1}function Lr(i){function s(u,m,b,w,O){this._reactName=u,this._targetInst=b,this.type=m,this.nativeEvent=w,this.target=O,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(u=i[z],this[z]=u?u(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?td:Ub,this.isPropagationStopped=Ub,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=td)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=td)},persist:function(){},isPersistent:td}),s}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nd=Lr(is),Nc=h({},is,{view:0,detail:0}),$7=Lr(Nc),Y0,W0,Oc,rd=h({},Nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Q0,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Oc&&(Oc&&i.type==="mousemove"?(Y0=i.screenX-Oc.screenX,W0=i.screenY-Oc.screenY):W0=Y0=0,Oc=i),Y0)},movementY:function(i){return"movementY"in i?i.movementY:W0}}),qb=Lr(rd),G7=h({},rd,{dataTransfer:0}),Y7=Lr(G7),W7=h({},Nc,{relatedTarget:0}),K0=Lr(W7),K7=h({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),Q7=Lr(K7),X7=h({},is,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Z7=Lr(X7),J7=h({},is,{data:0}),Vb=Lr(J7),eR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tR={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"},nR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rR(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=nR[i])?!!s[i]:!1}function Q0(){return rR}var iR=h({},Nc,{key:function(i){if(i.key){var s=eR[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=ed(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?tR[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Q0,charCode:function(i){return i.type==="keypress"?ed(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ed(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),oR=Lr(iR),aR=h({},rd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$b=Lr(aR),sR=h({},Nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Q0}),lR=Lr(sR),cR=h({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=Lr(cR),fR=h({},rd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),dR=Lr(fR),hR=h({},is,{newState:0,oldState:0}),pR=Lr(hR),mR=[9,13,27,32],X0=xo&&"CompositionEvent"in window,jc=null;xo&&"documentMode"in document&&(jc=document.documentMode);var gR=xo&&"TextEvent"in window&&!jc,Gb=xo&&(!X0||jc&&8<jc&&11>=jc),Yb=" ",Wb=!1;function Kb(i,s){switch(i){case"keyup":return mR.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qb(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var nl=!1;function yR(i,s){switch(i){case"compositionend":return Qb(s);case"keypress":return s.which!==32?null:(Wb=!0,Yb);case"textInput":return i=s.data,i===Yb&&Wb?null:i;default:return null}}function xR(i,s){if(nl)return i==="compositionend"||!X0&&Kb(i,s)?(i=Hb(),Jf=G0=Jo=null,nl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Gb&&s.locale!=="ko"?null:s.data;default:return null}}var bR={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 Xb(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!bR[i.type]:s==="textarea"}function Zb(i,s,u,m){el?tl?tl.push(m):tl=[m]:el=m,s=Gd(s,"onChange"),0<s.length&&(u=new nd("onChange","change",null,u,m),i.push({event:u,listeners:s}))}var Mc=null,Lc=null;function vR(i){_3(i,0)}function id(i){var s=Jn(i);if(Lb(s))return i}function Jb(i,s){if(i==="change")return s}var ev=!1;if(xo){var Z0;if(xo){var J0="oninput"in document;if(!J0){var tv=document.createElement("div");tv.setAttribute("oninput","return;"),J0=typeof tv.oninput=="function"}Z0=J0}else Z0=!1;ev=Z0&&(!document.documentMode||9<document.documentMode)}function nv(){Mc&&(Mc.detachEvent("onpropertychange",rv),Lc=Mc=null)}function rv(i){if(i.propertyName==="value"&&id(Lc)){var s=[];Zb(s,Lc,i,q0(i)),Bb(vR,s)}}function wR(i,s,u){i==="focusin"?(nv(),Mc=s,Lc=u,Mc.attachEvent("onpropertychange",rv)):i==="focusout"&&nv()}function SR(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return id(Lc)}function CR(i,s){if(i==="click")return id(s)}function ER(i,s){if(i==="input"||i==="change")return id(s)}function kR(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Yr=typeof Object.is=="function"?Object.is:kR;function _c(i,s){if(Yr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var b=u[m];if(!he.call(s,b)||!Yr(i[b],s[b]))return!1}return!0}function iv(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ov(i,s){var u=iv(i);i=0;for(var m;u;){if(u.nodeType===3){if(m=i+u.textContent.length,i<=s&&m>=s)return{node:u,offset:s-i};i=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=iv(u)}}function av(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?av(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function sv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Xf(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=Xf(i.document)}return s}function em(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var TR=xo&&"documentMode"in document&&11>=document.documentMode,rl=null,tm=null,Dc=null,nm=!1;function lv(i,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;nm||rl==null||rl!==Xf(m)||(m=rl,"selectionStart"in m&&em(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Dc&&_c(Dc,m)||(Dc=m,m=Gd(tm,"onSelect"),0<m.length&&(s=new nd("onSelect","select",null,s,u),i.push({event:s,listeners:m}),s.target=rl)))}function os(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var il={animationend:os("Animation","AnimationEnd"),animationiteration:os("Animation","AnimationIteration"),animationstart:os("Animation","AnimationStart"),transitionrun:os("Transition","TransitionRun"),transitionstart:os("Transition","TransitionStart"),transitioncancel:os("Transition","TransitionCancel"),transitionend:os("Transition","TransitionEnd")},rm={},cv={};xo&&(cv=document.createElement("div").style,"AnimationEvent"in window||(delete il.animationend.animation,delete il.animationiteration.animation,delete il.animationstart.animation),"TransitionEvent"in window||delete il.transitionend.transition);function as(i){if(rm[i])return rm[i];if(!il[i])return i;var s=il[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in cv)return rm[i]=s[u];return i}var uv=as("animationend"),fv=as("animationiteration"),dv=as("animationstart"),AR=as("transitionrun"),RR=as("transitionstart"),NR=as("transitioncancel"),hv=as("transitionend"),pv=new Map,im="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(" ");im.push("scrollEnd");function zi(i,s){pv.set(i,s),Di(s,[i])}var od=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},yi=[],ol=0,om=0;function ad(){for(var i=ol,s=om=ol=0;s<i;){var u=yi[s];yi[s++]=null;var m=yi[s];yi[s++]=null;var b=yi[s];yi[s++]=null;var w=yi[s];if(yi[s++]=null,m!==null&&b!==null){var O=m.pending;O===null?b.next=b:(b.next=O.next,O.next=b),m.pending=b}w!==0&&mv(u,b,w)}}function sd(i,s,u,m){yi[ol++]=i,yi[ol++]=s,yi[ol++]=u,yi[ol++]=m,om|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function am(i,s,u,m){return sd(i,s,u,m),ld(i)}function ss(i,s){return sd(i,null,null,s),ld(i)}function mv(i,s,u){i.lanes|=u;var m=i.alternate;m!==null&&(m.lanes|=u);for(var b=!1,w=i.return;w!==null;)w.childLanes|=u,m=w.alternate,m!==null&&(m.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(b=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,b&&s!==null&&(b=31-mt(u),i=w.hiddenUpdates,m=i[b],m===null?i[b]=[s]:m.push(s),s.lane=u|536870912),w):null}function ld(i){if(50<ru)throw ru=0,mg=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var al={};function OR(i,s,u,m){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(i,s,u,m){return new OR(i,s,u,m)}function sm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function bo(i,s){var u=i.alternate;return u===null?(u=Wr(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function gv(i,s){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function cd(i,s,u,m,b,w){var O=0;if(m=i,typeof i=="function")sm(i)&&(O=1);else if(typeof i=="string")O=DN(i,u,ee.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case U:return i=Wr(31,u,s,b),i.elementType=U,i.lanes=w,i;case S:return ls(u.children,b,w,s);case E:O=8,b|=24;break;case k:return i=Wr(12,u,s,b|2),i.elementType=k,i.lanes=w,i;case j:return i=Wr(13,u,s,b),i.elementType=j,i.lanes=w,i;case N:return i=Wr(19,u,s,b),i.elementType=N,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:O=10;break e;case T:O=9;break e;case L:O=11;break e;case A:O=14;break e;case D:O=16,m=null;break e}O=29,u=Error(r(130,i===null?"null":typeof i,"")),m=null}return s=Wr(O,u,s,b),s.elementType=i,s.type=m,s.lanes=w,s}function ls(i,s,u,m){return i=Wr(7,i,m,s),i.lanes=u,i}function lm(i,s,u){return i=Wr(6,i,null,s),i.lanes=u,i}function yv(i){var s=Wr(18,null,null,0);return s.stateNode=i,s}function cm(i,s,u){return s=Wr(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var xv=new WeakMap;function xi(i,s){if(typeof i=="object"&&i!==null){var u=xv.get(i);return u!==void 0?u:(s={value:i,source:s,stack:Re(s)},xv.set(i,s),s)}return{value:i,source:s,stack:Re(s)}}var sl=[],ll=0,ud=null,Ic=0,bi=[],vi=0,ea=null,Ki=1,Qi="";function vo(i,s){sl[ll++]=Ic,sl[ll++]=ud,ud=i,Ic=s}function bv(i,s,u){bi[vi++]=Ki,bi[vi++]=Qi,bi[vi++]=ea,ea=i;var m=Ki;i=Qi;var b=32-mt(m)-1;m&=~(1<<b),u+=1;var w=32-mt(s)+b;if(30<w){var O=b-b%5;w=(m&(1<<O)-1).toString(32),m>>=O,b-=O,Ki=1<<32-mt(s)+b|u<<b|m,Qi=w+i}else Ki=1<<w|u<<b|m,Qi=i}function um(i){i.return!==null&&(vo(i,1),bv(i,1,0))}function fm(i){for(;i===ud;)ud=sl[--ll],sl[ll]=null,Ic=sl[--ll],sl[ll]=null;for(;i===ea;)ea=bi[--vi],bi[vi]=null,Qi=bi[--vi],bi[vi]=null,Ki=bi[--vi],bi[vi]=null}function vv(i,s){bi[vi++]=Ki,bi[vi++]=Qi,bi[vi++]=ea,Ki=s.id,Qi=s.overflow,ea=i}var sr=null,pn=null,_t=!1,ta=null,wi=!1,dm=Error(r(519));function na(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zc(xi(s,i)),dm}function wv(i){var s=i.stateNode,u=i.type,m=i.memoizedProps;switch(s[Le]=i,s[Fe]=m,u){case"dialog":At("cancel",s),At("close",s);break;case"iframe":case"object":case"embed":At("load",s);break;case"video":case"audio":for(u=0;u<ou.length;u++)At(ou[u],s);break;case"source":At("error",s);break;case"img":case"image":case"link":At("error",s),At("load",s);break;case"details":At("toggle",s);break;case"input":At("invalid",s),_b(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":At("invalid",s);break;case"textarea":At("invalid",s),Ib(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||P3(s.textContent,u)?(m.popover!=null&&(At("beforetoggle",s),At("toggle",s)),m.onScroll!=null&&At("scroll",s),m.onScrollEnd!=null&&At("scrollend",s),m.onClick!=null&&(s.onclick=yo),s=!0):s=!1,s||na(i,!0)}function Sv(i){for(sr=i.return;sr;)switch(sr.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:sr=sr.return}}function cl(i){if(i!==sr)return!1;if(!_t)return Sv(i),_t=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Og(i.type,i.memoizedProps)),u=!u),u&&pn&&na(i),Sv(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));pn=Y3(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));pn=Y3(i)}else s===27?(s=pn,ga(i.type)?(i=Dg,Dg=null,pn=i):pn=s):pn=sr?Ci(i.stateNode.nextSibling):null;return!0}function cs(){pn=sr=null,_t=!1}function hm(){var i=ta;return i!==null&&(zr===null?zr=i:zr.push.apply(zr,i),ta=null),i}function zc(i){ta===null?ta=[i]:ta.push(i)}var pm=P(null),us=null,wo=null;function ra(i,s,u){_(pm,s._currentValue),s._currentValue=u}function So(i){i._currentValue=pm.current,Q(pm)}function mm(i,s,u){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===u)break;i=i.return}}function gm(i,s,u,m){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var w=b.dependencies;if(w!==null){var O=b.child;w=w.firstContext;e:for(;w!==null;){var z=w;w=b;for(var K=0;K<s.length;K++)if(z.context===s[K]){w.lanes|=u,z=w.alternate,z!==null&&(z.lanes|=u),mm(w.return,u,i),m||(O=null);break e}w=z.next}}else if(b.tag===18){if(O=b.return,O===null)throw Error(r(341));O.lanes|=u,w=O.alternate,w!==null&&(w.lanes|=u),mm(O,u,i),O=null}else O=b.child;if(O!==null)O.return=b;else for(O=b;O!==null;){if(O===i){O=null;break}if(b=O.sibling,b!==null){b.return=O.return,O=b;break}O=O.return}b=O}}function ul(i,s,u,m){i=null;for(var b=s,w=!1;b!==null;){if(!w){if((b.flags&524288)!==0)w=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var O=b.alternate;if(O===null)throw Error(r(387));if(O=O.memoizedProps,O!==null){var z=b.type;Yr(b.pendingProps.value,O.value)||(i!==null?i.push(z):i=[z])}}else if(b===pe.current){if(O=b.alternate,O===null)throw Error(r(387));O.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(uu):i=[uu])}b=b.return}i!==null&&gm(s,i,u,m),s.flags|=262144}function fd(i){for(i=i.firstContext;i!==null;){if(!Yr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function fs(i){us=i,wo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function lr(i){return Cv(us,i)}function dd(i,s){return us===null&&fs(i),Cv(i,s)}function Cv(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},wo===null){if(i===null)throw Error(r(308));wo=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else wo=wo.next=s;return u}var jR=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,m){i.push(m)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},MR=e.unstable_scheduleCallback,LR=e.unstable_NormalPriority,zn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ym(){return{controller:new jR,data:new Map,refCount:0}}function Pc(i){i.refCount--,i.refCount===0&&MR(LR,function(){i.controller.abort()})}var Fc=null,xm=0,fl=0,dl=null;function _R(i,s){if(Fc===null){var u=Fc=[];xm=0,fl=wg(),dl={status:"pending",value:void 0,then:function(m){u.push(m)}}}return xm++,s.then(Ev,Ev),s}function Ev(){if(--xm===0&&Fc!==null){dl!==null&&(dl.status="fulfilled");var i=Fc;Fc=null,fl=0,dl=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function DR(i,s){var u=[],m={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){m.status="fulfilled",m.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(m.status="rejected",m.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),m}var kv=B.S;B.S=function(i,s){l3=Ue(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&_R(i,s),kv!==null&&kv(i,s)};var ds=P(null);function bm(){var i=ds.current;return i!==null?i:an.pooledCache}function hd(i,s){s===null?_(ds,ds.current):_(ds,s.pool)}function Tv(){var i=bm();return i===null?null:{parent:zn._currentValue,pool:i}}var hl=Error(r(460)),vm=Error(r(474)),pd=Error(r(542)),md={then:function(){}};function Av(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Rv(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(yo,yo),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Ov(i),i;default:if(typeof s.status=="string")s.then(yo,yo);else{if(i=an,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(m){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=m}},function(m){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Ov(i),i}throw ps=s,hl}}function hs(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ps=u,hl):u}}var ps=null;function Nv(){if(ps===null)throw Error(r(459));var i=ps;return ps=null,i}function Ov(i){if(i===hl||i===pd)throw Error(r(483))}var pl=null,Bc=0;function gd(i){var s=Bc;return Bc+=1,pl===null&&(pl=[]),Rv(pl,i,s)}function Hc(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function yd(i,s){throw s.$$typeof===y?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function jv(i){function s(te,X){if(i){var oe=te.deletions;oe===null?(te.deletions=[X],te.flags|=16):oe.push(X)}}function u(te,X){if(!i)return null;for(;X!==null;)s(te,X),X=X.sibling;return null}function m(te){for(var X=new Map;te!==null;)te.key!==null?X.set(te.key,te):X.set(te.index,te),te=te.sibling;return X}function b(te,X){return te=bo(te,X),te.index=0,te.sibling=null,te}function w(te,X,oe){return te.index=oe,i?(oe=te.alternate,oe!==null?(oe=oe.index,oe<X?(te.flags|=67108866,X):oe):(te.flags|=67108866,X)):(te.flags|=1048576,X)}function O(te){return i&&te.alternate===null&&(te.flags|=67108866),te}function z(te,X,oe,me){return X===null||X.tag!==6?(X=lm(oe,te.mode,me),X.return=te,X):(X=b(X,oe),X.return=te,X)}function K(te,X,oe,me){var at=oe.type;return at===S?de(te,X,oe.props.children,me,oe.key):X!==null&&(X.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===D&&hs(at)===X.type)?(X=b(X,oe.props),Hc(X,oe),X.return=te,X):(X=cd(oe.type,oe.key,oe.props,null,te.mode,me),Hc(X,oe),X.return=te,X)}function se(te,X,oe,me){return X===null||X.tag!==4||X.stateNode.containerInfo!==oe.containerInfo||X.stateNode.implementation!==oe.implementation?(X=cm(oe,te.mode,me),X.return=te,X):(X=b(X,oe.children||[]),X.return=te,X)}function de(te,X,oe,me,at){return X===null||X.tag!==7?(X=ls(oe,te.mode,me,at),X.return=te,X):(X=b(X,oe),X.return=te,X)}function ge(te,X,oe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=lm(""+X,te.mode,oe),X.return=te,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case x:return oe=cd(X.type,X.key,X.props,null,te.mode,oe),Hc(oe,X),oe.return=te,oe;case v:return X=cm(X,te.mode,oe),X.return=te,X;case D:return X=hs(X),ge(te,X,oe)}if(H(X)||$(X))return X=ls(X,te.mode,oe,null),X.return=te,X;if(typeof X.then=="function")return ge(te,gd(X),oe);if(X.$$typeof===R)return ge(te,dd(te,X),oe);yd(te,X)}return null}function ce(te,X,oe,me){var at=X!==null?X.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return at!==null?null:z(te,X,""+oe,me);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return oe.key===at?K(te,X,oe,me):null;case v:return oe.key===at?se(te,X,oe,me):null;case D:return oe=hs(oe),ce(te,X,oe,me)}if(H(oe)||$(oe))return at!==null?null:de(te,X,oe,me,null);if(typeof oe.then=="function")return ce(te,X,gd(oe),me);if(oe.$$typeof===R)return ce(te,X,dd(te,oe),me);yd(te,oe)}return null}function ue(te,X,oe,me,at){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return te=te.get(oe)||null,z(X,te,""+me,at);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return te=te.get(me.key===null?oe:me.key)||null,K(X,te,me,at);case v:return te=te.get(me.key===null?oe:me.key)||null,se(X,te,me,at);case D:return me=hs(me),ue(te,X,oe,me,at)}if(H(me)||$(me))return te=te.get(oe)||null,de(X,te,me,at,null);if(typeof me.then=="function")return ue(te,X,oe,gd(me),at);if(me.$$typeof===R)return ue(te,X,oe,dd(X,me),at);yd(X,me)}return null}function $e(te,X,oe,me){for(var at=null,Bt=null,Je=X,xt=X=0,Nt=null;Je!==null&&xt<oe.length;xt++){Je.index>xt?(Nt=Je,Je=null):Nt=Je.sibling;var Ht=ce(te,Je,oe[xt],me);if(Ht===null){Je===null&&(Je=Nt);break}i&&Je&&Ht.alternate===null&&s(te,Je),X=w(Ht,X,xt),Bt===null?at=Ht:Bt.sibling=Ht,Bt=Ht,Je=Nt}if(xt===oe.length)return u(te,Je),_t&&vo(te,xt),at;if(Je===null){for(;xt<oe.length;xt++)Je=ge(te,oe[xt],me),Je!==null&&(X=w(Je,X,xt),Bt===null?at=Je:Bt.sibling=Je,Bt=Je);return _t&&vo(te,xt),at}for(Je=m(Je);xt<oe.length;xt++)Nt=ue(Je,te,xt,oe[xt],me),Nt!==null&&(i&&Nt.alternate!==null&&Je.delete(Nt.key===null?xt:Nt.key),X=w(Nt,X,xt),Bt===null?at=Nt:Bt.sibling=Nt,Bt=Nt);return i&&Je.forEach(function(wa){return s(te,wa)}),_t&&vo(te,xt),at}function ct(te,X,oe,me){if(oe==null)throw Error(r(151));for(var at=null,Bt=null,Je=X,xt=X=0,Nt=null,Ht=oe.next();Je!==null&&!Ht.done;xt++,Ht=oe.next()){Je.index>xt?(Nt=Je,Je=null):Nt=Je.sibling;var wa=ce(te,Je,Ht.value,me);if(wa===null){Je===null&&(Je=Nt);break}i&&Je&&wa.alternate===null&&s(te,Je),X=w(wa,X,xt),Bt===null?at=wa:Bt.sibling=wa,Bt=wa,Je=Nt}if(Ht.done)return u(te,Je),_t&&vo(te,xt),at;if(Je===null){for(;!Ht.done;xt++,Ht=oe.next())Ht=ge(te,Ht.value,me),Ht!==null&&(X=w(Ht,X,xt),Bt===null?at=Ht:Bt.sibling=Ht,Bt=Ht);return _t&&vo(te,xt),at}for(Je=m(Je);!Ht.done;xt++,Ht=oe.next())Ht=ue(Je,te,xt,Ht.value,me),Ht!==null&&(i&&Ht.alternate!==null&&Je.delete(Ht.key===null?xt:Ht.key),X=w(Ht,X,xt),Bt===null?at=Ht:Bt.sibling=Ht,Bt=Ht);return i&&Je.forEach(function(GN){return s(te,GN)}),_t&&vo(te,xt),at}function nn(te,X,oe,me){if(typeof oe=="object"&&oe!==null&&oe.type===S&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:e:{for(var at=oe.key;X!==null;){if(X.key===at){if(at=oe.type,at===S){if(X.tag===7){u(te,X.sibling),me=b(X,oe.props.children),me.return=te,te=me;break e}}else if(X.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===D&&hs(at)===X.type){u(te,X.sibling),me=b(X,oe.props),Hc(me,oe),me.return=te,te=me;break e}u(te,X);break}else s(te,X);X=X.sibling}oe.type===S?(me=ls(oe.props.children,te.mode,me,oe.key),me.return=te,te=me):(me=cd(oe.type,oe.key,oe.props,null,te.mode,me),Hc(me,oe),me.return=te,te=me)}return O(te);case v:e:{for(at=oe.key;X!==null;){if(X.key===at)if(X.tag===4&&X.stateNode.containerInfo===oe.containerInfo&&X.stateNode.implementation===oe.implementation){u(te,X.sibling),me=b(X,oe.children||[]),me.return=te,te=me;break e}else{u(te,X);break}else s(te,X);X=X.sibling}me=cm(oe,te.mode,me),me.return=te,te=me}return O(te);case D:return oe=hs(oe),nn(te,X,oe,me)}if(H(oe))return $e(te,X,oe,me);if($(oe)){if(at=$(oe),typeof at!="function")throw Error(r(150));return oe=at.call(oe),ct(te,X,oe,me)}if(typeof oe.then=="function")return nn(te,X,gd(oe),me);if(oe.$$typeof===R)return nn(te,X,dd(te,oe),me);yd(te,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,X!==null&&X.tag===6?(u(te,X.sibling),me=b(X,oe),me.return=te,te=me):(u(te,X),me=lm(oe,te.mode,me),me.return=te,te=me),O(te)):u(te,X)}return function(te,X,oe,me){try{Bc=0;var at=nn(te,X,oe,me);return pl=null,at}catch(Je){if(Je===hl||Je===pd)throw Je;var Bt=Wr(29,Je,null,te.mode);return Bt.lanes=me,Bt.return=te,Bt}}}var ms=jv(!0),Mv=jv(!1),ia=!1;function wm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sm(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function oa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function aa(i,s,u){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(qt&2)!==0){var b=m.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),m.pending=s,s=ld(i),mv(i,null,u),s}return sd(i,m,s,u),ld(i)}function Uc(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=i.pendingLanes,u|=m,s.lanes=u,W(i,u)}}function Cm(i,s){var u=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var b=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var O={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?b=w=O:w=w.next=O,u=u.next}while(u!==null);w===null?b=w=s:w=w.next=s}else b=w=s;u={baseState:m.baseState,firstBaseUpdate:b,lastBaseUpdate:w,shared:m.shared,callbacks:m.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var Em=!1;function qc(){if(Em){var i=dl;if(i!==null)throw i}}function Vc(i,s,u,m){Em=!1;var b=i.updateQueue;ia=!1;var w=b.firstBaseUpdate,O=b.lastBaseUpdate,z=b.shared.pending;if(z!==null){b.shared.pending=null;var K=z,se=K.next;K.next=null,O===null?w=se:O.next=se,O=K;var de=i.alternate;de!==null&&(de=de.updateQueue,z=de.lastBaseUpdate,z!==O&&(z===null?de.firstBaseUpdate=se:z.next=se,de.lastBaseUpdate=K))}if(w!==null){var ge=b.baseState;O=0,de=se=K=null,z=w;do{var ce=z.lane&-536870913,ue=ce!==z.lane;if(ue?(Rt&ce)===ce:(m&ce)===ce){ce!==0&&ce===fl&&(Em=!0),de!==null&&(de=de.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var $e=i,ct=z;ce=s;var nn=u;switch(ct.tag){case 1:if($e=ct.payload,typeof $e=="function"){ge=$e.call(nn,ge,ce);break e}ge=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=ct.payload,ce=typeof $e=="function"?$e.call(nn,ge,ce):$e,ce==null)break e;ge=h({},ge,ce);break e;case 2:ia=!0}}ce=z.callback,ce!==null&&(i.flags|=64,ue&&(i.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[ce]:ue.push(ce))}else ue={lane:ce,tag:z.tag,payload:z.payload,callback:z.callback,next:null},de===null?(se=de=ue,K=ge):de=de.next=ue,O|=ce;if(z=z.next,z===null){if(z=b.shared.pending,z===null)break;ue=z,z=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);de===null&&(K=ge),b.baseState=K,b.firstBaseUpdate=se,b.lastBaseUpdate=de,w===null&&(b.shared.lanes=0),fa|=O,i.lanes=O,i.memoizedState=ge}}function Lv(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function _v(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Lv(u[i],s)}var ml=P(null),xd=P(0);function Dv(i,s){i=jo,_(xd,i),_(ml,s),jo=i|s.baseLanes}function km(){_(xd,jo),_(ml,ml.current)}function Tm(){jo=xd.current,Q(ml),Q(xd)}var Kr=P(null),Si=null;function sa(i){var s=i.alternate;_(jn,jn.current&1),_(Kr,i),Si===null&&(s===null||ml.current!==null||s.memoizedState!==null)&&(Si=i)}function Am(i){_(jn,jn.current),_(Kr,i),Si===null&&(Si=i)}function Iv(i){i.tag===22?(_(jn,jn.current),_(Kr,i),Si===null&&(Si=i)):la()}function la(){_(jn,jn.current),_(Kr,Kr.current)}function Qr(i){Q(Kr),Si===i&&(Si=null),Q(jn)}var jn=P(0);function bd(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Lg(u)||_g(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Co=0,gt=null,en=null,Pn=null,vd=!1,gl=!1,gs=!1,wd=0,$c=0,yl=null,IR=0;function Tn(){throw Error(r(321))}function Rm(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Yr(i[u],s[u]))return!1;return!0}function Nm(i,s,u,m,b,w){return Co=w,gt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=i===null||i.memoizedState===null?bw:Vm,gs=!1,w=u(m,b),gs=!1,gl&&(w=Pv(s,u,m,b)),zv(i),w}function zv(i){B.H=Wc;var s=en!==null&&en.next!==null;if(Co=0,Pn=en=gt=null,vd=!1,$c=0,yl=null,s)throw Error(r(300));i===null||Fn||(i=i.dependencies,i!==null&&fd(i)&&(Fn=!0))}function Pv(i,s,u,m){gt=i;var b=0;do{if(gl&&(yl=null),$c=0,gl=!1,25<=b)throw Error(r(301));if(b+=1,Pn=en=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}B.H=vw,w=s(u,m)}while(gl);return w}function zR(){var i=B.H,s=i.useState()[0];return s=typeof s.then=="function"?Gc(s):s,i=i.useState()[0],(en!==null?en.memoizedState:null)!==i&&(gt.flags|=1024),s}function Om(){var i=wd!==0;return wd=0,i}function jm(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function Mm(i){if(vd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}vd=!1}Co=0,Pn=en=gt=null,gl=!1,$c=wd=0,yl=null}function Sr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pn===null?gt.memoizedState=Pn=i:Pn=Pn.next=i,Pn}function Mn(){if(en===null){var i=gt.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var s=Pn===null?gt.memoizedState:Pn.next;if(s!==null)Pn=s,en=i;else{if(i===null)throw gt.alternate===null?Error(r(467)):Error(r(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},Pn===null?gt.memoizedState=Pn=i:Pn=Pn.next=i}return Pn}function Sd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gc(i){var s=$c;return $c+=1,yl===null&&(yl=[]),i=Rv(yl,i,s),s=gt,(Pn===null?s.memoizedState:Pn.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?bw:Vm),i}function Cd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Gc(i);if(i.$$typeof===R)return lr(i)}throw Error(r(438,String(i)))}function Lm(i){var s=null,u=gt.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=gt.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Sd(),gt.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),m=0;m<i;m++)u[m]=I;return s.index++,u}function Eo(i,s){return typeof s=="function"?s(i):s}function Ed(i){var s=Mn();return _m(s,en,i)}function _m(i,s,u){var m=i.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var b=i.baseQueue,w=m.pending;if(w!==null){if(b!==null){var O=b.next;b.next=w.next,w.next=O}s.baseQueue=b=w,m.pending=null}if(w=i.baseState,b===null)i.memoizedState=w;else{s=b.next;var z=O=null,K=null,se=s,de=!1;do{var ge=se.lane&-536870913;if(ge!==se.lane?(Rt&ge)===ge:(Co&ge)===ge){var ce=se.revertLane;if(ce===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ge===fl&&(de=!0);else if((Co&ce)===ce){se=se.next,ce===fl&&(de=!0);continue}else ge={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},K===null?(z=K=ge,O=w):K=K.next=ge,gt.lanes|=ce,fa|=ce;ge=se.action,gs&&u(w,ge),w=se.hasEagerState?se.eagerState:u(w,ge)}else ce={lane:ge,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},K===null?(z=K=ce,O=w):K=K.next=ce,gt.lanes|=ge,fa|=ge;se=se.next}while(se!==null&&se!==s);if(K===null?O=w:K.next=z,!Yr(w,i.memoizedState)&&(Fn=!0,de&&(u=dl,u!==null)))throw u;i.memoizedState=w,i.baseState=O,i.baseQueue=K,m.lastRenderedState=w}return b===null&&(m.lanes=0),[i.memoizedState,m.dispatch]}function Dm(i){var s=Mn(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var m=u.dispatch,b=u.pending,w=s.memoizedState;if(b!==null){u.pending=null;var O=b=b.next;do w=i(w,O.action),O=O.next;while(O!==b);Yr(w,s.memoizedState)||(Fn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,m]}function Fv(i,s,u){var m=gt,b=Mn(),w=_t;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=s();var O=!Yr((en||b).memoizedState,u);if(O&&(b.memoizedState=u,Fn=!0),b=b.queue,Pm(Uv.bind(null,m,b,i),[i]),b.getSnapshot!==s||O||Pn!==null&&Pn.memoizedState.tag&1){if(m.flags|=2048,xl(9,{destroy:void 0},Hv.bind(null,m,b,u,s),null),an===null)throw Error(r(349));w||(Co&127)!==0||Bv(m,s,u)}return u}function Bv(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=gt.updateQueue,s===null?(s=Sd(),gt.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function Hv(i,s,u,m){s.value=u,s.getSnapshot=m,qv(s)&&Vv(i)}function Uv(i,s,u){return u(function(){qv(s)&&Vv(i)})}function qv(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Yr(i,u)}catch{return!0}}function Vv(i){var s=ss(i,2);s!==null&&Pr(s,i,2)}function Im(i){var s=Sr();if(typeof i=="function"){var u=i;if(i=u(),gs){pt(!0);try{u()}finally{pt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:i},s}function $v(i,s,u,m){return i.baseState=u,_m(i,en,typeof m=="function"?m:Eo)}function PR(i,s,u,m,b){if(Ad(i))throw Error(r(485));if(i=s.action,i!==null){var w={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){w.listeners.push(O)}};B.T!==null?u(!0):w.isTransition=!1,m(w),u=s.pending,u===null?(w.next=s.pending=w,Gv(s,w)):(w.next=u.next,s.pending=u.next=w)}}function Gv(i,s){var u=s.action,m=s.payload,b=i.state;if(s.isTransition){var w=B.T,O={};B.T=O;try{var z=u(b,m),K=B.S;K!==null&&K(O,z),Yv(i,s,z)}catch(se){zm(i,s,se)}finally{w!==null&&O.types!==null&&(w.types=O.types),B.T=w}}else try{w=u(b,m),Yv(i,s,w)}catch(se){zm(i,s,se)}}function Yv(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){Wv(i,s,m)},function(m){return zm(i,s,m)}):Wv(i,s,u)}function Wv(i,s,u){s.status="fulfilled",s.value=u,Kv(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,Gv(i,u)))}function zm(i,s,u){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,Kv(s),s=s.next;while(s!==m)}i.action=null}function Kv(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Qv(i,s){return s}function Xv(i,s){if(_t){var u=an.formState;if(u!==null){e:{var m=gt;if(_t){if(pn){t:{for(var b=pn,w=wi;b.nodeType!==8;){if(!w){b=null;break t}if(b=Ci(b.nextSibling),b===null){b=null;break t}}w=b.data,b=w==="F!"||w==="F"?b:null}if(b){pn=Ci(b.nextSibling),m=b.data==="F!";break e}}na(m)}m=!1}m&&(s=u[0])}}return u=Sr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qv,lastRenderedState:s},u.queue=m,u=gw.bind(null,gt,m),m.dispatch=u,m=Im(!1),w=qm.bind(null,gt,!1,m.queue),m=Sr(),b={state:s,dispatch:null,action:i,pending:null},m.queue=b,u=PR.bind(null,gt,b,w,u),b.dispatch=u,m.memoizedState=i,[s,u,!1]}function Zv(i){var s=Mn();return Jv(s,en,i)}function Jv(i,s,u){if(s=_m(i,s,Qv)[0],i=Ed(Eo)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Gc(s)}catch(O){throw O===hl?pd:O}else m=s;s=Mn();var b=s.queue,w=b.dispatch;return u!==s.memoizedState&&(gt.flags|=2048,xl(9,{destroy:void 0},FR.bind(null,b,u),null)),[m,w,i]}function FR(i,s){i.action=s}function ew(i){var s=Mn(),u=en;if(u!==null)return Jv(s,u,i);Mn(),s=s.memoizedState,u=Mn();var m=u.queue.dispatch;return u.memoizedState=i,[s,m,!1]}function xl(i,s,u,m){return i={tag:i,create:u,deps:m,inst:s,next:null},s=gt.updateQueue,s===null&&(s=Sd(),gt.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(m=u.next,u.next=i,i.next=m,s.lastEffect=i),i}function tw(){return Mn().memoizedState}function kd(i,s,u,m){var b=Sr();gt.flags|=i,b.memoizedState=xl(1|s,{destroy:void 0},u,m===void 0?null:m)}function Td(i,s,u,m){var b=Mn();m=m===void 0?null:m;var w=b.memoizedState.inst;en!==null&&m!==null&&Rm(m,en.memoizedState.deps)?b.memoizedState=xl(s,w,u,m):(gt.flags|=i,b.memoizedState=xl(1|s,w,u,m))}function nw(i,s){kd(8390656,8,i,s)}function Pm(i,s){Td(2048,8,i,s)}function BR(i){gt.flags|=4;var s=gt.updateQueue;if(s===null)s=Sd(),gt.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function rw(i){var s=Mn().memoizedState;return BR({ref:s,nextImpl:i}),function(){if((qt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function iw(i,s){return Td(4,2,i,s)}function ow(i,s){return Td(4,4,i,s)}function aw(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function sw(i,s,u){u=u!=null?u.concat([i]):null,Td(4,4,aw.bind(null,s,i),u)}function Fm(){}function lw(i,s){var u=Mn();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Rm(s,m[1])?m[0]:(u.memoizedState=[i,s],i)}function cw(i,s){var u=Mn();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Rm(s,m[1]))return m[0];if(m=i(),gs){pt(!0);try{i()}finally{pt(!1)}}return u.memoizedState=[m,s],m}function Bm(i,s,u){return u===void 0||(Co&1073741824)!==0&&(Rt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=u3(),gt.lanes|=i,fa|=i,u)}function uw(i,s,u,m){return Yr(u,s)?u:ml.current!==null?(i=Bm(i,u,m),Yr(i,s)||(Fn=!0),i):(Co&42)===0||(Co&1073741824)!==0&&(Rt&261930)===0?(Fn=!0,i.memoizedState=u):(i=u3(),gt.lanes|=i,fa|=i,s)}function fw(i,s,u,m,b){var w=F.p;F.p=w!==0&&8>w?w:8;var O=B.T,z={};B.T=z,qm(i,!1,s,u);try{var K=b(),se=B.S;if(se!==null&&se(z,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var de=DR(K,m);Yc(i,s,de,Jr(i))}else Yc(i,s,m,Jr(i))}catch(ge){Yc(i,s,{then:function(){},status:"rejected",reason:ge},Jr())}finally{F.p=w,O!==null&&z.types!==null&&(O.types=z.types),B.T=O}}function HR(){}function Hm(i,s,u,m){if(i.tag!==5)throw Error(r(476));var b=dw(i).queue;fw(i,b,s,G,u===null?HR:function(){return hw(i),u(m)})}function dw(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:G},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function hw(i){var s=dw(i);s.next===null&&(s=i.alternate.memoizedState),Yc(i,s.next.queue,{},Jr())}function Um(){return lr(uu)}function pw(){return Mn().memoizedState}function mw(){return Mn().memoizedState}function UR(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=Jr();i=oa(u);var m=aa(s,i,u);m!==null&&(Pr(m,s,u),Uc(m,s,u)),s={cache:ym()},i.payload=s;return}s=s.return}}function qR(i,s,u){var m=Jr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ad(i)?yw(s,u):(u=am(i,s,u,m),u!==null&&(Pr(u,i,m),xw(u,s,m)))}function gw(i,s,u){var m=Jr();Yc(i,s,u,m)}function Yc(i,s,u,m){var b={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ad(i))yw(s,b);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var O=s.lastRenderedState,z=w(O,u);if(b.hasEagerState=!0,b.eagerState=z,Yr(z,O))return sd(i,s,b,0),an===null&&ad(),!1}catch{}if(u=am(i,s,b,m),u!==null)return Pr(u,i,m),xw(u,s,m),!0}return!1}function qm(i,s,u,m){if(m={lane:2,revertLane:wg(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Ad(i)){if(s)throw Error(r(479))}else s=am(i,u,m,2),s!==null&&Pr(s,i,2)}function Ad(i){var s=i.alternate;return i===gt||s!==null&&s===gt}function yw(i,s){gl=vd=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function xw(i,s,u){if((u&4194048)!==0){var m=s.lanes;m&=i.pendingLanes,u|=m,s.lanes=u,W(i,u)}}var Wc={readContext:lr,use:Cd,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useLayoutEffect:Tn,useInsertionEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useSyncExternalStore:Tn,useId:Tn,useHostTransitionStatus:Tn,useFormState:Tn,useActionState:Tn,useOptimistic:Tn,useMemoCache:Tn,useCacheRefresh:Tn};Wc.useEffectEvent=Tn;var bw={readContext:lr,use:Cd,useCallback:function(i,s){return Sr().memoizedState=[i,s===void 0?null:s],i},useContext:lr,useEffect:nw,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,kd(4194308,4,aw.bind(null,s,i),u)},useLayoutEffect:function(i,s){return kd(4194308,4,i,s)},useInsertionEffect:function(i,s){kd(4,2,i,s)},useMemo:function(i,s){var u=Sr();s=s===void 0?null:s;var m=i();if(gs){pt(!0);try{i()}finally{pt(!1)}}return u.memoizedState=[m,s],m},useReducer:function(i,s,u){var m=Sr();if(u!==void 0){var b=u(s);if(gs){pt(!0);try{u(s)}finally{pt(!1)}}}else b=s;return m.memoizedState=m.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},m.queue=i,i=i.dispatch=qR.bind(null,gt,i),[m.memoizedState,i]},useRef:function(i){var s=Sr();return i={current:i},s.memoizedState=i},useState:function(i){i=Im(i);var s=i.queue,u=gw.bind(null,gt,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:Fm,useDeferredValue:function(i,s){var u=Sr();return Bm(u,i,s)},useTransition:function(){var i=Im(!1);return i=fw.bind(null,gt,i.queue,!0,!1),Sr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var m=gt,b=Sr();if(_t){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),an===null)throw Error(r(349));(Rt&127)!==0||Bv(m,s,u)}b.memoizedState=u;var w={value:u,getSnapshot:s};return b.queue=w,nw(Uv.bind(null,m,w,i),[i]),m.flags|=2048,xl(9,{destroy:void 0},Hv.bind(null,m,w,u,s),null),u},useId:function(){var i=Sr(),s=an.identifierPrefix;if(_t){var u=Qi,m=Ki;u=(m&~(1<<32-mt(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=wd++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=IR++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:Um,useFormState:Xv,useActionState:Xv,useOptimistic:function(i){var s=Sr();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=qm.bind(null,gt,!0,u),u.dispatch=s,[i,s]},useMemoCache:Lm,useCacheRefresh:function(){return Sr().memoizedState=UR.bind(null,gt)},useEffectEvent:function(i){var s=Sr(),u={impl:i};return s.memoizedState=u,function(){if((qt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Vm={readContext:lr,use:Cd,useCallback:lw,useContext:lr,useEffect:Pm,useImperativeHandle:sw,useInsertionEffect:iw,useLayoutEffect:ow,useMemo:cw,useReducer:Ed,useRef:tw,useState:function(){return Ed(Eo)},useDebugValue:Fm,useDeferredValue:function(i,s){var u=Mn();return uw(u,en.memoizedState,i,s)},useTransition:function(){var i=Ed(Eo)[0],s=Mn().memoizedState;return[typeof i=="boolean"?i:Gc(i),s]},useSyncExternalStore:Fv,useId:pw,useHostTransitionStatus:Um,useFormState:Zv,useActionState:Zv,useOptimistic:function(i,s){var u=Mn();return $v(u,en,i,s)},useMemoCache:Lm,useCacheRefresh:mw};Vm.useEffectEvent=rw;var vw={readContext:lr,use:Cd,useCallback:lw,useContext:lr,useEffect:Pm,useImperativeHandle:sw,useInsertionEffect:iw,useLayoutEffect:ow,useMemo:cw,useReducer:Dm,useRef:tw,useState:function(){return Dm(Eo)},useDebugValue:Fm,useDeferredValue:function(i,s){var u=Mn();return en===null?Bm(u,i,s):uw(u,en.memoizedState,i,s)},useTransition:function(){var i=Dm(Eo)[0],s=Mn().memoizedState;return[typeof i=="boolean"?i:Gc(i),s]},useSyncExternalStore:Fv,useId:pw,useHostTransitionStatus:Um,useFormState:ew,useActionState:ew,useOptimistic:function(i,s){var u=Mn();return en!==null?$v(u,en,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Lm,useCacheRefresh:mw};vw.useEffectEvent=rw;function $m(i,s,u,m){s=i.memoizedState,u=u(m,s),u=u==null?s:h({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Gm={enqueueSetState:function(i,s,u){i=i._reactInternals;var m=Jr(),b=oa(m);b.payload=s,u!=null&&(b.callback=u),s=aa(i,b,m),s!==null&&(Pr(s,i,m),Uc(s,i,m))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var m=Jr(),b=oa(m);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=aa(i,b,m),s!==null&&(Pr(s,i,m),Uc(s,i,m))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=Jr(),m=oa(u);m.tag=2,s!=null&&(m.callback=s),s=aa(i,m,u),s!==null&&(Pr(s,i,u),Uc(s,i,u))}};function ww(i,s,u,m,b,w,O){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,O):s.prototype&&s.prototype.isPureReactComponent?!_c(u,m)||!_c(b,w):!0}function Sw(i,s,u,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==i&&Gm.enqueueReplaceState(s,s.state,null)}function ys(i,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(i=i.defaultProps){u===s&&(u=h({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function Cw(i){od(i)}function Ew(i){console.error(i)}function kw(i){od(i)}function Rd(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function Tw(i,s,u){try{var m=i.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Ym(i,s,u){return u=oa(u),u.tag=3,u.payload={element:null},u.callback=function(){Rd(i,s)},u}function Aw(i){return i=oa(i),i.tag=3,i}function Rw(i,s,u,m){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var w=m.value;i.payload=function(){return b(w)},i.callback=function(){Tw(s,u,m)}}var O=u.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(i.callback=function(){Tw(s,u,m),typeof b!="function"&&(da===null?da=new Set([this]):da.add(this));var z=m.stack;this.componentDidCatch(m.value,{componentStack:z!==null?z:""})})}function VR(i,s,u,m,b){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&ul(s,u,b,!0),u=Kr.current,u!==null){switch(u.tag){case 31:case 13:return Si===null?Bd():u.alternate===null&&An===0&&(An=3),u.flags&=-257,u.flags|=65536,u.lanes=b,m===md?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),xg(i,m,b)),!1;case 22:return u.flags|=65536,m===md?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),xg(i,m,b)),!1}throw Error(r(435,u.tag))}return xg(i,m,b),Bd(),!1}if(_t)return s=Kr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,m!==dm&&(i=Error(r(422),{cause:m}),zc(xi(i,u)))):(m!==dm&&(s=Error(r(423),{cause:m}),zc(xi(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,m=xi(m,u),b=Ym(i.stateNode,m,b),Cm(i,b),An!==4&&(An=2)),!1;var w=Error(r(520),{cause:m});if(w=xi(w,u),nu===null?nu=[w]:nu.push(w),An!==4&&(An=2),s===null)return!0;m=xi(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=Ym(u.stateNode,m,i),Cm(u,i),!1;case 1:if(s=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(da===null||!da.has(w))))return u.flags|=65536,b&=-b,u.lanes|=b,b=Aw(b),Rw(b,i,u,m),Cm(u,b),!1}u=u.return}while(u!==null);return!1}var Wm=Error(r(461)),Fn=!1;function cr(i,s,u,m){s.child=i===null?Mv(s,null,u,m):ms(s,i.child,u,m)}function Nw(i,s,u,m,b){u=u.render;var w=s.ref;if("ref"in m){var O={};for(var z in m)z!=="ref"&&(O[z]=m[z])}else O=m;return fs(s),m=Nm(i,s,u,O,w,b),z=Om(),i!==null&&!Fn?(jm(i,s,b),ko(i,s,b)):(_t&&z&&um(s),s.flags|=1,cr(i,s,m,b),s.child)}function Ow(i,s,u,m,b){if(i===null){var w=u.type;return typeof w=="function"&&!sm(w)&&w.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=w,jw(i,s,w,m,b)):(i=cd(u.type,null,m,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,!ng(i,b)){var O=w.memoizedProps;if(u=u.compare,u=u!==null?u:_c,u(O,m)&&i.ref===s.ref)return ko(i,s,b)}return s.flags|=1,i=bo(w,m),i.ref=s.ref,i.return=s,s.child=i}function jw(i,s,u,m,b){if(i!==null){var w=i.memoizedProps;if(_c(w,m)&&i.ref===s.ref)if(Fn=!1,s.pendingProps=m=w,ng(i,b))(i.flags&131072)!==0&&(Fn=!0);else return s.lanes=i.lanes,ko(i,s,b)}return Km(i,s,u,m,b)}function Mw(i,s,u,m){var b=m.children,w=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(m=s.child=i.child,b=0;m!==null;)b=b|m.lanes|m.childLanes,m=m.sibling;m=b&~w}else m=0,s.child=null;return Lw(i,s,w,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&hd(s,w!==null?w.cachePool:null),w!==null?Dv(s,w):km(),Iv(s);else return m=s.lanes=536870912,Lw(i,s,w!==null?w.baseLanes|u:u,u,m)}else w!==null?(hd(s,w.cachePool),Dv(s,w),la(),s.memoizedState=null):(i!==null&&hd(s,null),km(),la());return cr(i,s,b,u),s.child}function Kc(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Lw(i,s,u,m,b){var w=bm();return w=w===null?null:{parent:zn._currentValue,pool:w},s.memoizedState={baseLanes:u,cachePool:w},i!==null&&hd(s,null),km(),Iv(s),i!==null&&ul(i,s,m,!0),s.childLanes=b,null}function Nd(i,s){return s=jd({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function _w(i,s,u){return ms(s,i.child,null,u),i=Nd(s,s.pendingProps),i.flags|=2,Qr(s),s.memoizedState=null,i}function $R(i,s,u){var m=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(_t){if(m.mode==="hidden")return i=Nd(s,m),s.lanes=536870912,Kc(null,i);if(Am(s),(i=pn)?(i=G3(i,wi),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:ea!==null?{id:Ki,overflow:Qi}:null,retryLane:536870912,hydrationErrors:null},u=yv(i),u.return=s,s.child=u,sr=s,pn=null)):i=null,i===null)throw na(s);return s.lanes=536870912,null}return Nd(s,m)}var w=i.memoizedState;if(w!==null){var O=w.dehydrated;if(Am(s),b)if(s.flags&256)s.flags&=-257,s=_w(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(Fn||ul(i,s,u,!1),b=(u&i.childLanes)!==0,Fn||b){if(m=an,m!==null&&(O=Z(m,u),O!==0&&O!==w.retryLane))throw w.retryLane=O,ss(i,O),Pr(m,i,O),Wm;Bd(),s=_w(i,s,u)}else i=w.treeContext,pn=Ci(O.nextSibling),sr=s,_t=!0,ta=null,wi=!1,i!==null&&vv(s,i),s=Nd(s,m),s.flags|=4096;return s}return i=bo(i.child,{mode:m.mode,children:m.children}),i.ref=s.ref,s.child=i,i.return=s,i}function Od(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function Km(i,s,u,m,b){return fs(s),u=Nm(i,s,u,m,void 0,b),m=Om(),i!==null&&!Fn?(jm(i,s,b),ko(i,s,b)):(_t&&m&&um(s),s.flags|=1,cr(i,s,u,b),s.child)}function Dw(i,s,u,m,b,w){return fs(s),s.updateQueue=null,u=Pv(s,m,u,b),zv(i),m=Om(),i!==null&&!Fn?(jm(i,s,w),ko(i,s,w)):(_t&&m&&um(s),s.flags|=1,cr(i,s,u,w),s.child)}function Iw(i,s,u,m,b){if(fs(s),s.stateNode===null){var w=al,O=u.contextType;typeof O=="object"&&O!==null&&(w=lr(O)),w=new u(m,w),s.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Gm,s.stateNode=w,w._reactInternals=s,w=s.stateNode,w.props=m,w.state=s.memoizedState,w.refs={},wm(s),O=u.contextType,w.context=typeof O=="object"&&O!==null?lr(O):al,w.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&($m(s,u,O,m),w.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(O=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),O!==w.state&&Gm.enqueueReplaceState(w,w.state,null),Vc(s,m,w,b),qc(),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(i===null){w=s.stateNode;var z=s.memoizedProps,K=ys(u,z);w.props=K;var se=w.context,de=u.contextType;O=al,typeof de=="object"&&de!==null&&(O=lr(de));var ge=u.getDerivedStateFromProps;de=typeof ge=="function"||typeof w.getSnapshotBeforeUpdate=="function",z=s.pendingProps!==z,de||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(z||se!==O)&&Sw(s,w,m,O),ia=!1;var ce=s.memoizedState;w.state=ce,Vc(s,m,w,b),qc(),se=s.memoizedState,z||ce!==se||ia?(typeof ge=="function"&&($m(s,u,ge,m),se=s.memoizedState),(K=ia||ww(s,u,K,m,ce,se,O))?(de||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=se),w.props=m,w.state=se,w.context=O,m=K):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{w=s.stateNode,Sm(i,s),O=s.memoizedProps,de=ys(u,O),w.props=de,ge=s.pendingProps,ce=w.context,se=u.contextType,K=al,typeof se=="object"&&se!==null&&(K=lr(se)),z=u.getDerivedStateFromProps,(se=typeof z=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(O!==ge||ce!==K)&&Sw(s,w,m,K),ia=!1,ce=s.memoizedState,w.state=ce,Vc(s,m,w,b),qc();var ue=s.memoizedState;O!==ge||ce!==ue||ia||i!==null&&i.dependencies!==null&&fd(i.dependencies)?(typeof z=="function"&&($m(s,u,z,m),ue=s.memoizedState),(de=ia||ww(s,u,de,m,ce,ue,K)||i!==null&&i.dependencies!==null&&fd(i.dependencies))?(se||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(m,ue,K),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(m,ue,K)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||O===i.memoizedProps&&ce===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ce===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=ue),w.props=m,w.state=ue,w.context=K,m=de):(typeof w.componentDidUpdate!="function"||O===i.memoizedProps&&ce===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ce===i.memoizedState||(s.flags|=1024),m=!1)}return w=m,Od(i,s),m=(s.flags&128)!==0,w||m?(w=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:w.render(),s.flags|=1,i!==null&&m?(s.child=ms(s,i.child,null,b),s.child=ms(s,null,u,b)):cr(i,s,u,b),s.memoizedState=w.state,i=s.child):i=ko(i,s,b),i}function zw(i,s,u,m){return cs(),s.flags|=256,cr(i,s,u,m),s.child}var Qm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xm(i){return{baseLanes:i,cachePool:Tv()}}function Zm(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=Zr),i}function Pw(i,s,u){var m=s.pendingProps,b=!1,w=(s.flags&128)!==0,O;if((O=w)||(O=i!==null&&i.memoizedState===null?!1:(jn.current&2)!==0),O&&(b=!0,s.flags&=-129),O=(s.flags&32)!==0,s.flags&=-33,i===null){if(_t){if(b?sa(s):la(),(i=pn)?(i=G3(i,wi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:ea!==null?{id:Ki,overflow:Qi}:null,retryLane:536870912,hydrationErrors:null},u=yv(i),u.return=s,s.child=u,sr=s,pn=null)):i=null,i===null)throw na(s);return _g(i)?s.lanes=32:s.lanes=536870912,null}var z=m.children;return m=m.fallback,b?(la(),b=s.mode,z=jd({mode:"hidden",children:z},b),m=ls(m,b,u,null),z.return=s,m.return=s,z.sibling=m,s.child=z,m=s.child,m.memoizedState=Xm(u),m.childLanes=Zm(i,O,u),s.memoizedState=Qm,Kc(null,m)):(sa(s),Jm(s,z))}var K=i.memoizedState;if(K!==null&&(z=K.dehydrated,z!==null)){if(w)s.flags&256?(sa(s),s.flags&=-257,s=eg(i,s,u)):s.memoizedState!==null?(la(),s.child=i.child,s.flags|=128,s=null):(la(),z=m.fallback,b=s.mode,m=jd({mode:"visible",children:m.children},b),z=ls(z,b,u,null),z.flags|=2,m.return=s,z.return=s,m.sibling=z,s.child=m,ms(s,i.child,null,u),m=s.child,m.memoizedState=Xm(u),m.childLanes=Zm(i,O,u),s.memoizedState=Qm,s=Kc(null,m));else if(sa(s),_g(z)){if(O=z.nextSibling&&z.nextSibling.dataset,O)var se=O.dgst;O=se,m=Error(r(419)),m.stack="",m.digest=O,zc({value:m,source:null,stack:null}),s=eg(i,s,u)}else if(Fn||ul(i,s,u,!1),O=(u&i.childLanes)!==0,Fn||O){if(O=an,O!==null&&(m=Z(O,u),m!==0&&m!==K.retryLane))throw K.retryLane=m,ss(i,m),Pr(O,i,m),Wm;Lg(z)||Bd(),s=eg(i,s,u)}else Lg(z)?(s.flags|=192,s.child=i.child,s=null):(i=K.treeContext,pn=Ci(z.nextSibling),sr=s,_t=!0,ta=null,wi=!1,i!==null&&vv(s,i),s=Jm(s,m.children),s.flags|=4096);return s}return b?(la(),z=m.fallback,b=s.mode,K=i.child,se=K.sibling,m=bo(K,{mode:"hidden",children:m.children}),m.subtreeFlags=K.subtreeFlags&65011712,se!==null?z=bo(se,z):(z=ls(z,b,u,null),z.flags|=2),z.return=s,m.return=s,m.sibling=z,s.child=m,Kc(null,m),m=s.child,z=i.child.memoizedState,z===null?z=Xm(u):(b=z.cachePool,b!==null?(K=zn._currentValue,b=b.parent!==K?{parent:K,pool:K}:b):b=Tv(),z={baseLanes:z.baseLanes|u,cachePool:b}),m.memoizedState=z,m.childLanes=Zm(i,O,u),s.memoizedState=Qm,Kc(i.child,m)):(sa(s),u=i.child,i=u.sibling,u=bo(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,i!==null&&(O=s.deletions,O===null?(s.deletions=[i],s.flags|=16):O.push(i)),s.child=u,s.memoizedState=null,u)}function Jm(i,s){return s=jd({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function jd(i,s){return i=Wr(22,i,null,s),i.lanes=0,i}function eg(i,s,u){return ms(s,i.child,null,u),i=Jm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function Fw(i,s,u){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),mm(i.return,s,u)}function tg(i,s,u,m,b,w){var O=i.memoizedState;O===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:b,treeForkCount:w}:(O.isBackwards=s,O.rendering=null,O.renderingStartTime=0,O.last=m,O.tail=u,O.tailMode=b,O.treeForkCount=w)}function Bw(i,s,u){var m=s.pendingProps,b=m.revealOrder,w=m.tail;m=m.children;var O=jn.current,z=(O&2)!==0;if(z?(O=O&1|2,s.flags|=128):O&=1,_(jn,O),cr(i,s,m,u),m=_t?Ic:0,!z&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Fw(i,u,s);else if(i.tag===19)Fw(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=s.child,b=null;u!==null;)i=u.alternate,i!==null&&bd(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),tg(s,!1,b,u,w,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&bd(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}tg(s,!0,u,null,w,m);break;case"together":tg(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function ko(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),fa|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(ul(i,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,u=bo(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=bo(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function ng(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&fd(i)))}function GR(i,s,u){switch(s.tag){case 3:fe(s,s.stateNode.containerInfo),ra(s,zn,i.memoizedState.cache),cs();break;case 27:case 5:Ee(s);break;case 4:fe(s,s.stateNode.containerInfo);break;case 10:ra(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Am(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(sa(s),s.flags|=128,null):(u&s.child.childLanes)!==0?Pw(i,s,u):(sa(s),i=ko(i,s,u),i!==null?i.sibling:null);sa(s);break;case 19:var b=(i.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(ul(i,s,u,!1),m=(u&s.childLanes)!==0),b){if(m)return Bw(i,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),_(jn,jn.current),m)break;return null;case 22:return s.lanes=0,Mw(i,s,u,s.pendingProps);case 24:ra(s,zn,i.memoizedState.cache)}return ko(i,s,u)}function Hw(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)Fn=!0;else{if(!ng(i,u)&&(s.flags&128)===0)return Fn=!1,GR(i,s,u);Fn=(i.flags&131072)!==0}else Fn=!1,_t&&(s.flags&1048576)!==0&&bv(s,Ic,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(i=hs(s.elementType),s.type=i,typeof i=="function")sm(i)?(m=ys(i,m),s.tag=1,s=Iw(null,s,i,m,u)):(s.tag=0,s=Km(null,s,i,m,u));else{if(i!=null){var b=i.$$typeof;if(b===L){s.tag=11,s=Nw(null,s,i,m,u);break e}else if(b===A){s.tag=14,s=Ow(null,s,i,m,u);break e}}throw s=Y(i)||i,Error(r(306,s,""))}}return s;case 0:return Km(i,s,s.type,s.pendingProps,u);case 1:return m=s.type,b=ys(m,s.pendingProps),Iw(i,s,m,b,u);case 3:e:{if(fe(s,s.stateNode.containerInfo),i===null)throw Error(r(387));m=s.pendingProps;var w=s.memoizedState;b=w.element,Sm(i,s),Vc(s,m,null,u);var O=s.memoizedState;if(m=O.cache,ra(s,zn,m),m!==w.cache&&gm(s,[zn],u,!0),qc(),m=O.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:O.cache},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){s=zw(i,s,m,u);break e}else if(m!==b){b=xi(Error(r(424)),s),zc(b),s=zw(i,s,m,u);break e}else for(i=s.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,pn=Ci(i.firstChild),sr=s,_t=!0,ta=null,wi=!0,u=Mv(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(cs(),m===b){s=ko(i,s,u);break e}cr(i,s,m,u)}s=s.child}return s;case 26:return Od(i,s),i===null?(u=Z3(s.type,null,s.pendingProps,null))?s.memoizedState=u:_t||(u=s.type,i=s.pendingProps,m=Yd(re.current).createElement(u),m[Le]=s,m[Fe]=i,ur(m,u,i),xn(m),s.stateNode=m):s.memoizedState=Z3(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return Ee(s),i===null&&_t&&(m=s.stateNode=K3(s.type,s.pendingProps,re.current),sr=s,wi=!0,b=pn,ga(s.type)?(Dg=b,pn=Ci(m.firstChild)):pn=b),cr(i,s,s.pendingProps.children,u),Od(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&_t&&((b=m=pn)&&(m=SN(m,s.type,s.pendingProps,wi),m!==null?(s.stateNode=m,sr=s,pn=Ci(m.firstChild),wi=!1,b=!0):b=!1),b||na(s)),Ee(s),b=s.type,w=s.pendingProps,O=i!==null?i.memoizedProps:null,m=w.children,Og(b,w)?m=null:O!==null&&Og(b,O)&&(s.flags|=32),s.memoizedState!==null&&(b=Nm(i,s,zR,null,null,u),uu._currentValue=b),Od(i,s),cr(i,s,m,u),s.child;case 6:return i===null&&_t&&((i=u=pn)&&(u=CN(u,s.pendingProps,wi),u!==null?(s.stateNode=u,sr=s,pn=null,i=!0):i=!1),i||na(s)),null;case 13:return Pw(i,s,u);case 4:return fe(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=ms(s,null,m,u):cr(i,s,m,u),s.child;case 11:return Nw(i,s,s.type,s.pendingProps,u);case 7:return cr(i,s,s.pendingProps,u),s.child;case 8:return cr(i,s,s.pendingProps.children,u),s.child;case 12:return cr(i,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ra(s,s.type,m.value),cr(i,s,m.children,u),s.child;case 9:return b=s.type._context,m=s.pendingProps.children,fs(s),b=lr(b),m=m(b),s.flags|=1,cr(i,s,m,u),s.child;case 14:return Ow(i,s,s.type,s.pendingProps,u);case 15:return jw(i,s,s.type,s.pendingProps,u);case 19:return Bw(i,s,u);case 31:return $R(i,s,u);case 22:return Mw(i,s,u,s.pendingProps);case 24:return fs(s),m=lr(zn),i===null?(b=bm(),b===null&&(b=an,w=ym(),b.pooledCache=w,w.refCount++,w!==null&&(b.pooledCacheLanes|=u),b=w),s.memoizedState={parent:m,cache:b},wm(s),ra(s,zn,b)):((i.lanes&u)!==0&&(Sm(i,s),Vc(s,null,null,u),qc()),b=i.memoizedState,w=s.memoizedState,b.parent!==m?(b={parent:m,cache:m},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),ra(s,zn,m)):(m=w.cache,ra(s,zn,m),m!==b.cache&&gm(s,[zn],u,!0))),cr(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function To(i){i.flags|=4}function rg(i,s,u,m,b){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(p3())i.flags|=8192;else throw ps=md,vm}else i.flags&=-16777217}function Uw(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!r5(s))if(p3())i.flags|=8192;else throw ps=md,vm}function Md(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?hn():536870912,i.lanes|=s,Sl|=s)}function Qc(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function mn(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,m=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,m|=b.subtreeFlags&65011712,m|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,m|=b.subtreeFlags,m|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=m,i.childLanes=u,s}function YR(i,s,u){var m=s.pendingProps;switch(fm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(s),null;case 1:return mn(s),null;case 3:return u=s.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),So(zn),Ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(cl(s)?To(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hm())),mn(s),null;case 26:var b=s.type,w=s.memoizedState;return i===null?(To(s),w!==null?(mn(s),Uw(s,w)):(mn(s),rg(s,b,null,m,u))):w?w!==i.memoizedState?(To(s),mn(s),Uw(s,w)):(mn(s),s.flags&=-16777217):(i=i.memoizedProps,i!==m&&To(s),mn(s),rg(s,b,i,m,u)),null;case 27:if(Ie(s),u=re.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==m&&To(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return mn(s),null}i=ee.current,cl(s)?wv(s):(i=K3(b,m,u),s.stateNode=i,To(s))}return mn(s),null;case 5:if(Ie(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==m&&To(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return mn(s),null}if(w=ee.current,cl(s))wv(s);else{var O=Yd(re.current);switch(w){case 1:w=O.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:w=O.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":w=O.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":w=O.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":w=O.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof m.is=="string"?O.createElement("select",{is:m.is}):O.createElement("select"),m.multiple?w.multiple=!0:m.size&&(w.size=m.size);break;default:w=typeof m.is=="string"?O.createElement(b,{is:m.is}):O.createElement(b)}}w[Le]=s,w[Fe]=m;e:for(O=s.child;O!==null;){if(O.tag===5||O.tag===6)w.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===s)break e;for(;O.sibling===null;){if(O.return===null||O.return===s)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}s.stateNode=w;e:switch(ur(w,b,m),b){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&To(s)}}return mn(s),rg(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==m&&To(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(i=re.current,cl(s)){if(i=s.stateNode,u=s.memoizedProps,m=null,b=sr,b!==null)switch(b.tag){case 27:case 5:m=b.memoizedProps}i[Le]=s,i=!!(i.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||P3(i.nodeValue,u)),i||na(s,!0)}else i=Yd(i).createTextNode(m),i[Le]=s,s.stateNode=i}return mn(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(m=cl(s),u!==null){if(i===null){if(!m)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Le]=s}else cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;mn(s),i=!1}else u=hm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(Qr(s),s):(Qr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return mn(s),null;case 13:if(m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=cl(s),m!==null&&m.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[Le]=s}else cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;mn(s),b=!1}else b=hm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(Qr(s),s):(Qr(s),null)}return Qr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,i=i!==null&&i.memoizedState!==null,u&&(m=s.child,b=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(b=m.alternate.memoizedState.cachePool.pool),w=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(w=m.memoizedState.cachePool.pool),w!==b&&(m.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),Md(s,s.updateQueue),mn(s),null);case 4:return Ce(),i===null&&kg(s.stateNode.containerInfo),mn(s),null;case 10:return So(s.type),mn(s),null;case 19:if(Q(jn),m=s.memoizedState,m===null)return mn(s),null;if(b=(s.flags&128)!==0,w=m.rendering,w===null)if(b)Qc(m,!1);else{if(An!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(w=bd(i),w!==null){for(s.flags|=128,Qc(m,!1),i=w.updateQueue,s.updateQueue=i,Md(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)gv(u,i),u=u.sibling;return _(jn,jn.current&1|2),_t&&vo(s,m.treeForkCount),s.child}i=i.sibling}m.tail!==null&&Ue()>zd&&(s.flags|=128,b=!0,Qc(m,!1),s.lanes=4194304)}else{if(!b)if(i=bd(w),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,Md(s,i),Qc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!_t)return mn(s),null}else 2*Ue()-m.renderingStartTime>zd&&u!==536870912&&(s.flags|=128,b=!0,Qc(m,!1),s.lanes=4194304);m.isBackwards?(w.sibling=s.child,s.child=w):(i=m.last,i!==null?i.sibling=w:s.child=w,m.last=w)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Ue(),i.sibling=null,u=jn.current,_(jn,b?u&1|2:u&1),_t&&vo(s,m.treeForkCount),i):(mn(s),null);case 22:case 23:return Qr(s),Tm(),m=s.memoizedState!==null,i!==null?i.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(mn(s),s.subtreeFlags&6&&(s.flags|=8192)):mn(s),u=s.updateQueue,u!==null&&Md(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),i!==null&&Q(ds),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),So(zn),mn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function WR(i,s){switch(fm(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return So(zn),Ce(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Ie(s),null;case 31:if(s.memoizedState!==null){if(Qr(s),s.alternate===null)throw Error(r(340));cs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Qr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));cs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Q(jn),null;case 4:return Ce(),null;case 10:return So(s.type),null;case 22:case 23:return Qr(s),Tm(),i!==null&&Q(ds),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return So(zn),null;case 25:return null;default:return null}}function qw(i,s){switch(fm(s),s.tag){case 3:So(zn),Ce();break;case 26:case 27:case 5:Ie(s);break;case 4:Ce();break;case 31:s.memoizedState!==null&&Qr(s);break;case 13:Qr(s);break;case 19:Q(jn);break;case 10:So(s.type);break;case 22:case 23:Qr(s),Tm(),i!==null&&Q(ds);break;case 24:So(zn)}}function Xc(i,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var b=m.next;u=b;do{if((u.tag&i)===i){m=void 0;var w=u.create,O=u.inst;m=w(),O.destroy=m}u=u.next}while(u!==b)}}catch(z){Xt(s,s.return,z)}}function ca(i,s,u){try{var m=s.updateQueue,b=m!==null?m.lastEffect:null;if(b!==null){var w=b.next;m=w;do{if((m.tag&i)===i){var O=m.inst,z=O.destroy;if(z!==void 0){O.destroy=void 0,b=s;var K=u,se=z;try{se()}catch(de){Xt(b,K,de)}}}m=m.next}while(m!==w)}}catch(de){Xt(s,s.return,de)}}function Vw(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{_v(s,u)}catch(m){Xt(i,i.return,m)}}}function $w(i,s,u){u.props=ys(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(m){Xt(i,s,m)}}function Zc(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var m=i.stateNode;break;case 30:m=i.stateNode;break;default:m=i.stateNode}typeof u=="function"?i.refCleanup=u(m):u.current=m}}catch(b){Xt(i,s,b)}}function Xi(i,s){var u=i.ref,m=i.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(b){Xt(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Xt(i,s,b)}else u.current=null}function Gw(i){var s=i.type,u=i.memoizedProps,m=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(b){Xt(i,i.return,b)}}function ig(i,s,u){try{var m=i.stateNode;gN(m,i.type,u,s),m[Fe]=s}catch(b){Xt(i,i.return,b)}}function Yw(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ga(i.type)||i.tag===4}function og(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ga(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ag(i,s,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=yo));else if(m!==4&&(m===27&&ga(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(ag(i,s,u),i=i.sibling;i!==null;)ag(i,s,u),i=i.sibling}function Ld(i,s,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(m!==4&&(m===27&&ga(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Ld(i,s,u),i=i.sibling;i!==null;)Ld(i,s,u),i=i.sibling}function Ww(i){var s=i.stateNode,u=i.memoizedProps;try{for(var m=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);ur(s,m,u),s[Le]=i,s[Fe]=u}catch(w){Xt(i,i.return,w)}}var Ao=!1,Bn=!1,sg=!1,Kw=typeof WeakSet=="function"?WeakSet:Set,er=null;function KR(i,s){if(i=i.containerInfo,Rg=eh,i=sv(i),em(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var b=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var O=0,z=-1,K=-1,se=0,de=0,ge=i,ce=null;t:for(;;){for(var ue;ge!==u||b!==0&&ge.nodeType!==3||(z=O+b),ge!==w||m!==0&&ge.nodeType!==3||(K=O+m),ge.nodeType===3&&(O+=ge.nodeValue.length),(ue=ge.firstChild)!==null;)ce=ge,ge=ue;for(;;){if(ge===i)break t;if(ce===u&&++se===b&&(z=O),ce===w&&++de===m&&(K=O),(ue=ge.nextSibling)!==null)break;ge=ce,ce=ge.parentNode}ge=ue}u=z===-1||K===-1?null:{start:z,end:K}}else u=null}u=u||{start:0,end:0}}else u=null;for(Ng={focusedElem:i,selectionRange:u},eh=!1,er=s;er!==null;)if(s=er,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,er=i;else for(;er!==null;){switch(s=er,w=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=s,b=w.memoizedProps,w=w.memoizedState,m=u.stateNode;try{var $e=ys(u.type,b);i=m.getSnapshotBeforeUpdate($e,w),m.__reactInternalSnapshotBeforeUpdate=i}catch(ct){Xt(u,u.return,ct)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)Mg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Mg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,er=i;break}er=s.return}}function Qw(i,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:No(i,u),m&4&&Xc(5,u);break;case 1:if(No(i,u),m&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(O){Xt(u,u.return,O)}else{var b=ys(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(O){Xt(u,u.return,O)}}m&64&&Vw(u),m&512&&Zc(u,u.return);break;case 3:if(No(i,u),m&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{_v(i,s)}catch(O){Xt(u,u.return,O)}}break;case 27:s===null&&m&4&&Ww(u);case 26:case 5:No(i,u),s===null&&m&4&&Gw(u),m&512&&Zc(u,u.return);break;case 12:No(i,u);break;case 31:No(i,u),m&4&&Jw(i,u);break;case 13:No(i,u),m&4&&e3(i,u),m&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=iN.bind(null,u),EN(i,u))));break;case 22:if(m=u.memoizedState!==null||Ao,!m){s=s!==null&&s.memoizedState!==null||Bn,b=Ao;var w=Bn;Ao=m,(Bn=s)&&!w?Oo(i,u,(u.subtreeFlags&8772)!==0):No(i,u),Ao=b,Bn=w}break;case 30:break;default:No(i,u)}}function Xw(i){var s=i.alternate;s!==null&&(i.alternate=null,Xw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&En(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var bn=null,_r=!1;function Ro(i,s,u){for(u=u.child;u!==null;)Zw(i,s,u),u=u.sibling}function Zw(i,s,u){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(Xe,u)}catch{}switch(u.tag){case 26:Bn||Xi(u,s),Ro(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Bn||Xi(u,s);var m=bn,b=_r;ga(u.type)&&(bn=u.stateNode,_r=!1),Ro(i,s,u),su(u.stateNode),bn=m,_r=b;break;case 5:Bn||Xi(u,s);case 6:if(m=bn,b=_r,bn=null,Ro(i,s,u),bn=m,_r=b,bn!==null)if(_r)try{(bn.nodeType===9?bn.body:bn.nodeName==="HTML"?bn.ownerDocument.body:bn).removeChild(u.stateNode)}catch(w){Xt(u,s,w)}else try{bn.removeChild(u.stateNode)}catch(w){Xt(u,s,w)}break;case 18:bn!==null&&(_r?(i=bn,V3(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Ol(i)):V3(bn,u.stateNode));break;case 4:m=bn,b=_r,bn=u.stateNode.containerInfo,_r=!0,Ro(i,s,u),bn=m,_r=b;break;case 0:case 11:case 14:case 15:ca(2,u,s),Bn||ca(4,u,s),Ro(i,s,u);break;case 1:Bn||(Xi(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&$w(u,s,m)),Ro(i,s,u);break;case 21:Ro(i,s,u);break;case 22:Bn=(m=Bn)||u.memoizedState!==null,Ro(i,s,u),Bn=m;break;default:Ro(i,s,u)}}function Jw(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ol(i)}catch(u){Xt(s,s.return,u)}}}function e3(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ol(i)}catch(u){Xt(s,s.return,u)}}function QR(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new Kw),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new Kw),s;default:throw Error(r(435,i.tag))}}function _d(i,s){var u=QR(i);s.forEach(function(m){if(!u.has(m)){u.add(m);var b=oN.bind(null,i,m);m.then(b,b)}})}function Dr(i,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var b=u[m],w=i,O=s,z=O;e:for(;z!==null;){switch(z.tag){case 27:if(ga(z.type)){bn=z.stateNode,_r=!1;break e}break;case 5:bn=z.stateNode,_r=!1;break e;case 3:case 4:bn=z.stateNode.containerInfo,_r=!0;break e}z=z.return}if(bn===null)throw Error(r(160));Zw(w,O,b),bn=null,_r=!1,w=b.alternate,w!==null&&(w.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)t3(s,i),s=s.sibling}var Pi=null;function t3(i,s){var u=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Dr(s,i),Ir(i),m&4&&(ca(3,i,i.return),Xc(3,i),ca(5,i,i.return));break;case 1:Dr(s,i),Ir(i),m&512&&(Bn||u===null||Xi(u,u.return)),m&64&&Ao&&(i=i.updateQueue,i!==null&&(m=i.callbacks,m!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var b=Pi;if(Dr(s,i),Ir(i),m&512&&(Bn||u===null||Xi(u,u.return)),m&4){var w=u!==null?u.memoizedState:null;if(m=i.memoizedState,u===null)if(m===null)if(i.stateNode===null){e:{m=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(m){case"title":w=b.getElementsByTagName("title")[0],(!w||w[Sn]||w[Le]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=b.createElement(m),b.head.insertBefore(w,b.querySelector("head > title"))),ur(w,m,u),w[Le]=i,xn(w),m=w;break e;case"link":var O=t5("link","href",b).get(m+(u.href||""));if(O){for(var z=0;z<O.length;z++)if(w=O[z],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){O.splice(z,1);break t}}w=b.createElement(m),ur(w,m,u),b.head.appendChild(w);break;case"meta":if(O=t5("meta","content",b).get(m+(u.content||""))){for(z=0;z<O.length;z++)if(w=O[z],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){O.splice(z,1);break t}}w=b.createElement(m),ur(w,m,u),b.head.appendChild(w);break;default:throw Error(r(468,m))}w[Le]=i,xn(w),m=w}i.stateNode=m}else n5(b,i.type,i.stateNode);else i.stateNode=e5(b,m,i.memoizedProps);else w!==m?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,m===null?n5(b,i.type,i.stateNode):e5(b,m,i.memoizedProps)):m===null&&i.stateNode!==null&&ig(i,i.memoizedProps,u.memoizedProps)}break;case 27:Dr(s,i),Ir(i),m&512&&(Bn||u===null||Xi(u,u.return)),u!==null&&m&4&&ig(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Dr(s,i),Ir(i),m&512&&(Bn||u===null||Xi(u,u.return)),i.flags&32){b=i.stateNode;try{Js(b,"")}catch($e){Xt(i,i.return,$e)}}m&4&&i.stateNode!=null&&(b=i.memoizedProps,ig(i,b,u!==null?u.memoizedProps:b)),m&1024&&(sg=!0);break;case 6:if(Dr(s,i),Ir(i),m&4){if(i.stateNode===null)throw Error(r(162));m=i.memoizedProps,u=i.stateNode;try{u.nodeValue=m}catch($e){Xt(i,i.return,$e)}}break;case 3:if(Qd=null,b=Pi,Pi=Wd(s.containerInfo),Dr(s,i),Pi=b,Ir(i),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ol(s.containerInfo)}catch($e){Xt(i,i.return,$e)}sg&&(sg=!1,n3(i));break;case 4:m=Pi,Pi=Wd(i.stateNode.containerInfo),Dr(s,i),Ir(i),Pi=m;break;case 12:Dr(s,i),Ir(i);break;case 31:Dr(s,i),Ir(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,_d(i,m)));break;case 13:Dr(s,i),Ir(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Id=Ue()),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,_d(i,m)));break;case 22:b=i.memoizedState!==null;var K=u!==null&&u.memoizedState!==null,se=Ao,de=Bn;if(Ao=se||b,Bn=de||K,Dr(s,i),Bn=de,Ao=se,Ir(i),m&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||K||Ao||Bn||xs(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){K=u=s;try{if(w=K.stateNode,b)O=w.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{z=K.stateNode;var ge=K.memoizedProps.style,ce=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;z.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch($e){Xt(K,K.return,$e)}}}else if(s.tag===6){if(u===null){K=s;try{K.stateNode.nodeValue=b?"":K.memoizedProps}catch($e){Xt(K,K.return,$e)}}}else if(s.tag===18){if(u===null){K=s;try{var ue=K.stateNode;b?$3(ue,!0):$3(K.stateNode,!1)}catch($e){Xt(K,K.return,$e)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=i.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,_d(i,u))));break;case 19:Dr(s,i),Ir(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,_d(i,m)));break;case 30:break;case 21:break;default:Dr(s,i),Ir(i)}}function Ir(i){var s=i.flags;if(s&2){try{for(var u,m=i.return;m!==null;){if(Yw(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,w=og(i);Ld(i,w,b);break;case 5:var O=u.stateNode;u.flags&32&&(Js(O,""),u.flags&=-33);var z=og(i);Ld(i,z,O);break;case 3:case 4:var K=u.stateNode.containerInfo,se=og(i);ag(i,se,K);break;default:throw Error(r(161))}}catch(de){Xt(i,i.return,de)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function n3(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;n3(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function No(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Qw(i,s.alternate,s),s=s.sibling}function xs(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:ca(4,s,s.return),xs(s);break;case 1:Xi(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&$w(s,s.return,u),xs(s);break;case 27:su(s.stateNode);case 26:case 5:Xi(s,s.return),xs(s);break;case 22:s.memoizedState===null&&xs(s);break;case 30:xs(s);break;default:xs(s)}i=i.sibling}}function Oo(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,b=i,w=s,O=w.flags;switch(w.tag){case 0:case 11:case 15:Oo(b,w,u),Xc(4,w);break;case 1:if(Oo(b,w,u),m=w,b=m.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(se){Xt(m,m.return,se)}if(m=w,b=m.updateQueue,b!==null){var z=m.stateNode;try{var K=b.shared.hiddenCallbacks;if(K!==null)for(b.shared.hiddenCallbacks=null,b=0;b<K.length;b++)Lv(K[b],z)}catch(se){Xt(m,m.return,se)}}u&&O&64&&Vw(w),Zc(w,w.return);break;case 27:Ww(w);case 26:case 5:Oo(b,w,u),u&&m===null&&O&4&&Gw(w),Zc(w,w.return);break;case 12:Oo(b,w,u);break;case 31:Oo(b,w,u),u&&O&4&&Jw(b,w);break;case 13:Oo(b,w,u),u&&O&4&&e3(b,w);break;case 22:w.memoizedState===null&&Oo(b,w,u),Zc(w,w.return);break;case 30:break;default:Oo(b,w,u)}s=s.sibling}}function lg(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Pc(u))}function cg(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Pc(i))}function Fi(i,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)r3(i,s,u,m),s=s.sibling}function r3(i,s,u,m){var b=s.flags;switch(s.tag){case 0:case 11:case 15:Fi(i,s,u,m),b&2048&&Xc(9,s);break;case 1:Fi(i,s,u,m);break;case 3:Fi(i,s,u,m),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Pc(i)));break;case 12:if(b&2048){Fi(i,s,u,m),i=s.stateNode;try{var w=s.memoizedProps,O=w.id,z=w.onPostCommit;typeof z=="function"&&z(O,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(K){Xt(s,s.return,K)}}else Fi(i,s,u,m);break;case 31:Fi(i,s,u,m);break;case 13:Fi(i,s,u,m);break;case 23:break;case 22:w=s.stateNode,O=s.alternate,s.memoizedState!==null?w._visibility&2?Fi(i,s,u,m):Jc(i,s):w._visibility&2?Fi(i,s,u,m):(w._visibility|=2,bl(i,s,u,m,(s.subtreeFlags&10256)!==0||!1)),b&2048&&lg(O,s);break;case 24:Fi(i,s,u,m),b&2048&&cg(s.alternate,s);break;default:Fi(i,s,u,m)}}function bl(i,s,u,m,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var w=i,O=s,z=u,K=m,se=O.flags;switch(O.tag){case 0:case 11:case 15:bl(w,O,z,K,b),Xc(8,O);break;case 23:break;case 22:var de=O.stateNode;O.memoizedState!==null?de._visibility&2?bl(w,O,z,K,b):Jc(w,O):(de._visibility|=2,bl(w,O,z,K,b)),b&&se&2048&&lg(O.alternate,O);break;case 24:bl(w,O,z,K,b),b&&se&2048&&cg(O.alternate,O);break;default:bl(w,O,z,K,b)}s=s.sibling}}function Jc(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,m=s,b=m.flags;switch(m.tag){case 22:Jc(u,m),b&2048&&lg(m.alternate,m);break;case 24:Jc(u,m),b&2048&&cg(m.alternate,m);break;default:Jc(u,m)}s=s.sibling}}var eu=8192;function vl(i,s,u){if(i.subtreeFlags&eu)for(i=i.child;i!==null;)i3(i,s,u),i=i.sibling}function i3(i,s,u){switch(i.tag){case 26:vl(i,s,u),i.flags&eu&&i.memoizedState!==null&&IN(u,Pi,i.memoizedState,i.memoizedProps);break;case 5:vl(i,s,u);break;case 3:case 4:var m=Pi;Pi=Wd(i.stateNode.containerInfo),vl(i,s,u),Pi=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=eu,eu=16777216,vl(i,s,u),eu=m):vl(i,s,u));break;default:vl(i,s,u)}}function o3(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function tu(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];er=m,s3(m,i)}o3(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)a3(i),i=i.sibling}function a3(i){switch(i.tag){case 0:case 11:case 15:tu(i),i.flags&2048&&ca(9,i,i.return);break;case 3:tu(i);break;case 12:tu(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,Dd(i)):tu(i);break;default:tu(i)}}function Dd(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];er=m,s3(m,i)}o3(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:ca(8,s,s.return),Dd(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Dd(s));break;default:Dd(s)}i=i.sibling}}function s3(i,s){for(;er!==null;){var u=er;switch(u.tag){case 0:case 11:case 15:ca(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Pc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,er=m;else e:for(u=i;er!==null;){m=er;var b=m.sibling,w=m.return;if(Xw(m),m===u){er=null;break e}if(b!==null){b.return=w,er=b;break e}er=w}}}var XR={getCacheForType:function(i){var s=lr(zn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return lr(zn).controller.signal}},ZR=typeof WeakMap=="function"?WeakMap:Map,qt=0,an=null,Tt=null,Rt=0,Qt=0,Xr=null,ua=!1,wl=!1,ug=!1,jo=0,An=0,fa=0,bs=0,fg=0,Zr=0,Sl=0,nu=null,zr=null,dg=!1,Id=0,l3=0,zd=1/0,Pd=null,da=null,Yn=0,ha=null,Cl=null,Mo=0,hg=0,pg=null,c3=null,ru=0,mg=null;function Jr(){return(qt&2)!==0&&Rt!==0?Rt&-Rt:B.T!==null?wg():Ne()}function u3(){if(Zr===0)if((Rt&536870912)===0||_t){var i=yn;yn<<=1,(yn&3932160)===0&&(yn=262144),Zr=i}else Zr=536870912;return i=Kr.current,i!==null&&(i.flags|=32),Zr}function Pr(i,s,u){(i===an&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)&&(El(i,0),pa(i,Rt,Zr,!1)),Jt(i,u),((qt&2)===0||i!==an)&&(i===an&&((qt&2)===0&&(bs|=u),An===4&&pa(i,Rt,Zr,!1)),Zi(i))}function f3(i,s,u){if((qt&6)!==0)throw Error(r(327));var m=!u&&(s&127)===0&&(s&i.expiredLanes)===0||Ut(i,s),b=m?tN(i,s):yg(i,s,!0),w=m;do{if(b===0){wl&&!m&&pa(i,s,0,!1);break}else{if(u=i.current.alternate,w&&!JR(u)){b=yg(i,s,!1),w=!1;continue}if(b===2){if(w=s,i.errorRecoveryDisabledLanes&w)var O=0;else O=i.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){s=O;e:{var z=i;b=nu;var K=z.current.memoizedState.isDehydrated;if(K&&(El(z,O).flags|=256),O=yg(z,O,!1),O!==2){if(ug&&!K){z.errorRecoveryDisabledLanes|=w,bs|=w,b=4;break e}w=zr,zr=b,w!==null&&(zr===null?zr=w:zr.push.apply(zr,w))}b=O}if(w=!1,b!==2)continue}}if(b===1){El(i,0),pa(i,s,0,!0);break}e:{switch(m=i,w=b,w){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:pa(m,s,Zr,!ua);break e;case 2:zr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=Id+300-Ue(),10<b)){if(pa(m,s,Zr,!ua),nt(m,0,!0)!==0)break e;Mo=s,m.timeoutHandle=U3(d3.bind(null,m,u,zr,Pd,dg,s,Zr,bs,Sl,ua,w,"Throttled",-0,0),b);break e}d3(m,u,zr,Pd,dg,s,Zr,bs,Sl,ua,w,null,-0,0)}}break}while(!0);Zi(i)}function d3(i,s,u,m,b,w,O,z,K,se,de,ge,ce,ue){if(i.timeoutHandle=-1,ge=s.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yo},i3(s,w,ge);var $e=(w&62914560)===w?Id-Ue():(w&4194048)===w?l3-Ue():0;if($e=zN(ge,$e),$e!==null){Mo=w,i.cancelPendingCommit=$e(v3.bind(null,i,s,w,u,m,b,O,z,K,de,ge,null,ce,ue)),pa(i,w,O,!se);return}}v3(i,s,w,u,m,b,O,z,K)}function JR(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var b=u[m],w=b.getSnapshot;b=b.value;try{if(!Yr(w(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function pa(i,s,u,m){s&=~fg,s&=~bs,i.suspendedLanes|=s,i.pingedLanes&=~s,m&&(i.warmLanes|=s),m=i.expirationTimes;for(var b=s;0<b;){var w=31-mt(b),O=1<<w;m[w]=-1,b&=~O}u!==0&&pi(i,u,s)}function Fd(){return(qt&6)===0?(iu(0),!1):!0}function gg(){if(Tt!==null){if(Qt===0)var i=Tt.return;else i=Tt,wo=us=null,Mm(i),pl=null,Bc=0,i=Tt;for(;i!==null;)qw(i.alternate,i),i=i.return;Tt=null}}function El(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,bN(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Mo=0,gg(),an=i,Tt=u=bo(i.current,null),Rt=s,Qt=0,Xr=null,ua=!1,wl=Ut(i,s),ug=!1,Sl=Zr=fg=bs=fa=An=0,zr=nu=null,dg=!1,(s&8)!==0&&(s|=s&32);var m=i.entangledLanes;if(m!==0)for(i=i.entanglements,m&=s;0<m;){var b=31-mt(m),w=1<<b;s|=i[b],m&=~w}return jo=s,ad(),u}function h3(i,s){gt=null,B.H=Wc,s===hl||s===pd?(s=Nv(),Qt=3):s===vm?(s=Nv(),Qt=4):Qt=s===Wm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Xr=s,Tt===null&&(An=1,Rd(i,xi(s,i.current)))}function p3(){var i=Kr.current;return i===null?!0:(Rt&4194048)===Rt?Si===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?i===Si:!1}function m3(){var i=B.H;return B.H=Wc,i===null?Wc:i}function g3(){var i=B.A;return B.A=XR,i}function Bd(){An=4,ua||(Rt&4194048)!==Rt&&Kr.current!==null||(wl=!0),(fa&134217727)===0&&(bs&134217727)===0||an===null||pa(an,Rt,Zr,!1)}function yg(i,s,u){var m=qt;qt|=2;var b=m3(),w=g3();(an!==i||Rt!==s)&&(Pd=null,El(i,s)),s=!1;var O=An;e:do try{if(Qt!==0&&Tt!==null){var z=Tt,K=Xr;switch(Qt){case 8:gg(),O=6;break e;case 3:case 2:case 9:case 6:Kr.current===null&&(s=!0);var se=Qt;if(Qt=0,Xr=null,kl(i,z,K,se),u&&wl){O=0;break e}break;default:se=Qt,Qt=0,Xr=null,kl(i,z,K,se)}}eN(),O=An;break}catch(de){h3(i,de)}while(!0);return s&&i.shellSuspendCounter++,wo=us=null,qt=m,B.H=b,B.A=w,Tt===null&&(an=null,Rt=0,ad()),O}function eN(){for(;Tt!==null;)y3(Tt)}function tN(i,s){var u=qt;qt|=2;var m=m3(),b=g3();an!==i||Rt!==s?(Pd=null,zd=Ue()+500,El(i,s)):wl=Ut(i,s);e:do try{if(Qt!==0&&Tt!==null){s=Tt;var w=Xr;t:switch(Qt){case 1:Qt=0,Xr=null,kl(i,s,w,1);break;case 2:case 9:if(Av(w)){Qt=0,Xr=null,x3(s);break}s=function(){Qt!==2&&Qt!==9||an!==i||(Qt=7),Zi(i)},w.then(s,s);break e;case 3:Qt=7;break e;case 4:Qt=5;break e;case 7:Av(w)?(Qt=0,Xr=null,x3(s)):(Qt=0,Xr=null,kl(i,s,w,7));break;case 5:var O=null;switch(Tt.tag){case 26:O=Tt.memoizedState;case 5:case 27:var z=Tt;if(O?r5(O):z.stateNode.complete){Qt=0,Xr=null;var K=z.sibling;if(K!==null)Tt=K;else{var se=z.return;se!==null?(Tt=se,Hd(se)):Tt=null}break t}}Qt=0,Xr=null,kl(i,s,w,5);break;case 6:Qt=0,Xr=null,kl(i,s,w,6);break;case 8:gg(),An=6;break e;default:throw Error(r(462))}}nN();break}catch(de){h3(i,de)}while(!0);return wo=us=null,B.H=m,B.A=b,qt=u,Tt!==null?0:(an=null,Rt=0,ad(),An)}function nN(){for(;Tt!==null&&!xe();)y3(Tt)}function y3(i){var s=Hw(i.alternate,i,jo);i.memoizedProps=i.pendingProps,s===null?Hd(i):Tt=s}function x3(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=Dw(u,s,s.pendingProps,s.type,void 0,Rt);break;case 11:s=Dw(u,s,s.pendingProps,s.type.render,s.ref,Rt);break;case 5:Mm(s);default:qw(u,s),s=Tt=gv(s,jo),s=Hw(u,s,jo)}i.memoizedProps=i.pendingProps,s===null?Hd(i):Tt=s}function kl(i,s,u,m){wo=us=null,Mm(s),pl=null,Bc=0;var b=s.return;try{if(VR(i,b,s,u,Rt)){An=1,Rd(i,xi(u,i.current)),Tt=null;return}}catch(w){if(b!==null)throw Tt=b,w;An=1,Rd(i,xi(u,i.current)),Tt=null;return}s.flags&32768?(_t||m===1?i=!0:wl||(Rt&536870912)!==0?i=!1:(ua=i=!0,(m===2||m===9||m===3||m===6)&&(m=Kr.current,m!==null&&m.tag===13&&(m.flags|=16384))),b3(s,i)):Hd(s)}function Hd(i){var s=i;do{if((s.flags&32768)!==0){b3(s,ua);return}i=s.return;var u=YR(s.alternate,s,jo);if(u!==null){Tt=u;return}if(s=s.sibling,s!==null){Tt=s;return}Tt=s=i}while(s!==null);An===0&&(An=5)}function b3(i,s){do{var u=WR(i.alternate,i);if(u!==null){u.flags&=32767,Tt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){Tt=i;return}Tt=i=u}while(i!==null);An=6,Tt=null}function v3(i,s,u,m,b,w,O,z,K){i.cancelPendingCommit=null;do Ud();while(Yn!==0);if((qt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(w=s.lanes|s.childLanes,w|=om,In(i,u,w,O,z,K),i===an&&(Tt=an=null,Rt=0),Cl=s,ha=i,Mo=u,hg=w,pg=b,c3=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,aN(Oe,function(){return k3(),null})):(i.callbackNode=null,i.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=B.T,B.T=null,b=F.p,F.p=2,O=qt,qt|=4;try{KR(i,s,u)}finally{qt=O,F.p=b,B.T=m}}Yn=1,w3(),S3(),C3()}}function w3(){if(Yn===1){Yn=0;var i=ha,s=Cl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=B.T,B.T=null;var m=F.p;F.p=2;var b=qt;qt|=4;try{t3(s,i);var w=Ng,O=sv(i.containerInfo),z=w.focusedElem,K=w.selectionRange;if(O!==z&&z&&z.ownerDocument&&av(z.ownerDocument.documentElement,z)){if(K!==null&&em(z)){var se=K.start,de=K.end;if(de===void 0&&(de=se),"selectionStart"in z)z.selectionStart=se,z.selectionEnd=Math.min(de,z.value.length);else{var ge=z.ownerDocument||document,ce=ge&&ge.defaultView||window;if(ce.getSelection){var ue=ce.getSelection(),$e=z.textContent.length,ct=Math.min(K.start,$e),nn=K.end===void 0?ct:Math.min(K.end,$e);!ue.extend&&ct>nn&&(O=nn,nn=ct,ct=O);var te=ov(z,ct),X=ov(z,nn);if(te&&X&&(ue.rangeCount!==1||ue.anchorNode!==te.node||ue.anchorOffset!==te.offset||ue.focusNode!==X.node||ue.focusOffset!==X.offset)){var oe=ge.createRange();oe.setStart(te.node,te.offset),ue.removeAllRanges(),ct>nn?(ue.addRange(oe),ue.extend(X.node,X.offset)):(oe.setEnd(X.node,X.offset),ue.addRange(oe))}}}}for(ge=[],ue=z;ue=ue.parentNode;)ue.nodeType===1&&ge.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ge.length;z++){var me=ge[z];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}eh=!!Rg,Ng=Rg=null}finally{qt=b,F.p=m,B.T=u}}i.current=s,Yn=2}}function S3(){if(Yn===2){Yn=0;var i=ha,s=Cl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=B.T,B.T=null;var m=F.p;F.p=2;var b=qt;qt|=4;try{Qw(i,s.alternate,s)}finally{qt=b,F.p=m,B.T=u}}Yn=3}}function C3(){if(Yn===4||Yn===3){Yn=0,ze();var i=ha,s=Cl,u=Mo,m=c3;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Yn=5:(Yn=0,Cl=ha=null,E3(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(da=null),be(u),s=s.stateNode,Ve&&typeof Ve.onCommitFiberRoot=="function")try{Ve.onCommitFiberRoot(Xe,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=B.T,b=F.p,F.p=2,B.T=null;try{for(var w=i.onRecoverableError,O=0;O<m.length;O++){var z=m[O];w(z.value,{componentStack:z.stack})}}finally{B.T=s,F.p=b}}(Mo&3)!==0&&Ud(),Zi(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===mg?ru++:(ru=0,mg=i):ru=0,iu(0)}}function E3(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,Pc(s)))}function Ud(){return w3(),S3(),C3(),k3()}function k3(){if(Yn!==5)return!1;var i=ha,s=hg;hg=0;var u=be(Mo),m=B.T,b=F.p;try{F.p=32>u?32:u,B.T=null,u=pg,pg=null;var w=ha,O=Mo;if(Yn=0,Cl=ha=null,Mo=0,(qt&6)!==0)throw Error(r(331));var z=qt;if(qt|=4,a3(w.current),r3(w,w.current,O,u),qt=z,iu(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot=="function")try{Ve.onPostCommitFiberRoot(Xe,w)}catch{}return!0}finally{F.p=b,B.T=m,E3(i,s)}}function T3(i,s,u){s=xi(u,s),s=Ym(i.stateNode,s,2),i=aa(i,s,2),i!==null&&(Jt(i,2),Zi(i))}function Xt(i,s,u){if(i.tag===3)T3(i,i,u);else for(;s!==null;){if(s.tag===3){T3(s,i,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(da===null||!da.has(m))){i=xi(u,i),u=Aw(2),m=aa(s,u,2),m!==null&&(Rw(u,m,s,i),Jt(m,2),Zi(m));break}}s=s.return}}function xg(i,s,u){var m=i.pingCache;if(m===null){m=i.pingCache=new ZR;var b=new Set;m.set(s,b)}else b=m.get(s),b===void 0&&(b=new Set,m.set(s,b));b.has(u)||(ug=!0,b.add(u),i=rN.bind(null,i,s,u),s.then(i,i))}function rN(i,s,u){var m=i.pingCache;m!==null&&m.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,an===i&&(Rt&u)===u&&(An===4||An===3&&(Rt&62914560)===Rt&&300>Ue()-Id?(qt&2)===0&&El(i,0):fg|=u,Sl===Rt&&(Sl=0)),Zi(i)}function A3(i,s){s===0&&(s=hn()),i=ss(i,s),i!==null&&(Jt(i,s),Zi(i))}function iN(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),A3(i,u)}function oN(i,s){var u=0;switch(i.tag){case 31:case 13:var m=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:m=i.stateNode;break;case 22:m=i.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(s),A3(i,u)}function aN(i,s){return Se(i,s)}var qd=null,Tl=null,bg=!1,Vd=!1,vg=!1,ma=0;function Zi(i){i!==Tl&&i.next===null&&(Tl===null?qd=Tl=i:Tl=Tl.next=i),Vd=!0,bg||(bg=!0,lN())}function iu(i,s){if(!vg&&Vd){vg=!0;do for(var u=!1,m=qd;m!==null;){if(i!==0){var b=m.pendingLanes;if(b===0)var w=0;else{var O=m.suspendedLanes,z=m.pingedLanes;w=(1<<31-mt(42|i)+1)-1,w&=b&~(O&~z),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,j3(m,w))}else w=Rt,w=nt(m,m===an?w:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(w&3)===0||Ut(m,w)||(u=!0,j3(m,w));m=m.next}while(u);vg=!1}}function sN(){R3()}function R3(){Vd=bg=!1;var i=0;ma!==0&&xN()&&(i=ma);for(var s=Ue(),u=null,m=qd;m!==null;){var b=m.next,w=N3(m,s);w===0?(m.next=null,u===null?qd=b:u.next=b,b===null&&(Tl=u)):(u=m,(i!==0||(w&3)!==0)&&(Vd=!0)),m=b}Yn!==0&&Yn!==5||iu(i),ma!==0&&(ma=0)}function N3(i,s){for(var u=i.suspendedLanes,m=i.pingedLanes,b=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var O=31-mt(w),z=1<<O,K=b[O];K===-1?((z&u)===0||(z&m)!==0)&&(b[O]=dn(z,s)):K<=s&&(i.expiredLanes|=z),w&=~z}if(s=an,u=Rt,u=nt(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,u===0||i===s&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)return m!==null&&m!==null&&ne(m),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Ut(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(m!==null&&ne(m),be(u)){case 2:case 8:u=ve;break;case 32:u=Oe;break;case 268435456:u=He;break;default:u=Oe}return m=O3.bind(null,i),u=Se(u,m),i.callbackPriority=s,i.callbackNode=u,s}return m!==null&&m!==null&&ne(m),i.callbackPriority=2,i.callbackNode=null,2}function O3(i,s){if(Yn!==0&&Yn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Ud()&&i.callbackNode!==u)return null;var m=Rt;return m=nt(i,i===an?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:(f3(i,m,s),N3(i,Ue()),i.callbackNode!=null&&i.callbackNode===u?O3.bind(null,i):null)}function j3(i,s){if(Ud())return null;f3(i,s,!0)}function lN(){vN(function(){(qt&6)!==0?Se(ae,sN):R3()})}function wg(){if(ma===0){var i=fl;i===0&&(i=Wt,Wt<<=1,(Wt&261888)===0&&(Wt=256)),ma=i}return ma}function M3(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Zf(""+i)}function L3(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function cN(i,s,u,m,b){if(s==="submit"&&u&&u.stateNode===b){var w=M3((b[Fe]||null).action),O=m.submitter;O&&(s=(s=O[Fe]||null)?M3(s.formAction):O.getAttribute("formAction"),s!==null&&(w=s,O=null));var z=new nd("action","action",null,m,b);i.push({event:z,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ma!==0){var K=O?L3(b,O):new FormData(b);Hm(u,{pending:!0,data:K,method:b.method,action:w},null,K)}}else typeof w=="function"&&(z.preventDefault(),K=O?L3(b,O):new FormData(b),Hm(u,{pending:!0,data:K,method:b.method,action:w},w,K))},currentTarget:b}]})}}for(var Sg=0;Sg<im.length;Sg++){var Cg=im[Sg],uN=Cg.toLowerCase(),fN=Cg[0].toUpperCase()+Cg.slice(1);zi(uN,"on"+fN)}zi(uv,"onAnimationEnd"),zi(fv,"onAnimationIteration"),zi(dv,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(AR,"onTransitionRun"),zi(RR,"onTransitionStart"),zi(NR,"onTransitionCancel"),zi(hv,"onTransitionEnd"),mi("onMouseEnter",["mouseout","mouseover"]),mi("onMouseLeave",["mouseout","mouseover"]),mi("onPointerEnter",["pointerout","pointerover"]),mi("onPointerLeave",["pointerout","pointerover"]),Di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Di("onBeforeInput",["compositionend","keypress","textInput","paste"]),Di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),dN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function _3(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var m=i[u],b=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var O=m.length-1;0<=O;O--){var z=m[O],K=z.instance,se=z.currentTarget;if(z=z.listener,K!==w&&b.isPropagationStopped())break e;w=z,b.currentTarget=se;try{w(b)}catch(de){od(de)}b.currentTarget=null,w=K}else for(O=0;O<m.length;O++){if(z=m[O],K=z.instance,se=z.currentTarget,z=z.listener,K!==w&&b.isPropagationStopped())break e;w=z,b.currentTarget=se;try{w(b)}catch(de){od(de)}b.currentTarget=null,w=K}}}}function At(i,s){var u=s[lt];u===void 0&&(u=s[lt]=new Set);var m=i+"__bubble";u.has(m)||(D3(s,i,2,!1),u.add(m))}function Eg(i,s,u){var m=0;s&&(m|=4),D3(u,i,m,s)}var $d="_reactListening"+Math.random().toString(36).slice(2);function kg(i){if(!i[$d]){i[$d]=!0,_i.forEach(function(u){u!=="selectionchange"&&(dN.has(u)||Eg(u,!1,i),Eg(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[$d]||(s[$d]=!0,Eg("selectionchange",!1,s))}}function D3(i,s,u,m){switch(u5(s)){case 2:var b=BN;break;case 8:b=HN;break;default:b=Bg}u=b.bind(null,s,u,i),b=void 0,!$0||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),m?b!==void 0?i.addEventListener(s,u,{capture:!0,passive:b}):i.addEventListener(s,u,!0):b!==void 0?i.addEventListener(s,u,{passive:b}):i.addEventListener(s,u,!1)}function Tg(i,s,u,m,b){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var O=m.tag;if(O===3||O===4){var z=m.stateNode.containerInfo;if(z===b)break;if(O===4)for(O=m.return;O!==null;){var K=O.tag;if((K===3||K===4)&&O.stateNode.containerInfo===b)return;O=O.return}for(;z!==null;){if(O=kn(z),O===null)return;if(K=O.tag,K===5||K===6||K===26||K===27){m=w=O;continue e}z=z.parentNode}}m=m.return}Bb(function(){var se=w,de=q0(u),ge=[];e:{var ce=pv.get(i);if(ce!==void 0){var ue=nd,$e=i;switch(i){case"keypress":if(ed(u)===0)break e;case"keydown":case"keyup":ue=oR;break;case"focusin":$e="focus",ue=K0;break;case"focusout":$e="blur",ue=K0;break;case"beforeblur":case"afterblur":ue=K0;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Y7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=lR;break;case uv:case fv:case dv:ue=Q7;break;case hv:ue=uR;break;case"scroll":case"scrollend":ue=$7;break;case"wheel":ue=dR;break;case"copy":case"cut":case"paste":ue=Z7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=$b;break;case"toggle":case"beforetoggle":ue=pR}var ct=(s&4)!==0,nn=!ct&&(i==="scroll"||i==="scrollend"),te=ct?ce!==null?ce+"Capture":null:ce;ct=[];for(var X=se,oe;X!==null;){var me=X;if(oe=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||oe===null||te===null||(me=Ac(X,te),me!=null&&ct.push(au(X,me,oe))),nn)break;X=X.return}0<ct.length&&(ce=new ue(ce,$e,null,u,de),ge.push({event:ce,listeners:ct}))}}if((s&7)===0){e:{if(ce=i==="mouseover"||i==="pointerover",ue=i==="mouseout"||i==="pointerout",ce&&u!==U0&&($e=u.relatedTarget||u.fromElement)&&(kn($e)||$e[et]))break e;if((ue||ce)&&(ce=de.window===de?de:(ce=de.ownerDocument)?ce.defaultView||ce.parentWindow:window,ue?($e=u.relatedTarget||u.toElement,ue=se,$e=$e?kn($e):null,$e!==null&&(nn=a($e),ct=$e.tag,$e!==nn||ct!==5&&ct!==27&&ct!==6)&&($e=null)):(ue=null,$e=se),ue!==$e)){if(ct=qb,me="onMouseLeave",te="onMouseEnter",X="mouse",(i==="pointerout"||i==="pointerover")&&(ct=$b,me="onPointerLeave",te="onPointerEnter",X="pointer"),nn=ue==null?ce:Jn(ue),oe=$e==null?ce:Jn($e),ce=new ct(me,X+"leave",ue,u,de),ce.target=nn,ce.relatedTarget=oe,me=null,kn(de)===se&&(ct=new ct(te,X+"enter",$e,u,de),ct.target=oe,ct.relatedTarget=nn,me=ct),nn=me,ue&&$e)t:{for(ct=hN,te=ue,X=$e,oe=0,me=te;me;me=ct(me))oe++;me=0;for(var at=X;at;at=ct(at))me++;for(;0<oe-me;)te=ct(te),oe--;for(;0<me-oe;)X=ct(X),me--;for(;oe--;){if(te===X||X!==null&&te===X.alternate){ct=te;break t}te=ct(te),X=ct(X)}ct=null}else ct=null;ue!==null&&I3(ge,ce,ue,ct,!1),$e!==null&&nn!==null&&I3(ge,nn,$e,ct,!0)}}e:{if(ce=se?Jn(se):window,ue=ce.nodeName&&ce.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ce.type==="file")var Bt=Jb;else if(Xb(ce))if(ev)Bt=ER;else{Bt=SR;var Je=wR}else ue=ce.nodeName,!ue||ue.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?se&&H0(se.elementType)&&(Bt=Jb):Bt=CR;if(Bt&&(Bt=Bt(i,se))){Zb(ge,Bt,u,de);break e}Je&&Je(i,ce,se),i==="focusout"&&se&&ce.type==="number"&&se.memoizedProps.value!=null&&B0(ce,"number",ce.value)}switch(Je=se?Jn(se):window,i){case"focusin":(Xb(Je)||Je.contentEditable==="true")&&(rl=Je,tm=se,Dc=null);break;case"focusout":Dc=tm=rl=null;break;case"mousedown":nm=!0;break;case"contextmenu":case"mouseup":case"dragend":nm=!1,lv(ge,u,de);break;case"selectionchange":if(TR)break;case"keydown":case"keyup":lv(ge,u,de)}var xt;if(X0)e:{switch(i){case"compositionstart":var Nt="onCompositionStart";break e;case"compositionend":Nt="onCompositionEnd";break e;case"compositionupdate":Nt="onCompositionUpdate";break e}Nt=void 0}else nl?Kb(i,u)&&(Nt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Nt="onCompositionStart");Nt&&(Gb&&u.locale!=="ko"&&(nl||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&nl&&(xt=Hb()):(Jo=de,G0="value"in Jo?Jo.value:Jo.textContent,nl=!0)),Je=Gd(se,Nt),0<Je.length&&(Nt=new Vb(Nt,i,null,u,de),ge.push({event:Nt,listeners:Je}),xt?Nt.data=xt:(xt=Qb(u),xt!==null&&(Nt.data=xt)))),(xt=gR?yR(i,u):xR(i,u))&&(Nt=Gd(se,"onBeforeInput"),0<Nt.length&&(Je=new Vb("onBeforeInput","beforeinput",null,u,de),ge.push({event:Je,listeners:Nt}),Je.data=xt)),cN(ge,i,se,u,de)}_3(ge,s)})}function au(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Gd(i,s){for(var u=s+"Capture",m=[];i!==null;){var b=i,w=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||w===null||(b=Ac(i,u),b!=null&&m.unshift(au(i,b,w)),b=Ac(i,s),b!=null&&m.push(au(i,b,w))),i.tag===3)return m;i=i.return}return[]}function hN(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function I3(i,s,u,m,b){for(var w=s._reactName,O=[];u!==null&&u!==m;){var z=u,K=z.alternate,se=z.stateNode;if(z=z.tag,K!==null&&K===m)break;z!==5&&z!==26&&z!==27||se===null||(K=se,b?(se=Ac(u,w),se!=null&&O.unshift(au(u,se,K))):b||(se=Ac(u,w),se!=null&&O.push(au(u,se,K)))),u=u.return}O.length!==0&&i.push({event:s,listeners:O})}var pN=/\r\n?/g,mN=/\u0000|\uFFFD/g;function z3(i){return(typeof i=="string"?i:""+i).replace(pN,`
9
- `).replace(mN,"")}function P3(i,s){return s=z3(s),z3(i)===s}function tn(i,s,u,m,b,w){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Js(i,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Js(i,""+m);break;case"className":Ii(i,"class",m);break;case"tabIndex":Ii(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Ii(i,u,m);break;case"style":Pb(i,m,w);break;case"data":if(s!=="object"){Ii(i,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Zf(""+m),i.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(s!=="input"&&tn(i,s,"name",b.name,b,null),tn(i,s,"formEncType",b.formEncType,b,null),tn(i,s,"formMethod",b.formMethod,b,null),tn(i,s,"formTarget",b.formTarget,b,null)):(tn(i,s,"encType",b.encType,b,null),tn(i,s,"method",b.method,b,null),tn(i,s,"target",b.target,b,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Zf(""+m),i.setAttribute(u,m);break;case"onClick":m!=null&&(i.onclick=yo);break;case"onScroll":m!=null&&At("scroll",i);break;case"onScrollEnd":m!=null&&At("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}u=Zf(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""+m):i.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":m===!0?i.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,m):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(u,m):i.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(u):i.setAttribute(u,m);break;case"popover":At("beforetoggle",i),At("toggle",i),On(i,"popover",m);break;case"xlinkActuate":ar(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ar(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ar(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ar(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ar(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ar(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ar(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ar(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ar(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":On(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=q7.get(u)||u,On(i,u,m))}}function Ag(i,s,u,m,b,w){switch(u){case"style":Pb(i,m,w);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof m=="string"?Js(i,m):(typeof m=="number"||typeof m=="bigint")&&Js(i,""+m);break;case"onScroll":m!=null&&At("scroll",i);break;case"onScrollEnd":m!=null&&At("scrollend",i);break;case"onClick":m!=null&&(i.onclick=yo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gr.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),w=i[Fe]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(s,w,b),typeof m=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,m,b);break e}u in i?i[u]=m:m===!0?i.setAttribute(u,""):On(i,u,m)}}}function ur(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":At("error",i),At("load",i);var m=!1,b=!1,w;for(w in u)if(u.hasOwnProperty(w)){var O=u[w];if(O!=null)switch(w){case"src":m=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:tn(i,s,w,O,u,null)}}b&&tn(i,s,"srcSet",u.srcSet,u,null),m&&tn(i,s,"src",u.src,u,null);return;case"input":At("invalid",i);var z=w=O=b=null,K=null,se=null;for(m in u)if(u.hasOwnProperty(m)){var de=u[m];if(de!=null)switch(m){case"name":b=de;break;case"type":O=de;break;case"checked":K=de;break;case"defaultChecked":se=de;break;case"value":w=de;break;case"defaultValue":z=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,s));break;default:tn(i,s,m,de,u,null)}}_b(i,w,z,K,se,O,b,!1);return;case"select":At("invalid",i),m=O=w=null;for(b in u)if(u.hasOwnProperty(b)&&(z=u[b],z!=null))switch(b){case"value":w=z;break;case"defaultValue":O=z;break;case"multiple":m=z;default:tn(i,s,b,z,u,null)}s=w,u=O,i.multiple=!!m,s!=null?Zs(i,!!m,s,!1):u!=null&&Zs(i,!!m,u,!0);return;case"textarea":At("invalid",i),w=b=m=null;for(O in u)if(u.hasOwnProperty(O)&&(z=u[O],z!=null))switch(O){case"value":m=z;break;case"defaultValue":b=z;break;case"children":w=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(91));break;default:tn(i,s,O,z,u,null)}Ib(i,m,b,w);return;case"option":for(K in u)u.hasOwnProperty(K)&&(m=u[K],m!=null)&&(K==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":tn(i,s,K,m,u,null));return;case"dialog":At("beforetoggle",i),At("toggle",i),At("cancel",i),At("close",i);break;case"iframe":case"object":At("load",i);break;case"video":case"audio":for(m=0;m<ou.length;m++)At(ou[m],i);break;case"image":At("error",i),At("load",i);break;case"details":At("toggle",i);break;case"embed":case"source":case"link":At("error",i),At("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in u)if(u.hasOwnProperty(se)&&(m=u[se],m!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:tn(i,s,se,m,u,null)}return;default:if(H0(s)){for(de in u)u.hasOwnProperty(de)&&(m=u[de],m!==void 0&&Ag(i,s,de,m,u,void 0));return}}for(z in u)u.hasOwnProperty(z)&&(m=u[z],m!=null&&tn(i,s,z,m,u,null))}function gN(i,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,w=null,O=null,z=null,K=null,se=null,de=null;for(ue in u){var ge=u[ue];if(u.hasOwnProperty(ue)&&ge!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":K=ge;default:m.hasOwnProperty(ue)||tn(i,s,ue,null,m,ge)}}for(var ce in m){var ue=m[ce];if(ge=u[ce],m.hasOwnProperty(ce)&&(ue!=null||ge!=null))switch(ce){case"type":w=ue;break;case"name":b=ue;break;case"checked":se=ue;break;case"defaultChecked":de=ue;break;case"value":O=ue;break;case"defaultValue":z=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ue!==ge&&tn(i,s,ce,ue,m,ge)}}F0(i,O,z,K,se,de,w,b);return;case"select":ue=O=z=ce=null;for(w in u)if(K=u[w],u.hasOwnProperty(w)&&K!=null)switch(w){case"value":break;case"multiple":ue=K;default:m.hasOwnProperty(w)||tn(i,s,w,null,m,K)}for(b in m)if(w=m[b],K=u[b],m.hasOwnProperty(b)&&(w!=null||K!=null))switch(b){case"value":ce=w;break;case"defaultValue":z=w;break;case"multiple":O=w;default:w!==K&&tn(i,s,b,w,m,K)}s=z,u=O,m=ue,ce!=null?Zs(i,!!u,ce,!1):!!m!=!!u&&(s!=null?Zs(i,!!u,s,!0):Zs(i,!!u,u?[]:"",!1));return;case"textarea":ue=ce=null;for(z in u)if(b=u[z],u.hasOwnProperty(z)&&b!=null&&!m.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:tn(i,s,z,null,m,b)}for(O in m)if(b=m[O],w=u[O],m.hasOwnProperty(O)&&(b!=null||w!=null))switch(O){case"value":ce=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==w&&tn(i,s,O,b,m,w)}Db(i,ce,ue);return;case"option":for(var $e in u)ce=u[$e],u.hasOwnProperty($e)&&ce!=null&&!m.hasOwnProperty($e)&&($e==="selected"?i.selected=!1:tn(i,s,$e,null,m,ce));for(K in m)ce=m[K],ue=u[K],m.hasOwnProperty(K)&&ce!==ue&&(ce!=null||ue!=null)&&(K==="selected"?i.selected=ce&&typeof ce!="function"&&typeof ce!="symbol":tn(i,s,K,ce,m,ue));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 ct in u)ce=u[ct],u.hasOwnProperty(ct)&&ce!=null&&!m.hasOwnProperty(ct)&&tn(i,s,ct,null,m,ce);for(se in m)if(ce=m[se],ue=u[se],m.hasOwnProperty(se)&&ce!==ue&&(ce!=null||ue!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,s));break;default:tn(i,s,se,ce,m,ue)}return;default:if(H0(s)){for(var nn in u)ce=u[nn],u.hasOwnProperty(nn)&&ce!==void 0&&!m.hasOwnProperty(nn)&&Ag(i,s,nn,void 0,m,ce);for(de in m)ce=m[de],ue=u[de],!m.hasOwnProperty(de)||ce===ue||ce===void 0&&ue===void 0||Ag(i,s,de,ce,m,ue);return}}for(var te in u)ce=u[te],u.hasOwnProperty(te)&&ce!=null&&!m.hasOwnProperty(te)&&tn(i,s,te,null,m,ce);for(ge in m)ce=m[ge],ue=u[ge],!m.hasOwnProperty(ge)||ce===ue||ce==null&&ue==null||tn(i,s,ge,ce,m,ue)}function F3(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yN(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var b=u[m],w=b.transferSize,O=b.initiatorType,z=b.duration;if(w&&z&&F3(O)){for(O=0,z=b.responseEnd,m+=1;m<u.length;m++){var K=u[m],se=K.startTime;if(se>z)break;var de=K.transferSize,ge=K.initiatorType;de&&F3(ge)&&(K=K.responseEnd,O+=de*(K<z?1:(z-se)/(K-se)))}if(--m,s+=8*(w+O)/(b.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Rg=null,Ng=null;function Yd(i){return i.nodeType===9?i:i.ownerDocument}function B3(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H3(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Og(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var jg=null;function xN(){var i=window.event;return i&&i.type==="popstate"?i===jg?!1:(jg=i,!0):(jg=null,!1)}var U3=typeof setTimeout=="function"?setTimeout:void 0,bN=typeof clearTimeout=="function"?clearTimeout:void 0,q3=typeof Promise=="function"?Promise:void 0,vN=typeof queueMicrotask=="function"?queueMicrotask:typeof q3<"u"?function(i){return q3.resolve(null).then(i).catch(wN)}:U3;function wN(i){setTimeout(function(){throw i})}function ga(i){return i==="head"}function V3(i,s){var u=s,m=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(m===0){i.removeChild(b),Ol(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")su(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,su(u);for(var w=u.firstChild;w;){var O=w.nextSibling,z=w.nodeName;w[Sn]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=O}}else u==="body"&&su(i.ownerDocument.body);u=b}while(u);Ol(s)}function $3(i,s){var u=i;i=0;do{var m=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=m}while(u)}function Mg(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Mg(u),En(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function SN(i,s,u,m){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[Sn])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var w=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=Ci(i.nextSibling),i===null)break}return null}function CN(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Ci(i.nextSibling),i===null))return null;return i}function G3(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Ci(i.nextSibling),i===null))return null;return i}function Lg(i){return i.data==="$?"||i.data==="$~"}function _g(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function EN(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Ci(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var Dg=null;function Y3(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return Ci(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function W3(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function K3(i,s,u){switch(s=Yd(u),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function su(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);En(i)}var Ei=new Map,Q3=new Set;function Wd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Lo=F.d;F.d={f:kN,r:TN,D:AN,C:RN,L:NN,m:ON,X:MN,S:jN,M:LN};function kN(){var i=Lo.f(),s=Fd();return i||s}function TN(i){var s=jt(i);s!==null&&s.tag===5&&s.type==="form"?hw(s):Lo.r(i)}var Al=typeof document>"u"?null:document;function X3(i,s,u){var m=Al;if(m&&typeof s=="string"&&s){var b=gi(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),Q3.has(b)||(Q3.add(b),i={rel:i,crossOrigin:u,href:s},m.querySelector(b)===null&&(s=m.createElement("link"),ur(s,"link",i),xn(s),m.head.appendChild(s)))}}function AN(i){Lo.D(i),X3("dns-prefetch",i,null)}function RN(i,s){Lo.C(i,s),X3("preconnect",i,s)}function NN(i,s,u){Lo.L(i,s,u);var m=Al;if(m&&i&&s){var b='link[rel="preload"][as="'+gi(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+gi(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+gi(u.imageSizes)+'"]')):b+='[href="'+gi(i)+'"]';var w=b;switch(s){case"style":w=Rl(i);break;case"script":w=Nl(i)}Ei.has(w)||(i=h({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),Ei.set(w,i),m.querySelector(b)!==null||s==="style"&&m.querySelector(lu(w))||s==="script"&&m.querySelector(cu(w))||(s=m.createElement("link"),ur(s,"link",i),xn(s),m.head.appendChild(s)))}}function ON(i,s){Lo.m(i,s);var u=Al;if(u&&i){var m=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+gi(m)+'"][href="'+gi(i)+'"]',w=b;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Nl(i)}if(!Ei.has(w)&&(i=h({rel:"modulepreload",href:i},s),Ei.set(w,i),u.querySelector(b)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(cu(w)))return}m=u.createElement("link"),ur(m,"link",i),xn(m),u.head.appendChild(m)}}}function jN(i,s,u){Lo.S(i,s,u);var m=Al;if(m&&i){var b=Mr(m).hoistableStyles,w=Rl(i);s=s||"default";var O=b.get(w);if(!O){var z={loading:0,preload:null};if(O=m.querySelector(lu(w)))z.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":s},u),(u=Ei.get(w))&&Ig(i,u);var K=O=m.createElement("link");xn(K),ur(K,"link",i),K._p=new Promise(function(se,de){K.onload=se,K.onerror=de}),K.addEventListener("load",function(){z.loading|=1}),K.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Kd(O,s,m)}O={type:"stylesheet",instance:O,count:1,state:z},b.set(w,O)}}}function MN(i,s){Lo.X(i,s);var u=Al;if(u&&i){var m=Mr(u).hoistableScripts,b=Nl(i),w=m.get(b);w||(w=u.querySelector(cu(b)),w||(i=h({src:i,async:!0},s),(s=Ei.get(b))&&zg(i,s),w=u.createElement("script"),xn(w),ur(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(b,w))}}function LN(i,s){Lo.M(i,s);var u=Al;if(u&&i){var m=Mr(u).hoistableScripts,b=Nl(i),w=m.get(b);w||(w=u.querySelector(cu(b)),w||(i=h({src:i,async:!0,type:"module"},s),(s=Ei.get(b))&&zg(i,s),w=u.createElement("script"),xn(w),ur(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(b,w))}}function Z3(i,s,u,m){var b=(b=re.current)?Wd(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Rl(u.href),u=Mr(b).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Rl(u.href);var w=Mr(b).hoistableStyles,O=w.get(i);if(O||(b=b.ownerDocument||b,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,O),(w=b.querySelector(lu(i)))&&!w._p&&(O.instance=w,O.state.loading=5),Ei.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ei.set(i,u),w||_N(b,i,u,O.state))),s&&m===null)throw Error(r(528,""));return O}if(s&&m!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Nl(u),u=Mr(b).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Rl(i){return'href="'+gi(i)+'"'}function lu(i){return'link[rel="stylesheet"]['+i+"]"}function J3(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function _N(i,s,u,m){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=i.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),ur(s,"link",u),xn(s),i.head.appendChild(s))}function Nl(i){return'[src="'+gi(i)+'"]'}function cu(i){return"script[async]"+i}function e5(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=i.querySelector('style[data-href~="'+gi(u.href)+'"]');if(m)return s.instance=m,xn(m),m;var b=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),xn(m),ur(m,"style",b),Kd(m,u.precedence,i),s.instance=m;case"stylesheet":b=Rl(u.href);var w=i.querySelector(lu(b));if(w)return s.state.loading|=4,s.instance=w,xn(w),w;m=J3(u),(b=Ei.get(b))&&Ig(m,b),w=(i.ownerDocument||i).createElement("link"),xn(w);var O=w;return O._p=new Promise(function(z,K){O.onload=z,O.onerror=K}),ur(w,"link",m),s.state.loading|=4,Kd(w,u.precedence,i),s.instance=w;case"script":return w=Nl(u.src),(b=i.querySelector(cu(w)))?(s.instance=b,xn(b),b):(m=u,(b=Ei.get(w))&&(m=h({},u),zg(m,b)),i=i.ownerDocument||i,b=i.createElement("script"),xn(b),ur(b,"link",m),i.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,Kd(m,u.precedence,i));return s.instance}function Kd(i,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=m.length?m[m.length-1]:null,w=b,O=0;O<m.length;O++){var z=m[O];if(z.dataset.precedence===s)w=z;else if(w!==b)break}w?w.parentNode.insertBefore(i,w.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function Ig(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function zg(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Qd=null;function t5(i,s,u){if(Qd===null){var m=new Map,b=Qd=new Map;b.set(u,m)}else b=Qd,m=b.get(u),m||(m=new Map,b.set(u,m));if(m.has(i))return m;for(m.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var w=u[b];if(!(w[Sn]||w[Le]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var O=w.getAttribute(s)||"";O=i+O;var z=m.get(O);z?z.push(w):m.set(O,[w])}}return m}function n5(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function DN(i,s,u){if(u===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(i=s.disabled,typeof s.precedence=="string"&&i==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function r5(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function IN(i,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Rl(m.href),w=s.querySelector(lu(b));if(w){s=w._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Xd.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=w,xn(w);return}w=s.ownerDocument||s,m=J3(m),(b=Ei.get(b))&&Ig(m,b),w=w.createElement("link"),xn(w);var O=w;O._p=new Promise(function(z,K){O.onload=z,O.onerror=K}),ur(w,"link",m),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Xd.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var Pg=0;function zN(i,s){return i.stylesheets&&i.count===0&&Jd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var m=setTimeout(function(){if(i.stylesheets&&Jd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+s);0<i.imgBytes&&Pg===0&&(Pg=62500*yN());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Jd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Pg?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(b)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Zd=null;function Jd(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Zd=new Map,s.forEach(PN,i),Zd=null,Xd.call(i))}function PN(i,s){if(!(s.state.loading&4)){var u=Zd.get(i);if(u)var m=u.get(null);else{u=new Map,Zd.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<b.length;w++){var O=b[w];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(u.set(O.dataset.precedence,O),m=O)}m&&u.set(null,m)}b=s.instance,O=b.getAttribute("data-precedence"),w=u.get(O)||m,w===m&&u.set(null,b),u.set(O,b),this.count++,m=Xd.bind(this),b.addEventListener("load",m),b.addEventListener("error",m),w?w.parentNode.insertBefore(b,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var uu={$$typeof:R,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function FN(i,s,u,m,b,w,O,z,K){this.tag=1,this.containerInfo=i,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=or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=or(0),this.hiddenUpdates=or(null),this.identifierPrefix=m,this.onUncaughtError=b,this.onCaughtError=w,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function i5(i,s,u,m,b,w,O,z,K,se,de,ge){return i=new FN(i,s,u,O,K,se,de,ge,z),s=1,w===!0&&(s|=24),w=Wr(3,null,null,s),i.current=w,w.stateNode=i,s=ym(),s.refCount++,i.pooledCache=s,s.refCount++,w.memoizedState={element:m,isDehydrated:u,cache:s},wm(w),i}function o5(i){return i?(i=al,i):al}function a5(i,s,u,m,b,w){b=o5(b),m.context===null?m.context=b:m.pendingContext=b,m=oa(s),m.payload={element:u},w=w===void 0?null:w,w!==null&&(m.callback=w),u=aa(i,m,s),u!==null&&(Pr(u,i,s),Uc(u,i,s))}function s5(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function Fg(i,s){s5(i,s),(i=i.alternate)&&s5(i,s)}function l5(i){if(i.tag===13||i.tag===31){var s=ss(i,67108864);s!==null&&Pr(s,i,67108864),Fg(i,67108864)}}function c5(i){if(i.tag===13||i.tag===31){var s=Jr();s=le(s);var u=ss(i,s);u!==null&&Pr(u,i,s),Fg(i,s)}}var eh=!0;function BN(i,s,u,m){var b=B.T;B.T=null;var w=F.p;try{F.p=2,Bg(i,s,u,m)}finally{F.p=w,B.T=b}}function HN(i,s,u,m){var b=B.T;B.T=null;var w=F.p;try{F.p=8,Bg(i,s,u,m)}finally{F.p=w,B.T=b}}function Bg(i,s,u,m){if(eh){var b=Hg(m);if(b===null)Tg(i,s,m,th,u),f5(i,m);else if(qN(b,i,s,u,m))m.stopPropagation();else if(f5(i,m),s&4&&-1<UN.indexOf(i)){for(;b!==null;){var w=jt(b);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var O=Dn(w.pendingLanes);if(O!==0){var z=w;for(z.pendingLanes|=2,z.entangledLanes|=2;O;){var K=1<<31-mt(O);z.entanglements[1]|=K,O&=~K}Zi(w),(qt&6)===0&&(zd=Ue()+500,iu(0))}}break;case 31:case 13:z=ss(w,2),z!==null&&Pr(z,w,2),Fd(),Fg(w,2)}if(w=Hg(m),w===null&&Tg(i,s,m,th,u),w===b)break;b=w}b!==null&&m.stopPropagation()}else Tg(i,s,m,null,u)}}function Hg(i){return i=q0(i),Ug(i)}var th=null;function Ug(i){if(th=null,i=kn(i),i!==null){var s=a(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=l(s),i!==null)return i;i=null}else if(u===31){if(i=c(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return th=i,null}function u5(i){switch(i){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(wt()){case ae:return 2;case ve:return 8;case Oe:case Me:return 32;case He:return 268435456;default:return 32}default:return 32}}var qg=!1,ya=null,xa=null,ba=null,fu=new Map,du=new Map,va=[],UN="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 f5(i,s){switch(i){case"focusin":case"focusout":ya=null;break;case"dragenter":case"dragleave":xa=null;break;case"mouseover":case"mouseout":ba=null;break;case"pointerover":case"pointerout":fu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(s.pointerId)}}function hu(i,s,u,m,b,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:w,targetContainers:[b]},s!==null&&(s=jt(s),s!==null&&l5(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function qN(i,s,u,m,b){switch(s){case"focusin":return ya=hu(ya,i,s,u,m,b),!0;case"dragenter":return xa=hu(xa,i,s,u,m,b),!0;case"mouseover":return ba=hu(ba,i,s,u,m,b),!0;case"pointerover":var w=b.pointerId;return fu.set(w,hu(fu.get(w)||null,i,s,u,m,b)),!0;case"gotpointercapture":return w=b.pointerId,du.set(w,hu(du.get(w)||null,i,s,u,m,b)),!0}return!1}function d5(i){var s=kn(i.target);if(s!==null){var u=a(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){i.blockedOn=s,Ze(i.priority,function(){c5(u)});return}}else if(s===31){if(s=c(u),s!==null){i.blockedOn=s,Ze(i.priority,function(){c5(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function nh(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=Hg(i.nativeEvent);if(u===null){u=i.nativeEvent;var m=new u.constructor(u.type,u);U0=m,u.target.dispatchEvent(m),U0=null}else return s=jt(u),s!==null&&l5(s),i.blockedOn=u,!1;s.shift()}return!0}function h5(i,s,u){nh(i)&&u.delete(s)}function VN(){qg=!1,ya!==null&&nh(ya)&&(ya=null),xa!==null&&nh(xa)&&(xa=null),ba!==null&&nh(ba)&&(ba=null),fu.forEach(h5),du.forEach(h5)}function rh(i,s){i.blockedOn===s&&(i.blockedOn=null,qg||(qg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VN)))}var ih=null;function p5(i){ih!==i&&(ih=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ih===i&&(ih=null);for(var s=0;s<i.length;s+=3){var u=i[s],m=i[s+1],b=i[s+2];if(typeof m!="function"){if(Ug(m||u)===null)continue;break}var w=jt(u);w!==null&&(i.splice(s,3),s-=3,Hm(w,{pending:!0,data:b,method:u.method,action:m},m,b))}}))}function Ol(i){function s(K){return rh(K,i)}ya!==null&&rh(ya,i),xa!==null&&rh(xa,i),ba!==null&&rh(ba,i),fu.forEach(s),du.forEach(s);for(var u=0;u<va.length;u++){var m=va[u];m.blockedOn===i&&(m.blockedOn=null)}for(;0<va.length&&(u=va[0],u.blockedOn===null);)d5(u),u.blockedOn===null&&va.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var b=u[m],w=u[m+1],O=b[Fe]||null;if(typeof w=="function")O||p5(u);else if(O){var z=null;if(w&&w.hasAttribute("formAction")){if(b=w,O=w[Fe]||null)z=O.formAction;else if(Ug(b)!==null)continue}else z=O.action;typeof z=="function"?u[m+1]=z:(u.splice(m,3),m-=3),p5(u)}}}function m5(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(O){return b=O})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function Vg(i){this._internalRoot=i}oh.prototype.render=Vg.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,m=Jr();a5(u,m,i,s,null,null)},oh.prototype.unmount=Vg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;a5(i.current,2,null,i,null,null),Fd(),s[et]=null}};function oh(i){this._internalRoot=i}oh.prototype.unstable_scheduleHydration=function(i){if(i){var s=Ne();i={blockedOn:null,target:i,priority:s};for(var u=0;u<va.length&&s!==0&&s<va[u].priority;u++);va.splice(u,0,i),u===0&&d5(i)}};var g5=t.version;if(g5!=="19.2.4")throw Error(r(527,g5,"19.2.4"));F.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(s),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var $N={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ah=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ah.isDisabled&&ah.supportsFiber)try{Xe=ah.inject($N),Ve=ah}catch{}}return mu.createRoot=function(i,s){if(!o(i))throw Error(r(299));var u=!1,m="",b=Cw,w=Ew,O=kw;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(O=s.onRecoverableError)),s=i5(i,1,!1,null,null,u,m,null,b,w,O,m5),i[et]=s.current,kg(i),new Vg(s)},mu.hydrateRoot=function(i,s,u){if(!o(i))throw Error(r(299));var m=!1,b="",w=Cw,O=Ew,z=kw,K=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(O=u.onCaughtError),u.onRecoverableError!==void 0&&(z=u.onRecoverableError),u.formState!==void 0&&(K=u.formState)),s=i5(i,1,!0,s,u??null,m,b,K,w,O,z,m5),s.context=o5(null),u=s.current,m=Jr(),m=le(m),b=oa(m),b.callback=null,aa(u,b,m),u=m,s.current.lanes=u,Jt(s,u),Zi(s),i[et]=s.current,kg(i),new oh(s)},mu.version="19.2.4",mu}var T5;function tO(){if(T5)return Gg.exports;T5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Gg.exports=eO(),Gg.exports}var nO=tO(),C=Ef();const ke=uc(C),by=YN({__proto__:null,default:ke},[C]);var rO=(e,t,n,r,o,a,l,c)=>{let f=document.documentElement,d=["light","dark"];function g(x){(Array.isArray(e)?e:[e]).forEach(v=>{let S=v==="class",E=S&&a?o.map(k=>a[k]||k):o;S?(f.classList.remove(...E),f.classList.add(a&&a[x]?a[x]:x)):f.setAttribute(v,x)}),h(x)}function h(x){c&&d.includes(x)&&(f.style.colorScheme=x)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)g(r);else try{let x=localStorage.getItem(t)||n,v=l&&x==="system"?y():x;g(v)}catch{}},iO=C.createContext(void 0),oO={setTheme:e=>{},themes:[]},aO=()=>{var e;return(e=C.useContext(iO))!=null?e:oO};C.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:l,themes:c,nonce:f,scriptProps:d})=>{let g=JSON.stringify([n,t,a,e,c,l,r,o]).slice(1,-1);return C.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${rO.toString()})(${g})`}})});var Mi=HE();const sO=uc(Mi);function lO(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const cO=e=>{switch(e){case"success":return dO;case"info":return pO;case"warning":return hO;case"error":return mO;default:return null}},uO=Array(12).fill(0),fO=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},uO.map((n,r)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dO=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hO=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),pO=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mO=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gO=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ke.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yO=()=>{const[e,t]=ke.useState(document.hidden);return ke.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let i1=1;class xO{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:i1++,l=this.toasts.find(f=>f.id===a),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:r}),{...f,...t,id:a,dismissible:c,title:r}):f):this.addToast({title:r,...o,dismissible:c,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,l;const c=o.then(async d=>{if(l=["resolve",d],ke.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(vO(d)&&!d.ok){a=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,v=typeof h=="object"&&!ke.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...v})}else if(d instanceof Error){a=!1;const h=typeof n.error=="function"?await n.error(d):n.error,y=typeof n.description=="function"?await n.description(d):n.description,v=typeof h=="object"&&!ke.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...v})}else if(n.success!==void 0){a=!1;const h=typeof n.success=="function"?await n.success(d):n.success,y=typeof n.description=="function"?await n.description(d):n.description,v=typeof h=="object"&&!ke.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:y,...v})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){a=!1;const g=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,x=typeof g=="object"&&!ke.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:h,...x})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((d,g)=>c.then(()=>l[0]==="reject"?g(l[1]):d(l[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=n?.id||i1++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Br=new xO,bO=(e,t)=>{const n=t?.id||i1++;return Br.addToast({title:e,...t,id:n}),n},vO=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wO=bO,SO=()=>Br.toasts,CO=()=>Br.getActiveToasts(),ut=Object.assign(wO,{success:Br.success,info:Br.info,warning:Br.warning,error:Br.error,custom:Br.custom,message:Br.message,promise:Br.promise,dismiss:Br.dismiss,loading:Br.loading},{getHistory:SO,getToasts:CO});lO("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sh(e){return e.label!==void 0}const EO=3,kO="24px",TO="16px",A5=4e3,AO=356,RO=14,NO=45,OO=200;function Ji(...e){return e.filter(Boolean).join(" ")}function jO(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const MO=e=>{var t,n,r,o,a,l,c,f,d;const{invert:g,toast:h,unstyled:y,interacting:x,setHeights:v,visibleToasts:S,heights:E,index:k,toasts:T,expanded:R,removeToast:L,defaultRichColors:j,closeButton:N,style:A,cancelButtonStyle:D,actionButtonStyle:U,className:I="",descriptionClassName:q="",duration:$,position:V,gap:Y,expandByDefault:H,classNames:B,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[ie,M]=ke.useState(null),[P,Q]=ke.useState(null),[_,ee]=ke.useState(!1),[J,re]=ke.useState(!1),[pe,fe]=ke.useState(!1),[Ce,Ee]=ke.useState(!1),[Ie,Ye]=ke.useState(!1),[je,_e]=ke.useState(0),[ye,We]=ke.useState(0),Te=ke.useRef(h.duration||$||A5),Re=ke.useRef(null),he=ke.useRef(null),Se=k===0,ne=k+1<=S,xe=h.type,ze=h.dismissible!==!1,Ue=h.className||"",wt=h.descriptionClassName||"",ae=ke.useMemo(()=>E.findIndex(nt=>nt.toastId===h.id)||0,[E,h.id]),ve=ke.useMemo(()=>{var nt;return(nt=h.closeButton)!=null?nt:N},[h.closeButton,N]),Oe=ke.useMemo(()=>h.duration||$||A5,[h.duration,$]),Me=ke.useRef(0),He=ke.useRef(0),kt=ke.useRef(0),Ft=ke.useRef(null),[Xe,Ve]=V.split("-"),pt=ke.useMemo(()=>E.reduce((nt,Ut,dn)=>dn>=ae?nt:nt+Ut.height,0),[E,ae]),mt=yO(),Qe=h.invert||g,yt=xe==="loading";He.current=ke.useMemo(()=>ae*Y+pt,[ae,pt]),ke.useEffect(()=>{Te.current=Oe},[Oe]),ke.useEffect(()=>{ee(!0)},[]),ke.useEffect(()=>{const nt=he.current;if(nt){const Ut=nt.getBoundingClientRect().height;return We(Ut),v(dn=>[{toastId:h.id,height:Ut,position:h.position},...dn]),()=>v(dn=>dn.filter(hn=>hn.toastId!==h.id))}},[v,h.id]),ke.useLayoutEffect(()=>{if(!_)return;const nt=he.current,Ut=nt.style.height;nt.style.height="auto";const dn=nt.getBoundingClientRect().height;nt.style.height=Ut,We(dn),v(hn=>hn.find(Jt=>Jt.toastId===h.id)?hn.map(Jt=>Jt.toastId===h.id?{...Jt,height:dn}:Jt):[{toastId:h.id,height:dn,position:h.position},...hn])},[_,h.title,h.description,v,h.id,h.jsx,h.action,h.cancel]);const Pt=ke.useCallback(()=>{re(!0),_e(He.current),v(nt=>nt.filter(Ut=>Ut.toastId!==h.id)),setTimeout(()=>{L(h)},OO)},[h,L,v,He]);ke.useEffect(()=>{if(h.promise&&xe==="loading"||h.duration===1/0||h.type==="loading")return;let nt;return R||x||mt?(()=>{if(kt.current<Me.current){const hn=new Date().getTime()-Me.current;Te.current=Te.current-hn}kt.current=new Date().getTime()})():Te.current!==1/0&&(Me.current=new Date().getTime(),nt=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Pt()},Te.current)),()=>clearTimeout(nt)},[R,x,h,xe,mt,Pt]),ke.useEffect(()=>{h.delete&&(Pt(),h.onDismiss==null||h.onDismiss.call(h,h))},[Pt,h.delete]);function Wt(){var nt;if(F?.loading){var Ut;return ke.createElement("div",{className:Ji(B?.loader,h==null||(Ut=h.classNames)==null?void 0:Ut.loader,"sonner-loader"),"data-visible":xe==="loading"},F.loading)}return ke.createElement(fO,{className:Ji(B?.loader,h==null||(nt=h.classNames)==null?void 0:nt.loader),visible:xe==="loading"})}const yn=h.icon||F?.[xe]||cO(xe);var fn,Dn;return ke.createElement("li",{tabIndex:0,ref:he,className:Ji(I,Ue,B?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,B?.default,B?.[xe],h==null||(n=h.classNames)==null?void 0:n[xe]),"data-sonner-toast":"","data-rich-colors":(fn=h.richColors)!=null?fn:j,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":_,"data-promise":!!h.promise,"data-swiped":Ie,"data-removed":J,"data-visible":ne,"data-y-position":Xe,"data-x-position":Ve,"data-index":k,"data-front":Se,"data-swiping":pe,"data-dismissible":ze,"data-type":xe,"data-invert":Qe,"data-swipe-out":Ce,"data-swipe-direction":P,"data-expanded":!!(R||H&&_),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":T.length-k,"--offset":`${J?je:He.current}px`,"--initial-height":H?"auto":`${ye}px`,...A,...h.style},onDragEnd:()=>{fe(!1),M(null),Ft.current=null},onPointerDown:nt=>{nt.button!==2&&(yt||!ze||(Re.current=new Date,_e(He.current),nt.target.setPointerCapture(nt.pointerId),nt.target.tagName!=="BUTTON"&&(fe(!0),Ft.current={x:nt.clientX,y:nt.clientY})))},onPointerUp:()=>{var nt,Ut,dn;if(Ce||!ze)return;Ft.current=null;const hn=Number(((nt=he.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),or=Number(((Ut=he.current)==null?void 0:Ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Jt=new Date().getTime()-((dn=Re.current)==null?void 0:dn.getTime()),In=ie==="x"?hn:or,pi=Math.abs(In)/Jt;if(Math.abs(In)>=NO||pi>.11){_e(He.current),h.onDismiss==null||h.onDismiss.call(h,h),Q(ie==="x"?hn>0?"right":"left":or>0?"down":"up"),Pt(),Ee(!0);return}else{var W,Z;(W=he.current)==null||W.style.setProperty("--swipe-amount-x","0px"),(Z=he.current)==null||Z.style.setProperty("--swipe-amount-y","0px")}Ye(!1),fe(!1),M(null)},onPointerMove:nt=>{var Ut,dn,hn;if(!Ft.current||!ze||((Ut=window.getSelection())==null?void 0:Ut.toString().length)>0)return;const Jt=nt.clientY-Ft.current.y,In=nt.clientX-Ft.current.x;var pi;const W=(pi=e.swipeDirections)!=null?pi:jO(V);!ie&&(Math.abs(In)>1||Math.abs(Jt)>1)&&M(Math.abs(In)>Math.abs(Jt)?"x":"y");let Z={x:0,y:0};const le=be=>1/(1.5+Math.abs(be)/20);if(ie==="y"){if(W.includes("top")||W.includes("bottom"))if(W.includes("top")&&Jt<0||W.includes("bottom")&&Jt>0)Z.y=Jt;else{const be=Jt*le(Jt);Z.y=Math.abs(be)<Math.abs(Jt)?be:Jt}}else if(ie==="x"&&(W.includes("left")||W.includes("right")))if(W.includes("left")&&In<0||W.includes("right")&&In>0)Z.x=In;else{const be=In*le(In);Z.x=Math.abs(be)<Math.abs(In)?be:In}(Math.abs(Z.x)>0||Math.abs(Z.y)>0)&&Ye(!0),(dn=he.current)==null||dn.style.setProperty("--swipe-amount-x",`${Z.x}px`),(hn=he.current)==null||hn.style.setProperty("--swipe-amount-y",`${Z.y}px`)}},ve&&!h.jsx&&xe!=="loading"?ke.createElement("button",{"aria-label":G,"data-disabled":yt,"data-close-button":!0,onClick:yt||!ze?()=>{}:()=>{Pt(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Ji(B?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Dn=F?.close)!=null?Dn:gO):null,(xe||h.icon||h.promise)&&h.icon!==null&&(F?.[xe]!==null||h.icon)?ke.createElement("div",{"data-icon":"",className:Ji(B?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Wt():null,h.type!=="loading"?yn:null):null,ke.createElement("div",{"data-content":"",className:Ji(B?.content,h==null||(a=h.classNames)==null?void 0:a.content)},ke.createElement("div",{"data-title":"",className:Ji(B?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ke.createElement("div",{"data-description":"",className:Ji(q,wt,B?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),ke.isValidElement(h.cancel)?h.cancel:h.cancel&&sh(h.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:nt=>{sh(h.cancel)&&ze&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,nt),Pt())},className:Ji(B?.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,ke.isValidElement(h.action)?h.action:h.action&&sh(h.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||U,onClick:nt=>{sh(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,nt),!nt.defaultPrevented&&Pt())},className:Ji(B?.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function R5(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function LO(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,l=a?"--mobile-offset":"--offset",c=a?TO:kO;function f(d){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=c:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):f(c)}),n}const _O=ke.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:d,offset:g,mobileOffset:h,theme:y="light",richColors:x,duration:v,style:S,visibleToasts:E=EO,toastOptions:k,dir:T=R5(),gap:R=RO,icons:L,containerAriaLabel:j="Notifications"}=t,[N,A]=ke.useState([]),D=ke.useMemo(()=>r?N.filter(_=>_.toasterId===r):N.filter(_=>!_.toasterId),[N,r]),U=ke.useMemo(()=>Array.from(new Set([a].concat(D.filter(_=>_.position).map(_=>_.position)))),[D,a]),[I,q]=ke.useState([]),[$,V]=ke.useState(!1),[Y,H]=ke.useState(!1),[B,F]=ke.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=ke.useRef(null),ie=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=ke.useRef(null),P=ke.useRef(!1),Q=ke.useCallback(_=>{A(ee=>{var J;return(J=ee.find(re=>re.id===_.id))!=null&&J.delete||Br.dismiss(_.id),ee.filter(({id:re})=>re!==_.id)})},[]);return ke.useEffect(()=>Br.subscribe(_=>{if(_.dismiss){requestAnimationFrame(()=>{A(ee=>ee.map(J=>J.id===_.id?{...J,delete:!0}:J))});return}setTimeout(()=>{sO.flushSync(()=>{A(ee=>{const J=ee.findIndex(re=>re.id===_.id);return J!==-1?[...ee.slice(0,J),{...ee[J],..._},...ee.slice(J+1)]:[_,...ee]})})})}),[N]),ke.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const _=window.matchMedia("(prefers-color-scheme: dark)");try{_.addEventListener("change",({matches:ee})=>{F(ee?"dark":"light")})}catch{_.addListener(({matches:J})=>{try{F(J?"dark":"light")}catch(re){console.error(re)}})}},[y]),ke.useEffect(()=>{N.length<=1&&V(!1)},[N]),ke.useEffect(()=>{const _=ee=>{var J;if(l.every(fe=>ee[fe]||ee.code===fe)){var pe;V(!0),(pe=G.current)==null||pe.focus()}ee.code==="Escape"&&(document.activeElement===G.current||(J=G.current)!=null&&J.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[l]),ke.useEffect(()=>{if(G.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,P.current=!1)}},[G.current]),ke.createElement("section",{ref:n,"aria-label":`${j} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((_,ee)=>{var J;const[re,pe]=_.split("-");return D.length?ke.createElement("ol",{key:_,dir:T==="auto"?R5():T,tabIndex:-1,ref:G,className:d,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":re,"data-x-position":pe,style:{"--front-toast-height":`${((J=I[0])==null?void 0:J.height)||0}px`,"--width":`${AO}px`,"--gap":`${R}px`,...S,...LO(g,h)},onBlur:fe=>{P.current&&!fe.currentTarget.contains(fe.relatedTarget)&&(P.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||P.current||(P.current=!0,M.current=fe.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{Y||V(!1)},onDragEnd:()=>V(!1),onPointerDown:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},D.filter(fe=>!fe.position&&ee===0||fe.position===_).map((fe,Ce)=>{var Ee,Ie;return ke.createElement(MO,{key:fe.id,icons:L,index:Ce,toast:fe,defaultRichColors:x,duration:(Ee=k?.duration)!=null?Ee:v,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(Ie=k?.closeButton)!=null?Ie:f,interacting:Y,position:_,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:Q,toasts:D.filter(Ye=>Ye.position==fe.position),heights:I.filter(Ye=>Ye.position==fe.position),setHeights:q,expandByDefault:c,gap:R,expanded:$,swipeDirections:t.swipeDirections})})):null}))});const UE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const DO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const IO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const N5=e=>{const t=IO(e);return t.charAt(0).toUpperCase()+t.slice(1)};var zO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const PO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const FO=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...c},f)=>C.createElement("svg",{ref:f,...zO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:UE("lucide",o),...!a&&!PO(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,g])=>C.createElement(d,g)),...Array.isArray(a)?a:[a]]));const hr=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(FO,{ref:a,iconNode:t,className:UE(`lucide-${DO(N5(e))}`,`lucide-${e}`,r),...o}));return n.displayName=N5(e),n};const BO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qE=hr("check",BO);const HO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],UO=hr("chevron-down",HO);const qO=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],VE=hr("chevron-right",qO);const VO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$O=hr("circle-check",VO);const GO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],YO=hr("circle",GO);const WO=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],KO=hr("copy",WO);const QO=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],XO=hr("ellipsis-vertical",QO);const ZO=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],JO=hr("ellipsis",ZO);const ej=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$E=hr("file-text",ej);const tj=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],o1=hr("folder",tj);const nj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],rj=hr("history",nj);const ij=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oj=hr("info",ij);const aj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],tf=hr("loader-circle",aj);const sj=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],lj=hr("octagon-x",sj);const cj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uj=hr("pencil",cj);const fj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dj=hr("triangle-alert",fj);const hj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qp=hr("x",hj),pj=({...e})=>{const{theme:t="system"}=aO();return p.jsx(_O,{theme:t,className:"toaster group",icons:{success:p.jsx($O,{className:"size-5 text-green-500"}),info:p.jsx(oj,{className:"size-5 text-blue-500"}),warning:p.jsx(dj,{className:"size-5 text-yellow-500"}),error:p.jsx(lj,{className:"size-5 text-red-500"}),loading:p.jsx(tf,{className:"size-5 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{description:"whitespace-pre-line",toast:"cn-toast"}},...e})};var GE=e=>{throw TypeError(e)},mj=(e,t,n)=>t.has(e)||GE("Cannot "+n),Xg=(e,t,n)=>(mj(e,t,"read from private field"),n?n.call(e):t.get(e)),gj=(e,t,n)=>t.has(e)?GE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O5="popstate";function yj(e={}){function t(r,o){let{pathname:a,search:l,hash:c}=r.location;return nf("",{pathname:a,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:uo(o)}return bj(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Nn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xj(){return Math.random().toString(36).substring(2,10)}function j5(e,t){return{usr:e.state,key:e.key,idx:t}}function nf(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ua(t):t,state:n,key:t&&t.key||r||xj()}}function uo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ua(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function bj(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,c="POP",f=null,d=g();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function g(){return(l.state||{idx:null}).idx}function h(){c="POP";let E=g(),k=E==null?null:E-d;d=E,f&&f({action:c,location:S.location,delta:k})}function y(E,k){c="PUSH";let T=nf(S.location,E,k);d=g()+1;let R=j5(T,d),L=S.createHref(T);try{l.pushState(R,"",L)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;o.location.assign(L)}a&&f&&f({action:c,location:S.location,delta:1})}function x(E,k){c="REPLACE";let T=nf(S.location,E,k);d=g();let R=j5(T,d),L=S.createHref(T);l.replaceState(R,"",L),a&&f&&f({action:c,location:S.location,delta:0})}function v(E){return YE(E)}let S={get action(){return c},get location(){return e(o,l)},listen(E){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(O5,h),f=E,()=>{o.removeEventListener(O5,h),f=null}},createHref(E){return t(o,E)},createURL:v,encodeLocation(E){let k=v(E);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:x,go(E){return l.go(E)}};return S}function YE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:uo(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var zu,M5=class{constructor(e){if(gj(this,zu,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Xg(this,zu).has(e))return Xg(this,zu).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Xg(this,zu).set(e,t)}};zu=new WeakMap;var vj=new Set(["lazy","caseSensitive","path","id","index","children"]);function wj(e){return vj.has(e)}var Sj=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Cj(e){return Sj.has(e)}function Ej(e){return e.index===!0}function rf(e,t,n=[],r={},o=!1){return e.map((a,l)=>{let c=[...n,String(l)],f=typeof a.id=="string"?a.id:c.join("-");if(Ct(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ct(o||!r[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),Ej(a)){let d={...a,id:f};return r[f]=L5(d,t(d)),d}else{let d={...a,id:f,children:void 0};return r[f]=L5(d,t(d)),a.children&&(d.children=rf(a.children,t,c,r,o)),d}})}function L5(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Aa(e,t,n="/"){return Pu(e,t,n,!1)}function Pu(e,t,n,r){let o=typeof t=="string"?Ua(t):t,a=Li(o.pathname||"/",n);if(a==null)return null;let l=WE(e);Tj(l);let c=null;for(let f=0;c==null&&f<l.length;++f){let d=zj(a);c=Dj(l[f],d,r)}return c}function kj(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function WE(e,t=[],n=[],r="",o=!1){let a=(l,c,f=o,d)=>{let g={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&f)return;Ct(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let h=io([r,g.relativePath]),y=n.concat(g);l.children&&l.children.length>0&&(Ct(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),WE(l.children,t,y,h,f)),!(l.path==null&&!l.index)&&t.push({path:h,score:Lj(h,l.index),routesMeta:y})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))a(l,c);else for(let f of KE(l.path))a(l,c,!0,f)}),t}function KE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=KE(r.join("/")),c=[];return c.push(...l.map(f=>f===""?a:[a,f].join("/"))),o&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function Tj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_j(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Aj=/^:[\w-]+$/,Rj=3,Nj=2,Oj=1,jj=10,Mj=-2,_5=e=>e==="*";function Lj(e,t){let n=e.split("/"),r=n.length;return n.some(_5)&&(r+=Mj),t&&(r+=Nj),n.filter(o=>!_5(o)).reduce((o,a)=>o+(Aj.test(a)?Rj:a===""?Oj:jj),r)}function _j(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Dj(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],d=c===r.length-1,g=a==="/"?t:t.slice(a.length)||"/",h=ap({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},g),y=f.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=ap({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!h)return null;Object.assign(o,h.params),l.push({params:o,pathname:io([a,h.pathname]),pathnameBase:Bj(io([a,h.pathnameBase])),route:y}),h.pathnameBase!=="/"&&(a=io([a,h.pathnameBase]))}return l}function ap(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ij(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],l=a.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce((d,{paramName:g,isOptional:h},y)=>{if(g==="*"){let v=c[y]||"";l=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const x=c[y];return h&&!x?d[g]=void 0:d[g]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:l,pattern:e}}function Ij(e,t=!1,n=!0){Nn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f)=>(r.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function zj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Li(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Pj({basename:e,pathname:t}){return t==="/"?e:io([e,t])}var QE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vy=e=>QE.test(e);function Fj(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Ua(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=D5(n.substring(1),"/"):a=D5(n,t)):a=t,{pathname:a,search:Hj(r),hash:Uj(o)}}function D5(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Zg(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function XE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vp(e){let t=XE(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $p(e,t,n,r=!1){let o;typeof e=="string"?o=Ua(e):(o={...e},Ct(!o.pathname||!o.pathname.includes("?"),Zg("?","pathname","search",o)),Ct(!o.pathname||!o.pathname.includes("#"),Zg("#","pathname","hash",o)),Ct(!o.search||!o.search.includes("#"),Zg("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,c;if(l==null)c=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),h-=1;o.pathname=y.join("/")}c=h>=0?t[h]:"/"}let f=Fj(o,c),d=l&&l!=="/"&&l.endsWith("/"),g=(a||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||g)&&(f.pathname+="/"),f}var io=e=>e.join("/").replace(/\/\/+/g,"/"),Bj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Hj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Uj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,kf=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function of(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Tf(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ZE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function JE(e,t){let n=e;if(typeof n!="string"||!QE.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(ZE)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),c=Li(l.pathname,t);l.origin===a.origin&&c!=null?n=c+l.search+l.hash:o=!0}catch{Nn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var Na=Symbol("Uninstrumented");function qj(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(a){let l=Object.keys(n);for(let c of l)a[c]&&n[c].push(a[c])}}));let r={};if(typeof t.lazy=="function"&&n.lazy.length>0){let o=Bl(n.lazy,t.lazy,()=>{});o&&(r.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(a=>{let l=o[a],c=n[`lazy.${a}`];if(typeof l=="function"&&c.length>0){let f=Bl(c,l,()=>{});f&&(r.lazy=Object.assign(r.lazy||{},{[a]:f}))}})}return["loader","action"].forEach(o=>{let a=t[o];if(typeof a=="function"&&n[o].length>0){let l=a[Na]??a,c=Bl(n[o],l,(...f)=>I5(f[0]));c&&(o==="loader"&&l.hydrate===!0&&(c.hydrate=!0),c[Na]=l,r[o]=c)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(o=>{let a=o[Na]??o,l=Bl(n.middleware,a,(...c)=>I5(c[0]));return l?(l[Na]=a,l):o})),r}function Vj(e,t){let n={navigate:[],fetch:[]};if(t.forEach(r=>r({instrument(o){let a=Object.keys(o);for(let l of a)o[l]&&n[l].push(o[l])}})),n.navigate.length>0){let r=e.navigate[Na]??e.navigate,o=Bl(n.navigate,r,(...a)=>{let[l,c]=a;return{to:typeof l=="number"||typeof l=="string"?l:l?uo(l):".",...z5(e,c??{})}});o&&(o[Na]=r,e.navigate=o)}if(n.fetch.length>0){let r=e.fetch[Na]??e.fetch,o=Bl(n.fetch,r,(...a)=>{let[l,,c,f]=a;return{href:c??".",fetcherKey:l,...z5(e,f??{})}});o&&(o[Na]=r,e.fetch=o)}return e}function Bl(e,t,n){return e.length===0?null:async(...r)=>{let o=await ek(e,n(...r),()=>t(...r),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function ek(e,t,n,r){let o=e[r],a;if(o){let l,c=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=ek(e,t,n,r-1),a=await l,Ct(a,"Expected a result"),a.type==="error"&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await o(c,t)}catch(f){console.error("An instrumentation function threw an error:",f)}l||await c(),await l}else try{a={type:"success",value:await n()}}catch(l){a={type:"error",value:l}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function I5(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:$j(t),params:{...r},unstable_pattern:o,context:Gj(n)}}function z5(e,t){return{currentUrl:uo(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function $j(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Gj(e){if(Wj(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Yj=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Wj(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Yj}var tk=["POST","PUT","PATCH","DELETE"],Kj=new Set(tk),Qj=["GET",...tk],Xj=new Set(Qj),nk=new Set([301,302,303,307,308]),Zj=new Set([307,308]),Jg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Jj={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},eM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),rk="remix-router-transitions",ik=Symbol("ResetLoaderData");function tM(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Ct(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||eM,a=o;if(e.unstable_instrumentations){let W=e.unstable_instrumentations;a=Z=>({...o(Z),...qj(W.map(le=>le.route).filter(Boolean),Z)})}let l={},c=rf(e.routes,a,void 0,l),f,d=e.basename||"/";d.startsWith("/")||(d=`/${d}`);let g=e.dataStrategy||aM,h={...e.future},y=null,x=new Set,v=null,S=null,E=null,k=e.hydrationData!=null,T=Aa(c,e.history.location,d),R=!1,L=null,j;if(T==null&&!e.patchRoutesOnNavigation){let W=ki(404,{pathname:e.history.location.pathname}),{matches:Z,route:le}=lh(c);j=!0,T=Z,L={[le.id]:W}}else if(T&&!e.hydrationData&&hn(T,c,e.history.location.pathname).active&&(T=null),T)if(T.some(W=>W.route.lazy))j=!1;else if(!T.some(W=>wy(W.route)))j=!0;else{let W=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null;if(Z){let le=T.findIndex(be=>Z[be.route.id]!==void 0);j=T.slice(0,le+1).every(be=>!s1(be.route,W,Z))}else j=T.every(le=>!s1(le.route,W,Z))}else{j=!1,T=[];let W=hn(null,c,e.history.location.pathname);W.active&&W.matches&&(R=!0,T=W.matches)}let N,A={historyAction:e.history.action,location:e.history.location,matches:T,initialized:j,navigation:Jg,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},D="POP",U=null,I=!1,q,$=!1,V=new Map,Y=null,H=!1,B=!1,F=new Set,G=new Map,ie=0,M=-1,P=new Map,Q=new Set,_=new Map,ee=new Map,J=new Set,re=new Map,pe,fe=null;function Ce(){if(y=e.history.listen(({action:W,location:Z,delta:le})=>{if(pe){pe(),pe=void 0;return}Nn(re.size===0||le!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let be=yn({currentLocation:A.location,nextLocation:Z,historyAction:W});if(be&&le!=null){let Ne=new Promise(Ze=>{pe=Ze});e.history.go(le*-1),Wt(be,{state:"blocked",location:Z,proceed(){Wt(be,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),Ne.then(()=>e.history.go(le))},reset(){let Ze=new Map(A.blockers);Ze.set(be,gu),Ye({blockers:Ze})}}),U?.resolve(),U=null;return}return We(W,Z)}),n){EM(t,V);let W=()=>kM(t,V);t.addEventListener("pagehide",W),Y=()=>t.removeEventListener("pagehide",W)}return A.initialized||We("POP",A.location,{initialHydration:!0}),N}function Ee(){y&&y(),Y&&Y(),x.clear(),q&&q.abort(),A.fetchers.forEach((W,Z)=>Ft(Z)),A.blockers.forEach((W,Z)=>Pt(Z))}function Ie(W){return x.add(W),()=>x.delete(W)}function Ye(W,Z={}){W.matches&&(W.matches=W.matches.map(Ne=>{let Ze=l[Ne.route.id],Pe=Ne.route;return Pe.element!==Ze.element||Pe.errorElement!==Ze.errorElement||Pe.hydrateFallbackElement!==Ze.hydrateFallbackElement?{...Ne,route:Ze}:Ne})),A={...A,...W};let le=[],be=[];A.fetchers.forEach((Ne,Ze)=>{Ne.state==="idle"&&(J.has(Ze)?le.push(Ze):be.push(Ze))}),J.forEach(Ne=>{!A.fetchers.has(Ne)&&!G.has(Ne)&&le.push(Ne)}),[...x].forEach(Ne=>Ne(A,{deletedFetchers:le,newErrors:W.errors??null,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),le.forEach(Ne=>Ft(Ne)),be.forEach(Ne=>A.fetchers.delete(Ne))}function je(W,Z,{flushSync:le}={}){let be=A.actionData!=null&&A.navigation.formMethod!=null&&gr(A.navigation.formMethod)&&A.navigation.state==="loading"&&W.state?._isRedirect!==!0,Ne;Z.actionData?Object.keys(Z.actionData).length>0?Ne=Z.actionData:Ne=null:be?Ne=A.actionData:Ne=null;let Ze=Z.loaderData?Y5(A.loaderData,Z.loaderData,Z.matches||[],Z.errors):A.loaderData,Pe=A.blockers;Pe.size>0&&(Pe=new Map(Pe),Pe.forEach((lt,tt)=>Pe.set(tt,gu)));let Le=H?!1:dn(W,Z.matches||A.matches),Fe=I===!0||A.navigation.formMethod!=null&&gr(A.navigation.formMethod)&&W.state?._isRedirect!==!0;f&&(c=f,f=void 0),H||D==="POP"||(D==="PUSH"?e.history.push(W,W.state):D==="REPLACE"&&e.history.replace(W,W.state));let et;if(D==="POP"){let lt=V.get(A.location.pathname);lt&&lt.has(W.pathname)?et={currentLocation:A.location,nextLocation:W}:V.has(W.pathname)&&(et={currentLocation:W,nextLocation:A.location})}else if($){let lt=V.get(A.location.pathname);lt?lt.add(W.pathname):(lt=new Set([W.pathname]),V.set(A.location.pathname,lt)),et={currentLocation:A.location,nextLocation:W}}Ye({...Z,actionData:Ne,loaderData:Ze,historyAction:D,location:W,initialized:!0,navigation:Jg,revalidation:"idle",restoreScrollPosition:Le,preventScrollReset:Fe,blockers:Pe},{viewTransitionOpts:et,flushSync:le===!0}),D="POP",I=!1,$=!1,H=!1,B=!1,U?.resolve(),U=null,fe?.resolve(),fe=null}async function _e(W,Z){if(U?.resolve(),U=null,typeof W=="number"){U||(U=X5());let Ot=U.promise;return e.history.go(W),Ot}let le=a1(A.location,A.matches,d,W,Z?.fromRouteId,Z?.relative),{path:be,submission:Ne,error:Ze}=P5(!1,le,Z),Pe=A.location,Le=nf(A.location,be,Z&&Z.state);Le={...Le,...e.history.encodeLocation(Le)};let Fe=Z&&Z.replace!=null?Z.replace:void 0,et="PUSH";Fe===!0?et="REPLACE":Fe===!1||Ne!=null&&gr(Ne.formMethod)&&Ne.formAction===A.location.pathname+A.location.search&&(et="REPLACE");let lt=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,tt=(Z&&Z.flushSync)===!0,It=yn({currentLocation:Pe,nextLocation:Le,historyAction:et});if(It){Wt(It,{state:"blocked",location:Le,proceed(){Wt(It,{state:"proceeding",proceed:void 0,reset:void 0,location:Le}),_e(W,Z)},reset(){let Ot=new Map(A.blockers);Ot.set(It,gu),Ye({blockers:Ot})}});return}await We(et,Le,{submission:Ne,pendingError:Ze,preventScrollReset:lt,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:tt,callSiteDefaultShouldRevalidate:Z&&Z.unstable_defaultShouldRevalidate})}function ye(){fe||(fe=X5()),ve(),Ye({revalidation:"loading"});let W=fe.promise;return A.navigation.state==="submitting"?W:A.navigation.state==="idle"?(We(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),W):(We(D||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:$===!0}),W)}async function We(W,Z,le){q&&q.abort(),q=null,D=W,H=(le&&le.startUninterruptedRevalidation)===!0,Ut(A.location,A.matches),I=(le&&le.preventScrollReset)===!0,$=(le&&le.enableViewTransition)===!0;let be=f||c,Ne=le&&le.overrideNavigation,Ze=le?.initialHydration&&A.matches&&A.matches.length>0&&!R?A.matches:Aa(be,Z,d),Pe=(le&&le.flushSync)===!0;if(Ze&&A.initialized&&!B&&pM(A.location,Z)&&!(le&&le.submission&&gr(le.submission.formMethod))){je(Z,{matches:Ze},{flushSync:Pe});return}let Le=hn(Ze,be,Z.pathname);if(Le.active&&Le.matches&&(Ze=Le.matches),!Ze){let{error:En,notFoundMatches:kn,route:jt}=fn(Z.pathname);je(Z,{matches:kn,loaderData:{},errors:{[jt.id]:En}},{flushSync:Pe});return}q=new AbortController;let Fe=Il(e.history,Z,q.signal,le&&le.submission),et=e.getContext?await e.getContext():new M5,lt;if(le&&le.pendingError)lt=[Ra(Ze).route.id,{type:"error",error:le.pendingError}];else if(le&&le.submission&&gr(le.submission.formMethod)){let En=await Te(Fe,Z,le.submission,Ze,et,Le.active,le&&le.initialHydration===!0,{replace:le.replace,flushSync:Pe});if(En.shortCircuited)return;if(En.pendingActionResult){let[kn,jt]=En.pendingActionResult;if(ti(jt)&&of(jt.error)&&jt.error.status===404){q=null,je(Z,{matches:En.matches,loaderData:{},errors:{[kn]:jt.error}});return}}Ze=En.matches||Ze,lt=En.pendingActionResult,Ne=e2(Z,le.submission),Pe=!1,Le.active=!1,Fe=Il(e.history,Fe.url,Fe.signal)}let{shortCircuited:tt,matches:It,loaderData:Ot,errors:Sn}=await Re(Fe,Z,Ze,et,Le.active,Ne,le&&le.submission,le&&le.fetcherSubmission,le&&le.replace,le&&le.initialHydration===!0,Pe,lt,le&&le.callSiteDefaultShouldRevalidate);tt||(q=null,je(Z,{matches:It||Ze,...W5(lt),loaderData:Ot,errors:Sn}))}async function Te(W,Z,le,be,Ne,Ze,Pe,Le={}){ve();let Fe=SM(Z,le);if(Ye({navigation:Fe},{flushSync:Le.flushSync===!0}),Ze){let tt=await or(be,Z.pathname,W.signal);if(tt.type==="aborted")return{shortCircuited:!0};if(tt.type==="error"){if(tt.partialMatches.length===0){let{matches:Ot,route:Sn}=lh(c);return{matches:Ot,pendingActionResult:[Sn.id,{type:"error",error:tt.error}]}}let It=Ra(tt.partialMatches).route.id;return{matches:tt.partialMatches,pendingActionResult:[It,{type:"error",error:tt.error}]}}else if(tt.matches)be=tt.matches;else{let{notFoundMatches:It,error:Ot,route:Sn}=fn(Z.pathname);return{matches:It,pendingActionResult:[Sn.id,{type:"error",error:Ot}]}}}let et,lt=Bh(be,Z);if(!lt.route.action&&!lt.route.lazy)et={type:"error",error:ki(405,{method:W.method,pathname:Z.pathname,routeId:lt.route.id})};else{let tt=Vl(a,l,W,be,lt,Pe?[]:r,Ne),It=await wt(W,tt,Ne,null);if(et=It[lt.route.id],!et){for(let Ot of be)if(It[Ot.route.id]){et=It[Ot.route.id];break}}if(W.signal.aborted)return{shortCircuited:!0}}if(Ts(et)){let tt;return Le&&Le.replace!=null?tt=Le.replace:tt=V5(et.response.headers.get("Location"),new URL(W.url),d,e.history)===A.location.pathname+A.location.search,await Ue(W,et,!0,{submission:le,replace:tt}),{shortCircuited:!0}}if(ti(et)){let tt=Ra(be,lt.route.id);return(Le&&Le.replace)!==!0&&(D="PUSH"),{matches:be,pendingActionResult:[tt.route.id,et,lt.route.id]}}return{matches:be,pendingActionResult:[lt.route.id,et]}}async function Re(W,Z,le,be,Ne,Ze,Pe,Le,Fe,et,lt,tt,It){let Ot=Ze||e2(Z,Pe),Sn=Pe||Le||Q5(Ot),En=!H&&!et;if(Ne){if(En){let On=he(tt);Ye({navigation:Ot,...On!==void 0?{actionData:On}:{}},{flushSync:lt})}let Mt=await or(le,Z.pathname,W.signal);if(Mt.type==="aborted")return{shortCircuited:!0};if(Mt.type==="error"){if(Mt.partialMatches.length===0){let{matches:Ii,route:ar}=lh(c);return{matches:Ii,loaderData:{},errors:{[ar.id]:Mt.error}}}let On=Ra(Mt.partialMatches).route.id;return{matches:Mt.partialMatches,loaderData:{},errors:{[On]:Mt.error}}}else if(Mt.matches)le=Mt.matches;else{let{error:On,notFoundMatches:Ii,route:ar}=fn(Z.pathname);return{matches:Ii,loaderData:{},errors:{[ar.id]:On}}}}let kn=f||c,{dsMatches:jt,revalidatingFetchers:Jn}=F5(W,be,a,l,e.history,A,le,Sn,Z,et?[]:r,et===!0,B,F,J,_,Q,kn,d,e.patchRoutesOnNavigation!=null,tt,It);if(M=++ie,!e.dataStrategy&&!jt.some(Mt=>Mt.shouldLoad)&&!jt.some(Mt=>Mt.route.middleware&&Mt.route.middleware.length>0)&&Jn.length===0){let Mt=mt();return je(Z,{matches:le,loaderData:{},errors:tt&&ti(tt[1])?{[tt[0]]:tt[1].error}:null,...W5(tt),...Mt?{fetchers:new Map(A.fetchers)}:{}},{flushSync:lt}),{shortCircuited:!0}}if(En){let Mt={};if(!Ne){Mt.navigation=Ot;let On=he(tt);On!==void 0&&(Mt.actionData=On)}Jn.length>0&&(Mt.fetchers=Se(Jn)),Ye(Mt,{flushSync:lt})}Jn.forEach(Mt=>{Ve(Mt.key),Mt.controller&&G.set(Mt.key,Mt.controller)});let Mr=()=>Jn.forEach(Mt=>Ve(Mt.key));q&&q.signal.addEventListener("abort",Mr);let{loaderResults:xn,fetcherResults:_i}=await ae(jt,Jn,W,be);if(W.signal.aborted)return{shortCircuited:!0};q&&q.signal.removeEventListener("abort",Mr),Jn.forEach(Mt=>G.delete(Mt.key));let Gr=ch(xn);if(Gr)return await Ue(W,Gr.result,!0,{replace:Fe}),{shortCircuited:!0};if(Gr=ch(_i),Gr)return Q.add(Gr.key),await Ue(W,Gr.result,!0,{replace:Fe}),{shortCircuited:!0};let{loaderData:Di,errors:mi}=G5(A,le,xn,tt,Jn,_i);et&&A.errors&&(mi={...A.errors,...mi});let go=mt(),ts=Qe(M),ns=go||ts||Jn.length>0;return{matches:le,loaderData:Di,errors:mi,...ns?{fetchers:new Map(A.fetchers)}:{}}}function he(W){if(W&&!ti(W[1]))return{[W[0]]:W[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Se(W){return W.forEach(Z=>{let le=A.fetchers.get(Z.key),be=yu(void 0,le?le.data:void 0);A.fetchers.set(Z.key,be)}),new Map(A.fetchers)}async function ne(W,Z,le,be){Ve(W);let Ne=(be&&be.flushSync)===!0,Ze=f||c,Pe=a1(A.location,A.matches,d,le,Z,be?.relative),Le=Aa(Ze,Pe,d),Fe=hn(Le,Ze,Pe);if(Fe.active&&Fe.matches&&(Le=Fe.matches),!Le){Me(W,Z,ki(404,{pathname:Pe}),{flushSync:Ne});return}let{path:et,submission:lt,error:tt}=P5(!0,Pe,be);if(tt){Me(W,Z,tt,{flushSync:Ne});return}let It=e.getContext?await e.getContext():new M5,Ot=(be&&be.preventScrollReset)===!0;if(lt&&gr(lt.formMethod)){await xe(W,Z,et,Le,It,Fe.active,Ne,Ot,lt,be&&be.unstable_defaultShouldRevalidate);return}_.set(W,{routeId:Z,path:et}),await ze(W,Z,et,Le,It,Fe.active,Ne,Ot,lt)}async function xe(W,Z,le,be,Ne,Ze,Pe,Le,Fe,et){ve(),_.delete(W);let lt=A.fetchers.get(W);Oe(W,CM(Fe,lt),{flushSync:Pe});let tt=new AbortController,It=Il(e.history,le,tt.signal,Fe);if(Ze){let Lt=await or(be,new URL(It.url).pathname,It.signal,W);if(Lt.type==="aborted")return;if(Lt.type==="error"){Me(W,Z,Lt.error,{flushSync:Pe});return}else if(Lt.matches)be=Lt.matches;else{Me(W,Z,ki(404,{pathname:le}),{flushSync:Pe});return}}let Ot=Bh(be,le);if(!Ot.route.action&&!Ot.route.lazy){let Lt=ki(405,{method:Fe.formMethod,pathname:le,routeId:Z});Me(W,Z,Lt,{flushSync:Pe});return}G.set(W,tt);let Sn=ie,En=Vl(a,l,It,be,Ot,r,Ne),kn=await wt(It,En,Ne,W),jt=kn[Ot.route.id];if(!jt){for(let Lt of En)if(kn[Lt.route.id]){jt=kn[Lt.route.id];break}}if(It.signal.aborted){G.get(W)===tt&&G.delete(W);return}if(J.has(W)){if(Ts(jt)||ti(jt)){Oe(W,Io(void 0));return}}else{if(Ts(jt))if(G.delete(W),M>Sn){Oe(W,Io(void 0));return}else return Q.add(W),Oe(W,yu(Fe)),Ue(It,jt,!1,{fetcherSubmission:Fe,preventScrollReset:Le});if(ti(jt)){Me(W,Z,jt.error);return}}let Jn=A.navigation.location||A.location,Mr=Il(e.history,Jn,tt.signal),xn=f||c,_i=A.navigation.state!=="idle"?Aa(xn,A.navigation.location,d):A.matches;Ct(_i,"Didn't find any matches after fetcher action");let Gr=++ie;P.set(W,Gr);let Di=yu(Fe,jt.data);A.fetchers.set(W,Di);let{dsMatches:mi,revalidatingFetchers:go}=F5(Mr,Ne,a,l,e.history,A,_i,Fe,Jn,r,!1,B,F,J,_,Q,xn,d,e.patchRoutesOnNavigation!=null,[Ot.route.id,jt],et);go.filter(Lt=>Lt.key!==W).forEach(Lt=>{let rs=Lt.key,Qf=A.fetchers.get(rs),Tc=yu(void 0,Qf?Qf.data:void 0);A.fetchers.set(rs,Tc),Ve(rs),Lt.controller&&G.set(rs,Lt.controller)}),Ye({fetchers:new Map(A.fetchers)});let ts=()=>go.forEach(Lt=>Ve(Lt.key));tt.signal.addEventListener("abort",ts);let{loaderResults:ns,fetcherResults:Mt}=await ae(mi,go,Mr,Ne);if(tt.signal.aborted)return;if(tt.signal.removeEventListener("abort",ts),P.delete(W),G.delete(W),go.forEach(Lt=>G.delete(Lt.key)),A.fetchers.has(W)){let Lt=Io(jt.data);A.fetchers.set(W,Lt)}let On=ch(ns);if(On)return Ue(Mr,On.result,!1,{preventScrollReset:Le});if(On=ch(Mt),On)return Q.add(On.key),Ue(Mr,On.result,!1,{preventScrollReset:Le});let{loaderData:Ii,errors:ar}=G5(A,_i,ns,void 0,go,Mt);Qe(Gr),A.navigation.state==="loading"&&Gr>M?(Ct(D,"Expected pending action"),q&&q.abort(),je(A.navigation.location,{matches:_i,loaderData:Ii,errors:ar,fetchers:new Map(A.fetchers)})):(Ye({errors:ar,loaderData:Y5(A.loaderData,Ii,_i,ar),fetchers:new Map(A.fetchers)}),B=!1)}async function ze(W,Z,le,be,Ne,Ze,Pe,Le,Fe){let et=A.fetchers.get(W);Oe(W,yu(Fe,et?et.data:void 0),{flushSync:Pe});let lt=new AbortController,tt=Il(e.history,le,lt.signal);if(Ze){let jt=await or(be,new URL(tt.url).pathname,tt.signal,W);if(jt.type==="aborted")return;if(jt.type==="error"){Me(W,Z,jt.error,{flushSync:Pe});return}else if(jt.matches)be=jt.matches;else{Me(W,Z,ki(404,{pathname:le}),{flushSync:Pe});return}}let It=Bh(be,le);G.set(W,lt);let Ot=ie,Sn=Vl(a,l,tt,be,It,r,Ne),kn=(await wt(tt,Sn,Ne,W))[It.route.id];if(G.get(W)===lt&&G.delete(W),!tt.signal.aborted){if(J.has(W)){Oe(W,Io(void 0));return}if(Ts(kn))if(M>Ot){Oe(W,Io(void 0));return}else{Q.add(W),await Ue(tt,kn,!1,{preventScrollReset:Le});return}if(ti(kn)){Me(W,Z,kn.error);return}Oe(W,Io(kn.data))}}async function Ue(W,Z,le,{submission:be,fetcherSubmission:Ne,preventScrollReset:Ze,replace:Pe}={}){le||(U?.resolve(),U=null),Z.response.headers.has("X-Remix-Revalidate")&&(B=!0);let Le=Z.response.headers.get("Location");Ct(Le,"Expected a Location header on the redirect Response"),Le=V5(Le,new URL(W.url),d,e.history);let Fe=nf(A.location,Le,{_isRedirect:!0});if(n){let Sn=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))Sn=!0;else if(vy(Le)){const En=YE(Le,!0);Sn=En.origin!==t.location.origin||Li(En.pathname,d)==null}if(Sn){Pe?t.location.replace(Le):t.location.assign(Le);return}}q=null;let et=Pe===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:lt,formAction:tt,formEncType:It}=A.navigation;!be&&!Ne&&lt&&tt&&It&&(be=Q5(A.navigation));let Ot=be||Ne;if(Zj.has(Z.response.status)&&Ot&&gr(Ot.formMethod))await We(et,Fe,{submission:{...Ot,formAction:Le},preventScrollReset:Ze||I,enableViewTransition:le?$:void 0});else{let Sn=e2(Fe,be);await We(et,Fe,{overrideNavigation:Sn,fetcherSubmission:Ne,preventScrollReset:Ze||I,enableViewTransition:le?$:void 0})}}async function wt(W,Z,le,be){let Ne,Ze={};try{Ne=await lM(g,W,Z,be,le,!1)}catch(Pe){return Z.filter(Le=>Le.shouldLoad).forEach(Le=>{Ze[Le.route.id]={type:"error",error:Pe}}),Ze}if(W.signal.aborted)return Ze;if(!gr(W.method))for(let Pe of Z){if(Ne[Pe.route.id]?.type==="error")break;!Ne.hasOwnProperty(Pe.route.id)&&!A.loaderData.hasOwnProperty(Pe.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Pe.route.id))&&Pe.shouldCallHandler()&&(Ne[Pe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Pe.route.id}`)})}for(let[Pe,Le]of Object.entries(Ne))if(xM(Le)){let Fe=Le.result;Ze[Pe]={type:"redirect",response:dM(Fe,W,Pe,Z,d)}}else Ze[Pe]=await fM(Le);return Ze}async function ae(W,Z,le,be){let Ne=wt(le,W,be,null),Ze=Promise.all(Z.map(async Fe=>{if(Fe.matches&&Fe.match&&Fe.request&&Fe.controller){let lt=(await wt(Fe.request,Fe.matches,be,Fe.key))[Fe.match.route.id];return{[Fe.key]:lt}}else return Promise.resolve({[Fe.key]:{type:"error",error:ki(404,{pathname:Fe.path})}})})),Pe=await Ne,Le=(await Ze).reduce((Fe,et)=>Object.assign(Fe,et),{});return{loaderResults:Pe,fetcherResults:Le}}function ve(){B=!0,_.forEach((W,Z)=>{G.has(Z)&&F.add(Z),Ve(Z)})}function Oe(W,Z,le={}){A.fetchers.set(W,Z),Ye({fetchers:new Map(A.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function Me(W,Z,le,be={}){let Ne=Ra(A.matches,Z);Ft(W),Ye({errors:{[Ne.route.id]:le},fetchers:new Map(A.fetchers)},{flushSync:(be&&be.flushSync)===!0})}function He(W){return ee.set(W,(ee.get(W)||0)+1),J.has(W)&&J.delete(W),A.fetchers.get(W)||Jj}function kt(W,Z){Ve(W,Z?.reason),Oe(W,Io(null))}function Ft(W){let Z=A.fetchers.get(W);G.has(W)&&!(Z&&Z.state==="loading"&&P.has(W))&&Ve(W),_.delete(W),P.delete(W),Q.delete(W),J.delete(W),F.delete(W),A.fetchers.delete(W)}function Xe(W){let Z=(ee.get(W)||0)-1;Z<=0?(ee.delete(W),J.add(W)):ee.set(W,Z),Ye({fetchers:new Map(A.fetchers)})}function Ve(W,Z){let le=G.get(W);le&&(le.abort(Z),G.delete(W))}function pt(W){for(let Z of W){let le=He(Z),be=Io(le.data);A.fetchers.set(Z,be)}}function mt(){let W=[],Z=!1;for(let le of Q){let be=A.fetchers.get(le);Ct(be,`Expected fetcher: ${le}`),be.state==="loading"&&(Q.delete(le),W.push(le),Z=!0)}return pt(W),Z}function Qe(W){let Z=[];for(let[le,be]of P)if(be<W){let Ne=A.fetchers.get(le);Ct(Ne,`Expected fetcher: ${le}`),Ne.state==="loading"&&(Ve(le),P.delete(le),Z.push(le))}return pt(Z),Z.length>0}function yt(W,Z){let le=A.blockers.get(W)||gu;return re.get(W)!==Z&&re.set(W,Z),le}function Pt(W){A.blockers.delete(W),re.delete(W)}function Wt(W,Z){let le=A.blockers.get(W)||gu;Ct(le.state==="unblocked"&&Z.state==="blocked"||le.state==="blocked"&&Z.state==="blocked"||le.state==="blocked"&&Z.state==="proceeding"||le.state==="blocked"&&Z.state==="unblocked"||le.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${le.state} -> ${Z.state}`);let be=new Map(A.blockers);be.set(W,Z),Ye({blockers:be})}function yn({currentLocation:W,nextLocation:Z,historyAction:le}){if(re.size===0)return;re.size>1&&Nn(!1,"A router only supports one blocker at a time");let be=Array.from(re.entries()),[Ne,Ze]=be[be.length-1],Pe=A.blockers.get(Ne);if(!(Pe&&Pe.state==="proceeding")&&Ze({currentLocation:W,nextLocation:Z,historyAction:le}))return Ne}function fn(W){let Z=ki(404,{pathname:W}),le=f||c,{matches:be,route:Ne}=lh(le);return{notFoundMatches:be,route:Ne,error:Z}}function Dn(W,Z,le){if(v=W,E=Z,S=le||null,!k&&A.navigation===Jg){k=!0;let be=dn(A.location,A.matches);be!=null&&Ye({restoreScrollPosition:be})}return()=>{v=null,E=null,S=null}}function nt(W,Z){return S&&S(W,Z.map(be=>kj(be,A.loaderData)))||W.key}function Ut(W,Z){if(v&&E){let le=nt(W,Z);v[le]=E()}}function dn(W,Z){if(v){let le=nt(W,Z),be=v[le];if(typeof be=="number")return be}return null}function hn(W,Z,le){if(e.patchRoutesOnNavigation)if(W){if(Object.keys(W[0].params).length>0)return{active:!0,matches:Pu(Z,le,d,!0)}}else return{active:!0,matches:Pu(Z,le,d,!0)||[]};return{active:!1,matches:null}}async function or(W,Z,le,be){if(!e.patchRoutesOnNavigation)return{type:"success",matches:W};let Ne=W;for(;;){let Ze=f==null,Pe=f||c,Le=l;try{await e.patchRoutesOnNavigation({signal:le,path:Z,matches:Ne,fetcherKey:be,patch:(lt,tt)=>{le.aborted||B5(lt,tt,Pe,Le,a,!1)}})}catch(lt){return{type:"error",error:lt,partialMatches:Ne}}finally{Ze&&!le.aborted&&(c=[...c])}if(le.aborted)return{type:"aborted"};let Fe=Aa(Pe,Z,d),et=null;if(Fe){if(Object.keys(Fe[0].params).length===0)return{type:"success",matches:Fe};if(et=Pu(Pe,Z,d,!0),!(et&&Ne.length<et.length&&Jt(Ne,et.slice(0,Ne.length))))return{type:"success",matches:Fe}}if(et||(et=Pu(Pe,Z,d,!0)),!et||Jt(Ne,et))return{type:"success",matches:null};Ne=et}}function Jt(W,Z){return W.length===Z.length&&W.every((le,be)=>le.route.id===Z[be].route.id)}function In(W){l={},f=rf(W,a,void 0,l)}function pi(W,Z,le=!1){let be=f==null;B5(W,Z,f||c,l,a,le),be&&(c=[...c],Ye({}))}return N={get basename(){return d},get future(){return h},get state(){return A},get routes(){return c},get window(){return t},initialize:Ce,subscribe:Ie,enableScrollRestoration:Dn,navigate:_e,fetch:ne,revalidate:ye,createHref:W=>e.history.createHref(W),encodeLocation:W=>e.history.encodeLocation(W),getFetcher:He,resetFetcher:kt,deleteFetcher:Xe,dispose:Ee,getBlocker:yt,deleteBlocker:Pt,patchRoutes:pi,_internalFetchControllers:G,_internalSetRoutes:In,_internalSetStateDoNotUseOrYouWillBreakYourApp(W){Ye(W)}},e.unstable_instrumentations&&(N=Vj(N,e.unstable_instrumentations.map(W=>W.router).filter(Boolean))),N}function nM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function a1(e,t,n,r,o,a){let l,c;if(o){l=[];for(let d of t)if(l.push(d),d.route.id===o){c=d;break}}else l=t,c=t[t.length-1];let f=$p(r||".",Vp(l),Li(e.pathname,n)||e.pathname,a==="path");if(r==null&&(f.search=e.search,f.hash=e.hash),(r==null||r===""||r===".")&&c){let d=Cy(f.search);if(c.route.index&&!d)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let g=new URLSearchParams(f.search),h=g.getAll("index");g.delete("index"),h.filter(x=>x).forEach(x=>g.append("index",x));let y=g.toString();f.search=y?`?${y}`:""}}return n!=="/"&&(f.pathname=Pj({basename:n,pathname:f.pathname})),uo(f)}function P5(e,t,n){if(!n||!nM(n))return{path:t};if(n.formMethod&&!wM(n.formMethod))return{path:t,error:ki(405,{method:n.formMethod})};let r=()=>({path:t,error:ki(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),l=uk(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!gr(a))return r();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,[x,v])=>`${y}${x}=${v}
10
- `,""):String(n.body);return{path:t,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!gr(a))return r();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return r()}}}Ct(typeof FormData=="function","FormData is not available in this environment");let c,f;if(n.formData)c=c1(n.formData),f=n.formData;else if(n.body instanceof FormData)c=c1(n.body),f=n.body;else if(n.body instanceof URLSearchParams)c=n.body,f=$5(c);else if(n.body==null)c=new URLSearchParams,f=new FormData;else try{c=new URLSearchParams(n.body),f=$5(c)}catch{return r()}let d={formMethod:a,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(gr(d.formMethod))return{path:t,submission:d};let g=Ua(t);return e&&g.search&&Cy(g.search)&&c.append("index",""),g.search=`?${c}`,{path:uo(g),submission:d}}function F5(e,t,n,r,o,a,l,c,f,d,g,h,y,x,v,S,E,k,T,R,L){let j=R?ti(R[1])?R[1].error:R[1].data:void 0,N=o.createURL(a.location),A=o.createURL(f),D;if(g&&a.errors){let H=Object.keys(a.errors)[0];D=l.findIndex(B=>B.route.id===H)}else if(R&&ti(R[1])){let H=R[0];D=l.findIndex(B=>B.route.id===H)-1}let U=R?R[1].statusCode:void 0,I=U&&U>=400,q={currentUrl:N,currentParams:a.matches[0]?.params||{},nextUrl:A,nextParams:l[0].params,...c,actionResult:j,actionStatus:U},$=Tf(l),V=l.map((H,B)=>{let{route:F}=H,G=null;if(D!=null&&B>D?G=!1:F.lazy?G=!0:wy(F)?g?G=s1(F,a.loaderData,a.errors):rM(a.loaderData,a.matches[B],H)&&(G=!0):G=!1,G!==null)return l1(n,r,e,$,H,d,t,G);let ie=!1;typeof L=="boolean"?ie=L:I?ie=!1:(h||N.pathname+N.search===A.pathname+A.search||N.search!==A.search||iM(a.matches[B],H))&&(ie=!0);let M={...q,defaultShouldRevalidate:ie},P=Vu(H,M);return l1(n,r,e,$,H,d,t,P,M,L)}),Y=[];return v.forEach((H,B)=>{if(g||!l.some(ee=>ee.route.id===H.routeId)||x.has(B))return;let F=a.fetchers.get(B),G=F&&F.state!=="idle"&&F.data===void 0,ie=Aa(E,H.path,k);if(!ie){if(T&&G)return;Y.push({key:B,routeId:H.routeId,path:H.path,matches:null,match:null,request:null,controller:null});return}if(S.has(B))return;let M=Bh(ie,H.path),P=new AbortController,Q=Il(o,H.path,P.signal),_=null;if(y.has(B))y.delete(B),_=Vl(n,r,Q,ie,M,d,t);else if(G)h&&(_=Vl(n,r,Q,ie,M,d,t));else{let ee;typeof L=="boolean"?ee=L:I?ee=!1:ee=h;let J={...q,defaultShouldRevalidate:ee};Vu(M,J)&&(_=Vl(n,r,Q,ie,M,d,t,J))}_&&Y.push({key:B,routeId:H.routeId,path:H.path,matches:_,match:M,request:Q,controller:P})}),{dsMatches:V,revalidatingFetchers:Y}}function wy(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function s1(e,t,n){if(e.lazy)return!0;if(!wy(e))return!1;let r=t!=null&&e.id in t,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function rM(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}function iM(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Vu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function B5(e,t,n,r,o,a){let l;if(e){let d=r[e];Ct(d,`No route found to patch children into: routeId = ${e}`),d.children||(d.children=[]),l=d.children}else l=n;let c=[],f=[];if(t.forEach(d=>{let g=l.find(h=>ok(d,h));g?f.push({existingRoute:g,newRoute:d}):c.push(d)}),c.length>0){let d=rf(c,o,[e||"_","patch",String(l?.length||"0")],r);l.push(...d)}if(a&&f.length>0)for(let d=0;d<f.length;d++){let{existingRoute:g,newRoute:h}=f[d],y=g,[x]=rf([h],o,[],{},!0);Object.assign(y,{element:x.element?x.element:y.element,errorElement:x.errorElement?x.errorElement:y.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:y.hydrateFallbackElement})}}function ok(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>t.children?.some(o=>ok(n,o))):!1}var H5=new WeakMap,ak=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(Ct(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let a=o.lazy[e];if(!a)return;let l=H5.get(o);l||(l={},H5.set(o,l));let c=l[e];if(c)return c;let f=(async()=>{let d=wj(e),h=o[e]!==void 0&&e!=="hasErrorBoundary";if(d)Nn(!d,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(h)Nn(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await a();y!=null&&(Object.assign(o,{[e]:y}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(y=>y===void 0)&&(o.lazy=void 0))})();return l[e]=f,f},U5=new WeakMap;function oM(e,t,n,r,o){let a=n[e.id];if(Ct(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=U5.get(a);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let h=(async()=>{Ct(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),x={};for(let v in y){let S=y[v];if(S===void 0)continue;let E=Cj(v),T=a[v]!==void 0&&v!=="hasErrorBoundary";E?Nn(!E,"Route property "+v+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?Nn(!T,`Route "${a.id}" has a static property "${v}" defined but its lazy function is also returning a value for this property. The lazy route property "${v}" will be ignored.`):x[v]=S}Object.assign(a,x),Object.assign(a,{...r(a),lazy:void 0})})();return U5.set(a,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let l=Object.keys(e.lazy),c=[],f;for(let g of l){if(o&&o.includes(g))continue;let h=ak({key:g,route:e,manifest:n,mapRouteProperties:r});h&&(c.push(h),g===t&&(f=h))}let d=c.length>0?Promise.all(c).then(()=>{}):void 0;return d?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:f}}async function q5(e){let t=e.matches.filter(o=>o.shouldLoad),n={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,a)=>{n[t[a].route.id]=o}),n}async function aM(e){return e.matches.some(t=>t.route.middleware)?sk(e,()=>q5(e)):q5(e)}function sk(e,t){return sM(e,t,r=>{if(vM(r))throw r;return r},gM,n);function n(r,o,a){if(a)return Promise.resolve(Object.assign(a.value,{[o]:{type:"error",result:r}}));{let{matches:l}=e,c=Math.min(Math.max(l.findIndex(d=>d.route.id===o),0),Math.max(l.findIndex(d=>d.shouldCallHandler()),0)),f=Ra(l,l[c].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:r}})}}}async function sM(e,t,n,r,o){let{matches:a,request:l,params:c,context:f,unstable_pattern:d}=e,g=a.flatMap(y=>y.route.middleware?y.route.middleware.map(x=>[y.route.id,x]):[]);return await lk({request:l,params:c,context:f,unstable_pattern:d},g,t,n,r,o)}async function lk(e,t,n,r,o,a,l=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let f=t[l];if(!f)return await n();let[d,g]=f,h,y=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await lk(e,t,n,r,o,a,l+1)},h.value}catch(x){return h={value:await a(x,d,h)},h.value}};try{let x=await g(e,y),v=x!=null?r(x):void 0;return o(v)?v:h?v??h.value:(h={value:await y()},h.value)}catch(x){return await a(x,d,h)}}function ck(e,t,n,r,o){let a=ak({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),l=oM(r.route,gr(n.method)?"action":"loader",t,e,o);return{middleware:a,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function l1(e,t,n,r,o,a,l,c,f=null,d){let g=!1,h=ck(e,t,n,o,a);return{...o,_lazyPromises:h,shouldLoad:c,shouldRevalidateArgs:f,shouldCallHandler(y){return g=!0,f?typeof d=="boolean"?Vu(o,{...f,defaultShouldRevalidate:d}):typeof y=="boolean"?Vu(o,{...f,defaultShouldRevalidate:y}):Vu(o,f):c},resolve(y){let{lazy:x,loader:v,middleware:S}=o.route,E=g||c||y&&!gr(n.method)&&(x||v),k=S&&S.length>0&&!v&&!x;return E&&(gr(n.method)||!k)?cM({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:y,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function Vl(e,t,n,r,o,a,l,c=null){return r.map(f=>f.route.id!==o.route.id?{...f,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:ck(e,t,n,f,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:l1(e,t,n,Tf(r),f,a,l,!0,c))}async function lM(e,t,n,r,o,a){n.some(d=>d._lazyPromises?.middleware)&&await Promise.all(n.map(d=>d._lazyPromises?.middleware));let l={request:t,unstable_pattern:Tf(n),params:n[0].params,context:o,matches:n},f=await e({...l,fetcherKey:r,runClientMiddleware:d=>{let g=l;return sk(g,()=>d({...g,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(d=>[d._lazyPromises?.handler,d._lazyPromises?.route]))}catch{}return f}async function cM({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:a,scopedContext:l}){let c,f,d=gr(e.method),g=d?"action":"loader",h=y=>{let x,v=new Promise((k,T)=>x=T);f=()=>x(),e.signal.addEventListener("abort",f);let S=k=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${n.route.id}]`)):y({request:e,unstable_pattern:t,params:n.params,context:l},...k!==void 0?[k]:[]),E=(async()=>{try{return{type:"data",result:await(a?a(T=>S(T)):S())}}catch(k){return{type:"error",result:k}}})();return Promise.race([E,v])};try{let y=d?n.route.action:n.route.loader;if(r||o)if(y){let x,[v]=await Promise.all([h(y).catch(S=>{x=S}),r,o]);if(x!==void 0)throw x;c=v}else{await r;let x=d?n.route.action:n.route.loader;if(x)[c]=await Promise.all([h(x),o]);else if(g==="action"){let v=new URL(e.url),S=v.pathname+v.search;throw ki(405,{method:e.method,pathname:S,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(y)c=await h(y);else{let x=new URL(e.url),v=x.pathname+x.search;throw ki(404,{pathname:v})}}catch(y){return{type:"error",result:y}}finally{f&&e.signal.removeEventListener("abort",f)}return c}async function uM(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function fM(e){let{result:t,type:n}=e;if(Sy(t)){let r;try{r=await uM(t)}catch(o){return{type:"error",error:o}}return n==="error"?{type:"error",error:new kf(t.status,t.statusText,r),statusCode:t.status,headers:t.headers}:{type:"data",data:r,statusCode:t.status,headers:t.headers}}return n==="error"?K5(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:mM(t),statusCode:of(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:of(t)?t.status:void 0}:K5(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function dM(e,t,n,r,o){let a=e.headers.get("Location");if(Ct(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!vy(a)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);a=a1(new URL(t.url),l,o,a),e.headers.set("Location",a)}return e}function V5(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(vy(e)){let a=e,l=a.startsWith("//")?new URL(t.protocol+a):new URL(a);if(o.includes(l.protocol))throw new Error("Invalid redirect location");let c=Li(l.pathname,n)!=null;if(l.origin===t.origin&&c)return l.pathname+l.search+l.hash}try{let a=r.createURL(e);if(o.includes(a.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Il(e,t,n,r){let o=e.createURL(uk(t)).toString(),a={signal:n};if(r&&gr(r.formMethod)){let{formMethod:l,formEncType:c}=r;a.method=l.toUpperCase(),c==="application/json"?(a.headers=new Headers({"Content-Type":c}),a.body=JSON.stringify(r.json)):c==="text/plain"?a.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?a.body=c1(r.formData):a.body=r.formData}return new Request(o,a)}function c1(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function $5(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function hM(e,t,n,r=!1,o=!1){let a={},l=null,c,f=!1,d={},g=n&&ti(n[1])?n[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let y=h.route.id,x=t[y];if(Ct(!Ts(x),"Cannot handle redirect results in processLoaderData"),ti(x)){let v=x.error;if(g!==void 0&&(v=g,g=void 0),l=l||{},o)l[y]=v;else{let S=Ra(e,y);l[S.route.id]==null&&(l[S.route.id]=v)}r||(a[y]=ik),f||(f=!0,c=of(x.error)?x.error.status:500),x.headers&&(d[y]=x.headers)}else a[y]=x.data,x.statusCode&&x.statusCode!==200&&!f&&(c=x.statusCode),x.headers&&(d[y]=x.headers)}),g!==void 0&&n&&(l={[n[0]]:g},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:l,statusCode:c||200,loaderHeaders:d}}function G5(e,t,n,r,o,a){let{loaderData:l,errors:c}=hM(t,n,r);return o.filter(f=>!f.matches||f.matches.some(d=>d.shouldLoad)).forEach(f=>{let{key:d,match:g,controller:h}=f;if(h&&h.signal.aborted)return;let y=a[d];if(Ct(y,"Did not find corresponding fetcher result"),ti(y)){let x=Ra(e.matches,g?.route.id);c&&c[x.route.id]||(c={...c,[x.route.id]:y.error}),e.fetchers.delete(d)}else if(Ts(y))Ct(!1,"Unhandled fetcher revalidation redirect");else{let x=Io(y.data);e.fetchers.set(d,x)}}),{loaderData:l,errors:c}}function Y5(e,t,n,r){let o=Object.entries(t).filter(([,a])=>a!==ik).reduce((a,[l,c])=>(a[l]=c,a),{});for(let a of n){let l=a.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&a.route.loader&&(o[l]=e[l]),r&&r.hasOwnProperty(l))break}return o}function W5(e){return e?ti(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ra(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function lh(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ki(e,{pathname:t,routeId:n,method:r,type:o,message:a}={}){let l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",r&&t&&n?c=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c=`Route "${n}" does not match URL "${t}"`):e===404?(l="Not Found",c=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",r&&t&&n?c=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(c=`Invalid request method "${r.toUpperCase()}"`)),new kf(e||500,l,new Error(c),!0)}function ch(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(Ts(o))return{key:r,result:o}}}function uk(e){let t=typeof e=="string"?Ua(e):e;return uo({...t,hash:""})}function pM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function mM(e){return new kf(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function gM(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&yM(n))}function yM(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function xM(e){return Sy(e.result)&&nk.has(e.result.status)}function ti(e){return e.type==="error"}function Ts(e){return(e&&e.type)==="redirect"}function K5(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Sy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function bM(e){return nk.has(e)}function vM(e){return Sy(e)&&bM(e.status)&&e.headers.has("Location")}function wM(e){return Xj.has(e.toUpperCase())}function gr(e){return Kj.has(e.toUpperCase())}function Cy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bh(e,t){let n=typeof t=="string"?Ua(t).search:t.search;if(e[e.length-1].route.index&&Cy(n||""))return e[e.length-1];let r=XE(e);return r[r.length-1]}function Q5(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:l}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function e2(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function SM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function yu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function CM(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Io(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function EM(e,t){try{let n=e.sessionStorage.getItem(rk);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function kM(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(rk,JSON.stringify(n))}catch(r){Nn(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function X5(){let e,t,n=new Promise((r,o)=>{e=async a=>{r(a);try{await n}catch{}},t=async a=>{o(a);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Hs=C.createContext(null);Hs.displayName="DataRouter";var Af=C.createContext(null);Af.displayName="DataRouterState";var fk=C.createContext(!1);function TM(){return C.useContext(fk)}var Ey=C.createContext({isTransitioning:!1});Ey.displayName="ViewTransition";var dk=C.createContext(new Map);dk.displayName="Fetchers";var AM=C.createContext(null);AM.displayName="Await";var di=C.createContext(null);di.displayName="Navigation";var Gp=C.createContext(null);Gp.displayName="Location";var Yi=C.createContext({outlet:null,matches:[],isDataRoute:!1});Yi.displayName="Route";var ky=C.createContext(null);ky.displayName="RouteError";var hk="REACT_ROUTER_ERROR",RM="REDIRECT",NM="ROUTE_ERROR_RESPONSE";function OM(e){if(e.startsWith(`${hk}:${RM}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function jM(e){if(e.startsWith(`${hk}:${NM}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new kf(t.status,t.statusText,t.data)}catch{}}function MM(e,{relative:t}={}){Ct(fc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=C.useContext(di),{hash:o,pathname:a,search:l}=Rf(e,{relative:t}),c=a;return n!=="/"&&(c=a==="/"?n:io([n,a])),r.createHref({pathname:c,search:l,hash:o})}function fc(){return C.useContext(Gp)!=null}function Wi(){return Ct(fc(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Gp).location}var pk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mk(e){C.useContext(di).static||C.useLayoutEffect(e)}function qa(){let{isDataRoute:e}=C.useContext(Yi);return e?YM():LM()}function LM(){Ct(fc(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(Hs),{basename:t,navigator:n}=C.useContext(di),{matches:r}=C.useContext(Yi),{pathname:o}=Wi(),a=JSON.stringify(Vp(r)),l=C.useRef(!1);return mk(()=>{l.current=!0}),C.useCallback((f,d={})=>{if(Nn(l.current,pk),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=$p(f,JSON.parse(a),o,d.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:io([t,g.pathname])),(d.replace?n.replace:n.push)(g,d.state,d)},[t,n,a,o,e])}var _M=C.createContext(null);function DM(e){let t=C.useContext(Yi).outlet;return C.useMemo(()=>t&&C.createElement(_M.Provider,{value:e},t),[t,e])}function Rf(e,{relative:t}={}){let{matches:n}=C.useContext(Yi),{pathname:r}=Wi(),o=JSON.stringify(Vp(n));return C.useMemo(()=>$p(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function IM(e,t,n,r,o){Ct(fc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=C.useContext(di),{matches:l}=C.useContext(Yi),c=l[l.length-1],f=c?c.params:{},d=c?c.pathname:"/",g=c?c.pathnameBase:"/",h=c&&c.route;{let T=h&&h.path||"";yk(d,!h||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
-
12
- Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let y=Wi(),x;x=y;let v=x.pathname||"/",S=v;if(g!=="/"){let T=g.replace(/^\//,"").split("/");S="/"+v.replace(/^\//,"").split("/").slice(T.length).join("/")}let E=Aa(e,{pathname:S});return Nn(h||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Nn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),HM(E&&E.map(T=>Object.assign({},T,{params:Object.assign({},f,T.params),pathname:io([g,a.encodeLocation?a.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?g:io([g,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),l,n,r,o)}function zM(){let e=GM(),t=of(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:o},n):null,l)}var PM=C.createElement(zM,null),gk=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=jM(e.digest);n&&(e=n)}let t=e!==void 0?C.createElement(Yi.Provider,{value:this.props.routeContext},C.createElement(ky.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?C.createElement(FM,{error:e},t):t}};gk.contextType=fk;var t2=new WeakMap;function FM({children:e,error:t}){let{basename:n}=C.useContext(di);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=OM(t.digest);if(r){let o=t2.get(t);if(o)throw o;let a=JE(r.location,n);if(ZE&&!t2.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw t2.set(t,l),l}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function BM({routeContext:e,match:t,children:n}){let r=C.useContext(Hs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(Yi.Provider,{value:e},n)}function HM(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=n?.errors;if(l!=null){let g=a.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);Ct(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let c=!1,f=-1;if(n)for(let g=0;g<a.length;g++){let h=a[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=g),h.route.id){let{loaderData:y,errors:x}=n,v=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||v){c=!0,f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}let d=n&&r?(g,h)=>{r(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Tf(n.matches),errorInfo:h})}:void 0;return a.reduceRight((g,h,y)=>{let x,v=!1,S=null,E=null;n&&(x=l&&h.route.id?l[h.route.id]:void 0,S=h.route.errorElement||PM,c&&(f<0&&y===0?(yk("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,E=null):f===y&&(v=!0,E=h.route.hydrateFallbackElement||null)));let k=t.concat(a.slice(0,y+1)),T=()=>{let R;return x?R=S:v?R=E:h.route.Component?R=C.createElement(h.route.Component,null):h.route.element?R=h.route.element:R=g,C.createElement(BM,{match:h,routeContext:{outlet:g,matches:k,isDataRoute:n!=null},children:R})};return n&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?C.createElement(gk,{location:n.location,revalidation:n.revalidation,component:S,error:x,children:T(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:d}):T()},null)}function Ty(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UM(e){let t=C.useContext(Hs);return Ct(t,Ty(e)),t}function qM(e){let t=C.useContext(Af);return Ct(t,Ty(e)),t}function VM(e){let t=C.useContext(Yi);return Ct(t,Ty(e)),t}function Ay(e){let t=VM(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $M(){return Ay("useRouteId")}function GM(){let e=C.useContext(ky),t=qM("useRouteError"),n=Ay("useRouteError");return e!==void 0?e:t.errors?.[n]}function YM(){let{router:e}=UM("useNavigate"),t=Ay("useNavigate"),n=C.useRef(!1);return mk(()=>{n.current=!0}),C.useCallback(async(o,a={})=>{Nn(n.current,pk),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var Z5={};function yk(e,t,n){!t&&!Z5[e]&&(Z5[e]=!0,Nn(!1,n))}var J5={};function eS(e,t){!e&&!J5[t]&&(J5[t]=!0,console.warn(t))}var WM="useOptimistic",tS=by[WM],KM=()=>{};function QM(e){return tS?tS(e):[e,KM]}function XM(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Nn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:C.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Nn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Nn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ZM=["HydrateFallback","hydrateFallbackElement"],JM=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function eL({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=TM()||r;let[a,l]=C.useState(e.state),[c,f]=QM(a),[d,g]=C.useState(),[h,y]=C.useState({isTransitioning:!1}),[x,v]=C.useState(),[S,E]=C.useState(),[k,T]=C.useState(),R=C.useRef(new Map),L=C.useCallback((D,{deletedFetchers:U,newErrors:I,flushSync:q,viewTransitionOpts:$})=>{I&&n&&Object.values(I).forEach(Y=>n(Y,{location:D.location,params:D.matches[0]?.params??{},unstable_pattern:Tf(D.matches)})),D.fetchers.forEach((Y,H)=>{Y.data!==void 0&&R.current.set(H,Y.data)}),U.forEach(Y=>R.current.delete(Y)),eS(q===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(eS($==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!$||!V){t&&q?t(()=>l(D)):r===!1?l(D):C.startTransition(()=>{r===!0&&f(Y=>nS(Y,D)),l(D)});return}if(t&&q){t(()=>{S&&(x?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let Y=e.window.document.startViewTransition(()=>{t(()=>l(D))});Y.finished.finally(()=>{t(()=>{v(void 0),E(void 0),g(void 0),y({isTransitioning:!1})})}),t(()=>E(Y));return}S?(x?.resolve(),S.skipTransition(),T({state:D,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(g(D),y({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[e.window,t,S,x,r,f,n]);C.useLayoutEffect(()=>e.subscribe(L),[e,L]),C.useEffect(()=>{h.isTransitioning&&!h.flushSync&&v(new JM)},[h]),C.useEffect(()=>{if(x&&d&&e.window){let D=d,U=x.promise,I=e.window.document.startViewTransition(async()=>{r===!1?l(D):C.startTransition(()=>{r===!0&&f(q=>nS(q,D)),l(D)}),await U});I.finished.finally(()=>{v(void 0),E(void 0),g(void 0),y({isTransitioning:!1})}),E(I)}},[d,x,e.window,r,f]),C.useEffect(()=>{x&&d&&c.location.key===d.location.key&&x.resolve()},[x,S,c.location,d]),C.useEffect(()=>{!h.isTransitioning&&k&&(g(k.state),y({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),T(void 0))},[h.isTransitioning,k]);let j=C.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,U,I)=>e.navigate(D,{state:U,preventScrollReset:I?.preventScrollReset}),replace:(D,U,I)=>e.navigate(D,{replace:!0,state:U,preventScrollReset:I?.preventScrollReset})}),[e]),N=e.basename||"/",A=C.useMemo(()=>({router:e,navigator:j,static:!1,basename:N,onError:n}),[e,j,N,n]);return C.createElement(C.Fragment,null,C.createElement(Hs.Provider,{value:A},C.createElement(Af.Provider,{value:c},C.createElement(dk.Provider,{value:R.current},C.createElement(Ey.Provider,{value:h},C.createElement(rL,{basename:N,location:c.location,navigationType:c.historyAction,navigator:j,unstable_useTransitions:r},C.createElement(tL,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function nS(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var tL=C.memo(nL);function nL({routes:e,future:t,state:n,onError:r}){return IM(e,void 0,n,r,t)}function xk({to:e,replace:t,state:n,relative:r}){Ct(fc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=C.useContext(di);Nn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=C.useContext(Yi),{pathname:l}=Wi(),c=qa(),f=$p(e,Vp(a),l,r==="path"),d=JSON.stringify(f);return C.useEffect(()=>{c(JSON.parse(d),{replace:t,state:n,relative:r})},[c,d,r,t,n]),null}function bk(e){return DM(e.context)}function rL({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:l}){Ct(!fc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=C.useMemo(()=>({basename:c,navigator:o,static:a,unstable_useTransitions:l,future:{}}),[c,o,a,l]);typeof n=="string"&&(n=Ua(n));let{pathname:d="/",search:g="",hash:h="",state:y=null,key:x="default"}=n,v=C.useMemo(()=>{let S=Li(d,c);return S==null?null:{location:{pathname:S,search:g,hash:h,state:y,key:x},navigationType:r}},[c,d,g,h,y,x,r]);return Nn(v!=null,`<Router basename="${c}"> is not able to match the URL "${d}${g}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:C.createElement(di.Provider,{value:f},C.createElement(Gp.Provider,{children:t,value:v}))}var Hh="get",Uh="application/x-www-form-urlencoded";function Yp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function iL(e){return Yp(e)&&e.tagName.toLowerCase()==="button"}function oL(e){return Yp(e)&&e.tagName.toLowerCase()==="form"}function aL(e){return Yp(e)&&e.tagName.toLowerCase()==="input"}function sL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lL(e,t){return e.button===0&&(!t||t==="_self")&&!sL(e)}function u1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function cL(e,t){let n=u1(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}var uh=null;function uL(){if(uh===null)try{new FormData(document.createElement("form"),0),uh=!1}catch{uh=!0}return uh}var fL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function n2(e){return e!=null&&!fL.has(e)?(Nn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Uh}"`),null):e}function dL(e,t){let n,r,o,a,l;if(oL(e)){let c=e.getAttribute("action");r=c?Li(c,t):null,n=e.getAttribute("method")||Hh,o=n2(e.getAttribute("enctype"))||Uh,a=new FormData(e)}else if(iL(e)||aL(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?Li(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Hh,o=n2(e.getAttribute("formenctype"))||n2(c.getAttribute("enctype"))||Uh,a=new FormData(c,e),!uL()){let{name:d,type:g,value:h}=e;if(g==="image"){let y=d?`${d}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else d&&a.append(d,h)}}else{if(Yp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Hh,r=null,o=Uh,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ry(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hL(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Li(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function pL(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mL(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gL(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await pL(a,n);return l.links?l.links():[]}return[]}));return vL(r.flat(1).filter(mL).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function rS(e,t,n,r,o,a){let l=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>n[d].pathname!==f.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==f.params["*"];return a==="assets"?t.filter((f,d)=>l(f,d)||c(f,d)):a==="data"?t.filter((f,d)=>{let g=r.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(l(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let h=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function yL(e,t,{includeHydrateFallback:n}={}){return xL(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function xL(e){return[...new Set(e)]}function bL(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function vL(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(bL(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function vk(){let e=C.useContext(Hs);return Ry(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function wL(){let e=C.useContext(Af);return Ry(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ny=C.createContext(void 0);Ny.displayName="FrameworkContext";function wk(){let e=C.useContext(Ny);return Ry(e,"You must render this element inside a <HydratedRouter> element"),e}function SL(e,t){let n=C.useContext(Ny),[r,o]=C.useState(!1),[a,l]=C.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:g,onTouchStart:h}=t,y=C.useRef(null);C.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=k=>{k.forEach(T=>{l(T.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return y.current&&E.observe(y.current),()=>{E.disconnect()}}},[e]),C.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let x=()=>{o(!0)},v=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,y,{}]:[a,y,{onFocus:xu(c,x),onBlur:xu(f,v),onMouseEnter:xu(d,x),onMouseLeave:xu(g,v),onTouchStart:xu(h,x)}]:[!1,y,{}]}function xu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function CL({page:e,...t}){let{router:n}=vk(),r=C.useMemo(()=>Aa(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?C.createElement(kL,{page:e,matches:r,...t}):null}function EL(e){let{manifest:t,routeModules:n}=wk(),[r,o]=C.useState([]);return C.useEffect(()=>{let a=!1;return gL(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function kL({page:e,matches:t,...n}){let r=Wi(),{future:o,manifest:a,routeModules:l}=wk(),{basename:c}=vk(),{loaderData:f,matches:d}=wL(),g=C.useMemo(()=>rS(e,t,d,a,r,"data"),[e,t,d,a,r]),h=C.useMemo(()=>rS(e,t,d,a,r,"assets"),[e,t,d,a,r]),y=C.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,E=!1;if(t.forEach(T=>{let R=a.routes[T.route.id];!R||!R.hasLoader||(!g.some(L=>L.route.id===T.route.id)&&T.route.id in f&&l[T.route.id]?.shouldRevalidate||R.hasClientLoader?E=!0:S.add(T.route.id))}),S.size===0)return[];let k=hL(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return E&&S.size>0&&k.searchParams.set("_routes",t.filter(T=>S.has(T.route.id)).map(T=>T.route.id).join(",")),[k.pathname+k.search]},[c,o.unstable_trailingSlashAwareDataRequests,f,r,a,g,t,e,l]),x=C.useMemo(()=>yL(h,a),[h,a]),v=EL(h);return C.createElement(C.Fragment,null,y.map(S=>C.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),x.map(S=>C.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),v.map(({key:S,link:E})=>C.createElement("link",{key:S,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function TL(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var AL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{AL&&(window.__reactRouterVersion="7.13.0")}catch{}function RL(e,t){return tM({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:yj({window:t?.window}),hydrationData:NL(),routes:e,mapRouteProperties:XM,hydrationRouteProperties:ZM,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function NL(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:OL(e.errors)}),e}function OL(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new kf(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let l=new a(o.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let a=new Error(o.message);a.stack="",n[r]=a}}else n[r]=o;return n}var Sk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oy=C.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,state:c,target:f,to:d,preventScrollReset:g,viewTransition:h,unstable_defaultShouldRevalidate:y,...x},v){let{basename:S,unstable_useTransitions:E}=C.useContext(di),k=typeof d=="string"&&Sk.test(d),T=JE(d,S);d=T.to;let R=MM(d,{relative:o}),[L,j,N]=SL(r,x),A=LL(d,{replace:l,state:c,target:f,preventScrollReset:g,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:y,unstable_useTransitions:E});function D(I){t&&t(I),I.defaultPrevented||A(I)}let U=C.createElement("a",{...x,...N,href:T.absoluteURL||R,onClick:T.isExternal||a?t:D,ref:TL(v,j),target:f,"data-discover":!k&&n==="render"?"true":void 0});return L&&!k?C.createElement(C.Fragment,null,U,C.createElement(CL,{page:R})):U});Oy.displayName="Link";var Ck=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:c,children:f,...d},g){let h=Rf(l,{relative:d.relative}),y=Wi(),x=C.useContext(Af),{navigator:v,basename:S}=C.useContext(di),E=x!=null&&PL(h)&&c===!0,k=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,T=y.pathname,R=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,k=k.toLowerCase()),R&&S&&(R=Li(R,S)||R);const L=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let j=T===k||!o&&T.startsWith(k)&&T.charAt(L)==="/",N=R!=null&&(R===k||!o&&R.startsWith(k)&&R.charAt(k.length)==="/"),A={isActive:j,isPending:N,isTransitioning:E},D=j?t:void 0,U;typeof r=="function"?U=r(A):U=[r,j?"active":null,N?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let I=typeof a=="function"?a(A):a;return C.createElement(Oy,{...d,"aria-current":D,className:U,ref:g,style:I,to:l,viewTransition:c},typeof f=="function"?f(A):f)});Ck.displayName="NavLink";var jL=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=Hh,action:c,onSubmit:f,relative:d,preventScrollReset:g,viewTransition:h,unstable_defaultShouldRevalidate:y,...x},v)=>{let{unstable_useTransitions:S}=C.useContext(di),E=IL(),k=zL(c,{relative:d}),T=l.toLowerCase()==="get"?"get":"post",R=typeof c=="string"&&Sk.test(c),L=j=>{if(f&&f(j),j.defaultPrevented)return;j.preventDefault();let N=j.nativeEvent.submitter,A=N?.getAttribute("formmethod")||l,D=()=>E(N||j.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:o,state:a,relative:d,preventScrollReset:g,viewTransition:h,unstable_defaultShouldRevalidate:y});S&&n!==!1?C.startTransition(()=>D()):D()};return C.createElement("form",{ref:v,method:T,action:k,onSubmit:r?f:L,...x,"data-discover":!R&&e==="render"?"true":void 0})});jL.displayName="Form";function ML(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ek(e){let t=C.useContext(Hs);return Ct(t,ML(e)),t}function LL(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let d=qa(),g=Wi(),h=Rf(e,{relative:a});return C.useCallback(y=>{if(lL(y,t)){y.preventDefault();let x=n!==void 0?n:uo(g)===uo(h),v=()=>d(e,{replace:x,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:c});f?C.startTransition(()=>v()):v()}},[g,d,h,n,r,t,e,o,a,l,c,f])}function kk(e){Nn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=C.useRef(u1(e)),n=C.useRef(!1),r=Wi(),o=C.useMemo(()=>cL(r.search,n.current?null:t.current),[r.search]),a=qa(),l=C.useCallback((c,f)=>{const d=u1(typeof c=="function"?c(new URLSearchParams(o)):c);n.current=!0,a("?"+d,f)},[a,o]);return[o,l]}var _L=0,DL=()=>`__${String(++_L)}__`;function IL(){let{router:e}=Ek("useSubmit"),{basename:t}=C.useContext(di),n=$M(),r=e.fetch,o=e.navigate;return C.useCallback(async(a,l={})=>{let{action:c,method:f,encType:d,formData:g,body:h}=dL(a,t);if(l.navigate===!1){let y=l.fetcherKey||DL();await r(y,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:h,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await o(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:h,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function zL(e,{relative:t}={}){let{basename:n}=C.useContext(di),r=C.useContext(Yi);Ct(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Rf(e||".",{relative:t})},l=Wi();if(e==null){a.search=l.search;let c=new URLSearchParams(a.search),f=c.getAll("index");if(f.some(g=>g==="")){c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let g=c.toString();a.search=g?`?${g}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:io([n,a.pathname])),uo(a)}function PL(e,{relative:t}={}){let n=C.useContext(Ey);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ek("useViewTransitionState"),o=Rf(e,{relative:t});if(!n.isTransitioning)return!1;let a=Li(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Li(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ap(o.pathname,l)!=null||ap(o.pathname,a)!=null}function FL(e){return C.createElement(eL,{flushSync:Mi.flushSync,...e})}const iS={};function Zn(e,t){const n=C.useRef(iS);return n.current===iS&&(n.current=e(t)),n}const f1=[];let d1;function BL(){return d1}function HL(e){f1.push(e)}function jy(e){const t=(n,r)=>{const o=Zn(UL).current;let a;try{d1=o;for(const l of f1)l.before(o);a=e(n,r);for(const l of f1)l.after(o);o.didInitialize=!0}finally{d1=void 0}return a};return t.displayName=e.displayName||e.name,t}function Tk(e){return C.forwardRef(jy(e))}function UL(){return{didInitialize:!1}}function My(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const qL=()=>{},qe=typeof document<"u"?C.useLayoutEffect:qL;function VL(e,t){return function(r,...o){const a=new URL(e);return a.searchParams.set("code",r.toString()),o.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Gn=VL("https://base-ui.com/production-error","Base UI"),Ak=C.createContext(void 0);function Nf(e){const t=C.useContext(Ak);if(t===void 0&&!e)throw new Error(Gn(72));return t}const $L=[];function Ly(e){C.useEffect(e,$L)}const bu=0;class $i{static create(){return new $i}currentId=bu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=bu,n()},t)}isStarted(){return this.currentId!==bu}clear=()=>{this.currentId!==bu&&(clearTimeout(this.currentId),this.currentId=bu)};disposeEffect=()=>this.clear}function jr(){const e=Zn($i.create).current;return Ly(e.disposeEffect),e}function Wp(){return typeof window<"u"}function Va(e){return _y(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function po(e){var t;return(t=(_y(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _y(e){return Wp()?e instanceof Node||e instanceof $n(e).Node:!1}function Yt(e){return Wp()?e instanceof Element||e instanceof $n(e).Element:!1}function Rn(e){return Wp()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function af(e){return!Wp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function $a(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function GL(e){return/^(table|td|th)$/.test(Va(e))}function Kp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const YL=/transform|translate|scale|rotate|perspective|filter/,WL=/paint|layout|strict|content/,vs=e=>!!e&&e!=="none";let r2;function Dy(e){const t=Yt(e)?ci(e):e;return vs(t.transform)||vs(t.translate)||vs(t.scale)||vs(t.rotate)||vs(t.perspective)||!Qp()&&(vs(t.backdropFilter)||vs(t.filter))||YL.test(t.willChange||"")||WL.test(t.contain||"")}function KL(e){let t=fo(e);for(;Rn(t)&&!oo(t);){if(Dy(t))return t;if(Kp(t))return null;t=fo(t)}return null}function Qp(){return r2==null&&(r2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r2}function oo(e){return/^(html|body|#document)$/.test(Va(e))}function ci(e){return $n(e).getComputedStyle(e)}function Xp(e){return Yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fo(e){if(Va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||af(e)&&e.host||po(e);return af(t)?t.host:t}function Rk(e){const t=fo(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rn(t)&&$a(t)?t:Rk(t)}function sf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rk(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),l=$n(o);if(a){const c=h1(l);return t.concat(l,l.visualViewport||[],$a(o)?o:[],c&&n?sf(c):[])}else return t.concat(o,sf(o,[],n))}function h1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const dc=typeof navigator<"u",i2=QL(),Nk=ZL(),Ok=XL(),jk=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Mk=i2.platform==="MacIntel"&&i2.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(i2.platform),Lk=dc&&/apple/i.test(navigator.vendor),p1=dc&&/android/i.test(Nk)||/android/i.test(Ok),_k=dc&&Nk.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Dk=Ok.includes("jsdom/");function QL(){if(!dc)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function XL(){if(!dc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function ZL(){if(!dc)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const m1="data-base-ui-focusable",Ik="active",zk="selected",Pk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Da="ArrowLeft",Ia="ArrowRight",Iy="ArrowUp",Of="ArrowDown";function ii(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&af(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function sp(e,t){if(!Yt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Ar(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Bi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function JL(e){return e.matches("html,body")}function Zp(e){return Rn(e)&&e.matches(Pk)}function g1(e){return e?e.getAttribute("role")==="combobox"&&Zp(e):!1}function e_(e){if(!e||Dk)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function lp(e){return e?e.hasAttribute(m1)?e:e.querySelector(`[${m1}]`)||e:null}function Bo(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Bo(e,o.id,n)])}function oS(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function ni(e){e.preventDefault(),e.stopPropagation()}function t_(e){return"nativeEvent"in e}function Fk(e){return e.pointerType===""&&e.isTrusted?!0:p1&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bk(e){return Dk?!1:!p1&&e.width===0&&e.height===0||p1&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function tc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Hk(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const n_=["top","right","bottom","left"],nc=Math.min,oi=Math.max,cp=Math.round,As=Math.floor,ao=e=>({x:e,y:e}),r_={left:"right",right:"left",bottom:"top",top:"bottom"};function y1(e,t,n){return oi(e,nc(t,n))}function Uo(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Ga(e){return e.split("-")[1]}function zy(e){return e==="x"?"y":"x"}function Py(e){return e==="y"?"height":"width"}function Ni(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fy(e){return zy(Ni(e))}function i_(e,t,n){n===void 0&&(n=!1);const r=Ga(e),o=Fy(e),a=Py(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=up(l)),[l,up(l)]}function o_(e){const t=up(e);return[x1(e),t,x1(t)]}function x1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const aS=["left","right"],sS=["right","left"],a_=["top","bottom"],s_=["bottom","top"];function l_(e,t,n){switch(e){case"top":case"bottom":return n?t?sS:aS:t?aS:sS;case"left":case"right":return t?a_:s_;default:return[]}}function c_(e,t,n,r){const o=Ga(e);let a=l_(qr(e),n==="start",r);return o&&(a=a.map(l=>l+"-"+o),t&&(a=a.concat(a.map(x1)))),a}function up(e){const t=qr(e);return r_[t]+e.slice(t.length)}function u_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uk(e){return typeof e!="number"?u_(e):{top:e,right:e,bottom:e,left:e}}function fp(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function fh(e,t,n){return Math.floor(e/t)!==n}function dp(e,t){return t<0||t>=e.current.length}function o2(e,t){return Er(e,{disabledIndices:t})}function lS(e,t){return Er(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Er(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let a=t;do a+=n?-o:o;while(a>=0&&a<=e.current.length-1&&$l(e,a,r));return a}function f_(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:a,disabledIndices:l,minIndex:c,maxIndex:f,prevIndex:d,stopEvent:g=!1}){let h=d,y;if(t.key===Iy?y="up":t.key===Of&&(y="down"),y){const x=[],v=[];let S=!1,E=0;{let D=null,U=-1;e.current.forEach((I,q)=>{if(I==null)return;E+=1;const $=I.closest('[role="row"]');$&&(S=!0),($!==D||U===-1)&&(D=$,U+=1,x[U]=[]),x[U].push(q),v[q]=U})}let k=!1,T=0;if(S)for(const D of x){const U=D.length;U>T&&(T=U),U!==a&&(k=!0)}const R=k&&E<e.current.length,L=T||a,j=D=>{if(!k||d===-1)return;const U=v[d];if(U==null)return;const I=x[U].indexOf(d),q=D==="up"?-1:1;for(let $=U+q,V=0;V<x.length;V+=1,$+=q){if($<0||$>=x.length){if(!r||R)return;$=$<0?x.length-1:0}const Y=x[$];for(let H=Math.min(I,Y.length-1);H>=0;H-=1){const B=Y[H];if(!$l(e,B,l))return B}}},N=D=>{if(!R||d===-1)return;const U=d%L,I=D==="up"?-L:L,q=f-f%L,$=As(f/L)+1;for(let V=d-U+I,Y=0;Y<$;Y+=1,V+=I){if(V<0||V>f){if(!r)return;V=V<0?q:0}const H=Math.min(V+L-1,f);for(let B=Math.min(V+U,H);B>=V;B-=1)if(!$l(e,B,l))return B}};g&&ni(t);const A=j(y)??N(y);if(A!==void 0)h=A;else if(d===-1)h=y==="up"?f:c;else if(h=Er(e,{startingIndex:d,amount:L,decrement:y==="up",disabledIndices:l}),r){if(y==="up"&&(d-L<c||h<0)){const D=d%L,U=f%L,I=f-(U-D);U===D?h=f:h=U>D?I:I-L}y==="down"&&d+L>f&&(h=Er(e,{startingIndex:d%L-L,amount:L,disabledIndices:l}))}dp(e,h)&&(h=d)}if(n==="both"){const x=As(d/a);t.key===(o?Da:Ia)&&(g&&ni(t),d%a!==a-1?(h=Er(e,{startingIndex:d,disabledIndices:l}),r&&fh(h,a,x)&&(h=Er(e,{startingIndex:d-d%a-1,disabledIndices:l}))):r&&(h=Er(e,{startingIndex:d-d%a-1,disabledIndices:l})),fh(h,a,x)&&(h=d)),t.key===(o?Ia:Da)&&(g&&ni(t),d%a!==0?(h=Er(e,{startingIndex:d,decrement:!0,disabledIndices:l}),r&&fh(h,a,x)&&(h=Er(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l}))):r&&(h=Er(e,{startingIndex:d+(a-d%a),decrement:!0,disabledIndices:l})),fh(h,a,x)&&(h=d));const v=As(f/a)===x;dp(e,h)&&(r&&v?h=t.key===(o?Ia:Da)?f:Er(e,{startingIndex:d-d%a-1,disabledIndices:l}):h=d)}return h}function d_(e,t,n){const r=[];let o=0;return e.forEach(({width:a,height:l},c)=>{let f=!1;for(;!f;){const d=[];for(let g=0;g<a;g+=1)for(let h=0;h<l;h+=1)d.push(o+g+h*t);o%t+a<=t&&d.every(g=>r[g]==null)?(d.forEach(g=>{r[g]=c}),f=!0):o+=1}}),[...r]}function h_(e,t,n,r,o){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(o){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function p_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function $l(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const o=e.current[t];return o?By(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function By(e){return ci(e).display!=="none"}var m_=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hp=m_.join(","),qk=typeof Element>"u",rc=qk?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pp=!qk&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},mp=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=o===""||o==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):mp(t.parentNode));return l},g_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Vk=function(t,n,r){if(mp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hp));return n&&rc.call(t,hp)&&o.unshift(t),o=o.filter(r),o},gp=function(t,n,r){for(var o=[],a=Array.from(t);a.length;){var l=a.shift();if(!mp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),f=c.length?c:l.children,d=gp(f,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{var g=rc.call(l,hp);g&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var h=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),y=!mp(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(h&&y){var x=gp(h===!0?l.children:h.children,!0,r);r.flatten?o.push.apply(o,x):o.push({scopeParent:l,candidates:x})}else a.unshift.apply(a,l.children)}}return o},$k=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gk=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||g_(t))&&!$k(t)?0:t.tabIndex},y_=function(t,n){var r=Gk(t);return r<0&&n&&!$k(t)?0:r},x_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Yk=function(t){return t.tagName==="INPUT"},b_=function(t){return Yk(t)&&t.type==="hidden"},v_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},w_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},S_=function(t){if(!t.name)return!0;var n=t.form||pp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=w_(o,t.form);return!a||a===t},C_=function(t){return Yk(t)&&t.type==="radio"},E_=function(t){return C_(t)&&!S_(t)},k_=function(t){var n,r=t&&pp(t),o=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,f;for(a=!!((l=o)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&o;){var d,g,h;r=pp(o),o=(d=r)===null||d===void 0?void 0:d.host,a=!!((g=o)!==null&&g!==void 0&&(h=g.ownerDocument)!==null&&h!==void 0&&h.contains(o))}}return a},cS=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},T_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=rc.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(rc.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var f=t;t;){var d=t.parentElement,g=pp(t);if(d&&!d.shadowRoot&&o(d)===!0)return cS(t);t.assignedSlot?t=t.assignedSlot:!d&&g!==t.ownerDocument?t=g.host:t=d}t=f}if(k_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return cS(t);return!1},A_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return rc.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},b1=function(t,n){return!(n.disabled||b_(n)||T_(n,t)||v_(n)||A_(n))},v1=function(t,n){return!(E_(n)||Gk(n)<0||!b1(t,n))},R_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Wk=function(t){var n=[],r=[];return t.forEach(function(o,a){var l=!!o.scopeParent,c=l?o.scopeParent:o,f=y_(c,l),d=l?Wk(o.candidates):c;f===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:a,tabIndex:f,item:o,isScope:l,content:d})}),r.sort(x_).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(n)},jf=function(t,n){n=n||{};var r;return n.getShadowRoot?r=gp([t],n.includeContainer,{filter:v1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:R_}):r=Vk(t,n.includeContainer,v1.bind(null,n)),Wk(r)},N_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=gp([t],n.includeContainer,{filter:b1.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Vk(t,n.includeContainer,b1.bind(null,n)),r},Kk=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return rc.call(t,hp)===!1?!1:v1(n,t)};function Gt(e){return e?.ownerDocument||document}const hc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qk(e,t){const n=jf(e,hc()),r=n.length;if(r===0)return;const o=ii(Gt(e)),a=n.indexOf(o),l=a===-1?t===1?0:r-1:a+t;return n[l]}function Hy(e){return Qk(Gt(e).body,1)||e}function Xk(e){return Qk(Gt(e).body,-1)||e}function Zk(e,t){if(!e)return null;const n=jf(Gt(e).body,hc()),r=n.length;if(r===0)return null;const o=n.indexOf(e);if(o===-1)return null;const a=(o+t+r)%r;return n[a]}function O_(e){return Zk(e,1)}function j_(e){return Zk(e,-1)}function Gl(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function M_(e){jf(e,hc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function uS(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function L_(e,t){return t!=null&&!tc(t)?0:typeof e=="function"?e():e}function $u(e,t,n){const r=L_(e,n);return typeof r=="number"?r:r?.[t]}function fS(e){return typeof e=="function"?e():e}function Jk(e,t){return t||e==="click"||e==="mousedown"}function dr(){}const w1=Object.freeze([]),Ln=Object.freeze({}),__=500,D_=500,I_={style:{transition:"none"}},z_="data-base-ui-click-trigger",P_={fallbackAxisSide:"none"},e6={fallbackAxisSide:"end"},F_={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Jp="none",ic="trigger-press",Rr="trigger-hover",Yl="trigger-focus",Uy="outside-press",t6="item-press",B_="close-press",oc="focus-out",e0="escape-key",qh="list-navigation",H_="cancel-open",Fu="sibling-open",U_="disabled",qy="imperative-action";function Et(e,t,n,r){let o=!1,a=!1;const l=Ln;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){a=!0},get isCanceled(){return o},get isPropagationAllowed(){return a},trigger:n,...l}}const n6=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new $i,currentIdRef:{current:null},currentContextRef:{current:null}});function q_(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=C.useRef(n),a=C.useRef(n),l=C.useRef(null),c=C.useRef(null),f=jr();return p.jsx(n6.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:a,currentIdRef:l,timeoutMs:r,currentContextRef:c,timeout:f}),[r,f]),children:t})}function V_(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:o}=t,a=C.useContext(n6),{currentIdRef:l,delayRef:c,timeoutMs:f,initialDelayRef:d,currentContextRef:g,hasProvider:h,timeout:y}=a,[x,v]=C.useState(!1);return qe(()=>{function S(){v(!1),g.current?.setIsInstantPhase(!1),l.current=null,g.current=null,c.current=d.current}if(l.current&&!o&&l.current===r){if(v(!1),f){const E=r;return y.start(f,()=>{n.select("open")||l.current&&l.current!==E||S()}),()=>{y.clear()}}S()}},[o,r,l,c,f,d,g,y,n]),qe(()=>{if(!o)return;const S=g.current,E=l.current;y.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:v},l.current=r,c.current={open:0,close:$u(d.current,"close")},E!==null&&E!==r?(v(!0),S?.setIsInstantPhase(!0),S?.onOpenChange(!1,Et(Jp))):(v(!1),S?.setIsInstantPhase(!1))},[o,r,n,l,c,f,d,g,y]),qe(()=>()=>{g.current=null},[g]),C.useMemo(()=>({hasProvider:h,delayRef:c,isInstantPhase:x}),[h,c,x])}function Ms(e,t,n,r){const o=Zn(r6).current;return G_(o,e,t,n,r)&&i6(o,[e,t,n,r]),o.callback}function $_(e){const t=Zn(r6).current;return Y_(t,e)&&i6(t,e),t.callback}function r6(){return{callback:null,cleanup:null,refs:[]}}function G_(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Y_(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function i6(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const a=t[o];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[o]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const a=t[o];if(a!=null)switch(typeof a){case"function":{const l=r[o];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}function Nr(e){const t=Zn(W_,e).current;return t.next=e,qe(t.effect),t}function W_(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const a2=by[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],K_=a2&&a2!==C.useLayoutEffect?a2:e=>e();function st(e){const t=Zn(Q_).current;return t.next=e,K_(t.effect),t.trampoline}function Q_(){const e={next:void 0,callback:X_,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function X_(){}const dh=null;class Z_{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const hh=new Z_;class to{static create(){return new to}static request(t){return hh.request(t)}static cancel(t){return hh.cancel(t)}currentId=dh;request(t){this.cancel(),this.currentId=hh.request(()=>{this.currentId=dh,t()})}cancel=()=>{this.currentId!==dh&&(hh.cancel(this.currentId),this.currentId=dh)};disposeEffect=()=>this.cancel}function Vy(){const e=Zn(to.create).current;return Ly(e.disposeEffect),e}const o6={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},a6={...o6,position:"fixed",top:0,left:0},J_={...o6,position:"absolute"},ac=C.forwardRef(function(t,n){const[r,o]=C.useState();qe(()=>{Lk&&o("button")},[]);const a={tabIndex:0,role:r};return p.jsx("span",{...t,ref:n,style:a6,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})});function lf(e){return`data-base-ui-${e}`}let dS=0;function Gu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(dS);const a=()=>e?.focus({preventScroll:n});o?a():dS=requestAnimationFrame(a)}const s2={inert:new WeakMap,"aria-hidden":new WeakMap},hS="data-base-ui-inert",S1={inert:new WeakSet,"aria-hidden":new WeakSet};let vu=new WeakMap,l2=0;function eD(e){return S1[e]}function s6(e){return e?af(e)?e.host:s6(e.parentNode):null}const c2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=s6(n);return e.contains(r)?r:null}).filter(n=>n!=null),pS=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},mS=(e,t,n)=>{const r=[],o=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Va(l)!=="script"&&(t.has(l)?o(l):r.push(l))})};return o(e),r};function tD(e,t,n,r,{mark:o=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,f=null;const d=c2(t,e),g=o?c2(t,a):[],h=new Set(g),y=o?mS(t,pS(d),new Set(d)).filter(S=>!h.has(S)):[],x=[],v=[];if(l){const S=s2[l],E=eD(l);f=E,c=S;const k=c2(t,Array.from(t.querySelectorAll("[aria-live]"))),T=d.concat(k);mS(t,pS(T),new Set(T)).forEach(L=>{const j=L.getAttribute(l),N=j!==null&&j!=="false",A=(S.get(L)||0)+1;S.set(L,A),x.push(L),A===1&&N&&E.add(L),N||L.setAttribute(l,l==="inert"?"":"true")})}return o&&y.forEach(S=>{const E=(vu.get(S)||0)+1;vu.set(S,E),v.push(S),E===1&&S.setAttribute(hS,"")}),l2+=1,()=>{c&&x.forEach(S=>{const k=(c.get(S)||0)-1;c.set(S,k),k||(!f?.has(S)&&l&&S.removeAttribute(l),f?.delete(S))}),o&&v.forEach(S=>{const E=(vu.get(S)||0)-1;vu.set(S,E),E||S.removeAttribute(hS)}),l2-=1,l2||(s2.inert=new WeakMap,s2["aria-hidden"]=new WeakMap,S1.inert=new WeakSet,S1["aria-hidden"]=new WeakSet,vu=new WeakMap)}}function gS(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:a=[]}=t,l=Gt(e[0]).body;return tD(e,l,n,r,{mark:o,markerIgnoreElements:a})}const nD={...by};let yS=0;function rD(e,t="mui"){const[n,r]=C.useState(e),o=e||n;return C.useEffect(()=>{n==null&&(yS+=1,r(`${t}-${yS}`))},[n,t]),o}const xS=nD.useId;function Us(e,t){if(xS!==void 0){const n=xS();return e??(t?`${t}-${n}`:n)}return rD(e,t)}const iD=parseInt(C.version,10);function $y(e){return iD>=e}function bS(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return($y(19)?n?.ref:t.ref)??null}function C1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function oD(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const a=t[r](o);a!=null&&Object.assign(n,a);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function aD(e,t){return typeof e=="function"?e(t):e}function sD(e,t){return typeof e=="function"?e(t):e}const Yu={};function Ba(e,t,n,r,o){let a={...E1(e,Yu)};return t&&(a=Vh(a,t)),n&&(a=Vh(a,n)),r&&(a=Vh(a,r)),a}function lD(e){if(e.length===0)return Yu;if(e.length===1)return E1(e[0],Yu);let t={...E1(e[0],Yu)};for(let n=1;n<e.length;n+=1)t=Vh(t,e[n]);return t}function Vh(e,t){return l6(t)?t(e):cD(e,t)}function cD(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=C1(e.style,r);break}case"className":{e[n]=c6(e.className,r);break}default:uD(n,r)?e[n]=fD(e[n],r):e[n]=r}}return e}function uD(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function l6(e){return typeof e=="function"}function E1(e,t){return l6(e)?e(t):e??Yu}function fD(e,t){return t?e?n=>{if(dD(n)){const o=n;k1(o);const a=t(o);return o.baseUIHandlerPrevented||e?.(o),a}const r=t(n);return e?.(n),r}:t:e}function k1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function c6(e,t){return t?e?t+" "+e:t:e}function dD(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ln(e,t,n={}){const r=t.render,o=hD(t,n);if(n.enabled===!1)return null;const a=n.state??Ln;return mD(e,r,o,a)}function hD(e,t={}){const{className:n,style:r,render:o}=e,{state:a=Ln,ref:l,props:c,stateAttributesMapping:f,enabled:d=!0}=t,g=d?aD(n,a):void 0,h=d?sD(r,a):void 0,y=d?oD(a,f):Ln,x=d?C1(y,Array.isArray(c)?lD(c):c)??Ln:Ln;return typeof document<"u"&&(d?Array.isArray(l)?x.ref=$_([x.ref,bS(o),...l]):x.ref=Ms(x.ref,bS(o),l):Ms(null,null)),d?(g!==void 0&&(x.className=c6(x.className,g)),h!==void 0&&(x.style=C1(x.style,h)),x):Ln}const pD=Symbol.for("react.lazy");function mD(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Ba(n,t.props);o.ref=n.ref;let a=t;return a?.$$typeof===pD&&(a=C.Children.toArray(t)[0]),C.cloneElement(a,o)}if(e&&typeof e=="string")return gD(e,n);throw new Error(Gn(8))}function gD(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const u6=C.createContext(null),f6=()=>C.useContext(u6),yD=lf("portal");function d6(e={}){const{ref:t,container:n,componentProps:r=Ln,elementProps:o}=e,a=Us(),c=f6()?.portalNode,[f,d]=C.useState(null),[g,h]=C.useState(null),y=st(E=>{E!==null&&h(E)}),x=C.useRef(null);qe(()=>{if(n===null){x.current&&(x.current=null,h(null),d(null));return}if(a==null)return;const E=(n&&(_y(n)?n:n.current))??c??document.body;if(E==null){x.current&&(x.current=null,h(null),d(null));return}x.current!==E&&(x.current=E,h(null),d(E))},[n,c,a]);const v=ln("div",r,{ref:[t,y],props:[{id:a,[yD]:""},o]});return{portalNode:g,portalSubtree:f&&v?Mi.createPortal(v,f):null}}const h6=C.forwardRef(function(t,n){const{children:r,container:o,className:a,render:l,renderGuards:c,...f}=t,{portalNode:d,portalSubtree:g}=d6({container:o,ref:n,componentProps:t,elementProps:f}),h=C.useRef(null),y=C.useRef(null),x=C.useRef(null),v=C.useRef(null),[S,E]=C.useState(null),k=S?.modal,T=S?.open,R=typeof c=="boolean"?c:!!S&&!S.modal&&S.open&&!!d;C.useEffect(()=>{if(!d||k)return;function j(N){d&&N.relatedTarget&&Gl(N)&&(N.type==="focusin"?uS:M_)(d)}return d.addEventListener("focusin",j,!0),d.addEventListener("focusout",j,!0),()=>{d.removeEventListener("focusin",j,!0),d.removeEventListener("focusout",j,!0)}},[d,k]),C.useEffect(()=>{!d||T||uS(d)},[T,d]);const L=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:y,beforeInsideRef:x,afterInsideRef:v,portalNode:d,setFocusManagerState:E}),[d]);return p.jsxs(C.Fragment,{children:[g,p.jsxs(u6.Provider,{value:L,children:[R&&d&&p.jsx(ac,{"data-type":"outside",ref:h,onFocus:j=>{if(Gl(j,d))x.current?.focus();else{const N=S?S.domReference:null;Xk(N)?.focus()}}}),R&&d&&p.jsx("span",{"aria-owns":d.id,style:F_}),d&&Mi.createPortal(r,d),R&&d&&p.jsx(ac,{"data-type":"outside",ref:y,onFocus:j=>{if(Gl(j,d))v.current?.focus();else{const N=S?S.domReference:null;Hy(N)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,Et(oc,j.nativeEvent))}}})]})]})});function p6(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class Gy{nodesRef={current:[]};events=p6();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const m6=C.createContext(null),g6=C.createContext(null),Go=()=>C.useContext(m6)?.id||null,Ya=e=>{const t=C.useContext(g6);return e??t};function y6(e){const t=Us(),n=Ya(e),r=Go();return qe(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function xD(e){const{children:t,id:n}=e,r=Go();return p.jsx(m6.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function bD(e){const{children:t,externalTree:n}=e,r=Zn(()=>n??new Gy).current;return p.jsx(g6.Provider,{value:r,children:t})}function zo(e){return e==null?e:"current"in e?e.current:e}function vD(e,t){const n=$n(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const vS=20;let Oa=[];function Yy(){Oa=Oa.filter(e=>e.deref()?.isConnected)}function wD(e){Yy(),e&&Va(e)!=="body"&&(Oa.push(new WeakRef(e)),Oa.length>vS&&(Oa=Oa.slice(-vS)))}function u2(){return Yy(),Oa[Oa.length-1]?.deref()}function SD(e){if(!e)return null;const t=hc();return Kk(e,t)?e:jf(e,t)[0]||e}function CD(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():By(e)}function wS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=hc(),o=N_(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return Kk(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function x6(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:f=!0,openInteractionType:d="",nextFocusableElement:g,previousFocusableElement:h,beforeContentFocusGuardRef:y,externalTree:x,getInsideElements:v}=e,S="rootStore"in t?t.rootStore:t,E=S.useState("open"),k=S.useState("domReferenceElement"),T=S.useState("floatingElement"),{events:R,dataRef:L}=S.context,j=st(()=>L.current.floatingContext?.nodeId),N=o===!1,A=g1(k)&&N,D=C.useRef(["content"]),U=Nr(o),I=Nr(a),q=Nr(d),$=Ya(x),V=f6(),Y=C.useRef(!1),H=C.useRef(!1),B=C.useRef(!1),F=C.useRef(-1),G=C.useRef(""),ie=C.useRef(""),M=C.useRef(null),P=C.useRef(null),Q=Ms(M,y,V?.beforeInsideRef),_=Ms(P,V?.afterInsideRef),ee=jr(),J=jr(),re=Vy(),pe=V!=null,fe=lp(T),Ce=st((je=fe)=>je?jf(je,hc()):[]),Ee=st(()=>v?.().filter(je=>je!=null)??[]),Ie=st(je=>{const _e=Ce(je);return D.current.map(()=>_e).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function je(ye){ye.key==="Tab"&&ht(fe,ii(Gt(fe)))&&Ce().length===0&&!A&&ni(ye)}const _e=Gt(fe);return _e.addEventListener("keydown",je),()=>{_e.removeEventListener("keydown",je)}},[r,k,fe,c,D,A,Ce,Ie]),C.useEffect(()=>{if(r||!E)return;const je=Gt(fe);function _e(){B.current=!1}function ye(Te){const Re=Ar(Te),he=Ee(),Se=ht(T,Re)||ht(k,Re)||ht(V?.portalNode,Re)||he.some(ne=>ne===Re||ht(ne,Re));B.current=!Se,ie.current=Te.pointerType||"keyboard",Re?.closest(`[${z_}]`)&&(H.current=!0)}function We(){ie.current="keyboard"}return je.addEventListener("pointerdown",ye,!0),je.addEventListener("pointerup",_e,!0),je.addEventListener("pointercancel",_e,!0),je.addEventListener("keydown",We,!0),()=>{je.removeEventListener("pointerdown",ye,!0),je.removeEventListener("pointerup",_e,!0),je.removeEventListener("pointercancel",_e,!0),je.removeEventListener("keydown",We,!0)}},[r,T,k,fe,E,V,Ee]),C.useEffect(()=>{if(r||!f)return;const je=Gt(fe);function _e(){H.current=!0,J.start(0,()=>{H.current=!1})}function ye(Se){const ne=Ar(Se),ze=Ce().indexOf(ne);ze!==-1&&(F.current=ze)}function We(Se){const ne=Se.relatedTarget,xe=Se.currentTarget,ze=Ar(Se);queueMicrotask(()=>{const Ue=j(),wt=S.context.triggerElements,ae=Ee(),ve=ne?.hasAttribute(lf("focus-guard"))&&[M.current,P.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,zo(h),zo(g)].includes(ne),Oe=!(ht(k,ne)||ht(T,ne)||ht(ne,T)||ht(V?.portalNode,ne)||ae.some(Me=>Me===ne||ht(Me,ne))||ne!=null&&wt.hasElement(ne)||wt.hasMatchingElement(Me=>ht(Me,ne))||ve||$&&(Bo($.nodesRef.current,Ue).find(Me=>ht(Me.context?.elements.floating,ne)||ht(Me.context?.elements.domReference,ne))||oS($.nodesRef.current,Ue).find(Me=>[Me.context?.elements.floating,lp(Me.context?.elements.floating)].includes(ne)||Me.context?.elements.domReference===ne)));if(xe===k&&fe&&wS(fe,D),l&&xe!==k&&!CD(ze)&&ii(je)===je.body){if(Rn(fe)&&(fe.focus(),l==="popup")){re.request(()=>{fe.focus()});return}const Me=F.current,He=Ce(),kt=He[Me]||He[He.length-1]||fe;Rn(kt)&&kt.focus()}if(L.current.insideReactTree){L.current.insideReactTree=!1;return}(A||!c)&&ne&&Oe&&!H.current&&(A||ne!==u2())&&(Y.current=!0,S.setOpen(!1,Et(oc,Se)))})}function Te(){B.current||(L.current.insideReactTree=!0,ee.start(0,()=>{L.current.insideReactTree=!1}))}const Re=Rn(k)?k:null,he=[];if(!(!T&&!Re))return Re&&(Re.addEventListener("focusout",We),Re.addEventListener("pointerdown",_e),he.push(()=>{Re.removeEventListener("focusout",We),Re.removeEventListener("pointerdown",_e)})),T&&(T.addEventListener("focusin",ye),T.addEventListener("focusout",We),V&&(T.addEventListener("focusout",Te,!0),he.push(()=>{T.removeEventListener("focusout",Te,!0)})),he.push(()=>{T.removeEventListener("focusin",ye),T.removeEventListener("focusout",We)})),()=>{he.forEach(Se=>{Se()})}},[r,k,T,fe,c,$,V,S,f,l,Ce,A,j,D,L,ee,J,re,g,h,Ee]),C.useEffect(()=>{if(r||!T||!E)return;const je=Array.from(V?.portalNode?.querySelectorAll(`[${lf("portal")}]`)||[]),ye=($?oS($.nodesRef.current,j()):[]).find(ne=>g1(ne.context?.elements.domReference||null))?.context?.elements.domReference,Te=[...[T,...je,M.current,P.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,...Ee()],ye,zo(h),zo(g),A?k:null].filter(ne=>ne!=null),Re=gS(Te,{ariaHidden:c||A,mark:!1}),he=[T,...je].filter(ne=>ne!=null),Se=gS(he);return()=>{Se(),Re()}},[E,r,k,T,c,D,V,A,$,j,g,h,Ee]),qe(()=>{if(!E||r||!Rn(fe))return;const je=Gt(fe),_e=ii(je);queueMicrotask(()=>{const ye=Ie(fe),We=U.current,Te=typeof We=="function"?We(q.current||""):We;if(Te===void 0||Te===!1)return;let Re;Te===!0||Te===null?Re=ye[0]||fe:Re=zo(Te),Re=Re||ye[0]||fe,!ht(fe,_e)&&Gu(Re,{preventScroll:Re===fe})})},[r,E,fe,N,Ie,U,q]),qe(()=>{if(r||!fe)return;const je=Gt(fe),_e=ii(je);wD(_e);function ye(Te){if(Te.open||(G.current=vD(Te.nativeEvent,ie.current)),Te.reason===Rr&&Te.nativeEvent.type==="mouseleave"&&(Y.current=!0),Te.reason===Uy)if(Te.nested)Y.current=!1;else if(Fk(Te.nativeEvent)||Bk(Te.nativeEvent))Y.current=!1;else{let Re=!1;document.createElement("div").focus({get preventScroll(){return Re=!0,!1}}),Re?Y.current=!1:Y.current=!0}}R.on("openchange",ye);function We(){const Te=I.current;let Re=typeof Te=="function"?Te(G.current):Te;if(Re===void 0||Re===!1)return null;if(Re===null&&(Re=!0),typeof Re=="boolean"){const Se=k||u2();return Se&&Se.isConnected?Se:null}const he=k||u2();return zo(Re)||he||null}return()=>{R.off("openchange",ye);const Te=ii(je),Re=Ee(),he=ht(T,Te)||Re.some(ne=>ne===Te||ht(ne,Te))||$&&Bo($.nodesRef.current,j(),!1).some(ne=>ht(ne.context?.elements.floating,Te)),Se=We();queueMicrotask(()=>{const ne=SD(Se),xe=typeof I.current!="boolean";I.current&&!Y.current&&Rn(ne)&&(!(!xe&&ne!==Te&&Te!==je.body)||he)&&ne.focus({preventScroll:!0}),Y.current=!1})}},[r,T,fe,I,L,R,$,k,j,Ee]),qe(()=>{if(!jk||E||!T)return;const je=ii(Gt(T));!Rn(je)||!Zp(je)||ht(T,je)&&je.blur()},[E,T]),qe(()=>{if(!(r||!V))return V.setFocusManagerState({modal:c,closeOnFocusOut:f,open:E,onOpenChange:S.setOpen,domReference:k}),()=>{V.setFocusManagerState(null)}},[r,V,c,E,S,f,k]),qe(()=>{if(!(r||!fe))return wS(fe,D),()=>{queueMicrotask(Yy)}},[r,fe,D]);const Ye=!r&&(c?!A:!0)&&(pe||c);return p.jsxs(C.Fragment,{children:[Ye&&p.jsx(ac,{"data-type":"inside",ref:Q,onFocus:je=>{if(c){const _e=Ie();Gu(_e[_e.length-1])}else V?.portalNode&&(Y.current=!1,Gl(je,V.portalNode)?Hy(k)?.focus():zo(h??V.beforeOutsideRef)?.focus())}}),n,Ye&&p.jsx(ac,{"data-type":"inside",ref:_,onFocus:je=>{c?Gu(Ie()[0]):V?.portalNode&&(f&&(Y.current=!0),Gl(je,V.portalNode)?Xk(k)?.focus():zo(g??V.afterOutsideRef)?.focus())}})]})}function b6(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:f=!0,touchOpenDelay:d=0,reason:g=ic}=t,h=C.useRef(void 0),y=Vy(),x=jr(),v=C.useMemo(()=>({onPointerDown(S){h.current=S.pointerType},onMouseDown(S){const E=h.current,k=S.nativeEvent,T=n.select("open");if(S.button!==0||a==="click"||tc(E,!0)&&c)return;const R=r.current.openEvent,L=R?.type,j=n.select("domReferenceElement")!==S.currentTarget,N=T&&j||!(T&&l&&(!(R&&f)||L==="click"||L==="mousedown"));if(Zp(k.target)){const D=Et(g,k,k.target);N&&E==="touch"&&d>0?x.start(d,()=>{n.setOpen(!0,D)}):n.setOpen(N,D);return}const A=S.currentTarget;y.request(()=>{const D=Et(g,k,A);N&&E==="touch"&&d>0?x.start(d,()=>{n.setOpen(!0,D)}):n.setOpen(N,D)})},onClick(S){if(a==="mousedown-only")return;const E=h.current;if(a==="mousedown"&&E){h.current=void 0;return}if(tc(E,!0)&&c)return;const k=n.select("open"),T=r.current.openEvent,R=n.select("domReferenceElement")!==S.currentTarget,L=k&&R||!(k&&l&&(!(T&&f)||Hk(T))),j=Et(g,S.nativeEvent,S.currentTarget);L&&E==="touch"&&d>0?x.start(d,()=>{n.setOpen(!0,j)}):n.setOpen(L,j)},onKeyDown(){h.current=void 0}}),[r,a,c,n,f,l,y,x,d,g]);return C.useMemo(()=>o?{reference:v}:Ln,[o,v])}function ED(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let d=a.width,g=a.height,h=a.x,y=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),h-=n||0,y-=r||0,d=0,g=0,!o||f?(d=t.axis==="y"?a.width:0,g=t.axis==="x"?a.height:0,h=l&&t.x!=null?t.x:h,y=c&&t.y!=null?t.y:y):o&&!f&&(g=t.axis==="x"?a.height:g,d=t.axis==="y"?a.width:d),o=!0,{width:d,height:g,x:h,y,top:y,right:h+d,bottom:y+g,left:h}}}}function SS(e){return e!=null&&e.clientX!=null}function kD(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:f="both"}=t,d=C.useRef(!1),g=C.useRef(null),[h,y]=C.useState(),[x,v]=C.useState([]),S=st((L,j,N)=>{d.current||l.current.openEvent&&!SS(l.current.openEvent)||n.set("positionReference",ED(N??a,{x:L,y:j,axis:f,dataRef:l,pointerType:h}))}),E=st(L=>{r?g.current||v([]):S(L.clientX,L.clientY,L.currentTarget)}),k=tc(h)?o:r,T=C.useCallback(()=>{if(!k||!c)return;const L=$n(o);function j(N){const A=Ar(N);ht(o,A)?(L.removeEventListener("mousemove",j),g.current=null):S(N.clientX,N.clientY)}if(!l.current.openEvent||SS(l.current.openEvent)){L.addEventListener("mousemove",j);const N=()=>{L.removeEventListener("mousemove",j),g.current=null};return g.current=N,N}n.set("positionReference",a)},[k,c,o,l,a,n,S]);C.useEffect(()=>T(),[T,x]),C.useEffect(()=>{c&&!o&&(d.current=!1)},[c,o]),C.useEffect(()=>{!c&&r&&(d.current=!0)},[c,r]);const R=C.useMemo(()=>{function L(j){y(j.pointerType)}return{onPointerDown:L,onPointerEnter:L,onMouseMove:E,onMouseEnter:E}},[E]);return C.useMemo(()=>c?{reference:R,trigger:R}:{},[c,R])}const TD={intentional:"onClick",sloppy:"onPointerDown"};function AD(){return!1}function RD(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Wy(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:d="sloppy",referencePress:g=AD,referencePressEvent:h="sloppy",bubbles:y,externalTree:x}=t,v=Ya(x),S=st(typeof f=="function"?f:()=>!1),E=typeof f=="function"?S:f,k=E!==!1,T=st(()=>d),R=C.useRef(!1),L=C.useRef(!1),j=C.useRef(!1),{escapeKey:N,outsidePress:A}=RD(y),D=C.useRef(null),U=jr(),I=jr(),q=st(()=>{I.clear(),a.current.insideReactTree=!1}),$=C.useRef(!1),V=C.useRef(""),Y=st(g),H=st(P=>{if(!r||!l||!c||P.key!=="Escape"||$.current)return;const Q=a.current.floatingContext?.nodeId,_=v?Bo(v.nodesRef.current,Q):[];if(!N&&_.length>0){let re=!0;if(_.forEach(pe=>{pe.context?.open&&!pe.context.dataRef.current.__escapeKeyBubbles&&(re=!1)}),!re)return}const ee=t_(P)?P.nativeEvent:P,J=Et(e0,ee);n.setOpen(!1,J),!N&&!J.isPropagationAllowed&&P.stopPropagation()}),B=st(()=>{a.current.insideReactTree=!0,I.start(0,q)});C.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=N,a.current.__outsidePressBubbles=A;const P=new $i,Q=new $i;function _(){P.clear(),$.current=!0}function ee(){P.start(Qp()?5:0,()=>{$.current=!1})}function J(){j.current=!0,Q.start(0,()=>{j.current=!1})}function re(){R.current=!1,L.current=!1}function pe(){const ne=V.current,xe=ne==="pen"||!ne?"mouse":ne,ze=T(),Ue=typeof ze=="function"?ze():ze;return typeof Ue=="string"?Ue:Ue[xe]}function fe(ne){const xe=pe();return xe==="intentional"&&ne.type!=="click"||xe==="sloppy"&&ne.type==="click"}function Ce(ne){const xe=a.current.floatingContext?.nodeId,ze=v&&Bo(v.nodesRef.current,xe).some(Ue=>Bi(ne,Ue.context?.elements.floating));return Bi(ne,n.select("floatingElement"))||Bi(ne,n.select("domReferenceElement"))||ze}function Ee(ne){if(fe(ne)){q();return}if(a.current.insideReactTree){q();return}const xe=Ar(ne),ze=`[${lf("inert")}]`;let Ue=Array.from(Gt(n.select("floatingElement")).querySelectorAll(ze));const wt=Yt(xe)?xe.getRootNode():null;af(wt)&&(Ue=Ue.concat(Array.from(wt.querySelectorAll(ze))));const ae=n.context.triggerElements;if(xe&&(ae.hasElement(xe)||ae.hasMatchingElement(He=>ht(He,xe))))return;let ve=Yt(xe)?xe:null;for(;ve&&!oo(ve);){const He=fo(ve);if(oo(He)||!Yt(He))break;ve=He}if(Ue.length&&Yt(xe)&&!JL(xe)&&!ht(xe,n.select("floatingElement"))&&Ue.every(He=>!ht(ve,He)))return;if(Rn(xe)&&!("touches"in ne)){const He=oo(xe),kt=ci(xe),Ft=/auto|scroll/,Xe=He||Ft.test(kt.overflowX),Ve=He||Ft.test(kt.overflowY),pt=Xe&&xe.clientWidth>0&&xe.scrollWidth>xe.clientWidth,mt=Ve&&xe.clientHeight>0&&xe.scrollHeight>xe.clientHeight,Qe=kt.direction==="rtl",yt=mt&&(Qe?ne.offsetX<=xe.offsetWidth-xe.clientWidth:ne.offsetX>xe.clientWidth),Pt=pt&&ne.offsetY>xe.clientHeight;if(yt||Pt)return}if(Ce(ne))return;if(pe()==="intentional"&&j.current){Q.clear(),j.current=!1;return}if(typeof E=="function"&&!E(ne))return;const Oe=a.current.floatingContext?.nodeId,Me=v?Bo(v.nodesRef.current,Oe):[];if(Me.length>0){let He=!0;if(Me.forEach(kt=>{kt.context?.open&&!kt.context.dataRef.current.__outsidePressBubbles&&(He=!1)}),!He)return}n.setOpen(!1,Et(Uy,ne)),q()}function Ie(ne){pe()!=="sloppy"||ne.pointerType==="touch"||!n.select("open")||!l||Bi(ne,n.select("floatingElement"))||Bi(ne,n.select("domReferenceElement"))||Ee(ne)}function Ye(ne){if(pe()!=="sloppy"||!n.select("open")||!l||Bi(ne,n.select("floatingElement"))||Bi(ne,n.select("domReferenceElement")))return;const xe=ne.touches[0];xe&&(D.current={startTime:Date.now(),startX:xe.clientX,startY:xe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function je(ne){V.current="touch";const xe=Ar(ne);function ze(){Ye(ne),xe?.removeEventListener(ne.type,ze)}xe?.addEventListener(ne.type,ze)}function _e(ne){if(U.clear(),ne.type==="pointerdown"&&(V.current=ne.pointerType),ne.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const xe=Ar(ne);function ze(){ne.type==="pointerdown"?Ie(ne):Ee(ne),xe?.removeEventListener(ne.type,ze)}xe?.addEventListener(ne.type,ze)}function ye(ne){if(!R.current)return;const xe=L.current;if(re(),pe()==="intentional"){if(ne.type==="pointercancel"){xe&&J();return}if(!Ce(ne)){if(xe){J();return}typeof E=="function"&&!E(ne)||(Q.clear(),j.current=!0,q())}}}function We(ne){if(pe()!=="sloppy"||!D.current||Bi(ne,n.select("floatingElement"))||Bi(ne,n.select("domReferenceElement")))return;const xe=ne.touches[0];if(!xe)return;const ze=Math.abs(xe.clientX-D.current.startX),Ue=Math.abs(xe.clientY-D.current.startY),wt=Math.sqrt(ze*ze+Ue*Ue);wt>5&&(D.current.dismissOnTouchEnd=!0),wt>10&&(Ee(ne),U.clear(),D.current=null)}function Te(ne){const xe=Ar(ne);function ze(){We(ne),xe?.removeEventListener(ne.type,ze)}xe?.addEventListener(ne.type,ze)}function Re(ne){pe()!=="sloppy"||!D.current||Bi(ne,n.select("floatingElement"))||Bi(ne,n.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&Ee(ne),U.clear(),D.current=null)}function he(ne){const xe=Ar(ne);function ze(){Re(ne),xe?.removeEventListener(ne.type,ze)}xe?.addEventListener(ne.type,ze)}const Se=Gt(o);return c&&(Se.addEventListener("keydown",H),Se.addEventListener("compositionstart",_),Se.addEventListener("compositionend",ee)),k&&(Se.addEventListener("click",_e,!0),Se.addEventListener("pointerdown",_e,!0),Se.addEventListener("pointerup",ye,!0),Se.addEventListener("pointercancel",ye,!0),Se.addEventListener("mousedown",_e,!0),Se.addEventListener("mouseup",ye,!0),Se.addEventListener("touchstart",je,!0),Se.addEventListener("touchmove",Te,!0),Se.addEventListener("touchend",he,!0)),()=>{c&&(Se.removeEventListener("keydown",H),Se.removeEventListener("compositionstart",_),Se.removeEventListener("compositionend",ee)),k&&(Se.removeEventListener("click",_e,!0),Se.removeEventListener("pointerdown",_e,!0),Se.removeEventListener("pointerup",ye,!0),Se.removeEventListener("pointercancel",ye,!0),Se.removeEventListener("mousedown",_e,!0),Se.removeEventListener("mouseup",ye,!0),Se.removeEventListener("touchstart",je,!0),Se.removeEventListener("touchmove",Te,!0),Se.removeEventListener("touchend",he,!0)),P.clear(),Q.clear(),re(),j.current=!1}},[a,o,c,k,E,r,l,N,A,H,q,T,v,n,U]),C.useEffect(q,[E,q]);const F=C.useMemo(()=>({onKeyDown:H,[TD[h]]:P=>{Y()&&n.setOpen(!1,Et(ic,P.nativeEvent))},...h!=="intentional"&&{onClick(P){Y()&&n.setOpen(!1,Et(ic,P.nativeEvent))}}}),[H,n,h,Y]),G=st(P=>{if(!r||!l||P.button!==0)return;const Q=Ar(P.nativeEvent);ht(n.select("floatingElement"),Q)&&(R.current||(R.current=!0,L.current=!1))}),ie=st(P=>{!r||!l||(P.defaultPrevented||P.nativeEvent.defaultPrevented)&&R.current&&(L.current=!0)}),M=C.useMemo(()=>({onKeyDown:H,onPointerDown:ie,onMouseDown:ie,onClickCapture:B,onMouseDownCapture(P){B(),G(P)},onPointerDownCapture(P){B(),G(P)},onMouseUpCapture:B,onTouchEndCapture:B,onTouchMoveCapture:B}),[H,B,G,ie]);return C.useMemo(()=>l?{reference:F,floating:M,trigger:F}:{},[l,F,M])}function CS(e,t,n){let{reference:r,floating:o}=e;const a=Ni(t),l=Fy(t),c=Py(l),f=qr(t),d=a==="y",g=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,y=r[c]/2-o[c]/2;let x;switch(f){case"top":x={x:g,y:r.y-o.height};break;case"bottom":x={x:g,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:h};break;case"left":x={x:r.x-o.width,y:h};break;default:x={x:r.x,y:r.y}}switch(Ga(t)){case"start":x[l]-=y*(n&&d?-1:1);break;case"end":x[l]+=y*(n&&d?-1:1);break}return x}async function ND(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:h="floating",altBoundary:y=!1,padding:x=0}=Uo(t,e),v=Uk(x),E=c[y?h==="floating"?"reference":"floating":h],k=fp(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:g,strategy:f})),T=h==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),L=await(a.isElement==null?void 0:a.isElement(R))?await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},j=fp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:R,strategy:f}):T);return{top:(k.top-j.top+v.top)/L.y,bottom:(j.bottom-k.bottom+v.bottom)/L.y,left:(k.left-j.left+v.left)/L.x,right:(j.right-k.right+v.right)/L.x}}const OD=50,jD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:ND},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:h}=CS(d,r,f),y=r,x=0;const v={};for(let S=0;S<a.length;S++){const E=a[S];if(!E)continue;const{name:k,fn:T}=E,{x:R,y:L,data:j,reset:N}=await T({x:g,y:h,initialPlacement:r,placement:y,strategy:o,middlewareData:v,rects:d,platform:c,elements:{reference:e,floating:t}});g=R??g,h=L??h,v[k]={...v[k],...j},N&&x<OD&&(x++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(d=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:g,y:h}=CS(d,y,f)),S=-1)}return{x:g,y:h,placement:y,strategy:o,middlewareData:v}},MD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:l,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:g=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...E}=Uo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=qr(o),T=Ni(c),R=qr(c)===c,L=await(f.isRTL==null?void 0:f.isRTL(d.floating)),j=y||(R||!S?[up(c)]:o_(c)),N=v!=="none";!y&&N&&j.push(...c_(c,S,v,L));const A=[c,...j],D=await f.detectOverflow(t,E),U=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(g&&U.push(D[k]),h){const Y=i_(o,l,L);U.push(D[Y[0]],D[Y[1]])}if(I=[...I,{placement:o,overflows:U}],!U.every(Y=>Y<=0)){var q,$;const Y=(((q=a.flip)==null?void 0:q.index)||0)+1,H=A[Y];if(H&&(!(h==="alignment"?T!==Ni(H):!1)||I.every(G=>Ni(G.placement)===T?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:H}};let B=($=I.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:$.placement;if(!B)switch(x){case"bestFit":{var V;const F=(V=I.filter(G=>{if(N){const ie=Ni(G.placement);return ie===T||ie==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ie=>ie>0).reduce((ie,M)=>ie+M,0)]).sort((G,ie)=>G[1]-ie[1])[0])==null?void 0:V[0];F&&(B=F);break}case"initialPlacement":B=c;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function ES(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kS(e){return n_.some(t=>e[t]>=0)}const LD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Uo(e,t);switch(o){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=ES(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:kS(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=ES(l,n.floating);return{data:{escapedOffsets:c,escaped:kS(c)}}}default:return{}}}}},v6=new Set(["left","top"]);async function _D(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=qr(n),c=Ga(n),f=Ni(n)==="y",d=v6.has(l)?-1:1,g=a&&f?-1:1,h=Uo(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof v=="number"&&(x=c==="end"?v*-1:v),f?{x:x*g,y:y*d}:{x:y*d,y:x*g}}const DD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:l,middlewareData:c}=t,f=await _D(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:a+f.y,data:{...f,placement:l}}}}},ID=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:k=>{let{x:T,y:R}=k;return{x:T,y:R}}},...d}=Uo(e,t),g={x:n,y:r},h=await a.detectOverflow(t,d),y=Ni(qr(o)),x=zy(y);let v=g[x],S=g[y];if(l){const k=x==="y"?"top":"left",T=x==="y"?"bottom":"right",R=v+h[k],L=v-h[T];v=y1(R,v,L)}if(c){const k=y==="y"?"top":"left",T=y==="y"?"bottom":"right",R=S+h[k],L=S-h[T];S=y1(R,S,L)}const E=f.fn({...t,[x]:v,[y]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[x]:l,[y]:c}}}}}},zD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=Uo(e,t),g={x:n,y:r},h=Ni(o),y=zy(h);let x=g[y],v=g[h];const S=Uo(c,t),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const R=y==="y"?"height":"width",L=a.reference[y]-a.floating[R]+E.mainAxis,j=a.reference[y]+a.reference[R]-E.mainAxis;x<L?x=L:x>j&&(x=j)}if(d){var k,T;const R=y==="y"?"width":"height",L=v6.has(qr(o)),j=a.reference[h]-a.floating[R]+(L&&((k=l.offset)==null?void 0:k[h])||0)+(L?0:E.crossAxis),N=a.reference[h]+a.reference[R]+(L?0:((T=l.offset)==null?void 0:T[h])||0)-(L?E.crossAxis:0);v<j?v=j:v>N&&(v=N)}return{[y]:x,[h]:v}}}},PD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:l,elements:c}=t,{apply:f=()=>{},...d}=Uo(e,t),g=await l.detectOverflow(t,d),h=qr(o),y=Ga(o),x=Ni(o)==="y",{width:v,height:S}=a.floating;let E,k;h==="top"||h==="bottom"?(E=h,k=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(k=h,E=y==="end"?"top":"bottom");const T=S-g.top-g.bottom,R=v-g.left-g.right,L=nc(S-g[E],T),j=nc(v-g[k],R),N=!t.middlewareData.shift;let A=L,D=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=T),N&&!y){const I=oi(g.left,0),q=oi(g.right,0),$=oi(g.top,0),V=oi(g.bottom,0);x?D=v-2*(I!==0||q!==0?I+q:oi(g.left,g.right)):A=S-2*($!==0||V!==0?$+V:oi(g.top,g.bottom))}await f({...t,availableWidth:D,availableHeight:A});const U=await l.getDimensions(c.floating);return v!==U.width||S!==U.height?{reset:{rects:!0}}:{}}}};function w6(e){const t=ci(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Rn(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=cp(n)!==a||cp(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Ky(e){return Yt(e)?e:e.contextElement}function Wl(e){const t=Ky(e);if(!Rn(t))return ao(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=w6(t);let l=(a?cp(n.width):n.width)/r,c=(a?cp(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const FD=ao(0);function S6(e){const t=$n(e);return!Qp()||!t.visualViewport?FD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ky(e);let l=ao(1);t&&(r?Yt(r)&&(l=Wl(r)):l=Wl(e));const c=BD(a,n,r)?S6(a):ao(0);let f=(o.left+c.x)/l.x,d=(o.top+c.y)/l.y,g=o.width/l.x,h=o.height/l.y;if(a){const y=$n(a),x=r&&Yt(r)?$n(r):r;let v=y,S=h1(v);for(;S&&r&&x!==v;){const E=Wl(S),k=S.getBoundingClientRect(),T=ci(S),R=k.left+(S.clientLeft+parseFloat(T.paddingLeft))*E.x,L=k.top+(S.clientTop+parseFloat(T.paddingTop))*E.y;f*=E.x,d*=E.y,g*=E.x,h*=E.y,f+=R,d+=L,v=$n(S),S=h1(v)}}return fp({width:g,height:h,x:f,y:d})}function t0(e,t){const n=Xp(e).scrollLeft;return t?t.left+n:Ls(po(e)).left+n}function C6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-t0(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function HD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",l=po(r),c=t?Kp(t.floating):!1;if(r===l||c&&a)return n;let f={scrollLeft:0,scrollTop:0},d=ao(1);const g=ao(0),h=Rn(r);if((h||!h&&!a)&&((Va(r)!=="body"||$a(l))&&(f=Xp(r)),h)){const x=Ls(r);d=Wl(r),g.x=x.x+r.clientLeft,g.y=x.y+r.clientTop}const y=l&&!h&&!a?C6(l,f):ao(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+g.x+y.x,y:n.y*d.y-f.scrollTop*d.y+g.y+y.y}}function UD(e){return Array.from(e.getClientRects())}function qD(e){const t=po(e),n=Xp(e),r=e.ownerDocument.body,o=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+t0(e);const c=-n.scrollTop;return ci(r).direction==="rtl"&&(l+=oi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:l,y:c}}const TS=25;function VD(e,t){const n=$n(e),r=po(e),o=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,f=0;if(o){a=o.width,l=o.height;const g=Qp();(!g||g&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const d=t0(r);if(d<=0){const g=r.ownerDocument,h=g.body,y=getComputedStyle(h),x=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-x);v<=TS&&(a-=v)}else d<=TS&&(a+=d);return{width:a,height:l,x:c,y:f}}function $D(e,t){const n=Ls(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Rn(e)?Wl(e):ao(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,f=o*a.x,d=r*a.y;return{width:l,height:c,x:f,y:d}}function AS(e,t,n){let r;if(t==="viewport")r=VD(e,n);else if(t==="document")r=qD(po(e));else if(Yt(t))r=$D(t,n);else{const o=S6(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fp(r)}function E6(e,t){const n=fo(e);return n===t||!Yt(n)||oo(n)?!1:ci(n).position==="fixed"||E6(n,t)}function GD(e,t){const n=t.get(e);if(n)return n;let r=sf(e,[],!1).filter(c=>Yt(c)&&Va(c)!=="body"),o=null;const a=ci(e).position==="fixed";let l=a?fo(e):e;for(;Yt(l)&&!oo(l);){const c=ci(l),f=Dy(l);!f&&c.position==="fixed"&&(o=null),(a?!f&&!o:!f&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||$a(l)&&!f&&E6(e,l))?r=r.filter(g=>g!==l):o=c,l=fo(l)}return t.set(e,r),r}function YD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Kp(t)?[]:GD(t,this._c):[].concat(n),r],c=AS(t,l[0],o);let f=c.top,d=c.right,g=c.bottom,h=c.left;for(let y=1;y<l.length;y++){const x=AS(t,l[y],o);f=oi(x.top,f),d=nc(x.right,d),g=nc(x.bottom,g),h=oi(x.left,h)}return{width:d-h,height:g-f,x:h,y:f}}function WD(e){const{width:t,height:n}=w6(e);return{width:t,height:n}}function KD(e,t,n){const r=Rn(t),o=po(t),a=n==="fixed",l=Ls(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=ao(0);function d(){f.x=t0(o)}if(r||!r&&!a)if((Va(t)!=="body"||$a(o))&&(c=Xp(t)),r){const x=Ls(t,!0,a,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else o&&d();a&&!r&&o&&d();const g=o&&!r&&!a?C6(o,c):ao(0),h=l.left+c.scrollLeft-f.x-g.x,y=l.top+c.scrollTop-f.y-g.y;return{x:h,y,width:l.width,height:l.height}}function f2(e){return ci(e).position==="static"}function RS(e,t){if(!Rn(e)||ci(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return po(e)===n&&(n=n.ownerDocument.body),n}function k6(e,t){const n=$n(e);if(Kp(e))return n;if(!Rn(e)){let o=fo(e);for(;o&&!oo(o);){if(Yt(o)&&!f2(o))return o;o=fo(o)}return n}let r=RS(e,t);for(;r&&GL(r)&&f2(r);)r=RS(r,t);return r&&oo(r)&&f2(r)&&!Dy(r)?n:r||KL(e)||n}const QD=async function(e){const t=this.getOffsetParent||k6,n=this.getDimensions,r=await n(e.floating);return{reference:KD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XD(e){return ci(e).direction==="rtl"}const ZD={convertOffsetParentRelativeRectToViewportRelativeRect:HD,getDocumentElement:po,getClippingRect:YD,getOffsetParent:k6,getElementRects:QD,getClientRects:UD,getDimensions:WD,getScale:Wl,isElement:Yt,isRTL:XD};function T6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JD(e,t){let n=null,r;const o=po(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),a();const d=e.getBoundingClientRect(),{left:g,top:h,width:y,height:x}=d;if(c||t(),!y||!x)return;const v=As(h),S=As(o.clientWidth-(g+y)),E=As(o.clientHeight-(h+x)),k=As(g),R={rootMargin:-v+"px "+-S+"px "+-E+"px "+-k+"px",threshold:oi(0,nc(1,f))||1};let L=!0;function j(N){const A=N[0].intersectionRatio;if(A!==f){if(!L)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!T6(d,e.getBoundingClientRect())&&l(),L=!1}try{n=new IntersectionObserver(j,{...R,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,R)}n.observe(e)}return l(!0),a}function NS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=Ky(e),g=o||a?[...d?sf(d):[],...t?sf(t):[]]:[];g.forEach(k=>{o&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const h=d&&c?JD(d,n):null;let y=-1,x=null;l&&(x=new ResizeObserver(k=>{let[T]=k;T&&T.target===d&&x&&t&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(t)})),n()}),d&&!f&&x.observe(d),t&&x.observe(t));let v,S=f?Ls(e):null;f&&E();function E(){const k=Ls(e);S&&!T6(S,k)&&n(),S=k,v=requestAnimationFrame(E)}return n(),()=>{var k;g.forEach(T=>{o&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),h?.(),(k=x)==null||k.disconnect(),x=null,f&&cancelAnimationFrame(v)}}const eI=DD,tI=ID,nI=MD,rI=PD,iI=LD,oI=zD,aI=(e,t,n)=>{const r=new Map,o={platform:ZD,...n},a={...o.platform,_c:r};return jD(e,t,{...o,platform:a})};var sI=typeof document<"u",lI=function(){},$h=sI?C.useLayoutEffect:lI;function yp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!yp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function A6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function OS(e,t){const n=A6(e);return Math.round(t*n)/n}function d2(e){const t=C.useRef(e);return $h(()=>{t.current=e}),t}function cI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[g,h]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,x]=C.useState(r);yp(y,r)||x(r);const[v,S]=C.useState(null),[E,k]=C.useState(null),T=C.useCallback(G=>{G!==N.current&&(N.current=G,S(G))},[]),R=C.useCallback(G=>{G!==A.current&&(A.current=G,k(G))},[]),L=a||v,j=l||E,N=C.useRef(null),A=C.useRef(null),D=C.useRef(g),U=f!=null,I=d2(f),q=d2(o),$=d2(d),V=C.useCallback(()=>{if(!N.current||!A.current)return;const G={placement:t,strategy:n,middleware:y};q.current&&(G.platform=q.current),aI(N.current,A.current,G).then(ie=>{const M={...ie,isPositioned:$.current!==!1};Y.current&&!yp(D.current,M)&&(D.current=M,Mi.flushSync(()=>{h(M)}))})},[y,t,n,q,$]);$h(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(G=>({...G,isPositioned:!1})))},[d]);const Y=C.useRef(!1);$h(()=>(Y.current=!0,()=>{Y.current=!1}),[]),$h(()=>{if(L&&(N.current=L),j&&(A.current=j),L&&j){if(I.current)return I.current(L,j,V);V()}},[L,j,V,I,U]);const H=C.useMemo(()=>({reference:N,floating:A,setReference:T,setFloating:R}),[T,R]),B=C.useMemo(()=>({reference:L,floating:j}),[L,j]),F=C.useMemo(()=>{const G={position:n,left:0,top:0};if(!B.floating)return G;const ie=OS(B.floating,g.x),M=OS(B.floating,g.y);return c?{...G,transform:"translate("+ie+"px, "+M+"px)",...A6(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:M}},[n,c,B.floating,g.x,g.y]);return C.useMemo(()=>({...g,update:V,refs:H,elements:B,floatingStyles:F}),[g,V,H,B,F])}const uI=(e,t)=>{const n=eI(e);return{name:n.name,fn:n.fn,options:[e,t]}},fI=(e,t)=>{const n=tI(e);return{name:n.name,fn:n.fn,options:[e,t]}},dI=(e,t)=>({fn:oI(e).fn,options:[e,t]}),hI=(e,t)=>{const n=nI(e);return{name:n.name,fn:n.fn,options:[e,t]}},pI=(e,t)=>{const n=rI(e);return{name:n.name,fn:n.fn,options:[e,t]}},mI=(e,t)=>{const n=iI(e);return{name:n.name,fn:n.fn,options:[e,t]}};var xp=Symbol("NOT_FOUND");function gI(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function yI(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function xI(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var jS=e=>Array.isArray(e)?e:[e];function bI(e){const t=Array.isArray(e[0])?e[0]:e;return xI(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function vI(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function wI(e){let t;return{get(n){return t&&e(t.key,n)?t.value:xp},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function SI(e,t){let n=[];function r(c){const f=n.findIndex(d=>t(c,d.key));if(f>-1){const d=n[f];return f>0&&(n.splice(f,1),n.unshift(d)),d.value}return xp}function o(c,f){r(c)===xp&&(n.unshift({key:c,value:f}),n.length>e&&n.pop())}function a(){return n}function l(){n=[]}return{get:r,put:o,getEntries:a,clear:l}}var CI=(e,t)=>e===t;function EI(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let a=0;a<o;a++)if(!e(n[a],r[a]))return!1;return!0}}function kI(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=CI,maxSize:o=1,resultEqualityCheck:a}=n,l=EI(r);let c=0;const f=o<=1?wI(l):SI(o,l);function d(){let g=f.get(arguments);if(g===xp){if(g=e.apply(null,arguments),c++,a){const y=f.getEntries().find(x=>a(x.value,g));y&&(g=y.value,c!==0&&c--)}f.put(arguments,g)}return g}return d.clearCache=()=>{f.clear(),d.resetResultsCount()},d.resultsCount=()=>c,d.resetResultsCount=()=>{c=0},d}var TI=class{constructor(e){this.value=e}deref(){return this.value}},AI=typeof WeakRef<"u"?WeakRef:TI,RI=0,MS=1;function ph(){return{s:RI,v:void 0,o:null,p:null}}function R6(e,t={}){let n=ph();const{resultEqualityCheck:r}=t;let o,a=0;function l(){let c=n;const{length:f}=arguments;for(let h=0,y=f;h<y;h++){const x=arguments[h];if(typeof x=="function"||typeof x=="object"&&x!==null){let v=c.o;v===null&&(c.o=v=new WeakMap);const S=v.get(x);S===void 0?(c=ph(),v.set(x,c)):c=S}else{let v=c.p;v===null&&(c.p=v=new Map);const S=v.get(x);S===void 0?(c=ph(),v.set(x,c)):c=S}}const d=c;let g;if(c.s===MS)g=c.v;else if(g=e.apply(null,arguments),a++,r){const h=o?.deref?.()??o;h!=null&&r(h,g)&&(g=h,a!==0&&a--),o=typeof g=="object"&&g!==null||typeof g=="function"?new AI(g):g}return d.s=MS,d.v=g,g}return l.clearCache=()=>{n=ph(),l.resetResultsCount()},l.resultsCount=()=>a,l.resetResultsCount=()=>{a=0},l}function N6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let a=0,l=0,c,f={},d=o.pop();typeof d=="object"&&(f=d,d=o.pop()),gI(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const g={...n,...f},{memoize:h,memoizeOptions:y=[],argsMemoize:x=R6,argsMemoizeOptions:v=[]}=g,S=jS(y),E=jS(v),k=bI(o),T=h(function(){return a++,d.apply(null,arguments)},...S),R=x(function(){l++;const j=vI(k,arguments);return c=T.apply(null,j),c},...E);return Object.assign(R,{resultFunc:d,memoizedResultFunc:T,dependencies:k,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:h,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var NI=N6(R6),OI=Object.assign((e,t=NI)=>{yI(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((l,c,f)=>(l[n[f]]=c,l),{}))},{withTypes:()=>OI});N6({memoize:kI,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const rt=(e,t,n,r,o,a,...l)=>{if(l.length>0)throw new Error(Gn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var h2={exports:{}},p2={};var LS;function jI(){if(LS)return p2;LS=1;var e=Ef();function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(h,y){var x=y(),v=r({inst:{value:x,getSnapshot:y}}),S=v[0].inst,E=v[1];return a(function(){S.value=x,S.getSnapshot=y,f(S)&&E({inst:S})},[h,x,y]),o(function(){return f(S)&&E({inst:S}),h(function(){f(S)&&E({inst:S})})},[h]),l(x),x}function f(h){var y=h.getSnapshot;h=h.value;try{var x=y();return!n(h,x)}catch{return!0}}function d(h,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return p2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,p2}var _S;function O6(){return _S||(_S=1,h2.exports=jI()),h2.exports}var j6=O6(),m2={exports:{}},g2={};var DS;function MI(){if(DS)return g2;DS=1;var e=Ef(),t=O6();function n(d,g){return d===g&&(d!==0||1/d===1/g)||d!==d&&g!==g}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return g2.useSyncExternalStoreWithSelector=function(d,g,h,y,x){var v=a(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=c(function(){function k(N){if(!T){if(T=!0,R=N,N=y(N),x!==void 0&&S.hasValue){var A=S.value;if(x(A,N))return L=A}return L=N}if(A=L,r(R,N))return A;var D=y(N);return x!==void 0&&x(A,D)?(R=N,A):(R=N,L=D)}var T=!1,R,L,j=h===void 0?null:h;return[function(){return k(g())},j===null?void 0:function(){return k(j())}]},[g,h,y,x]);var E=o(d,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=E},[E]),f(E),E},g2}var IS;function LI(){return IS||(IS=1,m2.exports=MI()),m2.exports}var _I=LI();const DI=$y(19),II=DI?PI:FI;function M6(e,t,n,r,o){return II(e,t,n,r,o)}function zI(e,t,n,r,o){const a=C.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return j6.useSyncExternalStore(e.subscribe,a,a)}HL({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,o))&&(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const o of e.syncHooks)n.add(o.store);const r=[];for(const o of n)r.push(o.subscribe(t));return()=>{for(const o of r)o()}}),j6.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function PI(e,t,n,r,o){const a=BL();if(!a)return zI(e,t,n,r,o);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,o))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=o,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o),didChange:!1},a.syncHooks.push(c)),c.value}function FI(e,t,n,r,o){return _I.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,o))}class BI{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return M6(this,t,n,r,o)}}class n0 extends BI{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),qe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;qe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);qe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;qe(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,o){const a=this.selectors[t];return a(this.state,n,r,o)}useState(t,n,r,o){return C.useDebugValue(t),M6(this,this.selectors[t],n,r,o)}useContextCallback(t,n){C.useDebugValue(t);const r=st(n??dr);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(a=>{const l=r(a);if(!Object.is(o,l)){const c=o;o=l,n(l,c,this)}})}}const HI={open:rt(e=>e.open),domReferenceElement:rt(e=>e.domReferenceElement),referenceElement:rt(e=>e.positionReference??e.referenceElement),floatingElement:rt(e=>e.floatingElement),floatingId:rt(e=>e.floatingId)};class Qy extends n0{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:p6(),nested:n,noEmit:r,triggerElements:a},HI)}setOpen=(t,n)=>{if((!t||!this.state.open||Hk(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Xy(e,t=!1,n=!1){const[r,o]=C.useState(e&&t?"idle":void 0),[a,l]=C.useState(e);return e&&!a&&(l(!0),o("starting")),!e&&a&&r!=="ending"&&!n&&o("ending"),!e&&!a&&r==="ending"&&o(void 0),qe(()=>{if(!e&&a&&r!=="ending"&&n){const c=to.request(()=>{o("ending")});return()=>{to.cancel(c)}}},[e,a,r,n]),qe(()=>{if(!e||t)return;const c=to.request(()=>{o(void 0)});return()=>{to.cancel(c)}},[t,e]),qe(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&o("starting");const c=to.request(()=>{o("idle")});return()=>{to.cancel(c)}},[t,e,a,o,r]),C.useMemo(()=>({mounted:a,setMounted:l,transitionStatus:r}),[a,r])}let cf=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const UI={[cf.startingStyle]:""},qI={[cf.endingStyle]:""},pc={transitionStatus(e){return e==="starting"?UI:e==="ending"?qI:null}};function L6(e,t=!1,n=!0){const r=Vy();return st((o,a=null)=>{r.cancel();function l(){Mi.flushSync(o)}const c=zo(e);if(c==null)return;const f=c;if(typeof f.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let h=function(){const x=cf.startingStyle;if(!f.hasAttribute(x)){r.request(y);return}const v=new MutationObserver(()=>{f.hasAttribute(x)||(v.disconnect(),y())});v.observe(f,{attributes:!0,attributeFilter:[x]}),a?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(f.getAnimations().map(x=>x.finished)).then(()=>{a?.aborted||l()}).catch(()=>{const x=f.getAnimations();if(n){if(a?.aborted)return;l()}else x.length>0&&x.some(v=>v.pending||v.playState!=="finished")&&y()})};var d=h,g=y;if(t){h();return}r.request(y)}})}function mc(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,a=st(o),l=L6(r,n,!1);C.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function _6(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(o=>{if(e!==void 0){if(n.current!==null){const a=n.current,l=r.current,c=t.context.triggerElements.getById(a);l&&c===l&&t.context.triggerElements.delete(a),n.current=null,r.current=null}o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function D6(e,t,n,r){const o=n.useState("isMountedByTrigger",e),a=_6(e,n),l=st(c=>{if(a(c),!c||!n.select("open"))return;const f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:c,...r});return}f==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return qe(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:o}}function Zy(e){const t=e.useState("open");qe(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function Jy(e,t,n){const{mounted:r,setMounted:o,transitionStatus:a}=Xy(e);t.useSyncedValues({mounted:r,transitionStatus:a});const l=st(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return mc({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class Mf{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function VI(){return new Qy({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Mf,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function ex(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:VI(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ln,inactiveTriggerProps:Ln,popupProps:Ln}}const mh=rt(e=>e.triggerIdProp??e.activeTriggerId),tx={open:rt(e=>e.openProp??e.open),mounted:rt(e=>e.mounted),transitionStatus:rt(e=>e.transitionStatus),floatingRootContext:rt(e=>e.floatingRootContext),preventUnmountingOnClose:rt(e=>e.preventUnmountingOnClose),payload:rt(e=>e.payload),activeTriggerId:mh,activeTriggerElement:rt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rt((e,t)=>t!==void 0&&mh(e)===t),isOpenedByTrigger:rt((e,t)=>t!==void 0&&mh(e)===t&&e.open),isMountedByTrigger:rt((e,t)=>t!==void 0&&mh(e)===t&&e.mounted),triggerProps:rt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:rt(e=>e.popupProps),popupElement:rt(e=>e.popupElement),positionerElement:rt(e=>e.positionerElement)};function $I(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Us(),a=Go()!=null,l=Zn(()=>new Qy({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Mf,floatingId:o,nested:a,noEmit:!1})).current;return qe(()=>{const c={open:t,floatingId:o};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Yt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,o,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l.context.noEmit=!1,l}function GI(e={}){const{nodeId:t,externalTree:n}=e,r=$I(e),o=e.rootContext||r,a={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[l,c]=C.useState(null),f=C.useRef(null),d=Ya(n);qe(()=>{a.domReference&&(f.current=a.domReference)},[a.domReference]);const g=cI({...e,elements:{...a,...l&&{reference:l}}}),h=C.useCallback(A=>{const D=Yt(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;c(D),g.refs.setReference(D)},[g.refs]),[y,x]=C.useState(null),[v,S]=C.useState(null);o.useSyncedValue("referenceElement",y),o.useSyncedValue("domReferenceElement",Yt(y)?y:null),o.useSyncedValue("floatingElement",v);const E=C.useCallback(A=>{(Yt(A)||A===null)&&(f.current=A,x(A)),(Yt(g.refs.reference.current)||g.refs.reference.current===null||A!==null&&!Yt(A))&&g.refs.setReference(A)},[g.refs,x]),k=C.useCallback(A=>{S(A),g.refs.setFloating(A)},[g.refs]),T=C.useMemo(()=>({...g.refs,setReference:E,setFloating:k,setPositionReference:h,domReference:f}),[g.refs,E,k,h]),R=C.useMemo(()=>({...g.elements,domReference:a.domReference}),[g.elements,a.domReference]),L=o.useState("open"),j=o.useState("floatingId"),N=C.useMemo(()=>({...g,dataRef:o.context.dataRef,open:L,onOpenChange:o.setOpen,events:o.context.events,floatingId:j,refs:T,elements:R,nodeId:t,rootStore:o}),[g,T,R,t,o,L,j]);return qe(()=>{o.context.dataRef.current.floatingContext=N;const A=d?.nodesRef.current.find(D=>D.id===t);A&&(A.context=N)}),C.useMemo(()=>({...g,context:N,refs:T,elements:R,rootStore:o}),[g,T,R,N,o])}function nx(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,a=Us(),l=Go()!=null,c=t.useState("open"),f=t.useState("activeTriggerElement"),d=t.useState(r?"popupElement":"positionerElement"),g=t.context.triggerElements,h=Zn(()=>new Qy({open:c,referenceElement:f,floatingElement:d,triggerElements:g,onOpenChange:o,floatingId:a,nested:l,noEmit:n})).current;return qe(()=>{const y={open:c,floatingId:a,referenceElement:f,floatingElement:d};Yt(f)&&(y.domReferenceElement=f),h.state.positionReference===h.state.referenceElement&&(y.positionReference=f),h.update(y)},[c,a,f,d,h]),h.context.onOpenChange=o,h.context.nested=l,h.context.noEmit=n,h}const y2=_k&&Lk;function I6(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:a=!0,delay:l}=t,c=C.useRef(!1),f=C.useRef(null),d=jr(),g=C.useRef(!0);C.useEffect(()=>{const y=n.select("domReferenceElement");if(!a)return;const x=$n(y);function v(){const k=n.select("domReferenceElement");!n.select("open")&&Rn(k)&&k===ii(Gt(k))&&(c.current=!0)}function S(){g.current=!0}function E(){g.current=!1}return x.addEventListener("blur",v),y2&&(x.addEventListener("keydown",S,!0),x.addEventListener("pointerdown",E,!0)),()=>{x.removeEventListener("blur",v),y2&&(x.removeEventListener("keydown",S,!0),x.removeEventListener("pointerdown",E,!0))}},[n,a]),C.useEffect(()=>{if(!a)return;function y(x){if(x.reason===ic||x.reason===e0){const v=n.select("domReferenceElement");Yt(v)&&(f.current=v,c.current=!0)}}return r.on("openchange",y),()=>{r.off("openchange",y)}},[r,a,n]);const h=C.useMemo(()=>({onMouseLeave(){c.current=!1,f.current=null},onFocus(y){const x=y.currentTarget;if(c.current){if(f.current===x)return;c.current=!1,f.current=null}const v=Ar(y.nativeEvent);if(Yt(v)){if(y2&&!y.relatedTarget){if(!g.current&&!Zp(v))return}else if(!e_(v))return}const S=sp(y.relatedTarget,n.context.triggerElements),{nativeEvent:E,currentTarget:k}=y,T=typeof l=="function"?l():l;if(n.select("open")&&S||T===0||T===void 0){n.setOpen(!0,Et(Yl,E,k));return}d.start(T,()=>{c.current||n.setOpen(!0,Et(Yl,E,k))})},onBlur(y){c.current=!1,f.current=null;const x=y.relatedTarget,v=y.nativeEvent,S=Yt(x)&&x.hasAttribute(lf("focus-guard"))&&x.getAttribute("data-type")==="outside";d.start(0,()=>{const E=n.select("domReferenceElement"),k=ii(E?E.ownerDocument:document);!x&&k===E||ht(o.current.floatingContext?.refs.floating.current,k)||ht(E,k)||S||sp(x??k,n.context.triggerElements)||n.setOpen(!1,Et(Yl,v))})}}),[o,n,d,l]);return C.useMemo(()=>a?{reference:h,trigger:h}:{},[a,h])}const YI=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Pk}`;function WI(e){return e?!!e.closest(YI):!1}class rx{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new $i,this.restTimeout=new $i,this.handleCloseOptions=void 0}static create(){return new rx}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function ix(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function KI(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t;ix(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function z6(e){const t=Zn(rx.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Ly(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function P6(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:f=0}=t,d=z6(n),g=Ya(),h=Go(),y=st(()=>Jk(l.current.openEvent?.type,d.interactedInside)),x=st(()=>{const R=l.current.openEvent?.type;return R?.includes("mouse")&&R!=="mousedown"}),v=st(R=>sp(R,n.context.triggerElements)),S=C.useCallback(R=>{const L=$u(f,"close",d.pointerType),j=()=>{n.setOpen(!1,Et(Rr,R)),g?.events.emit("floating.closed",R)};L?d.openChangeTimeout.start(L,j):(d.openChangeTimeout.clear(),j())},[f,n,d,g]),E=st(()=>{ix(d)}),k=st(R=>{const L=Ar(R);if(!WI(L)){d.interactedInside=!1;return}d.interactedInside=L?.closest("[aria-haspopup]")!=null});qe(()=>{r||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,E())},[r,d,E]),C.useEffect(()=>E,[E]),qe(()=>{if(c&&r&&d.handleCloseOptions?.blockPointerEvents&&x()&&Yt(a)&&o){const R=a,L=o,j=Gt(o),N=g?.nodesRef.current.find(D=>D.id===h)?.context?.elements.floating;N&&(N.style.pointerEvents="");const A=d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??N??R.closest("[data-rootownerid]")??j.body;return KI(d,{scopeElement:A,referenceElement:R,floatingElement:L}),()=>{E()}}},[c,r,a,o,d,x,g,h,E]);const T=jr();C.useEffect(()=>{if(!c)return;function R(){d.openChangeTimeout.clear(),T.clear(),g?.events.off("floating.closed",j),E()}function L(A){if(g&&h&&Bo(g.nodesRef.current,h).length>0){g.events.on("floating.closed",j);return}if(!v(A.relatedTarget)){if(d.handler){d.handler(A);return}E(),y()||S(A)}}function j(A){!g||!h||Bo(g.nodesRef.current,h).length>0||T.start(0,()=>{g.events.off("floating.closed",j),n.setOpen(!1,Et(Rr,A)),g.events.emit("floating.closed",A)})}const N=o;return N&&(N.addEventListener("mouseenter",R),N.addEventListener("mouseleave",L),N.addEventListener("pointerdown",k,!0)),()=>{N&&(N.removeEventListener("mouseenter",R),N.removeEventListener("mouseleave",L),N.removeEventListener("pointerdown",k,!0)),g?.events.off("floating.closed",j)}},[c,o,n,l,y,v,S,E,k,d,g,h,T])}const QI={current:null};function ox(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:g=!0,triggerElementRef:h=QI,externalTree:y,isActiveTrigger:x=!0,getHandleCloseContext:v}=t,S=Ya(y),E=z6(n),k=Nr(c),T=Nr(l),R=Nr(d),L=Nr(a);x&&(E.handleCloseOptions=k.current?.__options);const j=st(()=>Jk(r.current.openEvent?.type,E.interactedInside)),N=st(q=>sp(q,n.context.triggerElements)),A=st((q,$,V)=>{const Y=n.context.triggerElements;if(Y.hasElement($))return!q||!ht(q,$);if(!Yt(V))return!1;const H=V;return Y.hasMatchingElement(B=>ht(B,H))&&(!q||!ht(q,H))}),D=C.useCallback((q,$=!0)=>{const V=$u(T.current,"close",E.pointerType);V?E.openChangeTimeout.start(V,()=>{n.setOpen(!1,Et(Rr,q)),S?.events.emit("floating.closed",q)}):$&&(E.openChangeTimeout.clear(),n.setOpen(!1,Et(Rr,q)),S?.events.emit("floating.closed",q))},[T,n,E,S]),U=st(()=>{if(!E.handler)return;Gt(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0});C.useEffect(()=>U,[U]);const I=st(()=>{ix(E)});return C.useEffect(()=>{if(!a)return;function q($){$.open||(U(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return o.on("openchange",q),()=>{o.off("openchange",q)}},[a,o,E,U]),C.useEffect(()=>{if(!a)return;const q=h.current??(x?n.select("domReferenceElement"):null);if(!Yt(q))return;function $(Y){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,f&&!tc(E.pointerType)||fS(R.current)>0&&!$u(T.current,"open"))return;const B=$u(T.current,"open",E.pointerType),F=Y.currentTarget??null,G=n.select("domReferenceElement"),ie=F==null?!1:A(G,F,Y.target),M=n.select("open"),P=!M||ie;ie&&M?n.setOpen(!0,Et(Rr,Y,F)):B?E.openChangeTimeout.start(B,()=>{P&&n.setOpen(!0,Et(Rr,Y,F))}):P&&n.setOpen(!0,Et(Rr,Y,F))}function V(Y){if(j()){I();return}U();const H=n.select("domReferenceElement"),B=Gt(H);E.restTimeout.clear(),E.restTimeoutPending=!1;const F=r.current.floatingContext??v?.();if(N(Y.relatedTarget))return;if(k.current&&F){n.select("open")||E.openChangeTimeout.clear();const M=h.current;E.handler=k.current({...F,tree:S,x:Y.clientX,y:Y.clientY,onClose(){I(),U(),L.current&&!j()&&M===n.select("domReferenceElement")&&D(Y,!0)}}),B.addEventListener("mousemove",E.handler),E.handler(Y);return}(E.pointerType!=="touch"||!ht(n.select("floatingElement"),Y.relatedTarget))&&D(Y)}return g&&q.addEventListener("mousemove",$,{once:!0}),q.addEventListener("mouseenter",$),q.addEventListener("mouseleave",V),()=>{g&&q.removeEventListener("mousemove",$),q.removeEventListener("mouseenter",$),q.removeEventListener("mouseleave",V)}},[U,I,r,T,D,n,a,k,E,x,A,j,N,f,g,R,h,S,L,v]),C.useMemo(()=>{if(!a)return;function q($){E.pointerType=$.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove($){const{nativeEvent:V}=$,Y=$.currentTarget,H=n.select("domReferenceElement"),B=n.select("open"),F=A(H,Y,$.target);if(f&&!tc(E.pointerType))return;const G=fS(R.current);if(B&&!F||G===0||!F&&E.restTimeoutPending&&$.movementX**2+$.movementY**2<2)return;E.restTimeout.clear();function ie(){if(E.restTimeoutPending=!1,j())return;const M=n.select("open");!E.blockMouseMove&&(!M||F)&&n.setOpen(!0,Et(Rr,V,Y))}E.pointerType==="touch"?Mi.flushSync(()=>{ie()}):F&&B?ie():(E.restTimeoutPending=!0,E.restTimeout.start(G,ie))}}},[a,E,j,A,f,n,R])}function Lf(e=[]){const t=e.map(d=>d?.reference),n=e.map(d=>d?.floating),r=e.map(d=>d?.item),o=e.map(d=>d?.trigger),a=C.useCallback(d=>gh(d,e,"reference"),t),l=C.useCallback(d=>gh(d,e,"floating"),n),c=C.useCallback(d=>gh(d,e,"item"),r),f=C.useCallback(d=>gh(d,e,"trigger"),o);return C.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:f}),[a,l,c,f])}function gh(e,t,n){const r=new Map,o=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[m1]="");for(const l in e)o&&e&&(l===Ik||l===zk)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const f=t[l]?.[n];typeof f=="function"?c=e?f(e):null:c=f,c&&zS(a,c,o,r)}return zS(a,e,o,r),a}function zS(e,t,n,r){for(const o in t){const a=t[o];n&&(o===Ik||o===zk)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&(r.get(o)?.push(a),e[o]=(...l)=>r.get(o)?.map(c=>c(...l)).find(c=>c!==void 0))):e[o]=a)}}const XI="Escape";function r0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function yh(e,t){return r0(t,e===Iy||e===Of,e===Da||e===Ia)}function x2(e,t,n){return r0(t,e===Of,n?e===Da:e===Ia)||e==="Enter"||e===" "||e===""}function ZI(e,t,n){return r0(t,n?e===Da:e===Ia,e===Of)}function JI(e,t,n,r){const o=n?e===Ia:e===Da,a=e===Iy;return t==="both"||t==="horizontal"&&r&&r>1?e===XI:r0(t,o,a)}function ez(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:f,onNavigate:d=()=>{},enabled:g=!0,selectedIndex:h=null,allowEscape:y=!1,loopFocus:x=!1,nested:v=!1,rtl:S=!1,virtual:E=!1,focusItemOnOpen:k="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:R=!0,disabledIndices:L=void 0,orientation:j="vertical",parentOrientation:N,cols:A=1,id:D,resetOnPointerLeave:U=!0,externalTree:I}=t,q=lp(o),$=Nr(q),V=Go(),Y=Ya(I);qe(()=>{l.current.orientation=j},[l,j]);const H=g1(a),B=C.useRef(k),F=C.useRef(h??-1),G=C.useRef(null),ie=C.useRef(!0),M=st(he=>{d(F.current===-1?null:F.current,he)}),P=C.useRef(M),Q=C.useRef(!!o),_=C.useRef(r),ee=C.useRef(!1),J=C.useRef(!1),re=Nr(L),pe=Nr(r),fe=Nr(h),Ce=Nr(U),Ee=st(()=>{function he(ze){E?Y?.events.emit("virtualfocus",ze):Gu(ze,{sync:ee.current,preventScroll:!0})}const Se=c.current[F.current],ne=J.current;Se&&he(Se),(ee.current?ze=>ze():requestAnimationFrame)(()=>{const ze=c.current[F.current]||Se;if(!ze)return;Se||he(ze),Ye&&(ne||!ie.current)&&ze.scrollIntoView?.({block:"nearest",inline:"nearest"})})});qe(()=>{g&&(r&&o?(F.current=h??-1,B.current&&h!=null&&(J.current=!0,M())):Q.current&&(F.current=-1,P.current()))},[g,r,o,h,M]),qe(()=>{if(g){if(!r){ee.current=!1;return}if(o)if(f==null){if(ee.current=!1,fe.current!=null)return;if(Q.current&&(F.current=-1,Ee()),(!_.current||!Q.current)&&B.current&&(G.current!=null||B.current===!0&&G.current==null)){let he=0;const Se=()=>{c.current[0]==null?(he<2&&(he?requestAnimationFrame:queueMicrotask)(Se),he+=1):(F.current=G.current==null||x2(G.current,j,S)||v?o2(c):lS(c),G.current=null,M())};Se()}}else dp(c,f)||(F.current=f,Ee(),J.current=!1)}},[g,r,o,f,fe,v,c,j,S,M,Ee,re]),qe(()=>{if(!g||o||!Y||E||!Q.current)return;const he=Y.nodesRef.current,Se=he.find(ze=>ze.id===V)?.context?.elements.floating,ne=ii(Gt(o)),xe=he.some(ze=>ze.context&&ht(ze.context.elements.floating,ne));Se&&!xe&&ie.current&&Se.focus({preventScroll:!0})},[g,o,Y,V,E]),qe(()=>{P.current=M,_.current=r,Q.current=!!o}),qe(()=>{r||(G.current=null,B.current=k)},[r,k]);const Ie=f!=null,Ye=C.useMemo(()=>{function he(ne){if(!pe.current)return;const xe=c.current.indexOf(ne.currentTarget);xe!==-1&&F.current!==xe&&(F.current=xe,M(ne))}return{onFocus(ne){ee.current=!0,he(ne)},onClick:({currentTarget:ne})=>ne.focus({preventScroll:!0}),onMouseMove(ne){ee.current=!0,J.current=!1,T&&he(ne)},onPointerLeave(ne){if(!pe.current||!ie.current||ne.pointerType==="touch")return;ee.current=!0;const xe=ne.relatedTarget;if(!(!T||c.current.includes(xe))&&Ce.current&&(Gu(null,{sync:!0}),F.current=-1,M(ne),!E)){const ze=$.current,Ue=ii(Gt(ze));ze&&ht(ze,Ue)&&ze.focus({preventScroll:!0})}}}},[pe,$,T,c,M,Ce,E]),je=C.useCallback(()=>N??Y?.nodesRef.current.find(he=>he.id===V)?.context?.dataRef?.current.orientation,[V,Y,N]),_e=st(he=>{if(ie.current=!1,ee.current=!0,he.which===229||!pe.current&&he.currentTarget===$.current)return;if(v&&JI(he.key,j,S,A)){yh(he.key,je())||ni(he),n.setOpen(!1,Et(qh,he.nativeEvent)),Rn(a)&&(E?Y?.events.emit("virtualfocus",a):a.focus());return}const Se=F.current,ne=o2(c,L),xe=lS(c,L);if(H||(he.key==="Home"&&(ni(he),F.current=ne,M(he)),he.key==="End"&&(ni(he),F.current=xe,M(he))),A>1){const ze=Array.from({length:c.current.length},()=>({width:1,height:1})),Ue=d_(ze,A),wt=Ue.findIndex(Oe=>Oe!=null&&!$l(c,Oe,L)),ae=Ue.reduce((Oe,Me,He)=>Me!=null&&!$l(c,Me,L)?He:Oe,-1),ve=Ue[f_({current:Ue.map(Oe=>Oe!=null?c.current[Oe]:null)},{event:he,orientation:j,loopFocus:x,rtl:S,cols:A,disabledIndices:p_([...(typeof L!="function"?L:null)||c.current.map((Oe,Me)=>$l(c,Me,L)?Me:void 0),void 0],Ue),minIndex:wt,maxIndex:ae,prevIndex:h_(F.current>xe?ne:F.current,ze,Ue,A,he.key===Of?"bl":he.key===(S?Da:Ia)?"tr":"tl"),stopEvent:!0})];if(ve!=null&&(F.current=ve,M(he)),j==="both")return}if(yh(he.key,j)){if(ni(he),r&&!E&&ii(he.currentTarget.ownerDocument)===he.currentTarget){F.current=x2(he.key,j,S)?ne:xe,M(he);return}x2(he.key,j,S)?x?Se>=xe?y&&Se!==c.current.length?F.current=-1:(ee.current=!1,F.current=ne):F.current=Er(c,{startingIndex:Se,disabledIndices:L}):F.current=Math.min(xe,Er(c,{startingIndex:Se,disabledIndices:L})):x?Se<=ne?y&&Se!==-1?F.current=c.current.length:(ee.current=!1,F.current=xe):F.current=Er(c,{startingIndex:Se,decrement:!0,disabledIndices:L}):F.current=Math.max(ne,Er(c,{startingIndex:Se,decrement:!0,disabledIndices:L})),dp(c,F.current)&&(F.current=-1),M(he)}}),ye=C.useMemo(()=>E&&r&&Ie&&{"aria-activedescendant":`${D}-${f}`},[E,r,Ie,D,f]),We=C.useMemo(()=>({"aria-orientation":j==="both"?void 0:j,...H?{}:ye,onKeyDown(he){if(he.key==="Tab"&&he.shiftKey&&r&&!E){const Se=Ar(he.nativeEvent);if(Se&&!ht($.current,Se))return;ni(he),n.setOpen(!1,Et(oc,he.nativeEvent)),Rn(a)&&a.focus();return}_e(he)},onPointerMove(){ie.current=!0}}),[ye,_e,$,j,H,n,r,E,a]),Te=C.useMemo(()=>{function he(ne){k==="auto"&&Fk(ne.nativeEvent)&&(B.current=!E)}function Se(ne){B.current=k,k==="auto"&&Bk(ne.nativeEvent)&&(B.current=!0)}return{onKeyDown(ne){const xe=n.select("open");ie.current=!1;const ze=ne.key.startsWith("Arrow"),Ue=ZI(ne.key,je(),S),wt=yh(ne.key,j),ae=(v?Ue:wt)||ne.key==="Enter"||ne.key.trim()==="";if(E&&xe)return _e(ne);if(!(!xe&&!R&&ze)){if(ae){const ve=yh(ne.key,je());G.current=v&&ve?null:ne.key}if(v){Ue&&(ni(ne),xe?(F.current=o2(c,re.current),M(ne)):n.setOpen(!0,Et(qh,ne.nativeEvent,ne.currentTarget)));return}wt&&(fe.current!=null&&(F.current=fe.current),ni(ne),!xe&&R?n.setOpen(!0,Et(qh,ne.nativeEvent,ne.currentTarget)):_e(ne),xe&&M(ne))}},onFocus(ne){n.select("open")&&!E&&(F.current=-1,M(ne))},onPointerDown:Se,onPointerEnter:Se,onMouseDown:he,onClick:he}},[_e,re,k,c,v,M,n,R,j,je,S,fe,E]),Re=C.useMemo(()=>({...ye,...Te}),[ye,Te]);return C.useMemo(()=>g?{reference:Re,floating:We,item:Ye,trigger:Te}:{},[g,Re,We,Te,Ye])}const tz=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function F6(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),a=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{role:c="dialog"}=t,f=Us(),d=a?.id||f,g=C.useMemo(()=>lp(l)?.id||o,[l,o]),h=tz.get(c)??c,x=Go()!=null,v=C.useMemo(()=>h==="tooltip"||c==="label"?Ln:{"aria-haspopup":h==="alertdialog"?"dialog":h,"aria-expanded":"false",...h==="listbox"&&{role:"combobox"},...h==="menu"&&x&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[h,x,c]),S=C.useMemo(()=>h==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...v,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...h==="menu"&&{id:d}},[h,g,r,d,c,v]),E=C.useMemo(()=>{const T={id:g,...h&&{role:h}};return h==="tooltip"||c==="label"?T:{...T,...h==="menu"&&{"aria-labelledby":d}}},[h,g,d,c]),k=C.useCallback(({active:T,selected:R})=>{const L={role:"option",...T&&{id:`${g}-fui-option`}};switch(c){case"select":case"combobox":return{...L,"aria-selected":R}}return{}},[g,c]);return C.useMemo(()=>({reference:S,floating:E,item:k,trigger:v}),[S,E,v,k])}function nz(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:a,elementsRef:l,activeIndex:c,onMatch:f,onTypingChange:d,enabled:g=!0,resetMs:h=750,selectedIndex:y=null}=t,x=jr(),v=C.useRef(""),S=C.useRef(y??c??-1),E=C.useRef(null);qe(()=>{!o&&y!==null||(x.clear(),E.current=null,v.current!==""&&(v.current=""))},[o,y,x]),qe(()=>{o&&v.current===""&&(S.current=y??c??-1)},[o,y,c]);const k=st(N=>{N?r.current.typing||(r.current.typing=N,d?.(N)):r.current.typing&&(r.current.typing=N,d?.(N))}),T=st(N=>{function A(H){const B=l?.current[H];return!B||By(B)}function D(H,B,F=0){if(H.length===0)return-1;const G=(F%H.length+H.length)%H.length,ie=B.toLocaleLowerCase();for(let M=0;M<H.length;M+=1){const P=(G+M)%H.length;if(!(!H[P]?.toLocaleLowerCase().startsWith(ie)||!A(P)))return P}return-1}const U=a.current;if(v.current.length>0&&N.key===" "&&(ni(N),k(!0)),v.current.length>0&&v.current[0]!==" "&&D(U,v.current)===-1&&N.key!==" "&&k(!1),U==null||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;o&&N.key!==" "&&(ni(N),k(!0));const I=v.current==="";I&&(S.current=y??c??-1),U.every(H=>H?H[0]?.toLocaleLowerCase()!==H[1]?.toLocaleLowerCase():!0)&&v.current===N.key&&(v.current="",S.current=E.current),v.current+=N.key,x.start(h,()=>{v.current="",S.current=E.current,k(!1)});const V=((I?y??c??-1:S.current)??0)+1,Y=D(U,v.current,V);Y!==-1?(f?.(Y),E.current=Y):N.key!==" "&&(v.current="",k(!1))}),R=st(N=>{const A=N.relatedTarget,D=n.select("domReferenceElement"),U=n.select("floatingElement"),I=ht(D,A),q=ht(U,A);I||q||(x.clear(),v.current="",S.current=E.current,k(!1))}),L=C.useMemo(()=>({onKeyDown:T,onBlur:R}),[T,R]),j=C.useMemo(()=>({onKeyDown:T,onBlur:R}),[T,R]);return C.useMemo(()=>g?{reference:L,floating:j}:{},[g,L,j])}const PS=.1,rz=PS*PS,rn=.5;function xh(e,t,n,r,o,a){return r>=t!=a>=t&&e<=(o-n)*(t-r)/(a-r)+n}function bh(e,t,n,r,o,a,l,c,f,d){let g=!1;return xh(e,t,n,r,o,a)&&(g=!g),xh(e,t,o,a,l,c)&&(g=!g),xh(e,t,l,c,f,d)&&(g=!g),xh(e,t,f,d,n,r)&&(g=!g),g}function iz(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function vh(e,t,n,r,o,a){const l=Math.min(n,o),c=Math.max(n,o),f=Math.min(r,a),d=Math.max(r,a);return e>=l&&e<=c&&t>=f&&t<=d}function ax(e={}){const{blockPointerEvents:t=!1}=e,n=new $i,r=({x:o,y:a,placement:l,elements:c,onClose:f,nodeId:d,tree:g})=>{const h=l?.split("-")[0];let y=!1,x=null,v=null,S=typeof performance<"u"?performance.now():0;function E(T,R){const L=performance.now(),j=L-S;if(x===null||v===null||j===0)return x=T,v=R,S=L,!1;const N=T-x,A=R-v,D=N*N+A*A,U=j*j*rz;return x=T,v=R,S=L,D<U}function k(){n.clear(),f()}return function(R){n.clear();const L=c.domReference,j=c.floating;if(!L||!j||h==null||o==null||a==null)return;const{clientX:N,clientY:A}=R,D=Ar(R),U=R.type==="mouseleave",I=ht(j,D),q=ht(L,D);if(I&&(y=!0,!U))return;if(q&&(y=!1,!U)){y=!0;return}if(U&&Yt(R.relatedTarget)&&ht(j,R.relatedTarget))return;function $(){return!!(g&&Bo(g.nodesRef.current,d).length>0)}function V(){$()||k()}if($())return;const Y=L.getBoundingClientRect(),H=j.getBoundingClientRect(),B=o>H.right-H.width/2,F=a>H.bottom-H.height/2,G=H.width>Y.width,ie=H.height>Y.height,M=(G?Y:H).left,P=(G?Y:H).right,Q=(ie?Y:H).top,_=(ie?Y:H).bottom;if(h==="top"&&a>=Y.bottom-1||h==="bottom"&&a<=Y.top+1||h==="left"&&o>=Y.right-1||h==="right"&&o<=Y.left+1){V();return}let ee=!1;switch(h){case"top":ee=vh(N,A,M,Y.top+1,P,H.bottom-1);break;case"bottom":ee=vh(N,A,M,H.top+1,P,Y.bottom-1);break;case"left":ee=vh(N,A,H.right-1,_,Y.left+1,Q);break;case"right":ee=vh(N,A,Y.right-1,_,H.left+1,Q);break}if(ee)return;if(y&&!iz(N,A,Y)){V();return}if(!U&&E(N,A)){V();return}let J=!1;switch(h){case"top":{const re=G?rn/2:rn*4,pe=G||B?o+re:o-re,fe=G?o-re:B?o+re:o-re,Ce=a+rn+1,Ee=B||G?H.bottom-rn:H.top,Ie=B?G?H.bottom-rn:H.top:H.bottom-rn;J=bh(N,A,pe,Ce,fe,Ce,H.left,Ee,H.right,Ie);break}case"bottom":{const re=G?rn/2:rn*4,pe=G||B?o+re:o-re,fe=G?o-re:B?o+re:o-re,Ce=a-rn,Ee=B||G?H.top+rn:H.bottom,Ie=B?G?H.top+rn:H.bottom:H.top+rn;J=bh(N,A,pe,Ce,fe,Ce,H.left,Ee,H.right,Ie);break}case"left":{const re=ie?rn/2:rn*4,pe=ie||F?a+re:a-re,fe=ie?a-re:F?a+re:a-re,Ce=o+rn+1,Ee=F||ie?H.right-rn:H.left,Ie=F?ie?H.right-rn:H.left:H.right-rn;J=bh(N,A,Ee,H.top,Ie,H.bottom,Ce,pe,Ce,fe);break}case"right":{const re=ie?rn/2:rn*4,pe=ie||F?a+re:a-re,fe=ie?a-re:F?a+re:a-re,Ce=o-rn,Ee=F||ie?H.left+rn:H.right,Ie=F?ie?H.left+rn:H.right:H.left+rn;J=bh(N,A,Ce,pe,Ce,fe,Ee,H.top,Ie,H.bottom);break}}J?y||n.start(40,V):V()}};return r.__options={blockPointerEvents:t},r}const oz={...tx,disabled:rt(e=>e.disabled),instantType:rt(e=>e.instantType),isInstantPhase:rt(e=>e.isInstantPhase),trackCursorAxis:rt(e=>e.trackCursorAxis),disableHoverablePopup:rt(e=>e.disableHoverablePopup),lastOpenChangeReason:rt(e=>e.openChangeReason),closeOnClick:rt(e=>e.closeOnClick),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport)};class sx extends n0{constructor(t){super({...az(),...t},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Mf},oz)}setOpen=(t,n)=>{const r=n.reason,o=r===Rr,a=t&&r===Yl,l=!t&&(r===ic||r===e0);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const c=()=>{const f={open:t,openChangeReason:r};a?f.instantType="focus":l?f.instantType="dismiss":r===Rr&&(f.instantType=void 0);const d=n.trigger?.id??null;(d||t)&&(f.activeTriggerId=d,f.activeTriggerElement=n.trigger??null),this.update(f)};o?Mi.flushSync(c):c()};static useStore(t,n){const r=Zn(()=>new sx(n)).current,o=t??r,a=nx({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}}function az(){return{...ex(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const sz=jy(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:o,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:f,onOpenChangeComplete:d,handle:g,triggerId:h,defaultTriggerId:y=null,children:x}=t,v=sx.useStore(g?.store,{open:r,openProp:o,activeTriggerId:y,triggerIdProp:h});My(()=>{o===void 0&&v.state.open===!1&&r===!0&&v.update({open:!0,activeTriggerId:y})}),v.useControlledProp("openProp",o),v.useControlledProp("triggerIdProp",h),v.useContextCallback("onOpenChange",f),v.useContextCallback("onOpenChangeComplete",d);const S=v.useState("open"),E=!n&&S,k=v.useState("activeTriggerId"),T=v.useState("payload");v.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),qe(()=>{S&&n&&v.setOpen(!1,Et(U_))},[S,n,v]),v.useSyncedValue("disabled",n),Zy(v);const{forceUnmount:R,transitionStatus:L}=Jy(E,v),j=v.useState("isInstantPhase"),N=v.useState("instantType"),A=v.useState("lastOpenChangeReason"),D=C.useRef(null);qe(()=>{L==="ending"&&A===Jp||L!=="ending"&&j?(N!=="delay"&&(D.current=N),v.set("instantType","delay")):D.current!==null&&(v.set("instantType",D.current),D.current=null)},[L,j,A,N,v]),qe(()=>{E&&k==null&&v.set("payload",void 0)},[v,k,E]);const U=C.useCallback(()=>{v.setOpen(!1,lz(v,qy))},[v]);C.useImperativeHandle(c,()=>({unmount:R,close:U}),[R,U]);const I=v.useState("floatingRootContext"),q=Wy(I,{enabled:!n,referencePress:()=>v.select("closeOnClick")}),$=kD(I,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:V,getFloatingProps:Y,getTriggerProps:H}=Lf([q,$]),B=C.useMemo(()=>V(),[V]),F=C.useMemo(()=>H(),[H]),G=C.useMemo(()=>Y(),[Y]);return v.useSyncedValues({activeTriggerProps:B,inactiveTriggerProps:F,popupProps:G}),p.jsx(Ak.Provider,{value:v,children:typeof x=="function"?x({payload:T}):x})});function lz(e,t){const n=Et(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let Rs=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=cf.startingStyle]="startingStyle",e[e.endingStyle=cf.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),bp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const cz={[bp.popupOpen]:""},uz={[bp.popupOpen]:"",[bp.pressed]:""},fz={[Rs.open]:""},dz={[Rs.closed]:""},hz={[Rs.anchorHidden]:""},B6={open(e){return e?cz:null}},FS={open(e){return e?uz:null}},qs={open(e){return e?fz:dz},anchorHidden(e){return e?hz:null}};function Gi(e){return Us(e,"base-ui")}const H6=C.createContext(void 0);function pz(){return C.useContext(H6)}let mz=(function(e){return e[e.popupOpen=bp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const gz=600,yz=Tk(function(t,n){const{className:r,render:o,handle:a,payload:l,disabled:c,delay:f,closeOnClick:d=!0,closeDelay:g,id:h,...y}=t,x=Nf(!0),v=a?.store??x;if(!v)throw new Error(Gn(82));const S=Gi(h),E=v.useState("isTriggerActive",S),k=v.useState("isOpenedByTrigger",S),T=v.useState("floatingRootContext"),R=C.useRef(null),L=f??gz,j=g??0,{registerTrigger:N,isMountedByThisTrigger:A}=D6(S,R,v,{payload:l,closeOnClick:d,closeDelay:j}),D=pz(),{delayRef:U,isInstantPhase:I,hasProvider:q}=V_(T,{open:k});v.useSyncedValue("isInstantPhase",I);const $=v.useState("disabled"),V=c??$,Y=v.useState("trackCursorAxis"),H=v.useState("disableHoverablePopup"),B=ox(T,{enabled:!V,mouseOnly:!0,move:!1,handleClose:!H&&Y!=="both"?ax():null,restMs(){const P=D?.delay,Q=typeof U.current=="object"?U.current.open:void 0;let _=L;return q&&(Q!==0?_=f??P??L:_=0),_},delay(){const P=typeof U.current=="object"?U.current.close:void 0;let Q=j;return g==null&&q&&(Q=P),{close:Q}},triggerElementRef:R,isActiveTrigger:E}),F=I6(T,{enabled:!V}).reference,G={open:k},ie=v.useState("triggerProps",A);return ln("button",t,{state:G,ref:[n,N,R],props:[B,F,ie,{onPointerDown(){v.set("closeOnClick",d)},id:S,[mz.triggerDisabled]:V?"":void 0},y],stateAttributesMapping:B6})}),U6=C.createContext(void 0);function xz(){const e=C.useContext(U6);if(e===void 0)throw new Error(Gn(70));return e}const bz=C.forwardRef(function(t,n){const{children:r,container:o,className:a,render:l,...c}=t,{portalNode:f,portalSubtree:d}=d6({container:o,ref:n,componentProps:t,elementProps:c});return!d&&!f?null:p.jsxs(C.Fragment,{children:[d,f&&Mi.createPortal(r,f)]})}),vz=C.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return Nf().useState("mounted")||r?p.jsx(U6.Provider,{value:r,children:p.jsx(bz,{ref:n,...o})}):null}),q6=C.createContext(void 0);function V6(){const e=C.useContext(q6);if(e===void 0)throw new Error(Gn(71));return e}const wz=C.createContext(void 0);function $6(){return C.useContext(wz)?.direction??"ltr"}const Sz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:g=0,offsetParent:h="real"}=Uo(e,t)||{};if(d==null)return{};const y=Uk(g),x={x:n,y:r},v=Fy(o),S=Py(v),E=await l.getDimensions(d),k=v==="y",T=k?"top":"left",R=k?"bottom":"right",L=k?"clientHeight":"clientWidth",j=a.reference[S]+a.reference[v]-x[v]-a.floating[S],N=x[v]-a.reference[v],A=h==="real"?await l.getOffsetParent?.(d):c.floating;let D=c.floating[L]||a.floating[S];(!D||!await l.isElement?.(A))&&(D=c.floating[L]||a.floating[S]);const U=j/2-N/2,I=D/2-E[S]/2-1,q=Math.min(y[T],I),$=Math.min(y[R],I),V=q,Y=D-E[S]-$,H=D/2-E[S]/2+U,B=y1(V,H,Y),F=!f.arrow&&Ga(o)!=null&&H!==B&&a.reference[S]/2-(H<V?q:$)-E[S]/2<0,G=F?H<V?H-V:H-Y:0;return{[v]:x[v]+G,data:{[v]:B,centerOffset:H-B-G,...F&&{alignmentOffset:G}},reset:F}}}),Cz=(e,t)=>({...Sz(e),options:[e,t]}),Ez={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,a=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await mI().fn(e)).data?.referenceHidden||a}}}},Gh={sideX:"left",sideY:"top"},G6={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:a,strategy:l,placement:c}=e,f=$n(o),d=f.getComputedStyle(o);if(!(d.transitionDuration!=="0s"&&d.transitionDuration!==""))return{x:t,y:n,data:Gh};const h=await a.getOffsetParent?.(o);let y={width:0,height:0};if(l==="fixed"&&f?.visualViewport)y={width:f.visualViewport.width,height:f.visualViewport.height};else if(h===f){const T=Gt(o);y={width:T.documentElement.clientWidth,height:T.documentElement.clientHeight}}else await a.isElement?.(h)&&(y=await a.getDimensions(h));const x=qr(c);let v=t,S=n;x==="left"&&(v=y.width-(t+r.width)),x==="top"&&(S=y.height-(n+r.height));const E=x==="left"?"right":Gh.sideX,k=x==="top"?"bottom":Gh.sideY;return{x:v,y:S,data:{sideX:E,sideY:k}}}};function Y6(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function BS(e,t,n){const{rects:r,placement:o}=e;return{side:Y6(t,qr(o),n),align:Ga(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function W6(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:f=5,sticky:d=!1,arrowPadding:g=5,disableAnchorTracking:h=!1,keepMounted:y=!1,floatingRootContext:x,mounted:v,collisionAvoidance:S,shiftCrossAxis:E=!1,nodeId:k,adaptiveOrigin:T,lazyFlip:R=!1,externalTree:L}=e,[j,N]=C.useState(null);!v&&j!==null&&N(null);const A=S.side||"flip",D=S.align||"flip",U=S.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,q=st(I),$=I?q:t,V=Nr(t),H=$6()==="rtl",B=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[r],F=a==="center"?B:`${B}-${a}`;let G=f;const ie=1,M=r==="bottom"?ie:0,P=r==="top"?ie:0,Q=r==="right"?ie:0,_=r==="left"?ie:0;typeof G=="number"?G={top:G+M,right:G+_,bottom:G+P,left:G+Q}:G&&(G={top:(G.top||0)+M,right:(G.right||0)+_,bottom:(G.bottom||0)+P,left:(G.left||0)+Q});const ee={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:G},J=C.useRef(null),re=Nr(o),pe=Nr(l),Ee=[uI(Qe=>{const yt=BS(Qe,r,H),Pt=typeof re.current=="function"?re.current(yt):re.current,Wt=typeof pe.current=="function"?pe.current(yt):pe.current;return{mainAxis:Pt,crossAxis:Wt,alignmentAxis:Wt}},[typeof o!="function"?o:0,typeof l!="function"?l:0,H,r])],Ie=D==="none"&&A!=="shift",Ye=!Ie&&(d||E||A==="shift"),je=A==="none"?null:hI({...ee,padding:{top:G.top+ie,right:G.right+ie,bottom:G.bottom+ie,left:G.left+ie},mainAxis:!E&&A==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),_e=Ie?null:fI(Qe=>{const yt=Gt(Qe.elements.floating).documentElement;return{...ee,rootBoundary:E?{x:0,y:0,width:yt.clientWidth,height:yt.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:Ye,limiter:d||E?void 0:dI(Pt=>{if(!J.current)return{};const{width:Wt,height:yn}=J.current.getBoundingClientRect(),fn=Ni(qr(Pt.placement)),Dn=fn==="y"?Wt:yn,nt=fn==="y"?G.left+G.right:G.top+G.bottom;return{offset:Dn/2+nt/2}})}},[ee,d,E,G,D]);A==="shift"||D==="shift"||a==="center"?Ee.push(_e,je):Ee.push(je,_e),Ee.push(pI({...ee,apply({elements:{floating:Qe},availableWidth:yt,availableHeight:Pt,rects:Wt}){const yn=Qe.style;yn.setProperty("--available-width",`${yt}px`),yn.setProperty("--available-height",`${Pt}px`);const fn=window.devicePixelRatio||1,{x:Dn,y:nt,width:Ut,height:dn}=Wt.reference,hn=(Math.round((Dn+Ut)*fn)-Math.round(Dn*fn))/fn,or=(Math.round((nt+dn)*fn)-Math.round(nt*fn))/fn;yn.setProperty("--anchor-width",`${hn}px`),yn.setProperty("--anchor-height",`${or}px`)}}),Cz(()=>({element:J.current||document.createElement("div"),padding:g,offsetParent:"floating"}),[g]),{name:"transformOrigin",fn(Qe){const{elements:yt,middlewareData:Pt,placement:Wt,rects:yn,y:fn}=Qe,Dn=qr(Wt),nt=Ni(Dn),Ut=J.current,dn=Pt.arrow?.x||0,hn=Pt.arrow?.y||0,or=Ut?.clientWidth||0,Jt=Ut?.clientHeight||0,In=dn+or/2,pi=hn+Jt/2,W=Math.abs(Pt.shift?.y||0),Z=yn.reference.height/2,le=typeof o=="function"?o(BS(Qe,r,H)):o,be=W>le,Ne={top:`${In}px calc(100% + ${le}px)`,bottom:`${In}px ${-le}px`,left:`calc(100% + ${le}px) ${pi}px`,right:`${-le}px ${pi}px`}[Dn],Ze=`${In}px ${yn.reference.y+Z-fn}px`;return yt.floating.style.setProperty("--transform-origin",Ye&&nt==="y"&&be?Ze:Ne),{}}},Ez,T),qe(()=>{!v&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,x]);const ye=C.useMemo(()=>({elementResize:!h&&typeof ResizeObserver<"u",layoutShift:!h&&typeof IntersectionObserver<"u"}),[h]),{refs:We,elements:Te,x:Re,y:he,middlewareData:Se,update:ne,placement:xe,context:ze,isPositioned:Ue,floatingStyles:wt}=GI({rootContext:x,placement:F,middleware:Ee,strategy:n,whileElementsMounted:y?void 0:(...Qe)=>NS(...Qe,ye),nodeId:k,externalTree:L}),{sideX:ae,sideY:ve}=Se.adaptiveOrigin||Gh,Oe=Ue?n:"fixed",Me=C.useMemo(()=>{const Qe=T?{position:Oe,[ae]:Re,[ve]:he}:{position:Oe,...wt};return Ue||(Qe.opacity=0),Qe},[T,Oe,ae,Re,ve,he,wt,Ue]),He=C.useRef(null);qe(()=>{if(!v)return;const Qe=V.current,yt=typeof Qe=="function"?Qe():Qe,Wt=(HS(yt)?yt.current:yt)||null||null;Wt!==He.current&&(We.setPositionReference(Wt),He.current=Wt)},[v,We,$,V]),C.useEffect(()=>{if(!v)return;const Qe=V.current;typeof Qe!="function"&&HS(Qe)&&Qe.current!==He.current&&(We.setPositionReference(Qe.current),He.current=Qe.current)},[v,We,$,V]),C.useEffect(()=>{if(y&&v&&Te.domReference&&Te.floating)return NS(Te.domReference,Te.floating,ne,ye)},[y,v,Te,ne,ye]);const kt=qr(xe),Ft=Y6(r,kt,H),Xe=Ga(xe)||"center",Ve=!!Se.hide?.referenceHidden;qe(()=>{R&&v&&Ue&&N(kt)},[R,v,Ue,kt]);const pt=C.useMemo(()=>({position:"absolute",top:Se.arrow?.y,left:Se.arrow?.x}),[Se.arrow]),mt=Se.arrow?.centerOffset!==0;return C.useMemo(()=>({positionerStyles:Me,arrowStyles:pt,arrowRef:J,arrowUncentered:mt,side:Ft,align:Xe,physicalSide:kt,anchorHidden:Ve,refs:We,context:ze,isPositioned:Ue,update:ne}),[Me,pt,J,mt,Ft,Xe,kt,Ve,We,ze,Ue,ne])}function HS(e){return e!=null&&"current"in e}function i0(e){return e==="starting"?I_:Ln}const kz=C.forwardRef(function(t,n){const{render:r,className:o,anchor:a,positionMethod:l="absolute",side:c="top",align:f="center",sideOffset:d=0,alignOffset:g=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:v=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=e6,...k}=t,T=Nf(),R=xz(),L=T.useState("open"),j=T.useState("mounted"),N=T.useState("trackCursorAxis"),A=T.useState("disableHoverablePopup"),D=T.useState("floatingRootContext"),U=T.useState("instantType"),I=T.useState("transitionStatus"),q=T.useState("hasViewport"),$=W6({anchor:a,positionMethod:l,floatingRootContext:D,mounted:j,side:c,sideOffset:d,align:f,alignOffset:g,collisionBoundary:h,collisionPadding:y,sticky:v,arrowPadding:x,disableAnchorTracking:S,keepMounted:R,collisionAvoidance:E,adaptiveOrigin:q?G6:void 0}),V=C.useMemo(()=>{const F={};return(!L||N==="both"||A)&&(F.pointerEvents="none"),{role:"presentation",hidden:!j,style:{...$.positionerStyles,...F}}},[L,N,A,j,$.positionerStyles]),Y=C.useMemo(()=>({open:L,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:N!=="none"?"tracking-cursor":U}),[L,$.side,$.align,$.anchorHidden,N,U]),H=C.useMemo(()=>({...Y,arrowRef:$.arrowRef,arrowStyles:$.arrowStyles,arrowUncentered:$.arrowUncentered}),[Y,$.arrowRef,$.arrowStyles,$.arrowUncentered]),B=ln("div",t,{state:Y,props:[V,i0(I),k],ref:[n,T.useStateSetter("positionerElement")],stateAttributesMapping:qs});return p.jsx(q6.Provider,{value:H,children:B})}),Tz={...qs,...pc},Az=C.forwardRef(function(t,n){const{className:r,render:o,...a}=t,l=Nf(),{side:c,align:f}=V6(),d=l.useState("open"),g=l.useState("instantType"),h=l.useState("transitionStatus"),y=l.useState("popupProps"),x=l.useState("floatingRootContext");mc({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}});const v=l.useState("disabled"),S=l.useState("closeDelay");return P6(x,{enabled:!v,closeDelay:S}),ln("div",t,{state:{open:d,side:c,align:f,instant:g,transitionStatus:h},ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[y,i0(h),a],stateAttributesMapping:Tz})}),Rz=C.forwardRef(function(t,n){const{className:r,render:o,...a}=t,c=Nf().useState("instantType"),{open:f,arrowRef:d,side:g,align:h,arrowUncentered:y,arrowStyles:x}=V6();return ln("div",t,{state:{open:f,side:g,align:h,uncentered:y,instant:c},ref:[n,d],props:[{style:x,"aria-hidden":!0},a],stateAttributesMapping:qs})}),Nz=function(t){const{delay:n,closeDelay:r,timeout:o=400}=t,a=C.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=C.useMemo(()=>({open:n,close:r}),[n,r]);return p.jsx(H6.Provider,{value:a,children:p.jsx(q_,{delay:l,timeoutMs:o,children:t.children})})};function K6(e){return $y(19)?e:e?"true":void 0}function Q6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Q6(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function X6(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Q6(e))&&(r&&(r+=" "),r+=t);return r}const Oz=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},jz=(e,t)=>({classGroupId:e,validator:t}),Z6=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),vp="-",US=[],Mz="arbitrary..",Lz=e=>{const t=Dz(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return _z(l);const c=l.split(vp),f=c[0]===""&&c.length>1?1:0;return J6(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=r[l],d=n[l];return f?d?Oz(d,f):f:d||US}return n[l]||US}}},J6=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const d=J6(e,t+1,a);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(vp):e.slice(t).join(vp),f=l.length;for(let d=0;d<f;d++){const g=l[d];if(g.validator(c))return g.classGroupId}},_z=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Mz+r:void 0})(),Dz=e=>{const{theme:t,classGroups:n}=e;return Iz(n,t)},Iz=(e,t)=>{const n=Z6();for(const r in e){const o=e[r];lx(o,n,r,t)}return n},lx=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const l=e[a];zz(l,t,n,r)}},zz=(e,t,n,r)=>{if(typeof e=="string"){Pz(e,t,n);return}if(typeof e=="function"){Fz(e,t,n,r);return}Bz(e,t,n,r)},Pz=(e,t,n)=>{const r=e===""?t:eT(t,e);r.classGroupId=n},Fz=(e,t,n,r)=>{if(Hz(e)){lx(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(jz(n,e))},Bz=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let l=0;l<a;l++){const[c,f]=o[l];lx(f,eT(t,c),n,r)}},eT=(e,t)=>{let n=e;const r=t.split(vp),o=r.length;for(let a=0;a<o;a++){const l=r[a];let c=n.nextPart.get(l);c||(c=Z6(),n.nextPart.set(l,c)),n=c}return n},Hz=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Uz=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set(a,l){a in n?n[a]=l:o(a,l)}}},T1="!",qS=":",qz=[],VS=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Vz=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let l=0,c=0,f=0,d;const g=o.length;for(let S=0;S<g;S++){const E=o[S];if(l===0&&c===0){if(E===qS){a.push(o.slice(f,S)),f=S+1;continue}if(E==="/"){d=S;continue}}E==="["?l++:E==="]"?l--:E==="("?c++:E===")"&&c--}const h=a.length===0?o:o.slice(f);let y=h,x=!1;h.endsWith(T1)?(y=h.slice(0,-1),x=!0):h.startsWith(T1)&&(y=h.slice(1),x=!0);const v=d&&d>f?d-f:void 0;return VS(a,x,y,v)};if(t){const o=t+qS,a=r;r=l=>l.startsWith(o)?a(l.slice(o.length)):VS(qz,!1,l,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},$z=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const l=n[a],c=l[0]==="[",f=t.has(l);c||f?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Gz=e=>({cache:Uz(e.cacheSize),parseClassName:Vz(e),sortModifiers:$z(e),...Lz(e)}),Yz=/\s+/,Wz=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],c=e.trim().split(Yz);let f="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:h,modifiers:y,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:S}=n(g);if(h){f=g+(f.length>0?" "+f:f);continue}let E=!!S,k=r(E?v.substring(0,S):v);if(!k){if(!E){f=g+(f.length>0?" "+f:f);continue}if(k=r(v),!k){f=g+(f.length>0?" "+f:f);continue}E=!1}const T=y.length===0?"":y.length===1?y[0]:a(y).join(":"),R=x?T+T1:T,L=R+k;if(l.indexOf(L)>-1)continue;l.push(L);const j=o(k,E);for(let N=0;N<j.length;++N){const A=j[N];l.push(R+A)}f=g+(f.length>0?" "+f:f)}return f},Kz=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=tT(n))&&(o&&(o+=" "),o+=r);return o},tT=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=tT(e[r]))&&(n&&(n+=" "),n+=t);return n},Qz=(e,...t)=>{let n,r,o,a;const l=f=>{const d=t.reduce((g,h)=>h(g),e());return n=Gz(d),r=n.cache.get,o=n.cache.set,a=c,c(f)},c=f=>{const d=r(f);if(d)return d;const g=Wz(f,n);return o(f,g),g};return a=l,(...f)=>a(Kz(...f))},Xz=[],Wn=e=>{const t=n=>n[e]||Xz;return t.isThemeGetter=!0,t},nT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zz=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eP=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sa=e=>Zz.test(e),St=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),b2=e=>e.endsWith("%")&&St(e.slice(0,-1)),_o=e=>Jz.test(e),iT=()=>!0,iP=e=>eP.test(e)&&!tP.test(e),cx=()=>!1,oP=e=>nP.test(e),aP=e=>rP.test(e),sP=e=>!Ge(e)&&!Ke(e),lP=e=>Wa(e,sT,cx),Ge=e=>nT.test(e),ws=e=>Wa(e,lT,iP),$S=e=>Wa(e,gP,St),cP=e=>Wa(e,uT,iT),uP=e=>Wa(e,cT,cx),GS=e=>Wa(e,oT,cx),fP=e=>Wa(e,aT,aP),wh=e=>Wa(e,fT,oP),Ke=e=>rT.test(e),wu=e=>Vs(e,lT),dP=e=>Vs(e,cT),YS=e=>Vs(e,oT),hP=e=>Vs(e,sT),pP=e=>Vs(e,aT),Sh=e=>Vs(e,fT,!0),mP=e=>Vs(e,uT,!0),Wa=(e,t,n)=>{const r=nT.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Vs=(e,t,n=!1)=>{const r=rT.exec(e);return r?r[1]?t(r[1]):n:!1},oT=e=>e==="position"||e==="percentage",aT=e=>e==="image"||e==="url",sT=e=>e==="length"||e==="size"||e==="bg-size",lT=e=>e==="length",gP=e=>e==="number",cT=e=>e==="family-name",uT=e=>e==="number"||e==="weight",fT=e=>e==="shadow",yP=()=>{const e=Wn("color"),t=Wn("font"),n=Wn("text"),r=Wn("font-weight"),o=Wn("tracking"),a=Wn("leading"),l=Wn("breakpoint"),c=Wn("container"),f=Wn("spacing"),d=Wn("radius"),g=Wn("shadow"),h=Wn("inset-shadow"),y=Wn("text-shadow"),x=Wn("drop-shadow"),v=Wn("blur"),S=Wn("perspective"),E=Wn("aspect"),k=Wn("ease"),T=Wn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...L(),Ke,Ge],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],D=()=>[Ke,Ge,f],U=()=>[Sa,"full","auto",...D()],I=()=>[Ca,"none","subgrid",Ke,Ge],q=()=>["auto",{span:["full",Ca,Ke,Ge]},Ca,Ke,Ge],$=()=>[Ca,"auto",Ke,Ge],V=()=>["auto","min","max","fr",Ke,Ge],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...D()],F=()=>[Sa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],G=()=>[Sa,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ie=()=>[Sa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],M=()=>[e,Ke,Ge],P=()=>[...L(),YS,GS,{position:[Ke,Ge]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",hP,lP,{size:[Ke,Ge]}],ee=()=>[b2,wu,ws],J=()=>["","none","full",d,Ke,Ge],re=()=>["",St,wu,ws],pe=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[St,b2,YS,GS],Ee=()=>["","none",v,Ke,Ge],Ie=()=>["none",St,Ke,Ge],Ye=()=>["none",St,Ke,Ge],je=()=>[St,Ke,Ge],_e=()=>[Sa,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_o],breakpoint:[_o],color:[iT],container:[_o],"drop-shadow":[_o],ease:["in","out","in-out"],font:[sP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_o],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_o],shadow:[_o],spacing:["px",St],text:[_o],"text-shadow":[_o],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sa,Ge,Ke,E]}],container:["container"],columns:[{columns:[St,Ge,Ke,c]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{"inset-s":U(),start:U()}],end:[{"inset-e":U(),end:U()}],"inset-bs":[{"inset-bs":U()}],"inset-be":[{"inset-be":U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",Ke,Ge]}],basis:[{basis:[Sa,"full","auto",c,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[St,Sa,"auto","initial","none",Ge]}],grow:[{grow:["",St,Ke,Ge]}],shrink:[{shrink:["",St,Ke,Ge]}],order:[{order:[Ca,"first","last","none",Ke,Ge]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[c,"screen",...F()]}],"min-w":[{"min-w":[c,"screen","none",...F()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,wu,ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,mP,cP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",b2,Ge]}],"font-family":[{font:[dP,uP,t]}],"font-features":[{"font-features":[Ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ke,Ge]}],"line-clamp":[{"line-clamp":[St,"none",Ke,$S]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Ke,Ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ke,Ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[St,"from-font","auto",Ke,ws]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[St,"auto",Ke,Ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke,Ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke,Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,Ke,Ge],radial:["",Ke,Ge],conic:[Ca,Ke,Ge]},pP,fP]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[St,Ke,Ge]}],"outline-w":[{outline:["",St,wu,ws]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",g,Sh,wh]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",h,Sh,wh]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[St,ws]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",y,Sh,wh]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[St,Ke,Ge]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[St]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Ke,Ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[St]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ke,Ge]}],filter:[{filter:["","none",Ke,Ge]}],blur:[{blur:Ee()}],brightness:[{brightness:[St,Ke,Ge]}],contrast:[{contrast:[St,Ke,Ge]}],"drop-shadow":[{"drop-shadow":["","none",x,Sh,wh]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",St,Ke,Ge]}],"hue-rotate":[{"hue-rotate":[St,Ke,Ge]}],invert:[{invert:["",St,Ke,Ge]}],saturate:[{saturate:[St,Ke,Ge]}],sepia:[{sepia:["",St,Ke,Ge]}],"backdrop-filter":[{"backdrop-filter":["","none",Ke,Ge]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[St,Ke,Ge]}],"backdrop-contrast":[{"backdrop-contrast":[St,Ke,Ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",St,Ke,Ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[St,Ke,Ge]}],"backdrop-invert":[{"backdrop-invert":["",St,Ke,Ge]}],"backdrop-opacity":[{"backdrop-opacity":[St,Ke,Ge]}],"backdrop-saturate":[{"backdrop-saturate":[St,Ke,Ge]}],"backdrop-sepia":[{"backdrop-sepia":["",St,Ke,Ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ke,Ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[St,"initial",Ke,Ge]}],ease:[{ease:["linear","initial",k,Ke,Ge]}],delay:[{delay:[St,Ke,Ge]}],animate:[{animate:["none",T,Ke,Ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ke,Ge]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ye()}],"scale-x":[{"scale-x":Ye()}],"scale-y":[{"scale-y":Ye()}],"scale-z":[{"scale-z":Ye()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[Ke,Ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke,Ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke,Ge]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[St,wu,ws,$S]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xP=Qz(yP);function we(...e){return xP(X6(e))}function ux({delay:e=0,...t}){return p.jsx(Nz,{"data-slot":"tooltip-provider",delay:e,...t})}function _s({...e}){return p.jsx(sz,{"data-slot":"tooltip",...e})}function Ds({...e}){return p.jsx(yz,{"data-slot":"tooltip-trigger",...e})}function Is({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...l}){return p.jsx(vz,{children:p.jsx(kz,{align:r,alignOffset:o,side:t,sideOffset:n,className:"isolate z-50",children:p.jsxs(Az,{"data-slot":"tooltip-content",className:we("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-popover px-3 py-1.5 text-xs text-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[a,p.jsx(Rz,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-popover fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var gc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bP={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vP=class{#e=bP;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ns=new vP;function wP(e){setTimeout(e,0)}var zs=typeof window>"u"||"Deno"in globalThis;function kr(){}function SP(e,t){return typeof e=="function"?e(t):e}function A1(e){return typeof e=="number"&&e>=0&&e!==1/0}function dT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function za(e,t){return typeof e=="function"?e(t):e}function Ti(e,t){return typeof e=="function"?e(t):e}function WS(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==fx(l,t.options))return!1}else if(!uf(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function KS(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ps(t.options.mutationKey)!==Ps(a))return!1}else if(!uf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function fx(e,t){return(t?.queryKeyHashFn||Ps)(e)}function Ps(e){return JSON.stringify(e,(t,n)=>R1(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function uf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>uf(e[n],t[n])):!1}var CP=Object.prototype.hasOwnProperty;function hT(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=QS(e)&&QS(t);if(!r&&!(R1(e)&&R1(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let g=0;g<c;g++){const h=r?g:l[g],y=e[h],x=t[h];if(y===x){f[h]=y,(r?g<a:CP.call(e,h))&&d++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){f[h]=x;continue}const v=hT(y,x,n+1);f[h]=v,v===y&&d++}return a===c&&d===a?e:f}function wp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function QS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function R1(e){if(!XS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!XS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function XS(e){return Object.prototype.toString.call(e)==="[object Object]"}function EP(e){return new Promise(t=>{Ns.setTimeout(t,e)})}function N1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?hT(e,t):t}function kP(e){return e}function TP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function AP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dx=Symbol();function pT(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hx(e,t){return typeof e=="function"?e(...t):!!e}function RP(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var NP=class extends gc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!zs&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},px=new NP;function O1(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var OP=wP;function jP(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=OP;const a=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{a(()=>{c(...f)})},schedule:a,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Kn=jP(),MP=class extends gc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!zs&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Sp=new MP;function LP(e){return Math.min(1e3*2**e,3e4)}function mT(e){return(e??"online")==="online"?Sp.isOnline():!0}var j1=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gT(e){let t=!1,n=0,r;const o=O1(),a=()=>o.status!=="pending",l=S=>{if(!a()){const E=new j1(S);y(E),e.onCancel?.(E)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>px.isFocused()&&(e.networkMode==="always"||Sp.isOnline())&&e.canRun(),g=()=>mT(e.networkMode)&&e.canRun(),h=S=>{a()||(r?.(),o.resolve(S))},y=S=>{a()||(r?.(),o.reject(S))},x=()=>new Promise(S=>{r=E=>{(a()||d())&&S(E)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),v=()=>{if(a())return;let S;const E=n===0?e.initialPromise:void 0;try{S=E??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(h).catch(k=>{if(a())return;const T=e.retry??(zs?0:3),R=e.retryDelay??LP,L=typeof R=="function"?R(n,k):R,j=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,k);if(t||!j){y(k);return}n++,e.onFail?.(n,k),EP(L).then(()=>d()?void 0:x()).then(()=>{t?y(k):v()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:f,canStart:g,start:()=>(g()?v():x().then(v),o)}}var yT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A1(this.gcTime)&&(this.#e=Ns.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zs?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ns.clearTimeout(this.#e),this.#e=void 0)}},_P=class extends yT{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=JS(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=JS(this.options);t.data!==void 0&&(this.setState(ZS(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=N1(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ti(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>za(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!dT(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const c=pT(this.options,t),d=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#s=!1,this.options.persister?this.options.persister(c,d,this):c(d)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=gT({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof j1&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#o({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof j1){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#o({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xT(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ZS(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Kn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function xT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZS(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function JS(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var bT=class extends gc{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=O1(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#o;#m;#d;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),eC(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return M1(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return M1(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ti(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!wp(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&tC(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Ti(this.options.enabled,this.#t)!==Ti(t.enabled,this.#t)||za(this.options.staleTime,this.#t)!==za(t.staleTime,this.#t))&&this.#g();const o=this.#y();r&&(this.#t!==n||Ti(this.options.enabled,this.#t)!==Ti(t.enabled,this.#t)||o!==this.#l)&&this.#x(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return IP(this,n)&&(this.#i=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(kr)),t}#g(){this.#v();const e=za(this.options.staleTime,this.#t);if(zs||this.#i.isStale||!A1(e))return;const n=dT(this.#i.dataUpdatedAt,e)+1;this.#c=Ns.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#w(),this.#l=e,!(zs||Ti(this.options.enabled,this.#t)===!1||!A1(this.#l)||this.#l===0)&&(this.#u=Ns.setInterval(()=>{(this.options.refetchIntervalInBackground||px.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#x(this.#y())}#v(){this.#c&&(Ns.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ns.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#i,a=this.#r,l=this.#a,f=e!==n?e.state:this.#n,{state:d}=e;let g={...d},h=!1,y;if(t._optimisticResults){const D=this.hasListeners(),U=!D&&eC(e,t),I=D&&tC(e,n,t,r);(U||I)&&(g={...g,...xT(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:v,status:S}=g;y=g.data;let E=!1;if(t.placeholderData!==void 0&&y===void 0&&S==="pending"){let D;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(D=o.data,E=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",y=N1(o?.data,D,t),h=!0)}if(t.select&&y!==void 0&&!E)if(o&&y===a?.data&&t.select===this.#m)y=this.#d;else try{this.#m=t.select,y=t.select(y),y=N1(o?.data,y,t),this.#d=y,this.#o=null}catch(D){this.#o=D}this.#o&&(x=this.#o,y=this.#d,v=Date.now(),S="error");const k=g.fetchStatus==="fetching",T=S==="pending",R=S==="error",L=T&&k,j=y!==void 0,A={status:S,fetchStatus:g.fetchStatus,isPending:T,isSuccess:S==="success",isError:R,isInitialLoading:L,isLoading:L,data:y,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:R&&!j,isPaused:g.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:R&&j,isStale:mx(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Ti(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=A.data!==void 0,U=A.status==="error"&&!D,I=V=>{U?V.reject(A.error):D&&V.resolve(A.data)},q=()=>{const V=this.#s=A.promise=O1();I(V)},$=this.#s;switch($.status){case"pending":e.queryHash===n.queryHash&&I($);break;case"fulfilled":(U||A.data!==$.value)&&q();break;case"rejected":(!U||A.error!==$.reason)&&q();break}}return A}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),wp(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const a=new Set(o??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(l=>{const c=l;return this.#i[c]!==e[c]&&a.has(c)})};this.#C({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(e){Kn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function DP(e,t){return Ti(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function eC(e,t){return DP(e,t)||e.state.data!==void 0&&M1(e,t,t.refetchOnMount)}function M1(e,t,n){if(Ti(t.enabled,e)!==!1&&za(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&mx(e,t)}return!1}function tC(e,t,n,r){return(e!==t||Ti(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&mx(e,n)}function mx(e,t){return Ti(t.enabled,e)!==!1&&e.isStaleByTime(za(t.staleTime,e))}function IP(e,t){return!wp(e.getCurrentResult(),t)}function Cp(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let g=!1;const h=v=>{RP(v,()=>t.signal,()=>g=!0)},y=pT(t.options,t.fetchOptions),x=async(v,S,E)=>{if(g)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const T=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return h(N),N})(),R=await y(T),{maxPages:L}=t.options,j=E?AP:TP;return{pages:j(v.pages,R,L),pageParams:j(v.pageParams,S,L)}};if(o&&a.length){const v=o==="backward",S=v?vT:L1,E={pages:a,pageParams:l},k=S(r,E);c=await x(E,k,v)}else{const v=e??a.length;do{const S=f===0?l[0]??r.initialPageParam:L1(r,c);if(f>0&&S==null)break;c=await x(c,S),f++}while(f<v)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function L1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vT(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function zP(e,t){return t?L1(e,t)!=null:!1}function PP(e,t){return!t||!e.getPreviousPageParam?!1:vT(e,t)!=null}var FP=class extends bT{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Cp()})}getOptimisticResult(e){return e.behavior=Cp(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:a,isError:l,isRefetchError:c}=r,f=n.fetchMeta?.fetchMore?.direction,d=l&&f==="forward",g=o&&f==="forward",h=l&&f==="backward",y=o&&f==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:zP(t,n.data),hasPreviousPage:PP(t,n.data),isFetchNextPageError:d,isFetchingNextPage:g,isFetchPreviousPageError:h,isFetchingPreviousPage:y,isRefetchError:c&&!d&&!h,isRefetching:a&&!g&&!y}}},BP=class extends yT{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||wT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=gT({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,l)=>{this.#r({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:o})}const a=await this.#i.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#r({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Kn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function wT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var HP=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new BP({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Ch(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Ch(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ch(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Ch(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Kn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>KS(t,n))}findAll(e={}){return this.getAll().filter(t=>KS(e,t))}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kn.batch(()=>Promise.all(e.map(t=>t.continue().catch(kr))))}};function Ch(e){return e.options.scope?.id}var UP=class extends gc{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),wp(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Ps(n.mutationKey)!==Ps(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??wT();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){Kn.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,r,o)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(t.data,null,n,r,o)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,o)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(void 0,t.error,n,r,o)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#t)})})}},qP=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??fx(r,t);let a=this.get(o);return a||(a=new _P({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Kn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>WS(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>WS(e,n)):t}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},VP=class{#e;#t;#n;#i;#r;#a;#s;#o;constructor(e={}){this.#e=e.queryCache||new qP,this.#t=e.mutationCache||new HP,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=px.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Sp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(za(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,l=SP(t,a);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Kn.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Kn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Kn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Kn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kr).catch(kr)}invalidateQueries(e,t={}){return Kn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Kn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(kr)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(za(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}fetchInfiniteQuery(e){return e.behavior=Cp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e.behavior=Cp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sp.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Ps(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{uf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Ps(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{uf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dx&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ST=C.createContext(void 0),cn=e=>{const t=C.useContext(ST);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$P=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(ST.Provider,{value:e,children:t})),CT=C.createContext(!1),GP=()=>C.useContext(CT);CT.Provider;function YP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WP=C.createContext(YP()),KP=()=>C.useContext(WP),QP=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?hx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},XP=e=>{C.useEffect(()=>{e.clearReset()},[e])},ZP=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||hx(n,[e.error,r])),JP=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},eF=(e,t)=>e.isLoading&&e.isFetching&&!t,tF=(e,t)=>e?.suspense&&t.isPending,nC=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ET(e,t,n){const r=GP(),o=KP(),a=cn(),l=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",JP(l),QP(l,o,c),XP(o);const f=!a.getQueryCache().get(l.queryHash),[d]=C.useState(()=>new t(a,l)),g=d.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(y=>{const x=h?d.subscribe(Kn.batchCalls(y)):kr;return d.updateResult(),x},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),C.useEffect(()=>{d.setOptions(l)},[l,d]),tF(l,g))throw nC(l,d,o);if(ZP({result:g,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw g.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(l,g),l.experimental_prefetchInRender&&!zs&&eF(g,r)&&(f?nC(l,d,o):c?.promise)?.catch(kr).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?g:d.trackResult(g)}function br(e,t){return ET(e,bT)}function wn(e,t){const n=cn(),[r]=C.useState(()=>new UP(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const o=C.useSyncExternalStore(C.useCallback(l=>r.subscribe(Kn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((l,c)=>{r.mutate(l,c).catch(kr)},[r]);if(o.error&&hx(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function nF(e,t){return ET(e,FP)}const rF={queries:{gcTime:0,refetchOnWindowFocus:!1,retry:!1,staleTime:0}};function kT(e){return ln(e.defaultTagName??"div",e,e)}const rC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,iC=X6,o0=(e,t)=>n=>{var r;if(t?.variants==null)return iC(e,n?.class,n?.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(d=>{const g=n?.[d],h=a?.[d];if(g===null)return null;const y=rC(g)||rC(h);return o[d][y]}),c=n&&Object.entries(n).reduce((d,g)=>{let[h,y]=g;return y===void 0||(d[h]=y),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,g)=>{let{class:h,className:y,...x}=g;return Object.entries(x).every(v=>{let[S,E]=v;return Array.isArray(E)?E.includes({...a,...c}[S]):{...a,...c}[S]===E})?[...d,h,y]:d},[]);return iC(e,l,f,n?.class,n?.className)},iF=o0("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Yo({className:e,variant:t="default",render:n,...r}){return kT({defaultTagName:"span",props:Ba({className:we(iF({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}})}const gx="/assets/logo-DJvq-PY2.svg",oC=e=>{let t;const n=new Set,r=(d,g)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const y=t;t=g??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(x=>x(t,y))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,o,c);return c},oF=(e=>e?oC(e):oC),aF=e=>e;function sF(e,t=aF){const n=ke.useSyncExternalStore(e.subscribe,ke.useCallback(()=>t(e.getState()),[e,t]),ke.useCallback(()=>t(e.getInitialState()),[e,t]));return ke.useDebugValue(n),n}const lF=e=>{const t=oF(e),n=r=>sF(t,r);return Object.assign(n,t),n},yc=(e=>lF);function a0(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const l=f=>f===null?null:JSON.parse(f,void 0),c=(a=n.getItem(o))!=null?a:null;return c instanceof Promise?c.then(l):l(c)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const _1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return _1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return _1(r)(n)}}}},cF=(e,t)=>(n,r,o)=>{let a={storage:a0(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,k)=>({...k,...E}),...t},l=!1,c=0;const f=new Set,d=new Set;let g=a.storage;if(!g)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...E)},r,o);const h=()=>{const E=a.partialize({...r()});return g.setItem(a.name,{state:E,version:a.version})},y=o.setState;o.setState=(E,k)=>(y(E,k),h());const x=e((...E)=>(n(...E),h()),r,o);o.getInitialState=()=>x;let v;const S=()=>{var E,k;if(!g)return;const T=++c;l=!1,f.forEach(L=>{var j;return L((j=r())!=null?j:x)});const R=((k=a.onRehydrateStorage)==null?void 0:k.call(a,(E=r())!=null?E:x))||void 0;return _1(g.getItem.bind(g))(a.name).then(L=>{if(L)if(typeof L.version=="number"&&L.version!==a.version){if(a.migrate){const j=a.migrate(L.state,L.version);return j instanceof Promise?j.then(N=>[!0,N]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,L.state];return[!1,void 0]}).then(L=>{var j;if(T!==c)return;const[N,A]=L;if(v=a.merge(A,(j=r())!=null?j:x),n(v,!0),N)return h()}).then(()=>{T===c&&(R?.(v,void 0),v=r(),l=!0,d.forEach(L=>L(v)))}).catch(L=>{T===c&&R?.(void 0,L)})};return o.persist={setOptions:E=>{a={...a,...E},E.storage&&(g=E.storage)},clearStorage:()=>{g?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>S(),hasHydrated:()=>l,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(d.add(E),()=>{d.delete(E)})},a.skipHydration||S(),v||x},yx=cF,uF=5e3;class fF{constructor(t){this.socket=t}on(t,n){return this.socket.on(t,n),()=>{this.socket.off(t,n)}}async request(t,n,r){return new Promise((o,a)=>{let l=!1;const c=r?.timeout??uF,f=globalThis.setTimeout(()=>{l=!0,a(new Error(`Request timed out after ${c}ms`))},c);this.socket.emit(t,n,d=>{if(!l)if(l=!0,globalThis.clearTimeout(f),d.success)o(d.data);else{const g=Object.assign(new Error(d.error??"Request failed"),d.code?{code:d.code}:{});a(g)}})})}}const aC={apiClient:null,connectionState:"disconnected",error:null,isConnected:!1,projectCwd:"",reconnectCount:0,selectedProject:"",socket:null,version:""},Be=yc()(yx(e=>({...aC,incrementReconnectCount:()=>e(t=>({reconnectCount:t.reconnectCount+1})),reset:()=>e({...aC,selectedProject:""}),setConnectionState:t=>e({connectionState:t,isConnected:t==="connected"}),setError:t=>e({connectionState:"disconnected",error:t,isConnected:!1}),setSelectedProject:t=>e({selectedProject:t}),setSocket:(t,n)=>e({apiClient:new fF(t),connectionState:"connected",error:null,isConnected:!0,projectCwd:n.projectCwd,reconnectCount:0,socket:t,version:n.version})}),{name:"brv-transport",partialize:e=>({selectedProject:e.selectedProject}),storage:a0(()=>sessionStorage)})),dF={destructive:"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-400",info:"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400",warn:"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400"},sC={destructive:"bg-red-500",info:"bg-blue-500",warn:"bg-orange-500"};function hF({className:e}){return p.jsx("img",{alt:"Byterover",className:e,src:gx})}function TT({children:e,tone:t}){return p.jsxs(Yo,{className:we("h-auto gap-1.5 px-2 py-0.5 text-[11px]",dF[t]),variant:"outline",children:[p.jsx("span",{className:we("relative size-1.5 rounded-full",sC[t]),children:p.jsx("span",{className:we("absolute inset-0 animate-ping rounded-full opacity-50",sC[t])})}),e]})}function AT(){const e=Be(t=>t.version);return e?p.jsxs("span",{className:"text-muted-foreground/70 ml-auto font-mono text-[10px]",children:["v",e]}):null}function RT({body:e,footer:t,pill:n,title:r}){return p.jsx("div",{className:"bg-background fixed inset-0 flex items-center justify-center p-6",children:p.jsxs("div",{className:"border-border bg-card text-card-foreground w-full max-w-md overflow-hidden rounded-xl border shadow-[0_1px_0_0_rgba(0,0,0,0.02),0_8px_28px_-10px_rgba(0,0,0,0.12)] dark:shadow-[0_1px_0_0_rgba(0,0,0,0.4),0_8px_32px_-10px_rgba(0,0,0,0.6)]",children:[p.jsxs("div",{className:"flex items-center justify-between gap-4 px-5 pt-4",children:[p.jsxs("div",{className:"inline-flex min-w-0 items-center gap-2.5",children:[p.jsx(hF,{className:"size-8"}),p.jsx("h2",{className:"text-sm leading-tight font-semibold",children:r})]}),n]}),p.jsx("div",{className:"px-5 pt-2 pb-4",children:e}),t&&p.jsx("div",{className:"border-border bg-foreground/1.5 flex items-center gap-2 border-t px-5 py-2.5",children:t})]})})}function pF(){return p.jsx(RT,{body:p.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"Establishing a connection to the ByteRover daemon. This usually takes less than a second."}),footer:p.jsxs(p.Fragment,{children:[p.jsx("span",{"aria-hidden":!0,className:"bg-blue-500/70 size-1.5 animate-pulse rounded-full"}),p.jsx("span",{className:"text-muted-foreground text-xs",children:"Waiting for the daemon…"}),p.jsx(AT,{})]}),pill:p.jsx(TT,{tone:"info",children:"Connecting"}),title:"Connecting to ByteRover"})}function mF({textToCopy:e,className:t,showCopiedText:n=!0,onCopied:r}){const[o,a]=C.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(e),a(!0),r?.(),setTimeout(()=>a(!1),2e3)}catch(c){console.error("Failed to copy text: ",c)}};return p.jsx("button",{type:"button",onClick:()=>{l()},className:we("box-border flex shrink-0 cursor-pointer items-center justify-center gap-1 overflow-clip rounded-md p-1","hover:bg-input text-muted-foreground transition-colors",t),children:o?p.jsxs("div",{className:"flex items-center gap-1.5",children:[n&&p.jsx("span",{className:"pl-0.5 text-xs font-medium",children:"Copied!"}),p.jsx(qE,{className:"size-4 text-green-500"})]}):p.jsx(KO,{className:"size-4"})})}const ho=Object.create(null);ho.open="0";ho.close="1";ho.ping="2";ho.pong="3";ho.message="4";ho.upgrade="5";ho.noop="6";const Yh=Object.create(null);Object.keys(ho).forEach(e=>{Yh[ho[e]]=e});const D1={type:"error",data:"parser error"},NT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",OT=typeof ArrayBuffer=="function",jT=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xx=({type:e,data:t},n,r)=>NT&&t instanceof Blob?n?r(t):lC(t,r):OT&&(t instanceof ArrayBuffer||jT(t))?n?r(t):lC(new Blob([t]),r):r(ho[e]+(t||"")),lC=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function cC(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let v2;function gF(e,t){if(NT&&e.data instanceof Blob)return e.data.arrayBuffer().then(cC).then(t);if(OT&&(e.data instanceof ArrayBuffer||jT(e.data)))return t(cC(e.data));xx(e,!1,n=>{v2||(v2=new TextEncoder),t(v2.encode(n))})}const uC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<uC.length;e++)Bu[uC.charCodeAt(e)]=e;const yF=e=>{let t=e.length*.75,n=e.length,r,o=0,a,l,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),g=new Uint8Array(d);for(r=0;r<n;r+=4)a=Bu[e.charCodeAt(r)],l=Bu[e.charCodeAt(r+1)],c=Bu[e.charCodeAt(r+2)],f=Bu[e.charCodeAt(r+3)],g[o++]=a<<2|l>>4,g[o++]=(l&15)<<4|c>>2,g[o++]=(c&3)<<6|f&63;return d},xF=typeof ArrayBuffer=="function",bx=(e,t)=>{if(typeof e!="string")return{type:"message",data:MT(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:bF(e.substring(1),t)}:Yh[n]?e.length>1?{type:Yh[n],data:e.substring(1)}:{type:Yh[n]}:D1},bF=(e,t)=>{if(xF){const n=yF(e);return MT(n,t)}else return{base64:!0,data:e}},MT=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,LT="",vF=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,l)=>{xx(a,!1,c=>{r[l]=c,++o===n&&t(r.join(LT))})})},wF=(e,t)=>{const n=e.split(LT),r=[];for(let o=0;o<n.length;o++){const a=bx(n[o],t);if(r.push(a),a.type==="error")break}return r};function SF(){return new TransformStream({transform(e,t){gF(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let w2;function Eh(e){return e.reduce((t,n)=>t+n.length,0)}function kh(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function CF(e,t){w2||(w2=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(Eh(n)<1)break;const f=kh(n,1);a=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Eh(n)<2)break;const f=kh(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(Eh(n)<8)break;const f=kh(n,8),d=new DataView(f.buffer,f.byteOffset,f.length),g=d.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(D1);break}o=g*Math.pow(2,32)+d.getUint32(4),r=3}else{if(Eh(n)<o)break;const f=kh(n,o);c.enqueue(bx(a?f:w2.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(D1);break}}}})}const _T=4;function Vn(e){if(e)return EF(e)}function EF(e){for(var t in Vn.prototype)e[t]=Vn.prototype[t];return e}Vn.prototype.on=Vn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Vn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Vn.prototype.off=Vn.prototype.removeListener=Vn.prototype.removeAllListeners=Vn.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 r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Vn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};Vn.prototype.emitReserved=Vn.prototype.emit;Vn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Vn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const s0=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ai=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),kF="arraybuffer";function DT(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const TF=Ai.setTimeout,AF=Ai.clearTimeout;function l0(e,t){t.useNativeTimers?(e.setTimeoutFn=TF.bind(Ai),e.clearTimeoutFn=AF.bind(Ai)):(e.setTimeoutFn=Ai.setTimeout.bind(Ai),e.clearTimeoutFn=Ai.clearTimeout.bind(Ai))}const RF=1.33;function NF(e){return typeof e=="string"?OF(e):Math.ceil((e.byteLength||e.size)*RF)}function OF(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function IT(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function jF(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function MF(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class LF extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class vx extends Vn{constructor(t){super(),this.writable=!1,l0(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new LF(t,n,r)),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){const n=bx(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(){const 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){const n=jF(t);return n.length?"?"+n:""}}class _F extends vx{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};wF(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,vF(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=IT()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let zT=!1;try{zT=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const DF=zT;function IF(){}class zF extends _F{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Kl=class Wh extends Vn{constructor(t,n,r){super(),this.createRequest=t,l0(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=DT(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Wh.requestsCount++,Wh.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=IF,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wh.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Kl.requestsCount=0;Kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fC);else if(typeof addEventListener=="function"){const e="onpagehide"in Ai?"pagehide":"unload";addEventListener(e,fC,!1)}}function fC(){for(let e in Kl.requests)Kl.requests.hasOwnProperty(e)&&Kl.requests[e].abort()}const PF=(function(){const e=PT({xdomain:!1});return e&&e.responseType!==null})();class FF extends zF{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=PF&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kl(PT,this.uri(),t)}}function PT(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||DF))return new XMLHttpRequest}catch{}if(!t)try{return new Ai[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const FT=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BF extends vx{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=FT?{}:DT(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}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++){const r=t[n],o=n===t.length-1;xx(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}o&&s0(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=IT()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const S2=Ai.WebSocket||Ai.MozWebSocket;class HF extends BF{createSocket(t,n,r){return FT?new S2(t,n,r):n?new S2(t,n):new S2(t)}doWrite(t,n){this.ws.send(n)}}class UF extends vx{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=>{const n=CF(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=SF();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),a())}).catch(c=>{})};a();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&s0(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const qF={websocket:HF,webtransport:UF,polling:FF},VF=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$F=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function I1(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=VF.exec(e||""),a={},l=14;for(;l--;)a[$F[l]]=o[l]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=GF(a,a.path),a.queryKey=YF(a,a.query),a}function GF(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function YF(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const z1=typeof addEventListener=="function"&&typeof removeEventListener=="function",Kh=[];z1&&addEventListener("offline",()=>{Kh.forEach(e=>e())},!1);class Pa extends Vn{constructor(t,n){if(super(),this.binaryType=kF,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){const r=I1(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=I1(n.host).host);l0(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),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=MF(this.opts.query)),z1&&(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"})},Kh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=_T,n.transport=t,this.id&&(n.sid=this.id);const r=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](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Pa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const 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",Pa.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":const 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);const 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){const 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 r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=NF(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,s0(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{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?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Pa.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(),z1&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Kh.indexOf(this._offlineEventListener);r!==-1&&Kh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Pa.protocol=_T;class WF extends Pa{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),r=!1;Pa.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Pa.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,g(),n.close(),n=null)}const l=h=>{const y=new Error("probe error: "+h);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};function c(){l("transport closed")}function f(){l("socket closed")}function d(h){n&&h.name!==n.name&&a()}const g=()=>{n.removeListener("open",o),n.removeListener("error",l),n.removeListener("close",c),this.off("close",f),this.off("upgrading",d)};n.once("open",o),n.once("error",l),n.once("close",c),this.once("close",f),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let KF=class extends WF{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>qF[o]).filter(o=>!!o)),super(t,r)}};function QF(e,t="",n){let r=e;n=n||typeof location<"u"&&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<"u"?e=n.protocol+"//"+e:e="https://"+e),r=I1(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const XF=typeof ArrayBuffer=="function",ZF=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,BT=Object.prototype.toString,JF=typeof Blob=="function"||typeof Blob<"u"&&BT.call(Blob)==="[object BlobConstructor]",eB=typeof File=="function"||typeof File<"u"&&BT.call(File)==="[object FileConstructor]";function wx(e){return XF&&(e instanceof ArrayBuffer||ZF(e))||JF&&e instanceof Blob||eB&&e instanceof File}function Qh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Qh(e[n]))return!0;return!1}if(wx(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Qh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Qh(e[n]))return!0;return!1}function tB(e){const t=[],n=e.data,r=e;return r.data=P1(n,t),r.attachments=t.length,{packet:r,buffers:t}}function P1(e,t){if(!e)return e;if(wx(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=P1(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=P1(e[r],t));return n}return e}function nB(e,t){return e.data=F1(e.data,t),delete e.attachments,e}function F1(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]=F1(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=F1(e[n],t));return e}const rB=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Dt;(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"})(Dt||(Dt={}));class iB{constructor(t){this.replacer=t}encode(t){return(t.type===Dt.EVENT||t.type===Dt.ACK)&&Qh(t)?this.encodeAsBinary({type:t.type===Dt.EVENT?Dt.BINARY_EVENT:Dt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Dt.BINARY_EVENT||t.type===Dt.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){const n=tB(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Sx extends Vn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}: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);const r=n.type===Dt.BINARY_EVENT;r||n.type===Dt.BINARY_ACK?(n.type=r?Dt.EVENT:Dt.ACK,this.reconstructor=new oB(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wx(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;const r={type:Number(t.charAt(0))};if(Dt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Dt.BINARY_EVENT||r.type===Dt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(a,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(l);if(!aB(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Sx.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Dt.CONNECT:return dC(n);case Dt.DISCONNECT:return n===void 0;case Dt.CONNECT_ERROR:return typeof n=="string"||dC(n);case Dt.EVENT:case Dt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&rB.indexOf(n[0])===-1);case Dt.ACK:case Dt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class oB{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=nB(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const aB=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function dC(e){return Object.prototype.toString.call(e)==="[object Object]"}const sB=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sx,Encoder:iB,get PacketType(){return Dt}},Symbol.toStringTag,{value:"Module"}));function qi(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const lB=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class HT extends Vn{constructor(t,n,r){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,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[qi(t,"open",this.onopen.bind(this)),qi(t,"packet",this.onpacket.bind(this)),qi(t,"error",this.onerror.bind(this)),qi(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 r,o,a;if(lB.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;const l={type:Dt.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,h=n.pop();this._registerAckCallback(g,h),l.id=g}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),l=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(l,c)=>l?o(l):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const 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:Dt.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(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Dt.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 Dt.EVENT:case Dt.BINARY_EVENT:this.onevent(t);break;case Dt.ACK:case Dt.BINARY_ACK:this.onack(t);break;case Dt.DISCONNECT:this.ondisconnect();break;case Dt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const 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){const n=this._anyListeners.slice();for(const r of n)r.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){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Dt.ACK,id:t,data:o}))}}onack(t){const 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._drainQueue(!0),this.emitReserved("connect")}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:Dt.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){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,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){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function xc(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}xc.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};xc.prototype.reset=function(){this.attempts=0};xc.prototype.setMin=function(e){this.ms=e};xc.prototype.setMax=function(e){this.max=e};xc.prototype.setJitter=function(e){this.jitter=e};class B1 extends Vn{constructor(t,n){var r;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,l0(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((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new xc({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||sB;this.encoder=new o.Encoder,this.decoder=new o.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 KF(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=qi(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=qi(n,"error",a);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qi(t,"ping",this.onping.bind(this)),qi(t,"data",this.ondata.bind(this)),qi(t,"error",this.onerror.bind(this)),qi(t,"close",this.onclose.bind(this)),qi(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){s0(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new HT(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],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 r;this.cleanup(),(r=this.engine)===null||r===void 0||r.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;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Su={};function Xh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=QF(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,l=Su[o]&&a in Su[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let f;return c?f=new B1(r,t):(Su[o]||(Su[o]=new B1(r,t)),f=Su[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(Xh,{Manager:B1,Socket:HT,io:Xh,connect:Xh});class UT extends Error{constructor(t){super(t),this.name="UiConfigError"}}async function cB(){const e=await fetch("/api/ui/config");if(!e.ok)throw new UT(`Failed to fetch UI config: ${e.statusText}`);return e.json()}function uB(e,t){e.emit("client:register",{clientType:"webui",projectPath:t},()=>{}),e.emit("room:join","broadcast-room")}async function fB(e){const t=await cB(),n=Xh(`http://127.0.0.1:${t.daemonPort}`,{reconnection:!0,reconnectionAttempts:30,reconnectionDelay:50,reconnectionDelayMax:1e3,transports:["websocket"]});return n.on("connect",()=>uB(n,e)),await new Promise((r,o)=>{const a=()=>{clearTimeout(f),n.off("connect",l),n.off("connect_error",c)},l=()=>{a(),r()},c=d=>{a(),o(d)},f=setTimeout(()=>{a(),o(new Error("Connection timeout"))},5e3);n.once("connect",l),n.once("connect_error",c)}),{config:t,socket:n}}function hC({error:e}){const t=e instanceof UT,n=Be(a=>a.reconnectCount),r=t?"brv restart":"brv webui",o=t?"Web UI server not available":"ByteRover is not running";return p.jsx(RT,{body:p.jsxs(p.Fragment,{children:[p.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:t?p.jsxs(p.Fragment,{children:["Could not load"," ",p.jsx("code",{className:"bg-muted text-foreground rounded px-1.5 py-0.5 font-mono text-xs",children:"/api/ui-config"}),". The dev server may have stopped or moved to a different port. Restart it from your terminal:"]}):"Could not connect to the ByteRover daemon. Start it from your terminal:"}),p.jsxs("div",{className:"bg-muted mt-3 flex items-center justify-between gap-3 rounded-md px-3.5 py-2.5 font-mono text-xs",children:[p.jsxs("span",{children:[p.jsx("span",{className:"text-muted-foreground",children:"$"})," ",r]}),p.jsx(mF,{className:"-mr-1",showCopiedText:!1,textToCopy:r})]})]}),footer:p.jsxs(p.Fragment,{children:[t?p.jsx("span",{className:"text-muted-foreground/80 text-xs",children:"Refresh once the host is back."}):p.jsxs(p.Fragment,{children:[p.jsx("span",{"aria-hidden":!0,className:"bg-muted-foreground/60 size-1.5 animate-pulse rounded-full"}),p.jsxs("span",{className:"text-muted-foreground text-xs",children:["Reconnecting",p.jsx("span",{className:"opacity-60",children:" · attempt "}),p.jsx("span",{className:"text-foreground tabular-nums",children:n})]})]}),p.jsx(AT,{})]}),pill:p.jsx(TT,{tone:t?"destructive":"warn",children:t?"Unreachable":"Offline"}),title:o})}function dB({children:e}){const t=Be(d=>d.incrementReconnectCount),n=Be(d=>d.setConnectionState),r=Be(d=>d.setError),o=Be(d=>d.setSocket),a=Be(d=>d.selectedProject);C.useEffect(()=>{let d=!0,g=null,h=null;async function y(){try{n("connecting");const{config:x,socket:v}=await fB(a);if(!d){v.disconnect();return}g=v,o(v,x),v.on("disconnect",()=>{d&&n("disconnected")}),v.io.on("reconnect_attempt",()=>{d&&(t(),n("reconnecting"))}),v.io.on("reconnect",()=>{d&&n("connected")})}catch(x){if(!d)return;r(x instanceof Error?x:new Error(String(x))),t(),h=setTimeout(y,3e3)}}return y(),()=>{d=!1,g?.disconnect(),h!==null&&clearTimeout(h)}},[a,t,n,r,o]);const l=Be(d=>d.connectionState),c=Be(d=>d.error),f=Be(d=>d.apiClient);return c?p.jsx(hC,{error:c}):l==="connecting"?p.jsx(pF,{}):f?p.jsx(p.Fragment,{children:e}):p.jsx(hC,{})}const hB=new VP({defaultOptions:rF});function pB({children:e}){return p.jsx($P,{client:hB,children:p.jsx(dB,{children:p.jsx(ux,{delay:0,children:e})})})}const _f={GET_STATE:"auth:getState",LOGIN_COMPLETED:"auth:loginCompleted",LOGOUT:"auth:logout",START_LOGIN:"auth:startLogin",STATE_CHANGED:"auth:stateChanged"},Cx={GET_AGENTS:"connectors:getAgents",INSTALL:"connectors:install",LIST:"connectors:list"},Df={GET_FILE:"contextTree:getFile",GET_FILE_METADATA:"contextTree:getFileMetadata",GET_HISTORY:"contextTree:getHistory",GET_NODES:"contextTree:getNodes",UPDATE_FILE:"contextTree:updateFile"},Cu={CHUNK:"llmservice:chunk",RESPONSE:"llmservice:response",THINKING:"llmservice:thinking",TOOL_CALL:"llmservice:toolCall",TOOL_RESULT:"llmservice:toolResult"},mB={GET:"locations:get"},qT={LIST:"model:list",SET_ACTIVE:"model:setActive"},Wo={AWAIT_OAUTH_CALLBACK:"provider:awaitOAuthCallback",CONNECT:"provider:connect",DISCONNECT:"provider:disconnect",GET_ACTIVE:"provider:getActive",LIST:"provider:list",SET_ACTIVE:"provider:setActive",START_OAUTH:"provider:startOAuth",UPDATED:"provider:updated",VALIDATE_API_KEY:"provider:validateApiKey"},ks={CANCELLED:"task:cancelled",COMPLETED:"task:completed",CREATE:"task:create",CREATED:"task:created",ERROR:"task:error",LIST:"task:list",STARTED:"task:started"},rr={ADD:"vc:add",BRANCH:"vc:branch",CHECKOUT:"vc:checkout",COMMIT:"vc:commit",DIFF:"vc:diff",DIFFS:"vc:diffs",DISCARD:"vc:discard",FETCH:"vc:fetch",INIT:"vc:init",MERGE:"vc:merge",PULL:"vc:pull",PUSH:"vc:push",RESET:"vc:reset",STATUS:"vc:status"},pC={activeModel:null,favorites:[],isLoading:!1,models:[],recent:[]},gB=yc()(e=>({...pC,reset:()=>e(pC),setActiveModel:t=>e({activeModel:t}),setLoading:t=>e({isLoading:t}),setModels:t=>e({activeModel:t.activeModel??null,favorites:t.favorites,models:t.models,recent:t.recent})})),mC={activeProviderId:null,isLoading:!1,providers:[]},yB=yc()(e=>({...mC,reset:()=>e(mC),setActiveProviderId:t=>e({activeProviderId:t}),setLoading:t=>e({isLoading:t}),setProviders:t=>e({providers:t}),updateProvider:(t,n)=>e(r=>({providers:r.providers.map(o=>o.id===t?{...o,...n}:o)}))})),xB=()=>{const{apiClient:e}=Be.getState();return e?e.request(_f.GET_STATE,void 0,{timeout:5e3}):Promise.reject(new Error("Not connected"))},so=()=>({gcTime:300*1e3,queryFn:xB,queryKey:["auth","state"],staleTime:60*1e3}),bB=({queryConfig:e}={})=>br({...so(),...e}),gC={brvConfig:null,isAuthorized:!1,isLoadingInitial:!0,isLoggingIn:!1,user:null},ji=yc()(e=>({...gC,reset:()=>e(gC),setLoggingIn:t=>e({isLoggingIn:t}),setState:t=>e(n=>({brvConfig:t.isAuthorized?t.brvConfig===void 0?n.brvConfig:t.brvConfig:null,isAuthorized:t.isAuthorized,isLoggingIn:!1,user:t.isAuthorized?t.user===void 0?n.user:t.user:null}))}));function vB({children:e}){const t=Be(d=>d.apiClient),n=Be(d=>d.connectionState),r=Be(d=>d.reconnectCount),o=cn(),a=ji(d=>d.setState),{data:l,isFetched:c,isLoading:f}=bB({queryConfig:{enabled:t!==null,retry:5,retryDelay:d=>Math.min(500*2**d,2e3),staleTime:120*1e3}});return C.useEffect(()=>{l?(a({brvConfig:l.brvConfig??null,isAuthorized:l.isAuthorized,user:l.user??null}),ji.setState({isLoadingInitial:!1})):c&&!f&&ji.setState({isLoadingInitial:!1})},[l,c,f,a]),C.useEffect(()=>t?t.on(_f.STATE_CHANGED,g=>{a({brvConfig:g.brvConfig,isAuthorized:g.isAuthorized,user:g.user}),g.isAuthorized||(yB.getState().reset(),gB.getState().reset()),g.isAuthorized&&o.invalidateQueries({queryKey:so().queryKey}).catch(()=>{})}):void 0,[t,o,a]),C.useEffect(()=>{t&&n==="connected"&&r!==0&&o.invalidateQueries({queryKey:so().queryKey}).catch(()=>{})},[t,n,o,r]),p.jsx(p.Fragment,{children:e})}const wB=()=>{const{apiClient:e}=Be.getState();return e?e.request(Wo.GET_ACTIVE):Promise.reject(new Error("Not connected"))},Ex=()=>({queryFn:wB,queryKey:["getActiveProviderConfig"]}),kx=({queryConfig:e}={})=>br({...Ex(),...e}),SB=()=>{const{apiClient:e}=Be.getState();return e?e.request(Wo.LIST):Promise.reject(new Error("Not connected"))},bc=()=>({queryFn:SB,queryKey:["providers"]}),VT=({queryConfig:e}={})=>br({...bc(),...e});function CB(){const e=Be(n=>n.apiClient),t=cn();C.useEffect(()=>e?e.on(Wo.UPDATED,()=>{t.invalidateQueries({queryKey:bc().queryKey}),t.invalidateQueries({queryKey:Ex().queryKey})}):void 0,[e,t])}function EB(){return CB(),null}const kB=e=>{const{apiClient:t}=Be.getState();return t?t.request(ks.LIST,e):Promise.reject(new Error("Not connected"))},TB=e=>({queryFn:()=>kB(e?{projectPath:e}:void 0),queryKey:["tasks","list",e??""]}),$T=({projectPath:e,queryConfig:t}={})=>br({...TB(e),...t});function yC(e,t){if(t.length===0)return e;const n=new Map(t.map(o=>[o.taskId,o])),r=e.map(o=>{const a=n.get(o.taskId);return a?(n.delete(o.taskId),RB(o,a)):o});for(const o of n.values())r.push(o);return r}function AB(e,t){const n=e.filter(r=>r.taskId!==t);return n.length===e.length?e:n}function RB(e,t){return{...e,...NB(t)}}function NB(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function OB(e,t){const n=e.toolCalls??[],r=t.callId?n.findIndex(o=>o.callId===t.callId):-1;if(r>=0){const o=n[r],a=t.args&&Object.keys(t.args).length>0,l=[...n];return l[r]={...o,args:a?t.args:o.args,sessionId:t.sessionId},{...e,sessionId:t.sessionId,toolCalls:l}}return{...e,sessionId:t.sessionId,toolCalls:[...n,t]}}function jB(e,t){const n=e.toolCalls??[];if(n.length===0)return e;let r=-1;if(t.callId&&(r=n.findIndex(a=>a.callId===t.callId)),r===-1&&t.toolName){for(let a=n.length-1;a>=0;a--)if(n[a].toolName===t.toolName&&n[a].status==="running"){r=a;break}}if(r===-1)return e;const o=[...n];return o[r]={...o[r],error:t.error,errorType:t.errorType,result:t.result,status:t.success?"completed":"error"},{...e,toolCalls:o}}function MB(e,t){const n=e.reasoningContents??[],r=n.at(-1);return t.isThinking&&r?.isThinking?e:{...e,reasoningContents:[...n,t]}}function LB(e,t){if(t.type==="reasoning"){const n=e.reasoningContents??[],r=n.length-1,o=n[r];if(o){const a=[...n];return a[r]={...o,content:o.content+t.content,isThinking:!1},{...e,isStreaming:!t.isComplete,reasoningContents:a,sessionId:t.sessionId??e.sessionId}}return{...e,isStreaming:!t.isComplete,reasoningContents:[{content:t.content,isThinking:!1,timestamp:Date.now()}],sessionId:t.sessionId??e.sessionId}}return{...e,isStreaming:!t.isComplete,sessionId:t.sessionId??e.sessionId,streamingContent:(e.streamingContent??"")+t.content}}function _B(e,t){return{...e,isStreaming:!1,responseContent:t.content,sessionId:t.sessionId??e.sessionId,streamingContent:void 0}}function GT(e){return e==="curate-folder"?"curate":e}const YT=new Set(["cancelled","completed","error"]);function ro(e){return YT.has(e)}function If(e){return!YT.has(e)}const xC={searchQuery:"",statusFilter:"all",tasks:[],typeFilter:"all"};function Eu(e,t,n){const r=e.tasks.findIndex(l=>l.taskId===t);if(r===-1)return;const o=n(e.tasks[r]);if(o===e.tasks[r])return;const a=[...e.tasks];return a[r]=o,{tasks:a}}const ri=yc()(yx((e,t)=>({...xC,addReasoningContent:(n,r)=>e(o=>Eu(o,n,a=>MB(a,r))??{}),addToolCall:(n,r)=>e(o=>Eu(o,n,a=>OB(a,r))??{}),appendStreamingContent:({content:n,isComplete:r,sessionId:o,taskId:a,type:l})=>e(c=>Eu(c,a,f=>LB(f,{content:n,isComplete:r,sessionId:o,type:l}))??{}),clearCompleted:()=>e(n=>({tasks:n.tasks.filter(r=>!ro(r.status))})),mergeTasks:n=>e(r=>({tasks:yC(r.tasks,n)})),removeTask:n=>e(r=>({tasks:AB(r.tasks,n)})),reset:()=>e({...xC}),setResponse:(n,r,o)=>e(a=>Eu(a,n,l=>_B(l,{content:r,sessionId:o}))??{}),setSearchQuery:n=>e({searchQuery:n}),setStatusFilter:n=>e({statusFilter:n}),setTypeFilter:n=>e({typeFilter:n}),updateToolCallResult:({callId:n,error:r,errorType:o,result:a,success:l,taskId:c,toolName:f})=>e(d=>Eu(d,c,g=>jB(g,{callId:n,error:r,errorType:o,result:a,success:l,toolName:f}))??{}),upsertStatus(n,r){const o=t().tasks.find(l=>l.taskId===n),a=o?{...o,...r}:{content:"",createdAt:Date.now(),type:"unknown",...r,taskId:n};e(l=>({tasks:yC(l.tasks,[a])}))}}),{name:"brv-tasks",partialize:e=>({tasks:e.tasks}),storage:a0(()=>sessionStorage)})),DB=["all","running","completed","failed","cancelled"];function IB(e,t){return t==="all"?!0:t==="running"?e==="started"||e==="created":t==="completed"?e==="completed":t==="failed"?e==="error":t==="cancelled"?e==="cancelled":!0}function zB(e,t){if(!t)return!0;const n=t.toLowerCase();return e.content.toLowerCase().includes(n)||e.taskId.toLowerCase().includes(n)||e.type.toLowerCase().includes(n)}const PB=e=>ri(t=>e?t.tasks.find(n=>n.taskId===e):void 0),FB=()=>{const e=ri(n=>n.tasks),t={all:e.length,cancelled:0,completed:0,failed:0,running:0};for(const n of e)switch(n.status){case"cancelled":{t.cancelled++;break}case"completed":{t.completed++;break}case"created":case"started":{t.running++;break}case"error":{t.failed++;break}}return t},BB=()=>{const e=ri(o=>o.tasks);let t=0,n=0,r=0;for(const o of e)o.status==="created"?t++:o.status==="started"?n++:r++;return{completed:r,inProgress:n,pending:t,total:e.length}};function HB(){const e=Be(t=>t.apiClient);C.useEffect(()=>{if(!e)return;const t=ri.getState(),n=[];return n.push(e.on(ks.CREATED,r=>{t.upsertStatus(r.taskId,{content:r.content,createdAt:Date.now(),...r.files?.length?{files:r.files}:{},...r.folderPath?{folderPath:r.folderPath}:{},status:"created",type:r.type})}),e.on(ks.STARTED,r=>{t.upsertStatus(r.taskId,{startedAt:Date.now(),status:"started"})}),e.on(ks.COMPLETED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),result:r.result,status:"completed"})}),e.on(ks.ERROR,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),error:r.error,status:"error"})}),e.on(ks.CANCELLED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),status:"cancelled"})}),e.on(Cu.TOOL_CALL,r=>{r.taskId&&t.addToolCall(r.taskId,{args:r.args,callId:r.callId,sessionId:r.sessionId,status:"running",timestamp:Date.now(),toolName:r.toolName})}),e.on(Cu.TOOL_RESULT,r=>{r.taskId&&t.updateToolCallResult({callId:r.callId,error:r.error,errorType:r.errorType,result:r.result,success:r.success,taskId:r.taskId,toolName:r.toolName})}),e.on(Cu.CHUNK,r=>{r.taskId&&t.appendStreamingContent({content:r.content,isComplete:r.isComplete??!1,sessionId:r.sessionId,taskId:r.taskId,type:r.type==="reasoning"?"reasoning":"text"})}),e.on(Cu.RESPONSE,r=>{r.taskId&&t.setResponse(r.taskId,r.content,r.sessionId)}),e.on(Cu.THINKING,r=>{r.taskId&&t.addReasoningContent(r.taskId,{content:"",isThinking:!0,timestamp:Date.now()})})),()=>{for(const r of n)r()}},[e])}function UB(){const e=Be(a=>a.selectedProject),t=ri(a=>a.reset),n=ri(a=>a.mergeTasks),r=C.useRef(e);HB(),C.useEffect(()=>{r.current!==e&&(t(),r.current=e)},[e,t]);const{data:o}=$T({projectPath:e||void 0});return C.useEffect(()=>{o&&n(o.tasks)},[o,n]),null}function qB(){const e=Wi();return Be(n=>n.selectedProject)?p.jsxs(vB,{children:[p.jsx(EB,{}),p.jsx(UB,{}),p.jsx(bk,{})]}):p.jsx(xk,{replace:!0,state:{from:e},to:"/projects"})}const Wu=["provider","curate","query","connector"],VB={seenWelcome:!1,tourActive:!1,tourCompleted:!1,tourStep:null,tourTaskId:null},on=yc()(yx((e,t)=>({...VB,advanceTour(){const{tourStep:n}=t();if(!n)return;const r=Wu.indexOf(n),o=Wu[r+1];e(o?{tourStep:o,tourTaskId:null}:{tourActive:!1,tourCompleted:!0,tourStep:null,tourTaskId:null})},dismissWelcome:()=>e({seenWelcome:!0}),exitTour:()=>e({tourActive:!1,tourStep:null,tourTaskId:null}),goToStep:n=>e({tourActive:!0,tourStep:n,tourTaskId:null}),setTourTaskId:n=>e({tourTaskId:n}),startTour:(n="provider")=>e({seenWelcome:!0,tourActive:!0,tourStep:n,tourTaskId:null})}),{name:"brv:onboarding",partialize:e=>({seenWelcome:e.seenWelcome,tourCompleted:e.tourCompleted}),storage:a0(()=>globalThis.localStorage)})),$B={connector:"Connect to your AI tool",curate:"Curate your first knowledge",provider:"Connect a provider",query:"Ask your first question"};function GB(){const[e,t]=C.useState(0);return C.useEffect(()=>{const n='[data-slot="sheet-content"][data-side="right"]';let r=null;const o=()=>{const c=document.querySelectorAll(n);let f=0;for(const d of c){const g=d.getBoundingClientRect();g.width>f&&(f=g.width)}t(d=>d===f?d:f)},a=()=>{r?.disconnect();const c=document.querySelectorAll(n);if(c.length===0){o();return}r=new globalThis.ResizeObserver(o);for(const f of c)r.observe(f);o()},l=new globalThis.MutationObserver(a);return l.observe(document.body,{childList:!0,subtree:!0}),a(),()=>{r?.disconnect(),l.disconnect()}},[]),e}function YB(){const e=on(g=>g.tourActive),t=on(g=>g.tourStep),n=on(g=>g.exitTour),r=GB();if(!e||!t)return null;const o=Wu.indexOf(t),l=t==="curate"||t==="query"?"top-4":"bottom-4",c=r>0,f=we("pointer-events-none fixed z-100 flex",l,c?"":"inset-x-0 justify-center px-4"),d=c?{right:`${r+16}px`}:void 0;return p.jsx("div",{className:f,style:d,children:p.jsxs("div",{className:"border-border bg-card text-card-foreground pointer-events-auto inline-flex items-center gap-3 rounded-full border px-3 py-2 pl-3.5 shadow-[0_8px_28px_-10px_rgba(0,0,0,0.25)]",children:[p.jsx("div",{className:"inline-flex items-center gap-1",children:Wu.map((g,h)=>p.jsx("span",{"aria-hidden":!0,className:we("h-1.5 rounded-full transition-all",h<o&&"bg-muted-foreground w-1.5",h===o&&"bg-primary-foreground w-4",h>o&&"bg-border w-1.5")},g))}),p.jsxs("span",{className:"text-foreground text-xs font-medium",children:[p.jsxs("span",{className:"text-muted-foreground mono mr-1.5 text-[10.5px]",children:[o+1,"/",Wu.length]}),$B[t]]}),p.jsx("span",{"aria-hidden":!0,className:"bg-border h-4 w-px"}),p.jsx("button",{className:"text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[11px] transition-colors",onClick:()=>n(),type:"button",children:"Exit tour"})]})})}const Tx=C.createContext(void 0);function Ka(e){const t=C.useContext(Tx);if(e===!1&&t===void 0)throw new Error(Gn(27));return t}const WB={...qs,...pc},Ax=C.forwardRef(function(t,n){const{render:r,className:o,forceRender:a=!1,...l}=t,{store:c}=Ka(),f=c.useState("open"),d=c.useState("nested"),g=c.useState("mounted"),h=c.useState("transitionStatus");return ln("div",t,{state:{open:f,transitionStatus:h},ref:[c.context.backdropRef,n],stateAttributesMapping:WB,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:a||!d})}),KB=C.createContext(void 0);function Rx(e=!1){const t=C.useContext(KB);if(t===void 0&&!e)throw new Error(Gn(16));return t}function QB(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:C.useMemo(()=>{const d={onKeyDown(g){n&&t&&g.key!=="Tab"&&g.preventDefault()}};return r||(d.tabIndex=o,!a&&n&&(d.tabIndex=t?o:-1)),(a&&(t||l)||!a&&n)&&(d["aria-disabled"]=n),a&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,a,o])}}function zf(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:a}=e,l=C.useRef(null),c=Rx(!0),f=a??c!==void 0,{props:d}=QB({focusableWhenDisabled:n,disabled:t,composite:f,tabIndex:r,isNativeButton:o}),g=C.useCallback(()=>{const x=l.current;C2(x)&&f&&t&&d.disabled===void 0&&x.disabled&&(x.disabled=!1)},[t,d.disabled,f]);qe(g,[g]);const h=C.useCallback((x={})=>{const{onClick:v,onMouseDown:S,onKeyUp:E,onKeyDown:k,onPointerDown:T,...R}=x;return Ba({type:o?"button":void 0,onClick(j){if(t){j.preventDefault();return}v?.(j)},onMouseDown(j){t||S?.(j)},onKeyDown(j){if(t||(k1(j),k?.(j),j.baseUIHandlerPrevented))return;const N=j.target===j.currentTarget,A=j.currentTarget,D=C2(A),U=!o&&XB(A),I=N&&(o?D:!U),q=j.key==="Enter",$=j.key===" ",V=A.getAttribute("role"),Y=V?.startsWith("menuitem")||V==="option"||V==="gridcell";if(N&&f&&$){if(j.defaultPrevented&&Y)return;j.preventDefault(),U||o&&D?(A.click(),j.preventBaseUIHandler()):I&&(v?.(j),j.preventBaseUIHandler());return}I&&(!o&&($||q)&&j.preventDefault(),!o&&q&&v?.(j))},onKeyUp(j){if(!t){if(k1(j),E?.(j),j.target===j.currentTarget&&o&&f&&C2(j.currentTarget)&&j.key===" "){j.preventDefault();return}j.baseUIHandlerPrevented||j.target===j.currentTarget&&!o&&!f&&j.key===" "&&v?.(j)}},onPointerDown(j){if(t){j.preventDefault();return}T?.(j)}},o?void 0:{role:"button"},d,R)},[t,d,f,o]),y=st(x=>{l.current=x,g()});return{getButtonProps:h,buttonRef:y}}function C2(e){return Rn(e)&&e.tagName==="BUTTON"}function XB(e){return!!(e?.tagName==="A"&&e?.href)}const Pf=C.forwardRef(function(t,n){const{render:r,className:o,disabled:a=!1,nativeButton:l=!0,...c}=t,{store:f}=Ka(),d=f.useState("open");function g(v){d&&f.setOpen(!1,Et(B_,v.nativeEvent))}const{getButtonProps:h,buttonRef:y}=zf({disabled:a,native:l});return ln("button",t,{state:{disabled:a},ref:[n,y],props:[{onClick:g},c,h]})}),WT=C.forwardRef(function(t,n){const{render:r,className:o,id:a,...l}=t,{store:c}=Ka(),f=Gi(a);return c.useSyncedValueWithCleanup("descriptionElementId",f),ln("p",t,{ref:n,props:[{id:f},l]})});let ZB=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),JB=(function(e){return e[e.open=Rs.open]="open",e[e.closed=Rs.closed]="closed",e[e.startingStyle=Rs.startingStyle]="startingStyle",e[e.endingStyle=Rs.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const KT=C.createContext(void 0);function eH(){const e=C.useContext(KT);if(e===void 0)throw new Error(Gn(26));return e}const QT="ArrowUp",XT="ArrowDown",ZT="ArrowLeft",JT="ArrowRight",e9="Home",t9="End",tH=new Set([ZT,JT]),nH=new Set([QT,XT]),rH=new Set([...tH,...nH]);[...rH];const n9=new Set([QT,XT,ZT,JT,e9,t9]),iH={...qs,...pc,nestedDialogOpen(e){return e?{[JB.nestedDialogOpen]:""}:null}},Nx=C.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:a,render:l,...c}=t,{store:f}=Ka(),d=f.useState("descriptionElementId"),g=f.useState("disablePointerDismissal"),h=f.useState("floatingRootContext"),y=f.useState("popupProps"),x=f.useState("modal"),v=f.useState("mounted"),S=f.useState("nested"),E=f.useState("nestedOpenDialogCount"),k=f.useState("open"),T=f.useState("openMethod"),R=f.useState("titleElementId"),L=f.useState("transitionStatus"),j=f.useState("role");eH(),mc({open:k,ref:f.context.popupRef,onComplete(){k&&f.context.onOpenChangeComplete?.(!0)}});function N(q){return q==="touch"?f.context.popupRef.current:!0}const A=a===void 0?N:a,D=E>0,I=ln("div",t,{state:{open:k,nested:S,transitionStatus:L,nestedDialogOpen:D},props:[y,{"aria-labelledby":R??void 0,"aria-describedby":d??void 0,role:j,tabIndex:-1,hidden:!v,onKeyDown(q){n9.has(q.key)&&q.stopPropagation()},style:{[ZB.nestedDialogs]:E}},c],ref:[n,f.context.popupRef,f.useStateSetter("popupElement")],stateAttributesMapping:iH});return p.jsx(x6,{context:h,openInteractionType:T,disabled:!v,closeOnFocusOut:!g,initialFocus:A,returnFocus:o,modal:x!==!1,restoreFocus:"popup",children:I})}),r9=C.forwardRef(function(t,n){const{cutout:r,...o}=t;let a;if(r){const l=r?.getBoundingClientRect();a=`polygon(
13
- 0% 0%,
14
- 100% 0%,
15
- 100% 100%,
16
- 0% 100%,
17
- 0% 0%,
18
- ${l.left}px ${l.top}px,
19
- ${l.left}px ${l.bottom}px,
20
- ${l.right}px ${l.bottom}px,
21
- ${l.right}px ${l.top}px,
22
- ${l.left}px ${l.top}px
23
- )`}return p.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),Ox=C.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:a}=Ka(),l=a.useState("mounted"),c=a.useState("modal"),f=a.useState("open");return l||r?p.jsx(KT.Provider,{value:r,children:p.jsxs(h6,{ref:n,...o,children:[l&&c===!0&&p.jsx(r9,{ref:a.context.internalBackdropRef,inert:K6(!f)}),t.children]})}):null});let bC={},vC={},wC="";function oH(e){if(typeof document>"u")return!1;const t=Gt(e);return $n(t).innerWidth-t.documentElement.clientWidth>0}function aH(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Gt(e),r=n.documentElement,o=n.body,a=$a(r)?r:o,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const f=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,f===d}function sH(e){const t=Gt(e),n=t.documentElement,r=t.body,o=$a(n)?n:r,a={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,a)}}function lH(e){const t=Gt(e),n=t.documentElement,r=t.body,o=$n(n);let a=0,l=0,c=!1;const f=to.create();if(jk&&(o.visualViewport?.scale??1)!==1)return()=>{};function d(){const y=o.getComputedStyle(n),x=o.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,bC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},wC=n.style.scrollBehavior,vC={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const k=n.scrollHeight>n.clientHeight,T=n.scrollWidth>n.clientWidth,R=y.overflowY==="scroll"||x.overflowY==="scroll",L=y.overflowX==="scroll"||x.overflowX==="scroll",j=Math.max(0,o.innerWidth-r.clientWidth),N=Math.max(0,o.innerHeight-r.clientHeight),A=parseFloat(x.marginTop)+parseFloat(x.marginBottom),D=parseFloat(x.marginLeft)+parseFloat(x.marginRight),U=$a(n)?n:r;if(c=aH(e),c){n.style.scrollbarGutter=E,U.style.overflowY="hidden",U.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(k||R)&&(n.style.overflowY="scroll"),(T||L)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||N?`calc(100dvh - ${A+N}px)`:"100dvh",width:D||j?`calc(100vw - ${D+j}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function g(){Object.assign(n.style,bC),Object.assign(r.style,vC),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=wC)}function h(){g(),f.request(d)}return d(),o.addEventListener("resize",h),()=>{f.cancel(),g(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",h)}}class cH{lockCount=0;restore=null;timeoutLock=$i.create();timeoutUnlock=$i.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Gt(t).documentElement,o=$n(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=dr;return}const a=Mk||!oH(t);this.restore=a?sH(t):lH(t)}}const uH=new cH;function i9(e=!0,t=null){qe(()=>{if(e)return uH.acquire(t)},[e,t])}function fH(e){const t=C.useRef(""),n=C.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:C.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function o9(e,t){const n=C.useRef(e),r=st(t);qe(()=>{n.current!==e&&r(n.current)},[e,r]),qe(()=>{n.current=e},[e])}function a9(e){const[t,n]=C.useState(null),r=st((l,c)=>{e||n(c||(Mk?"touch":""))});o9(e,l=>{l&&!e&&n(null)});const{onClick:o,onPointerDown:a}=fH(r);return C.useMemo(()=>({openMethod:t,triggerProps:{onClick:o,onPointerDown:a}}),[t,o,a])}function s9(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),a=t.useState("disablePointerDismissal"),l=t.useState("modal"),c=t.useState("popupElement"),{openMethod:f,triggerProps:d}=a9(o);Zy(t);const{forceUnmount:g}=Jy(o,t),h=st(U=>{const I=Et(U);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),y=C.useCallback(()=>{t.setOpen(!1,h(qy))},[t,h]);C.useImperativeHandle(r,()=>({unmount:g,close:y}),[g,y]);const x=nx({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),E=v===0,k=F6(x),T=Wy(x,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(U){if(!t.context.outsidePressEnabledRef.current||"button"in U&&U.button!==0||"touches"in U&&U.touches.length!==1)return!1;const I=Ar(U);if(E&&!a){const q=I;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===q||t.context.backdropRef.current===q||ht(q,c)&&!q?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:E});i9(o&&l===!0,c);const{getReferenceProps:R,getFloatingProps:L,getTriggerProps:j}=Lf([k,T]);t.useContextCallback("onNestedDialogOpen",U=>{S(U+1)}),t.useContextCallback("onNestedDialogClose",()=>{S(0)}),C.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(v),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,v]);const N=C.useMemo(()=>R(d),[R,d]),A=C.useMemo(()=>j(d),[j,d]),D=C.useMemo(()=>L(),[L]);t.useSyncedValues({openMethod:f,activeTriggerProps:N,inactiveTriggerProps:A,popupProps:D,floatingRootContext:x,nestedOpenDialogCount:v})}const dH={...tx,modal:rt(e=>e.modal),nested:rt(e=>e.nested),nestedOpenDialogCount:rt(e=>e.nestedOpenDialogCount),disablePointerDismissal:rt(e=>e.disablePointerDismissal),openMethod:rt(e=>e.openMethod),descriptionElementId:rt(e=>e.descriptionElementId),titleElementId:rt(e=>e.titleElementId),viewportElement:rt(e=>e.viewportElement),role:rt(e=>e.role)};class l9 extends n0{constructor(t){super(hH(t),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Mf,onOpenChange:void 0,onOpenChangeComplete:void 0},dH)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},a=n.trigger?.id??null;(a||t)&&(o.activeTriggerId=a,o.activeTriggerElement=n.trigger??null),this.update(o)}}function hH(e={}){return{...ex(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function c9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:a,disablePointerDismissal:l=!1,modal:c=!0,actionsRef:f,handle:d,triggerId:g,defaultTriggerId:h=null}=e,y=Ka(!0),x=!!y,v=Zn(()=>d?.store??new l9({open:r,openProp:n,activeTriggerId:h,triggerIdProp:g,modal:c,disablePointerDismissal:l,nested:x})).current;My(()=>{n===void 0&&v.state.open===!1&&r===!0&&v.update({open:!0,activeTriggerId:h})}),v.useControlledProp("openProp",n),v.useControlledProp("triggerIdProp",g),v.useSyncedValues({disablePointerDismissal:l,nested:x,modal:c}),v.useContextCallback("onOpenChange",o),v.useContextCallback("onOpenChangeComplete",a);const S=v.useState("payload");s9({store:v,actionsRef:f,parentContext:y?.store.context});const E=C.useMemo(()=>({store:v}),[v]);return p.jsx(Tx.Provider,{value:E,children:typeof t=="function"?t({payload:S}):t})}const u9=C.forwardRef(function(t,n){const{render:r,className:o,id:a,...l}=t,{store:c}=Ka(),f=Gi(a);return c.useSyncedValueWithCleanup("titleElementId",f),ln("h2",t,{ref:n,props:[{id:f},l]})}),pH=C.forwardRef(function(t,n){const{render:r,className:o,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...f}=t,{getButtonProps:d,buttonRef:g}=zf({disabled:a,focusableWhenDisabled:l,native:c});return ln("button",t,{state:{disabled:a},ref:[n,g],props:[f,d]})}),mH=o0("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer",{variants:{variant:{default:"bg-primary text-foreground font-medium hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-background dark:hover:bg-muted",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive text-foreground hover:bg-destructive/80 focus-visible:border-destructive/40 focus-visible:ring-destructive/20",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function De({className:e,variant:t="default",size:n="default",...r}){return p.jsx(pH,{"data-slot":"button",className:we(mH({variant:t,size:n,className:e})),...r})}function $s({...e}){return p.jsx(c9,{"data-slot":"dialog",...e})}function gH({...e}){return p.jsx(Ox,{"data-slot":"dialog-portal",...e})}function H1({...e}){return p.jsx(Pf,{"data-slot":"dialog-close",...e})}function yH({className:e,...t}){return p.jsx(Ax,{"data-slot":"dialog-overlay",className:we("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function Gs({className:e,children:t,showCloseButton:n=!0,...r}){return p.jsxs(gH,{children:[p.jsx(yH,{}),p.jsxs(Nx,{"data-slot":"dialog-content",className:we("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[t,n&&p.jsxs(Pf,{"data-slot":"dialog-close",render:p.jsx(De,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[p.jsx(qp,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ui({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:we("flex flex-col gap-2",e),...t})}function Qa({className:e,showCloseButton:t=!1,children:n,...r}){return p.jsxs("div",{"data-slot":"dialog-footer",className:we("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&p.jsx(Pf,{render:p.jsx(De,{variant:"outline"}),children:"Close"})]})}function fi({className:e,...t}){return p.jsx(u9,{"data-slot":"dialog-title",className:we("leading-none text-lg font-semibold text-foreground",e),...t})}function Ff({className:e,...t}){return p.jsx(WT,{"data-slot":"dialog-description",className:we("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const f9=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const xH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const bH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const SC=e=>{const t=bH(e);return t.charAt(0).toUpperCase()+t.slice(1)};var E2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const vH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},wH=C.createContext({}),SH=()=>C.useContext(wH),CH=C.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...c},f)=>{const{size:d=24,strokeWidth:g=2,absoluteStrokeWidth:h=!1,color:y="currentColor",className:x=""}=SH()??{},v=r??h?Number(n??g)*24/Number(t??d):n??g;return C.createElement("svg",{ref:f,...E2,width:t??d??E2.width,height:t??d??E2.height,stroke:e??y,strokeWidth:v,className:f9("lucide",x,o),...!a&&!vH(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,E])=>C.createElement(S,E)),...Array.isArray(a)?a:[a]])});const ft=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(CH,{ref:a,iconNode:t,className:f9(`lucide-${xH(SC(e))}`,`lucide-${e}`,r),...o}));return n.displayName=SC(e),n};const EH=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],kH=ft("arrow-down-left",EH);const TH=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],AH=ft("arrow-down",TH);const RH=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],NH=ft("arrow-right-left",RH);const OH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],d9=ft("arrow-right",OH);const jH=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],MH=ft("arrow-up",jH);const LH=[["path",{d:"M13.5 10.5 15 9",key:"1nsxvm"}],["path",{d:"M4 4v15a1 1 0 0 0 1 1h15",key:"1w6lkd"}],["path",{d:"M4.293 19.707 6 18",key:"3g1p8c"}],["path",{d:"m9 15 1.5-1.5",key:"1xfbes"}]],_H=ft("axis-3d",LH);const DH=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],IH=ft("book-open",DH);const zH=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],PH=ft("bug",zH);const FH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ys=ft("check",FH);const BH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bf=ft("chevron-down",BH);const HH=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Fs=ft("chevron-left",HH);const UH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],h9=ft("chevron-right",UH);const qH=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],VH=ft("chevron-up",qH);const $H=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],GH=ft("chevrons-left",$H);const YH=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],WH=ft("chevrons-right",YH);const KH=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],QH=ft("circle-play",KH);const XH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ZH=ft("circle-question-mark",XH);const JH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],eU=ft("circle-x",JH);const tU=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],nU=ft("command",tU);const rU=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],iU=ft("copy",rU);const oU=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],aU=ft("external-link",oU);const sU=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],lU=ft("file-diff",sU);const cU=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],c0=ft("file-text",cU);const uU=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],fU=ft("folder-open",uU);const dU=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],p9=ft("folder",dU);const hU=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],pU=ft("git-commit-horizontal",hU);const mU=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],jx=ft("git-branch",mU);const gU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],yU=ft("globe",gU);const xU=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],m9=ft("house",xU);const bU=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],vU=ft("key",bU);const wU=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],SU=ft("lightbulb",wU);const CU=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],EU=ft("list-todo",CU);const kU=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ai=ft("loader-circle",kU);const TU=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],AU=ft("log-out",TU);const RU=[["path",{d:"M5 12h14",key:"1ays0h"}]],Mx=ft("minus",RU);const NU=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],OU=ft("paperclip",NU);const jU=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],MU=ft("plug",jU);const LU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xa=ft("plus",LU);const _U=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],vc=ft("search",_U);const DU=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],IU=ft("server",DU);const zU=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],PU=ft("sparkles",zU);const FU=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],BU=ft("square-arrow-out-up-right",FU);const HU=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],UU=ft("trash-2",HU);const qU=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],VU=ft("triangle-alert",qU);const $U=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],g9=ft("undo-2",$U);const GU=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Lx=ft("user",GU);const YU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],y9=ft("x",YU),WU={ERR_NOT_AUTHENTICATED:"Please sign in to continue.",ERR_PROVIDER_NOT_CONFIGURED:"No provider is connected, or its credentials are missing or expired.",ERR_VC_ALREADY_INITIALIZED:"Version control is already initialized for this project.",ERR_VC_AUTH_FAILED:"Authentication failed. Please sign in and try again.",ERR_VC_BRANCH_NOT_FOUND:"Branch not found. You can create a new branch if needed.",ERR_VC_NO_COMMITS:"Make at least one commit before continuing.",ERR_VC_NO_REMOTE:"No remote is configured yet. Set one up before using pull, push, or fetch.",ERR_VC_NO_UPSTREAM:"This branch has no upstream configured yet. Use the Push button to publish it and set upstream in one step.",ERR_VC_NON_FAST_FORWARD:"The remote has changes. Pull first, then try again.",ERR_VC_NOTHING_TO_PUSH:"Nothing to push — stage and commit your changes first.",ERR_VC_REMOTE_ALREADY_EXISTS:"A remote named 'origin' already exists. Remove or rename it before adding a new one.",ERR_VC_USER_NOT_CONFIGURED:({projectPath:e})=>e?`Please run \`brv vc config\` in "${e}" to set your commit author before committing.`:"Please run `brv vc config` inside your project to set commit author before committing."},KU="Something went wrong";function CC(e,t){return typeof e=="object"&&e!==null&&t in e&&typeof e[t]=="string"}function Cn(e,t=KU,n={}){if(CC(e,"code")){const r=WU[e.code];if(r!==void 0)return typeof r=="function"?r(n):r}return CC(e,"message")?e.message:t}const QU=async({contextLength:e,modelId:t,providerId:n})=>{const{apiClient:r}=Be.getState();if(!r)throw new Error("Not connected");const o=await r.request(qT.SET_ACTIVE,{contextLength:e,modelId:t,providerId:n});if(!o.success&&o.error)throw new Error(o.error);return o},XU=({mutationConfig:e}={})=>wn({...e,mutationFn:QU});function u0({label:e}){return p.jsx(Yo,{className:"mono border-primary-foreground bg-primary-foreground/20 h-6 w-fit gap-1 px-2 text-[10px] tracking-[0.08em] uppercase",variant:"outline",children:e})}const ZU=3e5,JU=({providerId:e})=>{const{apiClient:t}=Be.getState();return t?t.request(Wo.AWAIT_OAUTH_CALLBACK,{providerId:e},{timeout:ZU}):Promise.reject(new Error("Not connected"))},eq=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:bc().queryKey}),n?.(...o)},...r,mutationFn:JU})},tq=({apiKey:e,baseUrl:t,providerId:n})=>{const{apiClient:r}=Be.getState();return r?r.request(Wo.CONNECT,{apiKey:e,baseUrl:t,providerId:n}):Promise.reject(new Error("Not connected"))},nq=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:bc().queryKey}),n?.(...o)},...r,mutationFn:tq})},rq=({providerId:e})=>{const{apiClient:t}=Be.getState();return t?t.request(Wo.DISCONNECT,{providerId:e}):Promise.reject(new Error("Not connected"))},iq=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:bc().queryKey}),n?.(...o)},...r,mutationFn:rq})},oq=({providerId:e})=>{const{apiClient:t}=Be.getState();return t?t.request(Wo.SET_ACTIVE,{providerId:e}):Promise.reject(new Error("Not connected"))},aq=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:bc().queryKey}),t.invalidateQueries({queryKey:Ex().queryKey}),n?.(...o)},...r,mutationFn:oq})},sq=({providerId:e})=>{const{apiClient:t}=Be.getState();return t?t.request(Wo.START_OAUTH,{providerId:e}):Promise.reject(new Error("Not connected"))},lq=({mutationConfig:e}={})=>wn({...e,mutationFn:sq}),cq=({apiKey:e,providerId:t})=>{const{apiClient:n}=Be.getState();return n?n.request(Wo.VALIDATE_API_KEY,{apiKey:e,providerId:t}):Promise.reject(new Error("Not connected"))},uq=({mutationConfig:e}={})=>wn({...e,mutationFn:cq});let EC=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const fq={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Hu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},dq={disabled:!1,...Hu},_x={valid(e){return e===null?null:e?{[EC.valid]:""}:{[EC.invalid]:""}}},hq=C.createContext({invalid:void 0,name:void 0,validityData:{state:fq,errors:[],error:"",value:"",initialValue:null},setValidityData:dr,disabled:void 0,touched:Hu.touched,setTouched:dr,dirty:Hu.dirty,setDirty:dr,filled:Hu.filled,setFilled:dr,focused:Hu.focused,setFocused:dr,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:dq,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ln)=>e,getInputValidationProps:(e=Ln)=>e,inputRef:{current:null},commit:async()=>{}}});function Dx(e=!0){const t=C.useContext(hq);if(t.setValidityData===dr&&!e)throw new Error(Gn(28));return t}const pq=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:dr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function x9(){return C.useContext(pq)}const mq=C.createContext({controlId:void 0,registerControlId:dr,labelId:void 0,setLabelId:dr,messageIds:[],setMessageIds:dr,getDescriptionProps:e=>e});function Ix(){return C.useContext(mq)}function gq(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function b9({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=C.useRef(e!==void 0),[a,l]=C.useState(t),c=o?e:a,f=C.useCallback(d=>{o||l(d)},[]);return[c,f]}function yq(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:a}=Ix(),l=Gi(t),c=n?o:void 0,f=Zn(()=>Symbol("labelable-control")),d=C.useRef(!1),g=C.useRef(t!=null),h=st(()=>{!d.current||a===dr||(d.current=!1,a(f.current,void 0))});return qe(()=>{if(a===dr)return;let y;if(n){const x=r?.current;Yt(x)&&x.closest("label")!=null?y=t??null:y=c??l}else if(t!=null)g.current=!0,y=t;else if(g.current)y=l;else{h();return}if(y===void 0){h();return}d.current=!0,a(f.current,y)},[t,r,c,a,n,l,f,h]),C.useEffect(()=>h,[h]),o??l}function v9(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:a,commit:l}=e,{formRef:c}=x9(),{invalid:f,markedDirtyRef:d,validityData:g,setValidityData:h}=Dx(),y=st(e.getValue);qe(()=>{if(!t)return;let x=n;x===void 0&&(x=y()),g.initialValue===null&&x!==null&&h(v=>({...v,initialValue:x}))},[t,h,n,g.initialValue,y]),qe(()=>{!t||!r||c.current.fields.set(r,{getValue:y,name:o,controlRef:a,validityData:gq(g,f),validate(x=!0){let v=n;v===void 0&&(v=y()),d.current=!0,x?Mi.flushSync(()=>l(v)):l(v)}})},[l,a,t,c,y,r,f,d,o,g,n]),qe(()=>{const x=c.current.fields;return()=>{r&&x.delete(r)}},[c,r])}const xq=C.forwardRef(function(t,n){const{render:r,className:o,id:a,name:l,value:c,disabled:f=!1,onValueChange:d,defaultValue:g,autoFocus:h=!1,...y}=t,{state:x,name:v,disabled:S,setTouched:E,setDirty:k,validityData:T,setFocused:R,setFilled:L,validationMode:j,validation:N}=Dx(),A=S||f,D=v??l,U={...x,disabled:A},{labelId:I}=Ix(),q=yq({id:a});qe(()=>{const F=c!=null;N.inputRef.current?.value||F&&c!==""?L(!0):F&&c===""&&L(!1)},[N.inputRef,L,c]);const $=C.useRef(null);qe(()=>{h&&$.current===ii(Gt($.current))&&R(!0)},[h,R]);const[V]=b9({controlled:c,default:g,name:"FieldControl",state:"value"}),Y=c!==void 0,H=Y?V:void 0;return v9({id:q,name:D,commit:N.commit,value:H,getValue:()=>N.inputRef.current?.value,controlRef:N.inputRef}),ln("input",t,{ref:[n,$],state:U,props:[{id:q,disabled:A,name:D,ref:N.inputRef,"aria-labelledby":I,autoFocus:h,...Y?{value:H}:{defaultValue:g},onChange(F){const G=F.currentTarget.value;d?.(G,Et(Jp,F.nativeEvent)),k(G!==T.initialValue),L(G!=="")},onFocus(){R(!0)},onBlur(F){E(!0),R(!1),j==="onBlur"&&N.commit(F.currentTarget.value)},onKeyDown(F){F.currentTarget.tagName==="INPUT"&&F.key==="Enter"&&(E(!0),N.commit(F.currentTarget.value))}},N.getInputValidationProps(),y],stateAttributesMapping:_x})}),bq=C.createContext({disabled:!1});function vq(){return C.useContext(bq)}const wq=C.createContext(void 0);function Sq(e=!0){const t=C.useContext(wq);if(t===void 0&&!e)throw new Error(Gn(3));return t}const Cq=C.forwardRef(function(t,n){return p.jsx(xq,{ref:n,...t})});function Ko({className:e,type:t,...n}){return p.jsx(Cq,{type:t,"data-slot":"input",className:we("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}function Eq({error:e,isOptional:t,isValidating:n,onBack:r,onSubmit:o,provider:a}){const[l,c]=C.useState("");return p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:r,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Selecting ",a.name]})}),p.jsxs("div",{className:"flex flex-col gap-4",children:[a.apiKeyUrl&&p.jsxs("p",{className:"text-muted-foreground text-sm",children:["Get your API key at"," ",p.jsx("a",{className:"underline hover:text-foreground",href:a.apiKeyUrl,rel:"noopener noreferrer",target:"_blank",children:a.apiKeyUrl})]}),e&&p.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("label",{className:"text-foreground text-sm font-medium",htmlFor:"api-key",children:["Enter your ",a.name," API key"]}),p.jsx(Ko,{id:"api-key",onChange:f=>c(f.target.value),placeholder:"Enter key",type:"password",value:l})]})]}),p.jsxs(Qa,{className:"mt-auto",children:[p.jsx(De,{onClick:r,variant:"secondary",children:"Cancel"}),p.jsx(De,{disabled:!t&&!l.trim()||n,onClick:()=>o(l.trim()),children:n?"Validating...":"Change"})]})]})}function kq({onBack:e,onSelect:t,provider:n}){return p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Connect ",n.name]})}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("button",{className:"hover:bg-muted flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-3 text-left transition-colors",onClick:()=>t("oauth"),type:"button",children:[p.jsx(yU,{className:"text-muted-foreground size-5"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:n.oauthLabel??"Sign in with browser"}),p.jsx("span",{className:"text-muted-foreground text-xs",children:"Authenticate via OAuth in your browser"})]})]}),p.jsxs("button",{className:"hover:bg-muted flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-3 text-left transition-colors",onClick:()=>t("api-key"),type:"button",children:[p.jsx(vU,{className:"text-muted-foreground size-5"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:"Enter API key"}),p.jsx("span",{className:"text-muted-foreground text-xs",children:"Paste your API key manually"})]})]})]}),p.jsx(Qa,{className:"mt-auto",children:p.jsx(De,{onClick:e,variant:"secondary",children:"Cancel"})})]})}function Tq(e){if(!e)return"Base URL is required";try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?void 0:"URL must start with http:// or https://"}catch{return"Invalid URL format"}}function Aq({error:e,onBack:t,onSubmit:n,provider:r}){const[o,a]=C.useState(""),[l,c]=C.useState(),f=l??e,d=C.useCallback(()=>{const g=o.trim().replace(/\/+$/,""),h=Tq(g);if(h){c(h);return}c(void 0),n(g)},[o,n]);return p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Selecting ",r.name]})}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("label",{className:"text-foreground text-sm font-medium",htmlFor:"base-url",children:"Enter endpoint manually"}),p.jsx(Ko,{id:"base-url",onChange:g=>{a(g.target.value),c(void 0)},placeholder:"http://localhost:11434/v1",value:o}),f&&p.jsx("p",{className:"text-destructive text-sm",children:f})]}),p.jsxs(Qa,{className:"mt-auto",children:[p.jsx(De,{onClick:t,variant:"secondary",children:"Cancel"}),p.jsx(De,{disabled:!o.trim(),onClick:d,children:"Change"})]})]})}const w9=()=>{const{apiClient:e}=Be.getState();return e?e.request(_f.START_LOGIN,{skipBrowserLaunch:!0}):Promise.reject(new Error("Not connected"))},S9=e=>{const{apiClient:t}=Be.getState();return t?t.on(_f.LOGIN_COMPLETED,e):()=>{}};function zx(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}const Rq=2500;function Nq({onAuthenticated:e,onBack:t}){const n=cn(),r=ji(f=>f.isAuthorized),o=ji(f=>f.setLoggingIn),[a,l]=C.useState({type:"idle"});C.useEffect(()=>{r&&a.type==="waiting"&&(o(!1),e())},[r,e,o,a.type]),C.useEffect(()=>a.type!=="waiting"?void 0:S9(d=>{d.success&&d.user?n.invalidateQueries({queryKey:so().queryKey}):l({message:d.error??"Authentication failed",type:"error"}),o(!1)}),[n,o,a.type]),C.useEffect(()=>{if(a.type!=="waiting")return;let f=!1;async function d(){try{const h=await n.fetchQuery(so());if(f)return;h.isAuthorized&&(n.invalidateQueries({queryKey:so().queryKey}),o(!1))}catch{}}const g=globalThis.setInterval(d,Rq);return()=>{f=!0,globalThis.clearInterval(g)}},[n,o,a.type]);async function c(){o(!0);const f=window.open("about:blank","_blank");l({type:"starting"});try{const d=await w9();if(!zx(d.authUrl))throw f?.close(),new Error("Received an unsafe OAuth URL from the daemon");f&&!f.closed?f.location.href=d.authUrl:window.open(d.authUrl,"_blank","noopener,noreferrer"),l({authUrl:d.authUrl,type:"waiting"})}catch(d){o(!1),l({message:d instanceof Error?d.message:"Unable to start login",type:"error"})}}return p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Sign in to ByteRover"]})}),p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("p",{className:"text-muted-foreground text-sm",children:["ByteRover requires authentication before it can be used as a provider. Sign in to your"," ",p.jsx("span",{className:"text-foreground",children:"byterover.dev"})," account to continue."]}),a.type==="starting"&&p.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-blue-700",children:[p.jsx(ai,{className:"size-4 animate-spin"}),"Starting authentication…"]}),a.type==="waiting"&&p.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border bg-card p-3",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(ai,{className:"text-primary size-4 animate-spin"}),"Finish signing in in the new tab."]}),p.jsxs("div",{className:"text-muted-foreground pl-6 text-xs",children:["If the tab didn’t open,"," ",p.jsx("a",{className:"underline underline-offset-2",href:a.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),a.type==="error"&&p.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:a.message})]}),p.jsxs(Qa,{className:"mt-auto",children:[p.jsx(De,{onClick:t,variant:"secondary",children:"Cancel"}),a.type==="error"?p.jsx(De,{onClick:()=>l({type:"idle"}),children:"Try again"}):p.jsx(De,{disabled:a.type==="starting"||a.type==="waiting",onClick:c,children:a.type==="waiting"?"Waiting…":"Sign in"})]})]})}const Oq=({providerId:e})=>{const{apiClient:t}=Be.getState();return t?t.request(qT.LIST,{providerId:e}):Promise.reject(new Error("Not connected"))},jq=e=>({queryFn:()=>Oq({providerId:e}),queryKey:["models",e]}),C9=({providerId:e,queryConfig:t})=>br({...jq(e),...t});function Mq({onBack:e,onSelect:t,providerId:n}){const[r,o]=C.useState(""),{data:a,isLoading:l}=C9({providerId:n}),[c,f]=C.useState(),d=C.useMemo(()=>a?.models??[],[a?.models]);C.useEffect(()=>{a?.activeModel&&!c&&f(a.activeModel)},[a?.activeModel,c]);const g=C.useMemo(()=>{if(!r)return d;const y=r.toLowerCase();return d.filter(x=>x.name.toLowerCase().includes(y)||x.id.toLowerCase().includes(y))},[d,r]),h=C.useMemo(()=>d.find(y=>y.id===c),[d,c]);return l?p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Choose model"]})}),p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})})]}):p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:p.jsx(Fs,{className:"size-5"})}),"Choose model"]})}),p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(vc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),p.jsx(Ko,{className:"pl-9",onChange:y=>o(y.target.value),placeholder:"Search...",value:r})]}),p.jsxs("div",{className:"max-h-96 overflow-y-auto",children:[g.map(y=>{const x=y.id===c;return p.jsxs("button",{className:`border-border flex w-full cursor-pointer items-center justify-between border-b px-3 py-2.5 text-left transition-colors last:border-b-0 ${x?"bg-primary/10":"hover:bg-muted"}`,onClick:()=>f(y.id),type:"button",children:[p.jsx("span",{className:"text-foreground text-sm",children:y.name}),x&&p.jsx(Ys,{className:"text-primary size-4"})]},y.id)}),g.length===0&&p.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No models found"})]})]}),p.jsxs(Qa,{className:"mt-auto",children:[p.jsx(De,{onClick:e,variant:"secondary",children:"Cancel"}),p.jsx(De,{disabled:!h,onClick:()=>h&&t(h),children:"Confirm"})]})]})}function Lq({error:e,onAction:t,onBack:n,provider:r}){const{data:o}=C9({providerId:r.id}),a=o?.activeModel,l=r.id==="byterover";return p.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[p.jsx(ui,{children:p.jsxs(fi,{className:"flex items-center gap-2",children:[p.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:n,type:"button",children:p.jsx(Fs,{className:"size-5"})}),r.name]})}),p.jsxs("div",{className:"flex flex-col gap-4",children:[e&&p.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),l?p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:"Status"}),p.jsx("span",{className:"text-muted-foreground text-sm",children:r.isConnected?"Connected":"Not connected"})]}),r.isConnected&&p.jsx(De,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:"Model"}),p.jsx("span",{className:"text-muted-foreground text-sm",children:a??"Not selected"})]}),p.jsx(De,{onClick:()=>t("change_model"),size:"sm",variant:"outline",children:"Change"})]}),p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:r.authMethod==="oauth"?"OAuth":"API Key"}),p.jsx("span",{className:"text-muted-foreground text-sm",children:r.authMethod==="oauth"?"Authenticated via browser":"****************"})]}),p.jsx(De,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]})]})]}),!r.isCurrent&&p.jsxs(Qa,{className:"mt-auto",children:[p.jsx(De,{onClick:n,variant:"secondary",children:"Cancel"}),p.jsx(De,{onClick:()=>t("activate"),children:"Active"})]})]})}const _q="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.53096%2012.97L8.07285%2010.9839L8.13242%2010.8115L8.07285%2010.7155H7.90026L7.30833%2010.679L5.28456%2010.6244L3.5294%2010.5515L1.82897%2010.4604L1.4011%2010.3693L1%209.84087L1.04132%209.57726L1.40112%209.33553L1.91647%209.38047L3.05537%209.45823L4.76433%209.57605L6.00411%209.64894L7.8407%209.83964H8.13242L8.17374%209.72182L8.07407%209.64894L7.99629%209.57605L6.22776%208.37831L4.31339%207.11255L3.31063%206.38372L2.76851%206.01443L2.49504%205.66823L2.37713%204.91268L2.86941%204.3709L3.53062%204.41585L3.69958%204.46079L4.3693%204.97583L5.79991%206.08247L7.66811%207.45754L7.94158%207.68469L8.05098%207.60696L8.06435%207.55229L7.94158%207.34701L6.92544%205.51154L5.84125%203.64449L5.35869%202.8707L5.23107%202.40667C5.1861%202.21595%205.15329%202.05561%205.15329%201.86003L5.71361%201.09961L6.02356%201L6.77108%201.09961L7.0859%201.37293L7.55021%202.43462L8.30258%204.10609L9.46944%206.37885L9.81099%207.05303L9.9933%207.67741L10.0614%207.86813H10.1793V7.75881L10.2753%206.47848L10.4528%204.9066L10.6254%202.88406L10.6849%202.31435L10.9669%201.63166L11.5272%201.2624L11.9648%201.47133L12.3246%201.98638L12.2748%202.31922L12.0608%203.70888L11.6415%205.8857L11.368%207.34338H11.5272L11.7095%207.16118L12.4474%206.18209L13.6871%204.6333L14.2341%204.01864L14.8722%203.3396L15.2818%203.01648H16.0561L16.6262%203.86316L16.3709%204.73776L15.5736%205.74843L14.9123%206.60483L13.9643%207.88029L13.3723%208.90067L13.427%208.98206L13.568%208.96869L15.7097%208.51317L16.8668%208.30424L18.2476%208.06736L18.8724%208.3589L18.9404%208.65528L18.6949%209.26145L17.2181%209.62586L15.4861%209.97207L12.9068%2010.5819L12.8752%2010.605L12.9117%2010.6499L14.0737%2010.7592L14.5708%2010.7859H15.7875L18.0531%2010.9548L18.6451%2011.3459L19%2011.8246L18.9404%2012.189L18.0288%2012.653L16.7988%2012.3614L13.9278%2011.6788L12.9433%2011.4334H12.8072V11.5148L13.6276%2012.3165L15.1311%2013.6734L17.0139%2015.4226L17.1099%2015.855L16.8681%2016.1964L16.6128%2016.1599L14.9585%2014.9161L14.3204%2014.3561L12.8752%2013.1401H12.7792V13.2676L13.1122%2013.7548L14.871%2016.3968L14.9622%2017.2071L14.8346%2017.4706L14.3788%2017.6298L13.878%2017.5387L12.8485%2016.0944L11.7861%2014.4678L10.9292%2013.0101L10.8247%2013.0697L10.3191%2018.5129L10.0821%2018.7911L9.53507%2019L9.07927%2018.6538L8.83739%2018.0938L9.07927%2016.9872L9.37099%2015.5429L9.608%2014.3949L9.82193%2012.9688L9.94955%2012.4951L9.94105%2012.4635L9.83651%2012.4769L8.76081%2013.9528L7.12479%2016.1624L5.83031%2017.5472L5.52036%2017.6699L4.98312%2017.3917L5.03294%2016.8949L5.33317%2016.4527L7.12479%2014.1751L8.20535%2012.7635L8.90303%2011.9485L8.89817%2011.8306H8.85684L4.09825%2014.9185L3.25106%2015.0278L2.88643%2014.6865L2.9314%2014.1265L3.10398%2013.9443L4.5346%2012.9603L4.52974%2012.9652L4.53096%2012.97Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Dq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2020C15.5228%2020%2020%2015.5228%2020%2010C20%204.47715%2015.5228%200%2010%200C4.47715%200%200%204.47715%200%2010C0%2015.5228%204.47715%2020%2010%2020Z'%20fill='black'/%3e%3cpath%20d='M10.001%2019.002C14.9715%2019.002%2019.001%2014.9725%2019.001%2010.002C19.001%205.03139%2014.9715%201.00195%2010.001%201.00195C5.03042%201.00195%201.00098%205.03139%201.00098%2010.002C1.00098%2014.9725%205.03042%2019.002%2010.001%2019.002Z'%20fill='%23FAFAFA'/%3e%3cpath%20d='M9.99951%2017.998C14.4178%2017.998%2017.9995%2014.4163%2017.9995%209.99805C17.9995%205.57977%2014.4178%201.99805%209.99951%201.99805C5.58123%201.99805%201.99951%205.57977%201.99951%209.99805C1.99951%2014.4163%205.58123%2017.998%209.99951%2017.998Z'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.31787%209.29102C3.31787%209.29102%2018.082%209.72982%2016.6512%2015.291C15.9389%2016.4198%2015.8512%2015.691%2015.8512%2015.691C15.8512%2015.691%2018.2852%2011.1457%203.31787%209.29102Z'%20fill='%23FAFAFA'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.27588%205.86523C5.27588%205.86523%2020.04%206.30403%2018.6092%2011.8652C17.8969%2012.994%2017.8092%2012.2652%2017.8092%2012.2652C17.8092%2012.2652%2020.2432%207.7199%205.27588%205.86523Z'%20fill='%23FAFAFA'/%3e%3cpath%20d='M8.72058%203.59961C8.75064%203.60051%2016.4092%203.83385%2017.83%206.39648L17.3895%206.91504C16.922%205.87794%2015.0863%204.38843%208.72058%203.59961Z'%20fill='%23FAFAFA'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.45898%2013.9904C5.48859%2013.9908%2013.7293%2014.1055%2013.9676%2017.2002L13.4287%2017.5307C13.2582%2016.5898%2011.9628%2014.9484%205.45898%2013.9904Z'%20fill='%23FAFAFA'/%3e%3c/svg%3e",Iq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.7675%202.25036C9.71229%202.25036%207.74126%203.06679%206.28801%204.52004C4.83476%205.97329%204.01833%207.94432%204.01833%209.99953C4.01833%2012.0547%204.83476%2014.0258%206.28801%2015.479C7.74126%2016.9323%209.71229%2017.7487%2011.7675%2017.7487V18.9162C6.8425%2018.9162%202.85083%2014.9237%202.85083%209.9987C2.85083%205.0737%206.84166%201.08203%2011.7667%201.08203V2.24953L11.7675%202.25036ZM15.7275%205.31453C15.1118%204.79188%2014.3989%204.3961%2013.6297%204.14994C12.8605%203.90378%2012.0503%203.8121%2011.2455%203.88018C10.4408%203.94825%209.65746%204.17474%208.94056%204.54661C8.22366%204.91848%207.58735%205.42841%207.06821%206.04706C6.54907%206.6657%206.15735%207.38088%205.91557%208.15144C5.6738%208.92201%205.58673%209.73277%205.65938%2010.5371C5.73204%2011.3414%205.96298%2012.1235%206.33892%2012.8382C6.71487%2013.553%207.2284%2014.1864%207.85%2014.702L7.09916%2015.597C6.36511%2014.9813%205.75953%2014.227%205.31702%2013.3772C4.87452%2012.5274%204.60374%2011.5987%204.52017%2010.6443C4.43659%209.68983%204.54185%208.72826%204.82994%207.81448C5.11802%206.90071%205.58329%206.05264%206.19916%205.3187C6.81497%204.58461%207.56935%203.97902%208.41922%203.5365C9.26909%203.09398%2010.1978%202.8232%2011.1523%202.73963C12.1069%202.65606%2013.0685%202.76132%2013.9823%203.04942C14.8962%203.33752%2015.7443%203.8028%2016.4783%204.4187L15.7275%205.31453ZM13.8483%206.01786C12.7928%205.47266%2011.5646%205.36641%2010.4311%205.72223C9.29756%206.07806%208.35044%206.86716%207.79583%207.91781C7.24123%208.96847%207.12401%2010.1956%207.4697%2011.3323C7.81539%2012.4689%208.596%2013.4231%209.64166%2013.987L9.095%2015.0204C7.7889%2014.3042%206.81675%2013.1032%206.38832%2011.6766C5.95989%2010.25%206.10954%208.7121%206.80498%207.39485C7.50041%206.07759%208.68587%205.08657%2010.1055%204.63564C11.5252%204.1847%2013.0652%204.31001%2014.3933%204.98453L13.8483%206.01786ZM11.7667%207.11536C11.0017%207.11536%2010.2681%207.41923%209.72725%207.96012C9.18636%208.501%208.8825%209.2346%208.8825%209.99953C8.8825%2010.7645%209.18636%2011.4981%209.72725%2012.0389C10.2681%2012.5798%2011.0017%2012.8837%2011.7667%2012.8837V14.052C10.6919%2014.052%209.6611%2013.6251%208.90111%2012.8651C8.14112%2012.1051%207.71416%2011.0743%207.71416%209.99953C7.71416%208.92474%208.14112%207.89397%208.90111%207.13398C9.6611%206.37399%2010.6919%205.94703%2011.7667%205.94703V7.11536Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.8392%209.03094C12.715%208.89716%2012.5718%208.78232%2012.4142%208.69011C12.277%208.60856%2012.1205%208.56486%2011.9609%208.56344C11.7484%208.56344%2011.5584%208.60261%2011.3909%208.68011C11.229%208.75304%2011.0835%208.85797%2010.9632%208.98857C10.8429%209.11918%2010.7503%209.27277%2010.6909%209.44011C10.6292%209.60927%2010.5992%209.78677%2010.5992%209.96594C10.5992%2010.1476%2010.6292%2010.3243%2010.6909%2010.4918C10.7508%2010.6589%2010.8436%2010.8124%2010.9638%2010.9431C11.0841%2011.0738%2011.2293%2011.179%2011.3909%2011.2526C11.5576%2011.3301%2011.7492%2011.3693%2011.9609%2011.3693C12.1409%2011.3693%2012.3084%2011.3309%2012.4626%2011.2568C12.6192%2011.1818%2012.7542%2011.0693%2012.8584%2010.9301L13.6317%2011.7684C13.5151%2011.8851%2013.3817%2011.9859%2013.2301%2012.0709C12.9496%2012.2274%2012.6443%2012.3345%2012.3276%2012.3876C12.1859%2012.4093%2012.0634%2012.4209%2011.9609%2012.4209C11.6246%2012.423%2011.2908%2012.3637%2010.9759%2012.2459C10.6781%2012.1358%2010.4057%2011.9666%2010.1751%2011.7484C9.94568%2011.5293%209.76311%2011.2659%209.63839%2010.9743C9.50286%2010.6556%209.43531%2010.3122%209.44005%209.96594C9.44005%209.59594%209.50672%209.26011%209.63839%208.95761C9.76339%208.66594%209.94505%208.40261%2010.1742%208.18344C10.4059%207.96594%2010.6784%207.79677%2010.9759%207.68677C11.2908%207.56898%2011.6246%207.50967%2011.9609%207.51177C12.2567%207.51177%2012.5542%207.56844%2012.8542%207.68177C13.1551%207.79677%2013.4251%207.98177%2013.6409%208.22261L12.8392%209.03094Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",zq="data:image/svg+xml,%3csvg%20width='154'%20height='154'%20viewBox='0%200%20154%20154'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2024_36638'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='155'%20height='155'%3e%3cpath%20d='M0%200H154.006V154.006H0V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2024_36638)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M49.8953%2091.6962C54.0408%2091.6962%2062.2864%2091.4688%2073.6847%2086.7762C86.9655%2081.308%20113.39%2071.381%20132.453%2061.1848C145.784%2054.0535%20151.628%2044.621%20151.628%2031.9191C151.628%2014.2909%20137.337%200%20119.709%200H45.8476C20.5281%200%200%2020.5272%200%2045.8485C0%2071.169%2019.2191%2091.6962%2049.8953%2091.6962Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M62.3879%20123.269C62.388%20117.199%2064.1868%20111.266%2067.5572%20106.218C70.9276%20101.17%2075.7184%2097.2344%2081.3244%2094.908L104.585%2085.2545C128.112%2075.4896%20154.009%2092.78%20154.009%20118.254C154.009%20137.99%20138.007%20153.987%20118.27%20153.982L93.0868%20153.976C76.1307%20153.971%2062.3879%20140.225%2062.3879%20123.269Z'%20fill='white'/%3e%3cpath%20d='M26.4302%2097.7402C11.8322%2097.7402%200%20109.572%200%20124.17V127.593C0%20142.189%2011.8331%20154.022%2026.4293%20154.022C41.0263%20154.022%2052.8595%20142.189%2052.8595%20127.593V124.17C52.8595%20109.572%2041.0263%2097.7402%2026.4302%2097.7402Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Pq="/assets/deepinfra-provider-C9hH_wkN.svg",Fq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.05%209.04649C15.6632%208.44953%2014.4499%207.63057%2013.4094%206.59059C12.3695%205.55064%2011.5505%204.33675%2010.9535%202.94998C10.7243%202.4185%2010.5402%201.87217%2010.399%201.31204C10.353%201.12891%2010.1888%201%2010%201C9.81124%201%209.64703%201.12891%209.60102%201.31204C9.45981%201.87217%209.27566%202.41798%209.04649%202.94998C8.44953%204.33675%207.63057%205.55064%206.59059%206.59059C5.55064%207.63057%204.33675%208.44953%202.94998%209.04649C2.41849%209.27566%201.87217%209.4598%201.31204%209.60102C1.12891%209.64703%201%209.81124%201%2010C1%2010.1888%201.12891%2010.353%201.31204%2010.399C1.87217%2010.5402%202.41798%2010.7243%202.94998%2010.9535C4.33675%2011.5505%205.55014%2012.3695%206.59059%2013.4094C7.63107%2014.4494%208.44953%2015.6632%209.04649%2017.05C9.27566%2017.5815%209.45981%2018.1278%209.60102%2018.688C9.64703%2018.8711%209.81124%2019%2010%2019C10.1888%2019%2010.353%2018.8711%2010.399%2018.688C10.5402%2018.1278%2010.7243%2017.582%2010.9535%2017.05C11.5505%2015.6632%2012.3695%2014.4499%2013.4094%2013.4094C14.4494%2012.3695%2015.6632%2011.5505%2017.05%2010.9535C17.5815%2010.7243%2018.1278%2010.5402%2018.688%2010.399C18.8711%2010.353%2019%2010.1888%2019%2010C19%209.81124%2018.8711%209.64703%2018.688%209.60102C18.1278%209.4598%2017.582%209.27566%2017.05%209.04649Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Bq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.03%201.66627C6.81913%201.6371%204.19663%204.16627%204.16663%207.3171C4.13746%2010.4688%206.71246%2013.0438%209.92329%2013.0729H11.94V10.9346H10.03C8.02413%2010.9579%206.37996%209.3796%206.35663%207.4096C6.33246%205.44127%207.94079%203.82793%209.94663%203.8046H10.03C12.0358%203.8046%2013.6616%205.40043%2013.6675%207.3696V12.6238C13.6675%2014.5754%2012.0475%2016.1654%2010.065%2016.1896C9.11901%2016.1829%208.2127%2015.8088%207.53746%2015.1463L5.99496%2016.6613C7.07129%2017.7186%208.51543%2018.3177%2010.0241%2018.3329H10.1008C13.27%2018.2863%2015.8158%2015.7638%2015.8333%2012.6529V7.23627C15.7558%204.13543%2013.1808%201.66627%2010.03%201.66627Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Hq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.205%200C18.63%200%2019.0377%200.168834%2019.3382%200.469361C19.6387%200.769888%2019.8075%201.17749%2019.8075%201.6025C19.8075%202.02751%2019.6387%202.43511%2019.3382%202.73564C19.0377%203.03617%2018.63%203.205%2018.205%203.205H16.7917C16.7669%203.20511%2016.7423%203.20032%2016.7194%203.1909C16.6964%203.18149%2016.6756%203.16763%2016.658%203.15013C16.6404%203.13263%2016.6265%203.11184%2016.617%203.08893C16.6074%203.06603%2016.6025%203.04147%2016.6025%203.01667V1.6025C16.6025%200.7175%2017.32%200%2018.205%200Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.22083%209.3319L15.2683%203.3319C15.3825%203.21857%2015.3183%202.99023%2015.1717%202.99023H11.9167C11.8984%202.99044%2011.8804%202.99431%2011.8636%203.00161C11.8469%203.00891%2011.8318%203.01949%2011.8192%203.03273L5.3025%209.49607C5.20083%209.59607%205.05083%209.5069%205.05083%209.3469V3.18273C5.05083%203.0769%204.98167%202.99107%204.89667%202.99107H2.655C2.56917%202.99107%202.5%203.0769%202.5%203.18273V16.4744C2.5%2016.5811%202.56917%2016.6661%202.655%2016.6661H4.89667C4.9825%2016.6661%205.05167%2016.5811%205.05167%2016.4744V13.7661C5.05167%2013.7086%205.0725%2013.6536%205.10917%2013.6177L7.12917%2011.6127C7.15062%2011.5896%207.17967%2011.5749%207.21102%2011.5714C7.24238%2011.5679%207.27395%2011.5758%207.3%2011.5936L12.7033%2015.5702C13.5615%2016.1549%2014.5491%2016.5218%2015.5808%2016.6394C15.6708%2016.6494%2015.7475%2016.5602%2015.7475%2016.4477V13.8977C15.7475%2013.8002%2015.6892%2013.7211%2015.6108%2013.7086C15.0053%2013.6107%2014.4287%2013.3812%2013.9217%2013.0361L9.24417%209.6494C9.14667%209.5844%209.13417%209.4169%209.22083%209.3319Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Uq="/assets/minimax-provider-BqW25BvT.svg",qq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.85667%202.83398H5.71417V5.69065H8.57167V8.54815H8.57H11.4292V5.69065H14.285V2.83398H17.1433V14.2623H20V17.1198H11.4283V14.2632H8.57167V11.4057H5.71333V14.2623L8.57167%2014.2632V17.1198H0V14.2623H2.85667V2.83398ZM11.4283%2014.2632H14.285V11.4057H11.4292V14.2632H11.4283Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",kC="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.813%208.3673C18.2269%207.14159%2018.0844%205.79887%2017.4226%204.68397C16.4272%202.97394%2014.4263%202.09417%2012.4721%202.50818C11.6027%201.54178%2010.3537%200.992208%209.04425%201.00008C7.04673%200.995583%205.27439%202.26461%204.65985%204.14003C3.37663%204.39934%202.26898%205.19192%201.62082%206.31526C0.618065%208.0208%200.846663%2010.1707%202.18632%2011.6332C1.77245%2012.859%201.91497%2014.2017%202.57682%2015.3166C3.57216%2017.0266%205.5731%2017.9064%207.5273%2017.4924C8.39608%2018.4588%209.64567%2019.0083%2010.9551%2018.9999C12.9538%2019.005%2014.7267%2017.7348%2015.3412%2015.8577C16.6245%2015.5984%2017.7321%2014.8058%2018.3803%2013.6825C19.3819%2011.9769%2019.1527%209.82871%2017.8136%208.36618L17.813%208.3673ZM10.9563%2017.8237C10.1565%2017.8248%209.38173%2017.5486%208.76777%2017.0429C8.7957%2017.0283%208.84416%2017.0019%208.87551%2016.9827L12.508%2014.9127C12.6938%2014.8086%2012.8078%2014.6134%2012.8067%2014.4025V9.34945L14.3419%2010.2242C14.3584%2010.232%2014.3693%2010.2478%2014.3715%2010.2658V14.4503C14.3693%2016.3111%2012.8421%2017.8198%2010.9563%2017.8237ZM3.6115%2014.7282C3.21074%2014.0453%203.06651%2013.2448%203.2039%2012.468C3.23069%2012.4838%203.27801%2012.5125%203.31164%2012.5316L6.94412%2014.6016C7.12825%2014.7079%207.35628%2014.7079%207.54098%2014.6016L11.9755%2012.0748V13.8242C11.9767%2013.8422%2011.9681%2013.8597%2011.9539%2013.8709L8.28207%2015.9629C6.64654%2016.8922%204.55781%2016.3398%203.61207%2014.7282H3.6115ZM2.65549%206.90421C3.05454%206.2202%203.68447%205.69706%204.43468%205.42537C4.43468%205.4563%204.43297%205.51087%204.43297%205.54912V9.68977C4.43183%209.90015%204.54584%2010.0953%204.73111%2010.1994L9.16568%2012.7256L7.63048%2013.6004C7.61509%2013.6105%207.59571%2013.6122%207.57861%2013.6049L3.90622%2011.5112C2.27412%2010.5785%201.71431%208.51806%202.65492%206.90477L2.65549%206.90421ZM15.2688%209.80058L10.8343%207.27378L12.3695%206.39964C12.3849%206.38951%2012.4042%206.38782%2012.4213%206.39514L16.0937%208.48712C17.7287%209.4192%2018.2891%2011.4831%2017.3445%2013.0963C16.9448%2013.7792%2016.3155%2014.3024%2015.5658%2014.5746V10.3102C15.5675%2010.0998%2015.4541%209.90521%2015.2694%209.80058H15.2688ZM16.7966%207.53141C16.7698%207.5151%2016.7225%207.48697%2016.6889%207.46785L13.0564%205.3978C12.8723%205.29149%2012.6442%205.29149%2012.4595%205.3978L8.02497%207.92461V6.17519C8.02383%206.15719%208.03238%206.13976%208.04663%206.12851L11.7184%204.03821C13.354%203.10725%2015.445%203.66133%2016.3879%205.27574C16.7864%205.9575%2016.9306%206.75571%2016.7955%207.53141H16.7966ZM7.19039%2010.6494L5.65462%209.77471C5.63809%209.76683%205.62726%209.75108%205.62498%209.73308V5.54856C5.62612%203.68552%207.1579%202.17573%209.04596%202.17686C9.84463%202.17686%2010.6176%202.45361%2011.2316%202.95763C11.2037%202.97225%2011.1558%202.99869%2011.1239%203.01781L7.49138%205.08786C7.30554%205.19192%207.19153%205.38655%207.19267%205.59749L7.19039%2010.6483V10.6494ZM8.0244%208.87525L9.99969%207.74967L11.975%208.87469V11.1253L9.99969%2012.2503L8.0244%2011.1253V8.87525Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Vq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_1940_35557'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='2'%20y='2'%20width='16'%20height='16'%3e%3cpath%20d='M2%202H18V18H2V2Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1940_35557)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.2027%203.30472L18.016%206.04138V6.09938L13.1533%208.80669L13.1647%207.39538L12.6173%207.37538C11.9113%207.35669%2011.5433%207.37669%2011.1053%207.44869C10.396%207.56538%209.74666%207.83337%209.00734%208.35003L7.56334%209.35338C7.374%209.48338%207.23334%209.57738%207.11%209.65669L6.76666%209.87138L6.502%2010.0274L6.75866%2010.1807L7.112%2010.406C7.42934%2010.6154%207.892%2010.9367%208.91266%2011.65C9.65266%2012.1667%2010.3013%2012.4347%2011.0107%2012.5514L11.2107%2012.5814C11.6733%2012.642%2012.1273%2012.644%2013.094%2012.6034L13.1087%2011.164L17.922%2013.9007V13.9587L13.0593%2016.6667L13.0687%2015.4254L12.6453%2015.44C11.7213%2015.468%2011.2207%2015.4414%2010.5533%2015.332C9.424%2015.1454%208.38%2014.7147%207.29934%2013.9594L5.86066%2012.9594C5.69519%2012.8453%205.52738%2012.7346%205.35734%2012.6274L5.046%2012.4407C4.87788%2012.3438%204.70897%2012.2483%204.53934%2012.154C3.93866%2011.82%202.37531%2011.4107%202%2011.4107V8.59203L2.09334%208.59469C2.46934%208.59003%204.03334%208.18003%204.63266%207.84538L5.31%207.45869L5.602%207.27603C5.88734%207.08938%206.31666%206.79203%207.39266%206.04069C8.47334%205.28537%209.51666%204.85403%2010.6467%204.66803C11.4147%204.54138%2011.9627%204.52603%2013.1893%204.57603L13.2027%203.30472Z'%20fill='%23D4D4D4'/%3e%3c/g%3e%3c/svg%3e",$q="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.4875%200V6.06H18.75V14.6833H16.3042V20L10.44%2014.8383V19.9592H9.53083V14.8325L3.66%2020V14.6125H1.25V5.99H3.65333V0L9.53083%205.41167V0.158333H10.4392V5.56667L16.4875%200ZM10.44%207.53667V13.6358L15.395%2017.9975V12.0333L10.44%207.53667ZM9.52417%207.47L4.56917%2011.9683V17.9975L9.52417%2013.6358V7.47083V7.47ZM16.3042%2013.7867H17.8408V6.9575H11.2167L16.3042%2011.5742V13.7867ZM8.81917%206.88667H2.15833V13.7158H3.65833V11.5692L8.81833%206.88583L8.81917%206.88667ZM4.5625%202.06333V5.98833H8.825L4.5625%202.06333ZM15.5783%202.06333L11.3158%205.98833H15.5783V2.06333Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Gq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1940_35595)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.3308%203.75216C19.0025%203.18344%2018.5654%202.68496%2018.0444%202.28519C17.5234%201.88543%2016.9288%201.5922%2016.2945%201.42227C15.6601%201.25233%2014.9986%201.20901%2014.3475%201.29479C13.6964%201.38056%2013.0686%201.59374%2012.5%201.92216C11.7706%202.34073%2011.1591%202.93729%2010.7227%203.65615C10.2862%204.37502%2010.039%205.19274%2010.0042%206.033L15.0008%206.03966V6.46883H10.0042C10.0367%207.24966%2010.2525%208.02716%2010.6708%208.75216C10.9925%209.33338%2011.4267%209.84468%2011.9482%2010.2562C12.4696%2010.6677%2013.0679%2010.9712%2013.708%2011.1489C14.348%2011.3266%2015.0171%2011.375%2015.6761%2011.2912C16.3351%2011.2075%2016.9707%2010.9932%2017.546%2010.661C18.1213%2010.3288%2018.6245%209.88533%2019.0265%209.35644C19.4284%208.82755%2019.7209%208.22387%2019.8869%207.58067C20.0529%206.93746%2020.0891%206.26762%2019.9934%205.61028C19.8976%204.95293%2019.6718%204.32126%2019.3292%203.75216H19.3308Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.670785%203.74946C0.342331%204.31807%200.129098%204.94582%200.0432647%205.59684C-0.042569%206.24787%200.00067736%206.90943%200.170534%207.54374C0.340391%208.17806%200.633531%208.7727%201.03322%209.29371C1.4329%209.81473%201.9313%2010.2519%202.49995%2010.5803C3.22718%2011.0028%204.04963%2011.2341%204.89049%2011.2526C5.73134%2011.2711%206.56317%2011.0762%207.30829%2010.6861L4.81579%206.35529L5.18745%206.14113L7.68495%2010.4678C8.32417%2010.0608%208.86254%209.51393%209.25936%208.86837C9.65619%208.22281%209.90109%207.4955%209.97556%206.7414C10.05%205.9873%209.95213%205.22614%209.68925%204.51543C9.42637%203.80472%209.00539%203.16306%208.45812%202.63893C7.91085%202.11481%207.25161%201.72193%206.53021%201.48999C5.80881%201.25804%205.04413%201.1931%204.29395%201.30007C3.54377%201.40704%202.82771%201.68312%202.1999%202.10745C1.57208%202.53178%201.04975%203.09326%200.670785%203.74946Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.99996%2019.9121C11.3259%2019.9119%2012.5975%2019.385%2013.535%2018.4473C14.4725%2017.5097%2014.9991%2016.238%2014.9991%2014.9121C14.9991%2013.1371%2014.0825%2011.5821%2012.6866%2010.6954L10.1825%2015.0196L9.81246%2014.8046L12.31%2010.4779C11.6379%2010.1278%2010.895%209.93492%2010.1375%209.91401C9.37993%209.8931%208.62755%2010.0447%207.93719%2010.3572C7.24683%2010.6698%206.63655%2011.1352%206.15248%2011.7183C5.66841%2012.3014%205.32321%2012.9869%205.14298%2013.723C4.96274%2014.459%204.95219%2015.2265%205.11211%2015.9672C5.27203%2016.708%205.59824%2017.4027%206.06609%2017.9989C6.53394%2018.5951%207.13119%2019.0771%207.8127%2019.4085C8.4942%2019.74%209.24213%2019.9122%209.99996%2019.9121Z'%20fill='%23D4D4D4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1940_35595'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Yq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%203L18%2017H2L10%203Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Wq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.1283%207.65527L13.1584%2018H10.0336L3.0035%207.65527H6.1283ZM6.1255%2013.4007L7.6886%2015.7018L6.1269%2018H3L6.1255%2013.4007ZM17%203.15055V18H14.4387V6.91927L17%203.15055ZM17%202L10.0336%2012.2509L8.4705%209.95055L13.8731%202H17Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Kq="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.5744%203L9.03162%205.0671H2.46254L4.00458%203H10.5751H10.5744ZM18.4716%2014.9336L16.9302%2017H10.3838L11.9237%2014.9336H18.4716ZM19%203L8.562%2017H2L12.438%203H19Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",Qq={anthropic:_q,byterover:Dq,cerebras:Iq,cohere:zq,deepinfra:Pq,glm:Kq,google:Fq,groq:Bq,minimax:Uq,mistral:qq,moonshot:Hq,openai:kC,"openai-compatible":kC,openrouter:Vq,perplexity:$q,togetherai:Gq,vercel:Yq,xai:Wq};function Xq({onSelect:e,providers:t}){const[n,r]=C.useState(""),o=C.useMemo(()=>{if(!n)return t;const a=n.toLowerCase();return t.filter(l=>l.name.toLowerCase().includes(a))},[t,n]);return p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5",children:[p.jsxs(ui,{children:[p.jsx(fi,{children:"Pick a provider to power curate & query"}),p.jsx(Ff,{children:"ByteRover routes LLM calls through your chosen provider. You can change this later."})]}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(vc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),p.jsx(Ko,{className:"pl-9",onChange:a=>r(a.target.value),placeholder:"Search...",value:n})]}),p.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pr-4 -mr-4 [scrollbar-gutter:stable]",children:o.map(a=>{const l=Qq[a.id],c=a.isCurrent;return p.jsxs("button",{className:we("group/row flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",c?"border-primary-foreground/40 bg-primary/5":"border-border hover:border-foreground/25"),onClick:()=>e(a),type:"button",children:[p.jsx("div",{className:"bg-muted/50 grid size-7 shrink-0 place-items-center overflow-hidden rounded-md",children:l&&p.jsx("img",{alt:"",className:"size-5",src:l})}),p.jsx("span",{className:"text-foreground flex-1 text-sm font-medium",children:a.name}),p.jsx("div",{className:we("grid size-[18px] shrink-0 place-items-center rounded-full border transition-colors",c?"bg-primary-foreground border-primary-foreground":"border-border"),children:c&&p.jsx(Ys,{className:"text-background size-3",strokeWidth:3})})]},a.id)})})]})]})}const k2="byterover",Zq=6,Jq=1e3;function eV(e){return new Promise(t=>{setTimeout(t,e)})}function Px({onOpenChange:e,onProviderActivated:t,open:n,tourStepLabel:r}){const[o,a]=C.useState("select"),[l,c]=C.useState(),[f,d]=C.useState(),[g,h]=C.useState(),[y,x]=C.useState(!1),v=ji(M=>M.isAuthorized),{data:S}=VT(),E=nq(),k=iq(),T=aq(),R=uq(),L=lq(),j=eq(),N=XU(),A=S?.providers??[],D=C.useCallback(()=>{a("select"),c(void 0),d(void 0),h(void 0),x(!1)},[]),U=C.useCallback(()=>{e(!1),setTimeout(D,150)},[e,D]),I=C.useCallback(M=>{M?e(!0):(e(!1),setTimeout(D,150))},[e,D]),q=C.useCallback(async M=>{a("connecting");try{let P=await E.mutateAsync({providerId:M.id});for(let Q=0;!P.success&&Q<Zq;Q++)await eV(Jq),P=await E.mutateAsync({providerId:M.id});if(!P.success){ut.error(P.error??"Failed to connect ByteRover"),a("select");return}await T.mutateAsync({providerId:M.id}),ut.success(`Connected to ${M.name}`),t?.(),U()}catch(P){ut.error(Cn(P,"Connection failed")),a("select")}},[E,t,U,T]),$=C.useCallback(async M=>{if(c(M),h(void 0),M.id===k2&&!v){a("login_prompt");return}if(M.id===k2&&M.isCurrent){t?.(),U();return}if(M.isConnected){a("provider_actions");return}if(M.id===k2){await q(M);return}if(M.id==="openai-compatible"){a("base_url");return}if(M.supportsOAuth){a("auth_method");return}if(M.requiresApiKey){a("api_key");return}a("connecting");try{await E.mutateAsync({providerId:M.id}),x(!0),a("model_select")}catch(P){ut.error(Cn(P,"Connection failed")),a("select")}},[q,E,v,t,U]),V=C.useCallback(async M=>{a("connecting");try{const P=await L.mutateAsync({providerId:M.id});if(!P.success){ut.error(P.error??"Failed to start OAuth"),a("select");return}const Q=await j.mutateAsync({providerId:M.id});Q.success?(x(!0),a("model_select")):(ut.error(Q.error??"OAuth failed"),a("select"))}catch(P){ut.error(Cn(P,"OAuth failed")),a("select")}},[j,L]),Y=C.useCallback(async M=>{if(l)switch(M){case"activate":{a("connecting");try{await T.mutateAsync({providerId:l.id}),ut.success(`Activated ${l.name}`),t?.(),U()}catch(P){h(Cn(P,"Failed")),a("provider_actions")}break}case"change_model":{a("model_select");break}case"disconnect":{a("connecting");try{await k.mutateAsync({providerId:l.id}),ut.success(`Disconnected ${l.name}`),a("select"),c(void 0),h(void 0)}catch(P){h(Cn(P,"Failed")),a("provider_actions")}break}case"reconfigure":{a("base_url");break}case"reconnect_oauth":{await V(l);break}case"replace":{a("api_key");break}}},[k,V,t,U,l,T]),H=C.useCallback(M=>{d(M),a("api_key")},[]),B=C.useCallback(async M=>{if(l){if(l.id!=="openai-compatible"&&M)try{const P=await R.mutateAsync({apiKey:M,providerId:l.id});if(!P.isValid){h(P.error??"Invalid API key");return}}catch(P){h(Cn(P,"Validation failed"));return}a("connecting");try{await E.mutateAsync({apiKey:M||void 0,baseUrl:f??void 0,providerId:l.id}),x(!0),a("model_select")}catch(P){h(Cn(P,"Connection failed")),a("api_key")}}},[f,E,l,R]),F=C.useCallback(async M=>{if(l)try{await N.mutateAsync({contextLength:M.contextLength,modelId:M.id,providerId:l.id}),y?(ut.success(`Connected to ${l.name}`),t?.(),U()):(ut.success(`Model set to ${M.name}`),a("provider_actions"))}catch(P){ut.error(Cn(P,"Failed to set model"))}},[y,t,U,l,N]),G=C.useCallback(()=>{h(void 0),l?.id==="openai-compatible"?a("base_url"):l?.supportsOAuth?a("auth_method"):a("select")},[l]),ie=()=>{switch(o){case"api_key":return l?p.jsx(Eq,{error:g,isOptional:l.id==="openai-compatible",isValidating:R.isPending,onBack:G,onSubmit:M=>B(M),provider:l}):null;case"auth_method":return l?p.jsx(kq,{onBack:()=>{a("select"),c(void 0),h(void 0)},onSelect:M=>{M==="oauth"?V(l):a("api_key")},provider:l}):null;case"base_url":return l?p.jsx(Aq,{error:g,onBack:()=>{a("select"),h(void 0)},onSubmit:H,provider:l}):null;case"connecting":return p.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[p.jsx(ai,{className:"text-primary size-6 animate-spin"}),p.jsxs("p",{className:"text-muted-foreground text-sm",children:["Connecting to ",l?.name,"..."]})]});case"login_prompt":return l?p.jsx(Nq,{onAuthenticated:()=>{q(l)},onBack:()=>{a("select"),c(void 0)}}):null;case"model_select":return l?p.jsx(Mq,{onBack:()=>{a(y?"select":"provider_actions")},onSelect:F,providerId:l.id}):null;case"provider_actions":return l?p.jsx(Lq,{error:g,onAction:Y,onBack:()=>{a("select"),c(void 0),h(void 0)},provider:l}):null;case"select":return p.jsx(Xq,{onSelect:M=>$(M),providers:A});default:return null}};return p.jsx($s,{onOpenChange:I,open:n,children:p.jsxs(Gs,{className:"flex h-150 flex-col sm:max-w-lg",showCloseButton:o==="select"||o==="model_select"||o==="connecting"||o==="login_prompt",children:[r&&p.jsx(u0,{label:r}),ie()]})})}function E9({...e}){return p.jsx(c9,{"data-slot":"sheet",...e})}function tV({...e}){return p.jsx(Ox,{"data-slot":"sheet-portal",...e})}function nV({className:e,...t}){return p.jsx(Ax,{"data-slot":"sheet-overlay",className:we("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function k9({className:e,children:t,side:n="right",showCloseButton:r=!0,...o}){return p.jsxs(tV,{children:[p.jsx(nV,{}),p.jsxs(Nx,{"data-slot":"sheet-content","data-side":n,className:we("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] ",e),...o,children:[t,r&&p.jsxs(Pf,{"data-slot":"sheet-close",render:p.jsx(De,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[p.jsx(qp,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Fx({className:e,...t}){return p.jsx("textarea",{"data-slot":"textarea",className:we("flex field-sizing-content min-h-16 w-full rounded-md border border-border bg-background px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-background dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}const rV=e=>{const{apiClient:t}=Be.getState();return t?t.request(ks.CREATE,e):Promise.reject(new Error("Not connected"))},iV=({mutationConfig:e}={})=>wn({...e,mutationFn:rV});function oV(e){const t=iV(),n=e.content.trim().length>0,{isPending:r}=t;return{canSubmit:n,isPending:r,submit:async()=>{if(!n||r)return;if(!e.hasActiveProvider){e.onProviderRequired();return}const a=crypto.randomUUID(),l={...e.projectPath?{clientCwd:e.projectPath,projectPath:e.projectPath}:{},content:e.content.trim(),taskId:a,type:e.type};try{await t.mutateAsync(l);const c=e.type==="query"?"Query":"Curate";ut.success(`${c} task queued`,{position:"top-center"}),e.onSubmitted?.(a,e.openDetailAfter),e.onClose()}catch(c){ut.error(c instanceof Error?c.message:"Failed to create task",{position:"top-center"})}}}}const TC={curate:"JWT tokens expire after 24h. Refresh window is 7 days. Rotation happens on every successful refresh — old refresh token is invalidated immediately.",query:"What is our auth token expiration policy?"},aV={curate:"Plain text knowledge to capture into the project context tree.",query:"The agent searches the project context tree and synthesizes an answer."};function sV({type:e}){return p.jsx("p",{className:"text-muted-foreground/60 text-xs",children:aV[e]})}function lV(){return p.jsxs("p",{className:"text-muted-foreground/60 mt-2 flex items-center gap-1.5 text-xs",children:[p.jsx(SU,{className:"size-3 shrink-0"}),p.jsxs("span",{children:["For file or folder attachments, use"," ",p.jsx("code",{className:"bg-muted text-foreground/80 mono rounded px-1.5 py-0.5 text-[11px]",children:"brv curate -f <path>"})," ","from the CLI."]})]})}function cV({label:e}){return p.jsxs(Yo,{className:"text-primary-foreground absolute top-2.5 right-3 gap-1.5 px-2 text-[10px] tracking-[0.08em] uppercase",variant:"secondary",children:[p.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 rounded-full"}),e]})}let AC=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function T9(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[AC.checked]:""}:{[AC.unchecked]:""}},..._x}),[e.indeterminate])}function uV(e,t,n,r=!0,o){const[a,l]=C.useState(),c=Gi(o?`${o}-label`:void 0),f=e??t??a;return qe(()=>{const d=e||t||!r?void 0:fV(n.current,c);a!==d&&l(d)}),f}function fV(e,t){const n=dV(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function dV(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const o=e.nextElementSibling;if(o&&o.htmlFor===n)return o}const r=e.labels;return r&&r[0]}const A9=C.createContext(void 0);function hV(){const e=C.useContext(A9);if(e===void 0)throw new Error(Gn(14));return e}const pV="data-parent",mV=C.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:a=!1,"aria-labelledby":l,disabled:c=!1,id:f,indeterminate:d=!1,inputRef:g,name:h,onCheckedChange:y,parent:x=!1,readOnly:v=!1,render:S,required:E=!1,uncheckedValue:k,value:T,nativeButton:R=!1,...L}=t,{clearErrors:j}=x9(),{disabled:N,name:A,setDirty:D,setFilled:U,setFocused:I,setTouched:q,state:$,validationMode:V,validityData:Y,shouldValidateOnChange:H,validation:B}=Dx(),F=vq(),{labelId:G,controlId:ie,registerControlId:M,getDescriptionProps:P}=Ix(),Q=Sq(),_=Q?.parent,ee=_&&Q.allValues,J=N||F.disabled||Q?.disabled||c,re=A??h,pe=T??re,fe=Gi(),Ce=Gi();let Ee=ie;ee?Ee=x?Ce:`${_.id}-${pe}`:f&&(Ee=f);let Ie={};ee&&(x?Ie=Q.parent.getParentProps():pe&&(Ie=Q.parent.getChildProps(pe)));const Ye=st(y),{checked:je=r,indeterminate:_e=d,onCheckedChange:ye,...We}=Ie,Te=Q?.value,Re=Q?.setValue,he=Q?.defaultValue,Se=C.useRef(null),ne=Zn(()=>Symbol("checkbox-control")),xe=C.useRef(!1),{getButtonProps:ze,buttonRef:Ue}=zf({disabled:J,native:R}),wt=Q?.validation??B,[ae,ve]=b9({controlled:pe&&Te&&!x?Te.includes(pe):je,default:pe&&he&&!x?he.includes(pe):a,name:"Checkbox",state:"checked"});qe(()=>{M!==dr&&(xe.current=!0,M(ne.current,Ee))},[Ee,Q,M,x,ne]),C.useEffect(()=>{const Qe=ne.current;return()=>{!xe.current||M===dr||(xe.current=!1,M(Qe,void 0))}},[M,ne]),v9({enabled:!Q,id:fe,commit:wt.commit,value:ae,controlRef:Se,name:re,getValue:()=>ae});const Oe=C.useRef(null),Me=Ms(g,Oe,wt.inputRef),He=uV(l,G,Oe,!R,Ee??void 0);qe(()=>{Oe.current&&(Oe.current.indeterminate=_e,ae&&U(!0))},[ae,_e,U]),o9(ae,()=>{Q&&!x||(j(re),U(ae),D(ae!==Y.initialValue),H()?wt.commit(ae):wt.commit(ae,!0))});const kt=Ba({checked:ae,disabled:J,name:x?void 0:re,id:R?void 0:Ee??void 0,required:E,ref:Me,style:re?J_:a6,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Qe){if(Qe.nativeEvent.defaultPrevented)return;const yt=Qe.target.checked,Pt=Et(Jp,Qe.nativeEvent);if(ye?.(yt,Pt),Ye(yt,Pt),!Pt.isCanceled&&(ve(yt),pe&&Te&&Re&&!x)){const Wt=yt?[...Te,pe]:Te.filter(yn=>yn!==pe);Re(Wt,Pt)}},onFocus(){Se.current?.focus()}},T!==void 0?{value:(Q?ae&&T:T)||""}:Ln,P,Q?wt.getValidationProps:wt.getInputValidationProps),Ft=ee?!!je:ae,Xe=ee&&_e||d;C.useEffect(()=>{if(!_||!pe)return;const Qe=_.disabledStatesRef.current;return Qe.set(pe,J),()=>{Qe.delete(pe)}},[_,J,pe]);const Ve=C.useMemo(()=>({...$,checked:Ft,disabled:J,readOnly:v,required:E,indeterminate:Xe}),[$,Ft,J,v,E,Xe]),pt=T9(Ve),mt=ln("span",t,{state:Ve,ref:[Ue,Se,n,Q?.registerControlRef],props:[{id:R?Ee??void 0:fe,role:"checkbox","aria-checked":_e?"mixed":ae,"aria-readonly":v||void 0,"aria-required":E||void 0,"aria-labelledby":He,[pV]:x?"":void 0,onFocus(){I(!0)},onBlur(){const Qe=Oe.current;Qe&&(q(!0),I(!1),V==="onBlur"&&wt.commit(Q?Te:Qe.checked))},onClick(Qe){v||J||(Qe.preventDefault(),Oe.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Qe.shiftKey,ctrlKey:Qe.ctrlKey,altKey:Qe.altKey,metaKey:Qe.metaKey})))}},P,wt.getValidationProps,L,We,ze],stateAttributesMapping:pt});return p.jsxs(A9.Provider,{value:Ve,children:[mt,!ae&&!Q&&re&&!x&&k!==void 0&&p.jsx("input",{type:"hidden",name:re,value:k}),p.jsx("input",{...kt})]})}),gV=C.forwardRef(function(t,n){const{render:r,className:o,keepMounted:a=!1,...l}=t,c=hV(),f=c.checked||c.indeterminate,{mounted:d,transitionStatus:g,setMounted:h}=Xy(f),y=C.useRef(null),x={...c,transitionStatus:g};mc({open:f,ref:y,onComplete(){f||h(!1)}});const v=T9(c),S=C.useMemo(()=>({...v,...pc,..._x}),[v]),E=a||d,k=ln("span",t,{ref:[n,y],state:x,stateAttributesMapping:S,props:l});return E?k:null});function yV({className:e,...t}){return p.jsx(mV,{"data-slot":"checkbox",className:we("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-foreground dark:data-checked:bg-primary",e),...t,children:p.jsx(gV,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:p.jsx(qE,{})})})}function xV({canSubmit:e,hasActiveProvider:t,inTour:n,isPending:r,onClose:o,onOpenDetailChange:a,onSubmit:l,openDetailAfter:c,type:f}){const y=r?f==="query"?"Querying…":"Curating…":n||t?f==="query"?"Query":"Curate":"Connect provider…";return p.jsxs("footer",{className:"border-border flex items-center justify-between gap-3 border-t px-7 py-3.5",children:[n?p.jsx("span",{}):p.jsxs("label",{className:"text-muted-foreground inline-flex cursor-pointer items-center gap-2 text-xs",children:[p.jsx(yV,{checked:c,onCheckedChange:a}),"Open after submit"]}),p.jsxs("div",{className:"ml-2 flex items-center gap-2",children:[p.jsx(De,{onClick:o,size:"sm",variant:"ghost",children:"Cancel"}),p.jsx(De,{disabled:!e||r,onClick:l,size:"sm",children:y})]})]})}function bV({inTour:e,onTypeChange:t,projectPath:n,tourStepLabel:r,type:o}){return p.jsxs("header",{className:"border-border flex flex-col gap-2 border-b px-7 pt-5 pb-4",children:[r&&p.jsx(u0,{label:r}),p.jsxs("div",{className:"flex items-center justify-between gap-4 pr-10",children:[p.jsxs("h2",{className:"text-foreground flex items-baseline gap-1.5 text-lg font-medium tracking-tight",children:[p.jsx("span",{className:"text-muted-foreground/70 font-normal",children:"New"}),p.jsxs("span",{children:[o," task"]})]}),!e&&p.jsx(vV,{onChange:t,value:o})]}),p.jsxs("p",{className:"text-muted-foreground/70 text-xs",children:[o==="query"?"Searches":"Will dispatch to"," ",p.jsx("span",{className:"text-identifier mono",children:n||"(no project selected)"})]})]})}function vV({onChange:e,value:t}){return p.jsxs("div",{className:"border-border bg-muted relative inline-flex rounded-md border p-0.5",children:[p.jsx("span",{"aria-hidden":!0,className:we("bg-background border-border absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded border transition-transform duration-200 ease-out",t==="query"?"translate-x-full":"translate-x-0")}),["curate","query"].map(n=>p.jsx("button",{className:we("relative z-10 px-3 py-1 text-xs font-medium transition-colors",n===t?"text-foreground":"text-muted-foreground hover:text-foreground/80"),onClick:()=>e(n),type:"button",children:n==="curate"?"Curate":"Query"},n))]})}function R9({initialContent:e,initialType:t,onClose:n,onSubmitted:r,open:o,prefillNotice:a,tourStepLabel:l}){const c=!!l;return p.jsx(E9,{onOpenChange:f=>!f&&n(),open:o,children:p.jsx(k9,{className:we("data-[side=right]:w-full data-[side=right]:max-w-xl p-0 shadow-[inset_1px_0_0_rgba(96,165,250,0.18)]",!c&&"sheet-no-overlay"),side:"right",children:o&&p.jsx(wV,{initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:a,tourStepLabel:l})})})}function wV({initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:o,tourStepLabel:a}){const l=Be(q=>q.selectedProject),{data:c}=kx(),[f,d]=C.useState(t??"curate"),[g,h]=C.useState(e??""),[y,x]=C.useState(!0),[v,S]=C.useState(!1),[E,k]=C.useState(!!e),T=C.useRef(null);C.useEffect(()=>{T.current?.focus()},[]);const R=!!c,L=!!a,{canSubmit:j,isPending:N,submit:A}=oV({content:g,hasActiveProvider:R,onClose:n,onProviderRequired:()=>S(!0),onSubmitted:r,openDetailAfter:y,projectPath:l,type:f}),D=q=>{if((q.metaKey||q.ctrlKey)&&q.key==="Enter"){q.preventDefault(),A().catch(()=>{});return}q.key==="Tab"&&!q.shiftKey&&!g&&(q.preventDefault(),h(TC[f]))},U=!!(o&&E&&g===(e??"")),I=q=>{E&&q!==(e??"")&&k(!1),h(q)};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[p.jsx(bV,{inTour:L,onTypeChange:d,projectPath:l,tourStepLabel:a,type:f}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-7 py-5",children:[p.jsxs("div",{className:"space-y-1.5",children:[p.jsxs("div",{className:"relative",children:[p.jsx(Fx,{className:"bg-card dark:bg-card text-foreground/90 mono min-h-64 pr-4 pb-7 text-sm leading-relaxed",onChange:q=>I(q.target.value),onKeyDown:D,placeholder:TC[f],ref:T,rows:f==="query"?4:6,value:g}),U&&o&&p.jsx(cV,{label:o}),p.jsxs("span",{className:"text-muted-foreground/40 mono pointer-events-none absolute right-3 bottom-2 flex items-center gap-2 text-[10px] tabular-nums",children:[p.jsx("span",{className:"text-muted-foreground/60",children:g?p.jsxs(p.Fragment,{children:[p.jsxs("kbd",{className:"bg-muted text-foreground/70 inline-flex items-center gap-1 rounded px-1.5 py-0.5 leading-none",children:[p.jsx(nU,{className:"size-2.5"})," · Ctrl + Enter"]})," ","to ",f]}):p.jsxs(p.Fragment,{children:[p.jsx("kbd",{className:"bg-muted text-foreground/70 inline-flex items-center rounded px-1.5 py-0.5 leading-none",children:"Tab"})," ","to use example"]})}),p.jsxs("span",{children:[g.length," chars"]})]})]}),p.jsx(sV,{type:f})]}),f==="curate"&&!L&&p.jsx(lV,{})]}),p.jsx(xV,{canSubmit:j,hasActiveProvider:R,inTour:L,isPending:N,onClose:n,onOpenDetailChange:x,onSubmit:A,openDetailAfter:y,type:f})]}),p.jsx(Px,{onOpenChange:S,open:v})]})}function SV(){const e=on(c=>c.tourActive),t=on(c=>c.tourStep),n=on(c=>c.advanceTour),r=on(c=>c.exitTour),o=qa(),a=e&&t==="connector",l=()=>{n(),o("/configuration")};return p.jsx($s,{onOpenChange:c=>!c&&r(),open:a,children:p.jsxs(Gs,{className:"flex flex-col gap-5 p-6 sm:max-w-[460px]",children:[p.jsx(u0,{label:"Step 4 of 4 · Optional"}),p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsx("div",{className:"bg-primary/12 text-primary-foreground grid size-10 place-items-center rounded-lg",children:p.jsx(MU,{className:"size-5"})}),p.jsx("h2",{className:"text-foreground text-base font-semibold",children:"Use ByteRover from your AI agent"}),p.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["Connect a tool like Claude Code, Cursor, or any MCP client and you can curate & query the context tree without leaving your chat. It's optional — you can always come back via the"," ",p.jsx("span",{className:"text-foreground font-medium",children:"Configuration"})," tab."]})]}),p.jsxs("div",{className:"border-border -mx-6 -mb-6 mt-2 flex items-center gap-2 border-t px-6 py-4",children:[p.jsx(De,{onClick:()=>n(),type:"button",variant:"ghost",children:"Maybe later"}),p.jsx("div",{className:"flex-1"}),p.jsxs(De,{onClick:l,type:"button",children:["Open Configuration",p.jsx(d9,{className:"size-4"})]})]})]})})}function CV(){return on.getState().tourStep==="provider"}const EV="JWT tokens expire after 24h. Refresh window is 7 days. Rotation happens on every successful refresh — old refresh token is invalidated immediately.",kV="What is our auth token expiration policy?";function TV(){const e=on(d=>d.tourActive),t=on(d=>d.tourStep),n=on(d=>d.tourTaskId),r=on(d=>d.exitTour),o=on(d=>d.advanceTour),a=on(d=>d.setTourTaskId),l=qa(),c=C.useRef(!1);if(!e||!t)return null;const f=(t==="curate"||t==="query")&&!n;return p.jsxs(p.Fragment,{children:[t==="provider"&&p.jsx(Px,{onOpenChange:d=>{d||CV()&&r()},onProviderActivated:()=>o(),open:!0,tourStepLabel:"Step 1 of 4"}),f&&p.jsx(R9,{initialContent:t==="curate"?EV:kV,initialType:t,onClose:()=>{if(c.current){c.current=!1;return}r()},onSubmitted:d=>{c.current=!0,a(d),l(`/tasks?task=${d}`)},open:!0,prefillNotice:"example",tourStepLabel:t==="curate"?"Step 2 of 4":"Step 3 of 4"},t),p.jsx(SV,{})]})}function AV(){const e=on(o=>o.seenWelcome),t=on(o=>o.dismissWelcome),n=on(o=>o.startTour),r=Be(o=>o.selectedProject);return e?null:p.jsx($s,{onOpenChange:o=>!o&&t(),open:!0,children:p.jsxs(Gs,{className:"flex max-w-[420px] flex-col items-center gap-6 p-8 text-center sm:max-w-[420px]",showCloseButton:!1,children:[p.jsx("img",{alt:"Byterover",className:"size-11",src:gx}),p.jsxs(ui,{className:"flex flex-col gap-2.5",children:[p.jsx(fi,{className:"text-foreground text-xl font-semibold tracking-tight",children:"Welcome to ByteRover"}),p.jsxs(Ff,{className:"text-muted-foreground text-sm leading-relaxed",children:["A 3-minute tour will get you from zero to your first answer. You can restart it any time from the"," ",p.jsx("span",{className:"text-foreground font-medium",children:"Help"})," menu in the top-right."]})]}),p.jsxs("div",{className:"flex w-full max-w-[300px] flex-col gap-2",children:[p.jsxs(De,{onClick:()=>n(),size:"lg",children:[p.jsx(PU,{className:"size-4"}),"Take the tour"]}),p.jsx(De,{className:"text-muted-foreground hover:text-foreground text-xs",onClick:()=>t(),variant:"link",children:"Skip — take me in"})]}),r&&p.jsx("p",{className:"text-identifier mono max-w-full truncate text-[10px] tracking-wider",title:r,children:r})]})})}function RV(){const e=on(o=>o.tourActive),t=on(o=>o.tourStep),n=on(o=>o.advanceTour),{data:r}=kx({queryConfig:{enabled:e&&t==="provider"}});C.useEffect(()=>{!e||t!=="provider"||r?.activeModel&&n()},[e,t,r?.activeModel,n])}const NV=()=>{const{apiClient:e}=Be.getState();return e?e.request(rr.STATUS):Promise.reject(new Error("Not connected"))},hi=()=>({queryFn:NV,queryKey:["vc","status"],refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:2e3}),Bx=({queryConfig:e}={})=>br({...hi(),...e}),OV=["both_added","both_modified","deleted_modified"];function jV(e){return OV.includes(e)?e:void 0}function N9(e){if(!e)return{staged:[],unmerged:[],unstaged:[]};const t=new Set(e.conflictMarkerFiles??[]),n=(e.unmerged??[]).map(({path:l,type:c})=>({conflictType:jV(c),hasMarkers:t.has(l),isStaged:!1,path:l,status:"unmerged"})),r=[...e.staged.added.map(l=>({isStaged:!0,path:l,status:"added"})),...e.staged.modified.map(l=>({isStaged:!0,path:l,status:"modified"})),...e.staged.deleted.map(l=>({isStaged:!0,path:l,status:"deleted"}))],o=[...e.unstaged.modified.map(l=>({isStaged:!1,path:l,status:"modified"})),...e.unstaged.deleted.map(l=>({isStaged:!1,path:l,status:"deleted"})),...e.untracked.map(l=>({isStaged:!1,path:l,status:"untracked"}))],a=(l,c)=>l.path.localeCompare(c.path);return{staged:r.sort(a),unmerged:n.sort(a),unstaged:o.sort(a)}}const MV="/assets/logo-byterover-DB7H7faH.svg",O9=C.createContext(void 0);function j9(){const e=C.useContext(O9);if(e===void 0)throw new Error(Gn(13));return e}const Hx={imageLoadingStatus:()=>null},LV=C.forwardRef(function(t,n){const{className:r,render:o,...a}=t,[l,c]=C.useState("idle"),f={imageLoadingStatus:l},d=C.useMemo(()=>({imageLoadingStatus:l,setImageLoadingStatus:c}),[l,c]),g=ln("span",t,{state:f,ref:n,props:a,stateAttributesMapping:Hx});return p.jsx(O9.Provider,{value:d,children:g})});function _V(e,{referrerPolicy:t,crossOrigin:n}){const[r,o]=C.useState("idle");return qe(()=>{if(!e)return o("error"),dr;let a=!0;const l=new window.Image,c=f=>()=>{a&&o(f)};return o("loading"),l.onload=c("loaded"),l.onerror=c("error"),t&&(l.referrerPolicy=t),l.crossOrigin=n??null,l.src=e,()=>{a=!1}},[e,n,t]),r}const DV={...Hx,...pc},IV=C.forwardRef(function(t,n){const{className:r,render:o,onLoadingStatusChange:a,referrerPolicy:l,crossOrigin:c,...f}=t,d=j9(),g=_V(t.src,{referrerPolicy:l,crossOrigin:c}),h=g==="loaded",{mounted:y,transitionStatus:x,setMounted:v}=Xy(h),S=C.useRef(null),E=st(R=>{a?.(R),d.setImageLoadingStatus(R)});qe(()=>{g!=="idle"&&E(g)},[g,E]);const k={imageLoadingStatus:g,transitionStatus:x};mc({open:h,ref:S,onComplete(){h||v(!1)}});const T=ln("img",t,{state:k,ref:[n,S],props:f,stateAttributesMapping:DV,enabled:y});return y?T:null}),zV=C.forwardRef(function(t,n){const{className:r,render:o,delay:a,...l}=t,{imageLoadingStatus:c}=j9(),[f,d]=C.useState(a===void 0),g=jr();return C.useEffect(()=>(a!==void 0&&g.start(a,()=>d(!0)),g.clear),[g,a]),ln("span",t,{state:{imageLoadingStatus:c},ref:n,props:l,stateAttributesMapping:Hx,enabled:c!=="loaded"&&f})});function f0({className:e,size:t="default",...n}){return p.jsx(LV,{"data-slot":"avatar","data-size":t,className:we("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function Ux({className:e,...t}){return p.jsx(IV,{"data-slot":"avatar-image",className:we("aspect-square size-full rounded-full object-cover",e),...t})}function d0({className:e,...t}){return p.jsx(zV,{"data-slot":"avatar-fallback",className:we("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}const M9=C.createContext(void 0);function qx(e){const t=C.useContext(M9);if(t===void 0&&!e)throw new Error(Gn(33));return t}const L9=C.createContext(void 0);function Qo(e){const t=C.useContext(L9);if(t===void 0&&!e)throw new Error(Gn(36));return t}const PV=C.createContext(void 0);function h0(e=!0){const t=C.useContext(PV);if(t===void 0&&!e)throw new Error(Gn(25));return t}function FV(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:o,store:a,typingRef:l,itemRef:c,itemMetadata:f}=e,{events:d}=a.useState("floatingTreeRoot"),g=h0(!0),h=g!==void 0;return C.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onKeyDown(y){y.key===" "&&l?.current&&y.preventDefault()},onMouseMove(y){o&&d.emit("itemhover",{nodeId:o,target:y.currentTarget})},onClick(y){t&&d.emit("close",{domEvent:y,reason:t6})},onMouseUp(y){if(g){const x=g.initialCursorPointRef.current;if(g.initialCursorPointRef.current=null,h&&x&&Math.abs(y.clientX-x.x)<=1&&Math.abs(y.clientY-x.y)<=1||h&&!_k&&y.button===2)return}c.current&&a.context.allowMouseUpTriggerRef.current&&(!h||y.button===2)&&(!f||f.type==="regular-item")&&c.current.click()}}),[t,n,r,d,o,a,l,c,g,h,f])}const BV={type:"regular-item"};function _9(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:a,typingRef:l=a.context.typingRef,nativeButton:c,itemMetadata:f,nodeId:d}=e,g=C.useRef(null),{getButtonProps:h,buttonRef:y}=zf({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),x=FV({closeOnClick:t,highlighted:r,id:o,nodeId:d,store:a,typingRef:l,itemRef:g,itemMetadata:f}),v=C.useCallback(E=>Ba(x,{onMouseEnter(){f.type==="submenu-trigger"&&f.setActive()}},E,h),[x,h,f]),S=Ms(g,y);return C.useMemo(()=>({getItemProps:v,itemRef:S}),[v,S])}const D9=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function HV(){return C.useContext(D9)}let UV=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Vx(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:a}=e,{register:l,unregister:c,subscribeMapChange:f,elementsRef:d,labelsRef:g,nextIndexRef:h}=HV(),y=C.useRef(-1),[x,v]=C.useState(a??(o===UV.GuessFromOrder?()=>{if(y.current===-1){const k=h.current;h.current+=1,y.current=k}return y.current}:-1)),S=C.useRef(null),E=C.useCallback(k=>{if(S.current=k,x!==-1&&k!==null&&(d.current[x]=k,g)){const T=t!==void 0;g.current[x]=T?t:r?.current?.textContent??k.textContent}},[x,d,g,t,r]);return qe(()=>{if(a!=null)return;const k=S.current;if(k)return l(k,n),()=>{c(k)}},[a,l,c,n]),qe(()=>{if(a==null)return f(k=>{const T=S.current?k.get(S.current)?.index:null;T!=null&&v(T)})},[a,f,v]),C.useMemo(()=>({ref:E,index:x}),[x,E])}const I9=C.createContext(void 0);function qV(){const e=C.useContext(I9);if(e===void 0)throw new Error(Gn(31));return e}const VV=C.forwardRef(function(t,n){const{render:r,className:o,...a}=t,[l,c]=C.useState(void 0),f=C.useMemo(()=>({setLabelId:c}),[c]),d=ln("div",t,{ref:n,props:{role:"group","aria-labelledby":l,...a}});return p.jsx(I9.Provider,{value:f,children:d})}),$V=C.forwardRef(function(t,n){const{className:r,render:o,id:a,...l}=t,c=Gi(a),{setLabelId:f}=qV();return qe(()=>(f(c),()=>{f(void 0)}),[f,c]),ln("div",t,{ref:n,props:{id:c,role:"presentation",...l}})}),GV=C.forwardRef(function(t,n){const{render:r,className:o,id:a,label:l,nativeButton:c=!1,disabled:f=!1,closeOnClick:d=!0,...g}=t,h=Vx({label:l}),y=qx(!0),x=Gi(a),{store:v}=Qo(),S=v.useState("isActive",h.index),E=v.useState("itemProps"),{getItemProps:k,itemRef:T}=_9({closeOnClick:d,disabled:f,highlighted:S,id:x,store:v,nativeButton:c,nodeId:y?.nodeId,itemMetadata:BV});return ln("div",t,{state:{disabled:f,highlighted:S},props:[E,g,k],ref:[T,n,h.ref]})}),YV=C.createContext(void 0);function WV(e){return C.useContext(YV)}const KV={...qs,...pc},QV=C.forwardRef(function(t,n){const{render:r,className:o,finalFocus:a,...l}=t,{store:c}=Qo(),{side:f,align:d}=qx(),g=WV()!=null,h=c.useState("open"),y=c.useState("transitionStatus"),x=c.useState("popupProps"),v=c.useState("mounted"),S=c.useState("instantType"),E=c.useState("activeTriggerElement"),k=c.useState("parent"),T=c.useState("lastOpenChangeReason"),R=c.useState("rootId"),L=c.useState("floatingRootContext"),j=c.useState("floatingTreeRoot"),N=c.useState("closeDelay"),A=c.useState("activeTriggerElement"),D=k.type==="context-menu";mc({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),C.useEffect(()=>{function H(B){c.setOpen(!1,Et(B.reason,B.domEvent))}return j.events.on("close",H),()=>{j.events.off("close",H)}},[j.events,c]);const U=c.useState("hoverEnabled"),I=c.useState("disabled");P6(L,{enabled:U&&!I&&!D&&k.type!=="menubar",closeDelay:N});const q={transitionStatus:y,side:f,align:d,open:h,nested:k.type==="menu",instant:S},$=C.useCallback(H=>{c.set("popupElement",H)},[c]),V=ln("div",t,{state:q,ref:[n,c.context.popupRef,$],stateAttributesMapping:KV,props:[x,{onKeyDown(H){g&&n9.has(H.key)&&H.stopPropagation()}},i0(y),l,{"data-rootownerid":R}]});let Y=k.type===void 0||D;return(E||k.type==="menubar"&&T!==Uy)&&(Y=!0),p.jsx(x6,{context:L,modal:D,disabled:!v,returnFocus:a===void 0?Y:a,initialFocus:k.type!=="menu",restoreFocus:!0,externalTree:k.type!=="menubar"?j:void 0,previousFocusableElement:A,nextFocusableElement:k.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:k.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:V})}),z9=C.createContext(void 0);function XV(){const e=C.useContext(z9);if(e===void 0)throw new Error(Gn(32));return e}const ZV=C.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:a}=Qo();return a.useState("mounted")||r?p.jsx(z9.Provider,{value:r,children:p.jsx(h6,{ref:n,...o})}):null});function JV(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,a=st(o),l=C.useRef(0),c=Zn(t$).current,f=Zn(e$).current,[d,g]=C.useState(0),h=C.useRef(d),y=st((k,T)=>{f.set(k,T??null),h.current+=1,g(h.current)}),x=st(k=>{f.delete(k),h.current+=1,g(h.current)}),v=C.useMemo(()=>{const k=new Map;return Array.from(f.keys()).filter(R=>R.isConnected).sort(n$).forEach((R,L)=>{const j=f.get(R)??{};k.set(R,{...j,index:L})}),k},[f,d]);qe(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const k=new MutationObserver(T=>{const R=new Set,L=j=>R.has(j)?R.delete(j):R.add(j);T.forEach(j=>{j.removedNodes.forEach(L),j.addedNodes.forEach(L)}),R.size===0&&(h.current+=1,g(h.current))});return v.forEach((T,R)=>{R.parentElement&&k.observe(R.parentElement,{childList:!0})}),()=>{k.disconnect()}},[v]),qe(()=>{h.current===d&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),l.current=v.size),a(v)},[a,v,n,r,d]),qe(()=>()=>{n.current=[]},[n]),qe(()=>()=>{r&&(r.current=[])},[r]);const S=st(k=>(c.add(k),()=>{c.delete(k)}));qe(()=>{c.forEach(k=>k(v))},[c,v]);const E=C.useMemo(()=>({register:y,unregister:x,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[y,x,S,n,r,l]);return p.jsx(D9.Provider,{value:E,children:t})}function e$(){return new Map}function t$(){return new Set}function n$(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const r$=C.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:a,render:l,side:c,align:f,sideOffset:d=0,alignOffset:g=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:v=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=P_,...k}=t,{store:T}=Qo(),R=XV(),L=h0(!0),j=T.useState("parent"),N=T.useState("floatingRootContext"),A=T.useState("floatingTreeRoot"),D=T.useState("mounted"),U=T.useState("open"),I=T.useState("modal"),q=T.useState("activeTriggerElement"),$=T.useState("transitionStatus"),V=T.useState("positionerElement"),Y=T.useState("instantType"),H=T.useState("hasViewport"),B=T.useState("lastOpenChangeReason"),F=T.useState("floatingNodeId"),G=T.useState("floatingParentNodeId"),ie=N.useState("domReferenceElement"),M=C.useRef(null),P=L6(V,!1,!1);let Q=r,_=d,ee=g,J=f,re=E;j.type==="context-menu"&&(Q=r??j.context?.anchor,J=J??"start",!c&&J!=="center"&&(ee=t.alignOffset??2,_=t.sideOffset??-5));let pe=c,fe=J;j.type==="menu"?(pe=pe??"inline-end",fe=fe??"start",re=t.collisionAvoidance??e6):j.type==="menubar"&&(pe=pe??"bottom",fe=fe??"start");const Ce=j.type==="context-menu",Ee=W6({anchor:Q,floatingRootContext:N,positionMethod:L?"fixed":o,mounted:D,side:pe,sideOffset:_,align:fe,alignOffset:ee,arrowPadding:Ce?0:x,collisionBoundary:h,collisionPadding:y,sticky:v,nodeId:F,keepMounted:R,disableAnchorTracking:S,collisionAvoidance:re,shiftCrossAxis:Ce&&!("side"in re&&re.side==="flip"),externalTree:A,adaptiveOrigin:H?G6:void 0}),Ie=C.useMemo(()=>{const Re={};return U||(Re.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...Ee.positionerStyles,...Re}}},[U,D,Ee.positionerStyles]);C.useEffect(()=>{function Re(he){he.open&&(he.parentNodeId===F&&T.set("hoverEnabled",!1),he.nodeId!==F&&he.parentNodeId===T.select("floatingParentNodeId")&&T.setOpen(!1,Et(Fu)))}return A.events.on("menuopenchange",Re),()=>{A.events.off("menuopenchange",Re)}},[T,A.events,F]),C.useEffect(()=>{if(T.select("floatingParentNodeId")==null)return;function Re(he){if(he.open||he.nodeId!==T.select("floatingParentNodeId"))return;const Se=he.reason??Fu;T.setOpen(!1,Et(Se))}return A.events.on("menuopenchange",Re),()=>{A.events.off("menuopenchange",Re)}},[A.events,T]);const Ye=jr();C.useEffect(()=>{U||Ye.clear()},[U,Ye]),C.useEffect(()=>{function Re(he){if(!(!U||he.nodeId!==T.select("floatingParentNodeId")))if(he.target&&q&&q!==he.target){const Se=T.select("closeDelay");Se>0?Ye.isStarted()||Ye.start(Se,()=>{T.setOpen(!1,Et(Fu))}):T.setOpen(!1,Et(Fu))}else Ye.clear()}return A.events.on("itemhover",Re),()=>{A.events.off("itemhover",Re)}},[A.events,U,q,T,Ye]),C.useEffect(()=>{const Re={open:U,nodeId:F,parentNodeId:G,reason:T.select("lastOpenChangeReason")};A.events.emit("menuopenchange",Re)},[A.events,U,T,F,G]),qe(()=>{const Re=ie,he=M.current;if(Re&&(M.current=Re),he&&Re&&Re!==he){T.set("instantType",void 0);const Se=new AbortController;return P(()=>{T.set("instantType","trigger-change")},Se.signal),()=>{Se.abort()}}},[ie,P,T]);const je={open:U,side:Ee.side,align:Ee.align,anchorHidden:Ee.anchorHidden,nested:j.type==="menu",instant:Y},_e=C.useMemo(()=>({side:Ee.side,align:Ee.align,arrowRef:Ee.arrowRef,arrowUncentered:Ee.arrowUncentered,arrowStyles:Ee.arrowStyles,nodeId:Ee.context.nodeId}),[Ee.side,Ee.align,Ee.arrowRef,Ee.arrowUncentered,Ee.arrowStyles,Ee.context.nodeId]),ye=ln("div",t,{state:je,stateAttributesMapping:qs,ref:[n,T.useStateSetter("positionerElement")],props:[Ie,i0($),k]}),We=D&&j.type!=="menu"&&(j.type!=="menubar"&&I&&B!==Rr||j.type==="menubar"&&j.context.modal);let Te=null;return j.type==="menubar"?Te=j.context.contentElement:j.type===void 0&&(Te=q),p.jsxs(M9.Provider,{value:_e,children:[We&&p.jsx(r9,{ref:j.type==="context-menu"||j.type==="nested-context-menu"?j.context.internalBackdropRef:null,inert:K6(!U),cutout:Te}),p.jsx(xD,{id:F,children:p.jsx(JV,{elementsRef:T.context.itemDomElements,labelsRef:T.context.itemLabels,children:ye})})]})}),i$=C.createContext(null);function P9(e){return C.useContext(i$)}const o$={...tx,disabled:rt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:rt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:rt(e=>e.allowMouseEnter),stickIfOpen:rt(e=>e.stickIfOpen),parent:rt(e=>e.parent),rootId:rt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:rt(e=>e.activeIndex),isActive:rt((e,t)=>e.activeIndex===t),hoverEnabled:rt(e=>e.hoverEnabled),instantType:rt(e=>e.instantType),lastOpenChangeReason:rt(e=>e.openChangeReason),floatingTreeRoot:rt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:rt(e=>e.floatingNodeId),floatingParentNodeId:rt(e=>e.floatingParentNodeId),itemProps:rt(e=>e.itemProps),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport),keyboardEventRelay:rt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class $x extends n0{constructor(t){super({...a$(),...t},{positionerRef:C.createRef(),popupRef:C.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),onOpenChangeComplete:void 0,triggerElements:new Mf},o$),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){let r=n.store.select("rootId"),o=n.store.select("floatingTreeRoot"),a=n.store.select("keyboardEventRelay");this.unsubscribeParentListener=n.store.subscribe(()=>{const l=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),f=n.store.select("keyboardEventRelay");r===l&&o===c&&a===f||(r=l,o=c,a=f,this.notifyAll())}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}static useStore(t,n){const r=Zn(()=>new $x(n)).current;return t??r}unsubscribeParentListener=null}function a$(){return{...ex(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Gy,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ln,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const F9=C.createContext(void 0);function B9(){return C.useContext(F9)}const H9=jy(function(t){const{children:n,open:r,onOpenChange:o,onOpenChangeComplete:a,defaultOpen:l=!1,disabled:c=!1,modal:f,loopFocus:d=!0,orientation:g="vertical",actionsRef:h,closeParentOnEsc:y=!1,handle:x,triggerId:v,defaultTriggerId:S=null,highlightItemOnHover:E=!0}=t,k=h0(!0),T=Qo(!0),R=P9(!0),L=B9(),j=C.useMemo(()=>L&&T?{type:"menu",store:T.store}:R?{type:"menubar",context:R}:k&&!T?{type:"context-menu",context:k}:{type:void 0},[k,T,R,L]),N=$x.useStore(x?.store,{open:l,openProp:r,activeTriggerId:S,triggerIdProp:v,parent:j});My(()=>{r===void 0&&N.state.open===!1&&l===!0&&N.update({open:!0,activeTriggerId:S})}),N.useControlledProp("openProp",r),N.useControlledProp("triggerIdProp",v),N.useContextCallback("onOpenChangeComplete",a);const A=N.useState("floatingTreeRoot"),D=y6(A),U=Go();qe(()=>{k&&!T?N.update({parent:{type:"context-menu",context:k},floatingNodeId:D,floatingParentNodeId:U}):T&&N.update({floatingNodeId:D,floatingParentNodeId:U})},[k,T,D,U,N]);const I=N.useState("open"),q=N.useState("activeTriggerElement"),$=N.useState("positionerElement"),V=N.useState("hoverEnabled"),Y=N.useState("modal"),H=N.useState("disabled"),B=N.useState("lastOpenChangeReason"),F=N.useState("parent"),G=N.useState("activeIndex"),ie=N.useState("payload"),M=N.useState("floatingParentNodeId"),P=C.useRef(null),Q=M!=null;let _;N.useSyncedValues({disabled:c,modal:F.type===void 0?f:void 0,rootId:Us()});const{openMethod:ee,triggerProps:J}=a9(I);Zy(N);const{forceUnmount:re}=Jy(I,N,()=>{N.update({allowMouseEnter:!1,stickIfOpen:!0})}),pe=C.useRef(F.type!=="context-menu"),fe=jr();C.useEffect(()=>{if(I||(P.current=null),F.type==="context-menu"){if(!I){fe.clear(),pe.current=!1;return}fe.start(500,()=>{pe.current=!0})}},[fe,I,F.type]),i9(I&&Y&&B!==Rr&&ee!=="touch",$),qe(()=>{!I&&!V&&N.set("hoverEnabled",!0)},[I,V,N]);const Ce=C.useRef(!0),Ee=jr(),Ie=st((Xe,Ve)=>{const pt=Ve.reason;if(I===Xe&&Ve.trigger===q&&B===pt||(Ve.preventUnmountOnClose=()=>{N.set("preventUnmountingOnClose",!0)},!Xe&&Ve.trigger==null&&(Ve.trigger=q??void 0),o?.(Xe,Ve),Ve.isCanceled))return;const mt={open:Xe,nativeEvent:Ve.event,reason:Ve.reason,nested:Q};_?.emit("openchange",mt);const Qe=Ve.event;if(Xe===!1&&Qe?.type==="click"&&Qe.pointerType==="touch"&&!Ce.current)return;if(!Xe&&G!==null){const fn=N.context.itemDomElements.current[G];queueMicrotask(()=>{fn?.setAttribute("tabindex","-1")})}Xe&&pt===Yl?(Ce.current=!1,Ee.start(300,()=>{Ce.current=!0})):(Ce.current=!0,Ee.clear());const yt=(pt===ic||pt===t6)&&Qe.detail===0&&Qe?.isTrusted,Pt=!Xe&&(pt===e0||pt==null),Wt={open:Xe,openChangeReason:pt};P.current=Ve.event??null;const yn=Ve.trigger?.id??null;(yn||Xe)&&(Wt.activeTriggerId=yn,Wt.activeTriggerElement=Ve.trigger??null),N.update(Wt),F.type==="menubar"&&(pt===Yl||pt===oc||pt===Rr||pt===qh||pt===Fu)?N.set("instantType","group"):yt||Pt?N.set("instantType",yt?"click":"dismiss"):N.set("instantType",void 0)}),Ye=C.useCallback(Xe=>{const Ve=Et(Xe);return Ve.preventUnmountOnClose=()=>{N.set("preventUnmountingOnClose",!0)},Ve},[N]),je=C.useCallback(()=>{N.setOpen(!1,Ye(qy))},[N,Ye]);C.useImperativeHandle(h,()=>({unmount:re,close:je}),[re,je]);let _e;F.type==="context-menu"&&(_e=F.context),C.useImperativeHandle(_e?.positionerRef,()=>$,[$]),C.useImperativeHandle(_e?.actionsRef,()=>({setOpen:Ie}),[Ie]);const ye=nx({popupStore:N,onOpenChange:Ie});_=ye.context.events,C.useEffect(()=>{const Xe=({open:Ve,eventDetails:pt})=>Ie(Ve,pt);return _.on("setOpen",Xe),()=>{_?.off("setOpen",Xe)}},[_,Ie]);const We=Wy(ye,{enabled:!H,bubbles:{escapeKey:y&&F.type==="menu"},outsidePress(){return F.type!=="context-menu"||P.current?.type==="contextmenu"?!0:pe.current},externalTree:Q?A:void 0}),Te=F6(ye,{role:"menu"}),Re=$6(),he=C.useCallback(Xe=>{N.select("activeIndex")!==Xe&&N.set("activeIndex",Xe)},[N]),Se=ez(ye,{enabled:!H,listRef:N.context.itemDomElements,activeIndex:G,nested:F.type!==void 0,loopFocus:d,orientation:g,parentOrientation:F.type==="menubar"?F.context.orientation:void 0,rtl:Re==="rtl",disabledIndices:w1,onNavigate:he,openOnArrowKeyDown:F.type!=="context-menu",externalTree:Q?A:void 0,focusItemOnHover:E}),ne=C.useCallback(Xe=>{N.context.typingRef.current=Xe},[N]),xe=nz(ye,{listRef:N.context.itemLabels,elementsRef:N.context.itemDomElements,activeIndex:G,resetMs:__,onMatch:Xe=>{I&&Xe!==G&&N.set("activeIndex",Xe)},onTypingChange:ne}),{getReferenceProps:ze,getFloatingProps:Ue,getItemProps:wt,getTriggerProps:ae}=Lf([We,Te,Se,xe]),ve=C.useMemo(()=>{const Xe=Ba(ze(),{onMouseMove(){N.set("allowMouseEnter",!0)}},J);return delete Xe.role,Xe},[ze,N,J]),Oe=C.useMemo(()=>{const Xe=ae();if(!Xe)return Xe;const Ve=Ba(Xe,J);return delete Ve.role,delete Ve["aria-controls"],Ve},[ae,J]),Me=C.useMemo(()=>Ue({onMouseMove(){N.set("allowMouseEnter",!0),F.type==="menu"&&N.set("hoverEnabled",!1)},onClick(){N.select("hoverEnabled")&&N.set("hoverEnabled",!1)},onKeyDown(Xe){const Ve=N.select("keyboardEventRelay");Ve&&!Xe.isPropagationStopped()&&Ve(Xe)}}),[Ue,F.type,N]),He=C.useMemo(()=>wt(),[wt]);N.useSyncedValues({floatingRootContext:ye,activeTriggerProps:ve,inactiveTriggerProps:Oe,popupProps:Me,itemProps:He});const kt=C.useMemo(()=>({store:N,parent:j}),[N,j]),Ft=p.jsx(L9.Provider,{value:kt,children:typeof n=="function"?n({payload:ie}):n});return F.type===void 0||F.type==="context-menu"?p.jsx(bD,{externalTree:A,children:Ft}):Ft});function s$(e){const t=Qo().store,n=C.useMemo(()=>({parentMenu:t}),[t]);return p.jsx(F9.Provider,{value:n,children:p.jsx(H9,{...e})})}function l$(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const a=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,f=parseFloat(r.height)||0,d=Math.max(t.width,a,c),g=Math.max(t.height,l,f),h=d-t.width,y=g-t.height;return{left:t.left-h/2,right:t.right+h/2,top:t.top-y/2,bottom:t.bottom+y/2}}function c$(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Rx(),{ref:o,index:a}=Vx(e),l=n===a,c=C.useRef(null),f=Ms(o,c);return{compositeProps:C.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const g=c.current;if(!t||!g)return;const h=g.hasAttribute("disabled")||g.ariaDisabled==="true";!l&&!h&&g.focus()}}),[l,r,a,t]),compositeRef:f,index:a}}function u$(e){const{render:t,className:n,state:r=Ln,props:o=w1,refs:a=w1,metadata:l,stateAttributesMapping:c,tag:f="div",...d}=e,{compositeProps:g,compositeRef:h}=c$({metadata:l});return ln(f,e,{state:r,ref:[...a,h],props:[g,...o,d],stateAttributesMapping:c})}function U9(e){if(Rn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!oo(e))return U9(fo(e))}function f$(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,o=C.useRef(!1);return C.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(o.current=!0,Gt(a.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:a=>{o.current&&(o.current=!1,a.preventBaseUIHandler())}}:Ln,[t,n,r])}const Th=2,d$=Tk(function(t,n){const{render:r,className:o,disabled:a=!1,nativeButton:l=!0,id:c,openOnHover:f,delay:d=100,closeDelay:g=0,handle:h,payload:y,...x}=t,v=Qo(!0),S=h?.store??v?.store;if(!S)throw new Error(Gn(85));const E=Gi(c),k=S.useState("isTriggerActive",E),T=S.useState("floatingRootContext"),R=S.useState("isOpenedByTrigger",E),L=C.useRef(null),j=p$(),N=Rx(!0),A=Ya(),D=C.useMemo(()=>A??new Gy,[A]),U=y6(D),I=Go(),{registerTrigger:q,isMountedByThisTrigger:$}=D6(E,L,S,{payload:y,closeDelay:g,parent:j,floatingTreeRoot:D,floatingNodeId:U,floatingParentNodeId:I,keyboardEventRelay:N?.relayKeyboardEvent}),V=j.type==="menubar",Y=S.useState("disabled"),H=a||Y||V&&j.context.disabled,{getButtonProps:B,buttonRef:F}=zf({disabled:H,native:l});C.useEffect(()=>{!R&&j.type===void 0&&(S.context.allowMouseUpTriggerRef.current=!1)},[S,R,j.type]);const G=C.useRef(null),ie=jr(),M=st(Te=>{if(!G.current)return;ie.clear(),S.context.allowMouseUpTriggerRef.current=!1;const Re=Te.target;if(ht(G.current,Re)||ht(S.select("positionerElement"),Re)||Re===G.current||Re!=null&&U9(Re)===S.select("rootId"))return;const he=l$(G.current);Te.clientX>=he.left-Th&&Te.clientX<=he.right+Th&&Te.clientY>=he.top-Th&&Te.clientY<=he.bottom+Th||D.events.emit("close",{domEvent:Te,reason:H_})});C.useEffect(()=>{R&&S.select("lastOpenChangeReason")===Rr&&Gt(G.current).addEventListener("mouseup",M,{once:!0})},[R,M,S]);const P=V&&j.context.hasSubmenuOpen,_=ox(T,{enabled:(f??P)&&!H&&j.type!=="context-menu"&&(!V||P&&!$),handleClose:ax({blockPointerEvents:!V}),mouseOnly:!0,move:!1,restMs:j.type===void 0?d:void 0,delay:{close:g},triggerElementRef:L,externalTree:D,isActiveTrigger:k}),ee=h$(R,S.select("lastOpenChangeReason")),J=b6(T,{enabled:!H&&j.type!=="context-menu",event:R&&V?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:j.type===void 0?ee:!1}),re=I6(T,{enabled:!H&&P}),pe=f$({open:R,enabled:V,mouseDownAction:"open"}),fe=Lf([J,re]),Ce={disabled:H,open:R},Ee=S.useState("triggerProps",$),Ie=[G,n,F,q,L],Ye=[fe.getReferenceProps(),_??Ln,Ee,{"aria-haspopup":"menu",id:E,onMouseDown:Te=>{if(S.select("open"))return;ie.start(200,()=>{S.context.allowMouseUpTriggerRef.current=!0}),Gt(Te.currentTarget).addEventListener("mouseup",M,{once:!0})}},V?{role:"menuitem"}:{},pe,x,B],je=C.useRef(null),_e=st(Te=>{Mi.flushSync(()=>{S.setOpen(!1,Et(oc,Te.nativeEvent,Te.currentTarget))}),j_(je.current)?.focus()}),ye=st(Te=>{const Re=S.select("positionerElement");if(Re&&Gl(Te,Re))S.context.beforeContentFocusGuardRef.current?.focus();else{Mi.flushSync(()=>{S.setOpen(!1,Et(oc,Te.nativeEvent,Te.currentTarget))});let he=O_(S.context.triggerFocusTargetRef.current||L.current);for(;he!==null&&ht(Re,he);){const Se=he;if(he=Hy(he),he===Se)break}he?.focus()}}),We=ln("button",t,{enabled:!V,stateAttributesMapping:FS,state:Ce,ref:Ie,props:Ye});return V?p.jsx(u$,{tag:"button",render:r,className:o,state:Ce,refs:Ie,props:Ye,stateAttributesMapping:FS}):R?p.jsxs(C.Fragment,{children:[p.jsx(ac,{ref:je,onFocus:_e},`${E}-pre-focus-guard`),p.jsx(C.Fragment,{children:We},E),p.jsx(ac,{ref:S.context.triggerFocusTargetRef,onFocus:ye},`${E}-post-focus-guard`)]}):p.jsx(C.Fragment,{children:We},E)});function h$(e,t){const n=jr(),[r,o]=C.useState(!1);return qe(()=>{e&&t==="trigger-hover"?(o(!0),n.start(D_,()=>{o(!1)})):e||(n.clear(),o(!1))},[e,t,n]),r}function p$(){const e=h0(!0),t=Qo(!0),n=P9();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const m$=C.forwardRef(function(t,n){const{className:r,render:o,orientation:a="horizontal",...l}=t;return ln("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},l]})}),g$=C.forwardRef(function(t,n){const{render:r,className:o,label:a,id:l,nativeButton:c=!1,openOnHover:f=!0,delay:d=100,closeDelay:g=0,disabled:h=!1,...y}=t,x=Vx(),v=qx(),{store:S}=Qo(),E=Gi(l),k=S.useState("open"),T=S.useState("floatingRootContext"),R=S.useState("floatingTreeRoot"),L=_6(E,S),j=C.useCallback(J=>{const re=L(J);return J!==null&&S.select("open")&&S.select("activeTriggerId")==null&&S.update({activeTriggerId:E,activeTriggerElement:J,closeDelay:g}),re},[L,g,S,E]),N=C.useRef(null),A=C.useCallback(J=>{N.current=J,S.set("activeTriggerElement",J)},[S]),D=B9();if(!D?.parentMenu)throw new Error(Gn(37));S.useSyncedValue("closeDelay",g);const U=D.parentMenu,I=U.useState("itemProps"),q=U.useState("isActive",x.index),$=C.useMemo(()=>({type:"submenu-trigger",setActive(){U.set("activeIndex",x.index)}}),[U,x.index]),V=S.useState("disabled"),Y=h||V,{getItemProps:H,itemRef:B}=_9({closeOnClick:!1,disabled:Y,highlighted:q,id:E,store:S,typingRef:U.context.typingRef,nativeButton:c,itemMetadata:$,nodeId:v?.nodeId}),F=S.useState("hoverEnabled"),G=U.useState("allowMouseEnter"),ie=ox(T,{enabled:F&&f&&!Y,handleClose:ax({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:d,delay:G?{open:d,close:g}:0,triggerElementRef:N,externalTree:R}),M=b6(T,{enabled:!Y,event:"mousedown",toggle:!f,ignoreMouse:f,stickIfOpen:!1}),P=Lf([M]),Q=S.useState("triggerProps",!0);return delete Q.id,ln("div",t,{state:{disabled:Y,highlighted:q,open:k},stateAttributesMapping:B6,props:[P.getReferenceProps(),ie,Q,I,{tabIndex:k||q?0:-1,onBlur(){q&&U.set("activeIndex",null)}},y,H],ref:[n,x.ref,B,j,A]})});function Ws({...e}){return p.jsx(H9,{"data-slot":"dropdown-menu",...e})}function Ks({...e}){return p.jsx(d$,{"data-slot":"dropdown-menu-trigger",...e})}function Za({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:o,...a}){return p.jsx(ZV,{children:p.jsx(r$,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:p.jsx(QV,{"data-slot":"dropdown-menu-content",className:we("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-neutral-900 p-1 text-foreground shadow-md ring-0 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",o),...a})})})}function Os({...e}){return p.jsx(VV,{"data-slot":"dropdown-menu-group",...e})}function Ql({className:e,inset:t,...n}){return p.jsx($V,{"data-slot":"dropdown-menu-label","data-inset":t,className:we("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...n})}function _n({className:e,inset:t,variant:n="default",...r}){return p.jsx(GV,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:we("group/dropdown-menu-item relative flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm text-foreground outline-hidden select-none hover:bg-neutral-800 focus:bg-neutral-800 not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function Gx({...e}){return p.jsx(s$,{"data-slot":"dropdown-menu-sub",...e})}function Yx({className:e,inset:t,children:n,...r}){return p.jsxs(g$,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:we("flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm text-foreground outline-hidden select-none hover:bg-neutral-800 focus:bg-neutral-800 data-inset:pl-8 data-popup-open:bg-neutral-800 data-open:bg-neutral-800 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,p.jsx(VE,{className:"ml-auto"})]})}function Wx({align:e="start",alignOffset:t=-3,side:n="right",sideOffset:r=0,className:o,...a}){return p.jsx(Za,{"data-slot":"dropdown-menu-sub-content",className:we("w-auto min-w-24 rounded-lg border border-border bg-neutral-900 p-1 text-foreground shadow-lg ring-0 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),align:e,alignOffset:t,side:n,sideOffset:r,...a})}function Fo({className:e,...t}){return p.jsx(m$,{"data-slot":"dropdown-menu-separator",className:we("-mx-1 my-1 h-px bg-border",e),...t})}function q9(e){const t=e.split(/[-_\s]+/).filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}const y$=()=>{const{apiClient:e}=Be.getState();return e?e.request(_f.LOGOUT):Promise.reject(new Error("Not connected"))},x$=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:so().queryKey}),n?.(...o)},...r,mutationFn:y$})};function ja({className:e,size:t="default",...n}){return p.jsx("div",{"data-slot":"card","data-size":t,className:we("group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})}function b$({className:e,...t}){return p.jsx("div",{"data-slot":"card-title",className:we("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function Ah({className:e,...t}){return p.jsx("div",{"data-slot":"card-description",className:we("text-sm text-muted-foreground",e),...t})}const v$=2500;function w$({onOpenChange:e,open:t}){const n=cn(),r=ji(h=>h.isLoggingIn),o=ji(h=>h.setLoggingIn),a=Be(h=>h.connectionState),[l,c]=C.useState({type:"idle"});C.useEffect(()=>{t||(c({type:"idle"}),o(!1))},[t,o]),C.useEffect(()=>l.type!=="waiting"?void 0:S9(y=>{y.success&&y.user?(ut.success(`Logged in as ${y.user.email}`,{position:"top-center"}),n.invalidateQueries({queryKey:so().queryKey}),e(!1)):c({message:y.error??"Authentication failed",type:"error"}),o(!1)}),[e,n,o,l.type]),C.useEffect(()=>{if(l.type!=="waiting")return;let h=!1;async function y(){try{const v=await n.fetchQuery(so());if(h)return;v.isAuthorized&&v.user&&(ut.success(`Logged in as ${v.user.email}`,{position:"top-center"}),o(!1),e(!1))}catch{}}const x=globalThis.setInterval(y,v$);return()=>{h=!0,globalThis.clearInterval(x)}},[e,n,o,l.type]);async function f(){o(!0),c({type:"starting"});try{const h=await w9();if(!zx(h.authUrl))throw new Error("Received an unsafe OAuth URL from the daemon");window.open(h.authUrl,"_blank","noopener,noreferrer"),c({authUrl:h.authUrl,type:"waiting"})}catch(h){o(!1),c({message:h instanceof Error?h.message:"Unable to start login",type:"error"})}}function d(){c({type:"idle"})}const g=a!=="connected"||r;return p.jsx($s,{onOpenChange:e,open:t,children:p.jsxs(Gs,{children:[p.jsxs(ui,{children:[p.jsx(fi,{children:"Redirecting to ByteRover"}),p.jsxs(Ff,{children:["Please sign in to your ",p.jsx("span",{className:"text-foreground",children:"byterover.dev"})," account to continue."]})]}),l.type==="starting"&&p.jsx("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-blue-700",children:"Starting authentication…"}),l.type==="waiting"&&p.jsxs(ja,{className:"p-4 gap-2",children:[p.jsx("div",{children:"Finish signing in in the new tab."}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:["If the tab didn’t open,"," ",p.jsx("a",{className:"underline underline-offset-2",href:l.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),l.type==="error"&&p.jsx("div",{className:"rounded-lg border border-destructive/20 bg-destructive/5 p-3 text-sm text-destructive",children:l.message}),p.jsx(Qa,{children:l.type==="error"?p.jsxs(p.Fragment,{children:[p.jsx(H1,{render:p.jsx(De,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),p.jsx(De,{className:"cursor-pointer",onClick:d,children:"Try again"})]}):p.jsxs(p.Fragment,{children:[p.jsx(H1,{render:p.jsx(De,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),p.jsx(De,{className:"cursor-pointer",disabled:g,onClick:f,children:l.type==="waiting"?"Waiting for authentication…":"Proceed to Login"})]})})]})})}function S$(){const[e,t]=C.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx(De,{className:"h-auto rounded-full p-0 ml-2.5",onClick:()=>t(!0),variant:"ghost",children:p.jsx(f0,{children:p.jsx(d0,{className:"bg-transparent",children:p.jsx(Lx,{className:"size-4 shrink-0"})})})}),p.jsx(w$,{onOpenChange:t,open:e})]})}function C$(){const e=ji(o=>o.user),t=x$(),n=cn();if(C.useEffect(()=>{e||n.invalidateQueries({queryKey:so().queryKey}).catch(()=>{})},[n,e]),!e)return p.jsxs(De,{className:"ml-2.5",disabled:!0,size:"sm",variant:"outline",children:[p.jsx(Lx,{className:"size-4 shrink-0 text-muted-foreground"}),p.jsx("span",{children:"Signed in"})]});const r=e.name??e.email;return p.jsxs(Ws,{children:[p.jsx(Ks,{children:p.jsxs(f0,{className:"cursor-pointer",children:[p.jsx(Ux,{alt:r,src:e.avatarUrl}),p.jsx(d0,{children:q9(r)})]})}),p.jsxs(Za,{align:"start",className:"w-(--anchor-width) min-w-56",sideOffset:6,children:[p.jsx(Os,{children:p.jsxs(Ql,{className:"flex flex-col gap-0.5",children:[p.jsx("span",{className:"text-xs tracking-widest text-muted-foreground",children:"Signed in"}),p.jsx("span",{className:"truncate text-sm font-medium text-card-foreground!",children:e.email})]})}),p.jsx(Fo,{}),p.jsxs(_n,{disabled:t.isPending,onClick:()=>t.mutate(),children:[p.jsx(AU,{className:"size-4 text-muted-foreground!"}),p.jsx("span",{className:"text-sm",children:t.isPending?"Logging out…":"Log out"})]})]})]})}function E$(){const e=ji(n=>n.isAuthorized);return ji(n=>n.isLoadingInitial)?p.jsx(De,{className:"ml-2.5",disabled:!0,size:"icon",variant:"outline",children:p.jsx(Lx,{className:"size-4 shrink-0 text-muted-foreground animate-pulse"})}):e?p.jsx(C$,{}):p.jsx(S$,{})}function k$(){const e=on(o=>o.seenWelcome),t=on(o=>o.tourCompleted),n=on(o=>o.startTour),r=!e&&!t;return p.jsxs(Ws,{children:[p.jsx(Ks,{render:p.jsxs(De,{size:"sm",variant:"ghost",children:[p.jsx(ZH,{className:"size-4"}),"Help",r&&p.jsx("span",{"aria-hidden":!0,className:we("size-1.5 rounded-full bg-orange-500")})]})}),p.jsxs(Za,{align:"end",className:"w-56",children:[p.jsxs(_n,{className:"bg-primary/8 hover:bg-primary/12 focus:bg-primary/12",onClick:()=>n(),children:[p.jsx(QH,{className:"text-primary-foreground"}),p.jsx("span",{children:t?"Restart the tour":"Take the tour"})]}),p.jsx(Fo,{}),p.jsx(_n,{render:p.jsxs("a",{href:"https://docs.byterover.dev",rel:"noopener noreferrer",target:"_blank",children:[p.jsx(IH,{}),p.jsx("span",{children:"Documentation"})]})}),p.jsx(_n,{render:p.jsxs("a",{href:"https://github.com/campfirein/byterover-cli/issues",rel:"noopener noreferrer",target:"_blank",children:[p.jsx(PH,{}),p.jsx("span",{children:"Report an issue"})]})})]})]})}function T$(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:a,actionsRef:l,handle:c,triggerId:f,defaultTriggerId:d=null}=e,g=Ka(),h=!!g,y=Zn(()=>c?.store??new l9({open:r,openProp:n,activeTriggerId:d,triggerIdProp:f,modal:!0,disablePointerDismissal:!0,nested:h,role:"alertdialog"})).current;y.useControlledProp("openProp",n),y.useControlledProp("triggerIdProp",f),y.useSyncedValue("nested",h),y.useContextCallback("onOpenChange",o),y.useContextCallback("onOpenChangeComplete",a);const x=y.useState("payload");s9({store:y,actionsRef:l,parentContext:g?.store.context});const v=C.useMemo(()=>({store:y}),[y]);return p.jsx(Tx.Provider,{value:v,children:typeof t=="function"?t({payload:x}):t})}function p0({...e}){return p.jsx(T$,{"data-slot":"alert-dialog",...e})}function A$({...e}){return p.jsx(Ox,{"data-slot":"alert-dialog-portal",...e})}function R$({className:e,...t}){return p.jsx(Ax,{"data-slot":"alert-dialog-overlay",className:we("fixed inset-0 isolate z-50 bg-background/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function m0({className:e,size:t="default",...n}){return p.jsxs(A$,{children:[p.jsx(R$,{}),p.jsx(Nx,{"data-slot":"alert-dialog-content","data-size":t,className:we("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function g0({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-header",className:we("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function y0({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-footer",className:we("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function x0({className:e,...t}){return p.jsx(u9,{"data-slot":"alert-dialog-title",className:we("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function b0({className:e,...t}){return p.jsx(WT,{"data-slot":"alert-dialog-description",className:we("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function v0({className:e,variant:t="outline",size:n="default",...r}){return p.jsx(Pf,{"data-slot":"alert-dialog-cancel",className:we(e),render:p.jsx(De,{variant:t,size:n}),...r})}const N$="state:getProjectConfig",O$=e=>{const{apiClient:t}=Be.getState();return t?t.request(N$,{projectPath:e}):Promise.reject(new Error("Not connected"))},j$=e=>({enabled:e.length>0,queryFn:()=>O$(e),queryKey:["project-config",e]}),V9=({projectPath:e,queryConfig:t})=>br({...t,...j$(e)}),M$=()=>{const{apiClient:e}=Be.getState();return e?e.request(mB.GET):Promise.reject(new Error("Not connected"))},L$=()=>({queryFn:M$,queryKey:["projects"]}),$9=({queryConfig:e}={})=>br({...L$(),...e}),_$=/^(?:\/Users\/|\/home\/|[A-Za-z]:[/\\]Users[/\\])[^/\\]+([/\\].*)$/;function G9(e){const t=_$.exec(e);return t?`~${t[1]}`:e}function w0(e){return e.replace(/[/\\]+$/,"").split(/[/\\]/).at(-1)||e}const RC=["bg-gradient-to-br from-red-600 to-red-500 text-white","bg-gradient-to-br from-orange-400 to-pink-500 text-white","bg-gradient-to-br from-teal-500 to-emerald-500 text-white","bg-gradient-to-br from-blue-800 to-blue-600 text-white","bg-gradient-to-br from-sky-400 to-sky-300 text-white","bg-gradient-to-br from-purple-500 to-pink-500 text-white","bg-gradient-to-br from-green-500 to-lime-300 text-white","bg-gradient-to-br from-yellow-300 to-orange-400 text-white","bg-gradient-to-br from-orange-500 to-red-600 text-white","bg-gradient-to-br from-cyan-400 to-cyan-300 text-white"];function D$(e){let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n)??0;t=Math.abs(Math.trunc(t*31+r))}return RC[t%RC.length]}const I$={lg:"size-7 text-xs",md:"size-6 text-xs",sm:"size-5 text-[10px]"};function Kx({name:e,seed:t,size:n="md"}){return p.jsx("span",{className:we("relative flex shrink-0 items-center justify-center overflow-hidden rounded font-extrabold leading-4",'before:absolute before:inset-0 before:bg-black/10 before:content-[""]',I$[n],D$(t??e)),children:p.jsx("span",{className:"relative",children:q9(e)})})}function Y9({onClick:e,project:t}){const n=w0(t.projectPath);return p.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md p-2 text-left transition-colors hover:bg-accent cursor-pointer",onClick:e,type:"button",children:[p.jsx(Kx,{name:n,seed:t.projectPath,size:"lg"}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground",children:n}),p.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground",children:G9(t.projectPath)})]})]})}function W9({onOpenChange:e,onSelect:t,open:n,projects:r}){const[o,a]=C.useState(""),l=C.useMemo(()=>{const f=o.trim().toLowerCase();return f?r.filter(d=>d.projectPath.toLowerCase().includes(f)):r},[r,o]);function c(f){t(f),e(!1)}return p.jsx($s,{onOpenChange:e,open:n,children:p.jsxs(Gs,{className:"gap-2 sm:max-w-lg",children:[p.jsxs(ui,{children:[p.jsx(fi,{children:"All projects"}),p.jsx(Ff,{children:p.jsxs("div",{className:"relative",children:[p.jsx(vc,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),p.jsx(Ko,{autoFocus:!0,className:"pl-9",onChange:f=>a(f.target.value),placeholder:"Search...",value:o})]})})]}),p.jsx("div",{className:"-mx-4 no-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto px-4 mt-2",children:l.length===0?p.jsx("p",{className:"px-2 py-4 text-center text-xs text-muted-foreground",children:"No projects match your search."}):l.map(f=>p.jsx(Y9,{onClick:()=>c(f),project:f},f.projectPath))})]})})}const NC=5;function K9({name:e,project:t,remoteLabel:n}){return p.jsxs(p.Fragment,{children:[p.jsx(Kx,{name:e,seed:t.projectPath}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground!",children:e}),p.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground!",children:G9(t.projectPath)}),n&&p.jsx("span",{className:"text-muted-foreground! mono flex items-start gap-1 text-[10px] leading-4",children:p.jsxs("span",{className:"min-w-0 wrap-break-word",children:[p.jsx("span",{children:"Remote space: "}),p.jsx("span",{className:"text-primary-foreground! font-medium",children:n})]})})]})]})}function z$({onSelect:e,project:t,showRemote:n=!1}){const r=w0(t.projectPath),{data:o}=V9({projectPath:t.projectPath,queryConfig:{enabled:n}}),a=o?.brvConfig?.teamName,l=o?.brvConfig?.spaceName,c=a&&l?`${a} / ${l}`:void 0;return p.jsx(_n,{className:"gap-2 rounded-md",onClick:e,children:p.jsx(K9,{name:r,project:t,remoteLabel:c})})}function P$({isSelected:e,onSelect:t,project:n}){const r=w0(n.projectPath),{data:o}=V9({projectPath:n.projectPath}),a=o?.brvConfig?.teamName,l=o?.brvConfig?.spaceName,c=a&&l?`${a} / ${l}`:void 0,f=o?.remoteUrl&&zx(o.remoteUrl)?o.remoteUrl:void 0;return p.jsxs(Gx,{children:[p.jsx(Yx,{className:"gap-2 rounded-md",children:p.jsx(K9,{name:r,project:n,remoteLabel:c})}),p.jsxs(Wx,{className:"min-w-56",children:[p.jsxs(_n,{disabled:e,onClick:t,children:[p.jsx(NH,{className:"size-4"}),p.jsx("span",{className:"text-sm",children:e?"Current project":"Switch to this project"})]}),p.jsxs(_n,{disabled:!f,onClick:()=>{f&&window.open(f,"_blank","noopener,noreferrer")},children:[p.jsx(BU,{className:"size-4"}),p.jsx("span",{className:"text-sm",children:"Open Remote space"})]})]})]})}function F$(){const e=Be(v=>v.selectedProject),t=Be(v=>v.setSelectedProject),{data:n}=$9({queryConfig:{refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:30*1e3}}),r=C.useMemo(()=>n?.locations??[],[n]),{openProjects:o,recentProjects:a}=C.useMemo(()=>{const v=[],S=[];for(const E of r)E.isActive?v.push(E):S.push(E);return{openProjects:v,recentProjects:S}},[r]),[l,c]=C.useState(!1),[f,d]=C.useState(!1),[g,h]=C.useState(!1),y=w0(e);function x(v){v.projectPath!==e&&t(v.projectPath)}return p.jsxs(p.Fragment,{children:[p.jsxs(Ws,{onOpenChange:c,open:l,children:[p.jsxs(Ks,{render:p.jsx(De,{variant:"ghost"}),children:[e?p.jsx(Kx,{name:y,seed:e,size:"sm"}):null,p.jsx("span",{className:"truncate",children:y||"No project selected"}),p.jsx(Bf,{className:"size-4 shrink-0"})]}),p.jsxs(Za,{align:"start",className:"w-(--anchor-width) min-w-72",sideOffset:6,children:[p.jsxs(_n,{onClick:()=>d(!0),children:[p.jsx(fU,{className:"size-4"}),p.jsx("span",{className:"text-sm",children:"Open Project"})]}),p.jsx(Fo,{}),o.length>0&&p.jsxs(Os,{children:[p.jsx(Ql,{children:"Open Projects"}),o.map(v=>p.jsx(P$,{isSelected:v.projectPath===e,onSelect:()=>x(v),project:v},v.projectPath)),p.jsx(Fo,{})]}),a.length>0&&p.jsxs(Os,{children:[p.jsx(Ql,{children:"Recent Projects"}),a.slice(0,NC).map(v=>p.jsx(z$,{onSelect:()=>x(v),project:v},v.projectPath)),a.length>NC&&p.jsx(_n,{onClick:()=>h(!0),children:p.jsx("span",{className:"text-xs",children:"See all"})})]})]})]}),p.jsx(p0,{onOpenChange:d,open:f,children:p.jsxs(m0,{children:[p.jsxs(g0,{children:[p.jsx(x0,{children:"Add a project"}),p.jsxs(b0,{children:["To add a project, run ",p.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:"brv webui"})," in that folder from your terminal. Once registered, it will appear here."]})]}),p.jsx(y0,{children:p.jsx(v0,{children:"Got it"})})]})}),p.jsx(W9,{onOpenChange:h,onSelect:x,open:g,projects:r})]})}const B$=()=>{const{apiClient:e}=Be.getState();return e?e.request(rr.BRANCH,{action:"list",all:!0}).then(t=>{if(t.action!=="list")throw new Error(`Unexpected branch response action: ${t.action}`);return t.branches}):Promise.reject(new Error("Not connected"))},Ja=()=>({queryFn:B$,queryKey:["vc","branches","all"],refetchInterval:1e4,refetchIntervalInBackground:!1,staleTime:5e3}),H$=({queryConfig:e}={})=>br({...Ja(),...e}),U$=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.BRANCH,{action:"set-upstream",upstream:e}):Promise.reject(new Error("Not connected"))},q$=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:U$})},V$=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.CHECKOUT,e):Promise.reject(new Error("Not connected"))},Q9=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:V$})},$$=(e={})=>{const{apiClient:t}=Be.getState();return t?t.request(rr.FETCH,e):Promise.reject(new Error("Not connected"))},G$=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:$$})},Y$=(e={})=>{const{apiClient:t}=Be.getState();return t?t.request(rr.PULL,e):Promise.reject(new Error("Not connected"))},X9=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:Y$})};function W$(e,t){const n=t.trim().toLowerCase();return n===""?[...e]:e.filter(r=>r.name.toLowerCase().includes(n))}const OC="refs/remotes/";function K$(e){const t=e.startsWith(OC)?e.slice(OC.length):e,n=t.indexOf("/");return n===-1?"unknown":t.slice(0,n)}function Q$(e){const t=[],n=new Map;for(const r of e)if(r.isRemote){const o=K$(r.name),a=n.get(o);a?a.push(r):n.set(o,[r])}else t.push(r);return{locals:t,remotesByHost:n}}function X$(e,t){return t?e.some(r=>!r.isRemote&&r.name===t)?[...e]:[{isCurrent:!0,isRemote:!1,name:t},...e]:[...e]}const Z$=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.BRANCH,{action:"delete",name:e}):Promise.reject(new Error("Not connected"))},J$=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:Z$})};function eG({branchName:e,onOpenChange:t,open:n}){const r=J$();async function o(){try{await r.mutateAsync(e),ut.success(`Deleted ${e}`,{position:"top-center"}),t(!1)}catch(a){ut.error(a instanceof Error?a.message:"Failed to delete branch",{position:"top-center"})}}return p.jsx(p0,{onOpenChange:t,open:n,children:p.jsxs(m0,{children:[p.jsxs(g0,{children:[p.jsx(x0,{children:"Delete branch?"}),p.jsxs(b0,{children:["Branch ",p.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:e})," will be removed. Unmerged commits on this branch will be lost unless they are reachable from another ref."]})]}),p.jsxs(y0,{children:[p.jsx(v0,{children:"Cancel"}),p.jsx(De,{disabled:r.isPending,onClick:o,variant:"destructive",children:r.isPending?"Deleting…":"Delete branch"})]})]})})}const tG=()=>{const{apiClient:e}=Be.getState();return e?e.request(rr.INIT):Promise.reject(new Error("Not connected"))},nG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:tG})};function Z9(){const e=nG();async function t(){try{const n=await e.mutateAsync();ut.success(n.reinitialized?"Reinitialized version control":"Initialized version control",{position:"top-center"})}catch(n){ut.error(n instanceof Error?n.message:"Failed to initialize",{position:"top-center"})}}return p.jsxs(De,{disabled:e.isPending,onClick:()=>{t().catch(()=>{})},size:"sm",variant:"outline",children:[p.jsx(jx,{className:"size-4 shrink-0"}),p.jsx("span",{children:e.isPending?"Initializing…":"Initialize Version Control"})]})}function rG({className:e,...t}){return p.jsx("label",{"data-slot":"label",className:we("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const iG=o0("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function oG({className:e,orientation:t="vertical",...n}){return p.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:we(iG({orientation:t}),e),...n})}function aG({className:e,...t}){return p.jsx(rG,{"data-slot":"field-label",className:we("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function sG({className:e,...t}){return p.jsx("p",{"data-slot":"field-description",className:we("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function lG({initialName:e="",onOpenChange:t,open:n,startPoint:r}){const o=C.useId(),[a,l]=C.useState(e),[c,f]=C.useState(),d=Q9();C.useEffect(()=>{n&&(l(e),f(void 0))},[e,n]);async function g(){const h=a.trim();if(h){f(void 0);try{await d.mutateAsync({branch:h,create:!0,startPoint:r}),ut.success(r?`Created ${h} from ${r} and switched to it`:`Created and switched to ${h}`,{position:"top-center"}),t(!1)}catch(y){f(y instanceof Error?y.message:"Failed to create branch")}}}return p.jsx($s,{onOpenChange:t,open:n,children:p.jsxs(Gs,{children:[p.jsxs(ui,{children:[p.jsx(fi,{children:"New branch"}),p.jsx(Ff,{children:r?`Create a branch based on ${r} and switch to it.`:"Create a branch from the current HEAD and switch to it."})]}),p.jsxs(oG,{"data-invalid":!!c,children:[p.jsx(aG,{htmlFor:o,children:"Branch name"}),p.jsx(Ko,{"aria-invalid":!!c,autoFocus:!0,id:o,onChange:h=>{l(h.target.value),c&&f(void 0)},onKeyDown:h=>{h.key==="Enter"&&g()},placeholder:"Branch name",value:a}),p.jsx(sG,{children:c})]}),p.jsxs(Qa,{children:[p.jsx(H1,{render:p.jsx(De,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),p.jsx(De,{className:"cursor-pointer",disabled:a.trim().length===0||d.isPending,onClick:g,children:d.isPending?"Creating…":"Create branch"})]})]})})}const jl={position:"top-center"};function cG(e){return e?e.initialized?e.branch?e.branch:"detached":"No git repo":"branch"}function U1(e){const t=e.startsWith("refs/remotes/")?e.slice(13):e,n=t.indexOf("/");return n===-1?t:t.slice(n+1)}function uG(){const e=qa(),[t,n]=C.useState(!1),[r,o]=C.useState(""),[a,l]=C.useState(null),[c,f]=C.useState(""),[d,g]=C.useState(),[h,y]=C.useState(null),[x,v]=C.useState(new Set(["origin"])),S=Bx(),E=H$({queryConfig:{enabled:S.data?.initialized??!1}}),k=Q9(),T=G$(),R=X9(),L=q$(),{locals:j,remotesByHost:N}=C.useMemo(()=>{const _=X$(E.data??[],S.data?.branch),ee=r.trim()===""?_:W$(_,r);return Q$(ee)},[E.data,r,S.data?.branch]),{currentLocal:A,hasLocals:D,hasOtherLocals:U,otherLocals:I}=C.useMemo(()=>{let _;const ee=[];for(const J of j)J.isCurrent&&!_?_=J:ee.push(J);return{currentLocal:_,hasLocals:j.length>0,hasOtherLocals:ee.length>0,otherLocals:ee}},[j]),q=N.size>0;function $(_,ee=""){n(!1),f(ee),g(void 0),l(_)}function V(_){n(!1),f(U1(_)),g(_),l("new-branch")}async function Y(_,ee){n(!1);try{await k.mutateAsync({branch:_}),ut.success(ee,jl)}catch(J){ut.error("Failed to switch branch",{...jl,description:Cn(J)})}}function H(_){n(!1),y({branchName:_})}async function B(_){const ee=U1(_.name),J=(E.data??[]).find(re=>!re.isRemote&&re.name===ee);if(J){Y(J.name,`Switched to ${J.name}`).catch(()=>{});return}n(!1);try{await k.mutateAsync({branch:ee,create:!0,startPoint:_.name});try{await L.mutateAsync(_.name)}catch{}ut.success(`Switched to ${ee} (tracking ${_.name})`,jl)}catch(re){ut.error("Failed to checkout remote branch",{...jl,description:Cn(re)})}}function F(_){v(ee=>{const J=new Set(ee);return J.has(_)?J.delete(_):J.add(_),J})}function G(){n(!1),ut.promise(T.mutateAsync({}),{...jl,error:_=>({description:Cn(_),message:"Fetch failed"}),loading:"Fetching from remote…",success:"Fetched from remote"})}function ie(){n(!1),ut.promise(R.mutateAsync({}),{...jl,error:_=>({description:Cn(_),message:"Pull failed"}),loading:"Updating project…",success:_=>_.alreadyUpToDate?`${_.branch} is up to date`:`Pulled ${_.branch}`})}const M=S.data!==void 0,P=S.data?.initialized??!1,Q=cG(S.data);return M&&!P?p.jsx(Z9,{}):p.jsxs(p.Fragment,{children:[p.jsxs(Ws,{onOpenChange:n,open:t,children:[p.jsxs(Ks,{render:p.jsx(De,{disabled:!M,variant:"ghost"}),children:[p.jsx(jx,{className:"size-4 shrink-0"}),p.jsx("span",{className:"truncate max-w-40",children:Q}),p.jsx(Bf,{className:"size-4 shrink-0"})]}),p.jsxs(Za,{align:"start",className:"w-80 p-0",sideOffset:6,children:[p.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-b border-border",children:[p.jsxs("div",{className:"relative min-w-0 flex-1",children:[p.jsx(vc,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),p.jsx(Ko,{autoFocus:!0,className:"pl-8",onChange:_=>o(_.target.value),onKeyDown:_=>_.stopPropagation(),placeholder:"Search branches…",value:r})]}),p.jsx(De,{className:"shrink-0",disabled:T.isPending,onClick:G,size:"icon-sm",title:"Fetch",variant:"ghost",children:p.jsx(_H,{className:T.isPending?"size-4 animate-pulse":"size-4"})})]}),p.jsxs("div",{className:"max-h-[60vh] overflow-x-hidden overflow-y-auto py-1",children:[r.trim()===""&&p.jsxs(Os,{children:[p.jsxs(_n,{onClick:ie,children:[p.jsx(kH,{className:"size-5"}),p.jsx("span",{children:"Update Project"})]}),p.jsxs(_n,{onClick:()=>{n(!1),e("/changes")},children:[p.jsx(pU,{className:"size-5"}),p.jsx("span",{children:"Commit..."})]}),p.jsx(Fo,{}),p.jsxs(_n,{onClick:()=>$("new-branch",A?.name||""),children:[p.jsx(Xa,{className:"size-5"}),p.jsx("span",{children:"New Branch..."})]})]}),A?p.jsxs(p.Fragment,{children:[p.jsx(Fo,{}),p.jsxs(Os,{children:[p.jsx(Ql,{children:"Current"}),p.jsx(jC,{branch:A,onCheckout:()=>{Y(A.name,`Switched to ${A.name}`).catch(()=>{})},onDelete:()=>H(A.name),onNewBranchFrom:()=>V(A.name),trackingBranch:S.data?.trackingBranch})]})]}):null,U&&p.jsxs(p.Fragment,{children:[p.jsx(Fo,{}),p.jsxs(Os,{children:[p.jsx(Ql,{children:"Local"}),I.map(_=>p.jsx(jC,{branch:_,onCheckout:()=>{Y(_.name,`Switched to ${_.name}`).catch(()=>{})},onDelete:()=>H(_.name),onNewBranchFrom:()=>V(_.name)},_.name))]})]}),q&&p.jsxs(p.Fragment,{children:[p.jsx(Fo,{}),p.jsxs(Os,{children:[p.jsx(Ql,{children:"Remote"}),[...N.entries()].map(([_,ee])=>p.jsx(fG,{branches:ee,expanded:x.has(_),host:_,onBranchCheckout:B,onBranchNewBranchFrom:J=>V(J.name),onToggle:()=>F(_)},_))]})]}),!D&&!q&&p.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:r?"No branches match your search.":"No branches."})]})]})]}),p.jsx(lG,{initialName:c,onOpenChange:_=>_?null:l(null),open:a==="new-branch",startPoint:d}),p.jsx(eG,{branchName:h?.branchName??"",onOpenChange:_=>_?null:y(null),open:h!==null})]})}function jC({branch:e,onCheckout:t,onDelete:n,onNewBranchFrom:r,trackingBranch:o}){return p.jsxs(Gx,{children:[p.jsxs(Yx,{children:[p.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.isCurrent?p.jsx(Ys,{className:"size-4 text-primary"}):null}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:e.name}),o?p.jsx("span",{className:"shrink-0 truncate max-w-32 text-xs text-muted-foreground",children:o}):null]}),p.jsxs(Wx,{className:"min-w-56",children:[!e.isCurrent&&p.jsx(_n,{onClick:t,children:"Checkout"}),p.jsx(_n,{onClick:r,children:p.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})}),!e.isCurrent&&p.jsxs(p.Fragment,{children:[p.jsx(Fo,{}),p.jsx(_n,{onClick:n,children:"Delete…"})]})]})]})}function fG({branches:e,expanded:t,host:n,onBranchCheckout:r,onBranchNewBranchFrom:o,onToggle:a}){return p.jsxs("div",{className:"flex min-w-0 flex-col",children:[p.jsxs("button",{className:"flex min-w-0 cursor-pointer items-center gap-2 px-3 py-1.5 text-sm text-foreground outline-none hover:bg-muted focus:bg-muted",onClick:a,type:"button",children:[p.jsx(h9,{className:`size-4 shrink-0 text-muted-foreground transition-transform ${t?"rotate-90":""}`}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:n})]}),t?e.map(l=>p.jsx(dG,{branch:l,onCheckout:()=>r(l),onNewBranchFrom:()=>o(l)},l.name)):null]})}function dG({branch:e,onCheckout:t,onNewBranchFrom:n}){const r=U1(e.name);return p.jsxs(Gx,{children:[p.jsx(Yx,{className:"pl-15",children:p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:r})}),p.jsxs(Wx,{className:"min-w-56",children:[p.jsx(_n,{onClick:t,children:"Checkout"}),p.jsx(_n,{onClick:n,children:p.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})})]})]})}function hG(){const e=Be(c=>c.version),[t,n]=C.useState(!1),{data:r}=VT(),{data:o}=kx(),a=r?.providers.find(c=>c.isCurrent),l=a?`${a.name}${o?.activeModel?` | ${o.activeModel}`:""}`:"No model configured";return p.jsxs("header",{className:"flex items-center gap-4 px-6 py-3.5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-1.5 mr-2.5",children:[p.jsx("img",{alt:"ByteRover",className:"w-32",src:MV}),e&&p.jsxs("span",{className:"text-primary-foreground text-xs font-medium",children:["v",e]})]}),p.jsx(F$,{}),p.jsx(uG,{}),p.jsxs(_s,{children:[p.jsxs(Ds,{render:p.jsx(Yo,{className:"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground mono gap-1 px-1.5 text-[9px] leading-none font-semibold tracking-[0.16em] uppercase",variant:"outline"}),children:[p.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1 shrink-0 rounded-full"}),p.jsx("span",{className:"leading-none",children:"Local"})]}),p.jsx(Is,{children:"You're viewing the local web UI, served from the daemon on your machine."})]})]}),p.jsx("div",{className:"flex-1"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(_s,{children:[p.jsxs(Ds,{render:p.jsx(De,{onClick:()=>n(!0),size:"sm",variant:"ghost"}),children:[p.jsx(IU,{className:"size-3.5 shrink-0 mr-1"}),l,!a&&p.jsx("span",{className:"size-1.5 shrink-0 rounded-full bg-amber-500"})]}),!a&&p.jsx(Is,{children:"Configure to use curate/query feature"})]}),p.jsx(Px,{onOpenChange:n,open:t}),p.jsx(k$,{}),p.jsx(E$,{})]})]})}function pG(){const{completed:e,inProgress:t,total:n}=BB(),r=n>0?`${e}/${n}`:void 0,o=t>0?"active":"idle";return[{label:"Context",path:"/contexts"},{label:"Changes",path:"/changes"},{badge:r,badgeTone:o,label:"Tasks",path:"/tasks"},{label:"Configuration",path:"/configuration"}]}function mG(){const{data:e}=Bx(),{staged:t,unmerged:n,unstaged:r}=N9(e),o=t.length+r.length+n.length;return o===0?null:p.jsx("span",{className:"ml-1.5 rounded-md bg-[#4f3422] p-1 text-xs font-semibold tabular-nums text-[#ffc53d]",children:o})}function gG(){const e=pG();return RV(),p.jsxs("div",{className:"flex h-screen flex-col",children:[p.jsx(hG,{}),p.jsx("nav",{className:"border-border flex gap-2 border-b px-6",children:e.map(t=>p.jsxs(Ck,{className:({isActive:n})=>we("flex items-center gap-1.5 border-b-2 px-2 pt-2 pb-3 text-sm transition-colors",{"border-primary-foreground text-primary-foreground font-medium":n,"border-transparent text-muted-foreground hover:text-foreground":!n}),to:t.path,children:[p.jsx("span",{children:t.label}),t.badge&&p.jsxs(Yo,{className:"tabular-nums",variant:"secondary",children:[t.badgeTone==="active"&&p.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 shrink-0 rounded-full"}),t.badge]}),t.path==="/changes"&&p.jsx(mG,{})]},t.path))}),p.jsx("main",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:p.jsx(bk,{})}),p.jsx(AV,{}),p.jsx(TV,{}),p.jsx(YB,{})]})}function yG(){return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("section",{className:"grid gap-4 grid-cols-3",children:[p.jsxs(ja,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[p.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Total tasks"}),p.jsx("strong",{className:"text-3xl leading-none",children:"0"}),p.jsx(Ah,{children:"Waiting for the skipped task-subscription issue."})]}),p.jsxs(ja,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[p.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Success rate"}),p.jsx("strong",{className:"text-3xl leading-none",children:"0%"}),p.jsx(Ah,{children:"No client-side task history is wired into the web app yet."})]}),p.jsxs(ja,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[p.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Average duration"}),p.jsx("strong",{className:"text-3xl leading-none",children:"0s"}),p.jsx(Ah,{children:"This will populate once task-store parity lands."})]})]}),p.jsxs(ja,{className:"min-h-56 items-start justify-center gap-3 px-5 shadow-sm ring-border/70",size:"sm",children:[p.jsx(Yo,{className:"rounded-sm border-yellow-500/20 bg-yellow-500/10 text-yellow-600",variant:"outline",children:"Empty state"}),p.jsx(b$,{className:"font-semibold",children:"No task data available yet"}),p.jsx(Ah,{children:"The plan explicitly skips the activity/task subscription issue. This page is wired as a placeholder so the route exists cleanly and can consume task-store data once that transport work lands."})]})]})}const xG="data:image/svg+xml,%3csvg%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M60%20120C93%20120%20120%2093%20120%2060C120%2027%2093%200%2060%200C27%200%200%2027%200%2060C0%2093%2027%20120%2060%20120Z'%20fill='url(%23paint0_linear_2037_60923)'%20fill-opacity='0.15'/%3e%3cpath%20d='M60%200.75C92.5858%200.75%20119.25%2027.4142%20119.25%2060C119.25%2092.5858%2092.5858%20119.25%2060%20119.25C27.4142%20119.25%200.75%2092.5858%200.75%2060C0.75%2027.4142%2027.4142%200.75%2060%200.75Z'%20stroke='url(%23paint1_linear_2037_60923)'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cpath%20d='M87.3926%2037.6738C88.505%2036.4418%2090.2734%2036.4418%2091.3857%2037.6738C92.5382%2038.9504%2092.5381%2041.0486%2091.3857%2042.3252L51.6631%2086.3262C50.5507%2087.5582%2048.7823%2087.5582%2047.6699%2086.3262L29.6143%2066.3252C28.4621%2065.0486%2028.4621%2062.9514%2029.6143%2061.6748C30.7267%2060.4426%2032.495%2060.4426%2033.6074%2061.6748L47.625%2077.2021C48.717%2078.4118%2050.616%2078.4118%2051.708%2077.2021L87.3926%2037.6738Z'%20fill='url(%23paint2_linear_2037_60923)'%20stroke='%2300E275'%20stroke-width='1.5'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2037_60923'%20x1='17.9848'%20y1='14.0983'%20x2='125.634'%20y2='103.845'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23999999'%20stop-opacity='0.5'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_2037_60923'%20x1='15.3936'%20y1='-1.63761e-06'%20x2='120'%20y2='90.8895'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'%20stop-opacity='0.5'/%3e%3cstop%20offset='1'%20stop-color='%23999999'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_2037_60923'%20x1='65.5979'%20y1='65.9795'%20x2='78.5737'%20y2='-56.684'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2309814A'/%3e%3cstop%20offset='1'%20stop-color='%2300CC66'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",bG=(e={})=>{const{apiClient:t}=Be.getState();return t?t.request(rr.ADD,e):Promise.reject(new Error("Not connected"))},vG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),n?.(...o)},...r,mutationFn:bG})},wG=({addAll:e,filePaths:t,message:n})=>{const{apiClient:r}=Be.getState();if(!r)return Promise.reject(new Error("Not connected"));const o=()=>r.request(rr.COMMIT,{message:n});if(e||t&&t.length>0){const a=t?{filePaths:t}:{};return r.request(rr.ADD,a).then(o)}return o()},SG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),n?.(...o)},...r,mutationFn:wG})},CG=()=>{const{apiClient:e}=Be.getState();return e?e.request(rr.MERGE,{action:"abort"}):Promise.reject(new Error("Not connected"))},EG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...o)},...r,mutationFn:CG})},kG=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.MERGE,{action:"continue",message:e.message}):Promise.reject(new Error("Not connected"))},TG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...o)},...r,mutationFn:kG})},AG=(e={})=>{const{apiClient:t}=Be.getState();return t?t.request(rr.PUSH,e):Promise.reject(new Error("Not connected"))},RG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),t.invalidateQueries({queryKey:Ja().queryKey}),n?.(...o)},...r,mutationFn:AG})},NG=(e={})=>{const{apiClient:t}=Be.getState();return t?t.request(rr.RESET,e):Promise.reject(new Error("Not connected"))},OG=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),n?.(...o)},...r,mutationFn:NG})};function jG(e){return e.status==="unmerged"?"merge":e.isStaged?"staged":"unstaged"}function Zh(e){return`${jG(e)}:${e.path}`}const q1="Please sign in to use sync feature";function MC(e,t){return t?e:p.jsxs(_s,{children:[p.jsx(Ds,{render:p.jsx("span",{tabIndex:0}),children:e}),p.jsx(Is,{children:q1})]})}function MG({ahead:e=0,behind:t=0,branch:n,hasTracking:r,isAborting:o=!1,isAuthenticated:a,isPulling:l,isPushing:c,mergeInProgress:f=!1,onAbortMerge:d,onPull:g,onPush:h}){const y=l||c||o,x=a?r?"Pull from upstream":"No upstream tracking branch":q1,v=a?r?"Push to upstream":"Push and set upstream":q1,S=p.jsxs(De,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!r||!a,onClick:g,size:"sm",title:x,variant:"ghost",children:[l?p.jsx(ai,{className:"size-3.5 animate-spin"}):p.jsx(AH,{className:"size-3.5"}),t>0&&p.jsx("span",{className:"text-sm tabular-nums",children:t})]}),E=p.jsxs(De,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!a,onClick:h,size:"sm",title:v,variant:"ghost",children:[c?p.jsx(ai,{className:"size-3.5 animate-spin"}):p.jsx(MH,{className:"size-3.5"}),e>0&&p.jsx("span",{className:"text-sm tabular-nums",children:e})]});return p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[p.jsx(jx,{className:"size-4 shrink-0"}),p.jsx("span",{className:"truncate text-sm font-medium",children:n??"(detached)"})]}),p.jsxs("div",{className:"flex items-center gap-0.5",children:[f&&d&&p.jsxs(De,{className:"text-destructive h-7 gap-1 px-2 text-sm hover:bg-destructive/10 hover:text-destructive",disabled:y,onClick:d,size:"sm",title:"Abort merge",variant:"ghost",children:[o?p.jsx(ai,{className:"size-3.5 animate-spin"}):p.jsx(eU,{className:"size-3.5"}),p.jsx("span",{children:"Abort"})]}),MC(S,a),MC(E,a)]})]})}function LG({canCommit:e,isCommitting:t,message:n,onCommit:r,onMessageChange:o}){const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="Enter"&&(l.preventDefault(),r())};return p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Fx,{className:"min-h-20 resize-none",onChange:l=>o(l.target.value),onKeyDown:a,placeholder:"Commit message (Cmd/Ctrl+Enter to commit)",value:n}),p.jsx(De,{className:"w-full gap-2",disabled:!e||!n.trim()||t,onClick:r,size:"sm",children:"Commit"})]})}const _G=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.DIFF,e):Promise.reject(new Error("Not connected"))},DG=e=>({queryFn:()=>_G(e),queryKey:["vc","diff",e.path,e.side],staleTime:0}),IG=({enabled:e=!0,path:t,queryConfig:n,side:r})=>br({...DG({path:t,side:r}),enabled:e&&!!t,...n});function J9({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"Unstage":"Stage",o=e.isStaged?Mx:Xa,a=e.status==="deleted";return p.jsxs("div",{className:"border-border bg-muted sticky top-0 z-10 flex items-center gap-2 border-b px-3 py-1.5",children:[p.jsx(c0,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),p.jsx("span",{className:"text-foreground flex-1 truncate font-mono text-xs",children:e.path}),p.jsx(De,{className:"size-6 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:a,onClick:t,size:"icon-xs",title:a?"File no longer exists":"Open file",variant:"ghost",children:p.jsx(aU,{className:"size-3"})}),p.jsx(De,{className:"size-6 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",onClick:n,size:"icon-xs",title:r,variant:"ghost",children:p.jsx(o,{className:"size-3"})})]})}var T2={exports:{}};var LC;function zG(){return LC||(LC=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(a=o(a,r(c)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var l="";for(var c in a)t.call(a,c)&&a[c]&&(l=o(l,c));return l}function o(a,l){return l?a?a+" "+l:a+l:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(T2)),T2.exports}var PG=zG();const Hi=uc(PG);var _C=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function FG(e,t){return!!(e===t||_C(e)&&_C(t))}function BG(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!FG(e[n],t[n]))return!1;return!0}function HG(e,t){t===void 0&&(t=BG);var n=null;function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var l=e.apply(this,o);return n={lastResult:l,lastArgs:o,lastThis:this},l}return r.clear=function(){n=null},r}function UG(e,t,n){let r=0,o;const a={},l=[];return e.forEach((c,f)=>{const d=t.some(g=>g>=f-n&&g<=f+n);!d&&o===void 0?(o={index:r,startLine:f,endLine:f,lines:1},l.push(o),a[f]=o.index,r++):!d&&o?(o.endLine=f,o.lines++,a[f]=o.index):o=void 0}),{lineBlocks:a,blocks:l}}class Xo{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const a=this.castInput(t,r),l=this.castInput(n,r),c=this.removeEmpty(this.tokenize(a,r)),f=this.removeEmpty(this.tokenize(l,r));return this.diffWithOptionsObj(c,f,r,o)}diffWithOptionsObj(t,n,r,o){var a;const l=T=>{if(T=this.postProcess(T,r),o){setTimeout(function(){o(T)},0);return}else return T},c=n.length,f=t.length;let d=1,g=c+f;r.maxEditLength!=null&&(g=Math.min(g,r.maxEditLength));const h=(a=r.timeout)!==null&&a!==void 0?a:1/0,y=Date.now()+h,x=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(x[0],n,t,0,r);if(x[0].oldPos+1>=f&&v+1>=c)return l(this.buildValues(x[0].lastComponent,n,t));let S=-1/0,E=1/0;const k=()=>{for(let T=Math.max(S,-d);T<=Math.min(E,d);T+=2){let R;const L=x[T-1],j=x[T+1];L&&(x[T-1]=void 0);let N=!1;if(j){const D=j.oldPos-T;N=j&&0<=D&&D<c}const A=L&&L.oldPos+1<f;if(!N&&!A){x[T]=void 0;continue}if(!A||N&&L.oldPos<j.oldPos?R=this.addToPath(j,!0,!1,0,r):R=this.addToPath(L,!1,!0,1,r),v=this.extractCommon(R,n,t,T,r),R.oldPos+1>=f&&v+1>=c)return l(this.buildValues(R.lastComponent,n,t))||!0;x[T]=R,R.oldPos+1>=f&&(E=Math.min(E,T-1)),v+1>=c&&(S=Math.max(S,T+1))}d++};if(o)(function T(){setTimeout(function(){if(d>g||Date.now()>y)return o(void 0);k()||T()},0)})();else for(;d<=g&&Date.now()<=y;){const T=k();if(T)return T}}addToPath(t,n,r,o,a){const l=t.lastComponent;return l&&!a.oneChangePerToken&&l.added===n&&l.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:r,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:l}}}extractCommon(t,n,r,o,a){const l=n.length,c=r.length;let f=t.oldPos,d=f-o,g=0;for(;d+1<l&&f+1<c&&this.equals(r[f+1],n[d+1],a);)d++,f++,g++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!a.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=f,d}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let a;for(;t;)o.push(t),a=t.previousComponent,delete t.previousComponent,t=a;o.reverse();const l=o.length;let c=0,f=0,d=0;for(;c<l;c++){const g=o[c];if(g.removed)g.value=this.join(r.slice(d,d+g.count)),d+=g.count;else{if(!g.added&&this.useLongestToken){let h=n.slice(f,f+g.count);h=h.map(function(y,x){const v=r[d+x];return v.length>y.length?v:y}),g.value=this.join(h)}else g.value=this.join(n.slice(f,f+g.count));f+=g.count,g.added||(d+=g.count)}}return o}}class qG extends Xo{}const e8=new qG;function VG(e,t,n){return e8.diff(e,t,n)}function DC(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function IC(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function V1(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function $1(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function ku(e,t){return V1(e,t,"")}function Rh(e,t){return $1(e,t,"")}function zC(e,t){return t.slice(0,$G(e,t))}function $G(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);const o=Array(r);let a=0;o[0]=0;for(let l=1;l<r;l++){for(t[l]==t[a]?o[l]=o[a]:o[l]=a;a>0&&t[l]!=t[a];)a=o[a];t[l]==t[a]&&a++}a=0;for(let l=n;l<e.length;l++){for(;a>0&&e[l]!=t[a];)a=o[a];e[l]==t[a]&&a++}return a}function GG(e){return e.includes(`\r
24
- `)&&!e.startsWith(`
25
- `)&&!e.match(/[^\r]\n/)}function YG(e){return!e.includes(`\r
26
- `)&&e.includes(`
27
- `)}function t8(e,t){const n=[];for(const r of Array.from(t.segment(e))){const o=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(o)?n[n.length-1]+=o:n.push(o)}return n}function G1(e,t){if(t)return Ku(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function zl(e,t){if(t)return Ku(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function Ku(e,t){if(!t)return[zl(e),G1(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');const n=t8(e,t),r=n[0],o=n[n.length-1],a=/\s/.test(r)?r:"",l=/\s/.test(o)?o:"";return[a,l]}const Ep="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",WG=new RegExp(`[${Ep}]+|\\s+|[^${Ep}]`,"ug");class KG extends Xo{equals(t,n,r){return r.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),t.trim()===n.trim()}tokenize(t,n={}){let r;if(n.intlSegmenter){const l=n.intlSegmenter;if(l.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=t8(t,l)}else r=t.match(WG)||[];const o=[];let a=null;return r.forEach(l=>{/\s/.test(l)?a==null?o.push(l):o.push(o.pop()+l):a!=null&&/\s/.test(a)?o[o.length-1]==a?o.push(o.pop()+l):o.push(a+l):o.push(l),a=l}),o}join(t){return t.map((n,r)=>r==0?n:n.replace(/^\s+/,"")).join("")}postProcess(t,n){if(!t||n.oneChangePerToken)return t;let r=null,o=null,a=null;return t.forEach(l=>{l.added?o=l:l.removed?a=l:((o||a)&&PC(r,a,o,l,n.intlSegmenter),r=l,o=null,a=null)}),(o||a)&&PC(r,a,o,null,n.intlSegmenter),t}}const n8=new KG;function QG(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?i8(e,t,n):n8.diff(e,t,n)}function PC(e,t,n,r,o){if(t&&n){const[a,l]=Ku(t.value,o),[c,f]=Ku(n.value,o);if(e){const d=DC(a,c);e.value=$1(e.value,c,d),t.value=ku(t.value,d),n.value=ku(n.value,d)}if(r){const d=IC(l,f);r.value=V1(r.value,f,d),t.value=Rh(t.value,d),n.value=Rh(n.value,d)}}else if(n){if(e){const a=zl(n.value,o);n.value=n.value.substring(a.length)}if(r){const a=zl(r.value,o);r.value=r.value.substring(a.length)}}else if(e&&r){const a=zl(r.value,o),[l,c]=Ku(t.value,o),f=DC(a,l);t.value=ku(t.value,f);const d=IC(ku(a,f),c);t.value=Rh(t.value,d),r.value=V1(r.value,a,d),e.value=$1(e.value,a,a.slice(0,a.length-d.length))}else if(r){const a=zl(r.value,o),l=G1(t.value,o),c=zC(l,a);t.value=Rh(t.value,c)}else if(e){const a=G1(e.value,o),l=zl(t.value,o),c=zC(a,l);t.value=ku(t.value,c)}}class XG extends Xo{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${Ep}]+|[^\\S\\n\\r]+|[^${Ep}]`,"ug");return t.match(n)||[]}}const r8=new XG;function i8(e,t,n){return r8.diff(e,t,n)}function ZG(e,t){if(typeof e=="function")t.callback=e;else if(e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}class JG extends Xo{constructor(){super(...arguments),this.tokenize=o8}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
28
- `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
29
- `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
30
- `)&&(t=t.slice(0,-1)),n.endsWith(`
31
- `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const Qx=new JG;function qo(e,t,n){return Qx.diff(e,t,n)}function eY(e,t,n){return n=ZG(n,{ignoreWhitespace:!0}),Qx.diff(e,t,n)}function o8(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
32
- `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let o=0;o<r.length;o++){const a=r[o];o%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}function tY(e){return e=="."||e=="!"||e=="?"}class nY extends Xo{tokenize(t){var n;const r=[];let o=0;for(let a=0;a<t.length;a++){if(a==t.length-1){r.push(t.slice(o));break}if(tY(t[a])&&t[a+1].match(/\s/)){for(r.push(t.slice(o,a+1)),a=o=a+1;!((n=t[a+1])===null||n===void 0)&&n.match(/\s/);)a++;r.push(t.slice(o,a+1)),o=a+1}}return r}}const a8=new nY;function rY(e,t,n){return a8.diff(e,t,n)}class iY extends Xo{tokenize(t){return t.split(/([{}:;,]|\s+)/)}}const s8=new iY;function oY(e,t,n){return s8.diff(e,t,n)}class aY extends Xo{constructor(){super(...arguments),this.tokenize=o8}get useLongestToken(){return!0}castInput(t,n){const{undefinedReplacement:r,stringifyReplacer:o=(a,l)=>typeof l>"u"?r:l}=n;return typeof t=="string"?t:JSON.stringify(kp(t,null,null,o),null," ")}equals(t,n,r){return super.equals(t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"),r)}}const l8=new aY;function sY(e,t,n){return l8.diff(e,t,n)}function kp(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o===void 0?"":o,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let l;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),a=0;a<e.length;a+=1)l[a]=kp(e[a],t,n,r,String(a));return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){t.push(e),l={},n.push(l);const c=[];let f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&c.push(f);for(c.sort(),a=0;a<c.length;a+=1)f=c[a],l[f]=kp(e[f],t,n,r,f);t.pop(),n.pop()}else l=e;return l}class lY extends Xo{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}}const c8=new lY;function cY(e,t,n){return c8.diff(e,t,n)}function u8(e){return Array.isArray(e)?e.map(t=>u8(t)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(t=>Object.assign(Object.assign({},t),{lines:t.lines.map((n,r)=>{var o;return n.startsWith("\\")||n.endsWith("\r")||!((o=t.lines[r+1])===null||o===void 0)&&o.startsWith("\\")?n:n+"\r"})}))})}function f8(e){return Array.isArray(e)?e.map(t=>f8(t)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(t=>Object.assign(Object.assign({},t),{lines:t.lines.map(n=>n.endsWith("\r")?n.substring(0,n.length-1):n)}))})}function uY(e){return Array.isArray(e)||(e=[e]),!e.some(t=>t.hunks.some(n=>n.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function fY(e){return Array.isArray(e)||(e=[e]),e.some(t=>t.hunks.some(n=>n.lines.some(r=>r.endsWith("\r"))))&&e.every(t=>t.hunks.every(n=>n.lines.every((r,o)=>{var a;return r.startsWith("\\")||r.endsWith("\r")||((a=n.lines[o+1])===null||a===void 0?void 0:a.startsWith("\\"))})))}function Xx(e){const t=e.split(/\n/),n=[];let r=0;function o(){const c={};for(n.push(c);r<t.length;){const f=t[r];if(/^(---|\+\+\+|@@)\s/.test(f))break;const d=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(f);d&&(c.index=f.substring(d[0].length).trim()),r++}for(a(c),a(c),c.hunks=[];r<t.length;){const f=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(f))break;if(/^@@/.test(f))c.hunks.push(l());else{if(f)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(f));r++}}}function a(c){const f=/^(---|\+\+\+)\s+/.exec(t[r]);if(f){const d=f[1],g=t[r].substring(3).trim().split(" ",2),h=(g[1]||"").trim();let y=g[0].replace(/\\\\/g,"\\");y.startsWith('"')&&y.endsWith('"')&&(y=y.substr(1,y.length-2)),d==="---"?(c.oldFileName=y,c.oldHeader=h):(c.newFileName=y,c.newHeader=h),r++}}function l(){var c;const f=r,d=t[r++],g=d.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),h={oldStart:+g[1],oldLines:typeof g[2]>"u"?1:+g[2],newStart:+g[3],newLines:typeof g[4]>"u"?1:+g[4],lines:[]};h.oldLines===0&&(h.oldStart+=1),h.newLines===0&&(h.newStart+=1);let y=0,x=0;for(;r<t.length&&(x<h.oldLines||y<h.newLines||!((c=t[r])===null||c===void 0)&&c.startsWith("\\"));r++){const v=t[r].length==0&&r!=t.length-1?" ":t[r][0];if(v==="+"||v==="-"||v===" "||v==="\\")h.lines.push(t[r]),v==="+"?y++:v==="-"?x++:v===" "&&(y++,x++);else throw new Error(`Hunk at line ${f+1} contained invalid line ${t[r]}`)}if(!y&&h.newLines===1&&(h.newLines=0),!x&&h.oldLines===1&&(h.oldLines=0),y!==h.newLines)throw new Error("Added line count did not match for hunk at line "+(f+1));if(x!==h.oldLines)throw new Error("Removed line count did not match for hunk at line "+(f+1));return h}for(;r<t.length;)o();return n}function dY(e,t,n){let r=!0,o=!1,a=!1,l=1;return function c(){if(r&&!a){if(o?l++:r=!1,e+l<=n)return e+l;a=!0}if(!o)return a||(r=!0),t<=e-l?e-l++:(o=!0,c())}}function d8(e,t,n={}){let r;if(typeof t=="string"?r=Xx(t):Array.isArray(t)?r=t:r=[t],r.length>1)throw new Error("applyPatch only works with a single input.");return hY(e,r[0],n)}function hY(e,t,n={}){(n.autoConvertLineEndings||n.autoConvertLineEndings==null)&&(GG(e)&&uY(t)?t=u8(t):YG(e)&&fY(t)&&(t=f8(t)));const r=e.split(`
33
- `),o=t.hunks,a=n.compareLine||((v,S,E,k)=>S===k),l=n.fuzzFactor||0;let c=0;if(l<0||!Number.isInteger(l))throw new Error("fuzzFactor must be a non-negative integer");if(!o.length)return e;let f="",d=!1,g=!1;for(let v=0;v<o[o.length-1].lines.length;v++){const S=o[o.length-1].lines[v];S[0]=="\\"&&(f[0]=="+"?d=!0:f[0]=="-"&&(g=!0)),f=S}if(d){if(g){if(!l&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!l)return!1}else if(g){if(r[r.length-1]!="")r.push("");else if(!l)return!1}function h(v,S,E,k=0,T=!0,R=[],L=0){let j=0,N=!1;for(;k<v.length;k++){const A=v[k],D=A.length>0?A[0]:" ",U=A.length>0?A.substr(1):A;if(D==="-")if(a(S+1,r[S],D,U))S++,j=0;else return!E||r[S]==null?null:(R[L]=r[S],h(v,S+1,E-1,k,!1,R,L+1));if(D==="+"){if(!T)return null;R[L]=U,L++,j=0,N=!0}if(D===" ")if(j++,R[L]=r[S],a(S+1,r[S],D,U))L++,T=!0,N=!1,S++;else return N||!E?null:r[S]&&(h(v,S+1,E-1,k+1,!1,R,L+1)||h(v,S+1,E-1,k,!1,R,L+1))||h(v,S,E-1,k+1,!1,R,L)}return L-=j,S-=j,R.length=L,{patchedLines:R,oldLineLastI:S-1}}const y=[];let x=0;for(let v=0;v<o.length;v++){const S=o[v];let E;const k=r.length-S.oldLines+l;let T;for(let R=0;R<=l;R++){T=S.oldStart+x-1;const L=dY(T,c,k);for(;T!==void 0&&(E=h(S.lines,T,R),!E);T=L());if(E)break}if(!E)return!1;for(let R=c;R<T;R++)y.push(r[R]);for(let R=0;R<E.patchedLines.length;R++){const L=E.patchedLines[R];y.push(L)}c=E.oldLineLastI+1,x=T+1-S.oldStart}for(let v=c;v<r.length;v++)y.push(r[v]);return y.join(`
34
- `)}function pY(e,t){const n=typeof e=="string"?Xx(e):e;let r=0;function o(){const a=n[r++];if(!a)return t.complete();t.loadFile(a,function(l,c){if(l)return t.complete(l);const f=d8(c,a,t);t.patched(a,f,function(d){if(d)return t.complete(d);o()})})}o()}function h8(e){return Array.isArray(e)?e.map(t=>h8(t)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(t=>({oldLines:t.newLines,oldStart:t.newStart,newLines:t.oldLines,newStart:t.oldStart,lines:t.lines.map(n=>n.startsWith("-")?`+${n.slice(1)}`:n.startsWith("+")?`-${n.slice(1)}`:n)}))})}const p8={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},mY={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},gY={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Y1(e,t,n,r,o,a,l){let c;l?typeof l=="function"?c={callback:l}:c=l:c={},typeof c.context>"u"&&(c.context=4);const f=c.context;if(c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){const{callback:g}=c;qo(n,r,Object.assign(Object.assign({},c),{callback:h=>{const y=d(h);g(y)}}))}else return d(qo(n,r,c));function d(g){if(!g)return;g.push({value:"",lines:[]});function h(T){return T.map(function(R){return" "+R})}const y=[];let x=0,v=0,S=[],E=1,k=1;for(let T=0;T<g.length;T++){const R=g[T],L=R.lines||xY(R.value);if(R.lines=L,R.added||R.removed){if(!x){const j=g[T-1];x=E,v=k,j&&(S=f>0?h(j.lines.slice(-f)):[],x-=S.length,v-=S.length)}for(const j of L)S.push((R.added?"+":"-")+j);R.added?k+=L.length:E+=L.length}else{if(x)if(L.length<=f*2&&T<g.length-2)for(const j of h(L))S.push(j);else{const j=Math.min(L.length,f);for(const A of h(L.slice(0,j)))S.push(A);const N={oldStart:x,oldLines:E-x+j,newStart:v,newLines:k-v+j,lines:S};y.push(N),x=0,v=0,S=[]}E+=L.length,k+=L.length}}for(const T of y)for(let R=0;R<T.lines.length;R++)T.lines[R].endsWith(`
35
- `)?T.lines[R]=T.lines[R].slice(0,-1):(T.lines.splice(R+1,0,"\"),R++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:a,hunks:y}}}function Tp(e,t){if(t||(t=p8),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>Tp(r,t)).join(`
36
- `)}const n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),t.includeUnderline&&n.push("==================================================================="),t.includeFileHeaders&&(n.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),n.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r<e.hunks.length;r++){const o=e.hunks[r];o.oldLines===0&&(o.oldStart-=1),o.newLines===0&&(o.newStart-=1),n.push("@@ -"+o.oldStart+","+o.oldLines+" +"+o.newStart+","+o.newLines+" @@");for(const a of o.lines)n.push(a)}return n.join(`
37
- `)+`
38
- `}function m8(e,t,n,r,o,a,l){if(typeof l=="function"&&(l={callback:l}),l?.callback){const{callback:c}=l;Y1(e,t,n,r,o,a,Object.assign(Object.assign({},l),{callback:f=>{c(f?Tp(f,l.headerOptions):void 0)}}))}else{const c=Y1(e,t,n,r,o,a,l);return c?Tp(c,l?.headerOptions):void 0}}function yY(e,t,n,r,o,a){return m8(e,e,t,n,r,o,a)}function xY(e){const t=e.endsWith(`
39
- `),n=e.split(`
40
- `).map(r=>r+`
41
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function bY(e){const t=[];let n,r;for(let o=0;o<e.length;o++)n=e[o],n.added?r=1:n.removed?r=-1:r=0,t.push([r,n.value]);return t}function vY(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(wY(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function wY(e){let t=e;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t=t.replace(/"/g,"&quot;"),t}const SY=Object.freeze(Object.defineProperty({__proto__:null,Diff:Xo,FILE_HEADERS_ONLY:mY,INCLUDE_HEADERS:p8,OMIT_HEADERS:gY,applyPatch:d8,applyPatches:pY,arrayDiff:c8,canonicalize:kp,characterDiff:e8,convertChangesToDMP:bY,convertChangesToXML:vY,createPatch:yY,createTwoFilesPatch:m8,cssDiff:s8,diffArrays:cY,diffChars:VG,diffCss:oY,diffJson:sY,diffLines:qo,diffSentences:rY,diffTrimmedLines:eY,diffWords:QG,diffWordsWithSpace:i8,formatPatch:Tp,jsonDiff:l8,lineDiff:Qx,parsePatch:Xx,reversePatch:h8,sentenceDiff:a8,structuredPatch:Y1,wordDiff:n8,wordsWithSpaceDiff:r8},Symbol.toStringTag,{value:"Module"}));function g8(e){return typeof e>"u"||e===null}function CY(e){return typeof e=="object"&&e!==null}function EY(e){return Array.isArray(e)?e:g8(e)?[]:[e]}function kY(e,t){var n,r,o,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)o=a[n],e[o]=t[o];return e}function TY(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function AY(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var RY=g8,NY=CY,OY=EY,jY=TY,MY=AY,LY=kY,Qn={isNothing:RY,isObject:NY,toArray:OY,repeat:jY,isNegativeZero:MY,extend:LY};function y8(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
42
-
43
- `+e.mark.snippet),r+" "+n):r}function ff(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=y8(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ff.prototype=Object.create(Error.prototype);ff.prototype.constructor=ff;ff.prototype.toString=function(t){return this.name+": "+y8(this,t)};var Hr=ff;function A2(e,t,n,r,o){var a="",l="",c=Math.floor(o/2)-1;return r-t>c&&(a=" ... ",t=r-c+a.length),n-r>c&&(l=" ...",n=r+c-l.length),{str:a+e.slice(t,n).replace(/\t/g,"→")+l,pos:r-t+a.length}}function R2(e,t){return Qn.repeat(" ",t-e.length)+e}function _Y(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],o=[],a,l=-1;a=n.exec(e.buffer);)o.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var c="",f,d,g=Math.min(e.line+t.linesAfter,o.length).toString().length,h=t.maxLength-(t.indent+g+3);for(f=1;f<=t.linesBefore&&!(l-f<0);f++)d=A2(e.buffer,r[l-f],o[l-f],e.position-(r[l]-r[l-f]),h),c=Qn.repeat(" ",t.indent)+R2((e.line-f+1).toString(),g)+" | "+d.str+`
44
- `+c;for(d=A2(e.buffer,r[l],o[l],e.position,h),c+=Qn.repeat(" ",t.indent)+R2((e.line+1).toString(),g)+" | "+d.str+`
45
- `,c+=Qn.repeat("-",t.indent+g+3+d.pos)+`^
46
- `,f=1;f<=t.linesAfter&&!(l+f>=o.length);f++)d=A2(e.buffer,r[l+f],o[l+f],e.position-(r[l]-r[l+f]),h),c+=Qn.repeat(" ",t.indent)+R2((e.line+f+1).toString(),g)+" | "+d.str+`
47
- `;return c.replace(/\n$/,"")}var DY=_Y,IY=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],zY=["scalar","sequence","mapping"];function PY(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function FY(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(IY.indexOf(n)===-1)throw new Hr('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=PY(t.styleAliases||null),zY.indexOf(this.kind)===-1)throw new Hr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var xr=FY;function FC(e,t){var n=[];return e[t].forEach(function(r){var o=n.length;n.forEach(function(a,l){a.tag===r.tag&&a.kind===r.kind&&a.multi===r.multi&&(o=l)}),n[o]=r}),n}function BY(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function W1(e){return this.extend(e)}W1.prototype.extend=function(t){var n=[],r=[];if(t instanceof xr)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Hr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(a){if(!(a instanceof xr))throw new Hr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Hr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Hr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof xr))throw new Hr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(W1.prototype);return o.implicit=(this.implicit||[]).concat(n),o.explicit=(this.explicit||[]).concat(r),o.compiledImplicit=FC(o,"implicit"),o.compiledExplicit=FC(o,"explicit"),o.compiledTypeMap=BY(o.compiledImplicit,o.compiledExplicit),o};var HY=W1,UY=new xr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),qY=new xr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),VY=new xr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),$Y=new HY({explicit:[UY,qY,VY]});function GY(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function YY(){return null}function WY(e){return e===null}var KY=new xr("tag:yaml.org,2002:null",{kind:"scalar",resolve:GY,construct:YY,predicate:WY,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function QY(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function XY(e){return e==="true"||e==="True"||e==="TRUE"}function ZY(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var JY=new xr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:QY,construct:XY,predicate:ZY,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function eW(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function tW(e){return 48<=e&&e<=55}function nW(e){return 48<=e&&e<=57}function rW(e){if(e===null)return!1;var t=e.length,n=0,r=!1,o;if(!t)return!1;if(o=e[n],(o==="-"||o==="+")&&(o=e[++n]),o==="0"){if(n+1===t)return!0;if(o=e[++n],o==="b"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(o!=="0"&&o!=="1")return!1;r=!0}return r&&o!=="_"}if(o==="x"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(!eW(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}if(o==="o"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(!tW(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}}if(o==="_")return!1;for(;n<t;n++)if(o=e[n],o!=="_"){if(!nW(e.charCodeAt(n)))return!1;r=!0}return!(!r||o==="_")}function iW(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function oW(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Qn.isNegativeZero(e)}var aW=new xr("tag:yaml.org,2002:int",{kind:"scalar",resolve:rW,construct:iW,predicate:oW,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sW=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lW(e){return!(e===null||!sW.test(e)||e[e.length-1]==="_")}function cW(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var uW=/^[-+]?[0-9]+e/;function fW(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Qn.isNegativeZero(e))return"-0.0";return n=e.toString(10),uW.test(n)?n.replace("e",".e"):n}function dW(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Qn.isNegativeZero(e))}var hW=new xr("tag:yaml.org,2002:float",{kind:"scalar",resolve:lW,construct:cW,predicate:dW,represent:fW,defaultStyle:"lowercase"}),pW=$Y.extend({implicit:[KY,JY,aW,hW]}),mW=pW,x8=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),b8=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function gW(e){return e===null?!1:x8.exec(e)!==null||b8.exec(e)!==null}function yW(e){var t,n,r,o,a,l,c,f=0,d=null,g,h,y;if(t=x8.exec(e),t===null&&(t=b8.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(a=+t[4],l=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(g=+t[10],h=+(t[11]||0),d=(g*60+h)*6e4,t[9]==="-"&&(d=-d)),y=new Date(Date.UTC(n,r,o,a,l,c,f)),d&&y.setTime(y.getTime()-d),y}function xW(e){return e.toISOString()}var bW=new xr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gW,construct:yW,instanceOf:Date,represent:xW});function vW(e){return e==="<<"||e===null}var wW=new xr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vW}),Zx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
48
- \r`;function SW(e){if(e===null)return!1;var t,n,r=0,o=e.length,a=Zx;for(n=0;n<o;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function CW(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=Zx,l=0,c=[];for(t=0;t<o;t++)t%4===0&&t&&(c.push(l>>16&255),c.push(l>>8&255),c.push(l&255)),l=l<<6|a.indexOf(r.charAt(t));return n=o%4*6,n===0?(c.push(l>>16&255),c.push(l>>8&255),c.push(l&255)):n===18?(c.push(l>>10&255),c.push(l>>2&255)):n===12&&c.push(l>>4&255),new Uint8Array(c)}function EW(e){var t="",n=0,r,o,a=e.length,l=Zx;for(r=0;r<a;r++)r%3===0&&r&&(t+=l[n>>18&63],t+=l[n>>12&63],t+=l[n>>6&63],t+=l[n&63]),n=(n<<8)+e[r];return o=a%3,o===0?(t+=l[n>>18&63],t+=l[n>>12&63],t+=l[n>>6&63],t+=l[n&63]):o===2?(t+=l[n>>10&63],t+=l[n>>4&63],t+=l[n<<2&63],t+=l[64]):o===1&&(t+=l[n>>2&63],t+=l[n<<4&63],t+=l[64],t+=l[64]),t}function kW(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var TW=new xr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:SW,construct:CW,predicate:kW,represent:EW}),AW=Object.prototype.hasOwnProperty,RW=Object.prototype.toString;function NW(e){if(e===null)return!0;var t=[],n,r,o,a,l,c=e;for(n=0,r=c.length;n<r;n+=1){if(o=c[n],l=!1,RW.call(o)!=="[object Object]")return!1;for(a in o)if(AW.call(o,a))if(!l)l=!0;else return!1;if(!l)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function OW(e){return e!==null?e:[]}var jW=new xr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:NW,construct:OW}),MW=Object.prototype.toString;function LW(e){if(e===null)return!0;var t,n,r,o,a,l=e;for(a=new Array(l.length),t=0,n=l.length;t<n;t+=1){if(r=l[t],MW.call(r)!=="[object Object]"||(o=Object.keys(r),o.length!==1))return!1;a[t]=[o[0],r[o[0]]]}return!0}function _W(e){if(e===null)return[];var t,n,r,o,a,l=e;for(a=new Array(l.length),t=0,n=l.length;t<n;t+=1)r=l[t],o=Object.keys(r),a[t]=[o[0],r[o[0]]];return a}var DW=new xr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:LW,construct:_W}),IW=Object.prototype.hasOwnProperty;function zW(e){if(e===null)return!0;var t,n=e;for(t in n)if(IW.call(n,t)&&n[t]!==null)return!1;return!0}function PW(e){return e!==null?e:{}}var FW=new xr("tag:yaml.org,2002:set",{kind:"mapping",resolve:zW,construct:PW}),v8=mW.extend({implicit:[bW,wW],explicit:[TW,jW,DW,FW]}),Ha=Object.prototype.hasOwnProperty,Ap=1,w8=2,S8=3,Rp=4,N2=1,BW=2,BC=3,HW=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,UW=/[\x85\u2028\u2029]/,qW=/[,\[\]\{\}]/,C8=/^(?:!|!!|![a-z\-]+!)$/i,E8=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function HC(e){return Object.prototype.toString.call(e)}function lo(e){return e===10||e===13}function js(e){return e===9||e===32}function Ur(e){return e===9||e===32||e===10||e===13}function Hl(e){return e===44||e===91||e===93||e===123||e===125}function VW(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function $W(e){return e===120?2:e===117?4:e===85?8:0}function GW(e){return 48<=e&&e<=57?e-48:-1}function UC(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
49
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function YW(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function k8(e,t,n){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var T8=new Array(256),A8=new Array(256);for(var Ml=0;Ml<256;Ml++)T8[Ml]=UC(Ml)?1:0,A8[Ml]=UC(Ml);function WW(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||v8,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function R8(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=DY(n),new Hr(t,n)}function it(e,t){throw R8(e,t)}function Np(e,t){e.onWarning&&e.onWarning.call(null,R8(e,t))}var qC={YAML:function(t,n,r){var o,a,l;t.version!==null&&it(t,"duplication of %YAML directive"),r.length!==1&&it(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),o===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(o[1],10),l=parseInt(o[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=l<2,l!==1&&l!==2&&Np(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var o,a;r.length!==2&&it(t,"TAG directive accepts exactly two arguments"),o=r[0],a=r[1],C8.test(o)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),Ha.call(t.tagMap,o)&&it(t,'there is a previously declared suffix for "'+o+'" tag handle'),E8.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[o]=a}};function Fa(e,t,n,r){var o,a,l,c;if(t<n){if(c=e.input.slice(t,n),r)for(o=0,a=c.length;o<a;o+=1)l=c.charCodeAt(o),l===9||32<=l&&l<=1114111||it(e,"expected valid JSON character");else HW.test(c)&&it(e,"the stream contains non-printable characters");e.result+=c}}function VC(e,t,n,r){var o,a,l,c;for(Qn.isObject(n)||it(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(n),l=0,c=o.length;l<c;l+=1)a=o[l],Ha.call(t,a)||(k8(t,a,n[a]),r[a]=!0)}function Ul(e,t,n,r,o,a,l,c,f){var d,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),d=0,g=o.length;d<g;d+=1)Array.isArray(o[d])&&it(e,"nested arrays are not supported inside keys"),typeof o=="object"&&HC(o[d])==="[object Object]"&&(o[d]="[object Object]");if(typeof o=="object"&&HC(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(d=0,g=a.length;d<g;d+=1)VC(e,t,a[d],n);else VC(e,t,a,n);else!e.json&&!Ha.call(n,o)&&Ha.call(t,o)&&(e.line=l||e.line,e.lineStart=c||e.lineStart,e.position=f||e.position,it(e,"duplicated mapping key")),k8(t,o,a),delete n[o];return t}function Jx(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function qn(e,t,n){for(var r=0,o=e.input.charCodeAt(e.position);o!==0;){for(;js(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(lo(o))for(Jx(e),o=e.input.charCodeAt(e.position),r++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Np(e,"deficient indentation"),r}function S0(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Ur(n)))}function eb(e,t){t===1?e.result+=" ":t>1&&(e.result+=Qn.repeat(`
50
- `,t-1))}function KW(e,t,n){var r,o,a,l,c,f,d,g,h=e.kind,y=e.result,x;if(x=e.input.charCodeAt(e.position),Ur(x)||Hl(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(o=e.input.charCodeAt(e.position+1),Ur(o)||n&&Hl(o)))return!1;for(e.kind="scalar",e.result="",a=l=e.position,c=!1;x!==0;){if(x===58){if(o=e.input.charCodeAt(e.position+1),Ur(o)||n&&Hl(o))break}else if(x===35){if(r=e.input.charCodeAt(e.position-1),Ur(r))break}else{if(e.position===e.lineStart&&S0(e)||n&&Hl(x))break;if(lo(x))if(f=e.line,d=e.lineStart,g=e.lineIndent,qn(e,!1,-1),e.lineIndent>=t){c=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=f,e.lineStart=d,e.lineIndent=g;break}}c&&(Fa(e,a,l,!1),eb(e,e.line-f),a=l=e.position,c=!1),js(x)||(l=e.position+1),x=e.input.charCodeAt(++e.position)}return Fa(e,a,l,!1),e.result?!0:(e.kind=h,e.result=y,!1)}function QW(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Fa(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,o=e.position;else return!0;else lo(n)?(Fa(e,r,o,!0),eb(e,qn(e,!1,t)),r=o=e.position):e.position===e.lineStart&&S0(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}function XW(e,t){var n,r,o,a,l,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return Fa(e,n,e.position,!0),e.position++,!0;if(c===92){if(Fa(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),lo(c))qn(e,!1,t);else if(c<256&&T8[c])e.result+=A8[c],e.position++;else if((l=$W(c))>0){for(o=l,a=0;o>0;o--)c=e.input.charCodeAt(++e.position),(l=VW(c))>=0?a=(a<<4)+l:it(e,"expected hexadecimal character");e.result+=YW(a),e.position++}else it(e,"unknown escape sequence");n=r=e.position}else lo(c)?(Fa(e,n,r,!0),eb(e,qn(e,!1,t)),n=r=e.position):e.position===e.lineStart&&S0(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}function ZW(e,t){var n=!0,r,o,a,l=e.tag,c,f=e.anchor,d,g,h,y,x,v=Object.create(null),S,E,k,T;if(T=e.input.charCodeAt(e.position),T===91)g=93,x=!1,c=[];else if(T===123)g=125,x=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(++e.position);T!==0;){if(qn(e,!0,t),T=e.input.charCodeAt(e.position),T===g)return e.position++,e.tag=l,e.anchor=f,e.kind=x?"mapping":"sequence",e.result=c,!0;n?T===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),E=S=k=null,h=y=!1,T===63&&(d=e.input.charCodeAt(e.position+1),Ur(d)&&(h=y=!0,e.position++,qn(e,!0,t))),r=e.line,o=e.lineStart,a=e.position,sc(e,t,Ap,!1,!0),E=e.tag,S=e.result,qn(e,!0,t),T=e.input.charCodeAt(e.position),(y||e.line===r)&&T===58&&(h=!0,T=e.input.charCodeAt(++e.position),qn(e,!0,t),sc(e,t,Ap,!1,!0),k=e.result),x?Ul(e,c,v,E,S,k,r,o,a):h?c.push(Ul(e,null,v,E,S,k,r,o,a)):c.push(S),qn(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(n=!0,T=e.input.charCodeAt(++e.position)):n=!1}it(e,"unexpected end of the stream within a flow collection")}function JW(e,t){var n,r,o=N2,a=!1,l=!1,c=t,f=0,d=!1,g,h;if(h=e.input.charCodeAt(e.position),h===124)r=!1;else if(h===62)r=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)N2===o?o=h===43?BC:BW:it(e,"repeat of a chomping mode identifier");else if((g=GW(h))>=0)g===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?it(e,"repeat of an indentation width identifier"):(c=t+g-1,l=!0);else break;if(js(h)){do h=e.input.charCodeAt(++e.position);while(js(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!lo(h)&&h!==0)}for(;h!==0;){for(Jx(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!l||e.lineIndent<c)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>c&&(c=e.lineIndent),lo(h)){f++;continue}if(e.lineIndent<c){o===BC?e.result+=Qn.repeat(`
51
- `,a?1+f:f):o===N2&&a&&(e.result+=`
52
- `);break}for(r?js(h)?(d=!0,e.result+=Qn.repeat(`
53
- `,a?1+f:f)):d?(d=!1,e.result+=Qn.repeat(`
54
- `,f+1)):f===0?a&&(e.result+=" "):e.result+=Qn.repeat(`
55
- `,f):e.result+=Qn.repeat(`
56
- `,a?1+f:f),a=!0,l=!0,f=0,n=e.position;!lo(h)&&h!==0;)h=e.input.charCodeAt(++e.position);Fa(e,n,e.position,!1)}return!0}function $C(e,t){var n,r=e.tag,o=e.anchor,a=[],l,c=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(f!==45||(l=e.input.charCodeAt(e.position+1),!Ur(l))));){if(c=!0,e.position++,qn(e,!0,-1)&&e.lineIndent<=t){a.push(null),f=e.input.charCodeAt(e.position);continue}if(n=e.line,sc(e,t,S8,!1,!0),a.push(e.result),qn(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&f!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0):!1}function eK(e,t,n){var r,o,a,l,c,f,d=e.tag,g=e.anchor,h={},y=Object.create(null),x=null,v=null,S=null,E=!1,k=!1,T;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),T=e.input.charCodeAt(e.position);T!==0;){if(!E&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),a=e.line,(T===63||T===58)&&Ur(r))T===63?(E&&(Ul(e,h,y,x,v,null,l,c,f),x=v=S=null),k=!0,E=!0,o=!0):E?(E=!1,o=!0):it(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,T=r;else{if(l=e.line,c=e.lineStart,f=e.position,!sc(e,n,w8,!1,!0))break;if(e.line===a){for(T=e.input.charCodeAt(e.position);js(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),Ur(T)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Ul(e,h,y,x,v,null,l,c,f),x=v=S=null),k=!0,E=!1,o=!1,x=e.tag,v=e.result;else if(k)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=g,!0}else if(k)it(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=g,!0}if((e.line===a||e.lineIndent>t)&&(E&&(l=e.line,c=e.lineStart,f=e.position),sc(e,t,Rp,!0,o)&&(E?v=e.result:S=e.result),E||(Ul(e,h,y,x,v,S,l,c,f),x=v=S=null),qn(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&T!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&Ul(e,h,y,x,v,null,l,c,f),k&&(e.tag=d,e.anchor=g,e.kind="mapping",e.result=h),k}function tK(e){var t,n=!1,r=!1,o,a,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(n=!0,l=e.input.charCodeAt(++e.position)):l===33?(r=!0,o="!!",l=e.input.charCodeAt(++e.position)):o="!",t=e.position,n){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(a=e.input.slice(t,e.position),l=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!Ur(l);)l===33&&(r?it(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),C8.test(o)||it(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),l=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),qW.test(a)&&it(e,"tag suffix cannot contain flow indicator characters")}a&&!E8.test(a)&&it(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{it(e,"tag name is malformed: "+a)}return n?e.tag=a:Ha.call(e.tagMap,o)?e.tag=e.tagMap[o]+a:o==="!"?e.tag="!"+a:o==="!!"?e.tag="tag:yaml.org,2002:"+a:it(e,'undeclared tag handle "'+o+'"'),!0}function nK(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Ur(n)&&!Hl(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function rK(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ur(r)&&!Hl(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Ha.call(e.anchorMap,n)||it(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],qn(e,!0,-1),!0}function sc(e,t,n,r,o){var a,l,c,f=1,d=!1,g=!1,h,y,x,v,S,E;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=Rp===n||S8===n,r&&qn(e,!0,-1)&&(d=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;tK(e)||nK(e);)qn(e,!0,-1)?(d=!0,c=a,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):c=!1;if(c&&(c=d||o),(f===1||Rp===n)&&(Ap===n||w8===n?S=t:S=t+1,E=e.position-e.lineStart,f===1?c&&($C(e,E)||eK(e,E,S))||ZW(e,S)?g=!0:(l&&JW(e,S)||QW(e,S)||XW(e,S)?g=!0:rK(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):KW(e,S,Ap===n)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(g=c&&$C(e,E))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,y=e.implicitTypes.length;h<y;h+=1)if(v=e.implicitTypes[h],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ha.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,x=e.typeMap.multi[e.kind||"fallback"],h=0,y=x.length;h<y;h+=1)if(e.tag.slice(0,x[h].tag.length)===x[h].tag){v=x[h];break}v||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||g}function iK(e){var t=e.position,n,r,o,a=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(qn(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(a=!0,l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!Ur(l);)l=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),o=[],r.length<1&&it(e,"directive name must not be less than one character in length");l!==0;){for(;js(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!lo(l));break}if(lo(l))break;for(n=e.position;l!==0&&!Ur(l);)l=e.input.charCodeAt(++e.position);o.push(e.input.slice(n,e.position))}l!==0&&Jx(e),Ha.call(qC,r)?qC[r](e,r,o):Np(e,'unknown document directive "'+r+'"')}if(qn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,qn(e,!0,-1)):a&&it(e,"directives end mark is expected"),sc(e,e.lineIndent-1,Rp,!1,!0),qn(e,!0,-1),e.checkLineBreaks&&UW.test(e.input.slice(t,e.position))&&Np(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&S0(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,qn(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}function oK(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
57
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new WW(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,it(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)iK(n);return n.documents}function aK(e,t){var n=oK(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Hr("expected a single document in the stream, but found more")}}var sK=aK,lK={load:sK},N8=Object.prototype.toString,O8=Object.prototype.hasOwnProperty,tb=65279,cK=9,df=10,uK=13,fK=32,dK=33,hK=34,K1=35,pK=37,mK=38,gK=39,yK=42,j8=44,xK=45,Op=58,bK=61,vK=62,wK=63,SK=64,M8=91,L8=93,CK=96,_8=123,EK=124,D8=125,vr={};vr[0]="\\0";vr[7]="\\a";vr[8]="\\b";vr[9]="\\t";vr[10]="\\n";vr[11]="\\v";vr[12]="\\f";vr[13]="\\r";vr[27]="\\e";vr[34]='\\"';vr[92]="\\\\";vr[133]="\\N";vr[160]="\\_";vr[8232]="\\L";vr[8233]="\\P";var kK=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],TK=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function AK(e,t){var n,r,o,a,l,c,f;if(t===null)return{};for(n={},r=Object.keys(t),o=0,a=r.length;o<a;o+=1)l=r[o],c=String(t[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),f=e.compiledTypeMap.fallback[l],f&&O8.call(f.styleAliases,c)&&(c=f.styleAliases[c]),n[l]=c;return n}function RK(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Hr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Qn.repeat("0",r-t.length)+t}var NK=1,hf=2;function OK(e){this.schema=e.schema||v8,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Qn.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=AK(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?hf:NK,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function GC(e,t){for(var n=Qn.repeat(" ",t),r=0,o=-1,a="",l,c=e.length;r<c;)o=e.indexOf(`
58
- `,r),o===-1?(l=e.slice(r),r=c):(l=e.slice(r,o+1),r=o+1),l.length&&l!==`
59
- `&&(a+=n),a+=l;return a}function Q1(e,t){return`
60
- `+Qn.repeat(" ",e.indent*t)}function jK(e,t){var n,r,o;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(o=e.implicitTypes[n],o.resolve(t))return!0;return!1}function jp(e){return e===fK||e===cK}function pf(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==tb||65536<=e&&e<=1114111}function YC(e){return pf(e)&&e!==tb&&e!==uK&&e!==df}function WC(e,t,n){var r=YC(e),o=r&&!jp(e);return(n?r:r&&e!==j8&&e!==M8&&e!==L8&&e!==_8&&e!==D8)&&e!==K1&&!(t===Op&&!o)||YC(t)&&!jp(t)&&e===K1||t===Op&&o}function MK(e){return pf(e)&&e!==tb&&!jp(e)&&e!==xK&&e!==wK&&e!==Op&&e!==j8&&e!==M8&&e!==L8&&e!==_8&&e!==D8&&e!==K1&&e!==mK&&e!==yK&&e!==dK&&e!==EK&&e!==bK&&e!==vK&&e!==gK&&e!==hK&&e!==pK&&e!==SK&&e!==CK}function LK(e){return!jp(e)&&e!==Op}function Uu(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function I8(e){var t=/^\n* /;return t.test(e)}var z8=1,X1=2,P8=3,F8=4,Pl=5;function _K(e,t,n,r,o,a,l,c){var f,d=0,g=null,h=!1,y=!1,x=r!==-1,v=-1,S=MK(Uu(e,0))&&LK(Uu(e,e.length-1));if(t||l)for(f=0;f<e.length;d>=65536?f+=2:f++){if(d=Uu(e,f),!pf(d))return Pl;S=S&&WC(d,g,c),g=d}else{for(f=0;f<e.length;d>=65536?f+=2:f++){if(d=Uu(e,f),d===df)h=!0,x&&(y=y||f-v-1>r&&e[v+1]!==" ",v=f);else if(!pf(d))return Pl;S=S&&WC(d,g,c),g=d}y=y||x&&f-v-1>r&&e[v+1]!==" "}return!h&&!y?S&&!l&&!o(e)?z8:a===hf?Pl:X1:n>9&&I8(e)?Pl:l?a===hf?Pl:X1:y?F8:P8}function DK(e,t,n,r,o){e.dump=(function(){if(t.length===0)return e.quotingType===hf?'""':"''";if(!e.noCompatMode&&(kK.indexOf(t)!==-1||TK.test(t)))return e.quotingType===hf?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=r||e.flowLevel>-1&&n>=e.flowLevel;function f(d){return jK(e,d)}switch(_K(t,c,e.indent,l,f,e.quotingType,e.forceQuotes&&!r,o)){case z8:return t;case X1:return"'"+t.replace(/'/g,"''")+"'";case P8:return"|"+KC(t,e.indent)+QC(GC(t,a));case F8:return">"+KC(t,e.indent)+QC(GC(IK(t,l),a));case Pl:return'"'+zK(t)+'"';default:throw new Hr("impossible error: invalid scalar style")}})()}function KC(e,t){var n=I8(e)?String(t):"",r=e[e.length-1]===`
61
- `,o=r&&(e[e.length-2]===`
62
- `||e===`
63
- `),a=o?"+":r?"":"-";return n+a+`
64
- `}function QC(e){return e[e.length-1]===`
65
- `?e.slice(0,-1):e}function IK(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var d=e.indexOf(`
66
- `);return d=d!==-1?d:e.length,n.lastIndex=d,XC(e.slice(0,d),t)})(),o=e[0]===`
67
- `||e[0]===" ",a,l;l=n.exec(e);){var c=l[1],f=l[2];a=f[0]===" ",r+=c+(!o&&!a&&f!==""?`
68
- `:"")+XC(f,t),o=a}return r}function XC(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,o=0,a,l=0,c=0,f="";r=n.exec(e);)c=r.index,c-o>t&&(a=l>o?l:c,f+=`
69
- `+e.slice(o,a),o=a+1),l=c;return f+=`
70
- `,e.length-o>t&&l>o?f+=e.slice(o,l)+`
71
- `+e.slice(l+1):f+=e.slice(o),f.slice(1)}function zK(e){for(var t="",n=0,r,o=0;o<e.length;n>=65536?o+=2:o++)n=Uu(e,o),r=vr[n],!r&&pf(n)?(t+=e[o],n>=65536&&(t+=e[o+1])):t+=r||RK(n);return t}function PK(e,t,n){var r="",o=e.tag,a,l,c;for(a=0,l=n.length;a<l;a+=1)c=n[a],e.replacer&&(c=e.replacer.call(n,String(a),c)),(Vo(e,t,c,!1,!1)||typeof c>"u"&&Vo(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=o,e.dump="["+r+"]"}function ZC(e,t,n,r){var o="",a=e.tag,l,c,f;for(l=0,c=n.length;l<c;l+=1)f=n[l],e.replacer&&(f=e.replacer.call(n,String(l),f)),(Vo(e,t+1,f,!0,!0,!1,!0)||typeof f>"u"&&Vo(e,t+1,null,!0,!0,!1,!0))&&((!r||o!=="")&&(o+=Q1(e,t)),e.dump&&df===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=a,e.dump=o||"[]"}function FK(e,t,n){var r="",o=e.tag,a=Object.keys(n),l,c,f,d,g;for(l=0,c=a.length;l<c;l+=1)g="",r!==""&&(g+=", "),e.condenseFlow&&(g+='"'),f=a[l],d=n[f],e.replacer&&(d=e.replacer.call(n,f,d)),Vo(e,t,f,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Vo(e,t,d,!1,!1)&&(g+=e.dump,r+=g));e.tag=o,e.dump="{"+r+"}"}function BK(e,t,n,r){var o="",a=e.tag,l=Object.keys(n),c,f,d,g,h,y;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new Hr("sortKeys must be a boolean or a function");for(c=0,f=l.length;c<f;c+=1)y="",(!r||o!=="")&&(y+=Q1(e,t)),d=l[c],g=n[d],e.replacer&&(g=e.replacer.call(n,d,g)),Vo(e,t+1,d,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&df===e.dump.charCodeAt(0)?y+="?":y+="? "),y+=e.dump,h&&(y+=Q1(e,t)),Vo(e,t+1,g,!0,h)&&(e.dump&&df===e.dump.charCodeAt(0)?y+=":":y+=": ",y+=e.dump,o+=y));e.tag=a,e.dump=o||"{}"}function JC(e,t,n){var r,o,a,l,c,f;for(o=n?e.explicitTypes:e.implicitTypes,a=0,l=o.length;a<l;a+=1)if(c=o[a],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(n?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(f=e.styleMap[c.tag]||c.defaultStyle,N8.call(c.represent)==="[object Function]")r=c.represent(t,f);else if(O8.call(c.represent,f))r=c.represent[f](t,f);else throw new Hr("!<"+c.tag+'> tag resolver accepts not "'+f+'" style');e.dump=r}return!0}return!1}function Vo(e,t,n,r,o,a,l){e.tag=null,e.dump=n,JC(e,n,!1)||JC(e,n,!0);var c=N8.call(e.dump),f=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var g=c==="[object Object]"||c==="[object Array]",h,y;if(g&&(h=e.duplicates.indexOf(n),y=h!==-1),(e.tag!==null&&e.tag!=="?"||y||e.indent!==2&&t>0)&&(o=!1),y&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(g&&y&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(BK(e,t,e.dump,o),y&&(e.dump="&ref_"+h+e.dump)):(FK(e,t,e.dump),y&&(e.dump="&ref_"+h+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!l&&t>0?ZC(e,t-1,e.dump,o):ZC(e,t,e.dump,o),y&&(e.dump="&ref_"+h+e.dump)):(PK(e,t,e.dump),y&&(e.dump="&ref_"+h+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&DK(e,e.dump,t,a,f);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Hr("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function HK(e,t){var n=[],r=[],o,a;for(Z1(e,n,r),o=0,a=r.length;o<a;o+=1)t.duplicates.push(n[r[o]]);t.usedDuplicates=new Array(a)}function Z1(e,t,n){var r,o,a;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)n.indexOf(o)===-1&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,a=e.length;o<a;o+=1)Z1(e[o],t,n);else for(r=Object.keys(e),o=0,a=r.length;o<a;o+=1)Z1(e[r[o]],t,n)}function UK(e,t){t=t||{};var n=new OK(t);n.noRefs||HK(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Vo(n,0,r,!0,!0)?n.dump+`
72
- `:""}var qK=UK,VK={dump:qK},e4=lK.load,J1=VK.dump;const $K='(()=>{var Si=Object.defineProperty;var bi=(e,n)=>{for(var i in n)Si(e,i,{get:n[i],enumerable:!0})};var $e={};bi($e,{Diff:()=>b,FILE_HEADERS_ONLY:()=>_n,INCLUDE_HEADERS:()=>Ue,OMIT_HEADERS:()=>Ln,applyPatch:()=>je,applyPatches:()=>bn,arrayDiff:()=>Pe,canonicalize:()=>V,characterDiff:()=>ye,convertChangesToDMP:()=>On,convertChangesToXML:()=>In,createPatch:()=>Fn,createTwoFilesPatch:()=>Ye,cssDiff:()=>Ne,diffArrays:()=>wn,diffChars:()=>sn,diffCss:()=>yn,diffJson:()=>An,diffLines:()=>N,diffSentences:()=>vn,diffTrimmedLines:()=>xn,diffWords:()=>mn,diffWordsWithSpace:()=>Le,formatPatch:()=>ee,jsonDiff:()=>Re,lineDiff:()=>ce,parsePatch:()=>Z,reversePatch:()=>Be,sentenceDiff:()=>ke,structuredPatch:()=>ae,wordDiff:()=>be,wordsWithSpaceDiff:()=>_e});var b=class{diff(n,i,r={}){let l;typeof r=="function"?(l=r,r={}):"callback"in r&&(l=r.callback);let t=this.castInput(n,r),o=this.castInput(i,r),u=this.removeEmpty(this.tokenize(t,r)),f=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(u,f,r,l)}diffWithOptionsObj(n,i,r,l){var t;let o=m=>{if(m=this.postProcess(m,r),l){setTimeout(function(){l(m)},0);return}else return m},u=i.length,f=n.length,c=1,s=u+f;r.maxEditLength!=null&&(s=Math.min(s,r.maxEditLength));let a=(t=r.timeout)!==null&&t!==void 0?t:1/0,p=Date.now()+a,d=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(d[0],i,n,0,r);if(d[0].oldPos+1>=f&&h+1>=u)return o(this.buildValues(d[0].lastComponent,i,n));let g=-1/0,y=1/0,w=()=>{for(let m=Math.max(g,-c);m<=Math.min(y,c);m+=2){let x,A=d[m-1],C=d[m+1];A&&(d[m-1]=void 0);let F=!1;if(C){let S=C.oldPos-m;F=C&&0<=S&&S<u}let E=A&&A.oldPos+1<f;if(!F&&!E){d[m]=void 0;continue}if(!E||F&&A.oldPos<C.oldPos?x=this.addToPath(C,!0,!1,0,r):x=this.addToPath(A,!1,!0,1,r),h=this.extractCommon(x,i,n,m,r),x.oldPos+1>=f&&h+1>=u)return o(this.buildValues(x.lastComponent,i,n))||!0;d[m]=x,x.oldPos+1>=f&&(y=Math.min(y,m-1)),h+1>=u&&(g=Math.max(g,m+1))}c++};if(l)(function m(){setTimeout(function(){if(c>s||Date.now()>p)return l(void 0);w()||m()},0)})();else for(;c<=s&&Date.now()<=p;){let m=w();if(m)return m}}addToPath(n,i,r,l,t){let o=n.lastComponent;return o&&!t.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:n.oldPos+l,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:n.oldPos+l,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}}extractCommon(n,i,r,l,t){let o=i.length,u=r.length,f=n.oldPos,c=f-l,s=0;for(;c+1<o&&f+1<u&&this.equals(r[f+1],i[c+1],t);)c++,f++,s++,t.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return s&&!t.oneChangePerToken&&(n.lastComponent={count:s,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=f,c}equals(n,i,r){return r.comparator?r.comparator(n,i):n===i||!!r.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){let i=[];for(let r=0;r<n.length;r++)n[r]&&i.push(n[r]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join("")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,r){let l=[],t;for(;n;)l.push(n),t=n.previousComponent,delete n.previousComponent,n=t;l.reverse();let o=l.length,u=0,f=0,c=0;for(;u<o;u++){let s=l[u];if(s.removed)s.value=this.join(r.slice(c,c+s.count)),c+=s.count;else{if(!s.added&&this.useLongestToken){let a=i.slice(f,f+s.count);a=a.map(function(p,d){let h=r[c+d];return h.length>p.length?h:p}),s.value=this.join(a)}else s.value=this.join(i.slice(f,f+s.count));f+=s.count,s.added||(c+=s.count)}}return l}};var ve=class extends b{},ye=new ve;function sn(e,n,i){return ye.diff(e,n,i)}function Ae(e,n){let i;for(i=0;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function we(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return"";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function te(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function ue(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function q(e,n){return te(e,n,"")}function X(e,n){return ue(e,n,"")}function Ce(e,n){return n.slice(0,_i(e,n))}function _i(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let r=n.length;e.length<n.length&&(r=e.length);let l=Array(r),t=0;l[0]=0;for(let o=1;o<r;o++){for(n[o]==n[t]?l[o]=l[t]:l[o]=t;t>0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o<e.length;o++){for(;t>0&&e[o]!=n[t];)t=l[t];e[o]==n[t]&&t++}return t}function pn(e){return e.includes(`\\r\n`)&&!e.startsWith(`\n`)&&!e.match(/[^\\r]\\n/)}function dn(e){return!e.includes(`\\r\n`)&&e.includes(`\n`)}function z(e){let n;for(n=e.length-1;n>=0&&e[n].match(/\\s/);n--);return e.substring(n+1)}function M(e){let n=e.match(/^\\s*/);return n?n[0]:""}var fe="a-zA-Z0-9_\\\\u{AD}\\\\u{C0}-\\\\u{D6}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}",Li=new RegExp(`[${fe}]+|\\\\s+|[^${fe}]`,"ug"),Ee=class extends b{equals(n,i,r){return r.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),n.trim()===i.trim()}tokenize(n,i={}){let r;if(i.intlSegmenter){let o=i.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error(\'The segmenter passed must have a granularity of "word"\');r=[];for(let u of Array.from(o.segment(n))){let f=u.segment;r.length&&/\\s/.test(r[r.length-1])&&/\\s/.test(f)?r[r.length-1]+=f:r.push(f)}}else r=n.match(Li)||[];let l=[],t=null;return r.forEach(o=>{/\\s/.test(o)?t==null?l.push(o):l.push(l.pop()+o):t!=null&&/\\s/.test(t)?l[l.length-1]==t?l.push(l.pop()+o):l.push(t+o):l.push(o),t=o}),l}join(n){return n.map((i,r)=>r==0?i:i.replace(/^\\s+/,"")).join("")}postProcess(n,i){if(!n||i.oneChangePerToken)return n;let r=null,l=null,t=null;return n.forEach(o=>{o.added?l=o:o.removed?t=o:((l||t)&&hn(r,t,l,o),r=o,l=null,t=null)}),(l||t)&&hn(r,t,l,null),n}},be=new Ee;function mn(e,n,i){return i?.ignoreWhitespace!=null&&!i.ignoreWhitespace?Le(e,n,i):be.diff(e,n,i)}function hn(e,n,i,r){if(n&&i){let l=M(n.value),t=z(n.value),o=M(i.value),u=z(i.value);if(e){let f=Ae(l,o);e.value=ue(e.value,o,f),n.value=q(n.value,f),i.value=q(i.value,f)}if(r){let f=we(t,u);r.value=te(r.value,u,f),n.value=X(n.value,f),i.value=X(i.value,f)}}else if(i){if(e){let l=M(i.value);i.value=i.value.substring(l.length)}if(r){let l=M(r.value);r.value=r.value.substring(l.length)}}else if(e&&r){let l=M(r.value),t=M(n.value),o=z(n.value),u=Ae(l,t);n.value=q(n.value,u);let f=we(q(l,u),o);n.value=X(n.value,f),r.value=te(r.value,l,f),e.value=ue(e.value,l,l.slice(0,l.length-f.length))}else if(r){let l=M(r.value),t=z(n.value),o=Ce(t,l);n.value=X(n.value,o)}else if(e){let l=z(e.value),t=M(n.value),o=Ce(l,t);n.value=q(n.value,o)}}var Se=class extends b{tokenize(n){let i=new RegExp(`(\\\\r?\\\\n)|[${fe}]+|[^\\\\S\\\\n\\\\r]+|[^${fe}]`,"ug");return n.match(i)||[]}},_e=new Se;function Le(e,n,i){return _e.diff(e,n,i)}function gn(e,n){if(typeof e=="function")n.callback=e;else if(e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}var Fe=class extends b{constructor(){super(...arguments),this.tokenize=Oe}equals(n,i,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`\n`))&&(n=n.trim()),(!r.newlineIsToken||!i.includes(`\n`))&&(i=i.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`\n`)&&(n=n.slice(0,-1)),i.endsWith(`\n`)&&(i=i.slice(0,-1))),super.equals(n,i,r)}},ce=new Fe;function N(e,n,i){return ce.diff(e,n,i)}function xn(e,n,i){return i=gn(i,{ignoreWhitespace:!0}),ce.diff(e,n,i)}function Oe(e,n){n.stripTrailingCr&&(e=e.replace(/\\r\\n/g,`\n`));let i=[],r=e.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(let l=0;l<r.length;l++){let t=r[l];l%2&&!n.newlineIsToken?i[i.length-1]+=t:i.push(t)}return i}function Fi(e){return e=="."||e=="!"||e=="?"}var Ie=class extends b{tokenize(n){var i;let r=[],l=0;for(let t=0;t<n.length;t++){if(t==n.length-1){r.push(n.slice(l));break}if(Fi(n[t])&&n[t+1].match(/\\s/)){for(r.push(n.slice(l,t+1)),t=l=t+1;!((i=n[t+1])===null||i===void 0)&&i.match(/\\s/);)t++;r.push(n.slice(l,t+1)),l=t+1}}return r}},ke=new Ie;function vn(e,n,i){return ke.diff(e,n,i)}var Te=class extends b{tokenize(n){return n.split(/([{}:;,]|\\s+)/)}},Ne=new Te;function yn(e,n,i){return Ne.diff(e,n,i)}var De=class extends b{constructor(){super(...arguments),this.tokenize=Oe}get useLongestToken(){return!0}castInput(n,i){let{undefinedReplacement:r,stringifyReplacer:l=(t,o)=>typeof o>"u"?r:o}=i;return typeof n=="string"?n:JSON.stringify(V(n,null,null,l),null," ")}equals(n,i,r){return super.equals(n.replace(/,([\\r\\n])/g,"$1"),i.replace(/,([\\r\\n])/g,"$1"),r)}},Re=new De;function An(e,n,i){return Re.diff(e,n,i)}function V(e,n,i,r,l){n=n||[],i=i||[],r&&(e=r(l===void 0?"":l,e));let t;for(t=0;t<n.length;t+=1)if(n[t]===e)return i[t];let o;if(Object.prototype.toString.call(e)==="[object Array]"){for(n.push(e),o=new Array(e.length),i.push(o),t=0;t<e.length;t+=1)o[t]=V(e[t],n,i,r,String(t));return n.pop(),i.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){n.push(e),o={},i.push(o);let u=[],f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&u.push(f);for(u.sort(),t=0;t<u.length;t+=1)f=u[t],o[f]=V(e[f],n,i,r,f);n.pop(),i.pop()}else o=e;return o}var Me=class extends b{tokenize(n){return n.slice()}join(n){return n}removeEmpty(n){return n}},Pe=new Me;function wn(e,n,i){return Pe.diff(e,n,i)}function We(e){return Array.isArray(e)?e.map(n=>We(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map((i,r)=>{var l;return i.startsWith("\\\\")||i.endsWith("\\r")||!((l=n.lines[r+1])===null||l===void 0)&&l.startsWith("\\\\")?i:i+"\\r"})}))})}function He(e){return Array.isArray(e)?e.map(n=>He(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map(i=>i.endsWith("\\r")?i.substring(0,i.length-1):i)}))})}function Cn(e){return Array.isArray(e)||(e=[e]),!e.some(n=>n.hunks.some(i=>i.lines.some(r=>!r.startsWith("\\\\")&&r.endsWith("\\r"))))}function En(e){return Array.isArray(e)||(e=[e]),e.some(n=>n.hunks.some(i=>i.lines.some(r=>r.endsWith("\\r"))))&&e.every(n=>n.hunks.every(i=>i.lines.every((r,l)=>{var t;return r.startsWith("\\\\")||r.endsWith("\\r")||((t=i.lines[l+1])===null||t===void 0?void 0:t.startsWith("\\\\"))})))}function Z(e){let n=e.split(/\\n/),i=[],r=0;function l(){let u={};for(i.push(u);r<n.length;){let f=n[r];if(/^(---|\\+\\+\\+|@@)\\s/.test(f))break;let c=/^(?:Index:|diff(?: -r \\w+)+)\\s+/.exec(f);c&&(u.index=f.substring(c[0].length).trim()),r++}for(t(u),t(u),u.hunks=[];r<n.length;){let f=n[r];if(/^(Index:\\s|diff\\s|---\\s|\\+\\+\\+\\s|===================================================================)/.test(f))break;if(/^@@/.test(f))u.hunks.push(o());else{if(f)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(f));r++}}}function t(u){let f=/^(---|\\+\\+\\+)\\s+/.exec(n[r]);if(f){let c=f[1],s=n[r].substring(3).trim().split(" ",2),a=(s[1]||"").trim(),p=s[0].replace(/\\\\\\\\/g,"\\\\");p.startsWith(\'"\')&&p.endsWith(\'"\')&&(p=p.substr(1,p.length-2)),c==="---"?(u.oldFileName=p,u.oldHeader=a):(u.newFileName=p,u.newHeader=a),r++}}function o(){var u;let f=r,c=n[r++],s=c.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/),a={oldStart:+s[1],oldLines:typeof s[2]>"u"?1:+s[2],newStart:+s[3],newLines:typeof s[4]>"u"?1:+s[4],lines:[]};a.oldLines===0&&(a.oldStart+=1),a.newLines===0&&(a.newStart+=1);let p=0,d=0;for(;r<n.length&&(d<a.oldLines||p<a.newLines||!((u=n[r])===null||u===void 0)&&u.startsWith("\\\\"));r++){let h=n[r].length==0&&r!=n.length-1?" ":n[r][0];if(h==="+"||h==="-"||h===" "||h==="\\\\")a.lines.push(n[r]),h==="+"?p++:h==="-"?d++:h===" "&&(p++,d++);else throw new Error(`Hunk at line ${f+1} contained invalid line ${n[r]}`)}if(!p&&a.newLines===1&&(a.newLines=0),!d&&a.oldLines===1&&(a.oldLines=0),p!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(f+1));if(d!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(f+1));return a}for(;r<n.length;)l();return i}function Sn(e,n,i){let r=!0,l=!1,t=!1,o=1;return function u(){if(r&&!t){if(l?o++:r=!1,e+o<=i)return e+o;t=!0}if(!l)return t||(r=!0),n<=e-o?e-o++:(l=!0,u())}}function je(e,n,i={}){let r;if(typeof n=="string"?r=Z(n):Array.isArray(n)?r=n:r=[n],r.length>1)throw new Error("applyPatch only works with a single input.");return Oi(e,r[0],i)}function Oi(e,n,i={}){(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(pn(e)&&Cn(n)?n=We(n):dn(e)&&En(n)&&(n=He(n)));let r=e.split(`\n`),l=n.hunks,t=i.compareLine||((h,g,y,w)=>g===w),o=i.fuzzFactor||0,u=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!l.length)return e;let f="",c=!1,s=!1;for(let h=0;h<l[l.length-1].lines.length;h++){let g=l[l.length-1].lines[h];g[0]=="\\\\"&&(f[0]=="+"?c=!0:f[0]=="-"&&(s=!0)),f=g}if(c){if(s){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(s){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function a(h,g,y,w=0,m=!0,x=[],A=0){let C=0,F=!1;for(;w<h.length;w++){let E=h[w],S=E.length>0?E[0]:" ",$=E.length>0?E.substr(1):E;if(S==="-")if(t(g+1,r[g],S,$))g++,C=0;else return!y||r[g]==null?null:(x[A]=r[g],a(h,g+1,y-1,w,!1,x,A+1));if(S==="+"){if(!m)return null;x[A]=$,A++,C=0,F=!0}if(S===" ")if(C++,x[A]=r[g],t(g+1,r[g],S,$))A++,m=!0,F=!1,g++;else return F||!y?null:r[g]&&(a(h,g+1,y-1,w+1,!1,x,A+1)||a(h,g+1,y-1,w,!1,x,A+1))||a(h,g,y-1,w+1,!1,x,A)}return A-=C,g-=C,x.length=A,{patchedLines:x,oldLineLastI:g-1}}let p=[],d=0;for(let h=0;h<l.length;h++){let g=l[h],y,w=r.length-g.oldLines+o,m;for(let x=0;x<=o;x++){m=g.oldStart+d-1;let A=Sn(m,u,w);for(;m!==void 0&&(y=a(g.lines,m,x),!y);m=A());if(y)break}if(!y)return!1;for(let x=u;x<m;x++)p.push(r[x]);for(let x=0;x<y.patchedLines.length;x++){let A=y.patchedLines[x];p.push(A)}u=y.oldLineLastI+1,d=m+1-g.oldStart}for(let h=u;h<r.length;h++)p.push(r[h]);return p.join(`\n`)}function bn(e,n){let i=typeof e=="string"?Z(e):e,r=0;function l(){let t=i[r++];if(!t)return n.complete();n.loadFile(t,function(o,u){if(o)return n.complete(o);let f=je(u,t,n);n.patched(t,f,function(c){if(c)return n.complete(c);l()})})}l()}function Be(e){return Array.isArray(e)?e.map(n=>Be(n)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(n=>({oldLines:n.newLines,oldStart:n.newStart,newLines:n.oldLines,newStart:n.oldStart,lines:n.lines.map(i=>i.startsWith("-")?`+${i.slice(1)}`:i.startsWith("+")?`-${i.slice(1)}`:i)}))})}var Ue={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},_n={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Ln={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function ae(e,n,i,r,l,t,o){let u;o?typeof o=="function"?u={callback:o}:u=o:u={},typeof u.context>"u"&&(u.context=4);let f=u.context;if(u.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(u.callback){let{callback:s}=u;N(i,r,Object.assign(Object.assign({},u),{callback:a=>{let p=c(a);s(p)}}))}else return c(N(i,r,u));function c(s){if(!s)return;s.push({value:"",lines:[]});function a(m){return m.map(function(x){return" "+x})}let p=[],d=0,h=0,g=[],y=1,w=1;for(let m=0;m<s.length;m++){let x=s[m],A=x.lines||Ii(x.value);if(x.lines=A,x.added||x.removed){if(!d){let C=s[m-1];d=y,h=w,C&&(g=f>0?a(C.lines.slice(-f)):[],d-=g.length,h-=g.length)}for(let C of A)g.push((x.added?"+":"-")+C);x.added?w+=A.length:y+=A.length}else{if(d)if(A.length<=f*2&&m<s.length-2)for(let C of a(A))g.push(C);else{let C=Math.min(A.length,f);for(let E of a(A.slice(0,C)))g.push(E);let F={oldStart:d,oldLines:y-d+C,newStart:h,newLines:w-h+C,lines:g};p.push(F),d=0,h=0,g=[]}y+=A.length,w+=A.length}}for(let m of p)for(let x=0;x<m.lines.length;x++)m.lines[x].endsWith(`\n`)?m.lines[x]=m.lines[x].slice(0,-1):(m.lines.splice(x+1,0,"\\\"),x++);return{oldFileName:e,newFileName:n,oldHeader:l,newHeader:t,hunks:p}}}function ee(e,n){if(n||(n=Ue),Array.isArray(e)){if(e.length>1&&!n.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>ee(r,n)).join(`\n`)}let i=[];n.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),n.includeUnderline&&i.push("==================================================================="),n.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r<e.hunks.length;r++){let l=e.hunks[r];l.oldLines===0&&(l.oldStart-=1),l.newLines===0&&(l.newStart-=1),i.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@");for(let t of l.lines)i.push(t)}return i.join(`\n`)+`\n`}function Ye(e,n,i,r,l,t,o){if(typeof o=="function"&&(o={callback:o}),o?.callback){let{callback:u}=o;ae(e,n,i,r,l,t,Object.assign(Object.assign({},o),{callback:f=>{u(f?ee(f,o.headerOptions):void 0)}}))}else{let u=ae(e,n,i,r,l,t,o);return u?ee(u,o?.headerOptions):void 0}}function Fn(e,n,i,r,l,t){return Ye(e,e,n,i,r,l,t)}function Ii(e){let n=e.endsWith(`\n`),i=e.split(`\n`).map(r=>r+`\n`);return n?i.pop():i.push(i.pop().slice(0,-1)),i}function On(e){let n=[],i,r;for(let l=0;l<e.length;l++)i=e[l],i.added?r=1:i.removed?r=-1:r=0,n.push([r,i.value]);return n}function In(e){let n=[];for(let i=0;i<e.length;i++){let r=e[i];r.added?n.push("<ins>"):r.removed&&n.push("<del>"),n.push(ki(r.value)),r.added?n.push("</ins>"):r.removed&&n.push("</del>")}return n.join("")}function ki(e){let n=e;return n=n.replace(/&/g,"&amp;"),n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(/"/g,"&quot;"),n}function zn(e){return typeof e>"u"||e===null}function Ti(e){return typeof e=="object"&&e!==null}function Ni(e){return Array.isArray(e)?e:zn(e)?[]:[e]}function Di(e,n){var i,r,l,t;if(n)for(t=Object.keys(n),i=0,r=t.length;i<r;i+=1)l=t[i],e[l]=n[l];return e}function Ri(e,n){var i="",r;for(r=0;r<n;r+=1)i+=e;return i}function Mi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Pi=zn,Wi=Ti,Hi=Ni,ji=Ri,Bi=Mi,Ui=Di,L={isNothing:Pi,isObject:Wi,toArray:Hi,repeat:ji,isNegativeZero:Bi,extend:Ui};function Gn(e,n){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+=\'in "\'+e.mark.name+\'" \'),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`\n\n`+e.mark.snippet),r+" "+i):r}function ie(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Gn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ie.prototype=Object.create(Error.prototype);ie.prototype.constructor=ie;ie.prototype.toString=function(n){return this.name+": "+Gn(this,n)};var k=ie;function qe(e,n,i,r,l){var t="",o="",u=Math.floor(l/2)-1;return r-n>u&&(t=" ... ",n=r-u+t.length),i-r>u&&(o=" ...",i=r+u-o.length),{str:t+e.slice(n,i).replace(/\\t/g,"\\u2192")+o,pos:r-n+t.length}}function ze(e,n){return L.repeat(" ",n-e.length)+e}function Yi(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\\r?\\n|\\r|\\0/g,r=[0],l=[],t,o=-1;t=i.exec(e.buffer);)l.push(t.index),r.push(t.index+t[0].length),e.position<=t.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var u="",f,c,s=Math.min(e.line+n.linesAfter,l.length).toString().length,a=n.maxLength-(n.indent+s+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)c=qe(e.buffer,r[o-f],l[o-f],e.position-(r[o]-r[o-f]),a),u=L.repeat(" ",n.indent)+ze((e.line-f+1).toString(),s)+" | "+c.str+`\n`+u;for(c=qe(e.buffer,r[o],l[o],e.position,a),u+=L.repeat(" ",n.indent)+ze((e.line+1).toString(),s)+" | "+c.str+`\n`,u+=L.repeat("-",n.indent+s+3+c.pos)+`^\n`,f=1;f<=n.linesAfter&&!(o+f>=l.length);f++)c=qe(e.buffer,r[o+f],l[o+f],e.position-(r[o]-r[o+f]),a),u+=L.repeat(" ",n.indent)+ze((e.line+f+1).toString(),s)+" | "+c.str+`\n`;return u.replace(/\\n$/,"")}var $i=Yi,qi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],zi=["scalar","sequence","mapping"];function Gi(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Ji(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(qi.indexOf(i)===-1)throw new k(\'Unknown option "\'+i+\'" is met in definition of "\'+e+\'" YAML type.\')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Gi(n.styleAliases||null),zi.indexOf(this.kind)===-1)throw new k(\'Unknown kind "\'+this.kind+\'" is specified for "\'+e+\'" YAML type.\')}var O=Ji;function kn(e,n){var i=[];return e[n].forEach(function(r){var l=i.length;i.forEach(function(t,o){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(l=o)}),i[l]=r}),i}function Ki(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function r(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(r);return e}function Je(e){return this.extend(e)}Je.prototype.extend=function(n){var i=[],r=[];if(n instanceof O)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new k("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&t.loadKind!=="scalar")throw new k("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new k("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var l=Object.create(Je.prototype);return l.implicit=(this.implicit||[]).concat(i),l.explicit=(this.explicit||[]).concat(r),l.compiledImplicit=kn(l,"implicit"),l.compiledExplicit=kn(l,"explicit"),l.compiledTypeMap=Ki(l.compiledImplicit,l.compiledExplicit),l};var Qi=Je,Xi=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vi=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Zi=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),er=new Qi({explicit:[Xi,Vi,Zi]});function nr(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function ir(){return null}function rr(e){return e===null}var lr=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:nr,construct:ir,predicate:rr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function or(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function tr(e){return e==="true"||e==="True"||e==="TRUE"}function ur(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var fr=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:or,construct:tr,predicate:ur,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function cr(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ar(e){return 48<=e&&e<=55}function sr(e){return 48<=e&&e<=57}function pr(e){if(e===null)return!1;var n=e.length,i=0,r=!1,l;if(!n)return!1;if(l=e[i],(l==="-"||l==="+")&&(l=e[++i]),l==="0"){if(i+1===n)return!0;if(l=e[++i],l==="b"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(l!=="0"&&l!=="1")return!1;r=!0}return r&&l!=="_"}if(l==="x"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!cr(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}if(l==="o"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!ar(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}}if(l==="_")return!1;for(;i<n;i++)if(l=e[i],l!=="_"){if(!sr(e.charCodeAt(i)))return!1;r=!0}return!(!r||l==="_")}function dr(e){var n=e,i=1,r;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),r=n[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),n=n.slice(1),r=n[0]),n==="0")return 0;if(r==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function hr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!L.isNegativeZero(e)}var mr=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:pr,construct:dr,predicate:hr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),gr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$");function xr(e){return!(e===null||!gr.test(e)||e[e.length-1]==="_")}function vr(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var yr=/^[-+]?[0-9]+e/;function Ar(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(L.isNegativeZero(e))return"-0.0";return i=e.toString(10),yr.test(i)?i.replace("e",".e"):i}function wr(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||L.isNegativeZero(e))}var Cr=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:xr,construct:vr,predicate:wr,represent:Ar,defaultStyle:"lowercase"}),Er=er.extend({implicit:[lr,fr,mr,Cr]}),Sr=Er,Jn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function br(e){return e===null?!1:Jn.exec(e)!==null||Kn.exec(e)!==null}function _r(e){var n,i,r,l,t,o,u,f=0,c=null,s,a,p;if(n=Jn.exec(e),n===null&&(n=Kn.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],r=+n[2]-1,l=+n[3],!n[4])return new Date(Date.UTC(i,r,l));if(t=+n[4],o=+n[5],u=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(s=+n[10],a=+(n[11]||0),c=(s*60+a)*6e4,n[9]==="-"&&(c=-c)),p=new Date(Date.UTC(i,r,l,t,o,u,f)),c&&p.setTime(p.getTime()-c),p}function Lr(e){return e.toISOString()}var Fr=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:br,construct:_r,instanceOf:Date,represent:Lr});function Or(e){return e==="<<"||e===null}var Ir=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Or}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function kr(e){if(e===null)return!1;var n,i,r=0,l=e.length,t=Ze;for(i=0;i<l;i++)if(n=t.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Tr(e){var n,i,r=e.replace(/[\\r\\n=]/g,""),l=r.length,t=Ze,o=0,u=[];for(n=0;n<l;n++)n%4===0&&n&&(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)),o=o<<6|t.indexOf(r.charAt(n));return i=l%4*6,i===0?(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)):i===18?(u.push(o>>10&255),u.push(o>>2&255)):i===12&&u.push(o>>4&255),new Uint8Array(u)}function Nr(e){var n="",i=0,r,l,t=e.length,o=Ze;for(r=0;r<t;r++)r%3===0&&r&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[r];return l=t%3,l===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):l===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):l===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Dr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Rr=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kr,construct:Tr,predicate:Dr,represent:Nr}),Mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.toString;function Wr(e){if(e===null)return!0;var n=[],i,r,l,t,o,u=e;for(i=0,r=u.length;i<r;i+=1){if(l=u[i],o=!1,Pr.call(l)!=="[object Object]")return!1;for(t in l)if(Mr.call(l,t))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(t)===-1)n.push(t);else return!1}return!0}function Hr(e){return e!==null?e:[]}var jr=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Wr,construct:Hr}),Br=Object.prototype.toString;function Ur(e){if(e===null)return!0;var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],Br.call(r)!=="[object Object]"||(l=Object.keys(r),l.length!==1))return!1;t[n]=[l[0],r[l[0]]]}return!0}function Yr(e){if(e===null)return[];var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],l=Object.keys(r),t[n]=[l[0],r[l[0]]];return t}var $r=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ur,construct:Yr}),qr=Object.prototype.hasOwnProperty;function zr(e){if(e===null)return!0;var n,i=e;for(n in i)if(qr.call(i,n)&&i[n]!==null)return!1;return!0}function Gr(e){return e!==null?e:{}}var Jr=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:zr,construct:Gr}),Qn=Sr.extend({implicit:[Fr,Ir],explicit:[Rr,jr,$r,Jr]}),j=Object.prototype.hasOwnProperty,se=1,Xn=2,Vn=3,pe=4,Ge=1,Kr=2,Tn=3,Qr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Xr=/[\\x85\\u2028\\u2029]/,Vr=/[,\\[\\]\\{\\}]/,Zn=/^(?:!|!!|![a-z\\-]+!)$/i,ei=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*\'\\(\\)\\[\\]])*$/i;function Nn(e){return Object.prototype.toString.call(e)}function R(e){return e===10||e===13}function Y(e){return e===9||e===32}function T(e){return e===9||e===32||e===10||e===13}function J(e){return e===44||e===91||e===93||e===123||e===125}function Zr(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function el(e){return e===120?2:e===117?4:e===85?8:0}function nl(e){return 48<=e&&e<=57?e-48:-1}function Dn(e){return e===48?"\\0":e===97?"\\x07":e===98?"\\b":e===116||e===9?" ":e===110?`\n`:e===118?"\\v":e===102?"\\f":e===114?"\\r":e===101?"\\x1B":e===32?" ":e===34?\'"\':e===47?"/":e===92?"\\\\":e===78?"\\x85":e===95?"\\xA0":e===76?"\\u2028":e===80?"\\u2029":""}function il(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ni(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var ii=new Array(256),ri=new Array(256);for(U=0;U<256;U++)ii[U]=Dn(U)?1:0,ri[U]=Dn(U);var U;function rl(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Qn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function li(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=$i(i),new k(n,i)}function v(e,n){throw li(e,n)}function de(e,n){e.onWarning&&e.onWarning.call(null,li(e,n))}var Rn={YAML:function(n,i,r){var l,t,o;n.version!==null&&v(n,"duplication of %YAML directive"),r.length!==1&&v(n,"YAML directive accepts exactly one argument"),l=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]),l===null&&v(n,"ill-formed argument of the YAML directive"),t=parseInt(l[1],10),o=parseInt(l[2],10),t!==1&&v(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&de(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var l,t;r.length!==2&&v(n,"TAG directive accepts exactly two arguments"),l=r[0],t=r[1],Zn.test(l)||v(n,"ill-formed tag handle (first argument) of the TAG directive"),j.call(n.tagMap,l)&&v(n,\'there is a previously declared suffix for "\'+l+\'" tag handle\'),ei.test(t)||v(n,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{v(n,"tag prefix is malformed: "+t)}n.tagMap[l]=t}};function H(e,n,i,r){var l,t,o,u;if(n<i){if(u=e.input.slice(n,i),r)for(l=0,t=u.length;l<t;l+=1)o=u.charCodeAt(l),o===9||32<=o&&o<=1114111||v(e,"expected valid JSON character");else Qr.test(u)&&v(e,"the stream contains non-printable characters");e.result+=u}}function Mn(e,n,i,r){var l,t,o,u;for(L.isObject(i)||v(e,"cannot merge mappings; the provided source object is unacceptable"),l=Object.keys(i),o=0,u=l.length;o<u;o+=1)t=l[o],j.call(n,t)||(ni(n,t,i[t]),r[t]=!0)}function K(e,n,i,r,l,t,o,u,f){var c,s;if(Array.isArray(l))for(l=Array.prototype.slice.call(l),c=0,s=l.length;c<s;c+=1)Array.isArray(l[c])&&v(e,"nested arrays are not supported inside keys"),typeof l=="object"&&Nn(l[c])==="[object Object]"&&(l[c]="[object Object]");if(typeof l=="object"&&Nn(l)==="[object Object]"&&(l="[object Object]"),l=String(l),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(t))for(c=0,s=t.length;c<s;c+=1)Mn(e,n,t[c],i);else Mn(e,n,t,i);else!e.json&&!j.call(i,l)&&j.call(n,l)&&(e.line=o||e.line,e.lineStart=u||e.lineStart,e.position=f||e.position,v(e,"duplicated mapping key")),ni(n,l,t),delete i[l];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):v(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function _(e,n,i){for(var r=0,l=e.input.charCodeAt(e.position);l!==0;){for(;Y(l);)l===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),l=e.input.charCodeAt(++e.position);if(n&&l===35)do l=e.input.charCodeAt(++e.position);while(l!==10&&l!==13&&l!==0);if(R(l))for(en(e),l=e.input.charCodeAt(e.position),r++,e.lineIndent=0;l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&de(e,"deficient indentation"),r}function ge(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||T(i)))}function nn(e,n){n===1?e.result+=" ":n>1&&(e.result+=L.repeat(`\n`,n-1))}function ll(e,n,i){var r,l,t,o,u,f,c,s,a=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||J(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l)))return!1;for(e.kind="scalar",e.result="",t=o=e.position,u=!1;d!==0;){if(d===58){if(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),T(r))break}else{if(e.position===e.lineStart&&ge(e)||i&&J(d))break;if(R(d))if(f=e.line,c=e.lineStart,s=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=f,e.lineStart=c,e.lineIndent=s;break}}u&&(H(e,t,o,!1),nn(e,e.line-f),t=o=e.position,u=!1),Y(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return H(e,t,o,!1),e.result?!0:(e.kind=a,e.result=p,!1)}function ol(e,n){var i,r,l;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=l=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(H(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,l=e.position;else return!0;else R(i)?(H(e,r,l,!0),nn(e,_(e,!1,n)),r=l=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a single quoted scalar"):(e.position++,l=e.position);v(e,"unexpected end of the stream within a single quoted scalar")}function tl(e,n){var i,r,l,t,o,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return H(e,i,e.position,!0),e.position++,!0;if(u===92){if(H(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),R(u))_(e,!1,n);else if(u<256&&ii[u])e.result+=ri[u],e.position++;else if((o=el(u))>0){for(l=o,t=0;l>0;l--)u=e.input.charCodeAt(++e.position),(o=Zr(u))>=0?t=(t<<4)+o:v(e,"expected hexadecimal character");e.result+=il(t),e.position++}else v(e,"unknown escape sequence");i=r=e.position}else R(u)?(H(e,i,r,!0),nn(e,_(e,!1,n)),i=r=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}v(e,"unexpected end of the stream within a double quoted scalar")}function ul(e,n){var i=!0,r,l,t,o=e.tag,u,f=e.anchor,c,s,a,p,d,h=Object.create(null),g,y,w,m;if(m=e.input.charCodeAt(e.position),m===91)s=93,d=!1,u=[];else if(m===123)s=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(++e.position);m!==0;){if(_(e,!0,n),m=e.input.charCodeAt(e.position),m===s)return e.position++,e.tag=o,e.anchor=f,e.kind=d?"mapping":"sequence",e.result=u,!0;i?m===44&&v(e,"expected the node content, but found \',\'"):v(e,"missed comma between flow collection entries"),y=g=w=null,a=p=!1,m===63&&(c=e.input.charCodeAt(e.position+1),T(c)&&(a=p=!0,e.position++,_(e,!0,n))),r=e.line,l=e.lineStart,t=e.position,Q(e,n,se,!1,!0),y=e.tag,g=e.result,_(e,!0,n),m=e.input.charCodeAt(e.position),(p||e.line===r)&&m===58&&(a=!0,m=e.input.charCodeAt(++e.position),_(e,!0,n),Q(e,n,se,!1,!0),w=e.result),d?K(e,u,h,y,g,w,r,l,t):a?u.push(K(e,null,h,y,g,w,r,l,t)):u.push(g),_(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}v(e,"unexpected end of the stream within a flow collection")}function fl(e,n){var i,r,l=Ge,t=!1,o=!1,u=n,f=0,c=!1,s,a;if(a=e.input.charCodeAt(e.position),a===124)r=!1;else if(a===62)r=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)Ge===l?l=a===43?Tn:Kr:v(e,"repeat of a chomping mode identifier");else if((s=nl(a))>=0)s===0?v(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?v(e,"repeat of an indentation width identifier"):(u=n+s-1,o=!0);else break;if(Y(a)){do a=e.input.charCodeAt(++e.position);while(Y(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!R(a)&&a!==0)}for(;a!==0;){for(en(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!o||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>u&&(u=e.lineIndent),R(a)){f++;continue}if(e.lineIndent<u){l===Tn?e.result+=L.repeat(`\n`,t?1+f:f):l===Ge&&t&&(e.result+=`\n`);break}for(r?Y(a)?(c=!0,e.result+=L.repeat(`\n`,t?1+f:f)):c?(c=!1,e.result+=L.repeat(`\n`,f+1)):f===0?t&&(e.result+=" "):e.result+=L.repeat(`\n`,f):e.result+=L.repeat(`\n`,t?1+f:f),t=!0,o=!0,f=0,i=e.position;!R(a)&&a!==0;)a=e.input.charCodeAt(++e.position);H(e,i,e.position,!1)}return!0}function Pn(e,n){var i,r=e.tag,l=e.anchor,t=[],o,u=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),!(f!==45||(o=e.input.charCodeAt(e.position+1),!T(o))));){if(u=!0,e.position++,_(e,!0,-1)&&e.lineIndent<=n){t.push(null),f=e.input.charCodeAt(e.position);continue}if(i=e.line,Q(e,n,Vn,!1,!0),t.push(e.result),_(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&f!==0)v(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return u?(e.tag=r,e.anchor=l,e.kind="sequence",e.result=t,!0):!1}function cl(e,n,i){var r,l,t,o,u,f,c=e.tag,s=e.anchor,a={},p=Object.create(null),d=null,h=null,g=null,y=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),m=e.input.charCodeAt(e.position);m!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),t=e.line,(m===63||m===58)&&T(r))m===63?(y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!0,l=!0):y?(y=!1,l=!0):v(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else{if(o=e.line,u=e.lineStart,f=e.position,!Q(e,i,Xn,!1,!0))break;if(e.line===t){for(m=e.input.charCodeAt(e.position);Y(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),T(m)||v(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!1,l=!1,d=e.tag,h=e.result;else if(w)v(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=s,!0}else if(w)v(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=s,!0}if((e.line===t||e.lineIndent>n)&&(y&&(o=e.line,u=e.lineStart,f=e.position),Q(e,n,pe,!0,l)&&(y?h=e.result:g=e.result),y||(K(e,a,p,d,h,g,o,u,f),d=h=g=null),_(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>n)&&m!==0)v(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return y&&K(e,a,p,d,h,null,o,u,f),w&&(e.tag=c,e.anchor=s,e.kind="mapping",e.result=a),w}function al(e){var n,i=!1,r=!1,l,t,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&v(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,l="!!",o=e.input.charCodeAt(++e.position)):l="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(t=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):v(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!T(o);)o===33&&(r?v(e,"tag suffix cannot contain exclamation marks"):(l=e.input.slice(n-1,e.position+1),Zn.test(l)||v(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),Vr.test(t)&&v(e,"tag suffix cannot contain flow indicator characters")}t&&!ei.test(t)&&v(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{v(e,"tag name is malformed: "+t)}return i?e.tag=t:j.call(e.tagMap,l)?e.tag=e.tagMap[l]+t:l==="!"?e.tag="!"+t:l==="!!"?e.tag="tag:yaml.org,2002:"+t:v(e,\'undeclared tag handle "\'+l+\'"\'),!0}function sl(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&v(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!T(i)&&!J(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function pl(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!T(r)&&!J(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),j.call(e.anchorMap,i)||v(e,\'unidentified alias "\'+i+\'"\'),e.result=e.anchorMap[i],_(e,!0,-1),!0}function Q(e,n,i,r,l){var t,o,u,f=1,c=!1,s=!1,a,p,d,h,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=o=u=pe===i||Vn===i,r&&_(e,!0,-1)&&(c=!0,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)),f===1)for(;al(e)||sl(e);)_(e,!0,-1)?(c=!0,u=t,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)):u=!1;if(u&&(u=c||l),(f===1||pe===i)&&(se===i||Xn===i?g=n:g=n+1,y=e.position-e.lineStart,f===1?u&&(Pn(e,y)||cl(e,y,g))||ul(e,g)?s=!0:(o&&fl(e,g)||ol(e,g)||tl(e,g)?s=!0:pl(e)?(s=!0,(e.tag!==null||e.anchor!==null)&&v(e,"alias node should not have any properties")):ll(e,g,se===i)&&(s=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(s=u&&Pn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&v(e,\'unacceptable node kind for !<?> tag; it should be "scalar", not "\'+e.kind+\'"\'),a=0,p=e.implicitTypes.length;a<p;a+=1)if(h=e.implicitTypes[a],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(j.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,d=e.typeMap.multi[e.kind||"fallback"],a=0,p=d.length;a<p;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){h=d[a];break}h||v(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&v(e,"unacceptable node kind for !<"+e.tag+\'> tag; it should be "\'+h.kind+\'", not "\'+e.kind+\'"\'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):v(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||s}function dl(e){var n=e.position,i,r,l,t=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(t=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),l=[],r.length<1&&v(e,"directive name must not be less than one character in length");o!==0;){for(;Y(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!R(o));break}if(R(o))break;for(i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);l.push(e.input.slice(i,e.position))}o!==0&&en(e),j.call(Rn,r)?Rn[r](e,r,l):de(e,\'unknown document directive "\'+r+\'"\')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):t&&v(e,"directives end mark is expected"),Q(e,e.lineIndent-1,pe,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Xr.test(e.input.slice(n,e.position))&&de(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ge(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position<e.length-1)v(e,"end of the stream or a document separator is expected");else return}function oi(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new rl(e,n),r=e.indexOf("\\0");for(r!==-1&&(i.position=r,v(i,"null byte is not allowed in input")),i.input+="\\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)dl(i);return i.documents}function hl(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var r=oi(e,i);if(typeof n!="function")return r;for(var l=0,t=r.length;l<t;l+=1)n(r[l])}function ml(e,n){var i=oi(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new k("expected a single document in the stream, but found more")}}var gl=hl,xl=ml,ti={loadAll:gl,load:xl},ui=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,rn=65279,vl=9,re=10,yl=13,Al=32,wl=33,Cl=34,Ke=35,El=37,Sl=38,bl=39,_l=42,ci=44,Ll=45,he=58,Fl=61,Ol=62,Il=63,kl=64,ai=91,si=93,Tl=96,pi=123,Nl=124,di=125,I={};I[0]="\\\\0";I[7]="\\\\a";I[8]="\\\\b";I[9]="\\\\t";I[10]="\\\\n";I[11]="\\\\v";I[12]="\\\\f";I[13]="\\\\r";I[27]="\\\\e";I[34]=\'\\\\"\';I[92]="\\\\\\\\";I[133]="\\\\N";I[160]="\\\\_";I[8232]="\\\\L";I[8233]="\\\\P";var Dl=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function Ml(e,n){var i,r,l,t,o,u,f;if(n===null)return{};for(i={},r=Object.keys(n),l=0,t=r.length;l<t;l+=1)o=r[l],u=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),f=e.compiledTypeMap.fallback[o],f&&fi.call(f.styleAliases,u)&&(u=f.styleAliases[u]),i[o]=u;return i}function Pl(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else if(e<=4294967295)i="U",r=8;else throw new k("code point within a string may not be greater than 0xFFFFFFFF");return"\\\\"+i+L.repeat("0",r-n.length)+n}var Wl=1,le=2;function Hl(e){this.schema=e.schema||Qn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ml(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===\'"\'?le:Wl,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wn(e,n){for(var i=L.repeat(" ",n),r=0,l=-1,t="",o,u=e.length;r<u;)l=e.indexOf(`\n`,r),l===-1?(o=e.slice(r),r=u):(o=e.slice(r,l+1),r=l+1),o.length&&o!==`\n`&&(t+=i),t+=o;return t}function Qe(e,n){return`\n`+L.repeat(" ",e.indent*n)}function jl(e,n){var i,r,l;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(l=e.implicitTypes[i],l.resolve(n))return!0;return!1}function me(e){return e===Al||e===vl}function oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function Hn(e){return oe(e)&&e!==rn&&e!==yl&&e!==re}function jn(e,n,i){var r=Hn(e),l=r&&!me(e);return(i?r:r&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di)&&e!==Ke&&!(n===he&&!l)||Hn(n)&&!me(n)&&e===Ke||n===he&&l}function Bl(e){return oe(e)&&e!==rn&&!me(e)&&e!==Ll&&e!==Il&&e!==he&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di&&e!==Ke&&e!==Sl&&e!==_l&&e!==wl&&e!==Nl&&e!==Fl&&e!==Ol&&e!==bl&&e!==Cl&&e!==El&&e!==kl&&e!==Tl}function Ul(e){return!me(e)&&e!==he}function ne(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function hi(e){var n=/^\\n* /;return n.test(e)}var mi=1,Xe=2,gi=3,xi=4,G=5;function Yl(e,n,i,r,l,t,o,u){var f,c=0,s=null,a=!1,p=!1,d=r!==-1,h=-1,g=Bl(ne(e,0))&&Ul(ne(e,e.length-1));if(n||o)for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),!oe(c))return G;g=g&&jn(c,s,u),s=c}else{for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),c===re)a=!0,d&&(p=p||f-h-1>r&&e[h+1]!==" ",h=f);else if(!oe(c))return G;g=g&&jn(c,s,u),s=c}p=p||d&&f-h-1>r&&e[h+1]!==" "}return!a&&!p?g&&!o&&!l(e)?mi:t===le?G:Xe:i>9&&hi(e)?G:o?t===le?G:Xe:p?xi:gi}function $l(e,n,i,r,l){e.dump=(function(){if(n.length===0)return e.quotingType===le?\'""\':"\'\'";if(!e.noCompatMode&&(Dl.indexOf(n)!==-1||Rl.test(n)))return e.quotingType===le?\'"\'+n+\'"\':"\'"+n+"\'";var t=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=r||e.flowLevel>-1&&i>=e.flowLevel;function f(c){return jl(e,c)}switch(Yl(n,u,e.indent,o,f,e.quotingType,e.forceQuotes&&!r,l)){case mi:return n;case Xe:return"\'"+n.replace(/\'/g,"\'\'")+"\'";case gi:return"|"+Bn(n,e.indent)+Un(Wn(n,t));case xi:return">"+Bn(n,e.indent)+Un(Wn(ql(n,o),t));case G:return\'"\'+zl(n)+\'"\';default:throw new k("impossible error: invalid scalar style")}})()}function Bn(e,n){var i=hi(e)?String(n):"",r=e[e.length-1]===`\n`,l=r&&(e[e.length-2]===`\n`||e===`\n`),t=l?"+":r?"":"-";return i+t+`\n`}function Un(e){return e[e.length-1]===`\n`?e.slice(0,-1):e}function ql(e,n){for(var i=/(\\n+)([^\\n]*)/g,r=(function(){var c=e.indexOf(`\n`);return c=c!==-1?c:e.length,i.lastIndex=c,Yn(e.slice(0,c),n)})(),l=e[0]===`\n`||e[0]===" ",t,o;o=i.exec(e);){var u=o[1],f=o[2];t=f[0]===" ",r+=u+(!l&&!t&&f!==""?`\n`:"")+Yn(f,n),l=t}return r}function Yn(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,r,l=0,t,o=0,u=0,f="";r=i.exec(e);)u=r.index,u-l>n&&(t=o>l?o:u,f+=`\n`+e.slice(l,t),l=t+1),o=u;return f+=`\n`,e.length-l>n&&o>l?f+=e.slice(l,o)+`\n`+e.slice(o+1):f+=e.slice(l),f.slice(1)}function zl(e){for(var n="",i=0,r,l=0;l<e.length;i>=65536?l+=2:l++)i=ne(e,l),r=I[i],!r&&oe(i)?(n+=e[l],i>=65536&&(n+=e[l+1])):n+=r||Pl(i);return n}function Gl(e,n,i){var r="",l=e.tag,t,o,u;for(t=0,o=i.length;t<o;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(P(e,n,u,!1,!1)||typeof u>"u"&&P(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=l,e.dump="["+r+"]"}function $n(e,n,i,r){var l="",t=e.tag,o,u,f;for(o=0,u=i.length;o<u;o+=1)f=i[o],e.replacer&&(f=e.replacer.call(i,String(o),f)),(P(e,n+1,f,!0,!0,!1,!0)||typeof f>"u"&&P(e,n+1,null,!0,!0,!1,!0))&&((!r||l!=="")&&(l+=Qe(e,n)),e.dump&&re===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=t,e.dump=l||"[]"}function Jl(e,n,i){var r="",l=e.tag,t=Object.keys(i),o,u,f,c,s;for(o=0,u=t.length;o<u;o+=1)s="",r!==""&&(s+=", "),e.condenseFlow&&(s+=\'"\'),f=t[o],c=i[f],e.replacer&&(c=e.replacer.call(i,f,c)),P(e,n,f,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?\'"\':"")+":"+(e.condenseFlow?"":" "),P(e,n,c,!1,!1)&&(s+=e.dump,r+=s));e.tag=l,e.dump="{"+r+"}"}function Kl(e,n,i,r){var l="",t=e.tag,o=Object.keys(i),u,f,c,s,a,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new k("sortKeys must be a boolean or a function");for(u=0,f=o.length;u<f;u+=1)p="",(!r||l!=="")&&(p+=Qe(e,n)),c=o[u],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),P(e,n+1,c,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&re===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,a&&(p+=Qe(e,n)),P(e,n+1,s,!0,a)&&(e.dump&&re===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,l+=p));e.tag=t,e.dump=l||"{}"}function qn(e,n,i){var r,l,t,o,u,f;for(l=i?e.explicitTypes:e.implicitTypes,t=0,o=l.length;t<o;t+=1)if(u=l[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof n=="object"&&n instanceof u.instanceOf)&&(!u.predicate||u.predicate(n))){if(i?u.multi&&u.representName?e.tag=u.representName(n):e.tag=u.tag:e.tag="?",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,ui.call(u.represent)==="[object Function]")r=u.represent(n,f);else if(fi.call(u.represent,f))r=u.represent[f](n,f);else throw new k("!<"+u.tag+\'> tag resolver accepts not "\'+f+\'" style\');e.dump=r}return!0}return!1}function P(e,n,i,r,l,t,o){e.tag=null,e.dump=i,qn(e,i,!1)||qn(e,i,!0);var u=ui.call(e.dump),f=r,c;r&&(r=e.flowLevel<0||e.flowLevel>n);var s=u==="[object Object]"||u==="[object Array]",a,p;if(s&&(a=e.duplicates.indexOf(i),p=a!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(l=!1),p&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(s&&p&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")r&&Object.keys(e.dump).length!==0?(Kl(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Jl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?$n(e,n-1,e.dump,l):$n(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Gl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&$l(e,e.dump,n,t,f);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new k("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function Ql(e,n){var i=[],r=[],l,t;for(Ve(e,i,r),l=0,t=r.length;l<t;l+=1)n.duplicates.push(i[r[l]]);n.usedDuplicates=new Array(t)}function Ve(e,n,i){var r,l,t;if(e!==null&&typeof e=="object")if(l=n.indexOf(e),l!==-1)i.indexOf(l)===-1&&i.push(l);else if(n.push(e),Array.isArray(e))for(l=0,t=e.length;l<t;l+=1)Ve(e[l],n,i);else for(r=Object.keys(e),l=0,t=r.length;l<t;l+=1)Ve(e[r[l]],n,i)}function Xl(e,n){n=n||{};var i=new Hl(n);i.noRefs||Ql(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),P(i,0,r,!0,!0)?i.dump+`\n`:""}var Vl=Xl,Zl={dump:Vl};function ln(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var on=ti.load,ot=ti.loadAll,xe=Zl.dump;var tt=ln("safeLoad","load"),ut=ln("safeLoadAll","loadAll"),ft=ln("safeDump","dump");var no=$e;function D(e,n){return n==="yaml"?xe(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function io(e,n,i="json"){let r=D(e,i),l=D(n,i);return r===l?[{value:r}]:tn(e,n,0,i)}function ro(e,n){return io(e,n,"json")}function lo(e,n){try{let i=JSON.parse(e),r=JSON.parse(n),l=JSON.stringify(i),t=JSON.stringify(r);return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}catch{return N(e,n,{newlineIsToken:!1})}}function oo(e,n){let i=on(e),r=on(n),l=xe(i,{indent:2,lineWidth:-1,noRefs:!0}),t=xe(r,{indent:2,lineWidth:-1,noRefs:!0});return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}function tn(e,n,i,r="json"){let l=D(e,r),t=D(n,r);return l===t?[{value:W(l,i,r)}]:typeof e=="object"&&e!==null&&typeof n=="object"&&n!==null&&!Array.isArray(e)&&!Array.isArray(n)?to(e,n,i,r):Array.isArray(e)&&Array.isArray(n)?uo(e,n,i,r):fo(l,t,i,r)}function to(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1),u=new Set(Object.keys(e)),f=Object.keys(n),c=[...u].filter(a=>!(a in n)),s=[...f,...c];l.push({value:`{\n`});for(let a=0;a<s.length;a++){let p=s[a],h=a===s.length-1?"":",",g=p in e,y=p in n;if(g&&y){let w=D(e[p],r),m=D(n[p],r);if(w===m){let x=W(w,i+1);l.push({value:o+JSON.stringify(p)+": "+x+h+`\n`})}else{let x=o+JSON.stringify(p)+": ",A=tn(e[p],n[p],i+1,r);if(A.length>0)if(!A[0].removed&&!A[0].added)A[0].value=x+A[0].value;else{let C=A.find(E=>E.removed),F=A.find(E=>E.added);C&&(C.value=x+C.value),F&&(F.value=x+F.value)}if(h&&A.length>0){let C=A[A.length-1];C.value=C.value.replace(/\\n$/,h+`\n`)}l.push(...A)}}else if(g){let w=W(D(e[p],r),i+1);l.push({removed:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}else{let w=W(D(n[p],r),i+1);l.push({added:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}}return l.push({value:t+`}\n`}),l}function uo(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1);l.push({value:`[\n`});let u=Math.max(e.length,n.length);for(let f=0;f<u;f++){let s=f===u-1?"":",";if(f>=e.length){let a=W(D(n[f],r),i+1);l.push({added:!0,value:o+a+s+`\n`})}else if(f>=n.length){let a=W(D(e[f],r),i+1);l.push({removed:!0,value:o+a+s+`\n`})}else{let a=D(e[f],r),p=D(n[f],r);if(a===p){let d=W(a,i+1);l.push({value:o+d+s+`\n`})}else{let d=tn(e[f],n[f],i+1,r);if(d.length>0&&(d[0].value=o+d[0].value),s&&d.length>0){let h=d[d.length-1];h.value=h.value.replace(/\\n$/,s+`\n`)}l.push(...d)}}}return l.push({value:t+`]\n`}),l}function fo(e,n,i,r="json"){let l=W(e,i),t=W(n,i);return N(l,t).map(u=>({value:u.value,added:u.added,removed:u.removed}))}function W(e,n,i="json"){if(n===0)return e;let r=" ".repeat(n);return e.split(`\n`).map((l,t)=>t===0?l:r+l).join(`\n`)}var vi=e=>e===""?[]:e.replace(/\\n$/,"").split(`\n`),co=(e,n,i="diffChars")=>{let l=(typeof i=="string"?no[i]:i)(e,n),t={left:[],right:[]};return l.forEach(({added:o,removed:u,value:f})=>{let c={};return o&&(c.type=1,c.value=f,t.right.push(c)),u&&(c.type=2,c.value=f,t.left.push(c)),!u&&!o&&(c.type=0,c.value=f,t.right.push(c),t.left.push(c)),c}),t},yi=(e,n,i=!1,r="diffChars",l=0,t=[],o=!1)=>{let u=[];if(typeof e=="string"&&typeof n=="string")if(r==="diffJson")u=lo(e,n);else if(r==="diffYaml")try{u=oo(e,n)}catch{u=N(e,n,{newlineIsToken:!1})}else u=N(e,n,{newlineIsToken:!1});else u=ro(e,n);let f=l,c=l,s=[],a=0,p=[],d=[],h=(g,y,w,m,x)=>vi(g).map((C,F)=>{let E={},S={};if(!(d.includes(`${y}-${F}`)||x&&F!==0)){if(w||m){let $=!0;if(m){c+=1,E.lineNumber=c,E.type=2,E.value=C||" ";let un=u[y+1];if(un?.added){let fn=vi(un.value)[F];if(fn){let Ai=h(fn,y,!0,!1,!0),{value:B,lineNumber:wi,type:Ci}=Ai[0].right;if(d.push(`${y+1}-${F}`),S.lineNumber=wi,E.value===B)$=!1,S.type=0,E.type=0,S.value=B;else{S.type=Ci;let cn=500,Ei=C.length>cn||B.length>cn;if(i||Ei)S.value=B;else if(o)E.rawValue=C,E.value=C,S.rawValue=B,S.value=B;else{let an=co(C,B,r);S.value=an.right,E.value=an.left}}}}}else f+=1,S.lineNumber=f,S.type=1,S.value=C;$&&!x&&(p.includes(a)||p.push(a))}else c+=1,f+=1,E.lineNumber=c,E.type=0,E.value=C,S.lineNumber=f,S.type=0,S.value=C;return(t?.includes(`L-${E.lineNumber}`)||t?.includes(`R-${S.lineNumber}`)&&!p.includes(a))&&p.push(a),x||(a+=1),{right:S,left:E}}}).filter(Boolean);return u.forEach(({added:g,removed:y,value:w},m)=>{s=[...s,...h(w,m,g,y)]}),{lineInformation:s,diffLines:p}};self.onmessage=e=>{let{oldString:n,newString:i,disableWordDiff:r,lineCompareMethod:l,linesOffset:t,showLines:o,deferWordDiff:u}=e.data,f=yi(n,i,r,l,t,o,u);self.postMessage(f)};})();\n/*! Bundled license information:\n\njs-yaml/dist/js-yaml.mjs:\n (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)\n*/\n',GK=SY;var gn;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ADDED=1]="ADDED",e[e.REMOVED=2]="REMOVED",e[e.CHANGED=3]="CHANGED"})(gn||(gn={}));function Oi(e,t){return t==="yaml"?J1(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function YK(e,t,n="json"){const r=Oi(e,n),o=Oi(t,n);return r===o?[{value:r}]:nb(e,t,0,n)}function WK(e,t){return YK(e,t,"json")}function KK(e,t){try{const n=JSON.parse(e),r=JSON.parse(t),o=JSON.stringify(n),a=JSON.stringify(r);return o===a?[{value:e}]:qo(e,t,{newlineIsToken:!1})}catch{return qo(e,t,{newlineIsToken:!1})}}function QK(e,t){const n=e4(e),r=e4(t),o=J1(n,{indent:2,lineWidth:-1,noRefs:!0}),a=J1(r,{indent:2,lineWidth:-1,noRefs:!0});return o===a?[{value:e}]:qo(e,t,{newlineIsToken:!1})}function nb(e,t,n,r="json"){const o=Oi(e,r),a=Oi(t,r);return o===a?[{value:Ho(o,n,r)}]:typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&!Array.isArray(e)&&!Array.isArray(t)?XK(e,t,n,r):Array.isArray(e)&&Array.isArray(t)?ZK(e,t,n,r):JK(o,a,n,r)}function XK(e,t,n,r="json"){const o=[],a=" ".repeat(n),l=" ".repeat(n+1),c=new Set(Object.keys(e)),f=Object.keys(t),d=[...c].filter(h=>!(h in t)),g=[...f,...d];o.push({value:`{
73
- `});for(let h=0;h<g.length;h++){const y=g[h],v=h===g.length-1?"":",",S=y in e,E=y in t;if(S&&E){const k=Oi(e[y],r),T=Oi(t[y],r);if(k===T){const R=Ho(k,n+1);o.push({value:l+JSON.stringify(y)+": "+R+v+`
74
- `})}else{const R=l+JSON.stringify(y)+": ",L=nb(e[y],t[y],n+1,r);if(L.length>0)if(!L[0].removed&&!L[0].added)L[0].value=R+L[0].value;else{const j=L.find(A=>A.removed),N=L.find(A=>A.added);j&&(j.value=R+j.value),N&&(N.value=R+N.value)}if(v&&L.length>0){const j=L[L.length-1];j.value=j.value.replace(/\n$/,v+`
75
- `)}o.push(...L)}}else if(S){const k=Ho(Oi(e[y],r),n+1);o.push({removed:!0,value:l+JSON.stringify(y)+": "+k+v+`
76
- `})}else{const k=Ho(Oi(t[y],r),n+1);o.push({added:!0,value:l+JSON.stringify(y)+": "+k+v+`
77
- `})}}return o.push({value:a+`}
78
- `}),o}function ZK(e,t,n,r="json"){const o=[],a=" ".repeat(n),l=" ".repeat(n+1);o.push({value:`[
79
- `});const c=Math.max(e.length,t.length);for(let f=0;f<c;f++){const g=f===c-1?"":",";if(f>=e.length){const h=Ho(Oi(t[f],r),n+1);o.push({added:!0,value:l+h+g+`
80
- `})}else if(f>=t.length){const h=Ho(Oi(e[f],r),n+1);o.push({removed:!0,value:l+h+g+`
81
- `})}else{const h=Oi(e[f],r),y=Oi(t[f],r);if(h===y){const x=Ho(h,n+1);o.push({value:l+x+g+`
82
- `})}else{const x=nb(e[f],t[f],n+1,r);if(x.length>0&&(x[0].value=l+x[0].value),g&&x.length>0){const v=x[x.length-1];v.value=v.value.replace(/\n$/,g+`
83
- `)}o.push(...x)}}}return o.push({value:a+`]
84
- `}),o}function JK(e,t,n,r="json"){const o=Ho(e,n),a=Ho(t,n);return qo(o,a).map(c=>({value:c.value,added:c.added,removed:c.removed}))}function Ho(e,t,n="json"){if(t===0)return e;const r=" ".repeat(t);return e.split(`
85
- `).map((o,a)=>a===0?o:r+o).join(`
86
- `)}var nr;(function(e){e.CHARS="diffChars",e.WORDS="diffWords",e.WORDS_WITH_SPACE="diffWordsWithSpace",e.LINES="diffLines",e.TRIMMED_LINES="diffTrimmedLines",e.SENTENCES="diffSentences",e.CSS="diffCss",e.JSON="diffJson",e.YAML="diffYaml"})(nr||(nr={}));const t4=e=>e===""?[]:e.replace(/\n$/,"").split(`
87
- `),B8=(e,t,n=nr.CHARS)=>{const o=(typeof n=="string"?GK[n]:n)(e,t),a={left:[],right:[]};return o.forEach(({added:l,removed:c,value:f})=>{const d={};return l&&(d.type=gn.ADDED,d.value=f,a.right.push(d)),c&&(d.type=gn.REMOVED,d.value=f,a.left.push(d)),!c&&!l&&(d.type=gn.DEFAULT,d.value=f,a.right.push(d),a.left.push(d)),d}),a},eQ=(e,t,n=!1,r=nr.CHARS,o=0,a=[],l=!1)=>{let c=[];if(typeof e=="string"&&typeof t=="string")if(r===nr.JSON)c=KK(e,t);else if(r===nr.YAML)try{c=QK(e,t)}catch{c=qo(e,t,{newlineIsToken:!1})}else c=qo(e,t,{newlineIsToken:!1});else c=WK(e,t);let f=o,d=o,g=[],h=0;const y=[],x=[],v=(S,E,k,T,R)=>t4(S).map((j,N)=>{const A={},D={};if(!(x.includes(`${E}-${N}`)||R&&N!==0)){if(k||T){let U=!0;if(T){d+=1,A.lineNumber=d,A.type=gn.REMOVED,A.value=j||" ";const I=c[E+1];if(I?.added){const q=t4(I.value)[N];if(q){const $=v(q,E,!0,!1,!0),{value:V,lineNumber:Y,type:H}=$[0].right;if(x.push(`${E+1}-${N}`),D.lineNumber=Y,A.value===V)U=!1,D.type=0,A.type=0,D.value=V;else{D.type=H;const B=500,F=j.length>B||V.length>B;if(n||F)D.value=V;else if(l)A.rawValue=j,A.value=j,D.rawValue=V,D.value=V;else{const G=B8(j,V,r);D.value=G.right,A.value=G.left}}}}}else f+=1,D.lineNumber=f,D.type=gn.ADDED,D.value=j;U&&!R&&(y.includes(h)||y.push(h))}else d+=1,f+=1,A.lineNumber=d,A.type=gn.DEFAULT,A.value=j,D.lineNumber=f,D.type=gn.DEFAULT,D.value=j;return(a?.includes(`L-${A.lineNumber}`)||a?.includes(`R-${D.lineNumber}`)&&!y.includes(h))&&y.push(h),R||(h+=1),{right:D,left:A}}}).filter(Boolean);return c.forEach(({added:S,removed:E,value:k},T)=>{g=[...g,...v(k,T,S,E)]}),{lineInformation:g,diffLines:y}};let Tu=null,Qu=null;const tQ=()=>{if(Tu!==null)return Tu;if(typeof Worker>"u"||typeof Blob>"u"||typeof URL>"u")return Qu=!1,null;try{const e=new Blob([$K],{type:"application/javascript"});Tu=URL.createObjectURL(e),Qu=!0}catch{Qu=!1,Tu=null}return Tu},nQ=(e,t,n=!1,r=nr.CHARS,o=0,a=[],l=!1)=>{const c=()=>eQ(e,t,n,r,o,a,l),f=tQ();return f?new Promise(d=>{let g;try{g=new Worker(f)}catch{Qu=!1,d(c());return}g.onmessage=h=>{d(h.data),g.terminate()},g.onerror=()=>{Qu=!1,g.terminate(),d(c())},g.postMessage({oldString:e,newString:t,disableWordDiff:n,lineCompareMethod:r,linesOffset:o,showLines:a,deferWordDiff:l})}):Promise.resolve(c())};function n4(){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[p.jsx("title",{children:"expand"}),p.jsx("path",{d:"m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z"})]})}function rQ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function iQ(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var oQ=(function(){function e(n){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(iQ(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=rQ(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),mr="-ms-",Mp="-moz-",Vt="-webkit-",H8="comm",rb="rule",ib="decl",aQ="@import",U8="@keyframes",sQ="@layer",lQ=Math.abs,C0=String.fromCharCode,cQ=Object.assign;function uQ(e,t){return fr(e,0)^45?(((t<<2^fr(e,0))<<2^fr(e,1))<<2^fr(e,2))<<2^fr(e,3):0}function q8(e){return e.trim()}function fQ(e,t){return(e=t.exec(e))?e[0]:e}function $t(e,t,n){return e.replace(t,n)}function ey(e,t){return e.indexOf(t)}function fr(e,t){return e.charCodeAt(t)|0}function mf(e,t,n){return e.slice(t,n)}function no(e){return e.length}function ob(e){return e.length}function Nh(e,t){return t.push(e),e}function dQ(e,t){return e.map(t).join("")}var E0=1,lc=1,V8=0,Vr=0,Un=0,wc="";function k0(e,t,n,r,o,a,l){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:E0,column:lc,length:l,return:""}}function Au(e,t){return cQ(k0("",null,null,"",null,null,0),e,{length:-e.length},t)}function hQ(){return Un}function pQ(){return Un=Vr>0?fr(wc,--Vr):0,lc--,Un===10&&(lc=1,E0--),Un}function si(){return Un=Vr<V8?fr(wc,Vr++):0,lc++,Un===10&&(lc=1,E0++),Un}function co(){return fr(wc,Vr)}function Jh(){return Vr}function Hf(e,t){return mf(wc,e,t)}function gf(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $8(e){return E0=lc=1,V8=no(wc=e),Vr=0,[]}function G8(e){return wc="",e}function ep(e){return q8(Hf(Vr-1,ty(e===91?e+2:e===40?e+1:e)))}function mQ(e){for(;(Un=co())&&Un<33;)si();return gf(e)>2||gf(Un)>3?"":" "}function gQ(e,t){for(;--t&&si()&&!(Un<48||Un>102||Un>57&&Un<65||Un>70&&Un<97););return Hf(e,Jh()+(t<6&&co()==32&&si()==32))}function ty(e){for(;si();)switch(Un){case e:return Vr;case 34:case 39:e!==34&&e!==39&&ty(Un);break;case 40:e===41&&ty(e);break;case 92:si();break}return Vr}function yQ(e,t){for(;si()&&e+Un!==57;)if(e+Un===84&&co()===47)break;return"/*"+Hf(t,Vr-1)+"*"+C0(e===47?e:si())}function xQ(e){for(;!gf(co());)si();return Hf(e,Vr)}function bQ(e){return G8(tp("",null,null,null,[""],e=$8(e),0,[0],e))}function tp(e,t,n,r,o,a,l,c,f){for(var d=0,g=0,h=l,y=0,x=0,v=0,S=1,E=1,k=1,T=0,R="",L=o,j=a,N=r,A=R;E;)switch(v=T,T=si()){case 40:if(v!=108&&fr(A,h-1)==58){ey(A+=$t(ep(T),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:A+=ep(T);break;case 9:case 10:case 13:case 32:A+=mQ(v);break;case 92:A+=gQ(Jh()-1,7);continue;case 47:switch(co()){case 42:case 47:Nh(vQ(yQ(si(),Jh()),t,n),f);break;default:A+="/"}break;case 123*S:c[d++]=no(A)*k;case 125*S:case 59:case 0:switch(T){case 0:case 125:E=0;case 59+g:k==-1&&(A=$t(A,/\f/g,"")),x>0&&no(A)-h&&Nh(x>32?i4(A+";",r,n,h-1):i4($t(A," ","")+";",r,n,h-2),f);break;case 59:A+=";";default:if(Nh(N=r4(A,t,n,d,g,o,c,R,L=[],j=[],h),a),T===123)if(g===0)tp(A,t,N,N,L,a,h,c,j);else switch(y===99&&fr(A,3)===110?100:y){case 100:case 108:case 109:case 115:tp(e,N,N,r&&Nh(r4(e,N,N,0,0,o,c,R,o,L=[],h),j),o,j,h,c,r?L:j);break;default:tp(A,N,N,N,[""],j,0,c,j)}}d=g=x=0,S=k=1,R=A="",h=l;break;case 58:h=1+no(A),x=v;default:if(S<1){if(T==123)--S;else if(T==125&&S++==0&&pQ()==125)continue}switch(A+=C0(T),T*S){case 38:k=g>0?1:(A+="\f",-1);break;case 44:c[d++]=(no(A)-1)*k,k=1;break;case 64:co()===45&&(A+=ep(si())),y=co(),g=h=no(R=A+=xQ(Jh())),T++;break;case 45:v===45&&no(A)==2&&(S=0)}}return a}function r4(e,t,n,r,o,a,l,c,f,d,g){for(var h=o-1,y=o===0?a:[""],x=ob(y),v=0,S=0,E=0;v<r;++v)for(var k=0,T=mf(e,h+1,h=lQ(S=l[v])),R=e;k<x;++k)(R=q8(S>0?y[k]+" "+T:$t(T,/&\f/g,y[k])))&&(f[E++]=R);return k0(e,t,n,o===0?rb:c,f,d,g)}function vQ(e,t,n){return k0(e,t,n,H8,C0(hQ()),mf(e,2,-2),0)}function i4(e,t,n,r){return k0(e,t,n,ib,mf(e,0,r),mf(e,r+1,-1),r)}function Xl(e,t){for(var n="",r=ob(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function wQ(e,t,n,r){switch(e.type){case sQ:if(e.children.length)break;case aQ:case ib:return e.return=e.return||e.value;case H8:return"";case U8:return e.return=e.value+"{"+Xl(e.children,r)+"}";case rb:e.value=e.props.join(",")}return no(n=Xl(e.children,r))?e.return=e.value+"{"+n+"}":""}function SQ(e){var t=ob(e);return function(n,r,o,a){for(var l="",c=0;c<t;c++)l+=e[c](n,r,o,a)||"";return l}}function CQ(e){return function(t){t.root||(t=t.return)&&e(t)}}function EQ(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var kQ=function(t,n,r){for(var o=0,a=0;o=a,a=co(),o===38&&a===12&&(n[r]=1),!gf(a);)si();return Hf(t,Vr)},TQ=function(t,n){var r=-1,o=44;do switch(gf(o)){case 0:o===38&&co()===12&&(n[r]=1),t[r]+=kQ(Vr-1,n,r);break;case 2:t[r]+=ep(o);break;case 4:if(o===44){t[++r]=co()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=C0(o)}while(o=si());return t},AQ=function(t,n){return G8(TQ($8(t),n))},o4=new WeakMap,RQ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!o4.get(r))&&!o){o4.set(t,!0);for(var a=[],l=AQ(n,a),c=r.props,f=0,d=0;f<l.length;f++)for(var g=0;g<c.length;g++,d++)t.props[d]=a[f]?l[f].replace(/&\f/g,c[g]):c[g]+" "+l[f]}}},NQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Y8(e,t){switch(uQ(e,t)){case 5103:return Vt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Vt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Vt+e+Mp+e+mr+e+e;case 6828:case 4268:return Vt+e+mr+e+e;case 6165:return Vt+e+mr+"flex-"+e+e;case 5187:return Vt+e+$t(e,/(\w+).+(:[^]+)/,Vt+"box-$1$2"+mr+"flex-$1$2")+e;case 5443:return Vt+e+mr+"flex-item-"+$t(e,/flex-|-self/,"")+e;case 4675:return Vt+e+mr+"flex-line-pack"+$t(e,/align-content|flex-|-self/,"")+e;case 5548:return Vt+e+mr+$t(e,"shrink","negative")+e;case 5292:return Vt+e+mr+$t(e,"basis","preferred-size")+e;case 6060:return Vt+"box-"+$t(e,"-grow","")+Vt+e+mr+$t(e,"grow","positive")+e;case 4554:return Vt+$t(e,/([^-])(transform)/g,"$1"+Vt+"$2")+e;case 6187:return $t($t($t(e,/(zoom-|grab)/,Vt+"$1"),/(image-set)/,Vt+"$1"),e,"")+e;case 5495:case 3959:return $t(e,/(image-set\([^]*)/,Vt+"$1$`$1");case 4968:return $t($t(e,/(.+:)(flex-)?(.*)/,Vt+"box-pack:$3"+mr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Vt+e+e;case 4095:case 3583:case 4068:case 2532:return $t(e,/(.+)-inline(.+)/,Vt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(no(e)-1-t>6)switch(fr(e,t+1)){case 109:if(fr(e,t+4)!==45)break;case 102:return $t(e,/(.+:)(.+)-([^]+)/,"$1"+Vt+"$2-$3$1"+Mp+(fr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ey(e,"stretch")?Y8($t(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(fr(e,t+1)!==115)break;case 6444:switch(fr(e,no(e)-3-(~ey(e,"!important")&&10))){case 107:return $t(e,":",":"+Vt)+e;case 101:return $t(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vt+(fr(e,14)===45?"inline-":"")+"box$3$1"+Vt+"$2$3$1"+mr+"$2box$3")+e}break;case 5936:switch(fr(e,t+11)){case 114:return Vt+e+mr+$t(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vt+e+mr+$t(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vt+e+mr+$t(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vt+e+mr+e+e}return e}var OQ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ib:t.return=Y8(t.value,t.length);break;case U8:return Xl([Au(t,{value:$t(t.value,"@","@"+Vt)})],o);case rb:if(t.length)return dQ(t.props,function(a){switch(fQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Xl([Au(t,{props:[$t(a,/:(read-\w+)/,":"+Mp+"$1")]})],o);case"::placeholder":return Xl([Au(t,{props:[$t(a,/:(plac\w+)/,":"+Vt+"input-$1")]}),Au(t,{props:[$t(a,/:(plac\w+)/,":"+Mp+"$1")]}),Au(t,{props:[$t(a,/:(plac\w+)/,mr+"input-$1")]})],o)}return""})}},jQ=[OQ],MQ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var E=S.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var o=t.stylisPlugins||jQ,a={},l,c=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var E=S.getAttribute("data-emotion").split(" "),k=1;k<E.length;k++)a[E[k]]=!0;c.push(S)});var f,d=[RQ,NQ];{var g,h=[wQ,CQ(function(S){g.insert(S)})],y=SQ(d.concat(o,h)),x=function(E){return Xl(bQ(E),y)};f=function(E,k,T,R){g=T,x(E?E+"{"+k.styles+"}":k.styles),R&&(v.inserted[k.name]=!0)}}var v={key:n,sheet:new oQ({key:n,container:l,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:f};return v.sheet.hydrate(c),v};function LQ(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _Q={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},DQ=/[A-Z]|^ms/g,IQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W8=function(t){return t.charCodeAt(1)===45},a4=function(t){return t!=null&&typeof t!="boolean"},O2=EQ(function(e){return W8(e)?e:e.replace(DQ,"-$&").toLowerCase()}),s4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(IQ,function(r,o,a){return Ma={name:o,styles:a,next:Ma},o})}return _Q[t]!==1&&!W8(t)&&typeof n=="number"&&n!==0?n+"px":n};function Lp(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Ma={name:o.name,styles:o.styles,next:Ma},o.name;var a=n;if(a.styles!==void 0){var l=a.next;if(l!==void 0)for(;l!==void 0;)Ma={name:l.name,styles:l.styles,next:Ma},l=l.next;var c=a.styles+";";return c}return zQ(e,t,n)}}var f=n;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function zQ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Lp(e,t,n[o])+";";else for(var a in n){var l=n[a];if(typeof l!="object"){var c=l;t!=null&&t[c]!==void 0?r+=a+"{"+t[c]+"}":a4(c)&&(r+=O2(a)+":"+s4(a,c)+";")}else if(Array.isArray(l)&&typeof l[0]=="string"&&(t==null||t[l[0]]===void 0))for(var f=0;f<l.length;f++)a4(l[f])&&(r+=O2(a)+":"+s4(a,l[f])+";");else{var d=Lp(e,t,l);switch(a){case"animation":case"animationName":{r+=O2(a)+":"+d+";";break}default:r+=a+"{"+d+"}"}}}return r}var l4=/label:\s*([^\s;{]+)\s*(;|$)/g,Ma;function j2(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Ma=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,o+=Lp(n,t,a);else{var l=a;o+=l[0]}for(var c=1;c<e.length;c++)if(o+=Lp(n,t,e[c]),r){var f=a;o+=f[c]}l4.lastIndex=0;for(var d="",g;(g=l4.exec(o))!==null;)d+="-"+g[1];var h=LQ(o)+d;return{name:h,styles:o,next:Ma}}function K8(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var PQ=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},FQ=function(t,n,r){PQ(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function c4(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function u4(e,t,n){var r=[],o=K8(e,r,n);return r.length<2?n:o+t(r)}var BQ=function(t){var n=MQ(t);n.sheet.speedy=function(c){this.isSpeedy=c},n.compat=!0;var r=function(){for(var f=arguments.length,d=new Array(f),g=0;g<f;g++)d[g]=arguments[g];var h=j2(d,n.registered,void 0);return FQ(n,h),n.key+"-"+h.name},o=function(){for(var f=arguments.length,d=new Array(f),g=0;g<f;g++)d[g]=arguments[g];var h=j2(d,n.registered),y="animation-"+h.name;return c4(n,{name:h.name,styles:"@keyframes "+y+"{"+h.styles+"}"}),y},a=function(){for(var f=arguments.length,d=new Array(f),g=0;g<f;g++)d[g]=arguments[g];var h=j2(d,n.registered);c4(n,h)},l=function(){for(var f=arguments.length,d=new Array(f),g=0;g<f;g++)d[g]=arguments[g];return u4(n.registered,r,HQ(d))};return{css:r,cx:l,injectGlobal:a,keyframes:o,hydrate:function(f){f.forEach(function(d){n.inserted[d]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:K8.bind(null,n.registered),merge:u4.bind(null,n.registered,r)}},HQ=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var a=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))a=e(o);else{a="";for(var l in o)o[l]&&l&&(a&&(a+=" "),a+=l)}break}default:a=o}a&&(n&&(n+=" "),n+=a)}}return n};const UQ=(e,t=!1,n="")=>{const{variables:r={},...o}=e,a={light:{diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee",...r.light||{}},dark:{diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#2ea04326",addedColor:"white",removedBackground:"#f851491a",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#2ea04366",wordRemovedBackground:"#f8514966",addedGutterBackground:"#3fb9504d",removedGutterBackground:"#f851494d",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#262831",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#f0f6fc",addedGutterColor:"#f0f6fc",removedGutterColor:"#f0f6fc",codeFoldContentColor:"#9198a1",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#f0f6fc",diffViewerTitleBorderColor:"#353846",...r.dark||{}}},l=t?a.dark:a.light,{css:c,cx:f}=BQ({key:"react-diff",nonce:n}),d=c({width:"auto",overflow:"hidden",label:"content"}),g=c({label:"split-view"}),h=c({position:"sticky",top:0,zIndex:2,label:"sticky-header"}),y=c({background:l.diffViewerTitleBackground,color:l.diffViewerTitleColor,padding:"0.5em 1em",display:"flex",alignItems:"center",gap:"0.5em",fontFamily:"monospace",fontSize:12,fill:l.diffViewerTitleColor}),x=c({display:"flex",label:"column-headers"}),v=c({width:"100%",minWidth:"1000px",overflowX:"auto",tableLayout:"fixed",fontSize:12,background:l.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"1.6em",width:"fit-content"},label:"diff-container",borderCollapse:"collapse","@media (max-width: 768px)":{minWidth:"unset"}}),S=c({overflow:"hidden",width:"100%"}),E=c({color:l.diffViewerColor,whiteSpace:"pre-wrap",fontFamily:"monospace",lineBreak:"anywhere",textDecoration:"none",label:"content-text"}),k=c({userSelect:"none",label:"unselectable"}),T=c({label:"no-wrap",pre:{whiteSpace:"pre"},[`.${E}`]:{whiteSpace:"pre",lineBreak:"auto"}}),R=c({background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",margin:0,label:"all-expand-button",":hover":{fill:l.addedGutterColor},":focus":{outline:`1px ${l.addedGutterColor} solid`}}),L=c({background:l.diffViewerTitleBackground,padding:"0.5em",lineHeight:"1.4em",height:"2.4em",overflow:"hidden",width:"50%",borderBottom:`1px solid ${l.diffViewerTitleBorderColor}`,boxSizing:"border-box",fontSize:12,label:"title-block",":only-child":{width:"100%"},":last-child:not(:only-child)":{borderLeft:`1px solid ${l.diffViewerTitleBorderColor}`},[`.${E}`]:{color:l.diffViewerTitleColor}}),j=c({color:l.gutterColor,label:"line-number"}),N=c({background:l.removedBackground,color:l.removedColor,pre:{color:l.removedColor},[`.${j}`]:{color:l.removedGutterColor},label:"diff-removed"}),A=c({background:l.addedBackground,color:l.addedColor,pre:{color:l.addedColor},[`.${j}`]:{color:l.addedGutterColor},label:"diff-added"}),D=c({background:l.changedBackground,[`.${j}`]:{color:l.gutterColor},label:"diff-changed"}),U=c({display:"inline",textDecoration:"none",label:"word-diff"}),I=c({background:l.wordAddedBackground,label:"word-added"}),q=c({background:l.wordRemovedBackground,label:"word-removed"}),$=c({backgroundColor:l.codeFoldGutterBackground,label:"code-fold-gutter",minWidth:"50px",width:"50px",textAlign:"center",fill:l.codeFoldContentColor}),V=c({padding:""}),Y=c({background:l.codeFoldBackground,cursor:"pointer",display:"inline",margin:0,border:"none",fill:l.codeFoldContentColor,label:"code-fold-expand-button"}),H=c({color:l.codeFoldContentColor,fontFamily:"monospace",label:"code-fold-content"}),B=c({display:"block",width:"10px",height:"10px",backgroundColor:"#ddd",borderWidth:"1px",borderStyle:"solid",borderColor:l.diffViewerTitleBorderColor}),F=c({backgroundColor:l.wordAddedBackground}),G=c({backgroundColor:l.wordRemovedBackground}),ie=c({backgroundColor:l.codeFoldBackground,fontSize:12,alignItems:"center",userSelect:"none",fontWeight:700,cursor:"pointer",label:"code-fold","&:hover":{color:l.diffViewerColor,fill:l.diffViewerColor,"& *":{color:l.diffViewerColor,fill:l.diffViewerColor}},a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),M=c({backgroundColor:l.emptyLineBackground,label:"empty-line"}),P=c({width:28,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${A}`]:{pre:{color:l.addedColor}},[`&.${N}`]:{pre:{color:l.removedColor}}}),Q=c({background:l.highlightBackground,label:"highlighted-line",[`.${I}, .${q}`]:{backgroundColor:"initial"}}),_=c({label:"highlighted-gutter"}),ee=c({userSelect:"none",minWidth:50,width:"50px",padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"center",color:l.gutterColor,background:l.gutterBackground,"&:hover":{cursor:"pointer",background:l.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5,textAlign:"center",width:"100%"},[`&.${A}`]:{background:l.addedGutterBackground},[`&.${N}`]:{background:l.removedGutterBackground},[`&.${_}`]:{background:l.highlightGutterBackground,"&:hover":{background:l.highlightGutterBackground}}}),J=c({"&:hover":{background:l.gutterBackground,cursor:"initial"},label:"empty-gutter"}),re=c({verticalAlign:"baseline",label:"line",textDecoration:"none"}),pe=c({}),fe={diffContainer:v,diffRemoved:N,diffAdded:A,diffChanged:D,splitView:g,marker:P,highlightedGutter:_,highlightedLine:Q,gutter:ee,line:re,lineContent:S,wordDiff:U,wordAdded:I,summary:y,block:B,blockAddition:F,blockDeletion:G,wordRemoved:q,noSelect:k,noWrap:T,codeFoldGutter:$,codeFoldExpandButton:Y,codeFoldContentContainer:V,codeFold:ie,emptyGutter:J,emptyLine:M,lineNumber:j,contentText:E,content:d,column:pe,codeFoldContent:H,stickyHeader:h,columnHeaders:x,titleBlock:L,allExpandButton:R},Ce=Object.keys(o).reduce((Ee,Ie)=>({...Ee,[Ie]:c(o[Ie])}),{});return Object.keys(fe).reduce((Ee,Ie)=>({...Ee,[Ie]:Ce[Ie]?f(fe[Ie],Ce[Ie]):fe[Ie]}),{})};function qQ(){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[p.jsx("title",{children:"fold"}),p.jsx("path",{d:"M10.896 2H8.75V.75a.75.75 0 0 0-1.5 0V2H5.104a.25.25 0 0 0-.177.427l2.896 2.896a.25.25 0 0 0 .354 0l2.896-2.896A.25.25 0 0 0 10.896 2ZM8.75 15.25a.75.75 0 0 1-1.5 0V14H5.104a.25.25 0 0 1-.177-.427l2.896-2.896a.25.25 0 0 1 .354 0l2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25Zm-6.5-6.5a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z"})]})}function VQ(e,t,n){const r=[];let o=0;for(const h of t){const y=typeof h.value=="string"?h.value:"";y.length>0&&(r.push({start:o,end:o+y.length,type:h.type}),o+=y.length)}const a=[];let l=0;for(;l<e.length;)if(e[l]==="<"){const h=e.indexOf(">",l);if(h===-1){a.push({type:"text",content:e.slice(l)});break}a.push({type:"tag",content:e.slice(l,h+1)}),l=h+1}else{let h=e.indexOf("<",l);h===-1&&(h=e.length),a.push({type:"text",content:e.slice(l,h)}),l=h}function c(h){return h.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&nbsp;/g," ")}function f(h){return h===gn.ADDED?{open:`<ins class="${n.wordDiff} ${n.wordAdded}">`,close:"</ins>"}:h===gn.REMOVED?{open:`<del class="${n.wordDiff} ${n.wordRemoved}">`,close:"</del>"}:{open:`<span class="${n.wordDiff}">`,close:"</span>"}}let d=0,g="";for(const h of a)if(h.type==="tag")g+=h.content;else{const y=h.content,x=c(y);let v=0,S=0;for(;v<x.length;){const E=d+v,k=r.find(U=>E>=U.start&&E<U.end);if(!k){const U=y[S];g+=U,S++,v++;continue}const T=k.end-E,R=x.length-v,L=Math.min(T,R);let j=S,N=0;for(;N<L&&j<y.length;){if(y[j]==="&"){const U=y.indexOf(";",j);U!==-1&&U-j<10?j=U+1:j++}else j++;N++}const A=y.slice(S,j),D=f(k.type);D?g+=D.open+A+D.close:g+=A,S=j,v+=L}d+=x.length}return g}var Cr;(function(e){e.LEFT="L",e.RIGHT="R"})(Cr||(Cr={}));let $Q=class Po extends C.Component{styles;wordDiffCache=new Map;contentColumnRef=C.createRef();charMeasureRef=C.createRef();stickyHeaderRef=C.createRef();resizeObserver=null;static defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:nr.CHARS,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""};constructor(t){super(t),this.state={expandedBlocks:[],noSelect:void 0,scrollableContainerRef:C.createRef(),computedDiffResult:{},isLoading:!1,visibleStartRow:0,contentColumnWidth:null,charWidth:null,cumulativeOffsets:null}}getWordDiffValues=(t,n,r)=>{if(!t||!n)return{leftValue:t?.value,rightValue:n?.value};if(t.rawValue===void 0||n.rawValue===void 0)return{leftValue:t.value,rightValue:n.value};const o=`${r}-${t.rawValue}-${n.rawValue}`;let a=this.wordDiffCache.get(o);if(!a){const l=this.props.compareMethod===nr.JSON||this.props.compareMethod===nr.YAML?nr.CHARS:this.props.compareMethod,c=B8(t.rawValue,n.rawValue,l);a={left:c.left,right:c.right},this.wordDiffCache.set(o,a)}return{leftValue:a.left,rightValue:a.right}};resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1;onBlockExpand=t=>{const n=this.state.expandedBlocks.slice();n.push(t),this.setState({expandedBlocks:n},()=>this.recalculateOffsets())};getStickyHeaderHeight(){return this.stickyHeaderRef.current?.offsetHeight||0}measureCharWidth(){const t=this.charMeasureRef.current;return t&&t.getBoundingClientRect().width||7.2}measureContentColumnWidth(){const t=this.contentColumnRef.current;if(t&&t.clientWidth>0){const h=window.getComputedStyle(t),y=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight),x=t.clientWidth-y;if(x>0)return x}const n=this.state.scrollableContainerRef.current;if(!n||n.clientWidth<=0)return null;const r=n.clientWidth,o=this.props.hideLineNumbers?0:50,a=28,l=(this.props.splitView,2),c=this.props.splitView?2:1,f=this.props.splitView?2:1,d=l*o+c*a,g=r-d;return Math.max(100,g/f)}getTextLength(t){return t?typeof t=="string"?t.length:t.reduce((n,r)=>n+(typeof r.value=="string"?r.value.length:0),0):0}buildCumulativeOffsets(t,n,r,o,a,l,c,f){const d=[0],g=new Set;for(let h=0;h<t.length;h++){const y=t[h];if(a){const T=n[h];if(T!==void 0&&!o.includes(T)){const R=r[T].endLine===h;!g.has(T)&&R&&(g.add(T),d.push(d[d.length-1]+Po.ESTIMATED_ROW_HEIGHT));continue}}const x=y.left?.value?this.getTextLength(y.left.value):0,v=y.right?.value?this.getTextLength(y.right.value):0,S=f?Math.max(x,v):x||v,E=Math.floor(c/l),k=E>0?Math.max(1,Math.ceil(S/E)):1;d.push(d[d.length-1]+k*Po.ESTIMATED_ROW_HEIGHT)}return d}findLineAtOffset(t,n){let r=0,o=n.length-2;for(;r<o;){const a=Math.floor((r+o+1)/2);n[a]<=t?r=a:o=a-1}return r}recalculateOffsets=()=>{if(!this.props.infiniteLoading)return;const t=this.measureContentColumnWidth(),n=this.measureCharWidth();if(!t)return;const r=this.getMemoisedKey(),{lineInformation:o,lineBlocks:a,blocks:l}=this.state.computedDiffResult[r]??{};if(!o)return;const c=this.buildCumulativeOffsets(o,a,l,this.state.expandedBlocks,this.props.showDiffOnly,n,t,this.props.splitView);this.setState({cumulativeOffsets:c,contentColumnWidth:t,charWidth:n},()=>{this.onScroll()})};computeStyles=HG(UQ);onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{};shouldHighlightWordDiff=()=>{const{compareMethod:t}=this.props;return t===nr.CHARS||t===nr.WORDS||t===nr.WORDS_WITH_SPACE||t===nr.JSON||t===nr.YAML};renderWordDiff=(t,n)=>{const r=this.shouldHighlightWordDiff(),o=t.map(l=>typeof l.value=="string"?l.value:"").join("");if(o.length>500)return[p.jsx("span",{children:o},"long-line")];if(n){const l=n(o),c=l?.props?.dangerouslySetInnerHTML?.__html;if(typeof c=="string"){const f=VQ(c,t,{wordDiff:this.styles.wordDiff,wordAdded:r?this.styles.wordAdded:"",wordRemoved:r?this.styles.wordRemoved:""});return[C.cloneElement(l,{key:"highlighted-diff",dangerouslySetInnerHTML:{__html:f}})]}}return t.map((l,c)=>{let f;return typeof l.value=="string"?f=l.value:f=void 0,l.type===gn.ADDED?p.jsx("ins",{className:Hi(this.styles.wordDiff,{[this.styles.wordAdded]:r}),children:f},c):l.type===gn.REMOVED?p.jsx("del",{className:Hi(this.styles.wordDiff,{[this.styles.wordRemoved]:r}),children:f},c):p.jsx("span",{className:Hi(this.styles.wordDiff),children:f},c)})};renderLine=(t,n,r,o,a,l)=>{const c=`${r}-${t}`,f=`${l}-${a}`,d=this.props.highlightLines.includes(c)||this.props.highlightLines.includes(f),g=n===gn.ADDED,h=n===gn.REMOVED,y=n===gn.CHANGED;let x;const v=Array.isArray(o);v?x=this.renderWordDiff(o,this.props.renderContent):this.props.renderContent?x=this.props.renderContent(o):x=o;let S="div";return g&&!v?S="ins":h&&!v&&(S="del"),p.jsxs(p.Fragment,{children:[!this.props.hideLineNumbers&&p.jsx("td",{onClick:t&&this.onLineNumberClickProxy(c),className:Hi(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:h,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:d}),children:p.jsx("pre",{className:this.styles.lineNumber,children:t})}),!this.props.splitView&&!this.props.hideLineNumbers&&p.jsx("td",{onClick:a&&this.onLineNumberClickProxy(f),className:Hi(this.styles.gutter,{[this.styles.emptyGutter]:!a,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:h,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:d}),children:p.jsx("pre",{className:this.styles.lineNumber,children:a})}),this.props.renderGutter?this.props.renderGutter({lineNumber:t,type:n,prefix:r,value:o,additionalLineNumber:a,additionalPrefix:l,styles:this.styles}):null,p.jsx("td",{className:Hi(this.styles.marker,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:h,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:d}),children:p.jsxs("pre",{children:[g&&"+",h&&"-"]})}),p.jsx("td",{ref:r===Cr.LEFT&&!this.state.cumulativeOffsets?this.contentColumnRef:void 0,className:Hi(this.styles.content,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:h,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:d,left:r===Cr.LEFT,right:r===Cr.RIGHT}),onMouseDown:()=>{const E=document.getElementsByClassName(r===Cr.LEFT?"right":"left");for(let k=0;k<E.length;k++)E.item(k).classList.add(this.styles.noSelect)},title:g&&!v?"Added line":h&&!v?"Removed line":void 0,children:p.jsx(S,{className:this.styles.contentText,children:x})})]})};renderSplitView=({left:t,right:n},r)=>{const{leftValue:o,rightValue:a}=this.getWordDiffValues(t,n,r);return p.jsxs("tr",{className:this.styles.line,children:[this.renderLine(t.lineNumber,t.type,Cr.LEFT,o),this.renderLine(n.lineNumber,n.type,Cr.RIGHT,a)]},r)};renderInlineView=({left:t,right:n},r)=>{const{leftValue:o,rightValue:a}=this.getWordDiffValues(t,n,r);let l;return t.type===gn.REMOVED&&n.type===gn.ADDED?p.jsxs(C.Fragment,{children:[p.jsx("tr",{className:this.styles.line,children:this.renderLine(t.lineNumber,t.type,Cr.LEFT,o,null)}),p.jsx("tr",{className:this.styles.line,children:this.renderLine(null,n.type,Cr.RIGHT,a,n.lineNumber,Cr.RIGHT)})]},r):(t.type===gn.REMOVED&&(l=this.renderLine(t.lineNumber,t.type,Cr.LEFT,o,null)),t.type===gn.DEFAULT&&(l=this.renderLine(t.lineNumber,t.type,Cr.LEFT,o,n.lineNumber,Cr.RIGHT)),n.type===gn.ADDED&&(l=this.renderLine(null,n.type,Cr.RIGHT,a,n.lineNumber)),p.jsx("tr",{className:this.styles.line,children:l},r))};onBlockClickProxy=t=>()=>this.onBlockExpand(t);renderSkippedLineIndicator=(t,n,r,o)=>{const{hideLineNumbers:a,splitView:l}=this.props,c=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,o):p.jsxs("span",{className:this.styles.codeFoldContent,children:["@@ -",r-t,",",t," +",o-t,",",t," @@"]}),f=p.jsx("td",{className:this.styles.codeFoldContentContainer,children:p.jsx("button",{type:"button",className:this.styles.codeFoldExpandButton,onClick:this.onBlockClickProxy(n),tabIndex:0,children:c})}),d=!l&&!a,g=p.jsx("td",{className:this.styles.codeFoldGutter,children:p.jsx(n4,{})});return p.jsxs("tr",{className:this.styles.codeFold,onClick:this.onBlockClickProxy(n),role:"button",tabIndex:0,children:[!a&&g,this.props.renderGutter?p.jsx("td",{className:this.styles.codeFoldGutter}):null,p.jsx("td",{className:Hi({[this.styles.codeFoldGutter]:d})}),d?p.jsxs(C.Fragment,{children:[p.jsx("td",{}),f]}):p.jsxs(C.Fragment,{children:[f,this.props.renderGutter?p.jsx("td",{}):null,p.jsx("td",{}),p.jsx("td",{}),a?null:p.jsx("td",{})]})]},`${r}-${o}`)};getMemoisedKey=()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:o,linesOffset:a,alwaysShowLines:l,extraLinesSurroundingDiff:c}=this.props;return JSON.stringify({oldValue:t,newValue:n,disableWordDiff:r,compareMethod:o,linesOffset:a,alwaysShowLines:l,extraLinesSurroundingDiff:c})};memoisedCompute=async()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:o,linesOffset:a}=this.props,l=this.getMemoisedKey();if(this.state.computedDiffResult[l]){this.setState(S=>({...S,isLoading:!1}));return}const c=this.props.infiniteLoading?.containerHeight,f=c?typeof c=="number"?c:parseInt(c,10)||0:0,d=!r&&!!this.props.infiniteLoading&&f>0&&f<2e3,{lineInformation:g,diffLines:h}=await nQ(t,n,r,o,a,this.props.alwaysShowLines,d),y=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:x,blocks:v}=UG(g,h,y);this.state.computedDiffResult[l]={lineInformation:g,lineBlocks:x,blocks:v},this.setState(S=>({...S,computedDiffResult:this.state.computedDiffResult,isLoading:!1}),()=>{this.props.infiniteLoading&&requestAnimationFrame(()=>this.recalculateOffsets())})};static ESTIMATED_ROW_HEIGHT=19;onScroll=()=>{const t=this.state.scrollableContainerRef.current;if(!t||!this.props.infiniteLoading)return;const n=this.getStickyHeaderHeight(),r=Math.max(0,t.scrollTop-n),{cumulativeOffsets:o}=this.state,a=o?this.findLineAtOffset(r,o):Math.floor(r/Po.ESTIMATED_ROW_HEIGHT);a!==this.state.visibleStartRow&&this.setState({visibleStartRow:a})};renderDiff=()=>{const{splitView:t,infiniteLoading:n,showDiffOnly:r}=this.props,{computedDiffResult:o,expandedBlocks:a,visibleStartRow:l,scrollableContainerRef:c,cumulativeOffsets:f}=this.state,d=this.getMemoisedKey(),{lineInformation:g=[],lineBlocks:h=[],blocks:y=[]}=o[d]??{};let x=0,v=1/0;const S=5;if(n&&c.current){const I=c.current,q=this.getStickyHeaderHeight(),$=Math.max(0,I.scrollTop-q);if(f){const V=f[f.length-1]||0,Y=f.length-2;x=Math.max(0,this.findLineAtOffset($,f)-S),v=this.findLineAtOffset($+I.clientHeight,f)+S;const H=Math.ceil(I.clientHeight/Po.ESTIMATED_ROW_HEIGHT);v=Math.max(v,x+H+S),$+I.clientHeight>=V-S*Po.ESTIMATED_ROW_HEIGHT&&(v=Y+S)}else{const V=Math.ceil(I.clientHeight/Po.ESTIMATED_ROW_HEIGHT);x=Math.max(0,l-S),v=l+V+S}}const E=new Map,k=new Set;let T=0;for(let I=0;I<g.length;I++){const q=h[I];if(r&&q!==void 0)if(a.includes(q))E.set(I,T),T++;else{const $=y[q].endLine===I;!k.has(q)&&$&&(k.add(q),E.set(I,T),T++)}else E.set(I,T),T++}const R=T,L=[];let j=0,N=!1,A=-1;k.clear();for(let I=0;I<g.length;I++){const q=g[I],$=E.get(I);if($!==void 0&&!($<x)){if($>v)break;if(N||(j=f?f[$]||0:$*Po.ESTIMATED_ROW_HEIGHT,N=!0),A=$,r){const V=h[I];if(V!==void 0){const Y=y[V].endLine===I;if(!a.includes(V)&&Y){L.push(p.jsx(C.Fragment,{children:this.renderSkippedLineIndicator(y[V].lines,V,q.left.lineNumber,q.right.lineNumber)},I));continue}if(!a.includes(V))continue}}L.push(t?this.renderSplitView(q,I):this.renderInlineView(q,I))}}const D=f?f[f.length-1]||0:R*Po.ESTIMATED_ROW_HEIGHT,U=f&&A>=0?D-(f[A+1]||D):0;return{diffNodes:L,blocks:y,lineInformation:g,totalRenderedRows:R,topPadding:j,bottomPadding:U,totalContentHeight:D,renderedCount:L.length,debug:{visibleRowStart:x,visibleRowEnd:v,totalRows:R,offsetsLength:f?.length??0,renderedCount:L.length,scrollTop:c.current?.scrollTop??0,headerHeight:this.getStickyHeaderHeight(),contentScrollTop:c.current?Math.max(0,c.current.scrollTop-this.getStickyHeaderHeight()):0,clientHeight:c.current?.clientHeight??0}}};componentDidUpdate(t){if(t.oldValue!==this.props.oldValue||t.newValue!==this.props.newValue||t.compareMethod!==this.props.compareMethod||t.disableWordDiff!==this.props.disableWordDiff||t.linesOffset!==this.props.linesOffset){this.wordDiffCache.clear();const n=this.state.scrollableContainerRef.current;n&&(n.scrollTop=0),this.setState(r=>({...r,isLoading:!0,visibleStartRow:0,cumulativeOffsets:null})),this.memoisedCompute()}}componentDidMount(){if(this.setState(t=>({...t,isLoading:!0})),this.memoisedCompute(),typeof ResizeObserver<"u"&&this.props.infiniteLoading){this.resizeObserver=new ResizeObserver(()=>{requestAnimationFrame(()=>this.recalculateOffsets())});const t=this.state.scrollableContainerRef.current;t&&this.resizeObserver.observe(t)}}componentWillUnmount(){this.resizeObserver?.disconnect()}render=()=>{const{oldValue:t,newValue:n,useDarkTheme:r,leftTitle:o,rightTitle:a,splitView:l,compareMethod:c,hideLineNumbers:f,nonce:d}=this.props;if(typeof c=="string"&&c!==nr.JSON&&(typeof t!="string"||typeof n!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r,d);const g=this.renderDiff();this.props.renderGutter;let h=0,y=0;for(const j of g.lineInformation)j.left.type===gn.ADDED&&y++,j.right.type===gn.ADDED&&y++,j.left.type===gn.REMOVED&&h++,j.right.type===gn.REMOVED&&h++;const x=h+y,v=Math.round(y/x*100),S=[];for(let j=0;j<5;j++)v>j*20?S.push(p.jsx("span",{className:Hi(this.styles.block,this.styles.blockAddition)},j)):S.push(p.jsx("span",{className:Hi(this.styles.block,this.styles.blockDeletion)},j));const E=this.state.expandedBlocks.length===g.blocks.length,k=this.props.loadingElement,T=this.props.infiniteLoading?{overflowY:"scroll",overflowX:"hidden",height:this.props.infiniteLoading.containerHeight}:{},R=!!this.props.infiniteLoading&&!this.state.cumulativeOffsets,L=p.jsxs("table",{className:Hi(this.styles.diffContainer,{[this.styles.splitView]:l,[this.styles.noWrap]:R}),onMouseUp:()=>{const j=document.getElementsByClassName("right");for(let A=0;A<j.length;A++)j.item(A).classList.remove(this.styles.noSelect);const N=document.getElementsByClassName("left");for(let A=0;A<N.length;A++)N.item(A).classList.remove(this.styles.noSelect)},children:[p.jsxs("colgroup",{children:[!this.props.hideLineNumbers&&p.jsx("col",{width:"50px"}),!l&&!this.props.hideLineNumbers&&p.jsx("col",{width:"50px"}),this.props.renderGutter&&p.jsx("col",{width:"50px"}),p.jsx("col",{width:"28px"}),p.jsx("col",{width:"auto"}),l&&p.jsxs(p.Fragment,{children:[!this.props.hideLineNumbers&&p.jsx("col",{width:"50px"}),this.props.renderGutter&&p.jsx("col",{width:"50px"}),p.jsx("col",{width:"28px"}),p.jsx("col",{width:"auto"})]})]}),p.jsx("tbody",{children:g.diffNodes})]});return p.jsxs("div",{style:{...T,position:"relative"},onScroll:this.onScroll,ref:this.state.scrollableContainerRef,children:[(!this.props.hideSummary||o||a)&&p.jsxs("div",{ref:this.stickyHeaderRef,className:this.styles.stickyHeader,children:[!this.props.hideSummary&&p.jsxs("div",{className:this.styles.summary,role:"banner",children:[p.jsx("button",{type:"button",className:this.styles.allExpandButton,onClick:()=>{this.setState({expandedBlocks:E?[]:g.blocks.map(j=>j.index)},()=>this.recalculateOffsets())},children:E?p.jsx(qQ,{}):p.jsx(n4,{})})," ",x,p.jsx("div",{style:{display:"flex",gap:"1px"},children:S}),this.props.summary?p.jsx("span",{children:this.props.summary}):null]}),(o||a)&&p.jsxs("div",{className:this.styles.columnHeaders,children:[p.jsx("div",{className:this.styles.titleBlock,children:o?p.jsx("pre",{className:this.styles.contentText,children:o}):null}),l&&p.jsx("div",{className:this.styles.titleBlock,children:a?p.jsx("pre",{className:this.styles.contentText,children:a}):null})]})]}),this.state.isLoading&&k&&p.jsx(k,{}),this.props.infiniteLoading?p.jsx("div",{style:{height:g.totalContentHeight,position:"relative"},children:p.jsx("div",{style:{position:"absolute",top:g.topPadding,left:0,right:0},children:L})}):L,p.jsx("span",{ref:this.charMeasureRef,style:{position:"absolute",top:0,left:"-9999px",visibility:"hidden",whiteSpace:"pre",fontFamily:"monospace",fontSize:12},"aria-hidden":"true",children:"M"}),this.props.infiniteLoading&&this.props.showDebugInfo&&p.jsxs("div",{style:{position:"fixed",top:10,right:10,background:"rgba(0,0,0,0.85)",color:"#0f0",padding:"10px",fontFamily:"monospace",fontSize:"11px",zIndex:9999,borderRadius:"4px",maxWidth:"300px",lineHeight:1.4},children:[p.jsx("div",{style:{fontWeight:"bold",marginBottom:"5px",color:"#fff"},children:"Debug Info"}),p.jsxs("div",{children:["scrollTop: ",g.debug.scrollTop]}),p.jsxs("div",{children:["headerHeight: ",g.debug.headerHeight]}),p.jsxs("div",{children:["contentScrollTop: ",g.debug.contentScrollTop]}),p.jsxs("div",{children:["clientHeight: ",g.debug.clientHeight]}),p.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[p.jsxs("div",{children:["visibleRowStart: ",g.debug.visibleRowStart]}),p.jsxs("div",{children:["visibleRowEnd: ",g.debug.visibleRowEnd]})]}),p.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[p.jsxs("div",{children:["totalRows: ",g.debug.totalRows]}),p.jsxs("div",{children:["offsetsLength: ",g.debug.offsetsLength]}),p.jsxs("div",{children:["renderedCount: ",g.debug.renderedCount]})]}),p.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[p.jsxs("div",{children:["topPadding: ",g.topPadding.toFixed(0)]}),p.jsxs("div",{children:["bottomPadding: ",g.bottomPadding.toFixed(0)]}),p.jsxs("div",{children:["totalContentHeight: ",g.totalContentHeight.toFixed(0)]})]}),p.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#ff0"},children:[p.jsxs("div",{children:["cumulativeOffsets: ",this.state.cumulativeOffsets?"SET":"NULL"]}),p.jsxs("div",{children:["columnWidth: ",this.state.contentColumnWidth?.toFixed(0)??"N/A","px"]}),p.jsxs("div",{children:["charWidth: ",this.state.charWidth?.toFixed(2)??"N/A","px"]}),p.jsxs("div",{children:["charsPerRow: ",this.state.contentColumnWidth&&this.state.charWidth?Math.floor(this.state.contentColumnWidth/this.state.charWidth):"N/A"]})]}),this.state.cumulativeOffsets&&p.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#0ff",fontSize:"10px"},children:[p.jsxs("div",{children:["offsets[",g.debug.visibleRowEnd,"]: ",this.state.cumulativeOffsets[g.debug.visibleRowEnd]?.toFixed(0)??"N/A"]}),p.jsxs("div",{children:["offsets[",g.debug.totalRows-1,"]: ",this.state.cumulativeOffsets[g.debug.totalRows-1]?.toFixed(0)??"N/A"]}),p.jsxs("div",{children:["offsets[",g.debug.totalRows,"]: ",this.state.cumulativeOffsets[g.debug.totalRows]?.toFixed(0)??"N/A"]}),p.jsxs("div",{style:{marginTop:"3px"},children:["viewportEnd: ",(g.debug.contentScrollTop+g.debug.clientHeight).toFixed(0)]}),p.jsxs("div",{style:{marginTop:"3px",color:"#f0f"},children:["scrollHeight: ",this.state.scrollableContainerRef.current?.scrollHeight??"N/A"]}),p.jsxs("div",{children:["maxScrollTop: ",(this.state.scrollableContainerRef.current?.scrollHeight??0)-g.debug.clientHeight]})]})]})]})}};function GQ(){return p.jsx("div",{className:"bg-card absolute inset-0 z-20 flex items-center justify-center",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})})}const YQ={codeFoldGutter:{cursor:"pointer"},contentText:{fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px",lineHeight:"1.6"},diffContainer:{"& pre":{fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px"},gutter:{"& pre":{color:"var(--muted-foreground)",opacity:.7},minWidth:"2.5rem",padding:"0 10px",userSelect:"none"},line:{"&:hover":{background:"color-mix(in oklch, var(--muted) 40%, transparent)"}},lineNumber:{color:"var(--muted-foreground)",opacity:.7},marker:{paddingLeft:"8px",paddingRight:"4px"},titleBlock:{borderBottom:"1px solid var(--border)",fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px",padding:"10px 12px"},variables:{dark:{addedBackground:"color-mix(in oklch, var(--primary) 18%, transparent)",addedColor:"var(--foreground)",addedGutterBackground:"color-mix(in oklch, var(--primary) 26%, transparent)",addedGutterColor:"var(--muted-foreground)",codeFoldBackground:"var(--muted)",codeFoldContentColor:"var(--muted-foreground)",codeFoldGutterBackground:"var(--muted)",diffViewerBackground:"var(--card)",diffViewerColor:"var(--foreground)",diffViewerTitleBackground:"var(--muted)",diffViewerTitleBorderColor:"var(--border)",diffViewerTitleColor:"var(--foreground)",emptyLineBackground:"var(--card)",gutterBackground:"var(--card)",gutterBackgroundDark:"var(--card)",gutterColor:"var(--muted-foreground)",highlightBackground:"color-mix(in oklch, var(--accent) 30%, transparent)",highlightGutterBackground:"color-mix(in oklch, var(--accent) 40%, transparent)",removedBackground:"color-mix(in oklch, var(--destructive) 16%, transparent)",removedColor:"var(--foreground)",removedGutterBackground:"color-mix(in oklch, var(--destructive) 24%, transparent)",removedGutterColor:"var(--muted-foreground)",wordAddedBackground:"color-mix(in oklch, var(--primary) 40%, transparent)",wordRemovedBackground:"color-mix(in oklch, var(--destructive) 36%, transparent)"}}};function WQ({filename:e,hideSummary:t=!1,newContent:n,oldContent:r,showDiffOnly:o=!1,showLoadingOverlay:a=!0,viewMode:l="split"}){return p.jsx($Q,{compareMethod:nr.WORDS,hideSummary:t,loadingElement:a?GQ:void 0,newValue:n,oldValue:r,showDiffOnly:o,splitView:l==="split",styles:YQ,summary:e,useDarkTheme:!0})}function Q8(e){return p.jsx(WQ,{...e})}function KQ({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"staged":"unstaged",{data:o,error:a,isLoading:l}=IG({path:e.path,side:r});return l?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})}):a?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-muted-foreground text-sm",children:Cn(a,"Failed to load diff")})}):o?p.jsxs("div",{className:"bg-card flex h-full flex-col overflow-auto rounded-md",children:[p.jsx(J9,{file:e,onOpenFile:()=>t(e),onStageToggle:()=>n(e)}),p.jsx("div",{className:"flex-1 [&>div]:min-h-full",children:p.jsx(Q8,{filename:e.path,hideSummary:!0,newContent:o.newContent,oldContent:o.oldContent,viewMode:"split"})})]}):p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-muted-foreground text-sm",children:"No diff available"})})}const QQ=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.DISCARD,e):Promise.reject(new Error("Not connected"))},XQ=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:hi().queryKey}),n?.(...o)},...r,mutationFn:QQ})};function ZQ({files:e,onOpenChange:t,open:n}){const r=XQ(),o=async()=>{try{await r.mutateAsync({filePaths:e.map(l=>l.path)}),ut.success(e.length===1?`Discarded changes in ${e[0].path}`:`Discarded changes in ${e.length} files`),t(!1)}catch(l){ut.error(Cn(l,"Failed to discard changes"))}},a=e.length===1;return p.jsx(p0,{onOpenChange:t,open:n,children:p.jsxs(m0,{children:[p.jsxs(g0,{children:[p.jsx(x0,{children:a?"Discard changes?":`Discard changes in ${e.length} files?`}),p.jsx(b0,{children:a?p.jsxs(p.Fragment,{children:["Unstaged changes in"," ",p.jsx("code",{className:"bg-muted rounded px-1.5 py-0.5 text-sm",children:e[0].path})," will be lost and cannot be restored."]}):"Unstaged changes in the selected files will be lost and cannot be restored."})]}),p.jsxs(y0,{children:[p.jsx(v0,{children:"Cancel"}),p.jsx(De,{disabled:r.isPending,onClick:o,variant:"destructive",children:r.isPending?"Discarding…":"Discard changes"})]})]})})}const JQ={added:{label:"Added",letter:"A",textClass:"text-primary-foreground"},deleted:{label:"Deleted",letter:"D",textClass:"text-destructive"},modified:{label:"Modified",letter:"M",textClass:"text-amber-500"},unmerged:{label:"Conflict",letter:"!",textClass:"text-amber-500"},untracked:{label:"Untracked",letter:"?",textClass:"text-primary-foreground"}},eX={both_added:"Both added",both_modified:"Both modified",deleted_modified:"Deleted / modified"};function tX({disabled:e,file:t,isSelected:n,onAction:r,onDiscard:o,onSelect:a}){const l=JQ[t.status],c=t.path.split("/").pop()??t.path,f=t.path.slice(0,t.path.length-c.length).replace(/\/$/,""),d=h=>{h.stopPropagation(),r(t)},g=h=>{h.stopPropagation(),o?.(t)};return p.jsxs("div",{className:we("group flex cursor-pointer items-center gap-2 rounded px-2 py-1 transition-colors h-8",n?"bg-muted":"hover:bg-muted/50"),onClick:()=>a?.(t),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),a?.(t))},role:"button",tabIndex:0,children:[p.jsx(c0,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),p.jsxs(_s,{disableHoverablePopup:!0,children:[p.jsxs(Ds,{render:p.jsx("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5"}),children:[p.jsx("span",{className:"text-foreground truncate text-sm",children:c}),f&&p.jsx("span",{className:"text-muted-foreground truncate text-xs group-hover:hidden",children:f})]}),p.jsx(Is,{className:"pointer-events-none max-w-lg break-all",side:"bottom",children:t.path})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsxs("div",{className:"hidden items-center gap-1 group-hover:flex group-focus-within:flex",children:[o&&p.jsx(De,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:g,size:"icon-xs",title:"Discard changes",variant:"ghost",children:p.jsx(g9,{className:"size-3"})}),p.jsx(De,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:d,size:"icon-xs",title:t.isStaged?"Unstage":"Stage",variant:"ghost",children:t.isStaged?p.jsx(Mx,{className:"size-3"}):p.jsx(Xa,{className:"size-3"})})]}),p.jsx("span",{className:we("w-4 text-center font-mono text-xs font-semibold",l.textClass),title:t.conflictType?`Conflict: ${eX[t.conflictType]}`:l.label,children:l.letter})]})]})}function M2(e){e.stopPropagation()}function L2({disabled:e,files:t,isFileSelected:n,label:r,onDiscardFile:o,onDiscardGroup:a,onFileAction:l,onFileSelect:c,onGroupAction:f,onOpenAll:d,openAllLabel:g,variant:h}){const[y,x]=C.useState(!0);if(t.length===0)return null;const v=h==="stage"?Xa:Mx,S=y?Bf:h9;return p.jsxs("section",{className:"flex flex-col",children:[p.jsxs("div",{"aria-expanded":y,className:"h-8 group hover:bg-muted/50 flex cursor-pointer items-center justify-between rounded px-1 py-1.5 transition-colors",onClick:()=>x(E=>!E),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),x(k=>!k))},role:"button",tabIndex:0,children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(S,{className:"text-muted-foreground size-3.5",strokeWidth:2.5}),p.jsx("h3",{className:"text-muted-foreground text-sm font-bold",children:r}),p.jsx("span",{className:"text-muted-foreground bg-muted ml-1 rounded px-1.5 py-0.5 text-xs font-medium",children:t.length})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[d&&p.jsx(De,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",onClick:E=>{M2(E),d()},size:"icon-xs",title:g??"Open all",variant:"ghost",children:p.jsx(lU,{className:"size-3"})}),a&&p.jsx(De,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",disabled:e,onClick:E=>{M2(E),a()},size:"icon-xs",title:"Discard all changes",variant:"ghost",children:p.jsx(g9,{className:"size-3"})}),f&&p.jsx(De,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",disabled:e,onClick:E=>{M2(E),f()},size:"icon-xs",title:h==="stage"?"Stage all":"Unstage all",variant:"ghost",children:p.jsx(v,{className:"size-3"})})]})]}),y&&p.jsx(ux,{delay:500,children:p.jsx("div",{className:"flex flex-col",children:t.map(E=>p.jsx(tX,{disabled:e,file:E,isSelected:n?.(E),onAction:l,onDiscard:o,onSelect:c},Zh(E)))})})]})}const nX=e=>{const{apiClient:t}=Be.getState();return t?t.request(rr.DIFFS,e):Promise.reject(new Error("Not connected"))},rX=e=>({placeholderData:kP,queryFn:()=>nX(e),queryKey:["vc","diffs",e.side,...e.paths],staleTime:0}),iX=({enabled:e=!0,paths:t,queryConfig:n,side:r})=>br({...rX({paths:t,side:r}),enabled:e&&t.length>0,...n}),oX=300;function f4({emptyMessage:e,files:t,onOpenFile:n,onStageToggle:r,side:o,title:a}){const l=C.useMemo(()=>t.map(v=>v.path),[t]),{data:c,error:f,isPending:d}=iX({paths:l,side:o}),g=C.useRef(!1),[h,y]=C.useState(!0);if(C.useEffect(()=>{if(g.current||!c)return;g.current=!0;const v=setTimeout(()=>y(!1),oX);return()=>clearTimeout(v)},[c]),t.length===0)return p.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:p.jsx("p",{className:"text-secondary-foreground text-sm",children:e})});if(f)return p.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:p.jsx("p",{className:"text-secondary-foreground text-sm",children:Cn(f,"Failed to load diffs")})});const x=d&&!c||h;return p.jsxs("div",{className:"bg-card relative flex h-full flex-col overflow-auto rounded-md",children:[c&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"border-border bg-muted flex items-center gap-2 border-b px-4 py-2 text-sm font-semibold",children:[p.jsx("span",{className:"text-foreground",children:a}),p.jsxs("span",{className:"text-muted-foreground",children:[t.length," file",t.length===1?"":"s"]})]}),p.jsx("div",{className:"flex flex-col gap-4",children:c.diffs.map(v=>{const S=t.find(E=>E.path===v.path);return S?p.jsxs("div",{className:"flex flex-col",children:[p.jsx(J9,{file:S,onOpenFile:()=>n(S),onStageToggle:()=>r(S)}),p.jsx(Q8,{filename:v.path,hideSummary:!0,newContent:v.newContent,oldContent:v.oldContent,showDiffOnly:!0,showLoadingOverlay:!1,viewMode:"split"})]},`${o}:${v.path}`):null})})]}),x&&p.jsx("div",{className:"bg-card absolute inset-0 z-30 flex items-center justify-center",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})})]})}function aX({isCommitting:e,onConfirm:t,onOpenChange:n,open:r}){return p.jsx(p0,{onOpenChange:n,open:r,children:p.jsxs(m0,{children:[p.jsxs(g0,{children:[p.jsx(x0,{children:"There are no staged changes to commit"}),p.jsx(b0,{children:"Would you like to stage all your changes and commit them directly?"})]}),p.jsxs(y0,{children:[p.jsx(v0,{children:"Cancel"}),p.jsx(De,{disabled:e,onClick:t,children:e?"Committing…":"Stage all & commit"})]})]})})}async function Ru(e,t){try{await e}catch(n){ut.error(Cn(n,t))}}function sX(){const e=qa(),t=ji(ye=>ye.isAuthorized),n=Be(ye=>ye.selectedProject),{data:r,isFetching:o,isLoading:a,refetch:l}=Bx(),[c,f]=C.useState(),[d,g]=C.useState("single"),[h,y]=C.useState(),[x,v]=C.useState(""),[S,E]=C.useState(!1),k=vG(),T=OG(),R=SG(),L=RG(),j=X9(),N=EG(),A=TG(),{staged:D,unmerged:U,unstaged:I}=C.useMemo(()=>N9(r),[r]),q=C.useMemo(()=>c?[...U,...D,...I].find(ye=>Zh(ye)===c):void 0,[c,D,U,I]),$=k.isPending||T.isPending||R.isPending||L.isPending||j.isPending||N.isPending||A.isPending;if(a)return p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})});if(!r?.initialized)return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4",children:[p.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p.jsx("h2",{className:"text-foreground text-lg font-semibold",children:"Version control not initialized"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"Initialize to start tracking changes in this project."})]}),p.jsx(Z9,{})]});const V=ye=>Ru(k.mutateAsync({filePaths:[ye.path]}),"Failed to stage file"),Y=ye=>Ru(T.mutateAsync({filePaths:[ye.path]}),"Failed to unstage file"),H=()=>{const ye=I.map(We=>We.path);ye.length!==0&&Ru(k.mutateAsync({filePaths:ye}),"Failed to stage all")},B=ye=>Ru(k.mutateAsync({filePaths:ye}),"Failed to stage"),F=()=>B(U.map(ye=>ye.path)),G=async()=>{try{await N.mutateAsync(),ut.success("Merge aborted")}catch(ye){ut.error(Cn(ye,"Failed to abort merge"))}},ie=()=>Ru(T.mutateAsync({}),"Failed to unstage all"),M=async ye=>{try{return await R.mutateAsync({message:ye}),ut.success("Committed"),!0}catch(We){return ut.error(Cn(We,"Failed to commit",{projectPath:n})),!1}},P=async ye=>{try{return await A.mutateAsync({message:ye}),ut.success("Merge committed"),!0}catch(We){return ut.error(Cn(We,"Failed to commit merge",{projectPath:n})),!1}},Q=async()=>{const ye=x.trim();if(!ye)return;if(r.mergeInProgress){await P(ye)&&v("");return}if(D.length===0&&I.length>0){E(!0);return}await M(ye)&&v("")},_=async()=>{const ye=x.trim();if(ye)try{await k.mutateAsync({}),await M(ye)&&(v(""),E(!1))}catch(We){ut.error(Cn(We,"Failed to stage & commit",{projectPath:n}))}},ee=async()=>{try{const ye=await L.mutateAsync({setUpstream:!r.trackingBranch});ut.success(ye.alreadyUpToDate?"Already up to date":`Pushed ${ye.branch}`)}catch(ye){ut.error(Cn(ye,"Failed to push"))}},J=async()=>{try{const ye=await j.mutateAsync({});ye.conflicts&&ye.conflicts.length>0?ut.error(`Pull had conflicts in ${ye.conflicts.length} file(s)`):ut.success(ye.alreadyUpToDate?"Already up to date":`Pulled ${ye.branch}`)}catch(ye){ut.error(Cn(ye,"Failed to pull"))}},re=ye=>{f(Zh(ye)),g("single")},pe=ye=>Zh(ye)===c&&d==="single",fe=()=>g("multi-staged"),Ce=()=>g("multi-unstaged"),Ee=ye=>{e(`/contexts?path=${encodeURIComponent(ye.path)}`)},Ie=ye=>ye.isStaged?Y(ye):V(ye),Ye=ye=>y([ye]),je=()=>{I.length>0&&y(I)},_e=D.length+I.length+U.length>0;return p.jsxs("div",{className:"flex h-full w-full",children:[p.jsxs("aside",{className:"border-border flex h-full w-80 shrink-0 flex-col gap-2",children:[p.jsx(MG,{ahead:r.ahead,behind:r.behind,branch:r.branch,hasTracking:!!r.trackingBranch,isAborting:N.isPending,isAuthenticated:t,isPulling:j.isPending,isPushing:L.isPending,mergeInProgress:r.mergeInProgress,onAbortMerge:G,onPull:J,onPush:ee}),p.jsx(LG,{canCommit:D.length>0||I.length>0,isCommitting:R.isPending,message:x,onCommit:Q,onMessageChange:v}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",children:[p.jsx(L2,{disabled:$,files:U,isFileSelected:pe,label:"Merge Changes",onFileAction:V,onFileSelect:re,onGroupAction:F,variant:"stage"}),p.jsx(L2,{disabled:$,files:D,isFileSelected:pe,label:"Staged Changes",onFileAction:Y,onFileSelect:re,onGroupAction:ie,onOpenAll:fe,openAllLabel:"Open all staged changes",variant:"unstage"}),p.jsx(L2,{disabled:$,files:I,isFileSelected:pe,label:"Changes",onDiscardFile:Ye,onDiscardGroup:je,onFileAction:V,onFileSelect:re,onGroupAction:H,onOpenAll:Ce,openAllLabel:"Open all changes",variant:"stage"})]})]}),p.jsxs("main",{className:"flex h-full flex-1 flex-col overflow-hidden pl-4",children:[d==="multi-staged"&&p.jsx(f4,{emptyMessage:"No staged changes",files:D,onOpenFile:Ee,onStageToggle:Ie,side:"staged",title:"Staged Changes"}),d==="multi-unstaged"&&p.jsx(f4,{emptyMessage:"No changes",files:I,onOpenFile:Ee,onStageToggle:Ie,side:"unstaged",title:"Changes"}),d==="single"&&(q?p.jsx(KQ,{file:q,onOpenFile:Ee,onStageToggle:Ie}):_e?p.jsxs("div",{className:"bg-card text-secondary-foreground flex h-full flex-col items-center justify-center gap-3 rounded-md text-sm",children:[p.jsx(c0,{className:"size-8",strokeWidth:1.25}),p.jsx("p",{children:"Select a file to view changes"})]}):p.jsxs("div",{className:"flex h-full flex-col items-center justify-center rounded-md bg-card",children:[p.jsx("img",{alt:"",className:"size-30 mb-6",src:xG}),p.jsxs("div",{className:"flex flex-col items-center gap-1 text-center mb-5",children:[p.jsx("p",{className:"text-foreground text-base font-medium",children:"No changes detected"}),p.jsx("p",{className:"text-muted-foreground max-w-xs text-xs",children:"Your workspace is up to date. Any modifications to your files will appear here."})]}),p.jsx(De,{className:"w-37",disabled:o,onClick:()=>l(),variant:"secondary",children:"Refresh"})]}))]}),p.jsx(ZQ,{files:h??[],onOpenChange:ye=>{ye||y(void 0)},open:h!==void 0&&h.length>0}),p.jsx(aX,{isCommitting:k.isPending||R.isPending,onConfirm:_,onOpenChange:E,open:S})]})}function lX(){return p.jsx("div",{className:"h-full w-full",children:p.jsx(sX,{})})}const cX=["rules","hook","mcp","skill"];new Set(cX);const uX=new Set(["hook","mcp","skill"]);function fX(e){return uX.has(e)}const dX=()=>{const{apiClient:e}=Be.getState();return e?e.request(Cx.GET_AGENTS):Promise.reject(new Error("Not connected"))},hX=()=>({gcTime:1/0,queryFn:dX,queryKey:["connectors","agents"],staleTime:1/0}),pX=({queryConfig:e}={})=>br({...hX(),...e}),mX=()=>{const{apiClient:e}=Be.getState();return e?e.request(Cx.LIST):Promise.reject(new Error("Not connected"))},X8=()=>({queryFn:mX,queryKey:["connectors","list"]}),gX=({queryConfig:e}={})=>br({...X8(),...e}),yX=({agentId:e,connectorType:t})=>{const{apiClient:n}=Be.getState();return n?n.request(Cx.INSTALL,{agentId:e,connectorType:t}):Promise.reject(new Error("Not connected"))},xX=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:X8().queryKey}),n?.(...o)},...r,mutationFn:yX})},bX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAmp%3c/title%3e%3cpath%20d='M15.087%2023.18L12.03%2024l-2.097-7.823-5.738%205.738-2.251-2.251%205.718-5.719-7.769-2.082.82-3.057%2011.294%203.08%203.08%2011.295z'%3e%3c/path%3e%3cpath%20d='M19.505%2018.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057%2011.295%203.079%203.08%2011.295z'%3e%3c/path%3e%3cpath%20d='M23.893%2014.374l-3.057.82-2.565-9.572L8.7%203.057%209.52%200l11.295%203.08%203.079%2011.294z'%3e%3c/path%3e%3c/svg%3e",vX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAntigravity%3c/title%3e%3cpath%20d='M21.751%2022.607c1.34%201.005%203.35.335%201.508-1.508C17.73%2015.74%2018.904%201%2012.037%201%205.17%201%206.342%2015.74.815%2021.1c-2.01%202.009.167%202.511%201.507%201.506%205.192-3.517%204.857-9.714%209.715-9.714%204.857%200%204.522%206.197%209.714%209.715z'%3e%3c/path%3e%3c/svg%3e",wX="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23fafafa'%20d='M9.972%2013.193h2.577q.187%200%20.277-.09t.091-.294V10.47q0-.324.133-.59.135-.27.36-.424a1%201%200%200%201%20.099-.06%201%201%200%200%201-.1-.058%201.1%201.1%200%200%201-.359-.424%201.3%201.3%200%200%201-.133-.59v-2.33q0-.202-.091-.293t-.277-.089H9.972a.38.38%200%200%201-.294-.124.4.4%200%200%201-.108-.281q.002-.176.131-.293a.46.46%200%200%201%20.313-.111h2.775c.36%200%20.642.097.836.288q.293.29.294.832V8.24q0%20.39.152.562.148.168.555.178a.4.4%200%200%201%20.27.128.41.41%200%200%201%20.104.287.44.44%200%200%201-.1.282.34.34%200%200%201-.277.132c-.266.006-.452.066-.55.177q-.151.174-.152.573v2.318c0%20.235-.043.44-.128.607a.85.85%200%200%201-.389.387%201.3%201.3%200%200%201-.534.124V14h-2.854a.45.45%200%200%201-.315-.118.38.38%200%200%201-.129-.286q0-.164.109-.282a.38.38%200%200%201%20.293-.123zM1.103%209.108a.4.4%200%200%201%20.276-.128q.4-.008.55-.177.15-.173.151-.562V5.923q.002-.543.294-.832c.195-.191.477-.288.836-.288h2.775q.188%200%20.313.111a.37.37%200%200%201%20.131.293.4.4%200%200%201-.108.281.38.38%200%200%201-.293.123H3.45q-.186%200-.277.09t-.092.292v2.33c0%20.213-.044.413-.133.59a1.1%201.1%200%200%201-.359.424%201%201%200%200%201-.1.059%201%201%200%200%201%20.1.059q.225.156.359.423t.133.59v2.34q0%20.203.092.293.088.09.277.089h2.577a.38.38%200%200%201%20.294.123q.108.12.108.281a.38.38%200%200%201-.13.286.45.45%200%200%201-.314.118l-2.775-.003a1.4%201.4%200%200%201-.613-.126.87.87%200%200%201-.388-.387%201.34%201.34%200%200%201-.129-.608v-2.318q0-.4-.151-.572-.151-.168-.55-.177a.35.35%200%200%201-.278-.132.42.42%200%200%201-.102-.28q0-.173.103-.287'/%3e%3cpath%20fill='%23fafafa'%20d='M5.437%2010.36a.986.986%200%200%201-.994-.975c0-.538.446-.976.994-.976s.994.438.994.976a.986.986%200%200%201-.994.976M10.562%208.41c.548%200%20.994.437.994.975a.986.986%200%200%201-.994.976.986.986%200%200%201-.994-.976c0-.538.446-.976.994-.976M8.74%202c.37%200%20.446.15.446.275v.034q0%20.034-.009.201-.01.162-.017.549-.018.378-.044%201.06c0%20.106-.065.233-.375.233-.311%200-.376-.126-.376-.23l-.07-1.835v-.003c0-.13.078-.284.446-.284M7.256%202c.369%200%20.446.15.446.275v.034q0%20.034-.01.201-.007.162-.017.549-.017.378-.043%201.06c0%20.106-.065.233-.376.233-.31%200-.375-.126-.375-.23l-.07-1.835v-.003C6.81%202.154%206.887%202%207.256%202'/%3e%3c/svg%3e",SX="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23fafafa'%20d='M9.972%2013.193h2.577q.187%200%20.277-.09t.091-.294V10.47q0-.324.133-.59.135-.27.36-.424a1%201%200%200%201%20.099-.06%201%201%200%200%201-.1-.058%201.1%201.1%200%200%201-.359-.424%201.3%201.3%200%200%201-.133-.59v-2.33q0-.202-.091-.293t-.277-.089H9.972a.38.38%200%200%201-.294-.124.4.4%200%200%201-.108-.281q.002-.176.131-.293a.46.46%200%200%201%20.313-.111h2.775c.36%200%20.642.097.836.288q.293.29.294.832V8.24q0%20.39.152.562.148.168.555.178a.4.4%200%200%201%20.27.128.41.41%200%200%201%20.104.287.44.44%200%200%201-.1.282.34.34%200%200%201-.277.132c-.266.006-.452.066-.55.177q-.151.174-.152.573v2.318c0%20.235-.043.44-.128.607a.85.85%200%200%201-.389.387%201.3%201.3%200%200%201-.534.124V14h-2.854a.45.45%200%200%201-.315-.118.38.38%200%200%201-.129-.286q0-.164.109-.282a.38.38%200%200%201%20.293-.123zM1.103%209.108a.4.4%200%200%201%20.276-.128q.4-.008.55-.177.15-.173.151-.562V5.923q.002-.543.294-.832c.195-.191.477-.288.836-.288h2.775q.188%200%20.313.111a.37.37%200%200%201%20.131.293.4.4%200%200%201-.108.281.38.38%200%200%201-.293.123H3.45q-.186%200-.277.09t-.092.292v2.33c0%20.213-.044.413-.133.59a1.1%201.1%200%200%201-.359.424%201%201%200%200%201-.1.059%201%201%200%200%201%20.1.059q.225.156.359.423t.133.59v2.34q0%20.203.092.293.088.09.277.089h2.577a.38.38%200%200%201%20.294.123q.108.12.108.281a.38.38%200%200%201-.13.286.45.45%200%200%201-.314.118l-2.775-.003a1.4%201.4%200%200%201-.613-.126.87.87%200%200%201-.388-.387%201.34%201.34%200%200%201-.129-.608v-2.318q0-.4-.151-.572-.151-.168-.55-.177a.35.35%200%200%201-.278-.132.42.42%200%200%201-.102-.28q0-.173.103-.287'/%3e%3cpath%20fill='%23fafafa'%20d='M5.437%2010.36a.986.986%200%200%201-.994-.975c0-.538.446-.976.994-.976s.994.438.994.976a.986.986%200%200%201-.994.976M10.562%208.41c.548%200%20.994.437.994.975a.986.986%200%200%201-.994.976.986.986%200%200%201-.994-.976c0-.538.446-.976.994-.976M8.74%202c.37%200%20.446.15.446.275v.034q0%20.034-.009.201-.01.162-.017.549-.018.378-.044%201.06c0%20.106-.065.233-.375.233-.311%200-.376-.126-.376-.23l-.07-1.835v-.003c0-.13.078-.284.446-.284M7.256%202c.369%200%20.446.15.446.275v.034q0%20.034-.01.201-.007.162-.017.549-.017.378-.043%201.06c0%20.106-.065.233-.376.233-.31%200-.375-.126-.375-.23l-.07-1.835v-.003C6.81%202.154%206.887%202%207.256%202'/%3e%3c/svg%3e",d4="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z'%3e%3c/path%3e%3c/svg%3e",CX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCline%3c/title%3e%3cpath%20d='M17.035%203.991c2.75%200%204.98%202.24%204.98%205.003v1.667l1.45%202.896a1.01%201.01%200%2001-.002.909l-1.448%202.864v1.668c0%202.762-2.23%205.002-4.98%205.002H7.074c-2.751%200-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01%201.01%200%2001-.003-.927l1.482-2.887V8.994c0-2.763%202.23-5.003%204.98-5.003h9.962zM8.265%209.6a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20004.547%200v-4.042A2.274%202.274%200%20008.265%209.6zm7.326%200a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20104.548%200v-4.042A2.274%202.274%200%200015.59%209.6z'%3e%3c/path%3e%3cpath%20d='M12.054%205.558a2.779%202.779%200%20100-5.558%202.779%202.779%200%20000%205.558z'%3e%3c/path%3e%3c/svg%3e",EX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",kX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eCursor%3c/title%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'%3e%3c/path%3e%3c/svg%3e",TX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%3e%3c/path%3e%3c/svg%3e",AX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eGithubCopilot%3c/title%3e%3cpath%20d='M19.245%205.364c1.322%201.36%201.877%203.216%202.11%205.817.622%200%201.2.135%201.592.654l.73.964c.21.278.323.61.323.955v2.62c0%20.339-.173.669-.453.868C20.239%2019.602%2016.157%2021.5%2012%2021.5c-4.6%200-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654%201.593-.654l.029-.297c.25-2.446.81-4.213%202.082-5.52%202.461-2.54%205.71-2.851%207.146-2.864h.198c1.436.013%204.685.323%207.146%202.864zm-7.244%204.328c-.284%200-.613.016-.962.05-.123.447-.305.85-.57%201.108-1.05%201.023-2.316%201.18-2.994%201.18-.638%200-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882%2065.882%200%2000-.063%202.884l-.002.48c-.002.563-.005%201.126-.013%201.69.002.326.204.63.51.765%202.482%201.102%204.83%201.657%206.99%201.657%202.156%200%204.504-.555%206.985-1.657a.854.854%200%2000.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677%200-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525%204.013c.539%200%20.976.426.976.95v1.753c0%20.525-.437.95-.976.95a.964.964%200%2001-.976-.95v-1.752c0-.525.437-.951.976-.951zm5%200c.539%200%20.976.426.976.95v1.753c0%20.525-.437.95-.976.95a.964.964%200%2001-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635%205.087c-1.05.102-1.935.438-2.385.906-.975%201.037-.765%203.668-.21%204.224.405.394%201.17.657%201.995.657h.09c.649-.013%201.785-.176%202.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63%201.813-.03%201.037.24%202.06.675%202.47.968.957%202.136%201.104%202.776%201.11h.044c.825%200%201.59-.263%201.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12%207.615c-.24%200-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94%202.94%200%2001-.014.25c.225-.022.425-.027.612-.028h.366c.187%200%20.387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29%209.29%200%2000-.84-.044z'%3e%3c/path%3e%3c/svg%3e",RX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eJunie%3c/title%3e%3cpath%20d='M24%209.333C24%2018.666%2020%2024%209.333%2024H8v-8h1.333C14%2016%2016%2014%2016%209.333V8h8v1.333zM8%2016H0V8h8v8zM16%208H8V0h8v8z'%3e%3c/path%3e%3c/svg%3e",NX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eKilo%20Code%3c/title%3e%3cpath%20d='M0%200v24h24V0H0zm22.222%2022.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89%2017.83v-2.794h1.778v2.222zm4%200h-1.778v-2.222h-2.222v-1.778h2.793l1.207%201.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333%2017.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206%201.207v2.793h2.014zm-11.556-2h2.222l1.778%201.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4%200H9.333v-2h1.778v2z'%3e%3c/path%3e%3c/svg%3e",OX="data:image/svg+xml,%3csvg%20fill='none'%20viewBox='24%2020%2047%2057'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='m33.8075%2063.4223c-5.7924%2012.8272%206.545%2016.0468%2015.6448%208.5396%202.6776%208.4172%2012.705%202.1354%2016.31-4.3924%207.9276-14.3847%204.725-29.0499%203.9025-32.0774-5.635-20.6324-33.8098-20.6675-38.6573.105-1.1375%203.64-1.155%207.77-1.785%2012.0575-.315%202.17-.56%203.5525-1.3825%205.8273-.49%201.3128-1.1375%202.4676-2.1875%204.4275-1.61%203.0453-.9275%208.9077%207.4025%205.8628l.7875-.3499z'%20fill='%23fff'/%3e%3cg%20fill='%23000'%3e%3cpath%20d='m50.5406%2044.4358c-2.3099%200-2.6599-2.765-2.6599-4.41%200-1.4875.2625-2.6599.7702-3.4125.4374-.6649%201.0849-.9975%201.8897-.9975.8052%200%201.5051.3326%201.995%201.015.56.7701.8576%201.9425.8576%203.395%200%202.765-1.0672%204.41-2.8348%204.41z'/%3e%3cpath%20d='m60.0575%2044.4358c-2.3099%200-2.6598-2.765-2.6598-4.41%200-1.4875.2624-2.6599.7701-3.4125.4374-.6649%201.0849-.9975%201.8897-.9975.8052%200%201.5051.3326%201.995%201.015.5601.7701.8576%201.9425.8576%203.395%200%202.765-1.0672%204.41-2.8348%204.41z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",jX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eOpenClaw%3c/title%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M9.046%207.104a.527.527%200%20110%201.055.527.527%200%20010-1.055z'%3e%3c/path%3e%3cpath%20d='M15.376%207.104a.528.528%200%20110%201.056.528.528%200%20010-1.056z'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='M16.877%201.912c.58-.27%201.14-.323%201.616-.037a.317.317%200%2001-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866%202.683%201.17%204.4%203.5%205.148%205.921a6.421%206.421%200%2000-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268%201.276.072%202.069l.005.012.007.014c.523%201.045%201.318%201.91%202.2%202.284-.912%203.274-3.44%206.144-5.972%206.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11%200v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373%201.678-1.238%202.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409%206.409%200%2000-.704-.183c.749-2.421%202.466-4.751%205.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318%200%2001-.435-.109.317.317%200%2001.109-.433c.476-.286%201.036-.233%201.615.037.49.229%201.031.628%201.621%201.182A9.924%209.924%200%200112%202.568c1.199%200%202.284.19%203.256.526.59-.554%201.13-.953%201.62-1.182zM8.835%206.577a1.266%201.266%200%20100%202.532%201.266%201.266%200%20000-2.532zm6.33%200a1.267%201.267%200%20100%202.533%201.267%201.267%200%20000-2.533z'%3e%3c/path%3e%3cpath%20d='M.395%2013.118c-.966-1.932-.163-3.863%202.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528%200%20.95.158%201.16.501.212.343.212.87-.105%201.61-.085.17-.178.333-.276.489l-.01.017a4.967%204.967%200%2001-.62.791l-.019.02c-1.092%201.117-2.496%201.336-3.295-.262z'%3e%3c/path%3e%3cpath%20d='M21.193%209.753c2.574-.5%203.378%201.433%202.411%203.365-.58%201.159-1.476%201.361-2.342.96l-.011-.005a2.419%202.419%200%2001-.114-.056l-.019-.01a2.751%202.751%200%2001-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639%201.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502%205.502%200%2001.3-.067z'%3e%3c/path%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='b'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='c'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='d'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='e'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='f'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3cclipPath%20id='a'%3e%3cpath%20d='M0%200h24v24H0z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",MX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e",LX="/assets/qoder-connector-D9_pSbd_.svg",_X="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eQwen%3c/title%3e%3cpath%20d='M12.604%201.34c.393.69.784%201.382%201.174%202.075a.18.18%200%2000.157.091h5.552c.174%200%20.322.11.446.327l1.454%202.57c.19.337.24.478.024.837-.26.43-.513.864-.76%201.3l-.367.658c-.106.196-.223.28-.04.512l2.652%204.637c.172.301.111.494-.043.77-.437.785-.882%201.564-1.335%202.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099%200%2000-.081.05%20575.097%20575.097%200%2001-2.705%204.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537%200%2001-.465-.271l-1.335-2.323a.09.09%200%2000-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543%200%2001-.002-.54l1.207-2.12a.198.198%200%20000-.197%20550.951%20550.951%200%2001-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625%201.387-2.436.132-.234.304-.334.584-.335a338.3%20338.3%200%20012.589-.001.124.124%200%2000.107-.063l2.806-4.895a.488.488%200%2001.422-.246c.524-.001%201.053%200%201.583-.006L11.704%201c.341-.003.724.032.9.34zm-3.432.403a.06.06%200%2000-.052.03L6.254%206.788a.157.157%200%2001-.135.078H3.253c-.056%200-.07.025-.041.074l5.81%2010.156c.025.042.013.062-.034.063l-2.795.015a.218.218%200%2000-.2.116l-1.32%202.31c-.044.078-.021.118.068.118l5.716.008c.046%200%20.08.02.104.061l1.403%202.454c.046.081.092.082.139%200l5.006-8.76.783-1.382a.055.055%200%2001.096%200l1.424%202.53a.122.122%200%2000.107.062l2.763-.02a.04.04%200%2000.035-.02.041.041%200%20000-.04l-2.9-5.086a.108.108%200%20010-.113l.293-.507%201.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059%200-.073-.026-.043-.077l1.434-2.505a.107.107%200%20000-.114L9.225%201.774a.06.06%200%2000-.053-.031zm6.29%208.02c.046%200%20.058.02.034.06l-.832%201.465-2.613%204.585a.056.056%200%2001-.05.029.058.058%200%2001-.05-.029L8.498%209.841c-.02-.034-.01-.052.028-.054l.216-.012%206.722-.012z'%3e%3c/path%3e%3c/svg%3e",DX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eRooCode%3c/title%3e%3cpath%20d='M20.113%205.5l-.442%201.557a.157.157%200%2001-.196.106l-7.414-2.157a.16.16%200%2000-.143.028l-7.342%205.74a.159.159%200%2001-.074.032l-4.37.656a.154.154%200%2000-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002%203.75-1.953a.16.16%200%2001.164.01l2.657%201.847a.152.152%200%2001.066.125l-.023%202.45c0%20.032.01.063.028.089l3.737%205.227c.03.04.077.065.129.065h1.182a.153.153%200%2000.14-.224l-2.664-4.919a.15.15%200%2001.005-.152l1.389-2.169a.156.156%200%2001.062-.055l4.965-2.456a.16.16%200%2001.158.01l1.418.921a.16.16%200%2000.087.026h1.289c.125%200%20.2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z'%3e%3c/path%3e%3c/svg%3e",IX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eTRAE%3c/title%3e%3cpath%20d='M24%2020.541H3.428v-3.426H0V3.4h24V20.54zM3.428%2017.115h17.144V6.827H3.428v10.288zm8.573-5.196l-2.425%202.424-2.424-2.424%202.424-2.424%202.425%202.424zm6.857-.001l-2.424%202.423-2.425-2.423%202.425-2.425%202.424%202.425z'%3e%3c/path%3e%3c/svg%3e",zX="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fafafa'%3e%3ctitle%3eWarp%3c/title%3e%3cpath%20d='M12.035%202.723h9.253A2.712%202.712%200%200%201%2024%205.435v10.529a2.712%202.712%200%200%201-2.712%202.713H8.047Zm-1.681%202.6L6.766%2019.677h5.598l-.399%201.6H2.712A2.712%202.712%200%200%201%200%2018.565V8.036a2.712%202.712%200%200%201%202.712-2.712Z'/%3e%3c/svg%3e",PX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eWindsurf%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M23.78%205.004h-.228a2.187%202.187%200%2000-2.18%202.196v4.912c0%20.98-.804%201.775-1.76%201.775a1.818%201.818%200%2001-1.472-.773L13.168%205.95a2.197%202.197%200%2000-1.81-.95c-1.134%200-2.154.972-2.154%202.173v4.94c0%20.98-.797%201.775-1.76%201.775-.57%200-1.136-.289-1.472-.773L.408%205.098C.282%204.918%200%205.007%200%205.228v4.284c0%20.216.066.426.188.604l5.475%207.889c.324.466.8.812%201.351.938%201.377.316%202.645-.754%202.645-2.117V11.89c0-.98.787-1.775%201.76-1.775h.002c.586%200%201.135.288%201.472.773l4.972%207.163a2.15%202.15%200%20001.81.95c1.158%200%202.151-.973%202.151-2.173v-4.939c0-.98.787-1.775%201.76-1.775h.194c.122%200%20.22-.1.22-.222V5.225a.221.221%200%2000-.22-.222z'%3e%3c/path%3e%3c/svg%3e",FX="data:image/svg+xml,%3csvg%20width='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.4375%205.625C6.8842%205.625%205.625%206.8842%205.625%208.4375V70.3125H0V8.4375C0%203.7776%203.7776%200%208.4375%200H83.7925C87.551%200%2089.4333%204.5442%2086.7756%207.20186L40.3642%2053.6133H53.4375V47.8125H59.0625V55.0195C59.0625%2057.3495%2057.1737%2059.2383%2054.8438%2059.2383H34.7392L25.0712%2068.9062H68.9062V33.75H74.5312V68.9062C74.5312%2072.0128%2072.0128%2074.5312%2068.9062%2074.5312H19.4462L9.60248%2084.375H81.5625C83.1158%2084.375%2084.375%2083.1158%2084.375%2081.5625V19.6875H90V81.5625C90%2086.2224%2086.2224%2090%2081.5625%2090H6.20749C2.44898%2090%200.566723%2085.4558%203.22438%2082.7981L49.46%2036.5625H36.5625V42.1875H30.9375V35.1562C30.9375%2032.8263%2032.8263%2030.9375%2035.1562%2030.9375H55.085L64.9288%2021.0938H21.0938V56.25H15.4688V21.0938C15.4688%2017.9871%2017.9871%2015.4688%2021.0938%2015.4688H70.5538L80.3975%205.625H8.4375Z'%20fill='%23fafafa'/%3e%3c/svg%3e",_p={Amp:bX,Antigravity:vX,"Auggie CLI":wX,"Augment Code":SX,"Claude Code":d4,"Claude Desktop":d4,Cline:CX,Codex:EX,Cursor:kX,"Gemini CLI":TX,"Github Copilot":AX,Junie:RX,"Kilo Code":NX,Kiro:OX,OpenClaw:jX,OpenCode:MX,Qoder:LX,"Qwen Code":_X,"Roo Code":DX,"Trae.ai":IX,Warp:zX,Windsurf:PX,Zed:FX};function BX({agents:e,connectors:t,onAdd:n,onOpenChange:r,open:o,pendingAgentId:a}){const[l,c]=C.useState("");C.useEffect(()=>{o||c("")},[o]);const f=C.useMemo(()=>new Set(t.map(g=>g.agent)),[t]),d=C.useMemo(()=>{if(!l)return e;const g=l.toLowerCase();return e.filter(h=>h.name.toLowerCase().includes(g))},[e,l]);return p.jsx($s,{onOpenChange:r,open:o,children:p.jsxs(Gs,{className:"flex h-150 flex-col sm:max-w-lg",children:[p.jsx(ui,{children:p.jsx(fi,{children:"Add connector"})}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[p.jsxs("div",{className:"relative shrink-0",children:[p.jsx(vc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),p.jsx(Ko,{className:"pl-9",onChange:g=>c(g.target.value),placeholder:"Search agents...",value:l})]}),p.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[d.map(g=>{const h=f.has(g.id),y=a===g.id;return p.jsxs("div",{className:"flex items-center justify-between rounded px-3 py-2.5",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[_p[g.name]?p.jsx("img",{alt:"",className:"size-5 shrink-0",src:_p[g.name]}):p.jsx("div",{className:"size-5 shrink-0"}),p.jsx("span",{className:"text-foreground text-sm",children:g.name})]}),p.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center",children:y?p.jsx(ai,{className:"text-muted-foreground size-4 animate-spin"}):h?p.jsx(Ys,{className:"text-primary size-4"}):p.jsx(De,{className:"size-8",onClick:()=>n(g),size:"icon-sm",variant:"outline",children:p.jsx(Xa,{className:"size-4"})})})]},g.id)}),d.length===0&&p.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No agents found"})]})]})]})})}const Nu={hook:"Hook",mcp:"MCP",rules:"Rules",skill:"Skill"};function HX(){const{data:e,isLoading:t}=gX(),{data:n,isLoading:r}=pX(),o=xX(),[a,l]=C.useState(!1),[c,f]=C.useState(),d=e?.connectors??[],g=n?.agents??[],h=t||r,y=async(v,S)=>{if(S!==v.connectorType)try{await o.mutateAsync({agentId:v.agent,connectorType:S});const E=fX(S);ut.success(E?`${v.agent} switched to ${Nu[S]}. Restart the agent to apply.`:`${v.agent} switched to ${Nu[S]}.`)}catch(E){ut.error(E instanceof Error?E.message:"Failed to switch connector type")}},x=async(v,S)=>{try{await o.mutateAsync({agentId:v,connectorType:S}),ut.success(`${v} connected via ${Nu[S]}.`)}catch(E){ut.error(E instanceof Error?E.message:"Failed to install connector")}};return h?p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx(ai,{className:"text-muted-foreground size-5 animate-spin"})}):p.jsxs("div",{className:"flex flex-col gap-5 w-full sm:max-w-lg md:max-w-xl lg:max-w-2xl",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("h2",{className:"text-foreground text-lg font-bold",children:"Connectors"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage how AI agents connect to ByteRover."})]}),p.jsxs(De,{onClick:()=>l(!0),variant:"default",children:[p.jsx(Xa,{strokeWidth:3})," Add connector"]})]}),p.jsx(BX,{agents:g,connectors:d,onAdd:async v=>{f(v.id);try{await x(v.id,v.defaultConnectorType)}finally{f(void 0)}},onOpenChange:l,open:a,pendingAgentId:c}),d.length===0?p.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No connectors installed. Add one to get started."}):p.jsx("div",{className:"border rounded-xl px-6 py-5 flex flex-col gap-4",children:d.map((v,S)=>p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex justify-between items-center",children:[p.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[_p[v.agent]?p.jsx("img",{alt:"",className:"size-5 shrink-0",src:_p[v.agent]}):p.jsx("div",{className:"size-5 shrink-0"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{children:v.agent}),p.jsx("span",{className:"text-primary text-xs",children:"Connected"})]})]}),p.jsx("div",{className:"flex items-center",children:p.jsxs(Ws,{children:[p.jsxs(Ks,{disabled:o.isPending,render:p.jsx(De,{className:"text-sm",disabled:o.isPending,size:"sm",variant:"outline"}),children:[Nu[v.connectorType],p.jsx(Bf,{className:"size-3.5 shrink-0"})]}),p.jsx(Za,{align:"end",children:v.supportedTypes.map(E=>p.jsx(_n,{onClick:()=>y(v,E),children:Nu[E]},E))})]})})]}),S<d.length-1&&p.jsx("div",{className:"border-b"})]},v.agent))})]})}function UX(){return p.jsx("div",{className:"flex flex-col items-center pt-8",children:p.jsx(HX,{})})}function qX(){const[e,t]=C.useState(!0),[n,r]=C.useState(!1),o=C.useCallback(()=>{t(c=>!c)},[]),a=C.useCallback(()=>{r(c=>!c)},[]);return{closeRightPanel:C.useCallback(()=>{r(!1)},[]),isLeftPanelOpen:e,isRightPanelOpen:n,toggleLeftPanel:o,toggleRightPanel:a}}const VX=e=>{const{apiClient:t}=Be.getState();return t?t.request(Df.GET_FILE,e):Promise.reject(new Error("Not connected"))},$X=({branch:e,path:t})=>({queryFn:()=>VX({branch:e,path:t}),queryKey:["contextTree","file",e,t]}),GX=({branch:e,path:t,queryConfig:n})=>br({...$X({branch:e,path:t}),enabled:!!t,...n}),YX=e=>{const{apiClient:t}=Be.getState();return t?t.request(Df.GET_NODES,e):Promise.reject(new Error("Not connected"))},WX=e=>({queryFn:()=>YX({branch:e}),queryKey:["contextTree","nodes",e]}),KX=({branch:e,queryConfig:t}={})=>br({...WX(e),...t}),QX=e=>{const{apiClient:t}=Be.getState();return t?t.request(Df.UPDATE_FILE,e):Promise.reject(new Error("Not connected"))},XX=({mutationConfig:e}={})=>{const t=cn(),{onSuccess:n,...r}=e??{};return wn({onSuccess(...o){t.invalidateQueries({queryKey:["contextTree"]}),n?.(...o)},...r,mutationFn:QX})},Uf=e=>e.endsWith(".md"),h4=e=>{const t=new Set;if(!e)return t;const n=e.split("/").filter(Boolean);for(let r=0;r<n.length;r++){const o=n.slice(0,r+1).join("/");r===n.length-1&&Uf(o)||t.add(o)}return t},ab=(e,t)=>{for(const n of e){if(n.path===t)return n;if(n.type==="tree"&&n.children&&t.startsWith(n.path+"/")){const r=ab(n.children,t);if(r)return r}}},Z8=(e,t,n=0,r=[])=>{for(const o of e)r.push({depth:n,node:o}),o.type==="tree"&&t.has(o.path)&&o.children&&Z8(o.children,t,n+1,r);return r},J8=C.createContext(void 0);function ZX({children:e}){const[t,n]=kk(),r=t.get("branch")??void 0,o=t.get("path")??"",[a,l]=C.useState(()=>h4(o)),[c,f]=C.useState(!1),[d,g]=C.useState(""),{data:h,isFetching:y}=KX({branch:r}),{data:x,isFetching:v}=GX({branch:r,path:o,queryConfig:{enabled:!!o&&Uf(o)}});C.useEffect(()=>{h?.branch&&!t.has("branch")&&n(V=>{const Y=new URLSearchParams(V);return Y.set("branch",h.branch),Y},{replace:!0})},[h?.branch,t,n]);const S=C.useMemo(()=>h?.nodes??[],[h]),E=C.useMemo(()=>o?ab(S,o):void 0,[S,o]),k=C.useMemo(()=>Z8(S,a),[S,a]),T=x?.file,R=C.useCallback(V=>{const Y=h4(V);l(H=>new Set([...Y,...H]))},[]),L=C.useCallback(V=>{l(Y=>{const H=new Set(Y);return H.has(V.path)?H.delete(V.path):H.add(V.path),H})},[]),j=C.useCallback(V=>{R(V.path),n(Y=>{const H=new URLSearchParams(Y);return H.set("path",V.path),H},{replace:!0}),f(!1),g("")},[R,n]),N=C.useCallback(()=>{n(V=>{const Y=new URLSearchParams(V);return Y.delete("path"),Y},{replace:!0}),f(!1),g("")},[n]),A=XX(),D=C.useCallback(()=>{T&&(g(T.content),f(!0))},[T]),U=C.useCallback(()=>{f(!1),g("")},[]),I=C.useCallback(async()=>{!o||!c||(await A.mutateAsync({content:d,path:o}),f(!1))},[d,c,o,A]),q=c&&T!==void 0&&d!==T.content,$={branch:h?.branch??r,cancelEdit:U,editContent:d,enterEditMode:D,expandedPaths:a,fileData:T,flattenedNodes:k,handleSelect:j,handleToggle:L,hasChanges:q,isEditMode:c,isFetchingFile:v,isFetchingTree:y,isUpdating:A.isPending,navigateHome:N,nodes:S,saveChanges:I,selectedNode:E,selectedPath:o,setEditContent:g};return p.jsx(J8.Provider,{value:$,children:e})}function Sc(){const e=C.useContext(J8);if(!e)throw new Error("useContextTree must be used within a ContextTreeProvider");return e}function JX({name:e,avatar:t,description:n,timestamp:r,className:o}){return p.jsx("div",{className:we("border-border flex items-center justify-between border-b py-2",o),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(f0,{className:"size-6",children:[t&&p.jsx(Ux,{src:t,alt:e}),p.jsx(d0,{className:"text-sm font-semibold",children:e[0]||"U"})]}),n&&p.jsx("div",{className:"text-muted-foreground text-sm",children:n}),r&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground font-semibold",children:"·"}),p.jsx("div",{className:"text-muted-foreground text-sm font-semibold",children:r})]})]})})}const eZ=o0("group/tag inline-flex h-6 w-fit shrink-0 items-center gap-1 overflow-hidden rounded-md border px-2 text-xs font-medium whitespace-nowrap transition-all [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-border bg-muted text-muted-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border bg-transparent text-foreground"},size:{default:"h-6 px-2 text-xs",sm:"h-5 px-2.5 text-xs py-0.5"}},defaultVariants:{variant:"default",size:"default"}});function p4({className:e,variant:t="default",size:n="default",closable:r=!1,onClose:o,disabled:a=!1,children:l,...c}){const f=C.useCallback(g=>{g.stopPropagation(),a||o?.()},[a,o]),d=C.useCallback(g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),a||o?.())},[a,o]);return p.jsxs("span",{"data-slot":"tag","data-disabled":a||void 0,className:we(eZ({variant:t,size:n}),a&&"pointer-events-none opacity-50",r&&"pr-1",e),...c,children:[p.jsx("span",{className:"truncate",children:l}),r&&p.jsx("button",{type:"button","aria-label":"Remove tag",disabled:a,onClick:f,onKeyDown:d,className:"inline-flex shrink-0 items-center justify-center rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none cursor-pointer",children:p.jsx(qp,{className:"size-3"})})]})}function tZ({fileName:e,content:t,tags:n=[],isLoading:r,error:o,isEditMode:a,editContent:l,editTags:c=[],onContentChange:f,onTagsChange:d,isUpdating:g,hasChanges:h,canEdit:y,onEnterEditMode:x,onSaveChanges:v,onCancelEdit:S,headerClassName:E,isHistoryVisible:k,onToggleHistory:T,showTags:R=!0,timeline:L,contentView:j}){return r?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(tf,{className:"size-4 animate-spin"})}):o?p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[p.jsx("div",{className:"text-sm text-red-400",children:"Failed to load file content"}),p.jsx("div",{className:"text-sm text-gray-500",children:o})]}):!t&&!a?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("div",{className:"text-sm text-gray-500",children:"No content available"})}):a?p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-5",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(De,{size:"default",onClick:S,disabled:g,className:"bg-secondary text-secondary-foreground gap-2 px-4 py-2 text-sm hover:bg-neutral-800",children:"Cancel"}),p.jsx(De,{variant:"default",size:"default",onClick:v,disabled:g||!h,className:"text-foreground gap-2 px-4 py-2 text-sm",children:g?p.jsxs(p.Fragment,{children:[p.jsx(tf,{className:"size-4 animate-spin"}),"Saving..."]}):"Save"})]})]}),d&&p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:"Tags"}),p.jsxs("div",{className:"bg-background flex flex-wrap items-center gap-2 rounded-lg px-5 py-2 border",children:[c.map(N=>p.jsx(p4,{variant:"outline",closable:!0,onClose:()=>d(c.filter(A=>A!==N)),className:"text-foreground bg-secondary rounded-sm border-none",children:N},N)),p.jsx("input",{type:"text",placeholder:"Add tag...",disabled:g,className:"h-7 w-24 bg-transparent text-sm text-neutral-200 placeholder:text-neutral-500 focus:outline-none",onKeyDown:N=>{if(N.key==="Enter"){N.preventDefault();const A=N.currentTarget.value.trim();A&&!c.includes(A)&&(d([...c,A]),N.currentTarget.value="")}}})]})]}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[p.jsx("span",{className:"text-foreground text-sm font-medium",children:"Context detail"}),p.jsx(Fx,{value:l,onChange:N=>f(N.target.value),disabled:g,className:"flex-1 resize-none rounded-lg px-5 text-sm leading-6 text-neutral-200 focus:ring-0 focus:ring-offset-0 focus:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none",placeholder:"Enter context content..."})]})]}):p.jsxs("div",{className:"mx-auto flex min-h-0 w-full flex-1 flex-col",children:[p.jsxs("div",{className:we("flex items-center justify-between p-5",E),children:[p.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),p.jsxs(Ws,{children:[p.jsx(Ks,{render:p.jsx(De,{size:"icon",className:"border-border bg-background hover:bg-muted"}),children:p.jsx(XO,{className:"h-5 w-5"})}),p.jsxs(Za,{align:"end",className:"bg-popover w-32 border-none p-1",children:[y&&p.jsxs(_n,{className:"bg-popover",onClick:x,children:[p.jsx(uj,{className:"mr-2 h-4 w-4"}),"Edit"]}),p.jsxs(_n,{className:"bg-popover",onClick:T,children:[p.jsx(rj,{className:"mr-2 h-5 w-5"}),"History"]})]})]})]}),L,R&&n.length>0&&p.jsx("div",{className:"mb-7 flex flex-wrap gap-1.5",children:n.map(N=>p.jsx(p4,{variant:"default",size:"sm",className:"text-muted-foreground bg-muted rounded-sm border-none",children:N},N))}),p.jsx("div",{className:"overflow-y-auto p-5 pt-0",children:j})]})}function Dp({text:e,className:t,delay:n=500}){const r=C.useRef(null),[o,a]=C.useState(!1);C.useEffect(()=>{const c=r.current;c&&a(c.scrollWidth>c.clientWidth)},[e]);const l=we("overflow-hidden text-ellipsis whitespace-nowrap",t);return o?p.jsx(ux,{delay:n,children:p.jsxs(_s,{children:[p.jsx(Ds,{render:p.jsx("span",{ref:r,className:l}),children:e}),p.jsx(Is,{className:"[&>[aria-hidden]]:hidden bg-popover text-foreground",children:p.jsx("p",{children:e})})]})}):p.jsx("span",{ref:r,className:l,children:e})}function eA({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border",children:p.jsx("table",{"data-slot":"table",className:we("w-full caption-bottom text-sm",e),...t})})}function tA({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:we("[&_tr]:border-b bg-card",e),...t})}function nA({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:we("[&_tr:last-child]:border-0",e),...t})}function Zl({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:we("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Ui({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:we("h-10 text-left align-middle font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 px-5",e),...t})}function Tr({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:we("px-5 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 h-12.5",e),...t})}function nZ({nodes:e,showBack:t,onNodeClick:n,onBack:r}){return p.jsxs(eA,{className:"overflow-hidden",children:[p.jsx(tA,{className:"bg-popover",children:p.jsxs(Zl,{className:"h-11",children:[p.jsx(Ui,{className:"text-muted-foreground bg-border border-border px-6 text-sm",children:"Memory"}),p.jsx(Ui,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Updated by"}),p.jsx(Ui,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Last Modified"})]})}),p.jsxs(nA,{children:[t&&r&&p.jsxs(Zl,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:r,children:[p.jsx(Tr,{className:we("text-foreground px-6 hover:underline",{"border-border border-b":e.length>0}),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(o1,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}),p.jsx(Dp,{text:".."})]})}),p.jsx(Tr,{className:we("px-6 text-muted-foreground",{"border-border border-b":e.length>0})}),p.jsx(Tr,{className:we("px-6 text-muted-foreground",{"border-border border-b":e.length>0})})]}),e.map((o,a)=>{const l=a===e.length-1;return p.jsxs(Zl,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:()=>n(o),children:[p.jsx(Tr,{className:we("text-foreground px-6 hover:underline",{"border-border border-b":!l}),children:p.jsxs("div",{className:"flex items-center gap-2",children:[o.type==="tree"?p.jsx(o1,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}):p.jsx($E,{className:"text-primary size-4 shrink-0",strokeWidth:2}),p.jsx(Dp,{text:o.name})]})}),p.jsx(Tr,{className:we("text-muted-foreground px-6",{"border-border border-b":!l}),children:o.type==="blob"&&o.lastUpdatedBy?o.lastUpdatedBy:"-"}),p.jsx(Tr,{className:we("text-muted-foreground px-6",{"border-border border-b":!l}),children:o.type==="blob"&&o.lastUpdatedWhen?o.lastUpdatedWhen:"-"})]},o.path)})]})]})}function La({className:e,...t}){return p.jsx("div",{"data-slot":"skeleton",className:we("animate-pulse rounded-md bg-muted",e),...t})}const rA=6048e5,rZ=864e5,Oh=43200,m4=1440,g4=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&g4 in e?e[g4](t):e instanceof Date?new e.constructor(t):new Date(t)}function ir(e,t){return $o(t||e,e)}let iZ={};function qf(){return iZ}function yf(e,t){const n=qf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ir(e,t?.in),a=o.getDay(),l=(a<r?7:0)+a-r;return o.setDate(o.getDate()-l),o.setHours(0,0,0,0),o}function Ip(e,t){return yf(e,{...t,weekStartsOn:1})}function iA(e,t){const n=ir(e,t?.in),r=n.getFullYear(),o=$o(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Ip(o),l=$o(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const c=Ip(l);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function zp(e){const t=ir(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function T0(e,...t){const n=$o.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function y4(e,t){const n=ir(e,t?.in);return n.setHours(0,0,0,0),n}function oZ(e,t,n){const[r,o]=T0(n?.in,e,t),a=y4(r),l=y4(o),c=+a-zp(a),f=+l-zp(l);return Math.round((c-f)/rZ)}function aZ(e,t){const n=iA(e,t),r=$o(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ip(r)}function np(e,t){const n=+ir(e)-+ir(t);return n<0?-1:n>0?1:n}function sZ(e){return $o(e,Date.now())}function lZ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cZ(e){return!(!lZ(e)&&typeof e!="number"||isNaN(+ir(e)))}function uZ(e,t,n){const[r,o]=T0(n?.in,e,t),a=r.getFullYear()-o.getFullYear(),l=r.getMonth()-o.getMonth();return a*12+l}function fZ(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function dZ(e,t){return+ir(e)-+ir(t)}function hZ(e,t){const n=ir(e,t?.in);return n.setHours(23,59,59,999),n}function pZ(e,t){const n=ir(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function mZ(e,t){const n=ir(e,t?.in);return+hZ(n,t)==+pZ(n,t)}function gZ(e,t,n){const[r,o,a]=T0(n?.in,e,e,t),l=np(o,a),c=Math.abs(uZ(o,a));if(c<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-l*c);let f=np(o,a)===-l;mZ(r)&&c===1&&np(r,a)===1&&(f=!1);const d=l*(c-+f);return d===0?0:d}function yZ(e,t,n){const r=dZ(e,t)/1e3;return fZ(n?.roundingMethod)(r)}function xZ(e,t){const n=ir(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const bZ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vZ=(e,t,n)=>{let r;const o=bZ[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function _2(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wZ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SZ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CZ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},EZ={date:_2({formats:wZ,defaultWidth:"full"}),time:_2({formats:SZ,defaultWidth:"full"}),dateTime:_2({formats:CZ,defaultWidth:"full"})},kZ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TZ=(e,t,n,r)=>kZ[e];function Ou(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):l;o=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[l]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const AZ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RZ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NZ={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OZ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jZ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},MZ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},LZ=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},_Z={ordinalNumber:LZ,era:Ou({values:AZ,defaultWidth:"wide"}),quarter:Ou({values:RZ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ou({values:NZ,defaultWidth:"wide"}),day:Ou({values:OZ,defaultWidth:"wide"}),dayPeriod:Ou({values:jZ,defaultWidth:"wide",formattingValues:MZ,defaultFormattingWidth:"wide"})};function ju(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const l=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(c)?IZ(c,h=>h.test(l)):DZ(c,h=>h.test(l));let d;d=e.valueCallback?e.valueCallback(f):f,d=n.valueCallback?n.valueCallback(d):d;const g=t.slice(l.length);return{value:d,rest:g}}}function DZ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function IZ(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function zZ(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(o.length);return{value:l,rest:c}}}const PZ=/^(\d+)(th|st|nd|rd)?/i,FZ=/\d+/i,BZ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},HZ={any:[/^b/i,/^(a|c)/i]},UZ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qZ={any:[/1/i,/2/i,/3/i,/4/i]},VZ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},$Z={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},GZ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},YZ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},WZ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},KZ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},QZ={ordinalNumber:zZ({matchPattern:PZ,parsePattern:FZ,valueCallback:e=>parseInt(e,10)}),era:ju({matchPatterns:BZ,defaultMatchWidth:"wide",parsePatterns:HZ,defaultParseWidth:"any"}),quarter:ju({matchPatterns:UZ,defaultMatchWidth:"wide",parsePatterns:qZ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ju({matchPatterns:VZ,defaultMatchWidth:"wide",parsePatterns:$Z,defaultParseWidth:"any"}),day:ju({matchPatterns:GZ,defaultMatchWidth:"wide",parsePatterns:YZ,defaultParseWidth:"any"}),dayPeriod:ju({matchPatterns:WZ,defaultMatchWidth:"any",parsePatterns:KZ,defaultParseWidth:"any"})},oA={code:"en-US",formatDistance:vZ,formatLong:EZ,formatRelative:TZ,localize:_Z,match:QZ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XZ(e,t){const n=ir(e,t?.in);return oZ(n,xZ(n))+1}function ZZ(e,t){const n=ir(e,t?.in),r=+Ip(n)-+aZ(n);return Math.round(r/rA)+1}function aA(e,t){const n=ir(e,t?.in),r=n.getFullYear(),o=qf(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=$o(t?.in||e,0);l.setFullYear(r+1,0,a),l.setHours(0,0,0,0);const c=yf(l,t),f=$o(t?.in||e,0);f.setFullYear(r,0,a),f.setHours(0,0,0,0);const d=yf(f,t);return+n>=+c?r+1:+n>=+d?r:r-1}function JZ(e,t){const n=qf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=aA(e,t),a=$o(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),yf(a,t)}function eJ(e,t){const n=ir(e,t?.in),r=+yf(n,t)-+JZ(n,t);return Math.round(r/rA)+1}function Zt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ea={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Zt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Zt(n+1,2)},d(e,t){return Zt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Zt(e.getHours()%12||12,t.length)},H(e,t){return Zt(e.getHours(),t.length)},m(e,t){return Zt(e.getMinutes(),t.length)},s(e,t){return Zt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Zt(o,t.length)}},Ll={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},x4={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ea.y(e,t)},Y:function(e,t,n,r){const o=aA(e,r),a=o>0?o:1-o;if(t==="YY"){const l=a%100;return Zt(l,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Zt(a,t.length)},R:function(e,t){const n=iA(e);return Zt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Zt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Zt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Zt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ea.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Zt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=eJ(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Zt(o,t.length)},I:function(e,t,n){const r=ZZ(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Zt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ea.d(e,t)},D:function(e,t,n){const r=XZ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Zt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Zt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Zt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Zt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ll.noon:r===0?o=Ll.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ll.evening:r>=12?o=Ll.afternoon:r>=4?o=Ll.morning:o=Ll.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ea.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ea.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Zt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Zt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ea.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ea.s(e,t)},S:function(e,t){return Ea.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return v4(r);case"XXXX":case"XX":return Es(r);default:return Es(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return v4(r);case"xxxx":case"xx":return Es(r);default:return Es(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b4(r,":");default:return"GMT"+Es(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b4(r,":");default:return"GMT"+Es(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Zt(r,t.length)},T:function(e,t,n){return Zt(+e,t.length)}};function b4(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+Zt(a,2)}function v4(e,t){return e%60===0?(e>0?"-":"+")+Zt(Math.abs(e)/60,2):Es(e,t)}function Es(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Zt(Math.trunc(r/60),2),a=Zt(r%60,2);return n+o+t+a}const w4=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},sA=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tJ=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return w4(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",w4(r,t)).replace("{{time}}",sA(o,t))},nJ={p:sA,P:tJ},rJ=/^D+$/,iJ=/^Y+$/,oJ=["D","DD","YY","YYYY"];function aJ(e){return rJ.test(e)}function sJ(e){return iJ.test(e)}function lJ(e,t,n){const r=cJ(e,t,n);if(console.warn(r),oJ.includes(e))throw new RangeError(r)}function cJ(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const uJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dJ=/^'([^]*?)'?$/,hJ=/''/g,pJ=/[a-zA-Z]/;function mJ(e,t,n){const r=qf(),o=r.locale??oA,a=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=ir(e,n?.in);if(!cZ(c))throw new RangeError("Invalid time value");let f=t.match(fJ).map(g=>{const h=g[0];if(h==="p"||h==="P"){const y=nJ[h];return y(g,o.formatLong)}return g}).join("").match(uJ).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:gJ(g)};if(x4[h])return{isToken:!0,value:g};if(h.match(pJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});o.localize.preprocessor&&(f=o.localize.preprocessor(c,f));const d={firstWeekContainsDate:a,weekStartsOn:l,locale:o};return f.map(g=>{if(!g.isToken)return g.value;const h=g.value;(sJ(h)||aJ(h))&&lJ(h,t,String(e));const y=x4[h[0]];return y(c,h,o.localize,d)}).join("")}function gJ(e){const t=e.match(dJ);return t?t[1].replace(hJ,"'"):e}function yJ(e,t,n){const r=qf(),o=n?.locale??r.locale??oA,a=2520,l=np(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[f,d]=T0(n?.in,...l>0?[t,e]:[e,t]),g=yZ(d,f),h=(zp(d)-zp(f))/1e3,y=Math.round((g-h)/60);let x;if(y<2)return n?.includeSeconds?g<5?o.formatDistance("lessThanXSeconds",5,c):g<10?o.formatDistance("lessThanXSeconds",10,c):g<20?o.formatDistance("lessThanXSeconds",20,c):g<40?o.formatDistance("halfAMinute",0,c):g<60?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",1,c):y===0?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",y,c);if(y<45)return o.formatDistance("xMinutes",y,c);if(y<90)return o.formatDistance("aboutXHours",1,c);if(y<m4){const v=Math.round(y/60);return o.formatDistance("aboutXHours",v,c)}else{if(y<a)return o.formatDistance("xDays",1,c);if(y<Oh){const v=Math.round(y/m4);return o.formatDistance("xDays",v,c)}else if(y<Oh*2)return x=Math.round(y/Oh),o.formatDistance("aboutXMonths",x,c)}if(x=gZ(d,f),x<12){const v=Math.round(y/Oh);return o.formatDistance("xMonths",v,c)}else{const v=x%12,S=Math.trunc(x/12);return v<3?o.formatDistance("aboutXYears",S,c):v<9?o.formatDistance("overXYears",S,c):o.formatDistance("almostXYears",S+1,c)}}function S4(e,t){return yJ(e,sZ(e),t)}const xJ=e=>{const{apiClient:t}=Be.getState();return t?t.request(Df.GET_FILE_METADATA,e):Promise.reject(new Error("Not connected"))},bJ=e=>({queryFn:()=>xJ({paths:e}),queryKey:["contextTree","fileMetadata",...[...e].sort()]}),vJ=({enabled:e=!0,paths:t,queryConfig:n})=>br({...bJ(t),enabled:e&&t.length>0,...n}),wJ=e=>{const{apiClient:t}=Be.getState();return t?t.request(Df.GET_HISTORY,e):Promise.reject(new Error("Not connected"))},lA=({enabled:e=!0,path:t})=>nF({enabled:e&&!!t,getNextPageParam:n=>n.hasMore?n.nextCursor:void 0,initialPageParam:void 0,queryFn:({pageParam:n})=>wJ({cursor:n,path:t}),queryKey:["contextTree","history",t]});function SJ({className:e,...t}){return p.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:we(e),...t})}function CJ({className:e,...t}){return p.jsx("ol",{"data-slot":"breadcrumb-list",className:we("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",e),...t})}function D2({className:e,...t}){return p.jsx("li",{"data-slot":"breadcrumb-item",className:we("inline-flex items-center gap-1.5",e),...t})}function C4({className:e,render:t,...n}){return kT({defaultTagName:"a",props:Ba({className:we("transition-colors hover:text-foreground",e)},n),render:t,state:{slot:"breadcrumb-link"}})}function EJ({className:e,...t}){return p.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:we("font-normal text-foreground",e),...t})}function E4({children:e,className:t,...n}){return p.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:we("[&>svg]:size-3.5",t),...n,children:e??p.jsx(VE,{})})}function kJ({className:e,...t}){return p.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:we("flex size-5 items-center justify-center [&>svg]:size-4",e),...t,children:[p.jsx(JO,{}),p.jsx("span",{className:"sr-only",children:"More"})]})}const TJ=3;function I2({type:e}){return e==="tree"?p.jsx(p9,{className:"text-secondary-foreground h-4 w-4.5",strokeWidth:2}):p.jsx(c0,{className:"text-primary-foreground size-4",strokeWidth:2})}function k4(){const{handleSelect:e,navigateHome:t,nodes:n,selectedPath:r}=Sc(),o=C.useMemo(()=>{if(!r)return[];const f=r.split("/").filter(Boolean);return f.map((d,g)=>{const h=f.slice(0,g+1).join("/");return ab(n,h)}).filter(d=>d!==void 0)},[r,n]),a=o.length>TJ,l=a?o.slice(0,-2):[],c=a?o.slice(-2):o;return p.jsx(SJ,{className:"min-w-0 text-sm font-medium",children:p.jsxs(CJ,{className:"h-8 flex-nowrap gap-1 whitespace-nowrap sm:gap-1",children:[p.jsx(D2,{children:p.jsx(C4,{className:"cursor-pointer rounded px-1 hover:bg-neutral-800",onClick:t,children:p.jsx(m9,{className:"text-secondary-foreground size-4"})})}),a&&p.jsxs(p.Fragment,{children:[p.jsx(E4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),p.jsx(D2,{children:p.jsxs(Ws,{children:[p.jsx(Ks,{className:"flex h-5 cursor-pointer items-center rounded-sm outline-none hover:bg-neutral-800 focus-visible:outline-none",children:p.jsx(kJ,{className:"text-foreground"})}),p.jsx(Za,{align:"start",children:l.map(f=>p.jsxs(_n,{className:"flex cursor-pointer items-center gap-2 hover:bg-neutral-800",onClick:()=>e(f),children:[p.jsx(I2,{type:f.type}),p.jsx("span",{children:f.name})]},f.path))})]})})]}),c.map((f,d)=>{const g=d===c.length-1;return p.jsxs(C.Fragment,{children:[p.jsx(E4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),p.jsx(D2,{children:g?p.jsxs(EJ,{className:"text-secondary-foreground flex items-center gap-2 px-2 text-sm font-medium",children:[p.jsx(I2,{type:f.type}),p.jsx("span",{children:f.name})]}):p.jsxs(C4,{className:"text-muted-foreground flex cursor-pointer items-center gap-2 rounded px-2 text-sm font-medium hover:bg-neutral-800",onClick:()=>e(f),children:[p.jsx(I2,{type:f.type}),p.jsx("span",{children:f.name})]})})]},f.path)})]})})}function T4(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const l=n.slice(o,r).trim();(l||!a)&&t.push(l),o=r+1,r=n.indexOf(",",o)}return t}function AJ(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RJ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NJ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OJ={};function A4(e,t){return(OJ.jsx?NJ:RJ).test(e)}const jJ=/[ \t\n\f\r]/g;function MJ(e){return typeof e=="object"?e.type==="text"?R4(e.value):!1:R4(e)}function R4(e){return e.replace(jJ,"")===""}class Vf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vf.prototype.normal={};Vf.prototype.property={};Vf.prototype.space=void 0;function cA(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Vf(n,r,t)}function xf(e){return e.toLowerCase()}class $r{constructor(t,n){this.attribute=n,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let LJ=0;const bt=Qs(),Hn=Qs(),ny=Qs(),Ae=Qs(),un=Qs(),Jl=Qs(),ei=Qs();function Qs(){return 2**++LJ}const ry=Object.freeze(Object.defineProperty({__proto__:null,boolean:bt,booleanish:Hn,commaOrSpaceSeparated:ei,commaSeparated:Jl,number:Ae,overloadedBoolean:ny,spaceSeparated:un},Symbol.toStringTag,{value:"Module"})),z2=Object.keys(ry);class sb extends $r{constructor(t,n,r,o){let a=-1;if(super(t,n),N4(this,"space",o),typeof r=="number")for(;++a<z2.length;){const l=z2[a];N4(this,z2[a],(r&ry[l])===ry[l])}}}sb.prototype.defined=!0;function N4(e,t,n){n&&(e[t]=n)}function Cc(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new sb(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xf(r)]=r,n[xf(a.attribute)]=r}return new Vf(t,n,e.space)}const uA=Cc({properties:{ariaActiveDescendant:null,ariaAtomic:Hn,ariaAutoComplete:null,ariaBusy:Hn,ariaChecked:Hn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:un,ariaCurrent:null,ariaDescribedBy:un,ariaDetails:null,ariaDisabled:Hn,ariaDropEffect:un,ariaErrorMessage:null,ariaExpanded:Hn,ariaFlowTo:un,ariaGrabbed:Hn,ariaHasPopup:null,ariaHidden:Hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:un,ariaLevel:Ae,ariaLive:null,ariaModal:Hn,ariaMultiLine:Hn,ariaMultiSelectable:Hn,ariaOrientation:null,ariaOwns:un,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Hn,ariaReadOnly:Hn,ariaRelevant:null,ariaRequired:Hn,ariaRoleDescription:un,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Hn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fA(e,t){return t in e?e[t]:t}function dA(e,t){return fA(e,t.toLowerCase())}const _J=Cc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jl,acceptCharset:un,accessKey:un,action:null,allow:null,allowFullScreen:bt,allowPaymentRequest:bt,allowUserMedia:bt,alt:null,as:null,async:bt,autoCapitalize:null,autoComplete:un,autoFocus:bt,autoPlay:bt,blocking:un,capture:null,charSet:null,checked:bt,cite:null,className:un,cols:Ae,colSpan:null,content:null,contentEditable:Hn,controls:bt,controlsList:un,coords:Ae|Jl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bt,defer:bt,dir:null,dirName:null,disabled:bt,download:ny,draggable:Hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bt,formTarget:null,headers:un,height:Ae,hidden:ny,high:Ae,href:null,hrefLang:null,htmlFor:un,httpEquiv:un,id:null,imageSizes:null,imageSrcSet:null,inert:bt,inputMode:null,integrity:null,is:null,isMap:bt,itemId:null,itemProp:un,itemRef:un,itemScope:bt,itemType:un,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bt,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:bt,muted:bt,name:null,nonce:null,noModule:bt,noValidate:bt,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:bt,optimum:Ae,pattern:null,ping:un,placeholder:null,playsInline:bt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bt,referrerPolicy:null,rel:un,required:bt,reversed:bt,rows:Ae,rowSpan:Ae,sandbox:un,scope:null,scoped:bt,seamless:bt,selected:bt,shadowRootClonable:bt,shadowRootDelegatesFocus:bt,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:bt,useMap:null,value:Hn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:un,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bt,declare:bt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:bt,noHref:bt,noShade:bt,noWrap:bt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Hn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bt,disableRemotePlayback:bt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:dA}),DJ=Cc({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:ei,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:un,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:bt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:Jl,g2:Jl,glyphName:Jl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:ei,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:un,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ei,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ei,rev:ei,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ei,requiredFeatures:ei,requiredFonts:ei,requiredFormats:ei,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:ei,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ei,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ei,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fA}),hA=Cc({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()}}),pA=Cc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dA}),mA=Cc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),IJ={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"},zJ=/[A-Z]/g,O4=/-[a-z]/g,PJ=/^data[-\w.:]+$/i;function gA(e,t){const n=xf(t);let r=t,o=$r;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&PJ.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(O4,BJ);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!O4.test(a)){let l=a.replace(zJ,FJ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=sb}return new o(r,t)}function FJ(e){return"-"+e.toLowerCase()}function BJ(e){return e.charAt(1).toUpperCase()}const yA=cA([uA,_J,hA,pA,mA],"html"),A0=cA([uA,DJ,hA,pA,mA],"svg");function j4(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function HJ(e){return e.join(" ").trim()}var _l={},P2,M4;function UJ(){if(M4)return P2;M4=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
88
- `,d="/",g="*",h="",y="comment",x="declaration";function v(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var T=1,R=1;function L(Y){var H=Y.match(t);H&&(T+=H.length);var B=Y.lastIndexOf(f);R=~B?Y.length-B:R+Y.length}function j(){var Y={line:T,column:R};return function(H){return H.position=new N(Y),U(),H}}function N(Y){this.start=Y,this.end={line:T,column:R},this.source=k.source}N.prototype.content=E;function A(Y){var H=new Error(k.source+":"+T+":"+R+": "+Y);if(H.reason=Y,H.filename=k.source,H.line=T,H.column=R,H.source=E,!k.silent)throw H}function D(Y){var H=Y.exec(E);if(H){var B=H[0];return L(B),E=E.slice(B.length),H}}function U(){D(n)}function I(Y){var H;for(Y=Y||[];H=q();)H!==!1&&Y.push(H);return Y}function q(){var Y=j();if(!(d!=E.charAt(0)||g!=E.charAt(1))){for(var H=2;h!=E.charAt(H)&&(g!=E.charAt(H)||d!=E.charAt(H+1));)++H;if(H+=2,h===E.charAt(H-1))return A("End of comment missing");var B=E.slice(2,H-2);return R+=2,L(B),E=E.slice(H),R+=2,Y({type:y,comment:B})}}function $(){var Y=j(),H=D(r);if(H){if(q(),!D(o))return A("property missing ':'");var B=D(a),F=Y({type:x,property:S(H[0].replace(e,h)),value:B?S(B[0].replace(e,h)):h});return D(l),F}}function V(){var Y=[];I(Y);for(var H;H=$();)H!==!1&&(Y.push(H),I(Y));return Y}return U(),V()}function S(E){return E?E.replace(c,h):h}return P2=v,P2}var L4;function qJ(){if(L4)return _l;L4=1;var e=_l&&_l.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_l,"__esModule",{value:!0}),_l.default=n;const t=e(UJ());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),c=typeof o=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:d,value:g}=f;c?o(d,g,f):g&&(a=a||{},a[d]=g)}),a}return _l}var Mu={},_4;function VJ(){if(_4)return Mu;_4=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},l=function(d,g){return g.toUpperCase()},c=function(d,g){return"".concat(g,"-")},f=function(d,g){return g===void 0&&(g={}),a(d)?d:(d=d.toLowerCase(),g.reactCompat?d=d.replace(o,c):d=d.replace(r,c),d.replace(t,l))};return Mu.camelCase=f,Mu}var Lu,D4;function $J(){if(D4)return Lu;D4=1;var e=Lu&&Lu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(qJ()),n=VJ();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(l[(0,n.camelCase)(c,a)]=f)}),l}return r.default=r,Lu=r,Lu}var GJ=$J();const YJ=uc(GJ),xA=bA("end"),lb=bA("start");function bA(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function WJ(e){const t=lb(e),n=xA(e);if(t&&n)return{start:t,end:n}}function Xu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?I4(e.position):"start"in e||"end"in e?I4(e):"line"in e||"column"in e?iy(e):""}function iy(e){return z4(e&&e.line)+":"+z4(e&&e.column)}function I4(e){return iy(e&&e.start)+"-"+iy(e&&e.end)}function z4(e){return e&&typeof e=="number"?e:1}class wr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=Xu(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}wr.prototype.file="";wr.prototype.name="";wr.prototype.reason="";wr.prototype.message="";wr.prototype.stack="";wr.prototype.column=void 0;wr.prototype.line=void 0;wr.prototype.ancestors=void 0;wr.prototype.cause=void 0;wr.prototype.fatal=void 0;wr.prototype.place=void 0;wr.prototype.ruleId=void 0;wr.prototype.source=void 0;const cb={}.hasOwnProperty,KJ=new Map,QJ=/[A-Z]/g,XJ=new Set(["table","tbody","thead","tfoot","tr"]),ZJ=new Set(["td","th"]),vA="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JJ(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=see(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");r=aee(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?A0:yA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=wA(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function wA(e,t,n){if(t.type==="element")return eee(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tee(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ree(e,t,n);if(t.type==="mdxjsEsm")return nee(e,t);if(t.type==="root")return iee(e,t,n);if(t.type==="text")return oee(e,t)}function eee(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=A0,e.schema=o),e.ancestors.push(t);const a=CA(e,t.tagName,!1),l=lee(e,t);let c=fb(e,t);return XJ.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!MJ(f):!0})),SA(e,l,a,t),ub(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function tee(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}bf(e,t.position)}function nee(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bf(e,t.position)}function ree(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=A0,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:CA(e,t.name,!0),l=cee(e,t),c=fb(e,t);return SA(e,l,a,t),ub(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function iee(e,t,n){const r={};return ub(r,fb(e,t)),e.create(t,e.Fragment,r,n)}function oee(e,t){return t.value}function SA(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ub(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aee(e,t,n){return r;function r(o,a,l,c){const d=Array.isArray(l.children)?n:t;return c?d(a,l,c):d(a,l)}}function see(e,t){return n;function n(r,o,a,l){const c=Array.isArray(a.children),f=lb(r);return t(o,a,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function lee(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&cb.call(t.properties,o)){const a=uee(e,o,t.properties[o]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&ZJ.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cee(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else bf(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else bf(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function fb(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:KJ;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const d=o.get(f)||0;l=f+"-"+d,o.set(f,d+1)}}const c=wA(e,a,l);c!==void 0&&n.push(c)}return n}function uee(e,t,n){const r=gA(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?AJ(n):HJ(n)),r.property==="style"){let o=typeof n=="object"?n:fee(e,String(n));return e.stylePropertyNameCase==="css"&&(o=dee(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?IJ[r.property]||r.property:r.attribute,n]}}function fee(e,t){try{return YJ(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new wr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=vA+"#cannot-parse-style-attribute",o}}function CA(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const c=A4(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=A4(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return cb.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);bf(e)}function bf(e,t){const n=new wr("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=vA+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dee(e){const t={};let n;for(n in e)cb.call(e,n)&&(t[hee(n)]=e[n]);return t}function hee(e){let t=e.replace(QJ,pee);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pee(e){return"-"+e.toLowerCase()}const F2={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"]},mee={};function db(e,t){const n=mee,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return EA(e,r,o)}function EA(e,t,n){if(gee(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 P4(e.children,t,n)}return Array.isArray(e)?P4(e,t,n):""}function P4(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=EA(e[o],t,n);return r.join("")}function gee(e){return!!(e&&typeof e=="object")}const F4=document.createElement("i");function vf(e){const t="&"+e+";";F4.innerHTML=t;const n=F4.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function li(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function Ri(e,t){return e.length>0?(li(e,e.length,0,t),e):t}const B4={}.hasOwnProperty;function kA(e){const t={};let n=-1;for(;++n<e.length;)yee(t,e[n]);return t}function yee(e,t){let n;for(n in t){const o=(B4.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){B4.call(o,l)||(o[l]=[]);const c=a[l];xee(o[l],Array.isArray(c)?c:c?[c]:[])}}}function xee(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);li(e,0,0,r)}function TA(e,t){const 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?"�":String.fromCodePoint(n)}function Vi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Or=es(/[A-Za-z]/),yr=es(/[\dA-Za-z]/),bee=es(/[#-'*+\--9=?A-Z^-~]/);function Pp(e){return e!==null&&(e<32||e===127)}const oy=es(/\d/),vee=es(/[\dA-Fa-f]/),wee=es(/[!-/:-@[-`{-~]/);function ot(e){return e!==null&&e<-2}function sn(e){return e!==null&&(e<0||e===32)}function vt(e){return e===-2||e===-1||e===32}const R0=es(new RegExp("\\p{P}|\\p{S}","u")),Bs=es(/\s/);function es(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ec(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&yr(e.charCodeAt(n+1))&&yr(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function zt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return vt(f)?(e.enter(n),c(f)):t(f)}function c(f){return vt(f)&&a++<o?(e.consume(f),c):(e.exit(n),t(f))}}const See={tokenize:Cee};function Cee(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),zt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ot(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const Eee={tokenize:kee},H4={tokenize:Tee};function kee(e){const t=this,n=[];let r=0,o,a,l;return c;function c(R){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,f,d)(R)}return d(R)}function f(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const L=t.events.length;let j=L,N;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){N=t.events[j][1].end;break}k(r);let A=L;for(;A<t.events.length;)t.events[A][1].end={...N},A++;return li(t.events,j+1,0,t.events.slice(L)),t.events.length=A,d(R)}return c(R)}function d(R){if(r===n.length){if(!o)return y(R);if(o.currentConstruct&&o.currentConstruct.concrete)return v(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(H4,g,h)(R)}function g(R){return o&&T(),k(r),y(R)}function h(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,v(R)}function y(R){return t.containerState={},e.attempt(H4,x,v)(R)}function x(R){return r++,n.push([t.currentConstruct,t.containerState]),y(R)}function v(R){if(R===null){o&&T(),k(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return ot(R)?(e.consume(R),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),S)}function E(R,L){const j=t.sliceStream(R);if(L&&j.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(j),t.parser.lazy[R.start.line]){let N=o.events.length;for(;N--;)if(o.events[N][1].start.offset<l&&(!o.events[N][1].end||o.events[N][1].end.offset>l))return;const A=t.events.length;let D=A,U,I;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(U){I=t.events[D][1].end;break}U=!0}for(k(r),N=A;N<t.events.length;)t.events[N][1].end={...I},N++;li(t.events,D+1,0,t.events.slice(A)),t.events.length=N}}function k(R){let L=n.length;for(;L-- >R;){const j=n[L];t.containerState=j[1],j[0].exit.call(t,e)}n.length=R}function T(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Tee(e,t,n){return zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cc(e){if(e===null||sn(e)||Bs(e))return 1;if(R0(e))return 2}function N0(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ay={name:"attention",resolveAll:Aee,tokenize:Ree};function Aee(e,t){let n=-1,r,o,a,l,c,f,d,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},y={...e[n][1].start};U4(h,-f),U4(y,f),l={type:f>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Ri(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Ri(d,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),d=Ri(d,N0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Ri(d,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,d=Ri(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,li(e,r-1,n-r+3,d),n=r+d.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ree(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=cc(r);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const d=e.exit("attentionSequence"),g=cc(f),h=!g||g===2&&o||n.includes(f),y=!o||o===2&&g||n.includes(r);return d._open=!!(a===42?h:h&&(o||!y)),d._close=!!(a===42?y:y&&(g||!h)),t(f)}}function U4(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Nee={name:"autolink",tokenize:Oee};function Oee(e,t,n){let r=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(x){return Or(x)?(e.consume(x),l):x===64?n(x):d(x)}function l(x){return x===43||x===45||x===46||yr(x)?(r=1,c(x)):d(x)}function c(x){return x===58?(e.consume(x),r=0,f):(x===43||x===45||x===46||yr(x))&&r++<32?(e.consume(x),c):(r=0,d(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Pp(x)?n(x):(e.consume(x),f)}function d(x){return x===64?(e.consume(x),g):bee(x)?(e.consume(x),d):n(x)}function g(x){return yr(x)?h(x):n(x)}function h(x){return x===46?(e.consume(x),r=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):y(x)}function y(x){if((x===45||yr(x))&&r++<63){const v=x===45?y:h;return e.consume(x),v}return n(x)}}const $f={partial:!0,tokenize:jee};function jee(e,t,n){return r;function r(a){return vt(a)?zt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ot(a)?t(a):n(a)}}const AA={continuation:{tokenize:Lee},exit:_ee,name:"blockQuote",tokenize:Mee};function Mee(e,t,n){const r=this;return o;function o(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return vt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Lee(e,t,n){const r=this;return o;function o(l){return vt(l)?zt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(AA,t,n)(l)}}function _ee(e){e.exit("blockQuote")}const RA={name:"characterEscape",tokenize:Dee};function Dee(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return wee(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const NA={name:"characterReference",tokenize:Iee};function Iee(e,t,n){const r=this;let o=0,a,l;return c;function c(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),f}function f(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,l=yr,g(h))}function d(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=vee,g):(e.enter("characterReferenceValue"),a=7,l=oy,g(h))}function g(h){if(h===59&&o){const y=e.exit("characterReferenceValue");return l===yr&&!vf(r.sliceSerialize(y))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&o++<a?(e.consume(h),g):n(h)}}const q4={partial:!0,tokenize:Pee},V4={concrete:!0,name:"codeFenced",tokenize:zee};function zee(e,t,n){const r=this,o={partial:!0,tokenize:j};let a=0,l=0,c;return f;function f(N){return d(N)}function d(N){const A=r.events[r.events.length-1];return a=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===c?(l++,e.consume(N),g):l<3?n(N):(e.exit("codeFencedFenceSequence"),vt(N)?zt(e,h,"whitespace")(N):h(N))}function h(N){return N===null||ot(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(q4,S,L)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(N))}function y(N){return N===null||ot(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(N)):vt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),zt(e,x,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),y)}function x(N){return N===null||ot(N)?h(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===null||ot(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(N)):N===96&&N===c?n(N):(e.consume(N),v)}function S(N){return e.attempt(o,L,E)(N)}function E(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),k}function k(N){return a>0&&vt(N)?zt(e,T,"linePrefix",a+1)(N):T(N)}function T(N){return N===null||ot(N)?e.check(q4,S,L)(N):(e.enter("codeFlowValue"),R(N))}function R(N){return N===null||ot(N)?(e.exit("codeFlowValue"),T(N)):(e.consume(N),R)}function L(N){return e.exit("codeFenced"),t(N)}function j(N,A,D){let U=0;return I;function I(H){return N.enter("lineEnding"),N.consume(H),N.exit("lineEnding"),q}function q(H){return N.enter("codeFencedFence"),vt(H)?zt(N,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):$(H)}function $(H){return H===c?(N.enter("codeFencedFenceSequence"),V(H)):D(H)}function V(H){return H===c?(U++,N.consume(H),V):U>=l?(N.exit("codeFencedFenceSequence"),vt(H)?zt(N,Y,"whitespace")(H):Y(H)):D(H)}function Y(H){return H===null||ot(H)?(N.exit("codeFencedFence"),A(H)):D(H)}}}function Pee(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const B2={name:"codeIndented",tokenize:Bee},Fee={partial:!0,tokenize:Hee};function Bee(e,t,n){const r=this;return o;function o(d){return e.enter("codeIndented"),zt(e,a,"linePrefix",5)(d)}function a(d){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):ot(d)?e.attempt(Fee,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||ot(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function Hee(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):ot(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):zt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ot(l)?o(l):n(l)}}const Uee={name:"codeText",previous:Vee,resolve:qee,tokenize:$ee};function qee(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Vee(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $ee(e,t,n){let r=0,o,a;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),c(h)}function c(h){return h===96?(e.consume(h),r++,c):(e.exit("codeTextSequence"),f(h))}function f(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),f):h===96?(a=e.enter("codeTextSequence"),o=0,g(h)):ot(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||ot(h)?(e.exit("codeTextData"),f(h)):(e.consume(h),d)}function g(h){return h===96?(e.consume(h),o++,g):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",d(h))}}class Gee{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){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&_u(this.left,r),a.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),_u(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),_u(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){const n=this.left.splice(t,Number.POSITIVE_INFINITY);_u(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);_u(this.left,n.reverse())}}}function _u(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}function OA(e){const t={};let n=-1,r,o,a,l,c,f,d;const g=new Gee(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Yee(g,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=g.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...g.get(o)[1].start},c=g.slice(o,n),c.unshift(r),g.splice(o,n-o+1,c))}}return li(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!d}function Yee(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],d={};let g,h,y=-1,x=n,v=0,S=0;const E=[S];for(;x;){for(;e.get(++o)[1]!==x;);a.push(o),x._tokenizer||(g=r.sliceStream(x),x.next||g.push(null),h&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=x,x=x.next}for(x=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(S=y+1,E.push(S),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):E.pop(),y=E.length;y--;){const k=c.slice(E[y],E[y+1]),T=a.pop();f.push([T,T+k.length-1]),e.splice(T,2,k)}for(f.reverse(),y=-1;++y<f.length;)d[v+f[y][0]]=v+f[y][1],v+=f[y][1]-f[y][0]-1;return d}const Wee={resolve:Qee,tokenize:Xee},Kee={partial:!0,tokenize:Zee};function Qee(e){return OA(e),e}function Xee(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):ot(c)?e.check(Kee,l,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Zee(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),zt(e,a,"linePrefix")}function a(l){if(l===null||ot(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function jA(e,t,n,r,o,a,l,c,f){const d=f||Number.POSITIVE_INFINITY;let g=0;return h;function h(k){return k===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(k),e.exit(a),y):k===null||k===32||k===41||Pp(k)?n(k):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(k))}function y(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===62?(e.exit("chunkString"),e.exit(c),y(k)):k===null||k===60||ot(k)?n(k):(e.consume(k),k===92?v:x)}function v(k){return k===60||k===62||k===92?(e.consume(k),x):x(k)}function S(k){return!g&&(k===null||k===41||sn(k))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(k)):g<d&&k===40?(e.consume(k),g++,S):k===41?(e.consume(k),g--,S):k===null||k===32||k===40||Pp(k)?n(k):(e.consume(k),k===92?E:S)}function E(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function MA(e,t,n,r,o,a){const l=this;let c=0,f;return d;function d(x){return e.enter(r),e.enter(o),e.consume(x),e.exit(o),e.enter(a),g}function g(x){return c>999||x===null||x===91||x===93&&!f||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(a),e.enter(o),e.consume(x),e.exit(o),e.exit(r),t):ot(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===null||x===91||x===93||ot(x)||c++>999?(e.exit("chunkString"),g(x)):(e.consume(x),f||(f=!vt(x)),x===92?y:h)}function y(x){return x===91||x===92||x===93?(e.consume(x),c++,h):h(x)}}function LA(e,t,n,r,o,a){let l;return c;function c(y){return y===34||y===39||y===40?(e.enter(r),e.enter(o),e.consume(y),e.exit(o),l=y===40?41:y,f):n(y)}function f(y){return y===l?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):(e.enter(a),d(y))}function d(y){return y===l?(e.exit(a),f(l)):y===null?n(y):ot(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),zt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===l||y===null||ot(y)?(e.exit("chunkString"),d(y)):(e.consume(y),y===92?h:g)}function h(y){return y===l||y===92?(e.consume(y),g):g(y)}}function Zu(e,t){let n;return r;function r(o){return ot(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):vt(o)?zt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Jee={name:"definition",tokenize:tte},ete={partial:!0,tokenize:nte};function tte(e,t,n){const r=this;let o;return a;function a(x){return e.enter("definition"),l(x)}function l(x){return MA.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return o=Vi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return sn(x)?Zu(e,d)(x):d(x)}function d(x){return jA(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(ete,h,h)(x)}function h(x){return vt(x)?zt(e,y,"whitespace")(x):y(x)}function y(x){return x===null||ot(x)?(e.exit("definition"),r.parser.defined.push(o),t(x)):n(x)}}function nte(e,t,n){return r;function r(c){return sn(c)?Zu(e,o)(c):n(c)}function o(c){return LA(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return vt(c)?zt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ot(c)?t(c):n(c)}}const rte={name:"hardBreakEscape",tokenize:ite};function ite(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ot(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const ote={name:"headingAtx",resolve:ate,tokenize:ste};function ate(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},li(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function ste(e,t,n){let r=0;return o;function o(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||sn(g)?(e.exit("atxHeadingSequence"),c(g)):n(g)}function c(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||ot(g)?(e.exit("atxHeading"),t(g)):vt(g)?zt(e,c,"whitespace")(g):(e.enter("atxHeadingText"),d(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),c(g))}function d(g){return g===null||g===35||sn(g)?(e.exit("atxHeadingText"),c(g)):(e.consume(g),d)}}const lte=["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"],$4=["pre","script","style","textarea"],cte={concrete:!0,name:"htmlFlow",resolveTo:dte,tokenize:hte},ute={partial:!0,tokenize:mte},fte={partial:!0,tokenize:pte};function dte(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 hte(e,t,n){const r=this;let o,a,l,c,f;return d;function d(_){return g(_)}function g(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),y):_===47?(e.consume(_),a=!0,S):_===63?(e.consume(_),o=3,r.interrupt?t:M):Or(_)?(e.consume(_),l=String.fromCharCode(_),E):n(_)}function y(_){return _===45?(e.consume(_),o=2,x):_===91?(e.consume(_),o=5,c=0,v):Or(_)?(e.consume(_),o=4,r.interrupt?t:M):n(_)}function x(_){return _===45?(e.consume(_),r.interrupt?t:M):n(_)}function v(_){const ee="CDATA[";return _===ee.charCodeAt(c++)?(e.consume(_),c===ee.length?r.interrupt?t:$:v):n(_)}function S(_){return Or(_)?(e.consume(_),l=String.fromCharCode(_),E):n(_)}function E(_){if(_===null||_===47||_===62||sn(_)){const ee=_===47,J=l.toLowerCase();return!ee&&!a&&$4.includes(J)?(o=1,r.interrupt?t(_):$(_)):lte.includes(l.toLowerCase())?(o=6,ee?(e.consume(_),k):r.interrupt?t(_):$(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?T(_):R(_))}return _===45||yr(_)?(e.consume(_),l+=String.fromCharCode(_),E):n(_)}function k(_){return _===62?(e.consume(_),r.interrupt?t:$):n(_)}function T(_){return vt(_)?(e.consume(_),T):I(_)}function R(_){return _===47?(e.consume(_),I):_===58||_===95||Or(_)?(e.consume(_),L):vt(_)?(e.consume(_),R):I(_)}function L(_){return _===45||_===46||_===58||_===95||yr(_)?(e.consume(_),L):j(_)}function j(_){return _===61?(e.consume(_),N):vt(_)?(e.consume(_),j):R(_)}function N(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),f=_,A):vt(_)?(e.consume(_),N):D(_)}function A(_){return _===f?(e.consume(_),f=null,U):_===null||ot(_)?n(_):(e.consume(_),A)}function D(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||sn(_)?j(_):(e.consume(_),D)}function U(_){return _===47||_===62||vt(_)?R(_):n(_)}function I(_){return _===62?(e.consume(_),q):n(_)}function q(_){return _===null||ot(_)?$(_):vt(_)?(e.consume(_),q):n(_)}function $(_){return _===45&&o===2?(e.consume(_),B):_===60&&o===1?(e.consume(_),F):_===62&&o===4?(e.consume(_),P):_===63&&o===3?(e.consume(_),M):_===93&&o===5?(e.consume(_),ie):ot(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ute,Q,V)(_)):_===null||ot(_)?(e.exit("htmlFlowData"),V(_)):(e.consume(_),$)}function V(_){return e.check(fte,Y,Q)(_)}function Y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),H}function H(_){return _===null||ot(_)?V(_):(e.enter("htmlFlowData"),$(_))}function B(_){return _===45?(e.consume(_),M):$(_)}function F(_){return _===47?(e.consume(_),l="",G):$(_)}function G(_){if(_===62){const ee=l.toLowerCase();return $4.includes(ee)?(e.consume(_),P):$(_)}return Or(_)&&l.length<8?(e.consume(_),l+=String.fromCharCode(_),G):$(_)}function ie(_){return _===93?(e.consume(_),M):$(_)}function M(_){return _===62?(e.consume(_),P):_===45&&o===2?(e.consume(_),M):$(_)}function P(_){return _===null||ot(_)?(e.exit("htmlFlowData"),Q(_)):(e.consume(_),P)}function Q(_){return e.exit("htmlFlow"),t(_)}}function pte(e,t,n){const r=this;return o;function o(l){return ot(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function mte(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt($f,t,n)}}const gte={name:"htmlText",tokenize:yte};function yte(e,t,n){const r=this;let o,a,l;return c;function c(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),f}function f(M){return M===33?(e.consume(M),d):M===47?(e.consume(M),j):M===63?(e.consume(M),R):Or(M)?(e.consume(M),D):n(M)}function d(M){return M===45?(e.consume(M),g):M===91?(e.consume(M),a=0,v):Or(M)?(e.consume(M),T):n(M)}function g(M){return M===45?(e.consume(M),x):n(M)}function h(M){return M===null?n(M):M===45?(e.consume(M),y):ot(M)?(l=h,F(M)):(e.consume(M),h)}function y(M){return M===45?(e.consume(M),x):h(M)}function x(M){return M===62?B(M):M===45?y(M):h(M)}function v(M){const P="CDATA[";return M===P.charCodeAt(a++)?(e.consume(M),a===P.length?S:v):n(M)}function S(M){return M===null?n(M):M===93?(e.consume(M),E):ot(M)?(l=S,F(M)):(e.consume(M),S)}function E(M){return M===93?(e.consume(M),k):S(M)}function k(M){return M===62?B(M):M===93?(e.consume(M),k):S(M)}function T(M){return M===null||M===62?B(M):ot(M)?(l=T,F(M)):(e.consume(M),T)}function R(M){return M===null?n(M):M===63?(e.consume(M),L):ot(M)?(l=R,F(M)):(e.consume(M),R)}function L(M){return M===62?B(M):R(M)}function j(M){return Or(M)?(e.consume(M),N):n(M)}function N(M){return M===45||yr(M)?(e.consume(M),N):A(M)}function A(M){return ot(M)?(l=A,F(M)):vt(M)?(e.consume(M),A):B(M)}function D(M){return M===45||yr(M)?(e.consume(M),D):M===47||M===62||sn(M)?U(M):n(M)}function U(M){return M===47?(e.consume(M),B):M===58||M===95||Or(M)?(e.consume(M),I):ot(M)?(l=U,F(M)):vt(M)?(e.consume(M),U):B(M)}function I(M){return M===45||M===46||M===58||M===95||yr(M)?(e.consume(M),I):q(M)}function q(M){return M===61?(e.consume(M),$):ot(M)?(l=q,F(M)):vt(M)?(e.consume(M),q):U(M)}function $(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),o=M,V):ot(M)?(l=$,F(M)):vt(M)?(e.consume(M),$):(e.consume(M),Y)}function V(M){return M===o?(e.consume(M),o=void 0,H):M===null?n(M):ot(M)?(l=V,F(M)):(e.consume(M),V)}function Y(M){return M===null||M===34||M===39||M===60||M===61||M===96?n(M):M===47||M===62||sn(M)?U(M):(e.consume(M),Y)}function H(M){return M===47||M===62||sn(M)?U(M):n(M)}function B(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):n(M)}function F(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),G}function G(M){return vt(M)?zt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):ie(M)}function ie(M){return e.enter("htmlTextData"),l(M)}}const hb={name:"labelEnd",resolveAll:wte,resolveTo:Ste,tokenize:Cte},xte={tokenize:Ete},bte={tokenize:kte},vte={tokenize:Tte};function wte(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&li(e,0,e.length,n),e}function Ste(e,t){let n=e.length,r=0,o,a,l,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",d,t]],c=Ri(c,e.slice(a+1,a+r+3)),c=Ri(c,[["enter",g,t]]),c=Ri(c,N0(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=Ri(c,[["exit",g,t],e[l-2],e[l-1],["exit",d,t]]),c=Ri(c,e.slice(l+1)),c=Ri(c,[["exit",f,t]]),li(e,a,e.length,c),e}function Cte(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(y){return a?a._inactive?h(y):(l=r.parser.defined.includes(Vi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(xte,g,l?g:h)(y):y===91?e.attempt(bte,g,l?d:h)(y):l?g(y):h(y)}function d(y){return e.attempt(vte,g,h)(y)}function g(y){return t(y)}function h(y){return a._balanced=!0,n(y)}}function Ete(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return sn(h)?Zu(e,a)(h):a(h)}function a(h){return h===41?g(h):jA(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return sn(h)?Zu(e,f)(h):g(h)}function c(h){return n(h)}function f(h){return h===34||h===39||h===40?LA(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):g(h)}function d(h){return sn(h)?Zu(e,g)(h):g(h)}function g(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function kte(e,t,n){const r=this;return o;function o(c){return MA.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Vi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Tte(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ate={name:"labelStartImage",resolveAll:hb.resolveAll,tokenize:Rte};function Rte(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Nte={name:"labelStartLink",resolveAll:hb.resolveAll,tokenize:Ote};function Ote(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const H2={name:"lineEnding",tokenize:jte};function jte(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),zt(e,t,"linePrefix")}}const rp={name:"thematicBreak",tokenize:Mte};function Mte(e,t,n){let r=0,o;return a;function a(d){return e.enter("thematicBreak"),l(d)}function l(d){return o=d,c(d)}function c(d){return d===o?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||ot(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===o?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),vt(d)?zt(e,c,"whitespace")(d):c(d))}}const Fr={continuation:{tokenize:Ite},exit:Pte,name:"list",tokenize:Dte},Lte={partial:!0,tokenize:Fte},_te={partial:!0,tokenize:zte};function Dte(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(x){const v=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:oy(x)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(rp,n,d)(x):d(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return oy(x)&&++l<10?(e.consume(x),f):(!r.interrupt||l<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),d(x)):n(x)}function d(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check($f,r.interrupt?n:g,e.attempt(Lte,y,h))}function g(x){return r.containerState.initialBlankLine=!0,a++,y(x)}function h(x){return vt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):n(x)}function y(x){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Ite(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($f,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,zt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!vt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_te,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,zt(e,e.attempt(Fr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function zte(e,t,n){const r=this;return zt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function Pte(e){e.exit(this.containerState.type)}function Fte(e,t,n){const r=this;return zt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!vt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const G4={name:"setextUnderline",resolveTo:Bte,tokenize:Hte};function Bte(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Hte(e,t,n){const r=this;let o;return a;function a(d){let g=r.events.length,h;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){h=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===o?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),vt(d)?zt(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||ot(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Ute={tokenize:qte};function qte(e){const t=this,n=e.attempt($f,r,e.attempt(this.parser.constructs.flowInitial,o,zt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Wee,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Vte={resolveAll:DA()},$te=_A("string"),Gte=_A("text");function _A(e){return{resolveAll:DA(e==="text"?Yte:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,c);return l;function l(g){return d(g)?a(g):c(g)}function c(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),f}function f(g){return d(g)?(n.exit("data"),a(g)):(n.consume(g),f)}function d(g){if(g===null)return!0;const h=o[g];let y=-1;if(h)for(;++y<h.length;){const x=h[y];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function DA(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Yte(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,c=0,f;for(;a--;){const d=o[a];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Wte={42:Fr,43:Fr,45:Fr,48:Fr,49:Fr,50:Fr,51:Fr,52:Fr,53:Fr,54:Fr,55:Fr,56:Fr,57:Fr,62:AA},Kte={91:Jee},Qte={[-2]:B2,[-1]:B2,32:B2},Xte={35:ote,42:rp,45:[G4,rp],60:cte,61:G4,95:rp,96:V4,126:V4},Zte={38:NA,92:RA},Jte={[-5]:H2,[-4]:H2,[-3]:H2,33:Ate,38:NA,42:ay,60:[Nee,gte],91:Nte,92:[rte,RA],93:hb,95:ay,96:Uee},ene={null:[ay,Vte]},tne={null:[42,95]},nne={null:[]},rne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tne,contentInitial:Kte,disable:nne,document:Wte,flow:Xte,flowInitial:Qte,insideSpan:ene,string:Zte,text:Jte},Symbol.toStringTag,{value:"Module"}));function ine(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],c=[];const f={attempt:A(j),check:A(N),consume:T,enter:R,exit:L,interrupt:A(N,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:v,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:h};let g=t.tokenize.call(d,f);return t.resolveAll&&a.push(t),d;function h(q){return l=Ri(l,q),E(),l[l.length-1]!==null?[]:(D(t,0),d.events=N0(a,d.events,d),d.events)}function y(q,$){return ane(x(q),$)}function x(q){return one(l,q)}function v(){const{_bufferIndex:q,_index:$,line:V,column:Y,offset:H}=r;return{_bufferIndex:q,_index:$,line:V,column:Y,offset:H}}function S(q){o[q.line]=q.column,I()}function E(){let q;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<$.length;)k($.charCodeAt(r._bufferIndex));else k($)}}function k(q){g=g(q)}function T(q){ot(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,I()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=q}function R(q,$){const V=$||{};return V.type=q,V.start=v(),d.events.push(["enter",V,d]),c.push(V),V}function L(q){const $=c.pop();return $.end=v(),d.events.push(["exit",$,d]),$}function j(q,$){D(q,$.from)}function N(q,$){$.restore()}function A(q,$){return V;function V(Y,H,B){let F,G,ie,M;return Array.isArray(Y)?Q(Y):"tokenize"in Y?Q([Y]):P(Y);function P(re){return pe;function pe(fe){const Ce=fe!==null&&re[fe],Ee=fe!==null&&re.null,Ie=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return Q(Ie)(fe)}}function Q(re){return F=re,G=0,re.length===0?B:_(re[G])}function _(re){return pe;function pe(fe){return M=U(),ie=re,re.partial||(d.currentConstruct=re),re.name&&d.parser.constructs.disable.null.includes(re.name)?J():re.tokenize.call($?Object.assign(Object.create(d),$):d,f,ee,J)(fe)}}function ee(re){return q(ie,M),H}function J(re){return M.restore(),++G<F.length?_(F[G]):B}}}function D(q,$){q.resolveAll&&!a.includes(q)&&a.push(q),q.resolve&&li(d.events,$,d.events.length-$,q.resolve(d.events.slice($),d)),q.resolveTo&&(d.events=q.resolveTo(d.events,d))}function U(){const q=v(),$=d.previous,V=d.currentConstruct,Y=d.events.length,H=Array.from(c);return{from:Y,restore:B};function B(){r=q,d.previous=$,d.currentConstruct=V,d.events.length=Y,c=H,I()}}function I(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function one(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function ane(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
89
- `;break}case-3:{l=`\r
90
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function sne(e){const r={constructs:kA([rne,...(e||{}).extensions||[]]),content:o(See),defined:[],document:o(Eee),flow:o(Ute),lazy:{},string:o($te),text:o(Gte)};return r;function o(a){return l;function l(c){return ine(r,a,c)}}}function lne(e){for(;!OA(e););return e}const Y4=/[\0\t\n\r]/g;function cne(){let e=1,t="",n=!0,r;return o;function o(a,l,c){const f=[];let d,g,h,y,x;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(Y4.lastIndex=h,d=Y4.exec(a),y=d&&d.index!==void 0?d.index:a.length,x=a.charCodeAt(y),!d){t=a.slice(h);break}if(x===10&&h===y&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),h<y&&(f.push(a.slice(h,y)),e+=y-h),x){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}h=y+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const une=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fne(e){return e.replace(une,dne)}function dne(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return TA(n.slice(a?2:1),a?16:10)}return vf(n)||e}const IA={}.hasOwnProperty;function hne(e,t,n){return typeof t!="string"&&(n=t,t=void 0),pne(n)(lne(sne(n).document().write(cne()(e,t,!0))))}function pne(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(he),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(ye),blockQuote:a(Ee),characterEscape:U,characterReference:U,codeFenced:a(Ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ie,l),codeText:a(Ye,l),codeTextData:U,data:U,codeFlowValue:U,definition:a(je),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(_e),hardBreakEscape:a(We),hardBreakTrailing:a(We),htmlFlow:a(Te,l),htmlFlowData:U,htmlText:a(Te,l),htmlTextData:U,image:a(Re),label:l,link:a(he),listItem:a(ne),listItemValue:y,listOrdered:a(Se,h),listUnordered:a(Se),paragraph:a(xe),reference:_,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(ye),strong:a(ze),thematicBreak:a(wt)},exit:{atxHeading:f(),atxHeadingSequence:j,autolink:f(),autolinkEmail:Ce,autolinkProtocol:fe,blockQuote:f(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:re,characterReference:pe,codeFenced:f(E),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:I,codeIndented:f(k),codeText:f(H),codeTextData:I,data:I,definition:f(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:R,emphasis:f(),hardBreakEscape:f($),hardBreakTrailing:f($),htmlFlow:f(V),htmlFlowData:I,htmlText:f(Y),htmlTextData:I,image:f(F),label:ie,labelText:G,lineEnding:q,link:f(B),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ee,resourceDestinationString:M,resourceTitleString:P,resource:Q,setextHeading:f(D),setextHeadingLineSequence:A,setextHeadingText:N,strong:f(),thematicBreak:f()}};zA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let ve={type:"root",children:[]};const Oe={stack:[ve],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:g,data:n},Me=[];let He=-1;for(;++He<ae.length;)if(ae[He][1].type==="listOrdered"||ae[He][1].type==="listUnordered")if(ae[He][0]==="enter")Me.push(He);else{const kt=Me.pop();He=o(ae,kt,He)}for(He=-1;++He<ae.length;){const kt=t[ae[He][0]];IA.call(kt,ae[He][1].type)&&kt[ae[He][1].type].call(Object.assign({sliceSerialize:ae[He][2].sliceSerialize},Oe),ae[He][1])}if(Oe.tokenStack.length>0){const kt=Oe.tokenStack[Oe.tokenStack.length-1];(kt[1]||W4).call(Oe,void 0,kt[0])}for(ve.position={start:ka(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ka(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)ve=t.transforms[He](ve)||ve;return ve}function o(ae,ve,Oe){let Me=ve-1,He=-1,kt=!1,Ft,Xe,Ve,pt;for(;++Me<=Oe;){const mt=ae[Me];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?He++:He--,pt=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Ft&&!pt&&!He&&!Ve&&(Ve=Me),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!He&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||He===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Ft){let Qe=Me;for(Xe=void 0;Qe--;){const yt=ae[Qe];if(yt[1].type==="lineEnding"||yt[1].type==="lineEndingBlank"){if(yt[0]==="exit")continue;Xe&&(ae[Xe][1].type="lineEndingBlank",kt=!0),yt[1].type="lineEnding",Xe=Qe}else if(!(yt[1].type==="linePrefix"||yt[1].type==="blockQuotePrefix"||yt[1].type==="blockQuotePrefixWhitespace"||yt[1].type==="blockQuoteMarker"||yt[1].type==="listItemIndent"))break}Ve&&(!Xe||Ve<Xe)&&(Ft._spread=!0),Ft.end=Object.assign({},Xe?ae[Xe][1].start:mt[1].end),ae.splice(Xe||Me,0,["exit",Ft,mt[2]]),Me++,Oe++}if(mt[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Ft=Qe,ae.splice(Me,0,["enter",Qe,mt[2]]),Me++,Oe++,Ve=void 0,pt=!0}}}return ae[ve][1]._spread=kt,Oe}function a(ae,ve){return Oe;function Oe(Me){c.call(this,ae(Me),Me),ve&&ve.call(this,Me)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ae,ve,Oe){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ve,Oe||void 0]),ae.position={start:ka(ve.start),end:void 0}}function f(ae){return ve;function ve(Oe){ae&&ae.call(this,Oe),d.call(this,Oe)}}function d(ae,ve){const Oe=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ae.type&&(ve?ve.call(this,ae,Me[0]):(Me[1]||W4).call(this,ae,Me[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Xu({start:ae.start,end:ae.end})+"): it’s not open");Oe.position.end=ka(ae.end)}function g(){return db(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(ae){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ae}function v(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ae}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/(\r?\n|\r)$/g,"")}function T(ae){const ve=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ve,Oe.identifier=Vi(this.sliceSerialize(ae)).toLowerCase()}function R(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function L(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function j(ae){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Oe=this.sliceSerialize(ae).length;ve.depth=Oe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function A(ae){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function U(ae){const Oe=this.stack[this.stack.length-1].children;let Me=Oe[Oe.length-1];(!Me||Me.type!=="text")&&(Me=Ue(),Me.position={start:ka(ae.start),end:void 0},Oe.push(Me)),this.stack.push(Me)}function I(ae){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ae),ve.position.end=ka(ae.end)}function q(ae){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=ve.children[ve.children.length-1];Oe.position.end=ka(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&(U.call(this,ae),I.call(this,ae))}function $(){this.data.atHardBreak=!0}function V(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function Y(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function H(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function F(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function G(ae){const ve=this.sliceSerialize(ae),Oe=this.stack[this.stack.length-2];Oe.label=fne(ve),Oe.identifier=Vi(ve).toLowerCase()}function ie(){const ae=this.stack[this.stack.length-1],ve=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const Me=ae.children;Oe.children=Me}else Oe.alt=ve}function M(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function P(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function Q(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ee(ae){const ve=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ve,Oe.identifier=Vi(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function J(ae){this.data.characterReferenceType=ae.type}function re(ae){const ve=this.sliceSerialize(ae),Oe=this.data.characterReferenceType;let Me;Oe?(Me=TA(ve,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=vf(ve);const He=this.stack[this.stack.length-1];He.value+=Me}function pe(ae){const ve=this.stack.pop();ve.position.end=ka(ae.end)}function fe(ae){I.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ae)}function Ce(ae){I.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ae)}function Ee(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _e(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function We(){return{type:"break"}}function Te(){return{type:"html",value:""}}function Re(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function Se(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function ne(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function xe(){return{type:"paragraph",children:[]}}function ze(){return{type:"strong",children:[]}}function Ue(){return{type:"text",value:""}}function wt(){return{type:"thematicBreak"}}}function ka(e){return{line:e.line,column:e.column,offset:e.offset}}function zA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?zA(e,r):mne(e,r)}}function mne(e,t){let n;for(n in t)if(IA.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function W4(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is still open")}function gne(e){const t=this;t.parser=n;function n(r){return hne(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yne(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function xne(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
91
- `}]}function bne(e,t){const n=t.value?t.value+`
92
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function vne(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wne(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sne(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Ec(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function Cne(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ene(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PA(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function kne(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PA(e,t);const o={src:Ec(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function Tne(e,t){const n={src:Ec(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ane(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Rne(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PA(e,t);const o={href:Ec(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Nne(e,t){const n={href:Ec(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function One(e,t,n){const r=e.all(t),o=n?jne(n):FA(t),a={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let h;g&&g.type==="element"&&g.tagName==="p"?h=g:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const g=r[c];(o||c!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
93
- `}),g.type==="element"&&g.tagName==="p"&&!o?l.push(...g.children):l.push(g)}const f=r[r.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
94
- `});const d={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,d),e.applyData(t,d)}function jne(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=FA(n[r])}return t}function FA(e){const t=e.spread;return t??e.children.length>1}function Mne(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Lne(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _ne(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Dne(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ine(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=lb(t.children[1]),f=xA(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),o.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function zne(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const d=[];for(;++f<c;){const h=t.children[f],y={},x=l?l[f]:void 0;x&&(y.align=x);let v={type:"element",tagName:a,properties:y,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),d.push(v)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,g),e.applyData(t,g)}function Pne(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const K4=9,Q4=32;function Fne(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(X4(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(X4(t.slice(o),o>0,!1)),a.join("")}function X4(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===K4||a===Q4;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===K4||a===Q4;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Bne(e,t){const n={type:"text",value:Fne(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hne(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Une={blockquote:yne,break:xne,code:bne,delete:vne,emphasis:wne,footnoteReference:Sne,heading:Cne,html:Ene,imageReference:kne,image:Tne,inlineCode:Ane,linkReference:Rne,link:Nne,listItem:One,list:Mne,paragraph:Lne,root:_ne,strong:Dne,table:Ine,tableCell:Pne,tableRow:zne,text:Bne,thematicBreak:Hne,toml:jh,yaml:jh,definition:jh,footnoteDefinition:jh};function jh(){}const BA=-1,O0=0,Ju=1,Fp=2,pb=3,mb=4,gb=5,yb=6,HA=7,UA=8,Z4=typeof self=="object"?self:globalThis,qne=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,l]=t[o];switch(a){case O0:case BA:return n(l,o);case Ju:{const c=n([],o);for(const f of l)c.push(r(f));return c}case Fp:{const c=n({},o);for(const[f,d]of l)c[r(f)]=r(d);return c}case pb:return n(new Date(l),o);case mb:{const{source:c,flags:f}=l;return n(new RegExp(c,f),o)}case gb:{const c=n(new Map,o);for(const[f,d]of l)c.set(r(f),r(d));return c}case yb:{const c=n(new Set,o);for(const f of l)c.add(r(f));return c}case HA:{const{name:c,message:f}=l;return n(new Z4[c](f),o)}case UA:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new Z4[a](l),o)};return r},J4=e=>qne(new Map,e)(0),Dl="",{toString:Vne}={},{keys:$ne}=Object,Du=e=>{const t=typeof e;if(t!=="object"||!e)return[O0,t];const n=Vne.call(e).slice(8,-1);switch(n){case"Array":return[Ju,Dl];case"Object":return[Fp,Dl];case"Date":return[pb,Dl];case"RegExp":return[mb,Dl];case"Map":return[gb,Dl];case"Set":return[yb,Dl];case"DataView":return[Ju,n]}return n.includes("Array")?[Ju,n]:n.includes("Error")?[HA,n]:[Fp,n]},Mh=([e,t])=>e===O0&&(t==="function"||t==="symbol"),Gne=(e,t,n,r)=>{const o=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},a=l=>{if(n.has(l))return n.get(l);let[c,f]=Du(l);switch(c){case O0:{let g=l;switch(f){case"bigint":c=UA,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return o([BA],l)}return o([c,g],l)}case Ju:{if(f){let y=l;return f==="DataView"?y=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(l)),o([f,[...y]],l)}const g=[],h=o([c,g],l);for(const y of l)g.push(a(y));return h}case Fp:{if(f)switch(f){case"BigInt":return o([f,l.toString()],l);case"Boolean":case"Number":case"String":return o([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const g=[],h=o([c,g],l);for(const y of $ne(l))(e||!Mh(Du(l[y])))&&g.push([a(y),a(l[y])]);return h}case pb:return o([c,l.toISOString()],l);case mb:{const{source:g,flags:h}=l;return o([c,{source:g,flags:h}],l)}case gb:{const g=[],h=o([c,g],l);for(const[y,x]of l)(e||!(Mh(Du(y))||Mh(Du(x))))&&g.push([a(y),a(x)]);return h}case yb:{const g=[],h=o([c,g],l);for(const y of l)(e||!Mh(Du(y)))&&g.push(a(y));return h}}const{message:d}=l;return o([c,{name:f,message:d}],l)};return a},eE=(e,{json:t,lossy:n}={})=>{const r=[];return Gne(!(t||n),!!t,new Map,r)(e),r},Bp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?J4(eE(e,t)):structuredClone(e):(e,t)=>J4(eE(e,t));function Yne(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Wne(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Kne(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Yne,r=e.options.footnoteBackLabel||Wne,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const g=e.all(d),h=String(d.identifier).toUpperCase(),y=Ec(h.toLowerCase());let x=0;const v=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++x<=S;){v.length>0&&v.push({type:"text",value:" "});let T=typeof n=="string"?n:n(f,x);typeof T=="string"&&(T={type:"text",value:T}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,x),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const T=E.children[E.children.length-1];T&&T.type==="text"?T.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...v)}else g.push(...v);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(d,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Bp(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
95
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
96
- `}]}}const j0=(function(e){if(e==null)return Jne;if(typeof e=="function")return M0(e);if(typeof e=="object")return Array.isArray(e)?Qne(e):Xne(e);if(typeof e=="string")return Zne(e);throw new Error("Expected function, string, or object as test")});function Qne(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=j0(e[n]);return M0(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function Xne(e){const t=e;return M0(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function Zne(e){return M0(t);function t(n){return n&&n.type===e}}function M0(e){return t;function t(n,r,o){return!!(ere(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Jne(){return!0}function ere(e){return e!==null&&typeof e=="object"&&"type"in e}const qA=[],tre=!0,sy=!1,nre="skip";function VA(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=j0(o),l=r?-1:1;c(e,void 0,[])();function c(f,d,g){const h=f&&typeof f=="object"?f:{};if(typeof h.type=="string"){const x=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=qA,v,S,E;if((!t||a(f,d,g[g.length-1]||void 0))&&(x=rre(n(f,g)),x[0]===sy))return x;if("children"in f&&f.children){const k=f;if(k.children&&x[0]!==nre)for(S=(r?k.children.length:-1)+l,E=g.concat(k);S>-1&&S<k.children.length;){const T=k.children[S];if(v=c(T,S,E)(),v[0]===sy)return v;S=typeof v[1]=="number"?v[1]:S+l}}return x}}}function rre(e){return Array.isArray(e)?e:typeof e=="number"?[tre,e]:e==null?qA:[e]}function xb(e,t,n,r){let o,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,o=n):(a=t,l=n,o=r),VA(e,a,c,o);function c(f,d){const g=d[d.length-1],h=g?g.children.indexOf(f):void 0;return l(f,h,g)}}const ly={}.hasOwnProperty,ire={};function ore(e,t){const n=t||ire,r=new Map,o=new Map,a=new Map,l={...Une,...n.handlers},c={all:d,applyData:sre,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:n,patch:are,wrap:cre};return xb(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const h=g.type==="definition"?r:o,y=String(g.identifier).toUpperCase();h.has(y)||h.set(y,g)}}),c;function f(g,h){const y=g.type,x=c.handlers[y];if(ly.call(c.handlers,y)&&x)return x(c,g,h);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in g){const{children:S,...E}=g,k=Bp(E);return k.children=c.all(g),k}return Bp(g)}return(c.options.unknownHandler||lre)(c,g,h)}function d(g){const h=[];if("children"in g){const y=g.children;let x=-1;for(;++x<y.length;){const v=c.one(y[x],g);if(v){if(x&&y[x-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=tE(v.value)),!Array.isArray(v)&&v.type==="element")){const S=v.children[0];S&&S.type==="text"&&(S.value=tE(S.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function are(e,t){e.position&&(t.position=WJ(e))}function sre(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Bp(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function lre(e,t){const n=t.data||{},r="value"in t&&!(ly.call(n,"hProperties")||ly.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cre(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
97
- `});++r<e.length;)r&&n.push({type:"text",value:`
98
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
99
- `}),n}function tE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nE(e,t){const n=ore(e,t),r=n.one(e,void 0),o=Kne(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
100
- `},o),a}function ure(e,t){return e&&"run"in e?async function(n,r){const o=nE(n,{file:r,...t});await e.run(o,r)}:function(n,r){return nE(n,{file:r,...e||t})}}function rE(e){if(e)throw e}var U2,iE;function fre(){if(iE)return U2;iE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var g=e.call(d,"constructor"),h=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!g&&!h)return!1;var y;for(y in d);return typeof y>"u"||e.call(d,y)},l=function(d,g){n&&g.name==="__proto__"?n(d,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):d[g.name]=g.newValue},c=function(d,g){if(g==="__proto__")if(e.call(d,g)){if(r)return r(d,g).value}else return;return d[g]};return U2=function f(){var d,g,h,y,x,v,S=arguments[0],E=1,k=arguments.length,T=!1;for(typeof S=="boolean"&&(T=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<k;++E)if(d=arguments[E],d!=null)for(g in d)h=c(S,g),y=c(d,g),S!==y&&(T&&y&&(a(y)||(x=o(y)))?(x?(x=!1,v=h&&o(h)?h:[]):v=h&&a(h)?h:{},l(S,{name:g,newValue:f(T,v,y)})):typeof y<"u"&&l(S,{name:g,newValue:y}));return S},U2}var dre=fre();const q2=uc(dre);function cy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hre(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(f,...d){const g=e[++a];let h=-1;if(f){l(f);return}for(;++h<o.length;)(d[h]===null||d[h]===void 0)&&(d[h]=o[h]);o=d,g?pre(g,c)(...d):l(null,...d)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function pre(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(o);try{f=e.apply(this,l)}catch(d){const g=d;if(c&&n)throw g;return o(g)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,o):f instanceof Error?o(f):a(f))}function o(l,...c){n||(n=!0,t(l,...c))}function a(l){o(null,l)}}const eo={basename:mre,dirname:gre,extname:yre,join:xre,sep:"/"};function mre(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gf(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function gre(e){if(Gf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function yre(e){Gf(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function xre(...e){let t=-1,n;for(;++t<e.length;)Gf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bre(n)}function bre(e){Gf(e);const t=e.codePointAt(0)===47;let n=vre(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vre(e,t){let n="",r=0,o=-1,a=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function Gf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wre={cwd:Sre};function Sre(){return"/"}function uy(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Cre(e){if(typeof e=="string")e=new URL(e);else if(!uy(e)){const 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ere(e)}function Ere(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const V2=["history","path","basename","stem","extname","dirname"];class $A{constructor(t){let n;t?uy(t)?n={path:t}:typeof t=="string"||kre(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<V2.length;){const a=V2[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)V2.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?eo.basename(this.path):void 0}set basename(t){G2(t,"basename"),$2(t,"basename"),this.path=eo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?eo.dirname(this.path):void 0}set dirname(t){oE(this.basename,"dirname"),this.path=eo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?eo.extname(this.path):void 0}set extname(t){if($2(t,"extname"),oE(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=eo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){uy(t)&&(t=Cre(t)),G2(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?eo.basename(this.path,this.extname):void 0}set stem(t){G2(t,"stem"),$2(t,"stem"),this.path=eo.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new wr(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $2(e,t){if(e&&e.includes(eo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+eo.sep+"`")}function G2(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function oE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kre(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Tre=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Are={}.hasOwnProperty;class bb extends Tre{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=hre()}copy(){const t=new bb;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(q2(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(K2("data",this.frozen),this.namespace[t]=n,this):Are.call(this.namespace,t)&&this.namespace[t]||void 0:t?(K2("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Lh(t),r=this.parser||this.Parser;return Y2("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Y2("process",this.parser||this.Parser),W2("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const c=Lh(t),f=r.parse(c);r.run(f,c,function(g,h,y){if(g||!h||!y)return d(g);const x=h,v=r.stringify(x,y);Ore(v)?y.value=v:y.result=v,d(g,y)});function d(g,h){g||!h?l(g):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Y2("processSync",this.parser||this.Parser),W2("processSync",this.compiler||this.Compiler),this.process(t,o),sE("processSync","process",n),r;function o(a,l){n=!0,rE(a),r=l}}run(t,n,r){aE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const f=Lh(n);o.run(t,f,d);function d(g,h,y){const x=h||t;g?c(g):l?l(x):r(void 0,x,y)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),sE("runSync","run",r),o;function a(l,c){rE(l),o=c,r=!0}}stringify(t,n){this.freeze();const r=Lh(n),o=this.compiler||this.Compiler;return W2("stringify",o),aE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(K2("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[g,...h]=d;f(g,h)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))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");c(d.plugins),d.settings&&(o.settings=q2(!0,o.settings,d.settings))}function c(d){let g=-1;if(d!=null)if(Array.isArray(d))for(;++g<d.length;){const h=d[g];a(h)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,g){let h=-1,y=-1;for(;++h<r.length;)if(r[h][0]===d){y=h;break}if(y===-1)r.push([d,...g]);else if(g.length>0){let[x,...v]=g;const S=r[y][1];cy(S)&&cy(x)&&(x=q2(!0,S,x)),r[y]=[d,x,...v]}}}}const Rre=new bb().freeze();function Y2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function W2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function K2(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 aE(e){if(!cy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Lh(e){return Nre(e)?e:new $A(e)}function Nre(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ore(e){return typeof e=="string"||jre(e)}function jre(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Mre="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lE=[],cE={allowDangerousHtml:!0},Lre=/^(https?|ircs?|mailto|xmpp)$/i,_re=[{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"}];function GA(e){const t=Dre(e),n=Ire(e);return zre(t.runSync(t.parse(n),n),e)}function Dre(e){const t=e.rehypePlugins||lE,n=e.remarkPlugins||lE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cE}:cE;return Rre().use(gne).use(n).use(ure,r).use(t)}function Ire(e){const t=e.children||"",n=new $A;return typeof t=="string"&&(n.value=t),n}function zre(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||Pre;for(const g of _re)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Mre+g.id,void 0);return xb(e,d),JJ(e,{Fragment:p.Fragment,components:o,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function d(g,h,y){if(g.type==="raw"&&y&&typeof h=="number")return l?y.children.splice(h,1):y.children[h]={type:"text",value:g.value},h;if(g.type==="element"){let x;for(x in F2)if(Object.hasOwn(F2,x)&&Object.hasOwn(g.properties,x)){const v=g.properties[x],S=F2[x];(S===null||S.includes(g.tagName))&&(g.properties[x]=f(String(v||""),x,g))}}if(g.type==="element"){let x=n?!n.includes(g.tagName):a?a.includes(g.tagName):!1;if(!x&&r&&typeof h=="number"&&(x=!r(g,h,y)),x&&y&&typeof h=="number")return c&&g.children?y.children.splice(h,1,...g.children):y.children.splice(h,1),h}}}function Pre(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Lre.test(e.slice(0,t))?e:""}var Q2={exports:{}},uE;function Fre(){return uE||(uE=1,(function(e){(function(){var t;t=e.exports=o,t.format=o,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(o.apply(null,arguments))}function r(a,l){return o.apply(null,[a].concat(l))}function o(a){for(var l=1,c=[].slice.call(arguments),f=0,d=a.length,g="",h,y=!1,x,v,S=!1,E,k=function(){return c[l++]},T=function(){for(var R="";/\d/.test(a[f]);)R+=a[f++],h=a[f];return R.length>0?parseInt(R):null};f<d;++f)if(h=a[f],y)switch(y=!1,h=="."?(S=!1,h=a[++f]):h=="0"&&a[f+1]=="."?(S=!0,f+=2,h=a[f]):S=!0,E=T(),h){case"b":g+=parseInt(k(),10).toString(2);break;case"c":x=k(),typeof x=="string"||x instanceof String?g+=x:g+=String.fromCharCode(parseInt(x,10));break;case"d":g+=parseInt(k(),10);break;case"f":v=String(parseFloat(k()).toFixed(E||6)),g+=S?v:v.replace(/^0/,"");break;case"j":g+=JSON.stringify(k());break;case"o":g+="0"+parseInt(k(),10).toString(8);break;case"s":g+=k();break;case"x":g+="0x"+parseInt(k(),10).toString(16);break;case"X":g+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:g+=h;break}else h==="%"?y=!0:g+=h;return g}})()})(Q2)),Q2.exports}var Bre=Fre();const Hre=uc(Bre),_h=Object.assign(Ss(Error),{eval:Ss(EvalError),range:Ss(RangeError),reference:Ss(ReferenceError),syntax:Ss(SyntaxError),type:Ss(TypeError),uri:Ss(URIError)});function Ss(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const o=n&&Hre(n,...r);return new e(o)}}const Dh={}.hasOwnProperty,fE={yaml:"-",toml:"+"};function vb(e){const t=[];let n=-1;const r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++n<r.length;)t[n]=Ure(r[n]);return t}function Ure(e){let t=e;if(typeof t=="string"){if(!Dh.call(fE,t))throw _h("Missing matter definition for `%s`",t);t={type:t,marker:fE[t]}}else if(typeof t!="object")throw _h("Expected matter to be an object, not `%j`",t);if(!Dh.call(t,"type"))throw _h("Missing `type` in matter `%j`",t);if(!Dh.call(t,"fence")&&!Dh.call(t,"marker"))throw _h("Missing `marker` or `fence` in matter `%j`",t);return t}function qre(e){const t=vb(e),n={};let r=-1;for(;++r<t.length;){const o=t[r],a=fy(o,"open").charCodeAt(0),l=Vre(o),c=n[a];Array.isArray(c)?c.push(l):n[a]=[l]}return{flow:n}}function Vre(e){const t=e.anywhere,n=e.type,r=n+"Fence",o=r+"Sequence",a=n+"Value",l={tokenize:g,partial:!0};let c,f=0;return{tokenize:d,concrete:!0};function d(h,y,x){const v=this;return S;function S(A){const D=v.now();return D.column===1&&(D.line===1||t)&&(c=fy(e,"open"),f=0,A===c.charCodeAt(f))?(h.enter(n),h.enter(r),h.enter(o),E(A)):x(A)}function E(A){return f===c.length?(h.exit(o),vt(A)?(h.enter("whitespace"),k(A)):T(A)):A===c.charCodeAt(f++)?(h.consume(A),E):x(A)}function k(A){return vt(A)?(h.consume(A),k):(h.exit("whitespace"),T(A))}function T(A){return ot(A)?(h.exit(r),h.enter("lineEnding"),h.consume(A),h.exit("lineEnding"),c=fy(e,"close"),f=0,h.attempt(l,N,R)):x(A)}function R(A){return A===null||ot(A)?j(A):(h.enter(a),L(A))}function L(A){return A===null||ot(A)?(h.exit(a),j(A)):(h.consume(A),L)}function j(A){return A===null?x(A):(h.enter("lineEnding"),h.consume(A),h.exit("lineEnding"),h.attempt(l,N,R))}function N(A){return h.exit(n),y(A)}}function g(h,y,x){let v=0;return S;function S(R){return R===c.charCodeAt(v)?(h.enter(r),h.enter(o),E(R)):x(R)}function E(R){return v===c.length?(h.exit(o),vt(R)?(h.enter("whitespace"),k(R)):T(R)):R===c.charCodeAt(v++)?(h.consume(R),E):x(R)}function k(R){return vt(R)?(h.consume(R),k):(h.exit("whitespace"),T(R))}function T(R){return R===null||ot(R)?(h.exit(r),y(R)):x(R)}}}function fy(e,t){return e.marker?dE(e.marker,t).repeat(3):dE(e.fence,t)}function dE(e,t){return typeof e=="string"?e:e[t]}function $re(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Gre(e){const t=vb(e),n={},r={};let o=-1;for(;++o<t.length;){const a=t[o];n[a.type]=Yre(a),r[a.type]=Wre,r[a.type+"Value"]=Kre}return{enter:n,exit:r}}function Yre(e){return t;function t(n){this.enter({type:e.type,value:""},n),this.buffer()}}function Wre(e){const t=this.resume(),n=this.stack[this.stack.length-1];this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Kre(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Qre(e){const t=[],n={},r=vb(e);let o=-1;for(;++o<r.length;){const a=r[o];n[a.type]=Xre(a);const l=dy(a,"open");t.push({atBreak:!0,character:l.charAt(0),after:$re(l.charAt(1))})}return{unsafe:t,handlers:n}}function Xre(e){const t=dy(e,"open"),n=dy(e,"close");return r;function r(o){return t+(o.value?`
101
- `+o.value:"")+`
102
- `+n}}function dy(e,t){return e.marker?hE(e.marker,t).repeat(3):hE(e.fence,t)}function hE(e,t){return typeof e=="string"?e:e[t]}const Zre="yaml";function Jre(e){const t=this,n=e||Zre,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(qre(n)),a.push(Gre(n)),l.push(Qre(n))}function pE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function eie(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tie(e,t,n){const o=j0((n||{}).ignore||[]),a=nie(t);let l=-1;for(;++l<a.length;)VA(e,"text",c);function c(d,g){let h=-1,y;for(;++h<g.length;){const x=g[h],v=y?y.children:void 0;if(o(x,v?v.indexOf(x):void 0,y))return;y=x}if(y)return f(d,g)}function f(d,g){const h=g[g.length-1],y=a[l][0],x=a[l][1];let v=0;const E=h.children.indexOf(d);let k=!1,T=[];y.lastIndex=0;let R=y.exec(d.value);for(;R;){const L=R.index,j={index:R.index,input:R.input,stack:[...g,d]};let N=x(...R,j);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?y.lastIndex=L+1:(v!==L&&T.push({type:"text",value:d.value.slice(v,L)}),Array.isArray(N)?T.push(...N):N&&T.push(N),v=L+R[0].length,k=!0),!y.global)break;R=y.exec(d.value)}return k?(v<d.value.length&&T.push({type:"text",value:d.value.slice(v)}),h.children.splice(E,1,...T)):T=[d],E+T.length}}function nie(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([rie(o[0]),iie(o[1])])}return t}function rie(e){return typeof e=="string"?new RegExp(eie(e),"g"):e}function iie(e){return typeof e=="function"?e:function(){return e}}const X2="phrasing",Z2=["autolink","link","image","label"];function oie(){return{transforms:[die],enter:{literalAutolink:sie,literalAutolinkEmail:J2,literalAutolinkHttp:J2,literalAutolinkWww:J2},exit:{literalAutolink:fie,literalAutolinkEmail:uie,literalAutolinkHttp:lie,literalAutolinkWww:cie}}}function aie(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:X2,notInConstruct:Z2},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:X2,notInConstruct:Z2},{character:":",before:"[ps]",after:"\\/",inConstruct:X2,notInConstruct:Z2}]}}function sie(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function J2(e){this.config.enter.autolinkProtocol.call(this,e)}function lie(e){this.config.exit.autolinkProtocol.call(this,e)}function cie(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uie(e){this.config.exit.autolinkEmail.call(this,e)}function fie(e){this.exit(e)}function die(e){tie(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hie],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),pie]],{ignore:["link","linkReference"]})}function hie(e,t,n,r,o){let a="";if(!YA(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!mie(n)))return!1;const l=gie(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function pie(e,t,n,r){return!YA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function mie(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function gie(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=pE(e,"(");let a=pE(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function YA(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Bs(n)||R0(n))&&(!t||n!==47)}WA.peek=kie;function yie(){this.buffer()}function xie(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function bie(){this.buffer()}function vie(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wie(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Sie(e){this.exit(e)}function Cie(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Eie(e){this.exit(e)}function kie(){return"["}function WA(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=o.move("]"),a}function Tie(){return{enter:{gfmFootnoteCallString:yie,gfmFootnoteCall:xie,gfmFootnoteDefinitionLabelString:bie,gfmFootnoteDefinition:vie},exit:{gfmFootnoteCallString:wie,gfmFootnoteCall:Sie,gfmFootnoteDefinitionLabelString:Cie,gfmFootnoteDefinition:Eie}}}function Aie(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:WA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const c=a.createTracker(l);let f=c.move("[^");const d=a.enter("footnoteDefinition"),g=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),g(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
103
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?KA:Rie))),d(),f}}function Rie(e,t,n){return t===0?e:KA(e,t,n)}function KA(e,t,n){return(n?"":" ")+e}const Nie=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];QA.peek=_ie;function Oie(){return{canContainEols:["delete"],enter:{strikethrough:Mie},exit:{strikethrough:Lie}}}function jie(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Nie}],handlers:{delete:QA}}}function Mie(e){this.enter({type:"delete",children:[]},e)}function Lie(e){this.exit(e)}function QA(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),a(),l}function _ie(){return"~"}function Die(e){return e.length}function Iie(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Die,a=[],l=[],c=[],f=[];let d=0,g=-1;for(;++g<e.length;){const S=[],E=[];let k=-1;for(e[g].length>d&&(d=e[g].length);++k<e[g].length;){const T=zie(e[g][k]);if(n.alignDelimiters!==!1){const R=o(T);E[k]=R,(f[k]===void 0||R>f[k])&&(f[k]=R)}S.push(T)}l[g]=S,c[g]=E}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<d;)a[h]=mE(r[h]);else{const S=mE(r);for(;++h<d;)a[h]=S}h=-1;const y=[],x=[];for(;++h<d;){const S=a[h];let E="",k="";S===99?(E=":",k=":"):S===108?E=":":S===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,f[h]-E.length-k.length);const R=E+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=E.length+T+k.length,T>f[h]&&(f[h]=T),x[h]=T),y[h]=R}l.splice(1,0,y),c.splice(1,0,x),g=-1;const v=[];for(;++g<l.length;){const S=l[g],E=c[g];h=-1;const k=[];for(;++h<d;){const T=S[h]||"";let R="",L="";if(n.alignDelimiters!==!1){const j=f[h]-(E[h]||0),N=a[h];N===114?R=" ".repeat(j):N===99?j%2?(R=" ".repeat(j/2+.5),L=" ".repeat(j/2-.5)):(R=" ".repeat(j/2),L=R):L=" ".repeat(j)}n.delimiterStart!==!1&&!h&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||h)&&k.push(" "),n.alignDelimiters!==!1&&k.push(R),k.push(T),n.alignDelimiters!==!1&&k.push(L),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||h!==d-1)&&k.push("|")}v.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return v.join(`
104
- `)}function zie(e){return e==null?"":String(e)}function mE(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Pie(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),Fie);return o(),l}function Fie(e,t,n){return">"+(n?"":" ")+e}function Bie(e,t){return gE(e,t.inConstruct,!0)&&!gE(e,t.notInConstruct,!1)}function gE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function yE(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
105
- `&&Bie(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
106
- `}function Hie(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>l&&(l=a):a=1,o=r+t.length,r=n.indexOf(t,o);return l}function Uie(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function qie(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Vie(e,t,n,r){const o=qie(n),a=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(Uie(e,n)){const h=n.enter("codeIndented"),y=n.indentLines(a,$ie);return h(),y}const c=n.createTracker(r),f=o.repeat(Math.max(Hie(a,o)+1,3)),d=n.enter("codeFenced");let g=c.move(f);if(e.lang){const h=n.enter(`codeFencedLang${l}`);g+=c.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...c.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${l}`);g+=c.move(" "),g+=c.move(n.safe(e.meta,{before:g,after:`
107
- `,encode:["`"],...c.current()})),h()}return g+=c.move(`
108
- `),a&&(g+=c.move(a+`
109
- `)),g+=c.move(f),d(),g}function $ie(e,t,n){return(n?"":" ")+e}function wb(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Gie(e,t,n,r){const o=wb(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
110
- `,...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+o),d+=f.move(n.safe(e.title,{before:d,after:o,...f.current()})),d+=f.move(o),c()),l(),d}function Yie(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hp(e,t,n){const r=cc(e),o=cc(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}XA.peek=Wie;function XA(e,t,n,r){const o=Yie(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(o);let f=l.move(n.containerPhrasing(e,{after:o,before:c,...l.current()}));const d=f.charCodeAt(0),g=Hp(r.before.charCodeAt(r.before.length-1),d,o);g.inside&&(f=wf(d)+f.slice(1));const h=f.charCodeAt(f.length-1),y=Hp(r.after.charCodeAt(0),h,o);y.inside&&(f=f.slice(0,-1)+wf(h));const x=l.move(o);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},c+f+x}function Wie(e,t,n){return n.options.emphasis||"*"}function Kie(e,t){let n=!1;return xb(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,sy}),!!((!e.depth||e.depth<3)&&db(e)&&(t.options.setext||n))}function Qie(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Kie(e,n)){const g=n.enter("headingSetext"),h=n.enter("phrasing"),y=n.containerPhrasing(e,{...a.current(),before:`
111
- `,after:`
112
- `});return h(),g(),y+`
113
- `+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
114
- `))+1))}const l="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");a.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
115
- `,...a.current()});return/^[\t ]/.test(d)&&(d=wf(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}ZA.peek=Xie;function ZA(e){return e.value||""}function Xie(){return"<"}JA.peek=Zie;function JA(e,t,n,r){const o=wb(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+o),d+=f.move(n.safe(e.title,{before:d,after:o,...f.current()})),d+=f.move(o),c()),d+=f.move(")"),l(),d}function Zie(){return"!"}e7.peek=Jie;function e7(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=g,a(),o==="full"||!d||d!==h?f+=c.move(h+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Jie(){return"!"}t7.peek=eoe;function t7(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return o+r+o}function eoe(){return"`"}function n7(e,t){const n=db(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}r7.peek=toe;function r7(e,t,n,r){const o=wb(n),a=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(n7(e,n)){const g=n.stack;n.stack=[],c=n.enter("autolink");let h=l.move("<");return h+=l.move(n.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),c(),n.stack=g,h}c=n.enter("link"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${a}`),d+=l.move(" "+o),d+=l.move(n.safe(e.title,{before:d,after:o,...l.current()})),d+=l.move(o),f()),d+=l.move(")"),c(),d}function toe(e,t,n){return n7(e,n)?"<":"["}i7.peek=noe;function i7(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=g,a(),o==="full"||!d||d!==h?f+=c.move(h+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function noe(){return"["}function Sb(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function roe(e){const t=Sb(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ioe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function o7(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ooe(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?ioe(n):Sb(n);const c=e.ordered?l==="."?")":".":roe(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),o7(n)===l&&g){let h=-1;for(;++h<e.children.length;){const y=e.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,o(),d}function aoe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function soe(e,t,n,r){const o=aoe(n);let a=n.bulletCurrent||Sb(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),g);return f(),d;function g(h,y,x){return y?(x?"":" ".repeat(l))+h:(x?a:a+" ".repeat(l-a.length))+h}}function loe(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),o(),l}const coe=j0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uoe(e,t,n,r){return(e.children.some(function(l){return coe(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function foe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}a7.peek=doe;function a7(e,t,n,r){const o=foe(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(o+o);let f=l.move(n.containerPhrasing(e,{after:o,before:c,...l.current()}));const d=f.charCodeAt(0),g=Hp(r.before.charCodeAt(r.before.length-1),d,o);g.inside&&(f=wf(d)+f.slice(1));const h=f.charCodeAt(f.length-1),y=Hp(r.after.charCodeAt(0),h,o);y.inside&&(f=f.slice(0,-1)+wf(h));const x=l.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},c+f+x}function doe(e,t,n){return n.options.strong||"*"}function hoe(e,t,n,r){return n.safe(e.value,r)}function poe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function moe(e,t,n){const r=(o7(n)+(n.options.ruleSpaces?" ":"")).repeat(poe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const s7={blockquote:Pie,break:yE,code:Vie,definition:Gie,emphasis:XA,hardBreak:yE,heading:Qie,html:ZA,image:JA,imageReference:e7,inlineCode:t7,link:r7,linkReference:i7,list:ooe,listItem:soe,paragraph:loe,root:uoe,strong:a7,text:hoe,thematicBreak:moe};function goe(){return{enter:{table:yoe,tableData:xE,tableHeader:xE,tableRow:boe},exit:{codeText:voe,table:xoe,tableData:e1,tableHeader:e1,tableRow:e1}}}function yoe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xoe(e){this.exit(e),this.data.inTable=void 0}function boe(e){this.enter({type:"tableRow",children:[]},e)}function e1(e){this.exit(e)}function xE(e){this.enter({type:"tableCell",children:[]},e)}function voe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,woe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function woe(e,t){return t==="|"?t:e}function Soe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
116
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:f,tableRow:c}};function l(x,v,S,E){return d(g(x,S,E),x.align)}function c(x,v,S,E){const k=h(x,S,E),T=d([k]);return T.slice(0,T.indexOf(`
117
- `))}function f(x,v,S,E){const k=S.enter("tableCell"),T=S.enter("phrasing"),R=S.containerPhrasing(x,{...E,before:a,after:a});return T(),k(),R}function d(x,v){return Iie(x,{align:v,alignDelimiters:r,padding:n,stringLength:o})}function g(x,v,S){const E=x.children;let k=-1;const T=[],R=v.enter("table");for(;++k<E.length;)T[k]=h(E[k],v,S);return R(),T}function h(x,v,S){const E=x.children;let k=-1;const T=[],R=v.enter("tableRow");for(;++k<E.length;)T[k]=f(E[k],x,v,S);return R(),T}function y(x,v,S){let E=s7.inlineCode(x,v,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Coe(){return{exit:{taskListCheckValueChecked:bE,taskListCheckValueUnchecked:bE,paragraph:koe}}}function Eoe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Toe}}}function bE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function koe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,l;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Toe(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let f=s7.listItem(e,t,n,{...r,...c.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(g){return g+l}}function Aoe(){return[oie(),Tie(),Oie(),goe(),Coe()]}function Roe(e){return{extensions:[aie(),Aie(e),jie(),Soe(e),Eoe()]}}const Noe={tokenize:Doe,partial:!0},l7={tokenize:Ioe,partial:!0},c7={tokenize:zoe,partial:!0},u7={tokenize:Poe,partial:!0},Ooe={tokenize:Foe,partial:!0},f7={name:"wwwAutolink",tokenize:Loe,previous:h7},d7={name:"protocolAutolink",tokenize:_oe,previous:p7},Zo={name:"emailAutolink",tokenize:Moe,previous:m7},mo={};function joe(){return{text:mo}}let Cs=48;for(;Cs<123;)mo[Cs]=Zo,Cs++,Cs===58?Cs=65:Cs===91&&(Cs=97);mo[43]=Zo;mo[45]=Zo;mo[46]=Zo;mo[95]=Zo;mo[72]=[Zo,d7];mo[104]=[Zo,d7];mo[87]=[Zo,f7];mo[119]=[Zo,f7];function Moe(e,t,n){const r=this;let o,a;return l;function l(h){return!hy(h)||!m7.call(r,r.previous)||Cb(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(h))}function c(h){return hy(h)?(e.consume(h),c):h===64?(e.consume(h),f):n(h)}function f(h){return h===46?e.check(Ooe,g,d)(h):h===45||h===95||yr(h)?(a=!0,e.consume(h),f):g(h)}function d(h){return e.consume(h),o=!0,f}function g(h){return a&&o&&Or(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Loe(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!h7.call(r,r.previous)||Cb(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Noe,e.attempt(l7,e.attempt(c7,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function _oe(e,t,n){const r=this;let o="",a=!1;return l;function l(h){return(h===72||h===104)&&p7.call(r,r.previous)&&!Cb(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),e.consume(h),c):n(h)}function c(h){if(Or(h)&&o.length<5)return o+=String.fromCodePoint(h),e.consume(h),c;if(h===58){const y=o.toLowerCase();if(y==="http"||y==="https")return e.consume(h),f}return n(h)}function f(h){return h===47?(e.consume(h),a?d:(a=!0,f)):n(h)}function d(h){return h===null||Pp(h)||sn(h)||Bs(h)||R0(h)?n(h):e.attempt(l7,e.attempt(c7,g),n)(h)}function g(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Doe(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function Ioe(e,t,n){let r,o,a;return l;function l(d){return d===46||d===95?e.check(u7,f,c)(d):d===null||sn(d)||Bs(d)||d!==45&&R0(d)?f(d):(a=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(o=r,r=void 0),e.consume(d),l}function f(d){return o||r||!a?n(d):t(d)}}function zoe(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(u7,t,a)(l):l===null||sn(l)||Bs(l)?t(l):(e.consume(l),o)}function a(l){return l===41&&r++,e.consume(l),o}}function Poe(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||sn(c)||Bs(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||sn(c)||Bs(c)?t(c):r(c)}function a(c){return Or(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Or(c)?(e.consume(c),l):n(c)}}function Foe(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return yr(a)?n(a):t(a)}}function h7(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||sn(e)}function p7(e){return!Or(e)}function m7(e){return!(e===47||hy(e))}function hy(e){return e===43||e===45||e===46||e===95||yr(e)}function Cb(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Boe={tokenize:Woe,partial:!0};function Hoe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$oe,continuation:{tokenize:Goe},exit:Yoe}},text:{91:{name:"gfmFootnoteCall",tokenize:Voe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Uoe,resolveTo:qoe}}}}function Uoe(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=Vi(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function qoe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Voe(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),f}function f(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(h){if(a>999||h===93&&!l||h===null||h===91||sn(h))return n(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return o.includes(Vi(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return sn(h)||(l=!0),a++,e.consume(h),h===92?g:d}function g(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function $oe(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return f;function f(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(v)}function g(v){if(l>999||v===93&&!c||v===null||v===91||sn(v))return n(v);if(v===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Vi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return sn(v)||(c=!0),l++,e.consume(v),v===92?h:g}function h(v){return v===91||v===92||v===93?(e.consume(v),l++,g):g(v)}function y(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(a)||o.push(a),zt(e,x,"gfmFootnoteDefinitionWhitespace")):n(v)}function x(v){return t(v)}}function Goe(e,t,n){return e.check($f,t,e.attempt(Boe,t,n))}function Yoe(e){e.exit("gfmFootnoteDefinition")}function Woe(e,t,n){const r=this;return zt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Koe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},h={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},y=[["enter",g,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",h,c]],x=c.parser.constructs.insideSpan.null;x&&li(y,y.length,0,N0(x,l.slice(d+1,f),c)),li(y,y.length,0,[["exit",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",g,c]]),li(l,d-1,f-d+3,y),f=d+y.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function a(l,c,f){const d=this.previous,g=this.events;let h=0;return y;function y(v){return d===126&&g[g.length-1][1].type!=="characterEscape"?f(v):(l.enter("strikethroughSequenceTemporary"),x(v))}function x(v){const S=cc(d);if(v===126)return h>1?f(v):(l.consume(v),h++,x);if(h<2&&!n)return f(v);const E=l.exit("strikethroughSequenceTemporary"),k=cc(v);return E._open=!k||k===2&&!!S,E._close=!S||S===2&&!!k,c(v)}}}class Qoe{constructor(){this.map=[]}add(t,n,r){Xoe(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function Xoe(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function Zoe(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Joe(){return{flow:{null:{name:"table",tokenize:eae,resolveAll:tae}}}}function eae(e,t,n){const r=this;let o=0,a=0,l;return c;function c(I){let q=r.events.length-1;for(;q>-1;){const Y=r.events[q][1].type;if(Y==="lineEnding"||Y==="linePrefix")q--;else break}const $=q>-1?r.events[q][1].type:null,V=$==="tableHead"||$==="tableRow"?N:f;return V===N&&r.parser.lazy[r.now().line]?n(I):V(I)}function f(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(l=!0,a+=1),g(I)}function g(I){return I===null?n(I):ot(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),x):n(I):vt(I)?zt(e,g,"whitespace")(I):(a+=1,l&&(l=!1,o+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||sn(I)?(e.exit("data"),g(I)):(e.consume(I),I===92?y:h)}function y(I){return I===92||I===124?(e.consume(I),h):h(I)}function x(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),l=!1,vt(I)?zt(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):v(I))}function v(I){return I===45||I===58?E(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),S):j(I)}function S(I){return vt(I)?zt(e,E,"whitespace")(I):E(I)}function E(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):I===45?(a+=1,k(I)):I===null||ot(I)?L(I):j(I)}function k(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):j(I)}function T(I){return I===45?(e.consume(I),T):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(I))}function R(I){return vt(I)?zt(e,L,"whitespace")(I):L(I)}function L(I){return I===124?v(I):I===null||ot(I)?!l||o!==a?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function N(I){return e.enter("tableRow"),A(I)}function A(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):I===null||ot(I)?(e.exit("tableRow"),t(I)):vt(I)?zt(e,A,"whitespace")(I):(e.enter("data"),D(I))}function D(I){return I===null||I===124||sn(I)?(e.exit("data"),A(I)):(e.consume(I),I===92?U:D)}function U(I){return I===92||I===124?(e.consume(I),D):D(I)}}function tae(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,g,h;const y=new Qoe;for(;++n<e.length;){const x=e[n],v=x[1];x[0]==="enter"?v.type==="tableHead"?(c=!1,f!==0&&(vE(y,t,f,d,g),g=void 0,f=0),d={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(n,0,[["enter",d,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,g={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(n,0,[["enter",g,t]])),o=v.type==="tableDelimiterRow"?2:g?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],h=Ih(y,t,a,o,void 0,h),a=[0,0,0,0]),l[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],h=Ih(y,t,a,o,void 0,h)),a=l,l=[a[1],n,0,0])):v.type==="tableHead"?(c=!0,f=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(f=n,a[1]!==0?(l[0]=l[1],h=Ih(y,t,a,o,n,h)):l[1]!==0&&(h=Ih(y,t,l,o,n,h)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&vE(y,t,f,d,g),y.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Zoe(t.events,n))}return e}function Ih(e,t,n,r,o,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Fl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=Fl(t.events,n[1]);if(a={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=Fl(t.events,n[2]),g=Fl(t.events,n[3]),h={type:c,start:Object.assign({},d),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const y=t.events[n[2]],x=t.events[n[3]];if(y[1].end=Object.assign({},x[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,S=n[3]-n[2]-1;e.add(v,S,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return o!==void 0&&(a.end=Object.assign({},Fl(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function vE(e,t,n,r,o){const a=[],l=Fl(t.events,n);o&&(o.end=Object.assign({},l),a.push(["exit",o,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Fl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const nae={name:"tasklistCheck",tokenize:iae};function rae(){return{text:{91:nae}}}function iae(e,t,n){const r=this;return o;function o(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return sn(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return ot(f)?t(f):vt(f)?e.check({tokenize:oae},t,n)(f):n(f)}}function oae(e,t,n){return zt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function aae(e){return kA([joe(),Hoe(),Koe(e),Joe(),rae()])}const sae={};function g7(e){const t=this,n=e||sae,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(aae(n)),a.push(Aoe()),l.push(Roe(n))}function lae(e){return e.includes("<<<<<<<")&&e.includes("=======")&&e.includes(">>>>>>>")}function cae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function uae(e,t){if(e==null)return{};var n,r,o=cae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function py(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fae(e){if(Array.isArray(e))return py(e)}function dae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hae(e,t){if(e){if(typeof e=="string")return py(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?py(e,t):void 0}}function pae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
118
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function my(e){return fae(e)||dae(e)||hae(e)||pae()}function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function mae(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gae(e){var t=mae(e,"string");return Sf(t)=="symbol"?t:t+""}function y7(e,t,n){return(t=gae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(null,arguments)}function wE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ql(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wE(Object(n),!0).forEach(function(r){y7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yae(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])];if(t===3)return[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])];if(t>=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var t1={};function xae(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return t1[t]||(t1[t]=yae(e)),t1[t]}function bae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(a){return a!=="token"}),o=xae(r);return o.reduce(function(a,l){return ql(ql({},a),n[l])},t)}function SE(e){return e.join(" ")}function vae(e,t){var n=0;return function(r){return n+=1,r.map(function(o,a){return x7({node:o,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(a)})})}}function x7(e){var t=e.node,n=e.stylesheet,r=e.style,o=r===void 0?{}:r,a=e.useInlineStyles,l=e.key,c=t.properties,f=t.type,d=t.tagName,g=t.value;if(f==="text")return g;if(d){var h=vae(n,a),y;if(!a)y=ql(ql({},c),{},{className:SE(c.className)});else{var x=Object.keys(n).reduce(function(k,T){return T.split(".").forEach(function(R){k.includes(R)||k.push(R)}),k},[]),v=c.className&&c.className.includes("token")?["token"]:[],S=c.className&&v.concat(c.className.filter(function(k){return!x.includes(k)}));y=ql(ql({},c),{},{className:SE(S)||void 0,style:bae(c.className,Object.assign({},c.style,o),n)})}var E=h(t.children);return ke.createElement(d,gy({key:l},y),E)}}const wae=(function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1});var Sae=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function CE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CE(Object(n),!0).forEach(function(r){y7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Cae=/\n/g;function Eae(e){return e.match(Cae)}function kae(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(o,a){var l=a+n;return ke.createElement("span",{key:"line-".concat(a),className:"react-syntax-highlighter-line-number",style:typeof r=="function"?r(l):r},"".concat(l,`
119
- `))})}function Tae(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=r===void 0?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,l=a===void 0?{}:a,c=e.startingLineNumber;return ke.createElement("code",{style:Object.assign({},n,o)},kae({lines:t.replace(/\n$/,"").split(`
120
- `),style:l,startingLineNumber:c}))}function Aae(e){return"".concat(e.toString().length,".25em")}function b7(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function v7(e,t,n){var r={display:"inline-block",minWidth:Aae(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},o=typeof e=="function"?e(t):e,a=_a(_a({},r),o);return a}function ip(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,l=e.lineProps,c=l===void 0?{}:l,f=e.className,d=f===void 0?[]:f,g=e.showLineNumbers,h=e.wrapLongLines,y=e.wrapLines,x=y===void 0?!1:y,v=x?_a({},typeof c=="function"?c(n):c):{};if(v.className=v.className?[].concat(my(v.className.trim().split(/\s+/)),my(d)):d,n&&a){var S=v7(r,n,o);t.unshift(b7(n,S))}return h&g&&(v.style=_a({display:"flex"},v.style)),{type:"element",tagName:"span",properties:v,children:t}}function w7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];if(o.type==="text")n.push(ip({children:[o],className:my(new Set(t))}));else if(o.children){var a,l=t.concat(((a=o.properties)===null||a===void 0?void 0:a.className)||[]);w7(o.children,l).forEach(function(c){return n.push(c)})}}return n}function Rae(e,t,n,r,o,a,l,c,f){var d,g=w7(e.value),h=[],y=-1,x=0;function v(j,N){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return ip({children:j,lineNumber:N,lineNumberStyle:c,largestLineNumber:l,showInlineLineNumbers:o,lineProps:n,className:A,showLineNumbers:r,wrapLongLines:f,wrapLines:t})}function S(j,N){if(r&&N&&o){var A=v7(c,N,l);j.unshift(b7(N,A))}return j}function E(j,N){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||A.length>0?v(j,N,A):S(j,N)}for(var k=function(){var N=g[x],A=N.children[0].value,D=Eae(A);if(D){var U=A.split(`
121
- `);U.forEach(function(I,q){var $=r&&h.length+a,V={type:"text",value:"".concat(I,`
122
- `)};if(q===0){var Y=g.slice(y+1,x).concat(ip({children:[V],className:N.properties.className})),H=E(Y,$);h.push(H)}else if(q===U.length-1){var B=g[x+1]&&g[x+1].children&&g[x+1].children[0],F={type:"text",value:"".concat(I)};if(B){var G=ip({children:[F],className:N.properties.className});g.splice(x+1,0,G)}else{var ie=[F],M=E(ie,$,N.properties.className);h.push(M)}}else{var P=[V],Q=E(P,$,N.properties.className);h.push(Q)}}),y=x}x++};x<g.length;)k();if(y!==g.length-1){var T=g.slice(y+1,g.length);if(T&&T.length){var R=r&&h.length+a,L=E(T,R);h.push(L)}}return t?h:(d=[]).concat.apply(d,h)}function Nae(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(o,a){return x7({node:o,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(a)})})}function S7(e){return e&&typeof e.highlightAuto<"u"}function Oae(e){var t=e.astGenerator,n=e.language,r=e.code,o=e.defaultCodeValue;if(S7(t)){var a=wae(t,n);return n==="text"?{value:o,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!=="text"?{value:t.highlight(r,n)}:{value:o}}catch{return{value:o}}}function jae(e,t){return function(r){var o,a,l=r.language,c=r.children,f=r.style,d=f===void 0?t:f,g=r.customStyle,h=g===void 0?{}:g,y=r.codeTagProps,x=y===void 0?{className:l?"language-".concat(l):void 0,style:_a(_a({},d['code[class*="language-"]']),d['code[class*="language-'.concat(l,'"]')])}:y,v=r.useInlineStyles,S=v===void 0?!0:v,E=r.showLineNumbers,k=E===void 0?!1:E,T=r.showInlineLineNumbers,R=T===void 0?!0:T,L=r.startingLineNumber,j=L===void 0?1:L,N=r.lineNumberContainerStyle,A=r.lineNumberStyle,D=A===void 0?{}:A,U=r.wrapLines,I=r.wrapLongLines,q=I===void 0?!1:I,$=r.lineProps,V=$===void 0?{}:$,Y=r.renderer,H=r.PreTag,B=H===void 0?"pre":H,F=r.CodeTag,G=F===void 0?"code":F,ie=r.code,M=ie===void 0?(Array.isArray(c)?c[0]:c)||"":ie,P=r.astGenerator,Q=uae(r,Sae);P=P||e;var _=k?ke.createElement(Tae,{containerStyle:N,codeStyle:x.style||{},numberStyle:D,startingLineNumber:j,codeString:M}):null,ee=d.hljs||d['pre[class*="language-"]']||{backgroundColor:"#fff"},J=S7(P)?"hljs":"prismjs",re=S?Object.assign({},Q,{style:Object.assign({},ee,h)}):Object.assign({},Q,{className:Q.className?"".concat(J," ").concat(Q.className):J,style:Object.assign({},h)});if(q?x.style=_a({whiteSpace:"pre-wrap"},x.style):x.style=_a({whiteSpace:"pre"},x.style),!P)return ke.createElement(B,re,_,ke.createElement(G,x,M));(U===void 0&&Y||q)&&(U=!0),Y=Y||Nae;var pe=[{type:"text",value:M}],fe=Oae({astGenerator:P,language:l,code:M,defaultCodeValue:pe});fe.language===null&&(fe.value=pe);var Ce=(o=(a=M.match(/\n/g))===null||a===void 0?void 0:a.length)!==null&&o!==void 0?o:0,Ee=j+Ce,Ie=Rae(fe,U,V,k,R,j,Ee,D,q);return ke.createElement(B,re,ke.createElement(G,x,!R&&_,Y({rows:Ie,stylesheet:d,useInlineStyles:S})))}}const EE=/[#.]/g;function Mae(e,t){const n=e||"",r={};let o=0,a,l;for(;o<n.length;){EE.lastIndex=o;const c=EE.exec(n),f=n.slice(o,c?c.index:n.length);f&&(a?a==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:l=f,o+=f.length),c&&(a=c[0],o++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function C7(e,t,n){const r=n?Iae(n):void 0;function o(a,l,...c){let f;if(a==null){f={type:"root",children:[]};const d=l;c.unshift(d)}else{f=Mae(a,t);const d=f.tagName.toLowerCase(),g=r?r.get(d):void 0;if(f.tagName=g||d,Lae(l))c.unshift(l);else for(const[h,y]of Object.entries(l))_ae(e,f.properties,h,y)}for(const d of c)yy(f.children,d);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function Lae(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const l of a)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function _ae(e,t,n,r){const o=gA(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=j4(r):o.commaSeparated?a=T4(r):o.commaOrSpaceSeparated?a=j4(T4(r).join(" ")):a=kE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?Dae(r):String(r);if(Array.isArray(a)){const l=[];for(const c of a)l.push(kE(o,o.property,c));a=l}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function yy(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)yy(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?yy(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function kE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||xf(n)===xf(t)))return!0}return n}function Dae(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Iae(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const zae=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Pae=C7(yA,"div");C7(A0,"g",zae);const Fae=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],TE={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function E7(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Bae(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Hae(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function AE(e){return Hae(e)||E7(e)}const Uae=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function qae(e,t){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,o=[];let a=0,l=-1,c="",f,d;n.position&&("start"in n.position||"indent"in n.position?(d=n.position.indent,f=n.position.start):f=n.position);let g=(f?f.line:0)||1,h=(f?f.column:0)||1,y=v(),x;for(a--;++a<=e.length;)if(x===10&&(h=(d?d[l]:0)||1),x=e.charCodeAt(a),x===38){const k=e.charCodeAt(a+1);if(k===9||k===10||k===12||k===32||k===38||k===60||Number.isNaN(k)||r&&k===r){c+=String.fromCharCode(x),h++;continue}const T=a+1;let R=T,L=T,j;if(k===35){L=++R;const V=e.charCodeAt(L);V===88||V===120?(j="hexadecimal",L=++R):j="decimal"}else j="named";let N="",A="",D="";const U=j==="named"?AE:j==="decimal"?E7:Bae;for(L--;++L<=e.length;){const V=e.charCodeAt(L);if(!U(V))break;D+=String.fromCharCode(V),j==="named"&&Fae.includes(D)&&(N=D,A=vf(D))}let I=e.charCodeAt(L)===59;if(I){L++;const V=j==="named"?vf(D):!1;V&&(N=D,A=V)}let q=1+L-T,$="";if(!(!I&&n.nonTerminated===!1))if(!D)j!=="named"&&S(4,q);else if(j==="named"){if(I&&!A)S(5,1);else if(N!==D&&(L=R+N.length,q=1+L-R,I=!1),!I){const V=N?1:3;if(n.attribute){const Y=e.charCodeAt(L);Y===61?(S(V,q),A=""):AE(Y)?A="":S(V,q)}else S(V,q)}$=A}else{I||S(2,q);let V=Number.parseInt(D,j==="hexadecimal"?16:10);if(Vae(V))S(7,q),$="�";else if(V in TE)S(6,q),$=TE[V];else{let Y="";$ae(V)&&S(6,q),V>65535&&(V-=65536,Y+=String.fromCharCode(V>>>10|55296),V=56320|V&1023),$=Y+String.fromCharCode(V)}}if($){E(),y=v(),a=L-1,h+=L-T+1,o.push($);const V=v();V.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,$,{start:y,end:V},e.slice(T-1,L)),y=V}else D=e.slice(T-1,L),c+=D,h+=D.length,a=L-1}else x===10&&(g++,l++,h=0),Number.isNaN(x)?E():(c+=String.fromCharCode(x),h++);return o.join("");function v(){return{line:g,column:h,offset:a+((f?f.offset:0)||0)}}function S(k,T){let R;n.warning&&(R=v(),R.column+=T,R.offset+=T,n.warning.call(n.warningContext||void 0,Uae[k],R,k))}function E(){c&&(o.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:y,end:v()}),c="")}}function Vae(e){return e>=55296&&e<=57343||e>1114111}function $ae(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var Gae=0,zh={},tr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Gae}),e.__id},clone:function e(t,n){n=n||{};var r,o;switch(tr.util.type(t)){case"Object":if(o=tr.util.objId(t),n[o])return n[o];r={},n[o]=r;for(var a in t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return o=tr.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach(function(l,c){r[c]=e(l,n)}),r);default:return t}}},languages:{plain:zh,plaintext:zh,text:zh,txt:zh,extend:function(e,t){var n=tr.util.clone(tr.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r=r||tr.languages;var o=r[e],a={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var c in n)n.hasOwnProperty(c)&&(a[c]=n[c]);n.hasOwnProperty(l)||(a[l]=o[l])}var f=r[e];return r[e]=a,tr.languages.DFS(tr.languages,function(d,g){g===f&&d!=e&&(this[d]=a)}),a},DFS:function e(t,n,r,o){o=o||{};var a=tr.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var c=t[l],f=tr.util.type(c);f==="Object"&&!o[a(c)]?(o[a(c)]=!0,e(c,n,null,o)):f==="Array"&&!o[a(c)]&&(o[a(c)]=!0,e(c,n,l,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(tr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=tr.tokenize(r.code,r.grammar),tr.hooks.run("after-tokenize",r),ef.stringify(tr.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new Yae;return op(o,o.head,e),k7(e,o,t,o.head,0),Kae(o)},hooks:{all:{},add:function(e,t){var n=tr.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=tr.hooks.all[e];if(!(!n||!n.length))for(var r=0,o;o=n[r++];)o(t)}},Token:ef};function ef(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||"").length|0}function RE(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function k7(e,t,n,r,o,a){for(var l in n)if(!(!n.hasOwnProperty(l)||!n[l])){var c=n[l];c=Array.isArray(c)?c:[c];for(var f=0;f<c.length;++f){if(a&&a.cause==l+","+f)return;var d=c[f],g=d.inside,h=!!d.lookbehind,y=!!d.greedy,x=d.alias;if(y&&!d.pattern.global){var v=d.pattern.toString().match(/[imsuy]*$/)[0];d.pattern=RegExp(d.pattern.source,v+"g")}for(var S=d.pattern||d,E=r.next,k=o;E!==t.tail&&!(a&&k>=a.reach);k+=E.value.length,E=E.next){var T=E.value;if(t.length>e.length)return;if(!(T instanceof ef)){var R=1,L;if(y){if(L=RE(S,k,e,h),!L||L.index>=e.length)break;var D=L.index,j=L.index+L[0].length,N=k;for(N+=E.value.length;D>=N;)E=E.next,N+=E.value.length;if(N-=E.value.length,k=N,E.value instanceof ef)continue;for(var A=E;A!==t.tail&&(N<j||typeof A.value=="string");A=A.next)R++,N+=A.value.length;R--,T=e.slice(k,N),L.index-=k}else if(L=RE(S,0,T,h),!L)continue;var D=L.index,U=L[0],I=T.slice(0,D),q=T.slice(D+U.length),$=k+T.length;a&&$>a.reach&&(a.reach=$);var V=E.prev;I&&(V=op(t,V,I),k+=I.length),Wae(t,V,R);var Y=new ef(l,g?tr.tokenize(U,g):U,x,U);if(E=op(t,V,Y),q&&op(t,E,q),R>1){var H={cause:l+","+f,reach:$};k7(e,t,n,E.prev,k,H),a&&H.reach>a.reach&&(a.reach=H.reach)}}}}}}function Yae(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function op(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function Wae(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}function Kae(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}const T7=tr;function A7(){}A7.prototype=T7;const Xn=new A7;Xn.highlight=Qae;Xn.register=Xae;Xn.alias=Zae;Xn.registered=Jae;Xn.listLanguages=ese;Xn.util.encode=tse;Xn.Token.stringify=xy;function Qae(e,t){if(typeof e!="string")throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&typeof t=="object")n=t;else{if(r=t,typeof r!="string")throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(Xn.languages,r))n=Xn.languages[r];else throw new Error("Unknown language: `"+r+"` is not registered")}return{type:"root",children:T7.highlight.call(Xn,e,n,r)}}function Xae(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(Xn.languages,e.displayName)||e(Xn)}function Zae(e,t){const n=Xn.languages;let r={};typeof e=="string"?t&&(r[e]=t):r=e;let o;for(o in r)if(Object.hasOwn(r,o)){const a=r[o],l=typeof a=="string"?[a]:a;let c=-1;for(;++c<l.length;)n[l[c]]=n[o]}}function Jae(e){if(typeof e!="string")throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(Xn.languages,e)}function ese(){const e=Xn.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function xy(e,t){if(typeof e=="string")return{type:"text",value:e};if(Array.isArray(e)){const r=[];let o=-1;for(;++o<e.length;)e[o]!==null&&e[o]!==void 0&&e[o]!==""&&r.push(xy(e[o],t));return r}const n={attributes:{},classes:["token",e.type],content:xy(e.content,t),language:t,tag:"span",type:e.type};return e.alias&&n.classes.push(...typeof e.alias=="string"?[e.alias]:e.alias),Xn.hooks.run("wrap",n),Pae(n.tag+"."+n.classes.join("."),nse(n.attributes),n.content)}function tse(e){return e}function nse(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=qae(e[t]));return e}var Kt=jae(Xn,{});Kt.registerLanguage=function(e,t){return Xn.register(t)};Kt.alias=function(e,t){return Xn.alias(e,t)};Xs.displayName="markup";Xs.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Xs(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var l={};l[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}Eb.displayName="css";Eb.aliases=[];function Eb(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}L0.displayName="clike";L0.aliases=[];function L0(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}kc.displayName="javascript";kc.aliases=["js"];function kc(e){e.register(L0),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}kb.displayName="sql";kb.aliases=[];function kb(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}Yf.displayName="bash";Yf.aliases=["sh","shell"];function Yf(e){(function(t){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=o.variable[1].inside,c=0;c<a.length;c++)l[a[c]]=t.languages.bash[a[c]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(e)}_0.displayName="yaml";_0.aliases=["yml"];function _0(e){(function(t){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,d){d=(d||"").replace(/m/g,"")+"m";var g=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return o}).replace(/<<value>>/g,function(){return f});return RegExp(g,d)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return o}).replace(/<<key>>/g,function(){return"(?:"+a+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(l),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(e)}D0.displayName="markdown";D0.aliases=["md"];function D0(e){e.register(Xs),(function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(c){return c=c.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+l+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+l+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(t.languages.markdown[c].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function f(d){if(!(!d||typeof d=="string"))for(var g=0,h=d.length;g<h;g++){var y=d[g];if(y.type!=="code"){f(y.content);continue}var x=y.content[1],v=y.content[3];if(x&&v&&x.type==="code-language"&&v.type==="code-block"&&typeof x.content=="string"){var S=x.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase();var E="language-"+S;v.alias?typeof v.alias=="string"?v.alias=[v.alias,E]:v.alias.push(E):v.alias=[E]}}}f(c.tokens)}),t.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,g=c.classes.length;d<g;d++){var h=c.classes[d],y=/language-(.+)/.exec(h);if(y){f=y[1];break}}var x=t.languages[f];if(x)c.content=t.highlight(c.content.value,x,f);else if(f&&f!=="none"&&t.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,t.plugins.autoloader.loadLanguages(f,function(){var S=document.getElementById(v);S&&(S.innerHTML=t.highlight(S.textContent,t.languages[f],f))})}}}),RegExp(t.languages.markup.tag.pattern.source,"gi"),t.languages.md=t.languages.markdown})(e)}Tb.displayName="diff";Tb.aliases=[];function Tb(e){(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach(function(r){var o=n[r],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),t.languages.diff[r]={pattern:RegExp("^(?:["+o+`].*(?:\r
123
- ?|
124
- |(?![\\s\\S])))+`,"m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:n})})(e)}Ab.displayName="go";Ab.aliases=[];function Ab(e){e.register(L0),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}Rb.displayName="json";Rb.aliases=["webmanifest"];function Rb(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}Wf.displayName="typescript";Wf.aliases=["ts"];function Wf(e){e.register(kc),(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript})(e)}I0.displayName="python";I0.aliases=["py"];function I0(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}z0.displayName="jsx";z0.aliases=[];function z0(e){e.register(kc),e.register(Xs),(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(d,g){return d=d.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return o}).replace(/<SPREAD>/g,function(){return a}),RegExp(d,g)}a=l(a).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(d){return d?typeof d=="string"?d:typeof d.content=="string"?d.content:d.content.map(c).join(""):""},f=function(d){for(var g=[],h=0;h<d.length;h++){var y=d[h],x=!1;if(typeof y!="string"&&(y.type==="tag"&&y.content[0]&&y.content[0].type==="tag"?y.content[0].content[0].content==="</"?g.length>0&&g[g.length-1].tagName===c(y.content[0].content[1])&&g.pop():y.content[y.content.length-1].content==="/>"||g.push({tagName:c(y.content[0].content[1]),openedBraces:0}):g.length>0&&y.type==="punctuation"&&y.content==="{"?g[g.length-1].openedBraces++:g.length>0&&g[g.length-1].openedBraces>0&&y.type==="punctuation"&&y.content==="}"?g[g.length-1].openedBraces--:x=!0),(x||typeof y=="string")&&g.length>0&&g[g.length-1].openedBraces===0){var v=c(y);h<d.length-1&&(typeof d[h+1]=="string"||d[h+1].type==="plain-text")&&(v+=c(d[h+1]),d.splice(h+1,1)),h>0&&(typeof d[h-1]=="string"||d[h-1].type==="plain-text")&&(v=c(d[h-1])+v,d.splice(h-1,1),h--),d[h]=new t.Token("plain-text",v,null,v)}y.content&&typeof y.content!="string"&&f(y.content)}};t.hooks.add("after-tokenize",function(d){d.language!=="jsx"&&d.language!=="tsx"||f(d.tokens)})})(e)}Nb.displayName="tsx";Nb.aliases=[];function Nb(e){e.register(z0),e.register(Wf),(function(t){var n=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",n),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(e)}P0.displayName="rust";P0.aliases=[];function P0(e){(function(t){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(e)}const Ob={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}};Kt.registerLanguage("bash",Yf);Kt.registerLanguage("css",Eb);Kt.registerLanguage("diff",Tb);Kt.registerLanguage("go",Ab);Kt.registerLanguage("html",Xs);Kt.registerLanguage("javascript",kc);Kt.registerLanguage("js",kc);Kt.registerLanguage("json",Rb);Kt.registerLanguage("jsx",z0);Kt.registerLanguage("markdown",D0);Kt.registerLanguage("markup",Xs);Kt.registerLanguage("md",D0);Kt.registerLanguage("python",I0);Kt.registerLanguage("py",I0);Kt.registerLanguage("rust",P0);Kt.registerLanguage("rs",P0);Kt.registerLanguage("sh",Yf);Kt.registerLanguage("shell",Yf);Kt.registerLanguage("sql",kb);Kt.registerLanguage("ts",Wf);Kt.registerLanguage("tsx",Nb);Kt.registerLanguage("typescript",Wf);Kt.registerLanguage("xml",Xs);Kt.registerLanguage("yaml",_0);Kt.registerLanguage("yml",_0);const R7=C.memo(({language:e,value:t})=>{const[n,r]=C.useState(!1),o=()=>{r(!0),navigator.clipboard.writeText(t),setTimeout(()=>r(!1),1e3)};return p.jsxs("div",{className:"codeblock border-input relative w-full overflow-hidden rounded border p-2 font-sans dark:bg-zinc-900",children:[p.jsxs("div",{className:"bg-secondary flex w-full items-center justify-between px-2 py-1",children:[p.jsx("span",{className:"text-primary text-lg font-bold lowercase italic",children:e}),p.jsx("div",{className:"flex items-center py-1",children:p.jsxs(De,{className:"hover:bg-border text-xs focus-visible:ring-1 focus-visible:ring-offset-0",onClick:o,size:"xs",variant:"ghost",children:[n?p.jsx(Ys,{className:"h-4 w-4"}):p.jsx(iU,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Copy code"})]})})]}),p.jsx(Kt,{codeTagProps:{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.75rem"}},customStyle:{background:"transparent",margin:0,padding:"0.5rem",width:"100%"},language:e,PreTag:"div",style:Ob,children:t})]})});R7.displayName="CodeBlock";const rse=C.memo(GA,(e,t)=>e.children===t.children),ise=e=>C.isValidElement(e)&&typeof e.type!="string"&&["h1","h2","h3","h4","h5","h6","p"].includes(e.type.name??""),ose=e=>Array.isArray(e)&&e.some(t=>t?.props?.className==="task-list-item"),ase=e=>C.Children.map(e,t=>ise(t)?p.jsx("div",{className:"mb-1 inline-flex",children:C.createElement(t.type,{...t.props})}):t),sse=[[Jre,["yaml","toml"]],g7],lse={a({children:e,href:t}){return t?p.jsx("a",{className:"underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):p.jsx(p.Fragment,{children:e})},blockquote({children:e}){return p.jsx("blockquote",{className:"border-input border-l-4 pl-4 italic",children:e})},code({children:e,className:t}){const n=/language-(\w+)/.exec(t??""),r=n?n[1]:"",o=String(e).replace(/\n$/,""),a=o.includes(`
125
- `);return r||a?p.jsx(R7,{language:r,value:o}):p.jsx("code",{className:"border-input bg-secondary rounded border px-1 py-0.5 text-amber-500",children:o})},h1({children:e}){return p.jsx("h1",{className:"text-2xl font-bold",children:e})},h2({children:e}){return p.jsx("h2",{className:"text-xl font-bold",children:e})},h3({children:e}){return p.jsx("h3",{className:"text-lg font-bold",children:e})},h4({children:e}){return p.jsx("h4",{className:"text-base font-bold",children:e})},h5({children:e}){return p.jsx("h5",{className:"text-sm font-bold",children:e})},h6({children:e}){return p.jsx("h6",{className:"text-xs font-bold",children:e})},hr(){return p.jsx("hr",{className:"my-4"})},li({children:e}){return p.jsx("li",{className:"mt-1 [&>ol]:pl-4 [&>ul]:pl-4",children:ase(e)})},ol({children:e}){return p.jsx("ol",{className:"list-inside list-decimal",children:e})},p({children:e}){return p.jsx("p",{className:"mb-2 whitespace-pre-wrap last:mb-0",children:e})},pre({children:e}){return p.jsx("pre",{className:"rounded p-2",children:e})},table({children:e}){return p.jsx("div",{className:"border-input overflow-x-auto rounded text-xs",children:p.jsx("table",{className:"min-w-full divide-y",children:e})})},tbody({children:e}){return p.jsx("tbody",{className:"divide-border divide-y",children:e})},td({children:e}){return p.jsx("td",{className:"whitespace-nowrap px-4 py-2",children:e})},th({children:e}){return p.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider",children:e})},thead({children:e}){return p.jsx("thead",{children:e})},tr({children:e}){return p.jsx("tr",{children:e})},ul({children:e}){return ose(e)?p.jsx("ul",{className:"list-none",children:e}):p.jsx("ul",{className:"list-inside list-disc",children:e})}};function cse({content:e}){const t=e.split(`
126
- `);let n="none";return p.jsx("pre",{className:"bg-card overflow-x-auto rounded-md py-2 font-mono text-xs leading-6",children:t.map((r,o)=>{let a="block px-3 whitespace-pre-wrap break-all";return r.startsWith("<<<<<<<")?(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="ours"):r.startsWith("=======")&&n!=="none"?(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="theirs"):r.startsWith(">>>>>>>")&&(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="none"),p.jsx("span",{className:a,children:r||" "},o)})})}function use({className:e,content:t}){const n=e??"bg-card text-secondary-foreground mx-auto min-h-0 w-full flex-1 space-y-2 overflow-y-auto break-words text-sm leading-7";return lae(t)?p.jsxs("div",{className:n,children:[p.jsxs("div",{className:"bg-[#4f3422] text-[#ffc53d] mb-2 flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[p.jsx(VU,{className:"size-3.5 shrink-0"}),p.jsx("span",{children:"Unresolved conflict markers — showing raw content with side highlighting."})]}),p.jsx(cse,{content:t})]}):p.jsx("div",{className:n,children:p.jsx(rse,{components:lse,remarkPlugins:sse,children:t})})}const fse=()=>{};function dse({onToggleHistory:e}){const{cancelEdit:t,editContent:n,enterEditMode:r,fileData:o,handleSelect:a,hasChanges:l,isEditMode:c,isFetchingFile:f,isUpdating:d,navigateHome:g,nodes:h,saveChanges:y,selectedNode:x,selectedPath:v,setEditContent:S}=Sc(),{data:E,isPending:k}=lA({enabled:!!v&&Uf(v),path:v}),T=E?.pages[0]?.commits[0],R=C.useMemo(()=>!x||x.type!=="tree"?x?[]:h:x.children??[],[x,h]),L=C.useMemo(()=>R.filter(U=>U.type==="blob").map(U=>U.path),[R]),{data:j}=vJ({enabled:L.length>0,paths:L}),N=C.useMemo(()=>{const U=new Map((j?.files??[]).map(I=>[I.path,I]));return R.map(I=>{const q=U.get(I.path);return{lastUpdatedBy:q?.lastUpdatedBy,lastUpdatedWhen:q?.lastUpdatedWhen?S4(new Date(q.lastUpdatedWhen),{addSuffix:!0}):void 0,name:I.name,path:I.path,type:I.type}})},[R,j]),A=U=>{const I=R.find(q=>q.path===U.path);I&&a(I)},D=()=>{if(!v)return;const U=v.split("/").filter(Boolean);if(U.length<=1){g();return}const I=U.slice(0,-1).join("/");a({children:[],name:"..",path:I,type:"tree"})};return x?.type==="blob"?p.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[p.jsx("div",{className:"px-5 pt-5",children:p.jsx(k4,{})}),p.jsx(tZ,{canEdit:!0,content:o?.content??"",contentView:!c&&o?.content?p.jsx(use,{content:o.content}):void 0,editContent:n,fileName:o?.title??x.name,hasChanges:l,headerClassName:"pt-4 pb-0",isEditMode:c,isHistoryVisible:!1,isLoading:f,isUpdating:d,onCancelEdit:t,onContentChange:S,onEnterEditMode:r,onSaveChanges:y,onToggleHistory:e??fse,showTags:!1,tags:o?.tags,timeline:T?p.jsx(JX,{className:"mx-5 mb-5",description:`${T.author.name} updated ${x.name}`,name:T.author.name,timestamp:S4(new Date(T.timestamp),{addSuffix:!0})}):k?p.jsxs("div",{className:"border-border mx-5 mb-5 flex items-center gap-2 border-b py-2",children:[p.jsx(La,{className:"size-6 shrink-0 rounded-full"}),p.jsx(La,{className:"h-4 w-56"})]}):void 0})]}):p.jsxs("div",{className:"flex-1 h-full flex-col flex p-5 gap-4",children:[p.jsx(k4,{}),p.jsx(nZ,{nodes:N,onBack:D,onNodeClick:A,showBack:!!v})]})}function NE({title:e,authorName:t,authorAvatar:n,isActive:r,isLast:o,variant:a="default",highlightColor:l="#ED9A00",onClick:c,className:f}){const d=a==="highlight";return p.jsxs("div",{role:c?"button":void 0,onClick:c,className:we("relative flex gap-4 rounded-lg border border-transparent px-4",{"border-primary bg-primary/5":r,"cursor-pointer":!!c},d&&"bg-[#ED9A00]/5",c&&d&&"hover:bg-[#ED9A00]/10",f),children:[p.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[d?p.jsx("div",{className:"mt-2 size-2 rounded-full",style:{backgroundColor:l}}):r?p.jsx("div",{className:"bg-primary mt-2 size-2 rounded-full"}):p.jsx(YO,{className:"mt-2 size-2 text-neutral-500",strokeWidth:6}),!o&&!r&&!d&&p.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),p.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[p.jsx(Dp,{className:"text-foreground mb-1 block text-sm font-medium",text:e}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsxs(f0,{className:"size-4",children:[n&&p.jsx(Ux,{src:n}),p.jsx(d0,{className:"text-[10px]",children:t[0]})]}),p.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:t})]})]})]})}function OE({isActive:e=!1,isLast:t=!1}){return p.jsxs("div",{className:"relative flex gap-4 rounded-lg px-4",children:[p.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[p.jsx(La,{className:"mt-2 size-2 rounded-full"}),!t&&!e&&p.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),p.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[p.jsx(La,{className:"h-4 w-3/4"}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(La,{className:"size-4 rounded-full"}),p.jsx(La,{className:"h-3 w-24"})]})]})]})}function hse({showCurrent:e=!0,olderCount:t=3,currentLabel:n="Current",olderLabel:r="Older"}){return p.jsxs("div",{className:"space-y-6",children:[e&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("p",{className:"text-xs font-medium text-neutral-400",children:n}),p.jsx(OE,{isActive:!0})]}),t>0&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("p",{className:"text-xs font-medium text-neutral-400",children:r}),Array.from({length:t}).map((o,a)=>p.jsx(OE,{isLast:a===t-1},a))]})]})}function jE({label:e,children:t}){return p.jsxs("div",{className:"space-y-2",children:[p.jsx("p",{className:"text-xs font-medium text-neutral-400",children:e}),t]})}function pse({title:e="Version history",isLoading:t,error:n,isEmpty:r,hasNextPage:o,isFetchingNextPage:a,onLoadMore:l,onClose:c,children:f}){return p.jsxs("div",{className:"flex h-full flex-col",children:[p.jsxs("div",{className:"bg-card flex flex-shrink-0 justify-between rounded-t-xl px-6 py-3 pr-3.5",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("div",{className:"text-foreground text-sm font-semibold",children:e})}),p.jsx("div",{children:p.jsx(De,{className:"bg-card hover:bg-muted h-9 w-9 rounded-lg p-2",onClick:c,children:p.jsx(qp,{className:"text-muted-foreground size-5"})})})]}),p.jsx("div",{className:"bg-card flex-1 space-y-6 overflow-y-auto rounded-b-xl p-6",children:t?p.jsx(hse,{showCurrent:!0,olderCount:3}):n?p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx("p",{className:"text-sm text-neutral-500",children:"Failed to load history"})}):r?p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx("p",{className:"text-sm text-neutral-500",children:"No history available"})}):p.jsxs(p.Fragment,{children:[f,o&&p.jsx(De,{onClick:l,disabled:a,className:"text-primary w-25 rounded-md bg-transparent text-sm font-medium hover:bg-transparent hover:underline",children:a?p.jsx(tf,{className:"h-4 w-4 animate-spin"}):"View older"})]})})]})}function mse({onClose:e}){const{selectedPath:t}=Sc(),{data:n,error:r,fetchNextPage:o,hasNextPage:a,isFetchingNextPage:l,isLoading:c}=lA({enabled:!!t&&Uf(t),path:t}),f=C.useMemo(()=>n?.pages.flatMap(h=>h.commits)??[],[n]),d=f[0],g=f.slice(1);return p.jsxs(pse,{error:!!r,hasNextPage:a,isEmpty:!d,isFetchingNextPage:l,isLoading:c,onClose:e,onLoadMore:o,children:[d&&p.jsx(jE,{label:"Current",children:p.jsx(NE,{authorName:d.author.name,isActive:!0,title:ME(d.timestamp)})}),g.length>0&&p.jsx(jE,{label:"Older",children:g.map((h,y)=>p.jsx(NE,{authorName:h.author.name,isLast:y===g.length-1,title:ME(h.timestamp)},h.sha))})]})}function ME(e){try{return`Updated at ${mJ(new Date(e),"MMM d, HH:mm")}`}catch{return"Updated"}}function gse({nodes:e,expandedPaths:t,selectedPath:n,loadingPaths:r,onToggle:o,onSelect:a,disableFileSelect:l,header:c,className:f}){const d=(h,y)=>{h.stopPropagation(),y.type==="tree"&&o(y)},g=h=>{l&&h.type==="blob"||a(h)};return p.jsxs("div",{className:we("flex h-full flex-col",f),children:[c,p.jsx("div",{className:"max-h-full w-full flex-1 overflow-y-auto",children:e.map(({node:h,depth:y})=>{const x=t.has(h.path),v=n===h.path,S=r?.has(h.path);return p.jsxs("div",{className:we("text-muted-foreground relative flex h-9 cursor-pointer items-center gap-2 rounded text-sm transition-colors hover:bg-neutral-800",{"bg-secondary text-foreground":v}),style:{paddingLeft:`${String(y*12)}px`},onClick:()=>g(h),children:[Array.from({length:y}).map((E,k)=>p.jsx("div",{className:"absolute top-0 h-full border-l border-neutral-700",style:{left:`${String((k+1)*12)}px`}},k)),p.jsx("div",{className:we("flex h-full items-center rounded px-1 transition-colors hover:bg-neutral-700",{"pointer-events-none":h.type==="blob"}),onClick:E=>d(E,h),children:p.jsx("span",{className:we({invisible:h.type==="blob"}),children:S?p.jsx(tf,{className:"size-4 animate-spin"}):p.jsx(UO,{className:we("size-4 transition-transform",{"-rotate-90":!x}),size:16})})}),p.jsx("span",{className:"shrink-0",children:h.type==="tree"?p.jsx(o1,{className:"size-4",strokeWidth:2}):p.jsx($E,{className:we("size-4",{"text-primary-foreground":v,"text-primary":!v}),strokeWidth:2})}),p.jsx(Dp,{text:h.name})]},h.path)})})]})}function yse({count:e=5,className:t}){return p.jsx("div",{className:we("flex flex-col gap-2",t),children:Array.from({length:e}).map((n,r)=>p.jsxs("div",{className:"flex h-9 items-center gap-4 rounded-lg px-4",children:[p.jsx(La,{className:"size-5 shrink-0 rounded"}),p.jsx(La,{className:"h-4",style:{width:`${String(60+r*17%30)}%`}})]},r))})}function xse({onCollapseClick:e}){const{navigateHome:t,selectedPath:n}=Sc(),r=!n,o=a=>{a.stopPropagation(),e?.()};return p.jsxs("div",{className:we("text-muted-foreground flex h-9 cursor-pointer items-center justify-between gap-2 rounded px-2 text-sm transition-colors hover:bg-neutral-800",{"bg-background text-foreground":r}),onClick:t,children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(m9,{className:"size-4",strokeWidth:2}),p.jsx("span",{className:"font-medium",children:"All context"})]}),e&&p.jsx("button",{className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center rounded p-0.5 transition-colors hover:bg-neutral-700",onClick:o,type:"button",children:p.jsx(GH,{className:"size-5"})})]})}function bse({onCollapse:e}){const{expandedPaths:t,flattenedNodes:n,handleSelect:r,handleToggle:o,isFetchingTree:a,selectedPath:l}=Sc();return a&&n.length===0?p.jsx(yse,{className:"p-2",count:8}):p.jsx(gse,{expandedPaths:t,header:p.jsx(xse,{onCollapseClick:e}),nodes:n,onSelect:r,onToggle:o,selectedPath:l})}function vse(){const{closeRightPanel:e,isLeftPanelOpen:t,isRightPanelOpen:n,toggleLeftPanel:r,toggleRightPanel:o}=qX(),{selectedPath:a}=Sc(),l=n&&Uf(a);return p.jsxs("div",{className:"flex h-full gap-4",children:[t?p.jsx("div",{className:"w-72 shrink-0 overflow-y-auto",children:p.jsx(bse,{onCollapse:r})}):p.jsx("div",{className:"bg-card flex shrink-0 items-start rounded-xl p-2",children:p.jsx("button",{className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center rounded p-1 transition-colors hover:bg-neutral-800",onClick:r,type:"button",children:p.jsx(WH,{className:"size-5"})})}),p.jsx("div",{className:"bg-card flex min-w-0 flex-1 rounded-xl",children:p.jsx(dse,{onToggleHistory:o})}),l&&p.jsx("div",{className:"w-80 shrink-0 overflow-y-auto",children:p.jsx(mse,{onClose:e})})]})}function wse(){return p.jsx(ZX,{children:p.jsx(vse,{})})}function Sse(){return p.jsx(xk,{replace:!0,to:"/contexts"})}const Cse="/assets/not-found-N0eqX-Lm.svg";function LE(){return p.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-6 p-8 text-center",children:[p.jsx("img",{alt:"",className:"w-30",src:Cse}),p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("h1",{className:"text-foreground text-xl font-medium",children:"This page isn't available"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"We can't find a page with the url you entered."})]}),p.jsx(De,{className:"px-4",nativeButton:!1,render:p.jsx(Oy,{to:"/"}),size:"sm",variant:"secondary",children:"Back to Home"})]})}function Ese(){return p.jsxs("div",{className:"flex flex-col items-center gap-2",children:[p.jsx("img",{alt:"Byterover",className:"size-10",src:gx}),p.jsx("span",{className:"text-lg font-semibold text-foreground",children:"BYTEROVER"})]})}function kse(){const e=Be(y=>y.isConnected),t=Be(y=>y.setSelectedProject),n=Be(y=>y.version),r=qa(),a=Wi().state?.from?.pathname??"/",{data:l,isLoading:c}=$9({queryConfig:{enabled:e,refetchInterval:3e3,retry:1,staleTime:1e4}}),f=C.useMemo(()=>l?.locations??[],[l]),[d,g]=C.useState(!1);function h(y){t(y.projectPath),r(a,{replace:!0})}return p.jsxs("div",{className:"fixed inset-0 flex items-center justify-center",children:[p.jsxs("div",{className:"flex w-[400px] flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-col items-center gap-2",children:[p.jsx(Ese,{}),p.jsx("div",{className:"flex items-center justify-center gap-1 text-xs font-medium leading-4",children:p.jsxs("span",{className:"text-muted-foreground",children:["Version ",n||"—"]})})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2.5 px-2",children:[p.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:"Recent Projects"}),f.length>0&&p.jsx("button",{className:"text-xs font-medium text-muted-foreground transition-colors hover:text-foreground cursor-pointer",onClick:()=>g(!0),type:"button",children:"See all"})]}),c&&p.jsx("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:"Loading projects..."}),!c&&f.length===0&&p.jsxs("div",{className:"flex flex-col gap-1 px-2 py-2",children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:"No projects found."}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Run ",p.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:"brv webui"})," in a project directory to get started."]})]}),p.jsx("div",{className:"flex flex-col",children:f.slice(0,5).map(y=>p.jsx(Y9,{onClick:()=>h(y),project:y},y.projectPath))})]})]}),p.jsx(W9,{onOpenChange:g,onSelect:h,open:d,projects:f})]})}function N7(e,t=1e3){const[n,r]=C.useState(()=>Date.now());return C.useEffect(()=>{if(!e)return;const o=globalThis.setInterval(()=>r(Date.now()),t);return()=>{globalThis.clearInterval(o)}},[e,t]),n}const O7={curate:"Step 2 of 4",query:"Step 3 of 4"},Tse={curate:"Continue to query",query:"Continue to connector"},Ase={curate:"Watch the agent capture this knowledge into your context tree.",query:"Watch the agent search the context tree and synthesize an answer."},Rse={curate:"Knowledge captured. Ready to ask a question about it?",query:"Answer synthesized. One last step — connect ByteRover to your AI tool."};function j7(e){const t=on(a=>a.tourActive),n=on(a=>a.tourStep),r=on(a=>a.tourTaskId);return t&&r===e.taskId&&(n==="curate"||n==="query")?n:null}function Nse({task:e}){const t=j7(e);return t?p.jsxs("div",{className:"border-primary-foreground/30 bg-primary/8 flex items-center gap-3 rounded-lg border px-4 py-2.5",children:[p.jsx(u0,{label:O7[t]}),p.jsx("span",{className:"text-muted-foreground text-sm",children:ro(e.status)?"Task done. Scroll for the Continue button.":Ase[t]})]}):null}function Ose({task:e}){const t=on(r=>r.advanceTour),n=j7(e);return!n||!ro(e.status)?null:p.jsxs("div",{className:"border-primary-foreground/40 bg-primary/12 flex items-center gap-4 rounded-lg border px-4 py-3.5",children:[p.jsx("span",{className:"bg-primary-foreground/20 text-primary-foreground grid size-8 shrink-0 place-items-center rounded-full",children:p.jsx(Ys,{className:"size-4",strokeWidth:3})}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-foreground text-sm font-medium",children:Rse[n]}),p.jsxs("p",{className:"text-muted-foreground text-xs",children:[O7[n]," complete"]})]}),p.jsxs(De,{onClick:()=>t(),type:"button",children:[Tse[n],p.jsx(d9,{className:"size-4"})]})]})}const jse=80;function Mse(e,t=!0){const n=C.useRef(null),r=C.useRef(!0),o=C.useCallback(()=>{const a=n.current;if(!a)return;const l=a.scrollHeight-a.scrollTop-a.clientHeight;r.current=l<jse},[]);return C.useLayoutEffect(()=>{if(!t)return;const a=n.current;!a||!r.current||(a.scrollTop=a.scrollHeight)},[t,...e]),{onScroll:o,ref:n}}function Lse(e){const t=[];for(const n of e.reasoningContents??[])t.push({item:n,kind:"reasoning",timestamp:n.timestamp});for(const n of e.toolCalls??[])t.push({call:n,kind:"toolCall",timestamp:n.timestamp});return t.sort((n,r)=>n.timestamp-r.timestamp),t}const ec=e=>String(e).padStart(2,"0");function M7(e,t){const n=Math.max(0,t-e),r=Math.round(n/1e3);if(r<60)return`${r}s`;const o=Math.round(r/60);if(o<60)return`${o}m`;const a=Math.round(o/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}function qu(e){const t=Math.floor(Math.max(0,e)/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=t%60;return n>0?`${n}:${ec(r)}:${ec(o)}`:`${r}:${ec(o)}`}function L7(e){const t=new Date(e);return`${ec(t.getHours())}:${ec(t.getMinutes())}:${ec(t.getSeconds())}`}function _7(e){if(!e)return"";const t=e.replace(/^task[_-]?/,"");return t.length>8?t.slice(0,8):t}const Do=e=>vn(e,"path")??vn(e,"file_path")??vn(e,"filePath")??"",_se=e=>vn(e,"command")??"",Dse=e=>vn(e,"code")??"",Iu=e=>vn(e,"query")??"",Ph=e=>vn(e,"path")??vn(e,"key")??vn(e,"name")??"",Ise=e=>{const t=vn(e,"pattern")??"",n=vn(e,"path");return n?`${t} in ${n}`:t},zse=e=>{const t=vn(e,"pattern")??"",n=vn(e,"path");return n?`${t} in ${n}`:t},_E=(e,t)=>n=>{const r=n[e];return Array.isArray(r)?`${r.length} ${t}${r.length===1?"":"s"}`:""},DE=(e,t=80)=>e.length>t?`${e.slice(0,t-1)}…`:e,Pse={agentic_map:e=>Do(e)||Iu(e),bash_exec:_se,bash_output:e=>vn(e,"processId")??"",batch:_E("calls","call"),code_exec:Dse,create_knowledge_topic:e=>vn(e,"path")??vn(e,"topic")??"",curate:e=>vn(e,"title")??vn(e,"path")??"",delete_memory:Ph,detect_domains:e=>DE(vn(e,"data")??"",60),edit_file:Do,edit_memory:Ph,expand_knowledge:e=>vn(e,"stubPath")??Do(e),glob_files:zse,grep_content:Ise,ingest_resource:e=>vn(e,"source")??vn(e,"url")??Do(e),kill_process:e=>vn(e,"processId")??"",list_directory:Do,list_memories:Do,llm_map:e=>Do(e)||Iu(e),read_file:Do,read_memory:Ph,read_todos:()=>"",search_history:Iu,search_knowledge:Iu,swarm_query:Iu,swarm_store:e=>DE(vn(e,"content")??"",60),write_file:Do,write_memory:Ph,write_todos:_E("todos","todo")};function Fse(e){const t=Object.entries(e).find(([,n])=>typeof n=="string"||typeof n=="number");return t?String(t[1]):""}function jb(e){const t=Pse[e.toolName];return t?t(e.args):Fse(e.args)}function vn(e,t){const n=e[t];return typeof n=="string"?n:void 0}const Bse={a({children:e,href:t}){return t?p.jsx("a",{className:"text-identifier underline-offset-2 hover:underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):p.jsx(p.Fragment,{children:e})},blockquote({children:e}){return p.jsx("blockquote",{className:"border-border text-muted-foreground border-l-2 pl-3 italic",children:e})},code({children:e,className:t}){const n=String(e).replace(/\n$/,""),o=/language-(\w+)/.exec(t??"")?.[1];return n.includes(`
127
- `)||o?p.jsx("div",{className:"border-border/50 bg-muted/40 my-2 overflow-x-auto rounded-md border",children:p.jsx(Kt,{codeTagProps:{style:{fontFamily:"ui-monospace, SF Mono, Menlo, Consolas, monospace",fontSize:"0.75rem"}},customStyle:{background:"transparent",fontSize:"0.75rem",lineHeight:1.6,margin:0,padding:"0.75rem"},language:o??"plaintext",PreTag:"div",style:Ob,children:n})}):p.jsx("code",{className:"bg-muted/60 rounded px-1 py-0.5 mono text-[0.85em] text-zinc-200",children:e})},h1({children:e}){return p.jsx("h1",{className:"text-foreground mt-3 mb-2 text-base font-semibold",children:e})},h2({children:e}){return p.jsx("h2",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},h3({children:e}){return p.jsx("h3",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},li({children:e}){return p.jsx("li",{className:"my-0.5 leading-relaxed",children:e})},ol({children:e}){return p.jsx("ol",{className:"my-2 list-inside list-decimal space-y-1 pl-1",children:e})},p({children:e}){return p.jsx("p",{className:"my-1.5 leading-relaxed first:mt-0 last:mb-0",children:e})},ul({children:e}){return p.jsx("ul",{className:"my-2 list-inside list-disc space-y-1 pl-1",children:e})}},Hse=[g7],Kf=C.memo(({children:e,className:t})=>p.jsx("div",{className:t??"text-foreground/90 text-sm",children:p.jsx(GA,{components:Bse,remarkPlugins:Hse,children:e})}));Kf.displayName="MarkdownInline";function n1(){return p.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"·"})}function Cf({children:e,count:t}){return p.jsxs("div",{className:"text-muted-foreground mono mb-3 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[p.jsx("span",{children:e}),p.jsx("span",{className:"bg-border/50 h-px flex-1"}),t!==void 0&&p.jsx("span",{className:"tabular-nums",children:t})]})}const Use={completed:"bg-emerald-500",error:"bg-red-400",muted:"bg-muted-foreground/60",running:"bg-blue-400"},qse={completed:"bg-emerald-500/70",error:"bg-red-400/70",muted:"bg-muted-foreground/30",running:"rail-running"};function Mb({flash:e,tone:t,tooltip:n}){const r=p.jsxs("span",{className:"absolute top-1 left-0 grid size-3 place-items-center",children:[p.jsx("span",{className:we("ring-background relative z-10 size-2 rounded-full ring-[1.5px]",Use[t],e&&"animate-dot-flash")}),t==="running"&&p.jsx("span",{className:"bg-blue-400 absolute inset-0 rounded-full opacity-50 animate-dot-pulse"})]});return n?p.jsxs(_s,{children:[p.jsx(Ds,{render:r}),p.jsx(Is,{children:n})]}):r}function D7({tone:e}){const t=e==="completed"?Ys:y9,n=e==="completed"?"bg-emerald-500":"bg-red-400";return p.jsx("span",{className:"absolute -top-0.5 -left-1 grid size-5 place-items-center",children:p.jsx("span",{className:we("ring-background relative grid size-4 place-items-center rounded-full ring-2",n),children:p.jsx(t,{className:"text-background absolute size-3 stroke-3"})})})}function Vse(e,t){const n=e.startedAt??e.createdAt,r=e.completedAt??t;return Math.max(0,r-n)}function IE(e,t){if(!e||!t)return e;const n=t.replaceAll("-","_"),r=new RegExp(`_${n}\\b`,"g");return e.replaceAll(r,"")}const $se={completed:"text-emerald-500/80",error:"text-red-400/80",running:"text-blue-400/80"},Up={bash_exec:{in:"bash",out:"bash"},bash_output:{in:"bash",out:"bash"},code_exec:{in:"javascript",out:"json"}},Gse={agentic_map:"map",bash_exec:"bash",bash_output:"bash output",code_exec:"code exec",create_knowledge_topic:"new topic",delete_memory:"delete memory",detect_domains:"detect domains",edit_file:"edit",edit_memory:"edit memory",expand_knowledge:"expand",glob_files:"glob",grep_content:"grep",ingest_resource:"ingest",kill_process:"kill",list_directory:"list",list_memories:"memories",llm_map:"llm map",read_file:"read",read_memory:"read memory",read_todos:"todos",search_history:"history",search_knowledge:"search",swarm_query:"swarm query",swarm_store:"swarm store",write_file:"write",write_memory:"write memory",write_todos:"todos"};function Yse(e){return Gse[e]??e.replaceAll("_"," ")}const Wse={bash:"bash",c:"c",cjs:"javascript",cpp:"cpp",cs:"csharp",css:"css",go:"go",h:"c",hpp:"cpp",htm:"html",html:"html",java:"java",js:"javascript",json:"json",jsx:"jsx",kt:"kotlin",less:"less",md:"markdown",mdx:"markdown",mjs:"javascript",php:"php",py:"python",rb:"ruby",rs:"rust",scss:"scss",sh:"bash",sql:"sql",swift:"swift",toml:"toml",ts:"typescript",tsx:"tsx",xml:"xml",yaml:"yaml",yml:"yaml",zsh:"bash"};function Kse(e){const t=typeof e.path=="string"&&e.path||typeof e.file_path=="string"&&e.file_path||typeof e.filePath=="string"&&e.filePath;if(!t)return;const n=t.lastIndexOf(".");if(n===-1||n===t.length-1)return;const r=t.slice(n+1).toLowerCase();return Wse[r]}const Qse=new Set(["delete_memory","edit_memory","list_memories","read_memory","write_memory"]),Xse=new Set(["bash_output"]),Zse=new Set(["create_knowledge_topic","curate","detect_domains","expand_knowledge","ingest_resource","list_directory","list_memories","read_todos","search_history","search_knowledge","swarm_query","swarm_store","write_todos"]);function Jse(e){return e in Up?{format:"code",language:Up[e].in}:Qse.has(e)?{format:"keypath"}:{format:"markdown"}}function ele(e,t){return Xse.has(e)?{format:"plain"}:t?{format:"code",language:t}:e in Up?{format:"code",language:Up[e].out}:Zse.has(e)?{format:"code",language:"json"}:{format:"markdown"}}const I7=C.memo(({content:e,language:t="bash"})=>p.jsx(Kt,{codeTagProps:{style:{fontFamily:"ui-monospace, SF Mono, Menlo, Consolas, monospace",fontSize:"0.75rem"}},customStyle:{background:"transparent",fontSize:"0.75rem",lineHeight:1.6,margin:0,padding:0},language:t,PreTag:"div",style:Ob,children:e}));I7.displayName="CodeBlock";function tle({call:e,flash:t,taskId:n,tooltip:r}){const[o,a]=C.useState(!1),l=C.useMemo(()=>IE(jb(e),n),[e,n]),c=C.useMemo(()=>IE(ale(e),n),[e,n]),f=C.useMemo(()=>Kse(e.args),[e.args]),d=Jse(e.toolName),g=ele(e.toolName,f),h=c.length>0,y=e.status==="running",x=()=>a(v=>!v);return p.jsxs(p.Fragment,{children:[p.jsx(Mb,{flash:t,tone:e.status,tooltip:r}),p.jsxs("div",{className:"text-muted-foreground mb-2 flex flex-wrap items-baseline gap-2 text-[11px]",children:[p.jsx("span",{className:we("mono uppercase tracking-wider",$se[e.status]),children:Yse(e.toolName)}),y&&p.jsx("span",{className:"text-blue-400/80",children:"running"})]}),p.jsxs("button",{"aria-expanded":o,className:"border-border/50 bg-muted/30 hover:bg-muted/60 group/toolblock relative w-full cursor-pointer rounded-md border text-left transition",onClick:x,type:"button",children:[p.jsx(zE,{collapsedHeight:"max-h-5",collapsedLines:nle,content:l||"—",empty:!l,expanded:o,format:d.format,label:"in",language:d.language}),p.jsx("div",{className:"border-border/50 border-t"}),p.jsx(zE,{collapsedHeight:"max-h-16",collapsedLines:rle,content:c,empty:!h,expanded:o,format:g.format,label:"out",language:g.language,placeholder:y?"running…":"—"}),!o&&p.jsx("span",{"aria-hidden":!0,className:"from-background/95 via-background/60 pointer-events-none absolute inset-x-0 bottom-0 h-10 rounded-b-md bg-linear-to-t to-transparent"}),p.jsxs("span",{className:"border-border bg-background/80 text-foreground/80 group-hover/toolblock:text-foreground group-hover/toolblock:border-foreground/30 group-hover/toolblock:bg-muted absolute bottom-2 left-1/2 inline-flex -translate-x-1/2 items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-medium shadow-lg backdrop-blur-md transition",children:[p.jsx("span",{children:o?"Click to collapse":"Click to expand"}),o?p.jsx(VH,{className:"size-3.5"}):p.jsx(Bf,{className:"size-3.5"})]})]})]})}const nle=1,rle=3;function zE({collapsedHeight:e,collapsedLines:t,content:n,empty:r,expanded:o,format:a,label:l,language:c,placeholder:f}){const d=C.useMemo(()=>o?0:Math.max(0,n.split(`
128
- `).length-t),[n,t,o]),g=()=>{switch(a){case"code":return p.jsx(I7,{content:n,language:c});case"keypath":return p.jsx(ole,{path:n});case"plain":return p.jsx(ile,{content:n});default:return p.jsx(Kf,{className:"text-foreground/90 text-sm",children:n})}};return p.jsxs("div",{className:"flex items-start gap-3 px-3 py-2",children:[p.jsxs("span",{className:"text-muted-foreground mono mt-[3px] flex w-7 shrink-0 flex-col items-start text-[10px] uppercase tracking-wider",children:[p.jsx("span",{children:l}),d>0&&p.jsxs("span",{className:"text-muted-foreground/60 mt-1 text-[9px] normal-case tracking-normal",children:["+",d]})]}),p.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto",children:r?p.jsx("span",{className:"text-muted-foreground/60 italic text-xs",children:f??"—"}):o?g():p.jsx("div",{className:we("overflow-hidden",e),children:g()})})]})}function ile({content:e}){return p.jsx("pre",{className:"text-foreground/85 mono m-0 text-xs leading-6 whitespace-pre-wrap",children:e})}function ole({path:e}){const t=e.split("/");return p.jsx("span",{className:"text-foreground/90 mono text-sm",children:t.map((n,r)=>p.jsxs(C.Fragment,{children:[r>0&&p.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"/"}),n]},r))})}function ale(e){if(e.status==="error"&&e.error)return e.error;if(e.result===void 0||e.result===null)return"";if(typeof e.result=="string"){const t=e.result.trim();return t.length>1200?`${t.slice(0,1200)}
129
- …`:t}try{const t=JSON.stringify(e.result,null,2);return t.length>1200?`${t.slice(0,1200)}
130
- …`:t}catch{return String(e.result)}}const sle={curate:"Curating","curate-folder":"Curating",query:"Querying"};function Fh(e,t){return`${e.kind}-${t}-${e.timestamp}`}function r1(e){return e.kind==="reasoning"?"muted":e.call.status==="error"?"error":e.call.status==="running"?"running":"completed"}function lle({now:e,task:t}){const n=C.useMemo(()=>Lse(t),[t]),r=If(t.status),o=C.useRef(null),a=C.useRef(new Map);o.current===null&&(o.current=new Set(n.map((f,d)=>Fh(f,d))));const l=[],c=new Set;for(const[f,d]of n.entries()){const g=Fh(d,f);o.current.has(g)||l.push(g);const h=r1(d);a.current.get(g)==="running"&&(h==="completed"||h==="error")&&c.add(g)}return C.useEffect(()=>{if(o.current)for(const[f,d]of n.entries()){const g=Fh(d,f);o.current.add(g),a.current.set(g,r1(d))}}),n.length===0?p.jsxs("section",{children:[p.jsx(Cf,{children:"Event log"}),r?p.jsx("ol",{className:"space-y-5",children:p.jsx(PE,{taskType:t.type})}):p.jsx("p",{className:"text-muted-foreground text-center text-sm py-6",children:"No events captured for this task."})]}):p.jsxs("section",{children:[p.jsx(Cf,{count:n.length,children:"Event log"}),p.jsxs("ol",{className:"space-y-5",children:[n.map((f,d)=>{const g=Fh(f,d),h=l.indexOf(g),y=d===n.length-1,x=t.status==="completed"&&!!t.result,v=t.status==="error"&&!!t.error,E=!y||r||(x||v),k=n[d+1]?.timestamp??t.completedAt??e;let T=r1(f);return y&&(r?T="running":x?T="completed":v&&(T="error")),p.jsx(cle,{endTimestamp:k,event:f,flash:c.has(g),hasNext:E,isNew:h!==-1,railTone:T,staggerIndex:Math.max(h,0),taskId:t.taskId,taskTerminal:ro(t.status),tooltip:ule(f,k)},g)}),r&&p.jsx(PE,{taskType:t.type})]})]})}function PE({taskType:e}){const t=sle[e]??"Working";return p.jsxs("li",{className:"relative pl-7",children:[p.jsx(Mb,{tone:"running"}),p.jsx("span",{className:"bg-blue-400/70 absolute top-[9px] left-[13px] h-px w-5.5 rounded"}),p.jsx("span",{className:"text-blue-400/70 mono absolute top-[2px] left-10 text-[9px] uppercase tracking-wider",children:"now"}),p.jsxs("span",{className:"text-blue-400 italic text-sm ml-10",children:[t,"…"]})]})}function cle({endTimestamp:e,event:t,flash:n,hasNext:r,isNew:o,railTone:a,staggerIndex:l,taskId:c,taskTerminal:f,tooltip:d}){return p.jsxs("li",{className:we("relative pl-7",o&&"animate-in fade-in slide-in-from-bottom-1 duration-300 fill-mode-both"),style:o?{animationDelay:`${l*60}ms`}:void 0,children:[r&&p.jsx("div",{className:we("absolute top-3 -bottom-7 left-[5px] w-0.5 rounded-full",qse[a])}),t.kind==="reasoning"?p.jsx(dle,{endTimestamp:e,flash:n,hasNext:r,item:t.item,taskTerminal:f,tooltip:d}):p.jsx(tle,{call:t.call,flash:n,taskId:c,tooltip:d})]})}function ule(e,t){const n=L7(e.timestamp),r=fle(t-e.timestamp);if(e.kind==="reasoning")return p.jsxs("span",{className:"flex flex-col gap-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),p.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),p.jsx("span",{className:"mono text-foreground/80 text-[10px]",children:"reasoning"})]});const o=jb(e.call).slice(0,60);return p.jsxs("span",{className:"flex flex-col gap-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),p.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),p.jsxs("span",{className:"mono text-foreground/80 text-[10px] wrap-break-word",children:[e.call.toolName,o&&` · ${o}`]})]})}function fle(e){if(e<1e3)return`${Math.max(1,Math.round(e))}ms`;const t=e/1e3;return t<60?`${t.toFixed(t<10?1:0)}s`:`${Math.floor(t/60)}m ${Math.round(t%60)}s`}function dle({endTimestamp:e,flash:t,hasNext:n,item:r,taskTerminal:o,tooltip:a}){const l=(r.isThinking||!r.content)&&!o&&!n,c=l?void 0:hle(e-r.timestamp);return p.jsxs(p.Fragment,{children:[p.jsx(Mb,{flash:t,tone:"muted",tooltip:a}),p.jsxs("div",{className:"text-muted-foreground mb-1.5 flex items-baseline gap-2 text-[11px]",children:[p.jsx("span",{className:"mono uppercase tracking-wider",children:"reasoning"}),l?p.jsxs("span",{className:"text-blue-400/80 inline-flex items-center gap-1.5 italic",children:[p.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"thinking…"]}):c&&p.jsxs("span",{className:"italic",children:["Thought for ",c]})]}),r.content&&p.jsx(Kf,{className:"text-foreground/90 text-sm",children:r.content})]})}function hle(e){const t=Math.max(1,Math.round(e/1e3));if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const ple={cancelled:{dot:"bg-zinc-500",label:"cancelled",pulse:!1,tone:"border-zinc-500/30 bg-zinc-500/10 text-zinc-400"},completed:{dot:"bg-emerald-500",label:"done",pulse:!1,tone:"border-emerald-500/30 bg-emerald-500/10 text-emerald-500"},created:{dot:"bg-zinc-400",label:"pending",pulse:!0,tone:"border-zinc-400/30 bg-zinc-400/10 text-zinc-300"},error:{dot:"bg-red-400",label:"failed",pulse:!1,tone:"border-red-500/30 bg-red-500/10 text-red-400"},started:{dot:"bg-blue-400",label:"running",pulse:!0,tone:"border-blue-500/30 bg-blue-500/10 text-blue-400"}};function z7({className:e,showLabel:t=!0,size:n="sm",status:r}){const{dot:o,label:a,pulse:l,tone:c}=ple[r];return p.jsxs(Yo,{className:we(c,n==="md"?"text-xs":"text-[11px]","gap-1.5 font-medium tracking-normal",r==="started"&&"shadow-[inset_0_0_6px_rgba(96,165,250,0.2)]",e),variant:"outline",children:[p.jsx("span",{className:we("size-1.5 shrink-0 rounded-full",o,l&&"animate-pill-ping")}),t&&p.jsx("span",{children:a})]})}const mle={cancelled:"cancelled",completed:"finished",created:"started",error:"finished",started:"started"};function gle({now:e,task:t}){const n=ro(t.status),r=Vse(t,e),o=t.startedAt??t.createdAt,a=mle[t.status],l=n?"ran":"running";return p.jsxs("header",{className:"px-6 pt-5 pb-4",children:[p.jsxs("div",{className:"flex items-center gap-3 pr-12",children:[p.jsx(z7,{status:t.status}),p.jsx("h1",{className:"text-foreground min-w-0 flex-1 truncate text-lg leading-tight font-medium tracking-tight",children:t.content||p.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})})]}),p.jsxs("div",{className:"text-muted-foreground mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[p.jsx(yle,{taskId:t.taskId}),p.jsx(n1,{}),p.jsx("span",{className:"mono uppercase tracking-wider",children:GT(t.type)}),p.jsx(n1,{}),p.jsxs("span",{children:[a," ",M7(o,e)," ago"]}),p.jsx(n1,{}),p.jsxs("span",{className:we("mono tabular-nums",If(t.status)?"text-blue-400":"text-muted-foreground"),children:[l," ",qu(r)]})]})]})}function yle({taskId:e}){const t=async()=>{try{await navigator.clipboard.writeText(e),ut.success("Task ID copied",{duration:2e3,position:"top-center"})}catch{ut.error("Failed to copy task ID",{duration:3e3,position:"top-center"})}};return p.jsxs(_s,{children:[p.jsx(Ds,{render:p.jsx(De,{"aria-label":"Copy task ID",className:"text-identifier hover:text-identifier hover:bg-identifier/10 mono px-1.5 font-normal",onClick:t,size:"xs",variant:"ghost"}),children:p.jsx("span",{className:"truncate",children:e})}),p.jsx(Is,{children:"Click to copy"})]})}function FE({Icon:e,onRemove:t,path:n}){return p.jsxs(Yo,{className:"bg-muted max-w-[20rem] gap-1.5 animate-in fade-in slide-in-from-bottom-1 duration-200",title:n,variant:"outline",children:[p.jsx(e,{className:"text-muted-foreground"}),p.jsx("span",{className:"mono truncate",children:n}),t&&p.jsx("button",{"aria-label":`Remove ${n}`,className:"text-muted-foreground/60 hover:bg-border hover:text-foreground inline-flex size-4 shrink-0 items-center justify-center rounded-full transition",onClick:t,type:"button",children:p.jsx(y9,{className:"size-2.5"})})]})}function xle({task:e}){const{folderPath:t}=e,n=e.files??[],r=!!t||n.length>0;return p.jsxs("section",{children:[p.jsx(Cf,{children:"Input"}),p.jsx("div",{className:"border-blue-400 text-foreground/90 mono border-l-2 pl-3 text-sm leading-relaxed whitespace-pre-wrap",children:e.content||p.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),r&&p.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5 pl-3",children:[t&&p.jsx(FE,{Icon:p9,path:t}),n.map(o=>p.jsx(FE,{Icon:OU,path:o},o))]})]})}function ble({task:e}){const t=e.responseContent??e.streamingContent??"",n=e.isStreaming||!e.responseContent&&If(e.status);return p.jsxs("section",{children:[p.jsxs("div",{className:"mono mb-2 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[n?p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"text-blue-400 inline-flex items-center gap-1.5",children:[p.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"live"]}),p.jsx("span",{className:"text-muted-foreground",children:"agent is responding"})]}):p.jsx("span",{className:"text-muted-foreground",children:"Response"}),p.jsx("span",{className:"bg-border/50 h-px flex-1"})]}),p.jsxs("div",{className:we("pl-3 text-foreground/90 text-sm border-l-2",n?"border-blue-500/30":"border-border"),children:[p.jsx(Kf,{className:"text-foreground/90 text-sm",children:t||" "}),n&&p.jsx("span",{className:"bg-blue-400/70 ml-1 inline-block h-3 w-1.5 align-middle animate-pulse"})]})]})}function vle({content:e}){return p.jsxs("section",{className:"relative pl-8",children:[p.jsx(D7,{tone:"completed"}),p.jsx(Cf,{children:"Result"}),p.jsx(ja,{className:"ring-border bg-card p-5",size:"sm",children:p.jsx(Kf,{className:"text-foreground/90 text-sm",children:e})})]})}function wle({error:e}){return p.jsxs("section",{className:"relative pl-8",children:[p.jsx(D7,{tone:"error"}),p.jsx(Cf,{children:"Error"}),p.jsxs(ja,{className:"bg-red-500/5 p-5 ring-1 ring-red-500/30",size:"sm",children:[p.jsx("p",{className:"text-red-400 text-sm",children:Cn(e)}),e.code&&p.jsx("p",{className:"text-muted-foreground mono mt-1 text-[11px]",children:e.code})]})]})}function Sle({taskId:e}){return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[p.jsx("h2",{className:"text-foreground text-base font-medium",children:"Task not found"}),p.jsxs("p",{className:"text-muted-foreground max-w-md text-sm",children:["Task ",p.jsx("span",{className:"mono",children:_7(e)})," isn't in the local cache. It may have completed before the page was loaded, or it belongs to a different project."]})]})}function Cle({taskId:e}){const t=PB(e),n=t?If(t.status):!1,r=N7(n),a=on(y=>y.tourTaskId)===e,l=t?.reasoningContents?.at(-1),{onScroll:c,ref:f}=Mse([t?.toolCalls?.length??0,t?.reasoningContents?.length??0,l?.content?.length??0,t?.streamingContent?.length??0,t?.responseContent,t?.result,t?.error?.message,t?.status],n||a);if(!t)return p.jsx(Sle,{taskId:e});const d=n&&(t.streamingContent||t.responseContent),g=t.status==="completed"?t.result:void 0,h=t.status==="error"?t.error:void 0;return p.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[p.jsx(gle,{now:r,task:t}),p.jsx("div",{className:"border-border/50 border-t"}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-6 py-5",onScroll:c,ref:f,children:[p.jsx(Nse,{task:t}),p.jsx(xle,{task:t}),p.jsx(lle,{now:r,task:t}),d&&p.jsx(ble,{task:t}),g&&p.jsx(vle,{content:g}),h&&p.jsx(wle,{error:h}),p.jsx(Ose,{task:t})]})]})}function Ele({canDelete:e,count:t,onClear:n,onDelete:r}){return p.jsxs("div",{className:"border-border bg-muted/40 flex min-h-9 items-center gap-3 rounded-md border px-3 text-xs",children:[p.jsxs("span",{className:"text-foreground",children:[p.jsx("span",{className:"text-foreground mono tabular-nums font-medium",children:t})," selected"]}),p.jsx("span",{className:"bg-border h-4 w-px"}),p.jsx(De,{disabled:!e,onClick:r,size:"xs",variant:"ghost",children:"Delete"}),p.jsx(De,{className:"ml-auto",onClick:n,size:"xs",variant:"ghost",children:"Clear selection"})]})}const P7={all:"All",cancelled:"Cancelled",completed:"Done",failed:"Failed",running:"Running"},kle={cancelled:"bg-zinc-500",completed:"bg-emerald-500",failed:"bg-red-400",running:"bg-blue-400"};function Tle({breakdown:e,onNewTask:t,onSearchChange:n,onStatusChange:r,searchQuery:o,statusFilter:a}){return p.jsxs("div",{className:"flex min-h-9 flex-wrap items-center gap-2",children:[DB.map(l=>{const c=e[l],f=a===l;return p.jsxs("button",{className:we("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition",f?"bg-muted text-foreground font-medium":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),onClick:()=>r(l),type:"button",children:[l!=="all"&&p.jsx("span",{className:we("inline-block size-1.5 rounded-full",kle[l])}),p.jsx("span",{children:P7[l]}),p.jsx("span",{className:"text-muted-foreground tabular-nums",children:c})]},l)}),p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[p.jsxs("div",{className:"relative",children:[p.jsx(vc,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),p.jsx(Ko,{className:"h-8 min-w-56 pl-8 text-xs",onChange:l=>n(l.target.value),placeholder:"Search input or id…",type:"text",value:o})]}),p.jsxs(De,{onClick:t,size:"sm",variant:"default",children:[p.jsx(Xa,{className:"size-4"}),"New task"]})]})]})}function BE({children:e,withDots:t}){return p.jsx(ja,{className:we("ring-border/80 flex min-h-0 flex-1 items-center justify-center p-0",t&&"dot-grid"),size:"sm",children:e})}function Ale(){return p.jsx("div",{className:"text-muted-foreground flex h-32 items-center justify-center text-sm",children:"Loading tasks…"})}function Rle({onNewTask:e}){return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 p-8 text-center",children:[p.jsx(EU,{className:"text-muted-foreground/70 size-8"}),p.jsxs("div",{children:[p.jsx("h2",{className:"text-foreground text-base font-medium",children:"No tasks yet"}),p.jsxs("p",{className:"text-muted-foreground mx-auto mt-1 max-w-sm text-sm leading-relaxed",children:["Capture knowledge with ",p.jsx("strong",{children:"Curate"})," or ask a question with ",p.jsx("strong",{children:"Query"}),"."]})]}),p.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[p.jsxs(De,{onClick:e,size:"sm",variant:"default",children:[p.jsx(Xa,{className:"size-4"}),"New task"]}),p.jsx("span",{className:"text-muted-foreground/60 ml-2 text-sm",children:"or run from the CLI"})]})]})}function Nle({onClearSearch:e,query:t,status:n}){return p.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 p-4 text-sm",children:[p.jsxs("span",{children:["No ",n==="all"?"":`${P7[n].toLowerCase()} `,"tasks",t?` match "${t}"`:"","."]}),t&&p.jsx(De,{onClick:e,size:"xs",variant:"link",children:"Clear search"})]})}const Ole=80;function jle(e){if(!If(e.status))return null;const t=e.toolCalls?.at(-1),n=e.reasoningContents?.at(-1),r=t?.timestamp??0,o=n?.timestamp??0;return t&&r>=o?{arg:jb(t),kind:"tool",tool:t.toolName}:n&&n.content.trim()?{kind:"reasoning",text:n.content.trim().replaceAll(/\s+/g," ").slice(0,Ole)}:"thinking"}const Ta={action:"w-12",checkbox:"w-10",duration:"w-24",id:"w-36",input:"min-w-72",started:"w-28",status:"w-36",type:"w-24"};function Mle(e,t){return e.completedAt&&e.startedAt?qu(e.completedAt-e.startedAt):e.startedAt?qu(t-e.startedAt):e.completedAt?qu(e.completedAt-e.createdAt):qu(t-e.createdAt)}function Lle({allSelected:e,filtered:t,now:n,onClearSearch:r,onDelete:o,onRowClick:a,onToggleSelect:l,onToggleSelectAll:c,searchQuery:f,selectedIds:d,statusFilter:g}){return p.jsxs(eA,{children:[p.jsx(tA,{children:p.jsxs(Zl,{children:[p.jsx(Ui,{className:Ta.checkbox,children:p.jsx(F7,{checked:e,onChange:c})}),p.jsx(Ui,{className:we(Ta.id,"text-xs tracking-wider"),children:"ID"}),p.jsx(Ui,{className:we(Ta.type,"text-xs tracking-wider"),children:"Type"}),p.jsx(Ui,{className:we(Ta.input,"text-xs tracking-wider"),children:"Input"}),p.jsx(Ui,{className:we(Ta.status,"text-xs tracking-wider"),children:"Status"}),p.jsx(Ui,{className:we(Ta.started,"text-right text-xs tracking-wider"),children:"Started"}),p.jsx(Ui,{className:we(Ta.duration,"text-right text-xs tracking-wider"),children:"Duration"}),p.jsx(Ui,{className:Ta.action})]})}),p.jsx(nA,{children:t.length===0?p.jsx(Zl,{children:p.jsx(Tr,{className:"text-muted-foreground py-10 text-center text-sm",colSpan:8,children:p.jsx(Nle,{onClearSearch:r,query:f,status:g})})}):t.map(h=>p.jsx(_le,{isSelected:d.has(h.taskId),now:n,onDelete:o,onRowClick:a,onToggleSelect:l,task:h},h.taskId))})]})}function _le({isSelected:e,now:t,onDelete:n,onRowClick:r,onToggleSelect:o,task:a}){const l=ro(a.status),c=!l,f=jle(a);return p.jsxs(Zl,{className:"cursor-pointer [&>td]:align-middle","data-state":e?"selected":void 0,onClick:()=>r(a.taskId),children:[p.jsxs(Tr,{className:"relative",onClick:d=>d.stopPropagation(),children:[c&&p.jsx("span",{className:"bg-blue-400/70 pointer-events-none absolute top-2 bottom-2 left-0 w-0.5 rounded-full"}),p.jsx(F7,{checked:e,onChange:()=>o(a.taskId)})]}),p.jsx(Tr,{className:"text-identifier mono text-xs",title:a.taskId,children:_7(a.taskId)}),p.jsx(Tr,{children:p.jsx(Dle,{type:a.type})}),p.jsxs(Tr,{className:"text-foreground max-w-0",children:[p.jsx("div",{className:"truncate",children:a.content||p.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),f&&p.jsxs("div",{className:"text-muted-foreground mono mt-1 flex items-center gap-1.5 text-[11px]",children:[p.jsx("span",{className:"text-blue-400",children:"▸"}),f==="thinking"&&p.jsx("span",{className:"italic",children:"thinking…"}),f!=="thinking"&&f.kind==="tool"&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-foreground/80",children:f.tool}),f.arg&&p.jsxs("span",{className:"truncate",children:["· ",f.arg]})]}),f!=="thinking"&&f.kind==="reasoning"&&p.jsx("span",{className:"truncate italic",children:f.text})]})]}),p.jsx(Tr,{children:p.jsx(z7,{status:a.status})}),p.jsxs(Tr,{className:"text-muted-foreground text-right text-xs",title:L7(a.startedAt??a.createdAt),children:[M7(a.startedAt??a.createdAt,t)," ago"]}),p.jsx(Tr,{className:we("text-right mono text-xs tabular-nums",c?"text-blue-400":"text-muted-foreground"),children:Mle(a,t)}),p.jsx(Tr,{className:"text-center",onClick:d=>d.stopPropagation(),children:l&&p.jsx(Ile,{onClick:()=>n(a.taskId)})})]})}function Dle({type:e}){return p.jsx(Yo,{className:"text-muted-foreground mono text-[10px] uppercase tracking-wider",variant:"outline",children:GT(e)})}function Ile({onClick:e}){return p.jsx(De,{"aria-label":"Delete",onClick:e,size:"icon-xs",title:"Delete",variant:"ghost",children:p.jsx(UU,{className:"size-3.5"})})}function F7({checked:e,onChange:t}){return p.jsx("input",{checked:e,className:"border-border bg-transparent accent-blue-500 size-3.5 cursor-pointer rounded border",onChange:t,type:"checkbox"})}function zle(){const[e,t]=kk(),n=e.get("task")??void 0,r=F=>{t(G=>{const ie=new URLSearchParams(G);return ie.set("task",F),ie})},o=()=>{t(F=>{const G=new URLSearchParams(F);return G.delete("task"),G})},a=Be(F=>F.selectedProject),l=ri(F=>F.tasks),c=ri(F=>F.statusFilter),f=ri(F=>F.setStatusFilter),d=ri(F=>F.searchQuery),g=ri(F=>F.setSearchQuery),h=ri(F=>F.clearCompleted),y=ri(F=>F.removeTask),x=FB(),{isLoading:v}=$T({projectPath:a||void 0}),S=N7(x.running>0),[E,k]=C.useState(new Set),[T,R]=C.useState({open:!1}),L=()=>R({open:!0}),j=()=>R({open:!1}),N=(F,G)=>{G&&r(F)},A=C.useMemo(()=>new Map(l.map(F=>[F.taskId,F])),[l]),D=C.useMemo(()=>l.filter(F=>IB(F.status,c)).filter(F=>zB(F,d)).sort((F,G)=>{const ie=ro(F.status)?1:0,M=ro(G.status)?1:0;if(ie!==M)return ie-M;const P=F.completedAt??F.startedAt??F.createdAt;return(G.completedAt??G.startedAt??G.createdAt)-P}),[l,c,d]),U=D.length>0&&D.every(F=>E.has(F.taskId)),I=E.size>0,q=x.completed+x.failed+x.cancelled,$=C.useMemo(()=>{for(const F of E){const G=A.get(F);if(G&&ro(G.status))return!0}return!1},[E,A]),V=F=>{k(G=>{const ie=new Set(G);return ie.has(F)?ie.delete(F):ie.add(F),ie})},Y=()=>{k(F=>{if(U)return new Set;const G=new Set(F);for(const ie of D)G.add(ie.taskId);return G})},H=()=>k(new Set),B=()=>{for(const F of E){const G=A.get(F);G&&ro(G.status)&&y(F)}H()};return p.jsxs("div",{className:"mx-auto flex h-full w-full min-h-0 max-w-7xl flex-col gap-3",children:[I?p.jsx(Ele,{canDelete:$,count:E.size,onClear:H,onDelete:B}):p.jsx(Tle,{breakdown:x,onNewTask:L,onSearchChange:g,onStatusChange:F=>{f(F),H()},searchQuery:d,statusFilter:c}),v?p.jsx(BE,{children:p.jsx(Ale,{})}):l.length===0?p.jsx(BE,{withDots:!0,children:p.jsx(Rle,{onNewTask:L})}):p.jsx(Lle,{allSelected:U,filtered:D,now:S,onClearSearch:()=>g(""),onDelete:y,onRowClick:r,onToggleSelect:V,onToggleSelectAll:Y,searchQuery:d,selectedIds:E,statusFilter:c}),q>0&&p.jsx("div",{className:"flex items-center justify-end px-1",children:p.jsxs(De,{onClick:()=>h(),size:"xs",variant:"ghost",children:["Clear finished (",q,")"]})}),p.jsx(E9,{onOpenChange:F=>!F&&o(),open:!!n,children:p.jsx(k9,{className:"data-[side=right]:w-full data-[side=right]:max-w-3xl p-0 shadow-[inset_1px_0_0_rgba(96,165,250,0.18)]",side:"right",children:n&&p.jsx(Cle,{taskId:n})})}),p.jsx(R9,{onClose:j,onSubmitted:N,open:T.open})]})}function Ple(){return p.jsx(zle,{})}const Fle=RL([{element:p.jsx(kse,{}),path:"/projects"},{children:[{children:[{element:p.jsx(Sse,{}),index:!0},{element:p.jsx(lX,{}),path:"changes"},{element:p.jsx(UX,{}),path:"configuration"},{element:p.jsx(yG,{}),path:"analytics"},{element:p.jsx(wse,{}),path:"contexts"},{element:p.jsx(Ple,{}),path:"tasks"},{element:p.jsx(LE,{}),path:"*"}],element:p.jsx(gG,{})}],element:p.jsx(qB,{}),path:"/"},{element:p.jsx(LE,{}),path:"*"}]);function Ble(){return p.jsxs(pB,{children:[p.jsx(FL,{router:Fle}),p.jsx(pj,{})]})}const B7=document.querySelector("#root");if(B7===null)throw new Error("Root element not found");const Hle=nO.createRoot(B7);Hle.render(p.jsx(Ble,{}));