agent-team-composer
Version:
Transform README files into GitHub project plans with AI-powered agent teams
349 lines • 662 kB
JavaScript
var wC=Object.defineProperty;var mg=e=>{throw TypeError(e)};var bC=(e,t,n)=>t in e?wC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ut=(e,t,n)=>bC(e,typeof t!="symbol"?t+"":t,n),bd=(e,t,n)=>t.has(e)||mg("Cannot "+n);var B=(e,t,n)=>(bd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ie=(e,t,n)=>t.has(e)?mg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ge=(e,t,n,r)=>(bd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Pt=(e,t,n)=>(bd(e,t,"access private method"),n);var bl=(e,t,n,r)=>({set _(i){ge(e,t,i,n)},get _(){return B(e,t,r)}});function SC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tw={exports:{}},Ec={},nw={exports:{}},Ne={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var al=Symbol.for("react.element"),kC=Symbol.for("react.portal"),EC=Symbol.for("react.fragment"),CC=Symbol.for("react.strict_mode"),_C=Symbol.for("react.profiler"),NC=Symbol.for("react.provider"),TC=Symbol.for("react.context"),PC=Symbol.for("react.forward_ref"),RC=Symbol.for("react.suspense"),jC=Symbol.for("react.memo"),AC=Symbol.for("react.lazy"),gg=Symbol.iterator;function IC(e){return e===null||typeof e!="object"?null:(e=gg&&e[gg]||e["@@iterator"],typeof e=="function"?e:null)}var rw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iw=Object.assign,sw={};function Oo(e,t,n){this.props=e,this.context=t,this.refs=sw,this.updater=n||rw}Oo.prototype.isReactComponent={};Oo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ow(){}ow.prototype=Oo.prototype;function gp(e,t,n){this.props=e,this.context=t,this.refs=sw,this.updater=n||rw}var yp=gp.prototype=new ow;yp.constructor=gp;iw(yp,Oo.prototype);yp.isPureReactComponent=!0;var yg=Array.isArray,aw=Object.prototype.hasOwnProperty,vp={current:null},lw={key:!0,ref:!0,__self:!0,__source:!0};function uw(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)aw.call(t,r)&&!lw.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:al,type:e,key:s,ref:o,props:i,_owner:vp.current}}function OC(e,t){return{$$typeof:al,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xp(e){return typeof e=="object"&&e!==null&&e.$$typeof===al}function MC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vg=/\/+/g;function Sd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?MC(""+e.key):t.toString(36)}function nu(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case al:case kC:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Sd(o,0):r,yg(i)?(n="",e!=null&&(n=e.replace(vg,"$&/")+"/"),nu(i,t,n,"",function(u){return u})):i!=null&&(xp(i)&&(i=OC(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(vg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",yg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Sd(s,a);o+=nu(s,t,n,l,i)}else if(l=IC(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Sd(s,a++),o+=nu(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Sl(e,t,n){if(e==null)return e;var r=[],i=0;return nu(e,r,"","",function(s){return t.call(n,s,i++)}),r}function LC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Wt={current:null},ru={transition:null},DC={ReactCurrentDispatcher:Wt,ReactCurrentBatchConfig:ru,ReactCurrentOwner:vp};function cw(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:Sl,forEach:function(e,t,n){Sl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Sl(e,function(){t++}),t},toArray:function(e){return Sl(e,function(t){return t})||[]},only:function(e){if(!xp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ne.Component=Oo;Ne.Fragment=EC;Ne.Profiler=_C;Ne.PureComponent=gp;Ne.StrictMode=CC;Ne.Suspense=RC;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DC;Ne.act=cw;Ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=iw({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=vp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)aw.call(t,l)&&!lw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:al,type:e.type,key:i,ref:s,props:r,_owner:o}};Ne.createContext=function(e){return e={$$typeof:TC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:NC,_context:e},e.Consumer=e};Ne.createElement=uw;Ne.createFactory=function(e){var t=uw.bind(null,e);return t.type=e,t};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(e){return{$$typeof:PC,render:e}};Ne.isValidElement=xp;Ne.lazy=function(e){return{$$typeof:AC,_payload:{_status:-1,_result:e},_init:LC}};Ne.memo=function(e,t){return{$$typeof:jC,type:e,compare:t===void 0?null:t}};Ne.startTransition=function(e){var t=ru.transition;ru.transition={};try{e()}finally{ru.transition=t}};Ne.unstable_act=cw;Ne.useCallback=function(e,t){return Wt.current.useCallback(e,t)};Ne.useContext=function(e){return Wt.current.useContext(e)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(e){return Wt.current.useDeferredValue(e)};Ne.useEffect=function(e,t){return Wt.current.useEffect(e,t)};Ne.useId=function(){return Wt.current.useId()};Ne.useImperativeHandle=function(e,t,n){return Wt.current.useImperativeHandle(e,t,n)};Ne.useInsertionEffect=function(e,t){return Wt.current.useInsertionEffect(e,t)};Ne.useLayoutEffect=function(e,t){return Wt.current.useLayoutEffect(e,t)};Ne.useMemo=function(e,t){return Wt.current.useMemo(e,t)};Ne.useReducer=function(e,t,n){return Wt.current.useReducer(e,t,n)};Ne.useRef=function(e){return Wt.current.useRef(e)};Ne.useState=function(e){return Wt.current.useState(e)};Ne.useSyncExternalStore=function(e,t,n){return Wt.current.useSyncExternalStore(e,t,n)};Ne.useTransition=function(){return Wt.current.useTransition()};Ne.version="18.3.1";nw.exports=Ne;var v=nw.exports;const q=kc(v),wp=SC({__proto__:null,default:q},[v]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var FC=v,zC=Symbol.for("react.element"),$C=Symbol.for("react.fragment"),BC=Object.prototype.hasOwnProperty,VC=FC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,UC={key:!0,ref:!0,__self:!0,__source:!0};function dw(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)BC.call(t,r)&&!UC.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:zC,type:e,key:s,ref:o,props:i,_owner:VC.current}}Ec.Fragment=$C;Ec.jsx=dw;Ec.jsxs=dw;tw.exports=Ec;var d=tw.exports,fw={exports:{}},xn={},hw={exports:{}},pw={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(M,D){var k=M.length;M.push(D);e:for(;0<k;){var re=k-1>>>1,ne=M[re];if(0<i(ne,D))M[re]=D,M[k]=ne,k=re;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var D=M[0],k=M.pop();if(k!==D){M[0]=k;e:for(var re=0,ne=M.length,N=ne>>>1;re<N;){var le=2*(re+1)-1,Te=M[le],ye=le+1,Y=M[ye];if(0>i(Te,k))ye<ne&&0>i(Y,Te)?(M[re]=Y,M[ye]=k,re=ye):(M[re]=Te,M[le]=k,re=le);else if(ye<ne&&0>i(Y,k))M[re]=Y,M[ye]=k,re=ye;else break e}}return D}function i(M,D){var k=M.sortIndex-D.sortIndex;return k!==0?k:M.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,p=3,h=!1,w=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(M){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=M)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function S(M){if(m=!1,x(M),!w)if(n(l)!==null)w=!0,H(_);else{var D=n(u);D!==null&&V(S,D.startTime-M)}}function _(M,D){w=!1,m&&(m=!1,g(R),R=-1),h=!0;var k=p;try{for(x(D),f=n(l);f!==null&&(!(f.expirationTime>D)||M&&!L());){var re=f.callback;if(typeof re=="function"){f.callback=null,p=f.priorityLevel;var ne=re(f.expirationTime<=D);D=e.unstable_now(),typeof ne=="function"?f.callback=ne:f===n(l)&&r(l),x(D)}else r(l);f=n(l)}if(f!==null)var N=!0;else{var le=n(u);le!==null&&V(S,le.startTime-D),N=!1}return N}finally{f=null,p=k,h=!1}}var E=!1,C=null,R=-1,I=5,P=-1;function L(){return!(e.unstable_now()-P<I)}function A(){if(C!==null){var M=e.unstable_now();P=M;var D=!0;try{D=C(!0,M)}finally{D?U():(E=!1,C=null)}}else E=!1}var U;if(typeof y=="function")U=function(){y(A)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=A,U=function(){W.postMessage(null)}}else U=function(){b(A,0)};function H(M){C=M,E||(E=!0,U())}function V(M,D){R=b(function(){M(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){w||h||(w=!0,H(_))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(M){switch(p){case 1:case 2:case 3:var D=3;break;default:D=p}var k=p;p=D;try{return M()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,D){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var k=p;p=M;try{return D()}finally{p=k}},e.unstable_scheduleCallback=function(M,D,k){var re=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?re+k:re):k=re,M){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=k+ne,M={id:c++,callback:D,priorityLevel:M,startTime:k,expirationTime:ne,sortIndex:-1},k>re?(M.sortIndex=k,t(u,M),n(l)===null&&M===n(u)&&(m?(g(R),R=-1):m=!0,V(S,k-re))):(M.sortIndex=ne,t(l,M),w||h||(w=!0,H(_))),M},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(M){var D=p;return function(){var k=p;p=D;try{return M.apply(this,arguments)}finally{p=k}}}})(pw);hw.exports=pw;var HC=hw.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var WC=v,yn=HC;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var mw=new Set,Aa={};function ks(e,t){vo(e,t),vo(e+"Capture",t)}function vo(e,t){for(Aa[e]=t,e=0;e<t.length;e++)mw.add(t[e])}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Af=Object.prototype.hasOwnProperty,qC=/^[: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]*$/,xg={},wg={};function KC(e){return Af.call(wg,e)?!0:Af.call(xg,e)?!1:qC.test(e)?wg[e]=!0:(xg[e]=!0,!1)}function GC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function QC(e,t,n,r){if(t===null||typeof t>"u"||GC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qt(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nt[e]=new qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nt[t]=new qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nt[e]=new qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nt[e]=new qt(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){Nt[e]=new qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nt[e]=new qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nt[e]=new qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nt[e]=new qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nt[e]=new qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var bp=/[\-:]([a-z])/g;function Sp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(bp,Sp);Nt[t]=new qt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(bp,Sp);Nt[t]=new qt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(bp,Sp);Nt[t]=new qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nt[e]=new qt(e,1,!1,e.toLowerCase(),null,!1,!1)});Nt.xlinkHref=new qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nt[e]=new qt(e,1,!1,e.toLowerCase(),null,!0,!0)});function kp(e,t,n,r){var i=Nt.hasOwnProperty(t)?Nt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(QC(t,n,i,r)&&(n=null),r||i===null?KC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Hr=WC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,kl=Symbol.for("react.element"),Ls=Symbol.for("react.portal"),Ds=Symbol.for("react.fragment"),Ep=Symbol.for("react.strict_mode"),If=Symbol.for("react.profiler"),gw=Symbol.for("react.provider"),yw=Symbol.for("react.context"),Cp=Symbol.for("react.forward_ref"),Of=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),_p=Symbol.for("react.memo"),ri=Symbol.for("react.lazy"),vw=Symbol.for("react.offscreen"),bg=Symbol.iterator;function Ho(e){return e===null||typeof e!="object"?null:(e=bg&&e[bg]||e["@@iterator"],typeof e=="function"?e:null)}var tt=Object.assign,kd;function la(e){if(kd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kd=t&&t[1]||""}return`
`+kd+e}var Ed=!1;function Cd(e,t){if(!e||Ed)return"";Ed=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),s=r.stack.split(`
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ed=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?la(e):""}function ZC(e){switch(e.tag){case 5:return la(e.type);case 16:return la("Lazy");case 13:return la("Suspense");case 19:return la("SuspenseList");case 0:case 2:case 15:return e=Cd(e.type,!1),e;case 11:return e=Cd(e.type.render,!1),e;case 1:return e=Cd(e.type,!0),e;default:return""}}function Lf(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 Ds:return"Fragment";case Ls:return"Portal";case If:return"Profiler";case Ep:return"StrictMode";case Of:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yw:return(e.displayName||"Context")+".Consumer";case gw:return(e._context.displayName||"Context")+".Provider";case Cp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _p:return t=e.displayName||null,t!==null?t:Lf(e.type)||"Memo";case ri:t=e._payload,e=e._init;try{return Lf(e(t))}catch{}}return null}function YC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lf(t);case 8:return t===Ep?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ri(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XC(e){var t=xw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function El(e){e._valueTracker||(e._valueTracker=XC(e))}function ww(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _u(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 Df(e,t){var n=t.checked;return tt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Sg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ri(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bw(e,t){t=t.checked,t!=null&&kp(e,"checked",t,!1)}function Ff(e,t){bw(e,t);var n=Ri(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zf(e,t.type,n):t.hasOwnProperty("defaultValue")&&zf(e,t.type,Ri(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zf(e,t,n){(t!=="number"||_u(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ua=Array.isArray;function Gs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ri(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return tt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Eg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(ua(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ri(n)}}function Sw(e,t){var n=Ri(t.value),r=Ri(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Cg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kw(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 Bf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cl,Ew=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cl=Cl||document.createElement("div"),Cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ma={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},JC=["Webkit","ms","Moz","O"];Object.keys(ma).forEach(function(e){JC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ma[t]=ma[e]})});function Cw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ma.hasOwnProperty(e)&&ma[e]?(""+t).trim():t+"px"}function _w(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Cw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var e_=tt({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 Vf(e,t){if(t){if(e_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Uf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hf=null;function Np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wf=null,Qs=null,Zs=null;function _g(e){if(e=cl(e)){if(typeof Wf!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Pc(t),Wf(e.stateNode,e.type,t))}}function Nw(e){Qs?Zs?Zs.push(e):Zs=[e]:Qs=e}function Tw(){if(Qs){var e=Qs,t=Zs;if(Zs=Qs=null,_g(e),t)for(e=0;e<t.length;e++)_g(t[e])}}function Pw(e,t){return e(t)}function Rw(){}var _d=!1;function jw(e,t,n){if(_d)return e(t,n);_d=!0;try{return Pw(e,t,n)}finally{_d=!1,(Qs!==null||Zs!==null)&&(Rw(),Tw())}}function Oa(e,t){var n=e.stateNode;if(n===null)return null;var r=Pc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(K(231,t,typeof n));return n}var qf=!1;if(Dr)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){qf=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{qf=!1}function t_(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ga=!1,Nu=null,Tu=!1,Kf=null,n_={onError:function(e){ga=!0,Nu=e}};function r_(e,t,n,r,i,s,o,a,l){ga=!1,Nu=null,t_.apply(n_,arguments)}function i_(e,t,n,r,i,s,o,a,l){if(r_.apply(this,arguments),ga){if(ga){var u=Nu;ga=!1,Nu=null}else throw Error(K(198));Tu||(Tu=!0,Kf=u)}}function Es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Aw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ng(e){if(Es(e)!==e)throw Error(K(188))}function s_(e){var t=e.alternate;if(!t){if(t=Es(e),t===null)throw Error(K(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ng(i),e;if(s===r)return Ng(i),t;s=s.sibling}throw Error(K(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function Iw(e){return e=s_(e),e!==null?Ow(e):null}function Ow(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ow(e);if(t!==null)return t;e=e.sibling}return null}var Mw=yn.unstable_scheduleCallback,Tg=yn.unstable_cancelCallback,o_=yn.unstable_shouldYield,a_=yn.unstable_requestPaint,ot=yn.unstable_now,l_=yn.unstable_getCurrentPriorityLevel,Tp=yn.unstable_ImmediatePriority,Lw=yn.unstable_UserBlockingPriority,Pu=yn.unstable_NormalPriority,u_=yn.unstable_LowPriority,Dw=yn.unstable_IdlePriority,Cc=null,mr=null;function c_(e){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(Cc,e,void 0,(e.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:h_,d_=Math.log,f_=Math.LN2;function h_(e){return e>>>=0,e===0?32:31-(d_(e)/f_|0)|0}var _l=64,Nl=4194304;function ca(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 Ru(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=ca(a):(s&=o,s!==0&&(r=ca(s)))}else o=n&~i,o!==0?r=ca(o):s!==0&&(r=ca(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qn(t),i=1<<n,r|=e[n],t&=~i;return r}function p_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function m_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Qn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=p_(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Gf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fw(){var e=_l;return _l<<=1,!(_l&4194240)&&(_l=64),e}function Nd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ll(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qn(t),e[t]=n}function g_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Qn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Pp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var De=0;function zw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $w,Rp,Bw,Vw,Uw,Qf=!1,Tl=[],xi=null,wi=null,bi=null,Ma=new Map,La=new Map,oi=[],y_="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 Pg(e,t){switch(e){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":wi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":Ma.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":La.delete(t.pointerId)}}function qo(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=cl(t),t!==null&&Rp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function v_(e,t,n,r,i){switch(t){case"focusin":return xi=qo(xi,e,t,n,r,i),!0;case"dragenter":return wi=qo(wi,e,t,n,r,i),!0;case"mouseover":return bi=qo(bi,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ma.set(s,qo(Ma.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,La.set(s,qo(La.get(s)||null,e,t,n,r,i)),!0}return!1}function Hw(e){var t=Qi(e.target);if(t!==null){var n=Es(t);if(n!==null){if(t=n.tag,t===13){if(t=Aw(n),t!==null){e.blockedOn=t,Uw(e.priority,function(){Bw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function iu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Hf=r,n.target.dispatchEvent(r),Hf=null}else return t=cl(n),t!==null&&Rp(t),e.blockedOn=n,!1;t.shift()}return!0}function Rg(e,t,n){iu(e)&&n.delete(t)}function x_(){Qf=!1,xi!==null&&iu(xi)&&(xi=null),wi!==null&&iu(wi)&&(wi=null),bi!==null&&iu(bi)&&(bi=null),Ma.forEach(Rg),La.forEach(Rg)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,Qf||(Qf=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,x_)))}function Da(e){function t(i){return Ko(i,e)}if(0<Tl.length){Ko(Tl[0],e);for(var n=1;n<Tl.length;n++){var r=Tl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(xi!==null&&Ko(xi,e),wi!==null&&Ko(wi,e),bi!==null&&Ko(bi,e),Ma.forEach(t),La.forEach(t),n=0;n<oi.length;n++)r=oi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<oi.length&&(n=oi[0],n.blockedOn===null);)Hw(n),n.blockedOn===null&&oi.shift()}var Ys=Hr.ReactCurrentBatchConfig,ju=!0;function w_(e,t,n,r){var i=De,s=Ys.transition;Ys.transition=null;try{De=1,jp(e,t,n,r)}finally{De=i,Ys.transition=s}}function b_(e,t,n,r){var i=De,s=Ys.transition;Ys.transition=null;try{De=4,jp(e,t,n,r)}finally{De=i,Ys.transition=s}}function jp(e,t,n,r){if(ju){var i=Zf(e,t,n,r);if(i===null)Dd(e,t,r,Au,n),Pg(e,r);else if(v_(i,e,t,n,r))r.stopPropagation();else if(Pg(e,r),t&4&&-1<y_.indexOf(e)){for(;i!==null;){var s=cl(i);if(s!==null&&$w(s),s=Zf(e,t,n,r),s===null&&Dd(e,t,r,Au,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}var Au=null;function Zf(e,t,n,r){if(Au=null,e=Np(r),e=Qi(e),e!==null)if(t=Es(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Aw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Au=e,null}function Ww(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(l_()){case Tp:return 1;case Lw:return 4;case Pu:case u_:return 16;case Dw:return 536870912;default:return 16}default:return 16}}var pi=null,Ap=null,su=null;function qw(){if(su)return su;var e,t=Ap,n=t.length,r,i="value"in pi?pi.value:pi.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return su=i.slice(e,1<r?1-r:void 0)}function ou(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pl(){return!0}function jg(){return!1}function wn(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Pl:jg,this.isPropagationStopped=jg,this}return tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var Mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ip=wn(Mo),ul=tt({},Mo,{view:0,detail:0}),S_=wn(ul),Td,Pd,Go,_c=tt({},ul,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Op,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!==Go&&(Go&&e.type==="mousemove"?(Td=e.screenX-Go.screenX,Pd=e.screenY-Go.screenY):Pd=Td=0,Go=e),Td)},movementY:function(e){return"movementY"in e?e.movementY:Pd}}),Ag=wn(_c),k_=tt({},_c,{dataTransfer:0}),E_=wn(k_),C_=tt({},ul,{relatedTarget:0}),Rd=wn(C_),__=tt({},Mo,{animationName:0,elapsedTime:0,pseudoElement:0}),N_=wn(__),T_=tt({},Mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),P_=wn(T_),R_=tt({},Mo,{data:0}),Ig=wn(R_),j_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A_={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"},I_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=I_[e])?!!t[e]:!1}function Op(){return O_}var M_=tt({},ul,{key:function(e){if(e.key){var t=j_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ou(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Op,charCode:function(e){return e.type==="keypress"?ou(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ou(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),L_=wn(M_),D_=tt({},_c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Og=wn(D_),F_=tt({},ul,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),z_=wn(F_),$_=tt({},Mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),B_=wn($_),V_=tt({},_c,{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}),U_=wn(V_),H_=[9,13,27,32],Mp=Dr&&"CompositionEvent"in window,ya=null;Dr&&"documentMode"in document&&(ya=document.documentMode);var W_=Dr&&"TextEvent"in window&&!ya,Kw=Dr&&(!Mp||ya&&8<ya&&11>=ya),Mg=" ",Lg=!1;function Gw(e,t){switch(e){case"keyup":return H_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fs=!1;function q_(e,t){switch(e){case"compositionend":return Qw(t);case"keypress":return t.which!==32?null:(Lg=!0,Mg);case"textInput":return e=t.data,e===Mg&&Lg?null:e;default:return null}}function K_(e,t){if(Fs)return e==="compositionend"||!Mp&&Gw(e,t)?(e=qw(),su=Ap=pi=null,Fs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Kw&&t.locale!=="ko"?null:t.data;default:return null}}var G_={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 Dg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G_[e.type]:t==="textarea"}function Zw(e,t,n,r){Nw(r),t=Iu(t,"onChange"),0<t.length&&(n=new Ip("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var va=null,Fa=null;function Q_(e){a0(e,0)}function Nc(e){var t=Bs(e);if(ww(t))return e}function Z_(e,t){if(e==="change")return t}var Yw=!1;if(Dr){var jd;if(Dr){var Ad="oninput"in document;if(!Ad){var Fg=document.createElement("div");Fg.setAttribute("oninput","return;"),Ad=typeof Fg.oninput=="function"}jd=Ad}else jd=!1;Yw=jd&&(!document.documentMode||9<document.documentMode)}function zg(){va&&(va.detachEvent("onpropertychange",Xw),Fa=va=null)}function Xw(e){if(e.propertyName==="value"&&Nc(Fa)){var t=[];Zw(t,Fa,e,Np(e)),jw(Q_,t)}}function Y_(e,t,n){e==="focusin"?(zg(),va=t,Fa=n,va.attachEvent("onpropertychange",Xw)):e==="focusout"&&zg()}function X_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nc(Fa)}function J_(e,t){if(e==="click")return Nc(t)}function eN(e,t){if(e==="input"||e==="change")return Nc(t)}function tN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yn=typeof Object.is=="function"?Object.is:tN;function za(e,t){if(Yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Af.call(t,i)||!Yn(e[i],t[i]))return!1}return!0}function $g(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bg(e,t){var n=$g(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$g(n)}}function Jw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function e0(){for(var e=window,t=_u();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_u(e.document)}return t}function Lp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function nN(e){var t=e0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Jw(n.ownerDocument.documentElement,n)){if(r!==null&&Lp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Bg(n,s);var o=Bg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rN=Dr&&"documentMode"in document&&11>=document.documentMode,zs=null,Yf=null,xa=null,Xf=!1;function Vg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xf||zs==null||zs!==_u(r)||(r=zs,"selectionStart"in r&&Lp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xa&&za(xa,r)||(xa=r,r=Iu(Yf,"onSelect"),0<r.length&&(t=new Ip("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zs)))}function Rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $s={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionend:Rl("Transition","TransitionEnd")},Id={},t0={};Dr&&(t0=document.createElement("div").style,"AnimationEvent"in window||(delete $s.animationend.animation,delete $s.animationiteration.animation,delete $s.animationstart.animation),"TransitionEvent"in window||delete $s.transitionend.transition);function Tc(e){if(Id[e])return Id[e];if(!$s[e])return e;var t=$s[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in t0)return Id[e]=t[n];return e}var n0=Tc("animationend"),r0=Tc("animationiteration"),i0=Tc("animationstart"),s0=Tc("transitionend"),o0=new Map,Ug="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 Di(e,t){o0.set(e,t),ks(t,[e])}for(var Od=0;Od<Ug.length;Od++){var Md=Ug[Od],iN=Md.toLowerCase(),sN=Md[0].toUpperCase()+Md.slice(1);Di(iN,"on"+sN)}Di(n0,"onAnimationEnd");Di(r0,"onAnimationIteration");Di(i0,"onAnimationStart");Di("dblclick","onDoubleClick");Di("focusin","onFocus");Di("focusout","onBlur");Di(s0,"onTransitionEnd");vo("onMouseEnter",["mouseout","mouseover"]);vo("onMouseLeave",["mouseout","mouseover"]);vo("onPointerEnter",["pointerout","pointerover"]);vo("onPointerLeave",["pointerout","pointerover"]);ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ks("onBeforeInput",["compositionend","keypress","textInput","paste"]);ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var da="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(" "),oN=new Set("cancel close invalid load scroll toggle".split(" ").concat(da));function Hg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,i_(r,t,void 0,e),e.currentTarget=null}function a0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,a,u),s=l}}}if(Tu)throw e=Kf,Tu=!1,Kf=null,e}function Ge(e,t){var n=t[rh];n===void 0&&(n=t[rh]=new Set);var r=e+"__bubble";n.has(r)||(l0(t,e,2,!1),n.add(r))}function Ld(e,t,n){var r=0;t&&(r|=4),l0(n,e,r,t)}var jl="_reactListening"+Math.random().toString(36).slice(2);function $a(e){if(!e[jl]){e[jl]=!0,mw.forEach(function(n){n!=="selectionchange"&&(oN.has(n)||Ld(n,!1,e),Ld(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jl]||(t[jl]=!0,Ld("selectionchange",!1,t))}}function l0(e,t,n,r){switch(Ww(t)){case 1:var i=w_;break;case 4:i=b_;break;default:i=jp}n=i.bind(null,t,n,e),i=void 0,!qf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dd(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Qi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}jw(function(){var u=s,c=Np(n),f=[];e:{var p=o0.get(e);if(p!==void 0){var h=Ip,w=e;switch(e){case"keypress":if(ou(n)===0)break e;case"keydown":case"keyup":h=L_;break;case"focusin":w="focus",h=Rd;break;case"focusout":w="blur",h=Rd;break;case"beforeblur":case"afterblur":h=Rd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=E_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=z_;break;case n0:case r0:case i0:h=N_;break;case s0:h=B_;break;case"scroll":h=S_;break;case"wheel":h=U_;break;case"copy":case"cut":case"paste":h=P_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Og}var m=(t&4)!==0,b=!m&&e==="scroll",g=m?p!==null?p+"Capture":null:p;m=[];for(var y=u,x;y!==null;){x=y;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,g!==null&&(S=Oa(y,g),S!=null&&m.push(Ba(y,S,x)))),b)break;y=y.return}0<m.length&&(p=new h(p,w,null,n,c),f.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Hf&&(w=n.relatedTarget||n.fromElement)&&(Qi(w)||w[Fr]))break e;if((h||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,h?(w=n.relatedTarget||n.toElement,h=u,w=w?Qi(w):null,w!==null&&(b=Es(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(h=null,w=u),h!==w)){if(m=Ag,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=Og,S="onPointerLeave",g="onPointerEnter",y="pointer"),b=h==null?p:Bs(h),x=w==null?p:Bs(w),p=new m(S,y+"leave",h,n,c),p.target=b,p.relatedTarget=x,S=null,Qi(c)===u&&(m=new m(g,y+"enter",w,n,c),m.target=x,m.relatedTarget=b,S=m),b=S,h&&w)t:{for(m=h,g=w,y=0,x=m;x;x=Ns(x))y++;for(x=0,S=g;S;S=Ns(S))x++;for(;0<y-x;)m=Ns(m),y--;for(;0<x-y;)g=Ns(g),x--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=Ns(m),g=Ns(g)}m=null}else m=null;h!==null&&Wg(f,p,h,m,!1),w!==null&&b!==null&&Wg(f,b,w,m,!0)}}e:{if(p=u?Bs(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var _=Z_;else if(Dg(p))if(Yw)_=eN;else{_=X_;var E=Y_}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=J_);if(_&&(_=_(e,u))){Zw(f,_,n,c);break e}E&&E(e,p,u),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&zf(p,"number",p.value)}switch(E=u?Bs(u):window,e){case"focusin":(Dg(E)||E.contentEditable==="true")&&(zs=E,Yf=u,xa=null);break;case"focusout":xa=Yf=zs=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,Vg(f,n,c);break;case"selectionchange":if(rN)break;case"keydown":case"keyup":Vg(f,n,c)}var C;if(Mp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Fs?Gw(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Kw&&n.locale!=="ko"&&(Fs||R!=="onCompositionStart"?R==="onCompositionEnd"&&Fs&&(C=qw()):(pi=c,Ap="value"in pi?pi.value:pi.textContent,Fs=!0)),E=Iu(u,R),0<E.length&&(R=new Ig(R,e,null,n,c),f.push({event:R,listeners:E}),C?R.data=C:(C=Qw(n),C!==null&&(R.data=C)))),(C=W_?q_(e,n):K_(e,n))&&(u=Iu(u,"onBeforeInput"),0<u.length&&(c=new Ig("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=C))}a0(f,t)})}function Ba(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Oa(e,n),s!=null&&r.unshift(Ba(e,s,i)),s=Oa(e,t),s!=null&&r.push(Ba(e,s,i))),e=e.return}return r}function Ns(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Oa(n,s),l!=null&&o.unshift(Ba(n,l,a))):i||(l=Oa(n,s),l!=null&&o.push(Ba(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var aN=/\r\n?/g,lN=/\u0000|\uFFFD/g;function qg(e){return(typeof e=="string"?e:""+e).replace(aN,`
`).replace(lN,"")}function Al(e,t,n){if(t=qg(t),qg(e)!==t&&n)throw Error(K(425))}function Ou(){}var Jf=null,eh=null;function th(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nh=typeof setTimeout=="function"?setTimeout:void 0,uN=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,cN=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(e){return Kg.resolve(null).then(e).catch(dN)}:nh;function dN(e){setTimeout(function(){throw e})}function Fd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Da(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Da(t)}function Si(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Gg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Lo=Math.random().toString(36).slice(2),cr="__reactFiber$"+Lo,Va="__reactProps$"+Lo,Fr="__reactContainer$"+Lo,rh="__reactEvents$"+Lo,fN="__reactListeners$"+Lo,hN="__reactHandles$"+Lo;function Qi(e){var t=e[cr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fr]||n[cr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gg(e);e!==null;){if(n=e[cr])return n;e=Gg(e)}return t}e=n,n=e.parentNode}return null}function cl(e){return e=e[cr]||e[Fr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function Pc(e){return e[Va]||null}var ih=[],Vs=-1;function Fi(e){return{current:e}}function Qe(e){0>Vs||(e.current=ih[Vs],ih[Vs]=null,Vs--)}function He(e,t){Vs++,ih[Vs]=e.current,e.current=t}var ji={},Ot=Fi(ji),en=Fi(!1),cs=ji;function xo(e,t){var n=e.type.contextTypes;if(!n)return ji;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function tn(e){return e=e.childContextTypes,e!=null}function Mu(){Qe(en),Qe(Ot)}function Qg(e,t,n){if(Ot.current!==ji)throw Error(K(168));He(Ot,t),He(en,n)}function u0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(K(108,YC(e)||"Unknown",i));return tt({},n,r)}function Lu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ji,cs=Ot.current,He(Ot,e),He(en,en.current),!0}function Zg(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=u0(e,t,cs),r.__reactInternalMemoizedMergedChildContext=e,Qe(en),Qe(Ot),He(Ot,e)):Qe(en),He(en,n)}var Rr=null,Rc=!1,zd=!1;function c0(e){Rr===null?Rr=[e]:Rr.push(e)}function pN(e){Rc=!0,c0(e)}function zi(){if(!zd&&Rr!==null){zd=!0;var e=0,t=De;try{var n=Rr;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Rr=null,Rc=!1}catch(i){throw Rr!==null&&(Rr=Rr.slice(e+1)),Mw(Tp,zi),i}finally{De=t,zd=!1}}return null}var Us=[],Hs=0,Du=null,Fu=0,_n=[],Nn=0,ds=null,Ar=1,Ir="";function Hi(e,t){Us[Hs++]=Fu,Us[Hs++]=Du,Du=e,Fu=t}function d0(e,t,n){_n[Nn++]=Ar,_n[Nn++]=Ir,_n[Nn++]=ds,ds=e;var r=Ar;e=Ir;var i=32-Qn(r)-1;r&=~(1<<i),n+=1;var s=32-Qn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ar=1<<32-Qn(t)+i|n<<i|r,Ir=s+e}else Ar=1<<s|n<<i|r,Ir=e}function Dp(e){e.return!==null&&(Hi(e,1),d0(e,1,0))}function Fp(e){for(;e===Du;)Du=Us[--Hs],Us[Hs]=null,Fu=Us[--Hs],Us[Hs]=null;for(;e===ds;)ds=_n[--Nn],_n[Nn]=null,Ir=_n[--Nn],_n[Nn]=null,Ar=_n[--Nn],_n[Nn]=null}var mn=null,hn=null,Ye=!1,qn=null;function f0(e,t){var n=Pn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mn=e,hn=Si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ds!==null?{id:Ar,overflow:Ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Pn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,mn=e,hn=null,!0):!1;default:return!1}}function sh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oh(e){if(Ye){var t=hn;if(t){var n=t;if(!Yg(e,t)){if(sh(e))throw Error(K(418));t=Si(n.nextSibling);var r=mn;t&&Yg(e,t)?f0(r,n):(e.flags=e.flags&-4097|2,Ye=!1,mn=e)}}else{if(sh(e))throw Error(K(418));e.flags=e.flags&-4097|2,Ye=!1,mn=e}}}function Xg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function Il(e){if(e!==mn)return!1;if(!Ye)return Xg(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!th(e.type,e.memoizedProps)),t&&(t=hn)){if(sh(e))throw h0(),Error(K(418));for(;t;)f0(e,t),t=Si(t.nextSibling)}if(Xg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){hn=Si(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}hn=null}}else hn=mn?Si(e.stateNode.nextSibling):null;return!0}function h0(){for(var e=hn;e;)e=Si(e.nextSibling)}function wo(){hn=mn=null,Ye=!1}function zp(e){qn===null?qn=[e]:qn.push(e)}var mN=Hr.ReactCurrentBatchConfig;function Qo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(K(309));var r=n.stateNode}if(!r)throw Error(K(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function Ol(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jg(e){var t=e._init;return t(e._payload)}function p0(e){function t(g,y){if(e){var x=g.deletions;x===null?(g.deletions=[y],g.flags|=16):x.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=_i(g,y),g.index=0,g.sibling=null,g}function s(g,y,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<y?(g.flags|=2,y):x):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,y,x,S){return y===null||y.tag!==6?(y=qd(x,g.mode,S),y.return=g,y):(y=i(y,x),y.return=g,y)}function l(g,y,x,S){var _=x.type;return _===Ds?c(g,y,x.props.children,S,x.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ri&&Jg(_)===y.type)?(S=i(y,x.props),S.ref=Qo(g,y,x),S.return=g,S):(S=hu(x.type,x.key,x.props,null,g.mode,S),S.ref=Qo(g,y,x),S.return=g,S)}function u(g,y,x,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Kd(x,g.mode,S),y.return=g,y):(y=i(y,x.children||[]),y.return=g,y)}function c(g,y,x,S,_){return y===null||y.tag!==7?(y=us(x,g.mode,S,_),y.return=g,y):(y=i(y,x),y.return=g,y)}function f(g,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=qd(""+y,g.mode,x),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case kl:return x=hu(y.type,y.key,y.props,null,g.mode,x),x.ref=Qo(g,null,y),x.return=g,x;case Ls:return y=Kd(y,g.mode,x),y.return=g,y;case ri:var S=y._init;return f(g,S(y._payload),x)}if(ua(y)||Ho(y))return y=us(y,g.mode,x,null),y.return=g,y;Ol(g,y)}return null}function p(g,y,x,S){var _=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:a(g,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case kl:return x.key===_?l(g,y,x,S):null;case Ls:return x.key===_?u(g,y,x,S):null;case ri:return _=x._init,p(g,y,_(x._payload),S)}if(ua(x)||Ho(x))return _!==null?null:c(g,y,x,S,null);Ol(g,x)}return null}function h(g,y,x,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(x)||null,a(y,g,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case kl:return g=g.get(S.key===null?x:S.key)||null,l(y,g,S,_);case Ls:return g=g.get(S.key===null?x:S.key)||null,u(y,g,S,_);case ri:var E=S._init;return h(g,y,x,E(S._payload),_)}if(ua(S)||Ho(S))return g=g.get(x)||null,c(y,g,S,_,null);Ol(y,S)}return null}function w(g,y,x,S){for(var _=null,E=null,C=y,R=y=0,I=null;C!==null&&R<x.length;R++){C.index>R?(I=C,C=null):I=C.sibling;var P=p(g,C,x[R],S);if(P===null){C===null&&(C=I);break}e&&C&&P.alternate===null&&t(g,C),y=s(P,y,R),E===null?_=P:E.sibling=P,E=P,C=I}if(R===x.length)return n(g,C),Ye&&Hi(g,R),_;if(C===null){for(;R<x.length;R++)C=f(g,x[R],S),C!==null&&(y=s(C,y,R),E===null?_=C:E.sibling=C,E=C);return Ye&&Hi(g,R),_}for(C=r(g,C);R<x.length;R++)I=h(C,g,R,x[R],S),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?R:I.key),y=s(I,y,R),E===null?_=I:E.sibling=I,E=I);return e&&C.forEach(function(L){return t(g,L)}),Ye&&Hi(g,R),_}function m(g,y,x,S){var _=Ho(x);if(typeof _!="function")throw Error(K(150));if(x=_.call(x),x==null)throw Error(K(151));for(var E=_=null,C=y,R=y=0,I=null,P=x.next();C!==null&&!P.done;R++,P=x.next()){C.index>R?(I=C,C=null):I=C.sibling;var L=p(g,C,P.value,S);if(L===null){C===null&&(C=I);break}e&&C&&L.alternate===null&&t(g,C),y=s(L,y,R),E===null?_=L:E.sibling=L,E=L,C=I}if(P.done)return n(g,C),Ye&&Hi(g,R),_;if(C===null){for(;!P.done;R++,P=x.next())P=f(g,P.value,S),P!==null&&(y=s(P,y,R),E===null?_=P:E.sibling=P,E=P);return Ye&&Hi(g,R),_}for(C=r(g,C);!P.done;R++,P=x.next())P=h(C,g,R,P.value,S),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?R:P.key),y=s(P,y,R),E===null?_=P:E.sibling=P,E=P);return e&&C.forEach(function(A){return t(g,A)}),Ye&&Hi(g,R),_}function b(g,y,x,S){if(typeof x=="object"&&x!==null&&x.type===Ds&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case kl:e:{for(var _=x.key,E=y;E!==null;){if(E.key===_){if(_=x.type,_===Ds){if(E.tag===7){n(g,E.sibling),y=i(E,x.props.children),y.return=g,g=y;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ri&&Jg(_)===E.type){n(g,E.sibling),y=i(E,x.props),y.ref=Qo(g,E,x),y.return=g,g=y;break e}n(g,E);break}else t(g,E);E=E.sibling}x.type===Ds?(y=us(x.props.children,g.mode,S,x.key),y.return=g,g=y):(S=hu(x.type,x.key,x.props,null,g.mode,S),S.ref=Qo(g,y,x),S.return=g,g=S)}return o(g);case Ls:e:{for(E=x.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(g,y.sibling),y=i(y,x.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Kd(x,g.mode,S),y.return=g,g=y}return o(g);case ri:return E=x._init,b(g,y,E(x._payload),S)}if(ua(x))return w(g,y,x,S);if(Ho(x))return m(g,y,x,S);Ol(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,x),y.return=g,g=y):(n(g,y),y=qd(x,g.mode,S),y.return=g,g=y),o(g)):n(g,y)}return b}var bo=p0(!0),m0=p0(!1),zu=Fi(null),$u=null,Ws=null,$p=null;function Bp(){$p=Ws=$u=null}function Vp(e){var t=zu.current;Qe(zu),e._currentValue=t}function ah(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Xs(e,t){$u=e,$p=Ws=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function jn(e){var t=e._currentValue;if($p!==e)if(e={context:e,memoizedValue:t,next:null},Ws===null){if($u===null)throw Error(K(308));Ws=e,$u.dependencies={lanes:0,firstContext:e}}else Ws=Ws.next=e;return t}var Zi=null;function Up(e){Zi===null?Zi=[e]:Zi.push(e)}function g0(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Up(t)):(n.next=i.next,i.next=n),t.interleaved=n,zr(e,r)}function zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ii=!1;function Hp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ki(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,je&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,zr(e,n)}return i=r.interleaved,i===null?(t.next=t,Up(r)):(t.next=i.next,i.next=t),r.interleaved=t,zr(e,n)}function au(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pp(e,n)}}function ey(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bu(e,t,n,r){var i=e.updateQueue;ii=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,c=u=l=null,a=s;do{var p=a.lane,h=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,m=a;switch(p=t,h=n,m.tag){case 1:if(w=m.payload,typeof w=="function"){f=w.call(h,f,p);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=m.payload,p=typeof w=="function"?w.call(h,f,p):w,p==null)break e;f=tt({},f,p);break e;case 2:ii=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);hs|=o,e.lanes=o,e.memoizedState=f}}function ty(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(K(191,i));i.call(r)}}}var dl={},gr=Fi(dl),Ua=Fi(dl),Ha=Fi(dl);function Yi(e){if(e===dl)throw Error(K(174));return e}function Wp(e,t){switch(He(Ha,t),He(Ua,e),He(gr,dl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bf(t,e)}Qe(gr),He(gr,t)}function So(){Qe(gr),Qe(Ua),Qe(Ha)}function v0(e){Yi(Ha.current);var t=Yi(gr.current),n=Bf(t,e.type);t!==n&&(He(Ua,e),He(gr,n))}function qp(e){Ua.current===e&&(Qe(gr),Qe(Ua))}var Je=Fi(0);function Vu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $d=[];function Kp(){for(var e=0;e<$d.length;e++)$d[e]._workInProgressVersionPrimary=null;$d.length=0}var lu=Hr.ReactCurrentDispatcher,Bd=Hr.ReactCurrentBatchConfig,fs=0,et=null,gt=null,xt=null,Uu=!1,wa=!1,Wa=0,gN=0;function Rt(){throw Error(K(321))}function Gp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yn(e[n],t[n]))return!1;return!0}function Qp(e,t,n,r,i,s){if(fs=s,et=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lu.current=e===null||e.memoizedState===null?wN:bN,e=n(r,i),wa){s=0;do{if(wa=!1,Wa=0,25<=s)throw Error(K(301));s+=1,xt=gt=null,t.updateQueue=null,lu.current=SN,e=n(r,i)}while(wa)}if(lu.current=Hu,t=gt!==null&>.next!==null,fs=0,xt=gt=et=null,Uu=!1,t)throw Error(K(300));return e}function Zp(){var e=Wa!==0;return Wa=0,e}function ir(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?et.memoizedState=xt=e:xt=xt.next=e,xt}function An(){if(gt===null){var e=et.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=xt===null?et.memoizedState:xt.next;if(t!==null)xt=t,gt=e;else{if(e===null)throw Error(K(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},xt===null?et.memoizedState=xt=e:xt=xt.next=e}return xt}function qa(e,t){return typeof t=="function"?t(e):t}function Vd(e){var t=An(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=gt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((fs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,et.lanes|=c,hs|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Yn(r,t.memoizedState)||(Jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,et.lanes|=s,hs|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ud(e){var t=An(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Yn(s,t.memoizedState)||(Jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function x0(){}function w0(e,t){var n=et,r=An(),i=t(),s=!Yn(r.memoizedState,i);if(s&&(r.memoizedState=i,Jt=!0),r=r.queue,Yp(k0.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||xt!==null&&xt.memoizedState.tag&1){if(n.flags|=2048,Ka(9,S0.bind(null,n,r,i,t),void 0,null),wt===null)throw Error(K(349));fs&30||b0(n,t,i)}return i}function b0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function S0(e,t,n,r){t.value=n,t.getSnapshot=r,E0(t)&&C0(e)}function k0(e,t,n){return n(function(){E0(t)&&C0(e)})}function E0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yn(e,n)}catch{return!0}}function C0(e){var t=zr(e,1);t!==null&&Zn(t,e,1,-1)}function ny(e){var t=ir();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:e},t.queue=e,e=e.dispatch=xN.bind(null,et,e),[t.memoizedState,e]}function Ka(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _0(){return An().memoizedState}function uu(e,t,n,r){var i=ir();et.flags|=e,i.memoizedState=Ka(1|t,n,void 0,r===void 0?null:r)}function jc(e,t,n,r){var i=An();r=r===void 0?null:r;var s=void 0;if(gt!==null){var o=gt.memoizedState;if(s=o.destroy,r!==null&&Gp(r,o.deps)){i.memoizedState=Ka(t,n,s,r);return}}et.flags|=e,i.memoizedState=Ka(1|t,n,s,r)}function ry(e,t){return uu(8390656,8,e,t)}function Yp(e,t){return jc(2048,8,e,t)}function N0(e,t){return jc(4,2,e,t)}function T0(e,t){return jc(4,4,e,t)}function P0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function R0(e,t,n){return n=n!=null?n.concat([e]):null,jc(4,4,P0.bind(null,t,e),n)}function Xp(){}function j0(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function A0(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function I0(e,t,n){return fs&21?(Yn(n,t)||(n=Fw(),et.lanes|=n,hs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=n)}function yN(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=Bd.transition;Bd.transition={};try{e(!1),t()}finally{De=n,Bd.transition=r}}function O0(){return An().memoizedState}function vN(e,t,n){var r=Ci(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},M0(e))L0(t,n);else if(n=g0(e,t,n,r),n!==null){var i=Ht();Zn(n,e,r,i),D0(n,t,r)}}function xN(e,t,n){var r=Ci(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(M0(e))L0(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Yn(a,o)){var l=t.interleaved;l===null?(i.next=i,Up(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=g0(e,t,i,r),n!==null&&(i=Ht(),Zn(n,e,r,i),D0(n,t,r))}}function M0(e){var t=e.alternate;return e===et||t!==null&&t===et}function L0(e,t){wa=Uu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function D0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pp(e,n)}}var Hu={readContext:jn,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},wN={readContext:jn,useCallback:function(e,t){return ir().memoizedState=[e,t===void 0?null:t],e},useContext:jn,useEffect:ry,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,uu(4194308,4,P0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return uu(4194308,4,e,t)},useInsertionEffect:function(e,t){return uu(4,2,e,t)},useMemo:function(e,t){var n=ir();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ir();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vN.bind(null,et,e),[r.memoizedState,e]},useRef:function(e){var t=ir();return e={current:e},t.memoizedState=e},useState:ny,useDebugValue:Xp,useDeferredValue:function(e){return ir().memoizedState=e},useTransition:function(){var e=ny(!1),t=e[0];return e=yN.bind(null,e[1]),ir().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=et,i=ir();if(Ye){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),wt===null)throw Error(K(349));fs&30||b0(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,ry(k0.bind(null,r,s,e),[e]),r.flags|=2048,Ka(9,S0.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ir(),t=wt.identifierPrefix;if(Ye){var n=Ir,r=Ar;n=(r&~(1<<32-Qn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=gN++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bN={readContext:jn,useCallback:j0,useContext:jn,useEffect:Yp,useImperativeHandle:R0,useInsertionEffect:N0,useLayoutEffect:T0,useMemo:A0,useReducer:Vd,useRef:_0,useState:function(){return Vd(qa)},useDebugValue:Xp,useDeferredValue:function(e){var t=An();return I0(t,gt.memoizedState,e)},useTransition:function(){var e=Vd(qa)[0],t=An().memoizedState;return[e,t]},useMutableSource:x0,useSyncExternalStore:w0,useId:O0,unstable_isNewReconciler:!1},SN={readContext:jn,useCallback:j0,useContext:jn,useEffect:Yp,useImperativeHandle:R0,useInsertionEffect:N0,useLayoutEffect:T0,useMemo:A0,useReducer:Ud,useRef:_0,useState:function(){return Ud(qa)},useDebugValue:Xp,useDeferredValue:function(e){var t=An();return gt===null?t.memoizedState=e:I0(t,gt.memoizedState,e)},useTransition:function(){var e=Ud(qa)[0],t=An().memoizedState;return[e,t]},useMutableSource:x0,useSyncExternalStore:w0,useId:O0,unstable_isNewReconciler:!1};function Bn(e,t){if(e&&e.defaultProps){t=tt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function lh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:tt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ac={isMounted:function(e){return(e=e._reactInternals)?Es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ht(),i=Ci(e),s=Mr(r,i);s.payload=t,n!=null&&(s.callback=n),t=ki(e,s,i),t!==null&&(Zn(t,e,i,r),au(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ht(),i=Ci(e),s=Mr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=ki(e,s,i),t!==null&&(Zn(t,e,i,r),au(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ht(),r=Ci(e),i=Mr(n,r);i.tag=2,t!=null&&(i.callback=t),t=ki(e,i,r),t!==null&&(Zn(t,e,r,n),au(t,e,r))}};function iy(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!za(n,r)||!za(i,s):!0}function F0(e,t,n){var r=!1,i=ji,s=t.contextType;return typeof s=="object"&&s!==null?s=jn(s):(i=tn(t)?cs:Ot.current,r=t.contextTypes,s=(r=r!=null)?xo(e,i):ji),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ac,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function sy(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ac.enqueueReplaceState(t,t.state,null)}function uh(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Hp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=jn(s):(s=tn(t)?cs:Ot.current,i.context=xo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(lh(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ac.enqueueReplaceState(i,i.state,null),Bu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ko(e,t){try{var n="",r=t;do n+=ZC(r),r=r.return;while(r);var i=n}catch(s){i=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Hd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ch(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var kN=typeof WeakMap=="function"?WeakMap:Map;function z0(e,t,n){n=Mr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,wh=r),ch(e,t)},n}function $0(e,t,n){n=Mr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ch(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ch(e,t),typeof r!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function oy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new kN;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=DN.bind(null,e,t,n),t.then(e,e))}function ay(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ly(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Mr(-1,1),t.tag=2,ki(n,t,1))),n.lanes|=1),e)}var EN=Hr.ReactCurrentOwner,Jt=!1;function Ft(e,t,n,r){t.child=e===null?m0(t,null,n,r):bo(t,e.child,n,r)}function uy(e,t,n,r,i){n=n.render;var s=t.ref;return Xs(t,i),r=Qp(e,t,n,r,s,i),n=Zp(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$r(e,t,i)):(Ye&&n&&Dp(t),t.flags|=1,Ft(e,t,r,i),t.child)}function cy(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!om(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,B0(e,t,s,r,i)):(e=hu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:za,n(o,r)&&e.ref===t.ref)return $r(e,t,i)}return t.flags|=1,e=_i(s,r),e.ref=t.ref,e.return=t,t.child=e}function B0(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(za(s,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,$r(e,t,i)}return dh(e,t,n,r,i)}function V0(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},He(Ks,cn),cn|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,He(Ks,cn),cn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,He(Ks,cn),cn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,He(Ks,cn),cn|=r;return Ft(e,t,i,n),t.child}function U0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dh(e,t,n,r,i){var s=tn(n)?cs:Ot.current;return s=xo(t,s),Xs(t,i),n=Qp(e,t,n,r,s,i),r=Zp(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$r(e,t,i)):(Ye&&r&&Dp(t),t.flags|=1,Ft(e,t,n,i),t.child)}function dy(e,t,n,r,i){if(tn(n)){var s=!0;Lu(t)}else s=!1;if(Xs(t,i),t.stateNode===null)cu(e,t),F0(t,n,r),uh(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=jn(u):(u=tn(n)?cs:Ot.current,u=xo(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&sy(t,o,r,u),ii=!1;var p=t.memoizedState;o.state=p,Bu(t,r,o,i),l=t.memoizedState,a!==r||p!==l||en.current||ii?(typeof c=="function"&&(lh(t,n,c,r),l=t.memoizedState),(a=ii||iy(t,n,a,r,p,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,y0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Bn(t.type,a),o.props=u,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=jn(l):(l=tn(n)?cs:Ot.current,l=xo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&sy(t,o,r,l),ii=!1,p=t.memoizedState,o.state=p,Bu(t,r,o,i);var w=t.memoizedState;a!==f||p!==w||en.current||ii?(typeof h=="function"&&(lh(t,n,h,r),w=t.memoizedState),(u=ii||iy(t,n,u,r,p,w,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return fh(e,t,n,r,s,i)}function fh(e,t,n,r,i,s){U0(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Zg(t,n,!1),$r(e,t,s);r=t.stateNode,EN.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=bo(t,e.child,null,s),t.child=bo(t,null,a,s)):Ft(e,t,a,s),t.memoizedState=r.state,i&&Zg(t,n,!0),t.child}function H0(e){var t=e.stateNode;t.pendingContext?Qg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qg(e,t.context,!1),Wp(e,t.containerInfo)}function fy(e,t,n,r,i){return wo(),zp(i),t.flags|=256,Ft(e,t,n,r),t.child}var hh={dehydrated:null,treeContext:null,retryLane:0};function ph(e){return{baseLanes:e,cachePool:null,transitions:null}}function W0(e,t,n){var r=t.pendingProps,i=Je.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),He(Je,i&1),e===null)return oh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Mc(o,r,0,null),e=us(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ph(n),t.memoizedState=hh,e):Jp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return CN(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=_i(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=_i(a,s):(s=us(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?ph(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=hh,r}return s=e.child,e=s.sibling,r=_i(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Jp(e,t){return t=Mc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ml(e,t,n,r){return r!==null&&zp(r),bo(t,e.child,null,n),e=Jp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function CN(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Hd(Error(K(422))),Ml(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Mc({mode:"visible",children:r.children},i,0,null),s=us(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&bo(t,e.child,null,o),t.child.memoizedState=ph(o),t.memoizedState=hh,s);if(!(t.mode&1))return Ml(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(K(419)),r=Hd(s,r,void 0),Ml(e,t,o,r)}if(a=(o&e.childLanes)!==0,Jt||a){if(r=wt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,zr(e,i),Zn(r,e,i,-1))}return sm(),r=Hd(Error(K(421))),Ml(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=FN.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,hn=Si(i.nextSibling),mn=t,Ye=!0,qn=null,e!==null&&(_n[Nn++]=Ar,_n[Nn++]=Ir,_n[Nn++]=ds,Ar=e.id,Ir=e.overflow,ds=t),t=Jp(t,r.children),t.flags|=4096,t)}function hy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ah(e.return,t,n)}function Wd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function q0(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ft(e,t,r.children,n),r=Je.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hy(e,n,t);else if(e.tag===19)hy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(He(Je,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Vu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Wd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Vu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Wd(t,!0,n,null,s);break;case"together":Wd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $r(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _N(e,t,n){switch(t.tag){case 3:H0(t),wo();break;case 5:v0(t);break;case 1:tn(t.type)&&Lu(t);break;case 4:Wp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;He(zu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(He(Je,Je.current&1),t.flags|=128,null):n&t.child.childLanes?W0(e,t,n):(He(Je,Je.current&1),e=$r(e,t,n),e!==null?e.sibling:null);He(Je,Je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return q0(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),He(Je,Je.current),r)break;return null;case 22:case 23:return t.lanes=0,V0(e,t,n)}return $r(e,t,n)}var K0,mh,G0,Q0;K0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};mh=function(){};G0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yi(gr.current);var s=null;switch(n){case"input":i=Df(e,i),r=Df(e,r),s=[];break;case"select":i=tt({},i,{value:void 0}),r=tt({},r,{value:void 0}),s=[];break;case"textarea":i=$f(e,i),r=$f(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ou)}Vf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Aa.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Aa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ge("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Q0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zo(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function NN(e,t,n){var r=t.pendingProps;switch(Fp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(t),null;case 1:return tn(t.type)&&Mu(),jt(t),null;case 3:return r=t.stateNode,So(),Qe(en),Qe(Ot),Kp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Il(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qn!==null&&(kh(qn),qn=null))),mh(e,t),jt(t),null;case 5:qp(t);var i=Yi(Ha.current);if(n=t.type,e!==null&&t.stateNode!=null)G0(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return jt(t),null}if(e=Yi(gr.current),Il(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[cr]=t,r[Va]=s,e=(t.mode&1)!==0,n){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(i=0;i<da.length;i++)Ge(da[i],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":Sg(r,s),Ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ge("invalid",r);break;case"textarea":Eg(r,s),Ge("invalid",r)}Vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Al(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Al(r.textContent,a,e),i=["children",""+a]):Aa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ge("scroll",r)}switch(n){case"input":El(r),kg(r,s,!0);break;case"textarea":El(r),Cg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ou)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[cr]=t,e[Va]=r,K0(e,t,!1,!1),t.stateNode=e;e:{switch(o=Uf(n,r),n){case"dialog":Ge("cancel",e),Ge("close",e),i=r;break;case"iframe":case"object":case"embed":Ge("load",e),i=r;break;case"video":case"audio":for(i=0;i<da.length;i++)Ge(da[i],e);i=r;break;case"source":Ge("error",e),i=r;break;case"img":case"image":case"link":Ge("error",e),Ge("load",e),i=r;break;case"details":Ge("toggle",e),i=r;break;case"input":Sg(e,r),i=Df(e,r),Ge("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=tt({},r,{value:void 0}),Ge("invalid",e);break;case"textarea":Eg(e,r),i=$f(e,r),Ge("invalid",e);break;default:i=r}Vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?_w(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ew(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ia(e,l):typeof l=="number"&&Ia(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Aa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ge("scroll",e):l!=null&&kp(e,s,l,o))}switch(n){case"input":El(e),kg(e,r,!1);break;case"textarea":El(e),Cg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ri(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Gs(e,!!r.multiple,s,!1):r.defaultValue!=null&&Gs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ou)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return jt(t),null;case 6:if(e&&t.stateNode!=null)Q0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=Yi(Ha.current),Yi(gr.current),Il(t)){if(r=t.stateNode,n=t.memoizedProps,r[cr]=t,(s=r.nodeValue!==n)&&(e=mn,e!==null))switch(e.tag){case 3:Al(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Al(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cr]=t,t.stateNode=r}return jt(t),null;case 13:if(Qe(Je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&hn!==null&&t.mode&1&&!(t.flags&128))h0(),wo(),t.flags|=98560,s=!1;else if(s=Il(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(K(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(K(317));s[cr]=t}else wo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jt(t),s=!1}else qn!==null&&(kh(qn),qn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Je.current&1?yt===0&&(yt=3):sm())),t.updateQueue!==null&&(t.flags|=4),jt(t),null);case 4:return So(),mh(e,t),e===null&&$a(t.stateNode.containerInfo),jt(t),null;case 10:return Vp(t.type._context),jt(t),null;case 17:return tn(t.type)&&Mu(),jt(t),null;case 19:if(Qe(Je),s=t.memoizedState,s===null)return jt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Zo(s,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Vu(e),o!==null){for(t.flags|=128,Zo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return He(Je,Je.current&1|2),t.child}e=e.sibling}s.tail!==null&&ot()>Eo&&(t.flags|=128,r=!0,Zo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Vu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ye)return jt(t),null}else 2*ot()-s.renderingStartTime>Eo&&n!==1073741824&&(t.flags|=128,r=!0,Zo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ot(),t.sibling=null,n=Je.current,He(Je,r?n&1|2:n&1),t):(jt(t),null);case 22:case 23:return im(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?cn&1073741824&&(jt(t),t.subtreeFlags&6&&(t.flags|=8192)):jt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function TN(e,t){switch(Fp(t),t.tag){case 1:return tn(t.type)&&Mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return So(),Qe(en),Qe(Ot),Kp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qp(t),null;case 13:if(Qe(Je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qe(Je),null;case 4:return So(),null;case 10:return Vp(t.type._context),null;case 22:case 23:return im(),null;case 24:return null;default:return null}}var Ll=!1,It=!1,PN=typeof WeakSet=="function"?WeakSet:Set,ie=null;function qs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){st(e,t,r)}else n.current=null}function gh(e,t,n){try{n()}catch(r){st(e,t,r)}}var py=!1;function RN(e,t){if(Jf=ju,e=e0(),Lp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===i&&(a=o),p===s&&++c===r&&(l=o),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(eh={focusedElem:e,selectionRange:n},ju=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,b=w.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Bn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){st(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return w=py,py=!1,w}function ba(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&gh(t,n,s)}i=i.next}while(i!==r)}}function Ic(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Z0(e){var t=e.alternate;t!==null&&(e.alternate=null,Z0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cr],delete t[Va],delete t[rh],delete t[fN],delete t[hN])),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 Y0(e){return e.tag===5||e.tag===3||e.tag===4}function my(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y0(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 vh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ou));else if(r!==4&&(e=e.child,e!==null))for(vh(e,t,n),e=e.sibling;e!==null;)vh(e,t,n),e=e.sibling}function xh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xh(e,t,n),e=e.sibling;e!==null;)xh(e,t,n),e=e.sibling}var Et=null,Wn=!1;function Zr(e,t,n){for(n=n.child;n!==null;)X0(e,t,n),n=n.sibling}function X0(e,t,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(Cc,n)}catch{}switch(n.tag){case 5:It||qs(n,t);case 6:var r=Et,i=Wn;Et=null,Zr(e,t,n),Et=r,Wn=i,Et!==null&&(Wn?(e=Et,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Et.removeChild(n.stateNode));break;case 18:Et!==null&&(Wn?(e=Et,n=n.stateNode,e.nodeType===8?Fd(e.parentNode,n):e.nodeType===1&&Fd(e,n),Da(e)):Fd(Et,n.stateNode));break;case 4:r=Et,i=Wn,Et=n.stateNode.containerInfo,Wn=!0,Zr(e,t,n),Et=r,Wn=i;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&gh(n,t,o),i=i.next}while(i!==r)}Zr(e,t,n);break;case 1:if(!It&&(qs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){st(n,t,a)}Zr(e,t,n);break;case 21:Zr(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Zr(e,t,n),It=r):Zr(e,t,n);break;default:Zr(e,t,n)}}function gy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new PN),t.forEach(function(r){var i=zN.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Et=a.stateNode,Wn=!1;break e;case 3:Et=a.stateNode.containerInfo,Wn=!0;break e;case 4:Et=a.stateNode.containerInfo,Wn=!0;break e}a=a.return}if(Et===null)throw Error(K(160));X0(s,o,i),Et=null,Wn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){st(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)J0(t,e),t=t.sibling}function J0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fn(t,e),rr(e),r&4){try{ba(3,e,e.return),Ic(3,e)}catch(m){st(e,e.return,m)}try{ba(5,e,e.return)}catch(m){st(e,e.return,m)}}break;case 1:Fn(t,e),rr(e),r&512&&n!==null&&qs(n,n.return);break;case 5:if(Fn(t,e),rr(e),r&512&&n!==null&&qs(n,n.return),e.flags&32){var i=e.stateNode;try{Ia(i,"")}catch(m){st(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&bw(i,s),Uf(a,o);var u=Uf(a,s);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?_w(i,f):c==="dangerouslySetInnerHTML"?Ew(i,f):c==="children"?Ia(i,f):kp(i,c,f,u)}switch(a){case"input":Ff(i,s);break;case"textarea":Sw(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Gs(i,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?Gs(i,!!s.multiple,s.defaultValue,!0):Gs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Va]=s}catch(m){st(e,e.return,m)}}break;case 6:if(Fn(t,e),rr(e),r&4){if(e.stateNode===null)throw Error(K(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){st(e,e.return,m)}}break;case 3:if(Fn(t,e),rr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Da(t.containerInfo)}catch(m){st(e,e.return,m)}break;case 4:Fn(t,e),rr(e);break;case 13:Fn(t,e),rr(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(nm=ot())),r&4&&gy(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(It=(u=It)||c,Fn(t,e),It=u):Fn(t,e),rr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ie=e,c=e.child;c!==null;){for(f=ie=c;ie!==null;){switch(p=ie,h=p.child,p.tag){case 0:case 11:case 14:case 15:ba(4,p,p.return);break;case 1:qs(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){st(r,n,m)}}break;case 5:qs(p,p.return);break;case 22:if(p.memoizedState!==null){vy(f);continue}}h!==null?(h.return=p,ie=h):vy(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Cw("display",o))}catch(m){st(e,e.return,m)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){st(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Fn(t,e),rr(e),r&4&&gy(e);break;case 21:break;default:Fn(t,e),rr(e)}}function rr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Y0(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ia(i,""),r.flags&=-33);var s=my(e);xh(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=my(e);vh(e,a,o);break;default:throw Error(K(161))}}catch(l){st(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jN(e,t,n){ie=e,e1(e)}function e1(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var i=ie,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ll;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||It;a=Ll;var u=It;if(Ll=o,(It=l)&&!u)for(ie=i;ie!==null;)o=ie,l=o.child,o.tag===22&&o.memoizedState!==null?xy(i):l!==null?(l.return=o,ie=l):xy(i);for(;s!==null;)ie=s,e1(s),s=s.sibling;ie=i,Ll=a,It=u}yy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ie=s):yy(e)}}function yy(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:It||Ic(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Bn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ty(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ty(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Da(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}It||t.flags&512&&yh(t)}catch(p){st(t,t.return,p)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function vy(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function xy(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ic(4,t)}catch(l){st(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){st(t,i,l)}}var s=t.return;try{yh(t)}catch(l){st(t,s,l)}break;case 5:var o=t.return;try{yh(t)}catch(l){st(t,o,l)}}}catch(l){st(t,t.return,l)}if(t===e){ie=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ie=a;break}ie=t.return}}var AN=Math.ceil,Wu=Hr.ReactCurrentDispatcher,em=Hr.ReactCurrentOwner,Rn=Hr.ReactCurrentBatchConfig,je=0,wt=null,pt=null,_t=0,cn=0,Ks=Fi(0),yt=0,Ga=null,hs=0,Oc=0,tm=0,Sa=null,Xt=null,nm=0,Eo=1/0,Tr=null,qu=!1,wh=null,Ei=null,Dl=!1,mi=null,Ku=0,ka=0,bh=null,du=-1,fu=0;function Ht(){return je&6?ot():du!==-1?du:du=ot()}function Ci(e){return e.mode&1?je&2&&_t!==0?_t&-_t:mN.transition!==null?(fu===0&&(fu=Fw()),fu):(e=De,e!==0||(e=window.event,e=e===void 0?16:Ww(e.type)),e):1}function Zn(e,t,n,r){if(50<ka)throw ka=0,bh=null,Error(K(185));ll(e,n,r),(!(je&2)||e!==wt)&&(e===wt&&(!(je&2)&&(Oc|=n),yt===4&&ai(e,_t)),nn(e,r),n===1&&je===0&&!(t.mode&1)&&(Eo=ot()+500,Rc&&zi()))}function nn(e,t){var n=e.callbackNode;m_(e,t);var r=Ru(e,e===wt?_t:0);if(r===0)n!==null&&Tg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tg(n),t===1)e.tag===0?pN(wy.bind(null,e)):c0(wy.bind(null,e)),cN(function(){!(je&6)&&zi()}),n=null;else{switch(zw(r)){case 1:n=Tp;break;case 4:n=Lw;break;case 16:n=Pu;break;case 536870912:n=Dw;break;default:n=Pu}n=l1(n,t1.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function t1(e,t){if(du=-1,fu=0,je&6)throw Error(K(327));var n=e.callbackNode;if(Js()&&e.callbackNode!==n)return null;var r=Ru(e,e===wt?_t:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gu(e,r);else{t=r;var i=je;je|=2;var s=r1();(wt!==e||_t!==t)&&(Tr=null,Eo=ot()+500,ls(e,t));do try{MN();break}catch(a){n1(e,a)}while(!0);Bp(),Wu.current=s,je=i,pt!==null?t=0:(wt=null,_t=0,t=yt)}if(t!==0){if(t===2&&(i=Gf(e),i!==0&&(r=i,t=Sh(e,i))),t===1)throw n=Ga,ls(e,0),ai(e,r),nn(e,ot()),n;if(t===6)ai(e,r);else{if(i=e.current.alternate,!(r&30)&&!IN(i)&&(t=Gu(e,r),t===2&&(s=Gf(e),s!==0&&(r=s,t=Sh(e,s))),t===1))throw n=Ga,ls(e,0),ai(e,r),nn(e,ot()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:Wi(e,Xt,Tr);break;case 3:if(ai(e,r),(r&130023424)===r&&(t=nm+500-ot(),10<t)){if(Ru(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ht(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=nh(Wi.bind(null,e,Xt,Tr),t);break}Wi(e,Xt,Tr);break;case 4:if(ai(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Qn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AN(r/1960))-r,10<r){e.timeoutHandle=nh(Wi.bind(null,e,Xt,Tr),r);break}Wi(e,Xt,Tr);break;case 5:Wi(e,Xt,Tr);break;default:throw Error(K(329))}}}return nn(e,ot()),e.callbackNode===n?t1.bind(null,e):null}function Sh(e,t){var n=Sa;return e.current.memoizedState.isDehydrated&&(ls(e,t).flags|=256),e=Gu(e,t),e!==2&&(t=Xt,Xt=n,t!==null&&kh(t)),e}function kh(e){Xt===null?Xt=e:Xt.push.apply(Xt,e)}function IN(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Yn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ai(e,t){for(t&=~tm,t&=~Oc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qn(t),r=1<<n;e[n]=-1,t&=~r}}function wy(e){if(je&6)throw Error(K(327));Js();var t=Ru(e,0);if(!(t&1))return nn(e,ot()),null;var n=Gu(e,t);if(e.tag!==0&&n===2){var r=Gf(e);r!==0&&(t=r,n=Sh(e,r))}if(n===1)throw n=Ga,ls(e,0),ai(e,t),nn(e,ot()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wi(e,Xt,Tr),nn(e,ot()),null}function rm(e,t){var n=je;je|=1;try{return e(t)}finally{je=n,je===0&&(Eo=ot()+500,Rc&&zi())}}function ps(e){mi!==null&&mi.tag===0&&!(je&6)&&Js();var t=je;je|=1;var n=Rn.transition,r=De;try{if(Rn.transition=null,De=1,e)return e()}finally{De=r,Rn.transition=n,je=t,!(je&6)&&zi()}}function im(){cn=Ks.current,Qe(Ks)}function ls(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,uN(n)),pt!==null)for(n=pt.return;n!==null;){var r=n;switch(Fp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Mu();break;case 3:So(),Qe(en),Qe(Ot),Kp();break;case 5:qp(r);break;case 4:So();break;case 13:Qe(Je);break;case 19:Qe(Je);break;case 10:Vp(r.type._context);break;case 22:case 23:im()}n=n.return}if(wt=e,pt=e=_i(e.current,null),_t=cn=t,yt=0,Ga=null,tm=Oc=hs=0,Xt=Sa=null,Zi!==null){for(t=0;t<Zi.length;t++)if(n=Zi[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Zi=null}return e}function n1(e,t){do{var n=pt;try{if(Bp(),lu.current=Hu,Uu){for(var r=et.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Uu=!1}if(fs=0,xt=gt=et=null,wa=!1,Wa=0,em.current=null,n===null||n.return===null){yt=1,Ga=t,pt=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=_t,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=ay(o);if(h!==null){h.flags&=-257,ly(h,o,a,s,t),h.mode&1&&oy(s,u,t),t=h,l=u;var w=t.updateQueue;if(w===null){var m=new Set;m.add(l),t.updateQueue=m}else w.add(l);break e}else{if(!(t&1)){oy(s,u,t),sm();break e}l=Error(K(426))}}else if(Ye&&a.mode&1){var b=ay(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),ly(b,o,a,s,t),zp(ko(l,a));break e}}s=l=ko(l,a),yt!==4&&(yt=2),Sa===null?Sa=[s]:Sa.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=z0(s,l,t);ey(s,g);break e;case 1:a=l;var y=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ei===null||!Ei.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=$0(s,a,t);ey(s,S);break e}}s=s.return}while(s!==null)}s1(n)}catch(_){t=_,pt===n&&n!==null&&(pt=n=n.return);continue}break}while(!0)}function r1(){var e=Wu.current;return Wu.current=Hu,e===null?Hu:e}function sm(){(yt===0||yt===3||yt===2)&&(yt=4),wt===null||!(hs&268435455)&&!(Oc&268435455)||ai(wt,_t)}function Gu(e,t){var n=je;je|=2;var r=r1();(wt!==e||_t!==t)&&(Tr=null,ls(e,t));do try{ON();break}catch(i){n1(e,i)}while(!0);if(Bp(),je=n,Wu.current=r,pt!==null)throw Error(K(261));return wt=null,_t=0,yt}function ON(){for(;pt!==null;)i1(pt)}function MN(){for(;pt!==null&&!o_();)i1(pt)}function i1(e){var t=a1(e.alternate,e,cn);e.memoizedProps=e.pendingProps,t===null?s1(e):pt=t,em.current=null}function s1(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=TN(n,t),n!==null){n.flags&=32767,pt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,pt=null;return}}else if(n=NN(n,t,cn),n!==null){pt=n;return}if(t=t.sibling,t!==null){pt=t;return}pt=t=e}while(t!==null);yt===0&&(yt=5)}function Wi(e,t,n){var r=De,i=Rn.transition;try{Rn.transition=null,De=1,LN(e,t,n,r)}finally{Rn.transition=i,De=r}return null}function LN(e,t,n,r){do Js();while(mi!==null);if(je&6)throw Error(K(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(g_(e,s),e===wt&&(pt=wt=null,_t=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Dl||(Dl=!0,l1(Pu,function(){return Js(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Rn.transition,Rn.transition=null;var o=De;De=1;var a=je;je|=4,em.current=null,RN(e,n),J0(n,e),nN(eh),ju=!!Jf,eh=Jf=null,e.current=n,jN(n),a_(),je=a,De=o,Rn.transition=s}else e.current=n;if(Dl&&(Dl=!1,mi=e,Ku=i),s=e.pendingLanes,s===0&&(Ei=null),c_(n.stateNode),nn(e,ot()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(qu)throw qu=!1,e=wh,wh=null,e;return Ku&1&&e.tag!==0&&Js(),s=e.pendingLanes,s&1?e===bh?ka++:(ka=0,bh=e):ka=0,zi(),null}function Js(){if(mi!==null){var e=zw(Ku),t=Rn.transition,n=De;try{if(Rn.transition=null,De=16>e?16:e,mi===null)var r=!1;else{if(e=mi,mi=null,Ku=0,je&6)throw Error(K(331));var i=je;for(je|=4,ie=e.current;ie!==null;){var s=ie,o=s.child;if(ie.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(ie=u;ie!==null;){var c=ie;switch(c.tag){case 0:case 11:case 15:ba(8,c,s)}var f=c.child;if(f!==null)f.return=c,ie=f;else for(;ie!==null;){c=ie;var p=c.sibling,h=c.return;if(Z0(c),c===u){ie=null;break}if(p!==null){p.return=h,ie=p;break}ie=h}}}var w=s.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}ie=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ie=o;else e:for(;ie!==null;){if(s=ie,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ba(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,ie=g;break e}ie=s.return}}var y=e.current;for(ie=y;ie!==null;){o=ie;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ie=x;else e:for(o=y;ie!==null;){if(a=ie,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ic(9,a)}}catch(_){st(a,a.return,_)}if(a===o){ie=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ie=S;break e}ie=a.return}}if(je=i,zi(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(Cc,e)}catch{}r=!0}return r}finally{De=n,Rn.transition=t}}return!1}function by(e,t,n){t=ko(n,t),t=z0(e,t,1),e=ki(e,t,1),t=Ht(),e!==null&&(ll(e,1,t),nn(e,t))}function st(e,t,n){if(e.tag===3)by(e,e,n);else for(;t!==null;){if(t.tag===3){by(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ei===null||!Ei.has(r))){e=ko(n,e),e=$0(t,e,1),t=ki(t,e,1),e=Ht(),t!==null&&(ll(t,1,e),nn(t,e));break}}t=t.return}}function DN(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ht(),e.pingedLanes|=e.suspendedLanes&n,wt===e&&(_t&n)===n&&(yt===4||yt===3&&(_t&130023424)===_t&&500>ot()-nm?ls(e,0):tm|=n),nn(e,t)}function o1(e,t){t===0&&(e.mode&1?(t=Nl,Nl<<=1,!(Nl&130023424)&&(Nl=4194304)):t=1);var n=Ht();e=zr(e,t),e!==null&&(ll(e,t,n),nn(e,n))}function FN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),o1(e,n)}function zN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),o1(e,n)}var a1;a1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||en.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,_N(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,Ye&&t.flags&1048576&&d0(t,Fu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cu(e,t),e=t.pendingProps;var i=xo(t,Ot.current);Xs(t,n),i=Qp(null,t,r,e,i,n);var s=Zp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tn(r)?(s=!0,Lu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Hp(t),i.updater=Ac,t.stateNode=i,i._reactInternals=t,uh(t,r,e,n),t=fh(null,t,r,!0,s,n)):(t.tag=0,Ye&&s&&Dp(t),Ft(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=BN(r),e=Bn(r,e),i){case 0:t=dh(null,t,r,e,n);break e;case 1:t=dy(null,t,r,e,n);break e;case 11:t=uy(null,t,r,e,n);break e;case 14:t=cy(null,t,r,Bn(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bn(r,i),dh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bn(r,i),dy(e,t,r,i,n);case 3:e:{if(H0(t),e===null)throw Error(K(387));r=t.pendingProps,s=t.memoizedState,i=s.element,y0(e,t),Bu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=ko(Error(K(423)),t),t=fy(e,t,r,n,i);break e}else if(r!==i){i=ko(Error(K(424)),t),t=fy(e,t,r,n,i);break e}else for(hn=Si(t.stateNode.containerInfo.firstChild),mn=t,Ye=!0,qn=null,n=m0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===i){t=$r(e,t,n);break e}Ft(e,t,r,n)}t=t.child}return t;case 5:return v0(t),e===null&&oh(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,th(r,i)?o=null:s!==null&&th(r,s)&&(t.flags|=32),U0(e,t),Ft(e,t,o,n),t.child;case 6:return e===null&&oh(t),null;case 13:return W0(e,t,n);case 4:return Wp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(t,null,r,n):Ft(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bn(r,i),uy(e,t,r,i,n);case 7:return Ft(e,t,t.pendingProps,n),t.child;case 8:return Ft(e,t,t.pendingProps.children,n),t.child;case 12:return Ft(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,He(zu,r._currentValue),r._currentValue=o,s!==null)if(Yn(s.value,o)){if(s.children===i.children&&!en.current){t=$r(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Mr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ah(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(K(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ah(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ft(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xs(t,n),i=jn(i),r=r(i),t.flags|=1,Ft(e,t,r,n),t.child;case 14:return r=t.type,i=Bn(r,t.pendingProps),i=Bn(r.type,i),cy(e,t,r,i,n);case 15:return B0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Bn(r,i),cu(e,t),t.tag=1,tn(r)?(e=!0,Lu(t)):e=!1,Xs(t,n),F0(t,r,i),uh(t,r,i,n),fh(null,t,r,!0,e,n);case 19:return q0(e,t,n);case 22:return V0(e,t,n)}throw Error(K(156,t.tag))};function l1(e,t){return Mw(e,t)}function $N(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(e,t,n,r){return new $N(e,t,n,r)}function om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function BN(e){if(typeof e=="function")return om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cp)return 11;if(e===_p)return 14}return 2}function _i(e,t){var n=e.alternate;return n===null?(n=Pn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")om(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ds:return us(n.children,i,s,t);case Ep:o=8,i|=8;break;case If:return e=Pn(12,n,t,i|2),e.elementType=If,e.lanes=s,e;case Of:return e=Pn(13,n,t,i),e.elementType=Of,e.lanes=s,e;case Mf:return e=Pn(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case vw:return Mc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gw:o=10;break e;case yw:o=9;break e;case Cp:o=11;break e;case _p:o=14;break e;case ri:o=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Pn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function us(e,t,n,r){return e=Pn(7,e,r,t),e.lanes=n,e}function Mc(e,t,n,r){return e=Pn(22,e,r,t),e.elementType=vw,e.lanes=n,e.stateNode={isHidden:!1},e}function qd(e,t,n){return e=Pn(6,e,null,t),e.lanes=n,e}function Kd(e,t,n){return t=Pn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function VN(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nd(0),this.expirationTimes=Nd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function am(e,t,n,r,i,s,o,a,l){return e=new VN(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Pn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hp(s),e}function UN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ls,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function u1(e){if(!e)return ji;e=e._reactInternals;e:{if(Es(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if(tn(n))return u0(e,n,t)}return t}function c1(e,t,n,r,i,s,o,a,l){return e=am(n,r,!0,e,i,s,o,a,l),e.context=u1(null),n=e.current,r=Ht(),i=Ci(n),s=Mr(r,i),s.callback=t??null,ki(n,s,i),e.current.lanes=i,ll(e,i,r),nn(e,r),e}function Lc(e,t,n,r){var i=t.current,s=Ht(),o=Ci(i);return n=u1(n),t.context===null?t.context=n:t.pendingContext=n,t=Mr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ki(i,t,o),e!==null&&(Zn(e,i,o,s),au(e,i,o)),o}function Qu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Sy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lm(e,t){Sy(e,t),(e=e.alternate)&&Sy(e,t)}function HN(){return null}var d1=typeof reportError=="function"?reportError:function(e){console.error(e)};function um(e){this._internalRoot=e}Dc.prototype.render=um.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));Lc(e,t,null,null)};Dc.prototype.unmount=um.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ps(function(){Lc(null,e,null,null)}),t[Fr]=null}};function Dc(e){this._internalRoot=e}Dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oi.length&&t!==0&&t<oi[n].priority;n++);oi.splice(n,0,e),n===0&&Hw(e)}};function cm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ky(){}function WN(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Qu(o);s.call(u)}}var o=c1(t,r,e,0,null,!1,!1,"",ky);return e._reactRootContainer=o,e[Fr]=o.current,$a(e.nodeType===8?e.parentNode:e),ps(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Qu(l);a.call(u)}}var l=am(e,0,!1,null,null,!1,!1,"",ky);return e._reactRootContainer=l,e[Fr]=l.current,$a(e.nodeType===8?e.parentNode:e),ps(function(){Lc(t,l,n,r)}),l}function zc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Qu(o);a.call(l)}}Lc(t,o,e,i)}else o=WN(n,t,e,i,r);return Qu(o)}$w=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ca(t.pendingLanes);n!==0&&(Pp(t,n|1),nn(t,ot()),!(je&6)&&(Eo=ot()+500,zi()))}break;case 13:ps(function(){var r=zr(e,1);if(r!==null){var i=Ht();Zn(r,e,1,i)}}),lm(e,1)}};Rp=function(e){if(e.tag===13){var t=zr(e,134217728);if(t!==null){var n=Ht();Zn(t,e,134217728,n)}lm(e,134217728)}};Bw=function(e){if(e.tag===13){var t=Ci(e),n=zr(e,t);if(n!==null){var r=Ht();Zn(n,e,t,r)}lm(e,t)}};Vw=function(){return De};Uw=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};Wf=function(e,t,n){switch(t){case"input":if(Ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Pc(r);if(!i)throw Error(K(90));ww(r),Ff(r,i)}}}break;case"textarea":Sw(e,n);break;case"select":t=n.value,t!=null&&Gs(e,!!n.multiple,t,!1)}};Pw=rm;Rw=ps;var qN={usingClientEntryPoint:!1,Events:[cl,Bs,Pc,Nw,Tw,rm]},Yo={findFiberByHostInstance:Qi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KN={bundleType:Yo.bundleType,version:Yo.version,rendererPackageName:Yo.rendererPackageName,rendererConfig:Yo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Iw(e),e===null?null:e.stateNode},findFiberByHostInstance:Yo.findFiberByHostInstance||HN,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 Fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fl.isDisabled&&Fl.supportsFiber)try{Cc=Fl.inject(KN),mr=Fl}catch{}}xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qN;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cm(t))throw Error(K(200));return UN(e,t,null,n)};xn.createRoot=function(e,t){if(!cm(e))throw Error(K(299));var n=!1,r="",i=d1;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=am(e,1,!1,null,null,n,!1,r,i),e[Fr]=t.current,$a(e.nodeType===8?e.parentNode:e),new um(t)};xn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=Iw(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return ps(e)};xn.hydrate=function(e,t,n){if(!Fc(t))throw Error(K(200));return zc(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!cm(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=d1;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=c1(t,null,e,1,n??null,i,!1,s,o),e[Fr]=t.current,$a(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Dc(t)};xn.render=function(e,t,n){if(!Fc(t))throw Error(K(200));return zc(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!Fc(e))throw Error(K(40));return e._reactRootContainer?(ps(function(){zc(null,null,e,!1,function(){e._reactRootContainer=null,e[Fr]=null})}),!0):!1};xn.unstable_batchedUpdates=rm;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Fc(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return zc(e,t,n,!1,r)};xn.version="18.3.1-next-f1338f8080-20240426";function f1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f1)}catch(e){console.error(e)}}f1(),fw.exports=xn;var Cs=fw.exports;const h1=kc(Cs);var p1,Ey=Cs;p1=Ey.createRoot,Ey.hydrateRoot;const GN=1,QN=1e6;let Gd=0;function ZN(){return Gd=(Gd+1)%Number.MAX_SAFE_INTEGER,Gd.toString()}const Qd=new Map,Cy=e=>{if(Qd.has(e))return;const t=setTimeout(()=>{Qd.delete(e),Ea({type:"REMOVE_TOAST",toastId:e})},QN);Qd.set(e,t)},YN=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,GN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Cy(n):e.toasts.forEach(r=>{Cy(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},pu=[];let mu={toasts:[]};function Ea(e){mu=YN(mu,e),pu.forEach(t=>{t(mu)})}function XN({...e}){const t=ZN(),n=i=>Ea({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ea({type:"DISMISS_TOAST",toastId:t});return Ea({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function $c(){const[e,t]=v.useState(mu);return v.useEffect(()=>(pu.push(t),()=>{const n=pu.indexOf(t);n>-1&&pu.splice(n,1)}),[e]),{...e,toast:XN,dismiss:n=>Ea({type:"DISMISS_TOAST",toastId:n})}}function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _y(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function m1(...e){return t=>{let n=!1;const r=e.map(i=>{const s=_y(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():_y(e[i],null)}}}}function Fe(...e){return v.useCallback(m1(...e),e)}function JN(e,t){const n=v.createContext(t),r=s=>{const{children:o,...a}=s,l=v.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(s){const o=v.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Sr(e,t=[]){let n=[];function r(s,o){const a=v.createContext(o),l=n.length;n=[...n,o];const u=f=>{var g;const{scope:p,children:h,...w}=f,m=((g=p==null?void 0:p[e])==null?void 0:g[l])||a,b=v.useMemo(()=>w,Object.values(w));return d.jsx(m.Provider,{value:b,children:h})};u.displayName=s+"Provider";function c(f,p){var m;const h=((m=p==null?void 0:p[e])==null?void 0:m[l])||a,w=v.useContext(h);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>v.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,eT(i,...t)]}function eT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Co(e){const t=nT(e),n=v.forwardRef((r,i)=>{const{children:s,...o}=r,a=v.Children.toArray(s),l=a.find(iT);if(l){const u=l.props.children,c=a.map(f=>f===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return d.jsx(t,{...o,ref:i,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return d.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var tT=Co("Slot");function nT(e){const t=v.forwardRef((n,r)=>{const{children:i,...s}=n;if(v.isValidElement(i)){const o=oT(i),a=sT(s,i.props);return i.type!==v.Fragment&&(a.ref=r?m1(r,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var g1=Symbol("radix.slottable");function rT(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=g1,t}function iT(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===g1}function sT(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function oT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dm(e){const t=e+"CollectionProvider",[n,r]=Sr(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:b,children:g}=m,y=q.useRef(null),x=q.useRef(new Map).current;return d.jsx(i,{scope:b,itemMap:x,collectionRef:y,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=Co(a),u=q.forwardRef((m,b)=>{const{scope:g,children:y}=m,x=s(a,g),S=Fe(b,x.collectionRef);return d.jsx(l,{ref:S,children:y})});u.displayName=a;const c=e+"CollectionItemSlot",f="data-radix-collection-item",p=Co(c),h=q.forwardRef((m,b)=>{const{scope:g,children:y,...x}=m,S=q.useRef(null),_=Fe(b,S),E=s(c,g);return q.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),d.jsx(p,{[f]:"",ref:_,children:y})});h.displayName=c;function w(m){const b=s(e+"CollectionConsumer",m);return q.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},w,r]}var aT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fe=aT.reduce((e,t)=>{const n=Co(`Primitive.${t}`),r=v.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function y1(e,t){e&&Cs.flushSync(()=>e.dispatchEvent(t))}function In(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lT(e,t=globalThis==null?void 0:globalThis.document){const n=In(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var uT="DismissableLayer",Eh="dismissableLayer.update",cT="dismissableLayer.pointerDownOutside",dT="dismissableLayer.focusOutside",Ny,v1=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fl=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(v1),[c,f]=v.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),w=Fe(t,C=>f(C)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(b),y=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=g,_=hT(C=>{const R=C.target,I=[...u.branches].some(P=>P.contains(R));!S||I||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},p),E=pT(C=>{const R=C.target;[...u.branches].some(P=>P.contains(R))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},p);return lT(C=>{y===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ny=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Ty(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ny)}},[c,p,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Ty())},[c,u]),v.useEffect(()=>{const C=()=>h({});return document.addEventListener(Eh,C),()=>document.removeEventListener(Eh,C)},[]),d.jsx(fe.div,{...l,ref:w,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,_.onPointerDownCapture)})});fl.displayName=uT;var fT="DismissableLayerBranch",x1=v.forwardRef((e,t)=>{const n=v.useContext(v1),r=v.useRef(null),i=Fe(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(fe.div,{...e,ref:i})});x1.displayName=fT;function hT(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){w1(cT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pT(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=v.useRef(!1);return v.useEffect(()=>{const i=s=>{s.target&&!r.current&&w1(dT,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ty(){const e=new CustomEvent(Eh);document.dispatchEvent(e)}function w1(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?y1(i,s):i.dispatchEvent(s)}var mT=fl,gT=x1,bt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},yT="Portal",Bc=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,s]=v.useState(!1);bt(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?h1.createPortal(d.jsx(fe.div,{...r,ref:t}),o):null});Bc.displayName=yT;function vT(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Wr=e=>{const{present:t,children:n}=e,r=xT(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=Fe(r.ref,wT(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:s}):null};Wr.displayName="Presence";function xT(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),s=v.useRef("none"),o=e?"mounted":"unmounted",[a,l]=vT(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=zl(r.current);s.current=a==="mounted"?u:"none"},[a]),bt(()=>{const u=r.current,c=i.current;if(c!==e){const p=s.current,h=zl(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),bt(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=h=>{const m=zl(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=h=>{h.target===t&&(s.current=zl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function zl(e){return(e==null?void 0:e.animationName)||"none"}function wT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bT=wp[" useInsertionEffect ".trim().toString()]||bt;function Ai({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,o]=ST({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const f=c.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"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.`),c.current=a},[a,r])}const u=v.useCallback(c=>{var f;if(a){const p=kT(c)?c(e):c;p!==e&&((f=o.current)==null||f.call(o,p))}else s(c)},[a,e,s,o]);return[l,u]}function ST({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),s=v.useRef(t);return bT(()=>{s.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function kT(e){return typeof e=="function"}var b1=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"}),ET="VisuallyHidden",Vc=v.forwardRef((e,t)=>d.jsx(fe.span,{...e,ref:t,style:{...b1,...e.style}}));Vc.displayName=ET;var CT=Vc,fm="ToastProvider",[hm,_T,NT]=dm("Toast"),[S1,iz]=Sr("Toast",[NT]),[TT,Uc]=S1(fm),k1=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=v.useState(null),[u,c]=v.useState(0),f=v.useRef(!1),p=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${fm}\`. Expected non-empty \`string\`.`),d.jsx(hm.Provider,{scope:t,children:d.jsx(TT,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:v.useCallback(()=>c(h=>h+1),[]),onToastRemove:v.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:o})})};k1.displayName=fm;var E1="ToastViewport",PT=["F8"],Ch="toast.viewportPause",_h="toast.viewportResume",C1=v.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PT,label:i="Notifications ({hotkey})",...s}=e,o=Uc(E1,n),a=_T(n),l=v.useRef(null),u=v.useRef(null),c=v.useRef(null),f=v.useRef(null),p=Fe(t,f,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;v.useEffect(()=>{const b=g=>{var x;r.length!==0&&r.every(S=>g[S]||g.code===S)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),v.useEffect(()=>{const b=l.current,g=f.current;if(w&&b&&g){const y=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Ch);g.dispatchEvent(E),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(_h);g.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!b.contains(E.relatedTarget)&&x()},_=()=>{b.contains(document.activeElement)||x()};return b.addEventListener("focusin",y),b.addEventListener("focusout",S),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",_),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[w,o.isClosePausedRef]);const m=v.useCallback(({tabbingDirection:b})=>{const y=a().map(x=>{const S=x.ref.current,_=[S,...VT(S)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?y.reverse():y).flat()},[a]);return v.useEffect(()=>{const b=f.current;if(b){const g=y=>{var _,E,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const R=document.activeElement,I=y.shiftKey;if(y.target===b&&I){(_=u.current)==null||_.focus();return}const A=m({tabbingDirection:I?"backwards":"forwards"}),U=A.findIndex(F=>F===R);Zd(A.slice(U+1))?y.preventDefault():I?(E=u.current)==null||E.focus():(C=c.current)==null||C.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[a,m]),d.jsxs(gT,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&d.jsx(Nh,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});Zd(b)}}),d.jsx(hm.Slot,{scope:n,children:d.jsx(fe.ol,{tabIndex:-1,...s,ref:p})}),w&&d.jsx(Nh,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});Zd(b)}})]})});C1.displayName=E1;var _1="ToastFocusProxy",Nh=v.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Uc(_1,n);return d.jsx(Vc,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Nh.displayName=_1;var hl="Toast",RT="toast.swipeStart",jT="toast.swipeMove",AT="toast.swipeCancel",IT="toast.swipeEnd",N1=v.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=Ai({prop:r,defaultProp:i??!0,onChange:s,caller:hl});return d.jsx(Wr,{present:n||a,children:d.jsx(LT,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:In(e.onPause),onResume:In(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});N1.displayName=hl;var[OT,MT]=S1(hl,{onClose(){}}),LT=v.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:h,...w}=e,m=Uc(hl,n),[b,g]=v.useState(null),y=Fe(t,F=>g(F)),x=v.useRef(null),S=v.useRef(null),_=i||m.duration,E=v.useRef(0),C=v.useRef(_),R=v.useRef(0),{onToastAdd:I,onToastRemove:P}=m,L=In(()=>{var W;(b==null?void 0:b.contains(document.activeElement))&&((W=m.viewport)==null||W.focus()),o()}),A=v.useCallback(F=>{!F||F===1/0||(window.clearTimeout(R.current),E.current=new Date().getTime(),R.current=window.setTimeout(L,F))},[L]);v.useEffect(()=>{const F=m.viewport;if(F){const W=()=>{A(C.current),u==null||u()},H=()=>{const V=new Date().getTime()-E.current;C.current=C.current-V,window.clearTimeout(R.current),l==null||l()};return F.addEventListener(Ch,H),F.addEventListener(_h,W),()=>{F.removeEventListener(Ch,H),F.removeEventListener(_h,W)}}},[m.viewport,_,l,u,A]),v.useEffect(()=>{s&&!m.isClosePausedRef.current&&A(_)},[s,_,m.isClosePausedRef,A]),v.useEffect(()=>(I(),()=>P()),[I,P]);const U=v.useMemo(()=>b?O1(b):null,[b]);return m.viewport?d.jsxs(d.Fragment,{children:[U&&d.jsx(DT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),d.jsx(OT,{scope:n,onClose:L,children:Cs.createPortal(d.jsx(hm.ItemSlot,{scope:n,children:d.jsx(mT,{asChild:!0,onEscapeKeyDown:ue(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(fe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:ue(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ue(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,H=F.clientY-x.current.y,V=!!S.current,M=["left","right"].includes(m.swipeDirection),D=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,k=M?D(0,W):0,re=M?0:D(0,H),ne=F.pointerType==="touch"?10:2,N={x:k,y:re},le={originalEvent:F,delta:N};V?(S.current=N,$l(jT,f,le,{discrete:!1})):Py(N,m.swipeDirection,ne)?(S.current=N,$l(RT,c,le,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>ne||Math.abs(H)>ne)&&(x.current=null)}),onPointerUp:ue(e.onPointerUp,F=>{const W=S.current,H=F.target;if(H.hasPointerCapture(F.pointerId)&&H.releasePointerCapture(F.pointerId),S.current=null,x.current=null,W){const V=F.currentTarget,M={originalEvent:F,delta:W};Py(W,m.swipeDirection,m.swipeThreshold)?$l(IT,h,M,{discrete:!0}):$l(AT,p,M,{discrete:!0}),V.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),DT=e=>{const{__scopeToast:t,children:n,...r}=e,i=Uc(hl,t),[s,o]=v.useState(!1),[a,l]=v.useState(!1);return $T(()=>o(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:d.jsx(Bc,{asChild:!0,children:d.jsx(Vc,{...r,children:s&&d.jsxs(d.Fragment,{children:[i.label," ",n]})})})},FT="ToastTitle",T1=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(fe.div,{...r,ref:t})});T1.displayName=FT;var zT="ToastDescription",P1=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(fe.div,{...r,ref:t})});P1.displayName=zT;var R1="ToastAction",j1=v.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?d.jsx(I1,{altText:n,asChild:!0,children:d.jsx(pm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${R1}\`. Expected non-empty \`string\`.`),null)});j1.displayName=R1;var A1="ToastClose",pm=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=MT(A1,n);return d.jsx(I1,{asChild:!0,children:d.jsx(fe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,i.onClose)})})});pm.displayName=A1;var I1=v.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return d.jsx(fe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function O1(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),BT(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...O1(r))}}),t}function $l(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?y1(i,s):i.dispatchEvent(s)}var Py=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function $T(e=()=>{}){const t=In(e);bt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function BT(e){return e.nodeType===e.ELEMENT_NODE}function VT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var UT=k1,M1=C1,L1=N1,D1=T1,F1=P1,z1=j1,$1=pm;function B1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=B1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function V1(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=B1(e))&&(r&&(r+=" "),r+=t);return r}const Ry=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jy=V1,pl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],f=s==null?void 0:s[u];if(c===null)return null;const p=Ry(c)||Ry(f);return i[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,p]=c;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:p,...h}=c;return Object.entries(h).every(w=>{let[m,b]=w;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...u,f,p]:u},[]);return jy(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var WT={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"};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qT=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...WT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:U1("lucide",i),...a},[...o.map(([u,c])=>v.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qe=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(qT,{ref:s,iconNode:t,className:U1(`lucide-${HT(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mm=qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hc=qe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H1=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wc=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W1=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KT=qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GT=qe("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"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QT=qe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Th=qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZT=qe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YT=qe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Do=qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q1=qe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K1=qe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gu=qe("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zu=qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XT=qe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yu=qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JT=qe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eP=qe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fa=qe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tP=qe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ay=qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qc=qe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eo=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G1=qe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),gm="-",nP=e=>{const t=iP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(gm);return a[0]===""&&a.length!==1&&a.shift(),Q1(a,t)||rP(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Q1=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Q1(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(gm);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Iy=/^\[(.+)\]$/,rP=e=>{if(Iy.test(e)){const t=Iy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return oP(Object.entries(e.classGroups),n).forEach(([s,o])=>{Ph(o,r,s,t)}),r},Ph=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Oy(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(sP(i)){Ph(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Ph(o,Oy(t,s),n,r)})})},Oy=(e,t)=>{let n=e;return t.split(gm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sP=e=>e.isThemeGetter,oP=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,aP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},Z1="!",lP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,f;for(let b=0;b<a.length;b++){let g=a[b];if(u===0){if(g===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(c,b)),c=b+s;continue}if(g==="/"){f=b;continue}}g==="["?u++:g==="]"&&u--}const p=l.length===0?a:a.substring(c),h=p.startsWith(Z1),w=h?p.substring(1):p,m=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:w,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},uP=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},cP=e=>({cache:aP(e.cacheSize),parseClassName:lP(e),...nP(e)}),dP=/\s+/,fP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(dP);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let w=!!h,m=r(w?p.substring(0,h):p);if(!m){if(!w){a=u+(a.length>0?" "+a:a);continue}if(m=r(p),!m){a=u+(a.length>0?" "+a:a);continue}w=!1}const b=uP(c).join(":"),g=f?b+Z1:b,y=g+m;if(s.includes(y))continue;s.push(y);const x=i(m,w);for(let S=0;S<x.length;++S){const _=x[S];s.push(g+_)}a=u+(a.length>0?" "+a:a)}return a};function hP(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Y1(t))&&(r&&(r+=" "),r+=n);return r}const Y1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Y1(e[r]))&&(n&&(n+=" "),n+=t);return n};function pP(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return n=cP(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=fP(l,n);return i(l,c),c}return function(){return s(hP.apply(null,arguments))}}const Ke=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},X1=/^\[(?:([a-z-]+):)?(.+)\]$/i,mP=/^\d+\/\d+$/,gP=new Set(["px","full","screen"]),yP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vP=/\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$/,xP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Er=e=>to(e)||gP.has(e)||mP.test(e),Yr=e=>Fo(e,"length",PP),to=e=>!!e&&!Number.isNaN(Number(e)),Yd=e=>Fo(e,"number",to),Xo=e=>!!e&&Number.isInteger(Number(e)),SP=e=>e.endsWith("%")&&to(e.slice(0,-1)),be=e=>X1.test(e),Xr=e=>yP.test(e),kP=new Set(["length","size","percentage"]),EP=e=>Fo(e,kP,J1),CP=e=>Fo(e,"position",J1),_P=new Set(["image","url"]),NP=e=>Fo(e,_P,jP),TP=e=>Fo(e,"",RP),Jo=()=>!0,Fo=(e,t,n)=>{const r=X1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PP=e=>vP.test(e)&&!xP.test(e),J1=()=>!1,RP=e=>wP.test(e),jP=e=>bP.test(e),AP=()=>{const e=Ke("colors"),t=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),i=Ke("borderColor"),s=Ke("borderRadius"),o=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),u=Ke("grayscale"),c=Ke("hueRotate"),f=Ke("invert"),p=Ke("gap"),h=Ke("gradientColorStops"),w=Ke("gradientColorStopPositions"),m=Ke("inset"),b=Ke("margin"),g=Ke("opacity"),y=Ke("padding"),x=Ke("saturate"),S=Ke("scale"),_=Ke("sepia"),E=Ke("skew"),C=Ke("space"),R=Ke("translate"),I=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",be,t],A=()=>[be,t],U=()=>["",Er,Yr],F=()=>["auto",to,be],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",be],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[to,be];return{cacheSize:500,separator:":",theme:{colors:[Jo],spacing:[Er,Yr],blur:["none","",Xr,be],brightness:re(),borderColor:[e],borderRadius:["none","","full",Xr,be],borderSpacing:A(),borderWidth:U(),contrast:re(),grayscale:D(),hueRotate:re(),invert:D(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[SP,Yr],inset:L(),margin:L(),opacity:re(),padding:A(),saturate:re(),scale:re(),sepia:D(),skew:re(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[Xr]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:[...W(),be]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xo,be]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Xo,be]}],"grid-cols":[{"grid-cols":[Jo]}],"col-start-end":[{col:["auto",{span:["full",Xo,be]},be]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[Jo]}],"row-start-end":[{row:["auto",{span:[Xo,be]},be]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[Xr]},Xr]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xr,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yd]}],"font-family":[{font:[Jo]}],"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",be]}],"line-clamp":[{"line-clamp":["none",to,Yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Er,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Er,Yr]}],"underline-offset":[{"underline-offset":["auto",Er,be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),CP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},NP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Er,be]}],"outline-w":[{outline:[Er,Yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Er,Yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xr,TP]}],"shadow-color":[{shadow:[Jo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xr,be]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Xo,be]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",e]}],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",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Er,Yr,Yd]}],stroke:[{stroke:[e,"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"]}}},IP=pP(AP);function ke(...e){return IP(V1(e))}const OP=UT,eb=v.forwardRef(({className:e,...t},n)=>d.jsx(M1,{ref:n,className:ke("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]",e),...t}));eb.displayName=M1.displayName;const MP=pl("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-all 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"}}),tb=v.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(L1,{ref:r,className:ke(MP({variant:t}),e),...n}));tb.displayName=L1.displayName;const LP=v.forwardRef(({className:e,...t},n)=>d.jsx(z1,{ref:n,className:ke("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",e),...t}));LP.displayName=z1.displayName;const nb=v.forwardRef(({className:e,...t},n)=>d.jsx($1,{ref:n,className:ke("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",e),"toast-close":"",...t,children:d.jsx(eo,{className:"h-4 w-4"})}));nb.displayName=$1.displayName;const rb=v.forwardRef(({className:e,...t},n)=>d.jsx(D1,{ref:n,className:ke("text-sm font-semibold",e),...t}));rb.displayName=D1.displayName;const ib=v.forwardRef(({className:e,...t},n)=>d.jsx(F1,{ref:n,className:ke("text-sm opacity-90",e),...t}));ib.displayName=F1.displayName;function DP(){const{toasts:e}=$c();return d.jsxs(OP,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return d.jsxs(tb,{...s,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(rb,{children:n}),r&&d.jsx(ib,{children:r})]}),i,d.jsx(nb,{})]},t)}),d.jsx(eb,{})]})}var My=["light","dark"],FP="(prefers-color-scheme: dark)",zP=v.createContext(void 0),$P={setTheme:e=>{},themes:[]},BP=()=>{var e;return(e=v.useContext(zP))!=null?e:$P};v.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:o,attrs:a,nonce:l})=>{let u=s==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=i?My.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(w,m=!1,b=!0)=>{let g=o?o[w]:w,y=m?w+"|| ''":`'${g}'`,x="";return i&&b&&!m&&My.includes(w)&&(x+=`d.style.colorScheme = '${w}';`),n==="class"?m||g?x+=`c.add(${y})`:x+="null":g&&(x+=`d[s](n,${y})`),x},h=e?`!function(){${c}${p(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${FP}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${u?"":"else{"+p(s,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(s,!1,!1)};}${f}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var VP=e=>{switch(e){case"success":return WP;case"info":return KP;case"warning":return qP;case"error":return GP;default:return null}},UP=Array(12).fill(0),HP=({visible:e,className:t})=>q.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},q.createElement("div",{className:"sonner-spinner"},UP.map((n,r)=>q.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),WP=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qP=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),KP=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),GP=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),QP=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ZP=()=>{let[e,t]=q.useState(document.hidden);return q.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Rh=1,YP=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Rh++,s=this.toasts.find(a=>a.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],q.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(JP(l)&&!l.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:c})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Rh++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Yt=new YP,XP=(e,t)=>{let n=(t==null?void 0:t.id)||Rh++;return Yt.addToast({title:e,...t,id:n}),n},JP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",eR=XP,tR=()=>Yt.toasts,nR=()=>Yt.getActiveToasts();Object.assign(eR,{success:Yt.success,info:Yt.info,warning:Yt.warning,error:Yt.error,custom:Yt.custom,message:Yt.message,promise:Yt.promise,dismiss:Yt.dismiss,loading:Yt.loading},{getHistory:tR,getToasts:nR});function rR(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}rR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function Bl(e){return e.label!==void 0}var iR=3,sR="32px",oR="16px",Ly=4e3,aR=356,lR=14,uR=20,cR=200;function zn(...e){return e.filter(Boolean).join(" ")}function dR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var fR=e=>{var t,n,r,i,s,o,a,l,u,c,f;let{invert:p,toast:h,unstyled:w,interacting:m,setHeights:b,visibleToasts:g,heights:y,index:x,toasts:S,expanded:_,removeToast:E,defaultRichColors:C,closeButton:R,style:I,cancelButtonStyle:P,actionButtonStyle:L,className:A="",descriptionClassName:U="",duration:F,position:W,gap:H,loadingIcon:V,expandByDefault:M,classNames:D,icons:k,closeButtonAriaLabel:re="Close toast",pauseWhenPageIsHidden:ne}=e,[N,le]=q.useState(null),[Te,ye]=q.useState(null),[Y,xe]=q.useState(!1),[Re,ve]=q.useState(!1),[we,Ce]=q.useState(!1),[lt,St]=q.useState(!1),[an,ln]=q.useState(!1),[bn,qr]=q.useState(0),[Sn,T]=q.useState(0),O=q.useRef(h.duration||F||Ly),z=q.useRef(null),J=q.useRef(null),X=x===0,Z=x+1<=g,j=h.type,$=h.dismissible!==!1,ee=h.className||"",ce=h.descriptionClassName||"",_e=q.useMemo(()=>y.findIndex(me=>me.toastId===h.id)||0,[y,h.id]),rt=q.useMemo(()=>{var me;return(me=h.closeButton)!=null?me:R},[h.closeButton,R]),kn=q.useMemo(()=>h.duration||F||Ly,[h.duration,F]),kt=q.useRef(0),Tt=q.useRef(0),tr=q.useRef(0),Xe=q.useRef(null),[nr,Kt]=W.split("-"),hg=q.useMemo(()=>y.reduce((me,ze,Ze)=>Ze>=_e?me:me+ze.height,0),[y,_e]),pg=ZP(),vC=h.invert||p,wd=j==="loading";Tt.current=q.useMemo(()=>_e*H+hg,[_e,hg]),q.useEffect(()=>{O.current=kn},[kn]),q.useEffect(()=>{xe(!0)},[]),q.useEffect(()=>{let me=J.current;if(me){let ze=me.getBoundingClientRect().height;return T(ze),b(Ze=>[{toastId:h.id,height:ze,position:h.position},...Ze]),()=>b(Ze=>Ze.filter(Mn=>Mn.toastId!==h.id))}},[b,h.id]),q.useLayoutEffect(()=>{if(!Y)return;let me=J.current,ze=me.style.height;me.style.height="auto";let Ze=me.getBoundingClientRect().height;me.style.height=ze,T(Ze),b(Mn=>Mn.find(Ln=>Ln.toastId===h.id)?Mn.map(Ln=>Ln.toastId===h.id?{...Ln,height:Ze}:Ln):[{toastId:h.id,height:Ze,position:h.position},...Mn])},[Y,h.title,h.description,b,h.id]);let Kr=q.useCallback(()=>{ve(!0),qr(Tt.current),b(me=>me.filter(ze=>ze.toastId!==h.id)),setTimeout(()=>{E(h)},cR)},[h,E,b,Tt]);q.useEffect(()=>{if(h.promise&&j==="loading"||h.duration===1/0||h.type==="loading")return;let me;return _||m||ne&&pg?(()=>{if(tr.current<kt.current){let ze=new Date().getTime()-kt.current;O.current=O.current-ze}tr.current=new Date().getTime()})():O.current!==1/0&&(kt.current=new Date().getTime(),me=setTimeout(()=>{var ze;(ze=h.onAutoClose)==null||ze.call(h,h),Kr()},O.current)),()=>clearTimeout(me)},[_,m,h,j,ne,pg,Kr]),q.useEffect(()=>{h.delete&&Kr()},[Kr,h.delete]);function xC(){var me,ze,Ze;return k!=null&&k.loading?q.createElement("div",{className:zn(D==null?void 0:D.loader,(me=h==null?void 0:h.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":j==="loading"},k.loading):V?q.createElement("div",{className:zn(D==null?void 0:D.loader,(ze=h==null?void 0:h.classNames)==null?void 0:ze.loader,"sonner-loader"),"data-visible":j==="loading"},V):q.createElement(HP,{className:zn(D==null?void 0:D.loader,(Ze=h==null?void 0:h.classNames)==null?void 0:Ze.loader),visible:j==="loading"})}return q.createElement("li",{tabIndex:0,ref:J,className:zn(A,ee,D==null?void 0:D.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[j],(n=h==null?void 0:h.classNames)==null?void 0:n[j]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:C,"data-styled":!(h.jsx||h.unstyled||w),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":an,"data-removed":Re,"data-visible":Z,"data-y-position":nr,"data-x-position":Kt,"data-index":x,"data-front":X,"data-swiping":we,"data-dismissible":$,"data-type":j,"data-invert":vC,"data-swipe-out":lt,"data-swipe-direction":Te,"data-expanded":!!(_||M&&Y),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${Re?bn:Tt.current}px`,"--initial-height":M?"auto":`${Sn}px`,...I,...h.style},onDragEnd:()=>{Ce(!1),le(null),Xe.current=null},onPointerDown:me=>{wd||!$||(z.current=new Date,qr(Tt.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(Ce(!0),Xe.current={x:me.clientX,y:me.clientY}))},onPointerUp:()=>{var me,ze,Ze,Mn;if(lt||!$)return;Xe.current=null;let Ln=Number(((me=J.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Gr=Number(((ze=J.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ui=new Date().getTime()-((Ze=z.current)==null?void 0:Ze.getTime()),Dn=N==="x"?Ln:Gr,Qr=Math.abs(Dn)/Ui;if(Math.abs(Dn)>=uR||Qr>.11){qr(Tt.current),(Mn=h.onDismiss)==null||Mn.call(h,h),ye(N==="x"?Ln>0?"right":"left":Gr>0?"down":"up"),Kr(),St(!0),ln(!1);return}Ce(!1),le(null)},onPointerMove:me=>{var ze,Ze,Mn,Ln;if(!Xe.current||!$||((ze=window.getSelection())==null?void 0:ze.toString().length)>0)return;let Gr=me.clientY-Xe.current.y,Ui=me.clientX-Xe.current.x,Dn=(Ze=e.swipeDirections)!=null?Ze:dR(W);!N&&(Math.abs(Ui)>1||Math.abs(Gr)>1)&&le(Math.abs(Ui)>Math.abs(Gr)?"x":"y");let Qr={x:0,y:0};N==="y"?(Dn.includes("top")||Dn.includes("bottom"))&&(Dn.includes("top")&&Gr<0||Dn.includes("bottom")&&Gr>0)&&(Qr.y=Gr):N==="x"&&(Dn.includes("left")||Dn.includes("right"))&&(Dn.includes("left")&&Ui<0||Dn.includes("right")&&Ui>0)&&(Qr.x=Ui),(Math.abs(Qr.x)>0||Math.abs(Qr.y)>0)&&ln(!0),(Mn=J.current)==null||Mn.style.setProperty("--swipe-amount-x",`${Qr.x}px`),(Ln=J.current)==null||Ln.style.setProperty("--swipe-amount-y",`${Qr.y}px`)}},rt&&!h.jsx?q.createElement("button",{"aria-label":re,"data-disabled":wd,"data-close-button":!0,onClick:wd||!$?()=>{}:()=>{var me;Kr(),(me=h.onDismiss)==null||me.call(h,h)},className:zn(D==null?void 0:D.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=k==null?void 0:k.close)!=null?s:QP):null,h.jsx||v.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:q.createElement(q.Fragment,null,j||h.icon||h.promise?q.createElement("div",{"data-icon":"",className:zn(D==null?void 0:D.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||xC():null,h.type!=="loading"?h.icon||(k==null?void 0:k[j])||VP(j):null):null,q.createElement("div",{"data-content":"",className:zn(D==null?void 0:D.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},q.createElement("div",{"data-title":"",className:zn(D==null?void 0:D.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?q.createElement("div",{"data-description":"",className:zn(U,ce,D==null?void 0:D.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),v.isValidElement(h.cancel)?h.cancel:h.cancel&&Bl(h.cancel)?q.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:me=>{var ze,Ze;Bl(h.cancel)&&$&&((Ze=(ze=h.cancel).onClick)==null||Ze.call(ze,me),Kr())},className:zn(D==null?void 0:D.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,v.isValidElement(h.action)?h.action:h.action&&Bl(h.action)?q.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:me=>{var ze,Ze;Bl(h.action)&&((Ze=(ze=h.action).onClick)==null||Ze.call(ze,me),!me.defaultPrevented&&Kr())},className:zn(D==null?void 0:D.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function Dy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hR(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?oR:sR;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var pR=v.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:f,duration:p,style:h,visibleToasts:w=iR,toastOptions:m,dir:b=Dy(),gap:g=lR,loadingIcon:y,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[E,C]=q.useState([]),R=q.useMemo(()=>Array.from(new Set([r].concat(E.filter(ne=>ne.position).map(ne=>ne.position)))),[E,r]),[I,P]=q.useState([]),[L,A]=q.useState(!1),[U,F]=q.useState(!1),[W,H]=q.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=q.useRef(null),M=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=q.useRef(null),k=q.useRef(!1),re=q.useCallback(ne=>{C(N=>{var le;return(le=N.find(Te=>Te.id===ne.id))!=null&&le.delete||Yt.dismiss(ne.id),N.filter(({id:Te})=>Te!==ne.id)})},[]);return q.useEffect(()=>Yt.subscribe(ne=>{if(ne.dismiss){C(N=>N.map(le=>le.id===ne.id?{...le,delete:!0}:le));return}setTimeout(()=>{h1.flushSync(()=>{C(N=>{let le=N.findIndex(Te=>Te.id===ne.id);return le!==-1?[...N.slice(0,le),{...N[le],...ne},...N.slice(le+1)]:[ne,...N]})})})}),[]),q.useEffect(()=>{if(c!=="system"){H(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:N})=>{H(N?"dark":"light")})}catch{ne.addListener(({matches:le})=>{try{H(le?"dark":"light")}catch(Te){console.error(Te)}})}},[c]),q.useEffect(()=>{E.length<=1&&A(!1)},[E]),q.useEffect(()=>{let ne=N=>{var le,Te;i.every(ye=>N[ye]||N.code===ye)&&(A(!0),(le=V.current)==null||le.focus()),N.code==="Escape"&&(document.activeElement===V.current||(Te=V.current)!=null&&Te.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[i]),q.useEffect(()=>{if(V.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,k.current=!1)}},[V.current]),q.createElement("section",{ref:t,"aria-label":`${S} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((ne,N)=>{var le;let[Te,ye]=ne.split("-");return E.length?q.createElement("ol",{key:ne,dir:b==="auto"?Dy():b,tabIndex:-1,ref:V,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":Te,"data-lifted":L&&E.length>1&&!s,"data-x-position":ye,style:{"--front-toast-height":`${((le=I[0])==null?void 0:le.height)||0}px`,"--width":`${aR}px`,"--gap":`${g}px`,...h,...hR(l,u)},onBlur:Y=>{k.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(k.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||k.current||(k.current=!0,D.current=Y.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{U||A(!1)},onDragEnd:()=>A(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},E.filter(Y=>!Y.position&&N===0||Y.position===ne).map((Y,xe)=>{var Re,ve;return q.createElement(fR,{key:Y.id,icons:x,index:xe,toast:Y,defaultRichColors:f,duration:(Re=m==null?void 0:m.duration)!=null?Re:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:w,closeButton:(ve=m==null?void 0:m.closeButton)!=null?ve:o,interacting:U,position:ne,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:re,toasts:E.filter(we=>we.position==Y.position),heights:I.filter(we=>we.position==Y.position),setHeights:P,expandByDefault:s,gap:g,loadingIcon:y,expanded:L,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const mR=({...e})=>{const{theme:t="system"}=BP();return d.jsx(pR,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var gR=wp[" useId ".trim().toString()]||(()=>{}),yR=0;function Lr(e){const[t,n]=v.useState(gR());return bt(()=>{n(r=>r??String(yR++))},[e]),t?`radix-${t}`:""}const vR=["top","right","bottom","left"],Ii=Math.min,fn=Math.max,Yu=Math.round,Vl=Math.floor,yr=e=>({x:e,y:e}),xR={left:"right",right:"left",bottom:"top",top:"bottom"},wR={start:"end",end:"start"};function jh(e,t,n){return fn(e,Ii(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function Vr(e){return e.split("-")[0]}function zo(e){return e.split("-")[1]}function ym(e){return e==="x"?"y":"x"}function vm(e){return e==="y"?"height":"width"}const bR=new Set(["top","bottom"]);function hr(e){return bR.has(Vr(e))?"y":"x"}function xm(e){return ym(hr(e))}function SR(e,t,n){n===void 0&&(n=!1);const r=zo(e),i=xm(e),s=vm(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Xu(o)),[o,Xu(o)]}function kR(e){const t=Xu(e);return[Ah(e),t,Ah(t)]}function Ah(e){return e.replace(/start|end/g,t=>wR[t])}const Fy=["left","right"],zy=["right","left"],ER=["top","bottom"],CR=["bottom","top"];function _R(e,t,n){switch(e){case"top":case"bottom":return n?t?zy:Fy:t?Fy:zy;case"left":case"right":return t?ER:CR;default:return[]}}function NR(e,t,n,r){const i=zo(e);let s=_R(Vr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ah)))),s}function Xu(e){return e.replace(/left|right|bottom|top/g,t=>xR[t])}function TR(e){return{top:0,right:0,bottom:0,left:0,...e}}function sb(e){return typeof e!="number"?TR(e):{top:e,right:e,bottom:e,left:e}}function Ju(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $y(e,t,n){let{reference:r,floating:i}=e;const s=hr(t),o=xm(t),a=vm(o),l=Vr(t),u=s==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(zo(t)){case"start":h[o]-=p*(n&&u?-1:1);break;case"end":h[o]+=p*(n&&u?-1:1);break}return h}const PR=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=$y(u,r,l),p=r,h={},w=0;for(let m=0;m<a.length;m++){const{name:b,fn:g}=a[m],{x:y,y:x,data:S,reset:_}=await g({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=y??c,f=x??f,h={...h,[b]:{...h[b],...S}},_&&w<=50&&(w++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:f}=$y(u,p,l)),m=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:h}};async function Qa(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Br(t,e),w=sb(h),b=a[p?f==="floating"?"reference":"floating":f],g=Ju(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},_=Ju(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(g.top-_.top+w.top)/S.y,bottom:(_.bottom-g.bottom+w.bottom)/S.y,left:(g.left-_.left+w.left)/S.x,right:(_.right-g.right+w.right)/S.x}}const RR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Br(e,t)||{};if(u==null)return{};const f=sb(c),p={x:n,y:r},h=xm(i),w=vm(h),m=await o.getDimensions(u),b=h==="y",g=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=s.reference[w]+s.reference[h]-p[h]-s.floating[w],_=p[h]-s.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=E?E[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(E)))&&(C=a.floating[x]||s.floating[w]);const R=S/2-_/2,I=C/2-m[w]/2-1,P=Ii(f[g],I),L=Ii(f[y],I),A=P,U=C-m[w]-L,F=C/2-m[w]/2+R,W=jh(A,F,U),H=!l.arrow&&zo(i)!=null&&F!==W&&s.reference[w]/2-(F<A?P:L)-m[w]/2<0,V=H?F<A?F-A:F-U:0;return{[h]:p[h]+V,data:{[h]:W,centerOffset:F-W-V,...H&&{alignmentOffset:V}},reset:H}}}),jR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...b}=Br(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Vr(i),y=hr(a),x=Vr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(x||!m?[Xu(a)]:kR(a)),E=w!=="none";!p&&E&&_.push(...NR(a,m,w,S));const C=[a,..._],R=await Qa(t,b),I=[];let P=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&I.push(R[g]),f){const F=SR(i,o,S);I.push(R[F[0]],R[F[1]])}if(P=[...P,{placement:i,overflows:I}],!I.every(F=>F<=0)){var L,A;const F=(((L=s.flip)==null?void 0:L.index)||0)+1,W=C[F];if(W&&(!(f==="alignment"?y!==hr(W):!1)||P.every(M=>M.overflows[0]>0&&hr(M.placement)===y)))return{data:{index:F,overflows:P},reset:{placement:W}};let H=(A=P.filter(V=>V.overflows[0]<=0).sort((V,M)=>V.overflows[1]-M.overflows[1])[0])==null?void 0:A.placement;if(!H)switch(h){case"bestFit":{var U;const V=(U=P.filter(M=>{if(E){const D=hr(M.placement);return D===y||D==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(D=>D>0).reduce((D,k)=>D+k,0)]).sort((M,D)=>M[1]-D[1])[0])==null?void 0:U[0];V&&(H=V);break}case"initialPlacement":H=a;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function By(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vy(e){return vR.some(t=>e[t]>=0)}const AR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Br(e,t);switch(r){case"referenceHidden":{const s=await Qa(t,{...i,elementContext:"reference"}),o=By(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Vy(o)}}}case"escaped":{const s=await Qa(t,{...i,altBoundary:!0}),o=By(s,n.floating);return{data:{escapedOffsets:o,escaped:Vy(o)}}}default:return{}}}}},ob=new Set(["left","top"]);async function IR(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Vr(n),a=zo(n),l=hr(n)==="y",u=ob.has(o)?-1:1,c=s&&l?-1:1,f=Br(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(h=a==="end"?w*-1:w),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}const OR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await IR(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},MR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...l}=Br(e,t),u={x:n,y:r},c=await Qa(t,l),f=hr(Vr(i)),p=ym(f);let h=u[p],w=u[f];if(s){const b=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=h+c[b],x=h-c[g];h=jh(y,h,x)}if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=w+c[b],x=w-c[g];w=jh(y,w,x)}const m=a.fn({...t,[p]:h,[f]:w});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:o}}}}}},LR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Br(e,t),c={x:n,y:r},f=hr(i),p=ym(f);let h=c[p],w=c[f];const m=Br(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",S=s.reference[p]-s.floating[x]+b.mainAxis,_=s.reference[p]+s.reference[x]-b.mainAxis;h<S?h=S:h>_&&(h=_)}if(u){var g,y;const x=p==="y"?"width":"height",S=ob.has(Vr(i)),_=s.reference[f]-s.floating[x]+(S&&((g=o.offset)==null?void 0:g[f])||0)+(S?0:b.crossAxis),E=s.reference[f]+s.reference[x]+(S?0:((y=o.offset)==null?void 0:y[f])||0)-(S?b.crossAxis:0);w<_?w=_:w>E&&(w=E)}return{[p]:h,[f]:w}}}},DR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Br(e,t),c=await Qa(t,u),f=Vr(i),p=zo(i),h=hr(i)==="y",{width:w,height:m}=s.floating;let b,g;f==="top"||f==="bottom"?(b=f,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,b=p==="end"?"top":"bottom");const y=m-c.top-c.bottom,x=w-c.left-c.right,S=Ii(m-c[b],y),_=Ii(w-c[g],x),E=!t.middlewareData.shift;let C=S,R=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),E&&!p){const P=fn(c.left,0),L=fn(c.right,0),A=fn(c.top,0),U=fn(c.bottom,0);h?R=w-2*(P!==0||L!==0?P+L:fn(c.left,c.right)):C=m-2*(A!==0||U!==0?A+U:fn(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:C});const I=await o.getDimensions(a.floating);return w!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Kc(){return typeof window<"u"}function $o(e){return ab(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(ab(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ab(e){return Kc()?e instanceof Node||e instanceof gn(e).Node:!1}function Xn(e){return Kc()?e instanceof Element||e instanceof gn(e).Element:!1}function wr(e){return Kc()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function Uy(e){return!Kc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}const FR=new Set(["inline","contents"]);function ml(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!FR.has(i)}const zR=new Set(["table","td","th"]);function $R(e){return zR.has($o(e))}const BR=[":popover-open",":modal"];function Gc(e){return BR.some(t=>{try{return e.matches(t)}catch{return!1}})}const VR=["transform","translate","scale","rotate","perspective"],UR=["transform","translate","scale","rotate","perspective","filter"],HR=["paint","layout","strict","content"];function wm(e){const t=bm(),n=Xn(e)?Jn(e):e;return VR.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||UR.some(r=>(n.willChange||"").includes(r))||HR.some(r=>(n.contain||"").includes(r))}function WR(e){let t=Oi(e);for(;wr(t)&&!_o(t);){if(wm(t))return t;if(Gc(t))return null;t=Oi(t)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qR=new Set(["html","body","#document"]);function _o(e){return qR.has($o(e))}function Jn(e){return gn(e).getComputedStyle(e)}function Qc(e){return Xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oi(e){if($o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uy(e)&&e.host||kr(e);return Uy(t)?t.host:t}function lb(e){const t=Oi(e);return _o(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&ml(t)?t:lb(t)}function Za(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lb(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=gn(i);if(s){const a=Ih(o);return t.concat(o,o.visualViewport||[],ml(i)?i:[],a&&n?Za(a):[])}return t.concat(i,Za(i,[],n))}function Ih(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ub(e){const t=Jn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=wr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Yu(n)!==s||Yu(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Sm(e){return Xn(e)?e:e.contextElement}function no(e){const t=Sm(e);if(!wr(t))return yr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=ub(t);let o=(s?Yu(n.width):n.width)/r,a=(s?Yu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const KR=yr(0);function cb(e){const t=gn(e);return!bm()||!t.visualViewport?KR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function ms(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Sm(e);let o=yr(1);t&&(r?Xn(r)&&(o=no(r)):o=no(e));const a=GR(s,n,r)?cb(s):yr(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(s){const p=gn(s),h=r&&Xn(r)?gn(r):r;let w=p,m=Ih(w);for(;m&&r&&h!==w;){const b=no(m),g=m.getBoundingClientRect(),y=Jn(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,S=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,f*=b.y,l+=x,u+=S,w=gn(m),m=Ih(w)}}return Ju({width:c,height:f,x:l,y:u})}function km(e,t){const n=Qc(e).scrollLeft;return t?t.left+n:ms(kr(e)).left+n}function db(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:km(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function QR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=kr(r),a=t?Gc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=yr(1);const c=yr(0),f=wr(r);if((f||!f&&!s)&&(($o(r)!=="body"||ml(o))&&(l=Qc(r)),wr(r))){const h=ms(r);u=no(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const p=o&&!f&&!s?db(o,l,!0):yr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function ZR(e){return Array.from(e.getClientRects())}function YR(e){const t=kr(e),n=Qc(e),r=e.ownerDocument.body,i=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+km(e);const a=-n.scrollTop;return Jn(r).direction==="rtl"&&(o+=fn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function XR(e,t){const n=gn(e),r=kr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=bm();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}const JR=new Set(["absolute","fixed"]);function ej(e,t){const n=ms(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=wr(e)?no(e):yr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function Hy(e,t,n){let r;if(t==="viewport")r=XR(e,n);else if(t==="document")r=YR(kr(e));else if(Xn(t))r=ej(t,n);else{const i=cb(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ju(r)}function fb(e,t){const n=Oi(e);return n===t||!Xn(n)||_o(n)?!1:Jn(n).position==="fixed"||fb(n,t)}function tj(e,t){const n=t.get(e);if(n)return n;let r=Za(e,[],!1).filter(a=>Xn(a)&&$o(a)!=="body"),i=null;const s=Jn(e).position==="fixed";let o=s?Oi(e):e;for(;Xn(o)&&!_o(o);){const a=Jn(o),l=wm(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&JR.has(i.position)||ml(o)&&!l&&fb(e,o))?r=r.filter(c=>c!==o):i=a,o=Oi(o)}return t.set(e,r),r}function nj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Gc(t)?[]:tj(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const f=Hy(t,c,i);return u.top=fn(f.top,u.top),u.right=Ii(f.right,u.right),u.bottom=Ii(f.bottom,u.bottom),u.left=fn(f.left,u.left),u},Hy(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rj(e){const{width:t,height:n}=ub(e);return{width:t,height:n}}function ij(e,t,n){const r=wr(t),i=kr(t),s=n==="fixed",o=ms(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=yr(0);function u(){l.x=km(i)}if(r||!r&&!s)if(($o(t)!=="body"||ml(i))&&(a=Qc(t)),r){const h=ms(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const c=i&&!r&&!s?db(i,a):yr(0),f=o.left+a.scrollLeft-l.x-c.x,p=o.top+a.scrollTop-l.y-c.y;return{x:f,y:p,width:o.width,height:o.height}}function Xd(e){return Jn(e).position==="static"}function Wy(e,t){if(!wr(e)||Jn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function hb(e,t){const n=gn(e);if(Gc(e))return n;if(!wr(e)){let i=Oi(e);for(;i&&!_o(i);){if(Xn(i)&&!Xd(i))return i;i=Oi(i)}return n}let r=Wy(e,t);for(;r&&$R(r)&&Xd(r);)r=Wy(r,t);return r&&_o(r)&&Xd(r)&&!wm(r)?n:r||WR(e)||n}const sj=async function(e){const t=this.getOffsetParent||hb,n=this.getDimensions,r=await n(e.floating);return{reference:ij(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oj(e){return Jn(e).direction==="rtl"}const aj={convertOffsetParentRelativeRectToViewportRelativeRect:QR,getDocumentElement:kr,getClippingRect:nj,getOffsetParent:hb,getElementRects:sj,getClientRects:ZR,getDimensions:rj,getScale:no,isElement:Xn,isRTL:oj};function pb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lj(e,t){let n=null,r;const i=kr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:h}=u;if(a||t(),!p||!h)return;const w=Vl(f),m=Vl(i.clientWidth-(c+p)),b=Vl(i.clientHeight-(f+h)),g=Vl(c),x={rootMargin:-w+"px "+-m+"px "+-b+"px "+-g+"px",threshold:fn(0,Ii(1,l))||1};let S=!0;function _(E){const C=E[0].intersectionRatio;if(C!==l){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!pb(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,x)}n.observe(e)}return o(!0),s}function uj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Sm(e),c=i||s?[...u?Za(u):[],...Za(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=u&&a?lj(u,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let w,m=l?ms(e):null;l&&b();function b(){const g=ms(e);m&&!pb(m,g)&&n(),m=g,w=requestAnimationFrame(b)}return n(),()=>{var g;c.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(w)}}const cj=OR,dj=MR,fj=jR,hj=DR,pj=AR,qy=RR,mj=LR,gj=(e,t,n)=>{const r=new Map,i={platform:aj,...n},s={...i.platform,_c:r};return PR(e,t,{...i,platform:s})};var yj=typeof document<"u",vj=function(){},vu=yj?v.useLayoutEffect:vj;function ec(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ec(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!ec(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function mb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ky(e,t){const n=mb(e);return Math.round(t*n)/n}function Jd(e){const t=v.useRef(e);return vu(()=>{t.current=e}),t}function xj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=v.useState(r);ec(p,r)||h(r);const[w,m]=v.useState(null),[b,g]=v.useState(null),y=v.useCallback(M=>{M!==E.current&&(E.current=M,m(M))},[]),x=v.useCallback(M=>{M!==C.current&&(C.current=M,g(M))},[]),S=s||w,_=o||b,E=v.useRef(null),C=v.useRef(null),R=v.useRef(c),I=l!=null,P=Jd(l),L=Jd(i),A=Jd(u),U=v.useCallback(()=>{if(!E.current||!C.current)return;const M={placement:t,strategy:n,middleware:p};L.current&&(M.platform=L.current),gj(E.current,C.current,M).then(D=>{const k={...D,isPositioned:A.current!==!1};F.current&&!ec(R.current,k)&&(R.current=k,Cs.flushSync(()=>{f(k)}))})},[p,t,n,L,A]);vu(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const F=v.useRef(!1);vu(()=>(F.current=!0,()=>{F.current=!1}),[]),vu(()=>{if(S&&(E.current=S),_&&(C.current=_),S&&_){if(P.current)return P.current(S,_,U);U()}},[S,_,U,P,I]);const W=v.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:x}),[y,x]),H=v.useMemo(()=>({reference:S,floating:_}),[S,_]),V=v.useMemo(()=>{const M={position:n,left:0,top:0};if(!H.floating)return M;const D=Ky(H.floating,c.x),k=Ky(H.floating,c.y);return a?{...M,transform:"translate("+D+"px, "+k+"px)",...mb(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:k}},[n,a,H.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:U,refs:W,elements:H,floatingStyles:V}),[c,U,W,H,V])}const wj=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qy({element:r.current,padding:i}).fn(n):{}:r?qy({element:r,padding:i}).fn(n):{}}}},bj=(e,t)=>({...cj(e),options:[e,t]}),Sj=(e,t)=>({...dj(e),options:[e,t]}),kj=(e,t)=>({...mj(e),options:[e,t]}),Ej=(e,t)=>({...fj(e),options:[e,t]}),Cj=(e,t)=>({...hj(e),options:[e,t]}),_j=(e,t)=>({...pj(e),options:[e,t]}),Nj=(e,t)=>({...wj(e),options:[e,t]});var Tj="Arrow",gb=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return d.jsx(fe.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});gb.displayName=Tj;var Pj=gb;function yb(e){const[t,n]=v.useState(void 0);return bt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Em="Popper",[vb,Zc]=Sr(Em),[Rj,xb]=vb(Em),wb=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return d.jsx(Rj,{scope:t,anchor:r,onAnchorChange:i,children:n})};wb.displayName=Em;var bb="PopperAnchor",Sb=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=xb(bb,n),o=v.useRef(null),a=Fe(t,o);return v.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:d.jsx(fe.div,{...i,ref:a})});Sb.displayName=bb;var Cm="PopperContent",[jj,Aj]=vb(Cm),kb=v.forwardRef((e,t)=>{var Y,xe,Re,ve,we,Ce;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:w,...m}=e,b=xb(Cm,n),[g,y]=v.useState(null),x=Fe(t,lt=>y(lt)),[S,_]=v.useState(null),E=yb(S),C=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,I=r+(s!=="center"?"-"+s:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],A=L.length>0,U={padding:P,boundary:L.filter(Oj),altBoundary:A},{refs:F,floatingStyles:W,placement:H,isPositioned:V,middlewareData:M}=xj({strategy:"fixed",placement:I,whileElementsMounted:(...lt)=>uj(...lt,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[bj({mainAxis:i+R,alignmentAxis:o}),l&&Sj({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?kj():void 0,...U}),l&&Ej({...U}),Cj({...U,apply:({elements:lt,rects:St,availableWidth:an,availableHeight:ln})=>{const{width:bn,height:qr}=St.reference,Sn=lt.floating.style;Sn.setProperty("--radix-popper-available-width",`${an}px`),Sn.setProperty("--radix-popper-available-height",`${ln}px`),Sn.setProperty("--radix-popper-anchor-width",`${bn}px`),Sn.setProperty("--radix-popper-anchor-height",`${qr}px`)}}),S&&Nj({element:S,padding:a}),Mj({arrowWidth:C,arrowHeight:R}),p&&_j({strategy:"referenceHidden",...U})]}),[D,k]=_b(H),re=In(w);bt(()=>{V&&(re==null||re())},[V,re]);const ne=(Y=M.arrow)==null?void 0:Y.x,N=(xe=M.arrow)==null?void 0:xe.y,le=((Re=M.arrow)==null?void 0:Re.centerOffset)!==0,[Te,ye]=v.useState();return bt(()=>{g&&ye(window.getComputedStyle(g).zIndex)},[g]),d.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:V?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Te,"--radix-popper-transform-origin":[(ve=M.transformOrigin)==null?void 0:ve.x,(we=M.transformOrigin)==null?void 0:we.y].join(" "),...((Ce=M.hide)==null?void 0:Ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(jj,{scope:n,placedSide:D,onArrowChange:_,arrowX:ne,arrowY:N,shouldHideArrow:le,children:d.jsx(fe.div,{"data-side":D,"data-align":k,...m,ref:x,style:{...m.style,animation:V?void 0:"none"}})})})});kb.displayName=Cm;var Eb="PopperArrow",Ij={top:"bottom",right:"left",bottom:"top",left:"right"},Cb=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=Aj(Eb,r),o=Ij[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(Pj,{...i,ref:n,style:{...i.style,display:"block"}})})});Cb.displayName=Eb;function Oj(e){return e!==null}var Mj=e=>({name:"transformOrigin",options:e,fn(t){var b,g,y;const{placement:n,rects:r,middlewareData:i}=t,o=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=_b(n),f={start:"0%",center:"50%",end:"100%"}[c],p=(((g=i.arrow)==null?void 0:g.x)??0)+a/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let w="",m="";return u==="bottom"?(w=o?f:`${p}px`,m=`${-l}px`):u==="top"?(w=o?f:`${p}px`,m=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=o?f:`${h}px`):u==="left"&&(w=`${r.floating.width+l}px`,m=o?f:`${h}px`),{data:{x:w,y:m}}}});function _b(e){const[t,n="center"]=e.split("-");return[t,n]}var Lj=wb,Nb=Sb,Tb=kb,Pb=Cb,[Yc,sz]=Sr("Tooltip",[Zc]),_m=Zc(),Rb="TooltipProvider",Dj=700,Gy="tooltip.open",[Fj,jb]=Yc(Rb),Ab=e=>{const{__scopeTooltip:t,delayDuration:n=Dj,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,o=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Fj,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(u=>{a.current=u},[]),disableHoverableContent:i,children:s})};Ab.displayName=Rb;var Ib="Tooltip",[oz,Xc]=Yc(Ib),Oh="TooltipTrigger",zj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Xc(Oh,n),s=jb(Oh,n),o=_m(n),a=v.useRef(null),l=Fe(t,a,i.onTriggerChange),u=v.useRef(!1),c=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.jsx(Nb,{asChild:!0,...o,children:d.jsx(fe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:ue(e.onPointerMove,p=>{p.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ue(e.onBlur,i.onClose),onClick:ue(e.onClick,i.onClose)})})});zj.displayName=Oh;var $j="TooltipPortal",[az,Bj]=Yc($j,{forceMount:void 0}),No="TooltipContent",Ob=v.forwardRef((e,t)=>{const n=Bj(No,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=Xc(No,e.__scopeTooltip);return d.jsx(Wr,{present:r||o.open,children:o.disableHoverableContent?d.jsx(Mb,{side:i,...s,ref:t}):d.jsx(Vj,{side:i,...s,ref:t})})}),Vj=v.forwardRef((e,t)=>{const n=Xc(No,e.__scopeTooltip),r=jb(No,e.__scopeTooltip),i=v.useRef(null),s=Fe(t,i),[o,a]=v.useState(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:f}=r,p=v.useCallback(()=>{a(null),f(!1)},[f]),h=v.useCallback((w,m)=>{const b=w.currentTarget,g={x:w.clientX,y:w.clientY},y=Kj(g,b.getBoundingClientRect()),x=Gj(g,y),S=Qj(m.getBoundingClientRect()),_=Yj([...x,...S]);a(_),f(!0)},[f]);return v.useEffect(()=>()=>p(),[p]),v.useEffect(()=>{if(l&&c){const w=b=>h(b,c),m=b=>h(b,l);return l.addEventListener("pointerleave",w),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),c.removeEventListener("pointerleave",m)}}},[l,c,h,p]),v.useEffect(()=>{if(o){const w=m=>{const b=m.target,g={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),x=!Zj(g,o);y?p():x&&(p(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,c,o,u,p]),d.jsx(Mb,{...e,ref:s})}),[Uj,Hj]=Yc(Ib,{isInside:!1}),Wj=rT("TooltipContent"),Mb=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=Xc(No,n),u=_m(n),{onClose:c}=l;return v.useEffect(()=>(document.addEventListener(Gy,c),()=>document.removeEventListener(Gy,c)),[c]),v.useEffect(()=>{if(l.trigger){const f=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),d.jsx(fl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:d.jsxs(Tb,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[d.jsx(Wj,{children:r}),d.jsx(Uj,{scope:n,isInside:!0,children:d.jsx(CT,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Ob.displayName=No;var Lb="TooltipArrow",qj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=_m(n);return Hj(Lb,n).isInside?null:d.jsx(Pb,{...i,...r,ref:t})});qj.displayName=Lb;function Kj(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Gj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Qj(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Zj(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s],l=t[o],u=a.x,c=a.y,f=l.x,p=l.y;c>r!=p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=!i)}return i}function Yj(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Xj(t)}function Xj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Jj=Ab,Db=Ob;const eA=Jj,tA=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(Db,{ref:r,sideOffset:t,className:ke("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",e),...n}));tA.displayName=Db.displayName;var Jc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ed=typeof window>"u"||"Deno"in globalThis;function Vn(){}function nA(e,t){return typeof e=="function"?e(t):e}function rA(e){return typeof e=="number"&&e>=0&&e!==1/0}function iA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mh(e,t){return typeof e=="function"?e(t):e}function sA(e,t){return typeof e=="function"?e(t):e}function Qy(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Nm(o,t.options))return!1}else if(!Xa(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Zy(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ya(t.options.mutationKey)!==Ya(s))return!1}else if(!Xa(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Nm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ya)(e)}function Ya(e){return JSON.stringify(e,(t,n)=>Lh(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xa(e[n],t[n])):!1}function Fb(e,t){if(e===t)return e;const n=Yy(e)&&Yy(t);if(n||Lh(e)&&Lh(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let u=0;for(let c=0;c<o;c++){const f=n?c:s[c];(!n&&l.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,u++):(a[f]=Fb(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&u++)}return i===o&&u===i?e:a}return t}function Yy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lh(e){if(!Xy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Xy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Xy(e){return Object.prototype.toString.call(e)==="[object Object]"}function oA(e){return new Promise(t=>{setTimeout(t,e)})}function aA(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Fb(e,t):t}function lA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function uA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tm=Symbol();function zb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ns,ui,uo,Kx,cA=(Kx=class extends Jc{constructor(){super();Ie(this,ns);Ie(this,ui);Ie(this,uo);ge(this,uo,t=>{if(!ed&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){B(this,ui)||this.setEventListener(B(this,uo))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,ui))==null||t.call(this),ge(this,ui,void 0))}setEventListener(t){var n;ge(this,uo,t),(n=B(this,ui))==null||n.call(this),ge(this,ui,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,ns)!==t&&(ge(this,ns,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof B(this,ns)=="boolean"?B(this,ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ns=new WeakMap,ui=new WeakMap,uo=new WeakMap,Kx),$b=new cA,co,ci,fo,Gx,dA=(Gx=class extends Jc{constructor(){super();Ie(this,co,!0);Ie(this,ci);Ie(this,fo);ge(this,fo,t=>{if(!ed&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,ci)||this.setEventListener(B(this,fo))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,ci))==null||t.call(this),ge(this,ci,void 0))}setEventListener(t){var n;ge(this,fo,t),(n=B(this,ci))==null||n.call(this),ge(this,ci,t(this.setOnline.bind(this)))}setOnline(t){B(this,co)!==t&&(ge(this,co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return B(this,co)}},co=new WeakMap,ci=new WeakMap,fo=new WeakMap,Gx),tc=new dA;function fA(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function hA(e){return Math.min(1e3*2**e,3e4)}function Bb(e){return(e??"online")==="online"?tc.isOnline():!0}var Vb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ef(e){return e instanceof Vb}function Ub(e){let t=!1,n=0,r=!1,i;const s=fA(),o=m=>{var b;r||(p(new Vb(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>$b.isFocused()&&(e.networkMode==="always"||tc.isOnline())&&e.canRun(),c=()=>Bb(e.networkMode)&&e.canRun(),f=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),s.resolve(m))},p=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var b;i=g=>{(r||u())&&m(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),w=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(f).catch(g=>{var E;if(r)return;const y=e.retry??(ed?0:3),x=e.retryDelay??hA,S=typeof x=="function"?x(n,g):x,_=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);if(t||!_){p(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),oA(S).then(()=>u()?void 0:h()).then(()=>{t?p(g):w()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?w():h().then(w),s)}}var pA=e=>setTimeout(e,0);function mA(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=pA;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Vt=mA(),rs,Qx,Hb=(Qx=class{constructor(){Ie(this,rs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rA(this.gcTime)&&ge(this,rs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ed?1/0:5*60*1e3))}clearGcTimeout(){B(this,rs)&&(clearTimeout(B(this,rs)),ge(this,rs,void 0))}},rs=new WeakMap,Qx),ho,is,Cn,ss,At,sl,os,Un,Nr,Zx,gA=(Zx=class extends Hb{constructor(t){super();Ie(this,Un);Ie(this,ho);Ie(this,is);Ie(this,Cn);Ie(this,ss);Ie(this,At);Ie(this,sl);Ie(this,os);ge(this,os,!1),ge(this,sl,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,ss,t.client),ge(this,Cn,B(this,ss).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,ho,vA(this.options)),this.state=t.state??B(this,ho),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,At))==null?void 0:t.promise}setOptions(t){this.options={...B(this,sl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,Cn).remove(this)}setData(t,n){const r=aA(this.state.data,t,this.options);return Pt(this,Un,Nr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Pt(this,Un,Nr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=B(this,At))==null?void 0:r.promise;return(i=B(this,At))==null||i.cancel(t),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(B(this,ho))}isActive(){return this.observers.some(t=>sA(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mh(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:!iA(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,At))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,At))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,Cn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(B(this,At)&&(B(this,os)?B(this,At).cancel({revert:!0}):B(this,At).cancelRetry()),this.scheduleGc()),B(this,Cn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pt(this,Un,Nr).call(this,{type:"invalidate"})}fetch(t,n){var u,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(B(this,At))return B(this,At).continueRetry(),B(this,At).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,i=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ge(this,os,!0),r.signal)})},s=()=>{const p=zb(this.options,n),w=(()=>{const m={client:B(this,ss),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return ge(this,os,!1),this.options.persister?this.options.persister(p,w,this):p(w)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:B(this,ss),state:this.state,fetchFn:s};return i(p),p})();(u=this.options.behavior)==null||u.onFetch(a,this),ge(this,is,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Pt(this,Un,Nr).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=p=>{var h,w,m,b;ef(p)&&p.silent||Pt(this,Un,Nr).call(this,{type:"error",error:p}),ef(p)||((w=(h=B(this,Cn).config).onError)==null||w.call(h,p,this),(b=(m=B(this,Cn).config).onSettled)==null||b.call(m,this.state.data,p,this)),this.scheduleGc()};return ge(this,At,Ub({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var h,w,m,b;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(g){l(g);return}(w=(h=B(this,Cn).config).onSuccess)==null||w.call(h,p,this),(b=(m=B(this,Cn).config).onSettled)==null||b.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{Pt(this,Un,Nr).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{Pt(this,Un,Nr).call(this,{type:"pause"})},onContinue:()=>{Pt(this,Un,Nr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),B(this,At).start()}},ho=new WeakMap,is=new WeakMap,Cn=new WeakMap,ss=new WeakMap,At=new WeakMap,sl=new WeakMap,os=new WeakMap,Un=new WeakSet,Nr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...yA(r.data,this.options),fetchMeta:t.meta??null};case"success":return ge(this,is,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return ef(i)&&i.revert&&B(this,is)?{...B(this,is),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,Cn).notify({query:this,type:"updated",action:t})})},Zx);function yA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ar,Yx,xA=(Yx=class extends Jc{constructor(t={}){super();Ie(this,ar);this.config=t,ge(this,ar,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Nm(i,n);let o=this.get(s);return o||(o=new gA({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){B(this,ar).has(t.queryHash)||(B(this,ar).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=B(this,ar).get(t.queryHash);n&&(t.destroy(),n===t&&B(this,ar).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,ar).get(t)}getAll(){return[...B(this,ar).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Qy(t,r)):n}notify(t){Vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ar=new WeakMap,Yx),lr,Dt,as,ur,ti,Xx,wA=(Xx=class extends Hb{constructor(t){super();Ie(this,ur);Ie(this,lr);Ie(this,Dt);Ie(this,as);this.mutationId=t.mutationId,ge(this,Dt,t.mutationCache),ge(this,lr,[]),this.state=t.state||bA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,lr).includes(t)||(B(this,lr).push(t),this.clearGcTimeout(),B(this,Dt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,lr,B(this,lr).filter(n=>n!==t)),this.scheduleGc(),B(this,Dt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,lr).length||(this.state.status==="pending"?this.scheduleGc():B(this,Dt).remove(this))}continue(){var t;return((t=B(this,as))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,c,f,p,h,w,m,b,g,y,x,S,_,E,C,R;const n=()=>{Pt(this,ur,ti).call(this,{type:"continue"})};ge(this,as,Ub({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,P)=>{Pt(this,ur,ti).call(this,{type:"failed",failureCount:I,error:P})},onPause:()=>{Pt(this,ur,ti).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,Dt).canRun(this)}));const r=this.state.status==="pending",i=!B(this,as).canStart();try{if(r)n();else{Pt(this,ur,ti).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(s=B(this,Dt).config).onMutate)==null?void 0:o.call(s,t,this));const P=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));P!==this.state.context&&Pt(this,ur,ti).call(this,{type:"pending",context:P,variables:t,isPaused:i})}const I=await B(this,as).start();return await((c=(u=B(this,Dt).config).onSuccess)==null?void 0:c.call(u,I,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,I,t,this.state.context)),await((w=(h=B(this,Dt).config).onSettled)==null?void 0:w.call(h,I,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,I,null,t,this.state.context)),Pt(this,ur,ti).call(this,{type:"success",data:I}),I}catch(I){try{throw await((y=(g=B(this,Dt).config).onError)==null?void 0:y.call(g,I,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,I,t,this.state.context)),await((E=(_=B(this,Dt).config).onSettled)==null?void 0:E.call(_,void 0,I,this.state.variables,this.state.context,this)),await((R=(C=this.options).onSettled)==null?void 0:R.call(C,void 0,I,t,this.state.context)),I}finally{Pt(this,ur,ti).call(this,{type:"error",error:I})}}finally{B(this,Dt).runNext(this)}}},lr=new WeakMap,Dt=new WeakMap,as=new WeakMap,ur=new WeakSet,ti=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Vt.batch(()=>{B(this,lr).forEach(r=>{r.onMutationUpdate(t)}),B(this,Dt).notify({mutation:this,type:"updated",action:t})})},Xx);function bA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jr,Hn,ol,Jx,SA=(Jx=class extends Jc{constructor(t={}){super();Ie(this,jr);Ie(this,Hn);Ie(this,ol);this.config=t,ge(this,jr,new Set),ge(this,Hn,new Map),ge(this,ol,0)}build(t,n,r){const i=new wA({mutationCache:this,mutationId:++bl(this,ol)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){B(this,jr).add(t);const n=Ul(t);if(typeof n=="string"){const r=B(this,Hn).get(n);r?r.push(t):B(this,Hn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,jr).delete(t)){const n=Ul(t);if(typeof n=="string"){const r=B(this,Hn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&B(this,Hn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ul(t);if(typeof n=="string"){const r=B(this,Hn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Ul(t);if(typeof n=="string"){const i=(r=B(this,Hn).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Vt.batch(()=>{B(this,jr).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,jr).clear(),B(this,Hn).clear()})}getAll(){return Array.from(B(this,jr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Zy(n,r))}findAll(t={}){return this.getAll().filter(n=>Zy(t,n))}notify(t){Vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Vn))))}},jr=new WeakMap,Hn=new WeakMap,ol=new WeakMap,Jx);function Ul(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Jy(e){return{onFetch:(t,n)=>{var c,f,p,h,w;const r=t.options,i=(p=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=zb(t.options,t.fetchOptions),y=async(x,S,_)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const C=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return b(L),L})(),R=await g(C),{maxPages:I}=t.options,P=_?uA:lA;return{pages:P(x.pages,R,I),pageParams:P(x.pageParams,S,I)}};if(i&&s.length){const x=i==="backward",S=x?kA:ev,_={pages:s,pageParams:o},E=S(r,_);a=await y(_,E,x)}else{const x=e??s.length;do{const S=l===0?o[0]??r.initialPageParam:ev(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ev(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function kA(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var it,di,fi,po,mo,hi,go,yo,ew,EA=(ew=class{constructor(e={}){Ie(this,it);Ie(this,di);Ie(this,fi);Ie(this,po);Ie(this,mo);Ie(this,hi);Ie(this,go);Ie(this,yo);ge(this,it,e.queryCache||new xA),ge(this,di,e.mutationCache||new SA),ge(this,fi,e.defaultOptions||{}),ge(this,po,new Map),ge(this,mo,new Map),ge(this,hi,0)}mount(){bl(this,hi)._++,B(this,hi)===1&&(ge(this,go,$b.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,it).onFocus())})),ge(this,yo,tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,it).onOnline())})))}unmount(){var e,t;bl(this,hi)._--,B(this,hi)===0&&((e=B(this,go))==null||e.call(this),ge(this,go,void 0),(t=B(this,yo))==null||t.call(this),ge(this,yo,void 0))}isFetching(e){return B(this,it).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,di).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,it).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=B(this,it).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Mh(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return B(this,it).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=B(this,it).get(r.queryHash),s=i==null?void 0:i.state.data,o=nA(t,s);if(o!==void 0)return B(this,it).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Vt.batch(()=>B(this,it).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,it).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=B(this,it);Vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=B(this,it);return Vt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Vt.batch(()=>B(this,it).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Vn).catch(Vn)}invalidateQueries(e,t={}){return Vt.batch(()=>(B(this,it).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Vt.batch(()=>B(this,it).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Vn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=B(this,it).build(this,t);return n.isStaleByTime(Mh(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=Jy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}ensureInfiniteQueryData(e){return e.behavior=Jy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return tc.isOnline()?B(this,di).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,it)}getMutationCache(){return B(this,di)}getDefaultOptions(){return B(this,fi)}setDefaultOptions(e){ge(this,fi,e)}setQueryDefaults(e,t){B(this,po).set(Ya(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,po).values()],n={};return t.forEach(r=>{Xa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){B(this,mo).set(Ya(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,mo).values()],n={};return t.forEach(r=>{Xa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,fi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Tm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,fi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,it).clear(),B(this,di).clear()}},it=new WeakMap,di=new WeakMap,fi=new WeakMap,po=new WeakMap,mo=new WeakMap,hi=new WeakMap,go=new WeakMap,yo=new WeakMap,ew),CA=v.createContext(void 0),_A=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(CA.Provider,{value:e,children:t}));/**
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nc.apply(this,arguments)}var gi;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(gi||(gi={}));const tv="popstate";function NA(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return Dh("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:qb(i)}return PA(t,n,null,e)}function sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Wb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TA(){return Math.random().toString(36).substr(2,8)}function nv(e,t){return{usr:e.state,key:e.key,idx:t}}function Dh(e,t,n,r){return n===void 0&&(n=null),nc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?td(t):t,{state:n,key:t&&t.key||r||TA()})}function qb(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function td(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function PA(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=gi.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(nc({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=gi.Pop;let b=c(),g=b==null?null:b-u;u=b,l&&l({action:a,location:m.location,delta:g})}function p(b,g){a=gi.Push;let y=Dh(m.location,b,g);u=c()+1;let x=nv(y,u),S=m.createHref(y);try{o.pushState(x,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(b,g){a=gi.Replace;let y=Dh(m.location,b,g);u=c();let x=nv(y,u),S=m.createHref(y);o.replaceState(x,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function w(b){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof b=="string"?b:qb(b);return y=y.replace(/ $/,"%20"),sn(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let m={get action(){return a},get location(){return e(i,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(tv,f),l=b,()=>{i.removeEventListener(tv,f),l=null}},createHref(b){return t(i,b)},createURL:w,encodeLocation(b){let g=w(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:h,go(b){return o.go(b)}};return m}var rv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rv||(rv={}));function RA(e,t,n){return n===void 0&&(n="/"),jA(e,t,n)}function jA(e,t,n,r){let i=typeof t=="string"?td(t):t,s=Qb(i.pathname||"/",n);if(s==null)return null;let o=Kb(e);AA(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=HA(s);a=BA(o[l],u)}return a}function Kb(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(sn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=ro([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(sn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Kb(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:zA(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Gb(s.path))i(s,o,l)}),t}function Gb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Gb(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function AA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$A(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IA=/^:[\w-]+$/,OA=3,MA=2,LA=1,DA=10,FA=-2,iv=e=>e==="*";function zA(e,t){let n=e.split("/"),r=n.length;return n.some(iv)&&(r+=FA),t&&(r+=MA),n.filter(i=>!iv(i)).reduce((i,s)=>i+(IA.test(s)?OA:s===""?LA:DA),r)}function $A(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function BA(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",f=VA({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),p=l.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:ro([s,f.pathname]),pathnameBase:WA(ro([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=ro([s,f.pathnameBase]))}return o}function VA(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=UA(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:p,isOptional:h}=c;if(p==="*"){let m=a[f]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const w=a[f];return h&&!w?u[p]=void 0:u[p]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function UA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Wb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function HA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wb(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Qb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const ro=e=>e.join("/").replace(/\/\/+/g,"/"),WA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function qA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Zb=["post","put","patch","delete"];new Set(Zb);const KA=["get",...Zb];new Set(KA);/**
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function rc(){return rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rc.apply(this,arguments)}const GA=v.createContext(null),QA=v.createContext(null),Yb=v.createContext(null),nd=v.createContext(null),rd=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Xb=v.createContext(null);function Pm(){return v.useContext(nd)!=null}function Jb(){return Pm()||sn(!1),v.useContext(nd).location}function ZA(e,t){return YA(e,t)}function YA(e,t,n,r){Pm()||sn(!1);let{navigator:i}=v.useContext(Yb),{matches:s}=v.useContext(rd),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Jb(),c;if(t){var f;let b=typeof t=="string"?td(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||sn(!1),c=b}else c=u;let p=c.pathname||"/",h=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=RA(e,{pathname:h}),m=n2(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:ro([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ro([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&m?v.createElement(nd.Provider,{value:{location:rc({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:gi.Pop}},m):m}function XA(){let e=o2(),t=qA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const JA=v.createElement(XA,null);class e2 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(rd.Provider,{value:this.props.routeContext},v.createElement(Xb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t2(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(GA);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(rd.Provider,{value:t},r)}function n2(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||sn(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:p,errors:h}=n,w=f.route.loader&&p[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||w){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,p)=>{let h,w=!1,m=null,b=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||JA,l&&(u<0&&p===0?(a2("route-fallback"),w=!0,b=null):u===p&&(w=!0,b=f.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,p+1)),y=()=>{let x;return h?x=m:w?x=b:f.route.Component?x=v.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,v.createElement(t2,{match:f,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?v.createElement(e2,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var eS=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(eS||{});function r2(e){let t=v.useContext(QA);return t||sn(!1),t}function i2(e){let t=v.useContext(rd);return t||sn(!1),t}function s2(e){let t=i2(),n=t.matches[t.matches.length-1];return n.route.id||sn(!1),n.route.id}function o2(){var e;let t=v.useContext(Xb),n=r2(eS.UseRouteError),r=s2();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const sv={};function a2(e,t,n){sv[e]||(sv[e]=!0)}function l2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Fh(e){sn(!1)}function u2(e){let{basename:t="/",children:n=null,location:r,navigationType:i=gi.Pop,navigator:s,static:o=!1,future:a}=e;Pm()&&sn(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:rc({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=td(r));let{pathname:c="/",search:f="",hash:p="",state:h=null,key:w="default"}=r,m=v.useMemo(()=>{let b=Qb(c,l);return b==null?null:{location:{pathname:b,search:f,hash:p,state:h,key:w},navigationType:i}},[l,c,f,p,h,w,i]);return m==null?null:v.createElement(Yb.Provider,{value:u},v.createElement(nd.Provider,{children:n,value:m}))}function c2(e){let{children:t,location:n}=e;return ZA(zh(t),n)}new Promise(()=>{});function zh(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,zh(r.props.children,s));return}r.type!==Fh&&sn(!1),!r.props.index||!r.props.children||sn(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=zh(r.props.children,s)),n.push(o)}),n}/**
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/const d2="6";try{window.__reactRouterVersion=d2}catch{}const f2="startTransition",ov=wp[f2];function h2(e){let{basename:t,children:n,future:r,window:i}=e,s=v.useRef();s.current==null&&(s.current=NA({window:i,v5Compat:!0}));let o=s.current,[a,l]=v.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=v.useCallback(f=>{u&&ov?ov(()=>l(f)):l(f)},[l,u]);return v.useLayoutEffect(()=>o.listen(c),[o,c]),v.useEffect(()=>l2(r),[r]),v.createElement(u2,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}var av;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(av||(av={}));var lv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(lv||(lv={}));const Oe=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:ke("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Oe.displayName="Card";const $t=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:ke("flex flex-col space-y-1.5 p-6",e),...t}));$t.displayName="CardHeader";const Bt=v.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:ke("text-2xl font-semibold leading-none tracking-tight",e),...t}));Bt.displayName="CardTitle";const vr=v.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));vr.displayName="CardDescription";const $e=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:ke("p-6 pt-0",e),...t}));$e.displayName="CardContent";const p2=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:ke("flex items-center p-6 pt-0",e),...t}));p2.displayName="CardFooter";const m2=pl("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ct({className:e,variant:t,...n}){return d.jsx("div",{className:ke(m2({variant:t}),e),...n})}const g2=pl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ve=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?tT:"button";return d.jsx(o,{className:ke(g2({variant:t,size:n,className:e})),ref:s,...i})});Ve.displayName="Button";const Xi=v.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:ke("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Xi.displayName="Input";const id=v.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:ke("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));id.displayName="Textarea";var y2="Label",tS=v.forwardRef((e,t)=>d.jsx(fe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));tS.displayName=y2;var nS=tS;const v2=pl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),dn=v.forwardRef(({className:e,...t},n)=>d.jsx(nS,{ref:n,className:ke(v2(),e),...t}));dn.displayName=nS.displayName;function uv(e,[t,n]){return Math.min(n,Math.max(t,e))}var x2=v.createContext(void 0);function Rm(e){const t=v.useContext(x2);return e||t||"ltr"}var tf=0;function rS(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cv()),document.body.insertAdjacentElement("beforeend",e[1]??cv()),tf++,()=>{tf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tf--}},[])}function cv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nf="focusScope.autoFocusOnMount",rf="focusScope.autoFocusOnUnmount",dv={bubbles:!1,cancelable:!0},w2="FocusScope",jm=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=v.useState(null),u=In(i),c=In(s),f=v.useRef(null),p=Fe(t,m=>l(m)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let m=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:ni(f.current,{select:!0})},b=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||ni(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&ni(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,h.paused]),v.useEffect(()=>{if(a){hv.add(h);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(nf,dv);a.addEventListener(nf,u),a.dispatchEvent(g),g.defaultPrevented||(b2(_2(iS(a)),{select:!0}),document.activeElement===m&&ni(a))}return()=>{a.removeEventListener(nf,u),setTimeout(()=>{const g=new CustomEvent(rf,dv);a.addEventListener(rf,c),a.dispatchEvent(g),g.defaultPrevented||ni(m??document.body,{select:!0}),a.removeEventListener(rf,c),hv.remove(h)},0)}}},[a,u,c,h]);const w=v.useCallback(m=>{if(!n&&!r||h.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(b&&g){const y=m.currentTarget,[x,S]=S2(y);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&&ni(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),n&&ni(S,{select:!0})):g===y&&m.preventDefault()}},[n,r,h.paused]);return d.jsx(fe.div,{tabIndex:-1,...o,ref:p,onKeyDown:w})});jm.displayName=w2;function b2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ni(r,{select:t}),document.activeElement!==n)return}function S2(e){const t=iS(e),n=fv(t,e),r=fv(t.reverse(),e);return[n,r]}function iS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fv(e,t){for(const n of e)if(!k2(n,{upTo:t}))return n}function k2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function E2(e){return e instanceof HTMLInputElement&&"select"in e}function ni(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&E2(e)&&t&&e.select()}}var hv=C2();function C2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=pv(e,t),e.unshift(t)},remove(t){var n;e=pv(e,t),(n=e[0])==null||n.resume()}}}function pv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _2(e){return e.filter(t=>t.tagName!=="A")}function sS(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var N2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ts=new WeakMap,Hl=new WeakMap,Wl={},sf=0,oS=function(e){return e&&(e.host||oS(e.parentNode))},T2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=oS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P2=function(e,t,n,r){var i=T2(t,Array.isArray(e)?e:[e]);Wl[n]||(Wl[n]=new WeakMap);var s=Wl[n],o=[],a=new Set,l=new Set(i),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))c(p);else try{var h=p.getAttribute(r),w=h!==null&&h!=="false",m=(Ts.get(p)||0)+1,b=(s.get(p)||0)+1;Ts.set(p,m),s.set(p,b),o.push(p),m===1&&w&&Hl.set(p,!0),b===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return c(t),a.clear(),sf++,function(){o.forEach(function(f){var p=Ts.get(f)-1,h=s.get(f)-1;Ts.set(f,p),s.set(f,h),p||(Hl.has(f)||f.removeAttribute(r),Hl.delete(f)),h||f.removeAttribute(n)}),sf--,sf||(Ts=new WeakMap,Ts=new WeakMap,Hl=new WeakMap,Wl={})}},aS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=N2(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),P2(r,i,n,"aria-hidden")):function(){return null}},dr=function(){return dr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},dr.apply(this,arguments)};function lS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function R2(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var xu="right-scroll-bar-position",wu="width-before-scroll-bar",j2="with-scroll-bars-hidden",A2="--removed-body-scroll-bar-size";function of(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function I2(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var O2=typeof window<"u"?v.useLayoutEffect:v.useEffect,mv=new WeakMap;function M2(e,t){var n=I2(null,function(r){return e.forEach(function(i){return of(i,r)})});return O2(function(){var r=mv.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;i.forEach(function(a){s.has(a)||of(a,null)}),s.forEach(function(a){i.has(a)||of(a,o)})}mv.set(n,e)},[e]),n}function L2(e){return e}function D2(e,t){t===void 0&&(t=L2);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var o=t(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var c=o;o=[],c.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),n}}}};return i}function F2(e){e===void 0&&(e={});var t=D2(null);return t.options=dr({async:!0,ssr:!1},e),t}var uS=function(e){var t=e.sideCar,n=lS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,dr({},n))};uS.isSideCarExport=!0;function z2(e,t){return e.useMedium(t),uS}var cS=F2(),af=function(){},sd=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:af,onWheelCapture:af,onTouchMoveCapture:af}),i=r[0],s=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,w=e.noIsolation,m=e.inert,b=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,x=e.gapMode,S=lS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,E=M2([n,t]),C=dr(dr({},S),i);return v.createElement(v.Fragment,null,c&&v.createElement(_,{sideCar:cS,removeScrollBar:u,shards:f,noRelative:h,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(a),dr(dr({},C),{ref:E})):v.createElement(y,dr({},C,{className:l,ref:E}),a))});sd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sd.classNames={fullWidth:wu,zeroRight:xu};var $2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$2();return t&&e.setAttribute("nonce",t),e}function V2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var H2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=B2())&&(V2(t,n),U2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W2=function(){var e=H2();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dS=function(){var e=W2(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},q2={left:0,top:0,right:0,gap:0},lf=function(e){return parseInt(e||"",10)||0},K2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[lf(n),lf(r),lf(i)]},G2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return q2;var t=K2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Q2=dS(),io="data-scroll-locked",Z2=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(j2,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(io,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(o,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(xu,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(wu,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(xu," .").concat(xu,` {
right: 0 `).concat(r,`;
}
.`).concat(wu," .").concat(wu,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(io,`] {
`).concat(A2,": ").concat(a,`px;
}
`)},gv=function(){var e=parseInt(document.body.getAttribute(io)||"0",10);return isFinite(e)?e:0},Y2=function(){v.useEffect(function(){return document.body.setAttribute(io,(gv()+1).toString()),function(){var e=gv()-1;e<=0?document.body.removeAttribute(io):document.body.setAttribute(io,e.toString())}},[])},X2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Y2();var s=v.useMemo(function(){return G2(i)},[i]);return v.createElement(Q2,{styles:Z2(s,!t,i,n?"":"!important")})},$h=!1;if(typeof window<"u")try{var ql=Object.defineProperty({},"passive",{get:function(){return $h=!0,!0}});window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql)}catch{$h=!1}var Ps=$h?{passive:!1}:!1,J2=function(e){return e.tagName==="TEXTAREA"},fS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!J2(e)&&n[t]==="visible")},eI=function(e){return fS(e,"overflowY")},tI=function(e){return fS(e,"overflowX")},yv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=hS(e,r);if(i){var s=pS(e,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hS=function(e,t){return e==="v"?eI(t):tI(t)},pS=function(e,t){return e==="v"?nI(t):rI(t)},iI=function(e,t){return e==="h"&&t==="rtl"?-1:1},sI=function(e,t,n,r,i){var s=iI(e,window.getComputedStyle(t).direction),o=s*r,a=n.target,l=t.contains(a),u=!1,c=o>0,f=0,p=0;do{if(!a)break;var h=pS(e,a),w=h[0],m=h[1],b=h[2],g=m-b-s*w;(w||g)&&hS(e,a)&&(f+=g,p+=w);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(f)<1||!c&&Math.abs(p)<1)&&(u=!0),u},Kl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vv=function(e){return[e.deltaX,e.deltaY]},xv=function(e){return e&&"current"in e?e.current:e},oI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aI=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},lI=0,Rs=[];function uI(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(lI++)[0],s=v.useState(dS)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=R2([e.lockRef.current],(e.shards||[]).map(xv),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var g=Kl(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-g[0],S="deltaY"in m?m.deltaY:y[1]-g[1],_,E=m.target,C=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var R=yv(C,E);if(!R)return!0;if(R?_=C:(_=C==="v"?"h":"v",R=yv(C,E)),!R)return!1;if(!r.current&&"changedTouches"in m&&(x||S)&&(r.current=_),!_)return!0;var I=r.current||_;return sI(I,b,m,I==="h"?x:S)},[]),l=v.useCallback(function(m){var b=m;if(!(!Rs.length||Rs[Rs.length-1]!==s)){var g="deltaY"in b?vv(b):Kl(b),y=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&oI(_.delta,g)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(o.current.shards||[]).map(xv).filter(Boolean).filter(function(_){return _.contains(b.target)}),S=x.length>0?a(b,x[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=v.useCallback(function(m,b,g,y){var x={name:m,delta:b,target:g,should:y,shadowParent:cI(g)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=v.useCallback(function(m){n.current=Kl(m),r.current=void 0},[]),f=v.useCallback(function(m){u(m.type,vv(m),m.target,a(m,e.lockRef.current))},[]),p=v.useCallback(function(m){u(m.type,Kl(m),m.target,a(m,e.lockRef.current))},[]);v.useEffect(function(){return Rs.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ps),document.addEventListener("touchmove",l,Ps),document.addEventListener("touchstart",c,Ps),function(){Rs=Rs.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ps),document.removeEventListener("touchmove",l,Ps),document.removeEventListener("touchstart",c,Ps)}},[]);var h=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(s,{styles:aI(i)}):null,h?v.createElement(X2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dI=z2(cS,uI);var Am=v.forwardRef(function(e,t){return v.createElement(sd,dr({},e,{ref:t,sideCar:dI}))});Am.classNames=sd.classNames;var fI=[" ","Enter","ArrowUp","ArrowDown"],hI=[" ","Enter"],gs="Select",[od,ad,pI]=dm(gs),[Bo,lz]=Sr(gs,[pI,Zc]),ld=Zc(),[mI,$i]=Bo(gs),[gI,yI]=Bo(gs),mS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:p,required:h,form:w}=e,m=ld(t),[b,g]=v.useState(null),[y,x]=v.useState(null),[S,_]=v.useState(!1),E=Rm(u),[C,R]=Ai({prop:r,defaultProp:i??!1,onChange:s,caller:gs}),[I,P]=Ai({prop:o,defaultProp:a,onChange:l,caller:gs}),L=v.useRef(null),A=b?w||!!b.closest("form"):!0,[U,F]=v.useState(new Set),W=Array.from(U).map(H=>H.props.value).join(";");return d.jsx(Lj,{...m,children:d.jsxs(mI,{required:h,scope:t,trigger:b,onTriggerChange:g,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:Lr(),value:I,onValueChange:P,open:C,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:p,children:[d.jsx(od.Provider,{scope:t,children:d.jsx(gI,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(H=>{F(V=>new Set(V).add(H))},[]),onNativeOptionRemove:v.useCallback(H=>{F(V=>{const M=new Set(V);return M.delete(H),M})},[]),children:n})}),A?d.jsxs(zS,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:f,value:I,onChange:H=>P(H.target.value),disabled:p,form:w,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(U)]},W):null]})})};mS.displayName=gs;var gS="SelectTrigger",yS=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=ld(n),o=$i(gS,n),a=o.disabled||r,l=Fe(t,o.onTriggerChange),u=ad(n),c=v.useRef("touch"),[f,p,h]=BS(m=>{const b=u().filter(x=>!x.disabled),g=b.find(x=>x.value===o.value),y=VS(b,m,g);y!==void 0&&o.onValueChange(y.value)}),w=m=>{a||(o.onOpenChange(!0),h()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(Nb,{asChild:!0,...s,children:d.jsx(fe.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":$S(o.value)?"":void 0,...i,ref:l,onClick:ue(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&w(m)}),onPointerDown:ue(i.onPointerDown,m=>{c.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:ue(i.onKeyDown,m=>{const b=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(b&&m.key===" ")&&fI.includes(m.key)&&(w(),m.preventDefault())})})})});yS.displayName=gS;var vS="SelectValue",xS=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...a}=e,l=$i(vS,n),{onValueNodeHasChildrenChange:u}=l,c=s!==void 0,f=Fe(t,l.onValueNodeChange);return bt(()=>{u(c)},[u,c]),d.jsx(fe.span,{...a,ref:f,style:{pointerEvents:"none"},children:$S(l.value)?d.jsx(d.Fragment,{children:o}):s})});xS.displayName=vS;var vI="SelectIcon",wS=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return d.jsx(fe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});wS.displayName=vI;var xI="SelectPortal",bS=e=>d.jsx(Bc,{asChild:!0,...e});bS.displayName=xI;var ys="SelectContent",SS=v.forwardRef((e,t)=>{const n=$i(ys,e.__scopeSelect),[r,i]=v.useState();if(bt(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Cs.createPortal(d.jsx(kS,{scope:e.__scopeSelect,children:d.jsx(od.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),s):null}return d.jsx(ES,{...e,ref:t})});SS.displayName=ys;var $n=10,[kS,Bi]=Bo(ys),wI="SelectContentImpl",bI=Co("SelectContent.RemoveScroll"),ES=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:w,hideWhenDetached:m,avoidCollisions:b,...g}=e,y=$i(ys,n),[x,S]=v.useState(null),[_,E]=v.useState(null),C=Fe(t,Y=>S(Y)),[R,I]=v.useState(null),[P,L]=v.useState(null),A=ad(n),[U,F]=v.useState(!1),W=v.useRef(!1);v.useEffect(()=>{if(x)return aS(x)},[x]),rS();const H=v.useCallback(Y=>{const[xe,...Re]=A().map(Ce=>Ce.ref.current),[ve]=Re.slice(-1),we=document.activeElement;for(const Ce of Y)if(Ce===we||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===xe&&_&&(_.scrollTop=0),Ce===ve&&_&&(_.scrollTop=_.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==we))return},[A,_]),V=v.useCallback(()=>H([R,x]),[H,R,x]);v.useEffect(()=>{U&&V()},[U,V]);const{onOpenChange:M,triggerPointerDownPosRef:D}=y;v.useEffect(()=>{if(x){let Y={x:0,y:0};const xe=ve=>{var we,Ce;Y={x:Math.abs(Math.round(ve.pageX)-(((we=D.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((Ce=D.current)==null?void 0:Ce.y)??0))}},Re=ve=>{Y.x<=10&&Y.y<=10?ve.preventDefault():x.contains(ve.target)||M(!1),document.removeEventListener("pointermove",xe),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Re,{capture:!0})}}},[x,M,D]),v.useEffect(()=>{const Y=()=>M(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[M]);const[k,re]=BS(Y=>{const xe=A().filter(we=>!we.disabled),Re=xe.find(we=>we.ref.current===document.activeElement),ve=VS(xe,Y,Re);ve&&setTimeout(()=>ve.ref.current.focus())}),ne=v.useCallback((Y,xe,Re)=>{const ve=!W.current&&!Re;(y.value!==void 0&&y.value===xe||ve)&&(I(Y),ve&&(W.current=!0))},[y.value]),N=v.useCallback(()=>x==null?void 0:x.focus(),[x]),le=v.useCallback((Y,xe,Re)=>{const ve=!W.current&&!Re;(y.value!==void 0&&y.value===xe||ve)&&L(Y)},[y.value]),Te=r==="popper"?Bh:CS,ye=Te===Bh?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:w,hideWhenDetached:m,avoidCollisions:b}:{};return d.jsx(kS,{scope:n,content:x,viewport:_,onViewportChange:E,itemRefCallback:ne,selectedItem:R,onItemLeave:N,itemTextRefCallback:le,focusSelectedItem:V,selectedItemText:P,position:r,isPositioned:U,searchRef:k,children:d.jsx(Am,{as:bI,allowPinchZoom:!0,children:d.jsx(jm,{asChild:!0,trapped:y.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:ue(i,Y=>{var xe;(xe=y.trigger)==null||xe.focus({preventScroll:!0}),Y.preventDefault()}),children:d.jsx(fl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(Te,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Y=>Y.preventDefault(),...g,...ye,onPlaced:()=>F(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,Y=>{const xe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!xe&&Y.key.length===1&&re(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ve=A().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const we=Y.target,Ce=ve.indexOf(we);ve=ve.slice(Ce+1)}setTimeout(()=>H(ve)),Y.preventDefault()}})})})})})})});ES.displayName=wI;var SI="SelectItemAlignedPosition",CS=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=$i(ys,n),o=Bi(ys,n),[a,l]=v.useState(null),[u,c]=v.useState(null),f=Fe(t,C=>c(C)),p=ad(n),h=v.useRef(!1),w=v.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:g,focusSelectedItem:y}=o,x=v.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&b&&g){const C=s.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),P=g.getBoundingClientRect();if(s.dir!=="rtl"){const we=P.left-R.left,Ce=I.left-we,lt=C.left-Ce,St=C.width+lt,an=Math.max(St,R.width),ln=window.innerWidth-$n,bn=uv(Ce,[$n,Math.max($n,ln-an)]);a.style.minWidth=St+"px",a.style.left=bn+"px"}else{const we=R.right-P.right,Ce=window.innerWidth-I.right-we,lt=window.innerWidth-C.right-Ce,St=C.width+lt,an=Math.max(St,R.width),ln=window.innerWidth-$n,bn=uv(Ce,[$n,Math.max($n,ln-an)]);a.style.minWidth=St+"px",a.style.right=bn+"px"}const L=p(),A=window.innerHeight-$n*2,U=m.scrollHeight,F=window.getComputedStyle(u),W=parseInt(F.borderTopWidth,10),H=parseInt(F.paddingTop,10),V=parseInt(F.borderBottomWidth,10),M=parseInt(F.paddingBottom,10),D=W+H+U+M+V,k=Math.min(b.offsetHeight*5,D),re=window.getComputedStyle(m),ne=parseInt(re.paddingTop,10),N=parseInt(re.paddingBottom,10),le=C.top+C.height/2-$n,Te=A-le,ye=b.offsetHeight/2,Y=b.offsetTop+ye,xe=W+H+Y,Re=D-xe;if(xe<=le){const we=L.length>0&&b===L[L.length-1].ref.current;a.style.bottom="0px";const Ce=u.clientHeight-m.offsetTop-m.offsetHeight,lt=Math.max(Te,ye+(we?N:0)+Ce+V),St=xe+lt;a.style.height=St+"px"}else{const we=L.length>0&&b===L[0].ref.current;a.style.top="0px";const lt=Math.max(le,W+m.offsetTop+(we?ne:0)+ye)+Re;a.style.height=lt+"px",m.scrollTop=xe-le+m.offsetTop}a.style.margin=`${$n}px 0`,a.style.minHeight=k+"px",a.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,a,u,m,b,g,s.dir,r]);bt(()=>x(),[x]);const[S,_]=v.useState();bt(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const E=v.useCallback(C=>{C&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return d.jsx(EI,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(fe.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});CS.displayName=SI;var kI="SelectPopperPosition",Bh=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=$n,...s}=e,o=ld(n);return d.jsx(Tb,{...o,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bh.displayName=kI;var[EI,Im]=Bo(ys,{}),Vh="SelectViewport",_S=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Bi(Vh,n),o=Im(Vh,n),a=Fe(t,s.onViewportChange),l=v.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(od.Slot,{scope:n,children:d.jsx(fe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ue(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&f){const h=Math.abs(l.current-c.scrollTop);if(h>0){const w=window.innerHeight-$n*2,m=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),g=Math.max(m,b);if(g<w){const y=g+h,x=Math.min(w,y),S=y-x;f.style.height=x+"px",f.style.bottom==="0px"&&(c.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});_S.displayName=Vh;var NS="SelectGroup",[CI,_I]=Bo(NS),NI=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Lr();return d.jsx(CI,{scope:n,id:i,children:d.jsx(fe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});NI.displayName=NS;var TS="SelectLabel",PS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=_I(TS,n);return d.jsx(fe.div,{id:i.id,...r,ref:t})});PS.displayName=TS;var ic="SelectItem",[TI,RS]=Bo(ic),jS=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=e,a=$i(ic,n),l=Bi(ic,n),u=a.value===r,[c,f]=v.useState(s??""),[p,h]=v.useState(!1),w=Fe(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,i)}),m=Lr(),b=v.useRef("touch"),g=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(TI,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:v.useCallback(y=>{f(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(od.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:d.jsx(fe.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:ue(o.onFocus,()=>h(!0)),onBlur:ue(o.onBlur,()=>h(!1)),onClick:ue(o.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:ue(o.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:ue(o.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:ue(o.onPointerMove,y=>{var x;b.current=y.pointerType,i?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(o.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ue(o.onKeyDown,y=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(hI.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});jS.displayName=ic;var ha="SelectItemText",AS=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,o=$i(ha,n),a=Bi(ha,n),l=RS(ha,n),u=yI(ha,n),[c,f]=v.useState(null),p=Fe(t,g=>f(g),l.onItemTextChange,g=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,g,l.value,l.disabled)}),h=c==null?void 0:c.textContent,w=v.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=u;return bt(()=>(m(w),()=>b(w)),[m,b,w]),d.jsxs(d.Fragment,{children:[d.jsx(fe.span,{id:l.textId,...s,ref:p}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Cs.createPortal(s.children,o.valueNode):null]})});AS.displayName=ha;var IS="SelectItemIndicator",OS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return RS(IS,n).isSelected?d.jsx(fe.span,{"aria-hidden":!0,...r,ref:t}):null});OS.displayName=IS;var Uh="SelectScrollUpButton",MS=v.forwardRef((e,t)=>{const n=Bi(Uh,e.__scopeSelect),r=Im(Uh,e.__scopeSelect),[i,s]=v.useState(!1),o=Fe(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?d.jsx(DS,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});MS.displayName=Uh;var Hh="SelectScrollDownButton",LS=v.forwardRef((e,t)=>{const n=Bi(Hh,e.__scopeSelect),r=Im(Hh,e.__scopeSelect),[i,s]=v.useState(!1),o=Fe(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?d.jsx(DS,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});LS.displayName=Hh;var DS=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Bi("SelectScrollButton",n),o=v.useRef(null),a=ad(n),l=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>l(),[l]),bt(()=>{var c;const u=a().find(f=>f.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),d.jsx(fe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ue(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ue(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ue(i.onPointerLeave,()=>{l()})})}),PI="SelectSeparator",FS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(fe.div,{"aria-hidden":!0,...r,ref:t})});FS.displayName=PI;var Wh="SelectArrow",RI=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=ld(n),s=$i(Wh,n),o=Bi(Wh,n);return s.open&&o.position==="popper"?d.jsx(Pb,{...i,...r,ref:t}):null});RI.displayName=Wh;var jI="SelectBubbleInput",zS=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=v.useRef(null),s=Fe(r,i),o=sS(t);return v.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&c){const f=new Event("change",{bubbles:!0});c.call(a,t),a.dispatchEvent(f)}},[o,t]),d.jsx(fe.select,{...n,style:{...b1,...n.style},ref:s,defaultValue:t})});zS.displayName=jI;function $S(e){return e===""||e===void 0}function BS(e){const t=In(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(o=>{const a=n.current+o;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function VS(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let o=AI(e,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function AI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var II=mS,US=yS,OI=xS,MI=wS,LI=bS,HS=SS,DI=_S,WS=PS,qS=jS,FI=AS,zI=OS,KS=MS,GS=LS,QS=FS;const To=II,Po=OI,vs=v.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(US,{ref:r,className:ke("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(MI,{asChild:!0,children:d.jsx(Wc,{className:"h-4 w-4 opacity-50"})})]}));vs.displayName=US.displayName;const ZS=v.forwardRef(({className:e,...t},n)=>d.jsx(KS,{ref:n,className:ke("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(KT,{className:"h-4 w-4"})}));ZS.displayName=KS.displayName;const YS=v.forwardRef(({className:e,...t},n)=>d.jsx(GS,{ref:n,className:ke("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Wc,{className:"h-4 w-4"})}));YS.displayName=GS.displayName;const xs=v.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>d.jsx(LI,{children:d.jsxs(HS,{ref:i,className:ke("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(ZS,{}),d.jsx(DI,{className:ke("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(YS,{})]})}));xs.displayName=HS.displayName;const $I=v.forwardRef(({className:e,...t},n)=>d.jsx(WS,{ref:n,className:ke("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$I.displayName=WS.displayName;const Or=v.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(qS,{ref:r,className:ke("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(zI,{children:d.jsx(H1,{className:"h-4 w-4"})})}),d.jsx(FI,{children:t})]}));Or.displayName=qS.displayName;const BI=v.forwardRef(({className:e,...t},n)=>d.jsx(QS,{ref:n,className:ke("-mx-1 my-1 h-px bg-muted",e),...t}));BI.displayName=QS.displayName;var gl=e=>e.type==="checkbox",Ji=e=>e instanceof Date,zt=e=>e==null;const XS=e=>typeof e=="object";var at=e=>!zt(e)&&!Array.isArray(e)&&XS(e)&&!Ji(e),VI=e=>at(e)&&e.target?gl(e.target)?e.target.checked:e.target.value:e,UI=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,HI=(e,t)=>e.has(UI(t)),WI=e=>{const t=e.constructor&&e.constructor.prototype;return at(t)&&t.hasOwnProperty("isPrototypeOf")},Om=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Om&&(e instanceof Blob||r))&&(n||at(e)))if(t=n?[]:{},!n&&!WI(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=vt(e[i]));else return e;return t}var ud=e=>/^\w*$/.test(e),ht=e=>e===void 0,Mm=e=>Array.isArray(e)?e.filter(Boolean):[],Lm=e=>Mm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,n)=>{if(!t||!at(e))return n;const r=(ud(t)?[t]:Lm(t)).reduce((i,s)=>zt(i)?i:i[s],e);return ht(r)||r===e?ht(e[t])?n:e[t]:r},or=e=>typeof e=="boolean",Be=(e,t,n)=>{let r=-1;const i=ud(t)?[t]:Lm(t),s=i.length,o=s-1;for(;++r<s;){const a=i[r];let l=n;if(r!==o){const u=e[a];l=at(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const wv={BLUR:"blur",FOCUS_OUT:"focusout"},Kn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Cr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qI=q.createContext(null);qI.displayName="HookFormContext";var KI=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==Kn.all&&(t._proxyFormState[o]=!r||Kn.all),e[o]}});return i};const GI=typeof window<"u"?v.useLayoutEffect:v.useEffect;var pr=e=>typeof e=="string",QI=(e,t,n,r,i)=>pr(e)?(r&&t.watch.add(e),se(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),se(n,s))):(r&&(t.watchAll=!0),n),JS=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Ca=e=>Array.isArray(e)?e:[e],bv=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},qh=e=>zt(e)||!XS(e);function li(e,t,n=new WeakSet){if(qh(e)||qh(t))return e===t;if(Ji(e)&&Ji(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const o=e[s];if(!i.includes(s))return!1;if(s!=="ref"){const a=t[s];if(Ji(o)&&Ji(a)||at(o)&&at(a)||Array.isArray(o)&&Array.isArray(a)?!li(o,a,n):o!==a)return!1}}return!0}var Zt=e=>at(e)&&!Object.keys(e).length,Dm=e=>e.type==="file",Gn=e=>typeof e=="function",sc=e=>{if(!Om)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ek=e=>e.type==="select-multiple",Fm=e=>e.type==="radio",ZI=e=>Fm(e)||gl(e),uf=e=>sc(e)&&e.isConnected;function YI(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ht(e)?r++:e[t[r++]];return e}function XI(e){for(const t in e)if(e.hasOwnProperty(t)&&!ht(e[t]))return!1;return!0}function ct(e,t){const n=Array.isArray(t)?t:ud(t)?[t]:Lm(t),r=n.length===1?e:YI(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(at(r)&&Zt(r)||Array.isArray(r)&&XI(r))&&ct(e,n.slice(0,-1)),e}var tk=e=>{for(const t in e)if(Gn(e[t]))return!0;return!1};function oc(e,t={}){const n=Array.isArray(e);if(at(e)||n)for(const r in e)Array.isArray(e[r])||at(e[r])&&!tk(e[r])?(t[r]=Array.isArray(e[r])?[]:{},oc(e[r],t[r])):zt(e[r])||(t[r]=!0);return t}function nk(e,t,n){const r=Array.isArray(e);if(at(e)||r)for(const i in e)Array.isArray(e[i])||at(e[i])&&!tk(e[i])?ht(t)||qh(n[i])?n[i]=Array.isArray(e[i])?oc(e[i],[]):{...oc(e[i])}:nk(e[i],zt(t)?{}:t[i],n[i]):n[i]=!li(e[i],t[i]);return n}var ea=(e,t)=>nk(e,t,oc(t));const Sv={value:!1,isValid:!1},kv={value:!0,isValid:!0};var rk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ht(e[0].attributes.value)?ht(e[0].value)||e[0].value===""?kv:{value:e[0].value,isValid:!0}:kv:Sv}return Sv},ik=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ht(e)?e:t?e===""?NaN:e&&+e:n&&pr(e)?new Date(e):r?r(e):e;const Ev={isValid:!1,value:null};var sk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Ev):Ev;function Cv(e){const t=e.ref;return Dm(t)?t.files:Fm(t)?sk(e.refs).value:ek(t)?[...t.selectedOptions].map(({value:n})=>n):gl(t)?rk(e.refs).value:ik(ht(t.value)?e.ref.value:t.value,e)}var JI=(e,t,n,r)=>{const i={};for(const s of e){const o=se(t,s);o&&Be(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},ac=e=>e instanceof RegExp,ta=e=>ht(e)?e:ac(e)?e.source:at(e)?ac(e.value)?e.value.source:e.value:e,_v=e=>({isOnSubmit:!e||e===Kn.onSubmit,isOnBlur:e===Kn.onBlur,isOnChange:e===Kn.onChange,isOnAll:e===Kn.all,isOnTouch:e===Kn.onTouched});const Nv="AsyncFunction";var eO=e=>!!e&&!!e.validate&&!!(Gn(e.validate)&&e.validate.constructor.name===Nv||at(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Nv)),tO=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Tv=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _a=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=se(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(_a(a,t))break}else if(at(a)&&_a(a,t))break}}};function Pv(e,t,n){const r=se(e,n);if(r||ud(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=se(t,s),a=se(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};i.pop()}return{name:n}}var nO=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Zt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||Kn.all))},rO=(e,t,n)=>!e||!t||e===t||Ca(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),iO=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,sO=(e,t)=>!Mm(se(e,t)).length&&ct(e,t),oO=(e,t,n)=>{const r=Ca(se(e,n));return Be(r,"root",t[n]),Be(e,n,r),e},bu=e=>pr(e);function Rv(e,t,n="validate"){if(bu(e)||Array.isArray(e)&&e.every(bu)||or(e)&&!e)return{type:n,message:bu(e)?e:"",ref:t}}var js=e=>at(e)&&!ac(e)?e:{value:e,message:""},jv=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:f,max:p,pattern:h,validate:w,name:m,valueAsNumber:b,mount:g}=e._f,y=se(n,m);if(!g||t.has(m))return{};const x=a?a[0]:o,S=A=>{i&&x.reportValidity&&(x.setCustomValidity(or(A)?"":A||""),x.reportValidity())},_={},E=Fm(o),C=gl(o),R=E||C,I=(b||Dm(o))&&ht(o.value)&&ht(y)||sc(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,P=JS.bind(null,m,r,_),L=(A,U,F,W=Cr.maxLength,H=Cr.minLength)=>{const V=A?U:F;_[m]={type:A?W:H,message:V,ref:o,...P(A?W:H,V)}};if(s?!Array.isArray(y)||!y.length:l&&(!R&&(I||zt(y))||or(y)&&!y||C&&!rk(a).isValid||E&&!sk(a).isValid)){const{value:A,message:U}=bu(l)?{value:!!l,message:l}:js(l);if(A&&(_[m]={type:Cr.required,message:U,ref:x,...P(Cr.required,U)},!r))return S(U),_}if(!I&&(!zt(f)||!zt(p))){let A,U;const F=js(p),W=js(f);if(!zt(y)&&!isNaN(y)){const H=o.valueAsNumber||y&&+y;zt(F.value)||(A=H>F.value),zt(W.value)||(U=H<W.value)}else{const H=o.valueAsDate||new Date(y),V=k=>new Date(new Date().toDateString()+" "+k),M=o.type=="time",D=o.type=="week";pr(F.value)&&y&&(A=M?V(y)>V(F.value):D?y>F.value:H>new Date(F.value)),pr(W.value)&&y&&(U=M?V(y)<V(W.value):D?y<W.value:H<new Date(W.value))}if((A||U)&&(L(!!A,F.message,W.message,Cr.max,Cr.min),!r))return S(_[m].message),_}if((u||c)&&!I&&(pr(y)||s&&Array.isArray(y))){const A=js(u),U=js(c),F=!zt(A.value)&&y.length>+A.value,W=!zt(U.value)&&y.length<+U.value;if((F||W)&&(L(F,A.message,U.message),!r))return S(_[m].message),_}if(h&&!I&&pr(y)){const{value:A,message:U}=js(h);if(ac(A)&&!y.match(A)&&(_[m]={type:Cr.pattern,message:U,ref:o,...P(Cr.pattern,U)},!r))return S(U),_}if(w){if(Gn(w)){const A=await w(y,n),U=Rv(A,x);if(U&&(_[m]={...U,...P(Cr.validate,U.message)},!r))return S(U.message),_}else if(at(w)){let A={};for(const U in w){if(!Zt(A)&&!r)break;const F=Rv(await w[U](y,n),x,U);F&&(A={...F,...P(U,F.message)},S(F.message),r&&(_[m]=A))}if(!Zt(A)&&(_[m]={ref:x,...A},!r))return _}}return S(!0),_};const aO={mode:Kn.onSubmit,reValidateMode:Kn.onChange,shouldFocusError:!0};function lO(e={}){let t={...aO,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Gn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=at(t.defaultValues)||at(t.values)?vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:vt(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...c};const p={array:bv(),state:bv()},h=t.criteriaMode===Kn.all,w=T=>O=>{clearTimeout(u),u=setTimeout(T,O)},m=async T=>{if(!t.disabled&&(c.isValid||f.isValid||T)){const O=t.resolver?Zt((await C()).errors):await I(r,!0);O!==n.isValid&&p.state.next({isValid:O})}},b=(T,O)=>{!t.disabled&&(c.isValidating||c.validatingFields||f.isValidating||f.validatingFields)&&((T||Array.from(a.mount)).forEach(z=>{z&&(O?Be(n.validatingFields,z,O):ct(n.validatingFields,z))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Zt(n.validatingFields)}))},g=(T,O=[],z,J,X=!0,Z=!0)=>{if(J&&z&&!t.disabled){if(o.action=!0,Z&&Array.isArray(se(r,T))){const j=z(se(r,T),J.argA,J.argB);X&&Be(r,T,j)}if(Z&&Array.isArray(se(n.errors,T))){const j=z(se(n.errors,T),J.argA,J.argB);X&&Be(n.errors,T,j),sO(n.errors,T)}if((c.touchedFields||f.touchedFields)&&Z&&Array.isArray(se(n.touchedFields,T))){const j=z(se(n.touchedFields,T),J.argA,J.argB);X&&Be(n.touchedFields,T,j)}(c.dirtyFields||f.dirtyFields)&&(n.dirtyFields=ea(i,s)),p.state.next({name:T,isDirty:L(T,O),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Be(s,T,O)},y=(T,O)=>{Be(n.errors,T,O),p.state.next({errors:n.errors})},x=T=>{n.errors=T,p.state.next({errors:n.errors,isValid:!1})},S=(T,O,z,J)=>{const X=se(r,T);if(X){const Z=se(s,T,ht(z)?se(i,T):z);ht(Z)||J&&J.defaultChecked||O?Be(s,T,O?Z:Cv(X._f)):F(T,Z),o.mount&&m()}},_=(T,O,z,J,X)=>{let Z=!1,j=!1;const $={name:T};if(!t.disabled){if(!z||J){(c.isDirty||f.isDirty)&&(j=n.isDirty,n.isDirty=$.isDirty=L(),Z=j!==$.isDirty);const ee=li(se(i,T),O);j=!!se(n.dirtyFields,T),ee?ct(n.dirtyFields,T):Be(n.dirtyFields,T,!0),$.dirtyFields=n.dirtyFields,Z=Z||(c.dirtyFields||f.dirtyFields)&&j!==!ee}if(z){const ee=se(n.touchedFields,T);ee||(Be(n.touchedFields,T,z),$.touchedFields=n.touchedFields,Z=Z||(c.touchedFields||f.touchedFields)&&ee!==z)}Z&&X&&p.state.next($)}return Z?$:{}},E=(T,O,z,J)=>{const X=se(n.errors,T),Z=(c.isValid||f.isValid)&&or(O)&&n.isValid!==O;if(t.delayError&&z?(l=w(()=>y(T,z)),l(t.delayError)):(clearTimeout(u),l=null,z?Be(n.errors,T,z):ct(n.errors,T)),(z?!li(X,z):X)||!Zt(J)||Z){const j={...J,...Z&&or(O)?{isValid:O}:{},errors:n.errors,name:T};n={...n,...j},p.state.next(j)}},C=async T=>{b(T,!0);const O=await t.resolver(s,t.context,JI(T||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(T),O},R=async T=>{const{errors:O}=await C(T);if(T)for(const z of T){const J=se(O,z);J?Be(n.errors,z,J):ct(n.errors,z)}else n.errors=O;return O},I=async(T,O,z={valid:!0})=>{for(const J in T){const X=T[J];if(X){const{_f:Z,...j}=X;if(Z){const $=a.array.has(Z.name),ee=X._f&&eO(X._f);ee&&c.validatingFields&&b([J],!0);const ce=await jv(X,a.disabled,s,h,t.shouldUseNativeValidation&&!O,$);if(ee&&c.validatingFields&&b([J]),ce[Z.name]&&(z.valid=!1,O))break;!O&&(se(ce,Z.name)?$?oO(n.errors,ce,Z.name):Be(n.errors,Z.name,ce[Z.name]):ct(n.errors,Z.name))}!Zt(j)&&await I(j,O,z)}}return z.valid},P=()=>{for(const T of a.unMount){const O=se(r,T);O&&(O._f.refs?O._f.refs.every(z=>!uf(z)):!uf(O._f.ref))&&Y(T)}a.unMount=new Set},L=(T,O)=>!t.disabled&&(T&&O&&Be(s,T,O),!li(k(),i)),A=(T,O,z)=>QI(T,a,{...o.mount?s:ht(O)?i:pr(T)?{[T]:O}:O},z,O),U=T=>Mm(se(o.mount?s:i,T,t.shouldUnregister?se(i,T,[]):[])),F=(T,O,z={})=>{const J=se(r,T);let X=O;if(J){const Z=J._f;Z&&(!Z.disabled&&Be(s,T,ik(O,Z)),X=sc(Z.ref)&&zt(O)?"":O,ek(Z.ref)?[...Z.ref.options].forEach(j=>j.selected=X.includes(j.value)):Z.refs?gl(Z.ref)?Z.refs.forEach(j=>{(!j.defaultChecked||!j.disabled)&&(Array.isArray(X)?j.checked=!!X.find($=>$===j.value):j.checked=X===j.value||!!X)}):Z.refs.forEach(j=>j.checked=j.value===X):Dm(Z.ref)?Z.ref.value="":(Z.ref.value=X,Z.ref.type||p.state.next({name:T,values:vt(s)})))}(z.shouldDirty||z.shouldTouch)&&_(T,X,z.shouldTouch,z.shouldDirty,!0),z.shouldValidate&&D(T)},W=(T,O,z)=>{for(const J in O){if(!O.hasOwnProperty(J))return;const X=O[J],Z=T+"."+J,j=se(r,Z);(a.array.has(T)||at(X)||j&&!j._f)&&!Ji(X)?W(Z,X,z):F(Z,X,z)}},H=(T,O,z={})=>{const J=se(r,T),X=a.array.has(T),Z=vt(O);Be(s,T,Z),X?(p.array.next({name:T,values:vt(s)}),(c.isDirty||c.dirtyFields||f.isDirty||f.dirtyFields)&&z.shouldDirty&&p.state.next({name:T,dirtyFields:ea(i,s),isDirty:L(T,Z)})):J&&!J._f&&!zt(Z)?W(T,Z,z):F(T,Z,z),Tv(T,a)&&p.state.next({...n}),p.state.next({name:o.mount?T:void 0,values:vt(s)})},V=async T=>{o.mount=!0;const O=T.target;let z=O.name,J=!0;const X=se(r,z),Z=ee=>{J=Number.isNaN(ee)||Ji(ee)&&isNaN(ee.getTime())||li(ee,se(s,z,ee))},j=_v(t.mode),$=_v(t.reValidateMode);if(X){let ee,ce;const _e=O.type?Cv(X._f):VI(T),rt=T.type===wv.BLUR||T.type===wv.FOCUS_OUT,kn=!tO(X._f)&&!t.resolver&&!se(n.errors,z)&&!X._f.deps||iO(rt,se(n.touchedFields,z),n.isSubmitted,$,j),kt=Tv(z,a,rt);Be(s,z,_e),rt?(X._f.onBlur&&X._f.onBlur(T),l&&l(0)):X._f.onChange&&X._f.onChange(T);const Tt=_(z,_e,rt),tr=!Zt(Tt)||kt;if(!rt&&p.state.next({name:z,type:T.type,values:vt(s)}),kn)return(c.isValid||f.isValid)&&(t.mode==="onBlur"?rt&&m():rt||m()),tr&&p.state.next({name:z,...kt?{}:Tt});if(!rt&&kt&&p.state.next({...n}),t.resolver){const{errors:Xe}=await C([z]);if(Z(_e),J){const nr=Pv(n.errors,r,z),Kt=Pv(Xe,r,nr.name||z);ee=Kt.error,z=Kt.name,ce=Zt(Xe)}}else b([z],!0),ee=(await jv(X,a.disabled,s,h,t.shouldUseNativeValidation))[z],b([z]),Z(_e),J&&(ee?ce=!1:(c.isValid||f.isValid)&&(ce=await I(r,!0)));J&&(X._f.deps&&D(X._f.deps),E(z,ce,ee,Tt))}},M=(T,O)=>{if(se(n.errors,O)&&T.focus)return T.focus(),1},D=async(T,O={})=>{let z,J;const X=Ca(T);if(t.resolver){const Z=await R(ht(T)?T:X);z=Zt(Z),J=T?!X.some(j=>se(Z,j)):z}else T?(J=(await Promise.all(X.map(async Z=>{const j=se(r,Z);return await I(j&&j._f?{[Z]:j}:j)}))).every(Boolean),!(!J&&!n.isValid)&&m()):J=z=await I(r);return p.state.next({...!pr(T)||(c.isValid||f.isValid)&&z!==n.isValid?{}:{name:T},...t.resolver||!T?{isValid:z}:{},errors:n.errors}),O.shouldFocus&&!J&&_a(r,M,T?X:a.mount),J},k=T=>{const O={...o.mount?s:i};return ht(T)?O:pr(T)?se(O,T):T.map(z=>se(O,z))},re=(T,O)=>({invalid:!!se((O||n).errors,T),isDirty:!!se((O||n).dirtyFields,T),error:se((O||n).errors,T),isValidating:!!se(n.validatingFields,T),isTouched:!!se((O||n).touchedFields,T)}),ne=T=>{T&&Ca(T).forEach(O=>ct(n.errors,O)),p.state.next({errors:T?n.errors:{}})},N=(T,O,z)=>{const J=(se(r,T,{_f:{}})._f||{}).ref,X=se(n.errors,T)||{},{ref:Z,message:j,type:$,...ee}=X;Be(n.errors,T,{...ee,...O,ref:J}),p.state.next({name:T,errors:n.errors,isValid:!1}),z&&z.shouldFocus&&J&&J.focus&&J.focus()},le=(T,O)=>Gn(T)?p.state.subscribe({next:z=>T(A(void 0,O),z)}):A(T,O,!0),Te=T=>p.state.subscribe({next:O=>{rO(T.name,O.name,T.exact)&&nO(O,T.formState||c,bn,T.reRenderRoot)&&T.callback({values:{...s},...n,...O})}}).unsubscribe,ye=T=>(o.mount=!0,f={...f,...T.formState},Te({...T,formState:f})),Y=(T,O={})=>{for(const z of T?Ca(T):a.mount)a.mount.delete(z),a.array.delete(z),O.keepValue||(ct(r,z),ct(s,z)),!O.keepError&&ct(n.errors,z),!O.keepDirty&&ct(n.dirtyFields,z),!O.keepTouched&&ct(n.touchedFields,z),!O.keepIsValidating&&ct(n.validatingFields,z),!t.shouldUnregister&&!O.keepDefaultValue&&ct(i,z);p.state.next({values:vt(s)}),p.state.next({...n,...O.keepDirty?{isDirty:L()}:{}}),!O.keepIsValid&&m()},xe=({disabled:T,name:O})=>{(or(T)&&o.mount||T||a.disabled.has(O))&&(T?a.disabled.add(O):a.disabled.delete(O))},Re=(T,O={})=>{let z=se(r,T);const J=or(O.disabled)||or(t.disabled);return Be(r,T,{...z||{},_f:{...z&&z._f?z._f:{ref:{name:T}},name:T,mount:!0,...O}}),a.mount.add(T),z?xe({disabled:or(O.disabled)?O.disabled:t.disabled,name:T}):S(T,!0,O.value),{...J?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:ta(O.min),max:ta(O.max),minLength:ta(O.minLength),maxLength:ta(O.maxLength),pattern:ta(O.pattern)}:{},name:T,onChange:V,onBlur:V,ref:X=>{if(X){Re(T,O),z=se(r,T);const Z=ht(X.value)&&X.querySelectorAll&&X.querySelectorAll("input,select,textarea")[0]||X,j=ZI(Z),$=z._f.refs||[];if(j?$.find(ee=>ee===Z):Z===z._f.ref)return;Be(r,T,{_f:{...z._f,...j?{refs:[...$.filter(uf),Z,...Array.isArray(se(i,T))?[{}]:[]],ref:{type:Z.type,name:T}}:{ref:Z}}}),S(T,!1,void 0,Z)}else z=se(r,T,{}),z._f&&(z._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(HI(a.array,T)&&o.action)&&a.unMount.add(T)}}},ve=()=>t.shouldFocusError&&_a(r,M,a.mount),we=T=>{or(T)&&(p.state.next({disabled:T}),_a(r,(O,z)=>{const J=se(r,z);J&&(O.disabled=J._f.disabled||T,Array.isArray(J._f.refs)&&J._f.refs.forEach(X=>{X.disabled=J._f.disabled||T}))},0,!1))},Ce=(T,O)=>async z=>{let J;z&&(z.preventDefault&&z.preventDefault(),z.persist&&z.persist());let X=vt(s);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:Z,values:j}=await C();n.errors=Z,X=vt(j)}else await I(r);if(a.disabled.size)for(const Z of a.disabled)ct(X,Z);if(ct(n.errors,"root"),Zt(n.errors)){p.state.next({errors:{}});try{await T(X,z)}catch(Z){J=Z}}else O&&await O({...n.errors},z),ve(),setTimeout(ve);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zt(n.errors)&&!J,submitCount:n.submitCount+1,errors:n.errors}),J)throw J},lt=(T,O={})=>{se(r,T)&&(ht(O.defaultValue)?H(T,vt(se(i,T))):(H(T,O.defaultValue),Be(i,T,vt(O.defaultValue))),O.keepTouched||ct(n.touchedFields,T),O.keepDirty||(ct(n.dirtyFields,T),n.isDirty=O.defaultValue?L(T,vt(se(i,T))):L()),O.keepError||(ct(n.errors,T),c.isValid&&m()),p.state.next({...n}))},St=(T,O={})=>{const z=T?vt(T):i,J=vt(z),X=Zt(T),Z=X?i:J;if(O.keepDefaultValues||(i=z),!O.keepValues){if(O.keepDirtyValues){const j=new Set([...a.mount,...Object.keys(ea(i,s))]);for(const $ of Array.from(j))se(n.dirtyFields,$)?Be(Z,$,se(s,$)):H($,se(Z,$))}else{if(Om&&ht(T))for(const j of a.mount){const $=se(r,j);if($&&$._f){const ee=Array.isArray($._f.refs)?$._f.refs[0]:$._f.ref;if(sc(ee)){const ce=ee.closest("form");if(ce){ce.reset();break}}}}if(O.keepFieldsRef)for(const j of a.mount)H(j,se(Z,j));else r={}}s=t.shouldUnregister?O.keepDefaultValues?vt(i):{}:vt(Z),p.array.next({values:{...Z}}),p.state.next({values:{...Z}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!O.keepIsValid||!!O.keepDirtyValues,o.watch=!!t.shouldUnregister,p.state.next({submitCount:O.keepSubmitCount?n.submitCount:0,isDirty:X?!1:O.keepDirty?n.isDirty:!!(O.keepDefaultValues&&!li(T,i)),isSubmitted:O.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:X?{}:O.keepDirtyValues?O.keepDefaultValues&&s?ea(i,s):n.dirtyFields:O.keepDefaultValues&&T?ea(i,T):O.keepDirty?n.dirtyFields:{},touchedFields:O.keepTouched?n.touchedFields:{},errors:O.keepErrors?n.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},an=(T,O)=>St(Gn(T)?T(s):T,O),ln=(T,O={})=>{const z=se(r,T),J=z&&z._f;if(J){const X=J.refs?J.refs[0]:J.ref;X.focus&&(X.focus(),O.shouldSelect&&Gn(X.select)&&X.select())}},bn=T=>{n={...n,...T}},Sn={control:{register:Re,unregister:Y,getFieldState:re,handleSubmit:Ce,setError:N,_subscribe:Te,_runSchema:C,_focusError:ve,_getWatch:A,_getDirty:L,_setValid:m,_setFieldArray:g,_setDisabledField:xe,_setErrors:x,_getFieldArray:U,_reset:St,_resetDefaultValues:()=>Gn(t.defaultValues)&&t.defaultValues().then(T=>{an(T,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:we,_subjects:p,_proxyFormState:c,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state(T){o=T},get _defaultValues(){return i},get _names(){return a},set _names(T){a=T},get _formState(){return n},get _options(){return t},set _options(T){t={...t,...T}}},subscribe:ye,trigger:D,register:Re,handleSubmit:Ce,watch:le,setValue:H,getValues:k,reset:an,resetField:lt,clearErrors:ne,unregister:Y,setError:N,setFocus:ln,getFieldState:re};return{...Sn,formControl:Sn}}function uO(e={}){const t=q.useRef(void 0),n=q.useRef(void 0),[r,i]=q.useState({isDirty:!1,isValidating:!1,isLoading:Gn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Gn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Gn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...a}=lO(e);t.current={...a,formState:r}}const s=t.current.control;return s._options=e,GI(()=>{const o=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(a=>({...a,isReady:!0})),s._formState.isReady=!0,o},[s]),q.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),q.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),q.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),q.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),q.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),q.useEffect(()=>{e.values&&!li(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[s,e.values]),q.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=KI(r,s),t.current}const Av=(e,t,n)=>{if(e&&"reportValidity"in e){const r=se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ok=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Av(r.ref,n,e):r.refs&&r.refs.forEach(i=>Av(i,n,e))}},cO=(e,t)=>{t.shouldUseNativeValidation&&ok(e,t);const n={};for(const r in e){const i=se(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if(dO(t.names||Object.keys(e),r)){const o=Object.assign({},se(n,r));Be(o,"root",s),Be(n,r,o)}else Be(n,r,s)}return n},dO=(e,t)=>e.some(n=>n.startsWith(t+"."));var fO=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:s,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,u=l&&l[r.code];n[o]=JS(o,t,n,i,u?[].concat(u,r.message):r.message)}e.shift()}return n},hO=function(e,t,n){return n===void 0&&(n={}),function(r,i,s){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return s.shouldUseNativeValidation&&ok({},s),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:cO(fO(o.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw o}))}catch(o){return Promise.reject(o)}}},Me;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},e.find=(i,s)=>{for(const o of i)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Me||(Me={}));var Iv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Iv||(Iv={}));const oe=Me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return Number.isNaN(e)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(e)?oe.array:e===null?oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?oe.promise:typeof Map<"u"&&e instanceof Map?oe.map:typeof Set<"u"&&e instanceof Set?oe.set:typeof Date<"u"&&e instanceof Date?oe.date:oe.object;default:return oe.unknown}},Q=Me.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ur extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}static assert(t){if(!(t instanceof Ur))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Me.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ur.create=e=>new Ur(e);const Kh=(e,t)=>{let n;switch(e.code){case Q.invalid_type:e.received===oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.joinValues(e.keys,", ")}`;break;case Q.invalid_union:n="Invalid input";break;case Q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.joinValues(e.options)}`;break;case Q.invalid_enum_value:n=`Invalid enum value. Expected ${Me.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:n="Invalid function arguments";break;case Q.invalid_return_type:n="Invalid function return type";break;case Q.invalid_date:n="Invalid date";break;case Q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Me.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Q.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Q.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Q.custom:n="Invalid input";break;case Q.invalid_intersection_types:n="Intersection results could not be merged";break;case Q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:n="Number must be finite";break;default:n=t.defaultError,Me.assertNever(e)}return{message:n}};let pO=Kh;function mO(){return pO}const gO=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}};function te(e,t){const n=mO(),r=gO({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Kh?void 0:Kh].filter(i=>!!i)});e.common.issues.push(r)}class vn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return he;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,o=await i.value;r.push({key:s,value:o})}return vn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return he;s.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:t.value,value:r}}}const he=Object.freeze({status:"aborted"}),pa=e=>({status:"dirty",value:e}),On=e=>({status:"valid",value:e}),Ov=e=>e.status==="aborted",Mv=e=>e.status==="dirty",Ro=e=>e.status==="valid",lc=e=>typeof Promise<"u"&&e instanceof Promise;var ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));class Mi{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Lv=(e,t)=>{if(Ro(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ur(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,a)=>{const{message:l}=e;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:i}}class Ae{get description(){return this._def.description}_getType(t){return si(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vn,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(lc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Lv(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return Ro(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>Ro(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(lc(i)?i:Promise.resolve(i));return Lv(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const o=t(i),a=()=>s.addIssue({code:Q.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ao({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ni.create(this,this._def)}nullable(){return Io.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xr.create(this)}promise(){return fc.create(this,this._def)}or(t){return cc.create([this,t],this._def)}and(t){return dc.create(this,t,this._def)}transform(t){return new Ao({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Qh({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new zO({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Zh({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return zm.create(this,t)}readonly(){return Yh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yO=/^c[^\s-]{8,}$/i,vO=/^[0-9a-z]+$/,xO=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bO=/^[a-z0-9_-]{21}$/i,SO=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kO=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,EO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,CO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cf;const _O=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,TO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,PO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RO=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jO=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ak="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",AO=new RegExp(`^${ak}$`);function lk(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function IO(e){return new RegExp(`^${lk(e)}$`)}function OO(e){let t=`${ak}T${lk(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function MO(e,t){return!!((t==="v4"||!t)&&_O.test(e)||(t==="v6"||!t)&&TO.test(e))}function LO(e,t){if(!SO.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function DO(e,t){return!!((t==="v4"||!t)&&NO.test(e)||(t==="v6"||!t)&&PO.test(e))}class yi extends Ae{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==oe.string){const s=this._getOrReturnCtx(t);return te(s,{code:Q.invalid_type,expected:oe.string,received:s.parsedType}),he}const r=new vn;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),te(i,{code:Q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),te(i,{code:Q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const o=t.data.length>s.value,a=t.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(t,i),o?te(i,{code:Q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(i,{code:Q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")EO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"email",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")cf||(cf=new RegExp(CO,"u")),cf.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"emoji",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")wO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"uuid",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")bO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"nanoid",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")yO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"cuid",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")vO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"cuid2",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")xO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"ulid",code:Q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),te(i,{validation:"url",code:Q.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"regex",code:Q.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?OO(s).test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?AO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?IO(s).test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{code:Q.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?kO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"duration",code:Q.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?MO(t.data,s.version)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"ip",code:Q.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?LO(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"jwt",code:Q.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?DO(t.data,s.version)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"cidr",code:Q.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?RO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"base64",code:Q.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?jO.test(t.data)||(i=this._getOrReturnCtx(t,i),te(i,{validation:"base64url",code:Q.invalid_string,message:s.message}),r.dirty()):Me.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Q.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new yi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ae.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ae.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new yi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}yi.create=e=>new yi({checks:[],typeName:pe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ee(e)});function FO(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}class Ja extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==oe.number){const s=this._getOrReturnCtx(t);return te(s,{code:Q.invalid_type,expected:oe.number,received:s.parsedType}),he}let r;const i=new vn;for(const s of this._def.checks)s.kind==="int"?Me.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:Q.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?FO(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:Q.not_finite,message:s.message}),i.dirty()):Me.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,i){return new Ja({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(i)}]})}_addCheck(t){return new Ja({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Me.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ja.create=e=>new Ja({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class el extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==oe.bigint)return this._getInvalidInput(t);let r;const i=new vn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:Q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Me.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return te(n,{code:Q.invalid_type,expected:oe.bigint,received:n.parsedType}),he}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,i){return new el({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(i)}]})}_addCheck(t){return new el({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}el.create=e=>new el({checks:[],typeName:pe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ee(e)});class Dv extends Ae{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==oe.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.boolean,received:r.parsedType}),he}return On(t.data)}}Dv.create=e=>new Dv({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class uc extends Ae{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==oe.date){const s=this._getOrReturnCtx(t);return te(s,{code:Q.invalid_type,expected:oe.date,received:s.parsedType}),he}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:Q.invalid_date}),he}const r=new vn;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),te(i,{code:Q.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),te(i,{code:Q.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Me.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new uc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}uc.create=e=>new uc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class Fv extends Ae{_parse(t){if(this._getType(t)!==oe.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.symbol,received:r.parsedType}),he}return On(t.data)}}Fv.create=e=>new Fv({typeName:pe.ZodSymbol,...Ee(e)});class zv extends Ae{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.undefined,received:r.parsedType}),he}return On(t.data)}}zv.create=e=>new zv({typeName:pe.ZodUndefined,...Ee(e)});class $v extends Ae{_parse(t){if(this._getType(t)!==oe.null){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.null,received:r.parsedType}),he}return On(t.data)}}$v.create=e=>new $v({typeName:pe.ZodNull,...Ee(e)});class Bv extends Ae{constructor(){super(...arguments),this._any=!0}_parse(t){return On(t.data)}}Bv.create=e=>new Bv({typeName:pe.ZodAny,...Ee(e)});class Vv extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(t){return On(t.data)}}Vv.create=e=>new Vv({typeName:pe.ZodUnknown,...Ee(e)});class Li extends Ae{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:Q.invalid_type,expected:oe.never,received:n.parsedType}),he}}Li.create=e=>new Li({typeName:pe.ZodNever,...Ee(e)});class Uv extends Ae{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.void,received:r.parsedType}),he}return On(t.data)}}Uv.create=e=>new Uv({typeName:pe.ZodVoid,...Ee(e)});class xr extends Ae{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==oe.array)return te(n,{code:Q.invalid_type,expected:oe.array,received:n.parsedType}),he;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(te(n,{code:o?Q.too_big:Q.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(te(n,{code:Q.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(te(n,{code:Q.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new Mi(n,o,n.path,a)))).then(o=>vn.mergeArray(r,o));const s=[...n.data].map((o,a)=>i.type._parseSync(new Mi(n,o,n.path,a)));return vn.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new xr({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new xr({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new xr({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}xr.create=(e,t)=>new xr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function Os(e){if(e instanceof ft){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ni.create(Os(r))}return new ft({...e._def,shape:()=>t})}else return e instanceof xr?new xr({...e._def,type:Os(e.element)}):e instanceof Ni?Ni.create(Os(e.unwrap())):e instanceof Io?Io.create(Os(e.unwrap())):e instanceof ws?ws.create(e.items.map(t=>Os(t))):e}class ft extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Me.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==oe.object){const u=this._getOrReturnCtx(t);return te(u,{code:Q.invalid_type,expected:oe.object,received:u.parsedType}),he}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Li&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=s[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Mi(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Li){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(te(i,{code:Q.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Mi(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,p=await c.value;u.push({key:f,value:p,alwaysSet:c.alwaysSet})}return u}).then(u=>vn.mergeObjectSync(r,u)):vn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o;const i=((o=(s=this._def).errorMap)==null?void 0:o.call(s,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ae.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const n={};for(const r of Me.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new ft({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Me.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new ft({...this._def,shape:()=>n})}deepPartial(){return Os(this)}partial(t){const n={};for(const r of Me.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new ft({...this._def,shape:()=>n})}required(t){const n={};for(const r of Me.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Ni;)s=s._def.innerType;n[r]=s}return new ft({...this._def,shape:()=>n})}keyof(){return uk(Me.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:Li.create(),typeName:pe.ZodObject,...Ee(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:Li.create(),typeName:pe.ZodObject,...Ee(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:Li.create(),typeName:pe.ZodObject,...Ee(t)});class cc extends Ae{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new Ur(a.ctx.common.issues));return te(n,{code:Q.invalid_union,unionErrors:o}),he}if(n.common.async)return Promise.all(r.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new Ur(l));return te(n,{code:Q.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}}cc.create=(e,t)=>new cc({options:e,typeName:pe.ZodUnion,...Ee(t)});function Gh(e,t){const n=si(e),r=si(t);if(e===t)return{valid:!0,data:e};if(n===oe.object&&r===oe.object){const i=Me.objectKeys(t),s=Me.objectKeys(e).filter(a=>i.indexOf(a)!==-1),o={...e,...t};for(const a of s){const l=Gh(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===oe.array&&r===oe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const o=e[s],a=t[s],l=Gh(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===oe.date&&r===oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class dc extends Ae{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,o)=>{if(Ov(s)||Ov(o))return he;const a=Gh(s.value,o.value);return a.valid?((Mv(s)||Mv(o))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:Q.invalid_intersection_types}),he)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}dc.create=(e,t,n)=>new dc({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class ws extends Ae{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.array)return te(r,{code:Q.invalid_type,expected:oe.array,received:r.parsedType}),he;if(r.data.length<this._def.items.length)return te(r,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Mi(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>vn.mergeArray(n,o)):vn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ws({...this._def,rest:t})}}ws.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ws({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class Hv extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.map)return te(r,{code:Q.invalid_type,expected:oe.map,received:r.parsedType}),he;const i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new Mi(r,a,r.path,[u,"key"])),value:s._parse(new Mi(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return he;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return he;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}Hv.create=(e,t,n)=>new Hv({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class tl extends Ae{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.set)return te(r,{code:Q.invalid_type,expected:oe.set,received:r.parsedType}),he;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(te(r,{code:Q.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(te(r,{code:Q.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return he;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Mi(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new tl({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new tl({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}tl.create=(e,t)=>new tl({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class Wv extends Ae{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Wv.create=(e,t)=>new Wv({getter:e,typeName:pe.ZodLazy,...Ee(t)});class qv extends Ae{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:Q.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:t.data}}get value(){return this._def.value}}qv.create=(e,t)=>new qv({value:e,typeName:pe.ZodLiteral,...Ee(t)});function uk(e,t){return new jo({values:e,typeName:pe.ZodEnum,...Ee(t)})}class jo extends Ae{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Me.joinValues(r),received:n.parsedType,code:Q.invalid_type}),he}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:Q.invalid_enum_value,options:r}),he}return On(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return jo.create(t,{...this._def,...n})}exclude(t,n=this._def){return jo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}jo.create=uk;class Kv extends Ae{_parse(t){const n=Me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==oe.string&&r.parsedType!==oe.number){const i=Me.objectValues(n);return te(r,{expected:Me.joinValues(i),received:r.parsedType,code:Q.invalid_type}),he}if(this._cache||(this._cache=new Set(Me.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Me.objectValues(n);return te(r,{received:r.data,code:Q.invalid_enum_value,options:i}),he}return On(t.data)}get enum(){return this._def.values}}Kv.create=(e,t)=>new Kv({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class fc extends Ae{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.promise&&n.common.async===!1)return te(n,{code:Q.invalid_type,expected:oe.promise,received:n.parsedType}),he;const r=n.parsedType===oe.promise?n.data:Promise.resolve(n.data);return On(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fc.create=(e,t)=>new fc({type:e,typeName:pe.ZodPromise,...Ee(t)});class Ao extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o=>{te(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(r.data,s);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return he;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?he:l.status==="dirty"||n.value==="dirty"?pa(l.value):l});{if(n.value==="aborted")return he;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?he:a.status==="dirty"||n.value==="dirty"?pa(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ro(o))return he;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Ro(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):he);Me.assertNever(i)}}Ao.create=(e,t,n)=>new Ao({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)});Ao.createWithPreprocess=(e,t,n)=>new Ao({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Ni extends Ae{_parse(t){return this._getType(t)===oe.undefined?On(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ni.create=(e,t)=>new Ni({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class Io extends Ae{_parse(t){return this._getType(t)===oe.null?On(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Io.create=(e,t)=>new Io({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class Qh extends Ae{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Qh.create=(e,t)=>new Qh({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class Zh extends Ae{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return lc(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ur(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ur(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Zh.create=(e,t)=>new Zh({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Gv extends Ae{_parse(t){if(this._getType(t)!==oe.nan){const r=this._getOrReturnCtx(t);return te(r,{code:Q.invalid_type,expected:oe.nan,received:r.parsedType}),he}return{status:"valid",value:t.data}}}Gv.create=e=>new Gv({typeName:pe.ZodNaN,...Ee(e)});class zO extends Ae{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class zm extends Ae{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?he:s.status==="dirty"?(n.dirty(),pa(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?he:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new zm({in:t,out:n,typeName:pe.ZodPipeline})}}class Yh extends Ae{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Ro(i)&&(i.value=Object.freeze(i.value)),i);return lc(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Yh.create=(e,t)=>new Yh({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Ut=yi.create;Li.create;const Ti=xr.create,$m=ft.create;cc.create;dc.create;ws.create;const Bm=jo.create;fc.create;Ni.create;Io.create;function $O(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UO={};function Qv(e,t){return(UO.jsx?VO:BO).test(e)}const HO=/[ \t\n\f\r]/g;function WO(e){return typeof e=="object"?e.type==="text"?Zv(e.value):!1:Zv(e)}function Zv(e){return e.replace(HO,"")===""}class yl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yl.prototype.normal={};yl.prototype.property={};yl.prototype.space=void 0;function ck(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yl(n,r,t)}function Xh(e){return e.toLowerCase()}class on{constructor(t,n){this.attribute=n,this.property=t}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let qO=0;const Se=_s(),dt=_s(),Jh=_s(),G=_s(),Ue=_s(),so=_s(),un=_s();function _s(){return 2**++qO}const ep=Object.freeze(Object.defineProperty({__proto__:null,boolean:Se,booleanish:dt,commaOrSpaceSeparated:un,commaSeparated:so,number:G,overloadedBoolean:Jh,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),df=Object.keys(ep);class Vm extends on{constructor(t,n,r,i){let s=-1;if(super(t,n),Yv(this,"space",i),typeof r=="number")for(;++s<df.length;){const o=df[s];Yv(this,df[s],(r&ep[o])===ep[o])}}}Vm.prototype.defined=!0;function Yv(e,t,n){n&&(e[t]=n)}function Vo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Vm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Xh(r)]=r,n[Xh(s.attribute)]=r}return new yl(t,n,e.space)}const dk=Vo({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:Ue,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:G,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:Ue,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:dt,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fk(e,t){return t in e?e[t]:t}function hk(e,t){return fk(e,t.toLowerCase())}const KO=Vo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:so,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:Se,allowPaymentRequest:Se,allowUserMedia:Se,alt:null,as:null,async:Se,autoCapitalize:null,autoComplete:Ue,autoFocus:Se,autoPlay:Se,blocking:Ue,capture:null,charSet:null,checked:Se,cite:null,className:Ue,cols:G,colSpan:null,content:null,contentEditable:dt,controls:Se,controlsList:Ue,coords:G|so,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Se,defer:Se,dir:null,dirName:null,disabled:Se,download:Jh,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Se,formTarget:null,headers:Ue,height:G,hidden:Jh,high:G,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:Se,inputMode:null,integrity:null,is:null,isMap:Se,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:Se,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Se,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:Se,muted:Se,name:null,nonce:null,noModule:Se,noValidate:Se,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Se,optimum:G,pattern:null,ping:Ue,placeholder:null,playsInline:Se,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Se,referrerPolicy:null,rel:Ue,required:Se,reversed:Se,rows:G,rowSpan:G,sandbox:Ue,scope:null,scoped:Se,seamless:Se,selected:Se,shadowRootClonable:Se,shadowRootDelegatesFocus:Se,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:Se,useMap:null,value:dt,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Se,declare:Se,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:Se,noHref:Se,noShade:Se,noWrap:Se,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Se,disableRemotePlayback:Se,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:hk}),GO=Vo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:un,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:Ue,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:Se,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:so,g2:so,glyphName:so,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fk}),pk=Vo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),mk=Vo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hk}),gk=Vo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QO={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ZO=/[A-Z]/g,Xv=/-[a-z]/g,YO=/^data[-\w.:]+$/i;function XO(e,t){const n=Xh(t);let r=t,i=on;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&YO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Xv,eM);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Xv.test(s)){let o=s.replace(ZO,JO);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Vm}return new i(r,t)}function JO(e){return"-"+e.toLowerCase()}function eM(e){return e.charAt(1).toUpperCase()}const tM=ck([dk,KO,pk,mk,gk],"html"),Um=ck([dk,GO,pk,mk,gk],"svg");function nM(e){return e.join(" ").trim()}var Hm={},Jv=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,rM=/\n/g,iM=/^\s*/,sM=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oM=/^:\s*/,aM=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,lM=/^[;\s]*/,uM=/^\s+|\s+$/g,cM=`
`,ex="/",tx="*",qi="",dM="comment",fM="declaration",hM=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(w){var m=w.match(rM);m&&(n+=m.length);var b=w.lastIndexOf(cM);r=~b?w.length-b:r+w.length}function s(){var w={line:n,column:r};return function(m){return m.position=new o(w),u(),m}}function o(w){this.start=w,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(w){var m=new Error(t.source+":"+n+":"+r+": "+w);if(m.reason=w,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(w){var m=w.exec(e);if(m){var b=m[0];return i(b),e=e.slice(b.length),m}}function u(){l(iM)}function c(w){var m;for(w=w||[];m=f();)m!==!1&&w.push(m);return w}function f(){var w=s();if(!(ex!=e.charAt(0)||tx!=e.charAt(1))){for(var m=2;qi!=e.charAt(m)&&(tx!=e.charAt(m)||ex!=e.charAt(m+1));)++m;if(m+=2,qi===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,i(b),e=e.slice(m),r+=2,w({type:dM,comment:b})}}function p(){var w=s(),m=l(sM);if(m){if(f(),!l(oM))return a("property missing ':'");var b=l(aM),g=w({type:fM,property:nx(m[0].replace(Jv,qi)),value:b?nx(b[0].replace(Jv,qi)):qi});return l(lM),g}}function h(){var w=[];c(w);for(var m;m=p();)m!==!1&&(w.push(m),c(w));return w}return u(),h()};function nx(e){return e?e.replace(uM,qi):qi}var pM=Cu&&Cu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.default=gM;var mM=pM(hM);function gM(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,mM.default)(e),i=typeof t=="function";return r.forEach(function(s){if(s.type==="declaration"){var o=s.property,a=s.value;i?t(o,a,s):a&&(n=n||{},n[o]=a)}}),n}var cd={};Object.defineProperty(cd,"__esModule",{value:!0});cd.camelCase=void 0;var yM=/^--[a-zA-Z0-9_-]+$/,vM=/-([a-z])/g,xM=/^[^-]+$/,wM=/^-(webkit|moz|ms|o|khtml)-/,bM=/^-(ms)-/,SM=function(e){return!e||xM.test(e)||yM.test(e)},kM=function(e,t){return t.toUpperCase()},rx=function(e,t){return"".concat(t,"-")},EM=function(e,t){return t===void 0&&(t={}),SM(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(bM,rx):e=e.replace(wM,rx),e.replace(vM,kM))};cd.camelCase=EM;var CM=Cu&&Cu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_M=CM(Hm),NM=cd;function tp(e,t){var n={};return!e||typeof e!="string"||(0,_M.default)(e,function(r,i){r&&i&&(n[(0,NM.camelCase)(r,t)]=i)}),n}tp.default=tp;var TM=tp;const PM=kc(TM),yk=vk("end"),Wm=vk("start");function vk(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function RM(e){const t=Wm(e),n=yk(e);if(t&&n)return{start:t,end:n}}function Na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ix(e.position):"start"in e||"end"in e?ix(e):"line"in e||"column"in e?np(e):""}function np(e){return sx(e&&e.line)+":"+sx(e&&e.column)}function ix(e){return np(e&&e.start)+"-"+np(e&&e.end)}function sx(e){return e&&typeof e=="number"?e:1}class Lt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Na(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const qm={}.hasOwnProperty,jM=new Map,AM=/[A-Z]/g,IM=new Set(["table","tbody","thead","tfoot","tr"]),OM=new Set(["td","th"]),xk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=UM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=VM(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Um:tM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=wk(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function wk(e,t,n){if(t.type==="element")return LM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return DM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zM(e,t,n);if(t.type==="mdxjsEsm")return FM(e,t);if(t.type==="root")return $M(e,t,n);if(t.type==="text")return BM(e,t)}function LM(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Um,e.schema=i),e.ancestors.push(t);const s=Sk(e,t.tagName,!1),o=HM(e,t);let a=Gm(e,t);return IM.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!WO(l):!0})),bk(e,o,s,t),Km(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function DM(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}nl(e,t.position)}function FM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nl(e,t.position)}function zM(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Um,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Sk(e,t.name,!0),o=WM(e,t),a=Gm(e,t);return bk(e,o,s,t),Km(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function $M(e,t,n){const r={};return Km(r,Gm(e,t)),e.create(t,e.Fragment,r,n)}function BM(e,t){return t.value}function bk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Km(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function VM(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function UM(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Wm(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function HM(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qm.call(t.properties,i)){const s=qM(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&OM.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function WM(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else nl(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else nl(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Gm(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:jM;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=wk(e,s,o);a!==void 0&&n.push(a)}return n}function qM(e,t,n){const r=XO(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$O(n):nM(n)),r.property==="style"){let i=typeof n=="object"?n:KM(e,String(n));return e.stylePropertyNameCase==="css"&&(i=GM(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?QO[r.property]||r.property:r.attribute,n]}}function KM(e,t){try{return PM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Lt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=xk+"#cannot-parse-style-attribute",i}}function Sk(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=Qv(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=Qv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);nl(e)}function nl(e,t){const n=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=xk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function GM(e){const t={};let n;for(n in e)qm.call(e,n)&&(t[QM(n)]=e[n]);return t}function QM(e){let t=e.replace(AM,ZM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ZM(e){return"-"+e.toLowerCase()}const ff={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},YM={};function XM(e,t){const n=YM,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return kk(e,r,i)}function kk(e,t,n){if(JM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ox(e.children,t,n)}return Array.isArray(e)?ox(e,t,n):""}function ox(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=kk(e[i],t,n);return r.join("")}function JM(e){return!!(e&&typeof e=="object")}const ax=document.createElement("i");function Qm(e){const t="&"+e+";";ax.innerHTML=t;const n=ax.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function br(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Tn(e,t){return e.length>0?(br(e,e.length,0,t),e):t}const lx={}.hasOwnProperty;function eL(e){const t={};let n=-1;for(;++n<e.length;)tL(t,e[n]);return t}function tL(e,t){let n;for(n in t){const i=(lx.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){lx.call(i,o)||(i[o]=[]);const a=s[o];nL(i[o],Array.isArray(a)?a:a?[a]:[])}}}function nL(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);br(e,0,0,r)}function Ek(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function oo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fr=Vi(/[A-Za-z]/),pn=Vi(/[\dA-Za-z]/),rL=Vi(/[#-'*+\--9=?A-Z^-~]/);function rp(e){return e!==null&&(e<32||e===127)}const ip=Vi(/\d/),iL=Vi(/[\dA-Fa-f]/),sL=Vi(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function rn(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const oL=Vi(new RegExp("\\p{P}|\\p{S}","u")),aL=Vi(/\s/);function Vi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Uo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function We(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Le(l)?(e.enter(n),a(l)):t(l)}function a(l){return Le(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const lL={tokenize:uL};function uL(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),We(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return de(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const cL={tokenize:dL},ux={tokenize:fL};function dL(e){const t=this,n=[];let r=0,i,s,o;return a;function a(x){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(x)}return u(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const S=t.events.length;let _=S,E;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){E=t.events[_][1].end;break}g(r);let C=S;for(;C<t.events.length;)t.events[C][1].end={...E},C++;return br(t.events,_+1,0,t.events.slice(S)),t.events.length=C,u(x)}return a(x)}function u(x){if(r===n.length){if(!i)return p(x);if(i.currentConstruct&&i.currentConstruct.concrete)return w(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ux,c,f)(x)}function c(x){return i&&y(),g(r),p(x)}function f(x){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,w(x)}function p(x){return t.containerState={},e.attempt(ux,h,w)(x)}function h(x){return r++,n.push([t.currentConstruct,t.containerState]),p(x)}function w(x){if(x===null){i&&y(),g(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(x)}function m(x){if(x===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(x);return}return de(x)?(e.consume(x),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(x),m)}function b(x,S){const _=t.sliceStream(x);if(S&&_.push(null),x.previous=s,s&&(s.next=x),s=x,i.defineSkip(x.start),i.write(_),t.parser.lazy[x.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const C=t.events.length;let R=C,I,P;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(I){P=t.events[R][1].end;break}I=!0}for(g(r),E=C;E<t.events.length;)t.events[E][1].end={...P},E++;br(t.events,R+1,0,t.events.slice(C)),t.events.length=E}}function g(x){let S=n.length;for(;S-- >x;){const _=n[S];t.containerState=_[1],_[0].exit.call(t,e)}n.length=x}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fL(e,t,n){return We(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cx(e){if(e===null||rn(e)||aL(e))return 1;if(oL(e))return 2}function Zm(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const sp={name:"attention",resolveAll:hL,tokenize:pL};function hL(e,t){let n=-1,r,i,s,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};dx(f,-l),dx(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Tn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Tn(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=Tn(u,Zm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Tn(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Tn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,br(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pL(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=cx(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit("attentionSequence"),c=cx(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?f:f&&(i||!p)),u._close=!!(s===42?p:p&&(c||!f)),t(l)}}function dx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mL={name:"autolink",tokenize:gL};function gL(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return fr(h)?(e.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||pn(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||pn(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||rp(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):rL(h)?(e.consume(h),u):n(h)}function c(h){return pn(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||pn(h))&&r++<63){const w=h===45?p:f;return e.consume(h),w}return n(h)}}const dd={partial:!0,tokenize:yL};function yL(e,t,n){return r;function r(s){return Le(s)?We(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||de(s)?t(s):n(s)}}const Ck={continuation:{tokenize:xL},exit:wL,name:"blockQuote",tokenize:vL};function vL(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Le(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function xL(e,t,n){const r=this;return i;function i(o){return Le(o)?We(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(Ck,t,n)(o)}}function wL(e){e.exit("blockQuote")}const _k={name:"characterEscape",tokenize:bL};function bL(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return sL(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Nk={name:"characterReference",tokenize:SL};function SL(e,t,n){const r=this;let i=0,s,o;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=pn,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=iL,c):(e.enter("characterReferenceValue"),s=7,o=ip,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===pn&&!Qm(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<s?(e.consume(f),c):n(f)}}const fx={partial:!0,tokenize:EL},hx={concrete:!0,name:"codeFenced",tokenize:kL};function kL(e,t,n){const r=this,i={partial:!0,tokenize:_};let s=0,o=0,a;return l;function l(E){return u(E)}function u(E){const C=r.events[r.events.length-1];return s=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,a=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===a?(o++,e.consume(E),c):o<3?n(E):(e.exit("codeFencedFenceSequence"),Le(E)?We(e,f,"whitespace")(E):f(E))}function f(E){return E===null||de(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(fx,m,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):Le(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,h,"whitespace")(E)):E===96&&E===a?n(E):(e.consume(E),p)}function h(E){return E===null||de(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===null||de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===a?n(E):(e.consume(E),w)}function m(E){return e.attempt(i,S,b)(E)}function b(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),g}function g(E){return s>0&&Le(E)?We(e,y,"linePrefix",s+1)(E):y(E)}function y(E){return E===null||de(E)?e.check(fx,m,S)(E):(e.enter("codeFlowValue"),x(E))}function x(E){return E===null||de(E)?(e.exit("codeFlowValue"),y(E)):(e.consume(E),x)}function S(E){return e.exit("codeFenced"),t(E)}function _(E,C,R){let I=0;return P;function P(W){return E.enter("lineEnding"),E.consume(W),E.exit("lineEnding"),L}function L(W){return E.enter("codeFencedFence"),Le(W)?We(E,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):A(W)}function A(W){return W===a?(E.enter("codeFencedFenceSequence"),U(W)):R(W)}function U(W){return W===a?(I++,E.consume(W),U):I>=o?(E.exit("codeFencedFenceSequence"),Le(W)?We(E,F,"whitespace")(W):F(W)):R(W)}function F(W){return W===null||de(W)?(E.exit("codeFencedFence"),C(W)):R(W)}}}function EL(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const hf={name:"codeIndented",tokenize:_L},CL={partial:!0,tokenize:NL};function _L(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),We(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):de(u)?e.attempt(CL,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||de(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function NL(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):We(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):de(o)?i(o):n(o)}}const TL={name:"codeText",previous:RL,resolve:PL,tokenize:jL};function PL(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function RL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jL(e,t,n){let r=0,i,s;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(s=e.enter("codeTextSequence"),i=0,c(f)):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||de(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}class AL{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&na(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),na(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);na(this.left,n.reverse())}}}function na(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Tk(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new AL(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,IL(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return br(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function IL(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,f,p=-1,h=n,w=0,m=0;const b=[m];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(m=p+1,b.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),p=b.length;p--;){const g=a.slice(b[p],b[p+1]),y=s.pop();l.push([y,y+g.length-1]),e.splice(y,2,g)}for(l.reverse(),p=-1;++p<l.length;)u[w+l[p][0]]=w+l[p][1],w+=l[p][1]-l[p][0]-1;return u}const OL={resolve:LL,tokenize:DL},ML={partial:!0,tokenize:FL};function LL(e){return Tk(e),e}function DL(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):de(a)?e.check(ML,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function FL(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),We(e,s,"linePrefix")}function s(o){if(o===null||de(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Pk(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),p):g===null||g===32||g===41||rp(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(g))}function p(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(a),p(g)):g===null||g===60||de(g)?n(g):(e.consume(g),g===92?w:h)}function w(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function m(g){return!c&&(g===null||g===41||rn(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,m):g===41?(e.consume(g),c--,m):g===null||g===32||g===40||rp(g)?n(g):(e.consume(g),g===92?b:m)}function b(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function Rk(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):de(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||de(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!Le(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function jk(e,t,n,r,i,s){let o;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,l):n(p)}function l(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===o?(e.exit(s),l(o)):p===null?n(p):de(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),We(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||de(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Ta(e,t){let n;return r;function r(i){return de(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Le(i)?We(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const zL={name:"definition",tokenize:BL},$L={partial:!0,tokenize:VL};function BL(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),o(h)}function o(h){return Rk.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=oo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return rn(h)?Ta(e,u)(h):u(h)}function u(h){return Pk(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt($L,f,f)(h)}function f(h){return Le(h)?We(e,p,"whitespace")(h):p(h)}function p(h){return h===null||de(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function VL(e,t,n){return r;function r(a){return rn(a)?Ta(e,i)(a):n(a)}function i(a){return jk(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Le(a)?We(e,o,"whitespace")(a):o(a)}function o(a){return a===null||de(a)?t(a):n(a)}}const UL={name:"hardBreakEscape",tokenize:HL};function HL(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return de(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const WL={name:"headingAtx",resolve:qL,tokenize:KL};function qL(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},br(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function KL(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||rn(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||de(c)?(e.exit("atxHeading"),t(c)):Le(c)?We(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||rn(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const GL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],px=["pre","script","style","textarea"],QL={concrete:!0,name:"htmlFlow",resolveTo:XL,tokenize:JL},ZL={partial:!0,tokenize:tD},YL={partial:!0,tokenize:eD};function XL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function JL(e,t,n){const r=this;let i,s,o,a,l;return u;function u(N){return c(N)}function c(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),s=!0,m):N===63?(e.consume(N),i=3,r.interrupt?t:k):fr(N)?(e.consume(N),o=String.fromCharCode(N),b):n(N)}function p(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,a=0,w):fr(N)?(e.consume(N),i=4,r.interrupt?t:k):n(N)}function h(N){return N===45?(e.consume(N),r.interrupt?t:k):n(N)}function w(N){const le="CDATA[";return N===le.charCodeAt(a++)?(e.consume(N),a===le.length?r.interrupt?t:A:w):n(N)}function m(N){return fr(N)?(e.consume(N),o=String.fromCharCode(N),b):n(N)}function b(N){if(N===null||N===47||N===62||rn(N)){const le=N===47,Te=o.toLowerCase();return!le&&!s&&px.includes(Te)?(i=1,r.interrupt?t(N):A(N)):GL.includes(o.toLowerCase())?(i=6,le?(e.consume(N),g):r.interrupt?t(N):A(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):s?y(N):x(N))}return N===45||pn(N)?(e.consume(N),o+=String.fromCharCode(N),b):n(N)}function g(N){return N===62?(e.consume(N),r.interrupt?t:A):n(N)}function y(N){return Le(N)?(e.consume(N),y):P(N)}function x(N){return N===47?(e.consume(N),P):N===58||N===95||fr(N)?(e.consume(N),S):Le(N)?(e.consume(N),x):P(N)}function S(N){return N===45||N===46||N===58||N===95||pn(N)?(e.consume(N),S):_(N)}function _(N){return N===61?(e.consume(N),E):Le(N)?(e.consume(N),_):x(N)}function E(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,C):Le(N)?(e.consume(N),E):R(N)}function C(N){return N===l?(e.consume(N),l=null,I):N===null||de(N)?n(N):(e.consume(N),C)}function R(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||rn(N)?_(N):(e.consume(N),R)}function I(N){return N===47||N===62||Le(N)?x(N):n(N)}function P(N){return N===62?(e.consume(N),L):n(N)}function L(N){return N===null||de(N)?A(N):Le(N)?(e.consume(N),L):n(N)}function A(N){return N===45&&i===2?(e.consume(N),H):N===60&&i===1?(e.consume(N),V):N===62&&i===4?(e.consume(N),re):N===63&&i===3?(e.consume(N),k):N===93&&i===5?(e.consume(N),D):de(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ZL,ne,U)(N)):N===null||de(N)?(e.exit("htmlFlowData"),U(N)):(e.consume(N),A)}function U(N){return e.check(YL,F,ne)(N)}function F(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),W}function W(N){return N===null||de(N)?U(N):(e.enter("htmlFlowData"),A(N))}function H(N){return N===45?(e.consume(N),k):A(N)}function V(N){return N===47?(e.consume(N),o="",M):A(N)}function M(N){if(N===62){const le=o.toLowerCase();return px.includes(le)?(e.consume(N),re):A(N)}return fr(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),M):A(N)}function D(N){return N===93?(e.consume(N),k):A(N)}function k(N){return N===62?(e.consume(N),re):N===45&&i===2?(e.consume(N),k):A(N)}function re(N){return N===null||de(N)?(e.exit("htmlFlowData"),ne(N)):(e.consume(N),re)}function ne(N){return e.exit("htmlFlow"),t(N)}}function eD(e,t,n){const r=this;return i;function i(o){return de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function tD(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(dd,t,n)}}const nD={name:"htmlText",tokenize:rD};function rD(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),_):k===63?(e.consume(k),x):fr(k)?(e.consume(k),R):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),s=0,w):fr(k)?(e.consume(k),y):n(k)}function c(k){return k===45?(e.consume(k),h):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),p):de(k)?(o=f,V(k)):(e.consume(k),f)}function p(k){return k===45?(e.consume(k),h):f(k)}function h(k){return k===62?H(k):k===45?p(k):f(k)}function w(k){const re="CDATA[";return k===re.charCodeAt(s++)?(e.consume(k),s===re.length?m:w):n(k)}function m(k){return k===null?n(k):k===93?(e.consume(k),b):de(k)?(o=m,V(k)):(e.consume(k),m)}function b(k){return k===93?(e.consume(k),g):m(k)}function g(k){return k===62?H(k):k===93?(e.consume(k),g):m(k)}function y(k){return k===null||k===62?H(k):de(k)?(o=y,V(k)):(e.consume(k),y)}function x(k){return k===null?n(k):k===63?(e.consume(k),S):de(k)?(o=x,V(k)):(e.consume(k),x)}function S(k){return k===62?H(k):x(k)}function _(k){return fr(k)?(e.consume(k),E):n(k)}function E(k){return k===45||pn(k)?(e.consume(k),E):C(k)}function C(k){return de(k)?(o=C,V(k)):Le(k)?(e.consume(k),C):H(k)}function R(k){return k===45||pn(k)?(e.consume(k),R):k===47||k===62||rn(k)?I(k):n(k)}function I(k){return k===47?(e.consume(k),H):k===58||k===95||fr(k)?(e.consume(k),P):de(k)?(o=I,V(k)):Le(k)?(e.consume(k),I):H(k)}function P(k){return k===45||k===46||k===58||k===95||pn(k)?(e.consume(k),P):L(k)}function L(k){return k===61?(e.consume(k),A):de(k)?(o=L,V(k)):Le(k)?(e.consume(k),L):I(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,U):de(k)?(o=A,V(k)):Le(k)?(e.consume(k),A):(e.consume(k),F)}function U(k){return k===i?(e.consume(k),i=void 0,W):k===null?n(k):de(k)?(o=U,V(k)):(e.consume(k),U)}function F(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||rn(k)?I(k):(e.consume(k),F)}function W(k){return k===47||k===62||rn(k)?I(k):n(k)}function H(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function V(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),M}function M(k){return Le(k)?We(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):D(k)}function D(k){return e.enter("htmlTextData"),o(k)}}const Ym={name:"labelEnd",resolveAll:aD,resolveTo:lD,tokenize:uD},iD={tokenize:cD},sD={tokenize:dD},oD={tokenize:fD};function aD(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&br(e,0,e.length,n),e}function lD(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=Tn(a,e.slice(s+1,s+r+3)),a=Tn(a,[["enter",c,t]]),a=Tn(a,Zm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=Tn(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=Tn(a,e.slice(o+1)),a=Tn(a,[["exit",l,t]]),br(e,s,e.length,a),e}function uD(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(p){return s?s._inactive?f(p):(o=r.parser.defined.includes(oo(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(iD,c,o?c:f)(p):p===91?e.attempt(sD,c,o?u:f)(p):o?c(p):f(p)}function u(p){return e.attempt(oD,c,f)(p)}function c(p){return t(p)}function f(p){return s._balanced=!0,n(p)}}function cD(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return rn(f)?Ta(e,s)(f):s(f)}function s(f){return f===41?c(f):Pk(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return rn(f)?Ta(e,l)(f):c(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?jk(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return rn(f)?Ta(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dD(e,t,n){const r=this;return i;function i(a){return Rk.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(oo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function fD(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const hD={name:"labelStartImage",resolveAll:Ym.resolveAll,tokenize:pD};function pD(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const mD={name:"labelStartLink",resolveAll:Ym.resolveAll,tokenize:gD};function gD(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const pf={name:"lineEnding",tokenize:yD};function yD(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),We(e,t,"linePrefix")}}const Su={name:"thematicBreak",tokenize:vD};function vD(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||de(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Le(u)?We(e,a,"whitespace")(u):a(u))}}const Qt={continuation:{tokenize:SD},exit:ED,name:"list",tokenize:bD},xD={partial:!0,tokenize:CD},wD={partial:!0,tokenize:kD};function bD(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const w=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ip(h)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Su,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return ip(h)&&++o<10?(e.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(dd,r.interrupt?n:c,e.attempt(xD,p,f))}function c(h){return r.containerState.initialBlankLine=!0,s++,p(h)}function f(h){return Le(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function SD(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(dd,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,We(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Le(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wD,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,We(e,e.attempt(Qt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function kD(e,t,n){const r=this;return We(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function ED(e){e.exit(this.containerState.type)}function CD(e,t,n){const r=this;return We(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Le(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const mx={name:"setextUnderline",resolveTo:_D,tokenize:ND};function _D(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function ND(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Le(u)?We(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||de(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const TD={tokenize:PD};function PD(e){const t=this,n=e.attempt(dd,r,e.attempt(this.parser.constructs.flowInitial,i,We(e,e.attempt(this.parser.constructs.flow,i,e.attempt(OL,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const RD={resolveAll:Ik()},jD=Ak("string"),AD=Ak("text");function Ak(e){return{resolveAll:Ik(e==="text"?ID:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Ik(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function ID(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const OD={42:Qt,43:Qt,45:Qt,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,62:Ck},MD={91:zL},LD={[-2]:hf,[-1]:hf,32:hf},DD={35:WL,42:Su,45:[mx,Su],60:QL,61:mx,95:Su,96:hx,126:hx},FD={38:Nk,92:_k},zD={[-5]:pf,[-4]:pf,[-3]:pf,33:hD,38:Nk,42:sp,60:[mL,nD],91:mD,92:[UL,_k],93:Ym,95:sp,96:TL},$D={null:[sp,RD]},BD={null:[42,95]},VD={null:[]},UD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:BD,contentInitial:MD,disable:VD,document:OD,flow:DD,flowInitial:LD,insideSpan:$D,string:FD,text:zD},Symbol.toStringTag,{value:"Module"}));function HD(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:C(_),check:C(E),consume:y,enter:x,exit:S,interrupt:C(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:w,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function f(L){return o=Tn(o,L),b(),o[o.length-1]!==null?[]:(R(t,0),u.events=Zm(s,u.events,u),u.events)}function p(L,A){return qD(h(L),A)}function h(L){return WD(o,L)}function w(){const{_bufferIndex:L,_index:A,line:U,column:F,offset:W}=r;return{_bufferIndex:L,_index:A,line:U,column:F,offset:W}}function m(L){i[L.line]=L.column,P()}function b(){let L;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<A.length;)g(A.charCodeAt(r._bufferIndex));else g(A)}}function g(L){c=c(L)}function y(L){de(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,P()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function x(L,A){const U=A||{};return U.type=L,U.start=w(),u.events.push(["enter",U,u]),a.push(U),U}function S(L){const A=a.pop();return A.end=w(),u.events.push(["exit",A,u]),A}function _(L,A){R(L,A.from)}function E(L,A){A.restore()}function C(L,A){return U;function U(F,W,H){let V,M,D,k;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):re(F);function re(ye){return Y;function Y(xe){const Re=xe!==null&&ye[xe],ve=xe!==null&&ye.null,we=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return ne(we)(xe)}}function ne(ye){return V=ye,M=0,ye.length===0?H:N(ye[M])}function N(ye){return Y;function Y(xe){return k=I(),D=ye,ye.partial||(u.currentConstruct=ye),ye.name&&u.parser.constructs.disable.null.includes(ye.name)?Te():ye.tokenize.call(A?Object.assign(Object.create(u),A):u,l,le,Te)(xe)}}function le(ye){return L(D,k),W}function Te(ye){return k.restore(),++M<V.length?N(V[M]):H}}}function R(L,A){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&br(u.events,A,u.events.length-A,L.resolve(u.events.slice(A),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function I(){const L=w(),A=u.previous,U=u.currentConstruct,F=u.events.length,W=Array.from(a);return{from:F,restore:H};function H(){r=L,u.previous=A,u.currentConstruct=U,u.events.length=F,a=W,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function WD(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function qD(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
`;break}case-3:{o=`\r
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function KD(e){const r={constructs:eL([UD,...(e||{}).extensions||[]]),content:i(lL),defined:[],document:i(cL),flow:i(TD),lazy:{},string:i(jD),text:i(AD)};return r;function i(s){return o;function o(a){return HD(r,s,a)}}}function GD(e){for(;!Tk(e););return e}const gx=/[\0\t\n\r]/g;function QD(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,f,p,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,t="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(gx.lastIndex=f,u=gx.exec(s),p=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(p),!u){t=s.slice(f);break}if(h===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(s.slice(f,p)),e+=p-f),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ZD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YD(e){return e.replace(ZD,XD)}function XD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Ek(n.slice(s?2:1),s?16:10)}return Qm(n)||e}const Ok={}.hasOwnProperty;function JD(e,t,n){return typeof t!="string"&&(n=t,t=void 0),e4(n)(GD(KD(n).document().write(QD()(e,t,!0))))}function e4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Sn),autolinkProtocol:I,autolinkEmail:I,atxHeading:s(an),blockQuote:s(ve),characterEscape:I,characterReference:I,codeFenced:s(we),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(we,o),codeText:s(Ce,o),codeTextData:I,data:I,codeFlowValue:I,definition:s(lt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(St),hardBreakEscape:s(ln),hardBreakTrailing:s(ln),htmlFlow:s(bn,o),htmlFlowData:I,htmlText:s(bn,o),htmlTextData:I,image:s(qr),label:o,link:s(Sn),listItem:s(O),listItemValue:p,listOrdered:s(T,f),listUnordered:s(T),paragraph:s(z),reference:N,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(an),strong:s(J),thematicBreak:s(Z)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:Re,autolinkProtocol:xe,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ye,characterReference:Y,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:l(g),codeText:l(W),codeTextData:P,data:P,definition:l(),definitionDestinationString:S,definitionLabelString:y,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(U),htmlFlowData:P,htmlText:l(F),htmlTextData:P,image:l(V),label:D,labelText:M,lineEnding:L,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:le,resourceDestinationString:k,resourceTitleString:re,resource:ne,setextHeading:l(R),setextHeadingLineSequence:C,setextHeadingText:E,strong:l(),thematicBreak:l()}};Mk(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(j){let $={type:"root",children:[]};const ee={stack:[$],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},ce=[];let _e=-1;for(;++_e<j.length;)if(j[_e][1].type==="listOrdered"||j[_e][1].type==="listUnordered")if(j[_e][0]==="enter")ce.push(_e);else{const rt=ce.pop();_e=i(j,rt,_e)}for(_e=-1;++_e<j.length;){const rt=t[j[_e][0]];Ok.call(rt,j[_e][1].type)&&rt[j[_e][1].type].call(Object.assign({sliceSerialize:j[_e][2].sliceSerialize},ee),j[_e][1])}if(ee.tokenStack.length>0){const rt=ee.tokenStack[ee.tokenStack.length-1];(rt[1]||yx).call(ee,void 0,rt[0])}for($.position={start:Jr(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:Jr(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)$=t.transforms[_e]($)||$;return $}function i(j,$,ee){let ce=$-1,_e=-1,rt=!1,kn,kt,Tt,tr;for(;++ce<=ee;){const Xe=j[ce];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?_e++:_e--,tr=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(kn&&!tr&&!_e&&!Tt&&(Tt=ce),tr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tr=void 0}if(!_e&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||_e===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(kn){let nr=ce;for(kt=void 0;nr--;){const Kt=j[nr];if(Kt[1].type==="lineEnding"||Kt[1].type==="lineEndingBlank"){if(Kt[0]==="exit")continue;kt&&(j[kt][1].type="lineEndingBlank",rt=!0),Kt[1].type="lineEnding",kt=nr}else if(!(Kt[1].type==="linePrefix"||Kt[1].type==="blockQuotePrefix"||Kt[1].type==="blockQuotePrefixWhitespace"||Kt[1].type==="blockQuoteMarker"||Kt[1].type==="listItemIndent"))break}Tt&&(!kt||Tt<kt)&&(kn._spread=!0),kn.end=Object.assign({},kt?j[kt][1].start:Xe[1].end),j.splice(kt||ce,0,["exit",kn,Xe[2]]),ce++,ee++}if(Xe[1].type==="listItemPrefix"){const nr={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};kn=nr,j.splice(ce,0,["enter",nr,Xe[2]]),ce++,ee++,Tt=void 0,tr=!0}}}return j[$][1]._spread=rt,ee}function s(j,$){return ee;function ee(ce){a.call(this,j(ce),ce),$&&$.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(j,$,ee){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([$,ee||void 0]),j.position={start:Jr($.start),end:void 0}}function l(j){return $;function $(ee){j&&j.call(this,ee),u.call(this,ee)}}function u(j,$){const ee=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==j.type&&($?$.call(this,j,ce[0]):(ce[1]||yx).call(this,j,ce[0]));else throw new Error("Cannot close `"+j.type+"` ("+Na({start:j.start,end:j.end})+"): it’s not open");ee.position.end=Jr(j.end)}function c(){return XM(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(j){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function h(){const j=this.resume(),$=this.stack[this.stack.length-1];$.lang=j}function w(){const j=this.resume(),$=this.stack[this.stack.length-1];$.meta=j}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const j=this.resume(),$=this.stack[this.stack.length-1];$.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const j=this.resume(),$=this.stack[this.stack.length-1];$.value=j.replace(/(\r?\n|\r)$/g,"")}function y(j){const $=this.resume(),ee=this.stack[this.stack.length-1];ee.label=$,ee.identifier=oo(this.sliceSerialize(j)).toLowerCase()}function x(){const j=this.resume(),$=this.stack[this.stack.length-1];$.title=j}function S(){const j=this.resume(),$=this.stack[this.stack.length-1];$.url=j}function _(j){const $=this.stack[this.stack.length-1];if(!$.depth){const ee=this.sliceSerialize(j).length;$.depth=ee}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function C(j){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function I(j){const ee=this.stack[this.stack.length-1].children;let ce=ee[ee.length-1];(!ce||ce.type!=="text")&&(ce=X(),ce.position={start:Jr(j.start),end:void 0},ee.push(ce)),this.stack.push(ce)}function P(j){const $=this.stack.pop();$.value+=this.sliceSerialize(j),$.position.end=Jr(j.end)}function L(j){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=$.children[$.children.length-1];ee.position.end=Jr(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(I.call(this,j),P.call(this,j))}function A(){this.data.atHardBreak=!0}function U(){const j=this.resume(),$=this.stack[this.stack.length-1];$.value=j}function F(){const j=this.resume(),$=this.stack[this.stack.length-1];$.value=j}function W(){const j=this.resume(),$=this.stack[this.stack.length-1];$.value=j}function H(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=$,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function V(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=$,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function M(j){const $=this.sliceSerialize(j),ee=this.stack[this.stack.length-2];ee.label=YD($),ee.identifier=oo($).toLowerCase()}function D(){const j=this.stack[this.stack.length-1],$=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ce=j.children;ee.children=ce}else ee.alt=$}function k(){const j=this.resume(),$=this.stack[this.stack.length-1];$.url=j}function re(){const j=this.resume(),$=this.stack[this.stack.length-1];$.title=j}function ne(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function le(j){const $=this.resume(),ee=this.stack[this.stack.length-1];ee.label=$,ee.identifier=oo(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function Te(j){this.data.characterReferenceType=j.type}function ye(j){const $=this.sliceSerialize(j),ee=this.data.characterReferenceType;let ce;ee?(ce=Ek($,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Qm($);const _e=this.stack[this.stack.length-1];_e.value+=ce}function Y(j){const $=this.stack.pop();$.position.end=Jr(j.end)}function xe(j){P.call(this,j);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(j)}function Re(j){P.call(this,j);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(j)}function ve(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Ce(){return{type:"inlineCode",value:""}}function lt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function St(){return{type:"emphasis",children:[]}}function an(){return{type:"heading",depth:0,children:[]}}function ln(){return{type:"break"}}function bn(){return{type:"html",value:""}}function qr(){return{type:"image",title:null,url:"",alt:null}}function Sn(){return{type:"link",title:null,url:"",children:[]}}function T(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function O(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function z(){return{type:"paragraph",children:[]}}function J(){return{type:"strong",children:[]}}function X(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function Jr(e){return{line:e.line,column:e.column,offset:e.offset}}function Mk(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Mk(e,r):t4(e,r)}}function t4(e,t){let n;for(n in t)if(Ok.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function yx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function n4(e){const t=this;t.parser=n;function n(r){return JD(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function r4(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function i4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function s4(e,t){const n=t.value?t.value+`
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function o4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Uo(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function u4(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Lk(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function d4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lk(e,t);const i={src:Uo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function f4(e,t){const n={src:Uo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function h4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function p4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lk(e,t);const i={href:Uo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function m4(e,t){const n={href:Uo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function g4(e,t,n){const r=e.all(t),i=n?y4(n):Dk(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function y4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Dk(n[r])}return t}function Dk(e){const t=e.spread;return t??e.children.length>1}function v4(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function x4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function b4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function S4(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Wm(t.children[1]),l=yk(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function k4(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const f=t.children[l],p={},h=o?o[l]:void 0;h&&(p.align=h);let w={type:"element",tagName:s,properties:p,children:[]};f&&(w.children=e.all(f),e.patch(f,w),w=e.applyData(f,w)),u.push(w)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function E4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const vx=9,xx=32;function C4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(wx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(wx(t.slice(i),i>0,!1)),s.join("")}function wx(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===vx||s===xx;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===vx||s===xx;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function _4(e,t){const n={type:"text",value:C4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function N4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const T4={blockquote:r4,break:i4,code:s4,delete:o4,emphasis:a4,footnoteReference:l4,heading:u4,html:c4,imageReference:d4,image:f4,inlineCode:h4,linkReference:p4,link:m4,listItem:g4,list:v4,paragraph:x4,root:w4,strong:b4,table:S4,tableCell:E4,tableRow:k4,text:_4,thematicBreak:N4,toml:Gl,yaml:Gl,definition:Gl,footnoteDefinition:Gl};function Gl(){}const Fk=-1,fd=0,Pa=1,hc=2,Xm=3,Jm=4,eg=5,tg=6,zk=7,$k=8,bx=typeof self=="object"?self:globalThis,P4=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case fd:case Fk:return n(o,i);case Pa:{const a=n([],i);for(const l of o)a.push(r(l));return a}case hc:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Xm:return n(new Date(o),i);case Jm:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case eg:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case tg:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case zk:{const{name:a,message:l}=o;return n(new bx[a](l),i)}case $k:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new bx[s](o),i)};return r},Sx=e=>P4(new Map,e)(0),As="",{toString:R4}={},{keys:j4}=Object,ra=e=>{const t=typeof e;if(t!=="object"||!e)return[fd,t];const n=R4.call(e).slice(8,-1);switch(n){case"Array":return[Pa,As];case"Object":return[hc,As];case"Date":return[Xm,As];case"RegExp":return[Jm,As];case"Map":return[eg,As];case"Set":return[tg,As];case"DataView":return[Pa,n]}return n.includes("Array")?[Pa,n]:n.includes("Error")?[zk,n]:[hc,n]},Ql=([e,t])=>e===fd&&(t==="function"||t==="symbol"),A4=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=ra(o);switch(a){case fd:{let c=o;switch(l){case"bigint":a=$k,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Fk],o)}return i([a,c],o)}case Pa:{if(l){let p=o;return l==="DataView"?p=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(o)),i([l,[...p]],o)}const c=[],f=i([a,c],o);for(const p of o)c.push(s(p));return f}case hc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const c=[],f=i([a,c],o);for(const p of j4(o))(e||!Ql(ra(o[p])))&&c.push([s(p),s(o[p])]);return f}case Xm:return i([a,o.toISOString()],o);case Jm:{const{source:c,flags:f}=o;return i([a,{source:c,flags:f}],o)}case eg:{const c=[],f=i([a,c],o);for(const[p,h]of o)(e||!(Ql(ra(p))||Ql(ra(h))))&&c.push([s(p),s(h)]);return f}case tg:{const c=[],f=i([a,c],o);for(const p of o)(e||!Ql(ra(p)))&&c.push(s(p));return f}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},kx=(e,{json:t,lossy:n}={})=>{const r=[];return A4(!(t||n),!!t,new Map,r)(e),r},pc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Sx(kx(e,t)):structuredClone(e):(e,t)=>Sx(kx(e,t));function I4(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function O4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function M4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||I4,r=e.options.footnoteBackLabel||O4,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),p=Uo(f.toLowerCase());let h=0;const w=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++h<=m;){w.length>0&&w.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,h);typeof y=="string"&&(y={type:"text",value:y}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const y=b.children[b.children.length-1];y&&y.type==="text"?y.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...w)}else c.push(...w);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...pc(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
`}]}}const Bk=function(e){if(e==null)return z4;if(typeof e=="function")return hd(e);if(typeof e=="object")return Array.isArray(e)?L4(e):D4(e);if(typeof e=="string")return F4(e);throw new Error("Expected function, string, or object as test")};function L4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bk(e[n]);return hd(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function D4(e){const t=e;return hd(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function F4(e){return hd(t);function t(n){return n&&n.type===e}}function hd(e){return t;function t(n,r,i){return!!($4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function z4(){return!0}function $4(e){return e!==null&&typeof e=="object"&&"type"in e}const Vk=[],B4=!0,Ex=!1,V4="skip";function U4(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Bk(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Vk,w,m,b;if((!t||s(l,u,c[c.length-1]||void 0))&&(h=H4(n(l,c)),h[0]===Ex))return h;if("children"in l&&l.children){const g=l;if(g.children&&h[0]!==V4)for(m=(r?g.children.length:-1)+o,b=c.concat(g);m>-1&&m<g.children.length;){const y=g.children[m];if(w=a(y,m,b)(),w[0]===Ex)return w;m=typeof w[1]=="number"?w[1]:m+o}}return h}}}function H4(e){return Array.isArray(e)?e:typeof e=="number"?[B4,e]:e==null?Vk:[e]}function Uk(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),U4(e,s,a,i);function a(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return o(l,f,c)}}const op={}.hasOwnProperty,W4={};function q4(e,t){const n=t||W4,r=new Map,i=new Map,s=new Map,o={...T4,...n.handlers},a={all:u,applyData:G4,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:K4,wrap:Z4};return Uk(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),a;function l(c,f){const p=c.type,h=a.handlers[p];if(op.call(a.handlers,p)&&h)return h(a,c,f);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in c){const{children:m,...b}=c,g=pc(b);return g.children=a.all(c),g}return pc(c)}return(a.options.unknownHandler||Q4)(a,c,f)}function u(c){const f=[];if("children"in c){const p=c.children;let h=-1;for(;++h<p.length;){const w=a.one(p[h],c);if(w){if(h&&p[h-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Cx(w.value)),!Array.isArray(w)&&w.type==="element")){const m=w.children[0];m&&m.type==="text"&&(m.value=Cx(m.value))}Array.isArray(w)?f.push(...w):f.push(w)}}}return f}}function K4(e,t){e.position&&(t.position=RM(e))}function G4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,pc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Q4(e,t){const n=t.data||{},r="value"in t&&!(op.call(n,"hProperties")||op.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Z4(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function Cx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _x(e,t){const n=q4(e,t),r=n.one(e,void 0),i=M4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
`},i),s}function Y4(e,t){return e&&"run"in e?async function(n,r){const i=_x(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _x(n,{file:r,...e||t})}}function Nx(e){if(e)throw e}var ku=Object.prototype.hasOwnProperty,Hk=Object.prototype.toString,Tx=Object.defineProperty,Px=Object.getOwnPropertyDescriptor,Rx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Hk.call(t)==="[object Array]"},jx=function(t){if(!t||Hk.call(t)!=="[object Object]")return!1;var n=ku.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ku.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ku.call(t,i)},Ax=function(t,n){Tx&&n.name==="__proto__"?Tx(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ix=function(t,n){if(n==="__proto__")if(ku.call(t,n)){if(Px)return Px(t,n).value}else return;return t[n]},X4=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Ix(a,n),i=Ix(t,n),a!==i&&(c&&i&&(jx(i)||(s=Rx(i)))?(s?(s=!1,o=r&&Rx(r)?r:[]):o=r&&jx(r)?r:{},Ax(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Ax(a,{name:n,newValue:i}));return a};const mf=kc(X4);function ap(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function J4(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...u){const c=e[++s];let f=-1;if(l){o(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?eF(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function eF(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const sr={basename:tF,dirname:nF,extname:rF,join:iF,sep:"/"};function tF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');vl(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function nF(e){if(vl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function rF(e){vl(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function iF(...e){let t=-1,n;for(;++t<e.length;)vl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":sF(n)}function sF(e){vl(e);const t=e.codePointAt(0)===47;let n=oF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function oF(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function vl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aF={cwd:lF};function lF(){return"/"}function lp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uF(e){if(typeof e=="string")e=new URL(e);else if(!lp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return cF(e)}function cF(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const gf=["history","path","basename","stem","extname","dirname"];class Wk{constructor(t){let n;t?lp(t)?n={path:t}:typeof t=="string"||dF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<gf.length;){const s=gf[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)gf.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){vf(t,"basename"),yf(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){Ox(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(yf(t,"extname"),Ox(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lp(t)&&(t=uF(t)),vf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){vf(t,"stem"),yf(t,"stem"),this.path=sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Lt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function yf(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function vf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ox(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fF=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},hF={}.hasOwnProperty;class ng extends fF{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=J4()}copy(){const t=new ng;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(mf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(bf("data",this.frozen),this.namespace[t]=n,this):hF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(bf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Zl(t),r=this.parser||this.Parser;return xf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),xf("process",this.parser||this.Parser),wf("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Zl(t),l=r.parse(a);r.run(l,a,function(c,f,p){if(c||!f||!p)return u(c);const h=f,w=r.stringify(h,p);gF(w)?p.value=w:p.result=w,u(c,p)});function u(c,f){c||!f?o(c):s?s(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),xf("processSync",this.parser||this.Parser),wf("processSync",this.compiler||this.Compiler),this.process(t,i),Lx("processSync","process",n),r;function i(s,o){n=!0,Nx(s),r=o}}run(t,n,r){Mx(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=Zl(n);i.run(t,l,u);function u(c,f,p){const h=f||t;c?a(c):o?o(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Lx("runSync","run",r),i;function s(o,a){Nx(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Zl(n),i=this.compiler||this.Compiler;return wf("stringify",i),Mx(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(bf("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=mf(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];s(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[h,...w]=c;const m=r[p][1];ap(m)&&ap(h)&&(h=mf(!0,m,h)),r[p]=[u,h,...w]}}}}const pF=new ng().freeze();function xf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mx(e){if(!ap(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Lx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zl(e){return mF(e)?e:new Wk(e)}function mF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gF(e){return typeof e=="string"||yF(e)}function yF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vF="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dx=[],Fx={allowDangerousHtml:!0},xF=/^(https?|ircs?|mailto|xmpp)$/i,wF=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function qk(e){const t=bF(e),n=SF(e);return kF(t.runSync(t.parse(n),n),e)}function bF(e){const t=e.rehypePlugins||Dx,n=e.remarkPlugins||Dx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fx}:Fx;return pF().use(n4).use(n).use(Y4,r).use(t)}function SF(e){const t=e.children||"",n=new Wk;return typeof t=="string"&&(n.value=t),n}function kF(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||EF;for(const c of wF)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+vF+c.id,void 0);return Uk(e,u),MM(e,{Fragment:d.Fragment,components:i,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function u(c,f,p){if(c.type==="raw"&&p&&typeof f=="number")return o?p.children.splice(f,1):p.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in ff)if(Object.hasOwn(ff,h)&&Object.hasOwn(c.properties,h)){const w=c.properties[h],m=ff[h];(m===null||m.includes(c.tagName))&&(c.properties[h]=l(String(w||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,p)),h&&p&&typeof f=="number")return a&&c.children?p.children.splice(f,1,...c.children):p.children.splice(f,1),f}}}function EF(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||xF.test(e.slice(0,t))?e:""}var Sf="rovingFocusGroup.onEntryFocus",CF={bubbles:!1,cancelable:!0},xl="RovingFocusGroup",[up,Kk,_F]=dm(xl),[NF,Gk]=Sr(xl,[_F]),[TF,PF]=NF(xl),Qk=v.forwardRef((e,t)=>d.jsx(up.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(up.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(RF,{...e,ref:t})})}));Qk.displayName=xl;var RF=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,p=v.useRef(null),h=Fe(t,p),w=Rm(s),[m,b]=Ai({prop:o,defaultProp:a??null,onChange:l,caller:xl}),[g,y]=v.useState(!1),x=In(u),S=Kk(n),_=v.useRef(!1),[E,C]=v.useState(0);return v.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Sf,x),()=>R.removeEventListener(Sf,x)},[x]),d.jsx(TF,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:m,onItemFocus:v.useCallback(R=>b(R),[b]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(R=>R+1),[]),onFocusableItemRemove:v.useCallback(()=>C(R=>R-1),[]),children:d.jsx(fe.div,{tabIndex:g||E===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{_.current=!0}),onFocus:ue(e.onFocus,R=>{const I=!_.current;if(R.target===R.currentTarget&&I&&!g){const P=new CustomEvent(Sf,CF);if(R.currentTarget.dispatchEvent(P),!P.defaultPrevented){const L=S().filter(H=>H.focusable),A=L.find(H=>H.active),U=L.find(H=>H.id===m),W=[A,U,...L].filter(Boolean).map(H=>H.ref.current);Xk(W,c)}}_.current=!1}),onBlur:ue(e.onBlur,()=>y(!1))})})}),Zk="RovingFocusGroupItem",Yk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=e,l=Lr(),u=s||l,c=PF(Zk,n),f=c.currentTabStopId===u,p=Kk(n),{onFocusableItemAdd:h,onFocusableItemRemove:w,currentTabStopId:m}=c;return v.useEffect(()=>{if(r)return h(),()=>w()},[r,h,w]),d.jsx(up.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:d.jsx(fe.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:ue(e.onMouseDown,b=>{r?c.onItemFocus(u):b.preventDefault()}),onFocus:ue(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:ue(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=IF(b,c.orientation,c.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=p().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")x.reverse();else if(g==="prev"||g==="next"){g==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=c.loop?OF(x,S+1):x.slice(S+1)}setTimeout(()=>Xk(x))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:m!=null}):o})})});Yk.displayName=Zk;var jF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AF(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function IF(e,t,n){const r=AF(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jF[r]}function Xk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function OF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var MF=Qk,LF=Yk,pd="Tabs",[DF,uz]=Sr(pd,[Gk]),Jk=Gk(),[FF,rg]=DF(pd),eE=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,c=Rm(a),[f,p]=Ai({prop:r,onChange:i,defaultProp:s??"",caller:pd});return d.jsx(FF,{scope:n,baseId:Lr(),value:f,onValueChange:p,orientation:o,dir:c,activationMode:l,children:d.jsx(fe.div,{dir:c,"data-orientation":o,...u,ref:t})})});eE.displayName=pd;var tE="TabsList",nE=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=rg(tE,n),o=Jk(n);return d.jsx(MF,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:d.jsx(fe.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});nE.displayName=tE;var rE="TabsTrigger",iE=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,o=rg(rE,n),a=Jk(n),l=aE(o.baseId,r),u=lE(o.baseId,r),c=r===o.value;return d.jsx(LF,{asChild:!0,...a,focusable:!i,active:c,children:d.jsx(fe.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=o.activationMode!=="manual";!c&&!i&&f&&o.onValueChange(r)})})})});iE.displayName=rE;var sE="TabsContent",oE=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=e,a=rg(sE,n),l=aE(a.baseId,r),u=lE(a.baseId,r),c=r===a.value,f=v.useRef(c);return v.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(Wr,{present:i||c,children:({present:p})=>d.jsx(fe.div,{"data-state":c?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});oE.displayName=sE;function aE(e,t){return`${e}-trigger-${t}`}function lE(e,t){return`${e}-content-${t}`}var zF=eE,uE=nE,cE=iE,dE=oE;const fE=zF,ig=v.forwardRef(({className:e,...t},n)=>d.jsx(uE,{ref:n,className:ke("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ig.displayName=uE.displayName;const rl=v.forwardRef(({className:e,...t},n)=>d.jsx(cE,{ref:n,className:ke("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));rl.displayName=cE.displayName;const il=v.forwardRef(({className:e,...t},n)=>d.jsx(dE,{ref:n,className:ke("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));il.displayName=dE.displayName;const Ms="0.20.9";let zx=!1,Ra,hE,cp,pE,mE,gE;function $F(e,t={auto:!1}){if(zx)throw new Error(`you must \`import '@anthropic-ai/sdk/shims/${e.kind}'\` before importing anything else from @anthropic-ai/sdk`);if(Ra)throw new Error(`can't \`import '@anthropic-ai/sdk/shims/${e.kind}'\` after \`import '@anthropic-ai/sdk/shims/${Ra}'\``);zx=t.auto,Ra=e.kind,hE=e.fetch,cp=e.File,pE=e.ReadableStream,mE=e.getDefaultAgent,gE=e.fileFromPath}class BF{constructor(t){this.body=t}get[Symbol.toStringTag](){return"MultipartBody"}}function VF({manuallyImported:e}={}){const t=e?"You may need to use polyfills":"Add one of these imports before your first `import … from '@anthropic-ai/sdk'`:\n- `import '@anthropic-ai/sdk/shims/node'` (if you're running on Node)\n- `import '@anthropic-ai/sdk/shims/web'` (otherwise)\n";let n,r,i,s;try{n=fetch,r=Request,i=Response,s=Headers}catch(o){throw new Error(`this environment is missing the following Web Fetch API type: ${o.message}. ${t}`)}return{kind:"web",fetch:n,Request:r,Response:i,Headers:s,FormData:typeof FormData<"u"?FormData:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${t}`)}},Blob:typeof Blob<"u"?Blob:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${t}`)}},File:typeof File<"u"?File:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${t}`)}},ReadableStream:typeof ReadableStream<"u"?ReadableStream:class{constructor(){throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${t}`)}},getMultipartRequestOptions:async(o,a)=>({...a,body:new BF(o)}),getDefaultAgent:o=>{},fileFromPath:()=>{throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/anthropics/anthropic-sdk-typescript#file-uploads")},isFsReadStream:o=>!1}}Ra||$F(VF(),{auto:!0});class mt extends Error{}class Mt extends mt{constructor(t,n,r,i){super(`${Mt.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.error=n}static makeMessage(t,n,r){const i=n!=null&&n.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):r;return t&&i?`${t} ${i}`:t?`${t} status code (no body)`:i||"(no status code or body)"}static generate(t,n,r,i){if(!t)return new md({cause:dp(n)});const s=n;return t===400?new vE(t,s,r,i):t===401?new xE(t,s,r,i):t===403?new wE(t,s,r,i):t===404?new bE(t,s,r,i):t===409?new SE(t,s,r,i):t===422?new kE(t,s,r,i):t===429?new EE(t,s,r,i):t>=500?new CE(t,s,r,i):new Mt(t,s,r,i)}}class es extends Mt{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0),this.status=void 0}}class md extends Mt{constructor({message:t,cause:n}){super(void 0,void 0,t||"Connection error.",void 0),this.status=void 0,n&&(this.cause=n)}}class yE extends md{constructor({message:t}={}){super({message:t??"Request timed out."})}}class vE extends Mt{constructor(){super(...arguments),this.status=400}}class xE extends Mt{constructor(){super(...arguments),this.status=401}}class wE extends Mt{constructor(){super(...arguments),this.status=403}}class bE extends Mt{constructor(){super(...arguments),this.status=404}}class SE extends Mt{constructor(){super(...arguments),this.status=409}}class kE extends Mt{constructor(){super(...arguments),this.status=422}}class EE extends Mt{constructor(){super(...arguments),this.status=429}}class CE extends Mt{}class vi{constructor(t,n){this.iterator=t,this.controller=n}static fromSSEResponse(t,n){let r=!1;async function*i(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let s=!1;try{for await(const o of UF(t,n)){if(o.event==="completion")try{yield JSON.parse(o.data)}catch(a){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),a}if(o.event==="message_start"||o.event==="message_delta"||o.event==="message_stop"||o.event==="content_block_start"||o.event==="content_block_delta"||o.event==="content_block_stop")try{yield JSON.parse(o.data)}catch(a){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),a}if(o.event!=="ping"&&o.event==="error"){const a=o.data,l=RE(a),u=l?void 0:a;throw Mt.generate(void 0,l,u,PE(t.headers))}}s=!0}catch(o){if(o instanceof Error&&o.name==="AbortError")return;throw o}finally{s||n.abort()}}return new vi(i,n)}static fromReadableStream(t,n){let r=!1;async function*i(){const o=new bs,a=_E(t);for await(const l of a)for(const u of o.decode(l))yield u;for(const l of o.flush())yield l}async function*s(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let o=!1;try{for await(const a of i())o||a&&(yield JSON.parse(a));o=!0}catch(a){if(a instanceof Error&&a.name==="AbortError")return;throw a}finally{o||n.abort()}}return new vi(s,n)}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],n=[],r=this.iterator(),i=s=>({next:()=>{if(s.length===0){const o=r.next();t.push(o),n.push(o)}return s.shift()}});return[new vi(()=>i(t),this.controller),new vi(()=>i(n),this.controller)]}toReadableStream(){const t=this;let n;const r=new TextEncoder;return new pE({async start(){n=t[Symbol.asyncIterator]()},async pull(i){try{const{value:s,done:o}=await n.next();if(o)return i.close();const a=r.encode(JSON.stringify(s)+`
`);i.enqueue(a)}catch(s){i.error(s)}},async cancel(){var i;await((i=n.return)==null?void 0:i.call(n))}})}}async function*UF(e,t){if(!e.body)throw t.abort(),new mt("Attempted to iterate over a response with no body");const n=new qF,r=new bs,i=_E(e.body);for await(const s of HF(i))for(const o of r.decode(s)){const a=n.decode(o);a&&(yield a)}for(const s of r.flush()){const o=n.decode(s);o&&(yield o)}}async function*HF(e){let t=new Uint8Array;for await(const n of e){if(n==null)continue;const r=n instanceof ArrayBuffer?new Uint8Array(n):typeof n=="string"?new TextEncoder().encode(n):n;let i=new Uint8Array(t.length+r.length);i.set(t),i.set(r,t.length),t=i;let s;for(;(s=WF(t))!==-1;)yield t.slice(0,s),t=t.slice(s)}t.length>0&&(yield t)}function WF(e){for(let r=0;r<e.length-2;r++){if(e[r]===10&&e[r+1]===10||e[r]===13&&e[r+1]===13)return r+2;if(e[r]===13&&e[r+1]===10&&r+3<e.length&&e[r+2]===13&&e[r+3]===10)return r+4}return-1}class qF{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;const s={event:this.event,data:this.data.join(`
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],s}if(this.chunks.push(t),t.startsWith(":"))return null;let[n,r,i]=KF(t,":");return i.startsWith(" ")&&(i=i.substring(1)),n==="event"?this.event=i:n==="data"&&this.data.push(i),null}}class bs{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let n=this.decodeText(t);if(this.trailingCR&&(n="\r"+n,this.trailingCR=!1),n.endsWith("\r")&&(this.trailingCR=!0,n=n.slice(0,-1)),!n)return[];const r=bs.NEWLINE_CHARS.has(n[n.length-1]||"");let i=n.split(bs.NEWLINE_REGEXP);return r&&i.pop(),i.length===1&&!r?(this.buffer.push(i[0]),[]):(this.buffer.length>0&&(i=[this.buffer.join("")+i[0],...i.slice(1)],this.buffer=[]),r||(this.buffer=[i.pop()||""]),i)}decodeText(t){if(t==null)return"";if(typeof t=="string")return t;if(typeof Buffer<"u"){if(t instanceof Buffer)return t.toString();if(t instanceof Uint8Array)return Buffer.from(t).toString();throw new mt(`Unexpected: received non-Uint8Array (${t.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if(typeof TextDecoder<"u"){if(t instanceof Uint8Array||t instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(t);throw new mt(`Unexpected: received non-Uint8Array/ArrayBuffer (${t.constructor.name}) in a web platform. Please report this error.`)}throw new mt("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const t=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,t}}bs.NEWLINE_CHARS=new Set([`
`,"\r"]);bs.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function KF(e,t){const n=e.indexOf(t);return n!==-1?[e.substring(0,n),t,e.substring(n+t.length)]:[e,"",""]}function _E(e){if(e[Symbol.asyncIterator])return e;const t=e.getReader();return{async next(){try{const n=await t.read();return n!=null&&n.done&&t.releaseLock(),n}catch(n){throw t.releaseLock(),n}},async return(){const n=t.cancel();return t.releaseLock(),await n,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}const GF=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function",QF=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&NE(e),NE=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function";async function ZF(e,t,n){var i;if(e=await e,n??(n=QF(e)?{lastModified:e.lastModified,type:e.type}:{}),GF(e)){const s=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()??"unknown_file"),new cp([s],t,n)}const r=await YF(e);if(t||(t=JF(e)??"unknown_file"),!n.type){const s=(i=r[0])==null?void 0:i.type;typeof s=="string"&&(n={...n,type:s})}return new cp(r,t,n)}async function YF(e){var n;let t=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(NE(e))t.push(await e.arrayBuffer());else if(e3(e))for await(const r of e)t.push(r);else throw new Error(`Unexpected data type: ${typeof e}; constructor: ${(n=e==null?void 0:e.constructor)==null?void 0:n.name}; props: ${XF(e)}`);return t}function XF(e){return`[${Object.getOwnPropertyNames(e).map(n=>`"${n}"`).join(", ")}]`}function JF(e){var t;return kf(e.name)||kf(e.filename)||((t=kf(e.path))==null?void 0:t.split(/[\\/]/).pop())}const kf=e=>{if(typeof e=="string")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return String(e)},e3=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function",$x=e=>e&&typeof e=="object"&&e.body&&e[Symbol.toStringTag]==="MultipartBody";var ao={};async function TE(e){const{response:t}=e;if(e.options.stream)return lo("response",t.status,t.url,t.headers,t.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(t,e.controller):vi.fromSSEResponse(t,e.controller);if(t.status===204)return null;if(e.options.__binaryResponse)return t;const n=t.headers.get("content-type");if((n==null?void 0:n.includes("application/json"))||(n==null?void 0:n.includes("application/vnd.api+json"))){const s=await t.json();return lo("response",t.status,t.url,t.headers,s),s}const i=await t.text();return lo("response",t.status,t.url,t.headers,i),i}class gd extends Promise{constructor(t,n=TE){super(r=>{r(null)}),this.responsePromise=t,this.parseResponse=n}_thenUnwrap(t){return new gd(this.responsePromise,async n=>t(await this.parseResponse(n)))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){const[t,n]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:n}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(t,n){return this.parse().then(t,n)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}}class t3{constructor({baseURL:t,maxRetries:n=2,timeout:r=6e5,httpAgent:i,fetch:s}){this.baseURL=t,this.maxRetries=Ef("maxRetries",n),this.timeout=Ef("timeout",r),this.httpAgent=i,this.fetch=s??hE}authHeaders(t){return{}}defaultHeaders(t){return{Accept:"application/json","Content-Type":"application/json","User-Agent":this.getUserAgent(),...s3(),...this.authHeaders(t)}}validateHeaders(t,n){}defaultIdempotencyKey(){return`stainless-node-retry-${c3()}`}get(t,n){return this.methodRequest("get",t,n)}post(t,n){return this.methodRequest("post",t,n)}patch(t,n){return this.methodRequest("patch",t,n)}put(t,n){return this.methodRequest("put",t,n)}delete(t,n){return this.methodRequest("delete",t,n)}methodRequest(t,n,r){return this.request(Promise.resolve(r).then(i=>({method:t,path:n,...i})))}getAPIList(t,n,r){return this.requestAPIList(n,{method:"get",path:t,...r})}calculateContentLength(t){if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.byteLength(t,"utf8").toString();if(typeof TextEncoder<"u")return new TextEncoder().encode(t).length.toString()}return null}buildRequest(t){var w;const{method:n,path:r,query:i,headers:s={}}=t,o=$x(t.body)?t.body.body:t.body?JSON.stringify(t.body,null,2):null,a=this.calculateContentLength(o),l=this.buildURL(r,i);"timeout"in t&&Ef("timeout",t.timeout);const u=t.timeout??this.timeout,c=t.httpAgent??this.httpAgent??mE(l),f=u+1e3;typeof((w=c==null?void 0:c.options)==null?void 0:w.timeout)=="number"&&f>(c.options.timeout??0)&&(c.options.timeout=f),this.idempotencyHeader&&n!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),s[this.idempotencyHeader]=t.idempotencyKey);const p=this.buildHeaders({options:t,headers:s,contentLength:a});return{req:{method:n,...o&&{body:o},headers:p,...c&&{agent:c},signal:t.signal??null},url:l,timeout:u}}buildHeaders({options:t,headers:n,contentLength:r}){const i={};r&&(i["content-length"]=r);const s=this.defaultHeaders(t);return Hx(i,s),Hx(i,n),$x(t.body)&&Ra!=="node"&&delete i["content-type"],this.validateHeaders(i,n),i}async prepareOptions(t){}async prepareRequest(t,{url:n,options:r}){}parseHeaders(t){return t?Symbol.iterator in t?Object.fromEntries(Array.from(t).map(n=>[...n])):{...t}:{}}makeStatusError(t,n,r,i){return Mt.generate(t,n,r,i)}request(t,n=null){return new gd(this.makeRequest(t,n))}async makeRequest(t,n){var c,f;const r=await t;n==null&&(n=r.maxRetries??this.maxRetries),await this.prepareOptions(r);const{req:i,url:s,timeout:o}=this.buildRequest(r);if(await this.prepareRequest(i,{url:s,options:r}),lo("request",s,r,i.headers),(c=r.signal)!=null&&c.aborted)throw new es;const a=new AbortController,l=await this.fetchWithTimeout(s,i,o,a).catch(dp);if(l instanceof Error){if((f=r.signal)!=null&&f.aborted)throw new es;if(n)return this.retryRequest(r,n);throw l.name==="AbortError"?new yE:new md({cause:l})}const u=PE(l.headers);if(!l.ok){if(n&&this.shouldRetry(l)){const g=`retrying, ${n} attempts remaining`;return lo(`response (error; ${g})`,l.status,s,u),this.retryRequest(r,n,u)}const p=await l.text().catch(g=>dp(g).message),h=RE(p),w=h?void 0:p;throw lo(`response (error; ${n?"(error; no more retries left)":"(error; not retryable)"})`,l.status,s,u,w),this.makeStatusError(l.status,h,w,u)}return{response:l,options:r,controller:a}}requestAPIList(t,n){const r=this.makeRequest(n,null);return new n3(this,r,t)}buildURL(t,n){const r=a3(t)?new URL(t):new URL(this.baseURL+(this.baseURL.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),i=this.defaultQuery();return fp(i)||(n={...i,...n}),typeof n=="object"&&n&&!Array.isArray(n)&&(r.search=this.stringifyQuery(n)),r.toString()}stringifyQuery(t){return Object.entries(t).filter(([n,r])=>typeof r<"u").map(([n,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(n)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(n)}=`;throw new mt(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}async fetchWithTimeout(t,n,r,i){const{signal:s,...o}=n||{};s&&s.addEventListener("abort",()=>i.abort());const a=setTimeout(()=>i.abort(),r);return this.getRequestClient().fetch.call(void 0,t,{signal:i.signal,...o}).finally(()=>{clearTimeout(a)})}getRequestClient(){return{fetch:this.fetch}}shouldRetry(t){const n=t.headers.get("x-should-retry");return n==="true"?!0:n==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,n,r){let i;const s=r==null?void 0:r["retry-after-ms"];if(s){const a=parseFloat(s);Number.isNaN(a)||(i=a)}const o=r==null?void 0:r["retry-after"];if(o&&!i){const a=parseFloat(o);Number.isNaN(a)?i=Date.parse(o)-Date.now():i=a*1e3}if(!(i&&0<=i&&i<60*1e3)){const a=t.maxRetries??this.maxRetries;i=this.calculateDefaultRetryTimeoutMillis(n,a)}return await l3(i),this.makeRequest(t,n-1)}calculateDefaultRetryTimeoutMillis(t,n){const s=n-t,o=Math.min(.5*Math.pow(2,s),8),a=1-Math.random()*.25;return o*a*1e3}getUserAgent(){return`${this.constructor.name}/JS ${Ms}`}}class n3 extends gd{constructor(t,n,r){super(n,async i=>new r(t,i.response,await TE(i),i.options))}async*[Symbol.asyncIterator](){const t=await this;for await(const n of t)yield n}}const PE=e=>new Proxy(Object.fromEntries(e.entries()),{get(t,n){const r=n.toString();return t[r.toLowerCase()]||t[r]}}),r3=()=>{var t;if(typeof Deno<"u"&&Deno.build!=null)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ms,"X-Stainless-OS":Vx(Deno.build.os),"X-Stainless-Arch":Bx(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((t=Deno.version)==null?void 0:t.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ms,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":process.version};if(Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ms,"X-Stainless-OS":Vx(process.platform),"X-Stainless-Arch":Bx(process.arch),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":process.version};const e=i3();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ms,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ms,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function i3(){if(typeof navigator>"u"||!navigator)return null;const e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:t,pattern:n}of e){const r=n.exec(navigator.userAgent);if(r){const i=r[1]||0,s=r[2]||0,o=r[3]||0;return{browser:t,version:`${i}.${s}.${o}`}}}return null}const Bx=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",Vx=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown");let Ux;const s3=()=>Ux??(Ux=r3()),RE=e=>{try{return JSON.parse(e)}catch{return}},o3=new RegExp("^(?:[a-z]+:)?//","i"),a3=e=>o3.test(e),l3=e=>new Promise(t=>setTimeout(t,e)),Ef=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new mt(`${e} must be an integer`);if(t<0)throw new mt(`${e} must be a positive integer`);return t},dp=e=>e instanceof Error?e:new Error(e),Cf=e=>{var t,n,r,i;if(typeof process<"u")return((t=ao==null?void 0:ao[e])==null?void 0:t.trim())??void 0;if(typeof Deno<"u")return(i=(r=(n=Deno.env)==null?void 0:n.get)==null?void 0:r.call(n,e))==null?void 0:i.trim()};function fp(e){if(!e)return!0;for(const t in e)return!1;return!0}function u3(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Hx(e,t){for(const n in t){if(!u3(t,n))continue;const r=n.toLowerCase();if(!r)continue;const i=t[n];i===null?delete e[r]:i!==void 0&&(e[r]=i)}}function lo(e,...t){typeof process<"u"&&(ao==null?void 0:ao.DEBUG)==="true"&&console.log(`Anthropic:DEBUG:${e}`,...t)}const c3=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});class wl{constructor(t){this._client=t}}let mc=class extends wl{create(t,n){return this._client.post("/v1/messages?beta=tools",{body:t,timeout:6e5,...n,headers:{"anthropic-beta":"tools-2024-04-04",...n==null?void 0:n.headers},stream:t.stream??!1})}};mc||(mc={});class gc extends wl{constructor(){super(...arguments),this.messages=new mc(this._client)}}(function(e){e.Messages=mc})(gc||(gc={}));class yc extends wl{constructor(){super(...arguments),this.tools=new gc(this._client)}}(function(e){e.Tools=gc})(yc||(yc={}));class vc extends wl{create(t,n){return this._client.post("/v1/complete",{body:t,timeout:6e5,...n,stream:t.stream??!1})}}vc||(vc={});var Gt=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Pe=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},En,ei,Yl,Xl,ia,sa,Jl,oa,_r,aa,eu,tu,Is,_f,Wx,Nf,Tf,Pf,Rf,qx;class xc{constructor(){En.add(this),this.messages=[],this.receivedMessages=[],ei.set(this,void 0),this.controller=new AbortController,Yl.set(this,void 0),Xl.set(this,()=>{}),ia.set(this,()=>{}),sa.set(this,void 0),Jl.set(this,()=>{}),oa.set(this,()=>{}),_r.set(this,{}),aa.set(this,!1),eu.set(this,!1),tu.set(this,!1),Is.set(this,!1),Nf.set(this,t=>{if(Gt(this,eu,!0,"f"),t instanceof Error&&t.name==="AbortError"&&(t=new es),t instanceof es)return Gt(this,tu,!0,"f"),this._emit("abort",t);if(t instanceof mt)return this._emit("error",t);if(t instanceof Error){const n=new mt(t.message);return n.cause=t,this._emit("error",n)}return this._emit("error",new mt(String(t)))}),Gt(this,Yl,new Promise((t,n)=>{Gt(this,Xl,t,"f"),Gt(this,ia,n,"f")}),"f"),Gt(this,sa,new Promise((t,n)=>{Gt(this,Jl,t,"f"),Gt(this,oa,n,"f")}),"f"),Pe(this,Yl,"f").catch(()=>{}),Pe(this,sa,"f").catch(()=>{})}static fromReadableStream(t){const n=new xc;return n._run(()=>n._fromReadableStream(t)),n}static createMessage(t,n,r){const i=new xc;for(const s of n.messages)i._addMessageParam(s);return i._run(()=>i._createMessage(t,{...n,stream:!0},{...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"stream"}})),i}_run(t){t().then(()=>{this._emitFinal(),this._emit("end")},Pe(this,Nf,"f"))}_addMessageParam(t){this.messages.push(t)}_addMessage(t,n=!0){this.receivedMessages.push(t),n&&this._emit("message",t)}async _createMessage(t,n,r){var o;const i=r==null?void 0:r.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener("abort",()=>this.controller.abort())),Pe(this,En,"m",Tf).call(this);const s=await t.create({...n,stream:!0},{...r,signal:this.controller.signal});this._connected();for await(const a of s)Pe(this,En,"m",Pf).call(this,a);if((o=s.controller.signal)!=null&&o.aborted)throw new es;Pe(this,En,"m",Rf).call(this)}_connected(){this.ended||(Pe(this,Xl,"f").call(this),this._emit("connect"))}get ended(){return Pe(this,aa,"f")}get errored(){return Pe(this,eu,"f")}get aborted(){return Pe(this,tu,"f")}abort(){this.controller.abort()}on(t,n){return(Pe(this,_r,"f")[t]||(Pe(this,_r,"f")[t]=[])).push({listener:n}),this}off(t,n){const r=Pe(this,_r,"f")[t];if(!r)return this;const i=r.findIndex(s=>s.listener===n);return i>=0&&r.splice(i,1),this}once(t,n){return(Pe(this,_r,"f")[t]||(Pe(this,_r,"f")[t]=[])).push({listener:n,once:!0}),this}emitted(t){return new Promise((n,r)=>{Gt(this,Is,!0,"f"),t!=="error"&&this.once("error",r),this.once(t,n)})}async done(){Gt(this,Is,!0,"f"),await Pe(this,sa,"f")}get currentMessage(){return Pe(this,ei,"f")}async finalMessage(){return await this.done(),Pe(this,En,"m",_f).call(this)}async finalText(){return await this.done(),Pe(this,En,"m",Wx).call(this)}_emit(t,...n){if(Pe(this,aa,"f"))return;t==="end"&&(Gt(this,aa,!0,"f"),Pe(this,Jl,"f").call(this));const r=Pe(this,_r,"f")[t];if(r&&(Pe(this,_r,"f")[t]=r.filter(i=>!i.once),r.forEach(({listener:i})=>i(...n))),t==="abort"){const i=n[0];!Pe(this,Is,"f")&&!(r!=null&&r.length)&&Promise.reject(i),Pe(this,ia,"f").call(this,i),Pe(this,oa,"f").call(this,i),this._emit("end");return}if(t==="error"){const i=n[0];!Pe(this,Is,"f")&&!(r!=null&&r.length)&&Promise.reject(i),Pe(this,ia,"f").call(this,i),Pe(this,oa,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Pe(this,En,"m",_f).call(this))}async _fromReadableStream(t,n){var s;const r=n==null?void 0:n.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),Pe(this,En,"m",Tf).call(this),this._connected();const i=vi.fromReadableStream(t,this.controller);for await(const o of i)Pe(this,En,"m",Pf).call(this,o);if((s=i.controller.signal)!=null&&s.aborted)throw new es;Pe(this,En,"m",Rf).call(this)}[(ei=new WeakMap,Yl=new WeakMap,Xl=new WeakMap,ia=new WeakMap,sa=new WeakMap,Jl=new WeakMap,oa=new WeakMap,_r=new WeakMap,aa=new WeakMap,eu=new WeakMap,tu=new WeakMap,Is=new WeakMap,Nf=new WeakMap,En=new WeakSet,_f=function(){if(this.receivedMessages.length===0)throw new mt("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},Wx=function(){if(this.receivedMessages.length===0)throw new mt("stream ended without producing a Message with role=assistant");const n=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(n.length===0)throw new mt("stream ended without producing a content block with type=text");return n.join(" ")},Tf=function(){this.ended||Gt(this,ei,void 0,"f")},Pf=function(n){if(this.ended)return;const r=Pe(this,En,"m",qx).call(this,n);switch(this._emit("streamEvent",n,r),n.type){case"content_block_delta":{n.delta.type==="text_delta"&&this._emit("text",n.delta.text,r.content.at(-1).text||"");break}case"message_stop":{this._addMessageParam(r),this._addMessage(r,!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{Gt(this,ei,r,"f");break}}},Rf=function(){if(this.ended)throw new mt("stream has ended, this shouldn't happen");const n=Pe(this,ei,"f");if(!n)throw new mt("request ended without sending any chunks");return Gt(this,ei,void 0,"f"),n},qx=function(n){let r=Pe(this,ei,"f");if(n.type==="message_start"){if(r)throw new mt(`Unexpected event order, got ${n.type} before receiving "message_stop"`);return n.message}if(!r)throw new mt(`Unexpected event order, got ${n.type} before "message_start"`);switch(n.type){case"message_stop":return r;case"message_delta":return r.stop_reason=n.delta.stop_reason,r.stop_sequence=n.delta.stop_sequence,r.usage.output_tokens=n.usage.output_tokens,r;case"content_block_start":return r.content.push(n.content_block),r;case"content_block_delta":{const i=r.content.at(n.index);return(i==null?void 0:i.type)==="text"&&n.delta.type==="text_delta"&&(i.text+=n.delta.text),r}case"content_block_stop":return r}},Symbol.asyncIterator)](){const t=[],n=[];let r=!1;return this.on("streamEvent",i=>{const s=n.shift();s?s.resolve(i):t.push(i)}),this.on("end",()=>{r=!0;for(const i of n)i.resolve(void 0);n.length=0}),this.on("abort",i=>{r=!0;for(const s of n)s.reject(i);n.length=0}),this.on("error",i=>{r=!0;for(const s of n)s.reject(i);n.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise((s,o)=>n.push({resolve:s,reject:o})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new vi(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}class wc extends wl{create(t,n){return this._client.post("/v1/messages",{body:t,timeout:6e5,...n,stream:t.stream??!1})}stream(t,n){return xc.createMessage(this,t,n)}}wc||(wc={});var jE;class nt extends t3{constructor({baseURL:t=Cf("ANTHROPIC_BASE_URL"),apiKey:n=Cf("ANTHROPIC_API_KEY")??null,authToken:r=Cf("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){const s={apiKey:n,authToken:r,...i,baseURL:t||"https://api.anthropic.com"};super({baseURL:s.baseURL,timeout:s.timeout??6e5,httpAgent:s.httpAgent,maxRetries:s.maxRetries,fetch:s.fetch}),this.completions=new vc(this),this.messages=new wc(this),this.beta=new yc(this),this._options=s,this.apiKey=n,this.authToken=r}defaultQuery(){return this._options.defaultQuery}defaultHeaders(t){return{...super.defaultHeaders(t),"anthropic-version":"2023-06-01",...this._options.defaultHeaders}}validateHeaders(t,n){if(!(this.apiKey&&t["x-api-key"])&&n["x-api-key"]!==null&&!(this.authToken&&t.authorization)&&n.authorization!==null)throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(t){const n=this.apiKeyAuth(t),r=this.bearerAuth(t);return n!=null&&!fp(n)?n:r!=null&&!fp(r)?r:{}}apiKeyAuth(t){return this.apiKey==null?{}:{"X-Api-Key":this.apiKey}}bearerAuth(t){return this.authToken==null?{}:{Authorization:`Bearer ${this.authToken}`}}}jE=nt;nt.Anthropic=jE;nt.HUMAN_PROMPT=`
Human:`;nt.AI_PROMPT=`
Assistant:`;nt.AnthropicError=mt;nt.APIError=Mt;nt.APIConnectionError=md;nt.APIConnectionTimeoutError=yE;nt.APIUserAbortError=es;nt.NotFoundError=bE;nt.ConflictError=SE;nt.RateLimitError=EE;nt.BadRequestError=vE;nt.AuthenticationError=xE;nt.InternalServerError=CE;nt.PermissionDeniedError=wE;nt.UnprocessableEntityError=kE;nt.toFile=ZF;nt.fileFromPath=gE;const{HUMAN_PROMPT:mz,AI_PROMPT:gz}=nt;(function(e){e.Completions=vc,e.Messages=wc,e.Beta=yc})(nt||(nt={}));const Ki=class Ki{constructor(){ut(this,"events",[]);ut(this,"metrics",[]);ut(this,"sessionId");this.sessionId=this.generateSessionId()}static getInstance(){return Ki.instance||(Ki.instance=new Ki),Ki.instance}generateSessionId(){return`session_${Date.now()}_${Math.random().toString(36).substring(7)}`}trackEvent(t,n={}){const r={event:t,properties:n,timestamp:new Date,sessionId:this.sessionId};this.events.push(r),this.sendToAnalytics(r)}trackExtractionMetrics(t){this.metrics.push(t),t.success||this.trackEvent("extraction_failure",{method:t.method,context:t.context,errorType:t.errorType,duration:t.duration})}getExtractionSuccessRate(){return this.metrics.length===0?0:this.metrics.filter(n=>n.success).length/this.metrics.length*100}getMethodSuccessRates(){const t=this.groupBy(this.metrics,"method"),n={};for(const[r,i]of Object.entries(t)){const s=i.filter(o=>o.success).length;n[r]=s/i.length*100}return n}getMostCommonErrors(){const n=this.metrics.filter(r=>!r.success&&r.errorType).map(r=>r.errorType).reduce((r,i)=>(r[i]=(r[i]||0)+1,r),{});return Object.entries(n).map(([r,i])=>({error:r,count:i})).sort((r,i)=>i.count-r.count).slice(0,10)}groupBy(t,n){return t.reduce((r,i)=>{const s=String(i[n]);return r[s]||(r[s]=[]),r[s].push(i),r},{})}async sendToAnalytics(t){}generateDailyReport(){const t={sessionId:this.sessionId,date:new Date().toISOString(),totalEvents:this.events.length,extractionMetrics:{totalAttempts:this.metrics.length,successRate:this.getExtractionSuccessRate(),methodSuccessRates:this.getMethodSuccessRates(),commonErrors:this.getMostCommonErrors(),averageRetries:this.metrics.reduce((n,r)=>n+r.retryCount,0)/this.metrics.length||0},eventSummary:this.events.reduce((n,r)=>(n[r.event]=(n[r.event]||0)+1,n),{})};return JSON.stringify(t,null,2)}};ut(Ki,"instance");let bc=Ki;class d3{constructor(t){ut(this,"failures",0);ut(this,"successes",0);ut(this,"state","closed");ut(this,"nextAttempt",Date.now());ut(this,"halfOpenAttempts",0);this.options=t}async execute(t){if(this.state==="open"){if(Date.now()<this.nextAttempt)throw new Error("Circuit breaker is OPEN - service unavailable");this.state="half-open",this.halfOpenAttempts=0}if(this.state==="half-open"&&this.halfOpenAttempts>=this.options.halfOpenRequests)if(this.successes>=this.options.halfOpenRequests)this.close();else throw this.open(),new Error("Circuit breaker is OPEN - service still failing");try{const n=await t();return this.onSuccess(),n}catch(n){throw this.onFailure(),n}}onSuccess(){this.failures=0,this.state==="half-open"&&(this.successes++,this.halfOpenAttempts++,this.successes>=this.options.halfOpenRequests&&this.close())}onFailure(){this.failures++,this.successes=0,this.failures>=this.options.failureThreshold&&this.open()}open(){this.state="open",this.nextAttempt=Date.now()+this.options.resetTimeout,console.warn(`Circuit breaker opened. Will retry after ${new Date(this.nextAttempt).toISOString()}`)}close(){this.state="closed",this.failures=0,this.successes=0,console.info("Circuit breaker closed")}getState(){return this.state}}class f3{constructor(t){ut(this,"requests",[]);this.options=t}async execute(t){const n=Date.now();if(this.requests=this.requests.filter(r=>n-r<this.options.windowMs),this.requests.length>=this.options.maxRequests){const r=this.requests[0],i=this.options.windowMs-(n-r);throw new Error(`Rate limit exceeded. Try again in ${Math.ceil(i/1e3)} seconds`)}return this.requests.push(n),await t()}getRemainingRequests(){const t=Date.now();return this.requests=this.requests.filter(n=>t-n<this.options.windowMs),Math.max(0,this.options.maxRequests-this.requests.length)}}const Gi=class Gi{constructor(){ut(this,"circuitBreakers",new Map);ut(this,"rateLimiters",new Map)}static getInstance(){return Gi.instance||(Gi.instance=new Gi),Gi.instance}getCircuitBreaker(t,n){return this.circuitBreakers.has(t)||this.circuitBreakers.set(t,new d3(n||{failureThreshold:5,resetTimeout:6e4,halfOpenRequests:3})),this.circuitBreakers.get(t)}getRateLimiter(t,n){return this.rateLimiters.has(t)||this.rateLimiters.set(t,new f3(n||{maxRequests:10,windowMs:6e4})),this.rateLimiters.get(t)}getStatus(){const t={circuitBreakers:{},rateLimiters:{}};return this.circuitBreakers.forEach((n,r)=>{t.circuitBreakers[r]=n.getState()}),this.rateLimiters.forEach((n,r)=>{t.rateLimiters[r]=n.getRemainingRequests()}),t}};ut(Gi,"instance");let hp=Gi;const Pr=class Pr{static async extract(t,n,r){const i=Date.now(),s=bc.getInstance(),o=t;for(const[a,l]of this.extractionMethods.entries())try{const u=l(t);if(u){const c=n.safeParse(u);if(c.success)return s.trackExtractionMetrics({method:l.name,success:!0,duration:Date.now()-i,retryCount:a,context:r||"unknown",contentLength:t.length}),{success:!0,data:c.data,extractionMethod:l.name}}}catch{continue}return s.trackExtractionMetrics({method:"all_failed",success:!1,duration:Date.now()-i,retryCount:this.extractionMethods.length,context:r||"unknown",errorType:"extraction_failed",contentLength:t.length}),{success:!1,error:"Failed to extract valid JSON after trying all methods",rawContent:o}}static extractWithCodeBlocks(t){const n=[/```json\s*\n([\s\S]*?)\n```/,/```JSON\s*\n([\s\S]*?)\n```/,/```\s*\n(\{[\s\S]*?\})\n```/,/```\s*\n(\[[\s\S]*?\])\n```/];for(const r of n){const i=t.match(r);if(i)return JSON.parse(i[1].trim())}return null}static extractWithoutCodeBlocks(t){const n=Math.min(t.indexOf("{")!==-1?t.indexOf("{"):1/0,t.indexOf("[")!==-1?t.indexOf("["):1/0),r=Math.max(t.lastIndexOf("}"),t.lastIndexOf("]"));if(n!==1/0&&r>n){const i=t.substring(n,r+1);return JSON.parse(i)}return null}static extractWithRegexCleanup(t){let n=t;return n=n.replace(/^.*?(?=\{|\[)/s,""),n=n.replace(/(\}|\])(?!.*(\}|\]))[\s\S]*$/s,"$1"),n=n.replace(/,\s*\}/g,"}").replace(/,\s*\]/g,"]").replace(/'/g,'"').replace(/(\w+):/g,'"$1":').replace(/:\s*undefined/g,": null").replace(/\n/g," ").replace(/\t/g," "),JSON.parse(n)}static extractWithJSONRepair(t){const n=t.match(/\{[\s\S]*\}|\[[\s\S]*\]/);if(!n)return null;let r=n[0];const i=[s=>s.replace(/([^"\\])'([^']*)'([^"])/g,'$1"$2"$3'),s=>s.replace(/,(\s*[}\]])/g,"$1"),s=>s.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,'$1"$2":'),s=>s.replace(/:\s*(true|false|null)\s*([,}])/gi,": $1$2"),s=>s.replace(/"([^"]*)":/g,(o,a)=>`"${a.replace(/"/g,'\\"')}":`)];for(const s of i)try{r=s(r)}catch{}return JSON.parse(r)}static extractWithManualParsing(t){const n=[];let r=!1,i=!1,s=-1,o=-1;for(let a=0;a<t.length;a++){const l=t[a];if(i){i=!1;continue}if(l==="\\"){i=!0;continue}if(l==='"'&&!i){r=!r;continue}if(!r){if(l==="{"||l==="[")n.length===0&&(s=a),n.push(l);else if(l==="}"||l==="]"){const u=l==="}"?"{":"[";if(n[n.length-1]===u&&(n.pop(),n.length===0)){o=a;break}}}}if(s!==-1&&o!==-1){const a=t.substring(s,o+1);return JSON.parse(a)}return null}static extractWithFuzzyMatching(t){const n=[/phases\s*:\s*\[([\s\S]*?)\]/,/tasks\s*:\s*\[([\s\S]*?)\]/,/\{\s*"?\w+"?\s*:\s*[\s\S]*?\}/];for(const r of n){const i=t.match(r);if(i)try{const s=`{${i[0]}}`;return JSON.parse(s)}catch{continue}}return null}static createRetryPrompt(t,n){return`${t}
CRITICAL: Your previous response could not be parsed as JSON. Error: ${n}
Please respond with ONLY valid JSON, no additional text. Start your response with { or [ and end with } or ].
Example of correct format:
{
"field": "value",
"array": ["item1", "item2"]
}`}static logFailure(t,n,r){console.error("JSON Extraction Failure:",{context:t,contentLength:n.length,contentPreview:n.substring(0,200),error:r,timestamp:new Date().toISOString()})}};ut(Pr,"extractionMethods",[Pr.extractWithCodeBlocks,Pr.extractWithoutCodeBlocks,Pr.extractWithRegexCleanup,Pr.extractWithJSONRepair,Pr.extractWithManualParsing,Pr.extractWithFuzzyMatching]);let ja=Pr;class Eu{static async getStructuredResponse(t,n,r,i){const s=this.resilience.getCircuitBreaker("anthropic-api"),o=this.resilience.getRateLimiter("anthropic-api",{maxRequests:50,windowMs:6e4});return await s.execute(async()=>await o.execute(async()=>await this.executeWithRetries(t,n,r,i)))}static async executeWithRetries(t,n,r,i){let s="";const o=Date.now();for(let a=0;a<this.MAX_RETRIES;a++)try{const l=a===0?n:ja.createRetryPrompt(n,s);this.telemetry.trackEvent("llm_api_call",{context:i,attempt:a,promptLength:l.length});const u=await t.messages.create({model:"claude-3-sonnet-20240229",max_tokens:4e3,temperature:a===0?.7:.3,system:a===0?"You are a helpful assistant that generates project plans. Always respond with valid JSON in the specified format.":"You MUST respond with ONLY valid JSON. No explanations, no markdown, just JSON.",messages:[{role:"user",content:l}]}),c=u.content[0].type==="text"?u.content[0].text:"",f=await ja.extract(c,r,i);if(f.success&&f.data)return this.telemetry.trackEvent("llm_api_success",{context:i,attempt:a,duration:Date.now()-o,extractionMethod:f.extractionMethod}),f.data;s=f.error||"Unknown extraction error"}catch(l){s=l instanceof Error?l.message:"Unknown error",this.telemetry.trackEvent("llm_api_error",{context:i,attempt:a,error:s,duration:Date.now()-o})}throw ja.logFailure(i,n,s),new Error(`Failed to get valid response after ${this.MAX_RETRIES} attempts. Last error: ${s}`)}}ut(Eu,"MAX_RETRIES",3),ut(Eu,"telemetry",bc.getInstance()),ut(Eu,"resilience",hp.getInstance());const ts={title:256,description:2048,readme:5e4,domain:100},h3=$m({title:Ut().max(ts.title),description:Ut().max(ts.description),domain:Ut().max(ts.domain),features:Ti(Ut().max(200)).max(50),techStack:Ti(Ut().max(100)).max(30),complexity:Bm(["simple","moderate","complex"])});class jf{static sanitizeInput(t,n=1e3){return!t||typeof t!="string"?"":t.replace(/\{[^}]*\}/g,"").replace(/\$\{[^}]*\}/g,"").replace(/<%[^%>]*%>/g,"").replace(/\{\{[^}]*\}\}/g,"").replace(/\n\s*Human:/gi,`
[User]:`).replace(/\n\s*Assistant:/gi,`
[Agent]:`).replace(/\n\s*System:/gi,`
[Note]:`).replace(/\n{3,}/g,`
`).replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"").replace(/\s+/g," ").trim().slice(0,n)}static sanitizeReadme(t){return this.sanitizeInput(t,ts.readme)}static escapeForJson(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static buildSafePrompt(t,n){let r=t;const i=Object.keys(n).sort((s,o)=>o.length-s.length);for(const s of i){const o=`{${s}}`,a=n[s];let l;Array.isArray(a)?l=a.map(u=>this.sanitizeInput(String(u),200)).join(", "):l=this.sanitizeInput(String(a),2e3),r=r.replace(new RegExp(o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),()=>l)}return r}static sanitizeProjectInfo(t){var r,i;return h3.parse({title:this.sanitizeInput(t.title,ts.title),description:this.sanitizeInput(t.description,ts.description),domain:this.sanitizeInput(t.domain,ts.domain),features:((r=t.features)==null?void 0:r.map(s=>this.sanitizeInput(s,200)))||[],techStack:((i=t.techStack)==null?void 0:i.map(s=>this.sanitizeInput(s,100)))||[],complexity:t.complexity||"moderate"})}static containsSuspiciousPatterns(t){return[/ignore\s+previous\s+instructions/i,/disregard\s+all\s+prior/i,/new\s+instructions:/i,/system\s+prompt:/i,/\[INST\]/i,/<\|im_start\|>/i,/\n\s*###\s*Instruction/i].some(r=>r.test(t))}}var p3={};const m3=`You are an AI assistant that analyzes project README content to intelligently suggest form field values for a project planning tool.
Given the README content below, analyze it and provide intelligent suggestions for the following fields:
1. **Target Users**: Identify the primary user groups or personas who would use this product based on the README content. Consider both explicitly mentioned users and inferred users based on features.
2. **Tech Stack**: Extract and infer the technologies, frameworks, libraries, and tools used in the project. Look for:
- Explicitly mentioned technologies
- Dependencies in package files
- File extensions and project structure clues
- API mentions and integrations
3. **Key Features**: Extract the main features and capabilities of the project. Look for:
- Feature lists
- Functionality descriptions
- Use cases mentioned
- Problem-solving capabilities
4. **Domain**: Determine the most appropriate domain category based on the project's purpose and functionality.
5. **Complexity**: Assess the project complexity as simple, moderate, or complex based on:
- Number of features
- Technical stack diversity
- Integration requirements
- Scalability mentions
README CONTENT:
{readmeContent}
EXISTING PARSED DATA (use this as context but provide enhanced suggestions):
Title: {title}
Description: {description}
Basic Features: {basicFeatures}
Basic Tech Stack: {basicTechStack}
Provide your analysis in the following JSON format:
{
"targetUsers": ["user group 1", "user group 2", ...],
"techStack": ["technology 1", "technology 2", ...],
"features": ["feature 1", "feature 2", ...],
"domain": "domain_category",
"complexity": "simple|moderate|complex"
}`;class g3{constructor(t=p3.ANTHROPIC_API_KEY){ut(this,"anthropic");ut(this,"model","claude-3-sonnet-20240229");this.anthropic=new nt({apiKey:t})}async populateFormFields(t,n){var o,a;const r=jf.sanitizeReadme(t);if(jf.containsSuspiciousPatterns(t))throw new Error("Input contains potentially malicious patterns");const i=jf.buildSafePrompt(m3,{readmeContent:r,title:(n==null?void 0:n.title)||"Not provided",description:(n==null?void 0:n.description)||"Not provided",basicFeatures:((o=n==null?void 0:n.features)==null?void 0:o.join(", "))||"None detected",basicTechStack:((a=n==null?void 0:n.techStack)==null?void 0:a.join(", "))||"None detected"}),s=$m({targetUsers:Ti(Ut()).min(1),techStack:Ti(Ut()).min(1),features:Ti(Ut()).min(1),domain:Ut(),complexity:Bm(["simple","moderate","complex"])});try{const l=await Eu.getStructuredResponse(this.anthropic,i,s,"form-field-population");return{targetUsers:this.deduplicateAndClean(l.targetUsers),techStack:this.deduplicateAndClean(l.techStack),features:this.deduplicateAndClean(l.features),domain:this.validateDomain(l.domain),complexity:l.complexity}}catch(l){return console.error("AI form population failed:",l),this.getFallbackSuggestions(n)}}deduplicateAndClean(t){const n=new Set;return t.map(r=>r.trim()).filter(r=>r.length>0&&r.length<100).filter(r=>{const i=r.toLowerCase();return n.has(i)?!1:(n.add(i),!0)})}validateDomain(t){const n=["e-commerce","social-media","productivity","healthcare","education","finance","entertainment","devtools","iot","general","communication","analytics","gaming"],r=t.toLowerCase().replace(/\s+/g,"-");return n.includes(r)?r:"general"}getFallbackSuggestions(t){return{targetUsers:["developers","end-users"],techStack:(t==null?void 0:t.techStack)||["JavaScript","Node.js"],features:(t==null?void 0:t.features)||["Core functionality"],domain:"general",complexity:"moderate"}}}async function y3(e,t){return new g3().populateFormFields(e,t)}const v3=$m({title:Ut().min(1,"Title is required").max(256),description:Ut().min(10,"Description must be at least 10 characters").max(2048),domain:Ut().min(1,"Domain is required"),targetUsers:Ti(Ut()).min(1,"At least one target user is required"),techStack:Ti(Ut()).min(1,"At least one technology is required"),features:Ti(Ut()).min(1,"At least one feature is required"),complexity:Bm(["simple","moderate","complex"])}),x3=({readmeContent:e="",initialData:t,onNext:n})=>{const[r,i]=v.useState(""),[s,o]=v.useState(""),[a,l]=v.useState(""),[u,c]=v.useState("preview"),[f,p]=v.useState(!1),{toast:h}=$c(),{register:w,handleSubmit:m,formState:{errors:b},setValue:g,watch:y,getValues:x}=uO({resolver:hO(v3),defaultValues:{title:(t==null?void 0:t.title)||"Untitled Project",description:(t==null?void 0:t.description)||"",domain:(t==null?void 0:t.domain)||"general",targetUsers:(t==null?void 0:t.targetUsers)||["developers"],techStack:(t==null?void 0:t.techStack)||[],features:(t==null?void 0:t.features)||[],complexity:(t==null?void 0:t.complexity)||"moderate"}}),S=y();v.useEffect(()=>{var P;e&&!((P=t==null?void 0:t.targetUsers)!=null&&P.length)&&_()},[e]);const _=async()=>{if(!e){h({title:"No README content",description:"Please provide README content to use AI suggestions.",variant:"destructive"});return}p(!0);try{const P=await y3(e,{title:x("title"),description:x("description"),features:x("features"),techStack:x("techStack")});g("targetUsers",P.targetUsers),g("techStack",P.techStack),g("features",P.features),g("domain",P.domain),g("complexity",P.complexity),h({title:"AI suggestions applied",description:"Form fields have been populated with intelligent suggestions."})}catch(P){console.error("AI population failed:",P),h({title:"AI suggestion failed",description:"Could not generate suggestions. Please fill manually.",variant:"destructive"})}finally{p(!1)}},E=[{value:"e-commerce",label:"E-commerce"},{value:"social-media",label:"Social Media"},{value:"productivity",label:"Productivity"},{value:"healthcare",label:"Healthcare"},{value:"education",label:"Education"},{value:"finance",label:"Finance"},{value:"entertainment",label:"Entertainment"},{value:"devtools",label:"Developer Tools"},{value:"iot",label:"IoT"},{value:"general",label:"General"}],C=(P,L)=>{if(!L.trim())return;const A=x(P);A.includes(L)||g(P,[...A,L.trim()]),P==="targetUsers"?i(""):P==="techStack"?o(""):P==="features"&&l("")},R=(P,L)=>{const A=x(P);g(P,A.filter((U,F)=>F!==L))},I=P=>{n(P)};return d.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[d.jsx(Oe,{className:"border-0 shadow-lg",children:d.jsx($t,{className:"bg-gradient-to-r from-blue-600 to-indigo-600 text-white",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs(Bt,{className:"text-xl flex items-center",children:[d.jsx(Do,{className:"w-5 h-5 mr-2"}),"Parse Product"]}),d.jsx(vr,{className:"text-blue-100",children:"Review and edit the detected project information"})]}),d.jsx(Ve,{type:"button",variant:"secondary",size:"sm",onClick:_,disabled:f||!e,className:"bg-white/20 hover:bg-white/30 text-white border-white/30",children:f?d.jsxs(d.Fragment,{children:[d.jsx(Zu,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):d.jsxs(d.Fragment,{children:[d.jsx(fa,{className:"w-4 h-4 mr-2"}),"AI Populate"]})})]})})}),d.jsxs("form",{onSubmit:m(I),className:"space-y-6",children:[d.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6",children:[d.jsx(dn,{htmlFor:"title",children:"Project Title"}),d.jsx(Xi,{id:"title",...w("title"),placeholder:"My Awesome Project",className:"mt-2"}),b.title&&d.jsx("p",{className:"text-sm text-red-600 mt-1",children:b.title.message})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6",children:[d.jsx(dn,{htmlFor:"description",children:"Description"}),d.jsx(id,{id:"description",...w("description"),placeholder:"A brief description of your project...",rows:4,className:"mt-2"}),b.description&&d.jsx("p",{className:"text-sm text-red-600 mt-1",children:b.description.message})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6 space-y-4",children:[d.jsxs("div",{children:[d.jsx(dn,{htmlFor:"domain",children:"Domain"}),d.jsxs(To,{value:S.domain,onValueChange:P=>g("domain",P),children:[d.jsx(vs,{id:"domain",className:"mt-2",children:d.jsx(Po,{placeholder:"Select domain"})}),d.jsx(xs,{children:E.map(P=>d.jsx(Or,{value:P.value,children:P.label},P.value))})]})]}),d.jsxs("div",{children:[d.jsx(dn,{htmlFor:"complexity",children:"Complexity"}),d.jsxs(To,{value:S.complexity,onValueChange:P=>g("complexity",P),children:[d.jsx(vs,{id:"complexity",className:"mt-2",children:d.jsx(Po,{placeholder:"Select complexity"})}),d.jsxs(xs,{children:[d.jsx(Or,{value:"simple",children:"Simple"}),d.jsx(Or,{value:"moderate",children:"Moderate"}),d.jsx(Or,{value:"complex",children:"Complex"})]})]})]})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx(dn,{children:"Target Users"}),S.targetUsers.length===0&&d.jsxs(Ct,{variant:"outline",className:"text-xs",children:[d.jsx(fa,{className:"w-3 h-3 mr-1"}),"AI will suggest"]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Xi,{value:r,onChange:P=>i(P.target.value),placeholder:"Add target user...",onKeyPress:P=>{P.key==="Enter"&&(P.preventDefault(),C("targetUsers",r))}}),d.jsx(Ve,{type:"button",size:"icon",onClick:()=>C("targetUsers",r),children:d.jsx(yu,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:S.targetUsers.map((P,L)=>d.jsxs(Ct,{variant:"secondary",className:"pr-1",children:[P,d.jsx("button",{type:"button",onClick:()=>R("targetUsers",L),className:"ml-2 hover:text-red-600",children:d.jsx(eo,{className:"w-3 h-3"})})]},L))}),b.targetUsers&&d.jsx("p",{className:"text-sm text-red-600 mt-1",children:b.targetUsers.message})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx(dn,{children:"Tech Stack"}),S.techStack.length===0&&d.jsxs(Ct,{variant:"outline",className:"text-xs",children:[d.jsx(fa,{className:"w-3 h-3 mr-1"}),"AI will suggest"]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Xi,{value:s,onChange:P=>o(P.target.value),placeholder:"Add technology...",onKeyPress:P=>{P.key==="Enter"&&(P.preventDefault(),C("techStack",s))}}),d.jsx(Ve,{type:"button",size:"icon",onClick:()=>C("techStack",s),children:d.jsx(yu,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:S.techStack.map((P,L)=>d.jsxs(Ct,{variant:"outline",className:"pr-1",children:[P,d.jsx("button",{type:"button",onClick:()=>R("techStack",L),className:"ml-2 hover:text-red-600",children:d.jsx(eo,{className:"w-3 h-3"})})]},L))}),b.techStack&&d.jsx("p",{className:"text-sm text-red-600 mt-1",children:b.techStack.message})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"pt-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx(dn,{children:"Key Features"}),S.features.length===0&&d.jsxs(Ct,{variant:"outline",className:"text-xs",children:[d.jsx(fa,{className:"w-3 h-3 mr-1"}),"AI will suggest"]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Xi,{value:a,onChange:P=>l(P.target.value),placeholder:"Add feature...",onKeyPress:P=>{P.key==="Enter"&&(P.preventDefault(),C("features",a))}}),d.jsx(Ve,{type:"button",size:"icon",onClick:()=>C("features",a),children:d.jsx(yu,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:S.features.map((P,L)=>d.jsxs(Ct,{className:"pr-1",children:[P,d.jsx("button",{type:"button",onClick:()=>R("features",L),className:"ml-2 hover:text-red-600",children:d.jsx(eo,{className:"w-3 h-3"})})]},L))}),b.features&&d.jsx("p",{className:"text-sm text-red-600 mt-1",children:b.features.message})]})})]}),d.jsx("div",{className:"lg:sticky lg:top-6",children:d.jsxs(Oe,{className:"h-full max-h-[80vh] overflow-hidden",children:[d.jsx($t,{children:d.jsx(Bt,{className:"text-lg",children:"README Content"})}),d.jsx($e,{className:"overflow-y-auto max-h-[60vh]",children:d.jsxs(fE,{value:u,onValueChange:P=>c(P),defaultValue:"preview",children:[d.jsxs(ig,{className:"grid w-full grid-cols-2",children:[d.jsxs(rl,{value:"preview",className:"text-xs",children:[d.jsx(YT,{className:"w-3 h-3 mr-1"}),"Preview"]}),d.jsxs(rl,{value:"raw",className:"text-xs",children:[d.jsx(ZT,{className:"w-3 h-3 mr-1"}),"Raw"]})]}),d.jsx(il,{value:"preview",className:"mt-0",children:d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(qk,{children:e||"# No README content available"})})}),d.jsx(il,{value:"raw",className:"mt-0",children:d.jsx("pre",{className:"text-xs bg-gray-50 dark:bg-gray-900 p-4 rounded-lg overflow-x-auto",children:d.jsx("code",{children:e||"No README content available"})})})]})})]})})]}),d.jsx("div",{className:"flex justify-end",children:d.jsxs(Ve,{type:"submit",size:"lg",className:"bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700",children:["Continue to Phase Generation",d.jsx(Hc,{className:"w-4 h-4 ml-2"})]})})]})]})},w3=({summary:e,setSummary:t,onNext:n})=>{const[r,i]=v.useState(!1),s=["Web Application","Mobile App","Data Science","AI/ML Project","API Service","DevOps/Infrastructure","Civic Tech","E-commerce","SaaS Platform"],o=l=>{t({...e,description:l})},a=l=>{t({...e,domain:l})};return d.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[d.jsxs(Oe,{className:"border-0 shadow-lg",children:[d.jsx($t,{className:"bg-gradient-to-r from-blue-600 to-indigo-600 text-white rounded-t-lg",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx(Do,{className:"w-6 h-6"}),d.jsxs("div",{children:[d.jsx(Bt,{className:"text-xl",children:e.title}),d.jsx(vr,{className:"text-blue-100",children:"Detected from README.md"})]})]}),d.jsxs(Ct,{variant:"secondary",className:"bg-white/20 text-white border-white/30",children:[d.jsx(fa,{className:"w-3 h-3 mr-1"}),"Auto-detected"]})]})}),d.jsx($e,{className:"p-6",children:d.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Repository"}),d.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-gray-50 rounded-lg",children:[d.jsx(K1,{className:"w-4 h-4 text-gray-500"}),d.jsx("span",{className:"text-sm text-gray-700",children:e.repository}),d.jsx(Ct,{variant:"outline",className:"ml-auto",children:e.branch})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Project Domain"}),d.jsxs(To,{value:e.domain,onValueChange:a,children:[d.jsx(vs,{children:d.jsx(Po,{placeholder:"Select project type"})}),d.jsx(xs,{children:s.map(l=>d.jsx(Or,{value:l,children:l},l))})]})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Project Description"}),d.jsx(Ve,{variant:"ghost",size:"sm",onClick:()=>i(!r),children:r?"Preview":"Edit"})]}),r?d.jsx(id,{value:e.description,onChange:l=>o(l.target.value),placeholder:"Describe your project goals and requirements...",className:"min-h-[120px] resize-none"}):d.jsx("div",{className:"p-3 bg-gray-50 rounded-lg min-h-[120px] text-sm text-gray-700 leading-relaxed",children:e.description||"No description provided"})]})]})})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Oe,{children:d.jsxs($e,{className:"p-4 text-center",children:[d.jsx("div",{className:"text-2xl font-bold text-blue-600",children:"8"}),d.jsx("div",{className:"text-sm text-gray-600",children:"Lifecycle Phases"})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"p-4 text-center",children:[d.jsx("div",{className:"text-2xl font-bold text-indigo-600",children:"9"}),d.jsx("div",{className:"text-sm text-gray-600",children:"Agent Roles"})]})}),d.jsx(Oe,{children:d.jsxs($e,{className:"p-4 text-center",children:[d.jsx("div",{className:"text-2xl font-bold text-purple-600",children:"~32"}),d.jsx("div",{className:"text-sm text-gray-600",children:"Expected Issues"})]})})]}),d.jsx("div",{className:"flex justify-end",children:d.jsxs(Ve,{onClick:n,size:"lg",className:"bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700",children:["Configure Phases",d.jsx(Hc,{className:"w-4 h-4 ml-2"})]})})]})};var yd="Checkbox",[b3,yz]=Sr(yd),[S3,sg]=b3(yd);function k3(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:o,name:a,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:f}=e,[p,h]=Ai({prop:n,defaultProp:i??!1,onChange:l,caller:yd}),[w,m]=v.useState(null),[b,g]=v.useState(null),y=v.useRef(!1),x=w?!!o||!!w.closest("form"):!0,S={checked:p,disabled:s,setChecked:h,control:w,setControl:m,name:a,form:o,value:c,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Pi(i)?!1:i,isFormControl:x,bubbleInput:b,setBubbleInput:g};return d.jsx(S3,{scope:t,...S,children:E3(f)?f(S):r})}var AE="CheckboxTrigger",IE=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:o,disabled:a,checked:l,required:u,setControl:c,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:w}=sg(AE,e),m=Fe(i,c),b=v.useRef(l);return v.useEffect(()=>{const g=s==null?void 0:s.form;if(g){const y=()=>f(b.current);return g.addEventListener("reset",y),()=>g.removeEventListener("reset",y)}},[s,f]),d.jsx(fe.button,{type:"button",role:"checkbox","aria-checked":Pi(l)?"mixed":l,"aria-required":u,"data-state":FE(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:m,onKeyDown:ue(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:ue(n,g=>{f(y=>Pi(y)?!0:!y),w&&h&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})})});IE.displayName=AE;var og=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:o,disabled:a,value:l,onCheckedChange:u,form:c,...f}=e;return d.jsx(k3,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:a,required:o,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(IE,{...f,ref:t,__scopeCheckbox:n}),p&&d.jsx(DE,{__scopeCheckbox:n})]})})});og.displayName=yd;var OE="CheckboxIndicator",ME=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=sg(OE,n);return d.jsx(Wr,{present:r||Pi(s.checked)||s.checked===!0,children:d.jsx(fe.span,{"data-state":FE(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});ME.displayName=OE;var LE="CheckboxBubbleInput",DE=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:o,required:a,disabled:l,name:u,value:c,form:f,bubbleInput:p,setBubbleInput:h}=sg(LE,e),w=Fe(n,h),m=sS(s),b=yb(r);v.useEffect(()=>{const y=p;if(!y)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set,E=!i.current;if(m!==s&&_){const C=new Event("click",{bubbles:E});y.indeterminate=Pi(s),_.call(y,Pi(s)?!1:s),y.dispatchEvent(C)}},[p,m,s,i]);const g=v.useRef(Pi(s)?!1:s);return d.jsx(fe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??g.current,required:a,disabled:l,name:u,value:c,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});DE.displayName=LE;function E3(e){return typeof e=="function"}function Pi(e){return e==="indeterminate"}function FE(e){return Pi(e)?"indeterminate":e?"checked":"unchecked"}const zE=v.forwardRef(({className:e,...t},n)=>d.jsx(og,{ref:n,className:ke("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:d.jsx(ME,{className:ke("flex items-center justify-center text-current"),children:d.jsx(H1,{className:"h-4 w-4"})})}));zE.displayName=og.displayName;var vd="Collapsible",[C3,vz]=Sr(vd),[_3,ag]=C3(vd),$E=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:o,...a}=e,[l,u]=Ai({prop:r,defaultProp:i??!1,onChange:o,caller:vd});return d.jsx(_3,{scope:n,disabled:s,contentId:Lr(),open:l,onOpenToggle:v.useCallback(()=>u(c=>!c),[u]),children:d.jsx(fe.div,{"data-state":ug(l),"data-disabled":s?"":void 0,...a,ref:t})})});$E.displayName=vd;var BE="CollapsibleTrigger",VE=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ag(BE,n);return d.jsx(fe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ug(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ue(e.onClick,i.onOpenToggle)})});VE.displayName=BE;var lg="CollapsibleContent",UE=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ag(lg,e.__scopeCollapsible);return d.jsx(Wr,{present:n||i.open,children:({present:s})=>d.jsx(N3,{...r,ref:t,present:s})})});UE.displayName=lg;var N3=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=e,o=ag(lg,n),[a,l]=v.useState(r),u=v.useRef(null),c=Fe(t,u),f=v.useRef(0),p=f.current,h=v.useRef(0),w=h.current,m=o.open||a,b=v.useRef(m),g=v.useRef(void 0);return v.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),bt(()=>{const y=u.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();f.current=x.height,h.current=x.width,b.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(r)}},[o.open,r]),d.jsx(fe.div,{"data-state":ug(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&i})});function ug(e){return e?"open":"closed"}var T3=$E;const HE=T3,WE=VE,qE=UE,P3=({phases:e,setPhases:t,onNext:n,onPrevious:r})=>{var h;const[i,s]=v.useState([(h=e[0])==null?void 0:h.id]),o=["Product Owner","Software Engineer","AI Architect","DevOps Engineer","QA Engineer","Designer","UX Researcher","Data Scientist","Content Writer"],a=w=>{s(m=>m.includes(w)?m.filter(b=>b!==w):[...m,w])},l=(w,m)=>{t(e.map(b=>{if(b.id===w){const g=b.roles.includes(m)?b.roles.filter(y=>y!==m):[...b.roles,m];return{...b,roles:g}}return b}))},u=w=>{t(e.map(m=>m.id===w?{...m,approved:!m.approved}:m))},c=w=>({"Product Owner":"bg-purple-100 text-purple-700","Software Engineer":"bg-blue-100 text-blue-700","AI Architect":"bg-indigo-100 text-indigo-700","DevOps Engineer":"bg-orange-100 text-orange-700","QA Engineer":"bg-green-100 text-green-700",Designer:"bg-pink-100 text-pink-700","UX Researcher":"bg-rose-100 text-rose-700","Data Scientist":"bg-cyan-100 text-cyan-700","Content Writer":"bg-yellow-100 text-yellow-700"})[w]||"bg-gray-100 text-gray-700",f=e.filter(w=>w.approved).length,p=f>=Math.ceil(e.length*.5);return d.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[d.jsx(Oe,{className:"border-0 shadow-lg",children:d.jsx($t,{className:"bg-gradient-to-r from-indigo-600 to-purple-600 text-white",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx(Bt,{className:"text-xl",children:"Configure Lifecycle Phases"}),d.jsx(vr,{className:"text-indigo-100",children:"Assign roles and review generated issues for each phase"})]}),d.jsxs("div",{className:"text-right",children:[d.jsxs("div",{className:"text-2xl font-bold",children:[f,"/",e.length]}),d.jsx("div",{className:"text-sm text-indigo-100",children:"Phases Approved"})]})]})})}),d.jsx("div",{className:"space-y-4",children:e.map((w,m)=>d.jsx(Oe,{className:`transition-all duration-200 ${w.approved?"border-green-200 bg-green-50/30":"border-gray-200 hover:border-gray-300"}`,children:d.jsxs(HE,{open:i.includes(w.id),onOpenChange:()=>a(w.id),children:[d.jsx(WE,{asChild:!0,children:d.jsx($t,{className:"cursor-pointer hover:bg-gray-50/50 transition-colors",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[i.includes(w.id)?d.jsx(Wc,{className:"w-5 h-5 text-gray-400"}):d.jsx(W1,{className:"w-5 h-5 text-gray-400"}),d.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold ${w.approved?"bg-green-600 text-white":"bg-gray-200 text-gray-600"}`,children:w.approved?d.jsx(QT,{className:"w-4 h-4"}):m+1})]}),d.jsxs("div",{children:[d.jsx(Bt,{className:"text-lg",children:w.title}),d.jsx(vr,{children:w.description})]})]}),d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qc,{className:"w-4 h-4 text-gray-400"}),d.jsxs("span",{className:"text-sm text-gray-600",children:[w.roles.length," roles"]})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Do,{className:"w-4 h-4 text-gray-400"}),d.jsxs("span",{className:"text-sm text-gray-600",children:[w.issues.length," issues"]})]}),d.jsx(Ve,{variant:w.approved?"default":"outline",size:"sm",onClick:b=>{b.stopPropagation(),u(w.id)},className:w.approved?"bg-green-600 hover:bg-green-700":"",children:w.approved?"Approved":"Approve"})]})]})})}),d.jsx(qE,{children:d.jsx($e,{className:"pt-0",children:d.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-1",children:[d.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Assigned Roles"}),d.jsx("div",{className:"space-y-2",children:o.map(b=>d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(zE,{id:`${w.id}-${b}`,checked:w.roles.includes(b),onCheckedChange:()=>l(w.id,b)}),d.jsx("label",{htmlFor:`${w.id}-${b}`,className:"text-sm cursor-pointer hover:text-gray-900",children:b})]},b))})]}),d.jsxs("div",{className:"lg:col-span-2",children:[d.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Generated Issues"}),d.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:w.issues.map((b,g)=>d.jsx(Oe,{className:"border border-gray-200",children:d.jsxs($e,{className:"p-4",children:[d.jsxs("div",{className:"flex items-start justify-between mb-2",children:[d.jsx("h5",{className:"font-medium text-gray-900 text-sm",children:b.title}),d.jsx(Ct,{variant:"secondary",className:`text-xs ${c(b.role)}`,children:b.role})]}),d.jsx("p",{className:"text-xs text-gray-600 leading-relaxed",children:b.description})]})},g))})]})]})})})]})},w.id))}),d.jsxs("div",{className:"flex justify-between",children:[d.jsxs(Ve,{variant:"outline",onClick:r,children:[d.jsx(mm,{className:"w-4 h-4 mr-2"}),"Back to Summary"]}),d.jsxs(Ve,{onClick:n,disabled:!p,className:"bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-700 hover:to-purple-700",children:["Review & Submit",d.jsx(Hc,{className:"w-4 h-4 ml-2"})]})]})]})};var xd="Dialog",[KE,xz]=Sr(xd),[R3,er]=KE(xd),GE=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,a=v.useRef(null),l=v.useRef(null),[u,c]=Ai({prop:r,defaultProp:i??!1,onChange:s,caller:xd});return d.jsx(R3,{scope:t,triggerRef:a,contentRef:l,contentId:Lr(),titleId:Lr(),descriptionId:Lr(),open:u,onOpenChange:c,onOpenToggle:v.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};GE.displayName=xd;var QE="DialogTrigger",ZE=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=er(QE,n),s=Fe(t,i.triggerRef);return d.jsx(fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fg(i.open),...r,ref:s,onClick:ue(e.onClick,i.onOpenToggle)})});ZE.displayName=QE;var cg="DialogPortal",[j3,YE]=KE(cg,{forceMount:void 0}),XE=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=er(cg,t);return d.jsx(j3,{scope:t,forceMount:n,children:v.Children.map(r,o=>d.jsx(Wr,{present:n||s.open,children:d.jsx(Bc,{asChild:!0,container:i,children:o})}))})};XE.displayName=cg;var Sc="DialogOverlay",JE=v.forwardRef((e,t)=>{const n=YE(Sc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=er(Sc,e.__scopeDialog);return s.modal?d.jsx(Wr,{present:r||s.open,children:d.jsx(I3,{...i,ref:t})}):null});JE.displayName=Sc;var A3=Co("DialogOverlay.RemoveScroll"),I3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=er(Sc,n);return d.jsx(Am,{as:A3,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(fe.div,{"data-state":fg(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ss="DialogContent",eC=v.forwardRef((e,t)=>{const n=YE(Ss,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=er(Ss,e.__scopeDialog);return d.jsx(Wr,{present:r||s.open,children:s.modal?d.jsx(O3,{...i,ref:t}):d.jsx(M3,{...i,ref:t})})});eC.displayName=Ss;var O3=v.forwardRef((e,t)=>{const n=er(Ss,e.__scopeDialog),r=v.useRef(null),i=Fe(t,n.contentRef,r);return v.useEffect(()=>{const s=r.current;if(s)return aS(s)},[]),d.jsx(tC,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,s=>s.preventDefault())})}),M3=v.forwardRef((e,t)=>{const n=er(Ss,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return d.jsx(tC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),tC=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,a=er(Ss,n),l=v.useRef(null),u=Fe(t,l);return rS(),d.jsxs(d.Fragment,{children:[d.jsx(jm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:d.jsx(fl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":fg(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(L3,{titleId:a.titleId}),d.jsx(F3,{contentRef:l,descriptionId:a.descriptionId})]})]})}),dg="DialogTitle",nC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=er(dg,n);return d.jsx(fe.h2,{id:i.titleId,...r,ref:t})});nC.displayName=dg;var rC="DialogDescription",iC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=er(rC,n);return d.jsx(fe.p,{id:i.descriptionId,...r,ref:t})});iC.displayName=rC;var sC="DialogClose",oC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=er(sC,n);return d.jsx(fe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>i.onOpenChange(!1))})});oC.displayName=sC;function fg(e){return e?"open":"closed"}var aC="DialogTitleWarning",[wz,lC]=JN(aC,{contentName:Ss,titleName:dg,docsSlug:"dialog"}),L3=({titleId:e})=>{const t=lC(aC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},D3="DialogDescriptionWarning",F3=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lC(D3).contentName}}.`;return v.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},z3=GE,$3=ZE,B3=XE,uC=JE,cC=eC,dC=nC,fC=iC,V3=oC;const U3=z3,H3=$3,W3=B3,hC=v.forwardRef(({className:e,...t},n)=>d.jsx(uC,{ref:n,className:ke("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));hC.displayName=uC.displayName;const pC=v.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(W3,{children:[d.jsx(hC,{}),d.jsxs(cC,{ref:r,className:ke("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(V3,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(eo,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pC.displayName=cC.displayName;const mC=({className:e,...t})=>d.jsx("div",{className:ke("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});mC.displayName="DialogHeader";const gC=v.forwardRef(({className:e,...t},n)=>d.jsx(dC,{ref:n,className:ke("text-lg font-semibold leading-none tracking-tight",e),...t}));gC.displayName=dC.displayName;const yC=v.forwardRef(({className:e,...t},n)=>d.jsx(fC,{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));yC.displayName=fC.displayName;const q3=({phases:e,setPhases:t,onNext:n,onPrevious:r})=>{const[i,s]=v.useState(new Set),[o,a]=v.useState(null),[l,u]=v.useState(null),[c,f]=v.useState(new Set),[p,h]=v.useState(new Set),w=C=>{const R=new Set(i);R.has(C)?R.delete(C):R.add(C),s(R)},m=C=>{const R={title:"New Issue",description:"Issue description",role:"Developer"};t(e.map(I=>I.id===C?{...I,issues:[...I.issues,R]}:I))},b=(C,R)=>{t(e.map(I=>I.id===C?{...I,issues:I.issues.filter((P,L)=>L!==R)}:I))},g=(C,R,I)=>{a(`${R}-${I}`),u({...C})},y=(C,R)=>{l&&(t(e.map(I=>I.id===C?{...I,issues:I.issues.map((P,L)=>L===R?l:P)}:I)),a(null),u(null))},x=()=>{a(null),u(null)},S=()=>{const C=e.map(R=>({...R,issues:R.issues.filter((I,P)=>!p.has(`${R.id}-${P}`))}));t(C),h(new Set)},_=C=>{const R=new Set(p);R.has(C)?R.delete(C):R.add(C),h(R)},E=Array.from(new Set(e.flatMap(C=>C.roles)));return d.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[d.jsx(Oe,{className:"border-0 shadow-lg",children:d.jsxs($t,{className:"bg-gradient-to-r from-purple-600 to-pink-600 text-white",children:[d.jsxs(Bt,{className:"text-xl flex items-center",children:[d.jsx(q1,{className:"w-5 h-5 mr-2"}),"Epic Issue View"]}),d.jsx(vr,{className:"text-purple-100",children:"Review and edit all issues grouped by epic"})]})}),p.size>0&&d.jsx(Oe,{children:d.jsx($e,{className:"py-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("p",{className:"text-sm text-gray-600",children:[p.size," issue",p.size>1?"s":""," selected"]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Ve,{size:"sm",variant:"destructive",onClick:S,children:[d.jsx(Ay,{className:"w-4 h-4 mr-1"}),"Delete Selected"]}),d.jsx(Ve,{size:"sm",variant:"outline",onClick:()=>h(new Set),children:"Clear Selection"})]})]})})}),d.jsx("div",{className:"space-y-4",children:e.filter(C=>C.approved).map(C=>d.jsx(Oe,{className:"overflow-hidden",children:d.jsxs(HE,{open:i.has(C.id),onOpenChange:()=>w(C.id),children:[d.jsx(WE,{className:"w-full",children:d.jsx($t,{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[i.has(C.id)?d.jsx(Wc,{className:"w-5 h-5"}):d.jsx(W1,{className:"w-5 h-5"}),d.jsxs("div",{className:"text-left",children:[d.jsx(Bt,{className:"text-lg",children:C.title}),d.jsx(vr,{children:C.description})]})]}),d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsxs(Ct,{variant:"secondary",children:[C.issues.length," issue",C.issues.length!==1?"s":""]}),d.jsxs(Ct,{variant:"outline",children:[C.roles.length," role",C.roles.length!==1?"s":""]})]})]})})}),d.jsx(qE,{children:d.jsxs($e,{className:"pt-0",children:[d.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:C.roles.map(R=>d.jsxs(Ct,{variant:"secondary",className:"text-xs",children:[d.jsx(qc,{className:"w-3 h-3 mr-1"}),R]},R))}),d.jsxs("div",{className:"space-y-3",children:[C.issues.map((R,I)=>{const P=`${C.id}-${I}`,L=o===P;return d.jsx(Oe,{className:`${p.has(P)?"ring-2 ring-blue-500":""}`,children:d.jsx($e,{className:"pt-4",children:L&&l?d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx(dn,{htmlFor:`title-${P}`,children:"Title"}),d.jsx(Xi,{id:`title-${P}`,value:l.title,onChange:A=>u({...l,title:A.target.value}),className:"mt-1"})]}),d.jsxs("div",{children:[d.jsx(dn,{htmlFor:`desc-${P}`,children:"Description"}),d.jsx(id,{id:`desc-${P}`,value:l.description,onChange:A=>u({...l,description:A.target.value}),rows:4,className:"mt-1"})]}),d.jsxs("div",{children:[d.jsx(dn,{htmlFor:`role-${P}`,children:"Assigned Role"}),d.jsxs(To,{value:l.role,onValueChange:A=>u({...l,role:A}),children:[d.jsx(vs,{id:`role-${P}`,className:"mt-1",children:d.jsx(Po,{})}),d.jsx(xs,{children:E.map(A=>d.jsx(Or,{value:A,children:A},A))})]})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsxs(Ve,{size:"sm",variant:"outline",onClick:x,children:[d.jsx(eo,{className:"w-4 h-4 mr-1"}),"Cancel"]}),d.jsxs(Ve,{size:"sm",onClick:()=>y(C.id,I),children:[d.jsx(eP,{className:"w-4 h-4 mr-1"}),"Save"]})]})]}):d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-start justify-between mb-2",children:[d.jsxs("div",{className:"flex items-start space-x-3 flex-1",children:[d.jsx("input",{type:"checkbox",checked:p.has(P),onChange:()=>_(P),className:"mt-1"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100",children:R.title}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:R.description})]})]}),d.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[d.jsx(Ct,{variant:"outline",className:"text-xs",children:R.role}),d.jsx(Ve,{size:"icon",variant:"ghost",onClick:()=>g(R,C.id,I),children:d.jsx(tP,{className:"w-4 h-4"})}),d.jsx(Ve,{size:"icon",variant:"ghost",onClick:()=>b(C.id,I),children:d.jsx(Ay,{className:"w-4 h-4"})})]})]}),d.jsxs(U3,{children:[d.jsx(H3,{asChild:!0,children:d.jsxs(Ve,{variant:"link",size:"sm",className:"text-xs",children:[d.jsx(Do,{className:"w-3 h-3 mr-1"}),"Preview GitHub Issue"]})}),d.jsxs(pC,{className:"max-w-2xl",children:[d.jsxs(mC,{children:[d.jsx(gC,{children:R.title}),d.jsx(yC,{children:"Preview of how this will appear in GitHub"})]}),d.jsx("div",{className:"mt-4",children:R&&d.jsx("div",{className:"space-y-4",children:d.jsxs(fE,{defaultValue:"preview",className:"w-full",children:[d.jsxs(ig,{className:"grid w-full grid-cols-2",children:[d.jsx(rl,{value:"preview",children:"Preview"}),d.jsx(rl,{value:"markdown",children:"Markdown"})]}),d.jsx(il,{value:"preview",className:"mt-4",children:d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(qk,{children:`${R.description}
**Assigned Role:** ${R.role}
**Epic:** ${C.title}`})})}),d.jsx(il,{value:"markdown",className:"mt-4",children:d.jsx("pre",{className:"text-xs bg-gray-50 dark:bg-gray-900 p-4 rounded overflow-auto",children:`${R.description}
**Assigned Role:** ${R.role}
**Epic:** ${C.title}`})})]})})})]})]})]})})},I)}),d.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>m(C.id),className:"w-full",children:[d.jsx(yu,{className:"w-4 h-4 mr-2"}),"Add Issue"]})]})]})})]})},C.id))}),e.filter(C=>C.approved).length===0&&d.jsx(Oe,{children:d.jsx($e,{className:"py-12 text-center",children:d.jsx("p",{className:"text-gray-600",children:"No approved phases yet. Please go back and approve phases to see issues here."})})}),d.jsxs("div",{className:"flex justify-between",children:[d.jsxs(Ve,{variant:"outline",onClick:r,children:[d.jsx(mm,{className:"w-4 h-4 mr-2"}),"Back to Epic View"]}),d.jsxs(Ve,{onClick:n,disabled:e.filter(C=>C.approved).length===0,className:"bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700",children:["Continue to GitHub Sync",d.jsx(Hc,{className:"w-4 h-4 ml-2"})]})]})]})},K3=pl("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),pp=v.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:ke(K3({variant:t}),e),...n}));pp.displayName="Alert";const G3=v.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:ke("mb-1 font-medium leading-none tracking-tight",e),...t}));G3.displayName="AlertTitle";const mp=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:ke("text-sm [&_p]:leading-relaxed",e),...t}));mp.displayName="AlertDescription";const Q3=({summary:e,phases:t,onPrevious:n,onSubmit:r})=>{const[i,s]=v.useState(!1),[o,a]=v.useState(!1),[l,u]=v.useState(e.repository||""),[c,f]=v.useState(e.branch||"main"),[p,h]=v.useState(""),[w,m]=v.useState(!1),[b,g]=v.useState([]),[y,x]=v.useState(["main"]),[S,_]=v.useState(!1),[E,C]=v.useState(!1),[R,I]=v.useState(null),{toast:P}=$c(),L=t.filter(V=>V.approved),A=L.reduce((V,M)=>V+M.issues.length,0),U=[...new Set(L.flatMap(V=>V.roles))];v.useEffect(()=>{F()},[]),v.useEffect(()=>{l&&W(l)},[l]);const F=async()=>{_(!0),I(null);try{const M=await fetch("/api/github/repositories");if(!M.ok)throw new Error("Failed to fetch repositories");const D=await M.json(),k=Array.isArray(D)?D:[];g(k.filter(re=>re.permissions&&(re.permissions.push||re.permissions.admin)))}catch(V){I("Failed to load repositories. Please check your GitHub authentication."),console.error("Error fetching repositories:",V)}finally{_(!1)}},W=async V=>{C(!0);try{const M=`/api/github/branches?repo=${encodeURIComponent(V)}`,D=await fetch(M);if(!D.ok)throw new Error("Failed to fetch branches");const k=await D.json();x(Array.isArray(k)?k:[])}catch(M){console.error("Error fetching branches:",M),x(["main"])}finally{C(!1)}},H=async()=>{s(!0);const V=l||e.repository;if(!V){P({title:"Repository required",description:"Please select a repository",variant:"destructive"}),s(!1);return}try{r&&await r(t),a(!0),P({title:"Successfully pushed to GitHub!",description:`Created ${L.length} epics and ${A} issues in ${V}.`})}catch(M){P({title:"Failed to create GitHub issues",description:M instanceof Error?M.message:"Unknown error",variant:"destructive"})}finally{s(!1)}};return o?d.jsx("div",{className:"max-w-4xl mx-auto",children:d.jsxs(Oe,{className:"border-0 shadow-lg",children:[d.jsxs($t,{className:"bg-gradient-to-r from-green-600 to-emerald-600 text-white text-center py-12",children:[d.jsx("div",{className:"flex justify-center mb-4",children:d.jsx("div",{className:"w-16 h-16 bg-white/20 rounded-full flex items-center justify-center",children:d.jsx(Th,{className:"w-8 h-8"})})}),d.jsx(Bt,{className:"text-2xl mb-2",children:"Successfully Deployed!"}),d.jsx(vr,{className:"text-green-100",children:"Your agent team structure has been pushed to GitHub"})]}),d.jsxs($e,{className:"p-8 text-center",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-8",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-3xl font-bold text-green-600 mb-1",children:L.length}),d.jsx("div",{className:"text-sm text-gray-600",children:"Epics Created"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-1",children:A}),d.jsx("div",{className:"text-sm text-gray-600",children:"Issues Generated"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-3xl font-bold text-purple-600 mb-1",children:U.length}),d.jsx("div",{className:"text-sm text-gray-600",children:"Roles Assigned"})]})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs(Ve,{className:"bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700",onClick:()=>window.open(`https://github.com/${e.repository}/issues`,"_blank"),children:[d.jsx(gu,{className:"w-4 h-4 mr-2"}),"View on GitHub"]}),d.jsx("div",{className:"text-sm text-gray-500",children:"Ready for Claude Flow SPARC agents to start execution"})]})]})]})}):d.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[d.jsx(Oe,{className:"border-0 shadow-lg",children:d.jsxs($t,{className:"bg-gradient-to-r from-purple-600 to-pink-600 text-white",children:[d.jsx(Bt,{className:"text-xl",children:"Review & Submit"}),d.jsx(vr,{className:"text-purple-100",children:"Final review before pushing to GitHub"})]})}),d.jsxs(Oe,{children:[d.jsx($t,{children:d.jsxs(Bt,{className:"text-lg flex items-center",children:[d.jsx(gu,{className:"w-5 h-5 mr-2"}),"Target Repository"]})}),d.jsxs($e,{className:"space-y-4",children:[R?d.jsxs(pp,{className:"mb-4",children:[d.jsx(GT,{className:"h-4 w-4"}),d.jsx(mp,{children:R})]}):null,d.jsxs("div",{children:[d.jsx(dn,{htmlFor:"repository",children:"Repository"}),d.jsxs(To,{value:l,onValueChange:u,disabled:S,children:[d.jsx(vs,{id:"repository",className:"mt-1",children:d.jsx(Po,{placeholder:S?"Loading repositories...":"Select repository"})}),d.jsx(xs,{children:Array.isArray(b)&&b.map(V=>d.jsx(Or,{value:V.full_name,children:V.full_name},V.full_name))})]})]}),d.jsxs("div",{children:[d.jsx(dn,{htmlFor:"branch",children:"Branch"}),w?d.jsxs("div",{className:"space-y-2 mt-1",children:[d.jsx(Xi,{id:"new-branch",value:p,onChange:V=>h(V.target.value),placeholder:"feature/agent-team-composer"}),d.jsx(Ve,{size:"sm",variant:"outline",onClick:()=>{m(!1),h("")},children:"Use existing branch"})]}):d.jsxs("div",{className:"space-y-2 mt-1",children:[d.jsxs(To,{value:c,onValueChange:f,disabled:E||!l,children:[d.jsx(vs,{id:"branch",children:d.jsx(Po,{placeholder:E?"Loading branches...":"Select branch"})}),d.jsx(xs,{children:Array.isArray(y)&&y.map(V=>d.jsx(Or,{value:V,children:V},V))})]}),d.jsx(Ve,{size:"sm",variant:"outline",onClick:()=>m(!0),disabled:!l,children:"Create new branch"})]})]}),S&&d.jsx("div",{className:"flex items-center justify-center py-4",children:d.jsx(Zu,{className:"w-4 h-4 animate-spin"})}),d.jsxs(Ve,{size:"sm",variant:"ghost",onClick:F,disabled:S,children:[d.jsx(JT,{className:"w-4 h-4 mr-2"}),"Refresh Repositories"]})]})]}),d.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[d.jsxs(Oe,{children:[d.jsx($t,{children:d.jsxs(Bt,{className:"text-lg flex items-center",children:[d.jsx(Do,{className:"w-5 h-5 mr-2"}),"Project Summary"]})}),d.jsxs($e,{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-gray-700",children:"Title"}),d.jsx("div",{className:"text-sm text-gray-600",children:e.title})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-gray-700",children:"Domain"}),d.jsx(Ct,{variant:"outline",children:e.domain})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-gray-700",children:"Description"}),d.jsx("div",{className:"text-sm text-gray-600 line-clamp-3",children:e.description})]})]})]}),d.jsxs(Oe,{children:[d.jsx($t,{children:d.jsxs(Bt,{className:"text-lg flex items-center",children:[d.jsx(qc,{className:"w-5 h-5 mr-2"}),"Statistics"]})}),d.jsxs($e,{className:"space-y-4",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-sm text-gray-600",children:"Approved Phases"}),d.jsx("span",{className:"font-semibold",children:L.length})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-sm text-gray-600",children:"Total Issues"}),d.jsx("span",{className:"font-semibold",children:A})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-sm text-gray-600",children:"Active Roles"}),d.jsx("span",{className:"font-semibold",children:U.length})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-sm text-gray-600",children:"SPARC Enabled"}),d.jsx(Th,{className:"w-4 h-4 text-green-600"})]})]})]}),d.jsxs(Oe,{children:[d.jsx($t,{children:d.jsxs(Bt,{className:"text-lg flex items-center",children:[d.jsx(G1,{className:"w-5 h-5 mr-2"}),"Active Roles"]})}),d.jsx($e,{children:d.jsx("div",{className:"flex flex-wrap gap-2",children:U.map(V=>d.jsx(Ct,{variant:"secondary",className:"text-xs",children:V},V))})})]})]}),d.jsxs(Oe,{children:[d.jsxs($t,{children:[d.jsx(Bt,{className:"text-lg",children:"Approved Phases"}),d.jsx(vr,{children:"These phases will be created as epics in your GitHub repository"})]}),d.jsx($e,{children:d.jsx("div",{className:"space-y-3",children:L.map((V,M)=>d.jsxs("div",{className:"flex items-center justify-between p-3 bg-green-50 rounded-lg border border-green-200",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx("div",{className:"w-6 h-6 bg-green-600 text-white rounded-full flex items-center justify-center text-xs font-bold",children:M+1}),d.jsxs("div",{children:[d.jsx("div",{className:"font-medium text-gray-900",children:V.title}),d.jsx("div",{className:"text-sm text-gray-600",children:V.description})]})]}),d.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-600",children:[d.jsxs("span",{children:[V.roles.length," roles"]}),d.jsxs("span",{children:[V.issues.length," issues"]})]})]},V.id))})})]}),L.length<t.length&&d.jsx(pp,{children:d.jsxs(mp,{children:[t.length-L.length," phase(s) not approved and will be skipped. You can always run the tool again to add more phases later."]})}),d.jsxs("div",{className:"flex justify-between",children:[d.jsxs(Ve,{variant:"outline",onClick:n,disabled:i,children:[d.jsx(mm,{className:"w-4 h-4 mr-2"}),"Back to Phases"]}),d.jsx(Ve,{onClick:H,disabled:i||L.length===0||!l||w&&!p,className:"bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700",children:i?d.jsxs(d.Fragment,{children:[d.jsx(Zu,{className:"w-4 h-4 mr-2 animate-spin"}),"Pushing to GitHub..."]}):d.jsxs(d.Fragment,{children:[d.jsx(gu,{className:"w-4 h-4 mr-2"}),"Push to GitHub"]})})]})]})};function Z3(){const[e,t]=v.useState(null),[n,r]=v.useState(!0),[i,s]=v.useState(null),{toast:o}=$c();v.useEffect(()=>{a()},[]);const a=async()=>{try{r(!0);const f=await fetch("/api/project");if(!f.ok)throw new Error("Failed to fetch project data");const p=await f.json();t(p)}catch(c){s(c instanceof Error?c.message:"Unknown error"),o({title:"Error loading project data",description:"Please ensure the CLI tool is running",variant:"destructive"})}finally{r(!1)}};return{projectData:e,loading:n,error:i,updateProjectData:async c=>{try{if(!(await fetch("/api/project",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).ok)throw new Error("Failed to update project data");t(c)}catch(f){throw o({title:"Error updating project data",description:f instanceof Error?f.message:"Unknown error",variant:"destructive"}),f}},createGitHubIssues:async c=>{try{const p=await fetch("/api/github/create-issues",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phases:c})});if(!p.ok){const w=await p.json();throw new Error(w.details||"Failed to create GitHub issues")}return await p.json()}catch(f){throw o({title:"Error creating GitHub issues",description:f instanceof Error?f.message:"Unknown error",variant:"destructive"}),f}},refetch:a}}class Y3{async parse(t){return{title:this.extractTitle(t),description:this.extractDescription(t),domain:this.identifyDomain(t),features:this.extractFeatures(t),techStack:this.extractTechStack(t),complexity:this.assessComplexity(t),userTypes:this.identifyUserTypes(t),integrations:this.identifyIntegrations(t)}}extractTitle(t){const n=t.match(/^#\s+(.+?)$/m);return n?n[1].trim():"Untitled Project"}extractDescription(t){const n=t.split(`
`);let r="",i=!1;for(const s of n){if(s.match(/^#\s+/)){if(i)break;i=!0;continue}if(s.match(/^##\s+/)&&i)break;i&&s.trim()&&(r+=s.trim()+" ")}return r.trim()||"No description provided"}extractFeatures(t){const n=[],r=[/## Features?\n((?:[-*] .+?(?:\n|$))+)/i,/## What (does|can) .+?\n((?:[-*] .+?(?:\n|$))+)/i,/## Functionality\n((?:[-*] .+?(?:\n|$))+)/i,/## Key Features?\n((?:[-*] .+?(?:\n|$))+)/i];for(const i of r){const s=t.match(i);if(s){const o=s[s.length-1];n.push(...o.split(`
`).filter(a=>a.trim().match(/^[-*]/)).map(a=>a.trim().replace(/^[-*]\s+/,"")));break}}return n}extractTechStack(t){const n=[],r=[/## Tech(?:nology)? Stack\n((?:[-*] .+?(?:\n|$))+)/i,/## Built With\n((?:[-*] .+?(?:\n|$))+)/i,/## Technologies\n((?:[-*] .+?(?:\n|$))+)/i];for(const s of r){const o=t.match(s);if(o){n.push(...o[1].split(`
`).filter(a=>a.trim().match(/^[-*]/)).map(a=>a.trim().replace(/^[-*]\s+/,"")));break}}return["React","Vue","Angular","Node.js","Express","Django","Flask","PostgreSQL","MongoDB","MySQL","Redis","Docker","Kubernetes","AWS","Azure","GCP","TypeScript","JavaScript","Python","Java","Go","Rust","GraphQL","REST API","WebSocket","gRPC"].forEach(s=>{t.includes(s)&&!n.includes(s)&&n.push(s)}),n}assessComplexity(t){let n=0;const r=this.extractFeatures(t);r.length>10?n+=3:r.length>5?n+=2:r.length>0&&(n+=1);const i=this.extractTechStack(t);i.length>8?n+=3:i.length>4?n+=2:i.length>0&&(n+=1),["microservices","distributed","scalable","enterprise","real-time","machine learning","AI","blockchain","multi-tenant","high availability","load balancing"].forEach(a=>{t.toLowerCase().includes(a.toLowerCase())&&(n+=1)});const o=this.identifyIntegrations(t);return o.length>5?n+=2:o.length>2&&(n+=1),n>=8?"complex":n>=4?"moderate":"simple"}identifyDomain(t){const n={"e-commerce":/e-?commerce|shop|store|cart|checkout|payment|product catalog/i,"social-media":/social|feed|post|comment|like|follow|share|profile/i,productivity:/task|todo|project|manage|workflow|collaborate|team/i,healthcare:/health|medical|patient|doctor|appointment|prescription/i,education:/learn|course|student|teacher|quiz|lesson|curriculum/i,finance:/finance|bank|payment|transaction|wallet|budget|invoice/i,entertainment:/video|music|stream|media|content|playlist|watch/i,communication:/chat|message|call|video conference|email|notification/i,analytics:/analytics|dashboard|metric|report|visualization|insight/i,devtools:/developer|api|sdk|cli|debug|deploy|monitor|log/i,iot:/iot|sensor|device|embedded|arduino|raspberry|mqtt/i,gaming:/game|player|score|level|achievement|multiplayer/i},r={};for(const[o,a]of Object.entries(n)){const l=t.match(a);l&&(r[o]=l.length)}let i=0,s="general";for(const[o,a]of Object.entries(r))a>i&&(i=a,s=o);return s}identifyUserTypes(t){const n=[],r={developers:/developer|programmer|engineer|coder|api user/i,administrators:/admin|administrator|operator|devops/i,"end-users":/user|customer|client|consumer|visitor/i,"business-users":/business|manager|executive|stakeholder/i,analysts:/analyst|data scientist|researcher/i,designers:/designer|ux|ui|creative/i};for(const[i,s]of Object.entries(r))s.test(t)&&n.push(i);return n.length>0?n:["end-users"]}identifyIntegrations(t){const n=[];return["GitHub","GitLab","Bitbucket","Slack","Discord","Teams","Jira","Trello","Asana","Stripe","PayPal","Square","AWS","Azure","Google Cloud","Twilio","SendGrid","Mailgun","OAuth","SAML","LDAP","Salesforce","HubSpot","Zendesk","Datadog","New Relic","Sentry","Prometheus","Grafana"].forEach(i=>{t.includes(i)&&n.push(i)}),n}}async function X3(e){const n=await new Y3().parse(e);let r="unknown/unknown",i="main";try{const{execSync:s}=require("child_process"),a=s("git config --get remote.origin.url",{encoding:"utf8"}).trim().match(/(?:git@|https:\/\/)(?:github\.com)[/:](.+?)(?:\.git)?$/);a&&(r=a[1]),i=s("git rev-parse --abbrev-ref HEAD",{encoding:"utf8"}).trim()}catch{}return{title:n.title,description:n.description,domain:n.domain,repository:r,branch:i,features:n.features,techStack:n.techStack,complexity:n.complexity,userTypes:n.userTypes,integrations:n.integrations}}const J3=()=>{const{projectData:e,loading:t,error:n,updateProjectData:r,createGitHubIssues:i}=Z3(),[s,o]=v.useState(0),[a,l]=v.useState(null),[u,c]=v.useState([]),[f,p]=v.useState(""),[h,w]=v.useState(null);v.useEffect(()=>{e&&(l(e.summary),c(e.phases)),m()},[e]);const m=async()=>{try{const S=await fetch("/api/readme");if(S.ok){const E=(await S.json()).content;p(E);const C=await X3(E);w({title:C.title,description:C.description,domain:C.domain,targetUsers:C.userTypes||[],techStack:C.techStack||[],features:C.features||[],complexity:C.complexity||"moderate"})}}catch(S){console.error("Failed to load README:",S),w({title:"Untitled Project",description:"",domain:"general",targetUsers:[],techStack:[],features:[],complexity:"moderate"})}},b=[{id:0,title:"Parse Product",icon:Do},{id:1,title:"Sprint View",icon:K1},{id:2,title:"Epic View",icon:q1},{id:3,title:"Issues View",icon:XT},{id:4,title:"GitHub Sync",icon:Th}],g=async()=>{s<b.length-1&&(a&&u.length>0&&await r({summary:a,phases:u}),o(s+1))},y=()=>{s>0&&o(s-1)},x=()=>{if(t)return d.jsx(Oe,{className:"max-w-md mx-auto",children:d.jsxs($e,{className:"flex flex-col items-center justify-center py-12",children:[d.jsx(Zu,{className:"w-8 h-8 animate-spin text-blue-600 mb-4"}),d.jsx("p",{className:"text-gray-600",children:"Loading project data..."})]})});if(n)return d.jsx(Oe,{className:"max-w-md mx-auto border-red-200",children:d.jsxs($e,{className:"py-12",children:[d.jsxs("p",{className:"text-red-600 text-center mb-4",children:["Error: ",n]}),d.jsx("p",{className:"text-gray-600 text-center text-sm",children:"Please ensure the CLI tool is running"})]})});if(!a||u.length===0)return d.jsx(Oe,{className:"max-w-md mx-auto",children:d.jsx($e,{className:"py-12",children:d.jsx("p",{className:"text-gray-600 text-center",children:"No project data available"})})});switch(s){case 0:return d.jsx(x3,{readmeContent:f,initialData:h,onNext:S=>{w(S),a&&l({...a,title:S.title,description:S.description,domain:S.domain}),g()}});case 1:return d.jsx(w3,{summary:a,setSummary:l,onNext:g});case 2:return d.jsx(P3,{phases:u,setPhases:c,onNext:g,onPrevious:y});case 3:return d.jsx(q3,{phases:u,setPhases:c,onNext:g,onPrevious:y});case 4:return d.jsx(Q3,{summary:a,phases:u,onPrevious:y,onSubmit:i});default:return null}};return d.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-100",children:[d.jsx("header",{className:"border-b bg-white/80 backdrop-blur-sm sticky top-0 z-50",children:d.jsx("div",{className:"container mx-auto px-6 py-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-r from-blue-600 to-indigo-600 flex items-center justify-center",children:d.jsx(G1,{className:"w-6 h-6 text-white"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Agent Team Composer"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Claude Flow SPARC Optimized"})]})]}),d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsxs(Ct,{variant:"outline",className:"bg-green-50 text-green-700 border-green-200",children:[d.jsx(gu,{className:"w-3 h-3 mr-1"}),"Connected"]}),d.jsxs(Ct,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[d.jsx(qc,{className:"w-3 h-3 mr-1"}),"8 Roles Active"]})]})]})})}),d.jsxs("div",{className:"container mx-auto px-6 py-6",children:[d.jsx(Oe,{className:"mb-8",children:d.jsx($e,{className:"pt-6",children:d.jsx("div",{className:"flex items-center justify-between",children:b.map((S,_)=>d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:`flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all duration-300 ${s>=_?"bg-blue-600 border-blue-600 text-white":"border-gray-300 text-gray-400"}`,children:d.jsx(S.icon,{className:"w-5 h-5"})}),d.jsxs("div",{className:"ml-3",children:[d.jsxs("p",{className:`text-sm font-medium ${s>=_?"text-blue-600":"text-gray-400"}`,children:["Step ",_+1]}),d.jsx("p",{className:`text-xs ${s>=_?"text-gray-700":"text-gray-400"}`,children:S.title})]}),_<b.length-1&&d.jsx("div",{className:`w-20 h-0.5 mx-6 transition-all duration-300 ${s>_?"bg-blue-600":"bg-gray-300"}`})]},S.id))})})}),d.jsx("div",{className:"transition-all duration-300",children:x()})]})]})},ez=()=>{const e=Jb();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),d.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},tz=new EA,nz=()=>d.jsx(_A,{client:tz,children:d.jsxs(eA,{children:[d.jsx(DP,{}),d.jsx(mR,{}),d.jsx(h2,{children:d.jsxs(c2,{children:[d.jsx(Fh,{path:"/",element:d.jsx(J3,{})}),d.jsx(Fh,{path:"*",element:d.jsx(ez,{})})]})})]})});p1(document.getElementById("root")).render(d.jsx(nz,{}));