oh-my-pr 4.3.2 → 4.3.3
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 +29 -0
- package/dist/index.cjs +147 -141
- package/dist/public/assets/index-CzrgYumh.css +1 -0
- package/dist/public/assets/index-SVLVhdfc.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 Zy(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 Dh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hl={exports:{}},Oo={},Bl={exports:{}},ye={};var xp;function Jy(){if(xp)return ye;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"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.iterator;function b(k){return k===null||typeof k!="object"?null:(k=w&&k[w]||k["@@iterator"],typeof k=="function"?k:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function N(k,z,ae){this.props=k,this.context=z,this.refs=S,this.updater=ae||C}N.prototype.isReactComponent={},N.prototype.setState=function(k,z){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,z,"setState")},N.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function P(){}P.prototype=N.prototype;function A(k,z,ae){this.props=k,this.context=z,this.refs=S,this.updater=ae||C}var _=A.prototype=new P;_.constructor=A,E(_,N.prototype),_.isPureReactComponent=!0;var L=Array.isArray,D=Object.prototype.hasOwnProperty,O={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function U(k,z,ae){var pe,we={},ve=null,he=null;if(z!=null)for(pe in z.ref!==void 0&&(he=z.ref),z.key!==void 0&&(ve=""+z.key),z)D.call(z,pe)&&!$.hasOwnProperty(pe)&&(we[pe]=z[pe]);var be=arguments.length-2;if(be===1)we.children=ae;else if(1<be){for(var Ee=Array(be),et=0;et<be;et++)Ee[et]=arguments[et+2];we.children=Ee}if(k&&k.defaultProps)for(pe in be=k.defaultProps,be)we[pe]===void 0&&(we[pe]=be[pe]);return{$$typeof:t,type:k,key:ve,ref:he,props:we,_owner:O.current}}function Z(k,z){return{$$typeof:t,type:k.type,key:z,ref:k.ref,props:k.props,_owner:k._owner}}function ee(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function te(k){var z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ae){return z[ae]})}var q=/\/+/g;function le(k,z){return typeof k=="object"&&k!==null&&k.key!=null?te(""+k.key):z.toString(36)}function Y(k,z,ae,pe,we){var ve=typeof k;(ve==="undefined"||ve==="boolean")&&(k=null);var he=!1;if(k===null)he=!0;else switch(ve){case"string":case"number":he=!0;break;case"object":switch(k.$$typeof){case t:case r:he=!0}}if(he)return he=k,we=we(he),k=pe===""?"."+le(he,0):pe,L(we)?(ae="",k!=null&&(ae=k.replace(q,"$&/")+"/"),Y(we,z,ae,"",function(et){return et})):we!=null&&(ee(we)&&(we=Z(we,ae+(!we.key||he&&he.key===we.key?"":(""+we.key).replace(q,"$&/")+"/")+k)),z.push(we)),1;if(he=0,pe=pe===""?".":pe+":",L(k))for(var be=0;be<k.length;be++){ve=k[be];var Ee=pe+le(ve,be);he+=Y(ve,z,ae,Ee,we)}else if(Ee=b(k),typeof Ee=="function")for(k=Ee.call(k),be=0;!(ve=k.next()).done;)ve=ve.value,Ee=pe+le(ve,be++),he+=Y(ve,z,ae,Ee,we);else if(ve==="object")throw z=String(k),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return he}function me(k,z,ae){if(k==null)return k;var pe=[],we=0;return Y(k,pe,"","",function(ve){return z.call(ae,ve,we++)}),pe}function oe(k){if(k._status===-1){var z=k._result;z=z(),z.then(function(ae){(k._status===0||k._status===-1)&&(k._status=1,k._result=ae)},function(ae){(k._status===0||k._status===-1)&&(k._status=2,k._result=ae)}),k._status===-1&&(k._status=0,k._result=z)}if(k._status===1)return k._result.default;throw k._result}var ie={current:null},H={transition:null},B={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:H,ReactCurrentOwner:O};function Q(){throw Error("act(...) is not supported in production builds of React.")}return ye.Children={map:me,forEach:function(k,z,ae){me(k,function(){z.apply(this,arguments)},ae)},count:function(k){var z=0;return me(k,function(){z++}),z},toArray:function(k){return me(k,function(z){return z})||[]},only:function(k){if(!ee(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},ye.Component=N,ye.Fragment=s,ye.Profiler=u,ye.PureComponent=A,ye.StrictMode=i,ye.Suspense=g,ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,ye.act=Q,ye.cloneElement=function(k,z,ae){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var pe=E({},k.props),we=k.key,ve=k.ref,he=k._owner;if(z!=null){if(z.ref!==void 0&&(ve=z.ref,he=O.current),z.key!==void 0&&(we=""+z.key),k.type&&k.type.defaultProps)var be=k.type.defaultProps;for(Ee in z)D.call(z,Ee)&&!$.hasOwnProperty(Ee)&&(pe[Ee]=z[Ee]===void 0&&be!==void 0?be[Ee]:z[Ee])}var Ee=arguments.length-2;if(Ee===1)pe.children=ae;else if(1<Ee){be=Array(Ee);for(var et=0;et<Ee;et++)be[et]=arguments[et+2];pe.children=be}return{$$typeof:t,type:k.type,key:we,ref:ve,props:pe,_owner:he}},ye.createContext=function(k){return k={$$typeof:p,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:d,_context:k},k.Consumer=k},ye.createElement=U,ye.createFactory=function(k){var z=U.bind(null,k);return z.type=k,z},ye.createRef=function(){return{current:null}},ye.forwardRef=function(k){return{$$typeof:h,render:k}},ye.isValidElement=ee,ye.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:oe}},ye.memo=function(k,z){return{$$typeof:x,type:k,compare:z===void 0?null:z}},ye.startTransition=function(k){var z=H.transition;H.transition={};try{k()}finally{H.transition=z}},ye.unstable_act=Q,ye.useCallback=function(k,z){return ie.current.useCallback(k,z)},ye.useContext=function(k){return ie.current.useContext(k)},ye.useDebugValue=function(){},ye.useDeferredValue=function(k){return ie.current.useDeferredValue(k)},ye.useEffect=function(k,z){return ie.current.useEffect(k,z)},ye.useId=function(){return ie.current.useId()},ye.useImperativeHandle=function(k,z,ae){return ie.current.useImperativeHandle(k,z,ae)},ye.useInsertionEffect=function(k,z){return ie.current.useInsertionEffect(k,z)},ye.useLayoutEffect=function(k,z){return ie.current.useLayoutEffect(k,z)},ye.useMemo=function(k,z){return ie.current.useMemo(k,z)},ye.useReducer=function(k,z,ae){return ie.current.useReducer(k,z,ae)},ye.useRef=function(k){return ie.current.useRef(k)},ye.useState=function(k){return ie.current.useState(k)},ye.useSyncExternalStore=function(k,z,ae){return ie.current.useSyncExternalStore(k,z,ae)},ye.useTransition=function(){return ie.current.useTransition()},ye.version="18.3.1",ye}var yp;function _i(){return yp||(yp=1,Bl.exports=Jy()),Bl.exports}var wp;function ew(){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,x){var y,w={},b=null,C=null;x!==void 0&&(b=""+x),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 tw(){return bp||(bp=1,Hl.exports=ew()),Hl.exports}var l=tw(),li={},Wl={exports:{}},dt={},Kl={exports:{}},Vl={};var Sp;function nw(){return Sp||(Sp=1,(function(t){function r(H,B){var Q=H.length;H.push(B);e:for(;0<Q;){var k=Q-1>>>1,z=H[k];if(0<u(z,B))H[k]=B,H[Q]=z,Q=k;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],Q=H.pop();if(Q!==B){H[0]=Q;e:for(var k=0,z=H.length,ae=z>>>1;k<ae;){var pe=2*(k+1)-1,we=H[pe],ve=pe+1,he=H[ve];if(0>u(we,Q))ve<z&&0>u(he,we)?(H[k]=he,H[ve]=Q,k=ve):(H[k]=we,H[pe]=Q,k=pe);else if(ve<z&&0>u(he,Q))H[k]=he,H[ve]=Q,k=ve;else break e}}return B}function u(H,B){var Q=H.sortIndex-B.sortIndex;return Q!==0?Q: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=[],x=[],y=1,w=null,b=3,C=!1,E=!1,S=!1,N=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(x);B!==null;){if(B.callback===null)i(x);else if(B.startTime<=H)i(x),B.sortIndex=B.expirationTime,r(g,B);else break;B=s(x)}}function L(H){if(S=!1,_(H),!E)if(s(g)!==null)E=!0,oe(D);else{var B=s(x);B!==null&&ie(L,B.startTime-H)}}function D(H,B){E=!1,S&&(S=!1,P(U),U=-1),C=!0;var Q=b;try{for(_(B),w=s(g);w!==null&&(!(w.expirationTime>B)||H&&!te());){var k=w.callback;if(typeof k=="function"){w.callback=null,b=w.priorityLevel;var z=k(w.expirationTime<=B);B=t.unstable_now(),typeof z=="function"?w.callback=z:w===s(g)&&i(g),_(B)}else i(g);w=s(g)}if(w!==null)var ae=!0;else{var pe=s(x);pe!==null&&ie(L,pe.startTime-B),ae=!1}return ae}finally{w=null,b=Q,C=!1}}var O=!1,$=null,U=-1,Z=5,ee=-1;function te(){return!(t.unstable_now()-ee<Z)}function q(){if($!==null){var H=t.unstable_now();ee=H;var B=!0;try{B=$(!0,H)}finally{B?le():(O=!1,$=null)}}else O=!1}var le;if(typeof A=="function")le=function(){A(q)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,me=Y.port2;Y.port1.onmessage=q,le=function(){me.postMessage(null)}}else le=function(){N(q,0)};function oe(H){$=H,O||(O=!0,le())}function ie(H,B){U=N(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(){E||C||(E=!0,oe(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"):Z=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 Q=b;b=B;try{return H()}finally{b=Q}},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 Q=b;b=H;try{return B()}finally{b=Q}},t.unstable_scheduleCallback=function(H,B,Q){var k=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?k+Q:k):Q=k,H){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=Q+z,H={id:y++,callback:B,priorityLevel:H,startTime:Q,expirationTime:z,sortIndex:-1},Q>k?(H.sortIndex=Q,r(x,H),s(g)===null&&H===s(x)&&(S?(P(U),U=-1):S=!0,ie(L,Q-k))):(H.sortIndex=z,r(g,H),E||C||(E=!0,oe(D))),H},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(H){var B=b;return function(){var Q=b;b=B;try{return H.apply(this,arguments)}finally{b=Q}}}})(Vl)),Vl}var Cp;function rw(){return Cp||(Cp=1,Kl.exports=nw()),Kl.exports}var kp;function ow(){if(kp)return dt;kp=1;var t=_i(),r=rw();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,x=/^[: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:x.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 E(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,v){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=v}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[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];N[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[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){N[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[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);N[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);N[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);N[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,n,o,a){var c=N.hasOwnProperty(n)?N[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(E(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"),$=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),ie=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 Q=Object.assign,k;function z(e){if(k===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);k=n&&n[1]||""}return`
|
|
2
|
+
`+k+e}var ae=!1;function pe(e,n){if(!e||ae)return"";ae=!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
|
+
`),v=c.length-1,R=f.length-1;1<=v&&0<=R&&c[v]!==f[R];)R--;for(;1<=v&&0<=R;v--,R--)if(c[v]!==f[R]){if(v!==1||R!==1)do if(v--,R--,0>R||c[v]!==f[R]){var j=`
|
|
5
|
+
`+c[v].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=v&&0<=R);break}}}finally{ae=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?z(e):""}function we(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function ve(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 $:return"Fragment";case O:return"Portal";case Z:return"Profiler";case U:return"StrictMode";case le:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case te:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case q: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:ve(e.type)||"Memo";case oe:n=e._payload,e=e._init;try{return ve(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 ve(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(v){a=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},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 Q({},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 Q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Rc(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 jc(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},nx=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){nx.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 rx=Q({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(rx[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 ox(e,n,o,a,c,f,v,R,j){var F=Array.prototype.slice.call(arguments,3);try{n.apply(o,F)}catch(K){this.onError(K)}}var Xr=!1,ts=null,ns=!1,aa=null,sx={onError:function(e){Xr=!0,ts=e}};function ix(e,n,o,a,c,f,v,R,j){Xr=!1,ts=null,ox.apply(sx,arguments)}function ax(e,n,o,a,c,f,v,R,j){if(ix.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 lx(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 v=!1,R=c.child;R;){if(R===o){v=!0,o=c,a=f;break}if(R===a){v=!0,a=c,o=f;break}R=R.sibling}if(!v){for(R=f.child;R;){if(R===o){v=!0,o=f,a=c;break}if(R===a){v=!0,a=f,o=c;break}R=R.sibling}if(!v)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=lx(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,ux=r.unstable_shouldYield,cx=r.unstable_requestPaint,Ie=r.unstable_now,dx=r.unstable_getCurrentPriorityLevel,la=r.unstable_ImmediatePriority,Vc=r.unstable_UserBlockingPriority,rs=r.unstable_NormalPriority,fx=r.unstable_LowPriority,Qc=r.unstable_IdlePriority,os=null,$t=null;function px(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(os,e,void 0,(e.current.flags&128)===128)}catch{}}var jt=Math.clz32?Math.clz32:gx,hx=Math.log,mx=Math.LN2;function gx(e){return e>>>=0,e===0?32:31-(hx(e)/mx|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,v=o&268435455;if(v!==0){var R=v&~c;R!==0?a=Zr(R):(f&=v,f!==0&&(a=Zr(f)))}else v=o&~c,v!==0?a=Zr(v):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-jt(n),c=1<<o,a|=e[o],n&=~c;return a}function vx(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 xx(e,n){for(var o=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var v=31-jt(f),R=1<<v,j=c[v];j===-1?((R&o)===0||(R&a)!==0)&&(c[v]=vx(R,n)):j<=n&&(e.expiredLanes|=R),f&=~R}}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-jt(n),e[n]=o}function yx(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-jt(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-jt(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=[],wx="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 bx(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 Sx(){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,Sx)))}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 Cx(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 kx(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(bx(c,e,n,o,a))a.stopPropagation();else if(ed(e,a),n&4&&-1<wx.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(dx()){case la:return 1;case Vc:return 4;case rs:case fx: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 v=o-e;for(a=1;a<=v&&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,v){this._reactName=o,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(o=e[R],this[R]=o?o(f):f[R]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?hs:sd,this.isPropagationStopped=sd,this}return Q(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=Q({},cr,{view:0,detail:0}),Ex=ft(so),xa,ya,io,ms=Q({},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),Nx=Q({},ms,{dataTransfer:0}),Rx=ft(Nx),jx=Q({},so,{relatedTarget:0}),wa=ft(jx),Px=Q({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Tx=ft(Px),_x=Q({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ox=ft(_x),Ax=Q({},cr,{data:0}),ad=ft(Ax),Mx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ix={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"},Lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Lx[e])?!!n[e]:!1}function ba(){return Dx}var Fx=Q({},so,{key:function(e){if(e.key){var n=Mx[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"?Ix[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}}),$x=ft(Fx),zx=Q({},ms,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ld=ft(zx),Ux=Q({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ba}),Hx=ft(Ux),Bx=Q({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wx=ft(Bx),Kx=Q({},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}),Vx=ft(Kx),Qx=[9,13,27,32],Sa=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var Gx=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 qx(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 Yx(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 Xx={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"?!!Xx[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 Zx(e){Ad(e,0)}function gs(e){var n=gr(e);if(Jo(n))return e}function Jx(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(Zx,n)}}function ey(e,n,o){e==="focusin"?(xd(),lo=n,uo=o,lo.attachEvent("onpropertychange",yd)):e==="focusout"&&xd()}function ty(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gs(uo)}function ny(e,n){if(e==="click")return gs(n)}function ry(e,n){if(e==="input"||e==="change")return gs(n)}function oy(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:oy;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 sy(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 v=bd(o,a);c&&v&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(v.node,v.offset)):(n.setEnd(v.node,v.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 iy=h&&"documentMode"in document&&11>=document.documentMode,fr=null,Na=null,fo=null,Ra=!1;function kd(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ra||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")},ja={},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(ja[e])return ja[e];if(!pr[e])return e;var n=pr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in Ed)return ja[e]=n[o];return e}var Nd=xs("animationend"),Rd=xs("animationiteration"),jd=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],ay=Ta.toLowerCase(),ly=Ta[0].toUpperCase()+Ta.slice(1);mn(ay,"on"+ly)}mn(Nd,"onAnimationEnd"),mn(Rd,"onAnimationIteration"),mn(jd,"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(" "),uy=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,ax(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 v=a.length-1;0<=v;v--){var R=a[v],j=R.instance,F=R.currentTarget;if(R=R.listener,j!==f&&c.isPropagationStopped())break e;Od(c,R,F),f=j}else for(v=0;v<a.length;v++){if(R=a[v],j=R.instance,F=R.currentTarget,R=R.listener,j!==f&&c.isPropagationStopped())break e;Od(c,R,F),f=j}}}if(ns)throw e=aa,ns=!1,aa=null,e}function je(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"&&(uy.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=Cx;break;case 4:c=kx;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 v=a.tag;if(v===3||v===4){var R=a.stateNode.containerInfo;if(R===c||R.nodeType===8&&R.parentNode===c)break;if(v===4)for(v=a.return;v!==null;){var j=v.tag;if((j===3||j===4)&&(j=v.stateNode.containerInfo,j===c||j.nodeType===8&&j.parentNode===c))return;v=v.return}for(;R!==null;){if(v=zn(R),v===null)return;if(j=v.tag,j===5||j===6){a=f=v;continue e}R=R.parentNode}}a=a.return}$c(function(){var F=f,K=ra(o),V=[];e:{var W=Td.get(e);if(W!==void 0){var X=va,ne=e;switch(e){case"keypress":if(ps(o)===0)break e;case"keydown":case"keyup":X=$x;break;case"focusin":ne="focus",X=wa;break;case"focusout":ne="blur",X=wa;break;case"beforeblur":case"afterblur":X=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":X=id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Rx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=Hx;break;case Nd:case Rd:case jd:X=Tx;break;case Pd:X=Wx;break;case"scroll":X=Ex;break;case"wheel":X=Vx;break;case"copy":case"cut":case"paste":X=Ox;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=ld}var re=(n&4)!==0,Le=!re&&e==="scroll",M=re?W!==null?W+"Capture":null:W;re=[];for(var T=F,I;T!==null;){I=T;var G=I.stateNode;if(I.tag===5&&G!==null&&(I=G,M!==null&&(G=qr(T,M),G!=null&&re.push(mo(T,G,I)))),Le)break;T=T.return}0<re.length&&(W=new X(W,ne,null,o,K),V.push({event:W,listeners:re}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",W&&o!==na&&(ne=o.relatedTarget||o.fromElement)&&(zn(ne)||ne[Xt]))break e;if((X||W)&&(W=K.window===K?K:(W=K.ownerDocument)?W.defaultView||W.parentWindow:window,X?(ne=o.relatedTarget||o.toElement,X=F,ne=ne?zn(ne):null,ne!==null&&(Le=$n(ne),ne!==Le||ne.tag!==5&&ne.tag!==6)&&(ne=null)):(X=null,ne=F),X!==ne)){if(re=id,G="onMouseLeave",M="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(re=ld,G="onPointerLeave",M="onPointerEnter",T="pointer"),Le=X==null?W:gr(X),I=ne==null?W:gr(ne),W=new re(G,T+"leave",X,o,K),W.target=Le,W.relatedTarget=I,G=null,zn(K)===F&&(re=new re(M,T+"enter",ne,o,K),re.target=I,re.relatedTarget=Le,G=re),Le=G,X&&ne)t:{for(re=X,M=ne,T=0,I=re;I;I=hr(I))T++;for(I=0,G=M;G;G=hr(G))I++;for(;0<T-I;)re=hr(re),T--;for(;0<I-T;)M=hr(M),I--;for(;T--;){if(re===M||M!==null&&re===M.alternate)break t;re=hr(re),M=hr(M)}re=null}else re=null;X!==null&&Id(V,W,X,re,!1),ne!==null&&Le!==null&&Id(V,Le,ne,re,!0)}}e:{if(W=F?gr(F):window,X=W.nodeName&&W.nodeName.toLowerCase(),X==="select"||X==="input"&&W.type==="file")var se=Jx;else if(hd(W))if(gd)se=ry;else{se=ty;var ue=ey}else(X=W.nodeName)&&X.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(se=ny);if(se&&(se=se(e,F))){md(V,se,o,K);break e}ue&&ue(e,W,F),e==="focusout"&&(ue=W._wrapperState)&&ue.controlled&&W.type==="number"&&Xi(W,"number",W.value)}switch(ue=F?gr(F):window,e){case"focusin":(hd(ue)||ue.contentEditable==="true")&&(fr=ue,Na=F,fo=null);break;case"focusout":fo=Na=fr=null;break;case"mousedown":Ra=!0;break;case"contextmenu":case"mouseup":case"dragend":Ra=!1,kd(V,o,K);break;case"selectionchange":if(iy)break;case"keydown":case"keyup":kd(V,o,K)}var ce;if(Sa)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else dr?fd(e,o)&&(fe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(fe="onCompositionStart");fe&&(ud&&o.locale!=="ko"&&(dr||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&dr&&(ce=od()):(hn=K,ga="value"in hn?hn.value:hn.textContent,dr=!0)),ue=ws(F,fe),0<ue.length&&(fe=new ad(fe,e,null,o,K),V.push({event:fe,listeners:ue}),ce?fe.data=ce:(ce=pd(o),ce!==null&&(fe.data=ce)))),(ce=Gx?qx(e,o):Yx(e,o))&&(F=ws(F,"onBeforeInput"),0<F.length&&(K=new ad("onBeforeInput","beforeinput",null,o,K),V.push({event:K,listeners:F}),K.data=ce))}Ad(V,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,v=[];o!==null&&o!==a;){var R=o,j=R.alternate,F=R.stateNode;if(j!==null&&j===a)break;R.tag===5&&F!==null&&(R=F,c?(j=qr(o,f),j!=null&&v.unshift(mo(o,j,R))):c||(j=qr(o,f),j!=null&&v.push(mo(o,j,R)))),o=o.return}v.length!==0&&e.push({event:n,listeners:v})}var cy=/\r\n?/g,dy=/\u0000|\uFFFD/g;function Ld(e){return(typeof e=="string"?e:""+e).replace(cy,`
|
|
6
|
+
`).replace(dy,"")}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,fy=typeof clearTimeout=="function"?clearTimeout:void 0,Dd=typeof Promise=="function"?Promise:void 0,py=typeof queueMicrotask=="function"?queueMicrotask:typeof Dd<"u"?function(e){return Dd.resolve(null).then(e).catch(hy)}:La;function hy(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,my="__reactListeners$"+mr,gy="__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 Q({},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 vy(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,Rs=null,js=0,wt=[],bt=0,Hn=null,Jt=1,en="";function Bn(e,n){yr[wr++]=js,yr[wr++]=Rs,Rs=e,js=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-jt(a)-1;a&=~(1<<c),o+=1;var f=32-jt(n)+c;if(30<f){var v=c-c%5;f=(a&(1<<v)-1).toString(32),a>>=v,c-=v,Jt=1<<32-jt(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===Rs;)Rs=yr[--wr],yr[wr]=null,js=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 xy=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(v){var R=c.refs;v===null?delete R[f]:R[f]=v},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=Rn(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 v(M){return e&&M.alternate===null&&(M.flags|=2),M}function R(M,T,I,G){return T===null||T.tag!==6?(T=Ll(I,M.mode,G),T.return=M,T):(T=c(T,I),T.return=M,T)}function j(M,T,I,G){var se=I.type;return se===$?K(M,T,I.props.children,G,I.key):T!==null&&(T.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===oe&&Gd(se)===T.type)?(G=c(T,I.props),G.ref=xo(M,T,I),G.return=M,G):(G=ei(I.type,I.key,I.props,null,M.mode,G),G.ref=xo(M,T,I),G.return=M,G)}function F(M,T,I,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==I.containerInfo||T.stateNode.implementation!==I.implementation?(T=Dl(I,M.mode,G),T.return=M,T):(T=c(T,I.children||[]),T.return=M,T)}function K(M,T,I,G,se){return T===null||T.tag!==7?(T=Xn(I,M.mode,G,se),T.return=M,T):(T=c(T,I),T.return=M,T)}function V(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 oe:var G=T._init;return V(M,G(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 W(M,T,I,G){var se=T!==null?T.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return se!==null?null:R(M,T,""+I,G);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case D:return I.key===se?j(M,T,I,G):null;case O:return I.key===se?F(M,T,I,G):null;case oe:return se=I._init,W(M,T,se(I._payload),G)}if(Vr(I)||B(I))return se!==null?null:K(M,T,I,G,null);Ts(M,I)}return null}function X(M,T,I,G,se){if(typeof G=="string"&&G!==""||typeof G=="number")return M=M.get(I)||null,R(T,M,""+G,se);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case D:return M=M.get(G.key===null?I:G.key)||null,j(T,M,G,se);case O:return M=M.get(G.key===null?I:G.key)||null,F(T,M,G,se);case oe:var ue=G._init;return X(M,T,I,ue(G._payload),se)}if(Vr(G)||B(G))return M=M.get(I)||null,K(T,M,G,se,null);Ts(T,G)}return null}function ne(M,T,I,G){for(var se=null,ue=null,ce=T,fe=T=0,Ke=null;ce!==null&&fe<I.length;fe++){ce.index>fe?(Ke=ce,ce=null):Ke=ce.sibling;var Ce=W(M,ce,I[fe],G);if(Ce===null){ce===null&&(ce=Ke);break}e&&ce&&Ce.alternate===null&&n(M,ce),T=f(Ce,T,fe),ue===null?se=Ce:ue.sibling=Ce,ue=Ce,ce=Ke}if(fe===I.length)return o(M,ce),_e&&Bn(M,fe),se;if(ce===null){for(;fe<I.length;fe++)ce=V(M,I[fe],G),ce!==null&&(T=f(ce,T,fe),ue===null?se=ce:ue.sibling=ce,ue=ce);return _e&&Bn(M,fe),se}for(ce=a(M,ce);fe<I.length;fe++)Ke=X(ce,M,fe,I[fe],G),Ke!==null&&(e&&Ke.alternate!==null&&ce.delete(Ke.key===null?fe:Ke.key),T=f(Ke,T,fe),ue===null?se=Ke:ue.sibling=Ke,ue=Ke);return e&&ce.forEach(function(jn){return n(M,jn)}),_e&&Bn(M,fe),se}function re(M,T,I,G){var se=B(I);if(typeof se!="function")throw Error(s(150));if(I=se.call(I),I==null)throw Error(s(151));for(var ue=se=null,ce=T,fe=T=0,Ke=null,Ce=I.next();ce!==null&&!Ce.done;fe++,Ce=I.next()){ce.index>fe?(Ke=ce,ce=null):Ke=ce.sibling;var jn=W(M,ce,Ce.value,G);if(jn===null){ce===null&&(ce=Ke);break}e&&ce&&jn.alternate===null&&n(M,ce),T=f(jn,T,fe),ue===null?se=jn:ue.sibling=jn,ue=jn,ce=Ke}if(Ce.done)return o(M,ce),_e&&Bn(M,fe),se;if(ce===null){for(;!Ce.done;fe++,Ce=I.next())Ce=V(M,Ce.value,G),Ce!==null&&(T=f(Ce,T,fe),ue===null?se=Ce:ue.sibling=Ce,ue=Ce);return _e&&Bn(M,fe),se}for(ce=a(M,ce);!Ce.done;fe++,Ce=I.next())Ce=X(ce,M,fe,Ce.value,G),Ce!==null&&(e&&Ce.alternate!==null&&ce.delete(Ce.key===null?fe:Ce.key),T=f(Ce,T,fe),ue===null?se=Ce:ue.sibling=Ce,ue=Ce);return e&&ce.forEach(function(Xy){return n(M,Xy)}),_e&&Bn(M,fe),se}function Le(M,T,I,G){if(typeof I=="object"&&I!==null&&I.type===$&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case D:e:{for(var se=I.key,ue=T;ue!==null;){if(ue.key===se){if(se=I.type,se===$){if(ue.tag===7){o(M,ue.sibling),T=c(ue,I.props.children),T.return=M,M=T;break e}}else if(ue.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===oe&&Gd(se)===ue.type){o(M,ue.sibling),T=c(ue,I.props),T.ref=xo(M,ue,I),T.return=M,M=T;break e}o(M,ue);break}else n(M,ue);ue=ue.sibling}I.type===$?(T=Xn(I.props.children,M.mode,G,I.key),T.return=M,M=T):(G=ei(I.type,I.key,I.props,null,M.mode,G),G.ref=xo(M,T,I),G.return=M,M=G)}return v(M);case O:e:{for(ue=I.key;T!==null;){if(T.key===ue)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,G),T.return=M,M=T}return v(M);case oe:return ue=I._init,Le(M,T,ue(I._payload),G)}if(Vr(I))return ne(M,T,I,G);if(B(I))return re(M,T,I,G);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,G),T.return=M,M=T),v(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 v={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=v:f=f.next=v,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,v=c.lastBaseUpdate,R=c.shared.pending;if(R!==null){c.shared.pending=null;var j=R,F=j.next;j.next=null,v===null?f=F:v.next=F,v=j;var K=e.alternate;K!==null&&(K=K.updateQueue,R=K.lastBaseUpdate,R!==v&&(R===null?K.firstBaseUpdate=F:R.next=F,K.lastBaseUpdate=j))}if(f!==null){var V=c.baseState;v=0,K=F=j=null,R=f;do{var W=R.lane,X=R.eventTime;if((a&W)===W){K!==null&&(K=K.next={eventTime:X,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ne=e,re=R;switch(W=n,X=o,re.tag){case 1:if(ne=re.payload,typeof ne=="function"){V=ne.call(X,V,W);break e}V=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=re.payload,W=typeof ne=="function"?ne.call(X,V,W):ne,W==null)break e;V=Q({},V,W);break e;case 2:wn=!0}}R.callback!==null&&R.lane!==0&&(e.flags|=64,W=c.effects,W===null?c.effects=[R]:W.push(R))}else X={eventTime:X,lane:W,tag:R.tag,payload:R.payload,callback:R.callback,next:null},K===null?(F=K=X,j=V):K=K.next=X,v|=W;if(R=R.next,R===null){if(R=c.shared.pending,R===null)break;W=R,R=W.next,W.next=null,c.lastBaseUpdate=W,c.shared.pending=null}}while(!0);if(K===null&&(j=V),c.baseState=j,c.firstBaseUpdate=F,c.lastBaseUpdate=K,n=c.shared.interleaved,n!==null){c=n;do v|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Qn|=v,e.lanes=v,e.memoizedState=V}}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,yy=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?Cy:ky,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=Ey,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 v=c.next;c.next=f.next,f.next=v}a.baseQueue=c=f,o.pending=null}if(c!==null){f=c.next,a=a.baseState;var R=v=null,j=null,F=f;do{var K=F.lane;if((Vn&K)===K)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 V={lane:K,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};j===null?(R=j=V,v=a):j=j.next=V,Ae.lanes|=K,Qn|=K}F=F.next}while(F!==null&&F!==f);j===null?v=a:j.next=R,Pt(a,n.memoizedState)||(lt=!0),n.memoizedState=a,n.baseState=v,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 v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==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=Sy.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 v=$e.memoizedState;if(f=v.destroy,a!==null&&rl(a,v.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 wy(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 by(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 Sy(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 v=n.lastRenderedState,R=f(v,o);if(c.hasEagerState=!0,c.eagerState=R,Pt(R,v)){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},Cy={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=by.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=wy.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-jt(a)-1)).toString(32)+o,n=":"+n+"R"+o,o=Co++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=yy++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},ky={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},Ey={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=Q({},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:Q({},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,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,v):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+=we(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 Ny=typeof WeakMap=="function"?WeakMap:Map;function Rf(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,jl=a),pl(e,n)},o}function jf(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 v=n.stack;this.componentDidCatch(n.value,{componentStack:v!==null?v:""})}),o}function Pf(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new Ny;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=zy.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 Ry=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 v=f.memoizedProps;if(o=o.compare,o=o!==null?o:co,o(v,a)&&e.ref===n.ref)return rn(e,n,c)}return n.flags|=1,e=Rn(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(jr,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(jr,mt),mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=f!==null?f.baseLanes:o,Ne(jr,mt),mt|=a}else f!==null?(a=f.baseLanes|o,n.memoizedState=null):a=o,Ne(jr,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 v=n.stateNode,R=n.memoizedProps;v.props=R;var j=v.context,F=o.contextType;typeof F=="object"&&F!==null?F=St(F):(F=at(o)?Un:qe.current,F=xr(n,F));var K=o.getDerivedStateFromProps,V=typeof K=="function"||typeof v.getSnapshotBeforeUpdate=="function";V||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(R!==a||j!==F)&&Nf(n,v,a,F),wn=!1;var W=n.memoizedState;v.state=W,Ms(n,a,v,c),j=n.memoizedState,R!==a||W!==j||it.current||wn?(typeof K=="function"&&(cl(n,o,K,a),j=n.memoizedState),(R=wn||kf(n,o,R,a,W,j,F))?(V||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(n.flags|=4194308)):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=j),v.props=a,v.state=j,v.context=F,a=R):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{v=n.stateNode,Zd(e,n),R=n.memoizedProps,F=n.type===n.elementType?R:_t(n.type,R),v.props=F,V=n.pendingProps,W=v.context,j=o.contextType,typeof j=="object"&&j!==null?j=St(j):(j=at(o)?Un:qe.current,j=xr(n,j));var X=o.getDerivedStateFromProps;(K=typeof X=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(R!==V||W!==j)&&Nf(n,v,a,j),wn=!1,W=n.memoizedState,v.state=W,Ms(n,a,v,c);var ne=n.memoizedState;R!==V||W!==ne||it.current||wn?(typeof X=="function"&&(cl(n,o,X,a),ne=n.memoizedState),(F=wn||kf(n,o,F,a,W,ne,j)||!1)?(K||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(a,ne,j),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(a,ne,j)),typeof v.componentDidUpdate=="function"&&(n.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof v.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=ne),v.props=a,v.state=ne,v.context=j,a=F):(typeof v.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===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 v=(n.flags&128)!==0;if(!a&&!v)return c&&Ud(n,o,!1),rn(e,n,f);a=n.stateNode,Ry.current=n;var R=v&&typeof o.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&v?(n.child=Sr(n,e.child,null,f),n.child=Sr(n,null,R,f)):tt(e,n,R,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,v=(n.flags&128)!==0,R;if((R=v)||(R=e!==null&&e.memoizedState===null?!1:(c&2)!==0),R?(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):(v=a.children,e=a.fallback,f?(a=n.mode,f=n.child,v={mode:"hidden",children:v},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=v):f=ti(v,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,v));if(c=e.memoizedState,c!==null&&(R=c.dehydrated,R!==null))return jy(e,n,v,a,R,c,o);if(f){f=a.fallback,v=n.mode,c=e.child,R=c.sibling;var j={mode:"hidden",children:a.children};return(v&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=j,n.deletions=null):(a=Rn(c,j),a.subtreeFlags=c.subtreeFlags&14680064),R!==null?f=Rn(R,f):(f=Xn(f,v,o,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,v=e.child.memoizedState,v=v===null?vl(o):{baseLanes:v.baseLanes|o,cachePool:null,transitions:v.transitions},f.memoizedState=v,f.childLanes=e.childLanes&~o,n.memoizedState=gl,a}return f=e.child,e=f.sibling,a=Rn(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 jy(e,n,o,a,c,f,v){if(o)return n.flags&256?(n.flags&=-257,a=fl(Error(s(422))),Hs(e,n,v,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,v,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,v),n.child.memoizedState=vl(v),n.memoizedState=gl,f);if((n.mode&1)===0)return Hs(e,n,v,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var R=a.dgst;return a=R,f=Error(s(419)),a=fl(f,a,void 0),Hs(e,n,v,a)}if(R=(v&e.childLanes)!==0,lt||R){if(a=We,a!==null){switch(v&-v){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|v))!==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,v,a)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=Uy.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=Rn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Rn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Py(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=Q({},c,{value:void 0}),a=Q({},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 v;o=null;for(F in c)if(!a.hasOwnProperty(F)&&c.hasOwnProperty(F)&&c[F]!=null)if(F==="style"){var R=c[F];for(v in R)R.hasOwnProperty(v)&&(o||(o={}),o[v]="")}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(R=c?.[F],a.hasOwnProperty(F)&&j!==R&&(j!=null||R!=null))if(F==="style")if(R){for(v in R)!R.hasOwnProperty(v)||j&&j.hasOwnProperty(v)||(o||(o={}),o[v]="");for(v in j)j.hasOwnProperty(v)&&R[v]!==j[v]&&(o||(o={}),o[v]=j[v])}else o||(f||(f=[]),f.push(F,o)),o=j;else F==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,R=R?R.__html:void 0,j!=null&&R!==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"&&je("scroll",e),f||R===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 Ty(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":je("cancel",a),je("close",a);break;case"iframe":case"object":case"embed":je("load",a);break;case"video":case"audio":for(c=0;c<po.length;c++)je(po[c],a);break;case"source":je("error",a);break;case"img":case"image":case"link":je("error",a),je("load",a);break;case"details":je("toggle",a);break;case"input":kc(a,f),je("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},je("invalid",a);break;case"textarea":Rc(a,f),je("invalid",a)}ea(o,f),c=null;for(var v in f)if(f.hasOwnProperty(v)){var R=f[v];v==="children"?typeof R=="string"?a.textContent!==R&&(f.suppressHydrationWarning!==!0&&bs(a.textContent,R,e),c=["children",R]):typeof R=="number"&&a.textContent!==""+R&&(f.suppressHydrationWarning!==!0&&bs(a.textContent,R,e),c=["children",""+R]):u.hasOwnProperty(v)&&R!=null&&v==="onScroll"&&je("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{v=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=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=v.createElement(o,{is:a.is}):(e=v.createElement(o),o==="select"&&(v=e,a.multiple?v.multiple=!0:a.size&&(v.size=a.size))):e=v.createElementNS(e,o),e[zt]=n,e[go]=a,Bf(e,n,!1,!1),n.stateNode=e;e:{switch(v=ta(o,a),o){case"dialog":je("cancel",e),je("close",e),c=a;break;case"iframe":case"object":case"embed":je("load",e),c=a;break;case"video":case"audio":for(c=0;c<po.length;c++)je(po[c],e);c=a;break;case"source":je("error",e),c=a;break;case"img":case"image":case"link":je("error",e),je("load",e),c=a;break;case"details":je("toggle",e),c=a;break;case"input":kc(e,a),c=qi(e,a),je("invalid",e);break;case"option":c=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},c=Q({},a,{value:void 0}),je("invalid",e);break;case"textarea":Rc(e,a),c=Zi(e,a),je("invalid",e);break;default:c=a}ea(o,c),R=c;for(f in R)if(R.hasOwnProperty(f)){var j=R[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"&&je("scroll",e):j!=null&&_(e,f,j,v))}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,v=f.rendering,v===null)if(a)No(f,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(v=Is(e),v!==null){for(n.flags|=128,No(f,!1),a=v.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,v=f.alternate,v===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=v.childLanes,f.lanes=v.lanes,f.child=v.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=v.memoizedProps,f.memoizedState=v.memoizedState,f.updateQueue=v.updateQueue,f.type=v.type,e=v.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(v),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"&&!v.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?(v.sibling=n.child,n.child=v):(o=f.last,o!==null?o.sibling=v:n.child=v,f.last=v)}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 _y(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,Oy=typeof WeakSet=="function"?WeakSet:Set,J=null;function Rr(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 Ay(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 v=0,R=-1,j=-1,F=0,K=0,V=e,W=null;t:for(;;){for(var X;V!==o||c!==0&&V.nodeType!==3||(R=v+c),V!==f||a!==0&&V.nodeType!==3||(j=v+a),V.nodeType===3&&(v+=V.nodeValue.length),(X=V.firstChild)!==null;)W=V,V=X;for(;;){if(V===e)break t;if(W===o&&++F===c&&(R=v),W===f&&++K===a&&(j=v),(X=V.nextSibling)!==null)break;V=W,W=V.parentNode}V=X}o=R===-1||j===-1?null:{start:R,end:j}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ma={focusedElem:e,selectionRange:o},cs=!1,J=n;J!==null;)if(n=J,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,J=e;else for(;J!==null;){n=J;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var re=ne.memoizedProps,Le=ne.memoizedState,M=n.stateNode,T=M.getSnapshotBeforeUpdate(n.elementType===n.type?re:_t(n.type,re),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(G){Me(n,n.return,G)}if(e=n.sibling,e!==null){e.return=n.return,J=e;break}J=n.return}return ne=Vf,Vf=!1,ne}function Ro(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[my],delete n[gy])),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||Rr(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,v=f.destroy;f=f.tag,v!==void 0&&((f&2)!==0||(f&4)!==0)&&bl(o,n,v),c=c.next}while(c!==a)}Sn(e,n,o);break;case 1:if(!Ze&&(Rr(o,n),a=o.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(R){Me(o,n,R)}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 Oy),n.forEach(function(a){var c=Hy.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,v=n,R=v;e:for(;R!==null;){switch(R.tag){case 5:Ve=R.stateNode,Ot=!1;break e;case 3:Ve=R.stateNode.containerInfo,Ot=!0;break e;case 4:Ve=R.stateNode.containerInfo,Ot=!0;break e}R=R.return}if(Ve===null)throw Error(s(160));Yf(f,v,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{Ro(3,e,e.return),Ks(3,e)}catch(re){Me(e,e.return,re)}try{Ro(5,e,e.return)}catch(re){Me(e,e.return,re)}}break;case 1:At(n,e),Bt(e),a&512&&o!==null&&Rr(o,o.return);break;case 5:if(At(n,e),Bt(e),a&512&&o!==null&&Rr(o,o.return),e.flags&32){var c=e.stateNode;try{Qr(c,"")}catch(re){Me(e,e.return,re)}}if(a&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,v=o!==null?o.memoizedProps:f,R=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{R==="input"&&f.type==="radio"&&f.name!=null&&Ec(c,f),ta(R,v);var F=ta(R,f);for(v=0;v<j.length;v+=2){var K=j[v],V=j[v+1];K==="style"?Ac(c,V):K==="dangerouslySetInnerHTML"?_c(c,V):K==="children"?Qr(c,V):_(c,K,V,F)}switch(R){case"input":Yi(c,f);break;case"textarea":jc(c,f);break;case"select":var W=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var X=f.value;X!=null?ir(c,!!f.multiple,X,!1):W!==!!f.multiple&&(f.defaultValue!=null?ir(c,!!f.multiple,f.defaultValue,!0):ir(c,!!f.multiple,f.multiple?[]:"",!1))}c[go]=f}catch(re){Me(e,e.return,re)}}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(re){Me(e,e.return,re)}}break;case 3:if(At(n,e),Bt(e),a&4&&o!==null&&o.memoizedState.isDehydrated)try{oo(n.containerInfo)}catch(re){Me(e,e.return,re)}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||(Rl=Ie())),a&4&&Xf(e);break;case 22:if(K=o!==null&&o.memoizedState!==null,e.mode&1?(Ze=(F=Ze)||K,At(n,e),Ze=F):At(n,e),Bt(e),a&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!K&&(e.mode&1)!==0)for(J=e,K=e.child;K!==null;){for(V=J=K;J!==null;){switch(W=J,X=W.child,W.tag){case 0:case 11:case 14:case 15:Ro(4,W,W.return);break;case 1:Rr(W,W.return);var ne=W.stateNode;if(typeof ne.componentWillUnmount=="function"){a=W,o=W.return;try{n=a,ne.props=n.memoizedProps,ne.state=n.memoizedState,ne.componentWillUnmount()}catch(re){Me(a,o,re)}}break;case 5:Rr(W,W.return);break;case 22:if(W.memoizedState!==null){tp(V);continue}}X!==null?(X.return=W,J=X):tp(V)}K=K.sibling}e:for(K=null,V=e;;){if(V.tag===5){if(K===null){K=V;try{c=V.stateNode,F?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(R=V.stateNode,j=V.memoizedProps.style,v=j!=null&&j.hasOwnProperty("display")?j.display:null,R.style.display=Oc("display",v))}catch(re){Me(e,e.return,re)}}}else if(V.tag===6){if(K===null)try{V.stateNode.nodeValue=F?"":V.memoizedProps}catch(re){Me(e,e.return,re)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;K===V&&(K=null),V=V.return}K===V&&(K=null),V.sibling.return=V.return,V=V.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 v=a.stateNode.containerInfo,R=qf(e);Cl(e,R,v);break;default:throw Error(s(161))}}catch(j){Me(e,e.return,j)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function My(e,n,o){J=e,Jf(e)}function Jf(e,n,o){for(var a=(e.mode&1)!==0;J!==null;){var c=J,f=c.child;if(c.tag===22&&a){var v=c.memoizedState!==null||Ws;if(!v){var R=c.alternate,j=R!==null&&R.memoizedState!==null||Ze;R=Ws;var F=Ze;if(Ws=v,(Ze=j)&&!F)for(J=c;J!==null;)v=J,j=v.child,v.tag===22&&v.memoizedState!==null?np(c):j!==null?(j.return=v,J=j):np(c);for(;f!==null;)J=f,Jf(f),f=f.sibling;J=c,Ws=R,Ze=F}ep(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,J=f):ep(e)}}function ep(e){for(;J!==null;){var n=J;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 v=n.updateQueue;if(v!==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,v,o)}break;case 5:var R=n.stateNode;if(o===null&&n.flags&4){o=R;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 K=F.memoizedState;if(K!==null){var V=K.dehydrated;V!==null&&oo(V)}}}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(W){Me(n,n.return,W)}}if(n===e){J=null;break}if(o=n.sibling,o!==null){o.return=n.return,J=o;break}J=n.return}}function tp(e){for(;J!==null;){var n=J;if(n===e){J=null;break}var o=n.sibling;if(o!==null){o.return=n.return,J=o;break}J=n.return}}function np(e){for(;J!==null;){var n=J;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 v=n.return;try{Sl(n)}catch(j){Me(n,v,j)}}}catch(j){Me(n,n.return,j)}if(n===e){J=null;break}var R=n.sibling;if(R!==null){R.return=n.return,J=R;break}J=n.return}}var Iy=Math.ceil,Vs=L.ReactCurrentDispatcher,El=L.ReactCurrentOwner,kt=L.ReactCurrentBatchConfig,Se=0,We=null,Fe=null,Qe=0,mt=0,jr=vn(0),ze=0,jo=null,Qn=0,Qs=0,Nl=0,Po=null,ut=null,Rl=0,Pr=1/0,on=null,Gs=!1,jl=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:xy.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;xx(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?vy(op.bind(null,e)):Hd(op.bind(null,e)),py(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{Fy();break}catch(R){sp(e,R)}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=jo,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&&!Ly(c)&&(n=Js(e,a),n===2&&(f=ua(e),f!==0&&(a=f,n=Tl(e,f))),n===1))throw o=jo,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=Rl+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 v=31-jt(a);f=1<<v,v=n[v],v>c&&(c=v),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*Iy(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 Ly(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-jt(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=jo,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=jr.current,Pe(jr)}function qn(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,fy(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=Rn(e.current,null),Qe=mt=n,ze=0,jo=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 v=f.next;f.next=c,a.next=v}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,jo=n,Fe=null;break}e:{var f=e,v=o.return,R=o,j=n;if(n=Qe,R.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var F=j,K=R,V=K.tag;if((K.mode&1)===0&&(V===0||V===11||V===15)){var W=K.alternate;W?(K.updateQueue=W.updateQueue,K.memoizedState=W.memoizedState,K.lanes=W.lanes):(K.updateQueue=null,K.memoizedState=null)}var X=Tf(v);if(X!==null){X.flags&=-257,_f(X,v,R,f,n),X.mode&1&&Pf(f,F,n),n=X,j=F;var ne=n.updateQueue;if(ne===null){var re=new Set;re.add(j),n.updateQueue=re}else ne.add(j);break e}else{if((n&1)===0){Pf(f,F,n),Ml();break e}j=Error(s(426))}}else if(_e&&R.mode&1){var Le=Tf(v);if(Le!==null){(Le.flags&65536)===0&&(Le.flags|=256),_f(Le,v,R,f,n),Ka(Nr(j,R));break e}}f=j=Nr(j,R),ze!==4&&(ze=2),Po===null?Po=[f]:Po.push(f),f=v;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var M=Rf(f,j,n);Jd(f,M);break e;case 1:R=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 G=jf(f,R,n);Jd(f,G);break e}}f=f.return}while(f!==null)}lp(o)}catch(se){n=se,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{Dy();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 Dy(){for(;Fe!==null;)ap(Fe)}function Fy(){for(;Fe!==null&&!ux();)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=Ty(o,n,mt),o!==null){Fe=o;return}}else{if(o=_y(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,$y(e,n,o,a)}finally{kt.transition=c,ke=a}return null}function $y(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(yx(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 v=ke;ke=1;var R=Se;Se|=4,El.current=null,Ay(e,o),Zf(o,e),sy(Ma),cs=!!Aa,Ma=Aa=null,e.current=o,My(o),cx(),Se=R,ke=v,kt.transition=f}else e.current=o;if(qs&&(qs=!1,kn=e,Ys=c),f=e.pendingLanes,f===0&&(Cn=null),px(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=jl,jl=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,J=e.current;J!==null;){var f=J,v=f.child;if((J.flags&16)!==0){var R=f.deletions;if(R!==null){for(var j=0;j<R.length;j++){var F=R[j];for(J=F;J!==null;){var K=J;switch(K.tag){case 0:case 11:case 15:Ro(8,K,f)}var V=K.child;if(V!==null)V.return=K,J=V;else for(;J!==null;){K=J;var W=K.sibling,X=K.return;if(Qf(K),K===F){J=null;break}if(W!==null){W.return=X,J=W;break}J=X}}}var ne=f.alternate;if(ne!==null){var re=ne.child;if(re!==null){ne.child=null;do{var Le=re.sibling;re.sibling=null,re=Le}while(re!==null)}}J=f}}if((f.subtreeFlags&2064)!==0&&v!==null)v.return=f,J=v;else e:for(;J!==null;){if(f=J,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:Ro(9,f,f.return)}var M=f.sibling;if(M!==null){M.return=f.return,J=M;break e}J=f.return}}var T=e.current;for(J=T;J!==null;){v=J;var I=v.child;if((v.subtreeFlags&2064)!==0&&I!==null)I.return=v,J=I;else e:for(v=T;J!==null;){if(R=J,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:Ks(9,R)}}catch(se){Me(R,R.return,se)}if(R===v){J=null;break e}var G=R.sibling;if(G!==null){G.return=R.return,J=G;break e}J=R.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=Rf(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=jf(n,e,1),n=bn(n,e,1),e=nt(),n!==null&&(Jr(n,1,e),ct(n,e));break}}n=n.return}}function zy(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()-Rl?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 Uy(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),cp(e,o)}function Hy(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,Py(e,n,o);lt=(e.flags&131072)!==0}else lt=!1,_e&&(n.flags&1048576)!==0&&Bd(n,js,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=Wy(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 v=n.memoizedState;if(a=v.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.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,v=c.children,Ia(a,c)?v=null:f!==null&&Ia(a,f)&&(n.flags|=32),Lf(e,n),tt(e,n,v,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,v=c.value,Ne(_s,a._currentValue),a._currentValue=v,f!==null)if(Pt(f.value,v)){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 R=f.dependencies;if(R!==null){v=f.child;for(var j=R.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 K=F.pending;K===null?j.next=j:(j.next=K.next,K.next=j),F.pending=j}}f.lanes|=o,j=f.alternate,j!==null&&(j.lanes|=o),qa(f.return,o,n),R.lanes|=o;break}j=j.next}}else if(f.tag===10)v=f.type===n.type?null:f.child;else if(f.tag===18){if(v=f.return,v===null)throw Error(s(341));v.lanes|=o,R=v.alternate,R!==null&&(R.lanes|=o),qa(v,o,n),v=f.sibling}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===n){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}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 By(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 By(e,n,o,a)}function Il(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wy(e){if(typeof e=="function")return Il(e)?1:0;if(e!=null){if(e=e.$$typeof,e===q)return 11;if(e===me)return 14}return 2}function Rn(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 v=2;if(a=e,typeof e=="function")Il(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case $:return Xn(o.children,c,f,n);case U:v=8,c|=8;break;case Z:return e=Et(12,o,n,c|2),e.elementType=Z,e.lanes=f,e;case le:return e=Et(13,o,n,c),e.elementType=le,e.lanes=f,e;case Y:return e=Et(19,o,n,c),e.elementType=Y,e.lanes=f,e;case ie:return ti(o,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:v=10;break e;case te:v=9;break e;case q:v=11;break e;case me:v=14;break e;case oe:v=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Et(v,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=ie,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 Ky(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,v,R,j){return e=new Ky(e,n,o,R,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 Vy(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,v,R,j){return e=Fl(o,a,!0,e,c,f,v,R,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(),v=En(c);return o=pp(o),n.context===null?n.context=o:n.pendingContext=o,n=nn(f,v),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=bn(c,n,v),e!==null&&(Mt(e,c,v,f),As(e,c,v)),v}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 Gy(e,n,o,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var F=ri(v);f.call(F)}}var v=hp(n,a,e,0,null,!1,!1,"",vp);return e._reactRootContainer=v,e[Xt]=v.current,ho(e.nodeType===8?e.parentNode:e),Gn(),v}for(;c=e.lastChild;)e.removeChild(c);if(typeof a=="function"){var R=a;a=function(){var F=ri(j);R.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 v=f;if(typeof c=="function"){var R=c;c=function(){var j=ri(v);R.call(j)}}ni(n,v,e,c)}else v=Gy(o,n,e,c,a);return ri(v)}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":jc(e,o);break;case"select":n=o.value,n!=null&&ir(e,!!o.multiple,n,!1)}},Dc=Ol,Fc=Gn;var qy={usingClientEntryPoint:!1,Events:[vo,gr,Cs,Ic,Lc,Ol]},_o={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Yy={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(Yy),$t=ai}catch{}}return dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qy,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 Vy(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="",v=gp;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(v=o.onRecoverableError)),n=hp(n,null,e,1,o??null,c,!1,f,v),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 Fh(){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=ow(),Wl.exports}var Np;function sw(){if(Np)return li;Np=1;var t=Fh();return li.createRoot=t.createRoot,li.hydrateRoot=t.hydrateRoot,li}var iw=sw();function aw(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=Dh(m),Uu=Zy({__proto__:null,default:On},[m]);var Ql={exports:{}},Gl={};var Rp;function lw(){if(Rp)return Gl;Rp=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(),E=i({inst:{value:C,getSnapshot:b}}),S=E[0].inst,N=E[1];return d(function(){S.value=C,S.getSnapshot=b,g(S)&&N({inst:S})},[w,C,b]),u(function(){return g(S)&&N({inst:S}),w(function(){g(S)&&N({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 x(w,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x:h;return Gl.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Gl}var jp;function uw(){return jp||(jp=1,Ql.exports=lw()),Ql.exports}var $h=uw();const cw=Uu.useInsertionEffect,dw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fw=dw?m.useLayoutEffect:m.useEffect,pw=cw||fw,zh=t=>{const r=m.useRef([t,(...s)=>r[0](...s)]).current;return pw(()=>{r[0]=t}),r[1]},hw="popstate",Hu="pushState",Bu="replaceState",mw="hashchange",Pp=[hw,Hu,Bu,mw],gw=t=>{for(const r of Pp)addEventListener(r,t);return()=>{for(const r of Pp)removeEventListener(r,t)}},Uh=(t,r)=>$h.useSyncExternalStore(gw,t,r),Tp=()=>location.search,vw=({ssrSearch:t}={})=>Uh(Tp,t!=null?()=>t:Tp),_p=()=>location.pathname,xw=({ssrPath:t}={})=>Uh(_p,t!=null?()=>t:_p),yw=(t,{replace:r=!1,state:s=null}={})=>history[r?Bu:Hu](s,"",t),ww=(t={})=>[xw(t),yw],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 bw=(t,r)=>r.toLowerCase().indexOf(t.toLowerCase())?"~"+r:r.slice(t.length)||"/",Hh=(t="")=>t==="/"?"":t,Sw=(t,r)=>t[0]==="~"?t.slice(1):Hh(r)+t,Cw=(t="",r)=>bw(vu(Hh(t)),vu(r)),kw=t=>t[0]==="?"?t.slice(1):t,vu=t=>{try{return decodeURI(t)}catch{return t}},Ew=t=>vu(kw(t)),Bh={hook:ww,searchHook:vw,parser:aw,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,r,s)=>t(r,s)},Wh=m.createContext(Bh),Ko=()=>m.useContext(Wh),Kh={},Vh=m.createContext(Kh),Nw=()=>m.useContext(Vh),Wu=t=>{const[r,s]=t.hook(t);return[Cw(t.base,r),zh((i,u)=>t.aroundNav(s,Sw(i,t.base),u))]},Rw=()=>{const t=Ko();return Ew(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 x=d!==!1?Object.fromEntries(d.map((w,b)=>[w,g[b]])):p.groups;let y={...g};return x&&Object.assign(y,x),y})(),...i?[h]:[]]:[!1,null]},Gh=({children:t,...r})=>{const s=Ko(),i=r.hook?Bh: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,x=g;for(let y in i){const w=y==="base"?i[y]+(r[y]??""):r[y]??i[y];g===x&&w!==x[y]&&(h.current=x={...x}),x[y]=w,(w!==i[y]||w!==u[y])&&(u=x)}return m.createElement(Wh.Provider,{value:u,children:t})},Ap=({children:t,component:r},s)=>r?m.createElement(r,{params:s}):typeof t=="function"?t(s):t,jw=t=>{let r=m.useRef(Kh);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),x=jw({...Nw(),...h});if(!p)return null;const y=g?m.createElement(Gh,{base:g},Ap(i,x)):Ap(i,x);return m.createElement(Vh.Provider,{value:x,children:y})},Kt=m.forwardRef((t,r)=>{const s=Ko(),[i,u]=Wu(s),{to:d="",href:p=d,onClick:h,asChild:g,children:x,className:y,replace:w,state:b,transition:C,...E}=t,S=zh(P=>{P.ctrlKey||P.metaKey||P.altKey||P.shiftKey||P.button!==0||(h?.(P),P.defaultPrevented||(P.preventDefault(),u(p,t)))}),N=s.hrefs(p[0]==="~"?p.slice(1):s.base+p,s);return g&&m.isValidElement(x)?m.cloneElement(x,{onClick:S,href:N}):m.createElement("a",{...E,onClick:S,href:N,className:y?.call?y(i===p):y,children:x,ref:r})}),qh=t=>Array.isArray(t)?t.flatMap(r=>qh(r&&r.type===m.Fragment?r.props.children:r)):[t],Pw=({children:t,location:r})=>{const s=Ko(),[i]=Wu(s);for(const u of qh(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()),Tw=t=>(Io.v.push(t)===1&&addEventListener("hashchange",Mp),()=>{Io.v=Io.v.filter(r=>r!==t),Io.v.length||removeEventListener("hashchange",Mp)}),_w=()=>"/"+location.hash.replace(/^#?\/?/,""),Ow=(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)},Yh=({ssrPath:t="/"}={})=>[$h.useSyncExternalStore(Tw,_w,()=>t),Ow];Yh.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(){}},Aw={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Mw=class{#e=Aw;#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 Mw;function Iw(t){setTimeout(t,0)}var er=typeof window>"u"||"Deno"in globalThis;function rt(){}function Lw(t,r){return typeof t=="function"?t(r):t}function xu(t){return typeof t=="number"&&t>=0&&t!==1/0}function Xh(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 Dw=Object.prototype.hasOwnProperty;function Zh(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 x=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:Dw.call(t,w))&&x++;continue}if(b===null||C===null||typeof b!="object"||typeof C!="object"){g[w]=C;continue}const E=Zh(b,C,s+1);g[w]=E,E===b&&x++}return d===h&&x===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 Fw(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?Zh(t,r):r}function $w(t,r,s=0){const i=[...t,r];return s&&i.length>s?i.slice(1):i}function zw(t,r,s=0){const i=[r,...t];return s&&i.length>s?i.slice(0,-1):i}var Vu=Symbol();function Jh(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 Uw(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 Hw=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 Hw;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 Bw=Iw;function Ww(){let t=[],r=0,s=h=>{h()},i=h=>{h()},u=Bw;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=Ww(),Kw=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 Kw;function Vw(t){return Math.min(1e3*2**t,3e4)}function em(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 tm(t){let r=!1,s=0,i;const u=bu(),d=()=>u.status!=="pending",p=S=>{if(!d()){const N=new Su(S);b(N),t.onCancel?.(N)}},h=()=>{r=!0},g=()=>{r=!1},x=()=>Gu.isFocused()&&(t.networkMode==="always"||ki.isOnline())&&t.canRun(),y=()=>em(t.networkMode)&&t.canRun(),w=S=>{d()||(i?.(),u.resolve(S))},b=S=>{d()||(i?.(),u.reject(S))},C=()=>new Promise(S=>{i=N=>{(d()||x())&&S(N)},t.onPause?.()}).then(()=>{i=void 0,d()||t.onContinue?.()}),E=()=>{if(d())return;let S;const N=s===0?t.initialPromise:void 0;try{S=N??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??Vw,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),Fw(L).then(()=>x()?void 0:C()).then(()=>{r?b(P):E()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:g,canStart:y,start:()=>(y()?E():C().then(E),u)}}var nm=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 nm{#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:!Xh(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=Jh(this.options,r),x=(()=>{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,x,this):h(x)},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=tm({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,...rm(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 rm(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:em(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 Gw=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 Yw(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=Xh(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:x}=t;let y={...x},w=!1,b;if(r._optimisticResults){const U=this.hasListeners(),Z=!U&&Up(t,r),ee=U&&Hp(t,s,r,i);(Z||ee)&&(y={...y,...rm(x.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:E,status:S}=y;b=y.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let U;u?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(U=u.data,N=!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&&!N)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,E=Date.now(),S="error");const P=y.fetchStatus==="fetching",A=S==="pending",_=S==="error",L=A&&P,D=b!==void 0,$={status:S,fetchStatus:y.fetchStatus,isPending:A,isSuccess:S==="success",isError:_,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:E,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=$.data!==void 0,Z=$.status==="error"&&!U,ee=le=>{Z?le.reject($.error):U&&le.resolve($.data)},te=()=>{const le=this.#a=$.promise=bu();ee(le)},q=this.#a;switch(q.status){case"pending":t.queryHash===s.queryHash&&ee(q);break;case"fulfilled":(Z||$.data!==q.value)&&te();break;case"rejected":(!Z||$.error!==q.reason)&&te();break}}return $}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 qw(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 qw(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 Yw(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 x=async()=>{let y=!1;const w=E=>{Uw(E,()=>r.signal,()=>y=!0)},b=Jh(r.options,r.fetchOptions),C=async(E,S,N)=>{if(y)return Promise.reject();if(S==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const O={client:r.client,queryKey:r.queryKey,pageParam:S,direction:N?"backward":"forward",meta:r.options.meta};return w(O),O})(),_=await b(A),{maxPages:L}=r.options,D=N?zw:$w;return{pages:D(E.pages,_,L),pageParams:D(E.pageParams,S,L)}};if(u&&d.length){const E=u==="backward",S=E?Xw:Wp,N={pages:d,pageParams:p},P=S(i,N);h=await C(N,P,E)}else{const E=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<E)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(x,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=x}}}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 Xw(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var Zw=class extends nm{#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||om(),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=tm({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 om(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jw=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 Zw({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 eb=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??om();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)})})}},tb=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()})})}},nb=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new tb,this.#t=t.mutationCache||new Jw,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=Lw(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()}},sm=m.createContext(void 0),im=t=>{const r=m.useContext(sm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},rb=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(sm.Provider,{value:t,children:r})),am=m.createContext(!1),ob=()=>m.useContext(am);am.Provider;function sb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ib=m.createContext(sb()),ab=()=>m.useContext(ib),lb=(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))},ub=t=>{m.useEffect(()=>{t.clearReset()},[t])},cb=({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])),db=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))}},fb=(t,r)=>t.isLoading&&t.isFetching&&!r,pb=(t,r)=>t?.suspense&&r.isPending,Kp=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function hb(t,r,s){const i=ob(),u=ab(),d=im(),p=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",db(p),lb(p,u,h),ub(u);const g=!d.getQueryCache().get(p.queryHash),[x]=m.useState(()=>new r(d,p)),y=x.getOptimisticResult(p),w=!i&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const C=w?x.subscribe(Ue.batchCalls(b)):rt;return x.updateResult(),C},[x,w]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),m.useEffect(()=>{x.setOptions(p)},[p,x]),pb(p,y))throw Kp(p,x,u);if(cb({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&&fb(y,i)&&(g?Kp(p,x,u):h?.promise)?.catch(rt).finally(()=>{x.updateResult()}),p.notifyOnChangeProps?y:x.trackResult(y)}function ot(t,r){return hb(t,Gw)}function Je(t,r){const s=im(),[i]=m.useState(()=>new eb(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 lm(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 mb=({on401:t})=>async({queryKey:r})=>{const s=await fetch(`${Yu}${r.join("/")}`);return await Xu(s),await s.json()},xe=new nb({defaultOptions:{queries:{queryFn:mb({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}});var gb=(t,r,s,i,u,d,p,h)=>{let g=document.documentElement,x=["light","dark"];function y(C){(Array.isArray(t)?t:[t]).forEach(E=>{let S=E==="class",N=S&&d?u.map(P=>d[P]||P):u;S?(g.classList.remove(...N),g.classList.add(d&&d[C]?d[C]:C)):g.setAttribute(E,C)}),w(C)}function w(C){h&&x.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,E=p&&C==="system"?b():C;y(E)}catch{}},Vp=["light","dark"],um="(prefers-color-scheme: dark)",vb=typeof window>"u",cm=m.createContext(void 0),xb=t=>m.useContext(cm)?m.createElement(m.Fragment,null,t.children):m.createElement(wb,{...t}),yb=["light","dark"],wb=({forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:u="theme",themes:d=yb,defaultTheme:p=s?"system":"light",attribute:h="data-theme",value:g,children:x,nonce:y,scriptProps:w})=>{let[b,C]=m.useState(()=>Sb(u,p)),[E,S]=m.useState(()=>b==="system"?ql():b),N=g?Object.values(g):d,P=m.useCallback(D=>{let O=D;if(!O)return;D==="system"&&s&&(O=ql());let $=g?g[O]:O,U=r?Cb(y):null,Z=document.documentElement,ee=te=>{te==="class"?(Z.classList.remove(...N),$&&Z.classList.add($)):te.startsWith("data-")&&($?Z.setAttribute(te,$):Z.removeAttribute(te))};if(Array.isArray(h)?h.forEach(ee):ee(h),i){let te=Vp.includes(p)?p:null,q=Vp.includes(O)?O:te;Z.style.colorScheme=q}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(um);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"?E:b,themes:s?[...d,"system"]:d,systemTheme:s?E:void 0}),[b,A,t,E,s,d]);return m.createElement(cm.Provider,{value:L},m.createElement(bb,{forcedTheme:t,storageKey:u,attribute:h,enableSystem:s,enableColorScheme:i,defaultTheme:p,value:g,themes:d,nonce:y,scriptProps:w}),x)},bb=m.memo(({forcedTheme:t,storageKey:r,attribute:s,enableSystem:i,enableColorScheme:u,defaultTheme:d,value:p,themes:h,nonce:g,scriptProps:x})=>{let y=JSON.stringify([s,r,d,t,h,p,i,u]).slice(1,-1);return m.createElement("script",{...x,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${gb.toString()})(${y})`}})}),Sb=(t,r)=>{if(vb)return;let s;try{s=localStorage.getItem(t)||void 0}catch{}return s||r},Cb=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(um)),t.matches?"dark":"light");const kb=1,Eb=1e6;let Yl=0;function Nb(){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})},Eb);Xl.set(t,r)},Rb=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,kb)};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=Rb(yi,t),xi.forEach(r=>{r(yi)})}function vt({...t}){const r=Nb(),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 jb(){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=Fh();const Pb=Dh(Oi);function de(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 x=w=>{const{scope:b,children:C,...E}=w,S=b?.[t]?.[g]||h,N=m.useMemo(()=>E,Object.values(E));return l.jsx(S.Provider,{value:N,children:C})};x.displayName=d+"Provider";function y(w,b){const C=b?.[t]?.[g]||h,E=m.useContext(C);if(E)return E;if(p!==void 0)return p;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[x,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,Tb(u,...r)]}function Tb(...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:x})=>{const w=g(d)[`__scope${x}`];return{...h,...w}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}function qp(t){const r=_b(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(Ab);if(g){const x=g.props.children,y=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,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=Ib(u),h=Mb(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 Ob=Symbol("radix.slottable");function Ab(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Ob}function Mb(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 Ib(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:N,children:P}=S,A=On.useRef(null),_=On.useRef(new Map).current;return l.jsx(u,{scope:N,itemMap:_,collectionRef:A,children:P})};p.displayName=r;const h=t+"CollectionSlot",g=qp(h),x=On.forwardRef((S,N)=>{const{scope:P,children:A}=S,_=d(h,P),L=He(N,_.collectionRef);return l.jsx(g,{ref:L,children:A})});x.displayName=h;const y=t+"CollectionItemSlot",w="data-radix-collection-item",b=qp(y),C=On.forwardRef((S,N)=>{const{scope:P,children:A,..._}=S,L=On.useRef(null),D=He(N,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 E(S){const N=d(t+"CollectionConsumer",S);return On.useCallback(()=>{const A=N.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${w}]`));return Array.from(N.itemMap.values()).sort((O,$)=>_.indexOf(O.ref.current)-_.indexOf($.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:p,Slot:x,ItemSlot:C},E,i]}function Lb(t){const r=Db(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find($b);if(g){const x=g.props.children,y=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function Db(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=Ub(u),h=zb(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 Fb=Symbol("radix.slottable");function $b(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Fb}function zb(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 Ub(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 Hb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=Hb.reduce((t,r)=>{const s=Lb(`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 Bb(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 Wb="DismissableLayer",ku="dismissableLayer.update",Kb="dismissableLayer.pointerDownOutside",Vb="dismissableLayer.focusOutside",Yp,dm=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,x=m.useContext(dm),[y,w]=m.useState(null),b=y?.ownerDocument??globalThis?.document,[,C]=m.useState({}),E=He(r,$=>w($)),S=Array.from(x.layers),[N]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(N),A=y?S.indexOf(y):-1,_=x.layersWithOutsidePointerEventsDisabled.size>0,L=A>=P,D=Gb($=>{const U=$.target,Z=[...x.branches].some(ee=>ee.contains(U));!L||Z||(u?.($),p?.($),$.defaultPrevented||h?.())},b),O=qb($=>{const U=$.target;[...x.branches].some(ee=>ee.contains(U))||(d?.($),p?.($),$.defaultPrevented||h?.())},b);return Bb($=>{A===x.layers.size-1&&(i?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))},b),m.useEffect(()=>{if(y)return s&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(y)),x.layers.add(y),Xp(),()=>{s&&x.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Yp)}},[y,b,s,x]),m.useEffect(()=>()=>{y&&(x.layers.delete(y),x.layersWithOutsidePointerEventsDisabled.delete(y),Xp())},[y,x]),m.useEffect(()=>{const $=()=>C({});return document.addEventListener(ku,$),()=>document.removeEventListener(ku,$)},[]),l.jsx(Re.div,{...g,ref:E,style:{pointerEvents:_?L?"auto":"none":void 0,...t.style},onFocusCapture:de(t.onFocusCapture,O.onFocusCapture),onBlurCapture:de(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:de(t.onPointerDownCapture,D.onPointerDownCapture)})});Ai.displayName=Wb;var Qb="DismissableLayerBranch",fm=m.forwardRef((t,r)=>{const s=m.useContext(dm),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(Re.div,{...t,ref:u})});fm.displayName=Qb;function Gb(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(){pm(Kb,s,x,{discrete:!0})};const x={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 qb(t,r=globalThis?.document){const s=yt(t),i=m.useRef(!1);return m.useEffect(()=>{const u=d=>{d.target&&!i.current&&pm(Vb,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 pm(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 Yb=Ai,Xb=fm,Gt=globalThis?.document?m.useLayoutEffect:()=>{},Zb="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?Pb.createPortal(l.jsx(Re.div,{...i,ref:r}),p):null});ec.displayName=Zb;function Jb(t,r){return m.useReducer((s,i)=>r[s][i]??s,t)}var Fn=t=>{const{present:r,children:s}=t,i=e0(r),u=typeof s=="function"?s({present:i.isPresent}):m.Children.only(s),d=He(i.ref,t0(u));return typeof s=="function"||i.isPresent?m.cloneElement(u,{ref:d}):null};Fn.displayName="Presence";function e0(t){const[r,s]=m.useState(),i=m.useRef(null),u=m.useRef(t),d=m.useRef("none"),p=t?"mounted":"unmounted",[h,g]=Jb(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const x=ci(i.current);d.current=h==="mounted"?x:"none"},[h]),Gt(()=>{const x=i.current,y=u.current;if(y!==t){const b=d.current,C=ci(x);t?g("MOUNT"):C==="none"||x?.display==="none"?g("UNMOUNT"):g(y&&b!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,g]),Gt(()=>{if(r){let x;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 N=r.style.animationFillMode;r.style.animationFillMode="forwards",x=y.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=N)})}},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(x),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(x=>{i.current=x?getComputedStyle(x):null,s(x)},[])}}function ci(t){return t?.animationName||"none"}function t0(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 n0=Uu[" useInsertionEffect ".trim().toString()]||Gt;function Vo({prop:t,defaultProp:r,onChange:s=()=>{},caller:i}){const[u,d,p]=r0({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 x=m.useCallback(y=>{if(h){const w=o0(y)?y(t):y;w!==t&&p.current?.(w)}else d(y)},[h,t,d,p]);return[g,x]}function r0({defaultProp:t,onChange:r}){const[s,i]=m.useState(t),u=m.useRef(s),d=m.useRef(r);return n0(()=>{d.current=r},[r]),m.useEffect(()=>{u.current!==s&&(d.current?.(s),u.current=s)},[s,u]),[s,i,d]}function o0(t){return typeof t=="function"}var s0=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"}),i0="VisuallyHidden",Mi=m.forwardRef((t,r)=>l.jsx(Re.span,{...t,ref:r,style:{...s0,...t.style}}));Mi.displayName=i0;var a0=Mi,tc="ToastProvider",[nc,l0,u0]=Zu("Toast"),[hm]=Dn("Toast",[u0]),[c0,Ii]=hm(tc),mm=t=>{const{__scopeToast:r,label:s="Notification",duration:i=5e3,swipeDirection:u="right",swipeThreshold:d=50,children:p}=t,[h,g]=m.useState(null),[x,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(c0,{scope:r,label:s,duration:i,swipeDirection:u,swipeThreshold:d,toastCount:x,viewport:h,onViewportChange:g,onToastAdd:m.useCallback(()=>y(C=>C+1),[]),onToastRemove:m.useCallback(()=>y(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:p})})};mm.displayName=tc;var gm="ToastViewport",d0=["F8"],Eu="toast.viewportPause",Nu="toast.viewportResume",vm=m.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:i=d0,label:u="Notifications ({hotkey})",...d}=t,p=Ii(gm,s),h=l0(s),g=m.useRef(null),x=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,""),E=p.toastCount>0;m.useEffect(()=>{const N=P=>{i.length!==0&&i.every(_=>P[_]||P.code===_)&&w.current?.focus()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[i]),m.useEffect(()=>{const N=g.current,P=w.current;if(E&&N&&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=>{!N.contains(O.relatedTarget)&&_()},D=()=>{N.contains(document.activeElement)||_()};return N.addEventListener("focusin",A),N.addEventListener("focusout",L),N.addEventListener("pointermove",A),N.addEventListener("pointerleave",D),window.addEventListener("blur",A),window.addEventListener("focus",_),()=>{N.removeEventListener("focusin",A),N.removeEventListener("focusout",L),N.removeEventListener("pointermove",A),N.removeEventListener("pointerleave",D),window.removeEventListener("blur",A),window.removeEventListener("focus",_)}}},[E,p.isClosePausedRef]);const S=m.useCallback(({tabbingDirection:N})=>{const A=h().map(_=>{const L=_.ref.current,D=[L,...k0(L)];return N==="forwards"?D:D.reverse()});return(N==="forwards"?A.reverse():A).flat()},[h]);return m.useEffect(()=>{const N=w.current;if(N){const P=A=>{const _=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!_){const D=document.activeElement,O=A.shiftKey;if(A.target===N&&O){x.current?.focus();return}const Z=S({tabbingDirection:O?"backwards":"forwards"}),ee=Z.findIndex(te=>te===D);Zl(Z.slice(ee+1))?A.preventDefault():O?x.current?.focus():y.current?.focus()}};return N.addEventListener("keydown",P),()=>N.removeEventListener("keydown",P)}},[h,S]),l.jsxs(Xb,{ref:g,role:"region","aria-label":u.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&l.jsx(Ru,{ref:x,onFocusFromOutsideViewport:()=>{const N=S({tabbingDirection:"forwards"});Zl(N)}}),l.jsx(nc.Slot,{scope:s,children:l.jsx(Re.ol,{tabIndex:-1,...d,ref:b})}),E&&l.jsx(Ru,{ref:y,onFocusFromOutsideViewport:()=>{const N=S({tabbingDirection:"backwards"});Zl(N)}})]})});vm.displayName=gm;var xm="ToastFocusProxy",Ru=m.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...u}=t,d=Ii(xm,s);return l.jsx(Mi,{tabIndex:0,...u,ref:r,style:{position:"fixed"},onFocus:p=>{const h=p.relatedTarget;!d.viewport?.contains(h)&&i()}})});Ru.displayName=xm;var Qo="Toast",f0="toast.swipeStart",p0="toast.swipeMove",h0="toast.swipeCancel",m0="toast.swipeEnd",ym=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(x0,{open:h,...p,ref:r,onClose:()=>g(!1),onPause:yt(t.onPause),onResume:yt(t.onResume),onSwipeStart:de(t.onSwipeStart,x=>{x.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(t.onSwipeMove,x=>{const{x:y,y:w}=x.detail.delta;x.currentTarget.setAttribute("data-swipe","move"),x.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),x.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:de(t.onSwipeCancel,x=>{x.currentTarget.setAttribute("data-swipe","cancel"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),x.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(t.onSwipeEnd,x=>{const{x:y,y:w}=x.detail.delta;x.currentTarget.setAttribute("data-swipe","end"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),x.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),x.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),g(!1)})})})});ym.displayName=Qo;var[g0,v0]=hm(Qo,{onClose(){}}),x0=m.forwardRef((t,r)=>{const{__scopeToast:s,type:i="foreground",duration:u,open:d,onClose:p,onEscapeKeyDown:h,onPause:g,onResume:x,onSwipeStart:y,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:C,...E}=t,S=Ii(Qo,s),[N,P]=m.useState(null),A=He(r,Y=>P(Y)),_=m.useRef(null),L=m.useRef(null),D=u||S.duration,O=m.useRef(0),$=m.useRef(D),U=m.useRef(0),{onToastAdd:Z,onToastRemove:ee}=S,te=yt(()=>{N?.contains(document.activeElement)&&S.viewport?.focus(),p()}),q=m.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(U.current),O.current=new Date().getTime(),U.current=window.setTimeout(te,Y))},[te]);m.useEffect(()=>{const Y=S.viewport;if(Y){const me=()=>{q($.current),x?.()},oe=()=>{const ie=new Date().getTime()-O.current;$.current=$.current-ie,window.clearTimeout(U.current),g?.()};return Y.addEventListener(Eu,oe),Y.addEventListener(Nu,me),()=>{Y.removeEventListener(Eu,oe),Y.removeEventListener(Nu,me)}}},[S.viewport,D,g,x,q]),m.useEffect(()=>{d&&!S.isClosePausedRef.current&&q(D)},[d,D,S.isClosePausedRef,q]),m.useEffect(()=>(Z(),()=>ee()),[Z,ee]);const le=m.useMemo(()=>N?Nm(N):null,[N]);return S.viewport?l.jsxs(l.Fragment,{children:[le&&l.jsx(y0,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:le}),l.jsx(g0,{scope:s,onClose:te,children:Oi.createPortal(l.jsx(nc.ItemSlot,{scope:s,children:l.jsx(Yb,{asChild:!0,onEscapeKeyDown:de(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||te(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Re.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":S.swipeDirection,...E,ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:de(t.onKeyDown,Y=>{Y.key==="Escape"&&(h?.(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,te()))}),onPointerDown:de(t.onPointerDown,Y=>{Y.button===0&&(_.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:de(t.onPointerMove,Y=>{if(!_.current)return;const me=Y.clientX-_.current.x,oe=Y.clientY-_.current.y,ie=!!L.current,H=["left","right"].includes(S.swipeDirection),B=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,Q=H?B(0,me):0,k=H?0:B(0,oe),z=Y.pointerType==="touch"?10:2,ae={x:Q,y:k},pe={originalEvent:Y,delta:ae};ie?(L.current=ae,di(p0,w,pe,{discrete:!1})):Zp(ae,S.swipeDirection,z)?(L.current=ae,di(f0,y,pe,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(me)>z||Math.abs(oe)>z)&&(_.current=null)}),onPointerUp:de(t.onPointerUp,Y=>{const me=L.current,oe=Y.target;if(oe.hasPointerCapture(Y.pointerId)&&oe.releasePointerCapture(Y.pointerId),L.current=null,_.current=null,me){const ie=Y.currentTarget,H={originalEvent:Y,delta:me};Zp(me,S.swipeDirection,S.swipeThreshold)?di(m0,C,H,{discrete:!0}):di(h0,b,H,{discrete:!0}),ie.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),y0=t=>{const{__scopeToast:r,children:s,...i}=t,u=Ii(Qo,r),[d,p]=m.useState(!1),[h,g]=m.useState(!1);return S0(()=>p(!0)),m.useEffect(()=>{const x=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(x)},[]),h?null:l.jsx(ec,{asChild:!0,children:l.jsx(Mi,{...i,children:d&&l.jsxs(l.Fragment,{children:[u.label," ",s]})})})},w0="ToastTitle",wm=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(Re.div,{...i,ref:r})});wm.displayName=w0;var b0="ToastDescription",bm=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t;return l.jsx(Re.div,{...i,ref:r})});bm.displayName=b0;var Sm="ToastAction",Cm=m.forwardRef((t,r)=>{const{altText:s,...i}=t;return s.trim()?l.jsx(Em,{altText:s,asChild:!0,children:l.jsx(rc,{...i,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sm}\`. Expected non-empty \`string\`.`),null)});Cm.displayName=Sm;var km="ToastClose",rc=m.forwardRef((t,r)=>{const{__scopeToast:s,...i}=t,u=v0(km,s);return l.jsx(Em,{asChild:!0,children:l.jsx(Re.button,{type:"button",...i,ref:r,onClick:de(t.onClick,u.onClose)})})});rc.displayName=km;var Em=m.forwardRef((t,r)=>{const{__scopeToast:s,altText:i,...u}=t;return l.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...u,ref:r})});function Nm(t){const r=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&r.push(i.textContent),C0(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(...Nm(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 S0(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 C0(t){return t.nodeType===t.ELEMENT_NODE}function k0(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 E0=mm,Rm=vm,jm=ym,Pm=wm,Tm=bm,_m=Cm,Om=rc;function Am(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=Am(t[r]))&&(i&&(i+=" "),i+=s)}else for(s in t)t[s]&&(i&&(i+=" "),i+=s);return i}function Mm(){for(var t,r,s=0,i="",u=arguments.length;s<u;s++)(t=arguments[s])&&(r=Am(t))&&(i&&(i+=" "),i+=r);return i}const Jp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,eh=Mm,N0=(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(x=>{const y=s?.[x],w=d?.[x];if(y===null)return null;const b=Jp(y)||Jp(w);return u[x][b]}),h=s&&Object.entries(s).reduce((x,y)=>{let[w,b]=y;return b===void 0||(x[w]=b),x},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((x,y)=>{let{class:w,className:b,...C}=y;return Object.entries(C).every(E=>{let[S,N]=E;return Array.isArray(N)?N.includes({...d,...h}[S]):{...d,...h}[S]===N})?[...x,w,b]:x},[]);return eh(t,p,g,s?.class,s?.className)};const R0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Im=(...t)=>t.filter((r,s,i)=>!!r&&i.indexOf(r)===s).join(" ");var j0={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 P0=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,...j0,width:r,height:r,stroke:t,strokeWidth:i?Number(s)*24/Number(r):s,className:Im("lucide",u),...h},[...p.map(([x,y])=>m.createElement(x,y)),...Array.isArray(d)?d:[d]]));const Hr=(t,r)=>{const s=m.forwardRef(({className:i,...u},d)=>m.createElement(P0,{ref:d,iconNode:r,className:Im(`lucide-${R0(t)}`,i),...u}));return s.displayName=`${t}`,s};const T0=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 _0=Hr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const O0=Hr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const A0=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 M0=Hr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const I0=Hr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),oc="-",L0=t=>{const r=F0(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:p=>{const h=p.split(oc);return h[0]===""&&h.length!==1&&h.shift(),Lm(h,r)||D0(p)},getConflictingClassGroupIds:(p,h)=>{const g=s[p]||[];return h&&i[p]?[...g,...i[p]]:g}}},Lm=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],i=r.nextPart.get(s),u=i?Lm(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=/^\[(.+)\]$/,D0=t=>{if(th.test(t)){const r=th.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},F0=t=>{const{theme:r,prefix:s}=t,i={nextPart:new Map,validators:[]};return z0(Object.entries(t.classGroups),s).forEach(([d,p])=>{ju(p,i,d,r)}),i},ju=(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($0(u)){ju(u(i),r,s,i);return}r.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([d,p])=>{ju(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},$0=t=>t.isThemeGetter,z0=(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,U0=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)}}},Dm="!",H0=t=>{const{separator:r,experimentalParseClassName:s}=t,i=r.length===1,u=r[0],d=r.length,p=h=>{const g=[];let x=0,y=0,w;for(let N=0;N<h.length;N++){let P=h[N];if(x===0){if(P===u&&(i||h.slice(N,N+d)===r)){g.push(h.slice(y,N)),y=N+d;continue}if(P==="/"){w=N;continue}}P==="["?x++:P==="]"&&x--}const b=g.length===0?h:h.substring(y),C=b.startsWith(Dm),E=C?b.substring(1):b,S=w&&w>y?w-y:void 0;return{modifiers:g,hasImportantModifier:C,baseClassName:E,maybePostfixModifierPosition:S}};return s?h=>s({className:h,parseClassName:p}):p},B0=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},W0=t=>({cache:U0(t.cacheSize),parseClassName:H0(t),...L0(t)}),K0=/\s+/,V0=(t,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=t.trim().split(K0);let h="";for(let g=p.length-1;g>=0;g-=1){const x=p[g],{modifiers:y,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:C}=s(x);let E=!!C,S=i(E?b.substring(0,C):b);if(!S){if(!E){h=x+(h.length>0?" "+h:h);continue}if(S=i(b),!S){h=x+(h.length>0?" "+h:h);continue}E=!1}const N=B0(y).join(":"),P=w?N+Dm:N,A=P+S;if(d.includes(A))continue;d.push(A);const _=u(S,E);for(let L=0;L<_.length;++L){const D=_[L];d.push(P+D)}h=x+(h.length>0?" "+h:h)}return h};function Q0(){let t=0,r,s,i="";for(;t<arguments.length;)(r=arguments[t++])&&(s=Fm(r))&&(i&&(i+=" "),i+=s);return i}const Fm=t=>{if(typeof t=="string")return t;let r,s="";for(let i=0;i<t.length;i++)t[i]&&(r=Fm(t[i]))&&(s&&(s+=" "),s+=r);return s};function G0(t,...r){let s,i,u,d=p;function p(g){const x=r.reduce((y,w)=>w(y),t());return s=W0(x),i=s.cache.get,u=s.cache.set,d=h,h(g)}function h(g){const x=i(g);if(x)return x;const y=V0(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},$m=/^\[(?:([a-z-]+):)?(.+)\]$/i,q0=/^\d+\/\d+$/,Y0=new Set(["px","full","screen"]),X0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Z0=/\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$/,J0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=t=>Ir(t)||Y0.has(t)||q0.test(t),Pn=t=>Br(t,"length",u1),Ir=t=>!!t&&!Number.isNaN(Number(t)),Jl=t=>Br(t,"number",Ir),Ao=t=>!!t&&Number.isInteger(Number(t)),n1=t=>t.endsWith("%")&&Ir(t.slice(0,-1)),ge=t=>$m.test(t),Tn=t=>X0.test(t),r1=new Set(["length","size","percentage"]),o1=t=>Br(t,r1,zm),s1=t=>Br(t,"position",zm),i1=new Set(["image","url"]),a1=t=>Br(t,i1,d1),l1=t=>Br(t,"",c1),Mo=()=>!0,Br=(t,r,s)=>{const i=$m.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):s(i[2]):!1},u1=t=>Z0.test(t)&&!J0.test(t),zm=()=>!1,c1=t=>e1.test(t),d1=t=>t1.test(t),f1=()=>{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"),x=Te("grayscale"),y=Te("hueRotate"),w=Te("invert"),b=Te("gap"),C=Te("gradientColorStops"),E=Te("gradientColorStopPositions"),S=Te("inset"),N=Te("margin"),P=Te("opacity"),A=Te("padding"),_=Te("saturate"),L=Te("scale"),D=Te("sepia"),O=Te("skew"),$=Te("space"),U=Te("translate"),Z=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],te=()=>["auto",ge,r],q=()=>[ge,r],le=()=>["",sn,Pn],Y=()=>["auto",Ir,ge],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],oe=()=>["solid","dashed","dotted","double","none"],ie=()=>["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",ge],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[Ir,ge];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[sn,Pn],blur:["none","",Tn,ge],brightness:k(),borderColor:[t],borderRadius:["none","","full",Tn,ge],borderSpacing:q(),borderWidth:le(),contrast:k(),grayscale:B(),hueRotate:k(),invert:B(),gap:q(),gradientColorStops:[t],gradientColorStopPositions:[n1,Pn],inset:te(),margin:te(),opacity:k(),padding:q(),saturate:k(),scale:k(),sepia:B(),skew:k(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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(),ge]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],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,ge]}],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",ge]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Ao,ge]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Ao,ge]},ge]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Ao,ge]},ge]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],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:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,r]}],"min-w":[{"min-w":[ge,r,"min","max","fit"]}],"max-w":[{"max-w":[ge,r,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ge,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,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",ge]}],"line-clamp":[{"line-clamp":["none",Ir,Jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"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:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,Pn]}],"underline-offset":[{"underline-offset":["auto",sn,ge]}],"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:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"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(),s1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",o1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},a1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"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:[...oe(),"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:oe()}],"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:["",...oe()]}],"outline-offset":[{"outline-offset":[sn,ge]}],"outline-w":[{outline:[sn,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:le()}],"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,l1]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ge]}],grayscale:[{grayscale:[x]}],"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":[x]}],"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",ge]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ao,ge]}],"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",ge]}],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",ge]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",ge]}],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"]}}},p1=G0(f1);function De(...t){return p1(Mm(t))}const h1=E0,Um=m.forwardRef(({className:t,...r},s)=>l.jsx(Rm,{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}));Um.displayName=Rm.displayName;const m1=N0("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"}}),Hm=m.forwardRef(({className:t,variant:r,...s},i)=>l.jsx(jm,{ref:i,className:De(m1({variant:r}),t),...s}));Hm.displayName=jm.displayName;const g1=m.forwardRef(({className:t,...r},s)=>l.jsx(_m,{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}));g1.displayName=_m.displayName;const Bm=m.forwardRef(({className:t,...r},s)=>l.jsx(Om,{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(I0,{className:"h-4 w-4"})}));Bm.displayName=Om.displayName;const Wm=m.forwardRef(({className:t,...r},s)=>l.jsx(Pm,{ref:s,className:De("text-sm font-semibold",t),...r}));Wm.displayName=Pm.displayName;const Km=m.forwardRef(({className:t,...r},s)=>l.jsx(Tm,{ref:s,className:De("text-sm opacity-90",t),...r}));Km.displayName=Tm.displayName;function v1(){const{toasts:t}=jb();return l.jsxs(h1,{children:[t.map(function({id:r,title:s,description:i,action:u,...d}){return l.jsxs(Hm,{...d,children:[l.jsxs("div",{className:"grid gap-1",children:[s&&l.jsx(Wm,{children:s}),i&&l.jsx(Km,{children:i})]}),u,l.jsx(Bm,{})]},r)}),l.jsx(Um,{})]})}var x1=Uu[" useId ".trim().toString()]||(()=>{}),y1=0;function $o(t){const[r,s]=m.useState(x1());return Gt(()=>{s(i=>i??String(y1++))},[t]),r?`radix-${r}`:""}const w1=["top","right","bottom","left"],In=Math.min,gt=Math.max,Ei=Math.round,fi=Math.floor,Qt=t=>({x:t,y:t}),b1={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 S1(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 C1(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"],k1=["top","bottom"],E1=["bottom","top"];function N1(t,r,s){switch(t){case"top":case"bottom":return s?r?oh:rh:r?rh:oh;case"left":case"right":return r?k1:E1;default:return[]}}function R1(t,r,s,i){const u=Wr(t);let d=N1(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 b1[r]+t.slice(r.length)}function j1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vm(t){return typeof t!="number"?j1(t):{top:t,right:t,bottom:t,left:t}}function Ri(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),x=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&&x?-1:1);break;case"end":C[p]+=b*(s&&x?-1:1);break}return C}async function P1(t,r){var s;r===void 0&&(r={});const{x:i,y:u,platform:d,rects:p,elements:h,strategy:g}=t,{boundary:x="clippingAncestors",rootBoundary:y="viewport",elementContext:w="floating",altBoundary:b=!1,padding:C=0}=an(r,t),E=Vm(C),N=h[b?w==="floating"?"reference":"floating":w],P=Ri(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(N)))==null||s?N:N.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(h.floating)),boundary:x,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=Ri(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:A,offsetParent:_,strategy:g}):A);return{top:(P.top-D.top+E.top)/L.y,bottom:(D.bottom-P.bottom+E.bottom)/L.y,left:(P.left-D.left+E.left)/L.x,right:(D.right-P.right+E.right)/L.x}}const T1=50,_1=async(t,r,s)=>{const{placement:i="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,h=p.detectOverflow?p:{...p,detectOverflow:P1},g=await(p.isRTL==null?void 0:p.isRTL(r));let x=await p.getElementRects({reference:t,floating:r,strategy:u}),{x:y,y:w}=sh(x,i,g),b=i,C=0;const E={};for(let S=0;S<d.length;S++){const N=d[S];if(!N)continue;const{name:P,fn:A}=N,{x:_,y:L,data:D,reset:O}=await A({x:y,y:w,initialPlacement:i,placement:b,strategy:u,middlewareData:E,rects:x,platform:h,elements:{reference:t,floating:r}});y=_??y,w=L??w,E[P]={...E[P],...D},O&&C<T1&&(C++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(x=O.rects===!0?await p.getElementRects({reference:t,floating:r,strategy:u}):O.rects),{x:y,y:w}=sh(x,b,g)),S=-1)}return{x:y,y:w,placement:b,strategy:u,middlewareData:E}},O1=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:x,padding:y=0}=an(t,r)||{};if(x==null)return{};const w=Vm(y),b={x:s,y:i},C=ac(u),E=ic(C),S=await p.getDimensions(x),N=C==="y",P=N?"top":"left",A=N?"bottom":"right",_=N?"clientHeight":"clientWidth",L=d.reference[E]+d.reference[C]-b[C]-d.floating[E],D=b[C]-d.reference[C],O=await(p.getOffsetParent==null?void 0:p.getOffsetParent(x));let $=O?O[_]:0;(!$||!await(p.isElement==null?void 0:p.isElement(O)))&&($=h.floating[_]||d.floating[E]);const U=L/2-D/2,Z=$/2-S[E]/2-1,ee=In(w[P],Z),te=In(w[A],Z),q=ee,le=$-S[E]-te,Y=$/2-S[E]/2+U,me=Pu(q,Y,le),oe=!g.arrow&&Wr(u)!=null&&Y!==me&&d.reference[E]/2-(Y<q?ee:te)-S[E]/2<0,ie=oe?Y<q?Y-q:Y-le:0;return{[C]:b[C]+ie,data:{[C]:me,centerOffset:Y-me-ie,...oe&&{alignmentOffset:ie}},reset:oe}}}),A1=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:x}=r,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:b,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...N}=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(x.floating)),D=b||(_||!S?[Ni(h)]:C1(h)),O=E!=="none";!b&&O&&D.push(...R1(h,S,E,L));const $=[h,...D],U=await g.detectOverflow(r,N),Z=[];let ee=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&Z.push(U[P]),w){const Y=S1(u,p,L);Z.push(U[Y[0]],U[Y[1]])}if(ee=[...ee,{placement:u,overflows:Z}],!Z.every(Y=>Y<=0)){var te,q;const Y=(((te=d.flip)==null?void 0:te.index)||0)+1,me=$[Y];if(me&&(!(w==="alignment"?A!==Vt(me):!1)||ee.every(H=>Vt(H.placement)===A?H.overflows[0]>0:!0)))return{data:{index:Y,overflows:ee},reset:{placement:me}};let oe=(q=ee.filter(ie=>ie.overflows[0]<=0).sort((ie,H)=>ie.overflows[1]-H.overflows[1])[0])==null?void 0:q.placement;if(!oe)switch(C){case"bestFit":{var le;const ie=(le=ee.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,Q)=>B+Q,0)]).sort((H,B)=>H[1]-B[1])[0])==null?void 0:le[0];ie&&(oe=ie);break}case"initialPlacement":oe=h;break}if(u!==oe)return{reset:{placement:oe}}}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 w1.some(r=>t[r]>=0)}const M1=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 I1(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",x=Qm.has(p)?-1:1,y=d&&g?-1:1,w=an(r,t);let{mainAxis:b,crossAxis:C,alignmentAxis:E}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return h&&typeof E=="number"&&(C=h==="end"?E*-1:E),g?{x:C*y,y:b*x}:{x:b*x,y:C*y}}const L1=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 I1(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}}}}},D1=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:_}}},...x}=an(t,r),y={x:s,y:i},w=await d.detectOverflow(r,x),b=Vt(ln(u)),C=sc(b);let E=y[C],S=y[b];if(p){const P=C==="y"?"top":"left",A=C==="y"?"bottom":"right",_=E+w[P],L=E-w[A];E=Pu(_,E,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 N=g.fn({...r,[C]:E,[b]:S});return{...N,data:{x:N.x-s,y:N.y-i,enabled:{[C]:p,[b]:h}}}}}},F1=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:x=!0}=an(t,r),y={x:s,y:i},w=Vt(u),b=sc(w);let C=y[b],E=y[w];const S=an(h,r),N=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[_]+N.mainAxis,D=d.reference[b]+d.reference[_]-N.mainAxis;C<L?C=L:C>D&&(C=D)}if(x){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:N.crossAxis),O=d.reference[w]+d.reference[_]+(L?0:((A=p.offset)==null?void 0:A[w])||0)-(L?N.crossAxis:0);E<D?E=D:E>O&&(E=O)}return{[b]:C,[w]:E}}}},$1=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=()=>{},...x}=an(t,r),y=await p.detectOverflow(r,x),w=ln(u),b=Wr(u),C=Vt(u)==="y",{width:E,height:S}=d.floating;let N,P;w==="top"||w==="bottom"?(N=w,P=b===(await(p.isRTL==null?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(P=w,N=b==="end"?"top":"bottom");const A=S-y.top-y.bottom,_=E-y.left-y.right,L=In(S-y[N],A),D=In(E-y[P],_),O=!r.middlewareData.shift;let $=L,U=D;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(U=_),(i=r.middlewareData.shift)!=null&&i.enabled.y&&($=A),O&&!b){const ee=gt(y.left,0),te=gt(y.right,0),q=gt(y.top,0),le=gt(y.bottom,0);C?U=E-2*(ee!==0||te!==0?ee+te:gt(y.left,y.right)):$=S-2*(q!==0||le!==0?q+le:gt(y.top,y.bottom))}await g({...r,availableWidth:U,availableHeight:$});const Z=await p.getDimensions(h.floating);return E!==Z.width||S!==Z.height?{reset:{rects:!0}}:{}}}};function Li(){return typeof window<"u"}function Kr(t){return Gm(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=(Gm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Gm(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 z1(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 U1=/transform|translate|scale|rotate|perspective|filter/,H1=/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))||U1.test(r.willChange||"")||H1.test(r.contain||"")}function B1(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 qm(t){const r=Ln(t);return Fr(r)?t.ownerDocument?t.ownerDocument.body:t.body:un(r)&&Go(r)?r:qm(r)}function zo(t,r,s){var i;r===void 0&&(r=[]),s===void 0&&(s=!0);const u=qm(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 Ym(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}=Ym(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 W1=Qt(0);function Xm(t){const r=xt(t);return!uc()||!r.visualViewport?W1:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function K1(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=K1(d,s,i)?Xm(d):Qt(0);let g=(u.left+h.x)/p.x,x=(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 E=b,S=_u(E);for(;S&&i&&C!==E;){const N=Lr(S),P=S.getBoundingClientRect(),A=Ft(S),_=P.left+(S.clientLeft+parseFloat(A.paddingLeft))*N.x,L=P.top+(S.clientTop+parseFloat(A.paddingTop))*N.y;g*=N.x,x*=N.y,y*=N.x,w*=N.y,g+=_,x+=L,E=xt(S),S=_u(E)}}return Ri({width:y,height:w,x:g,y:x})}function $i(t,r){const s=Fi(t).scrollLeft;return r?r.left+s:nr(qt(t)).left+s}function Zm(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 V1(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},x=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);x=Lr(i),y.x=C.x+i.clientLeft,y.y=C.y+i.clientTop}const b=p&&!w&&!d?Zm(p,g):Qt(0);return{width:s.width*x.x,height:s.height*x.y,x:s.x*x.x-g.scrollLeft*x.x+y.x+b.x,y:s.y*x.y-g.scrollTop*x.y+y.y+b.y}}function Q1(t){return Array.from(t.getClientRects())}function G1(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 q1(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 x=$i(i);if(x<=0){const y=i.ownerDocument,w=y.body,b=getComputedStyle(w),C=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(i.clientWidth-w.clientWidth-C);E<=uh&&(d-=E)}else x<=uh&&(d+=x);return{width:d,height:p,x:h,y:g}}function Y1(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,x=i*d.y;return{width:p,height:h,x:g,y:x}}function ch(t,r,s){let i;if(r==="viewport")i=q1(t,s);else if(r==="document")i=G1(qt(t));else if(Dt(r))i=Y1(r,s);else{const u=Xm(t);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return Ri(i)}function Jm(t,r){const s=Ln(t);return s===r||!Dt(s)||Fr(s)?!1:Ft(s).position==="fixed"||Jm(s,r)}function X1(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&&Jm(t,p))?i=i.filter(y=>y!==p):u=h,p=Ln(p)}return r.set(t,i),i}function Z1(t){let{element:r,boundary:s,rootBoundary:i,strategy:u}=t;const p=[...s==="clippingAncestors"?Di(r)?[]:X1(r,this._c):[].concat(s),i],h=ch(r,p[0],u);let g=h.top,x=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),x=In(C.right,x),y=In(C.bottom,y),w=gt(C.left,w)}return{width:x-w,height:y-g,x:w,y:g}}function J1(t){const{width:r,height:s}=Ym(t);return{width:r,height:s}}function eS(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 x(){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&&x();d&&!i&&u&&x();const y=u&&!i&&!d?Zm(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 eg(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&&z1(i)&&tu(i);)i=dh(i,r);return i&&Fr(i)&&tu(i)&&!lc(i)?s:i||B1(t)||s}const tS=async function(t){const r=this.getOffsetParent||eg,s=this.getDimensions,i=await s(t.floating);return{reference:eS(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function nS(t){return Ft(t).direction==="rtl"}const rS={convertOffsetParentRelativeRectToViewportRelativeRect:V1,getDocumentElement:qt,getClippingRect:Z1,getOffsetParent:eg,getElementRects:tS,getClientRects:Q1,getDimensions:J1,getScale:Lr,isElement:Dt,isRTL:nS};function tg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function oS(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 x=t.getBoundingClientRect(),{left:y,top:w,width:b,height:C}=x;if(h||r(),!b||!C)return;const E=fi(w),S=fi(u.clientWidth-(y+b)),N=fi(u.clientHeight-(w+C)),P=fi(y),_={rootMargin:-E+"px "+-S+"px "+-N+"px "+-P+"px",threshold:gt(0,In(1,g))||1};let L=!0;function D(O){const $=O[0].intersectionRatio;if($!==g){if(!L)return p();$?p(!1,$):i=setTimeout(()=>{p(!1,1e-7)},1e3)}$===1&&!tg(x,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 sS(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,x=cc(t),y=u||d?[...x?zo(x):[],...r?zo(r):[]]:[];y.forEach(P=>{u&&P.addEventListener("scroll",s,{passive:!0}),d&&P.addEventListener("resize",s)});const w=x&&h?oS(x,s):null;let b=-1,C=null;p&&(C=new ResizeObserver(P=>{let[A]=P;A&&A.target===x&&C&&r&&(C.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=C)==null||_.observe(r)})),s()}),x&&!g&&C.observe(x),r&&C.observe(r));let E,S=g?nr(t):null;g&&N();function N(){const P=nr(t);S&&!tg(S,P)&&s(),S=P,E=requestAnimationFrame(N)}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(E)}}const iS=L1,aS=D1,lS=A1,uS=$1,cS=M1,fh=O1,dS=F1,fS=(t,r,s)=>{const i=new Map,u={platform:rS,...s},d={...u.platform,_c:i};return _1(t,r,{...u,platform:d})};var pS=typeof document<"u",hS=function(){},wi=pS?m.useLayoutEffect:hS;function ji(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(!ji(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)&&!ji(t[d],r[d]))return!1}return!0}return t!==t&&r!==r}function ng(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ph(t,r){const s=ng(t);return Math.round(r*s)/s}function nu(t){const r=m.useRef(t);return wi(()=>{r.current=t}),r}function mS(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:x}=t,[y,w]=m.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[b,C]=m.useState(i);ji(b,i)||C(i);const[E,S]=m.useState(null),[N,P]=m.useState(null),A=m.useCallback(H=>{H!==O.current&&(O.current=H,S(H))},[]),_=m.useCallback(H=>{H!==$.current&&($.current=H,P(H))},[]),L=d||E,D=p||N,O=m.useRef(null),$=m.useRef(null),U=m.useRef(y),Z=g!=null,ee=nu(g),te=nu(u),q=nu(x),le=m.useCallback(()=>{if(!O.current||!$.current)return;const H={placement:r,strategy:s,middleware:b};te.current&&(H.platform=te.current),fS(O.current,$.current,H).then(B=>{const Q={...B,isPositioned:q.current!==!1};Y.current&&!ji(U.current,Q)&&(U.current=Q,Oi.flushSync(()=>{w(Q)}))})},[b,r,s,te,q]);wi(()=>{x===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,w(H=>({...H,isPositioned:!1})))},[x]);const Y=m.useRef(!1);wi(()=>(Y.current=!0,()=>{Y.current=!1}),[]),wi(()=>{if(L&&(O.current=L),D&&($.current=D),L&&D){if(ee.current)return ee.current(L,D,le);le()}},[L,D,le,ee,Z]);const me=m.useMemo(()=>({reference:O,floating:$,setReference:A,setFloating:_}),[A,_]),oe=m.useMemo(()=>({reference:L,floating:D}),[L,D]),ie=m.useMemo(()=>{const H={position:s,left:0,top:0};if(!oe.floating)return H;const B=ph(oe.floating,y.x),Q=ph(oe.floating,y.y);return h?{...H,transform:"translate("+B+"px, "+Q+"px)",...ng(oe.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:B,top:Q}},[s,h,oe.floating,y.x,y.y]);return m.useMemo(()=>({...y,update:le,refs:me,elements:oe,floatingStyles:ie}),[y,le,me,oe,ie])}const gS=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):{}}}},vS=(t,r)=>{const s=iS(t);return{name:s.name,fn:s.fn,options:[t,r]}},xS=(t,r)=>{const s=aS(t);return{name:s.name,fn:s.fn,options:[t,r]}},yS=(t,r)=>({fn:dS(t).fn,options:[t,r]}),wS=(t,r)=>{const s=lS(t);return{name:s.name,fn:s.fn,options:[t,r]}},bS=(t,r)=>{const s=uS(t);return{name:s.name,fn:s.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=gS(t);return{name:s.name,fn:s.fn,options:[t,r]}};var kS="Arrow",rg=m.forwardRef((t,r)=>{const{children:s,width:i=10,height:u=5,...d}=t;return l.jsx(Re.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"})})});rg.displayName=kS;var ES=rg;function NS(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,x=Array.isArray(g)?g[0]:g;p=x.inlineSize,h=x.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",[og,zi]=Dn(dc),[RS,sg]=og(dc),ig=t=>{const{__scopePopper:r,children:s}=t,[i,u]=m.useState(null);return l.jsx(RS,{scope:r,anchor:i,onAnchorChange:u,children:s})};ig.displayName=dc;var ag="PopperAnchor",lg=m.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:i,...u}=t,d=sg(ag,s),p=m.useRef(null),h=He(r,p),g=m.useRef(null);return m.useEffect(()=>{const x=g.current;g.current=i?.current||p.current,x!==g.current&&d.onAnchorChange(g.current)}),i?null:l.jsx(Re.div,{...u,ref:h})});lg.displayName=ag;var fc="PopperContent",[jS,PS]=og(fc),ug=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:x=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:C="optimized",onPlaced:E,...S}=t,N=sg(fc,s),[P,A]=m.useState(null),_=He(r,he=>A(he)),[L,D]=m.useState(null),O=NS(L),$=O?.width??0,U=O?.height??0,Z=i+(d!=="center"?"-"+d:""),ee=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},te=Array.isArray(x)?x:[x],q=te.length>0,le={padding:ee,boundary:te.filter(_S),altBoundary:q},{refs:Y,floatingStyles:me,placement:oe,isPositioned:ie,middlewareData:H}=mS({strategy:"fixed",placement:Z,whileElementsMounted:(...he)=>sS(...he,{animationFrame:C==="always"}),elements:{reference:N.anchor},middleware:[vS({mainAxis:u+U,alignmentAxis:p}),g&&xS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?yS():void 0,...le}),g&&wS({...le}),bS({...le,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&&CS({element:L,padding:h}),OS({arrowWidth:$,arrowHeight:U}),b&&SS({strategy:"referenceHidden",...le})]}),[B,Q]=fg(oe),k=yt(E);Gt(()=>{ie&&k?.()},[ie,k]);const z=H.arrow?.x,ae=H.arrow?.y,pe=H.arrow?.centerOffset!==0,[we,ve]=m.useState();return Gt(()=>{P&&ve(window.getComputedStyle(P).zIndex)},[P]),l.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:ie?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(jS,{scope:s,placedSide:B,onArrowChange:D,arrowX:z,arrowY:ae,shouldHideArrow:pe,children:l.jsx(Re.div,{"data-side":B,"data-align":Q,...S,ref:_,style:{...S.style,animation:ie?void 0:"none"}})})})});ug.displayName=fc;var cg="PopperArrow",TS={top:"bottom",right:"left",bottom:"top",left:"right"},dg=m.forwardRef(function(r,s){const{__scopePopper:i,...u}=r,d=PS(cg,i),p=TS[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(ES,{...u,ref:s,style:{...u.style,display:"block"}})})});dg.displayName=cg;function _S(t){return t!==null}var OS=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,[x,y]=fg(s),w={start:"0%",center:"50%",end:"100%"}[y],b=(u.arrow?.x??0)+h/2,C=(u.arrow?.y??0)+g/2;let E="",S="";return x==="bottom"?(E=p?w:`${b}px`,S=`${-g}px`):x==="top"?(E=p?w:`${b}px`,S=`${i.floating.height+g}px`):x==="right"?(E=`${-g}px`,S=p?w:`${C}px`):x==="left"&&(E=`${i.floating.width+g}px`,S=p?w:`${C}px`),{data:{x:E,y:S}}}});function fg(t){const[r,s="center"]=t.split("-");return[r,s]}var pg=ig,hg=lg,mg=ug,gg=dg,AS=Symbol("radix.slottable");function MS(t){const r=({children:s})=>l.jsx(l.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=AS,r}var[Ui]=Dn("Tooltip",[zi]),Hi=zi(),vg="TooltipProvider",IS=700,Ou="tooltip.open",[LS,pc]=Ui(vg),xg=t=>{const{__scopeTooltip:r,delayDuration:s=IS,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 x=g.current;return()=>window.clearTimeout(x)},[]),l.jsx(LS,{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(x=>{h.current=x},[]),disableHoverableContent:u,children:d})};xg.displayName=vg;var Uo="Tooltip",[DS,Bi]=Ui(Uo),yg=t=>{const{__scopeTooltip:r,children:s,open:i,defaultOpen:u,onOpenChange:d,disableHoverableContent:p,delayDuration:h}=t,g=pc(Uo,t.__scopeTooltip),x=Hi(r),[y,w]=m.useState(null),b=$o(),C=m.useRef(0),E=p??g.disableHoverableContent,S=h??g.delayDuration,N=m.useRef(!1),[P,A]=Vo({prop:i,defaultProp:u??!1,onChange:$=>{$?(g.onOpen(),document.dispatchEvent(new CustomEvent(Ou))):g.onClose(),d?.($)},caller:Uo}),_=m.useMemo(()=>P?N.current?"delayed-open":"instant-open":"closed",[P]),L=m.useCallback(()=>{window.clearTimeout(C.current),C.current=0,N.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(()=>{N.current=!0,A(!0),C.current=0},S)},[S,A]);return m.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),l.jsx(pg,{...x,children:l.jsx(DS,{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(()=>{E?D():(window.clearTimeout(C.current),C.current=0)},[D,E]),onOpen:L,onClose:D,disableHoverableContent:E,children:s})})};yg.displayName=Uo;var Au="TooltipTrigger",wg=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),x=m.useRef(!1),y=m.useRef(!1),w=m.useCallback(()=>x.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),l.jsx(hg,{asChild:!0,...p,children:l.jsx(Re.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...i,ref:g,onPointerMove:de(t.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),y.current=!0)}),onPointerLeave:de(t.onPointerLeave,()=>{u.onTriggerLeave(),y.current=!1}),onPointerDown:de(t.onPointerDown,()=>{u.open&&u.onClose(),x.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:de(t.onFocus,()=>{x.current||u.onOpen()}),onBlur:de(t.onBlur,u.onClose),onClick:de(t.onClick,u.onClose)})})});wg.displayName=Au;var FS="TooltipPortal",[ZN,$S]=Ui(FS,{forceMount:void 0}),$r="TooltipContent",bg=m.forwardRef((t,r)=>{const s=$S($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(Sg,{side:u,...d,ref:r}):l.jsx(zS,{side:u,...d,ref:r})})}),zS=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:x}=s,y=u.current,{onPointerInTransitChange:w}=i,b=m.useCallback(()=>{h(null),w(!1)},[w]),C=m.useCallback((E,S)=>{const N=E.currentTarget,P={x:E.clientX,y:E.clientY},A=KS(P,N.getBoundingClientRect()),_=VS(P,A),L=QS(S.getBoundingClientRect()),D=qS([..._,...L]);h(D),w(!0)},[w]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(g&&y){const E=N=>C(N,y),S=N=>C(N,g);return g.addEventListener("pointerleave",E),y.addEventListener("pointerleave",S),()=>{g.removeEventListener("pointerleave",E),y.removeEventListener("pointerleave",S)}}},[g,y,C,b]),m.useEffect(()=>{if(p){const E=S=>{const N=S.target,P={x:S.clientX,y:S.clientY},A=g?.contains(N)||y?.contains(N),_=!GS(P,p);A?b():_&&(b(),x())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[g,y,p,x,b]),l.jsx(Sg,{...t,ref:d})}),[US,HS]=Ui(Uo,{isInside:!1}),BS=MS("TooltipContent"),Sg=m.forwardRef((t,r)=>{const{__scopeTooltip:s,children:i,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:p,...h}=t,g=Bi($r,s),x=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(mg,{"data-state":g.stateAttribute,...x,...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(BS,{children:i}),l.jsx(US,{scope:s,isInside:!0,children:l.jsx(a0,{id:g.contentId,role:"tooltip",children:u||i})})]})})});bg.displayName=$r;var Cg="TooltipArrow",WS=m.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,u=Hi(s);return HS(Cg,s).isInside?null:l.jsx(gg,{...u,...i,ref:r})});WS.displayName=Cg;function KS(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 VS(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 GS(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],x=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-x)*(i-y)/(b-y)+x&&(u=!u)}return u}function qS(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),YS(r)}function YS(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 XS=xg,ZS=yg,JS=wg,kg=bg;const eC=XS,tC=ZS,nC=JS,Eg=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(kg,{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}));Eg.displayName=kg.displayName;var Wi="Collapsible",[rC]=Dn(Wi),[oC,hc]=rC(Wi),Ng=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,open:i,defaultOpen:u,disabled:d,onOpenChange:p,...h}=t,[g,x]=Vo({prop:i,defaultProp:u??!1,onChange:p,caller:Wi});return l.jsx(oC,{scope:s,disabled:d,contentId:$o(),open:g,onOpenToggle:m.useCallback(()=>x(y=>!y),[x]),children:l.jsx(Re.div,{"data-state":gc(g),"data-disabled":d?"":void 0,...h,ref:r})})});Ng.displayName=Wi;var Rg="CollapsibleTrigger",jg=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,...i}=t,u=hc(Rg,s);return l.jsx(Re.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:de(t.onClick,u.onOpenToggle)})});jg.displayName=Rg;var mc="CollapsibleContent",Pg=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(sC,{...i,ref:r,present:d})})});Pg.displayName=mc;var sC=m.forwardRef((t,r)=>{const{__scopeCollapsible:s,present:i,children:u,...d}=t,p=hc(mc,s),[h,g]=m.useState(i),x=m.useRef(null),y=He(r,x),w=m.useRef(0),b=w.current,C=m.useRef(0),E=C.current,S=p.open||h,N=m.useRef(S),P=m.useRef(void 0);return m.useEffect(()=>{const A=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(A)},[]),Gt(()=>{const A=x.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,N.current||(A.style.transitionDuration=P.current.transitionDuration,A.style.animationName=P.current.animationName),g(i)}},[p.open,i]),l.jsx(Re.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":E?`${E}px`:void 0,...t.style},children:S&&u})});function gc(t){return t?"open":"closed"}var Mu=Ng,Iu=jg,Lu=Pg;function iC(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 aC(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 lC(t){return Object.entries(t).filter(([,r])=>r).map(([r])=>r)}function uC(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",x=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:x,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 cC({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 dC(){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)=>{xe.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:x,dismissalKey:y,hasIssues:w,inaccessibleRepos:b,reposMissingReview:C,reposWithReview:E,steps:S,summary:N}=uC(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:N}),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:[x," of ",S.length," complete"]})]}),l.jsx("div",{className:"space-y-3",children:S.map((_,L)=>l.jsxs(cC,{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 $=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:$?"Installing…":`Install ${ru[O]}`},`${D.repo}-${O}`)})})]},D.repo))]}),_.id==="workflow"&&_.complete&&E.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:E.map(D=>{const O=lC(D.codeReviews).map($=>ru[$]).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 Tg(t){return t.latestVersion?`app-update:${t.latestVersion}`:null}function fC(t,r){if(!t?.updateAvailable)return!1;const s=Tg(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||!fC(s,t))return null;const i=Tg(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 pC=m.createContext(void 0);function _g(t){const r=m.useContext(pC);return t||r||"ltr"}var su=0;function hC(){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},mC="FocusScope",Og=m.forwardRef((t,r)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=t,[h,g]=m.useState(null),x=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})},N=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",N);const A=new MutationObserver(P);return h&&A.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",N),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,x),h.dispatchEvent(P),P.defaultPrevented||(gC(bC(Ag(h)),{select:!0}),document.activeElement===S&&An(h))}return()=>{h.removeEventListener(iu,x),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,x,y,C]);const E=m.useCallback(S=>{if(!s&&!i||C.paused)return;const N=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(N&&P){const A=S.currentTarget,[_,L]=vC(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(Re.div,{tabIndex:-1,...p,ref:b,onKeyDown:E})});Og.displayName=mC;function gC(t,{select:r=!1}={}){const s=document.activeElement;for(const i of t)if(An(i,{select:r}),document.activeElement!==s)return}function vC(t){const r=Ag(t),s=Sh(r,t),i=Sh(r.reverse(),t);return[s,i]}function Ag(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(!xC(s,{upTo:r}))return s}function xC(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 yC(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&&yC(t)&&r&&t.select()}}var Ch=wC();function wC(){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 bC(t){return t.filter(r=>r.tagName!=="A")}var lu="rovingFocusGroup.onEntryFocus",SC={bubbles:!1,cancelable:!0},Yo="RovingFocusGroup",[Du,Mg,CC]=Zu(Yo),[kC,Ig]=Dn(Yo,[CC]),[EC,NC]=kC(Yo),Lg=m.forwardRef((t,r)=>l.jsx(Du.Provider,{scope:t.__scopeRovingFocusGroup,children:l.jsx(Du.Slot,{scope:t.__scopeRovingFocusGroup,children:l.jsx(RC,{...t,ref:r})})}));Lg.displayName=Yo;var RC=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:u=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:x,preventScrollOnEntryFocus:y=!1,...w}=t,b=m.useRef(null),C=He(r,b),E=_g(d),[S,N]=Vo({prop:p,defaultProp:h??null,onChange:g,caller:Yo}),[P,A]=m.useState(!1),_=yt(x),L=Mg(s),D=m.useRef(!1),[O,$]=m.useState(0);return m.useEffect(()=>{const U=b.current;if(U)return U.addEventListener(lu,_),()=>U.removeEventListener(lu,_)},[_]),l.jsx(EC,{scope:s,orientation:i,dir:E,loop:u,currentTabStopId:S,onItemFocus:m.useCallback(U=>N(U),[N]),onItemShiftTab:m.useCallback(()=>A(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(U=>U+1),[]),onFocusableItemRemove:m.useCallback(()=>$(U=>U-1),[]),children:l.jsx(Re.div,{tabIndex:P||O===0?-1:0,"data-orientation":i,...w,ref:C,style:{outline:"none",...t.style},onMouseDown:de(t.onMouseDown,()=>{D.current=!0}),onFocus:de(t.onFocus,U=>{const Z=!D.current;if(U.target===U.currentTarget&&Z&&!P){const ee=new CustomEvent(lu,SC);if(U.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const te=L().filter(oe=>oe.focusable),q=te.find(oe=>oe.active),le=te.find(oe=>oe.id===S),me=[q,le,...te].filter(Boolean).map(oe=>oe.ref.current);$g(me,y)}}D.current=!1}),onBlur:de(t.onBlur,()=>A(!1))})})}),Dg="RovingFocusGroupItem",Fg=m.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:u=!1,tabStopId:d,children:p,...h}=t,g=$o(),x=d||g,y=NC(Dg,s),w=y.currentTabStopId===x,b=Mg(s),{onFocusableItemAdd:C,onFocusableItemRemove:E,currentTabStopId:S}=y;return m.useEffect(()=>{if(i)return C(),()=>E()},[i,C,E]),l.jsx(Du.ItemSlot,{scope:s,id:x,focusable:i,active:u,children:l.jsx(Re.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...h,ref:r,onMouseDown:de(t.onMouseDown,N=>{i?y.onItemFocus(x):N.preventDefault()}),onFocus:de(t.onFocus,()=>y.onItemFocus(x)),onKeyDown:de(t.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){y.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const P=TC(N,y.orientation,y.dir);if(P!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.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(N.currentTarget);_=y.loop?_C(_,L+1):_.slice(L+1)}setTimeout(()=>$g(_))}}),children:typeof p=="function"?p({isCurrentTabStop:w,hasTabStop:S!=null}):p})})});Fg.displayName=Dg;var jC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PC(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function TC(t,r,s){const i=PC(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return jC[i]}function $g(t,r=!1){const s=document.activeElement;for(const i of t)if(i===s||(i.focus({preventScroll:r}),document.activeElement!==s))return}function _C(t,r){return t.map((s,i)=>t[(r+i)%t.length])}var OC=Lg,AC=Fg;function MC(t){const r=IC(t),s=m.forwardRef((i,u)=>{const{children:d,...p}=i,h=m.Children.toArray(d),g=h.find(DC);if(g){const x=g.props.children,y=h.map(w=>w===g?m.Children.count(x)>1?m.Children.only(null):m.isValidElement(x)?x.props.children:null:w);return l.jsx(r,{...p,ref:u,children:m.isValidElement(x)?m.cloneElement(x,void 0,y):null})}return l.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${t}.Slot`,s}function IC(t){const r=m.forwardRef((s,i)=>{const{children:u,...d}=s;if(m.isValidElement(u)){const p=$C(u),h=FC(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 LC=Symbol("radix.slottable");function DC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===LC}function FC(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 $C(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 zC=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,zg=function(t){return t&&(t.host||zg(t.parentNode))},UC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var i=zg(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})},HC=function(t,r,s,i){var u=UC(r,Array.isArray(t)?t:[t]);hi[s]||(hi[s]=new WeakMap);var d=hi[s],p=[],h=new Set,g=new Set(u),x=function(w){!w||h.has(w)||(h.add(w),x(w.parentNode))};u.forEach(x);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),E=C!==null&&C!=="false",S=(Or.get(b)||0)+1,N=(d.get(b)||0)+1;Or.set(b,S),d.set(b,N),p.push(b),S===1&&E&&pi.set(b,!0),N===1&&b.setAttribute(s,"true"),E||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={})}},BC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),u=zC(t);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),HC(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 Ug(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 WC(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",KC="with-scroll-bars-hidden",VC="--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 GC=typeof window<"u"?m.useLayoutEffect:m.useEffect,Eh=new WeakMap;function qC(t,r){var s=QC(null,function(i){return t.forEach(function(u){return cu(u,i)})});return GC(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 YC(t){return t}function XC(t,r){r===void 0&&(r=YC);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)},x=function(){return Promise.resolve().then(g)};x(),s={push:function(y){p.push(y),x()},filter:function(y){return p=p.filter(y),s}}}};return u}function ZC(t){t===void 0&&(t={});var r=XC(null);return r.options=Wt({async:!0,ssr:!1},t),r}var Hg=function(t){var r=t.sideCar,s=Ug(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))};Hg.isSideCarExport=!0;function JC(t,r){return t.useMedium(r),Hg}var Bg=ZC(),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,x=t.removeScrollBar,y=t.enabled,w=t.shards,b=t.sideCar,C=t.noRelative,E=t.noIsolation,S=t.inert,N=t.allowPinchZoom,P=t.as,A=P===void 0?"div":P,_=t.gapMode,L=Ug(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,O=qC([s,r]),$=Wt(Wt({},L),u);return m.createElement(m.Fragment,null,y&&m.createElement(D,{sideCar:Bg,removeScrollBar:x,shards:w,noRelative:C,noIsolation:E,inert:S,setCallbacks:d,allowPinchZoom:!!N,lockRef:s,gapMode:_}),p?m.cloneElement(m.Children.only(h),Wt(Wt({},$),{ref:O})):m.createElement(A,Wt({},$,{className:g,ref:O}),h))});Ki.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ki.classNames={fullWidth:Si,zeroRight:bi};var ek=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=ek();return r&&t.setAttribute("nonce",r),t}function nk(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function rk(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var ok=function(){var t=0,r=null;return{add:function(s){t==0&&(r=tk())&&(nk(r,s),rk(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},sk=function(){var t=ok();return function(r,s){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},Wg=function(){var t=sk(),r=function(s){var i=s.styles,u=s.dynamic;return t(i,u),null};return r},ik={left:0,top:0,right:0,gap:0},fu=function(t){return parseInt(t||"",10)||0},ak=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)]},lk=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return ik;var r=ak(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])}},uk=Wg(),Dr="data-scroll-locked",ck=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(KC,` {
|
|
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(VC,": ").concat(h,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},Nh=function(){var t=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(t)?t:0},dk=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())}},[])},fk=function(t){var r=t.noRelative,s=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;dk();var d=m.useMemo(function(){return lk(u)},[u]);return m.createElement(uk,{styles:ck(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,pk=function(t){return t.tagName==="TEXTAREA"},Kg=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!pk(t)&&s[r]==="visible")},hk=function(t){return Kg(t,"overflowY")},mk=function(t){return Kg(t,"overflowX")},Rh=function(t,r){var s=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Vg(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},gk=function(t){var r=t.scrollTop,s=t.scrollHeight,i=t.clientHeight;return[r,s,i]},vk=function(t){var r=t.scrollLeft,s=t.scrollWidth,i=t.clientWidth;return[r,s,i]},Vg=function(t,r){return t==="v"?hk(r):mk(r)},Qg=function(t,r){return t==="v"?gk(r):vk(r)},xk=function(t,r){return t==="h"&&r==="rtl"?-1:1},yk=function(t,r,s,i,u){var d=xk(t,window.getComputedStyle(r).direction),p=d*i,h=s.target,g=r.contains(h),x=!1,y=p>0,w=0,b=0;do{if(!h)break;var C=Qg(t,h),E=C[0],S=C[1],N=C[2],P=S-N-d*E;(E||P)&&Vg(t,h)&&(w+=P,b+=E);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)&&(x=!0),x},gi=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},jh=function(t){return[t.deltaX,t.deltaY]},Ph=function(t){return t&&"current"in t?t.current:t},wk=function(t,r){return t[0]===r[0]&&t[1]===r[1]},bk=function(t){return`
|
|
46
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
48
|
+
`)},Sk=0,Mr=[];function Ck(t){var r=m.useRef([]),s=m.useRef([0,0]),i=m.useRef(),u=m.useState(Sk++)[0],d=m.useState(Wg)[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=WC([t.lockRef.current],(t.shards||[]).map(Ph),!0).filter(Boolean);return S.forEach(function(N){return N.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(u))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(S,N){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,$=Math.abs(_)>Math.abs(L)?"h":"v";if("touches"in S&&$==="h"&&O.type==="range")return!1;var U=window.getSelection(),Z=U&&U.anchorNode,ee=Z?Z===O||Z.contains(O):!1;if(ee)return!1;var te=Rh($,O);if(!te)return!0;if(te?D=$:(D=$==="v"?"h":"v",te=Rh($,O)),!te)return!1;if(!i.current&&"changedTouches"in S&&(_||L)&&(i.current=D),!D)return!0;var q=i.current||D;return yk(q,N,S,q==="h"?_:L)},[]),g=m.useCallback(function(S){var N=S;if(!(!Mr.length||Mr[Mr.length-1]!==d)){var P="deltaY"in N?jh(N):gi(N),A=r.current.filter(function(D){return D.name===N.type&&(D.target===N.target||N.target===D.shadowParent)&&wk(D.delta,P)})[0];if(A&&A.should){N.cancelable&&N.preventDefault();return}if(!A){var _=(p.current.shards||[]).map(Ph).filter(Boolean).filter(function(D){return D.contains(N.target)}),L=_.length>0?h(N,_[0]):!p.current.noIsolation;L&&N.cancelable&&N.preventDefault()}}},[]),x=m.useCallback(function(S,N,P,A){var _={name:S,delta:N,target:P,should:A,shadowParent:kk(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){x(S.type,jh(S),S.target,h(S,t.lockRef.current))},[]),b=m.useCallback(function(S){x(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,E=t.inert;return m.createElement(m.Fragment,null,E?m.createElement(d,{styles:bk(u)}):null,C?m.createElement(fk,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function kk(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const Ek=JC(Bg,Ck);var Gg=m.forwardRef(function(t,r){return m.createElement(Ki,Wt({},t,{ref:r,sideCar:Ek}))});Gg.classNames=Ki.classNames;var $u=["Enter"," "],Nk=["ArrowDown","PageUp","Home"],qg=["ArrowUp","PageDown","End"],Rk=[...Nk,...qg],jk={ltr:[...$u,"ArrowRight"],rtl:[...$u,"ArrowLeft"]},Pk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Xo="Menu",[Ho,Tk,_k]=Zu(Xo),[rr,Yg]=Dn(Xo,[_k,zi,Ig]),Vi=zi(),Xg=Ig(),[Ok,or]=rr(Xo),[Ak,Zo]=rr(Xo),Zg=t=>{const{__scopeMenu:r,open:s=!1,children:i,dir:u,onOpenChange:d,modal:p=!0}=t,h=Vi(r),[g,x]=m.useState(null),y=m.useRef(!1),w=yt(d),b=_g(u);return m.useEffect(()=>{const C=()=>{y.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>y.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),l.jsx(pg,{...h,children:l.jsx(Ok,{scope:r,open:s,onOpenChange:w,content:g,onContentChange:x,children:l.jsx(Ak,{scope:r,onClose:m.useCallback(()=>w(!1),[w]),isUsingKeyboardRef:y,dir:b,modal:p,children:i})})})};Zg.displayName=Xo;var Mk="MenuAnchor",vc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Vi(s);return l.jsx(hg,{...u,...i,ref:r})});vc.displayName=Mk;var xc="MenuPortal",[Ik,Jg]=rr(xc,{forceMount:void 0}),ev=t=>{const{__scopeMenu:r,forceMount:s,children:i,container:u}=t,d=or(xc,r);return l.jsx(Ik,{scope:r,forceMount:s,children:l.jsx(Fn,{present:s||d.open,children:l.jsx(ec,{asChild:!0,container:u,children:i})})})};ev.displayName=xc;var Rt="MenuContent",[Lk,yc]=rr(Rt),tv=m.forwardRef((t,r)=>{const s=Jg(Rt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(Rt,t.__scopeMenu),p=Zo(Rt,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(Dk,{...u,ref:r}):l.jsx(Fk,{...u,ref:r})})})})}),Dk=m.forwardRef((t,r)=>{const s=or(Rt,t.__scopeMenu),i=m.useRef(null),u=He(r,i);return m.useEffect(()=>{const d=i.current;if(d)return BC(d)},[]),l.jsx(wc,{...t,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:de(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),Fk=m.forwardRef((t,r)=>{const s=or(Rt,t.__scopeMenu);return l.jsx(wc,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),$k=MC("MenuContent.ScrollLock"),wc=m.forwardRef((t,r)=>{const{__scopeMenu:s,loop:i=!1,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:h,onEntryFocus:g,onEscapeKeyDown:x,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,disableOutsideScroll:E,...S}=t,N=or(Rt,s),P=Zo(Rt,s),A=Vi(s),_=Xg(s),L=Tk(s),[D,O]=m.useState(null),$=m.useRef(null),U=He(r,$,N.onContentChange),Z=m.useRef(0),ee=m.useRef(""),te=m.useRef(0),q=m.useRef(null),le=m.useRef("right"),Y=m.useRef(0),me=E?Gg:m.Fragment,oe=E?{as:$k,allowPinchZoom:!0}:void 0,ie=B=>{const Q=ee.current+B,k=L().filter(he=>!he.disabled),z=document.activeElement,ae=k.find(he=>he.ref.current===z)?.textValue,pe=k.map(he=>he.textValue),we=Xk(pe,Q,ae),ve=k.find(he=>he.textValue===we)?.ref.current;(function he(be){ee.current=be,window.clearTimeout(Z.current),be!==""&&(Z.current=window.setTimeout(()=>he(""),1e3))})(Q),ve&&setTimeout(()=>ve.focus())};m.useEffect(()=>()=>window.clearTimeout(Z.current),[]),hC();const H=m.useCallback(B=>le.current===q.current?.side&&Jk(B,q.current?.area),[]);return l.jsx(Lk,{scope:s,searchRef:ee,onItemEnter:m.useCallback(B=>{H(B)&&B.preventDefault()},[H]),onItemLeave:m.useCallback(B=>{H(B)||($.current?.focus(),O(null))},[H]),onTriggerLeave:m.useCallback(B=>{H(B)&&B.preventDefault()},[H]),pointerGraceTimerRef:te,onPointerGraceIntentChange:m.useCallback(B=>{q.current=B},[]),children:l.jsx(me,{...oe,children:l.jsx(Og,{asChild:!0,trapped:u,onMountAutoFocus:de(d,B=>{B.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:l.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:x,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,children:l.jsx(OC,{asChild:!0,..._,dir:P.dir,orientation:"vertical",loop:i,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:de(g,B=>{P.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(mg,{role:"menu","aria-orientation":"vertical","data-state":vv(N.open),"data-radix-menu-content":"",dir:P.dir,...A,...S,ref:U,style:{outline:"none",...S.style},onKeyDown:de(S.onKeyDown,B=>{const k=B.target.closest("[data-radix-menu-content]")===B.currentTarget,z=B.ctrlKey||B.altKey||B.metaKey,ae=B.key.length===1;k&&(B.key==="Tab"&&B.preventDefault(),!z&&ae&&ie(B.key));const pe=$.current;if(B.target!==pe||!Rk.includes(B.key))return;B.preventDefault();const ve=L().filter(he=>!he.disabled).map(he=>he.ref.current);qg.includes(B.key)&&ve.reverse(),qk(ve)}),onBlur:de(t.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(Z.current),ee.current="")}),onPointerMove:de(t.onPointerMove,Bo(B=>{const Q=B.target,k=Y.current!==B.clientX;if(B.currentTarget.contains(Q)&&k){const z=B.clientX>Y.current?"right":"left";le.current=z,Y.current=B.clientX}}))})})})})})})});tv.displayName=Rt;var zk="MenuGroup",bc=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(Re.div,{role:"group",...i,ref:r})});bc.displayName=zk;var Uk="MenuLabel",nv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(Re.div,{...i,ref:r})});nv.displayName=Uk;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),x=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?x.current=!1:p.onClose()}};return l.jsx(rv,{...u,ref:g,disabled:s,onClick:de(t.onClick,y),onPointerDown:w=>{t.onPointerDown?.(w),x.current=!0},onPointerUp:de(t.onPointerUp,w=>{x.current||w.currentTarget?.click()}),onKeyDown:de(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 rv=m.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:i=!1,textValue:u,...d}=t,p=yc(Pi,s),h=Xg(s),g=m.useRef(null),x=He(r,g),[y,w]=m.useState(!1),[b,C]=m.useState("");return m.useEffect(()=>{const E=g.current;E&&C((E.textContent??"").trim())},[d.children]),l.jsx(Ho.ItemSlot,{scope:s,disabled:i,textValue:u??b,children:l.jsx(AC,{asChild:!0,...h,focusable:!i,children:l.jsx(Re.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...d,ref:x,onPointerMove:de(t.onPointerMove,Bo(E=>{i?p.onItemLeave(E):(p.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(t.onPointerLeave,Bo(E=>p.onItemLeave(E))),onFocus:de(t.onFocus,()=>w(!0)),onBlur:de(t.onBlur,()=>w(!1))})})})}),Hk="MenuCheckboxItem",ov=m.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:i,...u}=t;return l.jsx(uv,{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:de(u.onSelect,()=>i?.(Ti(s)?!0:!s),{checkForDefaultPrevented:!1})})})});ov.displayName=Hk;var sv="MenuRadioGroup",[Bk,Wk]=rr(sv,{value:void 0,onValueChange:()=>{}}),iv=m.forwardRef((t,r)=>{const{value:s,onValueChange:i,...u}=t,d=yt(i);return l.jsx(Bk,{scope:t.__scopeMenu,value:s,onValueChange:d,children:l.jsx(bc,{...u,ref:r})})});iv.displayName=sv;var av="MenuRadioItem",lv=m.forwardRef((t,r)=>{const{value:s,...i}=t,u=Wk(av,t.__scopeMenu),d=s===u.value;return l.jsx(uv,{scope:t.__scopeMenu,checked:d,children:l.jsx(Qi,{role:"menuitemradio","aria-checked":d,...i,ref:r,"data-state":Cc(d),onSelect:de(i.onSelect,()=>u.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});lv.displayName=av;var Sc="MenuItemIndicator",[uv,Kk]=rr(Sc,{checked:!1}),cv=m.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:i,...u}=t,d=Kk(Sc,s);return l.jsx(Fn,{present:i||Ti(d.checked)||d.checked===!0,children:l.jsx(Re.span,{...u,ref:r,"data-state":Cc(d.checked)})})});cv.displayName=Sc;var Vk="MenuSeparator",dv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return l.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});dv.displayName=Vk;var Qk="MenuArrow",fv=m.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,u=Vi(s);return l.jsx(gg,{...u,...i,ref:r})});fv.displayName=Qk;var Gk="MenuSub",[JN,pv]=rr(Gk),Lo="MenuSubTrigger",hv=m.forwardRef((t,r)=>{const s=or(Lo,t.__scopeMenu),i=Zo(Lo,t.__scopeMenu),u=pv(Lo,t.__scopeMenu),d=yc(Lo,t.__scopeMenu),p=m.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:g}=d,x={__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,...x,children:l.jsx(rv,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":u.contentId,"data-state":vv(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:de(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:de(t.onPointerLeave,Bo(w=>{y();const b=s.content?.getBoundingClientRect();if(b){const C=s.content?.dataset.side,E=C==="right",S=E?-5:5,N=b[E?"left":"right"],P=b[E?"right":"left"];d.onPointerGraceIntentChange({area:[{x:w.clientX+S,y:w.clientY},{x:N,y:b.top},{x:P,y:b.top},{x:P,y:b.bottom},{x:N,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:de(t.onKeyDown,w=>{const b=d.searchRef.current!=="";t.disabled||b&&w.key===" "||jk[i.dir].includes(w.key)&&(s.onOpenChange(!0),s.content?.focus(),w.preventDefault())})})})});hv.displayName=Lo;var mv="MenuSubContent",gv=m.forwardRef((t,r)=>{const s=Jg(Rt,t.__scopeMenu),{forceMount:i=s.forceMount,...u}=t,d=or(Rt,t.__scopeMenu),p=Zo(Rt,t.__scopeMenu),h=pv(mv,t.__scopeMenu),g=m.useRef(null),x=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:x,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:de(t.onFocusOutside,y=>{y.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:de(t.onEscapeKeyDown,y=>{p.onClose(),y.preventDefault()}),onKeyDown:de(t.onKeyDown,y=>{const w=y.currentTarget.contains(y.target),b=Pk[p.dir].includes(y.key);w&&b&&(d.onOpenChange(!1),h.trigger?.focus(),y.preventDefault())})})})})})});gv.displayName=mv;function vv(t){return t?"open":"closed"}function Ti(t){return t==="indeterminate"}function Cc(t){return Ti(t)?"indeterminate":t?"checked":"unchecked"}function qk(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function Yk(t,r){return t.map((s,i)=>t[(r+i)%t.length])}function Xk(t,r,s){const u=r.length>1&&Array.from(r).every(x=>x===r[0])?r[0]:r,d=s?t.indexOf(s):-1;let p=Yk(t,Math.max(d,0));u.length===1&&(p=p.filter(x=>x!==s));const g=p.find(x=>x.toLowerCase().startsWith(u.toLowerCase()));return g!==s?g:void 0}function Zk(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],x=h.x,y=h.y,w=g.x,b=g.y;y>i!=b>i&&s<(w-x)*(i-y)/(b-y)+x&&(u=!u)}return u}function Jk(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return Zk(s,r)}function Bo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var eE=Zg,tE=vc,nE=ev,rE=tv,oE=bc,sE=nv,iE=Qi,aE=ov,lE=iv,uE=lv,cE=cv,dE=dv,fE=fv,pE=hv,hE=gv,Gi="DropdownMenu",[mE]=Dn(Gi,[Yg]),st=Yg(),[gE,xv]=mE(Gi),yv=t=>{const{__scopeDropdownMenu:r,children:s,dir:i,open:u,defaultOpen:d,onOpenChange:p,modal:h=!0}=t,g=st(r),x=m.useRef(null),[y,w]=Vo({prop:u,defaultProp:d??!1,onChange:p,caller:Gi});return l.jsx(gE,{scope:r,triggerId:$o(),triggerRef:x,contentId:$o(),open:y,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(b=>!b),[w]),modal:h,children:l.jsx(eE,{...g,open:y,onOpenChange:w,dir:i,modal:h,children:s})})};yv.displayName=Gi;var wv="DropdownMenuTrigger",bv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:i=!1,...u}=t,d=xv(wv,s),p=st(s);return l.jsx(tE,{asChild:!0,...p,children:l.jsx(Re.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:de(t.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(d.onOpenToggle(),d.open||h.preventDefault())}),onKeyDown:de(t.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&d.onOpenToggle(),h.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});bv.displayName=wv;var vE="DropdownMenuPortal",Sv=t=>{const{__scopeDropdownMenu:r,...s}=t,i=st(r);return l.jsx(nE,{...i,...s})};Sv.displayName=vE;var Cv="DropdownMenuContent",kv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=xv(Cv,s),d=st(s),p=m.useRef(!1);return l.jsx(rE,{id:u.contentId,"aria-labelledby":u.triggerId,...d,...i,ref:r,onCloseAutoFocus:de(t.onCloseAutoFocus,h=>{p.current||u.triggerRef.current?.focus(),p.current=!1,h.preventDefault()}),onInteractOutside:de(t.onInteractOutside,h=>{const g=h.detail.originalEvent,x=g.button===0&&g.ctrlKey===!0,y=g.button===2||x;(!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)"}})});kv.displayName=Cv;var xE="DropdownMenuGroup",yE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(oE,{...u,...i,ref:r})});yE.displayName=xE;var wE="DropdownMenuLabel",Ev=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(sE,{...u,...i,ref:r})});Ev.displayName=wE;var bE="DropdownMenuItem",Nv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(iE,{...u,...i,ref:r})});Nv.displayName=bE;var SE="DropdownMenuCheckboxItem",Rv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(aE,{...u,...i,ref:r})});Rv.displayName=SE;var CE="DropdownMenuRadioGroup",kE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(lE,{...u,...i,ref:r})});kE.displayName=CE;var EE="DropdownMenuRadioItem",jv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(uE,{...u,...i,ref:r})});jv.displayName=EE;var NE="DropdownMenuItemIndicator",Pv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(cE,{...u,...i,ref:r})});Pv.displayName=NE;var RE="DropdownMenuSeparator",Tv=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(dE,{...u,...i,ref:r})});Tv.displayName=RE;var jE="DropdownMenuArrow",PE=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(fE,{...u,...i,ref:r})});PE.displayName=jE;var TE="DropdownMenuSubTrigger",_v=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(pE,{...u,...i,ref:r})});_v.displayName=TE;var _E="DropdownMenuSubContent",Ov=m.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,u=st(s);return l.jsx(hE,{...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)"}})});Ov.displayName=_E;var OE=yv,AE=bv,ME=Sv,Av=kv,Mv=Ev,Iv=Nv,Lv=Rv,Dv=jv,Fv=Pv,$v=Tv,zv=_v,Uv=Ov;const IE=OE,LE=AE,DE=m.forwardRef(({className:t,inset:r,children:s,...i},u)=>l.jsxs(zv,{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(O0,{className:"ml-auto"})]}));DE.displayName=zv.displayName;const FE=m.forwardRef(({className:t,...r},s)=>l.jsx(Uv,{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}));FE.displayName=Uv.displayName;const Hv=m.forwardRef(({className:t,sideOffset:r=4,...s},i)=>l.jsx(ME,{children:l.jsx(Av,{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})}));Hv.displayName=Av.displayName;const $E=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx(Iv,{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}));$E.displayName=Iv.displayName;const zE=m.forwardRef(({className:t,children:r,checked:s,...i},u)=>l.jsxs(Lv,{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(Fv,{children:l.jsx(_0,{className:"h-4 w-4"})})}),r]}));zE.displayName=Lv.displayName;const UE=m.forwardRef(({className:t,children:r,...s},i)=>l.jsxs(Dv,{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(Fv,{children:l.jsx(M0,{className:"h-2 w-2 fill-current"})})}),r]}));UE.displayName=Dv.displayName;const HE=m.forwardRef(({className:t,inset:r,...s},i)=>l.jsx(Mv,{ref:i,className:De("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...s}));HE.displayName=Mv.displayName;const BE=m.forwardRef(({className:t,...r},s)=>l.jsx($v,{ref:s,className:De("-mx-1 my-1 h-px bg-muted",t),...r}));BE.displayName=$v.displayName;function WE(t){return t.replace("_"," ").toUpperCase()}function KE(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 Bv(t){return t==="resolved"||t==="rejected"}function VE(t){return Bv(t)||t==="warning"}function Wv(t){return t.length===0?!1:t.every(r=>Bv(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"},GE={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:[]},qE={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"},YE={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 XE(t){return QE[t]}function ZE(t){return GE[t]}function _h(t){return t==="pause"?"Pause":t==="resume"?"Resume":t==="retry"?"Retry":"Cancel"}function JE(t){return qE[t]}function eN(t){return YE[t]}function tN(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 nN(t){return t?t.blockedReason??t.escalationReason??t.latestFingerprint??null:null}function rN(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 oN(t,r){return rN(t,r)}function sN(t,r){return{stateLabel:XE(t.state),tone:JE(t.state),attemptSummary:tN(t),reasonSummary:nN(t),statusHint:eN(t.state),actions:ZE(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 Kv(t){return t.watchEnabled}function Vv(t){return t==="processing"?"autonomous run active":t==="done"?"completed":t==="error"?"attention needed":t==="archived"?"archived":"watching"}function iN(t){return`${Math.max(1,Math.round((t??12e4)/1e3))}s`}const aN=[{value:"mine",label:"My PRs only"},{value:"team",label:"My PRs + teammates"}],lN={failed:[],inProgress:[],queued:[],warnings:[],generatedAt:""},pu=200,Oh="oh-my-pr:tracked-repos-open";function uN(t){return t===!1?"team":"mine"}const Ah={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 cN({status:t}){const r=KE(t);return l.jsx("span",{className:`inline-block border px-1.5 py-0 text-[11px] uppercase tracking-wide ${r}`,children:WE(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 Mh({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:aN.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 dN({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 truncate text-[11px] leading-4 text-destructive",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(dN,{activity:i},i.id))}):l.jsx("div",{className:"px-2 pb-2 text-[11px] text-muted-foreground",children:s})]})}function fN({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(IE,{children:[l.jsxs(LE,{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(T0,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{children:"activity"}),l.jsx("span",{className:"text-foreground",children:p})]}),l.jsxs(Hv,{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 pN({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 Gv({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 qv({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(tC,{children:[l.jsx(nC,{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(Eg,{side:"top",children:l.jsx("p",{className:"text-xs",children:i})})]})}const hN=m.memo(function({pr:r,isSelected:s,onSelect:i}){const u=Lt(r.lastChecked),d=Kv(r),h=!(r.status==="processing"||Wo(r.feedbackItems).inProgress>0)&&Wv(r.feedbackItems);return l.jsx("div",{onClick:()=>i(r.id),onKeyDown:g=>{g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.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(qv,{pr:r})]}),h&&l.jsx(Gv,{href:r.url,testId:`ready-to-merge-${r.id}`,label:"Ready to merge",hint:"— click to open PR",onClick:g=>g.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"}),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:g=>g.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:Vv(r.status)}),!d&&l.jsx(zu,{}),r.feedbackItems.length>0&&(()=>{const g=Wo(r.feedbackItems),x=[];return g.queued>0&&x.push(`${g.queued}q`),g.inProgress>0&&x.push(`${g.inProgress} active`),g.failed>0&&x.push(`${g.failed} failed`),g.warning>0&&x.push(`${g.warning} warn`),x.length===0?l.jsxs("span",{children:[r.feedbackItems.length," items"]}):l.jsx("span",{children:x.join(" · ")})})(),u&&l.jsxs("span",{children:["checked ",u]})]})]})]})})});function mN({item:t,prId:r,readOnly:s}){const i=Je({mutationFn:async h=>(await Ge("PATCH",`/api/prs/${r}/feedback/${t.id}`,{decision:h})).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/prs",r]})}}),u=Je({mutationFn:async()=>(await Ge("POST",`/api/prs/${r}/feedback/${t.id}/retry`)).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/prs",r]}),xe.invalidateQueries({queryKey:["/api/activities"]}),xe.invalidateQueries({queryKey:["/api/logs"]})},onError:h=>{It("Could not retry feedback item",h)}}),d=Lt(t.createdAt),p=VE(t.status);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(cN,{status:t.status})}),l.jsx("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})]})}),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(h=>l.jsx("button",{type:"button",onClick:()=>i.mutate(h),"data-testid":`override-${h}-${t.id}`,"aria-label":`${h} 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===h?"bg-foreground text-background":"border border-border text-muted-foreground"}`,children:h},h))]})]})}),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||t.decisionReason)&&l.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:t.statusReason||t.decisionReason})]})})]})}function gN({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 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 vN({pr:t,config:r,healingSessions:s}){const i=oN(s,t.id),u=i?sN(i):null,d=u?Ah[u.tone]:Ah.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 xN({prId:t}){const[r,s]=m.useState("ask");return 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:()=>s("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 ${r==="ask"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Ask Agent"}),l.jsx("button",{type:"button",onClick:()=>s("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 ${r==="activity"?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Activity"})]}),l.jsx("div",{className:"flex-1 overflow-hidden",children:r==="activity"?l.jsx(gN,{prId:t}):t?l.jsx(yN,{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 yN({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:()=>{xe.invalidateQueries({queryKey:["/api/prs",t,"questions"]}),xe.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:Yv(d.error)})]})]})}function Yv(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:Yv(r)})}function wN(){const[t,r]=m.useState(null),[s,i]=m.useState(""),[u,d]=m.useState(""),[p,h]=m.useState(null),[g,x]=m.useState(()=>{if(typeof window>"u")return!0;try{const k=window.localStorage.getItem(Oh);return k===null?!0:k==="true"}catch{return!0}}),[y,w]=m.useState("mine"),[b,C]=m.useState("active");m.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Oh,String(g))}catch{}},[g]);const{data:E=[],isLoading:S}=ot({queryKey:["/api/prs"],refetchInterval:3e3}),{data:N=[],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()=>lm("/api/healing-sessions"),refetchInterval:5e3}),{data:L=lN}=ot({queryKey:["/api/activities"],refetchInterval:3e3}),{data:D=[]}=ot({queryKey:["/api/repos/settings"],refetchInterval:5e3}),O=b==="active"?E:N,$=b==="archived";m.useEffect(()=>{if(O.length===0){t!==null&&r(null);return}(!t||!O.some(k=>k.id===t))&&r(O[0].id)},[O,t]);const U=O.find(k=>k.id===t)??null,Z=U?Kv(U):!0,ee=aC(p,D.length),te=Je({mutationFn:async k=>(await Ge("POST","/api/prs",{url:k})).json(),onSuccess:k=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/activities"]}),xe.invalidateQueries({queryKey:["/api/repos/settings"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]}),i(""),r(k.id)},onError:k=>{It("Could not add PR",k)}}),q=Je({mutationFn:async k=>(await Ge("POST",`/api/prs/${k}/apply`)).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/activities"]}),xe.invalidateQueries({queryKey:["/api/logs"]})},onError:k=>{It("Could not run babysitter",k)}}),le=Je({mutationFn:async({id:k,enabled:z})=>(await Ge("PATCH",`/api/prs/${k}/watch`,{enabled:z})).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/prs/archived"]}),xe.invalidateQueries({queryKey:["/api/logs"]})},onError:k=>{It("Could not update PR watch state",k)}}),Y=Je({mutationFn:async k=>(await Ge("PATCH","/api/config",k)).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/config"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:k=>{It("Could not update settings",k)}}),me=Je({mutationFn:async()=>(await Ge("POST","/api/repos/sync")).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/activities"]}),xe.invalidateQueries({queryKey:["/api/repos/settings"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:k=>{It("Could not sync repositories",k)}}),oe=Je({mutationFn:async()=>(await Ge("DELETE","/api/activities/failed")).json(),onSuccess:({cleared:k})=>{xe.invalidateQueries({queryKey:["/api/activities"]}),vt({description:k===1?"Cleared 1 failed activity.":`Cleared ${k} failed activities.`})},onError:k=>{It("Could not clear failed activities",k)}}),ie=Je({mutationFn:async k=>(await Ge("POST","/api/repos/release",{repo:k})).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/releases"]}),xe.invalidateQueries({queryKey:["/api/activities"]}),vt({description:"Release queued."})},onError:k=>{It("Could not create release",k)}}),H=async k=>(await Ge("PATCH","/api/repos/settings",k)).json(),B=Je({mutationFn:H,onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/repos/settings"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]})},onError:k=>{It("Could not update repository settings",k)}}),Q=Je({mutationFn:async({repo:k})=>(await Ge("POST","/api/repos",{repo:k})).json(),onSuccess:async(k,z)=>{if(xe.invalidateQueries({queryKey:["/api/repos/settings"]}),xe.invalidateQueries({queryKey:["/api/prs"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]}),d(""),w("mine"),z.watchScope==="team")try{await H({repo:k.repo,ownPrsOnly:!1}),xe.invalidateQueries({queryKey:["/api/repos/settings"]})}catch(ae){It("Repository added, but could not update tracking scope",ae)}},onError:k=>{It("Could not watch repository",k)}});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 ",iN(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:[E.length," PR",E.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:k=>{const z=k.target.value;Y.mutate({codingAgent:z})},disabled:Y.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(fN,{activities:L,onClearFailed:()=>oe.mutate(),isClearingFailed:oe.isPending})]})]}),l.jsx(dC,{}),l.jsx(pN,{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 (",E.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 (",N.length,")"]})]}),!$&&l.jsxs(l.Fragment,{children:[l.jsxs(Mu,{open:ee,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:ee?"Hide":"Add"})})]}),l.jsxs(Lu,{children:[l.jsx("form",{onSubmit:k=>{k.preventDefault(),s.trim()&&te.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:k=>i(k.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:te.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:k=>{k.preventDefault();const z=u.trim();z&&Q.mutate({repo:z,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:k=>d(k.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:Q.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(Mh,{value:y,onChange:w,disabled:Q.isPending,name:"watch-scope",testIdPrefix:"watch-scope"})]})]})]})]}),l.jsxs(Mu,{open:g,onOpenChange:x,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:()=>me.mutate(),disabled:me.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:me.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(k=>{const z=ie.isPending&&ie.variables===k.repo;return l.jsxs("div",{className:"space-y-2 border border-border/60 px-2 py-2",children:[l.jsx("a",{href:iC(k.repo),target:"_blank",rel:"noopener noreferrer","data-testid":`tracked-repo-${k.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:k.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(Mh,{value:uN(k.ownPrsOnly),onChange:ae=>B.mutate({repo:k.repo,ownPrsOnly:ae==="mine"}),disabled:B.isPending,name:`tracked-repo-scope-${k.repo}`,testIdPrefix:`tracked-repo-scope-${k.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:k.autoCreateReleases,onChange:ae=>B.mutate({repo:k.repo,autoCreateReleases:ae.target.checked}),disabled:B.isPending,"data-testid":`tracked-repo-auto-release-${k.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:()=>ie.mutate(k.repo),disabled:ie.isPending,"data-testid":`tracked-repo-manual-release-${k.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:z?"Releasing...":"Release"})]})]})]},k.repo)})})})]})]}),l.jsx("div",{className:"flex-1",children:($?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:$?"No archived PRs. Closed PRs are archived automatically.":"No PRs tracked yet. Add a repository to watch or add a PR URL."}):O.map(k=>l.jsx(hN,{pr:k,isSelected:k.id===t,onSelect:r},k.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(qv,{pr:U}),!Z&&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: ",Vv(U.status)]}),!Z&&l.jsx(zu,{}),l.jsxs("span",{children:[U.feedbackItems.length," items"]}),U.feedbackItems.length>0&&(()=>{const k=Wo(U.feedbackItems);return l.jsxs(l.Fragment,{children:[k.queued>0&&l.jsxs("span",{children:[k.queued," queued"]}),k.inProgress>0&&l.jsxs("span",{children:[k.inProgress," in progress"]}),k.failed>0&&l.jsxs("span",{children:[k.failed," failed"]}),k.warning>0&&l.jsxs("span",{children:[k.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)]})]})]}),!$&&l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:()=>q.mutate(U.id),disabled:q.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:()=>le.mutate({id:U.id,enabled:!Z}),disabled:le.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:Z?"Pause watch":"Resume watch"})]})]}),Wv(U.feedbackItems)&&U.status!=="processing"&&Wo(U.feedbackItems).inProgress===0&&l.jsx(Gv,{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"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:Z?"Background watcher syncs GitHub feedback and pushes approved fixes automatically.":"Background watch is paused for this PR; manual runs still work."})]}),l.jsx(vN,{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:Z?"No feedback yet. The watcher will sync GitHub comments automatically.":"No feedback yet. Background watch is paused for this PR."}):U.feedbackItems.map(k=>l.jsx(mN,{item:k,prId:U.id,readOnly:$},k.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(xN,{prId:t})]})]})}function bN(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 SN(t){return t?.drainMode?"Resume":"Pause"}function CN(){const{data:t}=ot({queryKey:["/api/config"]}),[r,s]=m.useState(""),[i,u]=m.useState(!1),d=t?.githubTokens??(t?.githubToken?[t.githubToken]:[]),p=E=>{C.mutate({githubTokens:E})},h=(E,S)=>{const N=[...d],[P]=N.splice(E,1);P&&(N.splice(S,0,P),p(N))},g=E=>{p(d.filter((S,N)=>N!==E))},{data:x,isError:y}=ot({queryKey:["/api/runtime"],refetchInterval:5e3}),w=bN(x,y),b=Je({mutationFn:async E=>(await Ge("POST","/api/runtime/drain",E)).json(),onSuccess:(E,S)=>{xe.invalidateQueries({queryKey:["/api/runtime"]}),vt({description:S.enabled?"Automation paused. New runs are blocked; in-flight runs will finish.":"Automation resumed."})},onError:E=>{vt({variant:"destructive",description:`Failed to update drain mode: ${E.message}`})}}),C=Je({mutationFn:async E=>(await Ge("PATCH","/api/config",E)).json(),onSuccess:()=>{xe.invalidateQueries({queryKey:["/api/config"]}),xe.invalidateQueries({queryKey:["/api/onboarding/status"]}),vt({description:"Settings saved."})},onError:E=>{vt({variant:"destructive",description:`Failed to save: ${E.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:E=>{const S=E.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:E=>C.mutate({fallbackToNextCodingAgent:E.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:E=>C.mutate({autoResolveMergeConflicts:E.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:E=>C.mutate({autoUpdateDocs:E.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:E=>C.mutate({maxTurns:E}),disabled:C.isPending}),l.jsx(_n,{label:"Poll interval (ms)",description:"How often to check for new feedback",value:t?.pollIntervalMs??12e4,onChange:E=>C.mutate({pollIntervalMs:E}),disabled:C.isPending}),l.jsx(_n,{label:"Batch window (ms)",description:"Time to batch feedback before processing",value:t?.batchWindowMs??3e5,onChange:E=>C.mutate({batchWindowMs:E}),disabled:C.isPending}),l.jsx(_n,{label:"Max changes per run",description:"Limit on concurrent changes",value:t?.maxChangesPerRun??20,onChange:E=>C.mutate({maxChangesPerRun:E}),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:E=>C.mutate({autoHealCI:E.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:E=>C.mutate({maxHealingAttemptsPerSession:E}),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:E=>C.mutate({maxHealingAttemptsPerFingerprint:E}),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:E=>C.mutate({maxConcurrentHealingRuns:E}),disabled:C.isPending}),l.jsx(_n,{label:"Healing cooldown (ms)",description:"Backoff before a cooldowned session can retry",value:t?.healingCooldownMs??3e5,onChange:E=>C.mutate({healingCooldownMs:E}),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:E=>C.mutate({autoCreateReleases:E.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(x?.drainMode?{enabled:!1}:{enabled:!0,reason:"Manually paused via web settings"}),disabled:!x||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:SN(x)})]}),x?.drainMode&&(x.drainReason||x.drainRequestedAt)?l.jsxs("div",{className:"border-l-2 border-destructive bg-muted/30 px-3 py-2 text-[11px]",children:[x.drainReason?l.jsx("div",{className:"text-foreground",children:x.drainReason}):null,x.drainRequestedAt?l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["since ",new Date(x.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((E,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:E}),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:E=>s(E.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 E=r.trim();E&&(p([...d,E]),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:E=>C.mutate({includeRepositoryLinksInGitHubComments:E.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:E=>C.mutate({postGitHubProgressReplies:E.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(kN,{label:"Ignored bots",description:"Bot logins whose comments and reviews are ignored.",placeholder:"dependabot[bot]",values:t?.ignoredBots??[],onChange:E=>C.mutate({ignoredBots:E}),disabled:!t||C.isPending})]})]})]})})]})}function kN({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,"")}`,x=`${g}-description`,y=()=>{const b=p.trim(),C=b.toLowerCase();if(!b||i.some(E=>E.toLowerCase()===C)){h("");return}u([...i,b]),h("")},w=b=>{u(i.filter((C,E)=>E!==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:x,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":x,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 EN(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function NN(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 RN({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(RN,{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 jN({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 PN({changelog:t}){const[r,s]=m.useState(!1),i=t.content?NN(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(jN,{status:t.status}),l.jsx("span",{className:"text-sm font-medium",children:EN(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 TN(){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(PN,{changelog:s},s.id))})]})})]})}const _N=new Set(["detected","evaluating","proposed","publishing"]);function Xv(t){return _N.has(t)}function ON(t){return t==="published"||t==="skipped"||t==="error"}function AN(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 MN(t){return t?t.slice(0,7):"n/a"}function IN({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":Xv(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 LN({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 DN({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)&&ON(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(IN,{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: ",MN(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(LN,{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 FN(){const{data:t=[],isLoading:r}=ot({queryKey:["/api/releases"],refetchInterval:i=>{const u=i.state.data;return Array.isArray(u)&&u.some(d=>AN(d)&&Xv(d.status))?5e3:!1}}),s=Je({mutationFn:async i=>(await Ge("POST",`/api/releases/${i}/retry`)).json(),onSuccess:()=>{xe.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(DN,{run:i,onRetry:u=>s.mutate(u),retryPending:s.isPending},i.id))})]})})]})}const Zv=["trace","debug","info","warn","error","fatal"],Ih={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},$N={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 zN(t){const r=new URLSearchParams(t),s=r.get("level")??"";return{level:Zv.includes(s)?s:"",source:r.get("source")??"",search:r.get("q")??"",follow:r.get("follow")==="1"}}function Jv(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function UN(t){const r=Object.keys(t.fields).length>0?" "+JSON.stringify(t.fields):"",s=t.source?` [${t.source}]`:"";return`${Jv(t.time)} ${t.level.toUpperCase().padEnd(5)}${s} ${t.msg}${r}`}function Lh(t){return t.map(UN).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 HN(){const t=Rw(),r=m.useMemo(()=>zN(t),[t]),[s,i]=m.useState(r.level),[u,d]=m.useState(r.source),[p,h]=m.useState(r.search),[g,x]=m.useState(r.follow),[y,w]=m.useState([]),[b,C]=m.useState([]),[E,S]=m.useState(null),N=m.useRef([]);N.current=y;const P=m.useRef(null),A=m.useRef(g);A.current=g,m.useEffect(()=>{let O=!1;S(null);const $=new URLSearchParams;return s&&$.set("level",s),u&&$.set("source",u),p&&$.set("search",p),$.set("limit","1000"),lm(`/api/server-logs?${$.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 $=`/api/server-logs/stream?since=${N.current[N.current.length-1]?.seq??0}`,U=new EventSource($);return U.onmessage=Z=>{try{const ee=JSON.parse(Z.data);w(te=>{if(te.length>0&&te[te.length-1].seq>=ee.seq)return te;const q=[...te,ee];return q.length>5e3?q.slice(q.length-5e3):q})}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 $=Ih[s];O=O.filter(U=>Ih[U.level]>=$)}if(u&&(O=O.filter($=>$.source===u)),p){const $=p.toLowerCase();O=O.filter(U=>U.msg.toLowerCase().includes($)||JSON.stringify(U.fields).toLowerCase().includes($))}return O},[y,s,u,p]),L=async()=>{try{await navigator.clipboard.writeText(Lh(_))}catch{}},D=()=>{const O=new Blob([Lh(_)],{type:"text/plain"}),$=URL.createObjectURL(O),U=document.createElement("a");U.href=$,U.download=`oh-my-pr-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,U.click(),URL.revokeObjectURL($)};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"}),Zv.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=>x(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"})]}),E&&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:E}),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:Jv(O.time)}),l.jsx("span",{className:`shrink-0 w-12 ${$N[O.level]}`,children:O.level}),O.source&&l.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["[",O.source,"]"]}),l.jsxs("span",{className:"grow",children:[O.msg,Object.keys(O.fields).length>0&&l.jsxs("span",{className:"text-muted-foreground",children:[" ",JSON.stringify(O.fields)]})]})]},O.seq))})]})}const ex=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}));ex.displayName="Card";const BN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex flex-col space-y-1.5 p-6",t),...r}));BN.displayName="CardHeader";const WN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-2xl font-semibold leading-none tracking-tight",t),...r}));WN.displayName="CardTitle";const KN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("text-sm text-muted-foreground",t),...r}));KN.displayName="CardDescription";const tx=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("p-6 pt-0",t),...r}));tx.displayName="CardContent";const VN=m.forwardRef(({className:t,...r},s)=>l.jsx("div",{ref:s,className:De("flex items-center p-6 pt-0",t),...r}));VN.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(ex,{className:"w-full max-w-md mx-4",children:l.jsxs(tx,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(A0,{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 GN(){return l.jsxs(Pw,{children:[l.jsx(_r,{path:"/",component:wN}),l.jsx(_r,{path:"/settings",component:CN}),l.jsx(_r,{path:"/changelogs",component:TN}),l.jsx(_r,{path:"/releases",component:FN}),l.jsx(_r,{path:"/logs",component:HN}),l.jsx(_r,{component:QN})]})}function qN(){return l.jsx(xb,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:l.jsx(rb,{client:xe,children:l.jsxs(eC,{children:[l.jsx(v1,{}),l.jsx(Gh,{hook:Yh,children:l.jsx(GN,{})})]})})})}function YN(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=YN(window.location.href);t&&history.replaceState(history.state,"",t)}window.location.hash||(window.location.hash="#/");iw.createRoot(document.getElementById("root")).render(l.jsx(qN,{}));
|