oh-my-pr 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/index.cjs +151 -145
- package/dist/public/assets/index-CJEB_h75.css +1 -0
- package/dist/public/assets/index-GY1lQ1r3.js +49 -0
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/index-BIO7suRv.css +0 -1
- package/dist/public/assets/index-DVUpi-4z.js +0 -48
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function ew(t,r){for(var s=0;s<r.length;s++){const i=r[s];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in t)){const d=Object.getOwnPropertyDescriptor(i,u);d&&Object.defineProperty(t,u,d.get?d:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function $h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hl={exports:{}},Oo={},Bl={exports:{}},we={};var xp;function tw(){if(xp)return we;xp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=w&&R[w]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E(R,W,$){this.props=R,this.context=W,this.refs=S,this.updater=$||C}E.prototype.isReactComponent={},E.prototype.setState=function(R,W){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,W,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function P(){}P.prototype=E.prototype;function A(R,W,$){this.props=R,this.context=W,this.refs=S,this.updater=$||C}var _=A.prototype=new P;_.constructor=A,k(_,E.prototype),_.isPureReactComponent=!0;var L=Array.isArray,D=Object.prototype.hasOwnProperty,O={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function U(R,W,$){var oe,ge={},xe=null,he=null;if(W!=null)for(oe in W.ref!==void 0&&(he=W.ref),W.key!==void 0&&(xe=""+W.key),W)D.call(W,oe)&&!z.hasOwnProperty(oe)&&(ge[oe]=W[oe]);var be=arguments.length-2;if(be===1)ge.children=$;else if(1<be){for(var Ee=Array(be),et=0;et<be;et++)Ee[et]=arguments[et+2];ge.children=Ee}if(R&&R.defaultProps)for(oe in be=R.defaultProps,be)ge[oe]===void 0&&(ge[oe]=be[oe]);return{$$typeof:t,type:R,key:xe,ref:he,props:ge,_owner:O.current}}function J(R,W){return{$$typeof:t,type:R.type,key:W,ref:R.ref,props:R.props,_owner:R._owner}}function ne(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function te(R){var W={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function($){return W[$]})}var Y=/\/+/g;function ue(R,W){return typeof R=="object"&&R!==null&&R.key!=null?te(""+R.key):W.toString(36)}function X(R,W,$,oe,ge){var xe=typeof R;(xe==="undefined"||xe==="boolean")&&(R=null);var he=!1;if(R===null)he=!0;else switch(xe){case"string":case"number":he=!0;break;case"object":switch(R.$$typeof){case t:case r:he=!0}}if(he)return he=R,ge=ge(he),R=oe===""?"."+ue(he,0):oe,L(ge)?($="",R!=null&&($=R.replace(Y,"$&/")+"/"),X(ge,W,$,"",function(et){return et})):ge!=null&&(ne(ge)&&(ge=J(ge,$+(!ge.key||he&&he.key===ge.key?"":(""+ge.key).replace(Y,"$&/")+"/")+R)),W.push(ge)),1;if(he=0,oe=oe===""?".":oe+":",L(R))for(var be=0;be<R.length;be++){xe=R[be];var Ee=oe+ue(xe,be);he+=X(xe,W,$,Ee,ge)}else if(Ee=b(R),typeof Ee=="function")for(R=Ee.call(R),be=0;!(xe=R.next()).done;)xe=xe.value,Ee=oe+ue(xe,be++),he+=X(xe,W,$,Ee,ge);else if(xe==="object")throw W=String(R),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return he}function me(R,W,$){if(R==null)return R;var oe=[],ge=0;return X(R,oe,"","",function(xe){return W.call($,xe,ge++)}),oe}function ie(R){if(R._status===-1){var W=R._result;W=W(),W.then(function($){(R._status===0||R._status===-1)&&(R._status=1,R._result=$)},function($){(R._status===0||R._status===-1)&&(R._status=2,R._result=$)}),R._status===-1&&(R._status=0,R._result=W)}if(R._status===1)return R._result.default;throw R._result}var le={current:null},H={transition:null},B={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:H,ReactCurrentOwner:O};function G(){throw Error("act(...) is not supported in production builds of React.")}return we.Children={map:me,forEach:function(R,W,$){me(R,function(){W.apply(this,arguments)},$)},count:function(R){var W=0;return me(R,function(){W++}),W},toArray:function(R){return me(R,function(W){return W})||[]},only:function(R){if(!ne(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},we.Component=E,we.Fragment=s,we.Profiler=u,we.PureComponent=A,we.StrictMode=i,we.Suspense=g,we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,we.act=G,we.cloneElement=function(R,W,$){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var oe=k({},R.props),ge=R.key,xe=R.ref,he=R._owner;if(W!=null){if(W.ref!==void 0&&(xe=W.ref,he=O.current),W.key!==void 0&&(ge=""+W.key),R.type&&R.type.defaultProps)var be=R.type.defaultProps;for(Ee in W)D.call(W,Ee)&&!z.hasOwnProperty(Ee)&&(oe[Ee]=W[Ee]===void 0&&be!==void 0?be[Ee]:W[Ee])}var Ee=arguments.length-2;if(Ee===1)oe.children=$;else if(1<Ee){be=Array(Ee);for(var et=0;et<Ee;et++)be[et]=arguments[et+2];oe.children=be}return{$$typeof:t,type:R.type,key:ge,ref:xe,props:oe,_owner:he}},we.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:d,_context:R},R.Consumer=R},we.createElement=U,we.createFactory=function(R){var W=U.bind(null,R);return W.type=R,W},we.createRef=function(){return{current:null}},we.forwardRef=function(R){return{$$typeof:h,render:R}},we.isValidElement=ne,we.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:ie}},we.memo=function(R,W){return{$$typeof:v,type:R,compare:W===void 0?null:W}},we.startTransition=function(R){var W=H.transition;H.transition={};try{R()}finally{H.transition=W}},we.unstable_act=G,we.useCallback=function(R,W){return le.current.useCallback(R,W)},we.useContext=function(R){return le.current.useContext(R)},we.useDebugValue=function(){},we.useDeferredValue=function(R){return le.current.useDeferredValue(R)},we.useEffect=function(R,W){return le.current.useEffect(R,W)},we.useId=function(){return le.current.useId()},we.useImperativeHandle=function(R,W,$){return le.current.useImperativeHandle(R,W,$)},we.useInsertionEffect=function(R,W){return le.current.useInsertionEffect(R,W)},we.useLayoutEffect=function(R,W){return le.current.useLayoutEffect(R,W)},we.useMemo=function(R,W){return le.current.useMemo(R,W)},we.useReducer=function(R,W,$){return le.current.useReducer(R,W,$)},we.useRef=function(R){return le.current.useRef(R)},we.useState=function(R){return le.current.useState(R)},we.useSyncExternalStore=function(R,W,$){return le.current.useSyncExternalStore(R,W,$)},we.useTransition=function(){return le.current.useTransition()},we.version="18.3.1",we}var yp;function _i(){return yp||(yp=1,Bl.exports=tw()),Bl.exports}var wp;function nw(){if(wp)return Oo;wp=1;var t=_i(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,v){var y,w={},b=null,C=null;v!==void 0&&(b=""+v),g.key!==void 0&&(b=""+g.key),g.ref!==void 0&&(C=g.ref);for(y in g)i.call(g,y)&&!d.hasOwnProperty(y)&&(w[y]=g[y]);if(h&&h.defaultProps)for(y in g=h.defaultProps,g)w[y]===void 0&&(w[y]=g[y]);return{$$typeof:r,type:h,key:b,ref:C,props:w,_owner:u.current}}return Oo.Fragment=s,Oo.jsx=p,Oo.jsxs=p,Oo}var bp;function rw(){return bp||(bp=1,Hl.exports=nw()),Hl.exports}var l=rw(),li={},Wl={exports:{}},dt={},Kl={exports:{}},Vl={};var Sp;function ow(){return Sp||(Sp=1,(function(t){function r(H,B){var G=H.length;H.push(B);e:for(;0<G;){var R=G-1>>>1,W=H[R];if(0<u(W,B))H[R]=B,H[G]=W,G=R;else break e}}function s(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var B=H[0],G=H.pop();if(G!==B){H[0]=G;e:for(var R=0,W=H.length,$=W>>>1;R<$;){var oe=2*(R+1)-1,ge=H[oe],xe=oe+1,he=H[xe];if(0>u(ge,G))xe<W&&0>u(he,ge)?(H[R]=he,H[xe]=G,R=xe):(H[R]=ge,H[oe]=G,R=oe);else if(xe<W&&0>u(he,G))H[R]=he,H[xe]=G,R=xe;else break e}}return B}function u(H,B){var G=H.sortIndex-B.sortIndex;return G!==0?G:H.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();t.unstable_now=function(){return p.now()-h}}var g=[],v=[],y=1,w=null,b=3,C=!1,k=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(H){for(var B=s(v);B!==null;){if(B.callback===null)i(v);else if(B.startTime<=H)i(v),B.sortIndex=B.expirationTime,r(g,B);else break;B=s(v)}}function L(H){if(S=!1,_(H),!k)if(s(g)!==null)k=!0,ie(D);else{var B=s(v);B!==null&&le(L,B.startTime-H)}}function D(H,B){k=!1,S&&(S=!1,P(U),U=-1),C=!0;var G=b;try{for(_(B),w=s(g);w!==null&&(!(w.expirationTime>B)||H&&!te());){var R=w.callback;if(typeof R=="function"){w.callback=null,b=w.priorityLevel;var W=R(w.expirationTime<=B);B=t.unstable_now(),typeof W=="function"?w.callback=W:w===s(g)&&i(g),_(B)}else i(g);w=s(g)}if(w!==null)var $=!0;else{var oe=s(v);oe!==null&&le(L,oe.startTime-B),$=!1}return $}finally{w=null,b=G,C=!1}}var O=!1,z=null,U=-1,J=5,ne=-1;function te(){return!(t.unstable_now()-ne<J)}function Y(){if(z!==null){var H=t.unstable_now();ne=H;var B=!0;try{B=z(!0,H)}finally{B?ue():(O=!1,z=null)}}else O=!1}var ue;if(typeof A=="function")ue=function(){A(Y)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,me=X.port2;X.port1.onmessage=Y,ue=function(){me.postMessage(null)}}else ue=function(){E(Y,0)};function ie(H){z=H,O||(O=!0,ue())}function le(H,B){U=E(function(){H(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_continueExecution=function(){k||C||(k=!0,ie(D))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return s(g)},t.unstable_next=function(H){switch(b){case 1:case 2:case 3:var B=3;break;default:B=b}var G=b;b=B;try{return H()}finally{b=G}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,B){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var G=b;b=H;try{return B()}finally{b=G}},t.unstable_scheduleCallback=function(H,B,G){var R=t.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?R+G:R):G=R,H){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=G+W,H={id:y++,callback:B,priorityLevel:H,startTime:G,expirationTime:W,sortIndex:-1},G>R?(H.sortIndex=G,r(v,H),s(g)===null&&H===s(v)&&(S?(P(U),U=-1):S=!0,le(L,G-R))):(H.sortIndex=W,r(g,H),k||C||(k=!0,ie(D))),H},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(H){var B=b;return function(){var G=b;b=B;try{return H.apply(this,arguments)}finally{b=G}}}})(Vl)),Vl}var Cp;function sw(){return Cp||(Cp=1,Kl.exports=ow()),Kl.exports}var kp;function iw(){if(kp)return dt;kp=1;var t=_i(),r=sw();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,u={};function d(e,n){p(e,n),p(e+"Capture",n)}function p(e,n){for(u[e]=n,e=0;e<n.length;e++)i.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,v=/^[: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]*$/,y={},w={};function b(e){return g.call(w,e)?!0:g.call(y,e)?!1:v.test(e)?w[e]=!0:(y[e]=!0,!1)}function C(e,n,o,a){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k(e,n,o,a){if(n===null||typeof n>"u"||C(e,n,o,a))return!0;if(a)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function S(e,n,o,a,c,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){E[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function A(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(P,A);E[n]=new S(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(P,A);E[n]=new S(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(P,A);E[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,n,o,a){var c=E.hasOwnProperty(n)?E[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(k(n,o,c,a)&&(o=null),a||c===null?b(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):c.mustUseProperty?e[c.propertyName]=o===null?c.type===3?!1:"":o:(n=c.attributeName,a=c.attributeNamespace,o===null?e.removeAttribute(n):(c=c.type,o=c===3||c===4&&o===!0?"":""+o,a?e.setAttributeNS(a,n,o):e.setAttribute(n,o))))}var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),O=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),te=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),H=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,R;function W(e){if(R===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);R=n&&n[1]||""}return`
|
|
2
|
+
`+R+e}var $=!1;function oe(e,n){if(!e||$)return"";$=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(F){var a=F}Reflect.construct(e,[],n)}else{try{n.call()}catch(F){a=F}e.call(n.prototype)}else{try{throw Error()}catch(F){a=F}e()}}catch(F){if(F&&a&&typeof F.stack=="string"){for(var c=F.stack.split(`
|
|
3
|
+
`),f=a.stack.split(`
|
|
4
|
+
`),x=c.length-1,N=f.length-1;1<=x&&0<=N&&c[x]!==f[N];)N--;for(;1<=x&&0<=N;x--,N--)if(c[x]!==f[N]){if(x!==1||N!==1)do if(x--,N--,0>N||c[x]!==f[N]){var j=`
|
|
5
|
+
`+c[x].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=x&&0<=N);break}}}finally{$=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?W(e):""}function ge(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function xe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case O:return"Portal";case J:return"Profiler";case U:return"StrictMode";case ue:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case te:return(e.displayName||"Context")+".Consumer";case ne:return(e._context.displayName||"Context")+".Provider";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return n=e.displayName||null,n!==null?n:xe(e.type)||"Memo";case ie:n=e._payload,e=e._init;try{return xe(e(n))}catch{}}return null}function he(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(n);case 8:return n===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function et(e){var n=Ee(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){a=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=et(e))}function Jo(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),a="";return e&&(a=Ee(e)?e.checked?"true":"false":e.value),e=a,e!==o?(n.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function qi(e,n){var o=n.checked;return G({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function kc(e,n){var o=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;o=be(n.value!=null?n.value:o),e._wrapperState={initialChecked:a,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ec(e,n){n=n.checked,n!=null&&_(e,"checked",n,!1)}function Yi(e,n){Ec(e,n);var o=be(n.value),a=n.type;if(o!=null)a==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Xi(e,n.type,o):n.hasOwnProperty("defaultValue")&&Xi(e,n.type,be(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Nc(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Xi(e,n,o){(n!=="number"||Yt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Vr=Array.isArray;function ir(e,n,o,a){if(e=e.options,n){n={};for(var c=0;c<o.length;c++)n["$"+o[c]]=!0;for(o=0;o<e.length;o++)c=n.hasOwnProperty("$"+e[o].value),e[o].selected!==c&&(e[o].selected=c),c&&a&&(e[o].defaultSelected=!0)}else{for(o=""+be(o),n=null,c=0;c<e.length;c++){if(e[c].value===o){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Zi(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(s(91));return G({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jc(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(s(92));if(Vr(o)){if(1<o.length)throw Error(s(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:be(o)}}function Rc(e,n){var o=be(n.value),a=be(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),a!=null&&(e.defaultValue=""+a)}function Pc(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Tc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ji(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Tc(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var es,_c=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,a,c){MSApp.execUnsafeLocalFunction(function(){return e(n,o,a,c)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(es=es||document.createElement("div"),es.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=es.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Qr(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Gr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ox=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){ox.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Gr[n]=Gr[e]})});function Oc(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+n).trim():n+"px"}function Ac(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var a=o.indexOf("--")===0,c=Oc(o,n[o],a);o==="float"&&(o="cssFloat"),a?e.setProperty(o,c):e[o]=c}}var sx=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ea(e,n){if(n){if(sx[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function ta(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var na=null;function ra(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oa=null,ar=null,lr=null;function Mc(e){if(e=vo(e)){if(typeof oa!="function")throw Error(s(280));var n=e.stateNode;n&&(n=Cs(n),oa(e.stateNode,e.type,n))}}function Ic(e){ar?lr?lr.push(e):lr=[e]:ar=e}function Lc(){if(ar){var e=ar,n=lr;if(lr=ar=null,Mc(e),n)for(e=0;e<n.length;e++)Mc(n[e])}}function Dc(e,n){return e(n)}function Fc(){}var sa=!1;function $c(e,n,o){if(sa)return e(n,o);sa=!0;try{return Dc(e,n,o)}finally{sa=!1,(ar!==null||lr!==null)&&(Fc(),Lc())}}function qr(e,n){var o=e.stateNode;if(o===null)return null;var a=Cs(o);if(a===null)return null;o=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(s(231,n,typeof o));return o}var ia=!1;if(h)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){ia=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{ia=!1}function ix(e,n,o,a,c,f,x,N,j){var F=Array.prototype.slice.call(arguments,3);try{n.apply(o,F)}catch(V){this.onError(V)}}var Xr=!1,ts=null,ns=!1,aa=null,ax={onError:function(e){Xr=!0,ts=e}};function lx(e,n,o,a,c,f,x,N,j){Xr=!1,ts=null,ix.apply(ax,arguments)}function ux(e,n,o,a,c,f,x,N,j){if(lx.apply(this,arguments),Xr){if(Xr){var F=ts;Xr=!1,ts=null}else throw Error(s(198));ns||(ns=!0,aa=F)}}function $n(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function zc(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Uc(e){if($n(e)!==e)throw Error(s(188))}function cx(e){var n=e.alternate;if(!n){if(n=$n(e),n===null)throw Error(s(188));return n!==e?null:e}for(var o=e,a=n;;){var c=o.return;if(c===null)break;var f=c.alternate;if(f===null){if(a=c.return,a!==null){o=a;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===o)return Uc(c),e;if(f===a)return Uc(c),n;f=f.sibling}throw Error(s(188))}if(o.return!==a.return)o=c,a=f;else{for(var x=!1,N=c.child;N;){if(N===o){x=!0,o=c,a=f;break}if(N===a){x=!0,a=c,o=f;break}N=N.sibling}if(!x){for(N=f.child;N;){if(N===o){x=!0,o=f,a=c;break}if(N===a){x=!0,a=f,o=c;break}N=N.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==a)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:n}function Hc(e){return e=cx(e),e!==null?Bc(e):null}function Bc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Bc(e);if(n!==null)return n;e=e.sibling}return null}var Wc=r.unstable_scheduleCallback,Kc=r.unstable_cancelCallback,dx=r.unstable_shouldYield,fx=r.unstable_requestPaint,Ie=r.unstable_now,px=r.unstable_getCurrentPriorityLevel,la=r.unstable_ImmediatePriority,Vc=r.unstable_UserBlockingPriority,rs=r.unstable_NormalPriority,hx=r.unstable_LowPriority,Qc=r.unstable_IdlePriority,os=null,$t=null;function mx(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(os,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:xx,gx=Math.log,vx=Math.LN2;function xx(e){return e>>>=0,e===0?32:31-(gx(e)/vx|0)|0}var ss=64,is=4194304;function Zr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function as(e,n){var o=e.pendingLanes;if(o===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,x=o&268435455;if(x!==0){var N=x&~c;N!==0?a=Zr(N):(f&=x,f!==0&&(a=Zr(f)))}else x=o&~c,x!==0?a=Zr(x):f!==0&&(a=Zr(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0<n;)o=31-Rt(n),c=1<<o,a|=e[o],n&=~c;return a}function yx(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wx(e,n){for(var o=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-Rt(f),N=1<<x,j=c[x];j===-1?((N&o)===0||(N&a)!==0)&&(c[x]=yx(N,n)):j<=n&&(e.expiredLanes|=N),f&=~N}}function ua(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Gc(){var e=ss;return ss<<=1,(ss&4194240)===0&&(ss=64),e}function ca(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Jr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Rt(n),e[n]=o}function bx(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<o;){var c=31-Rt(o),f=1<<c;n[c]=0,a[c]=-1,e[c]=-1,o&=~f}}function da(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var a=31-Rt(o),c=1<<a;c&n|e[a]&n&&(e[a]|=n),o&=~c}}var ke=0;function qc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yc,fa,Xc,Zc,Jc,pa=!1,ls=[],cn=null,dn=null,fn=null,eo=new Map,to=new Map,pn=[],Sx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ed(e,n){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":eo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(n.pointerId)}}function no(e,n,o,a,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:o,eventSystemFlags:a,nativeEvent:f,targetContainers:[c]},n!==null&&(n=vo(n),n!==null&&fa(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Cx(e,n,o,a,c){switch(n){case"focusin":return cn=no(cn,e,n,o,a,c),!0;case"dragenter":return dn=no(dn,e,n,o,a,c),!0;case"mouseover":return fn=no(fn,e,n,o,a,c),!0;case"pointerover":var f=c.pointerId;return eo.set(f,no(eo.get(f)||null,e,n,o,a,c)),!0;case"gotpointercapture":return f=c.pointerId,to.set(f,no(to.get(f)||null,e,n,o,a,c)),!0}return!1}function td(e){var n=zn(e.target);if(n!==null){var o=$n(n);if(o!==null){if(n=o.tag,n===13){if(n=zc(o),n!==null){e.blockedOn=n,Jc(e.priority,function(){Xc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function us(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=ma(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o);na=a,o.target.dispatchEvent(a),na=null}else return n=vo(o),n!==null&&fa(n),e.blockedOn=o,!1;n.shift()}return!0}function nd(e,n,o){us(e)&&o.delete(n)}function kx(){pa=!1,cn!==null&&us(cn)&&(cn=null),dn!==null&&us(dn)&&(dn=null),fn!==null&&us(fn)&&(fn=null),eo.forEach(nd),to.forEach(nd)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,pa||(pa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,kx)))}function oo(e){function n(c){return ro(c,e)}if(0<ls.length){ro(ls[0],e);for(var o=1;o<ls.length;o++){var a=ls[o];a.blockedOn===e&&(a.blockedOn=null)}}for(cn!==null&&ro(cn,e),dn!==null&&ro(dn,e),fn!==null&&ro(fn,e),eo.forEach(n),to.forEach(n),o=0;o<pn.length;o++)a=pn[o],a.blockedOn===e&&(a.blockedOn=null);for(;0<pn.length&&(o=pn[0],o.blockedOn===null);)td(o),o.blockedOn===null&&pn.shift()}var ur=L.ReactCurrentBatchConfig,cs=!0;function Ex(e,n,o,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=1,ha(e,n,o,a)}finally{ke=c,ur.transition=f}}function Nx(e,n,o,a){var c=ke,f=ur.transition;ur.transition=null;try{ke=4,ha(e,n,o,a)}finally{ke=c,ur.transition=f}}function ha(e,n,o,a){if(cs){var c=ma(e,n,o,a);if(c===null)Oa(e,n,a,ds,o),ed(e,a);else if(Cx(c,e,n,o,a))a.stopPropagation();else if(ed(e,a),n&4&&-1<Sx.indexOf(e)){for(;c!==null;){var f=vo(c);if(f!==null&&Yc(f),f=ma(e,n,o,a),f===null&&Oa(e,n,a,ds,o),f===c)break;c=f}c!==null&&a.stopPropagation()}else Oa(e,n,a,null,o)}}var ds=null;function ma(e,n,o,a){if(ds=null,e=ra(a),e=zn(e),e!==null)if(n=$n(e),n===null)e=null;else if(o=n.tag,o===13){if(e=zc(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return ds=e,null}function rd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(px()){case la:return 1;case Vc:return 4;case rs:case hx:return 16;case Qc:return 536870912;default:return 16}default:return 16}}var hn=null,ga=null,fs=null;function od(){if(fs)return fs;var e,n=ga,o=n.length,a,c="value"in hn?hn.value:hn.textContent,f=c.length;for(e=0;e<o&&n[e]===c[e];e++);var x=o-e;for(a=1;a<=x&&n[o-a]===c[f-a];a++);return fs=c.slice(e,1<a?1-a:void 0)}function ps(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function hs(){return!0}function sd(){return!1}function ft(e){function n(o,a,c,f,x){this._reactName=o,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(o=e[N],this[N]=o?o(f):f[N]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?hs:sd,this.isPropagationStopped=sd,this}return G(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),n}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},va=ft(cr),so=G({},cr,{view:0,detail:0}),jx=ft(so),xa,ya,io,ms=G({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ba,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==io&&(io&&e.type==="mousemove"?(xa=e.screenX-io.screenX,ya=e.screenY-io.screenY):ya=xa=0,io=e),xa)},movementY:function(e){return"movementY"in e?e.movementY:ya}}),id=ft(ms),Rx=G({},ms,{dataTransfer:0}),Px=ft(Rx),Tx=G({},so,{relatedTarget:0}),wa=ft(Tx),_x=G({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ox=ft(_x),Ax=G({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mx=ft(Ax),Ix=G({},cr,{data:0}),ad=ft(Ix),Lx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dx={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"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $x(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Fx[e])?!!n[e]:!1}function ba(){return $x}var zx=G({},so,{key:function(e){if(e.key){var n=Lx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ps(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ba,charCode:function(e){return e.type==="keypress"?ps(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ps(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ux=ft(zx),Hx=G({},ms,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ld=ft(Hx),Bx=G({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ba}),Wx=ft(Bx),Kx=G({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vx=ft(Kx),Qx=G({},ms,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Gx=ft(Qx),qx=[9,13,27,32],Sa=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var Yx=h&&"TextEvent"in window&&!ao,ud=h&&(!Sa||ao&&8<ao&&11>=ao),cd=" ",dd=!1;function fd(e,n){switch(e){case"keyup":return qx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Xx(e,n){switch(e){case"compositionend":return pd(n);case"keypress":return n.which!==32?null:(dd=!0,cd);case"textInput":return e=n.data,e===cd&&dd?null:e;default:return null}}function Zx(e,n){if(dr)return e==="compositionend"||!Sa&&fd(e,n)?(e=od(),fs=ga=hn=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ud&&n.locale!=="ko"?null:n.data;default:return null}}var Jx={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 hd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Jx[e.type]:n==="textarea"}function md(e,n,o,a){Ic(a),n=ws(n,"onChange"),0<n.length&&(o=new va("onChange","change",null,o,a),e.push({event:o,listeners:n}))}var lo=null,uo=null;function ey(e){Ad(e,0)}function gs(e){var n=gr(e);if(Jo(n))return e}function ty(e,n){if(e==="change")return n}var gd=!1;if(h){var Ca;if(h){var ka="oninput"in document;if(!ka){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),ka=typeof vd.oninput=="function"}Ca=ka}else Ca=!1;gd=Ca&&(!document.documentMode||9<document.documentMode)}function xd(){lo&&(lo.detachEvent("onpropertychange",yd),uo=lo=null)}function yd(e){if(e.propertyName==="value"&&gs(uo)){var n=[];md(n,uo,e,ra(e)),$c(ey,n)}}function ny(e,n,o){e==="focusin"?(xd(),lo=n,uo=o,lo.attachEvent("onpropertychange",yd)):e==="focusout"&&xd()}function ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gs(uo)}function oy(e,n){if(e==="click")return gs(n)}function sy(e,n){if(e==="input"||e==="change")return gs(n)}function iy(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:iy;function co(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var c=o[a];if(!g.call(n,c)||!Pt(e[c],n[c]))return!1}return!0}function wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bd(e,n){var o=wd(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=n&&a>=n)return{node:o,offset:n-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=wd(o)}}function Sd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Sd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Cd(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=Yt(e.document)}return n}function Ea(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function ay(e){var n=Cd(),o=e.focusedElem,a=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&Sd(o.ownerDocument.documentElement,o)){if(a!==null&&Ea(o)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!e.extend&&f>a&&(c=a,a=f,f=c),c=bd(o,f);var x=bd(o,a);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ly=h&&"documentMode"in document&&11>=document.documentMode,fr=null,Na=null,fo=null,ja=!1;function kd(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ja||fr==null||fr!==Yt(a)||(a=fr,"selectionStart"in a&&Ea(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fo&&co(fo,a)||(fo=a,a=ws(Na,"onSelect"),0<a.length&&(n=new va("onSelect","select",null,n,o),e.push({event:n,listeners:a}),n.target=fr)))}function vs(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var pr={animationend:vs("Animation","AnimationEnd"),animationiteration:vs("Animation","AnimationIteration"),animationstart:vs("Animation","AnimationStart"),transitionend:vs("Transition","TransitionEnd")},Ra={},Ed={};h&&(Ed=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function xs(e){if(Ra[e])return Ra[e];if(!pr[e])return e;var n=pr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in Ed)return Ra[e]=n[o];return e}var Nd=xs("animationend"),jd=xs("animationiteration"),Rd=xs("animationstart"),Pd=xs("transitionend"),Td=new Map,_d="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mn(e,n){Td.set(e,n),d(n,[e])}for(var Pa=0;Pa<_d.length;Pa++){var Ta=_d[Pa],uy=Ta.toLowerCase(),cy=Ta[0].toUpperCase()+Ta.slice(1);mn(uy,"on"+cy)}mn(Nd,"onAnimationEnd"),mn(jd,"onAnimationIteration"),mn(Rd,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(Pd,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var po="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(" "),dy=new Set("cancel close invalid load scroll toggle".split(" ").concat(po));function Od(e,n,o){var a=e.type||"unknown-event";e.currentTarget=o,ux(a,n,void 0,e),e.currentTarget=null}function Ad(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var a=e[o],c=a.event;a=a.listeners;e:{var f=void 0;if(n)for(var x=a.length-1;0<=x;x--){var N=a[x],j=N.instance,F=N.currentTarget;if(N=N.listener,j!==f&&c.isPropagationStopped())break e;Od(c,N,F),f=j}else for(x=0;x<a.length;x++){if(N=a[x],j=N.instance,F=N.currentTarget,N=N.listener,j!==f&&c.isPropagationStopped())break e;Od(c,N,F),f=j}}}if(ns)throw e=aa,ns=!1,aa=null,e}function Re(e,n){var o=n[Fa];o===void 0&&(o=n[Fa]=new Set);var a=e+"__bubble";o.has(a)||(Md(n,e,2,!1),o.add(a))}function _a(e,n,o){var a=0;n&&(a|=4),Md(o,e,a,n)}var ys="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[ys]){e[ys]=!0,i.forEach(function(o){o!=="selectionchange"&&(dy.has(o)||_a(o,!1,e),_a(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ys]||(n[ys]=!0,_a("selectionchange",!1,n))}}function Md(e,n,o,a){switch(rd(n)){case 1:var c=Ex;break;case 4:c=Nx;break;default:c=ha}o=c.bind(null,n,o,e),c=void 0,!ia||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(n,o,{capture:!0,passive:c}):e.addEventListener(n,o,!0):c!==void 0?e.addEventListener(n,o,{passive:c}):e.addEventListener(n,o,!1)}function Oa(e,n,o,a,c){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var N=a.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(x===4)for(x=a.return;x!==null;){var j=x.tag;if((j===3||j===4)&&(j=x.stateNode.containerInfo,j===c||j.nodeType===8&&j.parentNode===c))return;x=x.return}for(;N!==null;){if(x=zn(N),x===null)return;if(j=x.tag,j===5||j===6){a=f=x;continue e}N=N.parentNode}}a=a.return}$c(function(){var F=f,V=ra(o),Q=[];e:{var K=Td.get(e);if(K!==void 0){var Z=va,re=e;switch(e){case"keypress":if(ps(o)===0)break e;case"keydown":case"keyup":Z=Ux;break;case"focusin":re="focus",Z=wa;break;case"focusout":re="blur",Z=wa;break;case"beforeblur":case"afterblur":Z=wa;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Wx;break;case Nd:case jd:case Rd:Z=Ox;break;case Pd:Z=Vx;break;case"scroll":Z=jx;break;case"wheel":Z=Gx;break;case"copy":case"cut":case"paste":Z=Mx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=ld}var se=(n&4)!==0,Le=!se&&e==="scroll",M=se?K!==null?K+"Capture":null:K;se=[];for(var T=F,I;T!==null;){I=T;var q=I.stateNode;if(I.tag===5&&q!==null&&(I=q,M!==null&&(q=qr(T,M),q!=null&&se.push(mo(T,q,I)))),Le)break;T=T.return}0<se.length&&(K=new Z(K,re,null,o,V),Q.push({event:K,listeners:se}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",K&&o!==na&&(re=o.relatedTarget||o.fromElement)&&(zn(re)||re[Xt]))break e;if((Z||K)&&(K=V.window===V?V:(K=V.ownerDocument)?K.defaultView||K.parentWindow:window,Z?(re=o.relatedTarget||o.toElement,Z=F,re=re?zn(re):null,re!==null&&(Le=$n(re),re!==Le||re.tag!==5&&re.tag!==6)&&(re=null)):(Z=null,re=F),Z!==re)){if(se=id,q="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(se=ld,q="onPointerLeave",M="onPointerEnter",T="pointer"),Le=Z==null?K:gr(Z),I=re==null?K:gr(re),K=new se(q,T+"leave",Z,o,V),K.target=Le,K.relatedTarget=I,q=null,zn(V)===F&&(se=new se(M,T+"enter",re,o,V),se.target=I,se.relatedTarget=Le,q=se),Le=q,Z&&re)t:{for(se=Z,M=re,T=0,I=se;I;I=hr(I))T++;for(I=0,q=M;q;q=hr(q))I++;for(;0<T-I;)se=hr(se),T--;for(;0<I-T;)M=hr(M),I--;for(;T--;){if(se===M||M!==null&&se===M.alternate)break t;se=hr(se),M=hr(M)}se=null}else se=null;Z!==null&&Id(Q,K,Z,se,!1),re!==null&&Le!==null&&Id(Q,Le,re,se,!0)}}e:{if(K=F?gr(F):window,Z=K.nodeName&&K.nodeName.toLowerCase(),Z==="select"||Z==="input"&&K.type==="file")var ae=ty;else if(hd(K))if(gd)ae=sy;else{ae=ry;var ce=ny}else(Z=K.nodeName)&&Z.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(ae=oy);if(ae&&(ae=ae(e,F))){md(Q,ae,o,V);break e}ce&&ce(e,K,F),e==="focusout"&&(ce=K._wrapperState)&&ce.controlled&&K.type==="number"&&Xi(K,"number",K.value)}switch(ce=F?gr(F):window,e){case"focusin":(hd(ce)||ce.contentEditable==="true")&&(fr=ce,Na=F,fo=null);break;case"focusout":fo=Na=fr=null;break;case"mousedown":ja=!0;break;case"contextmenu":case"mouseup":case"dragend":ja=!1,kd(Q,o,V);break;case"selectionchange":if(ly)break;case"keydown":case"keyup":kd(Q,o,V)}var de;if(Sa)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else dr?fd(e,o)&&(pe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(pe="onCompositionStart");pe&&(ud&&o.locale!=="ko"&&(dr||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&dr&&(de=od()):(hn=V,ga="value"in hn?hn.value:hn.textContent,dr=!0)),ce=ws(F,pe),0<ce.length&&(pe=new ad(pe,e,null,o,V),Q.push({event:pe,listeners:ce}),de?pe.data=de:(de=pd(o),de!==null&&(pe.data=de)))),(de=Yx?Xx(e,o):Zx(e,o))&&(F=ws(F,"onBeforeInput"),0<F.length&&(V=new ad("onBeforeInput","beforeinput",null,o,V),Q.push({event:V,listeners:F}),V.data=de))}Ad(Q,n)})}function mo(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ws(e,n){for(var o=n+"Capture",a=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=qr(e,o),f!=null&&a.unshift(mo(e,f,c)),f=qr(e,n),f!=null&&a.push(mo(e,f,c))),e=e.return}return a}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Id(e,n,o,a,c){for(var f=n._reactName,x=[];o!==null&&o!==a;){var N=o,j=N.alternate,F=N.stateNode;if(j!==null&&j===a)break;N.tag===5&&F!==null&&(N=F,c?(j=qr(o,f),j!=null&&x.unshift(mo(o,j,N))):c||(j=qr(o,f),j!=null&&x.push(mo(o,j,N)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var fy=/\r\n?/g,py=/\u0000|\uFFFD/g;function Ld(e){return(typeof e=="string"?e:""+e).replace(fy,`
|
|
6
|
+
`).replace(py,"")}function bs(e,n,o){if(n=Ld(n),Ld(e)!==n&&o)throw Error(s(425))}function Ss(){}var Aa=null,Ma=null;function Ia(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var La=typeof setTimeout=="function"?setTimeout:void 0,hy=typeof clearTimeout=="function"?clearTimeout:void 0,Dd=typeof Promise=="function"?Promise:void 0,my=typeof queueMicrotask=="function"?queueMicrotask:typeof Dd<"u"?function(e){return Dd.resolve(null).then(e).catch(gy)}:La;function gy(e){setTimeout(function(){throw e})}function Da(e,n){var o=n,a=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(a===0){e.removeChild(c),oo(n);return}a--}else o!=="$"&&o!=="$?"&&o!=="$!"||a++;o=c}while(o);oo(n)}function gn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Fd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var mr=Math.random().toString(36).slice(2),zt="__reactFiber$"+mr,go="__reactProps$"+mr,Xt="__reactContainer$"+mr,Fa="__reactEvents$"+mr,vy="__reactListeners$"+mr,xy="__reactHandles$"+mr;function zn(e){var n=e[zt];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Xt]||o[zt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Fd(e);e!==null;){if(o=e[zt])return o;e=Fd(e)}return n}e=o,o=e.parentNode}return null}function vo(e){return e=e[zt]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Cs(e){return e[go]||null}var $a=[],vr=-1;function vn(e){return{current:e}}function Pe(e){0>vr||(e.current=$a[vr],$a[vr]=null,vr--)}function Ne(e,n){vr++,$a[vr]=e.current,e.current=n}var xn={},qe=vn(xn),it=vn(!1),Un=xn;function xr(e,n){var o=e.type.contextTypes;if(!o)return xn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in o)c[f]=n[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function at(e){return e=e.childContextTypes,e!=null}function ks(){Pe(it),Pe(qe)}function $d(e,n,o){if(qe.current!==xn)throw Error(s(168));Ne(qe,n),Ne(it,o)}function zd(e,n,o){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return o;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(s(108,he(e)||"Unknown",c));return G({},o,a)}function Es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Un=qe.current,Ne(qe,e),Ne(it,it.current),!0}function Ud(e,n,o){var a=e.stateNode;if(!a)throw Error(s(169));o?(e=zd(e,n,Un),a.__reactInternalMemoizedMergedChildContext=e,Pe(it),Pe(qe),Ne(qe,e)):Pe(it),Ne(it,o)}var Zt=null,Ns=!1,za=!1;function Hd(e){Zt===null?Zt=[e]:Zt.push(e)}function yy(e){Ns=!0,Hd(e)}function yn(){if(!za&&Zt!==null){za=!0;var e=0,n=ke;try{var o=Zt;for(ke=1;e<o.length;e++){var a=o[e];do a=a(!0);while(a!==null)}Zt=null,Ns=!1}catch(c){throw Zt!==null&&(Zt=Zt.slice(e+1)),Wc(la,yn),c}finally{ke=n,za=!1}}return null}var yr=[],wr=0,js=null,Rs=0,wt=[],bt=0,Hn=null,Jt=1,en="";function Bn(e,n){yr[wr++]=Rs,yr[wr++]=js,js=e,Rs=n}function Bd(e,n,o){wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Hn=e;var a=Jt;e=en;var c=32-Rt(a)-1;a&=~(1<<c),o+=1;var f=32-Rt(n)+c;if(30<f){var x=c-c%5;f=(a&(1<<x)-1).toString(32),a>>=x,c-=x,Jt=1<<32-Rt(n)+c|o<<c|a,en=f+e}else Jt=1<<f|o<<c|a,en=e}function Ua(e){e.return!==null&&(Bn(e,1),Bd(e,1,0))}function Ha(e){for(;e===js;)js=yr[--wr],yr[wr]=null,Rs=yr[--wr],yr[wr]=null;for(;e===Hn;)Hn=wt[--bt],wt[bt]=null,en=wt[--bt],wt[bt]=null,Jt=wt[--bt],wt[bt]=null}var pt=null,ht=null,_e=!1,Tt=null;function Wd(e,n){var o=Et(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Kd(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,pt=e,ht=gn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,pt=e,ht=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=Hn!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Et(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,pt=e,ht=null,!0):!1;default:return!1}}function Ba(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wa(e){if(_e){var n=ht;if(n){var o=n;if(!Kd(e,n)){if(Ba(e))throw Error(s(418));n=gn(o.nextSibling);var a=pt;n&&Kd(e,n)?Wd(a,o):(e.flags=e.flags&-4097|2,_e=!1,pt=e)}}else{if(Ba(e))throw Error(s(418));e.flags=e.flags&-4097|2,_e=!1,pt=e}}}function Vd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function Ps(e){if(e!==pt)return!1;if(!_e)return Vd(e),_e=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Ia(e.type,e.memoizedProps)),n&&(n=ht)){if(Ba(e))throw Qd(),Error(s(418));for(;n;)Wd(e,n),n=gn(n.nextSibling)}if(Vd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){ht=gn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}ht=null}}else ht=pt?gn(e.stateNode.nextSibling):null;return!0}function Qd(){for(var e=ht;e;)e=gn(e.nextSibling)}function br(){ht=pt=null,_e=!1}function Ka(e){Tt===null?Tt=[e]:Tt.push(e)}var wy=L.ReactCurrentBatchConfig;function xo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(s(309));var a=o.stateNode}if(!a)throw Error(s(147,e));var c=a,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var N=c.refs;x===null?delete N[f]:N[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(s(284));if(!o._owner)throw Error(s(290,e))}return e}function Ts(e,n){throw e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Gd(e){var n=e._init;return n(e._payload)}function qd(e){function n(M,T){if(e){var I=M.deletions;I===null?(M.deletions=[T],M.flags|=16):I.push(T)}}function o(M,T){if(!e)return null;for(;T!==null;)n(M,T),T=T.sibling;return null}function a(M,T){for(M=new Map;T!==null;)T.key!==null?M.set(T.key,T):M.set(T.index,T),T=T.sibling;return M}function c(M,T){return M=jn(M,T),M.index=0,M.sibling=null,M}function f(M,T,I){return M.index=I,e?(I=M.alternate,I!==null?(I=I.index,I<T?(M.flags|=2,T):I):(M.flags|=2,T)):(M.flags|=1048576,T)}function x(M){return e&&M.alternate===null&&(M.flags|=2),M}function N(M,T,I,q){return T===null||T.tag!==6?(T=Ll(I,M.mode,q),T.return=M,T):(T=c(T,I),T.return=M,T)}function j(M,T,I,q){var ae=I.type;return ae===z?V(M,T,I.props.children,q,I.key):T!==null&&(T.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ie&&Gd(ae)===T.type)?(q=c(T,I.props),q.ref=xo(M,T,I),q.return=M,q):(q=ei(I.type,I.key,I.props,null,M.mode,q),q.ref=xo(M,T,I),q.return=M,q)}function F(M,T,I,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==I.containerInfo||T.stateNode.implementation!==I.implementation?(T=Dl(I,M.mode,q),T.return=M,T):(T=c(T,I.children||[]),T.return=M,T)}function V(M,T,I,q,ae){return T===null||T.tag!==7?(T=Xn(I,M.mode,q,ae),T.return=M,T):(T=c(T,I),T.return=M,T)}function Q(M,T,I){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Ll(""+T,M.mode,I),T.return=M,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return I=ei(T.type,T.key,T.props,null,M.mode,I),I.ref=xo(M,null,T),I.return=M,I;case O:return T=Dl(T,M.mode,I),T.return=M,T;case ie:var q=T._init;return Q(M,q(T._payload),I)}if(Vr(T)||B(T))return T=Xn(T,M.mode,I,null),T.return=M,T;Ts(M,T)}return null}function K(M,T,I,q){var ae=T!==null?T.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return ae!==null?null:N(M,T,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case D:return I.key===ae?j(M,T,I,q):null;case O:return I.key===ae?F(M,T,I,q):null;case ie:return ae=I._init,K(M,T,ae(I._payload),q)}if(Vr(I)||B(I))return ae!==null?null:V(M,T,I,q,null);Ts(M,I)}return null}function Z(M,T,I,q,ae){if(typeof q=="string"&&q!==""||typeof q=="number")return M=M.get(I)||null,N(T,M,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case D:return M=M.get(q.key===null?I:q.key)||null,j(T,M,q,ae);case O:return M=M.get(q.key===null?I:q.key)||null,F(T,M,q,ae);case ie:var ce=q._init;return Z(M,T,I,ce(q._payload),ae)}if(Vr(q)||B(q))return M=M.get(I)||null,V(T,M,q,ae,null);Ts(T,q)}return null}function re(M,T,I,q){for(var ae=null,ce=null,de=T,pe=T=0,Ke=null;de!==null&&pe<I.length;pe++){de.index>pe?(Ke=de,de=null):Ke=de.sibling;var Ce=K(M,de,I[pe],q);if(Ce===null){de===null&&(de=Ke);break}e&&de&&Ce.alternate===null&&n(M,de),T=f(Ce,T,pe),ce===null?ae=Ce:ce.sibling=Ce,ce=Ce,de=Ke}if(pe===I.length)return o(M,de),_e&&Bn(M,pe),ae;if(de===null){for(;pe<I.length;pe++)de=Q(M,I[pe],q),de!==null&&(T=f(de,T,pe),ce===null?ae=de:ce.sibling=de,ce=de);return _e&&Bn(M,pe),ae}for(de=a(M,de);pe<I.length;pe++)Ke=Z(de,M,pe,I[pe],q),Ke!==null&&(e&&Ke.alternate!==null&&de.delete(Ke.key===null?pe:Ke.key),T=f(Ke,T,pe),ce===null?ae=Ke:ce.sibling=Ke,ce=Ke);return e&&de.forEach(function(Rn){return n(M,Rn)}),_e&&Bn(M,pe),ae}function se(M,T,I,q){var ae=B(I);if(typeof ae!="function")throw Error(s(150));if(I=ae.call(I),I==null)throw Error(s(151));for(var ce=ae=null,de=T,pe=T=0,Ke=null,Ce=I.next();de!==null&&!Ce.done;pe++,Ce=I.next()){de.index>pe?(Ke=de,de=null):Ke=de.sibling;var Rn=K(M,de,Ce.value,q);if(Rn===null){de===null&&(de=Ke);break}e&&de&&Rn.alternate===null&&n(M,de),T=f(Rn,T,pe),ce===null?ae=Rn:ce.sibling=Rn,ce=Rn,de=Ke}if(Ce.done)return o(M,de),_e&&Bn(M,pe),ae;if(de===null){for(;!Ce.done;pe++,Ce=I.next())Ce=Q(M,Ce.value,q),Ce!==null&&(T=f(Ce,T,pe),ce===null?ae=Ce:ce.sibling=Ce,ce=Ce);return _e&&Bn(M,pe),ae}for(de=a(M,de);!Ce.done;pe++,Ce=I.next())Ce=Z(de,M,pe,Ce.value,q),Ce!==null&&(e&&Ce.alternate!==null&&de.delete(Ce.key===null?pe:Ce.key),T=f(Ce,T,pe),ce===null?ae=Ce:ce.sibling=Ce,ce=Ce);return e&&de.forEach(function(Jy){return n(M,Jy)}),_e&&Bn(M,pe),ae}function Le(M,T,I,q){if(typeof I=="object"&&I!==null&&I.type===z&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case D:e:{for(var ae=I.key,ce=T;ce!==null;){if(ce.key===ae){if(ae=I.type,ae===z){if(ce.tag===7){o(M,ce.sibling),T=c(ce,I.props.children),T.return=M,M=T;break e}}else if(ce.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ie&&Gd(ae)===ce.type){o(M,ce.sibling),T=c(ce,I.props),T.ref=xo(M,ce,I),T.return=M,M=T;break e}o(M,ce);break}else n(M,ce);ce=ce.sibling}I.type===z?(T=Xn(I.props.children,M.mode,q,I.key),T.return=M,M=T):(q=ei(I.type,I.key,I.props,null,M.mode,q),q.ref=xo(M,T,I),q.return=M,M=q)}return x(M);case O:e:{for(ce=I.key;T!==null;){if(T.key===ce)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){o(M,T.sibling),T=c(T,I.children||[]),T.return=M,M=T;break e}else{o(M,T);break}else n(M,T);T=T.sibling}T=Dl(I,M.mode,q),T.return=M,M=T}return x(M);case ie:return ce=I._init,Le(M,T,ce(I._payload),q)}if(Vr(I))return re(M,T,I,q);if(B(I))return se(M,T,I,q);Ts(M,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(o(M,T.sibling),T=c(T,I),T.return=M,M=T):(o(M,T),T=Ll(I,M.mode,q),T.return=M,M=T),x(M)):o(M,T)}return Le}var Sr=qd(!0),Yd=qd(!1),_s=vn(null),Os=null,Cr=null,Va=null;function Qa(){Va=Cr=Os=null}function Ga(e){var n=_s.current;Pe(_s),e._currentValue=n}function qa(e,n,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===o)break;e=e.return}}function kr(e,n){Os=e,Va=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(lt=!0),e.firstContext=null)}function St(e){var n=e._currentValue;if(Va!==e)if(e={context:e,memoizedValue:n,next:null},Cr===null){if(Os===null)throw Error(s(308));Cr=e,Os.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return n}var Wn=null;function Ya(e){Wn===null?Wn=[e]:Wn.push(e)}function Xd(e,n,o,a){var c=n.interleaved;return c===null?(o.next=o,Ya(n)):(o.next=c.next,c.next=o),n.interleaved=o,tn(e,a)}function tn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var wn=!1;function Xa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zd(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function nn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function bn(e,n,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Se&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,tn(e,o)}return c=a.interleaved,c===null?(n.next=n,Ya(a)):(n.next=c.next,c.next=n),a.interleaved=n,tn(e,o)}function As(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,da(e,o)}}function Jd(e,n){var o=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,o===a)){var c=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=x:f=f.next=x,o=o.next}while(o!==null);f===null?c=f=n:f=f.next=n}else c=f=n;o={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Ms(e,n,o,a){var c=e.updateQueue;wn=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var j=N,F=j.next;j.next=null,x===null?f=F:x.next=F,x=j;var V=e.alternate;V!==null&&(V=V.updateQueue,N=V.lastBaseUpdate,N!==x&&(N===null?V.firstBaseUpdate=F:N.next=F,V.lastBaseUpdate=j))}if(f!==null){var Q=c.baseState;x=0,V=F=j=null,N=f;do{var K=N.lane,Z=N.eventTime;if((a&K)===K){V!==null&&(V=V.next={eventTime:Z,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var re=e,se=N;switch(K=n,Z=o,se.tag){case 1:if(re=se.payload,typeof re=="function"){Q=re.call(Z,Q,K);break e}Q=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=se.payload,K=typeof re=="function"?re.call(Z,Q,K):re,K==null)break e;Q=G({},Q,K);break e;case 2:wn=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,K=c.effects,K===null?c.effects=[N]:K.push(N))}else Z={eventTime:Z,lane:K,tag:N.tag,payload:N.payload,callback:N.callback,next:null},V===null?(F=V=Z,j=Q):V=V.next=Z,x|=K;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;K=N,N=K.next,K.next=null,c.lastBaseUpdate=K,c.shared.pending=null}}while(!0);if(V===null&&(j=Q),c.baseState=j,c.firstBaseUpdate=F,c.lastBaseUpdate=V,n=c.shared.interleaved,n!==null){c=n;do x|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Qn|=x,e.lanes=x,e.memoizedState=Q}}function ef(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var a=e[n],c=a.callback;if(c!==null){if(a.callback=null,a=o,typeof c!="function")throw Error(s(191,c));c.call(a)}}}var yo={},Ut=vn(yo),wo=vn(yo),bo=vn(yo);function Kn(e){if(e===yo)throw Error(s(174));return e}function Za(e,n){switch(Ne(bo,n),Ne(wo,e),Ne(Ut,yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Ji(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Ji(n,e)}Pe(Ut),Ne(Ut,n)}function Er(){Pe(Ut),Pe(wo),Pe(bo)}function tf(e){Kn(bo.current);var n=Kn(Ut.current),o=Ji(n,e.type);n!==o&&(Ne(wo,e),Ne(Ut,o))}function Ja(e){wo.current===e&&(Pe(Ut),Pe(wo))}var Oe=vn(0);function Is(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var el=[];function tl(){for(var e=0;e<el.length;e++)el[e]._workInProgressVersionPrimary=null;el.length=0}var Ls=L.ReactCurrentDispatcher,nl=L.ReactCurrentBatchConfig,Vn=0,Ae=null,$e=null,Be=null,Ds=!1,So=!1,Co=0,by=0;function Ye(){throw Error(s(321))}function rl(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Pt(e[o],n[o]))return!1;return!0}function ol(e,n,o,a,c,f){if(Vn=f,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ls.current=e===null||e.memoizedState===null?Ey:Ny,e=o(a,c),So){f=0;do{if(So=!1,Co=0,25<=f)throw Error(s(301));f+=1,Be=$e=null,n.updateQueue=null,Ls.current=jy,e=o(a,c)}while(So)}if(Ls.current=zs,n=$e!==null&&$e.next!==null,Vn=0,Be=$e=Ae=null,Ds=!1,n)throw Error(s(300));return e}function sl(){var e=Co!==0;return Co=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ae.memoizedState=Be=e:Be=Be.next=e,Be}function Ct(){if($e===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=Be===null?Ae.memoizedState:Be.next;if(n!==null)Be=n,$e=e;else{if(e===null)throw Error(s(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Be===null?Ae.memoizedState=Be=e:Be=Be.next=e}return Be}function ko(e,n){return typeof n=="function"?n(e):n}function il(e){var n=Ct(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=$e,c=a.baseQueue,f=o.pending;if(f!==null){if(c!==null){var x=c.next;c.next=f.next,f.next=x}a.baseQueue=c=f,o.pending=null}if(c!==null){f=c.next,a=a.baseState;var N=x=null,j=null,F=f;do{var V=F.lane;if((Vn&V)===V)j!==null&&(j=j.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),a=F.hasEagerState?F.eagerState:e(a,F.action);else{var Q={lane:V,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};j===null?(N=j=Q,x=a):j=j.next=Q,Ae.lanes|=V,Qn|=V}F=F.next}while(F!==null&&F!==f);j===null?x=a:j.next=N,Pt(a,n.memoizedState)||(lt=!0),n.memoizedState=a,n.baseState=x,n.baseQueue=j,o.lastRenderedState=a}if(e=o.interleaved,e!==null){c=e;do f=c.lane,Ae.lanes|=f,Qn|=f,c=c.next;while(c!==e)}else c===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function al(e){var n=Ct(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=o.dispatch,c=o.pending,f=n.memoizedState;if(c!==null){o.pending=null;var x=c=c.next;do f=e(f,x.action),x=x.next;while(x!==c);Pt(f,n.memoizedState)||(lt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,a]}function nf(){}function rf(e,n){var o=Ae,a=Ct(),c=n(),f=!Pt(a.memoizedState,c);if(f&&(a.memoizedState=c,lt=!0),a=a.queue,ll(af.bind(null,o,a,e),[e]),a.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(o.flags|=2048,Eo(9,sf.bind(null,o,a,c,n),void 0,null),We===null)throw Error(s(349));(Vn&30)!==0||of(o,n,c)}return c}function of(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function sf(e,n,o,a){n.value=o,n.getSnapshot=a,lf(n)&&uf(e)}function af(e,n,o){return o(function(){lf(n)&&uf(e)})}function lf(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Pt(e,o)}catch{return!0}}function uf(e){var n=tn(e,1);n!==null&&Mt(n,e,1,-1)}function cf(e){var n=Ht();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},n.queue=e,e=e.dispatch=ky.bind(null,Ae,e),[n.memoizedState,e]}function Eo(e,n,o,a){return e={tag:e,create:n,destroy:o,deps:a,next:null},n=Ae.updateQueue,n===null?(n={lastEffect:null,stores:null},Ae.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,n.lastEffect=e)),e}function df(){return Ct().memoizedState}function Fs(e,n,o,a){var c=Ht();Ae.flags|=e,c.memoizedState=Eo(1|n,o,void 0,a===void 0?null:a)}function $s(e,n,o,a){var c=Ct();a=a===void 0?null:a;var f=void 0;if($e!==null){var x=$e.memoizedState;if(f=x.destroy,a!==null&&rl(a,x.deps)){c.memoizedState=Eo(n,o,f,a);return}}Ae.flags|=e,c.memoizedState=Eo(1|n,o,f,a)}function ff(e,n){return Fs(8390656,8,e,n)}function ll(e,n){return $s(2048,8,e,n)}function pf(e,n){return $s(4,2,e,n)}function hf(e,n){return $s(4,4,e,n)}function mf(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function gf(e,n,o){return o=o!=null?o.concat([e]):null,$s(4,4,mf.bind(null,n,e),o)}function ul(){}function vf(e,n){var o=Ct();n=n===void 0?null:n;var a=o.memoizedState;return a!==null&&n!==null&&rl(n,a[1])?a[0]:(o.memoizedState=[e,n],e)}function xf(e,n){var o=Ct();n=n===void 0?null:n;var a=o.memoizedState;return a!==null&&n!==null&&rl(n,a[1])?a[0]:(e=e(),o.memoizedState=[e,n],e)}function yf(e,n,o){return(Vn&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=o):(Pt(o,n)||(o=Gc(),Ae.lanes|=o,Qn|=o,e.baseState=!0),n)}function Sy(e,n){var o=ke;ke=o!==0&&4>o?o:4,e(!0);var a=nl.transition;nl.transition={};try{e(!1),n()}finally{ke=o,nl.transition=a}}function wf(){return Ct().memoizedState}function Cy(e,n,o){var a=En(e);if(o={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null},bf(e))Sf(n,o);else if(o=Xd(e,n,o,a),o!==null){var c=nt();Mt(o,e,a,c),Cf(o,n,a)}}function ky(e,n,o){var a=En(e),c={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null};if(bf(e))Sf(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,N=f(x,o);if(c.hasEagerState=!0,c.eagerState=N,Pt(N,x)){var j=n.interleaved;j===null?(c.next=c,Ya(n)):(c.next=j.next,j.next=c),n.interleaved=c;return}}catch{}o=Xd(e,n,c,a),o!==null&&(c=nt(),Mt(o,e,a,c),Cf(o,n,a))}}function bf(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function Sf(e,n){So=Ds=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Cf(e,n,o){if((o&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,da(e,o)}}var zs={readContext:St,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},Ey={readContext:St,useCallback:function(e,n){return Ht().memoizedState=[e,n===void 0?null:n],e},useContext:St,useEffect:ff,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Fs(4194308,4,mf.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Fs(4194308,4,e,n)},useInsertionEffect:function(e,n){return Fs(4,2,e,n)},useMemo:function(e,n){var o=Ht();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var a=Ht();return n=o!==void 0?o(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Cy.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var n=Ht();return e={current:e},n.memoizedState=e},useState:cf,useDebugValue:ul,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=cf(!1),n=e[0];return e=Sy.bind(null,e[1]),Ht().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var a=Ae,c=Ht();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=n(),We===null)throw Error(s(349));(Vn&30)!==0||of(a,n,o)}c.memoizedState=o;var f={value:o,getSnapshot:n};return c.queue=f,ff(af.bind(null,a,f,e),[e]),a.flags|=2048,Eo(9,sf.bind(null,a,f,o,n),void 0,null),o},useId:function(){var e=Ht(),n=We.identifierPrefix;if(_e){var o=en,a=Jt;o=(a&~(1<<32-Rt(a)-1)).toString(32)+o,n=":"+n+"R"+o,o=Co++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=by++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Ny={readContext:St,useCallback:vf,useContext:St,useEffect:ll,useImperativeHandle:gf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:xf,useReducer:il,useRef:df,useState:function(){return il(ko)},useDebugValue:ul,useDeferredValue:function(e){var n=Ct();return yf(n,$e.memoizedState,e)},useTransition:function(){var e=il(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:nf,useSyncExternalStore:rf,useId:wf,unstable_isNewReconciler:!1},jy={readContext:St,useCallback:vf,useContext:St,useEffect:ll,useImperativeHandle:gf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:xf,useReducer:al,useRef:df,useState:function(){return al(ko)},useDebugValue:ul,useDeferredValue:function(e){var n=Ct();return $e===null?n.memoizedState=e:yf(n,$e.memoizedState,e)},useTransition:function(){var e=al(ko)[0],n=Ct().memoizedState;return[e,n]},useMutableSource:nf,useSyncExternalStore:rf,useId:wf,unstable_isNewReconciler:!1};function _t(e,n){if(e&&e.defaultProps){n=G({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function cl(e,n,o,a){n=e.memoizedState,o=o(a,n),o=o==null?n:G({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Us={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var a=nt(),c=En(e),f=nn(a,c);f.payload=n,o!=null&&(f.callback=o),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),As(n,e,c))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var a=nt(),c=En(e),f=nn(a,c);f.tag=1,f.payload=n,o!=null&&(f.callback=o),n=bn(e,f,c),n!==null&&(Mt(n,e,c,a),As(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=nt(),a=En(e),c=nn(o,a);c.tag=2,n!=null&&(c.callback=n),n=bn(e,c,a),n!==null&&(Mt(n,e,a,o),As(n,e,a))}};function kf(e,n,o,a,c,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,x):n.prototype&&n.prototype.isPureReactComponent?!co(o,a)||!co(c,f):!0}function Ef(e,n,o){var a=!1,c=xn,f=n.contextType;return typeof f=="object"&&f!==null?f=St(f):(c=at(n)?Un:qe.current,a=n.contextTypes,f=(a=a!=null)?xr(e,c):xn),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Us,e.stateNode=n,n._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),n}function Nf(e,n,o,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,a),n.state!==e&&Us.enqueueReplaceState(n,n.state,null)}function dl(e,n,o,a){var c=e.stateNode;c.props=o,c.state=e.memoizedState,c.refs={},Xa(e);var f=n.contextType;typeof f=="object"&&f!==null?c.context=St(f):(f=at(n)?Un:qe.current,c.context=xr(e,f)),c.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(cl(e,n,f,o),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&Us.enqueueReplaceState(c,c.state,null),Ms(e,o,c,a),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,n){try{var o="",a=n;do o+=ge(a),a=a.return;while(a);var c=o}catch(f){c=`
|
|
7
|
+
Error generating stack: `+f.message+`
|
|
8
|
+
`+f.stack}return{value:e,source:n,stack:c,digest:null}}function fl(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function pl(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Ry=typeof WeakMap=="function"?WeakMap:Map;function jf(e,n,o){o=nn(-1,o),o.tag=3,o.payload={element:null};var a=n.value;return o.callback=function(){Gs||(Gs=!0,Rl=a),pl(e,n)},o}function Rf(e,n,o){o=nn(-1,o),o.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var c=n.value;o.payload=function(){return a(c)},o.callback=function(){pl(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){pl(e,n),typeof a!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function Pf(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new Ry;var c=new Set;a.set(n,c)}else c=a.get(n),c===void 0&&(c=new Set,a.set(n,c));c.has(o)||(c.add(o),e=Hy.bind(null,e,n,o),n.then(e,e))}function Tf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function _f(e,n,o,a,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=nn(-1,1),n.tag=2,bn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Py=L.ReactCurrentOwner,lt=!1;function tt(e,n,o,a){n.child=e===null?Yd(n,null,o,a):Sr(n,e.child,o,a)}function Of(e,n,o,a,c){o=o.render;var f=n.ref;return kr(n,c),a=ol(e,n,o,a,f,c),o=sl(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&o&&Ua(n),n.flags|=1,tt(e,n,a,c),n.child)}function Af(e,n,o,a,c){if(e===null){var f=o.type;return typeof f=="function"&&!Il(f)&&f.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=f,Mf(e,n,f,a,c)):(e=ei(o.type,null,a,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&c)===0){var x=f.memoizedProps;if(o=o.compare,o=o!==null?o:co,o(x,a)&&e.ref===n.ref)return rn(e,n,c)}return n.flags|=1,e=jn(f,a),e.ref=n.ref,e.return=n,n.child=e}function Mf(e,n,o,a,c){if(e!==null){var f=e.memoizedProps;if(co(f,a)&&e.ref===n.ref)if(lt=!1,n.pendingProps=a=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(lt=!0);else return n.lanes=e.lanes,rn(e,n,c)}return hl(e,n,o,a,c)}function If(e,n,o){var a=n.pendingProps,c=a.children,f=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Rr,mt),mt|=o;else{if((o&1073741824)===0)return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ne(Rr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=f!==null?f.baseLanes:o,Ne(Rr,mt),mt|=a}else f!==null?(a=f.baseLanes|o,n.memoizedState=null):a=o,Ne(Rr,mt),mt|=a;return tt(e,n,c,o),n.child}function Lf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function hl(e,n,o,a,c){var f=at(o)?Un:qe.current;return f=xr(n,f),kr(n,c),o=ol(e,n,o,a,f,c),a=sl(),e!==null&&!lt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,rn(e,n,c)):(_e&&a&&Ua(n),n.flags|=1,tt(e,n,o,c),n.child)}function Df(e,n,o,a,c){if(at(o)){var f=!0;Es(n)}else f=!1;if(kr(n,c),n.stateNode===null)Bs(e,n),Ef(n,o,a),dl(n,o,a,c),a=!0;else if(e===null){var x=n.stateNode,N=n.memoizedProps;x.props=N;var j=x.context,F=o.contextType;typeof F=="object"&&F!==null?F=St(F):(F=at(o)?Un:qe.current,F=xr(n,F));var V=o.getDerivedStateFromProps,Q=typeof V=="function"||typeof x.getSnapshotBeforeUpdate=="function";Q||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==a||j!==F)&&Nf(n,x,a,F),wn=!1;var K=n.memoizedState;x.state=K,Ms(n,a,x,c),j=n.memoizedState,N!==a||K!==j||it.current||wn?(typeof V=="function"&&(cl(n,o,V,a),j=n.memoizedState),(N=wn||kf(n,o,N,a,K,j,F))?(Q||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=j),x.props=a,x.state=j,x.context=F,a=N):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{x=n.stateNode,Zd(e,n),N=n.memoizedProps,F=n.type===n.elementType?N:_t(n.type,N),x.props=F,Q=n.pendingProps,K=x.context,j=o.contextType,typeof j=="object"&&j!==null?j=St(j):(j=at(o)?Un:qe.current,j=xr(n,j));var Z=o.getDerivedStateFromProps;(V=typeof Z=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==Q||K!==j)&&Nf(n,x,a,j),wn=!1,K=n.memoizedState,x.state=K,Ms(n,a,x,c);var re=n.memoizedState;N!==Q||K!==re||it.current||wn?(typeof Z=="function"&&(cl(n,o,Z,a),re=n.memoizedState),(F=wn||kf(n,o,F,a,K,re,j)||!1)?(V||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(a,re,j),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(a,re,j)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=re),x.props=a,x.state=re,x.context=j,a=F):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),a=!1)}return ml(e,n,o,a,f,c)}function ml(e,n,o,a,c,f){Lf(e,n);var x=(n.flags&128)!==0;if(!a&&!x)return c&&Ud(n,o,!1),rn(e,n,f);a=n.stateNode,Py.current=n;var N=x&&typeof o.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&x?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,N,f)):tt(e,n,N,f),n.memoizedState=a.state,c&&Ud(n,o,!0),n.child}function Ff(e){var n=e.stateNode;n.pendingContext?$d(e,n.pendingContext,n.pendingContext!==n.context):n.context&&$d(e,n.context,!1),Za(e,n.containerInfo)}function $f(e,n,o,a,c){return br(),Ka(c),n.flags|=256,tt(e,n,o,a),n.child}var gl={dehydrated:null,treeContext:null,retryLane:0};function vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function zf(e,n,o){var a=n.pendingProps,c=Oe.current,f=!1,x=(n.flags&128)!==0,N;if((N=x)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Ne(Oe,c&1),e===null)return Wa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=a.children,e=a.fallback,f?(a=n.mode,f=n.child,x={mode:"hidden",children:x},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=ti(x,a,0,null),e=Xn(e,a,o,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=vl(o),n.memoizedState=gl,e):xl(n,x));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Ty(e,n,x,a,N,c,o);if(f){f=a.fallback,x=n.mode,c=e.child,N=c.sibling;var j={mode:"hidden",children:a.children};return(x&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=j,n.deletions=null):(a=jn(c,j),a.subtreeFlags=c.subtreeFlags&14680064),N!==null?f=jn(N,f):(f=Xn(f,x,o,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,x=e.child.memoizedState,x=x===null?vl(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~o,n.memoizedState=gl,a}return f=e.child,e=f.sibling,a=jn(f,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=o),a.return=n,a.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=a,n.memoizedState=null,a}function xl(e,n){return n=ti({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Hs(e,n,o,a){return a!==null&&Ka(a),Sr(n,e.child,null,o),e=xl(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Ty(e,n,o,a,c,f,x){if(o)return n.flags&256?(n.flags&=-257,a=fl(Error(s(422))),Hs(e,n,x,a)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=a.fallback,c=n.mode,a=ti({mode:"visible",children:a.children},c,0,null),f=Xn(f,c,x,null),f.flags|=2,a.return=n,f.return=n,a.sibling=f,n.child=a,(n.mode&1)!==0&&Sr(n,e.child,null,x),n.child.memoizedState=vl(x),n.memoizedState=gl,f);if((n.mode&1)===0)return Hs(e,n,x,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var N=a.dgst;return a=N,f=Error(s(419)),a=fl(f,a,void 0),Hs(e,n,x,a)}if(N=(x&e.childLanes)!==0,lt||N){if(a=We,a!==null){switch(x&-x){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(a.suspendedLanes|x))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,tn(e,c),Mt(a,e,c,-1))}return Ml(),a=fl(Error(s(421))),Hs(e,n,x,a)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=By.bind(null,e),c._reactRetry=n,null):(e=f.treeContext,ht=gn(c.nextSibling),pt=n,_e=!0,Tt=null,e!==null&&(wt[bt++]=Jt,wt[bt++]=en,wt[bt++]=Hn,Jt=e.id,en=e.overflow,Hn=n),n=xl(n,a.children),n.flags|=4096,n)}function Uf(e,n,o){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),qa(e.return,n,o)}function yl(e,n,o,a,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:c}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=o,f.tailMode=c)}function Hf(e,n,o){var a=n.pendingProps,c=a.revealOrder,f=a.tail;if(tt(e,n,a.children,o),a=Oe.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uf(e,o,n);else if(e.tag===19)Uf(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Ne(Oe,a),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(o=n.child,c=null;o!==null;)e=o.alternate,e!==null&&Is(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),yl(n,!1,c,o,f);break;case"backwards":for(o=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Is(e)===null){n.child=c;break}e=c.sibling,c.sibling=o,o=c,c=e}yl(n,!0,o,null,f);break;case"together":yl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Bs(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function rn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Qn|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,o=jn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=jn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function _y(e,n,o){switch(n.tag){case 3:Ff(n),br();break;case 5:tf(n);break;case 1:at(n.type)&&Es(n);break;case 4:Za(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,c=n.memoizedProps.value;Ne(_s,a._currentValue),a._currentValue=c;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Ne(Oe,Oe.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?zf(e,n,o):(Ne(Oe,Oe.current&1),e=rn(e,n,o),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(a=(o&n.childLanes)!==0,(e.flags&128)!==0){if(a)return Hf(e,n,o);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ne(Oe,Oe.current),a)break;return null;case 22:case 23:return n.lanes=0,If(e,n,o)}return rn(e,n,o)}var Bf,wl,Wf,Kf;Bf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},wl=function(){},Wf=function(e,n,o,a){var c=e.memoizedProps;if(c!==a){e=n.stateNode,Kn(Ut.current);var f=null;switch(o){case"input":c=qi(e,c),a=qi(e,a),f=[];break;case"select":c=G({},c,{value:void 0}),a=G({},a,{value:void 0}),f=[];break;case"textarea":c=Zi(e,c),a=Zi(e,a),f=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=Ss)}ea(o,a);var x;o=null;for(F in c)if(!a.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var N=c[F];for(x in N)N.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(u.hasOwnProperty(F)?f||(f=[]):(f=f||[]).push(F,null));for(F in a){var j=a[F];if(N=c?.[F],a.hasOwnProperty(F)&&j!==N&&(j!=null||N!=null))if(F==="style")if(N){for(x in N)!N.hasOwnProperty(x)||j&&j.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in j)j.hasOwnProperty(x)&&N[x]!==j[x]&&(o||(o={}),o[x]=j[x])}else o||(f||(f=[]),f.push(F,o)),o=j;else F==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,N=N?N.__html:void 0,j!=null&&N!==j&&(f=f||[]).push(F,j)):F==="children"?typeof j!="string"&&typeof j!="number"||(f=f||[]).push(F,""+j):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(j!=null&&F==="onScroll"&&Re("scroll",e),f||N===j||(f=[])):(f=f||[]).push(F,j))}o&&(f=f||[]).push("style",o);var F=f;(n.updateQueue=F)&&(n.flags|=4)}},Kf=function(e,n,o,a){o!==a&&(n.flags|=4)};function No(e,n){if(!_e)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Xe(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,a=0;if(n)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,a|=c.subtreeFlags&14680064,a|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=o,n}function Oy(e,n,o){var a=n.pendingProps;switch(Ha(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return at(n.type)&&ks(),Xe(n),null;case 3:return a=n.stateNode,Er(),Pe(it),Pe(qe),tl(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ps(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Tt!==null&&(_l(Tt),Tt=null))),wl(e,n),Xe(n),null;case 5:Ja(n);var c=Kn(bo.current);if(o=n.type,e!==null&&n.stateNode!=null)Wf(e,n,o,a,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}if(e=Kn(Ut.current),Ps(n)){a=n.stateNode,o=n.type;var f=n.memoizedProps;switch(a[zt]=n,a[go]=f,e=(n.mode&1)!==0,o){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":kc(a,f),Re("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},Re("invalid",a);break;case"textarea":jc(a,f),Re("invalid",a)}ea(o,f),c=null;for(var x in f)if(f.hasOwnProperty(x)){var N=f[x];x==="children"?typeof N=="string"?a.textContent!==N&&(f.suppressHydrationWarning!==!0&&bs(a.textContent,N,e),c=["children",N]):typeof N=="number"&&a.textContent!==""+N&&(f.suppressHydrationWarning!==!0&&bs(a.textContent,N,e),c=["children",""+N]):u.hasOwnProperty(x)&&N!=null&&x==="onScroll"&&Re("scroll",a)}switch(o){case"input":sr(a),Nc(a,f,!0);break;case"textarea":sr(a),Pc(a);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(a.onclick=Ss)}a=c,n.updateQueue=a,a!==null&&(n.flags|=4)}else{x=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Tc(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=x.createElement(o,{is:a.is}):(e=x.createElement(o),o==="select"&&(x=e,a.multiple?x.multiple=!0:a.size&&(x.size=a.size))):e=x.createElementNS(e,o),e[zt]=n,e[go]=a,Bf(e,n,!1,!1),n.stateNode=e;e:{switch(x=ta(o,a),o){case"dialog":Re("cancel",e),Re("close",e),c=a;break;case"iframe":case"object":case"embed":Re("load",e),c=a;break;case"video":case"audio":for(c=0;c<po.length;c++)Re(po[c],e);c=a;break;case"source":Re("error",e),c=a;break;case"img":case"image":case"link":Re("error",e),Re("load",e),c=a;break;case"details":Re("toggle",e),c=a;break;case"input":kc(e,a),c=qi(e,a),Re("invalid",e);break;case"option":c=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},c=G({},a,{value:void 0}),Re("invalid",e);break;case"textarea":jc(e,a),c=Zi(e,a),Re("invalid",e);break;default:c=a}ea(o,c),N=c;for(f in N)if(N.hasOwnProperty(f)){var j=N[f];f==="style"?Ac(e,j):f==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&_c(e,j)):f==="children"?typeof j=="string"?(o!=="textarea"||j!=="")&&Qr(e,j):typeof j=="number"&&Qr(e,""+j):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?j!=null&&f==="onScroll"&&Re("scroll",e):j!=null&&_(e,f,j,x))}switch(o){case"input":sr(e),Nc(e,a,!1);break;case"textarea":sr(e),Pc(e);break;case"option":a.value!=null&&e.setAttribute("value",""+be(a.value));break;case"select":e.multiple=!!a.multiple,f=a.value,f!=null?ir(e,!!a.multiple,f,!1):a.defaultValue!=null&&ir(e,!!a.multiple,a.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=Ss)}switch(o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Xe(n),null;case 6:if(e&&n.stateNode!=null)Kf(e,n,e.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(s(166));if(o=Kn(bo.current),Kn(Ut.current),Ps(n)){if(a=n.stateNode,o=n.memoizedProps,a[zt]=n,(f=a.nodeValue!==o)&&(e=pt,e!==null))switch(e.tag){case 3:bs(a.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bs(a.nodeValue,o,(e.mode&1)!==0)}f&&(n.flags|=4)}else a=(o.nodeType===9?o:o.ownerDocument).createTextNode(a),a[zt]=n,n.stateNode=a}return Xe(n),null;case 13:if(Pe(Oe),a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ht!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Qd(),br(),n.flags|=98560,f=!1;else if(f=Ps(n),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[zt]=n}else br(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),f=!1}else Tt!==null&&(_l(Tt),Tt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Oe.current&1)!==0?ze===0&&(ze=3):Ml())),n.updateQueue!==null&&(n.flags|=4),Xe(n),null);case 4:return Er(),wl(e,n),e===null&&ho(n.stateNode.containerInfo),Xe(n),null;case 10:return Ga(n.type._context),Xe(n),null;case 17:return at(n.type)&&ks(),Xe(n),null;case 19:if(Pe(Oe),f=n.memoizedState,f===null)return Xe(n),null;if(a=(n.flags&128)!==0,x=f.rendering,x===null)if(a)No(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=Is(e),x!==null){for(n.flags|=128,No(f,!1),a=x.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=o,o=n.child;o!==null;)f=o,e=a,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ne(Oe,Oe.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ie()>Pr&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304)}else{if(!a)if(e=Is(x),e!==null){if(n.flags|=128,a=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),No(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!_e)return Xe(n),null}else 2*Ie()-f.renderingStartTime>Pr&&o!==1073741824&&(n.flags|=128,a=!0,No(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(o=f.last,o!==null?o.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ie(),n.sibling=null,o=Oe.current,Ne(Oe,a?o&1|2:o&1),n):(Xe(n),null);case 22:case 23:return Al(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Ay(e,n){switch(Ha(n),n.tag){case 1:return at(n.type)&&ks(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Er(),Pe(it),Pe(qe),tl(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Ja(n),null;case 13:if(Pe(Oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));br()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Pe(Oe),null;case 4:return Er(),null;case 10:return Ga(n.type._context),null;case 22:case 23:return Al(),null;case 24:return null;default:return null}}var Ws=!1,Ze=!1,My=typeof WeakSet=="function"?WeakSet:Set,ee=null;function jr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(a){Me(e,n,a)}else o.current=null}function bl(e,n,o){try{o()}catch(a){Me(e,n,a)}}var Vf=!1;function Iy(e,n){if(Aa=cs,e=Cd(),Ea(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var x=0,N=-1,j=-1,F=0,V=0,Q=e,K=null;t:for(;;){for(var Z;Q!==o||c!==0&&Q.nodeType!==3||(N=x+c),Q!==f||a!==0&&Q.nodeType!==3||(j=x+a),Q.nodeType===3&&(x+=Q.nodeValue.length),(Z=Q.firstChild)!==null;)K=Q,Q=Z;for(;;){if(Q===e)break t;if(K===o&&++F===c&&(N=x),K===f&&++V===a&&(j=x),(Z=Q.nextSibling)!==null)break;Q=K,K=Q.parentNode}Q=Z}o=N===-1||j===-1?null:{start:N,end:j}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ma={focusedElem:e,selectionRange:o},cs=!1,ee=n;ee!==null;)if(n=ee,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ee=e;else for(;ee!==null;){n=ee;try{var re=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var se=re.memoizedProps,Le=re.memoizedState,M=n.stateNode,T=M.getSnapshotBeforeUpdate(n.elementType===n.type?se:_t(n.type,se),Le);M.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var I=n.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(q){Me(n,n.return,q)}if(e=n.sibling,e!==null){e.return=n.return,ee=e;break}ee=n.return}return re=Vf,Vf=!1,re}function jo(e,n,o){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&bl(n,o,f)}c=c.next}while(c!==a)}}function Ks(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.create;o.destroy=a()}o=o.next}while(o!==n)}}function Sl(e){var n=e.ref;if(n!==null){var o=e.stateNode;e.tag,e=o,typeof n=="function"?n(e):n.current=e}}function Qf(e){var n=e.alternate;n!==null&&(e.alternate=null,Qf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[zt],delete n[go],delete n[Fa],delete n[vy],delete n[xy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gf(e){return e.tag===5||e.tag===3||e.tag===4}function qf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cl(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Ss));else if(a!==4&&(e=e.child,e!==null))for(Cl(e,n,o),e=e.sibling;e!==null;)Cl(e,n,o),e=e.sibling}function kl(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(kl(e,n,o),e=e.sibling;e!==null;)kl(e,n,o),e=e.sibling}var Ve=null,Ot=!1;function Sn(e,n,o){for(o=o.child;o!==null;)Yf(e,n,o),o=o.sibling}function Yf(e,n,o){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(os,o)}catch{}switch(o.tag){case 5:Ze||jr(o,n);case 6:var a=Ve,c=Ot;Ve=null,Sn(e,n,o),Ve=a,Ot=c,Ve!==null&&(Ot?(e=Ve,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Ve.removeChild(o.stateNode));break;case 18:Ve!==null&&(Ot?(e=Ve,o=o.stateNode,e.nodeType===8?Da(e.parentNode,o):e.nodeType===1&&Da(e,o),oo(e)):Da(Ve,o.stateNode));break;case 4:a=Ve,c=Ot,Ve=o.stateNode.containerInfo,Ot=!0,Sn(e,n,o),Ve=a,Ot=c;break;case 0:case 11:case 14:case 15:if(!Ze&&(a=o.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&bl(o,n,x),c=c.next}while(c!==a)}Sn(e,n,o);break;case 1:if(!Ze&&(jr(o,n),a=o.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(N){Me(o,n,N)}Sn(e,n,o);break;case 21:Sn(e,n,o);break;case 22:o.mode&1?(Ze=(a=Ze)||o.memoizedState!==null,Sn(e,n,o),Ze=a):Sn(e,n,o);break;default:Sn(e,n,o)}}function Xf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new My),n.forEach(function(a){var c=Wy.bind(null,e,a);o.has(a)||(o.add(a),a.then(c,c))})}}function At(e,n){var o=n.deletions;if(o!==null)for(var a=0;a<o.length;a++){var c=o[a];try{var f=e,x=n,N=x;e:for(;N!==null;){switch(N.tag){case 5:Ve=N.stateNode,Ot=!1;break e;case 3:Ve=N.stateNode.containerInfo,Ot=!0;break e;case 4:Ve=N.stateNode.containerInfo,Ot=!0;break e}N=N.return}if(Ve===null)throw Error(s(160));Yf(f,x,c),Ve=null,Ot=!1;var j=c.alternate;j!==null&&(j.return=null),c.return=null}catch(F){Me(c,n,F)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Zf(n,e),n=n.sibling}function Zf(e,n){var o=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(n,e),Bt(e),a&4){try{jo(3,e,e.return),Ks(3,e)}catch(se){Me(e,e.return,se)}try{jo(5,e,e.return)}catch(se){Me(e,e.return,se)}}break;case 1:At(n,e),Bt(e),a&512&&o!==null&&jr(o,o.return);break;case 5:if(At(n,e),Bt(e),a&512&&o!==null&&jr(o,o.return),e.flags&32){var c=e.stateNode;try{Qr(c,"")}catch(se){Me(e,e.return,se)}}if(a&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,x=o!==null?o.memoizedProps:f,N=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{N==="input"&&f.type==="radio"&&f.name!=null&&Ec(c,f),ta(N,x);var F=ta(N,f);for(x=0;x<j.length;x+=2){var V=j[x],Q=j[x+1];V==="style"?Ac(c,Q):V==="dangerouslySetInnerHTML"?_c(c,Q):V==="children"?Qr(c,Q):_(c,V,Q,F)}switch(N){case"input":Yi(c,f);break;case"textarea":Rc(c,f);break;case"select":var K=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var Z=f.value;Z!=null?ir(c,!!f.multiple,Z,!1):K!==!!f.multiple&&(f.defaultValue!=null?ir(c,!!f.multiple,f.defaultValue,!0):ir(c,!!f.multiple,f.multiple?[]:"",!1))}c[go]=f}catch(se){Me(e,e.return,se)}}break;case 6:if(At(n,e),Bt(e),a&4){if(e.stateNode===null)throw Error(s(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(se){Me(e,e.return,se)}}break;case 3:if(At(n,e),Bt(e),a&4&&o!==null&&o.memoizedState.isDehydrated)try{oo(n.containerInfo)}catch(se){Me(e,e.return,se)}break;case 4:At(n,e),Bt(e);break;case 13:At(n,e),Bt(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(jl=Ie())),a&4&&Xf(e);break;case 22:if(V=o!==null&&o.memoizedState!==null,e.mode&1?(Ze=(F=Ze)||V,At(n,e),Ze=F):At(n,e),Bt(e),a&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!V&&(e.mode&1)!==0)for(ee=e,V=e.child;V!==null;){for(Q=ee=V;ee!==null;){switch(K=ee,Z=K.child,K.tag){case 0:case 11:case 14:case 15:jo(4,K,K.return);break;case 1:jr(K,K.return);var re=K.stateNode;if(typeof re.componentWillUnmount=="function"){a=K,o=K.return;try{n=a,re.props=n.memoizedProps,re.state=n.memoizedState,re.componentWillUnmount()}catch(se){Me(a,o,se)}}break;case 5:jr(K,K.return);break;case 22:if(K.memoizedState!==null){tp(Q);continue}}Z!==null?(Z.return=K,ee=Z):tp(Q)}V=V.sibling}e:for(V=null,Q=e;;){if(Q.tag===5){if(V===null){V=Q;try{c=Q.stateNode,F?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(N=Q.stateNode,j=Q.memoizedProps.style,x=j!=null&&j.hasOwnProperty("display")?j.display:null,N.style.display=Oc("display",x))}catch(se){Me(e,e.return,se)}}}else if(Q.tag===6){if(V===null)try{Q.stateNode.nodeValue=F?"":Q.memoizedProps}catch(se){Me(e,e.return,se)}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===e)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===e)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===e)break e;V===Q&&(V=null),Q=Q.return}V===Q&&(V=null),Q.sibling.return=Q.return,Q=Q.sibling}}break;case 19:At(n,e),Bt(e),a&4&&Xf(e);break;case 21:break;default:At(n,e),Bt(e)}}function Bt(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Gf(o)){var a=o;break e}o=o.return}throw Error(s(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(Qr(c,""),a.flags&=-33);var f=qf(e);kl(e,f,c);break;case 3:case 4:var x=a.stateNode.containerInfo,N=qf(e);Cl(e,N,x);break;default:throw Error(s(161))}}catch(j){Me(e,e.return,j)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Ly(e,n,o){ee=e,Jf(e)}function Jf(e,n,o){for(var a=(e.mode&1)!==0;ee!==null;){var c=ee,f=c.child;if(c.tag===22&&a){var x=c.memoizedState!==null||Ws;if(!x){var N=c.alternate,j=N!==null&&N.memoizedState!==null||Ze;N=Ws;var F=Ze;if(Ws=x,(Ze=j)&&!F)for(ee=c;ee!==null;)x=ee,j=x.child,x.tag===22&&x.memoizedState!==null?np(c):j!==null?(j.return=x,ee=j):np(c);for(;f!==null;)ee=f,Jf(f),f=f.sibling;ee=c,Ws=N,Ze=F}ep(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,ee=f):ep(e)}}function ep(e){for(;ee!==null;){var n=ee;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ze||Ks(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!Ze)if(o===null)a.componentDidMount();else{var c=n.elementType===n.type?o.memoizedProps:_t(n.type,o.memoizedProps);a.componentDidUpdate(c,o.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&ef(n,f,a);break;case 3:var x=n.updateQueue;if(x!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}ef(n,x,o)}break;case 5:var N=n.stateNode;if(o===null&&n.flags&4){o=N;var j=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&o.focus();break;case"img":j.src&&(o.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var F=n.alternate;if(F!==null){var V=F.memoizedState;if(V!==null){var Q=V.dehydrated;Q!==null&&oo(Q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Ze||n.flags&512&&Sl(n)}catch(K){Me(n,n.return,K)}}if(n===e){ee=null;break}if(o=n.sibling,o!==null){o.return=n.return,ee=o;break}ee=n.return}}function tp(e){for(;ee!==null;){var n=ee;if(n===e){ee=null;break}var o=n.sibling;if(o!==null){o.return=n.return,ee=o;break}ee=n.return}}function np(e){for(;ee!==null;){var n=ee;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Ks(4,n)}catch(j){Me(n,o,j)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var c=n.return;try{a.componentDidMount()}catch(j){Me(n,c,j)}}var f=n.return;try{Sl(n)}catch(j){Me(n,f,j)}break;case 5:var x=n.return;try{Sl(n)}catch(j){Me(n,x,j)}}}catch(j){Me(n,n.return,j)}if(n===e){ee=null;break}var N=n.sibling;if(N!==null){N.return=n.return,ee=N;break}ee=n.return}}var Dy=Math.ceil,Vs=L.ReactCurrentDispatcher,El=L.ReactCurrentOwner,kt=L.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,Rr=vn(0),ze=0,Ro=null,Qn=0,Qs=0,Nl=0,Po=null,ut=null,jl=0,Pr=1/0,on=null,Gs=!1,Rl=null,Cn=null,qs=!1,kn=null,Ys=0,To=0,Pl=null,Xs=-1,Zs=0;function nt(){return(Se&6)!==0?Ie():Xs!==-1?Xs:Xs=Ie()}function En(e){return(e.mode&1)===0?1:(Se&2)!==0&&Qe!==0?Qe&-Qe:wy.transition!==null?(Zs===0&&(Zs=Gc()),Zs):(e=ke,e!==0||(e=window.event,e=e===void 0?16:rd(e.type)),e)}function Mt(e,n,o,a){if(50<To)throw To=0,Pl=null,Error(s(185));Jr(e,o,a),((Se&2)===0||e!==We)&&(e===We&&((Se&2)===0&&(Qs|=o),ze===4&&Nn(e,Qe)),ct(e,a),o===1&&Se===0&&(n.mode&1)===0&&(Pr=Ie()+500,Ns&&yn()))}function ct(e,n){var o=e.callbackNode;wx(e,n);var a=as(e,e===We?Qe:0);if(a===0)o!==null&&Kc(o),e.callbackNode=null,e.callbackPriority=0;else if(n=a&-a,e.callbackPriority!==n){if(o!=null&&Kc(o),n===1)e.tag===0?yy(op.bind(null,e)):Hd(op.bind(null,e)),my(function(){(Se&6)===0&&yn()}),o=null;else{switch(qc(a)){case 1:o=la;break;case 4:o=Vc;break;case 16:o=rs;break;case 536870912:o=Qc;break;default:o=rs}o=fp(o,rp.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function rp(e,n){if(Xs=-1,Zs=0,(Se&6)!==0)throw Error(s(327));var o=e.callbackNode;if(Tr()&&e.callbackNode!==o)return null;var a=as(e,e===We?Qe:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||n)n=Js(e,a);else{n=a;var c=Se;Se|=2;var f=ip();(We!==e||Qe!==n)&&(on=null,Pr=Ie()+500,qn(e,n));do try{zy();break}catch(N){sp(e,N)}while(!0);Qa(),Vs.current=f,Se=c,Fe!==null?n=0:(We=null,Qe=0,n=ze)}if(n!==0){if(n===2&&(c=ua(e),c!==0&&(a=c,n=Tl(e,c))),n===1)throw o=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),o;if(n===6)Nn(e,a);else{if(c=e.current.alternate,(a&30)===0&&!Fy(c)&&(n=Js(e,a),n===2&&(f=ua(e),f!==0&&(a=f,n=Tl(e,f))),n===1))throw o=Ro,qn(e,0),Nn(e,a),ct(e,Ie()),o;switch(e.finishedWork=c,e.finishedLanes=a,n){case 0:case 1:throw Error(s(345));case 2:Yn(e,ut,on);break;case 3:if(Nn(e,a),(a&130023424)===a&&(n=jl+500-Ie(),10<n)){if(as(e,0)!==0)break;if(c=e.suspendedLanes,(c&a)!==a){nt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=La(Yn.bind(null,e,ut,on),n);break}Yn(e,ut,on);break;case 4:if(Nn(e,a),(a&4194240)===a)break;for(n=e.eventTimes,c=-1;0<a;){var x=31-Rt(a);f=1<<x,x=n[x],x>c&&(c=x),a&=~f}if(a=c,a=Ie()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Dy(a/1960))-a,10<a){e.timeoutHandle=La(Yn.bind(null,e,ut,on),a);break}Yn(e,ut,on);break;case 5:Yn(e,ut,on);break;default:throw Error(s(329))}}}return ct(e,Ie()),e.callbackNode===o?rp.bind(null,e):null}function Tl(e,n){var o=Po;return e.current.memoizedState.isDehydrated&&(qn(e,n).flags|=256),e=Js(e,n),e!==2&&(n=ut,ut=o,n!==null&&_l(n)),e}function _l(e){ut===null?ut=e:ut.push.apply(ut,e)}function Fy(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var a=0;a<o.length;a++){var c=o[a],f=c.getSnapshot;c=c.value;try{if(!Pt(f(),c))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Nn(e,n){for(n&=~Nl,n&=~Qs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Rt(n),a=1<<o;e[o]=-1,n&=~a}}function op(e){if((Se&6)!==0)throw Error(s(327));Tr();var n=as(e,0);if((n&1)===0)return ct(e,Ie()),null;var o=Js(e,n);if(e.tag!==0&&o===2){var a=ua(e);a!==0&&(n=a,o=Tl(e,a))}if(o===1)throw o=Ro,qn(e,0),Nn(e,n),ct(e,Ie()),o;if(o===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Yn(e,ut,on),ct(e,Ie()),null}function Ol(e,n){var o=Se;Se|=1;try{return e(n)}finally{Se=o,Se===0&&(Pr=Ie()+500,Ns&&yn())}}function Gn(e){kn!==null&&kn.tag===0&&(Se&6)===0&&Tr();var n=Se;Se|=1;var o=kt.transition,a=ke;try{if(kt.transition=null,ke=1,e)return e()}finally{ke=a,kt.transition=o,Se=n,(Se&6)===0&&yn()}}function Al(){mt=Rr.current,Pe(Rr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,hy(o)),Fe!==null)for(o=Fe.return;o!==null;){var a=o;switch(Ha(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&ks();break;case 3:Er(),Pe(it),Pe(qe),tl();break;case 5:Ja(a);break;case 4:Er();break;case 13:Pe(Oe);break;case 19:Pe(Oe);break;case 10:Ga(a.type._context);break;case 22:case 23:Al()}o=o.return}if(We=e,Fe=e=jn(e.current,null),Qe=mt=n,ze=0,Ro=null,Nl=Qs=Qn=0,ut=Po=null,Wn!==null){for(n=0;n<Wn.length;n++)if(o=Wn[n],a=o.interleaved,a!==null){o.interleaved=null;var c=a.next,f=o.pending;if(f!==null){var x=f.next;f.next=c,a.next=x}o.pending=a}Wn=null}return e}function sp(e,n){do{var o=Fe;try{if(Qa(),Ls.current=zs,Ds){for(var a=Ae.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}Ds=!1}if(Vn=0,Be=$e=Ae=null,So=!1,Co=0,El.current=null,o===null||o.return===null){ze=1,Ro=n,Fe=null;break}e:{var f=e,x=o.return,N=o,j=n;if(n=Qe,N.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var F=j,V=N,Q=V.tag;if((V.mode&1)===0&&(Q===0||Q===11||Q===15)){var K=V.alternate;K?(V.updateQueue=K.updateQueue,V.memoizedState=K.memoizedState,V.lanes=K.lanes):(V.updateQueue=null,V.memoizedState=null)}var Z=Tf(x);if(Z!==null){Z.flags&=-257,_f(Z,x,N,f,n),Z.mode&1&&Pf(f,F,n),n=Z,j=F;var re=n.updateQueue;if(re===null){var se=new Set;se.add(j),n.updateQueue=se}else re.add(j);break e}else{if((n&1)===0){Pf(f,F,n),Ml();break e}j=Error(s(426))}}else if(_e&&N.mode&1){var Le=Tf(x);if(Le!==null){(Le.flags&65536)===0&&(Le.flags|=256),_f(Le,x,N,f,n),Ka(Nr(j,N));break e}}f=j=Nr(j,N),ze!==4&&(ze=2),Po===null?Po=[f]:Po.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var M=jf(f,j,n);Jd(f,M);break e;case 1:N=j;var T=f.type,I=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(Cn===null||!Cn.has(I)))){f.flags|=65536,n&=-n,f.lanes|=n;var q=Rf(f,N,n);Jd(f,q);break e}}f=f.return}while(f!==null)}lp(o)}catch(ae){n=ae,Fe===o&&o!==null&&(Fe=o=o.return);continue}break}while(!0)}function ip(){var e=Vs.current;return Vs.current=zs,e===null?zs:e}function Ml(){(ze===0||ze===3||ze===2)&&(ze=4),We===null||(Qn&268435455)===0&&(Qs&268435455)===0||Nn(We,Qe)}function Js(e,n){var o=Se;Se|=2;var a=ip();(We!==e||Qe!==n)&&(on=null,qn(e,n));do try{$y();break}catch(c){sp(e,c)}while(!0);if(Qa(),Se=o,Vs.current=a,Fe!==null)throw Error(s(261));return We=null,Qe=0,ze}function $y(){for(;Fe!==null;)ap(Fe)}function zy(){for(;Fe!==null&&!dx();)ap(Fe)}function ap(e){var n=dp(e.alternate,e,mt);e.memoizedProps=e.pendingProps,n===null?lp(e):Fe=n,El.current=null}function lp(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Oy(o,n,mt),o!==null){Fe=o;return}}else{if(o=Ay(o,n),o!==null){o.flags&=32767,Fe=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Fe=null;return}}if(n=n.sibling,n!==null){Fe=n;return}Fe=n=e}while(n!==null);ze===0&&(ze=5)}function Yn(e,n,o){var a=ke,c=kt.transition;try{kt.transition=null,ke=1,Uy(e,n,o,a)}finally{kt.transition=c,ke=a}return null}function Uy(e,n,o,a){do Tr();while(kn!==null);if((Se&6)!==0)throw Error(s(327));o=e.finishedWork;var c=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var f=o.lanes|o.childLanes;if(bx(e,f),e===We&&(Fe=We=null,Qe=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||qs||(qs=!0,fp(rs,function(){return Tr(),null})),f=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||f){f=kt.transition,kt.transition=null;var x=ke;ke=1;var N=Se;Se|=4,El.current=null,Iy(e,o),Zf(o,e),ay(Ma),cs=!!Aa,Ma=Aa=null,e.current=o,Ly(o),fx(),Se=N,ke=x,kt.transition=f}else e.current=o;if(qs&&(qs=!1,kn=e,Ys=c),f=e.pendingLanes,f===0&&(Cn=null),mx(o.stateNode),ct(e,Ie()),n!==null)for(a=e.onRecoverableError,o=0;o<n.length;o++)c=n[o],a(c.value,{componentStack:c.stack,digest:c.digest});if(Gs)throw Gs=!1,e=Rl,Rl=null,e;return(Ys&1)!==0&&e.tag!==0&&Tr(),f=e.pendingLanes,(f&1)!==0?e===Pl?To++:(To=0,Pl=e):To=0,yn(),null}function Tr(){if(kn!==null){var e=qc(Ys),n=kt.transition,o=ke;try{if(kt.transition=null,ke=16>e?16:e,kn===null)var a=!1;else{if(e=kn,kn=null,Ys=0,(Se&6)!==0)throw Error(s(331));var c=Se;for(Se|=4,ee=e.current;ee!==null;){var f=ee,x=f.child;if((ee.flags&16)!==0){var N=f.deletions;if(N!==null){for(var j=0;j<N.length;j++){var F=N[j];for(ee=F;ee!==null;){var V=ee;switch(V.tag){case 0:case 11:case 15:jo(8,V,f)}var Q=V.child;if(Q!==null)Q.return=V,ee=Q;else for(;ee!==null;){V=ee;var K=V.sibling,Z=V.return;if(Qf(V),V===F){ee=null;break}if(K!==null){K.return=Z,ee=K;break}ee=Z}}}var re=f.alternate;if(re!==null){var se=re.child;if(se!==null){re.child=null;do{var Le=se.sibling;se.sibling=null,se=Le}while(se!==null)}}ee=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,ee=x;else e:for(;ee!==null;){if(f=ee,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:jo(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,ee=M;break e}ee=f.return}}var T=e.current;for(ee=T;ee!==null;){x=ee;var I=x.child;if((x.subtreeFlags&2064)!==0&&I!==null)I.return=x,ee=I;else e:for(x=T;ee!==null;){if(N=ee,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Ks(9,N)}}catch(ae){Me(N,N.return,ae)}if(N===x){ee=null;break e}var q=N.sibling;if(q!==null){q.return=N.return,ee=q;break e}ee=N.return}}if(Se=c,yn(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(os,e)}catch{}a=!0}return a}finally{ke=o,kt.transition=n}}return!1}function up(e,n,o){n=Nr(o,n),n=jf(e,n,1),e=bn(e,n,1),n=nt(),e!==null&&(Jr(e,1,n),ct(e,n))}function Me(e,n,o){if(e.tag===3)up(e,e,o);else for(;n!==null;){if(n.tag===3){up(n,e,o);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Cn===null||!Cn.has(a))){e=Nr(o,e),e=Rf(n,e,1),n=bn(n,e,1),e=nt(),n!==null&&(Jr(n,1,e),ct(n,e));break}}n=n.return}}function Hy(e,n,o){var a=e.pingCache;a!==null&&a.delete(n),n=nt(),e.pingedLanes|=e.suspendedLanes&o,We===e&&(Qe&o)===o&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ie()-jl?qn(e,0):Nl|=o),ct(e,n)}function cp(e,n){n===0&&((e.mode&1)===0?n=1:(n=is,is<<=1,(is&130023424)===0&&(is=4194304)));var o=nt();e=tn(e,n),e!==null&&(Jr(e,n,o),ct(e,o))}function By(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),cp(e,o)}function Wy(e,n){var o=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(s(314))}a!==null&&a.delete(n),cp(e,o)}var dp;dp=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||it.current)lt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return lt=!1,_y(e,n,o);lt=(e.flags&131072)!==0}else lt=!1,_e&&(n.flags&1048576)!==0&&Bd(n,Rs,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Bs(e,n),e=n.pendingProps;var c=xr(n,qe.current);kr(n,o),c=ol(null,n,a,e,c,o);var f=sl();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,at(a)?(f=!0,Es(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Xa(n),c.updater=Us,n.stateNode=c,c._reactInternals=n,dl(n,a,e,o),n=ml(null,n,a,!0,f,o)):(n.tag=0,_e&&f&&Ua(n),tt(null,n,c,o),n=n.child),n;case 16:a=n.elementType;e:{switch(Bs(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=Vy(a),e=_t(a,e),c){case 0:n=hl(null,n,a,e,o);break e;case 1:n=Df(null,n,a,e,o);break e;case 11:n=Of(null,n,a,e,o);break e;case 14:n=Af(null,n,a,_t(a.type,e),o);break e}throw Error(s(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),hl(e,n,a,c,o);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Df(e,n,a,c,o);case 3:e:{if(Ff(n),e===null)throw Error(s(387));a=n.pendingProps,f=n.memoizedState,c=f.element,Zd(e,n),Ms(n,a,null,o);var x=n.memoizedState;if(a=x.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Nr(Error(s(423)),n),n=$f(e,n,a,o,c);break e}else if(a!==c){c=Nr(Error(s(424)),n),n=$f(e,n,a,o,c);break e}else for(ht=gn(n.stateNode.containerInfo.firstChild),pt=n,_e=!0,Tt=null,o=Yd(n,null,a,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(br(),a===c){n=rn(e,n,o);break e}tt(e,n,a,o)}n=n.child}return n;case 5:return tf(n),e===null&&Wa(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,x=c.children,Ia(a,c)?x=null:f!==null&&Ia(a,f)&&(n.flags|=32),Lf(e,n),tt(e,n,x,o),n.child;case 6:return e===null&&Wa(n),null;case 13:return zf(e,n,o);case 4:return Za(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Sr(n,null,a,o):tt(e,n,a,o),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Of(e,n,a,c,o);case 7:return tt(e,n,n.pendingProps,o),n.child;case 8:return tt(e,n,n.pendingProps.children,o),n.child;case 12:return tt(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,x=c.value,Ne(_s,a._currentValue),a._currentValue=x,f!==null)if(Pt(f.value,x)){if(f.children===c.children&&!it.current){n=rn(e,n,o);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var N=f.dependencies;if(N!==null){x=f.child;for(var j=N.firstContext;j!==null;){if(j.context===a){if(f.tag===1){j=nn(-1,o&-o),j.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var V=F.pending;V===null?j.next=j:(j.next=V.next,V.next=j),F.pending=j}}f.lanes|=o,j=f.alternate,j!==null&&(j.lanes|=o),qa(f.return,o,n),N.lanes|=o;break}j=j.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=o,N=x.alternate,N!==null&&(N.lanes|=o),qa(x,o,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}tt(e,n,c.children,o),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,kr(n,o),c=St(c),a=a(c),n.flags|=1,tt(e,n,a,o),n.child;case 14:return a=n.type,c=_t(a,n.pendingProps),c=_t(a.type,c),Af(e,n,a,c,o);case 15:return Mf(e,n,n.type,n.pendingProps,o);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:_t(a,c),Bs(e,n),n.tag=1,at(a)?(e=!0,Es(n)):e=!1,kr(n,o),Ef(n,a,c),dl(n,a,c,o),ml(null,n,a,!0,e,o);case 19:return Hf(e,n,o);case 22:return If(e,n,o)}throw Error(s(156,n.tag))};function fp(e,n){return Wc(e,n)}function Ky(e,n,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,n,o,a){return new Ky(e,n,o,a)}function Il(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vy(e){if(typeof e=="function")return Il(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===me)return 14}return 2}function jn(e,n){var o=e.alternate;return o===null?(o=Et(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function ei(e,n,o,a,c,f){var x=2;if(a=e,typeof e=="function")Il(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case z:return Xn(o.children,c,f,n);case U:x=8,c|=8;break;case J:return e=Et(12,o,n,c|2),e.elementType=J,e.lanes=f,e;case ue:return e=Et(13,o,n,c),e.elementType=ue,e.lanes=f,e;case X:return e=Et(19,o,n,c),e.elementType=X,e.lanes=f,e;case le:return ti(o,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:x=10;break e;case te:x=9;break e;case Y:x=11;break e;case me:x=14;break e;case ie:x=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Et(x,o,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Xn(e,n,o,a){return e=Et(7,e,a,n),e.lanes=o,e}function ti(e,n,o,a){return e=Et(22,e,a,n),e.elementType=le,e.lanes=o,e.stateNode={isHidden:!1},e}function Ll(e,n,o){return e=Et(6,e,null,n),e.lanes=o,e}function Dl(e,n,o){return n=Et(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Qy(e,n,o,a,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ca(0),this.expirationTimes=ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Fl(e,n,o,a,c,f,x,N,j){return e=new Qy(e,n,o,N,j),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Et(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xa(f),e}function Gy(e,n,o){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:a==null?null:""+a,children:e,containerInfo:n,implementation:o}}function pp(e){if(!e)return xn;e=e._reactInternals;e:{if($n(e)!==e||e.tag!==1)throw Error(s(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(at(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(s(171))}if(e.tag===1){var o=e.type;if(at(o))return zd(e,o,n)}return n}function hp(e,n,o,a,c,f,x,N,j){return e=Fl(o,a,!0,e,c,f,x,N,j),e.context=pp(null),o=e.current,a=nt(),c=En(o),f=nn(a,c),f.callback=n??null,bn(o,f,c),e.current.lanes=c,Jr(e,c,a),ct(e,a),e}function ni(e,n,o,a){var c=n.current,f=nt(),x=En(c);return o=pp(o),n.context===null?n.context=o:n.pendingContext=o,n=nn(f,x),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=bn(c,n,x),e!==null&&(Mt(e,c,x,f),As(e,c,x)),x}function ri(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function mp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function $l(e,n){mp(e,n),(e=e.alternate)&&mp(e,n)}function qy(){return null}var gp=typeof reportError=="function"?reportError:function(e){console.error(e)};function zl(e){this._internalRoot=e}oi.prototype.render=zl.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));ni(e,n,null,null)},oi.prototype.unmount=zl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Gn(function(){ni(null,e,null,null)}),n[Xt]=null}};function oi(e){this._internalRoot=e}oi.prototype.unstable_scheduleHydration=function(e){if(e){var n=Zc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<pn.length&&n!==0&&n<pn[o].priority;o++);pn.splice(o,0,e),o===0&&td(e)}};function Ul(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function si(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vp(){}function Yy(e,n,o,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var F=ri(x);f.call(F)}}var x=hp(n,a,e,0,null,!1,!1,"",vp);return e._reactRootContainer=x,e[Xt]=x.current,ho(e.nodeType===8?e.parentNode:e),Gn(),x}for(;c=e.lastChild;)e.removeChild(c);if(typeof a=="function"){var N=a;a=function(){var F=ri(j);N.call(F)}}var j=Fl(e,0,!1,null,null,!1,!1,"",vp);return e._reactRootContainer=j,e[Xt]=j.current,ho(e.nodeType===8?e.parentNode:e),Gn(function(){ni(n,j,o,a)}),j}function ii(e,n,o,a,c){var f=o._reactRootContainer;if(f){var x=f;if(typeof c=="function"){var N=c;c=function(){var j=ri(x);N.call(j)}}ni(n,x,e,c)}else x=Yy(o,n,e,c,a);return ri(x)}Yc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Zr(n.pendingLanes);o!==0&&(da(n,o|1),ct(n,Ie()),(Se&6)===0&&(Pr=Ie()+500,yn()))}break;case 13:Gn(function(){var a=tn(e,1);if(a!==null){var c=nt();Mt(a,e,1,c)}}),$l(e,1)}},fa=function(e){if(e.tag===13){var n=tn(e,134217728);if(n!==null){var o=nt();Mt(n,e,134217728,o)}$l(e,134217728)}},Xc=function(e){if(e.tag===13){var n=En(e),o=tn(e,n);if(o!==null){var a=nt();Mt(o,e,n,a)}$l(e,n)}},Zc=function(){return ke},Jc=function(e,n){var o=ke;try{return ke=e,n()}finally{ke=o}},oa=function(e,n,o){switch(n){case"input":if(Yi(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var a=o[n];if(a!==e&&a.form===e.form){var c=Cs(a);if(!c)throw Error(s(90));Jo(a),Yi(a,c)}}}break;case"textarea":Rc(e,o);break;case"select":n=o.value,n!=null&&ir(e,!!o.multiple,n,!1)}},Dc=Ol,Fc=Gn;var Xy={usingClientEntryPoint:!1,Events:[vo,gr,Cs,Ic,Lc,Ol]},_o={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zy={bundleType:_o.bundleType,version:_o.version,rendererPackageName:_o.rendererPackageName,rendererConfig:_o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hc(e),e===null?null:e.stateNode},findFiberByHostInstance:_o.findFiberByHostInstance||qy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ai.isDisabled&&ai.supportsFiber)try{os=ai.inject(Zy),$t=ai}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xy,dt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ul(n))throw Error(s(200));return Gy(e,n,null,o)},dt.createRoot=function(e,n){if(!Ul(e))throw Error(s(299));var o=!1,a="",c=gp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=Fl(e,1,!1,null,null,o,!1,a,c),e[Xt]=n.current,ho(e.nodeType===8?e.parentNode:e),new zl(n)},dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Hc(n),e=e===null?null:e.stateNode,e},dt.flushSync=function(e){return Gn(e)},dt.hydrate=function(e,n,o){if(!si(n))throw Error(s(200));return ii(null,e,n,!0,o)},dt.hydrateRoot=function(e,n,o){if(!Ul(e))throw Error(s(405));var a=o!=null&&o.hydratedSources||null,c=!1,f="",x=gp;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=hp(n,null,e,1,o??null,c,!1,f,x),e[Xt]=n.current,ho(e),a)for(e=0;e<a.length;e++)o=a[e],c=o._getVersion,c=c(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,c]:n.mutableSourceEagerHydrationData.push(o,c);return new oi(n)},dt.render=function(e,n,o){if(!si(n))throw Error(s(200));return ii(null,e,n,!1,o)},dt.unmountComponentAtNode=function(e){if(!si(e))throw Error(s(40));return e._reactRootContainer?(Gn(function(){ii(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1},dt.unstable_batchedUpdates=Ol,dt.unstable_renderSubtreeIntoContainer=function(e,n,o,a){if(!si(o))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return ii(e,n,o,!1,a)},dt.version="18.3.1-next-f1338f8080-20240426",dt}var Ep;function zh(){if(Ep)return Wl.exports;Ep=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Wl.exports=iw(),Wl.exports}var Np;function aw(){if(Np)return li;Np=1;var t=zh();return li.createRoot=t.createRoot,li.hydrateRoot=t.hydrateRoot,li}var lw=aw();function uw(t,r){if(t instanceof RegExp)return{keys:!1,pattern:t};var s,i,u,d,p=[],h="",g=t.split("/");for(g[0]||g.shift();u=g.shift();)s=u[0],s==="*"?(p.push(s),h+=u[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(i=u.indexOf("?",1),d=u.indexOf(".",1),p.push(u.substring(1,~i?i:~d?d:u.length)),h+=~i&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(h+=(~i?"?":"")+"\\"+u.substring(d))):h+="/"+u;return{keys:p,pattern:new RegExp("^"+h+(r?"(?=$|/)":"/?$"),"i")}}var m=_i();const On=$h(m),Uu=ew({__proto__:null,default:On},[m]);var Ql={exports:{}},Gl={};var jp;function cw(){if(jp)return Gl;jp=1;var t=_i();function r(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}var s=typeof Object.is=="function"?Object.is:r,i=t.useState,u=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue;function h(w,b){var C=b(),k=i({inst:{value:C,getSnapshot:b}}),S=k[0].inst,E=k[1];return d(function(){S.value=C,S.getSnapshot=b,g(S)&&E({inst:S})},[w,C,b]),u(function(){return g(S)&&E({inst:S}),w(function(){g(S)&&E({inst:S})})},[w]),p(C),C}function g(w){var b=w.getSnapshot;w=w.value;try{var C=b();return!s(w,C)}catch{return!0}}function v(w,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return Gl.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Gl}var Rp;function dw(){return Rp||(Rp=1,Ql.exports=cw()),Ql.exports}var Uh=dw();const fw=Uu.useInsertionEffect,pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hw=pw?m.useLayoutEffect:m.useEffect,mw=fw||hw,Hh=t=>{const r=m.useRef([t,(...s)=>r[0](...s)]).current;return mw(()=>{r[0]=t}),r[1]},gw="popstate",Hu="pushState",Bu="replaceState",vw="hashchange",Pp=[gw,Hu,Bu,vw],xw=t=>{for(const r of Pp)addEventListener(r,t);return()=>{for(const r of Pp)removeEventListener(r,t)}},Bh=(t,r)=>Uh.useSyncExternalStore(xw,t,r),Tp=()=>location.search,yw=({ssrSearch:t}={})=>Bh(Tp,t!=null?()=>t:Tp),_p=()=>location.pathname,ww=({ssrPath:t}={})=>Bh(_p,t!=null?()=>t:_p),bw=(t,{replace:r=!1,state:s=null}={})=>history[r?Bu:Hu](s,"",t),Sw=(t={})=>[ww(t),bw],Op=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Op]>"u"){for(const t of[Hu,Bu]){const r=history[t];history[t]=function(){const s=r.apply(this,arguments),i=new Event(t);return i.arguments=arguments,dispatchEvent(i),s}}Object.defineProperty(window,Op,{value:!0})}const Cw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Wh=(t="")=>t==="/"?"":t,kw=(t,r)=>t[0]==="~"?t.slice(1):Wh(r)+t,Ew=(t="",r)=>Cw(vu(Wh(t)),vu(r)),Nw=t=>t[0]==="?"?t.slice(1):t,vu=t=>{try{return decodeURI(t)}catch{return t}},jw=t=>vu(Nw(t)),Kh={hook:Sw,searchHook:yw,parser:uw,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,s)=>t(r,s)},Vh=m.createContext(Kh),Ko=()=>m.useContext(Vh),Qh={},Gh=m.createContext(Qh),Rw=()=>m.useContext(Gh),Wu=t=>{const[r,s]=t.hook(t);return[Ew(t.base,r),Hh((i,u)=>t.aroundNav(s,kw(i,t.base),u))]},Pw=()=>{const t=Ko();return jw(t.searchHook(t))},qh=(t,r,s,i)=>{const{pattern:u,keys:d}=r instanceof RegExp?{keys:!1,pattern:r}:t(r||"*",i),p=u.exec(s)||[],[h,...g]=p;return h!==void 0?[!0,(()=>{const v=d!==!1?Object.fromEntries(d.map((w,b)=>[w,g[b]])):p.groups;let y={...g};return v&&Object.assign(y,v),y})(),...i?[h]:[]]:[!1,null]},Yh=({children:t,...r})=>{const s=Ko(),i=r.hook?Kh:s;let u=i;const[d,p=r.ssrSearch??""]=r.ssrPath?.split("?")??[];d&&(r.ssrSearch=p,r.ssrPath=d),r.hrefs=r.hrefs??r.hook?.hrefs,r.searchHook=r.searchHook??r.hook?.searchHook;let h=m.useRef({}),g=h.current,v=g;for(let y in i){const w=y==="base"?i[y]+(r[y]??""):r[y]??i[y];g===v&&w!==v[y]&&(h.current=v={...v}),v[y]=w,(w!==i[y]||w!==u[y])&&(u=v)}return m.createElement(Vh.Provider,{value:u,children:t})},Ap=({children:t,component:r},s)=>r?m.createElement(r,{params:s}):typeof t=="function"?t(s):t,Tw=t=>{let r=m.useRef(Qh);const s=r.current;return r.current=Object.keys(t).length!==Object.keys(s).length||Object.entries(t).some(([i,u])=>u!==s[i])?t:s},_r=({path:t,nest:r,match:s,...i})=>{const u=Ko(),[d]=Wu(u),[p,h,g]=s??qh(u.parser,t,d,r),v=Tw({...Rw(),...h});if(!p)return null;const y=g?m.createElement(Yh,{base:g},Ap(i,v)):Ap(i,v);return m.createElement(Gh.Provider,{value:v,children:y})},Kt=m.forwardRef((t,r)=>{const s=Ko(),[i,u]=Wu(s),{to:d="",href:p=d,onClick:h,asChild:g,children:v,className:y,replace:w,state:b,transition:C,...k}=t,S=Hh(P=>{P.ctrlKey||P.metaKey||P.altKey||P.shiftKey||P.button!==0||(h?.(P),P.defaultPrevented||(P.preventDefault(),u(p,t)))}),E=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return g&&m.isValidElement(v)?m.cloneElement(v,{onClick:S,href:E}):m.createElement("a",{...k,onClick:S,href:E,className:y?.call?y(i===p):y,children:v,ref:r})}),Xh=t=>Array.isArray(t)?t.flatMap(r=>Xh(r&&r.type===m.Fragment?r.props.children:r)):[t],_w=({children:t,location:r})=>{const s=Ko(),[i]=Wu(s);for(const u of Xh(t)){let d=0;if(m.isValidElement(u)&&(d=qh(s.parser,u.props.path,r||i,u.props.nest))[0])return m.cloneElement(u,{match:d})}return null},Io={v:[]},Mp=()=>Io.v.forEach(t=>t()),Ow=t=>(Io.v.push(t)===1&&addEventListener("hashchange",Mp),()=>{Io.v=Io.v.filter(r=>r!==t),Io.v.length||removeEventListener("hashchange",Mp)}),Aw=()=>"/"+location.hash.replace(/^#?\/?/,""),Mw=(t,{state:r=null,replace:s=!1}={})=>{const i=location.href,[u,d]=t.replace(/^#?\/?/,"").split("?"),p=new URL(location.href);p.hash=`/${u}`,d&&(p.search=d);const h=p.href;s?history.replaceState(r,"",h):history.pushState(r,"",h);const g=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:i,newURL:h}):new Event("hashchange",{detail:{oldURL:i,newURL:h}});dispatchEvent(g)},Zh=({ssrPath:t="/"}={})=>[Uh.useSyncExternalStore(Ow,Aw,()=>t),Mw];Zh.hrefs=t=>"#"+t;var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Iw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Lw=class{#e=Iw;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,r){return this.#e.setTimeout(t,r)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,r){return this.#e.setInterval(t,r)}clearInterval(t){this.#e.clearInterval(t)}},Jn=new Lw;function Dw(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function rt(){}function Fw(t,r){return typeof t=="function"?t(r):t}function xu(t){return typeof t=="number"&&t>=0&&t!==1/0}function Jh(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Mn(t,r){return typeof t=="function"?t(r):t}function Nt(t,r){return typeof t=="function"?t(r):t}function Ip(t,r){const{type:s="all",exact:i,fetchStatus:u,predicate:d,queryKey:p,stale:h}=t;if(p){if(i){if(r.queryHash!==Ku(p,r.options))return!1}else if(!Fo(r.queryKey,p))return!1}if(s!=="all"){const g=r.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||d&&!d(r))}function Lp(t,r){const{exact:s,status:i,predicate:u,mutationKey:d}=t;if(d){if(!r.options.mutationKey)return!1;if(s){if(tr(r.options.mutationKey)!==tr(d))return!1}else if(!Fo(r.options.mutationKey,d))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function Ku(t,r){return(r?.queryKeyHashFn||tr)(t)}function tr(t){return JSON.stringify(t,(r,s)=>yu(s)?Object.keys(s).sort().reduce((i,u)=>(i[u]=s[u],i),{}):s)}function Fo(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(s=>Fo(t[s],r[s])):!1}var $w=Object.prototype.hasOwnProperty;function em(t,r,s=0){if(t===r)return t;if(s>500)return r;const i=Dp(t)&&Dp(r);if(!i&&!(yu(t)&&yu(r)))return r;const d=(i?t:Object.keys(t)).length,p=i?r:Object.keys(r),h=p.length,g=i?new Array(h):{};let v=0;for(let y=0;y<h;y++){const w=i?y:p[y],b=t[w],C=r[w];if(b===C){g[w]=b,(i?y<d:$w.call(t,w))&&v++;continue}if(b===null||C===null||typeof b!="object"||typeof C!="object"){g[w]=C;continue}const k=em(b,C,s+1);g[w]=k,k===b&&v++}return d===h&&v===d?t:g}function Ci(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const s in t)if(t[s]!==r[s])return!1;return!0}function Dp(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function yu(t){if(!Fp(t))return!1;const r=t.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Fp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Fp(t){return Object.prototype.toString.call(t)==="[object Object]"}function zw(t){return new Promise(r=>{Jn.setTimeout(r,t)})}function wu(t,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,r):s.structuralSharing!==!1?em(t,r):r}function Uw(t,r,s=0){const i=[...t,r];return s&&i.length>s?i.slice(1):i}function Hw(t,r,s=0){const i=[r,...t];return s&&i.length>s?i.slice(0,-1):i}var Vu=Symbol();function tm(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===Vu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Qu(t,r){return typeof t=="function"?t(...r):!!t}function Bw(t,r,s){let i=!1,u;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(u??=r(),i||(i=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),t}var Ww=class extends zr{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Gu=new Ww;function bu(){let t,r;const s=new Promise((u,d)=>{t=u,r=d});s.status="pending",s.catch(()=>{});function i(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{i({status:"fulfilled",value:u}),t(u)},s.reject=u=>{i({status:"rejected",reason:u}),r(u)},s}var Kw=Dw;function Vw(){let t=[],r=0,s=h=>{h()},i=h=>{h()},u=Kw;const d=h=>{r?t.push(h):u(()=>{s(h)})},p=()=>{const h=t;t=[],h.length&&u(()=>{i(()=>{h.forEach(g=>{s(g)})})})};return{batch:h=>{let g;r++;try{g=h()}finally{r--,r||p()}return g},batchCalls:h=>(...g)=>{d(()=>{h(...g)})},schedule:d,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var Ue=Vw(),Qw=class extends zr{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!er&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},ki=new Qw;function Gw(t){return Math.min(1e3*2**t,3e4)}function nm(t){return(t??"online")==="online"?ki.isOnline():!0}var Su=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function rm(t){let r=!1,s=0,i;const u=bu(),d=()=>u.status!=="pending",p=S=>{if(!d()){const E=new Su(S);b(E),t.onCancel?.(E)}},h=()=>{r=!0},g=()=>{r=!1},v=()=>Gu.isFocused()&&(t.networkMode==="always"||ki.isOnline())&&t.canRun(),y=()=>nm(t.networkMode)&&t.canRun(),w=S=>{d()||(i?.(),u.resolve(S))},b=S=>{d()||(i?.(),u.reject(S))},C=()=>new Promise(S=>{i=E=>{(d()||v())&&S(E)},t.onPause?.()}).then(()=>{i=void 0,d()||t.onContinue?.()}),k=()=>{if(d())return;let S;const E=s===0?t.initialPromise:void 0;try{S=E??t.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(w).catch(P=>{if(d())return;const A=t.retry??(er?0:3),_=t.retryDelay??Gw,L=typeof _=="function"?_(s,P):_,D=A===!0||typeof A=="number"&&s<A||typeof A=="function"&&A(s,P);if(r||!D){b(P);return}s++,t.onFail?.(s,P),zw(L).then(()=>v()?void 0:C()).then(()=>{r?b(P):k()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:g,canStart:y,start:()=>(y()?k():C().then(k),u)}}var om=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xu(this.gcTime)&&(this.#e=Jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(er?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Jn.clearTimeout(this.#e),this.#e=void 0)}},qw=class extends om{#e;#t;#n;#o;#r;#i;#a;constructor(t){super(),this.#a=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#n=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=zp(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=zp(this.options);r.data!==void 0&&(this.setState($p(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const s=wu(this.state.data,t,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(t,r){this.#s({type:"setState",state:t,setStateOptions:r})}cancel(t){const r=this.#r?.promise;return this.#r?.cancel(t),r?r.then(rt).catch(rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jh(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},u=()=>{const h=tm(this.options,r),v=(()=>{const y={client:this.#o,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#a=!1,this.options.persister?this.options.persister(h,v,this):h(v)},p=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:u};return i(h),h})();this.options.behavior?.onFetch(p,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==p.fetchOptions?.meta)&&this.#s({type:"fetch",meta:p.fetchOptions?.meta}),this.#r=rm({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:h=>{h instanceof Su&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(h,g)=>{this.#s({type:"failed",failureCount:h,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Su){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const r=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...sm(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...$p(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const u=t.error;return{...s,error:u,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ue.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function sm(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nm(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function $p(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zp(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,s=r!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Yw=class extends zr{constructor(t,r){super(),this.options=r,this.#e=t,this.#s=null,this.#a=bu(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#m;#f;#p;#u;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Up(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cu(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cu(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#b(),this.#t.removeObserver(this)}setOptions(t){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(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),r._defaulted&&!Ci(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Hp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==s||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const u=this.#v();i&&(this.#t!==s||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||u!==this.#l)&&this.#x(u)}getOptimisticResult(t){const r=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(r,t);return Zw(this,s)&&(this.#o=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#o}trackResult(t,r){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(t){this.#S();let r=this.#t.fetch(this.options,t);return t?.throwOnError||(r=r.catch(rt)),r}#g(){this.#w();const t=Mn(this.options.staleTime,this.#t);if(er||this.#o.isStale||!xu(t))return;const s=Jh(this.#o.dataUpdatedAt,t)+1;this.#u=Jn.setTimeout(()=>{this.#o.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(t){this.#b(),this.#l=t,!(er||Nt(this.options.enabled,this.#t)===!1||!xu(this.#l)||this.#l===0)&&(this.#c=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||Gu.isFocused())&&this.#d()},this.#l))}#y(){this.#g(),this.#x(this.#v())}#w(){this.#u&&(Jn.clearTimeout(this.#u),this.#u=void 0)}#b(){this.#c&&(Jn.clearInterval(this.#c),this.#c=void 0)}createResult(t,r){const s=this.#t,i=this.options,u=this.#o,d=this.#r,p=this.#i,g=t!==s?t.state:this.#n,{state:v}=t;let y={...v},w=!1,b;if(r._optimisticResults){const U=this.hasListeners(),J=!U&&Up(t,r),ne=U&&Hp(t,s,r,i);(J||ne)&&(y={...y,...sm(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:S}=y;b=y.data;let E=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let U;u?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(U=u.data,E=!0):U=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,U!==void 0&&(S="success",b=wu(u?.data,U,r),w=!0)}if(r.select&&b!==void 0&&!E)if(u&&b===d?.data&&r.select===this.#m)b=this.#f;else try{this.#m=r.select,b=r.select(b),b=wu(u?.data,b,r),this.#f=b,this.#s=null}catch(U){this.#s=U}this.#s&&(C=this.#s,b=this.#f,k=Date.now(),S="error");const P=y.fetchStatus==="fetching",A=S==="pending",_=S==="error",L=A&&P,D=b!==void 0,z={status:S,fetchStatus:y.fetchStatus,isPending:A,isSuccess:S==="success",isError:_,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:P,isRefetching:P&&!A,isLoadingError:_&&!D,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:_&&D,isStale:qu(t,r),refetch:this.refetch,promise:this.#a,isEnabled:Nt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const U=z.data!==void 0,J=z.status==="error"&&!U,ne=ue=>{J?ue.reject(z.error):U&&ue.resolve(z.data)},te=()=>{const ue=this.#a=z.promise=bu();ne(ue)},Y=this.#a;switch(Y.status){case"pending":t.queryHash===s.queryHash&&ne(Y);break;case"fulfilled":(J||z.data!==Y.value)&&te();break;case"rejected":(!J||z.error!==Y.reason)&&te();break}}return z}updateResult(){const t=this.#o,r=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Ci(r,t))return;this.#o=r;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,u=typeof i=="function"?i():i;if(u==="all"||!u&&!this.#h.size)return!0;const d=new Set(u??this.#h);return this.options.throwOnError&&d.add("error"),Object.keys(this.#o).some(p=>{const h=p;return this.#o[h]!==t[h]&&d.has(h)})};this.#C({listeners:s()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const r=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Xw(t,r){return Nt(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Up(t,r){return Xw(t,r)||t.state.data!==void 0&&Cu(t,r,r.refetchOnMount)}function Cu(t,r,s){if(Nt(r.enabled,t)!==!1&&Mn(r.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&qu(t,r)}return!1}function Hp(t,r,s,i){return(t!==r||Nt(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&qu(t,s)}function qu(t,r){return Nt(r.enabled,t)!==!1&&t.isStaleByTime(Mn(r.staleTime,t))}function Zw(t,r){return!Ci(t.getCurrentResult(),r)}function Bp(t){return{onFetch:(r,s)=>{const i=r.options,u=r.fetchOptions?.meta?.fetchMore?.direction,d=r.state.data?.pages||[],p=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},g=0;const v=async()=>{let y=!1;const w=k=>{Bw(k,()=>r.signal,()=>y=!0)},b=tm(r.options,r.fetchOptions),C=async(k,S,E)=>{if(y)return Promise.reject();if(S==null&&k.pages.length)return Promise.resolve(k);const A=(()=>{const O={client:r.client,queryKey:r.queryKey,pageParam:S,direction:E?"backward":"forward",meta:r.options.meta};return w(O),O})(),_=await b(A),{maxPages:L}=r.options,D=E?Hw:Uw;return{pages:D(k.pages,_,L),pageParams:D(k.pageParams,S,L)}};if(u&&d.length){const k=u==="backward",S=k?Jw:Wp,E={pages:d,pageParams:p},P=S(i,E);h=await C(E,P,k)}else{const k=t??d.length;do{const S=g===0?p[0]??i.initialPageParam:Wp(i,h);if(g>0&&S==null)break;h=await C(h,S),g++}while(g<k)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(v,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=v}}}function Wp(t,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?t.getNextPageParam(r[i],r,s[i],s):void 0}function Jw(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var eb=class extends om{#e;#t;#n;#o;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||im(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(r=>r!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(t){const r=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=rm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,p)=>{this.#r({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",u=!this.#o.canStart();try{if(i)r();else{this.#r({type:"pending",variables:t,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);const p=await this.options.onMutate?.(t,s);p!==this.state.context&&this.#r({type:"pending",context:p,variables:t,isPaused:u})}const d=await this.#o.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#r({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(p){Promise.reject(p)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(p){Promise.reject(p)}throw this.#r({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#r(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ue.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function im(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,r,s){const i=new eb({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:s});return this.add(i),i}add(t){this.#e.add(t);const r=ui(t);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(t):this.#t.set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const r=ui(t);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#t.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ui(t);if(typeof r=="string"){const i=this.#t.get(r)?.find(u=>u.state.status==="pending");return!i||i===t}else return!0}runNext(t){const r=ui(t);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ue.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const r={exact:!0,...t};return this.getAll().find(s=>Lp(r,s))}findAll(t={}){return this.getAll().filter(r=>Lp(t,r))}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ue.batch(()=>Promise.all(t.map(r=>r.continue().catch(rt))))}};function ui(t){return t.options.scope?.id}var nb=class extends zr{#e;#t=void 0;#n;#o;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),Ci(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&tr(s.mutationKey)!==tr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#i(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(r,s){return this.#o=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??im();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#i(r){Ue.batch(()=>{if(this.#o&&this.hasListeners()){const s=this.#t.variables,i=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#o.onSuccess?.(r.data,s,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(r.data,null,s,i,u)}catch(d){Promise.reject(d)}}else if(r?.type==="error"){try{this.#o.onError?.(r.error,s,i,u)}catch(d){Promise.reject(d)}try{this.#o.onSettled?.(void 0,r.error,s,i,u)}catch(d){Promise.reject(d)}}}this.listeners.forEach(s=>{s(this.#t)})})}},rb=class extends zr{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,r,s){const i=r.queryKey,u=r.queryHash??Ku(i,r);let d=this.get(u);return d||(d=new qw({client:t,queryKey:i,queryHash:u,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(d)),d}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=this.#e.get(t.queryHash);r&&(t.destroy(),r===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const r={exact:!0,...t};return this.getAll().find(s=>Ip(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>Ip(t,s)):r}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ob=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new rb,this.#t=t.mutationCache||new tb,this.#n=t.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Gu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ki.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),s=this.#e.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(t,r,s){const i=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(i.queryHash)?.state.data,p=Fw(r,d);if(p!==void 0)return this.#e.build(this,i).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ue.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(t){const r=this.defaultQueryOptions({queryKey:t});return this.#e.get(r.queryHash)?.state}removeQueries(t){const r=this.#e;Ue.batch(()=>{r.findAll(t).forEach(s=>{r.remove(s)})})}resetQueries(t,r){const s=this.#e;return Ue.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const s={revert:!0,...r},i=Ue.batch(()=>this.#e.findAll(t).map(u=>u.cancel(s)));return Promise.all(i).then(rt).catch(rt)}invalidateQueries(t,r={}){return Ue.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},r)))}refetchQueries(t,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=Ue.batch(()=>this.#e.findAll(t).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,s);return s.throwOnError||(d=d.catch(rt)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(i).then(rt)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(Mn(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(rt).catch(rt)}fetchInfiniteQuery(t){return t.behavior=Bp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(rt).catch(rt)}ensureInfiniteQueryData(t){return t.behavior=Bp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ki.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,r){this.#o.set(tr(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...this.#o.values()],s={};return r.forEach(i=>{Fo(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,r){this.#r.set(tr(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...this.#r.values()],s={};return r.forEach(i=>{Fo(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const r={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Ku(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Vu&&(r.enabled=!1),r}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},am=m.createContext(void 0),lm=t=>{const r=m.useContext(am);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},sb=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(am.Provider,{value:t,children:r})),um=m.createContext(!1),ib=()=>m.useContext(um);um.Provider;function ab(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var lb=m.createContext(ab()),ub=()=>m.useContext(lb),cb=(t,r,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?Qu(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(r.isReset()||(t.retryOnMount=!1))},db=t=>{m.useEffect(()=>{t.clearReset()},[t])},fb=({result:t,errorResetBoundary:r,throwOnError:s,query:i,suspense:u})=>t.isError&&!r.isReset()&&!t.isFetching&&i&&(u&&t.data===void 0||Qu(s,[t.error,i])),pb=t=>{if(t.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...u)=>s(i(...u)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},hb=(t,r)=>t.isLoading&&t.isFetching&&!r,mb=(t,r)=>t?.suspense&&r.isPending,Kp=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function gb(t,r,s){const i=ib(),u=ub(),d=lm(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",pb(p),cb(p,u,h),db(u);const g=!d.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new r(d,p)),y=v.getOptimisticResult(p),w=!i&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const C=w?v.subscribe(Ue.batchCalls(b)):rt;return v.updateResult(),C},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p)},[p,v]),mb(p,y))throw Kp(p,v,u);if(fb({result:y,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw y.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(p,y),p.experimental_prefetchInRender&&!er&&hb(y,i)&&(g?Kp(p,v,u):h?.promise)?.catch(rt).finally(()=>{v.updateResult()}),p.notifyOnChangeProps?y:v.trackResult(y)}function ot(t,r){return gb(t,Yw)}function Je(t,r){const s=lm(),[i]=m.useState(()=>new nb(s,t));m.useEffect(()=>{i.setOptions(t)},[i,t]);const u=m.useSyncExternalStore(m.useCallback(p=>i.subscribe(Ue.batchCalls(p)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=m.useCallback((p,h)=>{i.mutate(p,h).catch(rt)},[i]);if(u.error&&Qu(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const Yu="__PORT_5000__".startsWith("__")?"":"__PORT_5000__";async function Xu(t){if(!t.ok){const r=await t.text()||t.statusText;throw new Error(`${t.status}: ${r}`)}}async function cm(t,r){const s=await fetch(`${Yu}${t}`,r);return await Xu(s),await s.json()}async function Ge(t,r,s){const i=await fetch(`${Yu}${r}`,{method:t,headers:s?{"Content-Type":"application/json"}:{},body:s?JSON.stringify(s):void 0});return await Xu(i),i}const vb=({on401:t})=>async({queryKey:r})=>{const s=await fetch(`${Yu}${r.join("/")}`);return await Xu(s),await s.json()},ye=new ob({defaultOptions:{queries:{queryFn:vb({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var xb=(t,r,s,i,u,d,p,h)=>{let g=document.documentElement,v=["light","dark"];function y(C){(Array.isArray(t)?t:[t]).forEach(k=>{let S=k==="class",E=S&&d?u.map(P=>d[P]||P):u;S?(g.classList.remove(...E),g.classList.add(d&&d[C]?d[C]:C)):g.setAttribute(k,C)}),w(C)}function w(C){h&&v.includes(C)&&(g.style.colorScheme=C)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)y(i);else try{let C=localStorage.getItem(r)||s,k=p&&C==="system"?b():C;y(k)}catch{}},Vp=["light","dark"],dm="(prefers-color-scheme: dark)",yb=typeof window>"u",fm=m.createContext(void 0),wb=t=>m.useContext(fm)?m.createElement(m.Fragment,null,t.children):m.createElement(Sb,{...t}),bb=["light","dark"],Sb=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:d=bb,defaultTheme:p=s?"system":"light",attribute:h="data-theme",value:g,children:v,nonce:y,scriptProps:w})=>{let[b,C]=m.useState(()=>kb(u,p)),[k,S]=m.useState(()=>b==="system"?ql():b),E=g?Object.values(g):d,P=m.useCallback(D=>{let O=D;if(!O)return;D==="system"&&s&&(O=ql());let z=g?g[O]:O,U=r?Eb(y):null,J=document.documentElement,ne=te=>{te==="class"?(J.classList.remove(...E),z&&J.classList.add(z)):te.startsWith("data-")&&(z?J.setAttribute(te,z):J.removeAttribute(te))};if(Array.isArray(h)?h.forEach(ne):ne(h),i){let te=Vp.includes(p)?p:null,Y=Vp.includes(O)?O:te;J.style.colorScheme=Y}U?.()},[y]),A=m.useCallback(D=>{let O=typeof D=="function"?D(b):D;C(O);try{localStorage.setItem(u,O)}catch{}},[b]),_=m.useCallback(D=>{let O=ql(D);S(O),b==="system"&&s&&!t&&P("system")},[b,t]);m.useEffect(()=>{let D=window.matchMedia(dm);return D.addListener(_),_(D),()=>D.removeListener(_)},[_]),m.useEffect(()=>{let D=O=>{O.key===u&&(O.newValue?C(O.newValue):A(p))};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[A]),m.useEffect(()=>{P(t??b)},[t,b]);let L=m.useMemo(()=>({theme:b,setTheme:A,forcedTheme:t,resolvedTheme:b==="system"?k:b,themes:s?[...d,"system"]:d,systemTheme:s?k:void 0}),[b,A,t,k,s,d]);return m.createElement(fm.Provider,{value:L},m.createElement(Cb,{forcedTheme:t,storageKey:u,attribute:h,enableSystem:s,enableColorScheme:i,defaultTheme:p,value:g,themes:d,nonce:y,scriptProps:w}),v)},Cb=m.memo(({forcedTheme:t,storageKey:r,attribute:s,enableSystem:i,enableColorScheme:u,defaultTheme:d,value:p,themes:h,nonce:g,scriptProps:v})=>{let y=JSON.stringify([s,r,d,t,h,p,i,u]).slice(1,-1);return m.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${xb.toString()})(${y})`}})}),kb=(t,r)=>{if(yb)return;let s;try{s=localStorage.getItem(t)||void 0}catch{}return s||r},Eb=t=>{let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},ql=t=>(t||(t=window.matchMedia(dm)),t.matches?"dark":"light");const Nb=1,jb=1e6;let Yl=0;function Rb(){return Yl=(Yl+1)%Number.MAX_SAFE_INTEGER,Yl.toString()}const Xl=new Map,Qp=t=>{if(Xl.has(t))return;const r=setTimeout(()=>{Xl.delete(t),Do({type:"REMOVE_TOAST",toastId:t})},jb);Xl.set(t,r)},Pb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,Nb)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(s=>s.id===r.toast.id?{...s,...r.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=r;return s?Qp(s):t.toasts.forEach(i=>{Qp(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==r.toastId)}}},xi=[];let yi={toasts:[]};function Do(t){yi=Pb(yi,t),xi.forEach(r=>{r(yi)})}function vt({...t}){const r=Rb(),s=u=>Do({type:"UPDATE_TOAST",toast:{...u,id:r}}),i=()=>Do({type:"DISMISS_TOAST",toastId:r});return Do({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:u=>{u||i()}}}),{id:r,dismiss:i,update:s}}function Tb(){const[t,r]=m.useState(yi);return m.useEffect(()=>(xi.push(r),()=>{const s=xi.indexOf(r);s>-1&&xi.splice(s,1)}),[t]),{...t,toast:vt,dismiss:s=>Do({type:"DISMISS_TOAST",toastId:s})}}var Oi=zh();const _b=$h(Oi);function fe(t,r,{checkForDefaultPrevented:s=!0}={}){return function(u){if(t?.(u),s===!1||!u.defaultPrevented)return r?.(u)}}function Gp(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Ur(...t){return r=>{let s=!1;const i=t.map(u=>{const d=Gp(u,r);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u<i.length;u++){const d=i[u];typeof d=="function"?d():Gp(t[u],null)}}}}function He(...t){return m.useCallback(Ur(...t),t)}function Dn(t,r=[]){let s=[];function i(d,p){const h=m.createContext(p),g=s.length;s=[...s,p];const v=w=>{const{scope:b,children:C,...k}=w,S=b?.[t]?.[g]||h,E=m.useMemo(()=>k,Object.values(k));return l.jsx(S.Provider,{value:E,children:C})};v.displayName=d+"Provider";function y(w,b){const C=b?.[t]?.[g]||h,k=m.useContext(C);if(k)return k;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[v,y]}const u=()=>{const d=s.map(p=>m.createContext(p));return function(h){const g=h?.[t]||d;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return u.scopeName=t,[i,Ob(u,...r)]}function Ob(...t){const r=t[0];if(t.length===1)return r;const s=()=>{const i=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=i.reduce((h,{useScope:g,scopeName:v})=>{const w=g(d)[`__scope${v}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}function qp(t){const r=Ab(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Ib);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function Ab(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=Db(u),h=Lb(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Mb=Symbol("radix.slottable");function Ib(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Mb}function Lb(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function Db(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}function Zu(t){const r=t+"CollectionProvider",[s,i]=Dn(r),[u,d]=s(r,{collectionRef:{current:null},itemMap:new Map}),p=S=>{const{scope:E,children:P}=S,A=On.useRef(null),_=On.useRef(new Map).current;return l.jsx(u,{scope:E,itemMap:_,collectionRef:A,children:P})};p.displayName=r;const h=t+"CollectionSlot",g=qp(h),v=On.forwardRef((S,E)=>{const{scope:P,children:A}=S,_=d(h,P),L=He(E,_.collectionRef);return l.jsx(g,{ref:L,children:A})});v.displayName=h;const y=t+"CollectionItemSlot",w="data-radix-collection-item",b=qp(y),C=On.forwardRef((S,E)=>{const{scope:P,children:A,..._}=S,L=On.useRef(null),D=He(E,L),O=d(y,P);return On.useEffect(()=>(O.itemMap.set(L,{ref:L,..._}),()=>{O.itemMap.delete(L)})),l.jsx(b,{[w]:"",ref:D,children:A})});C.displayName=y;function k(S){const E=d(t+"CollectionConsumer",S);return On.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${w}]`));return Array.from(E.itemMap.values()).sort((O,z)=>_.indexOf(O.ref.current)-_.indexOf(z.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:p,Slot:v,ItemSlot:C},k,i]}function Fb(t){const r=$b(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Ub);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function $b(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=Bb(u),h=Hb(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var zb=Symbol("radix.slottable");function Ub(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zb}function Hb(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function Bb(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var Wb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Wb.reduce((t,r)=>{const s=Fb(`Primitive.${r}`),i=m.forwardRef((u,d)=>{const{asChild:p,...h}=u,g=p?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(g,{...h,ref:d})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function Ju(t,r){t&&Oi.flushSync(()=>t.dispatchEvent(r))}function yt(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...s)=>r.current?.(...s),[])}function Kb(t,r=globalThis?.document){const s=yt(t);m.useEffect(()=>{const i=u=>{u.key==="Escape"&&s(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[s,r])}var Vb="DismissableLayer",ku="dismissableLayer.update",Qb="dismissableLayer.pointerDownOutside",Gb="dismissableLayer.focusOutside",Yp,pm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ai=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...g}=t,v=m.useContext(pm),[y,w]=m.useState(null),b=y?.ownerDocument??globalThis?.document,[,C]=m.useState({}),k=He(r,z=>w(z)),S=Array.from(v.layers),[E]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(E),A=y?S.indexOf(y):-1,_=v.layersWithOutsidePointerEventsDisabled.size>0,L=A>=P,D=Yb(z=>{const U=z.target,J=[...v.branches].some(ne=>ne.contains(U));!L||J||(u?.(z),p?.(z),z.defaultPrevented||h?.())},b),O=Xb(z=>{const U=z.target;[...v.branches].some(ne=>ne.contains(U))||(d?.(z),p?.(z),z.defaultPrevented||h?.())},b);return Kb(z=>{A===v.layers.size-1&&(i?.(z),!z.defaultPrevented&&h&&(z.preventDefault(),h()))},b),m.useEffect(()=>{if(y)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(y)),v.layers.add(y),Xp(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Yp)}},[y,b,s,v]),m.useEffect(()=>()=>{y&&(v.layers.delete(y),v.layersWithOutsidePointerEventsDisabled.delete(y),Xp())},[y,v]),m.useEffect(()=>{const z=()=>C({});return document.addEventListener(ku,z),()=>document.removeEventListener(ku,z)},[]),l.jsx(je.div,{...g,ref:k,style:{pointerEvents:_?L?"auto":"none":void 0,...t.style},onFocusCapture:fe(t.onFocusCapture,O.onFocusCapture),onBlurCapture:fe(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:fe(t.onPointerDownCapture,D.onPointerDownCapture)})});Ai.displayName=Vb;var qb="DismissableLayerBranch",hm=m.forwardRef((t,r)=>{const s=m.useContext(pm),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(je.div,{...t,ref:u})});hm.displayName=qb;function Yb(t,r=globalThis?.document){const s=yt(t),i=m.useRef(!1),u=m.useRef(()=>{});return m.useEffect(()=>{const d=h=>{if(h.target&&!i.current){let g=function(){mm(Qb,s,v,{discrete:!0})};const v={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=g,r.addEventListener("click",u.current,{once:!0})):g()}else r.removeEventListener("click",u.current);i.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",u.current)}},[r,s]),{onPointerDownCapture:()=>i.current=!0}}function Xb(t,r=globalThis?.document){const s=yt(t),i=m.useRef(!1);return m.useEffect(()=>{const u=d=>{d.target&&!i.current&&mm(Gb,s,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Xp(){const t=new CustomEvent(ku);document.dispatchEvent(t)}function mm(t,r,s,{discrete:i}){const u=s.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:s});r&&u.addEventListener(t,r,{once:!0}),i?Ju(u,d):u.dispatchEvent(d)}var Zb=Ai,Jb=hm,Gt=globalThis?.document?m.useLayoutEffect:()=>{},e0="Portal",ec=m.forwardRef((t,r)=>{const{container:s,...i}=t,[u,d]=m.useState(!1);Gt(()=>d(!0),[]);const p=s||u&&globalThis?.document?.body;return p?_b.createPortal(l.jsx(je.div,{...i,ref:r}),p):null});ec.displayName=e0;function t0(t,r){return m.useReducer((s,i)=>r[s][i]??s,t)}var Fn=t=>{const{present:r,children:s}=t,i=n0(r),u=typeof s=="function"?s({present:i.isPresent}):m.Children.only(s),d=He(i.ref,r0(u));return typeof s=="function"||i.isPresent?m.cloneElement(u,{ref:d}):null};Fn.displayName="Presence";function n0(t){const[r,s]=m.useState(),i=m.useRef(null),u=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,g]=t0(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const v=ci(i.current);d.current=h==="mounted"?v:"none"},[h]),Gt(()=>{const v=i.current,y=u.current;if(y!==t){const b=d.current,C=ci(v);t?g("MOUNT"):C==="none"||v?.display==="none"?g("UNMOUNT"):g(y&&b!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,g]),Gt(()=>{if(r){let v;const y=r.ownerDocument.defaultView??window,w=C=>{const S=ci(i.current).includes(CSS.escape(C.animationName));if(C.target===r&&S&&(g("ANIMATION_END"),!u.current)){const E=r.style.animationFillMode;r.style.animationFillMode="forwards",v=y.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=E)})}},b=C=>{C.target===r&&(d.current=ci(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",w),r.addEventListener("animationend",w),()=>{y.clearTimeout(v),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",w),r.removeEventListener("animationend",w)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(v=>{i.current=v?getComputedStyle(v):null,s(v)},[])}}function ci(t){return t?.animationName||"none"}function r0(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var o0=Uu[" useInsertionEffect ".trim().toString()]||Gt;function Vo({prop:t,defaultProp:r,onChange:s=()=>{},caller:i}){const[u,d,p]=s0({defaultProp:r,onChange:s}),h=t!==void 0,g=h?t:u;{const y=m.useRef(t!==void 0);m.useEffect(()=>{const w=y.current;w!==h&&console.warn(`${i} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,i])}const v=m.useCallback(y=>{if(h){const w=i0(y)?y(t):y;w!==t&&p.current?.(w)}else d(y)},[h,t,d,p]);return[g,v]}function s0({defaultProp:t,onChange:r}){const[s,i]=m.useState(t),u=m.useRef(s),d=m.useRef(r);return o0(()=>{d.current=r},[r]),m.useEffect(()=>{u.current!==s&&(d.current?.(s),u.current=s)},[s,u]),[s,i,d]}function i0(t){return typeof t=="function"}var a0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),l0="VisuallyHidden",Mi=m.forwardRef((t,r)=>l.jsx(je.span,{...t,ref:r,style:{...a0,...t.style}}));Mi.displayName=l0;var u0=Mi,tc="ToastProvider",[nc,c0,d0]=Zu("Toast"),[gm]=Dn("Toast",[d0]),[f0,Ii]=gm(tc),vm=t=>{const{__scopeToast:r,label:s="Notification",duration:i=5e3,swipeDirection:u="right",swipeThreshold:d=50,children:p}=t,[h,g]=m.useState(null),[v,y]=m.useState(0),w=m.useRef(!1),b=m.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${tc}\`. Expected non-empty \`string\`.`),l.jsx(nc.Provider,{scope:r,children:l.jsx(f0,{scope:r,label:s,duration:i,swipeDirection:u,swipeThreshold:d,toastCount:v,viewport:h,onViewportChange:g,onToastAdd:m.useCallback(()=>y(C=>C+1),[]),onToastRemove:m.useCallback(()=>y(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};vm.displayName=tc;var xm="ToastViewport",p0=["F8"],Eu="toast.viewportPause",Nu="toast.viewportResume",ym=m.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:i=p0,label:u="Notifications ({hotkey})",...d}=t,p=Ii(xm,s),h=c0(s),g=m.useRef(null),v=m.useRef(null),y=m.useRef(null),w=m.useRef(null),b=He(r,w,p.onViewportChange),C=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=p.toastCount>0;m.useEffect(()=>{const E=P=>{i.length!==0&&i.every(_=>P[_]||P.code===_)&&w.current?.focus()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[i]),m.useEffect(()=>{const E=g.current,P=w.current;if(k&&E&&P){const A=()=>{if(!p.isClosePausedRef.current){const O=new CustomEvent(Eu);P.dispatchEvent(O),p.isClosePausedRef.current=!0}},_=()=>{if(p.isClosePausedRef.current){const O=new CustomEvent(Nu);P.dispatchEvent(O),p.isClosePausedRef.current=!1}},L=O=>{!E.contains(O.relatedTarget)&&_()},D=()=>{E.contains(document.activeElement)||_()};return E.addEventListener("focusin",A),E.addEventListener("focusout",L),E.addEventListener("pointermove",A),E.addEventListener("pointerleave",D),window.addEventListener("blur",A),window.addEventListener("focus",_),()=>{E.removeEventListener("focusin",A),E.removeEventListener("focusout",L),E.removeEventListener("pointermove",A),E.removeEventListener("pointerleave",D),window.removeEventListener("blur",A),window.removeEventListener("focus",_)}}},[k,p.isClosePausedRef]);const S=m.useCallback(({tabbingDirection:E})=>{const A=h().map(_=>{const L=_.ref.current,D=[L,...N0(L)];return E==="forwards"?D:D.reverse()});return(E==="forwards"?A.reverse():A).flat()},[h]);return m.useEffect(()=>{const E=w.current;if(E){const P=A=>{const _=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!_){const D=document.activeElement,O=A.shiftKey;if(A.target===E&&O){v.current?.focus();return}const J=S({tabbingDirection:O?"backwards":"forwards"}),ne=J.findIndex(te=>te===D);Zl(J.slice(ne+1))?A.preventDefault():O?v.current?.focus():y.current?.focus()}};return E.addEventListener("keydown",P),()=>E.removeEventListener("keydown",P)}},[h,S]),l.jsxs(Jb,{ref:g,role:"region","aria-label":u.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&l.jsx(ju,{ref:v,onFocusFromOutsideViewport:()=>{const E=S({tabbingDirection:"forwards"});Zl(E)}}),l.jsx(nc.Slot,{scope:s,children:l.jsx(je.ol,{tabIndex:-1,...d,ref:b})}),k&&l.jsx(ju,{ref:y,onFocusFromOutsideViewport:()=>{const E=S({tabbingDirection:"backwards"});Zl(E)}})]})});ym.displayName=xm;var wm="ToastFocusProxy",ju=m.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...u}=t,d=Ii(wm,s);return l.jsx(Mi,{tabIndex:0,...u,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&i()}})});ju.displayName=wm;var Qo="Toast",h0="toast.swipeStart",m0="toast.swipeMove",g0="toast.swipeCancel",v0="toast.swipeEnd",bm=m.forwardRef((t,r)=>{const{forceMount:s,open:i,defaultOpen:u,onOpenChange:d,...p}=t,[h,g]=Vo({prop:i,defaultProp:u??!0,onChange:d,caller:Qo});return l.jsx(Fn,{present:s||h,children:l.jsx(w0,{open:h,...p,ref:r,onClose:()=>g(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:fe(t.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:fe(t.onSwipeMove,v=>{const{x:y,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:fe(t.onSwipeCancel,v=>{v.currentTarget.setAttribute("data-swipe","cancel"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:fe(t.onSwipeEnd,v=>{const{x:y,y:w}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","end"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),g(!1)})})})});bm.displayName=Qo;var[x0,y0]=gm(Qo,{onClose(){}}),w0=m.forwardRef((t,r)=>{const{__scopeToast:s,type:i="foreground",duration:u,open:d,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:v,onSwipeStart:y,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:C,...k}=t,S=Ii(Qo,s),[E,P]=m.useState(null),A=He(r,X=>P(X)),_=m.useRef(null),L=m.useRef(null),D=u||S.duration,O=m.useRef(0),z=m.useRef(D),U=m.useRef(0),{onToastAdd:J,onToastRemove:ne}=S,te=yt(()=>{E?.contains(document.activeElement)&&S.viewport?.focus(),p()}),Y=m.useCallback(X=>{!X||X===1/0||(window.clearTimeout(U.current),O.current=new Date().getTime(),U.current=window.setTimeout(te,X))},[te]);m.useEffect(()=>{const X=S.viewport;if(X){const me=()=>{Y(z.current),v?.()},ie=()=>{const le=new Date().getTime()-O.current;z.current=z.current-le,window.clearTimeout(U.current),g?.()};return X.addEventListener(Eu,ie),X.addEventListener(Nu,me),()=>{X.removeEventListener(Eu,ie),X.removeEventListener(Nu,me)}}},[S.viewport,D,g,v,Y]),m.useEffect(()=>{d&&!S.isClosePausedRef.current&&Y(D)},[d,D,S.isClosePausedRef,Y]),m.useEffect(()=>(J(),()=>ne()),[J,ne]);const ue=m.useMemo(()=>E?Rm(E):null,[E]);return S.viewport?l.jsxs(l.Fragment,{children:[ue&&l.jsx(b0,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:ue}),l.jsx(x0,{scope:s,onClose:te,children:Oi.createPortal(l.jsx(nc.ItemSlot,{scope:s,children:l.jsx(Zb,{asChild:!0,onEscapeKeyDown:fe(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||te(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(je.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":S.swipeDirection,...k,ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:fe(t.onKeyDown,X=>{X.key==="Escape"&&(h?.(X.nativeEvent),X.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,te()))}),onPointerDown:fe(t.onPointerDown,X=>{X.button===0&&(_.current={x:X.clientX,y:X.clientY})}),onPointerMove:fe(t.onPointerMove,X=>{if(!_.current)return;const me=X.clientX-_.current.x,ie=X.clientY-_.current.y,le=!!L.current,H=["left","right"].includes(S.swipeDirection),B=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,G=H?B(0,me):0,R=H?0:B(0,ie),W=X.pointerType==="touch"?10:2,$={x:G,y:R},oe={originalEvent:X,delta:$};le?(L.current=$,di(m0,w,oe,{discrete:!1})):Zp($,S.swipeDirection,W)?(L.current=$,di(h0,y,oe,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(me)>W||Math.abs(ie)>W)&&(_.current=null)}),onPointerUp:fe(t.onPointerUp,X=>{const me=L.current,ie=X.target;if(ie.hasPointerCapture(X.pointerId)&&ie.releasePointerCapture(X.pointerId),L.current=null,_.current=null,me){const le=X.currentTarget,H={originalEvent:X,delta:me};Zp(me,S.swipeDirection,S.swipeThreshold)?di(v0,C,H,{discrete:!0}):di(g0,b,H,{discrete:!0}),le.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),b0=t=>{const{__scopeToast:r,children:s,...i}=t,u=Ii(Qo,r),[d,p]=m.useState(!1),[h,g]=m.useState(!1);return k0(()=>p(!0)),m.useEffect(()=>{const v=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(v)},[]),h?null:l.jsx(ec,{asChild:!0,children:l.jsx(Mi,{...i,children:d&&l.jsxs(l.Fragment,{children:[u.label," ",s]})})})},S0="ToastTitle",Sm=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});Sm.displayName=S0;var C0="ToastDescription",Cm=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});Cm.displayName=C0;var km="ToastAction",Em=m.forwardRef((t,r)=>{const{altText:s,...i}=t;return s.trim()?l.jsx(jm,{altText:s,asChild:!0,children:l.jsx(rc,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${km}\`. Expected non-empty \`string\`.`),null)});Em.displayName=km;var Nm="ToastClose",rc=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t,u=y0(Nm,s);return l.jsx(jm,{asChild:!0,children:l.jsx(je.button,{type:"button",...i,ref:r,onClick:fe(t.onClick,u.onClose)})})});rc.displayName=Nm;var jm=m.forwardRef((t,r)=>{const{__scopeToast:s,altText:i,...u}=t;return l.jsx(je.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...u,ref:r})});function Rm(t){const r=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),E0(i)){const u=i.ariaHidden||i.hidden||i.style.display==="none",d=i.dataset.radixToastAnnounceExclude==="";if(!u)if(d){const p=i.dataset.radixToastAnnounceAlt;p&&r.push(p)}else r.push(...Rm(i))}}),r}function di(t,r,s,{discrete:i}){const u=s.originalEvent.currentTarget,d=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});r&&u.addEventListener(t,r,{once:!0}),i?Ju(u,d):u.dispatchEvent(d)}var Zp=(t,r,s=0)=>{const i=Math.abs(t.x),u=Math.abs(t.y),d=i>u;return r==="left"||r==="right"?d&&i>s:!d&&u>s};function k0(t=()=>{}){const r=yt(t);Gt(()=>{let s=0,i=0;return s=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(i)}},[r])}function E0(t){return t.nodeType===t.ELEMENT_NODE}function N0(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Zl(t){const r=document.activeElement;return t.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var j0=vm,Pm=ym,Tm=bm,_m=Sm,Om=Cm,Am=Em,Mm=rc;function Im(t){var r,s,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(r=0;r<u;r++)t[r]&&(s=Im(t[r]))&&(i&&(i+=" "),i+=s)}else for(s in t)t[s]&&(i&&(i+=" "),i+=s);return i}function Lm(){for(var t,r,s=0,i="",u=arguments.length;s<u;s++)(t=arguments[s])&&(r=Im(t))&&(i&&(i+=" "),i+=r);return i}const Jp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,eh=Lm,R0=(t,r)=>s=>{var i;if(r?.variants==null)return eh(t,s?.class,s?.className);const{variants:u,defaultVariants:d}=r,p=Object.keys(u).map(v=>{const y=s?.[v],w=d?.[v];if(y===null)return null;const b=Jp(y)||Jp(w);return u[v][b]}),h=s&&Object.entries(s).reduce((v,y)=>{let[w,b]=y;return b===void 0||(v[w]=b),v},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((v,y)=>{let{class:w,className:b,...C}=y;return Object.entries(C).every(k=>{let[S,E]=k;return Array.isArray(E)?E.includes({...d,...h}[S]):{...d,...h}[S]===E})?[...v,w,b]:v},[]);return eh(t,p,g,s?.class,s?.className)};const P0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dm=(...t)=>t.filter((r,s,i)=>!!r&&i.indexOf(r)===s).join(" ");var T0={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 _0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:u="",children:d,iconNode:p,...h},g)=>m.createElement("svg",{ref:g,...T0,width:r,height:r,stroke:t,strokeWidth:i?Number(s)*24/Number(r):s,className:Dm("lucide",u),...h},[...p.map(([v,y])=>m.createElement(v,y)),...Array.isArray(d)?d:[d]]));const Hr=(t,r)=>{const s=m.forwardRef(({className:i,...u},d)=>m.createElement(_0,{ref:d,iconNode:r,className:Dm(`lucide-${P0(t)}`,i),...u}));return s.displayName=`${t}`,s};const O0=Hr("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const A0=Hr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const M0=Hr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const I0=Hr("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const L0=Hr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const D0=Hr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),oc="-",F0=t=>{const r=z0(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:p=>{const h=p.split(oc);return h[0]===""&&h.length!==1&&h.shift(),Fm(h,r)||$0(p)},getConflictingClassGroupIds:(p,h)=>{const g=s[p]||[];return h&&i[p]?[...g,...i[p]]:g}}},Fm=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],i=r.nextPart.get(s),u=i?Fm(t.slice(1),i):void 0;if(u)return u;if(r.validators.length===0)return;const d=t.join(oc);return r.validators.find(({validator:p})=>p(d))?.classGroupId},th=/^\[(.+)\]$/,$0=t=>{if(th.test(t)){const r=th.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},z0=t=>{const{theme:r,prefix:s}=t,i={nextPart:new Map,validators:[]};return H0(Object.entries(t.classGroups),s).forEach(([d,p])=>{Ru(p,i,d,r)}),i},Ru=(t,r,s,i)=>{t.forEach(u=>{if(typeof u=="string"){const d=u===""?r:nh(r,u);d.classGroupId=s;return}if(typeof u=="function"){if(U0(u)){Ru(u(i),r,s,i);return}r.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([d,p])=>{Ru(p,nh(r,d),s,i)})})},nh=(t,r)=>{let s=t;return r.split(oc).forEach(i=>{s.nextPart.has(i)||s.nextPart.set(i,{nextPart:new Map,validators:[]}),s=s.nextPart.get(i)}),s},U0=t=>t.isThemeGetter,H0=(t,r)=>r?t.map(([s,i])=>{const u=i.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[s,u]}):t,B0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,i=new Map;const u=(d,p)=>{s.set(d,p),r++,r>t&&(r=0,i=s,s=new Map)};return{get(d){let p=s.get(d);if(p!==void 0)return p;if((p=i.get(d))!==void 0)return u(d,p),p},set(d,p){s.has(d)?s.set(d,p):u(d,p)}}},$m="!",W0=t=>{const{separator:r,experimentalParseClassName:s}=t,i=r.length===1,u=r[0],d=r.length,p=h=>{const g=[];let v=0,y=0,w;for(let E=0;E<h.length;E++){let P=h[E];if(v===0){if(P===u&&(i||h.slice(E,E+d)===r)){g.push(h.slice(y,E)),y=E+d;continue}if(P==="/"){w=E;continue}}P==="["?v++:P==="]"&&v--}const b=g.length===0?h:h.substring(y),C=b.startsWith($m),k=C?b.substring(1):b,S=w&&w>y?w-y:void 0;return{modifiers:g,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:S}};return s?h=>s({className:h,parseClassName:p}):p},K0=t=>{if(t.length<=1)return t;const r=[];let s=[];return t.forEach(i=>{i[0]==="["?(r.push(...s.sort(),i),s=[]):s.push(i)}),r.push(...s.sort()),r},V0=t=>({cache:B0(t.cacheSize),parseClassName:W0(t),...F0(t)}),Q0=/\s+/,G0=(t,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=t.trim().split(Q0);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{modifiers:y,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:C}=s(v);let k=!!C,S=i(k?b.substring(0,C):b);if(!S){if(!k){h=v+(h.length>0?" "+h:h);continue}if(S=i(b),!S){h=v+(h.length>0?" "+h:h);continue}k=!1}const E=K0(y).join(":"),P=w?E+$m:E,A=P+S;if(d.includes(A))continue;d.push(A);const _=u(S,k);for(let L=0;L<_.length;++L){const D=_[L];d.push(P+D)}h=v+(h.length>0?" "+h:h)}return h};function q0(){let t=0,r,s,i="";for(;t<arguments.length;)(r=arguments[t++])&&(s=zm(r))&&(i&&(i+=" "),i+=s);return i}const zm=t=>{if(typeof t=="string")return t;let r,s="";for(let i=0;i<t.length;i++)t[i]&&(r=zm(t[i]))&&(s&&(s+=" "),s+=r);return s};function Y0(t,...r){let s,i,u,d=p;function p(g){const v=r.reduce((y,w)=>w(y),t());return s=V0(v),i=s.cache.get,u=s.cache.set,d=h,h(g)}function h(g){const v=i(g);if(v)return v;const y=G0(g,s);return u(g,y),y}return function(){return d(q0.apply(null,arguments))}}const Te=t=>{const r=s=>s[t]||[];return r.isThemeGetter=!0,r},Um=/^\[(?:([a-z-]+):)?(.+)\]$/i,X0=/^\d+\/\d+$/,Z0=new Set(["px","full","screen"]),J0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e1=/\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$/,t1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,n1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=t=>Ir(t)||Z0.has(t)||X0.test(t),Pn=t=>Br(t,"length",d1),Ir=t=>!!t&&!Number.isNaN(Number(t)),Jl=t=>Br(t,"number",Ir),Ao=t=>!!t&&Number.isInteger(Number(t)),o1=t=>t.endsWith("%")&&Ir(t.slice(0,-1)),ve=t=>Um.test(t),Tn=t=>J0.test(t),s1=new Set(["length","size","percentage"]),i1=t=>Br(t,s1,Hm),a1=t=>Br(t,"position",Hm),l1=new Set(["image","url"]),u1=t=>Br(t,l1,p1),c1=t=>Br(t,"",f1),Mo=()=>!0,Br=(t,r,s)=>{const i=Um.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):s(i[2]):!1},d1=t=>e1.test(t)&&!t1.test(t),Hm=()=>!1,f1=t=>n1.test(t),p1=t=>r1.test(t),h1=()=>{const t=Te("colors"),r=Te("spacing"),s=Te("blur"),i=Te("brightness"),u=Te("borderColor"),d=Te("borderRadius"),p=Te("borderSpacing"),h=Te("borderWidth"),g=Te("contrast"),v=Te("grayscale"),y=Te("hueRotate"),w=Te("invert"),b=Te("gap"),C=Te("gradientColorStops"),k=Te("gradientColorStopPositions"),S=Te("inset"),E=Te("margin"),P=Te("opacity"),A=Te("padding"),_=Te("saturate"),L=Te("scale"),D=Te("sepia"),O=Te("skew"),z=Te("space"),U=Te("translate"),J=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],te=()=>["auto",ve,r],Y=()=>[ve,r],ue=()=>["",sn,Pn],X=()=>["auto",Ir,ve],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",ve],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[Ir,ve];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[sn,Pn],blur:["none","",Tn,ve],brightness:R(),borderColor:[t],borderRadius:["none","","full",Tn,ve],borderSpacing:Y(),borderWidth:ue(),contrast:R(),grayscale:B(),hueRotate:R(),invert:B(),gap:Y(),gradientColorStops:[t],gradientColorStopPositions:[o1,Pn],inset:te(),margin:te(),opacity:R(),padding:Y(),saturate:R(),scale:R(),sepia:B(),skew:R(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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"],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:[...me(),ve]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ao,ve]}],basis:[{basis:te()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Ao,ve]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,ve]},ve]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,ve]},ve]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,r]}],"min-w":[{"min-w":[ve,r,"min","max","fit"]}],"max-w":[{"max-w":[ve,r,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ve,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jl]}],"font-family":[{font:[Mo]}],"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:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",Ir,Jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,Pn]}],"underline-offset":[{"underline-offset":["auto",sn,ve]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),a1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",i1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},u1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:ie()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[sn,ve]}],"outline-w":[{outline:[sn,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[sn,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Tn,c1]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ve]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[_]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ao,ve]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",ve]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",ve]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[sn,Pn,Jl]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},m1=Y0(h1);function De(...t){return m1(Lm(t))}const g1=j0,Bm=m.forwardRef(({className:t,...r},s)=>l.jsx(Pm,{ref:s,className:De("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));Bm.displayName=Pm.displayName;const v1=R0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-transform data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Wm=m.forwardRef(({className:t,variant:r,...s},i)=>l.jsx(Tm,{ref:i,className:De(v1({variant:r}),t),...s}));Wm.displayName=Tm.displayName;const x1=m.forwardRef(({className:t,...r},s)=>l.jsx(Am,{ref:s,className:De("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...r}));x1.displayName=Am.displayName;const Km=m.forwardRef(({className:t,...r},s)=>l.jsx(Mm,{ref:s,className:De("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...r,children:l.jsx(D0,{className:"h-4 w-4"})}));Km.displayName=Mm.displayName;const Vm=m.forwardRef(({className:t,...r},s)=>l.jsx(_m,{ref:s,className:De("text-sm font-semibold",t),...r}));Vm.displayName=_m.displayName;const Qm=m.forwardRef(({className:t,...r},s)=>l.jsx(Om,{ref:s,className:De("text-sm opacity-90",t),...r}));Qm.displayName=Om.displayName;function y1(){const{toasts:t}=Tb();return l.jsxs(g1,{children:[t.map(function({id:r,title:s,description:i,action:u,...d}){return l.jsxs(Wm,{...d,children:[l.jsxs("div",{className:"grid gap-1",children:[s&&l.jsx(Vm,{children:s}),i&&l.jsx(Qm,{children:i})]}),u,l.jsx(Km,{})]},r)}),l.jsx(Bm,{})]})}var w1=Uu[" useId ".trim().toString()]||(()=>{}),b1=0;function $o(t){const[r,s]=m.useState(w1());return Gt(()=>{s(i=>i??String(b1++))},[t]),r?`radix-${r}`:""}const S1=["top","right","bottom","left"],In=Math.min,gt=Math.max,Ei=Math.round,fi=Math.floor,Qt=t=>({x:t,y:t}),C1={left:"right",right:"left",bottom:"top",top:"bottom"};function Pu(t,r,s){return gt(t,In(r,s))}function an(t,r){return typeof t=="function"?t(r):t}function ln(t){return t.split("-")[0]}function Wr(t){return t.split("-")[1]}function sc(t){return t==="x"?"y":"x"}function ic(t){return t==="y"?"height":"width"}function Vt(t){const r=t[0];return r==="t"||r==="b"?"y":"x"}function ac(t){return sc(Vt(t))}function k1(t,r,s){s===void 0&&(s=!1);const i=Wr(t),u=ac(t),d=ic(u);let p=u==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(p=Ni(p)),[p,Ni(p)]}function E1(t){const r=Ni(t);return[Tu(t),r,Tu(r)]}function Tu(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const rh=["left","right"],oh=["right","left"],N1=["top","bottom"],j1=["bottom","top"];function R1(t,r,s){switch(t){case"top":case"bottom":return s?r?oh:rh:r?rh:oh;case"left":case"right":return r?N1:j1;default:return[]}}function P1(t,r,s,i){const u=Wr(t);let d=R1(ln(t),s==="start",i);return u&&(d=d.map(p=>p+"-"+u),r&&(d=d.concat(d.map(Tu)))),d}function Ni(t){const r=ln(t);return C1[r]+t.slice(r.length)}function T1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Gm(t){return typeof t!="number"?T1(t):{top:t,right:t,bottom:t,left:t}}function ji(t){const{x:r,y:s,width:i,height:u}=t;return{width:i,height:u,top:s,left:r,right:r+i,bottom:s+u,x:r,y:s}}function sh(t,r,s){let{reference:i,floating:u}=t;const d=Vt(r),p=ac(r),h=ic(p),g=ln(r),v=d==="y",y=i.x+i.width/2-u.width/2,w=i.y+i.height/2-u.height/2,b=i[h]/2-u[h]/2;let C;switch(g){case"top":C={x:y,y:i.y-u.height};break;case"bottom":C={x:y,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:w};break;case"left":C={x:i.x-u.width,y:w};break;default:C={x:i.x,y:i.y}}switch(Wr(r)){case"start":C[p]-=b*(s&&v?-1:1);break;case"end":C[p]+=b*(s&&v?-1:1);break}return C}async function _1(t,r){var s;r===void 0&&(r={});const{x:i,y:u,platform:d,rects:p,elements:h,strategy:g}=t,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:w="floating",altBoundary:b=!1,padding:C=0}=an(r,t),k=Gm(C),E=h[b?w==="floating"?"reference":"floating":w],P=ji(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(E)))==null||s?E:E.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:v,rootBoundary:y,strategy:g})),A=w==="floating"?{x:i,y:u,width:p.floating.width,height:p.floating.height}:p.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h.floating)),L=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},D=ji(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:A,offsetParent:_,strategy:g}):A);return{top:(P.top-D.top+k.top)/L.y,bottom:(D.bottom-P.bottom+k.bottom)/L.y,left:(P.left-D.left+k.left)/L.x,right:(D.right-P.right+k.right)/L.x}}const O1=50,A1=async(t,r,s)=>{const{placement:i="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:_1},g=await(p.isRTL==null?void 0:p.isRTL(r));let v=await p.getElementRects({reference:t,floating:r,strategy:u}),{x:y,y:w}=sh(v,i,g),b=i,C=0;const k={};for(let S=0;S<d.length;S++){const E=d[S];if(!E)continue;const{name:P,fn:A}=E,{x:_,y:L,data:D,reset:O}=await A({x:y,y:w,initialPlacement:i,placement:b,strategy:u,middlewareData:k,rects:v,platform:h,elements:{reference:t,floating:r}});y=_??y,w=L??w,k[P]={...k[P],...D},O&&C<O1&&(C++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(v=O.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:u}):O.rects),{x:y,y:w}=sh(v,b,g)),S=-1)}return{x:y,y:w,placement:b,strategy:u,middlewareData:k}},M1=t=>({name:"arrow",options:t,async fn(r){const{x:s,y:i,placement:u,rects:d,platform:p,elements:h,middlewareData:g}=r,{element:v,padding:y=0}=an(t,r)||{};if(v==null)return{};const w=Gm(y),b={x:s,y:i},C=ac(u),k=ic(C),S=await p.getDimensions(v),E=C==="y",P=E?"top":"left",A=E?"bottom":"right",_=E?"clientHeight":"clientWidth",L=d.reference[k]+d.reference[C]-b[C]-d.floating[k],D=b[C]-d.reference[C],O=await(p.getOffsetParent==null?void 0:p.getOffsetParent(v));let z=O?O[_]:0;(!z||!await(p.isElement==null?void 0:p.isElement(O)))&&(z=h.floating[_]||d.floating[k]);const U=L/2-D/2,J=z/2-S[k]/2-1,ne=In(w[P],J),te=In(w[A],J),Y=ne,ue=z-S[k]-te,X=z/2-S[k]/2+U,me=Pu(Y,X,ue),ie=!g.arrow&&Wr(u)!=null&&X!==me&&d.reference[k]/2-(X<Y?ne:te)-S[k]/2<0,le=ie?X<Y?X-Y:X-ue:0;return{[C]:b[C]+le,data:{[C]:me,centerOffset:X-me-le,...ie&&{alignmentOffset:le}},reset:ie}}}),I1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,i;const{placement:u,middlewareData:d,rects:p,initialPlacement:h,platform:g,elements:v}=r,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...E}=an(t,r);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const P=ln(u),A=Vt(h),_=ln(h)===h,L=await(g.isRTL==null?void 0:g.isRTL(v.floating)),D=b||(_||!S?[Ni(h)]:E1(h)),O=k!=="none";!b&&O&&D.push(...P1(h,S,k,L));const z=[h,...D],U=await g.detectOverflow(r,E),J=[];let ne=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&J.push(U[P]),w){const X=k1(u,p,L);J.push(U[X[0]],U[X[1]])}if(ne=[...ne,{placement:u,overflows:J}],!J.every(X=>X<=0)){var te,Y;const X=(((te=d.flip)==null?void 0:te.index)||0)+1,me=z[X];if(me&&(!(w==="alignment"?A!==Vt(me):!1)||ne.every(H=>Vt(H.placement)===A?H.overflows[0]>0:!0)))return{data:{index:X,overflows:ne},reset:{placement:me}};let ie=(Y=ne.filter(le=>le.overflows[0]<=0).sort((le,H)=>le.overflows[1]-H.overflows[1])[0])==null?void 0:Y.placement;if(!ie)switch(C){case"bestFit":{var ue;const le=(ue=ne.filter(H=>{if(O){const B=Vt(H.placement);return B===A||B==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(B=>B>0).reduce((B,G)=>B+G,0)]).sort((H,B)=>H[1]-B[1])[0])==null?void 0:ue[0];le&&(ie=le);break}case"initialPlacement":ie=h;break}if(u!==ie)return{reset:{placement:ie}}}return{}}}};function ih(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function ah(t){return S1.some(r=>t[r]>=0)}const L1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:s,platform:i}=r,{strategy:u="referenceHidden",...d}=an(t,r);switch(u){case"referenceHidden":{const p=await i.detectOverflow(r,{...d,elementContext:"reference"}),h=ih(p,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:ah(h)}}}case"escaped":{const p=await i.detectOverflow(r,{...d,altBoundary:!0}),h=ih(p,s.floating);return{data:{escapedOffsets:h,escaped:ah(h)}}}default:return{}}}}},qm=new Set(["left","top"]);async function D1(t,r){const{placement:s,platform:i,elements:u}=t,d=await(i.isRTL==null?void 0:i.isRTL(u.floating)),p=ln(s),h=Wr(s),g=Vt(s)==="y",v=qm.has(p)?-1:1,y=d&&g?-1:1,w=an(r,t);let{mainAxis:b,crossAxis:C,alignmentAxis:k}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof k=="number"&&(C=h==="end"?k*-1:k),g?{x:C*y,y:b*v}:{x:b*v,y:C*y}}const F1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,i;const{x:u,y:d,placement:p,middlewareData:h}=r,g=await D1(r,t);return p===((s=h.offset)==null?void 0:s.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:u+g.x,y:d+g.y,data:{...g,placement:p}}}}},$1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:s,y:i,placement:u,platform:d}=r,{mainAxis:p=!0,crossAxis:h=!1,limiter:g={fn:P=>{let{x:A,y:_}=P;return{x:A,y:_}}},...v}=an(t,r),y={x:s,y:i},w=await d.detectOverflow(r,v),b=Vt(ln(u)),C=sc(b);let k=y[C],S=y[b];if(p){const P=C==="y"?"top":"left",A=C==="y"?"bottom":"right",_=k+w[P],L=k-w[A];k=Pu(_,k,L)}if(h){const P=b==="y"?"top":"left",A=b==="y"?"bottom":"right",_=S+w[P],L=S-w[A];S=Pu(_,S,L)}const E=g.fn({...r,[C]:k,[b]:S});return{...E,data:{x:E.x-s,y:E.y-i,enabled:{[C]:p,[b]:h}}}}}},z1=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:s,y:i,placement:u,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:g=!0,crossAxis:v=!0}=an(t,r),y={x:s,y:i},w=Vt(u),b=sc(w);let C=y[b],k=y[w];const S=an(h,r),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(g){const _=b==="y"?"height":"width",L=d.reference[b]-d.floating[_]+E.mainAxis,D=d.reference[b]+d.reference[_]-E.mainAxis;C<L?C=L:C>D&&(C=D)}if(v){var P,A;const _=b==="y"?"width":"height",L=qm.has(ln(u)),D=d.reference[w]-d.floating[_]+(L&&((P=p.offset)==null?void 0:P[w])||0)+(L?0:E.crossAxis),O=d.reference[w]+d.reference[_]+(L?0:((A=p.offset)==null?void 0:A[w])||0)-(L?E.crossAxis:0);k<D?k=D:k>O&&(k=O)}return{[b]:C,[w]:k}}}},U1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,i;const{placement:u,rects:d,platform:p,elements:h}=r,{apply:g=()=>{},...v}=an(t,r),y=await p.detectOverflow(r,v),w=ln(u),b=Wr(u),C=Vt(u)==="y",{width:k,height:S}=d.floating;let E,P;w==="top"||w==="bottom"?(E=w,P=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(P=w,E=b==="end"?"top":"bottom");const A=S-y.top-y.bottom,_=k-y.left-y.right,L=In(S-y[E],A),D=In(k-y[P],_),O=!r.middlewareData.shift;let z=L,U=D;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(U=_),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(z=A),O&&!b){const ne=gt(y.left,0),te=gt(y.right,0),Y=gt(y.top,0),ue=gt(y.bottom,0);C?U=k-2*(ne!==0||te!==0?ne+te:gt(y.left,y.right)):z=S-2*(Y!==0||ue!==0?Y+ue:gt(y.top,y.bottom))}await g({...r,availableWidth:U,availableHeight:z});const J=await p.getDimensions(h.floating);return k!==J.width||S!==J.height?{reset:{rects:!0}}:{}}}};function Li(){return typeof window<"u"}function Kr(t){return Ym(t)?(t.nodeName||"").toLowerCase():"#document"}function xt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function qt(t){var r;return(r=(Ym(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Ym(t){return Li()?t instanceof Node||t instanceof xt(t).Node:!1}function Dt(t){return Li()?t instanceof Element||t instanceof xt(t).Element:!1}function un(t){return Li()?t instanceof HTMLElement||t instanceof xt(t).HTMLElement:!1}function lh(t){return!Li()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xt(t).ShadowRoot}function Go(t){const{overflow:r,overflowX:s,overflowY:i,display:u}=Ft(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+s)&&u!=="inline"&&u!=="contents"}function H1(t){return/^(table|td|th)$/.test(Kr(t))}function Di(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const B1=/transform|translate|scale|rotate|perspective|filter/,W1=/paint|layout|strict|content/,Zn=t=>!!t&&t!=="none";let eu;function lc(t){const r=Dt(t)?Ft(t):t;return Zn(r.transform)||Zn(r.translate)||Zn(r.scale)||Zn(r.rotate)||Zn(r.perspective)||!uc()&&(Zn(r.backdropFilter)||Zn(r.filter))||B1.test(r.willChange||"")||W1.test(r.contain||"")}function K1(t){let r=Ln(t);for(;un(r)&&!Fr(r);){if(lc(r))return r;if(Di(r))return null;r=Ln(r)}return null}function uc(){return eu==null&&(eu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),eu}function Fr(t){return/^(html|body|#document)$/.test(Kr(t))}function Ft(t){return xt(t).getComputedStyle(t)}function Fi(t){return Dt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Kr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||lh(t)&&t.host||qt(t);return lh(r)?r.host:r}function Xm(t){const r=Ln(t);return Fr(r)?t.ownerDocument?t.ownerDocument.body:t.body:un(r)&&Go(r)?r:Xm(r)}function zo(t,r,s){var i;r===void 0&&(r=[]),s===void 0&&(s=!0);const u=Xm(t),d=u===((i=t.ownerDocument)==null?void 0:i.body),p=xt(u);if(d){const h=_u(p);return r.concat(p,p.visualViewport||[],Go(u)?u:[],h&&s?zo(h):[])}else return r.concat(u,zo(u,[],s))}function _u(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zm(t){const r=Ft(t);let s=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const u=un(t),d=u?t.offsetWidth:s,p=u?t.offsetHeight:i,h=Ei(s)!==d||Ei(i)!==p;return h&&(s=d,i=p),{width:s,height:i,$:h}}function cc(t){return Dt(t)?t:t.contextElement}function Lr(t){const r=cc(t);if(!un(r))return Qt(1);const s=r.getBoundingClientRect(),{width:i,height:u,$:d}=Zm(r);let p=(d?Ei(s.width):s.width)/i,h=(d?Ei(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!h||!Number.isFinite(h))&&(h=1),{x:p,y:h}}const V1=Qt(0);function Jm(t){const r=xt(t);return!uc()||!r.visualViewport?V1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Q1(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==xt(t)?!1:r}function nr(t,r,s,i){r===void 0&&(r=!1),s===void 0&&(s=!1);const u=t.getBoundingClientRect(),d=cc(t);let p=Qt(1);r&&(i?Dt(i)&&(p=Lr(i)):p=Lr(t));const h=Q1(d,s,i)?Jm(d):Qt(0);let g=(u.left+h.x)/p.x,v=(u.top+h.y)/p.y,y=u.width/p.x,w=u.height/p.y;if(d){const b=xt(d),C=i&&Dt(i)?xt(i):i;let k=b,S=_u(k);for(;S&&i&&C!==k;){const E=Lr(S),P=S.getBoundingClientRect(),A=Ft(S),_=P.left+(S.clientLeft+parseFloat(A.paddingLeft))*E.x,L=P.top+(S.clientTop+parseFloat(A.paddingTop))*E.y;g*=E.x,v*=E.y,y*=E.x,w*=E.y,g+=_,v+=L,k=xt(S),S=_u(k)}}return ji({width:y,height:w,x:g,y:v})}function $i(t,r){const s=Fi(t).scrollLeft;return r?r.left+s:nr(qt(t)).left+s}function eg(t,r){const s=t.getBoundingClientRect(),i=s.left+r.scrollLeft-$i(t,s),u=s.top+r.scrollTop;return{x:i,y:u}}function G1(t){let{elements:r,rect:s,offsetParent:i,strategy:u}=t;const d=u==="fixed",p=qt(i),h=r?Di(r.floating):!1;if(i===p||h&&d)return s;let g={scrollLeft:0,scrollTop:0},v=Qt(1);const y=Qt(0),w=un(i);if((w||!w&&!d)&&((Kr(i)!=="body"||Go(p))&&(g=Fi(i)),w)){const C=nr(i);v=Lr(i),y.x=C.x+i.clientLeft,y.y=C.y+i.clientTop}const b=p&&!w&&!d?eg(p,g):Qt(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-g.scrollLeft*v.x+y.x+b.x,y:s.y*v.y-g.scrollTop*v.y+y.y+b.y}}function q1(t){return Array.from(t.getClientRects())}function Y1(t){const r=qt(t),s=Fi(t),i=t.ownerDocument.body,u=gt(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),d=gt(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let p=-s.scrollLeft+$i(t);const h=-s.scrollTop;return Ft(i).direction==="rtl"&&(p+=gt(r.clientWidth,i.clientWidth)-u),{width:u,height:d,x:p,y:h}}const uh=25;function X1(t,r){const s=xt(t),i=qt(t),u=s.visualViewport;let d=i.clientWidth,p=i.clientHeight,h=0,g=0;if(u){d=u.width,p=u.height;const y=uc();(!y||y&&r==="fixed")&&(h=u.offsetLeft,g=u.offsetTop)}const v=$i(i);if(v<=0){const y=i.ownerDocument,w=y.body,b=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,k=Math.abs(i.clientWidth-w.clientWidth-C);k<=uh&&(d-=k)}else v<=uh&&(d+=v);return{width:d,height:p,x:h,y:g}}function Z1(t,r){const s=nr(t,!0,r==="fixed"),i=s.top+t.clientTop,u=s.left+t.clientLeft,d=un(t)?Lr(t):Qt(1),p=t.clientWidth*d.x,h=t.clientHeight*d.y,g=u*d.x,v=i*d.y;return{width:p,height:h,x:g,y:v}}function ch(t,r,s){let i;if(r==="viewport")i=X1(t,s);else if(r==="document")i=Y1(qt(t));else if(Dt(r))i=Z1(r,s);else{const u=Jm(t);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return ji(i)}function tg(t,r){const s=Ln(t);return s===r||!Dt(s)||Fr(s)?!1:Ft(s).position==="fixed"||tg(s,r)}function J1(t,r){const s=r.get(t);if(s)return s;let i=zo(t,[],!1).filter(h=>Dt(h)&&Kr(h)!=="body"),u=null;const d=Ft(t).position==="fixed";let p=d?Ln(t):t;for(;Dt(p)&&!Fr(p);){const h=Ft(p),g=lc(p);!g&&h.position==="fixed"&&(u=null),(d?!g&&!u:!g&&h.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||Go(p)&&!g&&tg(t,p))?i=i.filter(y=>y!==p):u=h,p=Ln(p)}return r.set(t,i),i}function eS(t){let{element:r,boundary:s,rootBoundary:i,strategy:u}=t;const p=[...s==="clippingAncestors"?Di(r)?[]:J1(r,this._c):[].concat(s),i],h=ch(r,p[0],u);let g=h.top,v=h.right,y=h.bottom,w=h.left;for(let b=1;b<p.length;b++){const C=ch(r,p[b],u);g=gt(C.top,g),v=In(C.right,v),y=In(C.bottom,y),w=gt(C.left,w)}return{width:v-w,height:y-g,x:w,y:g}}function tS(t){const{width:r,height:s}=Zm(t);return{width:r,height:s}}function nS(t,r,s){const i=un(r),u=qt(r),d=s==="fixed",p=nr(t,!0,d,r);let h={scrollLeft:0,scrollTop:0};const g=Qt(0);function v(){g.x=$i(u)}if(i||!i&&!d)if((Kr(r)!=="body"||Go(u))&&(h=Fi(r)),i){const C=nr(r,!0,d,r);g.x=C.x+r.clientLeft,g.y=C.y+r.clientTop}else u&&v();d&&!i&&u&&v();const y=u&&!i&&!d?eg(u,h):Qt(0),w=p.left+h.scrollLeft-g.x-y.x,b=p.top+h.scrollTop-g.y-y.y;return{x:w,y:b,width:p.width,height:p.height}}function tu(t){return Ft(t).position==="static"}function dh(t,r){if(!un(t)||Ft(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return qt(t)===s&&(s=s.ownerDocument.body),s}function ng(t,r){const s=xt(t);if(Di(t))return s;if(!un(t)){let u=Ln(t);for(;u&&!Fr(u);){if(Dt(u)&&!tu(u))return u;u=Ln(u)}return s}let i=dh(t,r);for(;i&&H1(i)&&tu(i);)i=dh(i,r);return i&&Fr(i)&&tu(i)&&!lc(i)?s:i||K1(t)||s}const rS=async function(t){const r=this.getOffsetParent||ng,s=this.getDimensions,i=await s(t.floating);return{reference:nS(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function oS(t){return Ft(t).direction==="rtl"}const sS={convertOffsetParentRelativeRectToViewportRelativeRect:G1,getDocumentElement:qt,getClippingRect:eS,getOffsetParent:ng,getElementRects:rS,getClientRects:q1,getDimensions:tS,getScale:Lr,isElement:Dt,isRTL:oS};function rg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function iS(t,r){let s=null,i;const u=qt(t);function d(){var h;clearTimeout(i),(h=s)==null||h.disconnect(),s=null}function p(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),d();const v=t.getBoundingClientRect(),{left:y,top:w,width:b,height:C}=v;if(h||r(),!b||!C)return;const k=fi(w),S=fi(u.clientWidth-(y+b)),E=fi(u.clientHeight-(w+C)),P=fi(y),_={rootMargin:-k+"px "+-S+"px "+-E+"px "+-P+"px",threshold:gt(0,In(1,g))||1};let L=!0;function D(O){const z=O[0].intersectionRatio;if(z!==g){if(!L)return p();z?p(!1,z):i=setTimeout(()=>{p(!1,1e-7)},1e3)}z===1&&!rg(v,t.getBoundingClientRect())&&p(),L=!1}try{s=new IntersectionObserver(D,{..._,root:u.ownerDocument})}catch{s=new IntersectionObserver(D,_)}s.observe(t)}return p(!0),d}function aS(t,r,s,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=i,v=cc(t),y=u||d?[...v?zo(v):[],...r?zo(r):[]]:[];y.forEach(P=>{u&&P.addEventListener("scroll",s,{passive:!0}),d&&P.addEventListener("resize",s)});const w=v&&h?iS(v,s):null;let b=-1,C=null;p&&(C=new ResizeObserver(P=>{let[A]=P;A&&A.target===v&&C&&r&&(C.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=C)==null||_.observe(r)})),s()}),v&&!g&&C.observe(v),r&&C.observe(r));let k,S=g?nr(t):null;g&&E();function E(){const P=nr(t);S&&!rg(S,P)&&s(),S=P,k=requestAnimationFrame(E)}return s(),()=>{var P;y.forEach(A=>{u&&A.removeEventListener("scroll",s),d&&A.removeEventListener("resize",s)}),w?.(),(P=C)==null||P.disconnect(),C=null,g&&cancelAnimationFrame(k)}}const lS=F1,uS=$1,cS=I1,dS=U1,fS=L1,fh=M1,pS=z1,hS=(t,r,s)=>{const i=new Map,u={platform:sS,...s},d={...u.platform,_c:i};return A1(t,r,{...u,platform:d})};var mS=typeof document<"u",gS=function(){},wi=mS?m.useLayoutEffect:gS;function Ri(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let s,i,u;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(i=s;i--!==0;)if(!Ri(t[i],r[i]))return!1;return!0}if(u=Object.keys(t),s=u.length,s!==Object.keys(r).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(r,u[i]))return!1;for(i=s;i--!==0;){const d=u[i];if(!(d==="_owner"&&t.$$typeof)&&!Ri(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function og(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ph(t,r){const s=og(t);return Math.round(r*s)/s}function nu(t){const r=m.useRef(t);return wi(()=>{r.current=t}),r}function vS(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:u,elements:{reference:d,floating:p}={},transform:h=!0,whileElementsMounted:g,open:v}=t,[y,w]=m.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[b,C]=m.useState(i);Ri(b,i)||C(i);const[k,S]=m.useState(null),[E,P]=m.useState(null),A=m.useCallback(H=>{H!==O.current&&(O.current=H,S(H))},[]),_=m.useCallback(H=>{H!==z.current&&(z.current=H,P(H))},[]),L=d||k,D=p||E,O=m.useRef(null),z=m.useRef(null),U=m.useRef(y),J=g!=null,ne=nu(g),te=nu(u),Y=nu(v),ue=m.useCallback(()=>{if(!O.current||!z.current)return;const H={placement:r,strategy:s,middleware:b};te.current&&(H.platform=te.current),hS(O.current,z.current,H).then(B=>{const G={...B,isPositioned:Y.current!==!1};X.current&&!Ri(U.current,G)&&(U.current=G,Oi.flushSync(()=>{w(G)}))})},[b,r,s,te,Y]);wi(()=>{v===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,w(H=>({...H,isPositioned:!1})))},[v]);const X=m.useRef(!1);wi(()=>(X.current=!0,()=>{X.current=!1}),[]),wi(()=>{if(L&&(O.current=L),D&&(z.current=D),L&&D){if(ne.current)return ne.current(L,D,ue);ue()}},[L,D,ue,ne,J]);const me=m.useMemo(()=>({reference:O,floating:z,setReference:A,setFloating:_}),[A,_]),ie=m.useMemo(()=>({reference:L,floating:D}),[L,D]),le=m.useMemo(()=>{const H={position:s,left:0,top:0};if(!ie.floating)return H;const B=ph(ie.floating,y.x),G=ph(ie.floating,y.y);return h?{...H,transform:"translate("+B+"px, "+G+"px)",...og(ie.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:B,top:G}},[s,h,ie.floating,y.x,y.y]);return m.useMemo(()=>({...y,update:ue,refs:me,elements:ie,floatingStyles:le}),[y,ue,me,ie,le])}const xS=t=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){const{element:i,padding:u}=typeof t=="function"?t(s):t;return i&&r(i)?i.current!=null?fh({element:i.current,padding:u}).fn(s):{}:i?fh({element:i,padding:u}).fn(s):{}}}},yS=(t,r)=>{const s=lS(t);return{name:s.name,fn:s.fn,options:[t,r]}},wS=(t,r)=>{const s=uS(t);return{name:s.name,fn:s.fn,options:[t,r]}},bS=(t,r)=>({fn:pS(t).fn,options:[t,r]}),SS=(t,r)=>{const s=cS(t);return{name:s.name,fn:s.fn,options:[t,r]}},CS=(t,r)=>{const s=dS(t);return{name:s.name,fn:s.fn,options:[t,r]}},kS=(t,r)=>{const s=fS(t);return{name:s.name,fn:s.fn,options:[t,r]}},ES=(t,r)=>{const s=xS(t);return{name:s.name,fn:s.fn,options:[t,r]}};var NS="Arrow",sg=m.forwardRef((t,r)=>{const{children:s,width:i=10,height:u=5,...d}=t;return l.jsx(je.svg,{...d,ref:r,width:i,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});sg.displayName=NS;var jS=sg;function RS(t){const[r,s]=m.useState(void 0);return Gt(()=>{if(t){s({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,h;if("borderBoxSize"in d){const g=d.borderBoxSize,v=Array.isArray(g)?g[0]:g;p=v.inlineSize,h=v.blockSize}else p=t.offsetWidth,h=t.offsetHeight;s({width:p,height:h})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else s(void 0)},[t]),r}var dc="Popper",[ig,zi]=Dn(dc),[PS,ag]=ig(dc),lg=t=>{const{__scopePopper:r,children:s}=t,[i,u]=m.useState(null);return l.jsx(PS,{scope:r,anchor:i,onAnchorChange:u,children:s})};lg.displayName=dc;var ug="PopperAnchor",cg=m.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:i,...u}=t,d=ag(ug,s),p=m.useRef(null),h=He(r,p),g=m.useRef(null);return m.useEffect(()=>{const v=g.current;g.current=i?.current||p.current,v!==g.current&&d.onAnchorChange(g.current)}),i?null:l.jsx(je.div,{...u,ref:h})});cg.displayName=ug;var fc="PopperContent",[TS,_S]=ig(fc),dg=m.forwardRef((t,r)=>{const{__scopePopper:s,side:i="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:C="optimized",onPlaced:k,...S}=t,E=ag(fc,s),[P,A]=m.useState(null),_=He(r,he=>A(he)),[L,D]=m.useState(null),O=RS(L),z=O?.width??0,U=O?.height??0,J=i+(d!=="center"?"-"+d:""),ne=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},te=Array.isArray(v)?v:[v],Y=te.length>0,ue={padding:ne,boundary:te.filter(AS),altBoundary:Y},{refs:X,floatingStyles:me,placement:ie,isPositioned:le,middlewareData:H}=vS({strategy:"fixed",placement:J,whileElementsMounted:(...he)=>aS(...he,{animationFrame:C==="always"}),elements:{reference:E.anchor},middleware:[yS({mainAxis:u+U,alignmentAxis:p}),g&&wS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?bS():void 0,...ue}),g&&SS({...ue}),CS({...ue,apply:({elements:he,rects:be,availableWidth:Ee,availableHeight:et})=>{const{width:sr,height:Jo}=be.reference,Yt=he.floating.style;Yt.setProperty("--radix-popper-available-width",`${Ee}px`),Yt.setProperty("--radix-popper-available-height",`${et}px`),Yt.setProperty("--radix-popper-anchor-width",`${sr}px`),Yt.setProperty("--radix-popper-anchor-height",`${Jo}px`)}}),L&&ES({element:L,padding:h}),MS({arrowWidth:z,arrowHeight:U}),b&&kS({strategy:"referenceHidden",...ue})]}),[B,G]=hg(ie),R=yt(k);Gt(()=>{le&&R?.()},[le,R]);const W=H.arrow?.x,$=H.arrow?.y,oe=H.arrow?.centerOffset!==0,[ge,xe]=m.useState();return Gt(()=>{P&&xe(window.getComputedStyle(P).zIndex)},[P]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:le?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(TS,{scope:s,placedSide:B,onArrowChange:D,arrowX:W,arrowY:$,shouldHideArrow:oe,children:l.jsx(je.div,{"data-side":B,"data-align":G,...S,ref:_,style:{...S.style,animation:le?void 0:"none"}})})})});dg.displayName=fc;var fg="PopperArrow",OS={top:"bottom",right:"left",bottom:"top",left:"right"},pg=m.forwardRef(function(r,s){const{__scopePopper:i,...u}=r,d=_S(fg,i),p=OS[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(jS,{...u,ref:s,style:{...u.style,display:"block"}})})});pg.displayName=fg;function AS(t){return t!==null}var MS=t=>({name:"transformOrigin",options:t,fn(r){const{placement:s,rects:i,middlewareData:u}=r,p=u.arrow?.centerOffset!==0,h=p?0:t.arrowWidth,g=p?0:t.arrowHeight,[v,y]=hg(s),w={start:"0%",center:"50%",end:"100%"}[y],b=(u.arrow?.x??0)+h/2,C=(u.arrow?.y??0)+g/2;let k="",S="";return v==="bottom"?(k=p?w:`${b}px`,S=`${-g}px`):v==="top"?(k=p?w:`${b}px`,S=`${i.floating.height+g}px`):v==="right"?(k=`${-g}px`,S=p?w:`${C}px`):v==="left"&&(k=`${i.floating.width+g}px`,S=p?w:`${C}px`),{data:{x:k,y:S}}}});function hg(t){const[r,s="center"]=t.split("-");return[r,s]}var mg=lg,gg=cg,vg=dg,xg=pg,IS=Symbol("radix.slottable");function LS(t){const r=({children:s})=>l.jsx(l.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=IS,r}var[Ui]=Dn("Tooltip",[zi]),Hi=zi(),yg="TooltipProvider",DS=700,Ou="tooltip.open",[FS,pc]=Ui(yg),wg=t=>{const{__scopeTooltip:r,delayDuration:s=DS,skipDelayDuration:i=300,disableHoverableContent:u=!1,children:d}=t,p=m.useRef(!0),h=m.useRef(!1),g=m.useRef(0);return m.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),l.jsx(FS,{scope:r,isOpenDelayedRef:p,delayDuration:s,onOpen:m.useCallback(()=>{window.clearTimeout(g.current),p.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(v=>{h.current=v},[]),disableHoverableContent:u,children:d})};wg.displayName=yg;var Uo="Tooltip",[$S,Bi]=Ui(Uo),bg=t=>{const{__scopeTooltip:r,children:s,open:i,defaultOpen:u,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,g=pc(Uo,t.__scopeTooltip),v=Hi(r),[y,w]=m.useState(null),b=$o(),C=m.useRef(0),k=p??g.disableHoverableContent,S=h??g.delayDuration,E=m.useRef(!1),[P,A]=Vo({prop:i,defaultProp:u??!1,onChange:z=>{z?(g.onOpen(),document.dispatchEvent(new CustomEvent(Ou))):g.onClose(),d?.(z)},caller:Uo}),_=m.useMemo(()=>P?E.current?"delayed-open":"instant-open":"closed",[P]),L=m.useCallback(()=>{window.clearTimeout(C.current),C.current=0,E.current=!1,A(!0)},[A]),D=m.useCallback(()=>{window.clearTimeout(C.current),C.current=0,A(!1)},[A]),O=m.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{E.current=!0,A(!0),C.current=0},S)},[S,A]);return m.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),l.jsx(mg,{...v,children:l.jsx($S,{scope:r,contentId:b,open:P,stateAttribute:_,trigger:y,onTriggerChange:w,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?O():L()},[g.isOpenDelayedRef,O,L]),onTriggerLeave:m.useCallback(()=>{k?D():(window.clearTimeout(C.current),C.current=0)},[D,k]),onOpen:L,onClose:D,disableHoverableContent:k,children:s})})};bg.displayName=Uo;var Au="TooltipTrigger",Sg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,u=Bi(Au,s),d=pc(Au,s),p=Hi(s),h=m.useRef(null),g=He(r,h,u.onTriggerChange),v=m.useRef(!1),y=m.useRef(!1),w=m.useCallback(()=>v.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),l.jsx(gg,{asChild:!0,...p,children:l.jsx(je.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...i,ref:g,onPointerMove:fe(t.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),y.current=!0)}),onPointerLeave:fe(t.onPointerLeave,()=>{u.onTriggerLeave(),y.current=!1}),onPointerDown:fe(t.onPointerDown,()=>{u.open&&u.onClose(),v.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:fe(t.onFocus,()=>{v.current||u.onOpen()}),onBlur:fe(t.onBlur,u.onClose),onClick:fe(t.onClick,u.onClose)})})});Sg.displayName=Au;var zS="TooltipPortal",[ej,US]=Ui(zS,{forceMount:void 0}),$r="TooltipContent",Cg=m.forwardRef((t,r)=>{const s=US($r,t.__scopeTooltip),{forceMount:i=s.forceMount,side:u="top",...d}=t,p=Bi($r,t.__scopeTooltip);return l.jsx(Fn,{present:i||p.open,children:p.disableHoverableContent?l.jsx(kg,{side:u,...d,ref:r}):l.jsx(HS,{side:u,...d,ref:r})})}),HS=m.forwardRef((t,r)=>{const s=Bi($r,t.__scopeTooltip),i=pc($r,t.__scopeTooltip),u=m.useRef(null),d=He(r,u),[p,h]=m.useState(null),{trigger:g,onClose:v}=s,y=u.current,{onPointerInTransitChange:w}=i,b=m.useCallback(()=>{h(null),w(!1)},[w]),C=m.useCallback((k,S)=>{const E=k.currentTarget,P={x:k.clientX,y:k.clientY},A=QS(P,E.getBoundingClientRect()),_=GS(P,A),L=qS(S.getBoundingClientRect()),D=XS([..._,...L]);h(D),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(g&&y){const k=E=>C(E,y),S=E=>C(E,g);return g.addEventListener("pointerleave",k),y.addEventListener("pointerleave",S),()=>{g.removeEventListener("pointerleave",k),y.removeEventListener("pointerleave",S)}}},[g,y,C,b]),m.useEffect(()=>{if(p){const k=S=>{const E=S.target,P={x:S.clientX,y:S.clientY},A=g?.contains(E)||y?.contains(E),_=!YS(P,p);A?b():_&&(b(),v())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[g,y,p,v,b]),l.jsx(kg,{...t,ref:d})}),[BS,WS]=Ui(Uo,{isInside:!1}),KS=LS("TooltipContent"),kg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,children:i,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,g=Bi($r,s),v=Hi(s),{onClose:y}=g;return m.useEffect(()=>(document.addEventListener(Ou,y),()=>document.removeEventListener(Ou,y)),[y]),m.useEffect(()=>{if(g.trigger){const w=b=>{b.target?.contains(g.trigger)&&y()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[g.trigger,y]),l.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:w=>w.preventDefault(),onDismiss:y,children:l.jsxs(vg,{"data-state":g.stateAttribute,...v,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(KS,{children:i}),l.jsx(BS,{scope:s,isInside:!0,children:l.jsx(u0,{id:g.contentId,role:"tooltip",children:u||i})})]})})});Cg.displayName=$r;var Eg="TooltipArrow",VS=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,u=Hi(s);return WS(Eg,s).isInside?null:l.jsx(xg,{...u,...i,ref:r})});VS.displayName=Eg;function QS(t,r){const s=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),u=Math.abs(r.right-t.x),d=Math.abs(r.left-t.x);switch(Math.min(s,i,u,d)){case d:return"left";case u:return"right";case s:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function GS(t,r,s=5){const i=[];switch(r){case"top":i.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":i.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":i.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":i.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return i}function qS(t){const{top:r,right:s,bottom:i,left:u}=t;return[{x:u,y:r},{x:s,y:r},{x:s,y:i},{x:u,y:i}]}function YS(t,r){const{x:s,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],v=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-v)*(i-y)/(b-y)+v&&(u=!u)}return u}function XS(t){const r=t.slice();return r.sort((s,i)=>s.x<i.x?-1:s.x>i.x?1:s.y<i.y?-1:s.y>i.y?1:0),ZS(r)}function ZS(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const u=t[i];for(;r.length>=2;){const d=r[r.length-1],p=r[r.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))r.pop();else break}r.push(u)}r.pop();const s=[];for(let i=t.length-1;i>=0;i--){const u=t[i];for(;s.length>=2;){const d=s[s.length-1],p=s[s.length-2];if((d.x-p.x)*(u.y-p.y)>=(d.y-p.y)*(u.x-p.x))s.pop();else break}s.push(u)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var JS=wg,eC=bg,tC=Sg,Ng=Cg;const nC=JS,rC=eC,oC=tC,jg=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(Ng,{ref:i,sideOffset:r,className:De("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 origin-[--radix-tooltip-content-transform-origin]",t),...s}));jg.displayName=Ng.displayName;var Wi="Collapsible",[sC]=Dn(Wi),[iC,hc]=sC(Wi),Rg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,open:i,defaultOpen:u,disabled:d,onOpenChange:p,...h}=t,[g,v]=Vo({prop:i,defaultProp:u??!1,onChange:p,caller:Wi});return l.jsx(iC,{scope:s,disabled:d,contentId:$o(),open:g,onOpenToggle:m.useCallback(()=>v(y=>!y),[v]),children:l.jsx(je.div,{"data-state":gc(g),"data-disabled":d?"":void 0,...h,ref:r})})});Rg.displayName=Wi;var Pg="CollapsibleTrigger",Tg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,...i}=t,u=hc(Pg,s);return l.jsx(je.button,{type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":gc(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled,...i,ref:r,onClick:fe(t.onClick,u.onOpenToggle)})});Tg.displayName=Pg;var mc="CollapsibleContent",_g=m.forwardRef((t,r)=>{const{forceMount:s,...i}=t,u=hc(mc,t.__scopeCollapsible);return l.jsx(Fn,{present:s||u.open,children:({present:d})=>l.jsx(aC,{...i,ref:r,present:d})})});_g.displayName=mc;var aC=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,present:i,children:u,...d}=t,p=hc(mc,s),[h,g]=m.useState(i),v=m.useRef(null),y=He(r,v),w=m.useRef(0),b=w.current,C=m.useRef(0),k=C.current,S=p.open||h,E=m.useRef(S),P=m.useRef(void 0);return m.useEffect(()=>{const A=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(A)},[]),Gt(()=>{const A=v.current;if(A){P.current=P.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const _=A.getBoundingClientRect();w.current=_.height,C.current=_.width,E.current||(A.style.transitionDuration=P.current.transitionDuration,A.style.animationName=P.current.animationName),g(i)}},[p.open,i]),l.jsx(je.div,{"data-state":gc(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!S,...d,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...t.style},children:S&&u})});function gc(t){return t?"open":"closed"}var Mu=Rg,Iu=Tg,Lu=_g;function lC(t){const r=t.split("/");if(r.length!==2||!r[0]||!r[1])return`https://github.com/${t}`;const[s,i]=r;return`https://github.com/${encodeURIComponent(s)}/${encodeURIComponent(i)}`}function uC(t,r){return t!==null?t:r===0}const hh="onboarding-panel-dismissed-v2",ru={claude:"Claude",codex:"Codex",gemini:"Gemini"},mh=[{label:"Gemini Code Assist",href:"https://github.com/apps/gemini-code-assist"},{label:"OpenAI Codex",href:"https://developers.openai.com/codex/integrations/github"},{label:"Claude Code",href:"https://support.claude.com/en/articles/14233555-set-up-code-review-for-claude-code"},{label:"Cursor",href:"https://cursor.com/docs/integrations/github"}];function gh(t){return t.claude||t.codex||t.gemini}function cC(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function dC(t){const r=t.repos.filter(w=>w.accessible),s=t.repos.filter(w=>!w.accessible),i=r.filter(w=>gh(w.codeReviews)),u=r.filter(w=>!gh(w.codeReviews)),d=[{id:"github",title:"Connect GitHub",description:t.githubConnected?`Connected${t.githubUser?` as @${t.githubUser}`:""}.`:"Connect GitHub so the app can read repositories, sync feedback, and install review workflows.",complete:t.githubConnected},{id:"repo",title:"Track your first repository or PR",description:r.length>0?`Watching ${r.length} accessible repo${r.length===1?"":"s"}. Choose per repo whether to track only your PRs or your whole team.`:"Use the Add PR or Watch form below. Adding a PR also adds its repository to the watch list, and watched repos let you choose whether to track only your PRs or the whole team.",complete:r.length>0},{id:"workflow",title:"Enable first-pass AI review",description:i.length>0?`Detected an AI review workflow in ${i.length} repo${i.length===1?"":"s"}.`:r.length>0?"Install a Claude or Codex review workflow on any tracked repository to seed actionable review comments automatically.":"Track an accessible repository first, then install a review workflow.",complete:i.length>0}],p=d.filter(w=>w.complete).length,h=d.filter(w=>!w.complete),g=[...h.map(w=>w.id.toLowerCase()),...s.map(w=>"access:"+w.repo.toLowerCase()+":"+(w.error?.slice(0,100)??"").toLowerCase())].sort().join("|")||"complete",v=h.length>0||s.length>0,y=h.length>0?`${p} of ${d.length} complete`:`${s.length} access issue${s.length===1?"":"s"}`;return{accessibleRepos:r,hasIssues:v,inaccessibleRepos:s,reposMissingReview:u,reposWithReview:i,steps:d,pendingSteps:h,completedCount:p,dismissalKey:g,summary:y}}function ou({children:t}){return l.jsx("code",{className:"rounded border border-border bg-muted/30 px-1 py-0.5 text-[11px] font-mono",children:t})}function vh({number:t,children:r}){return l.jsxs("div",{className:"flex gap-2.5",children:[l.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border border-border text-[10px] text-muted-foreground",children:t}),l.jsx("div",{className:"flex-1 text-[12px] leading-relaxed",children:r})]})}function fC({step:t,index:r,children:s}){return l.jsx("div",{className:`border px-3 py-3 ${t.complete?"border-border bg-background/60":"border-warning-border bg-warning-muted"}`,children:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("span",{className:`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center border text-[10px] ${t.complete?"border-border text-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"✓":r}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:t.title}),l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${t.complete?"border-border text-muted-foreground":"border-warning-border text-warning-foreground"}`,children:t.complete?"done":"next"})]}),l.jsx("p",{className:"text-[12px] text-muted-foreground",children:t.description}),s]})]})})}function pC(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.localStorage.getItem(hh)),[s,i]=m.useState(!0),{data:u,isLoading:d}=ot({queryKey:["/api/onboarding/status"],refetchInterval:3e4}),{data:p}=ot({queryKey:["/api/config"]}),h=Je({mutationFn:async({repo:_,tool:L})=>(await Ge("POST","/api/onboarding/install-review",{repo:_,tool:L})).json(),onSuccess:(_,L)=>{ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:`${ru[L.tool]} review workflow installed for ${L.repo}.`})},onError:_=>{vt({variant:"destructive",description:`Could not install review workflow: ${_.message}`})}});if(d||!u)return null;const{accessibleRepos:g,completedCount:v,dismissalKey:y,hasIssues:w,inaccessibleRepos:b,reposMissingReview:C,reposWithReview:k,steps:S,summary:E}=dC(u),A=(p?.codingAgent??"claude")==="codex"?["codex","claude"]:["claude","codex"];return!w||t===y?null:l.jsxs("div",{className:"shrink-0 border-b border-border bg-muted/35",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[l.jsxs("button",{onClick:()=>i(!s),className:"flex items-center gap-2 text-left",children:[l.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-foreground"}),l.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider",children:"Getting started"}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:E}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:s?"▲":"▼"})]}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.localStorage.setItem(hh,y),r(y)},className:"text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"dismiss"})]}),s&&l.jsxs("div",{className:"border-t border-border px-4 py-4 space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Setup checklist"}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[v," of ",S.length," complete"]})]}),l.jsx("div",{className:"space-y-3",children:S.map((_,L)=>l.jsxs(fC,{step:_,index:L+1,children:[_.id==="github"&&!_.complete&&l.jsxs("div",{className:"space-y-2 pt-1",children:[u.githubError&&l.jsx("p",{className:"text-[12px] text-destructive",children:u.githubError}),l.jsxs("div",{className:"space-y-1.5 text-[12px] text-muted-foreground",children:[l.jsxs(vh,{number:1,children:["Run ",l.jsx(ou,{children:"gh auth login"})," on this machine, or set ",l.jsx(ou,{children:"GITHUB_TOKEN"})," before starting the app."]}),l.jsxs(vh,{number:2,children:["Prefer the built-in token list if you want the app to remember it. Open ",l.jsx(Kt,{href:"/settings",className:"underline underline-offset-2",children:"settings"})," to paste a Personal Access Token."]})]})]}),_.id==="repo"&&!_.complete&&l.jsxs("div",{className:"pt-1 text-[12px] text-muted-foreground",children:["The left sidebar is the real entry point. Use ",l.jsx("span",{className:"text-foreground",children:"Add"})," for a PR URL or ",l.jsx("span",{className:"text-foreground",children:"Watch"})," for an ",l.jsx(ou,{children:"owner/repo"})," slug, then choose whether that watched repo should track only your PRs or your whole team."]}),_.id==="workflow"&&!_.complete&&g.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:mh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),C.map(D=>l.jsxs("div",{className:"flex flex-col gap-2 border border-border bg-background/50 px-3 py-2 md:flex-row md:items-center md:justify-between",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("a",{href:`https://github.com/${D.repo}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-[11px] font-medium underline underline-offset-2",children:D.repo}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No AI review workflow detected yet."})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(O=>{const z=h.isPending&&h.variables?.repo===D.repo&&h.variables?.tool===O;return l.jsx("button",{type:"button",onClick:()=>h.mutate({repo:D.repo,tool:O}),disabled:h.isPending,className:"border border-border px-2 py-1 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background disabled:opacity-40",children:z?"Installing…":`Install ${ru[O]}`},`${D.repo}-${O}`)})})]},D.repo))]}),_.id==="workflow"&&_.complete&&k.length>0&&l.jsxs("div",{className:"space-y-2 pt-1",children:[l.jsxs("div",{className:"space-y-2 border border-border bg-muted/40 px-3 py-2",children:[l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Oh-my-PR is best used along with a chain of AI code review tools. Different models have different strengths and weaknesses. Below are instructions on how to install code reviews with different providers."}),l.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:mh.map(D=>l.jsx("a",{href:D.href,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground/80 hover:text-foreground",children:D.label},D.href))})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:k.map(D=>{const O=cC(D.codeReviews).map(z=>ru[z]).join(" + ");return l.jsxs("span",{className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[D.repo," · ",O]},D.repo)})})]})]},_.id))}),b.length>0&&l.jsxs("div",{className:"space-y-3 border border-destructive/30 bg-destructive/5 px-3 py-3",children:[l.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wider text-destructive",children:"Repository access issues"}),l.jsx("div",{className:"space-y-2",children:b.map(_=>l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"text-[11px] font-medium",children:l.jsx("a",{href:`https://github.com/${_.repo}`,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:_.repo})}),l.jsxs("p",{className:"text-[12px] text-destructive",children:["Cannot access this repository: ",_.error??"unknown error"]})]},_.repo))})]})]})]})}const xh="app-update-dismissed";function yh(t){return t.startsWith("v")?t:`v${t}`}function Og(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function hC(t,r){if(!t?.updateAvailable)return!1;const s=Og(t);return s!==null&&s!==r}function qo(){const[t,r]=m.useState(()=>typeof window>"u"?null:window.sessionStorage.getItem(xh)),{data:s}=ot({queryKey:["/api/app-update"]});if(!s||!hC(s,t))return null;const i=Og(s);return!i||!s.latestVersion?null:l.jsx("div",{className:"shrink-0 border-b border-warning-border bg-warning-muted",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-2",children:[l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px]",children:[l.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-warning"}),l.jsx("span",{className:"font-medium uppercase tracking-wider text-warning-foreground",children:"Update available"}),l.jsx("span",{className:"text-foreground/75",children:`oh-my-pr ${yh(s.latestVersion)} is available. You're on ${yh(s.currentVersion)}.`})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[l.jsx("a",{href:s.latestReleaseUrl,target:"_blank",rel:"noreferrer",className:"font-medium uppercase tracking-wider text-warning-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Update oh-my-pr"}),l.jsx("button",{onClick:()=>{typeof window<"u"&&window.sessionStorage.setItem(xh,i),r(i)},className:"uppercase tracking-wider text-foreground/70 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"dismiss for now"})]})]})})}var mC=m.createContext(void 0);function Ag(t){const r=m.useContext(mC);return t||r||"ltr"}var su=0;function gC(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??wh()),document.body.insertAdjacentElement("beforeend",t[1]??wh()),su++,()=>{su===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),su--}},[])}function wh(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var iu="focusScope.autoFocusOnMount",au="focusScope.autoFocusOnUnmount",bh={bubbles:!1,cancelable:!0},vC="FocusScope",Mg=m.forwardRef((t,r)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=t,[h,g]=m.useState(null),v=yt(u),y=yt(d),w=m.useRef(null),b=He(r,S=>g(S)),C=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let S=function(_){if(C.paused||!h)return;const L=_.target;h.contains(L)?w.current=L:An(w.current,{select:!0})},E=function(_){if(C.paused||!h)return;const L=_.relatedTarget;L!==null&&(h.contains(L)||An(w.current,{select:!0}))},P=function(_){if(document.activeElement===document.body)for(const D of _)D.removedNodes.length>0&&An(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",E);const A=new MutationObserver(P);return h&&A.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),A.disconnect()}}},[i,h,C.paused]),m.useEffect(()=>{if(h){Ch.add(C);const S=document.activeElement;if(!h.contains(S)){const P=new CustomEvent(iu,bh);h.addEventListener(iu,v),h.dispatchEvent(P),P.defaultPrevented||(xC(CC(Ig(h)),{select:!0}),document.activeElement===S&&An(h))}return()=>{h.removeEventListener(iu,v),setTimeout(()=>{const P=new CustomEvent(au,bh);h.addEventListener(au,y),h.dispatchEvent(P),P.defaultPrevented||An(S??document.body,{select:!0}),h.removeEventListener(au,y),Ch.remove(C)},0)}}},[h,v,y,C]);const k=m.useCallback(S=>{if(!s&&!i||C.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(E&&P){const A=S.currentTarget,[_,L]=yC(A);_&&L?!S.shiftKey&&P===L?(S.preventDefault(),s&&An(_,{select:!0})):S.shiftKey&&P===_&&(S.preventDefault(),s&&An(L,{select:!0})):P===A&&S.preventDefault()}},[s,i,C.paused]);return l.jsx(je.div,{tabIndex:-1,...p,ref:b,onKeyDown:k})});Mg.displayName=vC;function xC(t,{select:r=!1}={}){const s=document.activeElement;for(const i of t)if(An(i,{select:r}),document.activeElement!==s)return}function yC(t){const r=Ig(t),s=Sh(r,t),i=Sh(r.reverse(),t);return[s,i]}function Ig(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Sh(t,r){for(const s of t)if(!wC(s,{upTo:r}))return s}function wC(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function bC(t){return t instanceof HTMLInputElement&&"select"in t}function An(t,{select:r=!1}={}){if(t&&t.focus){const s=document.activeElement;t.focus({preventScroll:!0}),t!==s&&bC(t)&&r&&t.select()}}var Ch=SC();function SC(){let t=[];return{add(r){const s=t[0];r!==s&&s?.pause(),t=kh(t,r),t.unshift(r)},remove(r){t=kh(t,r),t[0]?.resume()}}}function kh(t,r){const s=[...t],i=s.indexOf(r);return i!==-1&&s.splice(i,1),s}function CC(t){return t.filter(r=>r.tagName!=="A")}var lu="rovingFocusGroup.onEntryFocus",kC={bubbles:!1,cancelable:!0},Yo="RovingFocusGroup",[Du,Lg,EC]=Zu(Yo),[NC,Dg]=Dn(Yo,[EC]),[jC,RC]=NC(Yo),Fg=m.forwardRef((t,r)=>l.jsx(Du.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx(Du.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx(PC,{...t,ref:r})})}));Fg.displayName=Yo;var PC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:u=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:v,preventScrollOnEntryFocus:y=!1,...w}=t,b=m.useRef(null),C=He(r,b),k=Ag(d),[S,E]=Vo({prop:p,defaultProp:h??null,onChange:g,caller:Yo}),[P,A]=m.useState(!1),_=yt(v),L=Lg(s),D=m.useRef(!1),[O,z]=m.useState(0);return m.useEffect(()=>{const U=b.current;if(U)return U.addEventListener(lu,_),()=>U.removeEventListener(lu,_)},[_]),l.jsx(jC,{scope:s,orientation:i,dir:k,loop:u,currentTabStopId:S,onItemFocus:m.useCallback(U=>E(U),[E]),onItemShiftTab:m.useCallback(()=>A(!0),[]),onFocusableItemAdd:m.useCallback(()=>z(U=>U+1),[]),onFocusableItemRemove:m.useCallback(()=>z(U=>U-1),[]),children:l.jsx(je.div,{tabIndex:P||O===0?-1:0,"data-orientation":i,...w,ref:C,style:{outline:"none",...t.style},onMouseDown:fe(t.onMouseDown,()=>{D.current=!0}),onFocus:fe(t.onFocus,U=>{const J=!D.current;if(U.target===U.currentTarget&&J&&!P){const ne=new CustomEvent(lu,kC);if(U.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const te=L().filter(ie=>ie.focusable),Y=te.find(ie=>ie.active),ue=te.find(ie=>ie.id===S),me=[Y,ue,...te].filter(Boolean).map(ie=>ie.ref.current);Ug(me,y)}}D.current=!1}),onBlur:fe(t.onBlur,()=>A(!1))})})}),$g="RovingFocusGroupItem",zg=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:u=!1,tabStopId:d,children:p,...h}=t,g=$o(),v=d||g,y=RC($g,s),w=y.currentTabStopId===v,b=Lg(s),{onFocusableItemAdd:C,onFocusableItemRemove:k,currentTabStopId:S}=y;return m.useEffect(()=>{if(i)return C(),()=>k()},[i,C,k]),l.jsx(Du.ItemSlot,{scope:s,id:v,focusable:i,active:u,children:l.jsx(je.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...h,ref:r,onMouseDown:fe(t.onMouseDown,E=>{i?y.onItemFocus(v):E.preventDefault()}),onFocus:fe(t.onFocus,()=>y.onItemFocus(v)),onKeyDown:fe(t.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){y.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const P=OC(E,y.orientation,y.dir);if(P!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let _=b().filter(L=>L.focusable).map(L=>L.ref.current);if(P==="last")_.reverse();else if(P==="prev"||P==="next"){P==="prev"&&_.reverse();const L=_.indexOf(E.currentTarget);_=y.loop?AC(_,L+1):_.slice(L+1)}setTimeout(()=>Ug(_))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:S!=null}):p})})});zg.displayName=$g;var TC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _C(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function OC(t,r,s){const i=_C(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return TC[i]}function Ug(t,r=!1){const s=document.activeElement;for(const i of t)if(i===s||(i.focus({preventScroll:r}),document.activeElement!==s))return}function AC(t,r){return t.map((s,i)=>t[(r+i)%t.length])}var MC=Fg,IC=zg;function LC(t){const r=DC(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find($C);if(g){const v=g.props.children,y=h.map(w=>w===g?m.Children.count(v)>1?m.Children.only(null):m.isValidElement(v)?v.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(v)?m.cloneElement(v,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function DC(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=UC(u),h=zC(d,u.props);return u.type!==m.Fragment&&(h.ref=i?Ur(i,p):p),m.cloneElement(u,h)}return m.Children.count(u)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var FC=Symbol("radix.slottable");function $C(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===FC}function zC(t,r){const s={...r};for(const i in r){const u=t[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const g=d(...h);return u(...h),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...t,...s}}function UC(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var HC=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Or=new WeakMap,pi=new WeakMap,hi={},uu=0,Hg=function(t){return t&&(t.host||Hg(t.parentNode))},BC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var i=Hg(s);return i&&t.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},WC=function(t,r,s,i){var u=BC(r,Array.isArray(t)?t:[t]);hi[s]||(hi[s]=new WeakMap);var d=hi[s],p=[],h=new Set,g=new Set(u),v=function(w){!w||h.has(w)||(h.add(w),v(w.parentNode))};u.forEach(v);var y=function(w){!w||g.has(w)||Array.prototype.forEach.call(w.children,function(b){if(h.has(b))y(b);else try{var C=b.getAttribute(i),k=C!==null&&C!=="false",S=(Or.get(b)||0)+1,E=(d.get(b)||0)+1;Or.set(b,S),d.set(b,E),p.push(b),S===1&&k&&pi.set(b,!0),E===1&&b.setAttribute(s,"true"),k||b.setAttribute(i,"true")}catch(P){console.error("aria-hidden: cannot operate on ",b,P)}})};return y(r),h.clear(),uu++,function(){p.forEach(function(w){var b=Or.get(w)-1,C=d.get(w)-1;Or.set(w,b),d.set(w,C),b||(pi.has(w)||w.removeAttribute(i),pi.delete(w)),C||w.removeAttribute(s)}),uu--,uu||(Or=new WeakMap,Or=new WeakMap,pi=new WeakMap,hi={})}},KC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),u=HC(t);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),WC(i,u,s,"aria-hidden")):function(){return null}},Wt=function(){return Wt=Object.assign||function(r){for(var s,i=1,u=arguments.length;i<u;i++){s=arguments[i];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(r[d]=s[d])}return r},Wt.apply(this,arguments)};function Bg(t,r){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(t);u<i.length;u++)r.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(t,i[u])&&(s[i[u]]=t[i[u]]);return s}function VC(t,r,s){if(s||arguments.length===2)for(var i=0,u=r.length,d;i<u;i++)(d||!(i in r))&&(d||(d=Array.prototype.slice.call(r,0,i)),d[i]=r[i]);return t.concat(d||Array.prototype.slice.call(r))}var bi="right-scroll-bar-position",Si="width-before-scroll-bar",QC="with-scroll-bars-hidden",GC="--removed-body-scroll-bar-size";function cu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function qC(t,r){var s=m.useState(function(){return{value:t,callback:r,facade:{get current(){return s.value},set current(i){var u=s.value;u!==i&&(s.value=i,s.callback(i,u))}}}})[0];return s.callback=r,s.facade}var YC=typeof window<"u"?m.useLayoutEffect:m.useEffect,Eh=new WeakMap;function XC(t,r){var s=qC(null,function(i){return t.forEach(function(u){return cu(u,i)})});return YC(function(){var i=Eh.get(s);if(i){var u=new Set(i),d=new Set(t),p=s.current;u.forEach(function(h){d.has(h)||cu(h,null)}),d.forEach(function(h){u.has(h)||cu(h,p)})}Eh.set(s,t)},[t]),s}function ZC(t){return t}function JC(t,r){r===void 0&&(r=ZC);var s=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:t},useMedium:function(d){var p=r(d,i);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(i=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(h){return d(h)},filter:function(){return s}}},assignMedium:function(d){i=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(d),p=s}var g=function(){var y=p;p=[],y.forEach(d)},v=function(){return Promise.resolve().then(g)};v(),s={push:function(y){p.push(y),v()},filter:function(y){return p=p.filter(y),s}}}};return u}function ek(t){t===void 0&&(t={});var r=JC(null);return r.options=Wt({async:!0,ssr:!1},t),r}var Wg=function(t){var r=t.sideCar,s=Bg(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return m.createElement(i,Wt({},s))};Wg.isSideCarExport=!0;function tk(t,r){return t.useMedium(r),Wg}var Kg=ek(),du=function(){},Ki=m.forwardRef(function(t,r){var s=m.useRef(null),i=m.useState({onScrollCapture:du,onWheelCapture:du,onTouchMoveCapture:du}),u=i[0],d=i[1],p=t.forwardProps,h=t.children,g=t.className,v=t.removeScrollBar,y=t.enabled,w=t.shards,b=t.sideCar,C=t.noRelative,k=t.noIsolation,S=t.inert,E=t.allowPinchZoom,P=t.as,A=P===void 0?"div":P,_=t.gapMode,L=Bg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,O=XC([s,r]),z=Wt(Wt({},L),u);return m.createElement(m.Fragment,null,y&&m.createElement(D,{sideCar:Kg,removeScrollBar:v,shards:w,noRelative:C,noIsolation:k,inert:S,setCallbacks:d,allowPinchZoom:!!E,lockRef:s,gapMode:_}),p?m.cloneElement(m.Children.only(h),Wt(Wt({},z),{ref:O})):m.createElement(A,Wt({},z,{className:g,ref:O}),h))});Ki.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ki.classNames={fullWidth:Si,zeroRight:bi};var nk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=nk();return r&&t.setAttribute("nonce",r),t}function ok(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function sk(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var ik=function(){var t=0,r=null;return{add:function(s){t==0&&(r=rk())&&(ok(r,s),sk(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},ak=function(){var t=ik();return function(r,s){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},Vg=function(){var t=ak(),r=function(s){var i=s.styles,u=s.dynamic;return t(i,u),null};return r},lk={left:0,top:0,right:0,gap:0},fu=function(t){return parseInt(t||"",10)||0},uk=function(t){var r=window.getComputedStyle(document.body),s=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],u=r[t==="padding"?"paddingRight":"marginRight"];return[fu(s),fu(i),fu(u)]},ck=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return lk;var r=uk(t),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-s+r[2]-r[0])}},dk=Vg(),Dr="data-scroll-locked",fk=function(t,r,s,i){var u=t.left,d=t.top,p=t.right,h=t.gap;return s===void 0&&(s="margin"),`
|
|
9
|
+
.`.concat(QC,` {
|
|
10
|
+
overflow: hidden `).concat(i,`;
|
|
11
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(Dr,`] {
|
|
14
|
+
overflow: hidden `).concat(i,`;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([r&&"position: relative ".concat(i,";"),s==="margin"&&`
|
|
17
|
+
padding-left: `.concat(u,`px;
|
|
18
|
+
padding-top: `).concat(d,`px;
|
|
19
|
+
padding-right: `).concat(p,`px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
23
|
+
`),s==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(bi,` {
|
|
27
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(Si,` {
|
|
31
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(bi," .").concat(bi,` {
|
|
35
|
+
right: 0 `).concat(i,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(Si," .").concat(Si,` {
|
|
39
|
+
margin-right: 0 `).concat(i,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(Dr,`] {
|
|
43
|
+
`).concat(GC,": ").concat(h,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},Nh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},pk=function(){m.useEffect(function(){return document.body.setAttribute(Dr,(Nh()+1).toString()),function(){var t=Nh()-1;t<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,t.toString())}},[])},hk=function(t){var r=t.noRelative,s=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;pk();var d=m.useMemo(function(){return ck(u)},[u]);return m.createElement(dk,{styles:fk(d,!r,u,s?"":"!important")})},Fu=!1;if(typeof window<"u")try{var mi=Object.defineProperty({},"passive",{get:function(){return Fu=!0,!0}});window.addEventListener("test",mi,mi),window.removeEventListener("test",mi,mi)}catch{Fu=!1}var Ar=Fu?{passive:!1}:!1,mk=function(t){return t.tagName==="TEXTAREA"},Qg=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!mk(t)&&s[r]==="visible")},gk=function(t){return Qg(t,"overflowY")},vk=function(t){return Qg(t,"overflowX")},jh=function(t,r){var s=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Gg(t,i);if(u){var d=qg(t,i),p=d[1],h=d[2];if(p>h)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},xk=function(t){var r=t.scrollTop,s=t.scrollHeight,i=t.clientHeight;return[r,s,i]},yk=function(t){var r=t.scrollLeft,s=t.scrollWidth,i=t.clientWidth;return[r,s,i]},Gg=function(t,r){return t==="v"?gk(r):vk(r)},qg=function(t,r){return t==="v"?xk(r):yk(r)},wk=function(t,r){return t==="h"&&r==="rtl"?-1:1},bk=function(t,r,s,i,u){var d=wk(t,window.getComputedStyle(r).direction),p=d*i,h=s.target,g=r.contains(h),v=!1,y=p>0,w=0,b=0;do{if(!h)break;var C=qg(t,h),k=C[0],S=C[1],E=C[2],P=S-E-d*k;(k||P)&&Gg(t,h)&&(w+=P,b+=k);var A=h.parentNode;h=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(y&&Math.abs(w)<1||!y&&Math.abs(b)<1)&&(v=!0),v},gi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Rh=function(t){return[t.deltaX,t.deltaY]},Ph=function(t){return t&&"current"in t?t.current:t},Sk=function(t,r){return t[0]===r[0]&&t[1]===r[1]},Ck=function(t){return`
|
|
46
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
48
|
+
`)},kk=0,Mr=[];function Ek(t){var r=m.useRef([]),s=m.useRef([0,0]),i=m.useRef(),u=m.useState(kk++)[0],d=m.useState(Vg)[0],p=m.useRef(t);m.useEffect(function(){p.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(u));var S=VC([t.lockRef.current],(t.shards||[]).map(Ph),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(u))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!p.current.allowPinchZoom;var P=gi(S),A=s.current,_="deltaX"in S?S.deltaX:A[0]-P[0],L="deltaY"in S?S.deltaY:A[1]-P[1],D,O=S.target,z=Math.abs(_)>Math.abs(L)?"h":"v";if("touches"in S&&z==="h"&&O.type==="range")return!1;var U=window.getSelection(),J=U&&U.anchorNode,ne=J?J===O||J.contains(O):!1;if(ne)return!1;var te=jh(z,O);if(!te)return!0;if(te?D=z:(D=z==="v"?"h":"v",te=jh(z,O)),!te)return!1;if(!i.current&&"changedTouches"in S&&(_||L)&&(i.current=D),!D)return!0;var Y=i.current||D;return bk(Y,E,S,Y==="h"?_:L)},[]),g=m.useCallback(function(S){var E=S;if(!(!Mr.length||Mr[Mr.length-1]!==d)){var P="deltaY"in E?Rh(E):gi(E),A=r.current.filter(function(D){return D.name===E.type&&(D.target===E.target||E.target===D.shadowParent)&&Sk(D.delta,P)})[0];if(A&&A.should){E.cancelable&&E.preventDefault();return}if(!A){var _=(p.current.shards||[]).map(Ph).filter(Boolean).filter(function(D){return D.contains(E.target)}),L=_.length>0?h(E,_[0]):!p.current.noIsolation;L&&E.cancelable&&E.preventDefault()}}},[]),v=m.useCallback(function(S,E,P,A){var _={name:S,delta:E,target:P,should:A,shadowParent:Nk(P)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(L){return L!==_})},1)},[]),y=m.useCallback(function(S){s.current=gi(S),i.current=void 0},[]),w=m.useCallback(function(S){v(S.type,Rh(S),S.target,h(S,t.lockRef.current))},[]),b=m.useCallback(function(S){v(S.type,gi(S),S.target,h(S,t.lockRef.current))},[]);m.useEffect(function(){return Mr.push(d),t.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:b}),document.addEventListener("wheel",g,Ar),document.addEventListener("touchmove",g,Ar),document.addEventListener("touchstart",y,Ar),function(){Mr=Mr.filter(function(S){return S!==d}),document.removeEventListener("wheel",g,Ar),document.removeEventListener("touchmove",g,Ar),document.removeEventListener("touchstart",y,Ar)}},[]);var C=t.removeScrollBar,k=t.inert;return m.createElement(m.Fragment,null,k?m.createElement(d,{styles:Ck(u)}):null,C?m.createElement(hk,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Nk(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const jk=tk(Kg,Ek);var Yg=m.forwardRef(function(t,r){return m.createElement(Ki,Wt({},t,{ref:r,sideCar:jk}))});Yg.classNames=Ki.classNames;var $u=["Enter"," "],Rk=["ArrowDown","PageUp","Home"],Xg=["ArrowUp","PageDown","End"],Pk=[...Rk,...Xg],Tk={ltr:[...$u,"ArrowRight"],rtl:[...$u,"ArrowLeft"]},_k={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Xo="Menu",[Ho,Ok,Ak]=Zu(Xo),[rr,Zg]=Dn(Xo,[Ak,zi,Dg]),Vi=zi(),Jg=Dg(),[Mk,or]=rr(Xo),[Ik,Zo]=rr(Xo),ev=t=>{const{__scopeMenu:r,open:s=!1,children:i,dir:u,onOpenChange:d,modal:p=!0}=t,h=Vi(r),[g,v]=m.useState(null),y=m.useRef(!1),w=yt(d),b=Ag(u);return m.useEffect(()=>{const C=()=>{y.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>y.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),l.jsx(mg,{...h,children:l.jsx(Mk,{scope:r,open:s,onOpenChange:w,content:g,onContentChange:v,children:l.jsx(Ik,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:y,dir:b,modal:p,children:i})})})};ev.displayName=Xo;var Lk="MenuAnchor",vc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Vi(s);return l.jsx(gg,{...u,...i,ref:r})});vc.displayName=Lk;var xc="MenuPortal",[Dk,tv]=rr(xc,{forceMount:void 0}),nv=t=>{const{__scopeMenu:r,forceMount:s,children:i,container:u}=t,d=or(xc,r);return l.jsx(Dk,{scope:r,forceMount:s,children:l.jsx(Fn,{present:s||d.open,children:l.jsx(ec,{asChild:!0,container:u,children:i})})})};nv.displayName=xc;var jt="MenuContent",[Fk,yc]=rr(jt),rv=m.forwardRef((t,r)=>{const s=tv(jt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Zo(jt,t.__scopeMenu);return l.jsx(Ho.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Ho.Slot,{scope:t.__scopeMenu,children:p.modal?l.jsx($k,{...u,ref:r}):l.jsx(zk,{...u,ref:r})})})})}),$k=m.forwardRef((t,r)=>{const s=or(jt,t.__scopeMenu),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return KC(d)},[]),l.jsx(wc,{...t,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:fe(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),zk=m.forwardRef((t,r)=>{const s=or(jt,t.__scopeMenu);return l.jsx(wc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),Uk=LC("MenuContent.ScrollLock"),wc=m.forwardRef((t,r)=>{const{__scopeMenu:s,loop:i=!1,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:g,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,disableOutsideScroll:k,...S}=t,E=or(jt,s),P=Zo(jt,s),A=Vi(s),_=Jg(s),L=Ok(s),[D,O]=m.useState(null),z=m.useRef(null),U=He(r,z,E.onContentChange),J=m.useRef(0),ne=m.useRef(""),te=m.useRef(0),Y=m.useRef(null),ue=m.useRef("right"),X=m.useRef(0),me=k?Yg:m.Fragment,ie=k?{as:Uk,allowPinchZoom:!0}:void 0,le=B=>{const G=ne.current+B,R=L().filter(he=>!he.disabled),W=document.activeElement,$=R.find(he=>he.ref.current===W)?.textValue,oe=R.map(he=>he.textValue),ge=Jk(oe,G,$),xe=R.find(he=>he.textValue===ge)?.ref.current;(function he(be){ne.current=be,window.clearTimeout(J.current),be!==""&&(J.current=window.setTimeout(()=>he(""),1e3))})(G),xe&&setTimeout(()=>xe.focus())};m.useEffect(()=>()=>window.clearTimeout(J.current),[]),gC();const H=m.useCallback(B=>ue.current===Y.current?.side&&tE(B,Y.current?.area),[]);return l.jsx(Fk,{scope:s,searchRef:ne,onItemEnter:m.useCallback(B=>{H(B)&&B.preventDefault()},[H]),onItemLeave:m.useCallback(B=>{H(B)||(z.current?.focus(),O(null))},[H]),onTriggerLeave:m.useCallback(B=>{H(B)&&B.preventDefault()},[H]),pointerGraceTimerRef:te,onPointerGraceIntentChange:m.useCallback(B=>{Y.current=B},[]),children:l.jsx(me,{...ie,children:l.jsx(Mg,{asChild:!0,trapped:u,onMountAutoFocus:fe(d,B=>{B.preventDefault(),z.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:l.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,children:l.jsx(MC,{asChild:!0,..._,dir:P.dir,orientation:"vertical",loop:i,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:fe(g,B=>{P.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(vg,{role:"menu","aria-orientation":"vertical","data-state":yv(E.open),"data-radix-menu-content":"",dir:P.dir,...A,...S,ref:U,style:{outline:"none",...S.style},onKeyDown:fe(S.onKeyDown,B=>{const R=B.target.closest("[data-radix-menu-content]")===B.currentTarget,W=B.ctrlKey||B.altKey||B.metaKey,$=B.key.length===1;R&&(B.key==="Tab"&&B.preventDefault(),!W&&$&&le(B.key));const oe=z.current;if(B.target!==oe||!Pk.includes(B.key))return;B.preventDefault();const xe=L().filter(he=>!he.disabled).map(he=>he.ref.current);Xg.includes(B.key)&&xe.reverse(),Xk(xe)}),onBlur:fe(t.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(J.current),ne.current="")}),onPointerMove:fe(t.onPointerMove,Bo(B=>{const G=B.target,R=X.current!==B.clientX;if(B.currentTarget.contains(G)&&R){const W=B.clientX>X.current?"right":"left";ue.current=W,X.current=B.clientX}}))})})})})})})});rv.displayName=jt;var Hk="MenuGroup",bc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{role:"group",...i,ref:r})});bc.displayName=Hk;var Bk="MenuLabel",ov=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{...i,ref:r})});ov.displayName=Bk;var Pi="MenuItem",Th="menu.itemSelect",Qi=m.forwardRef((t,r)=>{const{disabled:s=!1,onSelect:i,...u}=t,d=m.useRef(null),p=Zo(Pi,t.__scopeMenu),h=yc(Pi,t.__scopeMenu),g=He(r,d),v=m.useRef(!1),y=()=>{const w=d.current;if(!s&&w){const b=new CustomEvent(Th,{bubbles:!0,cancelable:!0});w.addEventListener(Th,C=>i?.(C),{once:!0}),Ju(w,b),b.defaultPrevented?v.current=!1:p.onClose()}};return l.jsx(sv,{...u,ref:g,disabled:s,onClick:fe(t.onClick,y),onPointerDown:w=>{t.onPointerDown?.(w),v.current=!0},onPointerUp:fe(t.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:fe(t.onKeyDown,w=>{const b=h.searchRef.current!=="";s||b&&w.key===" "||$u.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})});Qi.displayName=Pi;var sv=m.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:i=!1,textValue:u,...d}=t,p=yc(Pi,s),h=Jg(s),g=m.useRef(null),v=He(r,g),[y,w]=m.useState(!1),[b,C]=m.useState("");return m.useEffect(()=>{const k=g.current;k&&C((k.textContent??"").trim())},[d.children]),l.jsx(Ho.ItemSlot,{scope:s,disabled:i,textValue:u??b,children:l.jsx(IC,{asChild:!0,...h,focusable:!i,children:l.jsx(je.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...d,ref:v,onPointerMove:fe(t.onPointerMove,Bo(k=>{i?p.onItemLeave(k):(p.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:fe(t.onPointerLeave,Bo(k=>p.onItemLeave(k))),onFocus:fe(t.onFocus,()=>w(!0)),onBlur:fe(t.onBlur,()=>w(!1))})})})}),Wk="MenuCheckboxItem",iv=m.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:i,...u}=t;return l.jsx(dv,{scope:t.__scopeMenu,checked:s,children:l.jsx(Qi,{role:"menuitemcheckbox","aria-checked":Ti(s)?"mixed":s,...u,ref:r,"data-state":Cc(s),onSelect:fe(u.onSelect,()=>i?.(Ti(s)?!0:!s),{checkForDefaultPrevented:!1})})})});iv.displayName=Wk;var av="MenuRadioGroup",[Kk,Vk]=rr(av,{value:void 0,onValueChange:()=>{}}),lv=m.forwardRef((t,r)=>{const{value:s,onValueChange:i,...u}=t,d=yt(i);return l.jsx(Kk,{scope:t.__scopeMenu,value:s,onValueChange:d,children:l.jsx(bc,{...u,ref:r})})});lv.displayName=av;var uv="MenuRadioItem",cv=m.forwardRef((t,r)=>{const{value:s,...i}=t,u=Vk(uv,t.__scopeMenu),d=s===u.value;return l.jsx(dv,{scope:t.__scopeMenu,checked:d,children:l.jsx(Qi,{role:"menuitemradio","aria-checked":d,...i,ref:r,"data-state":Cc(d),onSelect:fe(i.onSelect,()=>u.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});cv.displayName=uv;var Sc="MenuItemIndicator",[dv,Qk]=rr(Sc,{checked:!1}),fv=m.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:i,...u}=t,d=Qk(Sc,s);return l.jsx(Fn,{present:i||Ti(d.checked)||d.checked===!0,children:l.jsx(je.span,{...u,ref:r,"data-state":Cc(d.checked)})})});fv.displayName=Sc;var Gk="MenuSeparator",pv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});pv.displayName=Gk;var qk="MenuArrow",hv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Vi(s);return l.jsx(xg,{...u,...i,ref:r})});hv.displayName=qk;var Yk="MenuSub",[tj,mv]=rr(Yk),Lo="MenuSubTrigger",gv=m.forwardRef((t,r)=>{const s=or(Lo,t.__scopeMenu),i=Zo(Lo,t.__scopeMenu),u=mv(Lo,t.__scopeMenu),d=yc(Lo,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:g}=d,v={__scopeMenu:t.__scopeMenu},y=m.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return m.useEffect(()=>y,[y]),m.useEffect(()=>{const w=h.current;return()=>{window.clearTimeout(w),g(null)}},[h,g]),l.jsx(vc,{asChild:!0,...v,children:l.jsx(sv,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":u.contentId,"data-state":yv(s.open),...t,ref:Ur(r,u.onTriggerChange),onClick:w=>{t.onClick?.(w),!(t.disabled||w.defaultPrevented)&&(w.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:fe(t.onPointerMove,Bo(w=>{d.onItemEnter(w),!w.defaultPrevented&&!t.disabled&&!s.open&&!p.current&&(d.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{s.onOpenChange(!0),y()},100))})),onPointerLeave:fe(t.onPointerLeave,Bo(w=>{y();const b=s.content?.getBoundingClientRect();if(b){const C=s.content?.dataset.side,k=C==="right",S=k?-5:5,E=b[k?"left":"right"],P=b[k?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+S,y:w.clientY},{x:E,y:b.top},{x:P,y:b.top},{x:P,y:b.bottom},{x:E,y:b.bottom}],side:C}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(w),w.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:fe(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||Tk[i.dir].includes(w.key)&&(s.onOpenChange(!0),s.content?.focus(),w.preventDefault())})})})});gv.displayName=Lo;var vv="MenuSubContent",xv=m.forwardRef((t,r)=>{const s=tv(jt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(jt,t.__scopeMenu),p=Zo(jt,t.__scopeMenu),h=mv(vv,t.__scopeMenu),g=m.useRef(null),v=He(r,g);return l.jsx(Ho.Provider,{scope:t.__scopeMenu,children:l.jsx(Fn,{present:i||d.open,children:l.jsx(Ho.Slot,{scope:t.__scopeMenu,children:l.jsx(wc,{id:h.contentId,"aria-labelledby":h.triggerId,...u,ref:v,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{p.isUsingKeyboardRef.current&&g.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:fe(t.onFocusOutside,y=>{y.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:fe(t.onEscapeKeyDown,y=>{p.onClose(),y.preventDefault()}),onKeyDown:fe(t.onKeyDown,y=>{const w=y.currentTarget.contains(y.target),b=_k[p.dir].includes(y.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),y.preventDefault())})})})})})});xv.displayName=vv;function yv(t){return t?"open":"closed"}function Ti(t){return t==="indeterminate"}function Cc(t){return Ti(t)?"indeterminate":t?"checked":"unchecked"}function Xk(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function Zk(t,r){return t.map((s,i)=>t[(r+i)%t.length])}function Jk(t,r,s){const u=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,d=s?t.indexOf(s):-1;let p=Zk(t,Math.max(d,0));u.length===1&&(p=p.filter(v=>v!==s));const g=p.find(v=>v.toLowerCase().startsWith(u.toLowerCase()));return g!==s?g:void 0}function eE(t,r){const{x:s,y:i}=t;let u=!1;for(let d=0,p=r.length-1;d<r.length;p=d++){const h=r[d],g=r[p],v=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-v)*(i-y)/(b-y)+v&&(u=!u)}return u}function tE(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return eE(s,r)}function Bo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var nE=ev,rE=vc,oE=nv,sE=rv,iE=bc,aE=ov,lE=Qi,uE=iv,cE=lv,dE=cv,fE=fv,pE=pv,hE=hv,mE=gv,gE=xv,Gi="DropdownMenu",[vE]=Dn(Gi,[Zg]),st=Zg(),[xE,wv]=vE(Gi),bv=t=>{const{__scopeDropdownMenu:r,children:s,dir:i,open:u,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,g=st(r),v=m.useRef(null),[y,w]=Vo({prop:u,defaultProp:d??!1,onChange:p,caller:Gi});return l.jsx(xE,{scope:r,triggerId:$o(),triggerRef:v,contentId:$o(),open:y,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:l.jsx(nE,{...g,open:y,onOpenChange:w,dir:i,modal:h,children:s})})};bv.displayName=Gi;var Sv="DropdownMenuTrigger",Cv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:i=!1,...u}=t,d=wv(Sv,s),p=st(s);return l.jsx(rE,{asChild:!0,...p,children:l.jsx(je.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:Ur(r,d.triggerRef),onPointerDown:fe(t.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:fe(t.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});Cv.displayName=Sv;var yE="DropdownMenuPortal",kv=t=>{const{__scopeDropdownMenu:r,...s}=t,i=st(r);return l.jsx(oE,{...i,...s})};kv.displayName=yE;var Ev="DropdownMenuContent",Nv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=wv(Ev,s),d=st(s),p=m.useRef(!1);return l.jsx(sE,{id:u.contentId,"aria-labelledby":u.triggerId,...d,...i,ref:r,onCloseAutoFocus:fe(t.onCloseAutoFocus,h=>{p.current||u.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:fe(t.onInteractOutside,h=>{const g=h.detail.originalEvent,v=g.button===0&&g.ctrlKey===!0,y=g.button===2||v;(!u.modal||y)&&(p.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nv.displayName=Ev;var wE="DropdownMenuGroup",bE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(iE,{...u,...i,ref:r})});bE.displayName=wE;var SE="DropdownMenuLabel",jv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(aE,{...u,...i,ref:r})});jv.displayName=SE;var CE="DropdownMenuItem",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(lE,{...u,...i,ref:r})});Rv.displayName=CE;var kE="DropdownMenuCheckboxItem",Pv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(uE,{...u,...i,ref:r})});Pv.displayName=kE;var EE="DropdownMenuRadioGroup",NE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(cE,{...u,...i,ref:r})});NE.displayName=EE;var jE="DropdownMenuRadioItem",Tv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(dE,{...u,...i,ref:r})});Tv.displayName=jE;var RE="DropdownMenuItemIndicator",_v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(fE,{...u,...i,ref:r})});_v.displayName=RE;var PE="DropdownMenuSeparator",Ov=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(pE,{...u,...i,ref:r})});Ov.displayName=PE;var TE="DropdownMenuArrow",_E=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(hE,{...u,...i,ref:r})});_E.displayName=TE;var OE="DropdownMenuSubTrigger",Av=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(mE,{...u,...i,ref:r})});Av.displayName=OE;var AE="DropdownMenuSubContent",Mv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(gE,{...u,...i,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mv.displayName=AE;var ME=bv,IE=Cv,LE=kv,Iv=Nv,Lv=jv,Dv=Rv,Fv=Pv,$v=Tv,zv=_v,Uv=Ov,Hv=Av,Bv=Mv;const DE=ME,FE=IE,$E=m.forwardRef(({className:t,inset:r,children:s,...i},u)=>l.jsxs(Hv,{ref:u,className:De("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...i,children:[s,l.jsx(M0,{className:"ml-auto"})]}));$E.displayName=Hv.displayName;const zE=m.forwardRef(({className:t,...r},s)=>l.jsx(Bv,{ref:s,className:De("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...r}));zE.displayName=Bv.displayName;const Wv=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(LE,{children:l.jsx(Iv,{ref:i,sideOffset:r,className:De("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...s})}));Wv.displayName=Iv.displayName;const UE=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx(Dv,{ref:i,className:De("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...s}));UE.displayName=Dv.displayName;const HE=m.forwardRef(({className:t,children:r,checked:s,...i},u)=>l.jsxs(Fv,{ref:u,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:s,...i,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zv,{children:l.jsx(A0,{className:"h-4 w-4"})})}),r]}));HE.displayName=Fv.displayName;const BE=m.forwardRef(({className:t,children:r,...s},i)=>l.jsxs($v,{ref:i,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zv,{children:l.jsx(L0,{className:"h-2 w-2 fill-current"})})}),r]}));BE.displayName=$v.displayName;const WE=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx(Lv,{ref:i,className:De("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...s}));WE.displayName=Lv.displayName;const KE=m.forwardRef(({className:t,...r},s)=>l.jsx(Uv,{ref:s,className:De("-mx-1 my-1 h-px bg-muted",t),...r}));KE.displayName=Uv.displayName;function VE(t){return t.replace("_"," ").toUpperCase()}function QE(t){return t==="in_progress"?"border-foreground text-foreground animate-pulse":t==="failed"?"border-destructive text-destructive":t==="warning"?"border-warning-border bg-warning-muted text-warning-foreground":t==="resolved"?"border-foreground/20 text-muted-foreground":t==="rejected"?"border-foreground/20 text-muted-foreground line-through":t==="flagged"?"border-foreground/40 text-foreground/60":t==="queued"?"border-foreground text-foreground":"border-foreground/30 text-foreground/60"}function Kv(t){return t==="resolved"||t==="rejected"}function GE(t){return Kv(t)||t==="warning"}function Vv(t){return t.length===0?!1:t.every(r=>Kv(r.status))}function Wo(t){return t.reduce((r,s)=>(s.status==="queued"?r.queued+=1:s.status==="in_progress"?r.inProgress+=1:s.status==="failed"?r.failed+=1:s.status==="warning"&&(r.warning+=1),r),{queued:0,inProgress:0,failed:0,warning:0})}const qE={idle:"IDLE",triaging:"TRIAGING",awaiting_repair_slot:"REPAIR QUEUED",repairing:"REPAIRING",awaiting_ci:"WAITING FOR CI",verifying:"VERIFYING",healed:"HEALED",cooldown:"COOLDOWN",blocked:"BLOCKED",escalated:"ESCALATED",superseded:"SUPERSEDED"},YE={idle:[],triaging:["cancel"],awaiting_repair_slot:["pause","cancel"],repairing:["pause","cancel"],awaiting_ci:["pause","cancel"],verifying:["cancel"],healed:[],cooldown:["resume","cancel"],blocked:["retry"],escalated:["retry"],superseded:[]},XE={idle:"neutral",triaging:"info",awaiting_repair_slot:"warning",repairing:"info",awaiting_ci:"info",verifying:"info",healed:"success",cooldown:"warning",blocked:"danger",escalated:"danger",superseded:"neutral"},ZE={idle:"Waiting for a new failing check on the current PR head.",triaging:"Classifying the current failure set before deciding whether it is safe to repair.",awaiting_repair_slot:"Ready for the next bounded repair attempt as soon as a slot is free.",repairing:"A repair agent is actively working in an isolated worktree.",awaiting_ci:"A repair was pushed and the new head SHA is waiting for CI to settle.",verifying:"Comparing the latest check results against the previous failure fingerprint.",healed:"The latest repair cycle converged to green and the session is complete.",cooldown:"Cooling down before another retry is allowed.",blocked:"Stopped because the failure looks external or unsafe to repair in-branch.",escalated:"Stopped because retries were exhausted or the failure did not improve.",superseded:"Replaced after the PR head moved to a newer commit."};function JE(t){return qE[t]}function eN(t){return YE[t]}function _h(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function tN(t){return XE[t]}function nN(t){return ZE[t]}function rN(t){const r=t.attemptCount,s=r===1?"":"s";return r===0?t.state==="triaging"?"Preparing attempt 1":t.state==="awaiting_repair_slot"?"Queued for attempt 1":t.state==="healed"?"Healed without a repair attempt":"No repair attempts yet":t.state==="repairing"?`Attempt ${r} running`:t.state==="awaiting_ci"?`Attempt ${r} pushed, waiting on CI`:t.state==="verifying"?`Attempt ${r} verifying`:t.state==="healed"?`Healed after ${r} attempt${s}`:t.state==="blocked"?`${r} attempt${s} before blocking`:t.state==="escalated"?`${r} attempt${s} before escalation`:t.state==="cooldown"?`${r} attempt${s}, cooling down`:t.state==="superseded"?`${r} attempt${s}, superseded`:`${r} attempt${s} recorded`}function oN(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function sN(t,r){const s=t.filter(i=>i.prId===r);return s.length===0?null:s.reduce((i,u)=>u.updatedAt>i.updatedAt?u:i)}function iN(t,r){return sN(t,r)}function aN(t,r){return{stateLabel:JE(t.state),tone:tN(t.state),attemptSummary:rN(t),reasonSummary:oN(t),statusHint:nN(t.state),actions:eN(t.state).map(s=>({label:_h(s),available:!0,hint:`${_h(s)} controls are planned but not wired to the backend yet.`}))}}function Lt(t){return t?new Date(t).toLocaleTimeString("en-US",{hour12:!1}):null}function Qv(t){return t.watchEnabled}function Gv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function lN(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}function Oh(t,r){return t.reduce((s,i)=>i.targetId!==r?s:!s||Date.parse(i.updatedAt)>Date.parse(s.updatedAt)?i:s,void 0)}function Ah(t){return t.feedbackItems.find(s=>(s.status==="failed"||s.status==="warning")&&!!s.statusReason)?.statusReason??null}const uN=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],cN={failed:[],inProgress:[],queued:[],warnings:[],generatedAt:""},pu=200,Mh="oh-my-pr:tracked-repos-open";function dN(t){return t===!1?"team":"mine"}const Ih={neutral:"border-border text-muted-foreground",info:"border-foreground text-foreground",warning:"border-warning-border bg-warning-muted text-warning-foreground",success:"border-success-border bg-success-muted text-success-foreground",danger:"border-destructive text-destructive"};function qv({status:t}){const r=t==="watching"?"bg-foreground/30":t==="processing"?"bg-foreground animate-pulse":t==="done"?"bg-foreground":t==="archived"?"bg-foreground/15":"bg-destructive";return l.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 ${r}`})}function fN({status:t}){const r=QE(t);return l.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:VE(t)})}function zu(){return l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"watch paused"})}function Lh({value:t,onChange:r,disabled:s,name:i,testIdPrefix:u,compact:d=!1}){return l.jsx("div",{role:"radiogroup","aria-label":"Automatic PR tracking scope",className:`flex flex-wrap gap-1 ${d?"":"mt-1"}`,children:uN.map(p=>{const h=t===p.value;return l.jsxs("label",{"data-testid":`${u}-${p.value}`,className:`cursor-pointer border px-2 text-[10px] transition-colors focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1 focus-within:ring-offset-background ${d?"py-0.5":"py-1"} ${h?"border-foreground bg-muted text-foreground":"border-border text-muted-foreground hover:text-foreground"} ${s?"cursor-not-allowed opacity-50":""} whitespace-nowrap`,children:[l.jsx("input",{type:"radio",name:i,value:p.value,checked:h,onChange:()=>r(p.value),disabled:s,className:"sr-only"}),p.label]},p.value)})})}function pN({activity:t}){const r=t.status==="failed"?Lt(t.updatedAt):t.status==="in_progress"?Lt(t.startedAt)??Lt(t.updatedAt):Lt(t.availableAt)??Lt(t.queuedAt),s=l.jsxs("div",{className:"flex min-w-0 items-start gap-2 px-2 py-1.5 text-left",children:[l.jsx("span",{className:`mt-1.5 h-1.5 w-1.5 shrink-0 ${t.status==="failed"?"bg-destructive":t.status==="in_progress"?"animate-pulse bg-foreground":"bg-muted-foreground"}`}),l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block truncate text-[12px] leading-4 text-foreground",children:t.label}),t.detail&&l.jsx("span",{className:"block truncate text-[11px] leading-4 text-muted-foreground",children:t.detail}),t.status==="failed"&&t.lastError&&l.jsx("span",{className:"block whitespace-pre-wrap break-words text-[11px] leading-4 text-destructive",title:t.lastError,children:t.lastError})]}),r&&l.jsx("span",{className:"shrink-0 text-[10px] leading-4 text-muted-foreground",children:r})]});return t.targetUrl?l.jsx("a",{href:t.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"block outline-none hover:bg-muted focus:bg-muted focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:s}):l.jsx("div",{children:s})}function hu({title:t,items:r,emptyLabel:s}){return l.jsxs("div",{className:"py-1",children:[l.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),r.length>0?l.jsx("div",{className:"max-h-52 overflow-y-auto",children:r.map(i=>l.jsx(pN,{activity:i},i.id))}):l.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:s})]})}function hN({activities:t,onClearFailed:r,isClearingFailed:s}){const i=t.failed.length,u=t.inProgress.length,d=t.queued.length,p=i+u+d;return l.jsxs(DE,{children:[l.jsxs(FE,{className:"inline-flex items-center gap-1 border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-label":"Open activity menu","data-testid":"activity-menu-trigger",children:[l.jsx(O0,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:"activity"}),l.jsx("span",{className:"text-foreground",children:p})]}),l.jsxs(Wv,{align:"end",className:"w-80 p-0",children:[l.jsxs("div",{className:"border-b border-border px-2 py-2",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium",children:"Activities"}),i>0&&l.jsx("button",{type:"button",onClick:r,disabled:s,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"clear-failed-activities",children:s?"clearing":"clear failed"})]}),l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[i," failed / ",u," in progress / ",d," queued"]})]}),l.jsx(hu,{title:"Failed",items:t.failed,emptyLabel:"No failed activities."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(hu,{title:"In progress",items:t.inProgress,emptyLabel:"No activities running right now."}),l.jsx("div",{className:"border-t border-border"}),l.jsx(hu,{title:"Queued",items:t.queued,emptyLabel:"Queue is empty."})]})]})}function mN({warnings:t}){return t.length===0?null:l.jsx("div",{className:"shrink-0 border-b border-yellow-600/50 bg-yellow-500/10 px-4 py-3","data-testid":"operator-warnings-banner",children:l.jsx("div",{className:"space-y-3",children:t.map(r=>l.jsxs("div",{"data-testid":`operator-warning-${r.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[12px] font-medium uppercase tracking-wider text-yellow-600",children:r.title}),r.targetUrl&&l.jsx("a",{href:r.targetUrl,target:"_blank",rel:"noopener noreferrer",className:"border border-yellow-600/60 px-2 py-0.5 text-[10px] uppercase tracking-wider text-yellow-600 transition-colors hover:bg-yellow-600 hover:text-background",children:"Open PR"})]}),l.jsx("div",{className:"mt-1 text-[12px] text-foreground/80",children:r.message}),l.jsx("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-[11px] text-muted-foreground",children:r.fixSteps.map(s=>l.jsx("li",{children:s},s))})]},r.id))})})}function Yv({href:t,testId:r,label:s,hint:i,className:u,dotClassName:d,hintClassName:p,onClick:h}){return l.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:h,"data-testid":r,className:`inline-flex items-center border border-success-border bg-success-muted font-medium uppercase text-success-foreground transition-colors hover:bg-success-muted/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background ${u}`,children:[l.jsx("span",{className:`inline-block rounded-full bg-success ${d}`}),s,i&&l.jsx("span",{className:p,children:i})]})}function Xv({pr:t}){const r=Wo(t.feedbackItems).inProgress;if(!(t.status==="processing")&&r===0)return null;const i=r>0?`${r} agent${r!==1?"s":""} running on this PR`:"Agent run active on this PR";return l.jsxs(rC,{children:[l.jsx(oC,{asChild:!0,children:l.jsxs("span",{className:"inline-flex shrink-0 cursor-default items-center gap-0.5 text-[12px]","data-testid":`agent-indicator-${t.id}`,children:[l.jsx("span",{className:"animate-pulse",children:"🤖"}),r>0&&l.jsx("span",{className:"text-[10px] text-muted-foreground",children:r})]})}),l.jsx(jg,{side:"top",children:l.jsx("p",{className:"text-xs",children:i})})]})}const gN=m.memo(function({pr:r,isSelected:s,onSelect:i,failureMessage:u}){const d=Lt(r.lastChecked),p=Qv(r),g=!(r.status==="processing"||Wo(r.feedbackItems).inProgress>0)&&Vv(r.feedbackItems);return l.jsx("div",{onClick:()=>i(r.id),onKeyDown:v=>{v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(r.id))},role:"button",tabIndex:0,"data-testid":`pr-row-${r.id}`,className:`w-full border-b border-border px-4 py-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${s?"bg-muted":""}`,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(qv,{status:r.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"w-12 shrink-0 text-muted-foreground",children:["#",r.number]}),l.jsx("span",{className:"truncate",children:r.title}),l.jsx(Xv,{pr:r})]}),g&&l.jsx(Yv,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:v=>v.stopPropagation(),className:"mt-1.5 ml-[3.75rem] gap-1.5 px-2 py-0.5 text-[11px] tracking-wider",dotClassName:"h-1.5 w-1.5",hintClassName:"text-[10px] normal-case tracking-normal text-success-foreground/75"}),r.status==="error"&&u&&l.jsxs("div",{className:"mt-2 ml-[3.75rem] border border-destructive/40 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Error:"})," ",l.jsx("span",{className:"break-words",children:u})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 pl-[3.75rem] text-[11px] text-muted-foreground",children:[l.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),className:"underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r.repo}),l.jsx("span",{children:Gv(r.status)}),!p&&l.jsx(zu,{}),r.feedbackItems.length>0&&(()=>{const v=Wo(r.feedbackItems),y=[];return v.queued>0&&y.push(`${v.queued}q`),v.inProgress>0&&y.push(`${v.inProgress} active`),v.failed>0&&y.push(`${v.failed} failed`),v.warning>0&&y.push(`${v.warning} warn`),y.length===0?l.jsxs("span",{children:[r.feedbackItems.length," items"]}):l.jsx("span",{children:y.join(" · ")})})(),d&&l.jsxs("span",{children:["checked ",d]})]})]})]})})});function vN({item:t,prId:r,readOnly:s}){const i=Je({mutationFn:async g=>(await Ge("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:g})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]})}}),u=Je({mutationFn:async()=>(await Ge("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs",r]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:g=>{It("Could not retry feedback item",g)}}),d=Lt(t.createdAt),p=GE(t.status),h=(t.status==="failed"||t.status==="warning")&&t.statusReason?t.statusReason:null;return l.jsxs(Mu,{defaultOpen:!p,className:"border-b border-border",children:[l.jsx("div",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"shrink-0 pt-0.5",children:l.jsx(fN,{status:t.status})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"font-medium",children:t.author}),t.file&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.file,t.line?`:${t.line}`:""]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.type.replace("_"," ")}),d&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:d})]}),h&&l.jsxs("div",{className:"mt-1 whitespace-pre-wrap break-words border border-destructive/30 bg-destructive/10 px-2 py-1 text-[11px] leading-4 text-destructive",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider",children:"Failure reason:"})," ",h]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!s&&(t.status==="failed"||t.status==="warning")&&l.jsx("button",{type:"button",onClick:()=>u.mutate(),disabled:u.isPending,"data-testid":`retry-${t.id}`,"aria-label":`Retry feedback from ${t.author}`,title:"Retry feedback item",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Retry"}),l.jsx(Iu,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":`toggle-${t.id}`,"aria-label":`${p?"Show":"Hide"} feedback details from ${t.author}`,title:"Toggle feedback details",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"Details"})}),!s&&["accept","reject","flag"].map(g=>l.jsx("button",{type:"button",onClick:()=>i.mutate(g),"data-testid":`override-${g}-${t.id}`,"aria-label":`${g} feedback from ${t.author}`,className:`px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background ${t.decision===g?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:g},g))]})]})}),l.jsx(Lu,{children:l.jsxs("div",{className:"px-4 pb-3",children:[t.bodyHtml?l.jsx("div",{className:"feedback-markdown text-[12px] leading-relaxed",dangerouslySetInnerHTML:{__html:t.bodyHtml}}):l.jsx("p",{className:"whitespace-pre-wrap text-[12px] leading-relaxed text-foreground/80",children:t.body}),t.statusReason&&!h&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Status reason:"})," ",t.statusReason]}),t.decisionReason&&l.jsxs("p",{className:"mt-2 whitespace-pre-wrap break-words text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"font-medium uppercase tracking-wider text-foreground/70",children:"Decision reason:"})," ",t.decisionReason]})]})})]})}function xN({prId:t}){const r=m.useRef(null),{data:s=[]}=ot({queryKey:["/api/logs",t??"all"],queryFn:async()=>{const d=t?`/api/logs?prId=${encodeURIComponent(t)}`:"/api/logs";return(await Ge("GET",d)).json()},refetchInterval:1500}),i=m.useMemo(()=>s.length>pu?s.slice(-pu):s,[s]),u=s.length-i.length;return m.useEffect(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[s.length,t]),l.jsx("div",{className:"flex h-full flex-col",children:l.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-relaxed",children:s.length===0?l.jsx("span",{className:"text-muted-foreground",children:"No log entries."}):l.jsxs(l.Fragment,{children:[u>0&&l.jsxs("div",{className:"border-b border-border/60 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:["Showing latest ",pu," of ",s.length," entries."]}),i.map(d=>{const p=d.metadata&&Object.keys(d.metadata).length>0?JSON.stringify(d.metadata,null,2):null;return l.jsxs("div",{className:"border-b border-border/60 py-2 last:border-b-0","data-testid":`log-${d.id}`,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("span",{children:Lt(d.timestamp)}),l.jsx("span",{className:d.level==="error"?"text-destructive":d.level==="warn"?"text-foreground/80":"text-foreground/55",children:d.level}),d.phase&&l.jsx("span",{className:"border border-border px-1 py-0",children:d.phase}),d.runId&&l.jsxs("span",{className:"normal-case text-foreground/45",children:["run ",d.runId.slice(0,8)]})]}),l.jsx("div",{className:`mt-1 break-words ${d.level==="error"?"text-destructive":"text-foreground/75"}`,children:d.message}),p&&l.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px] text-muted-foreground",children:p})]},d.id)})]})})})}function yN({pr:t,config:r,healingSessions:s}){const i=iN(s,t.id),u=i?aN(i):null,d=u?Ih[u.tone]:Ih.neutral;return l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3","data-testid":"panel-ci-healing",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"CI healing"}),l.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:u?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:`inline-flex border px-1.5 py-0.5 text-[11px] uppercase tracking-wider ${d}`,children:u.stateLabel}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:u.attemptSummary})]}):l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?.autoHealCI===!1?"Automatic CI healing is disabled in settings.":"No healing session yet for this PR."})})]}),i&&l.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["head ",i.currentHeadSha.slice(0,7)]})]}),u?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mt-2 grid gap-1 text-[11px] text-muted-foreground",children:[u.reasonSummary&&l.jsxs("div",{children:["Reason: ",u.reasonSummary]}),l.jsx("div",{children:u.statusHint}),l.jsxs("div",{children:["Attempts: ",u.attemptSummary,i?.latestFingerprint?` · fingerprint ${i.latestFingerprint}`:""]})]}),u.actions.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:u.actions.map(p=>l.jsx("button",{type:"button",disabled:!0,title:p.hint,className:`border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors ${p.available?"border-border text-foreground/70 hover:bg-muted":"border-border text-muted-foreground/60"} disabled:opacity-100`,children:p.label},p.label))}),l.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:"Operator controls are read-only until healing action endpoints are added."})]})]}):r?.autoHealCI!==!1&&l.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:"The watcher will create a healing session when a failing check is classified as healable."})]})}function wN({prId:t,prStatus:r}){const[s,i]=m.useState("ask");return m.useEffect(()=>{r==="error"&&i("activity")},[t,r]),l.jsxs("div",{className:"flex min-h-[24rem] w-full shrink-0 flex-col border-t border-border lg:min-h-0 lg:w-80 lg:border-l lg:border-t-0",children:[l.jsxs("div",{className:"flex border-b border-border",children:[l.jsx("button",{type:"button",onClick:()=>i("ask"),"data-testid":"tab-ask",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${s==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),l.jsx("button",{type:"button",onClick:()=>i("activity"),"data-testid":"tab-activity",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${s==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),l.jsx("div",{className:"flex-1 overflow-hidden",children:s==="activity"?l.jsx(xN,{prId:t}):t?l.jsx(bN,{prId:t}):l.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR to ask questions."})})]})}function bN({prId:t}){const[r,s]=m.useState(""),i=m.useRef(null),{data:u=[]}=ot({queryKey:["/api/prs",t,"questions"],refetchInterval:2e3}),d=Je({mutationFn:p=>Ge("POST",`/api/prs/${t}/questions`,{question:p}).then(h=>h.json()),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),s("")}});return m.useEffect(()=>{const p=i.current;p&&(p.scrollTop=p.scrollHeight)},[u.length,u[u.length-1]?.status]),l.jsxs("div",{className:"flex h-full flex-col",children:[l.jsx("div",{className:"border-b border-border px-4 py-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:"Ask Agent"}),l.jsx("div",{ref:i,className:"flex-1 overflow-y-auto p-4 space-y-3",children:u.length===0?l.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Ask questions about this PR — the agent will read activity logs, feedback, and status to answer."}):u.map(p=>l.jsxs("div",{className:"space-y-1.5","data-testid":`question-${p.id}`,children:[l.jsxs("div",{className:"text-[12px]",children:[l.jsx("span",{className:"font-medium text-foreground/90",children:"Q: "}),l.jsx("span",{className:"text-foreground/80",children:p.question})]}),p.status==="pending"||p.status==="answering"?l.jsx("div",{className:"text-[11px] text-muted-foreground animate-pulse",children:"Agent is thinking..."}):p.status==="error"?l.jsxs("div",{className:"text-[11px] text-destructive",children:["Error: ",p.error||"Unknown error"]}):l.jsx("div",{className:"text-[12px] leading-relaxed text-foreground/75 whitespace-pre-wrap border-l-2 border-border pl-3",children:p.answer}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Lt(p.createdAt),p.answeredAt&&` — answered ${Lt(p.answeredAt)}`]})]},p.id))}),l.jsxs("form",{onSubmit:p=>{p.preventDefault(),r.trim()&&!d.isPending&&d.mutate(r.trim())},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:r,onChange:p=>s(p.target.value),placeholder:"Was the review done? Why did this fail?","aria-label":"Question for selected pull request","data-testid":"input-question",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:d.isPending||!r.trim(),"data-testid":"button-ask",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:d.isPending?"...":"Ask"})]}),d.isError&&l.jsx("div",{className:"mt-1 text-[11px] text-destructive",children:Zv(d.error)})]})]})}function Zv(t){if(!(t instanceof Error))return String(t);const r=t.message.replace(/^\d+:\s*/,"").trim();if(!r)return"Request failed";try{const s=JSON.parse(r);if(typeof s.error=="string")return s.error;if(typeof s.message=="string")return s.message}catch{}return r}function It(t,r){vt({variant:"destructive",title:t,description:Zv(r)})}function SN(){const[t,r]=m.useState(null),[s,i]=m.useState(""),[u,d]=m.useState(""),[p,h]=m.useState(null),[g,v]=m.useState(()=>{if(typeof window>"u")return!0;try{const $=window.localStorage.getItem(Mh);return $===null?!0:$==="true"}catch{return!0}}),[y,w]=m.useState("mine"),[b,C]=m.useState("active");m.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Mh,String(g))}catch{}},[g]);const{data:k=[],isLoading:S}=ot({queryKey:["/api/prs"],refetchInterval:3e3}),{data:E=[],isLoading:P}=ot({queryKey:["/api/prs/archived"],refetchInterval:1e4}),{data:A}=ot({queryKey:["/api/config"],refetchInterval:5e3}),{data:_=[]}=ot({queryKey:["/api/healing-sessions"],queryFn:async()=>cm("/api/healing-sessions"),refetchInterval:5e3}),{data:L=cN}=ot({queryKey:["/api/activities"],refetchInterval:3e3}),{data:D=[]}=ot({queryKey:["/api/repos/settings"],refetchInterval:5e3}),O=b==="active"?k:E,z=b==="archived";m.useEffect(()=>{if(O.length===0){t!==null&&r(null);return}(!t||!O.some($=>$.id===t))&&r(O[0].id)},[O,t]);const U=O.find($=>$.id===t)??null,J=U?Qv(U):!0,ne=U?Oh(L.failed,U.id):void 0,te=U?.status==="error"?ne?.lastError??Ah(U)??"Automation stopped on this PR. Check the activity log for the full failure context.":null,Y=uC(p,D.length),ue=Je({mutationFn:async $=>(await Ge("POST","/api/prs",{url:$})).json(),onSuccess:$=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),i(""),r($.id)},onError:$=>{It("Could not add PR",$)}}),X=Je({mutationFn:async $=>(await Ge("POST",`/api/prs/${$}/apply`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:$=>{It("Could not run babysitter",$)}}),me=Je({mutationFn:async({id:$,enabled:oe})=>(await Ge("PATCH",`/api/prs/${$}/watch`,{enabled:oe})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/prs/archived"]}),ye.invalidateQueries({queryKey:["/api/logs"]})},onError:$=>{It("Could not update PR watch state",$)}}),ie=Je({mutationFn:async $=>(await Ge("PATCH","/api/config",$)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:$=>{It("Could not update settings",$)}}),le=Je({mutationFn:async()=>(await Ge("POST","/api/repos/sync")).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:$=>{It("Could not sync repositories",$)}}),H=Je({mutationFn:async()=>(await Ge("DELETE","/api/activities/failed")).json(),onSuccess:({cleared:$})=>{ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:$===1?"Cleared 1 failed activity.":`Cleared ${$} failed activities.`})},onError:$=>{It("Could not clear failed activities",$)}}),B=Je({mutationFn:async $=>(await Ge("POST","/api/repos/release",{repo:$})).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),ye.invalidateQueries({queryKey:["/api/activities"]}),vt({description:"Release queued."})},onError:$=>{It("Could not create release",$)}}),G=async $=>(await Ge("PATCH","/api/repos/settings",$)).json(),R=Je({mutationFn:G,onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:$=>{It("Could not update repository settings",$)}}),W=Je({mutationFn:async({repo:$})=>(await Ge("POST","/api/repos",{repo:$})).json(),onSuccess:async($,oe)=>{if(ye.invalidateQueries({queryKey:["/api/repos/settings"]}),ye.invalidateQueries({queryKey:["/api/prs"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),w("mine"),oe.watchScope==="team")try{await G({repo:$.repo,ownPrsOnly:!1}),ye.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(ge){It("Repository added, but could not update tracking scope",ge)}},onError:$=>{It("Could not watch repository",$)}});return l.jsxs("div",{className:"flex min-h-screen flex-col lg:h-screen lg:overflow-hidden",children:[l.jsx(qo,{}),l.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b border-border px-4 py-2.5 lg:flex-row lg:items-center lg:justify-between",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"autonomous"}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["poll ",lN(A?.pollIntervalMs)]}),l.jsx(Kt,{href:"/changelogs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"changelogs"}),l.jsx(Kt,{href:"/releases",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"releases"}),l.jsx(Kt,{href:"/logs",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"logs"})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[k.length," PR",k.length!==1?"s":""," in ",D.length," repo",D.length!==1?"s":""]}),l.jsx("label",{htmlFor:"dashboard-coding-agent",className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("select",{id:"dashboard-coding-agent",value:A?.codingAgent??"codex",onChange:$=>{const oe=$.target.value;ie.mutate({codingAgent:oe})},disabled:ie.isPending,"data-testid":"select-coding-agent",className:"border border-border bg-transparent px-2 py-0.5 text-[11px] focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]}),l.jsx(Kt,{href:"/settings",className:"border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(hN,{activities:L,onClearFailed:()=>H.mutate(),isClearingFailed:H.isPending})]})]}),l.jsx(pC,{}),l.jsx(mN,{warnings:L.warnings}),l.jsxs("div",{className:"flex flex-1 flex-col overflow-y-auto lg:flex-row lg:overflow-hidden",children:[l.jsxs("div",{className:"flex max-h-[42vh] w-full shrink-0 flex-col overflow-y-auto border-b border-border lg:max-h-none lg:min-h-0 lg:w-80 lg:border-b-0 lg:border-r",children:[l.jsxs("div",{className:"sticky top-0 z-10 flex shrink-0 border-b border-border bg-background",children:[l.jsxs("button",{type:"button",onClick:()=>C("active"),"data-testid":"tab-active",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="active"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Active (",k.length,")"]}),l.jsxs("button",{type:"button",onClick:()=>C("archived"),"data-testid":"tab-archived",className:`flex-1 px-3 py-2 text-[11px] uppercase tracking-wider transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset ${b==="archived"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:["Archived (",E.length,")"]})]}),!z&&l.jsxs(l.Fragment,{children:[l.jsxs(Mu,{open:Y,onOpenChange:h,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:D.length>0?"Add a PR or watch another repo.":"Add a PR or watch a repo. Sync and babysit start automatically."}),l.jsx(Iu,{asChild:!0,children:l.jsx("button",{type:"button","data-testid":"button-toggle-add-controls",className:"shrink-0 border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:Y?"Hide":"Add"})})]}),l.jsxs(Lu,{children:[l.jsx("form",{onSubmit:$=>{$.preventDefault(),s.trim()&&ue.mutate(s.trim())},className:"border-t border-border p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:s,onChange:$=>i($.target.value),placeholder:"github.com/owner/repo/pull/123","aria-label":"GitHub pull request URL","data-testid":"input-add-pr",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:ue.isPending||!s.trim(),"data-testid":"button-add-pr",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Add"})]})}),l.jsxs("form",{onSubmit:$=>{$.preventDefault();const oe=u.trim();oe&&W.mutate({repo:oe,watchScope:y})},className:"border-t border-border p-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:u,onChange:$=>d($.target.value),placeholder:"owner/repo","aria-label":"Repository owner and name","data-testid":"input-add-repo",className:"flex-1 border border-border bg-transparent px-2 py-1 text-[12px] placeholder:text-muted-foreground/50 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"submit",disabled:W.isPending||!u.trim(),"data-testid":"button-add-repo",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:"Watch"})]}),l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(Lh,{value:y,onChange:w,disabled:W.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),l.jsxs(Mu,{open:g,onOpenChange:v,className:"border-b border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 p-3",children:[l.jsx(Iu,{asChild:!0,children:l.jsxs("button",{type:"button","data-testid":"button-toggle-tracked-repos","aria-label":g?"Collapse tracked repositories":"Expand tracked repositories",className:"flex min-w-0 items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[l.jsx("span",{"aria-hidden":"true",children:g?"▾":"▸"}),l.jsx("span",{children:"Tracked repositories"}),!g&&D.length>0&&l.jsxs("span",{className:"text-muted-foreground/70",children:["(",D.length,")"]})]})}),l.jsx("button",{type:"button",onClick:()=>le.mutate(),disabled:le.isPending,"data-testid":"button-sync-repos",className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:le.isPending?"Fetching...":"Fetch"})]}),l.jsx(Lu,{className:"px-3 pb-3",children:D.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No repositories being watched yet."}):l.jsx("div",{className:"space-y-1 text-[12px]",children:D.map($=>{const oe=B.isPending&&B.variables===$.repo;return l.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[l.jsx("a",{href:lC($.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${$.repo.replace("/","-")}`,className:"min-w-0 break-all text-foreground/75 underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:$.repo}),l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Track automatically"}),l.jsx(Lh,{value:dN($.ownPrsOnly),onChange:ge=>R.mutate({repo:$.repo,ownPrsOnly:ge==="mine"}),disabled:R.isPending,name:`tracked-repo-scope-${$.repo}`,testIdPrefix:`tracked-repo-scope-${$.repo.replace("/","-")}`,compact:!0})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 self-end",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:$.autoCreateReleases,onChange:ge=>R.mutate({repo:$.repo,autoCreateReleases:ge.target.checked}),disabled:R.isPending,"data-testid":`tracked-repo-auto-release-${$.repo.replace("/","-")}`,className:"accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),"Auto-release"]}),l.jsx("button",{type:"button",onClick:()=>B.mutate($.repo),disabled:B.isPending,"data-testid":`tracked-repo-manual-release-${$.repo.replace("/","-")}`,className:"border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:oe?"Releasing...":"Release"})]})]})]},$.repo)})})})]})]}),l.jsx("div",{className:"flex-1",children:(z?P:S)?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading..."}):O.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:z?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):O.map($=>l.jsx(gN,{pr:$,isSelected:$.id===t,onSelect:r,failureMessage:$.status==="error"?Oh(L.failed,$.id)?.lastError??Ah($):null},$.id))})]}),l.jsx("div",{className:"flex min-h-[32rem] flex-1 flex-col overflow-hidden lg:min-h-0",children:U?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"shrink-0 border-b border-border px-4 py-3",children:[l.jsxs("div",{className:"mb-1 flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(qv,{status:U.status}),l.jsx("span",{className:"truncate font-medium",children:U.title}),l.jsx(Xv,{pr:U}),!J&&l.jsx(zu,{}),l.jsxs("a",{href:U.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-muted-foreground underline decoration-border underline-offset-2 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:[U.repo,"#",U.number]})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[l.jsxs("span",{children:["status: ",Gv(U.status)]}),!J&&l.jsx(zu,{}),l.jsxs("span",{children:[U.feedbackItems.length," items"]}),U.feedbackItems.length>0&&(()=>{const $=Wo(U.feedbackItems);return l.jsxs(l.Fragment,{children:[$.queued>0&&l.jsxs("span",{children:[$.queued," queued"]}),$.inProgress>0&&l.jsxs("span",{children:[$.inProgress," in progress"]}),$.failed>0&&l.jsxs("span",{children:[$.failed," failed"]}),$.warning>0&&l.jsxs("span",{children:[$.warning," warnings"]})]})})(),U.testsPassed!==null&&l.jsxs("span",{children:["tests: ",U.testsPassed?"pass":"fail"]}),U.lintPassed!==null&&l.jsxs("span",{children:["lint: ",U.lintPassed?"pass":"fail"]}),U.lastChecked&&l.jsxs("span",{children:["checked ",Lt(U.lastChecked)]})]})]}),!z&&l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:()=>X.mutate(U.id),disabled:X.isPending||U.status==="processing","data-testid":"button-apply",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:U.status==="processing"?"Running":"Run now"}),l.jsx("button",{type:"button",onClick:()=>me.mutate({id:U.id,enabled:!J}),disabled:me.isPending,"data-testid":"button-toggle-watch",className:"border border-border px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-30",children:J?"Pause watch":"Resume watch"})]})]}),Vv(U.feedbackItems)&&U.status!=="processing"&&Wo(U.feedbackItems).inProgress===0&&l.jsx(Yv,{href:U.url,testId:"detail-ready-to-merge",label:"All comments resolved — ready to merge",hint:"Open PR on GitHub →",className:"mt-2 gap-2 px-3 py-1.5 text-[12px] tracking-wider",dotClassName:"h-2 w-2",hintClassName:"text-[11px] normal-case tracking-normal text-success-foreground/75"}),te&&l.jsxs("div",{className:"mt-2 border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] leading-5 text-destructive","data-testid":"selected-pr-error",children:[l.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider",children:"Automation error"}),l.jsx("div",{className:"mt-1 whitespace-pre-wrap break-words",children:te})]}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:J?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),l.jsx(yN,{pr:U,config:A,healingSessions:_}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:U.feedbackItems.length===0?l.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:J?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):U.feedbackItems.map($=>l.jsx(vN,{item:$,prId:U.id,readOnly:z},$.id))})]}):l.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:"Select a PR from the left panel."})}),l.jsx(wN,{prId:t,prStatus:U?.status??null})]})]})}function CN(t,r){return t?.drainMode?{label:"paused",className:"text-destructive"}:t?{label:"active",className:"text-muted-foreground"}:r?{label:"unavailable",className:"text-destructive"}:{label:"loading...",className:"text-muted-foreground"}}function kN(t){return t?.drainMode?"Resume":"Pause"}function EN(){const{data:t}=ot({queryKey:["/api/config"]}),[r,s]=m.useState(""),[i,u]=m.useState(!1),d=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),p=k=>{C.mutate({githubTokens:k})},h=(k,S)=>{const E=[...d],[P]=E.splice(k,1);P&&(E.splice(S,0,P),p(E))},g=k=>{p(d.filter((S,E)=>E!==k))},{data:v,isError:y}=ot({queryKey:["/api/runtime"],refetchInterval:5e3}),w=CN(v,y),b=Je({mutationFn:async k=>(await Ge("POST","/api/runtime/drain",k)).json(),onSuccess:(k,S)=>{ye.invalidateQueries({queryKey:["/api/runtime"]}),vt({description:S.enabled?"Automation paused. New runs are blocked; in-flight runs will finish.":"Automation resumed."})},onError:k=>{vt({variant:"destructive",description:`Failed to update drain mode: ${k.message}`})}}),C=Je({mutationFn:async k=>(await Ge("PATCH","/api/config",k)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/config"]}),ye.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:"Settings saved."})},onError:k=>{vt({variant:"destructive",description:`Failed to save: ${k.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(qo,{}),l.jsx("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Kt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back"}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"settings"})]})}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-8",children:[l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"settings-coding-agent",className:"text-sm",children:"Coding Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"CLI agent used to apply fixes"})]}),l.jsxs("select",{id:"settings-coding-agent",value:t?.codingAgent??"codex",onChange:k=>{const S=k.target.value;C.mutate({codingAgent:S})},disabled:C.isPending,className:"border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:[l.jsx("option",{value:"codex",children:"codex"}),l.jsx("option",{value:"claude",children:"claude"})]})]}),l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Fallback to next coding agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"If the configured agent cannot start or authenticate, retry the babysitter run with the other local agent."})]}),l.jsx("input",{type:"checkbox",checked:t?.fallbackToNextCodingAgent??!1,onChange:k=>C.mutate({fallbackToNextCodingAgent:k.target.checked}),disabled:C.isPending,className:"mt-1 h-4 w-4 accent-foreground","data-testid":"checkbox-fallback-to-next-coding-agent"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Automation"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-resolve conflicts"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Ask the agent to resolve merge conflicts when tracked PRs are not mergeable."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoResolveMergeConflicts??!0,onChange:k=>C.mutate({autoResolveMergeConflicts:k.target.checked}),disabled:C.isPending,"data-testid":"checkbox-auto-resolve-conflicts",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("label",{className:"flex items-center justify-between gap-3 cursor-pointer",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Auto-update docs"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Automatically assess whether tracked PRs need documentation updates."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoUpdateDocs??!0,onChange:k=>C.mutate({autoUpdateDocs:k.target.checked}),disabled:C.isPending,"data-testid":"checkbox-auto-update-docs",className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Tuning"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsx(_n,{label:"Max turns",description:"Maximum agent turns per feedback item",value:t?.maxTurns??15,onChange:k=>C.mutate({maxTurns:k}),disabled:C.isPending}),l.jsx(_n,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:k=>C.mutate({pollIntervalMs:k}),disabled:C.isPending}),l.jsx(_n,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:k=>C.mutate({batchWindowMs:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:k=>C.mutate({maxChangesPerRun:k}),disabled:C.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"CI Healing"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic CI healing"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Classify healable CI failures and run bounded repair attempts in isolated worktrees."})]}),l.jsx("input",{type:"checkbox","aria-label":"Automatic CI healing",checked:t?.autoHealCI??!1,onChange:k=>C.mutate({autoHealCI:k.target.checked}),disabled:C.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsx(_n,{label:"Max healing attempts per session",description:"Upper bound on repair attempts for a single healing session",value:t?.maxHealingAttemptsPerSession??3,onChange:k=>C.mutate({maxHealingAttemptsPerSession:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max healing attempts per fingerprint",description:"Cap retries for the same failure fingerprint",value:t?.maxHealingAttemptsPerFingerprint??2,onChange:k=>C.mutate({maxHealingAttemptsPerFingerprint:k}),disabled:C.isPending}),l.jsx(_n,{label:"Max concurrent healing runs",description:"How many healing runs can execute at once",value:t?.maxConcurrentHealingRuns??1,onChange:k=>C.mutate({maxConcurrentHealingRuns:k}),disabled:C.isPending}),l.jsx(_n,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:k=>C.mutate({healingCooldownMs:k}),disabled:C.isPending})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Releases"}),l.jsx("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:l.jsxs("label",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Automatic release creation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Evaluate merged PRs and publish GitHub releases automatically when the agent decides they are release-worthy."})]}),l.jsx("input",{type:"checkbox",checked:t?.autoCreateReleases??!1,onChange:k=>C.mutate({autoCreateReleases:k.target.checked}),disabled:C.isPending,className:"mt-1 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","data-testid":"checkbox-auto-create-releases"})]})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Runtime"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm",children:"Automation"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Drain mode blocks new agent runs. In-flight runs continue until they finish."}),l.jsx("div",{className:"mt-2 text-[11px]","aria-live":"polite","data-testid":"text-drain-status",children:l.jsx("span",{className:w.className,children:w.label})})]}),l.jsx("button",{type:"button",onClick:()=>b.mutate(v?.drainMode?{enabled:!1}:{enabled:!0,reason:"Manually paused via web settings"}),disabled:!v||b.isPending,"data-testid":"button-toggle-drain",className:"shrink-0 border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:kN(v)})]}),v?.drainMode&&(v.drainReason||v.drainRequestedAt)?l.jsxs("div",{className:"border-l-2 border-destructive bg-muted/30 px-3 py-2 text-[11px]",children:[v.drainReason?l.jsx("div",{className:"text-foreground",children:v.drainReason}):null,v.drainRequestedAt?l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["since ",new Date(v.drainRequestedAt).toLocaleString()]}):null]}):null]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-4 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"GitHub"}),l.jsxs("div",{className:"flex flex-col gap-4 rounded border border-border p-4",children:[l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Tokens"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Tried in order before GITHUB_TOKEN and gh auth."})]}),!i&&l.jsx("button",{type:"button",onClick:()=>u(!0),className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"add"})]}),d.length?l.jsx("div",{className:"flex flex-col gap-2",children:d.map((k,S)=>l.jsxs("div",{className:"flex items-center justify-between gap-3 border border-border px-2 py-1.5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate font-mono text-xs",children:k}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["priority ",S+1]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("button",{type:"button",onClick:()=>h(S,S-1),disabled:S===0||C.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"up"}),l.jsx("button",{type:"button",onClick:()=>h(S,S+1),disabled:S===d.length-1||C.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"down"}),l.jsx("button",{type:"button",onClick:()=>g(S),disabled:C.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"remove"})]})]},S))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"}),i?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"password",value:r,onChange:k=>s(k.target.value),placeholder:"ghp_...","aria-label":"GitHub token",className:"min-w-0 flex-1 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"}),l.jsx("button",{type:"button",onClick:()=>{const k=r.trim();k&&(p([...d,k]),s(""),u(!1))},disabled:!r.trim()||C.isPending,className:"border border-border px-2 py-1 text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"add"}),l.jsx("button",{type:"button",onClick:()=>{u(!1),s("")},className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"cancel"})]}):null]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Repository links in PR comments"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Link oh-my-pr back to its repository in agent-authored GitHub PR comments and footers."})]}),l.jsx("input",{type:"checkbox","aria-label":"Repository links in PR comments",checked:t?.includeRepositoryLinksInGitHubComments??!0,onChange:k=>C.mutate({includeRepositoryLinksInGitHubComments:k.target.checked}),disabled:C.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"GitHub progress replies"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Post public Accepted/running/completed status replies while the babysitter works on review comments."})]}),l.jsx("input",{type:"checkbox","aria-label":"GitHub progress replies",checked:t?.postGitHubProgressReplies??!1,onChange:k=>C.mutate({postGitHubProgressReplies:k.target.checked}),disabled:C.isPending,className:"h-4 w-4 accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm",children:"Trusted reviewers"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:t?.trustedReviewers?.length?t.trustedReviewers.join(", "):"none configured"})]}),l.jsx(NN,{label:"Ignored bots",description:"Bot logins whose comments and reviews are ignored.",placeholder:"dependabot[bot]",values:t?.ignoredBots??[],onChange:k=>C.mutate({ignoredBots:k}),disabled:!t||C.isPending})]})]})]})})]})}function NN({label:t,description:r,placeholder:s,values:i,onChange:u,disabled:d}){const[p,h]=m.useState(""),g=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,v=`${g}-description`,y=()=>{const b=p.trim(),C=b.toLowerCase();if(!b||i.some(k=>k.toLowerCase()===C)){h("");return}u([...i,b]),h("")},w=b=>{u(i.filter((C,k)=>k!==b))};return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("label",{htmlFor:g,className:"min-w-0 flex-1 cursor-pointer",children:[l.jsx("span",{className:"block text-sm",children:t}),l.jsx("span",{id:v,className:"block text-[11px] text-muted-foreground",children:r}),l.jsx("input",{id:g,type:"text",value:p,onChange:b=>h(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),y())},placeholder:s,disabled:d,"aria-describedby":v,className:"mt-2 w-full min-w-0 border border-border bg-transparent px-2 py-1 text-sm focus:border-foreground focus:outline-none disabled:opacity-50"})]}),l.jsx("button",{type:"button",onClick:y,disabled:!p.trim()||d,className:"border border-border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",children:"add"})]}),i.length?l.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map((b,C)=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 border border-border px-2 py-0.5 font-mono text-xs",children:[b,l.jsx("button",{type:"button",onClick:()=>w(C),disabled:d,"aria-label":`Remove ${b}`,className:"text-muted-foreground hover:text-foreground disabled:opacity-50",children:"×"})]},b))}):l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"none configured"})]})}function _n({label:t,description:r,value:s,onChange:i,disabled:u}){const d=`setting-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,p=`${d}-description`;return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:d,className:"text-sm",children:t}),l.jsx("div",{id:p,className:"text-[11px] text-muted-foreground",children:r})]}),l.jsx("input",{id:d,type:"number",value:s,onChange:h=>{const g=parseInt(h.target.value,10);isNaN(g)||i(g)},disabled:u,"aria-describedby":p,className:"w-28 border border-border bg-transparent px-2 py-1 text-right text-sm focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50"})]})}function jN(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function RN(t){const r=t.match(/##\s*Twitter\/X\s*(?:Thread)?\n([\s\S]*?)(?=\n##\s|\s*$)/i),s=t.match(/##\s*LinkedIn\s*(?:\/\s*General)?\n([\s\S]*?)(?=\n##\s|\s*$)/i);return{twitter:r?r[1].trim():null,linkedin:s?s[1].trim():null}}function PN({text:t}){const[r,s]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function mu({title:t,content:r}){return l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:t}),l.jsx(PN,{text:r})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:r})]})}function TN({status:t}){const r=t==="done"?"border-foreground/40 text-foreground":t==="generating"?"border-border text-muted-foreground animate-pulse":"border-destructive/40 text-destructive";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function _N({changelog:t}){const[r,s]=m.useState(!1),i=t.content?RN(t.content):null,u=`changelog-${t.id}-content`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-default disabled:hover:bg-transparent",onClick:()=>t.status==="done"&&s(d=>!d),disabled:t.status!=="done","aria-expanded":t.status==="done"?r:void 0,"aria-controls":t.status==="done"?u:void 0,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(TN,{status:t.status}),l.jsx("span",{className:"text-sm font-medium",children:jN(t.createdAt)}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[t.triggerCount," PR",t.triggerCount!==1?"s":""," merged"]}),l.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.prSummaries.map(d=>`#${d.number}`).join(" · ")})]}),t.status==="done"&&l.jsx("span",{className:"text-[11px] text-muted-foreground",children:r?"Hide":"Show"})]}),r&&t.status==="done"&&l.jsxs("div",{id:u,className:"border-t border-border px-4 pb-4 pt-3",children:[t.error&&l.jsx("p",{className:"mb-3 text-[12px] text-destructive",children:t.error}),i?.twitter&&l.jsx(mu,{title:"Twitter / X Thread",content:i.twitter}),i?.linkedin&&l.jsx(mu,{title:"LinkedIn / General",content:i.linkedin}),!i?.twitter&&!i?.linkedin&&t.content&&l.jsx(mu,{title:"Full output",content:t.content})]}),t.status==="error"&&t.error&&l.jsx("div",{className:"border-t border-border px-4 py-3",children:l.jsx("p",{className:"text-[12px] text-destructive",children:t.error})}),t.status==="generating"&&l.jsx("div",{className:"border-t border-border px-4 py-2.5",children:l.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Generation was removed before this row completed."})})]})}function ON(){const{data:t=[],isLoading:r}=ot({queryKey:["/api/changelogs"],refetchInterval:s=>s.state.data?.some(u=>u.status==="generating")?5e3:!1});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(qo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"changelogs"})]}),l.jsx(Kt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-3xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Social Media Changelogs"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Historical generated posts from earlier versions."})]}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No changelogs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Social media changelog generation has been removed."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(s=>l.jsx(_N,{changelog:s},s.id))})]})})]})}const AN=new Set(["detected","evaluating","proposed","publishing"]);function Jv(t){return AN.has(t)}function MN(t){return t==="published"||t==="skipped"||t==="error"}function IN(t){return typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="string"}function gu(t){if(!t)return"n/a";const r=new Date(t);return Number.isNaN(r.getTime())?"n/a":r.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function LN(t){return t?t.slice(0,7):"n/a"}function DN({status:t}){const r=t==="published"?"border-foreground/40 text-foreground":t==="skipped"?"border-border text-muted-foreground":t==="error"?"border-destructive/40 text-destructive":Jv(t)?"border-border text-muted-foreground animate-pulse":"border-border text-muted-foreground";return l.jsx("span",{className:`border px-1.5 py-0 text-[10px] uppercase tracking-wider ${r}`,children:t})}function FN({text:t}){const[r,s]=m.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)}catch(u){const d=u instanceof Error?u.message:"Clipboard write failed";vt({variant:"destructive",description:`Failed to copy: ${d}`})}};return l.jsx("button",{type:"button",onClick:i,className:"border border-border px-2 py-0.5 text-[11px] uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:r?"copied":"copy"})}function $N({run:t,onRetry:r,retryPending:s}){const[i,u]=m.useState(!1),p=!(!!t.decisionReason||!!t.releaseTitle||!!t.releaseNotes||!!t.error||!!t.githubReleaseUrl||t.includedPrs.length>0)&&MN(t.status),h=`release-run-${t.id}-details`;return l.jsxs("div",{className:"border border-border",children:[l.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>u(g=>!g),"aria-expanded":i,"aria-controls":h,children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx(DN,{status:t.status}),l.jsx("span",{className:"truncate text-sm font-medium",children:t.repo}),l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["#",t.triggerPrNumber]}),t.proposedVersion&&l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:t.proposedVersion}),!t.proposedVersion&&t.recommendedBump&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["bump ",t.recommendedBump]})]}),l.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:gu(t.createdAt)}),l.jsx("span",{children:i?"Hide":"Show"})]})]}),i&&l.jsxs("div",{id:h,className:"border-t border-border px-4 pb-4 pt-3",children:[l.jsxs("div",{className:"mb-3 text-[12px] text-muted-foreground",children:["Trigger PR:"," ",l.jsxs("a",{href:t.triggerPrUrl,target:"_blank",rel:"noreferrer noopener",className:"underline underline-offset-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:["#",t.triggerPrNumber," ",t.triggerPrTitle]})]}),t.decisionReason&&l.jsx("p",{className:"mb-3 text-[12px] leading-relaxed",children:t.decisionReason}),t.releaseTitle&&l.jsxs("p",{className:"mb-3 text-[12px]",children:[l.jsx("span",{className:"text-muted-foreground",children:"Release title:"})," ",l.jsx("span",{children:t.releaseTitle})]}),l.jsxs("div",{className:"mb-3 grid grid-cols-1 gap-2 text-[12px] text-muted-foreground md:grid-cols-2",children:[l.jsxs("div",{children:["Base branch: ",t.baseBranch||"n/a"]}),l.jsxs("div",{children:["Trigger SHA: ",LN(t.triggerMergeSha)]}),l.jsxs("div",{children:["Merged at: ",gu(t.triggerMergedAt)]}),l.jsxs("div",{children:["Updated: ",gu(t.updatedAt)]})]}),t.includedPrs.length>0&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:["Included PRs (",t.includedPrs.length,")"]}),l.jsx("div",{className:"space-y-1 border border-border p-3 text-[12px]",children:t.includedPrs.map(g=>l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("span",{className:"truncate",children:["#",g.number," ",g.title]}),l.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer noopener",className:"text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open"})]},`${g.mergeSha}-${g.number}`))})]}),t.releaseNotes&&l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Release Notes"}),l.jsx(FN,{text:t.releaseNotes})]}),l.jsx("pre",{className:"whitespace-pre-wrap border border-border bg-background p-3 text-[12px] leading-relaxed font-mono",children:t.releaseNotes})]}),t.error&&l.jsx("div",{className:"mb-3 border border-destructive/40 bg-destructive/5 p-3 text-[12px] text-destructive",children:t.error}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.githubReleaseUrl&&l.jsx("a",{href:t.githubReleaseUrl,target:"_blank",rel:"noreferrer noopener",className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"open release"}),t.status==="error"&&l.jsx("button",{type:"button",onClick:()=>r(t.id),disabled:s,className:"border border-border px-2 py-1 text-[11px] uppercase tracking-wider text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50",children:"retry"})]}),p&&l.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground",children:"No details available yet."})]})]})}function zN(){const{data:t=[],isLoading:r}=ot({queryKey:["/api/releases"],refetchInterval:i=>{const u=i.state.data;return Array.isArray(u)&&u.some(d=>IN(d)&&Jv(d.status))?5e3:!1}}),s=Je({mutationFn:async i=>(await Ge("POST",`/api/releases/${i}/retry`)).json(),onSuccess:()=>{ye.invalidateQueries({queryKey:["/api/releases"]}),vt({description:"Retry queued."})},onError:i=>{vt({variant:"destructive",description:`Retry failed: ${i.message}`})}});return l.jsxs("div",{className:"flex min-h-screen flex-col",children:[l.jsx(qo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"Release Management",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 6h8M4 9h8M4 12h5",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"releases"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Kt,{href:"/settings",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"settings"}),l.jsx(Kt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.jsxs("div",{className:"mx-auto max-w-4xl",children:[l.jsxs("div",{className:"mb-5",children:[l.jsx("h1",{className:"text-base font-medium",children:"Release Management"}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Every merged PR can trigger agent evaluation. This page shows release decisions, version bumps, notes, and publishing outcomes."})]}),r&&l.jsx("div",{className:"border border-border px-4 py-6 text-center",children:l.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Loading…"})}),!r&&t.length===0&&l.jsxs("div",{className:"border border-border px-4 py-8 text-center",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"No release runs yet."}),l.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:"Runs appear after merged PRs are evaluated for release-worthiness."})]}),l.jsx("div",{className:"flex flex-col gap-2",children:t.map(i=>l.jsx($N,{run:i,onRetry:u=>s.mutate(u),retryPending:s.isPending},i.id))})]})})]})}const ex=["trace","debug","info","warn","error","fatal"],Dh={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},UN={trace:"text-muted-foreground",debug:"text-muted-foreground",info:"text-foreground",warn:"text-yellow-500",error:"text-red-500",fatal:"text-red-600 font-medium"};function HN(t){const r=new URLSearchParams(t),s=r.get("level")??"";return{level:ex.includes(s)?s:"",source:r.get("source")??"",search:r.get("q")??"",follow:r.get("follow")==="1"}}function tx(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function BN(t){const r=Object.keys(t.fields).length>0?" "+JSON.stringify(t.fields):"",s=t.source?` [${t.source}]`:"";return`${tx(t.time)} ${t.level.toUpperCase().padEnd(5)}${s} ${t.msg}${r}`}function Fh(t){return t.map(BN).join(`
|
|
49
|
+
`)}function vi(t){const r=new URLSearchParams(window.location.search);for(const[u,d]of Object.entries(t))d===""||d===!1||d===void 0?r.delete(u):d===!0?r.set(u,"1"):r.set(u,String(d));const s=r.toString(),i=new URL(window.location.href);i.search=s?`?${s}`:"",history.replaceState(history.state,"",i.href)}function WN(){const t=Pw(),r=m.useMemo(()=>HN(t),[t]),[s,i]=m.useState(r.level),[u,d]=m.useState(r.source),[p,h]=m.useState(r.search),[g,v]=m.useState(r.follow),[y,w]=m.useState([]),[b,C]=m.useState([]),[k,S]=m.useState(null),E=m.useRef([]);E.current=y;const P=m.useRef(null),A=m.useRef(g);A.current=g,m.useEffect(()=>{let O=!1;S(null);const z=new URLSearchParams;return s&&z.set("level",s),u&&z.set("source",u),p&&z.set("search",p),z.set("limit","1000"),cm(`/api/server-logs?${z.toString()}`).then(U=>{O||(w(U.records),C(U.sources))}).catch(U=>{O||S(U.message)}),()=>{O=!0}},[s,u,p]),m.useEffect(()=>{if(!g)return;const z=`/api/server-logs/stream?since=${E.current[E.current.length-1]?.seq??0}`,U=new EventSource(z);return U.onmessage=J=>{try{const ne=JSON.parse(J.data);w(te=>{if(te.length>0&&te[te.length-1].seq>=ne.seq)return te;const Y=[...te,ne];return Y.length>5e3?Y.slice(Y.length-5e3):Y})}catch{}},U.onerror=()=>{S("Lost log stream connection — disable Follow tail and re-enable to retry")},()=>{U.close()}},[g]),m.useEffect(()=>{if(!g)return;const O=P.current;O&&(O.scrollTop=O.scrollHeight)},[y,g]),m.useEffect(()=>{vi({level:s})},[s]),m.useEffect(()=>{vi({source:u})},[u]),m.useEffect(()=>{vi({q:p})},[p]),m.useEffect(()=>{vi({follow:g})},[g]);const _=m.useMemo(()=>{let O=y;if(s){const z=Dh[s];O=O.filter(U=>Dh[U.level]>=z)}if(u&&(O=O.filter(z=>z.source===u)),p){const z=p.toLowerCase();O=O.filter(U=>U.msg.toLowerCase().includes(z)||JSON.stringify(U.fields).toLowerCase().includes(z))}return O},[y,s,u,p]),L=async()=>{try{await navigator.clipboard.writeText(Fh(_))}catch{}},D=()=>{const O=new Blob([Fh(_)],{type:"text/plain"}),z=URL.createObjectURL(O),U=document.createElement("a");U.href=z,U.download=`oh-my-pr-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,U.click(),URL.revokeObjectURL(z)};return l.jsxs("div",{className:"flex h-screen flex-col",children:[l.jsx(qo,{}),l.jsxs("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-label":"oh-my-pr",children:[l.jsx("rect",{x:"1",y:"1",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M4 5h8M4 8h5M4 11h6",stroke:"currentColor",strokeWidth:"1"})]}),l.jsx("span",{className:"text-sm font-medium tracking-tight",children:"oh-my-pr"}),l.jsx("span",{className:"border border-border px-1.5 py-0 text-[10px] uppercase tracking-wider text-muted-foreground",children:"logs"})]}),l.jsx(Kt,{href:"/",className:"text-[11px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:"← back to dashboard"})]}),l.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-4 py-2 text-[11px]",children:[l.jsx("label",{htmlFor:"logs-level",className:"uppercase tracking-wider text-muted-foreground",children:"level"}),l.jsxs("select",{id:"logs-level",value:s,onChange:O=>i(O.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),ex.map(O=>l.jsx("option",{value:O,children:O},O))]}),l.jsx("label",{htmlFor:"logs-source",className:"uppercase tracking-wider text-muted-foreground",children:"source"}),l.jsxs("select",{id:"logs-source",value:u,onChange:O=>d(O.target.value),className:"border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[l.jsx("option",{value:"",children:"all"}),b.map(O=>l.jsx("option",{value:O,children:O},O))]}),l.jsx("input",{type:"search",value:p,onChange:O=>h(O.target.value),placeholder:"search…",className:"min-w-[180px] flex-1 border border-border bg-transparent px-2 py-0.5 focus:border-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"}),l.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 uppercase tracking-wider text-muted-foreground",children:[l.jsx("input",{type:"checkbox",checked:g,onChange:O=>v(O.target.checked),className:"cursor-pointer"}),"follow tail"]}),l.jsxs("span",{className:"ml-auto text-muted-foreground",children:[_.length," of ",y.length]}),l.jsx("button",{type:"button",onClick:L,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"copy"}),l.jsx("button",{type:"button",onClick:D,className:"border border-border px-2 py-0.5 uppercase tracking-wider text-muted-foreground hover:border-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"download"})]}),k&&l.jsx("div",{className:"shrink-0 border-b border-red-500/40 bg-red-500/10 px-4 py-1 text-[11px] text-red-500",children:k}),l.jsx("div",{ref:P,className:"flex-1 overflow-y-auto p-3 font-mono text-[11px] leading-relaxed",children:_.length===0?l.jsx("div",{className:"text-center text-muted-foreground",children:"No log records match the current filter."}):_.map(O=>l.jsxs("div",{className:"flex gap-2 whitespace-pre-wrap break-all",children:[l.jsx("span",{className:"shrink-0 text-muted-foreground",children:tx(O.time)}),l.jsx("span",{className:`shrink-0 w-12 ${UN[O.level]}`,children:O.level}),O.source&&l.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["[",O.source,"]"]}),l.jsxs("span",{className:`grow ${O.level==="error"||O.level==="fatal"?"text-destructive":""}`,children:[O.msg,Object.keys(O.fields).length>0&&l.jsxs("span",{className:"text-muted-foreground",children:[" ",JSON.stringify(O.fields)]})]})]},O.seq))})]})}const nx=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...r}));nx.displayName="Card";const KN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex flex-col space-y-1.5 p-6",t),...r}));KN.displayName="CardHeader";const VN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-2xl font-semibold leading-none tracking-tight",t),...r}));VN.displayName="CardTitle";const QN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-sm text-muted-foreground",t),...r}));QN.displayName="CardDescription";const rx=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("p-6 pt-0",t),...r}));rx.displayName="CardContent";const GN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex items-center p-6 pt-0",t),...r}));GN.displayName="CardFooter";function qN(){return l.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:l.jsx(nx,{className:"w-full max-w-md mx-4",children:l.jsxs(rx,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(I0,{className:"h-8 w-8 text-red-500"}),l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),l.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function YN(){return l.jsxs(_w,{children:[l.jsx(_r,{path:"/",component:SN}),l.jsx(_r,{path:"/settings",component:EN}),l.jsx(_r,{path:"/changelogs",component:ON}),l.jsx(_r,{path:"/releases",component:zN}),l.jsx(_r,{path:"/logs",component:WN}),l.jsx(_r,{component:qN})]})}function XN(){return l.jsx(wb,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:l.jsx(sb,{client:ye,children:l.jsxs(nC,{children:[l.jsx(y1,{}),l.jsx(Yh,{hook:Zh,children:l.jsx(YN,{})})]})})})}function ZN(t){const r=new URL(t),s=r.hash,i=s.indexOf("?");if(i===-1)return null;const u=new URLSearchParams(r.search);return new URLSearchParams(s.slice(i)).forEach((p,h)=>{u.set(h.toLowerCase(),p)}),r.hash=s.slice(0,i),r.search=u.toString(),r.href}{const t=ZN(window.location.href);t&&history.replaceState(history.state,"",t)}window.location.hash||(window.location.hash="#/");lw.createRoot(document.getElementById("root")).render(l.jsx(XN,{}));
|